PageSourceSearch

https://www.railyatri.in/_next/static/chunks/pages/live-train-status/[trainNumber]-4b31c6118d4cf63a.js

js railyatri.in collected 2026-10-01 11:25:35 UTC 347,426 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6084,6160,5751],{66720:function(e,t,n){"use strict";var i=n(87462),r=n(67294),o=n(71657),a=n(90068),s=n(85893);const l=(e,t)=>(0,i.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),c=e=>(0,i.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});t.ZP=function(e){const t=(0,o.Z)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:d=!1}=t;return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(a.Z,{styles:e=>((e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((([t,n])=>{var i;r[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(i=n.palette)?void 0:i.mode}}));let o=(0,i.Z)({html:l(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,i.Z)({margin:0},c(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const a=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return a&&(o=[o,a]),o})(e,d)}),n]})}},34484:function(e,t,n){"use strict";n(67294);var i=n(88169),r=n(85893);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},78114:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});var i=n(71657);function r(e){return i.Z}},61730:function(e,t,n){"use strict";var i;n.d(t,{Z:function(){return u}});var r=n(67294),o=n(54895),a=n(20539),s=n(34168);function l(e,t,n,i,a){const[s,l]=r.useState((()=>a&&n?n(e).matches:i?i(e).matches:t));return(0,o.Z)((()=>{let t=!0;if(!n)return;const i=n(e),r=()=>{t&&l(i.matches)};return r(),i.addListener(r),()=>{t=!1,i.removeListener(r)}}),[e,n]),s}const c=(i||(i=n.t(r,2))).useSyncExternalStore;function d(e,t,n,i,o){const a=r.useCallback((()=>t),[t]),s=r.useMemo((()=>{if(o&&n)return()=>n(e).matches;if(null!==i){const{matches:t}=i(e);return()=>t}return a}),[a,e,i,o,n]),[l,d]=r.useMemo((()=>{if(null===n)return[a,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[a,n,e]);return c(d,l,s)}function u(e,t={}){const n=(0,s.Z)(),i="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:r=!1,matchMedia:o=(i?window.matchMedia:null),ssrMatchMedia:u=null,noSsr:f=!1}=(0,a.Z)({name:"MuiUseMediaQuery",props:t,theme:n});let p="function"===typeof e?e(n):e;p=p.replace(/^@media( ?)/m,"");return(void 0!==c?d:l)(p,r,o,u,f)}},36641:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/live-train-status/[trainNumber]",function(){return n(93351)}])},41340:function(e,t,n){"use strict";n.d(t,{Ro:function(){return s},pD:function(){return l}});var i=n(99685),r=n(1531),o=n(72895),a=n(63018);function s(e,t,n){var a=e.confProb,s=e.from,l=e.to,c=e.trainNumber,d=e.trainClass,u=e.trainQuota,f=e.boarding_date,p=e.user_id,m=e.device_type_id,v=void 0===m?4:m,h=(e.utm,e.utm_source,e.save_booking),_=void 0===h||h,x=e.avail,g=e.called_from_tbs,b=void 0===g||g,y=e.fare,j=e.url_params,w=void 0===j?"":j,S=e.cateringCharges,k=void 0===S?"":S,C=e.train_name,N=void 0===C?"":C,Z=e.fromName,R=void 0===Z?"":Z,T=e.toName,P=void 0===T?"":T,D=e.duration,I=e.from_std,A=e.to_sta,O=e.train_date,F=(e.alterNateTrain,e.isAlternateTrain),M=e.est_chart_time,z=e.ry_guarantee;F&&(f=O);var E=(0,r.PC)(),W=(0,r.YG)(z);if(6!=n.current.device||"6"!=n.current.device){var L,B,q,U,Y,G,H,Q,V,X,J,K;t(!0);var $,ee="original_from=".concat(null!==(V=null===n||void 0===n||null===(L=n.current)||void 0===L?void 0:L.from.code)&&void 0!==V?V:"","&original_to=").concat(null!==(X=null===n||void 0===n||null===(B=n.current)||void 0===B?void 0:B.to.code)&&void 0!==X?X:"","&filters_applied=").concat(null!==(J=null===n||void 0===n||null===(q=n.current)||void 0===q||null===(U=q.filters_applied)||void 0===U?void 0:U.current)&&void 0!==J?J:"","&number_of_trains=").concat(null!==(K=null===n||void 0===n||null===(Y=n.current)||void 0===Y?void 0:Y.number_of_trains)&&void 0!==K?K:"","&boarding_from=").concat(s,"&boarding_to=").concat(l,"&train_no=").concat(c,"&class=").concat(d,"&quota=").concat(u,"&boarding_date=").concat(f,"&user_id=").concat(n.current.userid,"&authentication_token=").concat(n.current.authToken,"&lang=").concat(n.current.lang,"&device_type_id=").concat(v,"&utm_referrer=").concat(n.current.utm_source,"&utm=").concat(n.current.utm_source,"&utm_source=").concat(n.current.utm_source,"&save_booking=").concat(_,"&avail=").concat(null===x||void 0===x?void 0:x.replace(/#/g,""),"&called_from_tbs=").concat(b,"&fare=").concat(y,"&cateringCharges=").concat(k,"&action=tbs_booking&prob=").concat(null===a||void 0===a?void 0:a.replace(/[^a-zA-Z0-9 ]/g,""),"&duration=").concat(D,"&from_std=").concat(I,"&to_sta=").concat(A,"&train_date=").concat(null===O||void 0===O?void 0:O.replace(" ",""),"&train_name=").concat(N,"&fromStaName=").concat(R,"&toStaName=").concat(P,"&est_chart_time=").concat(M,"&").concat(void 0==w?"":w,"&from_code=").concat(s,"&isryguranteeselected=").concat(null===n||void 0===n||null===(G=n.current)||void 0===G?void 0:G.isryguranteeselected),te=(0,r.cI)(ee);if((0,r.PR)(null===te||void 0===te?void 0:te.boarding_from)&&(ee+="&from_code=".concat(null===te||void 0===te?void 0:te.boarding_from)),(0,r.PR)(null===te||void 0===te?void 0:te.from_name)||(ee+="&from_name=".concat(null===te||void 0===te?void 0:te.fromStaName)),(0,r.PR)(null===te||void 0===te?void 0:te.journey_date)||(ee+="&journey_date=".concat(null===te||void 0===te?void 0:te.train_date)),(0,r.PR)(null===te||void 0===te?void 0:te.boarding_to)&&(ee+="&to_code=".concat(null===te||void 0===te?void 0:te.boarding_to)),(0,r.PR)(null===te||void 0===te?void 0:te.to_name)||(ee+="&to_name=".concat(null===te||void 0===te?void 0:te.toStaName)),(0,r.PR)(null===te||void 0===te?void 0:te.from_sta_code)||(ee+="&from_sta_code=".concat(null===te||void 0===te?void 0:te.boarding_from)),(0,r.PR)(null===te||void 0===te?void 0:te.to_sta_code)||(ee+="&to_sta_code=".concat(null===te||void 0===te?void 0:te.boarding_to)),F){var ne=new Date(O).getTime()/1e3;ee+="&boarding_date=".concat((0,r.hT)("Y/m/d",ne),"&journey_date=").concat((0,r.hT)("d-m-Y",ne))}ee+="&trip_guarantee=".concat(W);var ie={step:"New_TBS_Sucessfull_booking",ecomm_type:"train_ticket_booking",user_id:p,from_station:s,to_station:l,device_type_id:n.current.device,utm_referrer:n.current.utm_source,boarding_date:f,journey_class:d,train_number:c,number_of_trains:n.current.number_of_trains,filters_applied:n.current.filters_applied.
1current,journey_quota:u,availability:x||"",v_code:n.current.vCode,src:n.current.src,journey_date:n.current.date,additionalInfo:null!==($=null===a||void 0===a?void 0:a.replace(/[^a-zA-Z0-9 ]/g,""))&&void 0!==$?$:"",alt_availability:"",trip_guarantee:W?(null===n||void 0===n||null===(H=n.current)||void 0===H?void 0:H.isryguranteeselected)?2:1:0};(0,i.yW)("","",ie);var re,oe="/m/passengerdetails/".concat(n.current.userid,"?").concat((0,r.B7)((0,r.jG)(ee,E))),ae={step:"New_TBS_Sucessfull_booking_with_log",ecomm_type:"train_ticket_booking",user_id:p,from_station:s,to_station:l,device_type_id:n.current.device,utm_referrer:n.current.utm_source,boarding_date:f,journey_class:d,train_number:c,number_of_trains:n.current.number_of_trains,filters_applied:n.current.filters_applied.current,journey_quota:u,availability:x||"",v_code:n.current.vCode,src:n.current.src,journey_date:n.current.date,additionalInfo:null!==(re=null===a||void 0===a?void 0:a.replace(/[^a-zA-Z0-9 ]/g,""))&&void 0!==re?re:"",current_url:JSON.stringify({browserUserid:null===E||void 0===E?void 0:E.userId,urlUserid:null===n||void 0===n||null===(Q=n.current)||void 0===Q?void 0:Q.userid,redirectionUrl:oe,current_url:window.location.href}),alt_availability:"",trip_guarantee:""};(0,i.yW)("","",ae),window.location.href=oe}else{var se,le,ce,de,ue,fe,pe,me,ve,he,_e,xe,ge,be,ye,je,we;p=E.userId;var Se="/train-ticket/passengers-detail?boarding_from=".concat(s,"&boarding_to=").concat(l,"&train_no=").concat(c,"&class=").concat(d,"&quota=").concat(u,"&boarding_date=").concat(f,"&user_id=").concat(p,"&lang=").concat(n.current.lang,"&device_type_id=").concat(v,"&utm_referrer=").concat(n.current.utm_source,"&utm=").concat(n.current.utm_source,"&utm_source=").concat(n.current.utm_source,"&save_booking=").concat(_,"&avail=").concat(null===x||void 0===x?void 0:x.replace(/#/g,""),"&fare=").concat(y,"&cateringCharges=").concat(k,"&action=train_between_station&prob=").concat(null===a||void 0===a?void 0:a.replace(/[^a-zA-Z0-9 ]/g,""),"&duration=").concat(D,"&from_std=").concat(I,"&to_sta=").concat(A,"&train_date=").concat(O,"&train_name=").concat(N,"&fromStaName=").concat(R,"&toStaName=").concat(P,"&").concat(void 0==w?"":w,"&fcos_status=").concat(n.current.fcosStatus,"&est_chart_time=").concat(M),ke=(0,r.cI)(Se.split("?")[1]);(0,r.PR)(null===ke||void 0===ke?void 0:ke.user_id)||(Se+="&user_id=".concat(null===E||void 0===E?void 0:E.userId)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.authentication_token)||(Se+="&authentication_token=".concat(null===E||void 0===E?void 0:E.New_User_token)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.from_code)||(Se+="&from_code=".concat(null===ke||void 0===ke?void 0:ke.boarding_from)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.from_name)||(Se+="&from_name=".concat(null===ke||void 0===ke?void 0:ke.fromStaName)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.journey_date)||(Se+="&journey_date=".concat(null===ke||void 0===ke?void 0:ke.train_date)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.to_code)||(Se+="&to_code=".concat(null===ke||void 0===ke?void 0:ke.boarding_to)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.to_name)||(Se+="&to_name=".concat(null===ke||void 0===ke?void 0:ke.toStaName)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.from_sta_code)||(Se+="&from_sta_code=".concat(null===ke||void 0===ke?void 0:ke.boarding_from)),(0,r.PR)(null===ke||void 0===ke?void 0:ke.to_sta_code)||(Se+="&to_sta_code=".concat(null===ke||void 0===ke?void 0:ke.boarding_to));var Ce,Ne=(0,r.cI)(Se.split("?")[1]);if(F){var Ze=new Date(null===ke||void 0===ke?void 0:ke.train_date).getTime()/1e3,Re={boarding_date:(0,r.hT)("Y/m/d",Ze),journey_date:(0,r.hT)("d-m-Y",Ze)};Object.assign(Ne,Re),Se="/train-ticket/passengers-detail?".concat((0,r.B7)(Ne))}var Te={step:"New_TBS_Sucessfull_booking",ecomm_type:"train_ticket_booking",user_id:null===E||void 0===E?void 0:E.userId,from_station:s,to_station:l,device_type_id:null===n||void 0===n||null===(se=n.current)||void 0===se?void 0:se.device,utm_referrer:null===n||void 0===n?void 0:n.current.utm_source,boarding_date:f,journey_class:d,train_number:c,number_of_trains:null===n||void 0===n||null===(le=n.current)||void 0===le?void 0:le.number_of_trains,filters_applied:null===n||void 0===n||null===(ce=n.current)||void 0===ce||null===(de=ce.filters_applied)||void 0===de?void 0:de.current,journey_quota:u,availability:x,v_code:null===n||void 0===n||null===(ue=n.current)||void 0===ue?void 0:ue.vCode,src:null===n||void 0===n||null===(fe=n.current)||void 0===fe?void 0:fe.src,journey_date:null===n||void 0===n||null===(pe=n.current)||void 0===pe?void 0:pe.date,original_from:null===n||void 0===n||null===(me=n.current)||void 0===me?void 0:me.from.code,original_to:null===n||void 0===n||null===(ve=n.current)||void 0===ve||null===(he=ve.to)||void 0===he?void 0:he.code,additionalInfo:null!==(Ce=null===a||void 0===a?void 0:a.replace(/[^a-zA-Z0-9 ]/g,""))&&void 0!==Ce?Ce:"",alt_availability:"",trip_guarantee:""};(0,i.yW)("","",Te);var Pe=(0,o.Z)(Se.split("?")[1]);Pe.user_id=null===E||void 0===E?void 0:E.userId,Pe.authentication_token=null===E||void 0===E?void 0:E.New_User_token,Pe.original_from=null===n||void 0===n||null===(_e=n.current)||void 0===_e||null===(xe=_e.from)||void 0===xe?void 0:xe.code,Pe.original_to=null===n||void 0===n||null===(ge=n.current)||void 0===ge||null===(be=ge.to)||void 0===be?void 0:be.code,Pe.
1number_of_trains=null===n||void 0===n||null===(ye=n.current)||void 0===ye?void 0:ye.number_of_trains,Pe.filters_applied=null===n||void 0===n||null===(je=n.current)||void 0===je||null===(we=je.filters_applied)||void 0===we?void 0:we.current,Se="/train-ticket/passengers-detail?".concat((0,r.B7)(Pe)),window.location.href=Se}}function l(e,t,n,i,o){var s,l=e.trainNumber,c=e.trainClass,d=e.from,u=e.to,f=e.boarding_date,p=(e.user_id,e.trainQuota),m=e.device_type_id,v=e.utm_source,h=e.dDay,_=e.routeInfoRef,x=e.trainStartDate,g=e.train_src,b=e.train_dstn;n(!0);var y=(0,r.PC)();null===y||void 0===y||y.userId,(0,a.W)({train_number:l,selectedClass:c,train_src:d,train_dstn:u,journey_date:"".concat(f.split("-")[2],"-").concat(f.split("-")[1],"-").concat(f.split("-")[0]).replace(/ /g,""),quota:p,utm_source:v,device:m,dDay:h,trainStartDate:x,trainSource:g,trainDestination:b,v_code:null===_||void 0===_||null===(s=_.current)||void 0===s?void 0:s.vCode}).then((function(e){var a;if((null===e||void 0===e?void 0:e.success)&&(null===e||void 0===e||null===(a=e.seat_availibility)||void 0===a?void 0:a.length)>0){var s=null===e||void 0===e?void 0:e.seat_availibility[0],l=s[s.class_type];t(l),n(!1)}else n(!1),(0,r.PR)(null===e||void 0===e?void 0:e.error)&&i(null===e||void 0===e?void 0:e.error),o(!0)}))}},83521:function(e,t,n){"use strict";var i=n(85893),r=n(24720),o=n.n(r);t.Z=function(e){var t=e.children,n=(e.onClose,e.customStyle),r=void 0===n?{}:n;return(0,i.jsx)("div",{className:o().popcontainer,children:(0,i.jsx)("div",{style:r,children:t})})}},66637:function(e,t,n){"use strict";n.d(t,{Xp:function(){return p},h4:function(){return u}});var i=n(85893),r=n(1531),o=n(14592),a=n.n(o),s=n(25675),l=n.n(s),c=n(67294),d=n(93946);function u(e){return(0,i.jsxs)("div",{className:"flexRow ".concat(a().mainHeader),id:"topHeader",children:[(0,i.jsxs)("div",{className:"flexRow flex1",onClick:function(){return window.history.back()},children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{width:32,height:32,src:"https://images.railyatri.in/ry_images_prod/back-arrow-22x-1637149766.png"})}),(0,i.jsx)("span",{children:"RailYatri"})]}),(0,i.jsx)("span",{className:"flex",children:(0,i.jsx)("a",{href:"http://m.rytr.in/home-page?utm_source=mwebresult_lts_Appicon",children:(0,i.jsx)(l(),{width:26,height:50,src:"https://images.railyatri.in/ry_images_prod/Group-182x-1634889438.png"})})})]})}function f(){var e=(0,r.PC)();return(0,i.jsxs)("div",{className:"flexRow ".concat(a().stickMainContainer),children:[(0,i.jsx)("span",{className:"flex flexCenter",style:{width:"22px"},children:(0,i.jsx)(l(),{width:48,height:35,src:"https://images.railyatri.in/ry_images_prod/back-arrow-1574063281.png"})}),(0,i.jsxs)("div",{className:"flexRow flex1",style:{justifyContent:"space-around"},children:[(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){var t;window.location.href="/train-ticket?utm_source=lts_result_mwebheader_train_tickets&user_id=".concat(e.userId,"&authentication_token=").concat(null!==(t=e.New_User_token)&&void 0!==t?t:"")},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/trains-1625625000.png"})}),(0,i.jsx)("span",{children:"Train Tickets"})]})}),(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){window.location.href="/m/bus-booking?utm_source=lts_result_mwebheader_bus_tickets"},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/bus-1625624989.png"})}),(0,i.jsx)("span",{children:"Bus Tickets"})]})}),(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){window.location.href="/m/buy-food-in-train?utm_source=lts_result_mwebheader_food"},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/food-on-trains2x-1602478737.png"})}),(0,i.jsx)("span",{children:"Food on Train"})]})})]})]})}function p(){var e=(0,c.useState)(!1),t=e[0],n=e[1],o=function(){try{var e,t,i=null===(e=document.getElementById("topHeader"))||void 0===e?void 0:e.getBoundingClientRect();(0,r.PR)(null!==(t=null===i||void 0===i?void 0:i.top)&&void 0!==t&&t)&&i.top<0?n(!0):n(!1)}catch(o){console.warn(o.message)}};return(0,c.useEffect)((function(){window.addEventListener("scroll",o)}),[]),(0,i.jsx)("div",{children:t?(0,i.jsx)(f,{}):(0,i.jsx)(m,{})})}function m(){var e=(0,r.PC)();return(0,i.jsxs)("div",{className:"flexRow ".concat(a().mainContainer),children:[(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){var t;window.location.href="/m/train-ticket?utm_source=lts_result_mwebheader_train_tickets&user_id=".concat(e.userId,"&authentication_token=").concat(null!==(t=e.New_User_token)&&void 0!==t?t:"")},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/trains-1625625000.png"})}),(0,i.jsx)("span",{children:"Train Tickets"})]})}),(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){window.location.href="/m/bus-booking?utm_source=lts_result_mwebheader_bus_tickets"},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/bus-1625624989.png"})}),(0,i.jsx)("span",{children:"Bus Tickets"})]})}),(0,i.jsx)(d.Z,{sx:{padding:0},onClick:function(){window.location.href="/m/buy-food-in-train?utm_source=lts_result_mwebheader_food"},children:(0,i.jsxs)("div",{className:"flexCol flexCenter ".concat(a().tab),children:[(0,i.jsx)("span",{children:(0,i.jsx)(l(),{height:37,width:36,src:"https://images.railyatri.in/ry_images_prod/food-on-trains2x-1602478737.png"})}),(0,i.jsx)("span",{children:"Food on Train"})]})})]})}},41495:function(e,t,n){"use strict";n.d(t,{Od:function(){return l},cp:function(){return c},vS:function(){return d}});var i=n(85893),r=n(7495),o=n.n(r);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(){return(0,i.jsx)("div",{className:"fixed ".concat(o().card),children:(0,i.jsxs)("div",{className:"".concat(o().cardBody),children:[(0,i.jsx)("h2",{className:"".concat(o().cardTitle," ").concat(o().skeleton)}),(0,i.jsx)("h2",{className:"".concat(o().cardTitle," ").concat(o().skeleton)}),(0,i.jsx)("p",{className:"".concat(o().cardIntro," ").concat(o().skeleton)}),(0,i.jsx)("p",{className:"".concat(o().cardIntro," ").concat(o().skeleton)}),(0,i.jsx)("p",{className:"".concat(o().cardIntro," ").concat(o().skeleton)}),(0,i.jsxs)("div",{className:"".concat(o().buttonContainer),children:[(0,i.jsx)("button",{className:"".concat(o().cardBtn," ").concat(o().skeleton)}),(0,i.jsx)("button",{className:"".concat(o().cardBtn," ").concat(o().skeleton)})]})]})})}function c(e){var t=e.count,n=void 0===t?1:t;return(0,i.jsx)("div",{className:"".concat(o().card),children:(0,i.jsx)("div",{className:"".concat(o().cardBody),children:s(Array(n)).map((function(e,t){return(0,i.jsx)("h2",{className:"".concat(o().cardTitle," ").concat(o().skeleton)},t)}))})})}function d(){return(0,i.jsx)("h2",{className:"".concat(o().cardTitle," ").concat(o().skeleton),style:{margin:"0px"}})}},11359:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var i=n(85893),r=n(1531),o=n(9008),a=n.n(o),s=n(67294),l=n(31955),c=function(e){var t,n=e.children,o=e.canonical,c=void 0===o?"https://www.railyatri.in":o,d=e.title,u=void 0===d?"Train Ticket Booking":d,f=e.description,p=void 0===f?"":f,m=e.androidAlt,v=void 0===m?"":m,h=e.iosAlt,_=void 0===h?"":h,x=e.script,g=e.additionalKeywords,b=void 0===g?"":g,y=e.ogDescription,j=void 0===y?"Indian Railways Train Enquiry, Insights & IRCTC eTicket booking - RailYatri":y,w=(0,s.use
1State)(""),S=(w[0],w[1]),k=(t="sskey",new URLSearchParams(window.location.search).get(t));return(0,s.useEffect)((function(){S(k);var e=l.Z.get("omg_sskey");(0,r.PR)(k)&&k!==e&&l.Z.set("omg_sskey",k,{expires:30})}),[k]),(0,i.jsxs)(a(),{children:[(0,i.jsx)("title",{children:u}),(0,i.jsx)("meta",{name:"description",content:p}),(0,i.jsx)("meta",{name:"keywords",content:b}),(0,i.jsx)("link",{rel:"alternate",href:v}),(0,i.jsx)("link",{rel:"canonical",href:c}),(0,i.jsx)("link",{rel:"icon",href:"https://images.railyatri.in/ry_images_prod/RailYatrifavicon-1740980280.png",type:"image/png"}),(0,i.jsx)("link",{rel:"shortcut icon",href:"https://images.railyatri.in/ry_images_prod/RailYatrifavicon-1740980280.png"}),(0,i.jsx)("meta",{httpEquiv:"X-UA-Compatible",content:"IE=edge"}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"}),(0,i.jsx)("meta",{name:"twitter:card",content:"https://images.railyatri.in/ry_images_prod/RailYatriwebcard-1720517179.png"}),(0,i.jsx)("meta",{property:"og:title",content:"Indian Railways Train Enquiry, Insights & IRCTC eTicket booking - RailYatri"}),(0,i.jsx)("meta",{property:"og:image",content:"https://images.railyatri.in/ry_images_prod/RailYatriwebcard-1720517179.png"}),(0,i.jsx)("meta",{name:"twitter:image",content:"https://images.railyatri.in/ry_images_prod/RailYatriwebcard-1720517179.png"}),(0,i.jsx)("meta",{property:"og:description",content:j}),(0,i.jsx)("meta",{name:"twitter:title",content:"Indian Railways Train Enquiry, Insights & IRCTC eTicket booking - RailYatri"}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,r.PR)(_)?(0,i.jsx)("meta",{property:"al:ios:url",content:_}):"",(0,i.jsx)("meta",{property:"al:ios:app_name",content:"Train Ticket App : RailYatri"}),(0,i.jsx)("meta",{property:"al:ios:app_store_id",content:"1052177547"}),(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:"\n                  var OMID = ".concat("2355118",";\n                  var OPID = ").concat("56009",';\n                  var ORef = encodeURIComponent(window.parent.location.href);\n                  (function() {\n                      var a = document.createElement("script");\n                      a.type = "text/javascript";\n                      a.async = true;\n                      a.src = "//track.omguk.com/e/qs/?action=Content&MID=" + OMID + "&PID=" + OPID + "&ref=" + ORef;\n                      var b = document.getElementsByTagName("body")[0] || document.getElementsByTagName("script")[0].parentNode;\n                      b.appendChild(a);\n                  })();\n                  ')}}),(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:"\n                !function(f,b,e,v,n,t,s)\n                {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n                n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n                if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n                n.queue=[];t=b.createElement(e);t.async=!0;\n                t.src=v;s=b.getElementsByTagName(e)[0];\n                s.parentNode.insertBefore(t,s)}(window,document,'script',\n                'https://connect.facebook.net/en_US/fbevents.js');\n                fbq('init', '883857327504071');\n                fbq('track', 'PageView');    \n              "}}),(0,i.jsx)("noscript",{children:(0,i.jsx)("img",{height:"1",width:"1",src:"https://www.facebook.com/tr?id=883857327504071&ev=PageView &noscript=1"})}),n,x]})},d=s.memo(c)},54151:function(e,t,n){"use strict";n.d(t,{$_:function(){return Ne},F3:function(){return We},uz:function(){return Me},h4:function(){return A},ds:function(){return R},uK:function(){return Ae},YS:function(){return ze.default}});var i=n(85893),r=n(67294),o=n(1531),a=n(65582),s=n(5616),l=n(15861),c=n(50135),d=n(20247),u=n(69417),f=n(93946),p=n(87109),m=n(10586),v=n(50720),h=n(18262),_=n(99685),x=n(5623),g=n(11163),b=n(27484),y=n.n(b),j=n(42293),w=n(58936),S=n(23795);function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},k.apply(this,arguments)}var C={transition:"box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",boxShadow:"none",background:"#ffffff",border:"1px solid #ccc",pt:1,pb:1},N={display:"flex",zIndex:"1200",background:"#ffffff",padding:"0px !important"},Z={width:"200px",height:"44px"};var R=function(e){var t=k({},e),n=t.activemenu,r=t.canshowlogincta;return(0,i.jsx)(j.Z,{position:"sticky",color:"primary",sx:C,children:(0,i.jsxs)(a.Z,{sx:N,style:{maxWidth:"DwebSAresult"===(null===t||void 0===t?void 0:t.pageName)?"1300px !important":void 0},children:[(0,i.jsx)(s.Z,{sx:{display:"flex",flexGrow:1},children:(0,i.jsx)(S.Z,{href:"/",underline:"none",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/RailYatri-1719298334.png",alt:"Logo",style:Z})})}),(0,i.jsx)(w.Z,{activemenu:n,canshowlogincta:r})]})})};function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},P.apply(this,arguments)}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){T(e,t,n[t])}))}return e}function I(e){var t,n,b=P({},e),j=b.fromStation,w=b.toStation,S=b.routeInfoRef,k=b.headerDateStripSelection,C=(b.toggleFromAndToStation,b.booking_window),N=((0,g.useRouter)(),(0,r.useState)([])),Z=N[0],R=N[1],T=(0,r.useState)(null===S||void 0===S||null===(t=S.current)||void 0===t?void 0:t.date),I=T[0],A=T[1],O=(0,r.useState)(!1),F=O[0],M=O[1],z=(0,r.useState)(null),E=z[0],W=z[1],L=(0,x.Z)((function(e){(0,_.tW)(e).then((function(e){return R(e)}))}),500).Debouncesetter,B=function(e){var t=e.target.value;L(t)};(0,r.useEffect)((function(){var e=I;W({formatedRouteDate:(0,o.hT)("m/d/Y",new Date(e).getTime()/1e3),formatedCalendardate:(0,o.hT)("d M, D",new Date(e).getTime()/1e3)})}),[I]),(0,r.useEffect)((function(){var e,t=null===S||void 0===S||null===(e=S.current)||void 0===e?void 0:e.date;W({formatedRouteDate:(0,o.hT)("m/d/Y",new Date(t).getTime()/1e3),formatedCalendardate:(0,o.hT)("d M, D",new Date(t).getTime()/1e3)})}),[null===S||void 0===S||null===(n=S.current)||void 0===n?void 0:n.date]);var q=new Date;q.setDate(q.getDate()+C);var U=(0,r.useState)("".concat((0,o.PR)(null===j||void 0===j?void 0:j.name)?"".concat(null===j||void 0===j?void 0:j.code," - ").concat(null===j||void 0===j?void 0:j.name):"")),Y=U[0],G=U[1],H=(0,r.useState)("".concat((0,o.PR)(null===w||void 0===w?void 0:w.name)?"".concat(null===w||void 0===w?void 0:w.code," - ").concat(null===w||void 0===w?void 0:w.name):"")),Q=H[0],V=H[1];return(0,i.jsxs)(a.Z,{sx:{height:"65px",margin:"auto",background:"#ffffff",borderRadius:"10px",position:"absolute",left:0,right:0,top:"20px",p:1,boxShadow:"0px 5px 20px 0px #0000001A",display:"flex",alignItems:"center"},children:[(0,i.jsx)(s.Z,{sx:{width:"100%"},children:(0,i.jsx)(d.Z,{disablePortal:!0,freeSolo:!0,disableClearable:!0,id:"fromstation",value:Y,options:Z.map((function(e){return"".concat(e.station_code," - ").concat(e.station_name)})),filterOptions:function(e){return e},onChange:function(e,t){G(t)},sx:{width:"100%",background:"#F0F0F0",borderRadius:"10px",paddingLeft:"5px",fontSize:"20px",minHeight:"48px"},renderInput:function(e){return(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,D({fullWidth:!0,onChange:B,autoComplete:"off",id:"fromstation",name:"fromstation"},e,{label:"From",InputLabelProps:{sx:{fontSize:"15px",color:"#888888",top:"8px","&.Mui-focused":{fontSize:"15px",color:"#888888"},"&.MuiFormLabel-filled":{fontSize:"15px",color:"#888888",top:"8px"}}},sx:{position:"relative","& .MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&:hover":{"& fieldset":{border:"none"}}}},InputProps:D({},e.InputProps,{startAdornment:(0,i.jsx)(p.Z,{position:"start",sx:{position:"absolute",right:"0"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/location-1710822477.png",alt:"location icon"})})})}))})}})}),(0,i.jsx)(s.Z,{sx:{width:"50px",ml:1,mr:1},children:(0,i.jsx)(f.Z,{sx:{background:"#01478C",width:"45px",height:"45px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{background:"#0a5caf"}},onClick:function(){!function(){var e=Y;G(Q),V(e)}()},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/switchicon-1709624065.png",alt:"switch icon"})})}),(0,i.jsx)(s.Z,{sx:{width:"100%"},children:(0,i.jsx)(d.Z,{disablePortal:!0,disableClearable:!0,id:"tostation",value:Q,options:Z.map((function(e){return"".concat(e.station_code," - ").concat(e.station_name)})),filterOptions:function(e){return e},onChange:function(e,t){V(t)},freeSolo:!0,sx:{width:"100%",background:"#F0F0F0",borderRadius:"10px",paddingLeft:"5px",fontSize:"20px",minHeight:"48px"},renderInput:function(e){return(0,i.jsx)(c.Z,D({fullWidth:!0,onChange:B,autoComplete:"off",id:"tostation",name:"fromstation"},e,{label:"To",InputLabelProps:{sx:{fontSize:"15px",color:"#888888",top:"8px","&.Mui-focused":{fontSize:"15px",color:"#888888"},"&.MuiFormLabel-filled":{fontSize:"15px",color:"#888888",top:"8px"}}},sx:{position:"relative","& .MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&:hover":{"& fieldset":{border:"none"}}}},InputProps:D({},e.InputProps,{startAdornment:(0,i.jsx)(p.Z,{position:"start",sx:{position:"absolute",right:"0"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/iconpin-1710822492.png",alt:"location icon"})})})}))}})}),(0,i.jsxs)(s.Z,{sx:{ml:1,mr:1,pr:.5,pb:1,minWidth:"200px",display:"flex",alignItems:"end",width:"100%",background:"#F0F0F0",borderRadius:"10px"},children:[(0,i.jsx)(v._,{dateAdapter:m.y,children:(0,i.jsx)(h.M,{disablePast:!0,maxDate:y()(new Date(q)),open:F,value:y()(new Date(I)),onClose:function(){return M(!1)},onChange:function(e){A(e),W({formatedRouteDate:(0,o.hT)("m/d/Y",new Date(e).getTime()/1e3),formatedCalendardate:(0,o.hT)("d M, D",new Date(e).getTime()/1e3)}),M(!1)},views:["day"],sx:{"& .MuiInputBase-root":{height:"0px",width:"0px",background:"#F0F0F0",borderRadius:"10px"},"& .MuiIconButton-root":{display:"none"},"& .MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&:hover":{"& fieldset":{border:"none"}}}}})}),(0,i.jsxs)(s.Z,{sx:{flexGrow:1,pl:.5},children:[(0,i.jsx)(l.Z,{component:"div",sx:{color:"#888888",fontSize:"12px"},children:"Date"}),(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"16px"},children:(0,o.PR)(null===E||void 0===E?void 0:E.formatedCalendardate)&&(null===E||void 0===E?void 0:E.formatedCalendardate)})]}),(0,i.jsx)(f.Z,{sx:{height:"35px",width:"35px",borderRadius:"50%"},onClick:function(){return M(!0)},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/calicon-1710824715.png",width:"21px",alt:"cal icon"})})]}),(0,i.jsx)(u.Z,{type:"button",variant:"contained",size:"large",style:{borderRadius:"5px",background:"#01478C",textTransform:"capitalize",fontSize:"16px",minWidth:"200px"},"aria-label":"Modify Search",onClick:function(){var e=Y,t=Q;S.current.from={code:e.split("-")[0].replace(/ /g,""),name:e.split("-")[1].replace(/ /g,"")},S.current.to={code:t.split("-")[0].replace(/ /g,""),name:t.split("-")[1].replace(/ /g,"")},k.current(null,new Date(null===E||void 0===E?void 0:E.formatedRouteDate),!0,S)},children:"Modify Search"})]})}var A=function(e){e.busRef,e.searchQuery,e.getTrainList,e.reference,e.dataFilter,e.openModifySearch,e.filterStringApply;var t,n=e.routeInfoRef,o=e.headerDateStripSelection,a=e.activemenu,l=e.canshowlogincta,c=e.booking_window,d=(0,r.useState)(!1),u=(d[0],d[1],(0,r.useState)({show:!1,name:n.current.from.name,code:n.current.from.code})),f=u[0],p=u[1],m=(0,r.useState)({show:!1,name:n.current.to.name,code:n.current.to.code}),v=m[0],h=m[1],_=(0,r.useState)(!1),x=(_[0],_[1],(0,r.useState)({show:!1,name:n.current.from.name,code:n.current.from.code})),g=(x[0],x[1],(0,r.useState)({show:!1,name:n.current.to.name,code:n.current.to.code}));return g[0],g[1],(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R,{activemenu:a,canshowlogincta:l}),(0,i.jsx)(s.Z,{sx:(t={background:"#ffffff",pt:1,pb:1,height:"50px",width:"100%"},T(t,"background","#01478C"),T(t,"position","relative"),t),children:(0,i.jsx)(I,{fromStation:f,toStation:v,routeInfoRef:n,toggleFromAndToStation:function(){var e=f;p(v),h(e)},headerDateStripSelection:o,booking_window:c})})]})},O=(n(71673),n(11661),n(86886)),F=n(74157),M=n.n(F),z=n(64666),E=n(6514),W=n(74223),L=n(66720),B=n(75321),q=n(9473),U=n(12978),Y=n(98456),G=n(55962),H=n.n(G),Q=n(82175),V=n(16310),X=n(33689);var J=function(){var e=(0,q.v9)((function(e){return e.homepage})).loginaction,t=(0,q.I0)(),n=(0,r.useRef)(null);(0,r.useEffect)((function(){var e;null===(e=n.current)||void 0===e||e.focus()}),[]);var a=(0,Q.TA)({initialValues:{phoneNumber:(null===e||void 0===e?void 0:e.phoneNumber)||""},validationSchema:V.Ry({phoneNumber:V.Z_().required("Phone number is required").matches(/^[6-9]\d{9}$/,"Enter a valid 10-digit phone number")}),onSubmit:function(n,i){var r=i.setSubmitting;(0,_.Ag)(n.phoneNumber,{}).then((function(i){!0===i?t((0,U.az)({isotpvisible:!0,phoneNumber:n.phoneNumber,onSuccess:null===e||void 0===e?void 0:e.onSuccess})):r(!1)}))}}),c=(0,r.useCallback)((function(e){var t=e.target.value;/^\d{0,10}$/.test(t)&&a.setFieldValue("phoneNumber",t)}),[a]),d=(0,r.useState)(!0),p=d[0],m=d[1],v=(0,r.useState)(!1),h=v[0],x=v[1];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{className:"login-popup-container relative",children:[(0,i.jsx)(f.Z,{"aria-label":"close",onClick:function(){return t((0,U.az)({isloginvisible:!1,onSuccess:null}))},style:{position:"absolute",top:"-36px",right:"-36px"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/close-1730654980.png",style:{width:"16px",o
1pacity:"0.9"},alt:"close button"})}),(0,i.jsx)(l.Z,{component:"p",className:"LoginTitle",children:"Login"})]}),(0,i.jsx)(X.NA,{dispatch:t,setUserdetails:o.LB}),p&&(0,i.jsxs)("div",{style:{fontSize:"14px",fontWeight:"500",border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"6px",padding:"12px 14px",textAlign:"center",cursor:"pointer"},onClick:function(){x(!0),m(!1)},children:[(0,i.jsx)("img",{width:"18px",style:{margin:"-1px 10px 0 0"},src:"https://images.railyatri.in/ry_images_prod/phone-1595400530.png"}),"Login Using Phone Number"]}),h&&(0,i.jsxs)("form",{id:"phone_input_form",autoComplete:"off",onSubmit:a.handleSubmit,style:{position:"relative"},children:[(0,i.jsx)(s.Z,{className:"relativeContainer",children:(0,i.jsx)(s.Z,{className:"phone-input-container",children:(0,i.jsxs)(s.Z,{className:"phoneInputWrapper",children:[(0,i.jsxs)(l.Z,{component:"p",className:"countryCode",children:[(0,i.jsx)("img",{width:26,src:"https://images.railyatri.in/ry_images_prod/nationalFlag-1763181254.png"})," +91"]}),(0,i.jsx)(s.Z,{className:"".concat(H().formwrapper," phoneFormWrapper"),children:(0,i.jsx)("input",{ref:n,type:"number",autoComplete:"off",placeholder:"Enter your mobile number",name:"phoneNumber",value:a.values.phoneNumber,onChange:c,onBlur:a.handleBlur,style:{padding:"16px 20px",fontSize:"18px",fontWeight:"700",border:"0",outline:"0",borderRadius:"10px",letterSpacing:"5px"}})})]})})}),(0,i.jsx)(s.Z,{className:"submit-cta-container",children:(0,i.jsx)(u.Z,{fullWidth:!0,type:"submit",variant:"contained",size:"large",className:"submitcta","aria-label":"Start Login",style:{opacity:(null===a||void 0===a?void 0:a.isValid)&&(null===a||void 0===a?void 0:a.values.phoneNumber.length)?"1":"0.6",margin:"10px 0"},disabled:!((null===a||void 0===a?void 0:a.values.phoneNumber)&&(null===a||void 0===a?void 0:a.isValid)&&!(null===a||void 0===a?void 0:a.isSubmitting)),children:(null===a||void 0===a?void 0:a.isSubmitting)?(0,i.jsx)(Y.Z,{size:40,color:"inherit"}):"Send OTP"})}),(0,i.jsx)(l.Z,{component:"p",className:"sendotptext",children:"We'll send an OTP via SMS"})]})]})},K=n(31955);function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee={timeLeft:59,otpSent:!0,showInvalidOtpMessage:!1};function te(e,t){return"UPDATE_STATE"===t.type?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){$(e,t,n[t])}))}return e}({},e,t.payload):e}var ne=function(){var e=(0,q.v9)((function(e){return e.homepage})).loginaction,t=(0,q.I0)(),n=(0,r.useReducer)(te,ee),a=n[0],d=n[1],p=(0,r.useRef)([]),m={},v=(0,r.useMemo)((function(){return V.Ry({otp:V.Z_().length(4,"OTP must be 4 digits").required("Please enter the OTP")})}),[]),h=(0,r.useMemo)((function(){return{step:"Sucessfully_Dweb_Phone_Login",ecomm_type:"train_ticket_booking",user_id:null,alt_availability:"",trip_guarantee:""}}),[]),x=(0,r.useCallback)((function(n){g.setSubmitting(!0),(0,_.Mu)(null===e||void 0===e?void 0:e.phoneNumber,n,m).then((function(n){var i=null===n||void 0===n?void 0:n.user_details;if(null===n||void 0===n?void 0:n.success){(0,o.LB)({userId:null===i||void 0===i?void 0:i.user_id,New_User_token:null===i||void 0===i?void 0:i.authentication_token});var r=(0,o.PR)(null===i||void 0===i?void 0:i.PhoneNumber)?null===i||void 0===i?void 0:i.PhoneNumber:null===e||void 0===e?void 0:e.phoneNumber;K.Z.set("phoneNumber",r,{expires:360}),h.user_id=i.user_id,(0,_.yW)("","",h),t((0,U.dX)(!0)),t((0,U.az)({isloginvisible:!1})),"function"===typeof(null===e||void 0===e?void 0:e.onSuccess)&&(null===e||void 0===e||e.onSuccess()),setTimeout((function(){t((0,U.az)({onSuccess:null}))}),1e3)}else d({type:"UPDATE_STATE",payload:{showInvalidOtpMessage:!0}}),g.setFieldValue("otp",""),p.current[0]&&p.current[0].focus()})).finally((function(){g.setSubmitting(!1)}))}),[e,h,t]),g=(0,Q.TA)({initialValues:{otp:""},validationSchema:v,onSubmit:function(e){return x(e.otp)}});return(0,r.useEffect)((function(){p.current[0]&&p.current[0].focus()}),[]),(0,r.useEffect)((function(){g.values.otp&&g.setFieldTouched("otp",!0,!1)}),[g.values.otp]),(0,r.useEffect)((function(){if(0!==a.timeLeft){var e=setInterval((function(){d({type:"UPDATE_STATE",payload:{timeLeft:Math.max(a.timeLeft-1,0)}})}),1e3);return function(){return clearInterval(e)}}}),[a.timeLeft]),(0,i.jsxs)("form",{id:"otp_input_form",autoComplete:"off",onSubmit:g.handleSubmit,style:{position:"relative"},children:[(0,i.jsx)(f.Z,{"aria-label":"close",onClick:function(){return t((0,U.az)({isloginvisible:!1,onSuccess:null}))},style:{position:"absolute",top:"-36px",right:"-36px"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/close-1730654980.png",style:{width:"16px",o
1pacity:"0.9"},alt:"close button"})}),(0,i.jsx)(s.Z,{className:"login-popup-container",children:(0,i.jsx)(l.Z,{component:"p",className:"LoginTitle",children:"Enter the OTP"})}),(0,i.jsxs)(s.Z,{className:"otp-container",children:[(0,i.jsx)(s.Z,{className:"otp-input-container",children:[0,1,2,3].map((function(e){return(0,i.jsx)(c.Z,{name:"otp",value:g.values.otp[e]||"",onChange:function(t){return function(e,t){var n=e.target.value;if(/^\d$/.test(n)||""===n){var i=g.values.otp.split("");i[t]=n,g.setFieldValue("otp",i.join("")),n&&t<p.current.length-1&&p.current[t+1].focus()}}(t,e)},onKeyDown:function(t){return function(e,t){if("Backspace"===e.key&&!g.values.otp[t]&&t>0){var n=g.values.otp.split("");n[t-1]="",g.setFieldValue("otp",n.join("")),p.current[t-1].focus()}}(t,e)},onBlur:g.handleBlur,inputRef:function(t){return p.current[e]=t},inputProps:{maxLength:1,style:{textAlign:"center",fontSize:"24px",padding:"15px 10px"}},sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px"},"& .MuiOutlinedInput-root.Mui-focused":{transform:"translateY(-2px)",boxShadow:"0 6px 15px rgba(1,71,140,0.2)",borderColor:"#333 !important"}}},e)}))}),(null===a||void 0===a?void 0:a.showInvalidOtpMessage)&&(0,i.jsx)(l.Z,{component:"p",className:"invalidotptext",children:"Wrong OTP entered!"})]}),(0,i.jsx)(s.Z,{className:"submit-cta-container",children:(0,i.jsx)(u.Z,{fullWidth:!0,type:"submit",variant:"contained",size:"large",className:"submitcta","aria-label":"Process OTP",disabled:!g.isValid||!g.dirty||(null===g||void 0===g?void 0:g.isSubmitting),style:{opacity:g.isValid&&g.dirty?"1":"0.6"},children:(null===g||void 0===g?void 0:g.isSubmitting)?(0,i.jsx)(Y.Z,{size:40,color:"inherit"}):"Verify OTP"})}),(0,i.jsx)(s.Z,{className:"otp-header",children:(0,i.jsx)(s.Z,{className:"otp-details",children:(0,i.jsxs)(l.Z,{component:"p",className:"otp-details-text",children:["\u2714\ufe0f OTP sent to +91 ",null===e||void 0===e?void 0:e.phoneNumber,".",(0,i.jsx)(S.Z,{role:"button",tabIndex:0,onClick:function(){t((0,U.az)({isphonevisible:!0}))},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()},underline:"hover",className:"change-and-retry-link",children:"Change phone number?"})]})})}),(0,i.jsx)(s.Z,{className:"otp-timer-header",style:{fontSize:"16px",color:"#333",fontWeight:"700",alignItems:"center"},children:(null===a||void 0===a?void 0:a.timeLeft)>0?(0,i.jsxs)(l.Z,{component:"p",className:"timer-text",children:["Request new OTP within"," ",(0,i.jsxs)("span",{style:{color:"#077FF7"},children:[Math.floor((null===a||void 0===a?void 0:a.timeLeft)/60).toString().padStart(1,"0"),":",((null===a||void 0===a?void 0:a.timeLeft)%60).toString().padStart(2,"0")," s"]})]}):(0,i.jsxs)(i.Fragment,{children:["OTP not received?",(0,i.jsx)(S.Z,{role:"button",tabIndex:0,onClick:function(){(0,_.Ag)(null===e||void 0===e?void 0:e.phoneNumber,{}).then((function(e){!0===e&&(d({type:"UPDATE_STATE",payload:{timeLeft:59,otpSent:!0,showInvalidOtpMessage:!1}}),g.setFieldValue("otp",""),(null===p||void 0===p?void 0:p.current[0])&&(null===p||void 0===p||p.current[0].focus()))})).catch((function(e){console.error("Error resending OTP:",e)}))},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()},underline:"hover",className:"change-and-retry-link",children:"Resend OTP"})]})})]})};var ie=function(e){var t=e.isMyBooking,n=void 0!==t&&t,r=(0,q.I0)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Z,{sx:{display:"flex",justifyContent:"end",alignItems:"center",pt:2,pb:2},children:(0,i.jsx)(f.Z,{"aria-label":"close",onClick:function(){return r((0,U.az)({isloginvisible:!1,onSuccess:null}))},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/close-1730654980.png",style:{width:"35px"},alt:"close button"})})}),(0,i.jsxs)(s.Z,{sx:{position:"relative",textAlign:"center",mt:2},children:[(0,i.jsx)("img",{src:null===B.ci||void 0===B.ci?void 0:B.ci.loginsucessicon,alt:"Success Check",width:"140px"}),(0,i.jsxs)(l.Z,{component:"p",sx:{color:"#000",textAlign:"center",fontSize:"3.2322rem",fontWeight:700,mt:3},children:["You have successfully",(0,i.jsx)("br",{}),"logged in with RailYatri"]})]}),(0,i.jsx)(s.Z,{className:"submit-cta-container",children:(0,i.jsx)(u.Z,{fullWidth:!0,type:"button",variant:"contained",size:"large",className:"submitcta","aria-label":"Login Success",onClick:function(){r(n?(0,U.az)({isloginvisible:!1,onSuccess:null}):(0,U.az)({iscontactvisible:!0}))},children:"Okay"})})]})};var re,oe,ae=function(){var e=(0,q.I0)(),t=(0,r.useRef)(null);(0,r.useEffect)((function(){t.current&&t.current.focus()}),[]);var n=(0,r.useCallback)((function(t){var n;null===window||void 0===window||window.sessionStorage.setItem("UserEmail",null!==(n=null===t||void 0===t?void 0:t.email)&&void 0!==n?n:""),e((0,U.az)({isloginvisible:!1,onSuccess:null}))}),[e]),o=(0,Q.TA)({initialValues:{fullName:"",email:""},validationSchema:V.Ry({fullName:V.Z_().required("Full name is required").max(16,"Full name cannot exceed 16 characters"),email:V.Z_().required("Email is required").email("Enter a valid email address")}),onSubmit:n}),a=(0,r.useCallback)((function(){e((0,U.az)({isloginvisible:!1,onSuccess:null}))}),[e]);return(0,i.jsxs)("form",{id:"phone_input_form",autoComplete:"off",onSubmit:o.handleSubmit,children:[(0,i.jsx)(s.Z,{className:"login-popup-container",sx:{justifyContent:"end"},children:(0,i.jsx)(f.Z,{"aria-label":"close",onClick:a,children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/close-1730654980.png",style:{width:"35px"},alt:"close button"})})}),(0,i.jsxs)(s.Z,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsxs)(s.Z,{sx:{mt:8.2},children:[(0,i.jsx)(l.Z,{component:"p",sx:{color:"#212121",fontSize:"2.475rem",fontWeight:700},children:"One last thing"}),(0,i.jsx)(l.Z,{component:"p",sx:{color:"#000",fontSize:"1.45rem",fontWeight:400},children:"Contact details"})]}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/Subtract-1726483197.png",alt:"Contact details preview",width:"229px",style:{bottom:"0px",right:"0px"}})]}),(0,i.jsxs)(s.Z,{sx:{position:"relative"},children:[(0,i.jsx)(c.Z,{inputRef:t,name:"fullName",label:"Full name (
1as per gov. ID)",value:o.values.fullName,onChange:o.handleChange,onBlur:o.handleBlur,error:o.touched.fullName&&Boolean(o.errors.fullName),fullWidth:!0,variant:"outlined",sx:{mt:2},inputProps:{maxLength:16}}),o.values.fullName&&(0,i.jsxs)(l.Z,{component:"p",sx:{position:"absolute",right:"10px",top:"30px",color:"#5F6466",fontSize:"21.23px",fontWeight:400},children:[o.values.fullName.length,"/16"]})]}),(0,i.jsx)(c.Z,{name:"email",label:o.touched.email||o.values.email?"Mail ID":"Enter email ID",value:o.values.email,onChange:o.handleChange,onBlur:o.handleBlur,error:o.touched.email&&Boolean(o.errors.email),fullWidth:!0,variant:"outlined",sx:{mt:2}}),(0,i.jsx)(s.Z,{className:"submit-cta-container",children:(0,i.jsx)(u.Z,{fullWidth:!0,type:"submit",variant:"contained",size:"large",className:"submitcta","aria-label":"Update contact detail",tabIndex:0,children:"Done"})})]})};function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=(0,n(68239).Z)({components:{MuiCssBaseline:{styleOverrides:{".login-popup-container":{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:"20px"},".intromaincontainer":{background:"#01478c26",padding:"10px 10px 13px",textAlign:"center"},".mybookingintrocontainer":{position:"relative",background:"#01478c26",padding:"10px 10px 13px",textAlign:"center"},".introwrapper":{position:"relative",zIndex:1},".intropreview img":{width:"240px",position:"absolute",bottom:"0px",right:"0px"},".introlist":{display:"flex"},".relativeContainer":{position:"relative",margin:"10px 0"},".phoneInputWrapper":{display:"flex",alignItems:"center",flex:"1"},".phone-input-container":{display:"flex",borderRadius:"5.808px"},".phoneFormWrapper":{display:"flex",alignItems:"center",border:"1px solid rgba(0, 0, 0, 0.08)",borderRadius:"10px"},".otp-container":{position:"relative"},".otp-header":{display:"flex",alignItems:"center",margin:"16px 0 20px 0"},".otp-details":{display:"flex"},".otp-input-container":{display:"flex",gap:"16px",marginBottom:"20px"},".otp-timer-header":{display:"flex",justifyContent:"center",textDecoration:"none"},".submit-cta-container":{}}},MuiDialog:{styleOverrides:{paper:{"&.dwebloginpopup":{maxWidth:"800px",minWidth:"800px",borderRadius:"25px"}}}},MuiDialogContent:{styleOverrides:{root:{"&.dwebloginpopup-content":{padding:"50px 50px 20px 50px",gap:"50px",display:"flex",flex:"1",alignItems:"center"}}}},MuiTypography:{styleOverrides:{root:{"&.LoginTitle":{color:"#333",fontSize:"24px",fontWeight:"700",margin:"0 0 0 0"},"&.BenfitTitle":{fontSize:"14px",color:"#333",fontWeight:"400",padding:"5px 10px",background:"#fff",display:"inline-block",margin:"3px 3px 0 0",borderRadius:"5px"},"&.sendotptext":{fontWeight:"400",fontSize:"14px",color:"#333",textAlign:"center",width:"100%",margin:"0 0 10px 0",display:"inline-block"},"&.invalidotptext":(re={background:"#fff4f4",textAlign:"center",padding:"8px"},se(re,"padding","10px 15px"),se(re,"fontWeight","500"),se(re,"borderRadius","8px"),se(re,"color","#d64752"),se(re,"border","1px solid #d64752"),se(re,"margin","-11px 0 10px 0"),se(re,"position","relative"),se(re,"fontSize","14px"),se(re,"boxShadow","0 2px 5px rgba(0, 0, 0, 0.2)"),se(re,"&.invalidotptext::after",{content:'""',background:"#fff4f4",borderLeft:"1px solid #d64752",borderTop:"1px  solid #d64752",position:"absolute",transform:"rotate(45deg)",width:"5px",height:"5px",top:"-4px",borderRadius:"2px",left:"15px"}),re),"&.countryCode":{border:"1px solid rgba(0, 0, 0, 0.08)",display:"flex",alignItems:"center",gap:"10px",height:"61px",fontSize:"16px",fontWeight:"700",color:"#333",padding:"5px 15px",borderRadius:"10px",marginRight:"10px"},"&.otp-details-text":{color:"#323232",fontSize:"15px",fontWeight:"700"},"&.timer-text":(oe={fontSize:"2.7936rem"},se(oe,"fontSize","16px"),se(oe,"fontWeight","700"),oe)}}},MuiButton:{styleOverrides:{root:{"&.submitcta":{background:"#01478c",textTransform:"unset",fontSize:"16px",padding:"20px",fontWeight:"700",borderRadius:"10px",border:"0",outline:"0","&:hover":{backgroundColor:"#0f589f"},"&:disabled":{background:"#01478c",color:"#FFFFFF",cursor:"not-allowed"}}}}},MuiLink:{styleOverrides:{root:{"&.change-and-retry-link":{fontSize:"16px",color:"#077FF7",fontWeight:"700",textDecoration:"none",display:"inline",marginLeft:"7px"}}}}}});function ce(e){var t=e.isMyBooking,n=void 0!==t&&t;e.page;return(0,i.jsx)(s.Z,{className:"".concat(n?"mybookingintrocontainer":"intromaincontainer"),children:(0,i.jsxs)(s.Z,{className:"introwrapper",children:[!n&&B.$K.map((function(e){return(0,i.jsx)(l.Z,{component:"span",className:"BenfitTitle",children:null===e||void 0===e?void 0:e.title},null===e||void 0===e?void 0:e.id)}
1)),n&&B.nl.map((function(e){return(0,i.jsx)(l.Z,{component:"span",className:"BenfitTitle",children:null===e||void 0===e?void 0:e.title},null===e||void 0===e?void 0:e.id)}))]})})}function de(e){var t=e.isMyBooking,n=void 0!==t&&t,r=e.page,o=(0,q.v9)((function(e){return e.homepage})).loginaction,a=(0,q.I0)();return(0,i.jsxs)(W.Z,{theme:le,children:[(0,i.jsx)(L.ZP,{}),(0,i.jsxs)(z.Z,{classes:{paper:"dwebloginpopup"},onClose:function(){return a((0,U.az)({isloginvisible:!1,onSuccess:null}))},"aria-labelledby":"Login-Popup",open:null===o||void 0===o?void 0:o.isloginvisible,children:[(0,i.jsxs)(E.Z,{className:"relative dwebloginpopup-content",children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/travelerVector-1763122820.png"})}),(0,i.jsxs)("div",{style:{flex:"1"},children:[(null===o||void 0===o?void 0:o.isphonevisible)&&(0,i.jsx)(J,{},"phoneForm"),(null===o||void 0===o?void 0:o.isotpvisible)&&(0,i.jsx)(ne,{},"otpForm"),(null===o||void 0===o?void 0:o.isloginsuccess)&&(0,i.jsx)(ie,{isMyBooking:n}),(null===o||void 0===o?void 0:o.iscontactvisible)&&!n&&(0,i.jsx)(ae,{},"contactDetailForm")]})]}),(0,i.jsx)(ce,{isMyBooking:n,page:r})]})]})}var ue=n(88078),fe=n(67720),pe=n(35464),me=n(67814),ve=n(59417),he=n(26461),_e=n(80617);function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(){return ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ge.apply(this,arguments)}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){xe(e,t,n[t])}))}return e}function ye(){var e,t=(0,q.v9)((function(e){return e.tbs})),n=t.altconfavailaction,a=t.altconfdata,s=t.altconfloading,l=(0,q.I0)(),c=(0,g.useRouter)(),d=function(){l((0,pe.qs)({isvisible:!1}))},u=(0,o.PC)();(0,r.useEffect)((function(){var e,t,i,r,o,a,s,c,d,f,p,m,v,h,x,g,b,y,j,w,S,k,C,N;(null===n||void 0===n?void 0:n.isvisible)&&(null===n||void 0===n||null===(e=n.seatdata)||void 0===e?void 0:e.train_number)&&((0,_.yW)("","",{step:(null===n||void 0===n?void 0:n.issixdayscard)?"alternateOptionSixDayClick":"alternateOptionUpfrontClick",user_id:null===u||void 0===u?void 0:u.userId,from_station:null===n||void 0===n||null===(t=n.seatdata)||void 0===t?void 0:t.boarding_from,to_station:null===n||void 0===n||null===(i=n.seatdata)||void 0===i?void 0:i.boarding_to,device_type_id:null===n||void 0===n||null===(r=n.routeInfoRef)||void 0===r||null===(o=r.current)||void 0===o?void 0:o.device,utm_referrer:null===n||void 0===n?void 0:n.routeInfoRef.current.utm_source,boarding_date:null===n||void 0===n||null===(a=n.seatdata)||void 0===a?void 0:a.journey_date,journey_class:null===n||void 0===n||null===(s=n.seatdata)||void 0===s?void 0:s.journey_class,train_number:null===n||void 0===n||null===(c=n.seatdata)||void 0===c?void 0:c.train_number,number_of_trains:null===n||void 0===n||null===(d=n.routeInfoRef)||void 0===d||null===(f=d.current)||void 0===f?void 0:f.number_of_trains,filters_applied:null===n||void 0===n||null===(p=n.routeInfoRef)||void 0===p||null===(m=p.current)||void 0===m||null===(v=m.filters_applied)||void 0===v?void 0:v.current,journey_quota:null===n||void 0===n||null===(h=n.seatdata)||void 0===h?void 0:h.quota,v_code:null===n||void 0===n||null===(x=n.routeInfoRef)||void 0===x||null===(g=x.current)||void 0===g?void 0:g.vCode,src:null===n||void 0===n||null===(b=n.routeInfoRef)||void 0===b||null===(y=b.current)||void 0===y?void 0:y.src,journey_date:null===n||void 0===n||null===(j=n.seatdata)||void 0===j?void 0:j.journey_date,original_from:null===n||void 0===n||null===(w=n.routeInfoRef)||void 0===w||null===(S=w.current)||void 0===S?void 0:S.from.code,original_to:null===n||void 0===n||null===(k=n.routeInfoRef)||void 0===k||null===(C=k.current)||void 0===C||null===(N=C.to)||void 0===N?void 0:N.co
1de,alt_availability:1,trip_guarantee:""}),l((0,pe.Jp)({props:be({},null===n||void 0===n?void 0:n.seatdata,{user_id:null===u||void 0===u?void 0:u.userId,authentication_token:null===u||void 0===u?void 0:u.New_User_token,issixdayscard:null===n||void 0===n?void 0:n.issixdayscard}),routeInfoRef:null===n||void 0===n?void 0:n.routeInfoRef})))}),[null===n||void 0===n?void 0:n.isvisible,null===n||void 0===n||null===(e=n.seatdata)||void 0===e?void 0:e.train_number]);return(0,i.jsx)(z.Z,{classes:{paper:"Mui-dweb_alt_conf_availability"},onClose:d,"aria-labelledby":"Altconf_avail_popup",open:null===n||void 0===n?void 0:n.isvisible,children:(0,i.jsxs)(E.Z,{className:"relative Mui-alt_conf_avail_content",children:[s&&(0,i.jsx)(je,{}),!s&&(null===a||void 0===a?void 0:a.success)&&(0,i.jsx)(we,{close:d,altconfdata:a,redirectToPassengerPage:function(e,t,i){var r,s,l,d,f,p,m,v,h,x,g,b,y,j,w=(a||{}).alternate_options||{},S=w.availablityStatus,k=w.booking_class,C=w.ticketFare,N=w.route_data,Z=w.duration;(0,_.yW)("","",{step:"alternateOptionSubmitClick",availability:S,journey_clas:k,current_url:"Fare:".concat(C," route_data:").concat(JSON.stringify(N)),alt_availability:"",trip_guarantee:""});var R=(0,o.jG)("".concat(e.split("?")[1],"&").concat(c.asPath.split("?")[1]),u),T=R||{},P=T.boarding_from,D=T.boarding_to,I=T.train_no,A=T.quota,O=T.utm,F=T.device_type_id,M=T.boarding_date,z=T.avail,E=T.fare,W=T.cateringCharges,L=T.fromStaName,B=T.toStaName,q=T.from_code,U=T.from_name,Y=T.to_code,G=T.to_name,H=T.journey_date,Q=T.homequota,V=T.boarding_stn,X={};X.boarding_from=P,X.boarding_stn=V,X.boarding_to=D,X.train_no=I,X.class=null===R||void 0===R?void 0:R.class,X.quota=A,X.boarding_date=M,X.device_type_id=F,X.save_booking=!0,X.avail=null===z||void 0===z?void 0:z.replace(/#/g,""),X.fare=E,X.cateringCharges=W,X.fromStaName=L,X.toStaName=B,X.from_code=q,X.from_name=U,X.to_code=Y,X.to_name=G,X.from_sta_code=V,X.to_sta_code=D,X.user_id=null===u||void 0===u?void 0:u.userId,X.authentication_token=null===u||void 0===u?void 0:u.New_User_token,X.original_from=null===n||void 0===n||null===(r=n.routeInfoRef)||void 0===r||null===(s=r.current)||void 0===s||null===(l=s.from)||void 0===l?void 0:l.code,X.original_to=null===n||void 0===n||null===(d=n.routeInfoRef)||void 0===d||null===(f=d.current)||void 0===f||null===(p=f.to)||void 0===p?void 0:p.code,X.number_of_trains=null===n||void 0===n||null===(m=n.routeInfoRef)||void 0===m||null===(v=m.current)||void 0===v?void 0:v.number_of_trains,X.filters_applied=null===n||void 0===n||null===(h=n.routeInfoRef)||void 0===h||null===(x=h.current)||void 0===x||null===(g=x.filters_applied)||void 0===g?void 0:g.current,X.duration=Z,X.from_std=t,X.to_sta=i,X.train_name=null===n||void 0===n||null===(b=n.miscquerydata)||void 0===b?void 0:b.train_name,X.est_chart_time=null===n||void 0===n||null===(y=n.miscquerydata)||void 0===y?void 0:y.est_chart_time,X.train_date=null===n||void 0===n||null===(j=n.miscquerydata)||void 0===j?void 0:j.train_date,X.journey_date=H,X.homequota=Q,X.utm_referrer=O,X.utm=O,X.utm_source=O,X.action="train_between_station",X.alt_availability=1;var J="/train-ticket/passengers-detail?".concat((0,o.B7)(X));window.location.href=J}}),!s&&!(null===a||void 0===a?void 0:a.success)&&(0,i.jsx)(Se,{close:d,message:null===a||void 0===a?void 0:a.message})]})})}function je(){return(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton",children:[(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__header",children:[(0,i.jsxs)(s.Z,{className:"alt-conf-seat-skeleton__title",children:[(0,i.jsx)(ue.Z,{width:220,height:28}),(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__badges",children:[(0,i.jsx)(ue.Z,{width:40,height:24}),(0,i.jsx)(ue.Z,{width:70,height:24}),(0,i.jsx)(ue.Z,{width:90,height:24})]})]}),(0,i.jsx)(ue.Z,{className:"alt-conf-seat-skeleton__close-btn",variant:"circular",width:32,height:32})]}),(0,i.jsx)(fe.Z,{sx:{my:2}}),(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__book-from_to",children:[(0,i.jsx)(ue.Z,{width:90,height:20}),(0,i.jsx)(ue.Z,{variant:"circular",width:14,height:14}),(0,i.jsx)(ue.Z,{width:140,height:20})]}),(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__timeline-card",children:[(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__timeline-row",children:[(0,i.jsx)(ue.Z,{width:90,height:20}),(0,i.jsx)(ue.Z,{variant:"circular",width:14,height:14}),(0,i.jsxs)(s.Z,{className:"Mui-ml-16",children:[(0,i.jsx)(ue.Z,{width:150,height:22}),(0,i.jsx)(ue.Z,{width:120,height:18})]})]}),(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__timeline-row",children:[(0,i.jsx)(ue.Z,{width:90,height:20}),(0,i.jsx)(ue.Z,{variant:"circular",width:14,height:14}),(0,i.jsxs)(s.Z,{className:"Mui-ml-16",children:[(0,i.jsx)(ue.Z,{width:150,height:22}),(0,i.jsx)(ue.Z,{width:120,height:18})]})]})]}),(0,i.jsxs)(s.Z,{className:"Mui-alt-conf-seat-skeleton__book-from_to",children:[(0,i.jsx)(ue.Z,{width:90,height:20}),(0,i.jsx)(ue.Z,{variant:"circular",width:14,height:14}),(0,i.jsx)(ue.Z,{width:140,height:20})]}),(0,i.jsx)(ue.Z,{className:"alt-conf-seat-skeleton__info-line",width:"100%",height:20}),(0,i.jsx)(ue.Z,{className:"alt-conf-seat-skeleton__info-line",width:"80%",height:20}),(0,i.jsx)(ue.Z,{className:"alt-conf-seat-skeleton__cta",variant:"rounded",width:"100%",height:48,sx:{mt:2}})]})}function we(e){var t,n,r,a,c,d,p,m,v,h,_,x,g,b,y,j,w,S,k,C=ge({},e)||{},N=C.close,Z=C.altconfdata,R=C.redirectToPassengerPage,T=(Z||{}).alternate_options||{},P=T.sub_title,D=T.availablityStatus,I=T.booking_class,A=T.cateringCharge,O=T.ticketFare,F=T.totalFare,M=T.cp_perc,z=T.cp_prob,E=T.route_data,W=T.ticket_link,L=(T.journey_date,P.split("-")),B={},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toLowerCase().replace(/\b(\w)/g,(function(e){return e.toUpperCase()}))};
1(0,o.PR)(E)&&(null===E||void 0===E||E.forEach((function(e){B[null===e||void 0===e?void 0:e.title]=be({},e,{stationNameCamel:q(null===e||void 0===e?void 0:e.station_name),show:["Book From","Book upto"].includes(null===e||void 0===e?void 0:e.title)})})));var U,Y=(0,_e.Eg)(null===B||void 0===B||null===(t=B["Board From"])||void 0===t?void 0:t.act_date_time);(0,o.PR)(null===B||void 0===B?void 0:B["Book From"])&&(Y=(0,_e.Eg)(null===B||void 0===B||null===(U=B["Book From"])||void 0===U?void 0:U.act_date_time));null===B||void 0===B||null===(n=B["Get Down"])||void 0===n||n.date_time;var G,H,Q=(0,_e.Eg)(null===B||void 0===B||null===(r=B["Get Down"])||void 0===r?void 0:r.act_date_time);(0,o.PR)(null===B||void 0===B?void 0:B["Book upto"])&&(null===B||void 0===B||null===(G=B["Book upto"])||void 0===G||G.date_time,Q=(0,_e.Eg)(null===B||void 0===B||null===(H=B["Book upto"])||void 0===H?void 0:H.act_date_time));var V={};try{Object.assign(V,(0,o.jl)(D.replace(/[^A-Za-z]/g,""))),Object.assign(V,{SeatCount:D.replace(/[^0-9]/g,"")})}catch(K){}var X,J={};try{(0,o.PR)(M)&&Object.assign(J,(0,o.jl)(null===M||void 0===M?void 0:M.replace(/[^a-zA-Z]/g,"")))}catch($){}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{className:"Mui-flexbox Mui-space_between Mui-alt_conf_header__summary_wrapper",children:[(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(s.Z,{className:"Mui-flexbox Mui-alt_conf_train__info_box",children:(0,i.jsxs)(l.Z,{component:"p",className:"Mui-train__name_and__number",children:[(0,i.jsx)("span",{className:"Mui-alt_conf_train__number",children:L[0]}),L[1]]})}),(0,i.jsxs)(s.Z,{className:"Mui-flexbox",children:[(0,i.jsx)(l.Z,{component:"p",className:"Mui-class_code",children:I}),(0,i.jsx)(l.Z,{component:"p",className:"Mui-class_name",children:(0,he.x7)(I)}),(0,i.jsxs)(l.Z,{component:"p",className:"Mui-class_availability_info",style:{color:"".concat((0,o.PR)(null===J||void 0===J?void 0:J.name)?J.otherColor:null!==(X=V.color)&&void 0!==X?X:"#4C4C4C")},children:[D," ",(0,o.PR)(z)&&"(".concat(z,")")]})]})]}),(0,i.jsx)(f.Z,{onClick:N,children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/closeicon-1774021609.svg",alt:"close icon",width:"23.28px"})})]}),(0,o.PR)(null===B||void 0===B?void 0:B["Book From"])&&(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_row Mui-from_to__wrapper Mui-from__box",children:[(0,i.jsx)(l.Z,{component:"p",className:"Mui-alt_conf_from_to_label",children:null===B||void 0===B||null===(a=B["Book From"])||void 0===a?void 0:a.title}),(0,i.jsx)(s.Z,{className:"Mui-alt_conf_icons Mui-from_to_icon_box",children:(0,i.jsx)(s.Z,{className:"Mui-from_to_icon_wrapper",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/altconfcircle-1774077254.svg",alt:"from station",width:"17.24"})})}),(0,i.jsx)(s.Z,{className:"Mui-alt_conf_details",children:(0,i.jsxs)(l.Z,{component:"p",className:"Mui-alt_conf_from_to_station",children:[null===B||void 0===B||null===(c=B["Book From"])||void 0===c?void 0:c.stationNameCamel," ",null===B||void 0===B||null===(d=B["Book From"])||void 0===d?void 0:d.station_code]})})]}),(0,i.jsx)(s.Z,{className:"Mui-alt_conf_timeline".concat((0,o.PR)(null===B||void 0===B?void 0:B["Book From"])?"":" Mui-nobook__from").concat((0,o.PR)(null===B||void 0===B?void 0:B["Book upto"])?"":" Mui-nobook__upto"),children:(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_card",children:[(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_row",children:[(0,i.jsx)(l.Z,{component:"p",className:"Mui-alt_conf_label",children:null===B||void 0===B||null===(p=B["Board From"])||void 0===p?void 0:p.title}),(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_icons",children:[(0,i.jsxs)("span",{className:"walk",children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/boardperson-1774078461.svg",alt:"board icon",width:"8.62px"}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/boardarrow-1774078495.svg",alt:"board arrow icon",width:"5.17px"})]}),(0,i.jsx)("span",{className:"train",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/trainicon-1774078350.svg",alt:"train icon",width:"13.79px"})})]}),(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_details",children:[(0,i.jsx)("div",{className:"Mui-alt_conf_station",children:null===B||void 0===B||null===(m=B["Board From"])||void 0===m?void 0:m.stationNameCamel}),(0,i.jsx)("div",{className:"Mui-alt_conf_time",children:null===B||void 0===B||null===(v=B["Board From"])||void 0===v?void 0:v.date_time})]})]}),(0,i.jsx)("div",{className:"Mui-alt_conf_arrow",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/downarrow-1774078518.svg",alt:"downarrow icon",width:"15px"})}),(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_row Mui-deboard_station",children:[(0,i.jsx)(l.Z,{component:"p",className:"Mui-alt_conf_label",children:null===B||void 0===B||null===(h=B["Get Down"])||void 0===h?void 0:h.title}),(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_icons",children:[(0,i.jsxs)("span",{className:"walk",children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/deboardpers
1on-1774078480.svg",alt:"deboard icon",width:"8.62px"}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/deboardarrow-1774078505.svg",alt:"deboard arrow icon",width:"5.17px"})]}),(0,i.jsx)("span",{className:"train",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/trainicon-1774078350.svg",alt:"train icon",width:"13.79px"})})]}),(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_details",children:[(0,i.jsx)("div",{className:"Mui-alt_conf_station",children:null===B||void 0===B||null===(_=B["Get Down"])||void 0===_?void 0:_.stationNameCamel}),(0,i.jsx)("div",{className:"Mui-alt_conf_time",children:null===B||void 0===B||null===(x=B["Get Down"])||void 0===x?void 0:x.date_time})]})]})]})}),(0,o.PR)(null===B||void 0===B?void 0:B["Book upto"])&&(0,i.jsxs)(s.Z,{className:"Mui-alt_conf_row Mui-from_to__wrapper",children:[(0,i.jsx)(l.Z,{component:"p",className:"Mui-alt_conf_from_to_label",children:null===B||void 0===B||null===(g=B["Book upto"])||void 0===g?void 0:g.title}),(0,i.jsx)(s.Z,{className:"Mui-alt_conf_icons Mui-from_to_icon_box",children:(0,i.jsx)(s.Z,{className:"Mui-from_to_icon_wrapper",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/altconfcircle-1774077254.svg",alt:"from station",width:"17.24"})})}),(0,i.jsx)(s.Z,{className:"Mui-alt_conf_details",children:(0,i.jsxs)(l.Z,{component:"p",className:"Mui-alt_conf_from_to_station",children:[null===B||void 0===B||null===(b=B["Book upto"])||void 0===b?void 0:b.stationNameCamel," ",null===B||void 0===B||null===(y=B["Book upto"])||void 0===y?void 0:y.station_code]})})]}),(0,i.jsxs)(l.Z,{component:"p",className:"Mui-alt_conf_route__note",children:["Your ticket will be booked on a longer route. From"," ",(0,o.PR)(null===B||void 0===B?void 0:B["Book From"])?null===B||void 0===B||null===(j=B["Book From"])||void 0===j?void 0:j.stationNameCamel:null===B||void 0===B||null===(w=B["Board From"])||void 0===w?void 0:w.stationNameCamel," ","to"," ",(0,o.PR)(null===B||void 0===B?void 0:B["Book upto"])?null===B||void 0===B||null===(S=B["Book upto"])||void 0===S?void 0:S.stationNameCamel:null===B||void 0===B||null===(k=B["Get Down"])||void 0===k?void 0:k.stationNameCamel,"."]}),(0,i.jsxs)(u.Z,{fullWidth:!0,className:"Mui-alt_conf_book_now_cta",onClick:function(){return R(W,Y,Q)},children:["Book for ",(0,i.jsx)(me.G,{icon:ve.sph}),"".concat((0,o.PR)(A)?O:F)]})]})}function Se(e){var t=ge({},e)||{},n=t.close,r=t.message;return(0,i.jsxs)(s.Z,{className:"Mui-flexbox Mui-column__direction",children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/Message-1739424531.png",alt:"no more confirm seat",width:"120"}),(0,i.jsx)(l.Z,{component:"p",className:"Mui-no_more__confirm__seat_title",children:r}),(0,i.jsx)(l.Z,{component:"p",className:"Mui-no_more__confirm__seat_title Mui-no_more__confirm__seat_subtitle",children:"Explore other available trains for your journey"}),(0,i.jsx)(u.Z,{fullWidth:!0,className:"Mui-alt_conf_book_now_cta",onClick:n,children:"Okay"})]})}var ke=[{title:"Features",links:[{text:"Live Train Status",href:"/live-train-status?utm_source=tbs_result_dweb_footer"},{text:"PNR Status",href:"/pnr-status?utm_source=tbs_result_dweb_footer"},{text:"Train Time Table",href:"/time-table?utm_source=tbs_result_dweb_footer"},{text:"Seat Availability",href:"/seat-availability?utm_source=tbs_result_dweb_footer"},{text:"Train between Stations",href:"/trains-between-stations?utm_source=tbs_result_dweb_footer"},{text:"Arrival Departure",href:"/arrival-departure?utm_source=tbs_result_dweb_footer"},{text:"Travel Advisory",href:"/travel-advisory?utm_source=tbs_result_dweb_footer"}]},{title:"Book with Us",links:[{text:"Bus Tickets",href:"/bus-booking?utm_source=tbs_result_dweb_footer"},{text:"Train Tickets",href:"/train-ticket?utm_source=tbs_result_dweb_footer"},{text:"Food on Train",href:"/buy-food-in-train?utm_source=tbs_result_dweb_footer"}]},{title:"Info",links:[{text:"About Us",href:"/about-us?utm_source=tbs_result_dweb_footer"},{text:"Contact Us",href:"/contact-us?utm_source=tbs_result_dweb_footer"},{text:"FAQs",href:"/faq?utm_source=tbs_result_dweb_footer"},{text:"Partners",href:"/partners?utm_source=tbs_result_dweb_footer"},{text:"Advertise With Us",href:"[email protected]"},{text:"Work With Us",href:"/work-with-us?utm_source=tbs_result_dweb_footer"},{text:"Media",href:"/print-media?utm_source=tbs_result_dweb_footer"}]},{title:"Our Family",links:[{text:"IntrCity Smart Bus",href:"https://www.intrcity.com/?utm_source=tbs_result_dweb_footer"}]}],Ce=[{title:"Popular Bus Routes",links:[{text:"Delhi To Lucknow",href:"/bus-booking/delhi-to-lucknow-buses?utm_source=dwebhome"},{text:"Gorakhpur to Delhi",href:"/bus-booking/gorakhpur-to-delhi-buses?utm_source=dwebhome"},{text:"Delhi to Amritsar",href:"/bus-booking/delhi-to-amritsar-buses?utm_source=dwebhome"},{text:"Bangalore to Hyderabad",href:"/bus-booking/bangalore-to-hyderabad-buses?utm_source=dwebhome"},{text:"Delhi to Gorakhpur",href:"/bus-booking/delhi-to-gorakhpur-buses?utm_source=dwebhome"},{text:"Chennai to Bangalore",href:"/bus-booking/chennai-to-bangalore-buses?utm_source=dwebhome"},{text:"Amritsar to Delhi",href:"/bus-booking/amritsar-to-delhi-buses?utm_source=dwebhome"}]},{title:"Popular Food on Train Stations",links:[{text:"Food at Vishakapatnam",href:"/buy-food-in-train-station/vishakapatnam-vskp?utm_source=dwebhome"},{text:"Food at Vadodara junction",href:"/buy-food-in-train-station/vadodara-junction-br?utm_source=dwebhome"},{text:"Food at Surat",href:"/buy-food-in-train-station/surat-st?utm_source=dwebhome"},{text:"Food at Ahmedabad junction",href:"/buy-food-in-train-station/ahmedabad-junction-adi?utm_source=dwebhome"},{text:"Food at Panipat junction",href:"/buy-food-in-train-station/panipat-junction-pnp?utm_source=dwebhome"},{text:"Food at Ghaziabad",href:"/buy-food-in-train-station/ghaziabad-gzb?utm_source=dwebhome"},{text:"Food at Coimbatore junction",href:"/buy-food-in-train-station/coimbatore-junction-cbe?utm_source=dwebhome"}]},{title:"Other Useful Links",links:[{text:"Check PNR Status",href:"/pnr-status?utm_source=dwebhome"},{text:"Live Train Status",href:"/live-train-status?utm_source=dwebhome"},{text:"Train Time Table",href:"/time-table?utm_source=dwebhome"},{text:"Seat Availability",href:"/seat-availability?utm_source=dwebhome"},{text:"Train between Stations",href:"/trains-between-stations?utm_source=dwebhome"},{text:"Arrival Departure",href:"/arrival-departure?utm_source=dwebhome"},{text:"Travel Advisory",href:"/travel-advisory?utm_source=dwebhome"}]}];var Ne=function(e){var t=e.ishomepage,n=void 0!==t&&t,r=e.isMyBooking,o=void 0!==r&&r;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Z,{sx:{background:"#ffffff"},children:(0,i.jsxs)(a.Z,{maxWidth:"lg",children:[n&&(0,i.jsx)(s.Z,{sx:{padding:"5rem 2rem"},children:(0,i.jsx)(O.ZP,{container:!0,sx:{paddingTop:"1.5rem"},children:Ce.map((function(e){return(0,i.jsxs)(O.ZP,{item:!0,xs:4,className:M().travel_route,children:[(0,i.jsx)(l.Z,{component:"div",className:M().route_title,children:e.title}),(0,i.jsx)("ul",{style:{textTransform:"capitalize",display:"inline-block"},children:e.links.map((function(e){return(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.href,style:{color:"#333333"},children:e.text})},e.text)}))})]},e.title)}))})}),(0,i.jsxs)(s.Z,{sx:{pb:3},children:[(0,i.jsxs)(O.ZP,{container:!0,sx:{mt:"20px",pt:5,pb:5},children:[(0,i.jsx)(O.ZP,{item:!0,xs:9,children:(0,i.jsx)(O.ZP,{container:!0,children:ke.map((function(e){return(0,i.jsxs)(O.ZP,{item:!0,xs:3,children:[(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"18px",fontWeight:"700"},children:e.title}),(0,i.jsx)(s.Z,{sx:{mt:2},children:e.links.map((function(e){return(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"14px",fontWeight:"400",lineHeight:"28px"},children:(0,i.jsx)("a",{href:e.href,style:{color:"#333333"},children:e.text})},e.text)}))})]},e.title)}))})}),(0,i.jsxs)(O.ZP,{item:!0,xs:3,children:[(0,i.jsxs)(s.Z,{sx:{mb:3},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/RailYatri-1719298334.png",alt:"ry logo",width:"200px"}),(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"14px",fontWeight:"400",mt:2},children:"RailYatri is a one stop solution that furnishes an expanse of data-based travel discovery at your disposal. So get connected for an inclusive experience of Smart Bus booking, Food on Train service, Train Ticket booking & journey information."}),(0,i.jsx)(l.Z,{className:"fs-16 black fw-med",component:"div",sx:{marginTop:"20px"},children:"Stelling Technologies Private Limited"}),(0,i.jsxs)(l.Z,{className:"fs-14 black fw-reg",component:"div",children:[(0,i.jsx)("span",{className:"fw-med",children:"CIN:"})," U72200UP2011PTC087404"]}
1),(0,i.jsx)(l.Z,{className:"fs-16 black fw-med",sx:{marginTop:"20px"},component:"div",children:"Registered Office:"}),(0,i.jsx)(l.Z,{component:"div",children:"Ground Floor Amco Tower, Plot No A - 5, 6 & 7, Sector 9, Gautam Buddha Nagar, Noida, Uttar Pradesh, India, 201301"})]}),(0,i.jsxs)(s.Z,{sx:{display:"flex"},children:[(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"http://www.facebook.com/railyatri",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/fblogo-1710322257.png",width:"15px",alt:"fb logo"})})}),(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"http://twitter.com/railyatri",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/xlogo-1710323235.png",width:"22px",alt:"x logo"})})}),(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"https://www.youtube.com/channel/UC258cjsQ688s3NCkbN_nZ7g?sub_confirmation=1",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/ytlogo-1710323548.png",width:"28px",alt:"yt logo"})})})]})]})]}),(0,i.jsxs)(s.Z,{sx:{maxWidth:"30%",margin:"auto",display:"flex",justifyContent:"space-around"},children:[(0,i.jsx)(s.Z,{children:(0,i.jsx)(l.Z,{children:"\xa9 Copyright by RailYatri."})}),(0,i.jsxs)(s.Z,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsx)(l.Z,{children:(0,i.jsx)("a",{href:"/terms-of-uses?utm_source=tbs_result_dweb_footer",style:{color:"#333333"},children:"Terms of Use"})}),(0,i.jsx)(l.Z,{sx:{ml:.5,mr:.5},children:"|"}),(0,i.jsx)(l.Z,{children:(0,i.jsx)("a",{href:"/privacy-policy?utm_source=tbs_result_dweb_footer",style:{color:"#333333"},children:"Privacy"})})]})]})]})]})}),(0,i.jsx)(de,{isMyBooking:o}),(0,i.jsx)(ye,{})]})},Ze=(n(30747),n(40121),n(87004)),Re=n(41120),Te=n.n(Re),Pe=n(76192);function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},De.apply(this,arguments)}var Ie=function(e){return(e=e.toLowerCase()).replace(/\b\w/g,(function(e){return e.toUpperCase()}))};var Ae=function(e){var t,n,r,o,c,d,u,f,p,m,v,h,_,x,g,b=De({},e),y=b.seoData,j=b.routeInfoRef,w=b.topTrainBookingRoutesData,S=b.icSeoHtmlDescription,k=(0,Pe.Z)(),C=Ie(null===j||void 0===j||null===(t=j.current)||void 0===t||null===(n=t.from)||void 0===n?void 0:n.name),N=Ie(null===j||void 0===j||null===(r=j.current)||void 0===r||null===(o=r.to)||void 0===o?void 0:o.name),Z=null===y||void 0===y?void 0:y.fastestTrain_time,R=y.slowestTrain_time,T=y.min_fare,P=y.train_list.length,D=null===Z||void 0===Z?void 0:Z.split(" "),I=parseInt(null===D||void 0===D?void 0:D[0]),A=parseInt(null===D||void 0===D?void 0:D[1]),O=null===R||void 0===R?void 0:R.split(" "),F=parseInt(null===O||void 0===O?void 0:O[0]),M=parseInt(null===O||void 0===O?void 0:O[1]),z=null===(c=y.train_list)||void 0===c?void 0:c.slice(0,5).map((function(e){return"".concat(e.train_name," (").concat(e.train_number,")")})),E=null===z||void 0===z?void 0:z.join(", ");return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(s.Z,{sx:{mt:6,mb:2},children:[(0,i.jsx)(a.Z,{maxWidth:"lg",sx:{padding:"0px !important"},children:(0,i.jsxs)(s.Z,{sx:{background:"#ffffff",margin:"auto",pb:3,display:"flex"},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/rail-min-min-1646638920.png",alt:"".concat(C," to ").concat(N," trains"),width:"434px"}),(0,i.jsxs)(s.Z,{sx:{pt:2,ml:5},children:[(0,i.jsxs)(l.Z,{component:"H2",sx:{color:"#000000",fontSize:"22px"},children:[C," to ",N," Train Ticket Booking"]}),(0,i.jsxs)(l.Z,{component:"p",sx:{color:"#4c4c4c",margin:"2vh 2vw 0 0"},children:[C," and ",N," are approximately"," ",null===y||void 0===y?void 0:y.distance," kilometers away from one another. The first train from ",C," to ",N," leaves at"," ",null===y||void 0===y?void 0:y.first_train_time," hrs from ",C,". The fastest train from ",C," to ",N," is the"," ",null===y||void 0===y?void 0:y.fastestTrain_name," which covers a distance of"," ",null===y||void 0===y?void 0:y.distance," kilometres in approximately ",I," Hours"," ",A," Minutes. RailYatri provides train travellers an easy online train ticket booking platform with a large number of IRCTC trains to choose from across the country. You can choose from a large number of ",C," to ",N," trains available."]})]})]})}),(0,i.jsx)(a.Z,{maxWidth:"lg",sx:{padding:"0px !important"},children:(0,i.jsx)(s.Z,{sx:{margin:"auto",pb:3,display:"flex"},children:(0,i.jsxs)(s.Z,{sx:{backgroundColor:"#01478C",marginTop:"5vh"},children:[(0,i.jsxs)(s.Z,{sx:{padding:"4vh 4vw 0 4vw",color:"#fff",textAlign:"center"},children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"1.5em",fontWeight:700},children:[C," to ",N," train route"]}),(0,i.jsxs)(l.Z,{component:"p",sx:{margin:"2vh 0",fontSize:"15px",lineHeight:"1.5"},children:["Trains are the preferred mode of travel for over a thous
1and commuters on the ",C," to ",N," train route, one of the most popular destinations in India. Everyday, many travellers commute on the ",C," to ",N," railway route, and as many as ",P," IRCTC trains run between the two stations, i.e., ",C," to ",N,"."," ",C," to ",N," are approximately"," ",null===y||void 0===y?void 0:y.distance," Kilometres apart from one another."]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"1.5em",fontWeight:700},children:[C," to ",N," Train Ticket Price"]}),(0,i.jsxs)(l.Z,{component:"p",sx:{margin:"2vh 0",fontSize:"15px",lineHeight:"1.5"},children:["The ",C," to ",N," train ticket fare depends on various factors, such as preferred seat, routes selected, and date of journey. At RailYatri, the ",C," to"," ",N," train ticket price is affordable for all train travellers. Depending on the budget, one can reserve a third AC (3A) coach, a second AC (2A) coach, as well as the first AC (1A) coach on a train from ",C," to ",N]})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"1.5em",fontWeight:700},children:[C," to ",N," train time"]}),(0,i.jsxs)(l.Z,{component:"p",sx:{margin:"2vh 0",fontSize:"15px",lineHeight:"1.5"},children:["The ",C," to ",N," train takes between ",I," ","Hours ",A," Minutes to ",F," Hours ",M," ","Minutes. The traveller can select a train based on their preferences among every day trains such as ",E,"and others. One can also choose from trains like"," ",E," that run on a weekly basis. The RailYatri app and website allow users to check the live train running status, Tatkal train tickets and PNR status etc."]})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"1.5em",fontWeight:700},children:["Book your ",C," to ",N," train journey with RailYatri.in"]}),(0,i.jsxs)(l.Z,{component:"p",sx:{margin:"2vh 0",fontSize:"15px",lineHeight:"1.5"},children:["RailYatri.in helps you plan your train journey better with its accurate information on all possible railway enquiries. Train and railway reservation enquiries like ",C," ","to ",N," seat availability, ",C," to"," ",N," correct time table, ",C," to ",N," ","list of scheduled trains, ",C," to ",N," train status, ",C," to ",N," train fare calculator You can easily book your IRCTC train tickets online with RailYatri, an official partner of IRCTC."]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(l.Z,{component:"h2",sx:{fontSize:"1.5em",fontWeight:700},children:"RailYatri.in can help you plan a stress-free trip."}),(0,i.jsxs)(l.Z,{component:"p",sx:{margin:"2vh 0",fontSize:"15px",lineHeight:"1.5"},children:["We make each booking a hassle-free experience for our travellers. Explore the trending deals and offers at the best price on the ",C," to ",N," trains. Download the RailYatri app to stay updated on the latest IRCTC information via our train enquiry centre and train travel blogs for insights. You can view information on"," ",C," to ",N," live train running status and PNR status on the RailYatri app. Visit the royal city of Lucknow in the most convenient way possible! Immerse yourself in the royal city of Lucknow! yourself in its culture, art and history."]})]})]}),(0,i.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",alignContent:"center",justifyContent:"center",margin:"2em auto",height:"22em"},itemScope:"",itemType:"https://schema.org/Table",children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{margin:"0 auto",padding:"20px",color:"white",textTransform:"capitalize",fontWeight:"bolder",textAlign:"center",fontSize:"1.8em"},children:[C," To ",N," Train Running Information"]}),(0,i.jsx)("table",{className:"".concat(Te().SeoContent),children:(0,i.jsxs)("tbody",{className:"".concat(Te().tbody),children:[(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsx)("td",{className:"".concat(Te().td),children:(0,i.jsx)("a",{className:"".concat(Te().eventNone),href:"https://www.railyatri.in/new-delhi-to-lucknow-trains",children:"Daily Trains"})}),(0,i.jsx)("td",{className:"".concat(Te().td),children:P})]}),(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsx)("td",{className:"".concat(Te().td),children:(0,i.jsxs)("a",{className:"".concat(Te().eventNone),href:"https://www.railyatri.in/new-delhi-to-lucknow-trains",children:[" ","Distance"]})}),(0,i.jsxs)("td",{className:"".concat(Te().td),children:[null===y||void 0===y?void 0:y.distance," Km"]})]}),(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsxs)("td",{className:"".concat(Te().td),children:[" ",(0,i.jsxs)("a",{className:"".concat(Te().eventNone),href:"https://www.railyatri.in/new-delhi-to-lucknow-trains",children:[" ","Duration"]})]}),(0,i.jsxs)("td",{className:"".concat(Te().td),children:[I," hrs ",A," mins"]})]}),(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsx)("td",{className:"".concat(Te().td),children:(0,i.jsx)("a",{className:"".concat(Te().eventNone),href:"https://www.railyatri.in/new-delhi-to-lucknow-trains",children:"Customer Support"})}),(0,i.jsx)("td",{className:"".concat(Te().td),children:"24 X 7 Available"})]}),(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsx)("td",{className:"".concat(Te().td),children:"First Departure"}),(0,i.jsx)("td",{className:"".concat(Te().td),children:null===y||void 0===y?void 0:y.first_train_time})]}),(0,i.jsxs)("tr",{className:"".concat(Te().tr),children:[(0,i.jsx)("td",{className:"".concat(Te().td),children:"Last Departure"}),(0,i.jsx)("td",{className:"".concat(Te().td),children:null===y||void 0===y?void 0:y.last_train_time})]})]})})]})]})})}),(0,i.jsx)(s.Z,{sx:{background:"#ffffff",pt:2,pb:2},children:(0,i.jsxs)(a.Z,{maxWidth:"lg",sx:{padding:"0px !important"},children:[(0,i.jsxs)(s.Z,{sx:{margin:"auto",pb:3},children:[(0,i.jsx)(l.Z,{component:"div",sx:{margin:"12px 0"},children:(0,i.jsx)("p",{style:{fontSize:"14px"},dangerouslySetInnerHTML:{__html:S}})}),(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"20px"},children:[C," to ",N," Train Routes - FAQs"]}),(0,i.jsxs)(s.Z,{className:"schemaClass",itemScope:"",itemType:"http://schema.org/FAQPage",children:[(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) How far is ",N," from ",C," by train?"]}),(0,i.jsxs)(Ze.U7,{children:["A) The ",C," to ",N," distance is"," ",null===y||void 0===y?void 0:y.distance,". Being one of the popular railway routes, several IRCTC trains run between ",C," and"," ",N," (",null===j||void 0===j||null===(d=j.current)||void 0===d||null===(u=d.from)||void 0===u?void 0:u.code," to"," ",null===j||void 0===j||null===(f=j.current)||void 0===f||null===(p=f.to)||void 0===p?void 0:p.code,")."]})]}),(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) How many trains runs between ",C," and"," ",N," everyday?"]}),(0,i.jsxs)(Ze.U7,{children:["A) There are ",P," trains to book between"," ",C," & ",N," everyday. Travellers can check the correct train timings and fare on the"," ",(0,i.jsx)("a",{href:"http://m.rytr.in/home-page?utm_source=tbs_result_seo",children:"RailYatri app"}),"."]})]}),(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) How many trains runs between ",C," &"," ",N," on a weekly basis?"]}),(0,i.jsxs)(Ze.U7,{children:["A) There are ",P," trains running between"," ",C," &",N,". You can book"," ",(0,i.jsx)("a",{href:"https://www.railyatri.in/train-ticket",children:"train tickets"})," ","with FREE Cancellation from RailYatri!"]})]}),(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) Which is the fastest train that runs between"," ",C," and ",N," station?"]}),(0,i.jsxs)(Ze.U7,{children:["A) The fastest train from ",C," to ",N," is",null===y||void 0===y?void 0:y.fastestTrain_name," which covers a distance of"," ",null===y||void 0===y?void 0:y.distance," Kilometers in a
1pproximately ",I,"H"," ",A,"M hours."]})]}),(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) At what time does the first train depart from"," ",C," to ",N," Station?"]}),(0,i.jsxs)(Ze.U7,{children:["A) The first train from ",C," to ",N," leaves at ",null===y||void 0===y?void 0:y.first_train_time," Hrs from ",C,". Book this train from the FASTEST"," ",(0,i.jsx)("a",{href:"https://www.railyatri.in/train-ticket",children:"train ticket booking"})," ","app - RailYatri"]})]}),(0,i.jsxs)(Ze.Qv,{children:[(0,i.jsxs)(Ze.HL,{children:["Q) What is the train ticket price from ",C," to"," ",N," Station?"]}),(0,i.jsxs)(Ze.U7,{children:["A) ",C," to ",N," Train Ticket Prices start from Rs.",T,". You can book trains tickets to travel between ",C," to ",N," from RailYatri App."]})]})]})]}),(null===y||void 0===y||null===(m=y.train_list)||void 0===m?void 0:m.length)>0&&(0,i.jsxs)(s.Z,{sx:{margin:"auto",pb:3},children:[(0,i.jsxs)(l.Z,{component:"h2",sx:{fontSize:"20px",margin:"15px 0 20px 0"},children:[C," to ",N," Train Time Table"]}),(0,i.jsxs)("table",{className:"".concat(Te().table),children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Train No./Name"}),(0,i.jsx)("th",{children:"Departure"}),(0,i.jsx)("th",{children:"Arrival"}),(0,i.jsx)("th",{children:"Train Status"}),(0,i.jsx)("th",{children:"Duration"})]})}),(0,i.jsx)("tbody",{children:null===(v=y.train_list)||void 0===v?void 0:v.map((function(e,t){var n=e.duration.split(" "),r=parseInt(n[0]),o=parseInt(n[1]),a="".concat("https://www.railyatri.in","/trains/route-").concat(e.train_number,"-").concat(k([" ","  "],"-",null===e||void 0===e?void 0:e.train_name));return a=k(["--","---","----"],"-",a),a=k("--","-",a),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsxs)("a",{href:"".concat(a),target:"_blank",children:[e.train_number," ",e.train_name]})}),(0,i.jsx)("td",{children:e.departure_time}),(0,i.jsx)("td",{children:e.arrival_time}),(0,i.jsxs)("td",{children:["Mostly ",e.status]}),(0,i.jsxs)("td",{children:[r,"H ",o,"M"]})]},t)}))})]})]}),(null===w||void 0===w?void 0:w.success)&&(null===w||void 0===w||null===(h=w.items)||void 0===h||null===(_=h.stations)||void 0===_?void 0:_.length)>0&&(0,i.jsxs)(s.Z,{sx:{margin:"auto",pb:3},children:[(0,i.jsx)(l.Z,{component:"h2",sx:{fontSize:"22px",margin:"15px 0 30px 0",textAlign:"center"},children:"Top Train Booking Routes"}),(0,i.jsx)(s.Z,{className:Te().seo_top_trn_bkroute,children:(0,i.jsx)("ul",{style:{textTransform:"capitalize",display:"inline-block"},children:null===w||void 0===w||null===(x=w.items)||void 0===x||null===(g=x.stations)||void 0===g?void 0:g.map((function(e){var t=e.station_code,n=e.station_name,r=k([" ","  "],"-","/".concat(C,"-to-").concat(n,"-trains?utm_source=tbs_mweb_result_seo&to_code=").concat(t));return(0,i.jsx)("li",{itemProp:"itemListElement",itemScope:"",itemType:"http://schema.org/ListItem",children:(0,i.jsxs)("a",{itemProp:"item",href:"".concat(r.toLowerCase()),children:[C," to ",n.toLowerCase()]})},t)}))})})]})]})})]})})},Oe=n(99261),Fe=n(33279);var Me=function(e){var t=e.freeCancelation,n=e.setFreeCancelation,r=e.setCanSubmit,o=(0,q.v9)((function(e){return e.user})).CanShowFreeCancelationPopUp,a=(0,q.I0)();return(0,i.jsxs)(z.Z,{onClose:function(){a((0,Oe.hm)({CanShowFreeCancelationPopUp:!1}))},open:o,BackdropProps:{style:{backgroundColor:"#000000",opacity:.4}},sx:{"& .MuiDialog-paper":{position:"relative !important",margin:"0px",overflowY:"visible",borderRadius:"11px"}},children:[(0,i.jsx)(s.Z,{sx:{display:"flex",justifyContent:"end",mt:1,mr:1.5},children:(0,i.jsx)(f.Z,{onClick:function(){return a((0,Oe.hm)({CanShowFreeCancelationPopUp:!1}))},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/closepopup-1722489697.png",width:"30px"})})}),o&&(0,i.jsx)(E.Z,{sx:{textAlign:"center",p:2.5},children:(0,i.jsx)(Fe.Z,{freeCancelation:t,setFreeCancelation:n,isPopup:!0,setCanSubmit:r})})]})},ze=n(7759),Ee=[{title:"Features",links:[{text:"Live Train Status",href:"/live-train-status?"},{text:"PNR Status",href:"/pnr-status?"},{text:"Train Time Table",href:"/time-table?"},{text:"Seat Availability",href:"/seat-availability?"},{text:"Train between Stations",href:"/trains-between-stations?"},{text:"Arrival Departure",href:"/arrival-departure?"},{text:"Travel Advisory",href:"/travel-advisory?"}]},{title:"Book with Us",links:[{text:"Bus Tickets",href:"/bus-booking?"},{text:"Train Tickets",href:"/train-ticket?"},{text:"Food on Train",href:"".concat("https://www.railyatri.in/buy-food-in-train","?")}]},{title:"Info",links:[{text:"About Us",href:"/about-us?"},{text:"Contact Us",href:"/contact-us?"},{text:"FAQs",href:"/faq?"},{text:"Partners",href:"/partners?"},{text:"Advertise With Us",href:"mailto:[email protected]"},{text:"Work With Us",href:"/work-with-us?"},{text:"Media",href:"/print-media?"}]},{title:"Our Family",links:[{text:"IntrCity Smart Bus",href:"https://www.intrcity.com?"}]}];var We=function(e){var t=e.isMyBooking,n=void 0!==t&&t,r=e.page,o=e.utmsrc;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{sx:{background:"#ffffff"},children:[(0,i.jsx)(a.Z,{maxWidth:"lg",sx:{padding:"0px !important",maxWidth:"1300px!important"},children:(0,i.jsxs)(O.ZP,{container:!0,sx:{mt:"0px",pt:5,pb:5,paddingRight:"10px",paddingLeft:"10px"},children:[(0,i.jsx)(O.ZP,{item:!0,xs:9,children:(0,i.jsx)(O.ZP,{container:!0,children:Ee.map((function(e){return(0,i.jsxs)(O.ZP,{item:!0,xs:3,children:[(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"18px",fontWeight:"700"},children:e.title}),(0,i.jsx)(s.Z,{sx:{mt:2},children:e.links.map((function(e){var t="Advertise With Us"===e.text;return(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"14px",fontWeight:"400",lineHeight:"28px"},children:(0,i.jsx)("a",{className:"materialUINewFooterAchorTag",href:t?e.href:"".concat(e.href,"utm_source=").concat("DwebHomePage"===r?o:"tbs_result_dweb_footer"),children:e.text})},e.text)}))})]},e.title)}))})}),(0,i.jsxs)(O.ZP,{item:!0,xs:3,children:[(0,i.jsxs)(s.Z,{sx:{mb:"20px"},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/rylogo-1760424802.svg",alt:"ry logo",width:"200px"}),(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333333",fontSize:"14px",fontWeight:"400",mt:2},children:"RailYatri is a one stop solution that furnishes an expanse of data-based travel discovery at your disposal. So get connected for an inclusive experience of Smart Bus booking, Food on Train service, Train Ticket booking & journey information."}),(0,i.jsx)(l.Z,{component:"div",sx:{marginTop:"10px",color:"#333",fontSize:"14px",fontWeight:"700"},children:"Stelling Technologies Private Limited"}),(0,i.jsxs)(l.Z,{component:"div",sx:{color:"#333",fontSize:"14px",fontWeight:"400"},children:[(0,i.jsx)("span",{className:"fw-med",children:"CIN:"})," U72200UP2011PTC087404"]}),(0,i.jsx)(l.Z,{sx:{marginTop:"10px",color:"#333",fontSize:"14px",fontWeight:"700"},component:"div",children:"Registered Office:"}),(0,i.jsx)(l.Z,{component:"div",sx:{color:"#333",fontSize:"14px",fontWeight:"400"},children:"Ground Floor Amco Tower, Plot No A - 5, 6 & 7, Sector 9, Gautam Buddha Nagar, Noida, Uttar Pradesh, India, 201301"})]}),(0,i.jsxs)(s.Z,{sx:{display:"flex"},children:[(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"http://www.facebook.com/railyatri",target:"_blank",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/fb-1763087536.svg",width:"12px",alt:"fb logo"})})}),(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"https://www.instagram.com/railyatri.in/?hl=en",target:"_blank",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/insta-1763087534.svg",width:"21px",alt:"x logo"})})}),(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"https://www.youtube.com/channel/UC258cjsQ688s3NCkbN_nZ7g?sub_confirmation=1",target:"_blank",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/youTube-1763087530.svg",width:"27px",alt:"yt logo"})})}),(0,i.jsx)(s.Z,{sx:{mr:3},children:(0,i.jsx)("a",{href:"http://twitter.com/railyatri",target:"_blank",style:{color:"#333333"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/XTwitter-1
1763087532.svg",width:"21px",alt:"x logo"})})})]})]})]})}),(0,i.jsx)("section",{style:{background:"#fff",padding:"0 0 50px",textAlign:"center"},children:(0,i.jsxs)("div",{style:{},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/footerTrain-1762778464.png",alt:"RailYatri train",title:"RailYatri",width:"152",style:{marginBottom:"20px"}}),(0,i.jsxs)("p",{className:"fs-14 fw-reg",style:{color:"#888",margin:"0"},children:["Made with \u2764\ufe0f in India. \xa9 Copyright by RailYatri.",(0,i.jsx)("a",{href:"".concat("https://www.railyatri.in","/terms-of-uses?utm_source=").concat("DwebHomePage"===r?o:"tbs_result_dweb_footer"),className:"materialUINewFooterAchorTag",target:"_blank",style:{margin:"0 5px",transition:"all ease 0.2s",outline:"none",textDecoration:"none",border:"0"},children:"Terms of Use"}),"|",(0,i.jsx)("a",{href:"".concat("https://www.railyatri.in","/privacy-policy?utm_source=").concat("DwebHomePage"===r?o:"tbs_result_dweb_footer"),className:"materialUINewFooterAchorTag",target:"_blank",style:{margin:"0 5px",transition:"all ease 0.2s",outline:"none",textDecoration:"none",border:"0"},children:"Privacy Policy"})]})]})})]}),(0,i.jsx)(de,{isMyBooking:n,page:r}),(0,i.jsx)(ye,{})]})}},33279:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(85893),r=n(25675),o=n.n(r),a=n(64993),s=n.n(a),l=n(9473),c=n(99261),d=n(67294),u=n(11163),f=n(33670),p=n(93773),m=n(67814),v=n(59417);function h(e){var t=e.freeCancelation,n=e.setFreeCancelation,r=e.isPopup,o=void 0!==r&&r,a=(0,d.useState)(!1),l=a[0],f=a[1],p=(0,u.useRouter)();return(0,d.useEffect)((function(){if(p.isReady){var e=p.query.RYhomefcos;setTimeout((function(){e&&(n(!0),f(!0))}),500)}}),[p.isReady]),(0,i.jsxs)("div",{className:s().mainContainer,style:{border:o?"1px solid #033562":"none",position:"relative",borderRadius:o?"5px":"13.97px 13.97px 4.33px 4.33px"},children:[(0,i.jsx)(_,{isPopup:o}),(0,i.jsx)(x,{freeCancelation:t,setFreeCancelation:n,isPopup:o,setCanSubmit:c.g8,fcosByDwebHomePage:l})]})}function _(e){var t=e.isPopup;return(0,i.jsxs)("div",{className:"".concat(s().header," flexCol"),style:{borderRadius:t?"5px":"13.97px 13.97px 4.33px 4.33px"},children:[(0,i.jsxs)("div",{className:"flexRow",style:{justifyContent:"space-between"},children:[(0,i.jsx)("span",{children:"Cancel for free"}),(0,i.jsxs)("div",{className:"".concat(s().recommended," flexCenter flexRow"),children:[(0,i.jsx)("span",{children:(0,i.jsx)("span",{className:"flexCenter ",style:{height:"20px",width:"20px"},children:(0,i.jsx)(o(),{height:114,width:117,src:"https://images.railyatri.in/ry_images_prod/shield-1-copy-1715005891.png"})})}),(0,i.jsx)("span",{children:" Recommended "})]})]}),(0,i.jsx)("span",{children:" Change of plans? Book your trip worry free !"})]})}function x(e){var t=e.freeCancelation,n=e.setFreeCancelation,r=e.isPopup,o=e.fcosByDwebHomePage,a=(0,l.I0)(),u=(0,l.v9)(c.dy),h=((0,l.v9)((function(e){return e.user})).CanShowFreeCancelationPopUp,(0,d.useState)(!1)),_=h[0],x=h[1];return(0,d.useEffect)((function(){o&&(a((0,c.xJ)({FreeCancelation:!0})),r&&a((0,c.g8)({canSubmit:!0})))}),[o]),(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsxs)("div",{className:"".concat(s().middleSection," flexCol"),style:{gap:"16px"},children:[(0,i.jsxs)("div",{className:"flexRow",onClick:function(){n(!0),a((0,c.xJ)({FreeCancelation:!0})),r&&a((0,c.g8)({canSubmit:!0}))},children:[(0,i.jsxs)("div",{className:"flexCol",style:{fontSize:"12.45px",fontWeight:"800",textAlign:"left",marginRight:r?"20px":"unset"},children:[(0,i.jsx)("div",{style:{color:"#3D3E52"},children:"Full refund upon cancellation"}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("span",{style:{color:"#0A874D",fontSize:"13.25px"},children:[" Est. Refund: ",(0,i.jsx)(m.G,{icon:v.sph})," ",null===u||void 0===u?void 0:u.BaseFare,"/ person "]}),(0,i.jsxs)("span",{span:!0,style:{color:"#3D3E52",fontSize:"9.50px",fontWeight:"400"},children:["(Only ",(0,i.jsx)(m.G,{icon:v.sph})," ",null===u||void 0===u?void 0:u.CancellationFee,"/person)"]})]})]}),(0,i.jsx)("label",{className:s().radioButton,children:(0,i.jsx)("span",{className:"".concat(!0===t&&s().checked," ").concat(r&&s().popup)})})]}),(0,i.jsxs)("div",{className:"flexRow",onClick:function(){n(!1),a((0,c.xJ)({FreeCancelation:!1})),r&&a((0,c.g8)({canSubmit:!0}))},children:[(0,i.jsx)("div",{className:"flexCenter",style:{color:"#3D3E52",fontSize:"13.50px",fontWeight:"400"},children:(0,i.jsx)("span",{children:"I don't want free cancellation"})}),(0,i.jsx)("label",{className:s().radioButton,children:(0,i.jsx)("span",{className:"".concat(!1===t&&s().checked)})})]})]}),null!==t&&(0,i.jsx)(g,{sucess:t}),!r&&(0,i.jsx)("div",{style:{color:"#033562",fontSize:"14px",fontWeight:"700",margin:"0px 19.42px 15.73px 11.64px"},onClick:function(){return x(!_)},children:" Read cancellation policy "}),_&&(0,i.jsxs)(p.pT,{onClose:function(){x(!1)},children:[" ",(0,i.jsx)(f.Z,{setShowTC:x})]})]})}function g(e){var t=e.sucess;return 1==(void 0===t||t)?(0,i.jsxs)("div",{className:"".concat(s().message," flexRow"),children:[(0,i.jsx)("span",{children:(0,i.jsx)(o(),{width:45,height:45,src:"https://images.railyatri.in/ry_images_prod/Group-110871-1715033778.png"})}),(0,i.jsx)("span",{style:{fontSize:"11.50px",fontWeight:"700",color:"#1D1D1D"},children:" Great choice! No IRCTC cancellation charges if you cancel before chart preparation . "})]}):(0,i.jsxs)("div",{className:"".concat(s().message," ").concat(s().error," flexRow"),style:{backgroundColor:"#FFEFF1 !important"},children:[(0,i.jsx)("span",{children:(0,i.jsx)(o(),{width:45,height:45,src:"https://images.railyatri.in/ry_images_prod/Group-110873-1715034787.png"})}),(0,i.jsx)("span",{style:{fontSize:"13.5px",fontWeight:"700",color:"#1D1D1D"},children:" You will have to pay cancellation charges as per IRCTC policy on ticket cancellation."})]})}}
1,7759:function(e,t,n){"use strict";n.r(t);var i=n(85893),r=n(67294),o=n(61730),a=n(65582),s=n(5616),l=n(42293),c=n(10155),d=n(15861),u=n(93946),f=n(54151),p=n(11163);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m.apply(this,arguments)}var v=function(){var e=(0,p.useRouter)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{sx:{backgroundColor:"#01478C",color:"#ffffff",boxShadow:"unset",zIndex:222},children:(0,i.jsx)(c.Z,{variant:"dense",sx:{mb:.5,display:"flex",justifyContent:"space-between"},children:(0,i.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)(u.Z,{edge:"start",color:"inherit","aria-label":"menu",onClick:function(){return e.back()},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/back-arrow-1574063281.png",style:{width:"20px"}})}),(0,i.jsx)("img",{src:"https://images.railyatri.in/assets/mobile_view/icons/icon-ry.png",style:{width:"40px"}}),(0,i.jsx)(d.Z,{color:"inherit",component:"p",sx:{fontSize:"18px",color:"#ffffff",fontWeight:400,ml:1},children:"Contact Us"})]})})}),(0,i.jsx)(c.Z,{})]})};t.default=function(e){var t=m({},e),n=t.children,l=t.activemenu,c=t.canshowlogincta,d=(0,o.Z)("(max-width:600px)");return(0,i.jsxs)(r.Fragment,{children:[d?(0,i.jsx)(v,{}):(0,i.jsx)(f.ds,{activemenu:l,canshowlogincta:c}),(0,i.jsx)(a.Z,{maxWidth:"lg",sx:{padding:"0px !important",position:"relative",zIndex:1},children:n}),(0,i.jsx)(s.Z,{sx:{background:"#ffffff"},children:!d&&(0,i.jsx)(f.F3,{})})]})}},30015:function(e,t,n){"use strict";n.d(t,{w:function(){return h}});var i=n(85893),r=n(67294),o=n(99685),a=n(5623),s=n(5616),l=n(15861),c=n(50135),d=n(20247),u=n(69417),f=n(73763),p=n.n(f);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v.apply(this,arguments)}function h(e){var t=v({},e).formik,n=(0,r.useState)([]),f=n[0],h=n[1],_=(0,a.Z)((function(e){(0,o.tW)(e).then((function(e){return h(e)}))}),500).Debouncesetter,x=function(e){var t=e.target.value;_(t)};return(0,i.jsx)("form",{onSubmit:t.handleSubmit,style:{float:"left",width:"100%"},children:(0,i.jsxs)(s.Z,{sx:m({width:"100%",background:"#ffffff",borderRadius:"6px",mt:1,mb:1,p:1,pl:1.5},"pl",1.5),children:[(0,i.jsx)(l.Z,{component:"p",sx:{color:"#000000",fontSize:"14px",fontWeight:600},children:"LIVE ARRIVAL/DEPARTURE"}),(0,i.jsxs)(s.Z,{sx:{width:"100%",background:"#ffffff",display:"flex",alignItems:"center",mt:1},children:[(0,i.jsx)(s.Z,{sx:{flexGrow:1},children:(0,i.jsx)(d.Z,{disablePortal:!0,freeSolo:!0,id:"stationName",value:t.values.stationName,options:f.map((function(e){return"".concat(e.station_name," | ").concat(e.station_code)})),onChange:function(e,n){t.setFieldValue("stationName",n)},onBlur:t.handleBlur,sx:{width:"100%",background:"#f1f1f1",p:0},renderInput:function(e){return(0,i.jsx)(c.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){m(e,t,n[t])}))}return e}({fullWidth:!0,onChange:x,autoComplete:"off",id:"stationName",name:"stationName",label:"Station Name/Code"},e,{error:t.touched.stationName&&Boolean(t.errors.stationName),InputLabelProps:{sx:{color:t.touched.stationName&&t.errors.stationName?"#ff0000":"#212121",top:-7,"&.Mui-focused":{top:2},"&.MuiFormLabel-filled":{top:2}}},sx:{"& .MuiOutlinedInput-root":{p:"0px"}}}))}})}),(0,i.jsx)(u.Z,{type:"submit",variant:"contained",size:"large",sx:{borderRadius:"4px",background:"#01478C",ml:1,p:1,pl:0,pr:0,fontSize:"12px",minWidth:"80px",fontWeight:600},"aria-label":"Search",children:"Search"})]}),(0,i.jsxs)("div",{className:"".concat(p().text_center," ").concat(p().marg_top_30),children:[(0,i.jsx)("div",{className:p().dlts_cards_block,children:(0,i.jsx)("a",{style:{position:"relative",backgroundImage:"url(https://images.railyatri.in/assets/mobile_view/lts/food-card-74e60840c093846fc6f769c9607b39c36f7614b682d8aa8324238ef135800b11.png)",backgroundRepeat:"no-repeat",backgroundPosition:"center",display:"block",height:"130px",maxWidth:"300px",margin:"0 auto"},href:"/buy-food-in-train/12953-mumbai-central-hazrat-nizamuddin-august-kranti-rajdhani-exp",children:(0,i.jsxs)("div",{className:"".concat(p().dlts_cards_content," ").concat(p().lts_cards_food),style:{position:"absolute !important",left:"132px !important"},children:[(0,i.jsxs)("p",{children:["Get guaranteed",(0,i.jsx)("br",{}),"fresh meals",(0,i.jsx)("br",{}),"at your seat!"]}),(0,i.jsx)("h5",{className:p().marg_top_10,children:"Order Food"})]})})}),(0,i.jsx)("div",{className:p().dlts_cards_block,children:(0,i.jsx)("a",{href:"/seat-availability/12953",style:{position:"relative",backgroundImage:"url(https://images.railyatri.in/assets/mobile_view/lts/train-ticket-card-67ebd8435c050acb778642c4782acb5d257e63b1d8d42dd32b59d49b15def14a.png)",backgroundRepeat:"no-repeat",backgroundPosition:"center",display:"block",height:"130px",maxWidth:"300px",margin:"0 auto"},children:(0,i.jsxs)("div",{className:"".concat(p().dlts_cards_content," ").concat(p().lts_cards_train),style:{position:"absolute !important",left:"127px !important",top:"14px"},children:[(0,i.jsxs)("p",{children:["Seat Availability",(0,i.jsx)("br",{}),"for",(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"".concat(p().cust_overflow),title:"Aug Kr Raj Express (12953)",children:"Aug Kr Raj Express (12953)"})]}),(0,i.jsx)("h5",{className:p().marg_top_10,children:"Check Now"})]})})})]})]})})}},9062:function(e,t,n){"use strict";n.d(t,{LJ:function(){return h},Yt:function(){return v},_1:function(){return m},uc:function(){return _}});var i=n(85893),r=n(67294),o=n(73763),a=n.n(o),s=n(1531),l=n(76192),c=n(5616),d=n(15861),u=n(86886);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f.apply(this,arguments)}var p=function(e){if((e=parseInt(e))>60){var t=Math.floor(e/60),n=e%60;if(t>23){Math.floor(t/24);return"".concat(t%=24,":").concat(n<10?"0"+n:n)}return"".concat(t,":").concat(n<10?"0"+n:n)}return 0===e?"Start":"00:".concat(e<10?"0"+e:e)};function m(e){var t=f({},e),n=(0,l.Z)(),r=null===t||void 0===t?void 0:t.routeInfo,o=null===t||void 0===t?void 0:t.train_number,m=null===t||void 0===t?void 0:t.train_name,v="".concat((0,s.PR)(m)&&"".concat(o,"-").concat(n("--","-",n("--","-",n(" ","-",m))).toLocaleLowerCase())),h=0;return(0,i.jsx)(c.Z,{className:"".concat(a().white_timeline_bg),children:(0,s.PR)(r)&&r.length>0&&(null===r||void 0===r?void 0:r.map((function(e){var t;return(0,i.jsxs)(c.Z,{className:"".concat(a().timeline_listing),children:[(0,i.jsx)(c.Z,{className:"".concat(a().text_center," ").concat(a().day_count),sx:{mr:2},children:(0,i.jsxs)(c.Z,{className:"".concat(a().white_txt," ").concat(a().font_w500),children:["Day ",null===e||void 0===e?void 0:e.runningday]})}),null===e||void 0===e||null===(t=e.routesummary)||void 0===t?void 0:t.map((function(e){var t,n;return h++,(0,i.jsxs)(c.Z,{sx:{pt:1},children:[(0,i.jsxs)(u.ZP,{container:!0,children:[(0,i.jsxs)(u.ZP,{item:!0,xs:2,className:"".concat(a().text_right),children:[(0,i.jsx)(d.Z,{className:"".concat(a().grey_4a," ").concat(a().font_w500),children:null===e||void 0===e?void 0:e.station_code}),(0,i.jsx)(d.Z,{className:"".concat(a().fs11," ").concat(a().l_grey," ").concat(a().marg_bot_2),children:0===(null===e||void 0===e?void 0:e.sta_min)?(0,i.jsx)("span",{children:"START"}):(0,i.jsx)("span",{children:p(null===e||void 0===e?void 0:e.sta_min)})})]}),(0,i.jsx)(u.ZP,{item:!0,xs:2,children:(0,i.jsx)("div",{className:"".concat(a().timeline_circle," ").concat(a().no_border_clr," ").concat(a().blue_bg)})}),(0,i.jsxs)(u.ZP,{item:!0,xs:8,children:[(0,i.jsxs)("div",{className:"".concat(a().grey_4a," ").concat(a().font_w500),children:[null===e||void 0===e||null===(t=e.station_name)||void 0===t?void 0:t.toLowerCase(),(null===e||void 0===e?void 0:e.platform_number)>0&&(0,i.jsxs)("sup",{children:["\xa0",h]})]}),(0,i.jsxs)(c.Z,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsxs)(c.Z,{children:[(0,i.jsxs)("div",{className:"".concat(a().upcoming_stn_info," ").concat(a().marg_bot_2),children:[(0,i.jsxs)("span",{className:"".concat(a().font_xxs," ").concat(a().l_grey),children:[null===e||void 0===e?void 0:e.distance_from_source," Kms"]})," ",(null===e||void 0===e?void 0:e.platform_number)>0&&(0,i.jsx)("span",{className:"stn-pipe ".concat(a().l_grey),children:"|"})," ",(null===e||void 0===e?void 0:e.platform_number)>0&&(0,i.jsxs)("span",{className:"".concat(a().blue_txt_op," ").concat(a().font_xxs),children:["PF #",(null===e||void 0===e?void 0:e.platform_number)>0?null===e||void 0===e?void 0:e.platform_number:"Add"]})]}),(null===e||void 0===e||null===(n=e.addition_info)||void 0===n?void 0:n.food_available)&&(0,i.jsx)("div",{className:"".concat(a().upcoming_stn_prod),children:(0,i.jsx)("div",{className:"".concat(a().upcoming_stn_upsell),children:(0,i.jsx)("button",{children:(0,i.jsxs)("a",{href:"/m/link-food-in-train?station_code=".concat(null===e||void 0===e?void 0:e.station_code,"&train=").concat(v),children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/assets/mobile_view/lts/food-dd3ff305a3a25f6e598781e63a509844b92025c65e31d5db12193014e9f646b7.png",alt:"Food"}),(0,i.jsx)("span",{className:"".concat(a().l_grey),children:"Order Food"})]})})})})]}),(0,i.jsx)(c.Z,{sx:{mr:2.5},children:(0,i.jsxs)(d.Z,{component:"div",sx:{fontSize:"11px",color:"#757575"},className:"".concat(a().l_grey," dly-time"),children:[" ",0===(null===e||void 0===e?void 0:e.sta_min)?(0,i.jsx)("span",{children:p(null===e||void 0===e?void 0:e.std_min)}):(0,i.jsx)(i.Fragment,{children:(null===e||void 0===e?void 0:e.std_min)>0?(0,i.jsx)("span",{children:p(null===e||void 0===e?void 0:e.std_min)}):(0,i.jsx)("span",{children:"END"})})," "]})})]})]})]}),(0,i.jsxs)(u.ZP,{container:!0,children:[(0,i.jsx)(u.ZP,{item:!0,xs:3}
1),(0,i.jsxs)(u.ZP,{item:!0,xs:9,sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsx)(c.Z,{}),(0,i.jsx)(c.Z,{sx:{width:"95%",display:"flex",justifyContent:"end",pt:1,borderBottom:"1px solid #e5e5e5"}})]})]})]},null===e||void 0===e?void 0:e.station_code)}))]},null===e||void 0===e?void 0:e.runningday)})))})}var v=function(){return(0,r.useEffect)((function(){var e=function(){window.googletag=window.googletag||{cmd:[]},googletag.cmd.push((function(){googletag.defineSlot("/12756069/web_timetable_search",["fluid",[300,250]],"div-gpt-ad-1496144450417-0").addService(googletag.pubads()),googletag.pubads().enableSingleRequest(),googletag.pubads().collapseEmptyDivs(),googletag.enableServices(),googletag.display("div-gpt-ad-1496144450417-0")}))};if(window.googletag)e();else{var t=document.createElement("script");t.async=!0,t.defer=!0,t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",t.onload=e,document.head.appendChild(t)}}),[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{id:"div-gpt-ad-1496144450417-0",style:{minWidth:"300px"}})})},h=function(){return(0,r.useEffect)((function(){var e=function(){window.googletag=window.googletag||{cmd:[]},googletag.cmd.push((function(){googletag.defineSlot("/12756069/web_small_tt_result",["fluid",[320,50]],"div-gpt-ad-1506506370640-0").addService(googletag.pubads()),googletag.pubads().enableSingleRequest(),googletag.pubads().collapseEmptyDivs(),googletag.enableServices(),googletag.display("div-gpt-ad-1506506370640-0")}))};if(window.googletag)e();else{var t=document.createElement("script");t.async=!0,t.defer=!0,t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",t.onload=e,document.head.appendChild(t)}}),[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{id:"div-gpt-ad-1506506370640-0",style:{width:"100%",height:"50px"}})})},_=function(){return(0,r.useEffect)((function(){var e=function(){window.googletag=window.googletag||{cmd:[]},googletag.cmd.push((function(){googletag.defineSlot("/12756069/web_timetable_details",["fluid",[300,250]],"div-gpt-ad-1500029597459-0").addService(googletag.pubads()),googletag.pubads().enableSingleRequest(),googletag.pubads().collapseEmptyDivs(),googletag.enableServices(),googletag.display("div-gpt-ad-1500029597459-0")}))};if(window.googletag)e();else{var t=document.createElement("script");t.async=!0,t.defer=!0,t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",t.onload=e,document.head.appendChild(t)}}),[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{id:"div-gpt-ad-1500029597459-0",style:{minWidth:"300px"}})})}},11661:function(e,t,n){"use strict";var i=n(85893),r=n(67294),o=n(5616),a=n(15861),s=n(93946),l=(n(41548),n(73873),n(46066)),c=n(1531),d=n(26461),u=n(11163);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){f(e,t,n[t])}))}return e}function m(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function v(e){var t=e.startDate,n=e.defaultSelectedDate,f=void 0===n?new Date:n,v=e.maxDayShow,h=void 0===v?60:v,_=e.routeInfoRef,x=(e.dataFilter,e.setSelectedDate),g=e.headerDateStripSelection,b=(0,r.useState)([]),y=b[0],j=b[1],w=((0,r.useRef)({scrollLeft:null,containerWidth:null}),(0,u.useRouter)());(0,r.useMemo)((function(){j(function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=[],r=0;r<=n;r++){var o=(0,c.Mv)(e,r),a={day:(0,d.JP)(d.hn)[o.getDay()],month:(0,d.JP)(d.zC)[o.getMonth()],date:o.getDate(),fulldate:o};i.push({id:r,day:a,status:o.toDateString()==t.toDateString()})}return i}(t,f,h))}),[t]),g.current=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;x(t),i.current.date=t,(0,c.h8)({router:w,from:i.current.from.code,to:i.current.to.code,date:t}),j(n?y.map((function(t){return t.id==e?t.status=!0:t.status=!1,t})):y.map((function(e){return e.day.fulldate.toDateString()==t.toDateString()?e.status=!0:e.status=!1,e})))};var S=function(e){e.currentSlide,e.slideCount;var t=m(e,["currentSlide","slideCount"]),n=(t.className,t.onClick);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.Z,p({sx:{background:"#D1E5FF",border:"1px solid #01478C",height:"60px",width:"5%",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"5px 0 0 5px",flexGrow:1,position:"absolute",left:"-43px",top:"0","&:hover":{background:"#D1E5FF",color:"#fff"}}},t,{className:"custom-prevArrow",onClick:n,children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/datebefore-1709796704.png",alt:"before icon"})}))})},k=function(e){e.currentSlide,e.slideCount;var t=m(e,["currentSlide","slideCount"]),n=(t.className,t.onClick);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.Z,p({sx:{background:"#D1E5FF",border:"1px solid #01478C",height:"60px",width:"5%",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"0 5px 5px 0",flexGrow:1,position:"absolute",right:"-34px",top:"0","&:hover":{background:"#D1E5FF",color:"#fff"}}},t,{className:"custom-nextArrow",onClick:n,children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/dateafter-1709796846.png",alt:"after icon"})}))})},C=y.findIndex((function(e){return e.status})),N=-3;C<3&&(N=Math.max(0,C-1)),C>=3&&(N=C-3),C>=60&&C<=63&&(N=C-(C-60+3));var Z={dots:!1,infinite:!1,speed:300,slidesToShow:7,initialSlide:N,nextArrow:(0,i.jsx)(k,{}),prevArrow:(0,i.jsx)(S,{})};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(o.Z,{id:"dateStripContainer",sx:{width:"90%",margin:"auto"},children:(0,i.jsx)(l.Z,p({},Z,{children:y.map((function(e){var t=e.day,n=e.status,r=e.id,l=(0,i.jsx)("div",{children:(0,i.jsxs)(o.Z,{id:"date_strip_".concat(t.day).concat(t.date).concat(t.month),sx:{minWidth:"100px",height:"60px",display:"flex",justifyContent:"center",alignItems:"center",borderWidth:"1px 1px 1px 1px",borderStyle:"solid",borderColor:"#C2C2C2",background:n?"#01478C":"#ffffff",position:"relative"},children:[(0,i.jsx)(s.Z,{sx:{borderRadius:"5px"},onClick:function(){return g.current(r,t.fulldate,!0,_)}
1,children:(0,i.jsx)(a.Z,{component:"div",sx:{color:n?"#ffffff":"#141823",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",position:"relative"},children:(0,i.jsxs)("span",{children:[t.day,", ",t.date," ",t.month]})})}),(0,c.ri)(new Date,new Date(t.fulldate))<2&&(0,i.jsx)("span",{style:{background:n?"#ffffff":"#E5F9EF",color:n?"#01478C":"#087B21",position:"absolute",bottom:0,fontSize:"12px",paddingLeft:"5px",paddingRight:"5px",borderRadius:"4px 4px 0px 0px"},children:"Tatkal open"})]})},"date_strip_".concat(r));return t.month,l}))}))})})}t.Z=function(e){var t=e.filterStringApply,n=e.dataFilter,o=e.routeInfoRef,a=e.headerDateStripSelection,s=e.booking_window,l=void 0===s?60:s,d=e.setLoader,u=(0,r.useState)(new Date(o.current.date)),f=u[0],p=u[1],m=new Date,h=new Date(f);return h.setDate(h.getDate()-7),(0,c.zT)(f,30),(0,i.jsx)(v,{startDate:m,maxDayShow:l,defaultSelectedDate:f,filterStringApply:t,dataFilter:n,setSelectedDate:function(e){p(e),d(!0)},headerDateStripSelection:a,routeInfoRef:o})}},30747:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(85893),r=n(67294),o=n(5616),a=n(15861),s=n(69417),l=n(35294),c=n(23599);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},u.apply(this,arguments)}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){d(e,t,n[t])}))}return e}function p(e){e.routeInfoRef;var t=e.filterStringApply,n=e.dataFilter,d=(0,r.useState)(null),p=d[0],m=d[1],v=Boolean(p),h=function(){m(null)},_=(0,r.useState)("Recommended"),x=_[0],g=_[1],b=(0,r.useState)([{id:1,name:"Duration",key:"Duration_shortest_to_longest",fadedText:"Shortest to Longest",status:!1},{id:2,name:"Departure",key:"Departure",fadedText:"Earliest to Late",status:!1},{id:3,name:"Departure",key:"Departure_late_to_earliest",fadedText:"Late to Earliest",status:!1},{id:4,name:"Arrival",key:"Arrival",fadedText:"Earliest to Late",status:!1},{id:5,name:"Arrival",key:"Arrival_late_to_earliest",fadedText:"Late to Earliest",status:!1}]),y=b[0],j=b[1];return(0,i.jsxs)(o.Z,{sx:{display:"flex",width:"100%"},children:[(0,i.jsxs)(s.Z,{id:"basic-button","aria-controls":v?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":v?"true":void 0,onClick:function(e){m(e.currentTarget)},sx:{display:"flex",justifyContent:"space-between",textTransform:"capitalize",fontSize:"16px",background:"#ffffff",ml:1,borderRadius:"8px","&:hover":{background:"#ffffff"}},fullWidth:!0,children:[(0,i.jsx)("span",{style:{paddingLeft:"10px",color:"#2276E3",fontWeight:"700"},children:x}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/recomendedicon-1709906833.png",alt:"Recommended Icon",width:"12px",style:{marginRight:"10px"}})]}),(0,i.jsx)(l.Z,{id:"basic-menu",anchorEl:p,open:v,onClose:h,MenuListProps:{"aria-labelledby":"basic-button"},sx:{"& .MuiPaper-root":{width:"235px",mt:1,borderRadius:"10px",boxShadow:"0px 5px 20px 0px #0000001A"}},children:y.map((function(e){return(0,i.jsxs)(c.Z,{onClick:function(){y.forEach((function(e){var n;t.current=null===t||void 0===t||null===(n=t.current)||void 0===n?void 0:n.replace("-SortBy(".concat(e.value,")"),"")})),function(e){var t=u({},e);g(null===t||void 0===t?void 0:t.name);var n=y.map((function(e){return e.key===t.key?f({},e,{status:!0}):f({},e,{status:!1})}));j(n)}(f({},e)),t.current+="-SortBy(".concat(e.key,")"),n.current({filter:t.current}),h()},children:[(0,i.jsx)(a.Z,{component:"div",sx:{color:"#141823",mr:1,fontWeight:700,fontSize:"15px"},children:e.name}),(0,i.jsx)(a.Z,{component:"div",sx:{color:"#888888",fontSize:"15px"},children:e.fadedText})]},"sortedby_".concat(e.name))}))})]})}},754:function(e,t,n){"use strict";n.d(t,{R2:function(){return p},aN:function(){return m}});var i=n(85893),r=n(90629),o=n(88078),a=n(5616),s=n(15861),l=n(65582);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var t=e.showSeatBorder,n=void 0===t||t,s=function(){return(0,i.jsx)(r.Z,{sx:{minWidth:"170px",boxShadow:"0 2px 2px 0 rgb(0 0 0 / 10%)",border:"1px solid #c9c9c999",borderRadius:"4px",marginRight:"10px",position:"relative",height:"135px",pt:0},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:135})})},l=function(){return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:15,sx:{mr:1,mb:.2,borderRadius:"5px 5px 0 0"}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:108,height:28,sx:{mr:1,mb:.5,borderRadius:"5px 5px 0 0"}})]})})};return(0,i.jsxs)(r.Z,{elevation:n?3:0,sx:{p:1,mb:1.5,border:n?"1px solid #417CD6":""},children:[(0,i.jsx)(a.Z,{sx:{display:"flex"},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:300,height:20,sx:{mb:1}})}),(0,i.jsx)(a.Z,{sx:{display:"flex"},children:u(Array(4)).map((function(e,t){return(0,i.jsx)(l,{},t)}))}),(0,i.jsx)(a.Z,{sx:{display:"flex",background:"#ffffff",justifyContent:"space-between"},children:u(Array(4)).map((function(e,t){return(0,i.jsx)(s,{},t)}))})]})}function p(){var e=function(){return(0,i.jsx)(i.Fragment,{children:u(Array(7)).map((function(e,t){return(0,i.jsx)(o.Z,{variant:"rectangular",width:15,height:15,sx:{mr:.5,mb:.2,borderRadius:"50%"}},t)}))})},t=function(){return(0,i.jsx)(i.Fragment,{children:u(Array(4)).map((function(t,n){var l;return(0,i.jsxs)(r.Z,{sx:(l={p:0},d(l,"p",0),d(l,"mb",1.5),d(l,"borderRadius","10px"),d(l,"boxShadow","0px 5px 20px 0px #0000001A"),l),children:[(0,i.jsxs)(a.Z,{sx:{pt:1.5,pl:2,pr:2},children:[(0,i.jsxs)(a.Z,{sx:{p:0,display:"flex",justifyContent:"space-between",color:"#333333"},children:[(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:70,height:15,sx:{mr:1,mb:.2}}
1),(0,i.jsx)(o.Z,{variant:"rectangular",width:120,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:15,sx:{mr:1,mb:.2}})]}),(0,i.jsxs)(a.Z,{sx:{display:"flex"},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(e,{})]})]}),(0,i.jsx)(a.Z,{sx:{padding:"0px 0 5px 0px",display:"flex",justifyContent:"space-between",color:"#333333"},children:(0,i.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[(0,i.jsxs)(a.Z,{sx:{width:"30%",display:"flex"},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:50,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",mt:1}})]}),(0,i.jsxs)(a.Z,{sx:{width:"40%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("span",{style:{width:"8px",height:"8px",border:"1.5px solid #D9D9D9",borderRadius:"50%",background:"#fff"}}),(0,i.jsx)("span",{style:{minWidth:"75px",height:"5px",borderTop:"2px solid #D9D9D9"}})]}),(0,i.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",minWidth:"120px"},children:(0,i.jsxs)(s.Z,{component:"div",sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)("span",{style:{marginLeft:"2px",fontWeight:"700",fontSize:"15px"},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:15,sx:{mr:1,mb:.2}})}),(0,i.jsx)("span",{style:{marginLeft:"2px",fontWeight:"700",fontSize:"12px"},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:15,sx:{mr:1,mb:.2}})})]})}),(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("span",{style:{minWidth:"75px",height:"5px",borderTop:"2px solid #D9D9D9"}}),(0,i.jsx)("span",{style:{width:"8px",height:"8px",border:"1.5px solid #D9D9D9",borderRadius:"50%",background:"#fff"}})]})]}),(0,i.jsx)(a.Z,{sx:{width:"30%",display:"flex",flexDirection:"column",textAlign:"right"},children:(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"end",mt:1},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:50,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:15,sx:{mr:1,mb:.2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:15,sx:{mr:1,mb:.2}})]})})]})})]}),(0,i.jsx)(f,{showSeatBorder:!1}),(0,i.jsx)(a.Z,{sx:{display:"flex",justifyContent:"end",mt:1,pb:1},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:200,height:15,sx:{mr:1,mb:.2}})})]},n)}))})};return(0,i.jsx)(t,{})}function m(){return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(a.Z,{sx:{},children:[(0,i.jsx)(a.Z,{sx:{background:"#ffffff"},children:(0,i.jsx)(l.Z,{children:(0,i.jsxs)(a.Z,{sx:{m:"auto",display:"flex",alignItems:"center",mb:1,pb:1,pt:1},children:[(0,i.jsx)(a.Z,{sx:{width:"30%"},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:150,height:40,sx:{mr:1,mb:.2}})}),(0,i.jsxs)(a.Z,{sx:{display:"flex",flexGrow:1},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:120,height:20,sx:{mr:2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:120,height:20,sx:{mr:2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:120,height:20,sx:{mr:2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:20,sx:{mr:2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:80,height:20})]})]})})}),(0,i.jsx)(l.Z,{children:(0,i.jsxs)(a.Z,{sx:{m:"auto",display:"flex",alignItems:"center",mb:1,pb:1,pt:1,background:"#ffffff",borderRadius:"10px",boxShadow:"0px 5px 20px 0px #0000001A"},children:[(0,i.jsx)(a.Z,{sx:{width:"30%",display:"flex",justifyContent:"center",ml:1},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:40,sx:{borderRadius:"10px"}})}),(0,i.jsx)(a.Z,{sx:{width:"60px",display:"flex",justifyContent:"center",ml:.5,mr:.5},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:40,sx:{borderRadius:"50%"}})}),(0,i.jsx)(a.Z,{sx:{width:"30%",display:"flex",justifyContent:"center",mr:1},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:40,sx:{borderRadius:"10px"}})}),(0,i.jsx)(a.Z,{sx:{width:"30%",display:"flex",justifyContent:"center"},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:40,sx:{borderRadius:"10px"}})}),(0,i.jsx)(a.Z,{sx:{width:"30%",display:"flex",justifyContent:"center",mr:1,ml:1},children:(0,i.jsx)(o.Z,{variant:"rectangular",width:"100%",height:40,sx:{borderRadius:"10px"}})})]})}),(0,i.jsx)(l.Z,{children:(0,i.jsxs)(a.Z,{sx:{display:"flex",m:"auto",mb:1,pb:1,pt:1},children:[(0,i.jsx)(a.Z,{sx:{display:"flex",width:"30%",borderRadius:"15p
1x",background:"#ffffff",boxShadow:"rgba(0, 0, 0, 0.1) 0px 5px 20px 0px",mr:1},children:(0,i.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:u(Array(4)).map((function(e,t){return(0,i.jsxs)(a.Z,{sx:{pb:2,pl:1,borderBottom:"1px solid rgb(240, 240, 240)"},children:[(0,i.jsxs)(a.Z,{sx:{display:"flex",mt:2,ml:1,mr:1},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:40,height:30,sx:{mr:2}}),(0,i.jsx)(o.Z,{variant:"rectangular",width:"70%",height:30})]}),u(Array(4)).map((function(e,t){return(0,i.jsxs)(a.Z,{sx:{display:"flex",mt:2,ml:1,mr:1},children:[(0,i.jsx)(o.Z,{variant:"rectangular",width:"70%",height:25}),(0,i.jsx)(o.Z,{variant:"rectangular",width:65,height:25,sx:{ml:1.5}})]},t)}))]},t)}))})}),(0,i.jsx)(a.Z,{sx:{flexGrow:1},children:(0,i.jsx)(p,{})})]})})]})})}t.ZP=f},40121:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return De}});var i=n(85893),r=n(67294),o=n(5616),a=n(15861),s=n(86886),l=n(1531),c=n(99685),d=n(52394),u=n(26461),f=n(11163),p=n(71673),m=n(11661),v=n(30747),h=n(34051),_=n.n(h),x=n(93946),g=n(90629),b=n(23795),y=n(69417),j=n(87004),w=n(88078),S=n(67814),k=n(59417),C=n(9473),N=n(12978),Z=n(35464),R=n(72895),T=n(80617);function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},D.apply(this,arguments)}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){P(e,t,n[t])}))}return e}var A=function(e){var t,n,s,c=e.data,d=e.cardClick,u=e.refresh,p=e.success,m=e.trainName,v=e.dataLoaded,h=void 0!==v&&v,_=e.fromStationName,b=e.toStationName,j=e.est_chart_time,R=e.train_date,P=e.dDay,D=e.routeInfoRef,A=(e.trainStartDate,e.train_src),O=e.train_dstn,F=e.train_name,M=e.duration,z=e.from_std,E=e.to_sta,W=e.isAlternateTrain,L=(0,C.I0)(),B=(0,C.v9)((function(e){return e.homepage})).isPassangerLoggedin,q=(0,f.useRouter)(),U=(0,l.cI)(q.asPath.split("?")[1]),Y=(0,r.useState)(!1),G=Y[0],H=(Y[1],(0,r.useState)(!0)),Q=H[0],V=(H[1],p&&c.seat_availibility[0].class_type),X=p&&(null===(t=c.seat_availibility[0][V])||void 0===t?void 0:t.split("/")[1]),J=(0,r.useState)(h),K=(J[0],J[1]);(0,l.PR)(X)&&(c.seat_availibility[0][V]=X);var $={};try{Object.assign($,(0,l.Yo)(c.seat_availibility[0][V].replace(/[^A-Za-z]/g,""))),Object.assign($,{SeatCount:c.seat_availibility[0][V].replace(/[^0-9]/g,"")})}catch(se){}var ee={};try{var te,ne;(0,l.PR)(null===c||void 0===c?void 0:c.cp_prob)&&Object.assign(ee,(0,l.Yo)(null===(ne=null===c||void 0===c||null===(te=c.cp_prob)||void 0===te?void 0:te.replace(/ /g,""))||void 0===ne?void 0:ne.replace(/[0-9]/g,"")))}catch(le){}var ie,re,oe=function(){var e,t;L((0,Z.qs)({isvisible:!0,issixdayscard:!1,routeInfoRef:JSON.parse(JSON.stringify(D)),miscquerydata:{train_date:R,est_chart_time:j,train_name:F,duration:M,from_std:z,to_sta:E},seatdata:I({},U,{v_code:null===(e=D.current)||void 0===e?void 0:e.vCode,train_number:null===c||void 0===c?void 0:c.train_number,journey_date:W?(0,T.xq)(R):(0,T.xq)(null===D||void 0===D||null===(t=D.current)||void 0===t?void 0:t.date),boarding_from:null===c||void 0===c?void 0:c.from,boarding_to:null===c||void 0===c?void 0:c.to,journey_class:null===c||void 0===c?void 0:c.booking_class,quota:null===c||void 0===c?void 0:c.quota,d_day:P,train_source:A,train_destination:O,utm:"alternate_confirmed_seat_options",device_type_id:D.current.device})}))},ae=function(){d(c,m,_,b,j)};return(0,i.jsx)(g.Z,{className:"Mui-seat__layout_box",children:p?(0,i.jsx)(i.Fragment,{children:G?(0,i.jsx)(w.Z,{variant:"rectangular",width:190,height:135}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.Z,{className:"Mui-price_class__wrapper",children:[(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__title",children:[c.booking_class," "]}),(0,l.PR)(null===(n=c.seat_availibility[0])||void 0===n?void 0:n.ticket_fare)&&0!=parseInt(c.seat_availibility[0].ticket_fare)&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__price",children:[(0,i.jsx)(S.G,{icon:k.sph}),parseInt(c.seat_availibility[0].ticket_fare)]}),"TQ"==c.quota&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-tatkal_quota__title",children:[" ","Tatkal"," "]})]}),(0,i.jsxs)(o.Z,{className:"Mui-availibility_info__box",children:[(0,i.jsxs)(a.Z,{component:"span",className:"Mui-availibility_and__seat_count_title",sx:{color:"".concat((0,l.PR)(null===ee||void 0===ee?void 0:ee.name)?ee.otherColor:null!==(ie=$.color)&&void 0!==ie?ie:"#4C4C4C")},children:[(0,l.PR)($.name)?(0,i.jsxs)("span",{children:[(0,l.PR)($.SeatCount)&&parseInt($.SeatCount)," ",$.name," "]}):(0,i.jsx)("span",{children:c.seat_availibility[0][V]}),(0,l.PR)(ee.name)&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-probability__title",sx:{color:"".concat((0,l.PR)(null===ee||void 0===ee?void 0:ee.name)?ee.color:null!==(re=$.color)&&void 0!==re?re:"#4C4C4C")},children:[" ",ee.name," "]})]}),(0,i.jsx)(x.Z,{sx:{borderRadius:"5px",p:0,height:"35px"},onClick:function(){!G&&(B?(K(!0),u(c.booking_class,c.quota)):L((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:function(){K(!0),u(c.booking_class,c.quota)}})))},children:(0,i.jsx)(a.Z,{component:"div",className:"Mui-availibility_refresh__box",children:c.seat_availibility[0].refresh&&(0,i.jsxs)("span",{className:"Mui-refresh__container",children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/refreshicon-1709890948.png",alt:"refresh icon",width:"18px"}),(0,i.jsx)("br",{}),"Refresh"]})})})]}),(0,i.jsx)(o.Z,{className:"Mui-book_now__container",children:(0,i.jsxs)(y.Z,{className:"Mui-book_now__cta",disabled:!(null===(s=null===c||void 0===c?void 0:c.seat_availibility[0])||void 0===s?void 0:s.book_now),onClick:function(){B?ae():L((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:ae}))},fullWidth:!0,children:[" ","Book Now"," "]})}),(null===c||void 0===c?void 0:c.alt_cnf_seat)&&(0,i.jsxs)(y.Z,{className:"Mui-confirm_seat__cta",onClick:function(){B?oe():L((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:oe}))},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/altconftick-1773933679.svg",alt:"alt confirm tick ".concat(null===c||void 0===c?void 0:c.train_number),width:"14.549px"}),(0,i.jsx)("span",{children:"Get Confirm Seat"}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/altcnfright-1773933664.svg",alt:"alt confirm arrow ".concat(null===c||void 0===c?void 0:c.train_number),height:"12px"})]})]})}):(0,i.jsx)(i.Fragment,{children:"boolean"==typeof Q?G?(0,i.jsx)(w.Z,{variant:"rectangular",width:190,height:140}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.Z,{className:"Mui-price_class__wrapper",children:[(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__title",children:[c.booking_class," "]}),"TQ"==c.quota&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-tatkal_quota__title",children:[" ","Tatkal"," "]})]}),(0,i.jsx)(o.Z,{className:"Mui-tap_to_refresh__container",children:(0,i.jsxs)(a.Z,{component:"div",className:"Mui-tap_to__refresh",children:[(0,i.jsx)("span",{style:{marginRight:"5px",textAlign:"center"},children:"Tap to refresh"}),(0,i.jsx)(x.Z,{onClick:function(){!G&&(B?"boolean"==typeof Q&&u(c.booking_class,c.quota):L((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:function(){u(c.booking_class,c.quota)}})))},sx:{m:0,p:0,width:"50px",borderRadius:"5px"},children:(0,i.jsxs)("span",{children:[" ",(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/refreshicon-1709890948.png",alt:"refresh icon",width:"18px"})," "]})})]})})]}):(0,i.jsxs)(a.Z,{component:"p",sx:{color:"#ff0000"},children:[" ",Q," "]})})})},O=function(e){var t,n,r=D({},e),s=r.avail_date,c=r.avail_day,d=r.ticket_name,u=r.percentage,p=r.show_book_button,m=r.ticket_link,v=r.cardClick,h=r.fare,_=r.catering_charge,x=r.train_name,b=r.fromStationName,j=r.toStationName,w=r.duration,R=r.from_std,T=r.to_sta,P=r.est_chart_time,A=r.alt_cnf_seat,O=r.alt_cnf_data,F=r.routeInfoRef,M=r.train_date,z=r.trainDetails,E=r.train_src,W=r.train_dstn,L=r.dDay,B=r.journey_date,q=(0,f.useRouter)(),U=(0,l.cI)(q.asPath.split("?")[1]),Y=d.split("/")[1];(0,l.PR)(Y)&&(d=Y);var G={};try{Object.assign(G,(0,l.Yo)(d.replace(/[^A-Za-z]/g,""))),Object.assign(G,{Seat
1Count:d.replace(/[^0-9]/g,"")})}catch(de){}var H={};try{(0,l.PR)(u)&&Object.assign(H,(0,l.Yo)(u.replace(/[^A-Za-z]/g,"")))}catch(ue){}var Q=(0,C.I0)(),V=(0,C.v9)((function(e){return e.homepage})).isPassangerLoggedin,X="",J={};if((0,l.PR)(null===O||void 0===O?void 0:O.alt_seat_status)){var K,$=null===O||void 0===O?void 0:O.alt_seat_status;X=null===O||void 0===O||null===(K=O.alt_seat_status)||void 0===K?void 0:K.split("/")[1],(0,l.PR)(X)&&($=X);try{Object.assign(J,(0,l.Yo)($.replace(/[^A-Za-z]/g,""))),Object.assign(J,{seat_count:$.replace(/[^0-9]/g,"")})}catch(de){}}var ee={};try{var te;(0,l.PR)(null===O||void 0===O?void 0:O.alt_cp_perc)&&Object.assign(ee,(0,l.Yo)(null===O||void 0===O||null===(te=O.alt_cp_perc)||void 0===te?void 0:te.replace(/[^A-Za-z]/g,"")))}catch(fe){}var ne,ie,re,oe,ae,se,le=function(){var e;Q((0,Z.qs)({isvisible:!0,issixdayscard:!0,routeInfoRef:JSON.parse(JSON.stringify(F)),miscquerydata:{train_date:M,est_chart_time:P,train_name:x,duration:w,from_std:R,to_sta:T},seatdata:I({},U,{v_code:null===(e=F.current)||void 0===e?void 0:e.vCode,train_number:null===z||void 0===z?void 0:z.train_number,journey_date:B,boarding_from:null===z||void 0===z?void 0:z.from,boarding_to:null===z||void 0===z?void 0:z.to,journey_class:null===z||void 0===z?void 0:z.booking_class,quota:null===z||void 0===z?void 0:z.quota,d_day:L,train_source:E,train_destination:W,utm:"alternate_confirmed_seat_options",device_type_id:F.current.device})}))},ce=function(){v(p,m,d,_,x,b,j,w,R,T,P,u)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Z,{className:"Mui-seat__layout_box",elevation:0,children:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)(o.Z,{className:"Mui-price_class__wrapper",children:(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__title",children:[s,", ",c]})}),(0,i.jsxs)(o.Z,{className:"Mui-availibility_info__box",children:[(0,i.jsxs)(a.Z,{component:"span",sx:{color:"".concat((0,l.PR)(null===H||void 0===H?void 0:H.name)?H.otherColor:null!==(ne=G.color)&&void 0!==ne?ne:"#4C4C4C")},className:"Mui-availibility_and__seat_count_title",children:[(0,l.PR)(G.name)?(0,i.jsxs)("span",{children:[(0,l.PR)(G.SeatCount)&&parseInt(G.SeatCount)," ",G.name]}):(0,i.jsx)("span",{children:null!==(ie=null===G||void 0===G||null===(t=G.name)||void 0===t?void 0:t.toLowerCase())&&void 0!==ie?ie:d}),(0,l.PR)(u)&&(0,i.jsx)(a.Z,{component:"div",className:"Mui-probability__title",sx:{color:"".concat((0,l.PR)(null===H||void 0===H?void 0:H.name)?H.color:null!==(re=G.color)&&void 0!==re?re:"#4C4C4C")},children:u.replace(/[/(/)]/g," ")})]}),p&&(0,l.PR)(h)&&0!=parseInt(h)&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__price",children:[(0,i.jsx)(S.G,{icon:k.sph}),parseInt(h)]})]}),(0,i.jsx)(o.Z,{className:"Mui-book_now__container",children:(0,i.jsx)(y.Z,{className:"Mui-book_now__cta",disabled:!p,onClick:function(){V?ce():Q((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:ce}))},fullWidth:!0,children:"Book Now"})})]})})})}),A&&(0,i.jsx)(g.Z,{className:"Mui-seat__layout_box Mui-alt_cnf_seat__layout_box",elevation:0,children:(0,i.jsxs)(o.Z,{children:[(0,i.jsxs)(a.Z,{component:"div",className:"Mui-alt_conf__availability__tag",children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/altconftick-1773933679.svg",alt:"alt confirm tick ".concat(x),width:"14.549px"}),"Confirm Seat"]}),(0,i.jsx)(o.Z,{className:"Mui-price_class__wrapper",children:(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__title",children:[s,", ",c]})}),(0,i.jsxs)(o.Z,{className:"Mui-availibility_info__box",children:[(0,i.jsxs)(a.Z,{component:"span",sx:{color:"".concat((0,l.PR)(null===ee||void 0===ee?void 0:ee.name)?ee.otherColor:null!==(oe=null===J||void 0===J?void 0:J.color)&&void 0!==oe?oe:"#4C4C4C")},className:"Mui-availibility_and__seat_count_title",children:[(0,l.PR)(null===J||void 0===J?void 0:J.name)?(0,i.jsxs)("span",{style:{textTransform:"capitalize"},children:[(0,l.PR)(J.seat_count)&&parseInt(J.seat_count)," ",null===J||void 0===J?void 0:J.name]}):(0,i.jsx)("span",{children:null!==(ae=null===J||void 0===J?void 0:J.name)&&void 0!==ae?ae:""}),(0,l.PR)(null===O||void 0===O?void 0:O.alt_cp_perc)&&(0,i.jsx)(a.Z,{component:"div",className:"Mui-probability__title",sx:{color:"".concat((0,l.PR)(null===ee||void 0===ee?void 0:ee.name)?ee.color:null!==(se=J.color)&&void 0!==se?se:"#4C4C4C")},children:null===O||void 0===O||null===(n=O.alt_cp_perc)||void 0===n?void 0:n.replace(/[/(/)]/g," ")})]}),(0,l.PR)(null===O||void 0===O?void 0:O.alt_seat_fare)&&0!=parseInt(null===O||void 0===O?void 0:O.alt_seat_fare)&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__price",children:[(0,i.jsx)(S.G,{icon:k.sph}),parseInt(null===O||void 0===O?void 0:O.alt_seat_fare)]})]}),(0,i.jsx)(o.Z,{className:"Mui-book_now__container",children:(0,i.jsx)(y.Z,{className:"Mui-book_now__cta",onClick:function(){V?le():Q((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:le}))},fullWidth:!0,children:"Book Now"})})]})})]})},F=function(e){var t=D({},e),n=t.availablityStatus,r=t.SeatCount,s=t.booking_class,d=t.color,u=(t.otherColor,t.name),f=t.ticketFare,p=t.ticket_link,m=t.totalFare,v=(t.train_number,t.router),h=t.route_data,_=t.routeInfoRef,x=(0,C.I0)(),b=(0,C.v9)((function(e){return e.homepage})).isPassangerLoggedin;return(0,i.jsxs)(g.Z,{className:"Mui-seat__layout_box",children:[(0,i.jsx)(o.Z,{className:"Mui-price_class__wrapper",children:(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__title",children:[s," "]})}),(0,i.jsxs)(o.Z,{className:"Mui-availibility_info__box",children:[(0,i.jsx)(a.Z,{component:"span",sx:{color:"".concat((0,l.PR)(u)||null!==d&&void 0!==d?d:"#4C4C4C")},className:"Mui-availibility_and__seat_count_title",children:(0,l.PR)(u)?(0,i.jsxs)("span",{style:{textTransform:"capitalize"},children:[" ",(0,l.PR)(r)&&parseInt(r)," ",u.toLowerCase()," "]}):(0,i.jsxs)("span",{children:[s," "]})}),(0,l.PR)(f)&&0!=parseInt(f)&&(0,i.jsxs)(a.Z,{component:"div",className:"Mui-booking_class__price",children:[(0,i.jsx)(S.G,{icon:k.sph}),parseInt(f)]})]}),(0,i.jsx)(o.Z,{className:"Mui-book_now__container",children:(0,i.jsxs)(y.Z,{className:"Mui-book_now__cta",onClick:function(){b?function(e,t){var i=(0,l.PC)();(0,c.yW)("","",{step:"alternateOptionSubmitClick",device_type_id:"6",user_id:null===i||void 0===i?void 0:i.userId,availability:n,journey_clas:s,current_url:"Fare:".concat(m," route_data:").concat(JSON.stringify(h)),alt_availability:"",trip_guarantee:""});var r=(0,l.cI)("".concat(t.asPath.split("?")[1],"&").concat(e.split("?")[1]));if(Object.assign(r,{journey_date:r.boarding_date,journey_quota:r.quota}),(0,l.PR)(e)){var o="".concat("https://www.railyatri.in","/train-ticket/tbs-booking?").concat((0,l.B7)(r),"&user_id=").concat(i.userId,"&device_type_id=6&save_booking=true&called_from_tbs=true&authentication_token=").concat(i.New_User_token).replace(/ /g,"").replace(/#/g,"");(0,c.KR)(o).then((function(e){var t;if((0,l.PR)(e)&&(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.success)){var n,r,o,a,s,c,d,u,f,p,m,v,x,g,b=(0,l.cI)("".concat(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.url.split("?")[1])),y=null===(r=h[0])||void 0===r?void 0:r.station_name,j=null===(o=h[2])||void 0===o?void 0:o.station_name,w={action:"get_token",authentication_token:null===i||void 0===i?void 0:i.New_User_token,boarding_date:null===b||void 0===b?void 0:b.boarding_date,book:"true",class:null===b||void 0===b?void 0:b.class,controller:"train_ticket/bookings",doj:null===b||void 0===b?void 0:b.boarding_date,fare:null===b||void 0===b?void 0:b.fare,status:null===b||void 0===b||null===(a=b.avail)||void 0===a?void 0:a.replace(/#/g,""),from:null===b||void 0===b?void 0:b.boarding_from,is_cached:"false",quota:null===b||void 0===b?void 0:b.quota,src:"tbs",to:null===b||void 0===b?void 0:b.boarding_to,train_name:null===b||void 0===b?void 0:b.train_name,train_no:null===b||void 0===b?void 0:b.train_no,user_id:null===i||void 0===i?void 0:i.userId,utm_source:"tt_dwebhome_search",device_type_id:"6",fcos:null===_||void 0===_||null===(s=_.current)||void 0===s?void 0:s.fcosStatus,AgentSelected:null===_||void 0===_||null===(c=_.current)||void 0===c?void 0:c.AgentSelected,fromStaName:null!==y&&void 0!==y?y:null===b||void 0===b?void 0:b.from_name,toStaName:null!==j&&void 0!==j?j:null===b||void 0===b?void 0:b.to_name},S="boarding_from=".concat(w.from,"&boarding_to=").concat(w.to,"&train_no=").concat(w.train_no,"&class=").concat(w.class,"&quota=").concat(w.quota,"&boarding_date=").concat(w.boarding_date,"&user_id=").concat(w.user_id,"&device_type_id=").concat(w.device_type_id,"&utm_referrer=").concat(w.utm_source,"&utm=").concat(w.utm_source,"&utm_source=").concat(w.utm_source,"&avail=").concat(null===(d=w.status)||void 0===d?void 0:d.replace(/#/g,""),"&fare=").concat(w.fare,"&cateringCharges=").concat(null===w||void 0===w?void 0:w.cateringCharges,"&action=train_between_station&prob=").concat(null===confProb||void 0===confProb?void 0:confProb.replace(/[^a-zA-Z0-9 ]/g,""),"&duration=").concat(duration,"&from_std=").concat(from_std,"&to_sta=").concat(to_sta,"&train_date=").concat(train_date,"&train_name=").concat(w.train_name,"&fromStaName=").concat(w.fromStaName,"&toStaName=").concat(w.toStaName,"&fcos_status=").concat(_.current.fcosStatus),k=(0,R.Z)(S);k.user_id=null===i||void 0===i?void 0:i.userId,k.authentication_token=null===i||void 0===i?void 0:i.New_User_token,k.original_from=null===_||void 0===_||null===(u=_.current)||void 0===u||null===(f=u.from)||void 0===f?void 0:f.code,k.original_to=null===_||void 0===_||null===(p=_.current)||void 0===p||null===(m=p.to)||void 0===m?void 0:m.code,k.number_of_trains=null===_||void 0===_||null===(v=_.current)||void 0===v?void 0:v.number_of_trains,k.filters_applied=null===_||void 0===_||null===(x=_.current)||void 0===x||null===(g=x.filters_applied)||void 0===g?void 0:g.current;var C="/train-ticket/passengers-detail?".concat((0,l.B7)(k));window.location.href=C}}))}}(p,v):x((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0}))},fullWidth:!0,children:[" ","Book Now"," "]})})]})};function M(e){var t=e.config,n=(0,C.I0)(),r=(0,C.v9)((function(e){return e.homepage})).isPassangerLoggedin;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",background:"#FFEFEF",borderRadius:"0px 0px 5px 5px",mt:2,pl:2,pr:2},children:[(0,i.jsx)(a.Z,{component:"div",sx:{color:"#D64752",fontWeight:"700"},children:t.message}),(0,i.jsx)(y.Z,{sx:{margin:"0px",fontSize:"16px",fontWeight:700,color:"#077FF7",cursor:"pointer",textTransform:"capitalize"},onClick:function(){r?t.buttonAction():n((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0}))},children:t.buttontext})]})})}var z=n(41340),E=n(657),W=n(64181);function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){L(e,t,n[t])}))}return e}function q(e){var t=e.train_date,n=e.duration,a=e.from_std,s=e.to_sta,c=e.dDay,d=e.cardData,u=e.routeInfoRef,p=e.controllViewSixDayAvail,m=e.cardRef,v=e.alterNateTrain,h=e.setContainerError,_=e.trainName,g=e.trainStartDate,b=e.train_src,y=e.train_dstn,j=e.train_number,w=e.fromStationName,S=e.toStationName,k=e.isAlternateTrain,N=e.est_chart_time,Z=(0,f.useRouter)(),R=(0,r.useState)(!1),T=R[0],P=(R[1],(0,C.I0)()),D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];P(toggleLoader({showloader:e}))},I=(0,r.useRef)();I.current=function(e){var i,r,o,l,c,d,f,m,h,_,x,g,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",y=arguments.length>2?arguments[2]:void 0,j=arguments.length>3?arguments[3]:void 0,w=arguments.length>4?arguments[4]:void 0,S={from:null===e||void 0===e?void 0:e.from,to:null===e||void 0===e?void 0:e.to,original_from:u.current.from.code,original_to:u.current.to.code,journey_class:null===e||void 0===e?void 0:e.booking_class,trainNumber:null===e||void 0===e?void 0:e.train_number,trainClass:null===e||void 0===e?void 0:e.booking_class,trainQuota:null===e||void 0===e?void 0:e.quota,boarding_date:"".concat(u.current.date.getFullYear(),"/").concat(u.current.date.getMonth()+1,"/").concat(u.current.date.getDate()),doj:"".concat(u.current.date.getFullYear(),"/").concat(u.current.date.getMonth()+1,"/").concat(u.current.date.getDate()),save_booking:!0,avail:null===e||void 0===e?void 0:e.seat_availibility[0]["".concat(e.header_array[0][1])],called_from_tbs:!0,fare:null===e||void 0===e?void 0:e.seat_availibility[0].total_fare,url_params:null===Z||void 0===Z||null===(i=Z.asPath)||void 0===i?void 0:i.split("?")[1],utm:u.current.utm_source,confProb:null!==(m=null===e||void 0===e?void 0:e.cp_prec)&&void 0!==m?m:"",cateringCharges:null===(r=null===e||void 0===e?void 0:e.seat_availibility[0])||void 0===r?void 0:r.catering_charge,train_name:b,fromName:y,est_chart_time:w,toName:j,duration:n,from_std:a,to_sta:s,train_date:t,isAlternateTrain:k};(null===Z||void 0===Z||null===(o=Z.query)||void 0===o?void 0:o.utm)&&(Object.assign(S,{utm:null===Z||void 0===Z||null===(h=Z.query)||void 0===h?void 0:h.utm}
1),Object.assign(S,{utm_source:null===Z||void 0===Z||null===(_=Z.query)||void 0===_?void 0:_.utm}));(null===Z||void 0===Z||null===(l=Z.query)||void 0===l?void 0:l.utm_source)&&(Object.assign(S,{utm:null===Z||void 0===Z||null===(x=Z.query)||void 0===x?void 0:x.utm_source}),Object.assign(S,{utm_source:null===Z||void 0===Z||null===(g=Z.query)||void 0===g?void 0:g.utm_source}));Object.assign(S,{isAlternateTrain:k}),(null===Z||void 0===Z||null===(c=Z.query)||void 0===c?void 0:c.device_type_id)&&Object.assign(S,{device_type_id:null===Z||void 0===Z||null===(d=Z.query)||void 0===d?void 0:d.device_type_id}),(null===(f=null===e||void 0===e?void 0:e.seat_availibility[0])||void 0===f?void 0:f.book_now)&&(v?p({classdata:e.booking_class,quota:e.quota}):(0,z.Ro)(S,D,u))};var O=null===d||void 0===d?void 0:d.flat();if(1==T)return(0,i.jsx)(E.ZP,{});var F=function(e,t){p({classdata:e,quota:t})},L=O.find((function(e){return 1==(null===e||void 0===e?void 0:e.alt_cnf_seat)})),q=(0,r.useState)(0),U=(q[0],q[1]),Y=function(e){var t=document.getElementById("availabilityContainer_".concat(j)),n=t.scrollWidth,i=t.scrollLeft,r=190;"left"===e?i>0&&(t.scrollTo({left:i-r,behavior:"smooth"}),U(i-r)):i+r<n&&(t.scrollTo({left:i+r,behavior:"smooth"}),U(i+r))};return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Z,{className:"Mui-seat_availability__container",children:[void 0!=O&&(null===O||void 0===O?void 0:O.length)>3&&(0,i.jsx)(x.Z,{className:"Mui-next_prev_control__cta Mui-prev_control__cta",onClick:function(){return Y("left")},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/datebefore-1709796704.png",alt:"before icon"})}),(0,i.jsx)(o.Z,{id:"availabilityContainer_".concat(j),className:"Mui-seat_availability__wrapper".concat((0,W.Re)(O)?" Mui-alt_conf_wrapper":""),sx:{ml:void 0!=O&&(null===O||void 0===O?void 0:O.length)<=3?5:0},children:void 0!=O&&O.map((function(e,r){var o,d,f,v,x,j,C=e.success&&e.seat_availibility[0].class_type;return Object.assign(e,{duration:n,from_std:a,to_sta:s,train_date:t}),(0,l.PR)(e.success&&(null===e||void 0===e?void 0:e.seat_availibility[0][C]))&&(null===(d=null===(o=e.seat_availibility[0][C])||void 0===o?void 0:o.toUpperCase())||void 0===d?void 0:d.includes("TRAIN"))&&((null===(v=null===(f=e.seat_availibility[0][C])||void 0===f?void 0:f.toUpperCase())||void 0===v?void 0:v.includes("DEPARTED"))||(null===(j=null===(x=e.seat_availibility[0][C])||void 0===x?void 0:x.toUpperCase())||void 0===j?void 0:j.includes("CANCELLED")))&&h((function(t){var n;return B({},t,{cardListShow:!1,errorShow:!0,ErrorComponent:M,train_number:null===e||void 0===e?void 0:e.train_number,ErrorComponentConfig:{message:null===(n=e.seat_availibility[0][C])||void 0===n?void 0:n.toUpperCase(),buttontext:"View 6 Days Availability",buttonAction:function(){h((function(e){return B({},e,{cardListShow:!1,errorShow:!1,canviewsixdaysavailability:!0})})),p({classdata:e.booking_class,quota:e.quota,trainNumber:e.train_number})}}})})),(0,i.jsx)(A,{data:e,train_date:t,dDay:c,routeInfoRef:u,cardClick:I.current,cardRef:m,refresh:F,success:null===e||void 0===e?void 0:e.success,setContainerError:h,controllViewSixDayAvail:p,trainName:_,trainStartDate:g,train_src:b,train_dstn:y,addSpace:L,fromStationName:w,toStationName:S,est_chart_time:N,train_name:_,duration:n,from_std:a,to_sta:s,isAlternateTrain:k},"avality_card_".concat(r))}))}),void 0!=O&&(null===O||void 0===O?void 0:O.length)>3&&(0,i.jsx)(x.Z,{className:"Mui-next_prev_control__cta Mui-next_control__cta",onClick:function(){return Y("right")},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/dateafter-1709796846.png",alt:"after icon"})})]})})}var U=function(e){switch(e){case"new":return"#EBFFEF";case"TOP CHOICE":case"fastest":case"specialTag":return"#FBFBD5";case"previous":return"#E5F8FF"}};function Y(e){var t,n,i,r,o;return(null===e||void 0===e?void 0:e.toLowerCase().includes("choice"))?"TOP CHOICE":(null===(t=null===e||void 0===e?void 0:e.toLowerCase())||void 0===t?void 0:t.includes("nearby"))?"Nearby":(null===(n=null===e||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.includes("new"))?"new":(null===(i=null===e||void 0===e?void 0:e.toLowerCase())||void 0===i?void 0:i.includes("fastest"))?"fastest":(null===(r=null===e||void 0===e?void 0:e.toLowerCase())||void 0===r?void 0:r.includes("previous"))?"previous":(null===(o=null===e||void 0===e?void 0:e.toLowerCase())||void 0===o?void 0:o.includes("specialtag"))?"specialTag":void 0}function G(e){var t=e.topChoice,n=void 0===t?[]:t;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(o.Z,{sx:{position:"relative",clear:"both",width:"100%",height:n.length>
10?"20px":"0px"},children:(0,i.jsx)(o.Z,{sx:{display:"flex",position:"absolute",top:"0px",left:"15px"},children:null===n||void 0===n?void 0:n.map((function(e,t){return(0,i.jsx)(o.Z,{sx:{padding:"3px 8px 4px 8px",background:"".concat(U(Y(e))),color:"#1D3244",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"600",fontSize:"14px",borderRadius:"0px 0px 16px 22px",boxShadow:"0px 1.4336068630218506px 2.1504104137420654px 0px #00000033",textTransform:"capitalize",mr:1,"&::after":{content:"''",position:"absolute",top:"0px",right:"0px"}},children:(0,i.jsx)(H,{tagName:e})},"".concat(e,"_").concat(t+1e3*Math.random()))}))})})})}function H(e){var t=e.tagName;e.text;switch(Y(t)){case"TOP CHOICE":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/topchoice-1709814119.png",alt:"top choice icon",width:"15px"}),(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"Top choice"})]});case"Nearby":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/nearby-1625467370.png",alt:"Near by icon",width:"15px"}),(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"Near by"})]});case"new":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/celebration-1710848577.png",alt:"celebration icon",width:"21px"}),(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"New"})]});case"fastest":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/fastesticon-1710848448.png",alt:"fastest icon",width:"11px",height:"16px"}),(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"Fastest"})]});case"previous":return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"Previously travelled"})});case"specialTag":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/nearby-1625467370.png",alt:"Special tag icon",width:"15px"}),(0,i.jsx)("span",{style:{marginLeft:"3px"},children:"Special Tag"})]})}}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(){return V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},V.apply(this,arguments)}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Q(e,t,n[t])}))}return e}var J=function(e){var t=V({},e),n=t.selectedClass,r=t.controllViewSixDayAvail,s=t.class_type,c=t.quota,d=t.setViewSixDayAvail,u=t.setContainerError,f=t.children,p=t.buttoncss,m=t.error;return(0,i.jsx)(g.Z,{className:"Mui-future_availability__main_container",children:(0,i.jsxs)(o.Z,{className:"Mui-future_availability__outer_container",children:[(0,i.jsxs)(o.Z,{className:"Mui-future_availability__outer_wrapper",children:[(0,i.jsx)(a.Z,{component:"p",className:"Mui-future_availability__title",children:"Next 6 Days Availability"}),(0,i.jsx)(x.Z,{className:"Mui-future__availability_nav__cta",onClick:function(){u((function(e){return X({},e,{errorShow:!!(null===e||void 0===e?void 0:e.canviewsixdaysavailability)||(null===e||void 0===e?void 0:e.errorShow)})})),d({status:!1})},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/closeicon-1710679621.png",alt:"close icon",width:"15px"})})]}),(0,i.jsx)(o.Z,{className:"Mui-future_avail_class__tab_container",children:(0,i.jsx)(o.Z,{className:"Mui-future_avail_class__tab_wrapper",children:s.map((function(e,t){var s,d;return e.coach_type==n&&c==e.quota?(0,i.jsxs)(o.Z,{className:"Mui-future_avail__class_filter_box",children:["TQ"==e.quota?(0,i.jsx)(a.Z,{component:"span",className:"Mui-tq__tag",children:"Tatkal"}):null,(0,i.jsxs)(x.Z,{sx:X({}
1,{background:"".concat((0,l.PR)(m)?"#ffffff":"#EAF4FF")},X({},p)),className:"Mui-future_avail__class_filter__cta",onClick:function(){return r({classdata:e.coach_type,quota:e.quota})},children:[e.coach_type," -"," ",null!==(s=e.coach_name)&&void 0!==s?s:(0,l.ZP)(e.coach_type).name]},"SA_Scroll".concat(e.coach_type,"_").concat(e.quota))]},"quotaClass".concat(t)):(0,i.jsxs)(o.Z,{className:"Mui-future_avail__class_filter_box",children:["TQ"==e.quota?(0,i.jsx)(a.Z,{component:"span",className:"Mui-tq__tag",children:"Tatkal"}):null,(0,i.jsxs)(x.Z,{className:"Mui-future_avail__class_filter__cta Mui-class_filter_not_selected",onClick:function(){return r({classdata:e.coach_type,quota:e.quota})},children:[e.coach_type," -"," ",null!==(d=e.coach_name)&&void 0!==d?d:(0,l.ZP)(e.coach_type).name]},"SA_Scroll".concat(e.coach_type,"_").concat(e.quota))]},"quotaClass".concat(t))}))})}),f]})})},K=n(754),$=n(7351),ee=n.n($);function te(e){var t=e.error,n=void 0===t?"":t;return(0,i.jsxs)("div",{className:"flexRow flexCenter ".concat(ee().errorbg),children:[(0,i.jsx)("img",{width:"25px",height:"25px",className:ee().RefreshSeatEnquiry,loading:"lazy",src:"https://images.railyatri.in/ry_images_prod/Group-1000004620-1711448955.png",alt:"Refresh"}),(0,i.jsx)("p",{style:{margin:"0px",fontSize:"1.8rem"},children:n})]})}n(31955);function ne(e){var t=e.train_number,n=e.seat_availibility,a=e.primaryButton,s=e.BookNow,c=e.trainDetails,d=e.routeInfoRef,u=e.train_dstn,f=e.train_src,p=e.dDay,m=e.trainStartDate,v=e.showalterNateStyle,h=e.train_name,_=e.fromStationName,g=e.toStationName,b=e.est_chart_time,y=e.duration,j=e.from_std,w=e.to_sta,S=e.hasaltcnfseat,k=void 0!==S&&S,C=(0,r.useState)(0),N=(C[0],C[1]),Z=function(e){var n=document.getElementById("sixDaysAvailabilityContainer_".concat(t)),i=n.scrollWidth,r=n.scrollLeft,o=190;"left"===e?r>0&&(n.scrollTo({left:r-o,behavior:"smooth"}),N(r-o)):r+o<i&&(n.scrollTo({left:r+o,behavior:"smooth"}),N(r+o))};return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Z,{className:"Mui-future__availability_main_container",children:[void 0!=n&&(null===n||void 0===n?void 0:n.length)>3&&(0,i.jsx)(x.Z,{className:"Mui-next_prev_control__cta Mui-prev_control__cta",onClick:function(){return Z("left")},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/datebefore-1709796704.png",alt:"before icon"})}),(0,i.jsx)(o.Z,{id:"sixDaysAvailabilityContainer_".concat(t),className:"Mui-seat_availability__wrapper".concat(k?" Mui-alt_conf_future_wrapper":""),sx:{ml:void 0!=n&&(null===n||void 0===n?void 0:n.length)<=3?5:0},children:void 0!=n&&(null===n||void 0===n?void 0:n.map((function(e,t){var n,r,o,x,S,k,C,N,Z=null===e||void 0===e?void 0:e.availablity_status;return(0,l.m3)(Z)||a?(0,i.jsx)(O,{avail_date:"".concat(null===e||void 0===e||null===(n=e.date_format)||void 0===n?void 0:n.date," ").concat(null===e||void 0===e||null===(r=e.date_format)||void 0===r?void 0:r.month),avail_day:null===e||void 0===e||null===(o=e.date_format)||void 0===o?void 0:o.full_day,ticket_name:Z,percentage:e.cp_perc,show_book_button:null!==(x=null===e||void 0===e?void 0:e.show_book_button)&&void 0!==x&&x,ticket_link:e.ticket_link,cardClick:s,showminits:18==d.current.btbOrgId,fare:(0,l.PR)(e.catering_charge)?null===e||void 0===e?void 0:e.ticket_fare:null===e||void 0===e?void 0:e.total_fare,primaryButton:!1,alt_cnf_seat:null===e||void 0===e?void 0:e.alt_cnf_seat,trainDetails:c,routeInfoRef:d,train_dstn:u,train_src:f,dDay:p,trainStartDate:m,journey_date:null===e||void 0===e?void 0:e.availablity_date,train_name:h,showalterNateStyle:v,catering_charge:null===e||void 0===e?void 0:e.catering_charge,fromStationName:_,toStationName:g,duration:y,from_std:j,to_sta:w,est_chart_time:b,alt_cnf_data:{alt_seat_status:null===e||void 0===e?void 0:e.alt_seat_status,alt_seat_fare:null===e||void 0===e?void 0:e.alt_seat_fare,alt_cp_perc:null===e||void 0===e?void 0:e.alt_cp_perc,alt_cp_prob:null===e||void 0===e?void 0:e.alt_cp_prob},train_date:null===e||void 0===e?void 0:e.availablity_date},"FlexiResult".concat(t)):(0,i.jsx)(O,{avail_date:"".concat(null===e||void 0===e||null===(S=e.date_format)||void 0===S?void 0:S.date," ").concat(null===e||void 0===e||null===(k=e.date_format)||void 0===k?void 0:k.month),avail_day:null===e||void 0===e||null===(C=e.date_format)||void 0===C?void 0:C.full_day,ticket_name:Z,percentage:e.cp_perc,show_book_button:null!==(N=null===e||void 0===e?void 0:e.show_book_button)&&void 0!==N&&N,ticket_link:e.ticket_link,cardClick:s,showminits:18==d.current.btbOrgId,fare:(0,l.PR)(e.catering_charge)?null===e||void 0===e?void 0:e.ticket_fare:null===e||void 0===e?void 0:e.total_fare,primaryButton:!0,alt_cnf_seat:null===e||void 0===e?void 0:e.alt_cnf_seat,trainDetails:c,routeInfoRef:d,train_dstn:u,train_src:f,dDay:p,trainStartDate:m,journey_date:null===e||void 0===e?void 0:e.availablity_date,showalterNateStyle:v,train_name:h,catering_charge:e.catering_charge,fromStationName:_,toStationName:g,duration:y,from_std:j,to_sta:w,est_chart_time:b,alt_cnf_data:{alt_seat_status:null===e||void 0===e?void 0:e.alt_seat_status,alt_seat_fare:null===e||void 0===e?void 0:e.alt_seat_fare,alt_cp_perc:null===e||void 0===e?void 0:e.alt_cp_perc,alt_cp_prob:null===e||void 0===e?void 0:e.alt_cp_prob},train_date:null===e||void 0===e?void 0:e.availablity_date},"FlexiResult".concat(t))})))}),void 0!=n&&(null===n||void 0===n?void 0:n.length)>3&&(0,i.jsx)(x.Z,{className:"Mui-next_prev_control__cta Mui-next_control__cta",onClick:function(){return Z("right")},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/dateafter-1709796846.png",alt:"after icon"})})]})})}var ie=n(63018);function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function oe(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(i,r)}function ae(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){oe(o,i,r,a,s,"next",e)}function s(e){oe(o,i,r,a,s,"throw",e)}a(void 0)}))}}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(){return le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},le.apply(this,arguments)}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){se(e,t,n[t])}))}return e}function de(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return re(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ue=[{sortname:"M",title:"Mon"},{sortname:"T",title:"Tue"},{sortname:"W",title:"Wed"},{sortname:"T",title:"Thu"},{sortname:"F",title:"Fri"},{sortname:"S",title:"Sat"},{sortname:"S",title:"Sun"}];function fe(e){var t=e.train_number,n=e.journey_class,a=e.train_src,s=e.train_dstn,d=e.journey_date,p=e.class_type,m=e.quota,v=e.device,h=e.utm_source,_=e.cardRef,x=e.routeInfoRef,g=e.setViewSixDayAvail,b=e.controllViewSixDayAvail,y=e.newSelectedClass,j=(e.activeQuota,e.defaultAvail),w=e.callFromSubmit,S=e.dDay,k=e.trainSource,C=e.trainDestination,N=e.trainStartDate,Z=e.setContainerError,T=e.train_name,P=e.fromStationName,D=e.est_chart_time,I=e.toStationName,A=e.duration,O=e.from_std,F=e.to_sta,M=(0,r.useState)([]),z=M[0],L=M[1],B=d.split("-"),q="".concat(B[2],"-").concat(B[1],"-").concat(B[0]).replace(" ",""),U=(0,r.useState)({status:!1,message:""}),Y=U[0],G=U[1],H=(0,r.useState)(!0),Q=H[0],V=H[1],X=(0,r.useState)(!1),$=X[0],ee=X[1],re=(0,f.useRouter)();(0,r.useEffect)((function(){var e,i,r;V(!0);var o=(0,l.PC)(),f={step:"New_TBS_Six_day_avail_click",ecomm_type:"train_ticket_booking",user_id:null===o||void 0===o?void 0:o.userId,device_type_id:v,from_station:a,to_station:s,journey_date:x.current.date,journey_class:y,utm_referrer:x.current.utm_source,train_number:t,number_of_trains:x.current.number_of_trains,filters_applied:null===(e=x.current.filters_applied)||void 0===e?void 0:e.current,journey_quota:m,availability:"No Record , Clicked on Six Day Avail",v_code:x.current.vCode,src:x.current.src,original_from:x.current.from.code,original_to:x.current.to.code,alt_availability:null===x||void 0===x||null===(i=x.current)||void 0===i?void 0:i.alt_availability,trip_guarantee:null===x||void 0===x||null===(r=x.current)||void 0===r?void 0:r.trip_guarantee};(0,c.yW)("","",f);try{var p;(0,ie.W)({train_number:t,selectedClass:y,train_src:a,train_dstn:s,journey_date:q,quota:m,utm_source:h,device:v,dDay:S,trainStartDate:"".concat(N.getDate(),"-").concat(N.getMonth()+1,"-").concat(N.getFullYear()),trainSource:k,trainDestination:C,v_code:null===x||void 0===x||null===(p=x.current)||void 0===p?void 0:p.vCode}).then((function(e){var i;if((null===e||void 0===e?void 0:e.success)&&(null===e||void 0===e||null===(i=e.seat_availibility)||void 0===i?void 0:i.length)>0){L(e);var r=Object.keys(x.current.filter.Quota).filter((function(e){return x.current.filter.Quota[e]}));_({trainList:[{train_number:t,train_date:d,from:a,to:s,journey_class:n,d_day:S}],filter:"journey_quota=".concat((0,u.JP)(u.DN).filter((function(e){return e.name==r}))[0].code),additional_train_detail:{selected_train_number:t,selected_class:y,futureavailabilitydata:e,selected_quota:m}}),G({status:!1,message:""}),de({border:"1px solid #417CD6 !important",borderBottom:"2px solid #ffffff !important"})}else{L([]),G({status:!0,message:null===e||void 0===e?void 0:e.error}),de({border:"1px solid #D64752 !important",borderBottom:"2px solid #ffffff !important"});var f={step:"New_TBS_Six_day_avail_click_ShowError",ecomm_type:"train_ticket_booking",user_id:null===o||void 0===o?void 0:o.userId,device_type_id:v,from_station:a,to_station:s,journey_date:x.current.date,journey_class:y,utm_referrer:x.current.utm_source,api_error:null===e||void 0===e?void 0:e.error,train_number:t,number_of_trains:x.current.number_of_trains,filters_applied:x.current.filters_applied.current,journey_quota:m,availability:"No Record , Clicked on Six Day Avail",original_from:x.current.from.code,original_to:x.current.to.code,alt_availability:"",trip_guarantee:""};if((0,c.yW)("","",f),(0,l.PR)(w)&&w){var p,g,b="".concat("https://www.railyatri.in","/train-ticket/tbs-booking?boarding_from=").concat(a,"&boarding_to=").concat(s,"&train_no=").concat(t,"&class=").concat(y,"&quota=").concat(m,"&boarding_date=").concat(q,"&avail=").concat(j.replace(/#/g,""),"&user_id=").concat(null===o||void 0===o?void 0:o.userId,"&device_type_id=").concat(v,"&status=&seat_number=&utm=").concat(h,"&save_booking=true&called_from_tbs=true")+"".concat((0,l.PR)(null===x||void 0===x||null===(p=x.current)||void 0===p?void 0:p.vCode)?"&v_code=".concat(null===x||void 0===x||null===(g=x.current)||void 0===g?void 0:g.vC
1ode):"")+"".concat((0,l.PR)(x.current.btbOrgId)?"&btb_organisation_id=".concat(x.current.btbOrgId):"").concat((0,l.PR)(x.current.btbUserId)?"&btb_user_id=".concat(x.current.btbUserId):"");(0,c.KR)(b).then((function(e){var t;if(!(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.success))throw new Error(JSON.stringify((0,l.PR)(e.data)?e.data:e));var n="".concat(e.data.url).replace("".concat("https://www.railyatri.in"),"".concat("https://www.railyatri.in/m/passengerdetails"))+"&utm_referrer=".concat(x.current.utm_source);window.location.href=n.replace(/\+/g," ")})).catch((function(e){(0,c.yW)("","",{step:"Six_day_Book_Now_Error",api_error:b,current_url:"".concat(e)}),ee(!1)}))}}V(!1)}))}catch(b){var g={step:"New_TBS_Six_day_avail_click_ShowError",ecomm_type:"train_ticket_booking",user_id:null===o||void 0===o?void 0:o.userId,device_type_id:v,from_station:a,to_station:s,journey_date:x.current.date,journey_class:y,utm_referrer:x.current.utm_source,api_error:b.message,train_number:t,number_of_trains:x.current.number_of_trains,filters_applied:x.current.filters_applied.current,journey_quota:m,availability:"No Record , Clicked on Six Day Avail",original_from:x.current.from.code,original_to:x.current.to.code,alt_availability:"",trip_guarantee:""};(0,c.yW)("","",g)}}),[y,m]);var oe=null===z||void 0===z?void 0:z.seat_availibility,ae={train_number:t,from:a,to:s,booking_class:y,quota:m},se=null===oe||void 0===oe?void 0:oe.find((function(e){return 1==e.alt_cnf_seat})),le=(0,r.useState)({border:"2px solid #D64752",borderBottom:"2px solid #ffffff"}),ce=le[0],de=le[1];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{id:"sixDay_".concat(t),children:Q?(0,i.jsx)(K.ZP,{}):(0,i.jsx)(J,{class_type:p,selectedClass:y,controllViewSixDayAvail:b,quota:m,setViewSixDayAvail:g,setContainerError:Z,buttoncss:ce,error:Y.status,children:(null===oe||void 0===oe?void 0:oe.length)>0?(0,i.jsx)(ne,{train_number:t,seat_availibility:oe,primaryButton:!1,BookNow:function(e,n,i,r,o,d,u,f,p,v,h,_){var g,b,j,w,S,k,C,N,Z,T,P,D,I=null===re||void 0===re||null===(g=re.asPath)||void 0===g?void 0:g.split("?")[1],A=(0,l.PC)(),O={step:"New_TBS_Six_day_avail_click_BookNow_click",ecomm_type:"train_ticket_booking",user_id:null===A||void 0===A?void 0:A.userId,device_type_id:null===x||void 0===x||null===(b=x.current)||void 0===b?void 0:b.device,from_station:a,to_station:s,journey_date:null===x||void 0===x||null===(j=x.current)||void 0===j?void 0:j.date,journey_class:y,utm_referrer:null===x||void 0===x||null===(w=x.current)||void 0===w?void 0:w.utm_source,train_number:t,number_of_trains:null===x||void 0===x||null===(S=x.current)||void 0===S?void 0:S.number_of_trains,filters_applied:null===x||void 0===x||null===(k=x.current)||void 0===k||null===(C=k.filters_applied)||void 0===C?void 0:C.current,journey_quota:m,availability:i,original_from:null===x||void 0===x||null===(N=x.current)||void 0===N||null===(Z=N.from)||void 0===Z?void 0:Z.code,original_to:null===x||void 0===x||null===(T=x.current)||void 0===T||null===(P=T.to)||void 0===P?void 0:P.code,additionalInfo:null!==(D=null===_||void 0===_?void 0:_.replace(/[^a-zA-Z0-9 ]/g,""))&&void 0!==D?D:"",alt_availability:"",trip_guarantee:""};if((0,c.yW)("","",O),e)try{var F,M,z,E,W,L,B,q,U,Y,G,H,Q,V=(0,l.cI)(n.split("?")[1]),X=V.boarding_date.split("-"),J="".concat(X[2],"-").concat(null===(F=X[1])||void 0===F?void 0:F.padStart(2,"0"),"-").concat(null===(M=X[0])||void 0===M?void 0:M.padStart(2,"0")),K=(null===A||void 0===A||A.New_User_token,V.class,null===V||void 0===V||V.fare,V.avail,null===V||void 0===V||V.boarding_from,V.quota,null===V||void 0===V||V.boarding_to,null===V||void 0===V||V.train_no,null===A||void 0===A||A.userId,x.current.fcosStatus,x.current.AgentSelected,"user_id=".concat(null===A||void 0===A?void 0:A.userId,"&authentication_token=").concat(null===A||void 0===A?void 0:A.New_User_token,"&journey_date=").concat(J,"&from_name=").concat(d,"&from_code=").concat(null===V||void 0===V?void 0:V.boarding_from,"&boarding_from=").concat(null===V||void 0===V?void 0:V.boarding_from,"&boarding_to=").concat(null===V||void 0===V?void 0:V.boarding_to,"&to_code=").concat(null===V||void 0===V?void 0:V.boarding_to,"&to_name=").concat(u,"&from_sta_code=").concat(null===V||void 0===V?void 0:V.boarding_from,"&to_sta_code=").concat(null===V||void 0===V?void 0:V.boarding_to,"&train_no=").concat(null===V||void 0===V?void 0:V.train_no,"&class=").concat(V.class,"&quota=").concat(V.quota,"&boarding_date=").concat(V.boarding_date,"&device_type_id=6&utm_referrer=").concat(x.current.utm_source,"&utm=").concat(x.current.utm_source,"&utm_source=tt_dwebhome_search&avail=").concat(null===V||void 0===V||null===(z=V.avail)||void 0===z?void 0:z.replace(/#/g,""),"&fare=").concat(null===V||void 0===V?void 0:V.fare,"&cateringCharges=").concat(r,"&action=train_between_station&duration=").concat(f,"&from_std=").concat(p,"&to_sta=").concat(v,"&train_date=").concat(J,"&train_name=").concat(o,"&fromStaName=").concat(d,"&toStaName=").concat(u,"&").concat(void 0==I?"":I,"&fcos_status=").concat(null!==(H=null===x||void 0===x||null===(E=x.current)||void 0===E?void 0:E.fcosStatus)&&void 0!==H?H:"","&est_chart_time=").concat(h,"&prob=").concat(null!==(Q=null===_||void 0===_?void 0:_.replace(/[^a-zA-Z0-9 ]/g,""))&&void 0!==Q?Q:"")),$=(0,R.Z)(K);$.journey_date=J,$.user_id=null===A||void 0===A?void 0:A.userId,$.authentication_token=null===A||void 0===A?void 0:A.New_User_token,$.original_from=null===x||void 0===x||null===(W=x.current)||void 0===W||null===(L=W.from)||void 0===L?void 0:L.code,$.original_to=null===x||void 0===x||null===(B=x.current)||void 0===B||null===(q=B.to)||void 0===q?void 0:q.code,$.number_of_trains=null===x||void 0===x||null===(U=x.current)||void 0===U?void 0:U.number_of_trains,$.filters_applied=null===x||void 0===x||null===(Y=x.current)||void 0===Y||null===(G=Y.filters_applied)||void 0===G?void 0:G.current;var ee="/train-ticket/passengers-detail?".concat((0,l.B7)($));window.location.href=ee}catch(ne){var te={step:"New_TBS_Six_day_avail_click_BookNow_click_Exception",ecomm_type:"train_ticket_booking",user_id:null===A||void 0===A?void 0:A.userId,device_type_id:x.current.device,from_station:a,to_station:s,journey_date:x.current.date,journey_class:y,api_error:ne.message,utm_referrer:x.current.utm_source,train_number:t,number_of_trains:x.current.number_of_trains,filters_applied:x.current.filters_applied.
1current,journey_quota:m,availability:i,original_from:x.current.from.code,original_to:x.current.to.code,alt_availability:"",trip_guarantee:""};(0,c.yW)("","",te)}},trainDetails:ae,routeInfoRef:x,train_dstn:C,train_src:k,dDay:S,trainStartDate:N,showalterNateStyle:se,train_name:T,fromStationName:P,toStationName:I,duration:A,from_std:O,to_sta:F,est_chart_time:D,hasaltcnfseat:(0,W.Re)(oe)}):Y.status&&(0,i.jsx)(te,{error:Y.message})})}),$&&(0,i.jsx)(E.ZP,{})]})}function pe(e){var t=le({},e),n=t.data,r=t.availableSeatCount,s=t.status,l=t.viewalternateRouteTrainData,c=t.router,d=t.routeInfoRef;return(0,i.jsxs)(o.Z,{sx:{background:"#F1FBFF",display:"flex",justifyContent:"space-between",mt:2},children:[(0,i.jsxs)(o.Z,{sx:{p:2,pt:1.5,pl:4,pr:4,mt:2,display:"flex"},children:[(0,i.jsx)("img",{width:22,height:25,src:"https://images.railyatri.in/ry_images_prod/smartseaticon-1713342737.png"}),(0,i.jsxs)(o.Z,{children:[(0,i.jsxs)(o.Z,{sx:{display:"flex"},children:[(0,i.jsxs)(a.Z,{sx:{color:"#333333",fontSize:20,fontFamily:"Lato",fontWeight:"700",wordWrap:"break-word",ml:.5,mr:.5,position:"relative"},children:["RY SmartSeat",(0,i.jsx)("span",{style:{color:"#333333",fontSize:10,fontFamily:"Lato",fontWeight:"700",wordWrap:"break-word",position:"absolute",right:"15px",top:"-6px"},children:"TM"}),(0,i.jsx)("span",{style:{marginLeft:"20px"},children:"-"})]}),(0,i.jsxs)(a.Z,{sx:{color:"#0AA22C",fontSize:20,fontFamily:"Lato",fontWeight:"700",wordWrap:"break-word"},children:[r," Available Seats"]})]}),(0,i.jsx)(a.Z,{sx:{color:"#333333",fontSize:14,fontFamily:"Lato",fontWeight:"500",wordWrap:"break-word"},children:"RailYatri's SmartSeat intelligence has done a deep search and found additional seats for you."}),(0,i.jsx)(o.Z,{sx:{display:"flex",justifyContent:"start",alignItems:"end",width:"90%",overflowX:"auto",overflowY:"hidden",scrollBehavior:"smooth",scrollbarWidth:"none",msOverflowStyle:"none",height:"165px",ml:0,pb:1,"&::-webkit-scrollbar":{display:"none"}},children:n.map((function(e){return(0,i.jsx)(F,ce({},e,{router:c,routeInfoRef:d}),"alternate_seat_".concat(e.train_number,"_").concat(e.booking_class))}))})]})]}),(0,i.jsx)(x.Z,{sx:{borderRadius:"50%",m:0,mr:5,mt:2.5,p:.5,width:"35px",height:"35px"},onClick:function(){l(!s)},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/closeicon-1710679621.png",alt:"close icon",width:"15px"})})]})}function me(e){var t,n,s=e.train_date,c=e.train_number,d=e.train_name,p=e.from_std,m=e.train_src,v=e.to_sta,h=e.train_dstn,x=e.duration,w=e.journey_class,S=e.cardData,k=e.topChoice,Z=e.from,R=e.to,T=e.cardRef,P=e.routeInfoRef,D=e.dDay,I=e.trainContainerclass_type,A=e.from_station_name,O=e.to_station_name,F=e.distance,M=e.halt_Station,z=e.alterNateTrain,E=e.labelDataFromDistanceText,W=e.run_days,L=e.labelDataToDistanceText,B=(e.toStationName,e.fromStationName,e.isAlternateTrain),U=e.est_chart_time,Y=s.split("-"),H=(0,l.Mv)(new Date(Y[2],Y[1]-1,Y[0]),-1*D),Q=(0,f.useRouter)(),V=Object.keys(P.current.filter.Quota).filter((function(e){return P.current.filter.Quota[e]}))[0],X=(0,r.useState)({status:!1,quota:(0,u.JP)(u.DN).find((function(e){return e.name==V})).code,selectedClass:w[0],trainNumber:c}),J=X[0],K=X[1],$=(0,r.useRef)();$.current=function(e){var t=e.classdata,n=void 0===t?w[0]:t,i=e.quota,r=void 0===i?J.quota:i,o=e.callFromSubmitSubmit,a=void 0!==o&&o,s=e.trainNumber,l=void 0===s?c:s,d="";try{var u,f,p;d=null===(u=S[0])||void 0===u?void 0:u.seat_availibility[0]["".concat(null===(p=null===(f=S[0])||void 0===f?void 0:f.seat_availibility[0])||void 0===p?void 0:p.class_type)]}catch(m){}K({status:!0,quota:r,selectedClass:n,avail:d,callFromSubmitSubmit:a,trainNumber:l})},(0,r.useEffect)((function(){K((function(e){return ce({},e,{status:!1})}))}),[c]);var ee=null===S||void 0===S?void 0:S.map((function(e){var t,n,i;return(null===e||void 0===e||null===(t=e.seat_availibility)||void 0===t?void 0:t.length)&&(0,l.PR)(null===(n=null===e||void 0===e?void 0:e.seat_availibility[0])||void 0===n?void 0:n.total_fare)?{fare:parseInt(null===(i=null===e||void 0===e?void 0:e.seat_availibility[0])||void 0===i?void 0:i.total_fare),coach_type:e.booking_class,coach_name:I.find((function(t){return t.coach_type==e.booking_class})).coach_name,quota:e.quota}:{fare:"NA",coach_type:e.booking_class,coach_name:I.find((function(t){return t.coach_type==e.booking_class})).coach_name,quota:e.quota}}
1)),te=(0,r.useState)({cardListShow:!0,errorShow:!1,ErrorComponent:function(){return(0,i.jsx)(i.Fragment,{})},ErrorComponentConfig:{}}),ne=te[0],ie=te[1],re=(0,r.useState)({status:!1,style:{mainContainer:{backgroundColor:"#ffffff",alignItems:"center"}},data:[],availableSeatCount:0}),oe=re[0],le=re[1];(0,r.useEffect)((function(){var e=function(){var e=ae(_().mark((function e(){var t,n,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S.filter((function(e){return!0===e.alt_cnf_seat})),n=[],i=0,e.next=5,Promise.all(t.map(function(){var e=ae(_().mark((function e(t){var r,o,a,s,c,d,u,f,p,v,x,g,b,y,j,w,S;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.success,o=t.booking_class,a=t.train_number,s=t.from,c=t.to,d=t.quota,t.header_array,{v_code:null===(r=P.current)||void 0===r?void 0:r.vCode,train_number:a,journey_date:P.current.date,boarding_from:s,boarding_to:c,journey_class:o,quota:d,d_day:D,train_source:m,train_destination:h,utm:"alternate_confirmed_seat_options",device_type_id:P.current.device};try{if(null===(u={success:!1})||void 0===u?void 0:u.success){(f=u.alternate_options).sub_title,p=f.route_data,v=f.availablityStatus,x=f.booking_class,g=f.cp_perc,b=f.totalFare,y=f.ticketFare,j=f.ticket_link,w={};try{Object.assign(w,(0,l.Yo)(v.replace(/[^A-Za-z]/g,""))),Object.assign(w,{SeatCount:v.replace(/\D/g,"")})}catch(_){}S={};try{(0,l.PR)(g)&&Object.assign(S,(0,l.Yo)(null===g||void 0===g?void 0:g.replace(/[^a-zA-Z]/g,"")))}catch(k){}(0,l.PR)(v)&&(i+=Number(v.replace(/\D/g,""))),n.push(ce({booking_class:x,ticket_link:j,totalFare:b,ticketFare:y,train_number:a},w,{availablityStatus:v,route_data:p}))}}catch(C){console.error("Error occurred:",C)}case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:le(ce({},oe,{data:de(n),style:{mainContainer:{backgroundColor:i>0?"#F1FBFF":"#ffffff",marginTop:i>0?"10px":"0px",alignItems:"center"}},availableSeatCount:i}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[S.length]);var me,ve=function(e){le(ce({},oe,{style:{mainContainer:{backgroundColor:e?"#ffffff":"#F1FBFF"}},status:e}))},he=new Date(s).getTime()/1e3,_e=(0,C.I0)(),xe=(0,C.v9)((function(e){return e.homepage})).isPassangerLoggedin,ge=function(){$.current({classdata:w[0],quota:J.quota,trainNumber:c}),ve(!1)};return(0,r.useEffect)((function(){c!=(null===ne||void 0===ne?void 0:ne.train_number)&&ie({cardListShow:!0,errorShow:!1,train_number:"",ErrorComponent:function(){return(0,i.jsx)(i.Fragment,{})},ErrorComponentConfig:{}})}),[c]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(g.Z,{sx:{p:0,mb:1.5,borderRadius:"10px",boxShadow:"0px 5px 20px 0px #0000001A"},children:[" ",(0,i.jsx)(G,{topChoice:ne.cardListShow?k:[]}),(0,i.jsxs)(o.Z,{sx:{pt:1.5,pl:2,pr:2},children:[(0,i.jsxs)(o.Z,{sx:{p:0,display:"flex",justifyContent:"space-between",color:"#333333",mt:.5},children:[(0,i.jsx)(o.Z,{children:B&&(0,i.jsxs)(o.Z,{sx:{color:"#023562",fontSize:"1.0 rem",fontWeight:500,borderRadius:"5px",background:"#FBFBD5",padding:"2px 8px"},children:["Next run on ",(0,l.hT)("D, M d",he)]})}),(0,i.jsx)(j.By,{children:ue.map((function(e,t){return(0,i.jsx)(o.Z,{sx:{display:"inline-block",marginRight:"5px",fontWeight:"700",color:W.includes(e.title)?"#01478C":"#D9D9D9"},children:e.sortname},t)}))})]}),(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:.5,mb:1.5},children:[(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.85rem",color:"#000",fontWeight:550,textTransform:"capitalize !important",display:"flex",alignItems:"center"},children:[(0,i.jsxs)(b.Z,{href:"/time-table/".concat(c),sx:{textDecoration:"none",color:"#000000"},children:[(0,i.jsxs)("span",{style:{color:"#a19f9f",fontWeight:"normal",marginRight:"5px"},children:[" ",c]})," "," ",d]})," ",(0,i.jsx)(b.Z,{href:"/time-table/".concat(c),sx:{textDecoration:"none",fontSize:"14px",color:"#0080FF",fontWeight:700},children:(0,i.jsx)("img",{width:"20px",src:"https://images.railyatri.in/ry_images_prod/icchevronright-1606752213.png",alt:"View Time Table Preview"})})]}),(0,i.jsxs)(b.Z,{href:"/time-table/".concat(c),sx:{textDecoration:"none",fontSize:"14px",color:"#0080FF",fontWeight:700,display:"flex",alignItems:"center"},children:["Time Table",(0,i.jsx)("img",{width:"20px",src:"https://images.railyatri.in/ry_images_prod/icchevronright-1606752213.png",alt:"
1View Time Table Preview"})]})]}),(0,i.jsx)(o.Z,{sx:{padding:"0px 0 5px 0px",display:"flex",justifyContent:"space-between",color:"#333333"},children:(0,i.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[(0,i.jsxs)(o.Z,{sx:{flexGrow:1},children:[(0,i.jsxs)(j.mu,{children:[(0,i.jsxs)("span",{style:{fontSize:"1.8rem",fontWeight:"400",color:"#363636"},children:[" ",Z,", "]}),(0,i.jsx)("span",{style:{fontSize:"1.8rem",marginRight:"10px"},children:p}),(0,i.jsx)("br",{}),(0,i.jsx)("span",{style:se({color:"#363636",fontWeight:"normal",fontSize:"1.5rem"},"fontWeight",400),children:(0,l.c7)(A)})]}),(0,i.jsx)(o.Z,{sx:{display:"flex",alignItems:"center",mt:1},children:(0,l.PR)(E)?(0,i.jsxs)(j.t_,{children:[" ",E," "]}):(0,i.jsx)(o.Z,{sx:{height:"24px"}})})]}),(0,i.jsx)(o.Z,{sx:{flexGrow:1,maxWidth:"40%"},children:(0,i.jsx)(o.Z,{sx:{flexGrow:1,ml:.5,mr:.5,minWidth:"150px"},children:(0,i.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsxs)(o.Z,{sx:{flexGrow:1,ml:.5,mr:.5,display:"flex",alignItems:"center"},children:[(0,i.jsx)(o.Z,{sx:{width:"8px",height:"8px",border:"1.5px solid #707070",borderRadius:"50%",background:"#fff"}}),(0,i.jsx)(o.Z,{sx:{flexGrow:1,borderTop:"2px solid #707070"}})]}),(0,i.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",minWidth:"80px"},children:[(0,i.jsxs)(a.Z,{component:"div",sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/clockicon-1709916154.png"}),(0,i.jsxs)(o.Z,{children:[(0,i.jsxs)("span",{style:{marginLeft:"2px",fontWeight:"700",fontSize:"15px"},children:[x.split(":")[0].length>1?x.split(":")[0]:"0".concat(x.split(":")[0])," h"]}),(0,i.jsxs)("span",{style:{marginLeft:"2px",fontWeight:"700",fontSize:"12px"},children:[x.split(":")[1].length>1?x.split(":")[1]:"0".concat(x.split(":")[1])," m"]})]})]}),(0,l.PR)(M)&&M&&(0,i.jsxs)(a.Z,{component:"div",sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)("span",{style:{marginRight:"2px",color:"#393939"},children:"".concat((0,l.PR)(M)&&M>0?"".concat(M," halts"):"")}),(0,i.jsx)("span",{style:{color:"#393939",marginLeft:"2px",marginRight:"2px"},children:" | "}),(0,i.jsxs)("span",{children:[" ",(0,l.PR)(F)&&F>0?"".concat(F," kms"):""," "]})]})]}),(0,i.jsxs)(o.Z,{sx:{flexGrow:1,ml:.5,mr:.5,display:"flex",alignItems:"center"},children:[(0,i.jsx)(o.Z,{sx:{flexGrow:1,borderTop:"2px solid #707070"}}),(0,i.jsx)(o.Z,{sx:{width:"8px",height:"8px",border:"1.5px solid #707070",borderRadius:"50%",background:"#fff"}})]})]})})}),(0,i.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",textAlign:"right",flexGrow:1},children:[(0,i.jsxs)(j.mu,{children:[(0,i.jsxs)("span",{style:{fontSize:"1.8rem"},children:[v,","]}),(0,i.jsxs)("span",{style:{fontSize:"1.8rem",marginLeft:"2px",fontWeight:"400",color:"#363636"},children:[" ",R," "]}),(0,i.jsx)("br",{}),(0,i.jsx)("span",{style:se({color:"#363636",fontWeight:"normal",fontSize:"1.5rem"},"fontWeight",400),children:(0,l.c7)(O)})]}),(0,i.jsx)(o.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"end",mt:1},children:(0,l.PR)(L)?(0,i.jsxs)(j.t_,{children:[" ",L," "]}):(0,i.jsx)(o.Z,{sx:{height:"24px"}})})]})]})})]}),ne.errorShow&&(0,i.jsx)(ne.ErrorComponent,{config:ne.ErrorComponentConfig}),ne.cardListShow&&!J.status&&(0,i.jsx)(q,{train_date:s,duration:x,from_std:p,to_sta:v,dDay:D,train_src:m,train_dstn:h,cardData:S,routeInfoRef:P,controllViewSixDayAvail:$.current,cardRef:T,alterNateTrain:z,setContainerError:ie,trainStartDate:H,train_number:c,trainName:d,fromStationName:A,est_chart_time:U,toStationName:O,isAlternateTrain:B}),(null===oe||void 0===oe?void 0:oe.status)&&(0,i.jsx)(pe,ce({},oe,{viewalternateRouteTrainData:ve,router:Q,routeInfoRef:P})),!ne.errorShow&&!J.status&&(0,i.jsx)(o.Z,{sx:ce({display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row-reverse",borderRadius:"0 0 10px 10px"},oe.style.mainContainer),children:(0,i.jsx)(o.Z,{sx:{display:"flex",justifyContent:"end",mt:1},children:(0,i.jsxs)(y.Z,{sx:{margin:"0px",fontSize:"16px",fontWeight:700,color:"#077FF7",cursor:"pointer",textTransform:"capitalize",m:0,p:.5},onClick:function(){xe?ge():_e((0,N.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0,onSuccess:ge}))},children:["View Future Availability",(0,i.jsx)("img",{width:"20px",src:"https://images.railyatri.in/ry_images_prod/icchevronright-1606752213.png",alt:"Right Arrow Icon"})]})})}),!ne.errorShow&&J.status&&!(null===oe||void 0===oe?void 0:oe.status)&&(0,i.jsx)(fe,{duration:x,from_std:p,to_sta:v,train_number:c,journey_class:w,train_src:Z,train_dstn:R,journey_date:s,class_type:ee,quota:null!==(me=null===J||void 0===J?void 0:J.quota)&&void 0!==me?me:"GN",device:null===Q||void 0===Q||null===(t=Q.query)||void 0===t?void 0:t.device_type_id,utm_source:null===Q||void 0===Q||null===(n=Q.query
1)||void 0===n?void 0:n.utm_source,cardRef:T,routeInfoRef:P,setViewSixDayAvail:K,controllViewSixDayAvail:$.current,newSelectedClass:J.selectedClass,activeQuota:V,defaultAvail:null===J||void 0===J?void 0:J.avail,callFromSubmit:null===J||void 0===J?void 0:J.callFromSubmitSubmit,dDay:D,trainSource:m,trainDestination:h,trainStartDate:H,setContainerError:ie,train_name:d,fromStationName:A,toStationName:O,est_chart_time:U})]},c)})}var ve=n(68657),he=n.n(ve);function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e){return function(e){if(Array.isArray(e))return _e(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _e(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e){var t=e.routeInfoRef,n=(0,r.useState)(t.current.fcosStatus),s=n[0],l=n[1];return(0,i.jsxs)(o.Z,{sx:{background:"#F1FBFF",p:2,pt:3.5,pb:3.5,pl:3,pr:3,mt:2,mb:2,borderRadius:"12px",display:"flex",alignItems:"center"},children:[(0,i.jsxs)("div",{className:"".concat(he().squared),children:[(0,i.jsx)("input",{id:"FcoscheckBox",type:"checkbox",onChange:function(){t.current.fcosStatus=!t.current.fcosStatus,l(t.current.fcosStatus)},checked:s}),(0,i.jsx)("label",{htmlFor:"FcoscheckBox"})]}),(0,i.jsxs)(o.Z,{sx:{ml:1.5,display:"flex",justifyContent:"space-between",flexGrow:1},children:[(0,i.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,i.jsx)(a.Z,{component:"div",sx:{fontWeight:"700",fontSize:"20px",color:"#033562"},children:"Get a full refund on cancellation"}),(0,i.jsx)(a.Z,{component:"div",sx:{fontWeight:"600",fontSize:"15px",color:"#333333"},children:"Enable for free cancellation benefits"})]}),(0,i.jsx)(o.Z,{children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/shildicon-1710939930.png",alt:"Shild Icon",width:"45px"})})]})]})}function ye(){return(0,i.jsx)(o.Z,{sx:{background:"#F1FBFF",p:2,pt:3.5,pb:3.5,pl:3,pr:3,mt:2,mb:2,borderRadius:"12px",display:"flex",alignItems:"center"},children:(0,i.jsxs)(o.Z,{sx:{ml:1.5,display:"flex",justifyContent:"space-between",flexGrow:1},children:[(0,i.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,i.jsx)(a.Z,{component:"div",sx:{fontWeight:"700",fontSize:"20px",color:"#033562"},children:"Zero Payment gateway charges"}),(0,i.jsx)(a.Z,{component:"div",sx:{mt:.2,fontWeight:"600",fontSize:"15px",color:"#333333"},children:"On UPI Payments"})]}),(0,i.jsx)(o.Z,{children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/salaryicon-1710945574.png",alt:"Salary Icon",width:"50px"})})]})})}function je(e){var t=e.trainList,n=e.trainsCard,o=e.cardRef,a=e.routeInfoRef,s=e.alterNateTrain,c=void 0!==s&&s,d=e.showIntro,f=void 0===d||d,p=e.isAlternateTrain,m=void 0!==p&&p;return null===t||void 0===t?void 0:t.map((function(e,s){var d,p,v;return(0,i.jsxs)(r.Fragment,{children:[null!==(p=(0,l.PR)(n)&&(0,l.PR)(null===e||void 0===e?void 0:e.train_number)&&(null===(d=n[null===e||void 0===e?void 0:e.train_number])||void 0===d?void 0:d.length)>0)&&void 0!==p&&p&&(0,i.jsx)(me,{train_date:e.train_date,train_name:e.train_name,train_number:e.train_number,from_std:e.from_std,train_src:e.train_src,to_sta:e.to_sta,train_dstn:e.train_dstn,duration:e.duration,journey_class:e.journey_class,cardData:n[e.train_number],trainContainerclass_type:e.class_type,topChoice:e.headers,timeTableTrainName:e.extended_train_name,from:e.from,to:e.to,dDay:e.d_day,cardRef:o,routeInfoRef:a,from_station_name:e.from_station_name,to_station_name:e.to_station_name,distance:e.distance,halt_Station:e.halt_stn,alterNateTrain:c,labelDataFromDistanceText:null===e||void 0===e?void 0:e.from_distance_text,run_days:null===e||void 0===e?void 0:e.run_days,labelDataToDistanceText:null===e||void 0===e?void 0:e.to_distance_text,isAlternateTrain:m,est_chart_time:null!==(v=null===e||void 0===e?void 0:e.est_chart_time)&&void 0!==v?v:""}),s==(t.length<=2?t.length-1:2)&&f&&u.Fw&&(0,i.jsx)(be,{routeInfoRef:a}),5===s&&f&&(0,i.jsx)(ye,{})]},"trainContainer_".concat(s))}))}function we(e){var t=e.trainList,n=e.cardRef,s=e.openAlternateTrain,c=e.routeInfoRef,d=(0,r.useState)(void 0),u=d[0],f=d[1],p=(0,r.useState)(!1),m=p[0],v=p[1],h=function(){void 0==u&&(t.forEach((function(e){var t=e.train_number,n=e.sa_data,i=[];(0,l.PR)(n)&&(i=(0,l.Kv)([n])),f((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){xe(e,t,n[t])}))}return e}({},e,xe({},t,ge(i.flat())))}))})),delete t.sa_data),v(!m)};(0,r.useEffect)((function(){s&&h()}),[]);return(0,i.jsx)(o.Z,{sx:{background:void 0!=u&&(null===t||void 0===t?void 0:t.length)>0?"#E6F0FF":"",p:1.5,mt:2},children:void 0!=u&&(null===t||void 0===t?void 0:t.length)>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",mb:2},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/alternativecalicon-1710863203.png",alt:"alternative days icon"}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontWeight:"600",fontSize:"16px",lineHeight:"20px",ml:1},children:["There are ",null===t||void 0===t?void 0:t.length," trains for alternative days of run"]})]}),(0,i.jsx)(je,{cardRef:function(e){var t=e.trainList,i=void 0===t?[]:t,r=e.filter;return n({trainList:i,setter:f,filter:void 0===r?"":r,dataset:u,update:{status:!0}})},trainList:t,trainsCard:u,alternateTrain:!0,routeInfoRef:c,showIntro:!1,isAlternateTrain:!0})]})})}n(93773);var Se=function(e){var t=e.routeInfoRef,n=(e.reference,e.hideAllBtns,new Date(t.current.date)),s=((0,u.JP)(u.zC)[n.getMonth()],(0,r.useState)(!1));return s[0],s[1],(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",background:"#ffffff",borderRadius:"10px",p:2,pt:3,pb:5,mt:1},children:[(0,i.jsx)(o.Z,{children:(0,i.jsx)("img",{width:"330px",src:"https://images.railyatri.in/ry_images_prod/notrainpreview-1711882551.png",alt:"No train found preview"})}),(0,i.jsx)(o.Z,{sx:{flexGrow:1},children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)(a.Z,{sx:{color:"#C75050",fontSize:"28px",fontWeight:"700"},children:"No trains found"}),(0,i.jsx)(a.Z,{sx:{color:"#000000",fontSize:"18px",fontWeight:"500"},children:"Sorry! No trains found in the selected route. Please choose a different origin and destination"})]})})]})})};function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Ce(e,t,n[t])}))}return e}function Ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(l){s=!0,r=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(e,t)||Te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(e,t){if(e){if("string"===typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}function Pe(){return(0,i.jsxs)("div",{className:"wrap-container fs-18 fw-med",style:{borderRadius:"12px",background:"#F1FBFF",padding:"22px 0 22px 150px",color:"#033562",marginBottom:"15px",backgroundImage:"url('https://images.railyatri.in/ry_images_prod/traveller-1772344244.svg')",backgroundRepeat:"no-repeat",backgroundPosition:"0 100%",backgroundSize:"15% 100%"},children:["No trains matched your filters,",(0,i.jsx)("br",{}),"So we've reset them."]})}var De=function(e){var t,n,h,_,x,g,b,y,j=e.routeInfoRef,w=e.seoData,S=e.dataFilter,k=e.filterStringApply,C=e.getTrainList,N=e.searchQuery,Z=e.busRef,R=e.headerDateStripSelection,P=e.isSeoPage,D=void 0!==P&&P,I=e.booking_window,A=void 0===I?60:I,O=function(e){return e.getDate()+"-"+parseInt(e.getMonth()+1)+"-"+e.getFullYear()},F=(0,f.useRouter)(),M=(0,r.useState)([]),z=M[0],E=M[1],W=(0,r.useState)([]),L=W[0],B=W[1],q=Ze((0,d.Z)([]),4),U=(q[0],q[1]),Y=q[2],G=q[3],H=Ze((0,d.Z)([]),4),Q=H[0],V=H[1],X=H[2],J=H[3],$=Ze((0,d.Z)([]),4),ee=$[0],te=$[1],ne=($[2],$[3],Ze((0,d.Z)([]),4)),ie=ne[0],re=ne[1],oe=(ne[2],ne[3],(0,r.useState)(!1)),ae=oe[0],se=oe[1],le=(0,r.useState)(!0),ce=le[0],de=le[1],ue=(0,r.useState)([]),fe=ue[0],pe=ue[1],me=(0,r.useState)(!1),ve=me[0],he=me[1],_e=(0,r.useRef)({from:(0,r.useRef)(),to:(0,r.useRef)(),date:(0,r.useRef)()});C.current=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return void 0==e?z.train_between_stations:z.train_between_stations.map((function(t){return e(t)}))};var xe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=6,a=12,s=18,c=24,d=t.match(/\((.*?)\)/);switch((0,l.PR)(d)&&(0,l.PR)(d[1])&&(t=null===(e=d[1])||void 0===e?void 0:e.split("|")[0]),t){case"Origin":var u,f=null===(u=d[1])||void 0===u?void 0:u.split("|");Y(void 0==d[1]?"Origin":d[1],(function(e){return null===e||void 0===e?void 0:e.filter((function(e){return f.includes(e.from)}))}),n),i=d[1];break;case"Destination":var p,m=null===(p=d[1])||void 0===p?void 0:p.split("|");Y(void 0==d[1]?"Origin":d[1],(function(e){return null===e||void 0===e?void 0:e.filter((function(e){return m.includes(e.to)}))}),n),i=d[1];break;case"Departure":Y(void 0==i?"Departure":i,(function(e){return e.sort((function(e,t){return parseFloat(e.from_std.replace(":","."))-parseFloat(t.from_std.replace(":","."))}))}),n);break;case"Departure_late_to_earliest":Y(void 0==i?"Departure_late_to_earliest":i,(function(e){return e.sort((function(e,t){return parseFloat(t.from_std.replace(":","."))-parseFloat(e.from_std.replace(":","."))}))}),n);break;case"Arrival":Y(void 0==i?"Arrival":i,(function(e){return e.sort((function(e,t){return parseFloat(e.to_sta.replace(":","."))-parseFloat(t.to_sta.replace(":","."))}))}),n);break;case"Arrival_late_to_earliest":Y(void 0==i?"Arrival_late_to_earliest":i,(function(e){return e.sort((function(e,t){return parseFloat(t.to_sta.replace(":","."))-parseFloat(e.to_sta.replace(":","."))}))}),n);break;case"Duration_shortest_to_longest":Y(void 0==i?"Duration":i,(function(e){return e.sort((function(e,t){return parseFloat(e.duration.replace(":","."))-parseFloat(t.duration.replace(":","."))}))}),n);break;case"Popularity":Y(void 0==i?"Popularity":i,(function(e){var t=e.filter((function(e){return e.headers.some((function(e){return/TOP CHOICE/gi.test(e)}))})),n=e.filter((function(e){return!e.headers.some((function(e){return/TOP CHOICE/gi.test(e)}))}));return t.concat(n)}),n);break;case"OnTime":Y(void 0==i?"OnTime":i,(function(e){return e.sort((function(e,t){return parseFloat(t.on_time_rating)-parseFloat(e.on_time_rating)}))}),n);break;case"TimingFilter":var v,h,_=n,x="",g=null===(h=null===(v=d[1])||void 0===v?void 0:v.slice(1))||void 0===h?void 0:h.split("|").map((function(e){return"TimingFilter"==e?Y(void 0==(x+=e)?"TimingFilter":e,(function(e){return e.filter((function(e){return e}))}),w):"depatureTimeSixAM_to_TwelveAM"==e?Y(void 0==(x+=e)?"depatureTimeSixAM_to_TwelveAM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=o&&e.from_std.split(":")[0]<a}))}),_):"depatureTimeTwelveAM_to_SixPM"==e?Y(void 0==(x+=e)?"depatureTimeTwelveAM_to_SixPM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=a&&e.from_std.split(":")[0]<s}))}),_):"depatureTimeSixPM_to_TwelevePM"==e?Y(void 0==(x+=e)?"depatureTimeSixPM_to_TwelevePM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=s&&e.from_std.split(":")[0]<24}))}),_):"depatureTimeTwelvePM_to_SixAM"==e?Y(void 0==(x+=e)?"depatureTimeTwelevePM_to_SixAm":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=0&&e.from_std.split(":")[0]<o}))}),_):"arivalTimeSixAM_to_TwelveAM"==e?(e,Y(void 0==e?"arivalTimeSixAM_to_TwelveAM":e,(function(e){return e.filter((function(e){return e.to_sta.split(":")[0]>=o&&e.to_sta.split(":")[0]<a}))}),w)):"arivalTimeTwelveAM_to_SixPM"==e?(e,Y(void 0==e?"arivalTimeTwelveAM_to_SixPM":e,(function(e){return e.filter((function(e){return e.to_sta.split(":")[0]>=a&&e.to_sta.split(":")[0]<s}))}),w)):"arivalTimeSixPM_to_TwelevePM"==e?(e,Y(void 0==e?"arivalTimeSixPM_to_TwelevePM":e,(function(e){return e.filter((function(e){return e.to_sta.split(":")[0]>=s&&e.to_sta.split(":")[0]<c}))}),w)):"arivalTimeTwelvePM_to_SixAM"==e?(e,Y(void 0==e?"arivalTimeTwelvePM_to_SixAM":e,(function(e){return e.filter((function(e){return e.to_sta.split(":")[0]>=0&&e.to_sta.split(":")[0]<o}))}),w)):void 0})),b=Array.from(new Map(g.flat().filter((function(e){return void 0!=e})).map((function(e){return[e.train_number,e]})))).map((function(e){return e[1]}));Y(i,(function(e){return e.filter((function(e){return e}))}),0==b.length?n:b);break;case"ArivalList":var y,j,w=n,S=null===(j=null===(y=d[1])||void 0===y?void 0:y.slice(1))||void 0===j?void 0:j.split("|").map((function(e){return"ArivalList"==e?(e,Y(void 0==e?"arivalTimeSixAM_to_TwelveAM":e,(function(e){return e.filter((function(e){return e}))}
1),w)):"arivalTimeSixAM_to_TwelveAM"==e?(e,Y(void 0==e?"arivalTimeSixAM_to_TwelveAM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=o&&e.from_std.split(":")[0]<a}))}),w)):"arivalTimeTwelveAM_to_SixPM"==e?(e,Y(void 0==e?"arivalTimeTwelveAM_to_SixPM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=a&&e.from_std.split(":")[0]<s}))}),w)):"arivalTimeSixPM_to_TwelevePM"==e?(e,Y(void 0==e?"arivalTimeSixPM_to_TwelevePM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=s&&e.from_std.split(":")[0]<c}))}),w)):"arivalTimeTwelvePM_to_SixAM"==e?(e,Y(void 0==e?"arivalTimeTwelvePM_to_SixAM":e,(function(e){return e.filter((function(e){return e.from_std.split(":")[0]>=0&&e.from_std.split(":")[0]<o}))}),w)):void 0})),k=Array.from(new Map(S.flat().filter((function(e){return void 0!=e})).map((function(e){return[e.train_number,e]})))).map((function(e){return e[1]}));Y(i,(function(e){return e.filter((function(e){return e}))}),0==k.length?n:k);break;case"SearchTrain":(0,l.PR)(r)&&(i="".concat(t,"_").concat(r),Y(void 0==i?"SearchTrain":i,(function(e){return[e.find((function(e){return e.train_number==r}))].concat(e.filter((function(e){return e.train_number!=r})))}),n))}return G(i)},ge=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=t.match(/\((.*?)\)/);switch((0,l.PR)(r)&&(0,l.PR)(r[1])&&(t=null===(e=r[1])||void 0===e?void 0:e.split("|")[0]),t){case"AC":var o;if("true"==(null===(o=r[1])||void 0===o?void 0:o.split("|")[1])){var a=["2A","3A","1A","CC","EC","3E"];return X(void 0==i?"AC":i,(function(e){return e.filter((function(e){return a.includes(e.booking_class)}))}),n)}break;case"NONAC":var s;if("true"==(null===(s=r[1])||void 0===s?void 0:s.split("|")[1])){var c=["2A","3A","1A","CC","EC","3E"];return X(void 0==i?"NONAC":i,(function(e){return e.filter((function(e){return!c.includes(e.booking_class)}))}),n)}break;case"CNF":var d;if("true"==(null===(d=r[1])||void 0===d?void 0:d.split("|")[1])){var u=["RAC","AVBL","CURR","AVAILABLE"],f="NOT";return X(void 0==i?"CNF":i,(function(e){return e.filter((function(e){if(0==(null===e||void 0===e?void 0:e.success)||void 0==(null===e||void 0===e?void 0:e.seat_availibility)||(0,l.PR)(null===e||void 0===e?void 0:e.cp_prec)&&(null===e||void 0===e?void 0:e.cp_prec.includes("High"))||(0,l.PR)(null===e||void 0===e?void 0:e.alt_cnf_seat)&&!0===(null===e||void 0===e?void 0:e.alt_cnf_seat))return!0;var t=null===e||void 0===e?void 0:e.seat_availibility[0].class_type,n=!1;return u.forEach((function(i){!"".concat(e.seat_availibility[0]["".concat(t)]).includes(i)||"".concat(e.seat_availibility[0]["".concat(t)]).includes(f)||(n=!0)})),n}))}),n)}break;case"SelectedClass":var p,m=null===(p=r[1])||void 0===p?void 0:p.split("|");if(m.length>1)return X(void 0==i?"SelectedClass":i,(function(e){return e.filter((function(e){return m.includes(e.booking_class)}))}),n);break;case"Remove_Refresh":return Y(void 0==i?"Remove_Refresh":i,(function(e){return e.filter((function(e){return null===e||void 0===e?void 0:e.success}))}),n)}return J(i)},be=function(e){var t=e.trainList,n=void 0===t?void 0:t,i=(e.dataset,e.setter),r=void 0===i?V:i,o=e.filter,a=void 0===o?"journey_quota=GN":o,s=e.callback,d=void 0===s?function(){}:s,u=e.update,f=void 0===u?{status:!1}:u,p=e.additional_train_detail,m=void 0===p?{}:p;Promise.all(null===n||void 0===n?void 0:n.map((function(e){var t=e.train_number,n=e.train_date,i=e.from,r=e.to,o=e.journey_class,s=e.from_station_name,d=e.to_station_name,u=e.d_day,f=e.class_type,p=e.from_sta,v=e.to_sta;e.train_src,e.train_dstn;return new Promise((function(e,h){var _;(0,l.wb)(f),void 0==p&&void 0==v||(0,l.Xk)([p,v]),void 0!=s&&void 0!=d&&(0,l.Dl)({srcCode:i,srcName:s,desCode:r,desName:d});var x,g=n.split("-"),b=(0,l.Mv)(new Date(g[2],g[1]-1,g[0]),-1*u),y=[];"TQ"!=(null===a||void 0===a?void 0:a.split("=")[1])&&y.push({train_number:t,journey_date:n,boarding_from:i,boarding_to:r,journey_class:o,quota:"".concat(null!==(x=null===a||void 0===a?void 0:a.split("=")[1])&&void 0!==x?x:"GN"),urgency:!1,d_day:u}),(0,l.wj)(b,new Date)<2&&y.push({train_number:t,journey_date:n,boarding_from:i,boarding_to:r,journey_class:o,quota:"TQ",urgency:!1,d_day:u}),(0,c.k1)(y,null===j||void 0===j||null===(_=j.current)||void 0===_?void 0:_.device,Q,m).then((function(n){var i=n.new_class_data;n.tbs_data;e({train_data:i,train_number:t})}))}))}))).then((function(e){e.map((function(e){var t=e.train_data,n=e.train_number;if(t){var i=t;1==f.status?(r((function(e){var t,r=null===(t=e["".concat(n)])||void 0===t?void 0:t.map((function(e){var t=i.find((function(t){if(e.booking_class==t.booking_class&&e.train_number==t.train_number&&e.quota==t.quota)return!0}));return void 0==t?e:[t]}));return Ne({},e,Ce({},n,Re(r.flat())))})),d()):r((function(e){return Ne({},e,Ce({},n,Re(i.flat())))}))}})),se(!0)}))},ye=function(e){var t,n,i,r,o,a,s,d,f,p,m,v,h,_,x,g=e.filter,b=void 0===g?"":g,y=e.date,S=void 0===y?""
1:y,k=e.from,C=void 0===k?"":k,N=e.to,Z=void 0===N?"":N;(0,l.PR)(b)||((null===j||void 0===j||null===(r=j.current)||void 0===r||null===(o=r.filter)||void 0===o||null===(a=o.Quota)||void 0===a?void 0:a.General)&&(b="journey_quota=GN"),(null===j||void 0===j||null===(s=j.current)||void 0===s||null===(d=s.filter)||void 0===d||null===(f=d.Quota)||void 0===f?void 0:f.Tatkal)&&(b="journey_quota=TQ"),(null===j||void 0===j||null===(p=j.current)||void 0===p||null===(m=p.filter)||void 0===m||null===(v=m.Quota)||void 0===v?void 0:v.Ladies)&&(b="journey_quota=LD"),(null===j||void 0===j||null===(h=j.current)||void 0===h||null===(_=h.filter)||void 0===_||null===(x=_.Quota)||void 0===x?void 0:x.LowerBirth)&&(b="journey_quota=SS"));(0,l.PR)(S)||(S=null===j||void 0===j||null===(t=j.current)||void 0===t?void 0:t.date),(0,l.PR)(C)||(C=null===j||void 0===j||null===(n=j.current)||void 0===n?void 0:n.from),(0,l.PR)(Z)||(Z=null===j||void 0===j||null===(i=j.current)||void 0===i?void 0:i.to),0==w||j.current.from.code==C.code&&j.current.to.code==Z.code&&j.current.date.toDateString()==S.toDateString()||j.current.seoUpdate.current(C,Z,S);try{_e.current.from.current.innerText=C.code,_e.current.to.current.innerText=Z.code;var R=new Date(S),T=(0,u.JP)(u.zC)[R.getMonth()];_e.current.date.current.innerText="".concat(R.getDate()," ").concat(T)}catch(D){}if((0,l.PR)(null===C||void 0===C?void 0:C.code)&&(0,l.PR)(null===Z||void 0===Z?void 0:Z.code)&&(0,l.PR)(S)){E([]),U([]),te([]),pe([]),re([]),"journey_quota=GN"==b&&(j.current.filter.Quota={General:!0,Tatkal:!1,Ladies:!1,LowerBirth:!1}),"journey_quota=TQ"==b&&(j.current.filter.Quota={General:!1,Tatkal:!0,Ladies:!1,LowerBirth:!1}),"journey_quota=LD"==b&&(j.current.filter.Quota={General:!1,Tatkal:!1,Ladies:!0,LowerBirth:!1}),"journey_quota=SS"==b&&(j.current.filter.Quota={General:!1,Tatkal:!1,Ladies:!1,"Sr. Citizen":!0}),j.current.date=S,j.current.from=C,j.current.to=Z;var P="action=train_between_station&controller=train_ticket_tbs&device_type_id=".concat(j.current.device,"&from_code=").concat(C.code,"&from_name=").concat(C.name,"&journey_date=").concat(O(new Date(S)),"&").concat(b,"&to_code=").concat(Z.code,"&to_name=").concat(Z.name,"&authentication_token=").concat(j.current.authToken,"&v_code=").concat(j.current.vCode);(0,l.Dl)({},!0),(0,l.wb)([],!0),(0,c.Rc)({fromStationCode:C.code,toStationCode:Z.code,dateToday:O(new Date(S)),query:P}).then((function(e){var t,n,i,r,o;se(!0),j.current.alt_availability=null===e||void 0===e?void 0:e.alt_cnf_seat;var a={user_id:j.current.userid,event_name:"Trains Between Stations Viewed",event_data_hash:Ne({},{"ECOMM TYPE":"TRAIN",DEVICE_TYPE:j.current.device,SOURCE:"quick-search-box",src:"Train Ticket",AppVersionCode:j.current.vCode,App_Version_Code:j.current.vCode,utm_referrer:j.current.utm_source,From_StationCode:j.current.from.code,To_StationCode:j.current.to.code,Date_Of_Journey:j.current.date.toDateString()},e.sb_route)};(0,c.ds)("","","",a),j.current.number_of_trains=null===e||void 0===e||null===(t=e.train_between_stations)||void 0===t?void 0:t.length,(null===e||void 0===e||null===(n=e.train_between_stations)||void 0===n?void 0:n.length)>0?(e.train_between_stations.forEach((function(e){var t=e.train_number,n=e.sa_data,i=e.sa_data_tatkal,r=e.from_sta,o=e.to_sta,a=e.from_station_name,s=e.to_station_name,c=e.class_type,d=e.from,u=e.to,f=[];f=(0,l.PR)(i)&&(0,l.PR)(n)?(0,l.Kv)([n,i]):(0,l.PR)(n)?(0,l.Kv)([n]):(0,l.Kv)([i]),(0,l.wb)(c),void 0==r&&void 0==o||(0,l.Xk)([r,o]),void 0!=a&&void 0!=s&&(0,l.Dl)({srcCode:d,srcName:a,desCode:u,desName:s}),V((function(e){return Ne({},e,Ce({},t,Re(f.flat())))}))})),delete e.train_between_stations.sa_data,U(e.train_between_stations),E(e.train_between_stations),he(!1)):(U([]),he(!0),se(!0)),(null===e||void 0===e||null===(i=e.alternate_trains)||void 0===i?void 0:i.length)>0?te(e.alternate_trains):te([]),(null===e||void 0===e||null===(r=e.reserved_trains)||void 0===r?void 0:r.length)>0?pe(e.reserved_trains):pe([]),(null===e||void 0===e||null===(o=e.nearby_station)||void 0===o?void 0:o.length)>0?re(e.nearby_station):re([])}))}};S.current=function(e){var t=e.filter,n=void 0===t?"":t,i=e.date,r=void 0===i?j.current.date:i,o=e.from,a=void 0===o?j.current.from:o,s=e.to,c=void 0===s?j.current.to:s,d=e.searchQuery,u=void 0===d?"":d,f=e.callApi,p=void 0!==f&&f,m=n.split("-"),v={status:!1,name:"",query:""};m.forEach((function(e){if((0,l.PR)(e)){var t={status:!1,name:"",query:"",code:""};[{name:"Ladies",code:"LD"},{name:"General",code:"GN"},{name:"Tatkal",code:"TQ"},{name:"Lower Birth / Sr. Citizen",code:"SS"},{name:"Sr. Citizen",code:"SS"}
1].forEach((function(n){var i=e.match(/\((.*?)\)/);if((0,l.PR)(i)&&n.name==i[1])return t.status=!0,t.query="journey_quota=".concat(n.code),t.name=i[1],t.code=n.code,void(v=t)}));var n=Object.keys(j.current.filter.Quota).filter((function(e){return j.current.filter.Quota[e]}))[0];if(1==t.status&&t.name!=n)return void(v=t)}})),1==p?(se(!1),ye({filter:v.query,date:r,from:a,to:c})):function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=J(""),i="",r=G(""),o="";e.map((function(e){if(0==["General","Tatkal","Ladies","Lower Birth / Sr. Citizen"].includes(e))if((0,l.PR)(e)&&e.includes("SelectedClass")||e.includes("AC")||e.includes("CNF")||e.includes("RemoveRefreshCards")&&0!=Object.keys(Q).length){var a=ge(e,n,i+=e);(0,l.PR)(a)&&(n=a)}else if((0,l.PR)(e)){var s=xe(e,r,o+=e,(0,l.PR)(t)?t:N.current);(0,l.PR)(s)&&(r=s)}})),E((function(e){return Ne({},e,{train_between_stations:r})})),B(n)}(m,u)},(0,r.useEffect)((function(){var e,t,n,i,r,o,a,s,d,u,f,p,m,v,h,_,x=(0,l.PC)(),g={step:"New_TBS_tbs_loaded",ecomm_type:"train_ticket_booking",utm_referrer:null===j||void 0===j||null===(e=j.current)||void 0===e?void 0:e.utm_source,user_id:null===x||void 0===x?void 0:x.userId,device_type_id:null===j||void 0===j||null===(t=j.current)||void 0===t?void 0:t.device,from_station:null===j||void 0===j||null===(n=j.current)||void 0===n||null===(i=n.from)||void 0===i?void 0:i.code,to_station:null===j||void 0===j||null===(r=j.current)||void 0===r||null===(o=r.to)||void 0===o?void 0:o.code,journey_date:(0,T.xq)(null===j||void 0===j||null===(a=j.current)||void 0===a?void 0:a.date),number_of_trains:null===j||void 0===j||null===(s=j.current)||void 0===s?void 0:s.number_of_trains,filters_applied:null===k||void 0===k?void 0:k.current,v_code:null===(d=j.current)||void 0===d?void 0:d.vCode,src:null===j||void 0===j||null===(u=j.current)||void 0===u?void 0:u.src,original_from:null===j||void 0===j||null===(f=j.current)||void 0===f||null===(p=f.from)||void 0===p?void 0:p.code,original_to:null===j||void 0===j||null===(m=j.current)||void 0===m||null===(v=m.to)||void 0===v?void 0:v.code,alt_availability:null===j||void 0===j||null===(h=j.current)||void 0===h?void 0:h.alt_availability,trip_guarantee:null===j||void 0===j||null===(_=j.current)||void 0===_?void 0:_.trip_guarantee};ae&&(0,c.yW)("","",g)}),[ae,k.current]),(0,r.useEffect)((function(){ae&&Object.keys(Q).length>0&&S.current({filter:k.current,date:j.current.date,from:j.current.from,to:j.current.to,seoApiCall:!1})}),[Q]),(0,r.useEffect)((function(){ae?setTimeout((function(){de(!1)}),50):de(!0)}),[ae]),(0,r.useEffect)((function(){de(!0),S.current({filter:k.current,date:j.current.date,from:j.current.from,to:j.current.to,callApi:!0,seoApiCall:!1})}),[F.query.from_sta_code,F.query.to_sta_code,F.query.journey_date]);var ke=(0,r.useState)([]),Te=ke[0],De=ke[1],Ie=null===Te||void 0===Te?void 0:Te.filter((function(e){return 1==e.status})),Ae=(0,r.useState)(!1),Oe=Ae[0],Fe=Ae[1];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.Z,{sx:{display:"flex",mb:1},children:[(0,i.jsx)(p.Z,{routeInfoRef:j,filterStringApply:k,dataFilter:S,searchQuery:N,getTrainList:C,loading:ce,setClassFilterApplied:De,setShowClassFilterTost:Fe}),(0,i.jsxs)(o.Z,{sx:{flexGrow:4,width:"70%",ml:1.5},children:[(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(m.Z,{filterStringApply:k,dataFilter:S,routeInfoRef:j,headerDateStripSelection:R,booking_window:A,setLoader:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&de(!0)}}),ae&&(0,i.jsxs)(o.Z,{sx:{mt:1},children:[(0,i.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"space-between",pt:1,pb:1},children:[(0,l.PR)(null===z||void 0===z?void 0:z.train_between_stations)&&(null===z||void 0===z||null===(t=z.train_between_stations)||void 0===t?void 0:t.length)>0||ve?(0,i.jsxs)(a.Z,{component:D?"h1":"div",sx:{color:"#000000",fontSize:"16px",fontWeight:"400"},children:[D&&"".concat(null===j||void 0===j||null===(n=j.current)||void 0===n||null===(h=n.from)||void 0===h?void 0:h.name," to ").concat(null===j||void 0===j||null===(_=j.current)||void 0===_||null===(x=_.to)||void 0===x?void 0:x.name," Trains (").concat(null===z||void 0===z||null===(g=z.train_between_stations)||void 0===g?void 0:g.length," Trains)"),!D&&"We have found"," ",!D&&(0,i.jsx)(i.Fragment,{children:(null===z||void 0===z||null===(b=z.train_between_stations)||void 0===b?void 0:b.length)>0?"".concat(z.train_between_stations.length," trains on or near this route"):"0 trains on this route"})," "]}):(0,i.jsxs)(a.Z,{component:"div",sx:{color:"#000000",fontSize:"16px",fontWeight:"400"},children:[" ","\xa0"," "]}),(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",minWidth:"250px"},children:[(0,i.jsx)(a.Z,{children:"Sorted By"}),(0,i.jsx)(o.Z,{sx:{flexGrow:1},children:(0,i.jsx)(v.Z,{routeInfoRef:j,filterStringApply:k,dataFilter:S,searchQuery:N,busRef:Z})})]})]}),ve&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Se,{routeInfoRef:j,reference:_e,hideAllBtns:(null===ie||void 0===ie?void 0:ie.length)>0||(null===ee||void 0===ee?void 0:ee.length)>0||(null===fe||void 0===fe?void 0:fe.length)>0})}),ce?(0,i.jsx)(K.R2,{}):(0,i.jsxs)(i.Fragment,{children:[0===(null===Ie||void 0===Ie?void 0:Ie.length)&&Oe&&(0,i.jsx)(Pe,{}),(null===z||void 0===z||null===(y=z.train_between_stations)||void 0===y?void 0:y.length)>0&&(0,i.jsx)(je,{trainList:null===z||void 0===z?void 0:z.train_between_stations,trainsCard:L,cardRef:be,routeInfoRef:j,alterNateTrain:!1}
1)]}),(null===ee||void 0===ee?void 0:ee.length)>0&&(0,i.jsx)(we,{trainList:ee,cardRef:be,openAlternateTrain:!0,routeInfoRef:j})]})]}),ce&&(0,i.jsx)(K.R2,{})]})]}),(0,i.jsxs)(o.Z,{sx:{mt:5},children:[(0,i.jsx)(a.Z,{component:"div",sx:{fontSize:"28px",textAlign:"center",color:"#333333"},children:"Why To Book Train Tickets With RailYatri?"}),(0,i.jsx)(o.Z,{sx:{maxWidth:"100%",margin:"auto"},children:(0,i.jsxs)(s.ZP,{container:!0,sx:{mt:"20px",justifyContent:"center"},children:[(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/irctclogo-1710316210.png",alt:"irctc logo",width:"55px",height:"65px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Authorized & Reliable"}),(0,i.jsx)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:"IRCTC Authorized Partner"})]})]}),(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/ticketbooking-1710317193.png",alt:"ticket booking logo",width:"60px",height:"60px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Ticket booking"}),(0,i.jsx)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:"Within 2 minutes"})]})]}),u.Fw&&(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/freecancellation-1710317372.png",alt:"free cancellation logo",width:"60px",height:"60px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Free Cancellation"}),(0,i.jsxs)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:["Get full refund",(0,i.jsx)("br",{}),"on base fare"]})]})]}),(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/tripalert-1710317631.png",alt:"trip alert logo",width:"55px",height:"65px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Trip Alerts"}),(0,i.jsxs)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:["Get alerts for your",(0,i.jsx)("br",{}),"train timings"]})]})]}),(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/livetracking-1710317854.png",alt:"live tracking logo",width:"65px",height:"70px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Live Tracking"}),(0,i.jsxs)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:["Track your train's",(0,i.jsx)("br",{}),"live status"]})]})]}
1),(0,i.jsxs)(s.ZP,{item:!0,xs:2,sx:{display:"flex",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)(o.Z,{sx:{background:"#ffffff",height:"100px",width:"100px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",mb:1.5},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/supporticon-1710317995.png",alt:"support icon",width:"70px",height:"55px"})}),(0,i.jsxs)(a.Z,{component:"div",sx:{fontSize:"1.5rem",textAlign:"center",fontWeight:"700"},children:[(0,i.jsx)("div",{children:"Customer Support"}),(0,i.jsxs)("div",{style:{fontSize:"1.35rem",color:"#333333",fontWeight:"400",marginTop:"5px"},children:["On-time support",(0,i.jsx)("br",{}),"and refund"]})]})]})]})})]})]})}},58936:function(e,t,n){"use strict";n.d(t,{Z:function(){return B}});var i=n(85893),r=n(67294),o=n(74223),a=n(66720),s=n(5616),l=n(15861),c=n(23795),d=n(69417),u=n(93946),f=n(1531),p=n(61599),m=n(35294),v=n(23599),h=n(21596);function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){_(e,t,n[t])}))}return e}function g(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b=(0,r.forwardRef)((function(e,t){var n=e.parentMenuOpen,o=e.label,a=e.rightIcon,s=void 0===a?(0,i.jsx)(h.Z,{style:{fontSize:16}}):a,l=e.keepOpen,c=e.children,d=e.customTheme,u=e.className,f=e.tabIndex,p=e.ContainerProps,_=void 0===p?{}:p,b=e.rightAnchored,y=g(e,["parentMenuOpen","label","rightIcon","keepOpen","children","customTheme","className","tabIndex","ContainerProps","rightAnchored"]),j=_.ref,w=g(_,["ref"]),S=(0,r.useRef)(null);r.useImperativeHandle(t,(function(){return S.current}));var k=(0,r.useRef)(null);r.useImperativeHandle(j,(function(){return k.current}));var C,N=(0,r.useRef)(null),Z=(0,r.useState)(!1),R=Z[0],T=Z[1],P=function(){var e,t,n,i,r=null===(e=k.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement,o=!0,a=!1,s=void 0;try{for(var l,c=(null!==(i=null===(n=N.current)||void 0===n?void 0:n.children)&&void 0!==i?i:[])[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){if(l.value===r)return!0}}catch(d){a=!0,s=d}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}return!1},D=R&&n;return e.disabled||(C=void 0!==f?f:-1),(0,i.jsxs)("div",x({},w,{ref:k,onFocus:function(e){e.target===k.current&&T(!0),(null===w||void 0===w?void 0:w.onFocus)&&w.onFocus(e)},tabIndex:C,onMouseEnter:function(e){T(!0),(null===w||void 0===w?void 0:w.onMouseEnter)&&w.onMouseEnter(e)},onMouseLeave:function(e){T(!1),(null===w||void 0===w?void 0:w.onMouseLeave)&&w.onMouseLeave(e)},onKeyDown:function(e){var t,n;if("Escape"!==e.key){P()&&e.stopPropagation();var i,r=null===(t=k.current)||void 0===t||null===(n=t.ownerDocument)||void 0===n?void 0:n.activeElement;if("ArrowLeft"===e.key&&P())null===(i=k.current)||void 0===i||i.focus();if("ArrowRight"===e.key&&e.target===k.current&&e.target===r){var o,a=null===(o=N.current)||void 0===o?void 0:o.children[0];null===a||void 0===a||a.focus()}}},children:[(0,i.jsxs)(v.Z,x({},y,{"data-open":!!D||void 0,className:u,ref:S,keepOpen:l,children:[o,(0,i.jsx)("div",{style:{flexGrow:1}}),s]})),(0,i.jsx)(m.Z,{hideBackdrop:!0,style:{pointerEvents:"none"},anchorEl:S.current,anchorOrigin:{vertical:"top",horizontal:b?"left":"right"},transformOrigin:{vertical:"top",horizontal:b?"right":"left"},css:d,open:!!D,autoFocus:!1,disableAutoFocus:!0,disableEnforceFocus:!0,onClose:function(){T(!1)},children:(0,i.jsx)("div",{ref:N,style:{pointerEvents:"auto"},children:c})})]}))}));function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function S(){var e=w(["\n  display: flex;\n  justify-content: space-between !important;\n  min-width:250px;\n  padding:10px;\n\n  & > svg {\n    margin-left: 32px;\n  }\n"]);return S=function(){return e},e}function k(){var e=w(["\n  display: flex;\n  justify-content: space-between !important;\n\n  & > svg {\n    margin-left: 32px;\n  }\n"]);return k=function(){return e},e}var C=(0,r.forwardRef)((function(e,t){var n=e.trigger,o=e.menu,a=e.keepOpen,s=e.isOpen,l=e.onOpen,c=e.minWidth,d=(0,r.useState)(null),u=d[0],f=d[1],p=s||u,v=(0,r.useRef)(null);t&&(v=t);var h=function(e){e.stopPropagation(),v.current&&v.current.contains(e.target)||_()},_=function(){l?l(null):f(null)},x=function(e,t){var n=e.props,i=n.keepOpen,o=j(n,["keepOpen"]),s={};return o.menu&&(s={parentMenuOpen:p}),(0,r.createElement)(e.type,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){y(e,t,n[t])}))}return e}({},o,{key:t},s,{onClick:function(t){t.stopPropagation(),a||i||h(t),e.props.onClick&&e.props.onClick(t)},children:o.menu?r.Children.map(o.menu,x):o.children}))};return(0,i.jsxs)(i.Fragment,{children:[(0,r.cloneElement)(n,{onClick:p?_:function(e){e.stopPropagation(),o.length&&(l?l(e.currentTarget):f(e.currentTarget))},ref:v}),(0,i.jsx)(m.Z,{PaperProps:{sx:{minWidth:null!==c&&void 0!==c?c:0}},anchorEl:p,open:!!p,onClose:h,children:r.Children.map(o,x)})]})})),N=(0,p.Z)(v.Z)(S()),Z=((0,p.Z)(b)(k()),n(9473)),R=n(12978),T=n(75321),P=n(31955);function D(){var e=(0,Z.I0)(),t=(0,r.useState)(null),n=t[0],o=t[1],a=Boolean(n),c=(0,r.useCallback)((function(e){o(e.currentTarget)}),[]),u=(0,r.useCallback)((function(){o(null)}),[]),p=(0,r.useMemo)((function(){return(0,f.PC)()}),[]),h=(0,r.useCallback)((function(){var t=-parseInt(Date.now()/1e4)+parseInt(9e3*Math.random()+1e3)+parseInt(9900*Math.random()+100);P.Z.set("userId",t),P.Z.set("user_id",t),P.Z.set("web_loc_user_id",t),P.Z.remove("New_User_token"),P.Z.remove("phoneNumber"),e((0,R.dX)(!1)),u()}),[e,u]);return(0,i.jsxs)(s.Z,{className:"Mui-loggedin__menu_wrapper",children:[(0,i.jsxs)(d.Z,{id:"basic-button","aria-controls":a?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":a?"true":void 0,onClick:c,className:"Mui-loggedin_menu__cta",fullWidth:!0,children:[(0,i.jsx)(l.Z,{component:"div",className:"Mui-loggedin_user__icon",children:"T"}),(0,i.jsxs)(s.Z,{className:"Mui-say_hello__user_wrapper",children:["Hi Traveller",(0,f.PR)(null===p||void 0===p?void 0:p.PhoneNumber)&&(0,i.jsx)(l.Z,{className:"Mui-loggedin__user_phone",children:null===p||void 0===p?void 0:p.PhoneNumber})]}),(0,i.jsx)("img",{src:null===T.ci||void 0===T.ci?void 0:T.ci.loggedindropicon,alt:"Logout Drop Icon",width:"12px"})]}),(0,i.jsx)(m.Z,{id:"basic-menu",anchorEl:n,open:a,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},sx:{"& .MuiPaper-root":{minWidth:"142px",borderRadius:"6.536px",border:"1px solid #CFCFCF",background:"#FFF"}},children:(0,i.jsxs)(v.Z,{onClick:h,children:[(0,i.jsx)("img",{src:null===T.ci||void 0===T.ci?void 0:T.ci.dweblogouticon,alt:"Logout Icon",width:"10px"}),(0,i.jsx)(l.Z,{component:"span",className:"Mui-logout__cta_title",children:"Logout"})]})})]})}var I,A=[{name:"Train Tickets",link:"/train-ticket?utm_source=dwebhome_header_ttb&device_type_id=6",offer:"",submemus:{moresrc:"",items:[]}},{name:"IntrCity SmartBus",link:"/bus-booking?utm_source=dwebhome_header_smartbus",offer:"https://images.railyatri.in/ry_images_prod/greenCheckH-1705659926.png",submemus:{moresrc:"",items:[]}},{name:"Food On Train",link:"/buy-food-in-train?utm_source=ry_web_home_page_main_menu&utm_medium=DESKTOP_WEB",offer:"",submemus:{moresrc:"",items:[]}},{name:"Train Info",link:"",imgsrc:"https://images.railyatri.in/ry_images_prod/dropmenuicon-1709982536.png",submemus:{items:[{name:"Live Train Status",link:"/live-train-status?utm_source=train_ticket_search_dweb_header_lts",imgsrc:"https://images.railyatri.in/ry_images_prod/ltsLive-1600932425.png"},{name:"PNR Status",link:"/pnr-status?utm_source=lts_search_dweb_header_pnr_status",imgsrc:"https://images.railyatri.in/ry_images_prod/PNRicon-1594282204.png"},{name:"Time Table",link:"/time-table?utm_source=pnr_search_dweb_header_time_table",imgsrc:"https://images.railyatri.in/ry_images_prod/time-table-1594282211.png"},{name:"Train Between Stations",link:"/trains-between-stations?utm_source=time_table_search_dweb_header_tbs",imgsrc:"https://images.railyatri.in/ry_images_prod/tbsicon-1594282209.png"},{name:"Seat Availability",link:"/seat-availability?utm_source=tbs_search_dweb_header_sa",imgsrc:"https://images.railyatri.in/ry_images_prod/seat--booking-1594273182.png"},{name:"Arrival Departure",link:"/arrival-departure?utm_source=sa_search_dweb_header_ad",imgsrc:"https://images.railyatri.in/ry_images_prod/arr-dep-1600852988.png"}]}},{name:"More",link:"",imgsrc:"https://images.railyatri.in/ry_images_prod/dropmenuicon-1709982536.png",submemus:{moresrc:"https://images.railyatri.in/ry_images_prod/drparw-1595225122.png",items:[{name:"About Us",link:"/about-us",imgsrc:"https://images.railyatri.in/ry_images_prod/ry-help-1594273865.png"},{name:"Contact Us",link:"/contact-us",imgsrc:"https://images.railyatri.in/ry_images_prod/mail-contact-1594273862.png"}
1,{name:"Offers",link:"/offers",imgsrc:"https://images.railyatri.in/ry_images_prod/sale-offer-1594273867.png"},{name:"Cancellations & Refunds",link:"https://refunds.railyatri.in/",imgsrc:"https://images.railyatri.in/ry_images_prod/cancel-1594273858.png"},{name:"Account Deletion",link:"/user_deletion",imgsrc:"https://images.railyatri.in/ry_images_prod/AccountDelete-1717738244.png"}]}}];function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F=(0,n(68239).Z)({palette:{background:{default:"#F5F5F5 !important"}},typography:{htmlFontSize:16},components:{MuiCssBaseline:{styleOverrides:(I={html:{fontSize:"12px !important","@media screen and (max-width:480px)":{fontSize:"11px !important"}},".Mui-menu__wrapper":{display:"flex",alignItems:"center",justifyContent:"flex-start",flexGrow:2},".Mui-menu_item__wrapper":{marginLeft:"8px",display:"flex","& > :not(style)":{margin:"4px"}},".Mui-login_menu__wrapper":{display:"flex",flexGrow:3,justifyContent:"end"},".Mui-guest_cta__wrapper":{width:"142px",display:"flex",justifyContent:"end",marginLeft:"8px"},".Mui-login__icon_wrapper":{background:"#004F9E",width:"33px",height:"33px",borderRadius:"50%",marginLeft:"5px",display:"flex",alignItems:"center",justifyContent:"center"}},O(I,".Mui-login_menu__wrapper",{display:"flex",flexGrow:3,justifyContent:"end"}),O(I,".Mui-loggedin__menu_wrapper",{display:"flex",minWidth:"150px"}),O(I,".Mui-say_hello__user_wrapper",{color:"#333",textAlign:"left",fontSize:"14px",fontWeight:700,marginLeft:"4px",marginRight:"4px"}),I)},MuiIconButton:{styleOverrides:{root:{"&.Mui-login__cta":{fontSize:"14px",color:"#6f6f6f",margin:"0px",padding:"0px"}}}},MuiButton:{styleOverrides:{root:{"&.Mui-menu_nav_cta":{textTransform:"capitalize",color:"#333333",fontSize:"14px",fontWeight:"500"},"&.Mui-menu_nav_cta.Mui-active_menu":{borderBottom:"2px solid #4990e2",borderRadius:"5px 5px 0 0"},"&.Mui-loggedin_menu__cta":{display:"flex",justifyContent:"space-between",textTransform:"capitalize",fontSize:"16px",background:"#ffffff",marginLeft:"8px",borderRadius:"10px",border:"1px solid #CFCFCF","&:hover":{background:"#ffffff"},paddingRight:"20px"}}}},MuiTypography:{styleOverrides:{root:{"&.Mui-submenu__item_title":{color:"black",display:"flex",alignItems:"center",fontSize:"14px"},"&.Mui-loggedin_user__icon":{width:"25px",height:"25px",background:"#004F9E",color:"#ffffff",borderRadius:"50%",lineHeight:"25px",fontWeight:700},"&.Mui-loggedin__user_phone":{color:"#333",lineHeight:"12px",fontSize:"12px",fontWeight:400},"&.Mui-logout__cta_title":{marginLeft:"8px",color:"#333",fontSize:"14px",fontWeight:700}}}}}});function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},E.apply(this,arguments)}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){z(e,t,n[t])}))}return e}function L(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B=function(e){var t=E({},e),n=(0,Z.v9)((function(e){return e.homepage})).isPassangerLoggedin,p=(0,Z.I0)(),m=(0,f.PC)(),v=(0,r.useState)({userId:null===m||void 0===m?void 0:m.userId,phoneNumber:null===m||void 0===m?void 0:m.PhoneNumber,auth_token:null===m||void 0===m?void 0:m.New_User_token,isctavisible:!1}),h=v[0],_=v[1],x=t.activemenu,g=t.canshowlogincta,b=(0,r.useCallback)((function(e,t){return t.some((function(t){var n,i=(null===t||void 0===t||null===(n=t.link)||void 0===n?void 0:n.split("?"))[0];return e===i}))}),[]),y=(0,r.useMemo)((function(){var e=window.location.pathname.split("/");return(0,f.PR)(e[1])?"/".concat(e[1]):""}),[]),j=(0,r.useState)([]),w=j[0],S=j[1];return(0,r.useEffect)((function(){var e=A.map((function(e){var t,n,i=e.submemus,r=e.moresrc,o=(null===e||void 0===e||null===(t=e.link)||void 0===t?void 0:t.split("?"))[0],a=!1;((0,f.PR)(o)&&(a=o===y||e.submemus&&b(y,e.submemus.items)),(0,f.PR)(x))&&(a=o==="/".concat(x)||(null===e||void 0===e||null===(n=e.name)||void 0===n?void 0:n.toLowerCase())===x);return W({},e,{isactive:a,submemus:{moresrc:r,items:L(i.items)}})}));S(e)}),[y,A,x,b]),(0,r.useEffect)((function(){_((function(e){return W({},e,{isctavisible:!0})}
1))}),[]),(0,i.jsxs)(o.Z,{theme:F,children:[(0,i.jsx)(a.ZP,{}),(0,i.jsx)(s.Z,{className:"Mui-menu__wrapper",children:(0,i.jsx)(s.Z,{className:"Mui-menu_item__wrapper",children:null===w||void 0===w?void 0:w.map((function(e,t){var n,r;return(0,i.jsx)(C,{trigger:""!==e.link?(0,i.jsx)(c.Z,{underline:"none",href:e.link,rel:"noopener noreferrer",children:(0,i.jsxs)(d.Z,{className:"Mui-menu_nav_cta".concat((null===e||void 0===e?void 0:e.isactive)?" Mui-active_menu":""),children:[null===e||void 0===e?void 0:e.name,(0,i.jsx)("img",{width:"72px",src:null===e||void 0===e?void 0:e.offer,style:{position:"absolute",top:"-11px"}})]})}):(0,i.jsxs)(d.Z,{className:"Mui-menu_nav_cta".concat((null===e||void 0===e?void 0:e.isactive)?" Mui-active_menu":""),children:[null===e||void 0===e?void 0:e.name,(0,i.jsx)("img",{width:"10px",src:null===e||void 0===e?void 0:e.imgsrc,style:{marginLeft:"3px"}})]}),menu:null===e||void 0===e||null===(n=e.submemus)||void 0===n||null===(r=n.items)||void 0===r?void 0:r.map((function(e,t){return(0,i.jsx)(N,{onClick:function(){},children:(0,i.jsx)(c.Z,{underline:"none",href:e.link,rel:"noopener noreferrer",children:(0,i.jsxs)(l.Z,{className:"Mui-submenu__item_title",children:[(0,i.jsx)("img",{width:"14px",src:null===e||void 0===e?void 0:e.imgsrc,style:{marginRight:"5px"}}),(0,i.jsx)("span",{children:e.name})]})})},t)}))},t)}))})}),g&&(0,i.jsx)(s.Z,{className:"Mui-login_menu__wrapper",children:(null===h||void 0===h?void 0:h.isctavisible)?n?(0,i.jsx)(D,{}):(0,i.jsx)(s.Z,{className:"Mui-guest_cta__wrapper",children:(0,i.jsxs)(u.Z,{className:"Mui-login__cta",onClick:function(){p((0,R.az)({isphonevisible:!0,isloginvisible:!0,isintro:!0}))},children:["Login",(0,i.jsx)(s.Z,{className:"Mui-login__icon_wrapper",children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/Group-1709564168.png"})})]})}):null})]})}},71673:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var i=n(85893),r=n(67294),o=n(11163),a=n(1531),s=n(26461),l=n(5616),c=n(15861),d=n(53457),u=n(66836),f=n(69368),p=n(45843),m=n(86886),v=n(93946),h=n(58377),_=n(68239),x=n(74223),g=n(90966),b=n(41495),y=function(e){var t=e.selectfun,n=e.loading,r=e.setSelectedClass,o=e.selectedClass;return 1==n?(0,i.jsx)(b.cp,{count:4}):(0,i.jsxs)(l.Z,{sx:{mt:2},children:[(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:(0,i.jsx)(l.Z,{sx:{display:"flex",alignItems:"center"},children:(0,i.jsx)(c.Z,{sx:{color:"#333333",fontSize:"18px",fontWeight:600},children:"Class"})})}),(0,i.jsx)(m.ZP,{container:!0,sx:{mt:"20px"},children:o.map((function(e){return(0,i.jsx)(m.ZP,{item:!0,xs:12,children:(0,a.PR)(e.classname)&&(0,i.jsx)(u.Z,{control:(0,i.jsx)(f.Z,{onClick:function(){return t({dataset:o,setter:r,key:e.key,status:!e.status})},checked:e.status}),sx:{width:"100%","& .MuiTypography-root":{width:"100%"}},label:(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",m:0,p:0},children:(0,i.jsxs)(c.Z,{component:"span",sx:{color:"#141823",fontWeight:"500",fontSize:"14px"},children:[e.key," - ",e.classname]})})})},"".concat(e.key,"_ariv"))}))})]})},j=function(e){var t,n=e.selectfun,r=e.loading,o=e.depatureTime,a=e.setDepatureTime,s=["Morning","Afternoon","Evening","Night"];return 1==r?(0,i.jsx)(b.cp,{count:4}):(0,i.jsxs)(l.Z,{sx:{mt:2},children:[(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:(0,i.jsx)(l.Z,{sx:{display:"flex",alignItems:"center"},children:(0,i.jsx)(c.Z,{sx:{color:"#333333",fontSize:"18px",fontWeight:600},children:"Departure Time"})})}),(0,i.jsx)(m.ZP,{container:!0,sx:{mt:"20px"},children:null===(t=null===s||void 0===s?void 0:s.map((function(e){return null===o||void 0===o?void 0:o.find((function(t){return t.label==e}))})))||void 0===t?void 0:t.map((function(e,t){return void 0==e?(0,i.jsx)("div",{},"".concat(null===e||void 0===e?void 0:e.key).concat(t,"_depature")):(0,i.jsx)(m.ZP,{item:!0,xs:12,children:(0,i.jsx)(u.Z,{control:(0,i.jsx)(f.Z,{onClick:function(){return n({dataset:o,setter:a,key:e.key,status:!e.status})},checked:e.status}),sx:{width:"100%","& .MuiTypography-root":{width:"100%"}},label:(0,i.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",m:0,p:0},children:[(0,i.jsx)(c.Z,{component:"span",sx:{color:"#141823",fontWeight:"700",fontSize:"14px"},children:e.label}),(0,i.jsx)(c.Z,{component:"span",sx:{color:"#777777",fontWeight:"400",fontSize:"13px"},children:e.text})]})})},"".concat(e.key).concat(t,"_depature"))}))})]})},w=function(e){var t=e.selectfun,n=e.loading,r=e.arivalTime,a=e.setArivalTime;(0,o.useRouter)();return 1==n?(0,i.jsx)(b.cp,{count:4}):(0,i.jsxs)(l.Z,{sx:{mt:2},children:[(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:(0,i.jsx)(l.Z,{sx:{display:"flex",alignItems:"center"},children:(0,i.jsx)(c.Z,{sx:{color:"#333333",fontSize:"18px",fontWeight:600},children:"Arrival Time"})})}),(0,i.jsx)(m.ZP,{container:!0,sx:{mt:"20px"},children:["Morning","Afternoon","Evening","Night"].map((function(e){return r.find((function(t){return t.label==e}))})).map((function(e,n){return void 0==e?(0,i.jsx)("div",{},"".concat(null===e||void 0===e?void 0:e.key).concat(n,"_arival")):(0,i.jsx)(m.ZP,{item:!0,xs:12,children:(0,i.jsx)(u.Z,{control:(0,i.jsx)(f.Z,{onClick:function(){return t({dataset:r,setter:a,key:e.key,status:!e.status})},checked:e.status}),sx:{width:"100%","& .MuiTypography-root":{width:"100%"}},label:(0,i.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",m:0,p:0},children:[(0,i.jsx)(c.Z,{component:"span",sx:{color:"#141823",fontWeight:"700",fontSize:"14px"},children:e.label}),(0,i.jsx)(c.Z,{component:"span",sx:{color:"#777777",fontWeight:"400",fontSize:"13px"},children:e.text})]})})},"".concat(e.key,"_arival"))}))})]})};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}
1function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){k(e,t,n[t])}))}return e}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(l){s=!0,r=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z=(0,_.Z)({typography:{htmlFontSize:12},components:{MuiSwitch:{styleOverrides:{switchBase:{color:"#969696"},track:{borderRadius:"10px",background:"#ffffff",border:"2px solid #969696"}}}}}),R=(0,h.Z)({root:{width:38,height:20,padding:0,borderRadius:"0px",margin:"0px",marginTop:"10px",display:"flex","& .MuiSwitch-input":{margin:"0px"}},switchBase:{padding:1.5,"&$checked":{transform:"translateX(16px)",color:"#fff","& + $track":{opacity:1,backgroundColor:"#6AC158",borderColor:"#6AC158",margin:"0px"}}},switchInput:{margin:"0px 0px 0px  0px !important"},thumb:{width:18,height:16,margin:0,padding:0,marginTop:"1.2px",boxShadow:"none",borderRadius:"20%",color:"#ffffff"},track:{border:"1px solid #e9e9e9",borderRadius:6,opacity:1,backgroundColor:"#918C8A"},checked:{}})(p.Z);var T=function(e){var t=e.routeInfoRef,n=e.filterStringApply,p=e.dataFilter,h=e.loading,_=e.setClassFilterApplied,b=e.setShowClassFilterTost,S=(0,r.useState)([{key:t.current.from.code,code:t.current.from.code,status:!1}]),k=S[0],T=S[1],P=(0,r.useState)([{key:t.current.to.code,code:t.current.to.code,status:!1}]),D=P[0],I=P[1],A=["2A","3A","1A","CC","EC","3E"],O=(0,r.useState)([{key:1,status:s.hX.AC}]),F=O[0],M=O[1],z=(0,r.useState)([]),E=z[0],W=z[1],L=(0,r.useState)([{key:1,status:s.hX.CNF}]),B=L[0],q=L[1],U=(0,r.useState)([]),Y=U[0],G=U[1],H=(0,r.useState)([]),Q=H[0],V=H[1],X=(0,r.useState)((0,s.JP)(s.DN).map((function(e){var t;return{name:e.name,key:e.code,sortForm:e.sortForm,status:null!==(t=s.hX.Quota["".concat(e.name)])&&void 0!==t?t:"GN"==e.sortForm}}))),J=X[0],K=X[1];(0,r.useEffect)((function(){0==h&&(G(Object.keys(a.cG).map((function(e){return{key:e,label:a.cG["".concat(e)].labelText,text:a.cG["".concat(e)].text,status:s.hX.Departure.includes(e)}}))),V(Object.keys(a.$W).map((function(e){return{key:e,label:a.$W["".concat(e)].labelText,text:a.$W["".concat(e)].text,status:s.hX.Departure.includes(e)}}))),W(Object.entries(a.sk).map((function(e){var t=N(e,2),n=t[0],i=t[1],r=(0,s.JP)(s.$C).find((function(e){return e.code===n})),o=r?r.name:i;return{key:n,classname:o,status:s.hX.SelectedClass.includes(n)}}))))}),[h]);var $=function(e){var t=e.dataset,n=e.setter,i=e.key,r=e.status;n(t.map((function(e){return e.key==i&&(e.status=r),e})))},ee=(0,r.useState)(""),te=ee[0],ne=ee[1],ie=(0,r.useState)(!1),re=ie[0],oe=ie[1],ae=(0,o.useRouter)();(0,r.useEffect)((function(){if(!re&&ae.isReady){var e=ae.query.filterclass;if(e&&0!==E.length){var t=e?e.split("|"):[];b(!!e),ne(t),t.forEach((function(e){$({dataset:E,setter:W,key:e,status:!0})})),oe(!0)}}}),[ae.isReady,ae.query.filterclass,E.length]),(0,r.useEffect)((function(){_(E.filter((function(e){return!te.includes(e.code)})))}),[E,W]);var se=(0,r.useState)(!1),le=se[0],ce=se[1];(0,r.useEffect)((function(){if(!le&&ae.isReady){var e=ae.query.filterAC;e&&0!==F.length&&($({dataset:F,setter:M,key:e,status:!0}),ce(!0))}}),[ae.isReady,ae.query.filterAC,F.length]);var de=(0,r.useState)(!1),ue=de[0],fe=de[1];(0,r.useEffect)((function(){if(!ue&&ae.isReady){var e=ae.query.confirmSeat;e&&0!==B.length&&($({dataset:B,setter:q,key:e,status:!0}),fe(!0))}}),[ae.isReady,ae.query.confirmSeat,B.length]);var pe=(0,r.useState)(!1),me=pe[0],ve=pe[1];(0,r.useEffect)((function(){if(!me&&ae.isReady){var e=ae.query.morningDeparture;e&&0!==Q.length&&($({dataset:Y,setter:G,key:e,status:!0}),ve(!0))}}),[ae.isReady,ae.query.morningDeparture,Q.length]);var he,_e,xe=function(e){var t=e.dataset,n=e.setter,i=e.key,r=e.status;n(t.map((function(e){return e.key==i?e.status=r:e.status=!1,e})))},ge=(0,r.useState)(!1),be=ge[0],ye=ge[1];return(0,r.useEffect)((function(){if(ae.isReady&&!be){var e=ae.query.homequota;e&&0!==J.length&&(xe({dataset:J,setter:K,key:e,status:!0}),ye(!0))}}),[ae.isReady]),(0,r.useEffect)((function(){!function(){n.current=(0,g.dC)({CNF:"CNF|".concat(B[0].status,"|"),AC:"AC|".concat(F[0].status,"|"),NONAC:"NONAC|false|",Quota:J.reduce((function(e,t){return t.status&&(e+=t.name,e+="|"),e}),""),SortBy:Object.keys(s.hX.SortBy).reduce((function(e,t){return s.hX.SortBy["".concat(t)]&&(e+=t,e+="|"),e}),""),SelectedClass:E.reduce((function(e,t){return t.status&&(e+=t.key,e+="|"),e}),"SelectedClass|"),TimingFilter:"TimingFilter|"+Y.reduce((function(e,t){return t.status&&(e+="".concat(t.key,"|")),e}),"")+Q.reduce((function(e,t){return t.status&&(e+="".concat(t.key,"|")),e}),""),Origin:k.reduce((function(e,t){return t.status&&(e+=t.key,e+="|"),e}),"Origin|"),Destination:D.reduce((function(e,t){return t.status&&(e+=t.key,e+="|"),e}),"Destination|"),RemoveRefreshCards:s.hX.RemoveRefreshCards});var e=J.find((function(e){return e.status})).name!=Object.keys(s.hX.Quota).find((function(e){return s.hX.Quota["".concat(e)
1]}));p.current({filter:n.current,callApi:e}),(0,g.k2)(n.current)}()}),[E,B,F,Q,Y,k,D,J]),(0,o.useRouter)(),(0,o.useRouter)(),(0,o.useRouter)(),(0,i.jsx)(x.Z,{theme:Z,children:(0,i.jsx)(l.Z,{sx:{width:"30%"},children:(0,i.jsxs)(l.Z,{sx:{flexGrow:1,background:"#FFFFFF",borderRadius:"15px",boxShadow:"0px 5px 20px 0px #0000001A",pb:5},children:[(0,i.jsx)(l.Z,{sx:{borderBottom:"1px solid #F0F0F0"},children:(0,i.jsxs)(l.Z,{sx:{p:2},children:[(0,i.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/icon-filter-1709641614.png",alt:"filter icon",width:"23px",height:"23px"}),(0,i.jsx)(c.Z,{sx:{color:"#333333",fontSize:"18px",fontWeight:600,ml:2},children:"Quick Filters"})]}),(0,i.jsx)(v.Z,{style:{color:"#01478C",fontSize:"12px",fontWeight:"500",borderRadius:"10px"},onClick:function(){W(E.map((function(e){return C({},e,{status:!1})}))),q(B.map((function(e){return C({},e,{status:!1})}))),M(F.map((function(e){return C({},e,{status:!1})}))),V(Q.map((function(e){return C({},e,{status:!1})}))),G(Y.map((function(e){return C({},e,{status:!1})}))),T(k.map((function(e){return C({},e,{status:!1})}))),I(D.map((function(e){return C({},e,{status:!1})}))),K((0,s.JP)(s.DN).map((function(e){var t;return{name:e.name,key:e.code,sortForm:e.sortForm,status:null!==(t=s.hX.Quota["".concat(e.name)])&&void 0!==t?t:"GN"==e.sortForm}})))},children:"RESET ALL"})]}),(0,i.jsxs)(d.Z,{sx:{mt:1},children:[(0,i.jsx)(u.Z,{value:"start",control:(0,i.jsx)(R,{color:"primary",sx:{p:1,borderRadius:"10px"},checked:null!==(he=B[0].status)&&void 0!==he&&he,onClick:function(){return $({dataset:B,setter:q,key:B[0].key,status:!B[0].status})}}),label:"Show Available Only",labelPlacement:"start",sx:{justifyContent:"space-between",ml:0,fontWeight:"600"}}),(0,i.jsx)(u.Z,{value:"start",control:(0,i.jsx)(R,{color:"primary",sx:{p:1,borderRadius:"10px"},checked:null!==(_e=F[0].status)&&void 0!==_e&&_e,onClick:function(){$({dataset:F,setter:M,key:F[0].key,status:!F[0].status}),F[0].status?W(E.map((function(e){return{key:e.key,classname:e.classname,status:!!A.includes(e.key)}}))):W(E.map((function(e){return{key:e.key,classname:e.classname,status:!A.includes(e.key)&&e.status}})))}}),label:"Show AC Only",labelPlacement:"start",sx:{justifyContent:"space-between",ml:0,fontWeight:"600"}}),(0,i.jsx)(u.Z,{value:"start",control:(0,i.jsx)(R,{color:"primary",sx:{p:1,borderRadius:"10px"},checked:k[0].status,onClick:function(){return $({dataset:k,setter:T,key:k[0].key,status:!k[0].status})}}),label:"Train from ".concat(t.current.from.code," only"),labelPlacement:"start",sx:{justifyContent:"space-between",ml:0,fontWeight:"600"}}),(0,i.jsx)(u.Z,{value:"start",control:(0,i.jsx)(R,{color:"primary",sx:{p:1,borderRadius:"10px"},checked:D[0].status,onClick:function(){return $({dataset:D,setter:I,key:D[0].key,status:!D[0].status})}}),label:"Train reaching ".concat(t.current.to.code," only"),labelPlacement:"start",sx:{justifyContent:"space-between",ml:0,fontWeight:"600"}})]})]})}),(0,i.jsx)(l.Z,{sx:{mt:2,borderBottom:"1px solid #F0F0F0"},children:(0,i.jsxs)(l.Z,{sx:{p:2},children:[(0,i.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/copyicon-1709712238.png",alt:"filter icon",width:"19px",height:"23px"}),(0,i.jsx)(c.Z,{sx:{color:"#333333",fontSize:"18px",fontWeight:600,ml:2},children:"Quota"})]}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/arrow-top-1709794341.png",alt:"filter icon",width:"15px",height:"7px"})]}),(0,i.jsx)(d.Z,{sx:{mt:1},children:(0,i.jsx)(m.ZP,{container:!0,children:J.map((function(e,t){return(0,i.jsx)(m.ZP,{item:!0,xs:6,children:(0,i.jsx)(u.Z,{control:(0,i.jsx)(f.Z,{onClick:function(){return xe({dataset:J,setter:K,key:e.key,status:!0})},checked:e.status}),label:e.name})},t)}))})})]})}),(0,i.jsx)(l.Z,{sx:{borderBottom:"1px solid #F0F0F0"},children:(0,i.jsx)(l.Z,{sx:{p:2},children:(0,i.jsx)(w,{loading:h,selectfun:$,arivalTime:Q,setArivalTime:V})})}),(0,i.jsx)(l.Z,{sx:{borderBottom:"1px solid #F0F0F0"},children:(0,i.jsx)(l.Z,{sx:{p:2},children:(0,i.jsx)(j,{loading:h,selectfun:$,depatureTime:Y,setDepatureTime:G})})}),(0,i.jsx)(l.Z,{sx:{pb:3},children:(0,i.jsx)(l.Z,{sx:{p:2},children:(0,i.jsx)(y,{loading:h,selectfun:$,setSelectedClass:W,selectedClass:E})})})]})})})}},87004:function(e,t,n){"use strict";n.d(t,{By:function(){return c},HL:function(){return u},Px:function(){return m},Qv:function(){return d},U7:function(){return f},mu:function(){return l},t_:function(){return s},vV:function(){return p},y_:function(){return v}});var i=n(85893),r=n(5616),o=n(15861);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(this,arguments)}function s(e){var t=a({},e).children;return(0,i.jsxs)(o.Z,{component:"div",sx:{background:"#F1FBFF",p:.1,pl:.8,pr:.8,color:"#1B4971",border:"1px solid #E4E4E4",borderRadius:"5px",display:"flex",alignItems:"center"},children:[(0,i.jsx)("span",{style:{marginRight:"3px"},children:(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/locationpin-1709833278.png",alt:"location pin icon"})}),(0,i.jsx)("span",{style:{fontSize:"12px"},children:t})]})}function l(e){var t=a({},e).children;return(0,i.jsx)(o.Z,{component:"p",sx:{marginBottom:"0px",fontSize:"16px",color:"#000",fontWeight:"700"},children:t})}function c(e){var t=a({},e).children;return(0,i.jsxs)(r.Z,{sx:{display:"flex",marginBottom:"15px"},children:[(0,i.jsx)(o.Z,{sx:{color:"#888888",mr:.5},children:"Runs on:"}),t]})}function d(e){var t=a({},e).children;return(0,i.jsx)(r.Z,{itemProp:"mainEntity",itemScope:"",itemType:"http://schema.org/Question",children:t})}function u(e){var t=a({},e).children;return(0,i.jsx)(o.Z,{component:"p",itemProp:"name",sx:{fontSize:"16px",color:"#000000",fontWeight:700,margin:"5px 0 5px 0"},children:t})}function f(e){var t=a({},e).children;
1return(0,i.jsx)(r.Z,{itemProp:"acceptedAnswer",itemScope:"",itemType:"http://schema.org/Answer",children:(0,i.jsx)(o.Z,{itemProp:"text",component:"div",sx:{fontSize:"14px",color:"#000000",fontWeight:400},children:t})})}function p(e){a({},e).children;return(0,i.jsx)(r.Z,{sx:{padding:"30px 15px 0px 15px",backgroundColor:"#ccc",margin:"0px"}})}function m(e){var t=a({},e).children;return(0,i.jsx)(o.Z,{component:"p",itemProp:"name",className:"Mui-faq_question",children:t})}function v(e){var t=a({},e).children;return(0,i.jsx)(r.Z,{itemProp:"acceptedAnswer",itemScope:"",itemType:"http://schema.org/Answer",children:(0,i.jsx)(o.Z,{itemProp:"text",component:"div",className:"Mui-faq_answer",children:t})})}},86891:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(85893),r=n(67294),o=n(86341),a=n.n(o),s=n(1531),l=n(5152),c=n.n(l),d=n(37690);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=c()((function(){return n.e(5785).then(n.bind(n,45785))}),{loadableGenerated:{webpack:function(){return[45785]}},ssr:!1});function p(e){var t,n,o,s,l,c,u=e.lts,p=e.timeTable,m=e.defaultSelection,v=e.isMobile,_=void 0===v||v,x=(0,r.useState)(0==m),g=x[0],b=x[1],y=(0,r.useState)(1==m),j=y[0],w=y[1];return(0,i.jsxs)("div",{className:a().layout,id:"pageHeader",children:[_&&(0,i.jsx)(h,{toggle:function(e){b("lts"==e),w("tt"==e)},defaultSelection:m,isMobile:_}),j&&p,g&&u,_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{slotId:null===d.x||void 0===d.x||null===(t=d.x.ltsresultbottom2)||void 0===t?void 0:t.slotId,adContainerId:null===d.x||void 0===d.x||null===(n=d.x.ltsresultbottom2)||void 0===n?void 0:n.adContainerId,adSizes:null===d.x||void 0===d.x||null===(o=d.x.ltsresultbottom2)||void 0===o?void 0:o.adSizes}),(0,i.jsx)("div",{style:{marginBottom:"55px"},children:(0,i.jsx)(f,{slotId:null===d.x||void 0===d.x||null===(s=d.x.RY_WAP_INSIDE_PAGE_BOTTOM_STICKY)||void 0===s?void 0:s.slotId,adContainerId:null===d.x||void 0===d.x||null===(l=d.x.RY_WAP_INSIDE_PAGE_BOTTOM_STICKY)||void 0===l?void 0:l.adContainerId,adSizes:null===d.x||void 0===d.x||null===(c=d.x.RY_WAP_INSIDE_PAGE_BOTTOM_STICKY)||void 0===c?void 0:c.adSizes,active:"innerstickybottom"})})]})]})}var m=[{text:"Train Status",actionUrl:"",code:"lts",select:!0},{text:"Time table",actionUrl:"",code:"tt"}],v=function(e){var t=e.option,n=void 0===t?m:t,i=e.select,r=void 0===i?0:i;return n.reduce((function(e,t,n){return e.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){u(e,t,n[t])}))}return e}({},t,{select:n==r})),e}),[])};function h(e){var t=e.defaultSelection,n=e.toggle,o=e.isMobile,l=(0,r.useState)(v({select:t})),c=l[0],d=l[1],u=(0,r.useState)(!1),f=u[0],p=u[1],m=function(){try{var e,t,n=null===(e=document.getElementById("topHeader"))||void 0===e?void 0:e.getBoundingClientRect();(0,s.PR)(null!==(t=null===n||void 0===n?void 0:n.top)&&void 0!==t&&t)&&n.top<0?p(!0):p(!1)}catch(i){console.warn(i.message)}};return(0,r.useEffect)((function(){o&&window.addEventListener("scroll",m)}),[]),(0,i.jsx)("div",{className:"flexRow flexCenter ".concat(a().layoutOptions,"  ").concat(f?a().stickOption:""),children:c.map((function(e,t){return(0,i.jsx)("h2",{className:"flex1 flexCenter ".concat(e.select?a().selected:""),onClick:function(){d(v({select:t,name:e.text})),n(e.code)},children:e.text},"OptionList_".concat(t))}))})}},95534:function(e,t,n){"use strict";n.d(t,{A:function(){return _}});var i=n(85893),r=n(25675),o=n.n(r),a=n(58018),s=n.n(a),l=n(19130),c=n(1531),d=n(74752),u=n(5152),f=n.n(u),p=n(77010),m=n(37690),v=f()((function(){return n.e(5785).then(n.bind(n,45785))}),{loadableGenerated:{webpack:function(){return[45785]}},ssr:!1});function h(e){var t=e.days;return"MON,TUE,WED,THU,FRI,SAT,SUN"==t?(0,i.jsx)("span",{children:"DAILY"}):["SUN","MON","TUE","WED","THU","FRI","SAT"].map((function(e){return(0,i.jsxs)("span",{children:[" ",t.includes(e)?e.slice(0,2):"--"," "]})}
1))}function _(e){var t,n,r,a,u=e.data,f=e.showSeoSection,_=void 0!==f&&f,x=e.journeyTime,g=e.isMobile,b=void 0===g||g,y=function(e){var t=new Date(6e4*e),n=t.getUTCHours();return(e=t.getUTCMinutes())<10&&(e="0"+e),{hour:n,min:e}},j=[];if(0==(null!==(a=null===u||void 0===u?void 0:u.length)&&void 0!==a?a:0))return(0,i.jsx)(i.Fragment,{});if((null===u||void 0===u?void 0:u.length)>0)for(var w,S,k=0;k<(null===(w=u[0])||void 0===w||null===(S=w.route)||void 0===S?void 0:S.length);k++){var C,N,Z,R,T,P,D,I,A,O,F,M,z,E,W;if((null===(N=null===(C=u[0])||void 0===C?void 0:C.route[k])||void 0===N?void 0:N.day)&&(null===(R=null===(Z=u[0])||void 0===Z?void 0:Z.route[k])||void 0===R?void 0:R.stop))if(null===(D=j[null===(P=null===(T=u[0])||void 0===T?void 0:T.route[k])||void 0===P?void 0:P.day])||void 0===D?void 0:D.length)j[null===(A=null===(I=u[0])||void 0===I?void 0:I.route[k])||void 0===A?void 0:A.day].push(null===(O=u[0])||void 0===O?void 0:O.route[k]);else j[null===(M=null===(F=u[0])||void 0===F?void 0:F.route[k])||void 0===M?void 0:M.day]=[],j[null===(E=null===(z=u[0])||void 0===z?void 0:z.route[k])||void 0===E?void 0:E.day].push(null===(W=u[0])||void 0===W?void 0:W.route[k])}var L,B,q="",U="";(0,c.PR)(u[0])&&(q=null===(L=u[0])||void 0===L?void 0:L.train_name,U=null===(B=u[0])||void 0===B?void 0:B.train_number);var Y=y((0,c.PR)(x)?x:0),G=y(j[j.length-1][j[j.length-1].length-1].sta_min),H=[{question:"Where is my train ".concat(U," ").concat(q),ans:"".concat(q,"(").concat(U,") runs between ").concat(j[1][0].station_name," (").concat(j[1][0].station_code,") to ").concat(j[j.length-1][j[j.length-1].length-1].station_name," (").concat(j[j.length-1][j[j.length-1].length-1].station_code,"). This train takes ").concat(Y.hour,"hr ").concat(Y.min,"mins to cover this trip and starts at ").concat(j[1][0].std_min," from ").concat(j[1][0].station__name," (").concat(j[1][0].station_code,") and reaches ").concat(j[j.length-1][j[j.length-1].length-1].station_name," (").concat(u[0].route[u[0].route.length-1].station_code,") at  ").concat(G.hour,":").concat(G.min,". The exact current location of train can be found at RailYatri where you see the train symbol with an animation.")},{question:"Which is the source and destination of ".concat(q),ans:"".concat(U," ").concat(q," runs from ").concat(j[1][0].station_name," (").concat(j[1][0].station_code,") to ").concat(j[j.length-1][j[j.length-1].length-1].station_name," (").concat(j[j.length-1][j[j.length-1].length-1].station_code,").")},{question:"How much distance ".concat(q," covered?"),ans:"".concat(q," covers a distance of ").concat(j[j.length-1][j[j.length-1].length-1].distance_from_source," KM in ").concat(Y.hour,"hr ").concat(Y.min," mins.")},{question:"Where is ".concat(q," running status"),ans:" Train Has Reached Destination. ".concat(j[j.length-1][j[j.length-1].length-1].station_name," (").concat(j[j.length-1][j[j.length-1].length-1].station_code,") At ").concat(G.hour,":").concat(G.min)}],Q=function(e){var t=e.rating;return t<0?(0,i.jsx)("span",{style:{backgroundColor:"#d6a81b"}}):t<4?(0,i.jsx)("span",{style:{backgroundColor:"#e94949"}}):t<8?(0,i.jsx)("span",{style:{backgroundColor:"#e89b49"}}):(0,i.jsx)("span",{})},V=function(e){var t=e.rating;return t<0?(0,i.jsx)("span",{style:{color:"#d6a81b"},children:"Not Available"}):t<4?(0,i.jsx)("span",{style:{color:"#e94949"},children:"Mostly Delayed"}):t<8?(0,i.jsx)("span",{style:{color:"#e89b49"},children:"Irregular Ontime"}):void 0},X=function(e){var t=e.staMin,n=e.stdMin,r=y(t),a=y(n);return 0==t?(0,i.jsxs)("span",{children:[" Start at ","".concat(a.hour,": ").concat(a.min)," "]}):(0,i.jsxs)("div",{className:"flexRow",style:{gap:"4px"},children:[" ",(0,i.jsxs)("span",{children:[" ","".concat(r.hour,": ").concat(r.min)]}),n>0&&(0,i.jsxs)("span",{className:"flexRow flexCenter",style:{gap:"4px"},children:[(0,i.jsx)("span",{className:"flexCenter",style:{width:"15px",height:"10px"},children:(0,i.jsx)(o(),{height:17,width:30,src:"https://images.railyatri.in/ry_images_prod/arrow-next-d34f7660d9204bde65575bbdcb77abd9921925996f8811fb3c3bda3b2932742a-1707940879.png"})}),(0,i.jsx)("span",{children:"".concat(a.hour,": ").concat(a.min)})]})]})};return(0,i.jsxs)("div",{className:"flexCol ".concat(s().timeTableContainer),children:[(0,i.jsxs)("div",{className:"flexRow ".concat(s().timeTableStatusHeader),children:[(0,i.jsx)("h4",{children:"Time Table"}),(0,i.jsx)("div",{children:(0,i.jsx)(h,{days:u[0].run_days})})]}),(0,i.jsx)("div",{className:s().timelineContainer,children:j.map((function(e,t){return(0,i.jsxs)("div",{className:"flexCol ".concat(s().timeline),style:{gap:"20px"},children:[(0,i.jsxs)("h2",{className:0==b?s().extraSpace:"",children:["Day ",t]}),e.map((function(e,t){var n=e.station_code,r=e.station_name,o=e.distance_from_source,a=e.on_time_rating,l=e.platform_number,c=e.sta_min,d=e.std_min;return(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelineDetails," ").concat(0==b?s().timelineDetailsDweb:""),children:[(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsx)("p",{children:n}),(0,i.jsxs)("p",{children:[o," km"]})]}),(0,i.jsx)(Q,{rating:parseInt(a)}),(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsxs)("p",{children:[" ",null===r||void 0===r?void 0:r.toLowerCase()]}),(0,i.jsxs)("div",{children:[" ",(0,i.jsx)(V,{rating:parseInt(a)}),"  "]}),(0,i.jsxs)("div",{children:[" ",(0,i.jsx)(X,{staMin:c,stdMin:d}),"  "]}),(0,i.jsxs)("p",{children:[" Platform #",l," "]})]})]},"".concat(t,"_list"))}))]},"main".concat(t))}))}),(0,i.jsx)(p.e,{}),(0,i.jsx)(v,{slotId:null===m.x||void 0===m.x||null===(t=m.x.ltsresultbottom)||void 0===t?void 0:t.slotId,adContainerId:null===m.x||void 0===m.x||null===(n=m.x.ltsresultbottom)||void 0===n?void 0:n.adContainerId,adSizes:null===m.x||void 0===m.x||null===(r=m.x.ltsresultbottom)||void 0===r?void 0:r.adSizes}),_&&(0,i.jsx)(d.Z,{fallback:"",children:(0,i.jsx)(l.B,{QuestionAns:H,upcommingStations:j,trainName:q,trainNumber:U,mweb:b})})]})}},33670:function(e,t,n){"use strict";n.d(t,{T:function(){return u}});var i=n(85893),r=n(73704),o=n.n(r),a=n(9473),s=n(99261),l=n(67294),c=n(93773),d=n(5616);function u(){var e=(0,l.useState)(!0),t=e[0],n=e[1],r=(0,a.I0)();(0,l.useEffect)((function(){r((0,s.r2)({termsAndCondtionAgre:t}))}),[t]);var u=(0,l.useState)(!1),p=u[0],m=u[1];return(0,i.jsx)(d.Z,{sx:{mt:3,pl:1.8,pr:1.8},children:(0,i.jsxs)(d.Z,{sx:{display:"flex",justifyContent:"center"},children:[(0,i.jsx)(d.Z,{sx:{mr:.5},children:(0,i.jsx)("label",{className:o().checkBox,onClick:function(){return n((function(e){return!e}))},children:(0,i.jsx)("span",{className:t?o().checked:""})})}),(0,i.jsx)(d.Z,{children:(0,i.jsxs)("p",{style:{color:"#000",fontSize:"12px",fontWeight:"700"},children:[" I agree to "," ",(0,i.jsxs)("span",{style:{color:"#033562",fontSize:"12px",fontWeight:"700"},onClick:function(){return m(!0)},children:[(0,i.jsx)("span",{style:{color:"#077FF7",borderBottom:"1px solid ",fontWeight:"400"},children:" IRCTC Terms of Service "})," & ",(0,i.jsx)("span",{style:{color:"#077FF7",borderBottom:"1px solid ",fontWeight:"400"},children:" Cancellation Policy"})]})]})}),p&&(0,i.jsxs)(c.pT,{onClose:function(){m(!1)},children:[" ",(0,i.jsx)(f,{setShowTC:m})]})]})})}function f(e){var t=e.setShowTC;return(0,i.jsx)("div",{className:"modal fade in",role:"dialog","data-modal":"cancel_rule",style:{display:"block"},children:(0,i.jsx)("div",{className:"modal-dialog",children:(0,i.jsxs)("div",{className:"modal-content",children:[(0,i.jsxs)("div",{className:"modal-header",onClick:function(){return t(!1)},children:[(0,i.jsx)("button",{type:"button",className:"".concat(o().close),"data-dismiss":"modal","aria-hidden":"true",children:"\xd7"}),(0,i.jsx)("h4",{className:"modal-title",children:"Cancellation Rules"})]}),(0,i.jsx)("div",{className:"modal-body ",children:(0,i.jsx)("object",{className:"".concat(o().object," fs-14"),type:"text/html",data:"".concat("https://www.railyatri.in","/app/general/general-terms-and-conditions-train-ticket-booking")})})]})})})}t.Z=f},72895:function(e,t,n){"use strict";var i=n(1531);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(l){s=!0,r=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){if(!e)return{};var t=e.split("&"),n={};return t.forEach((function(e){var t=o(e.split("=").map(decodeURIComponent),2),r=t[0],a=t[1];a&&(0,i.PR)(a)&&(n[r]=a.trim())})),n}},76192:function(e,t){"use strict";t.Z=function(){return function(e,t,n){if("string"!==typeof n)throw new Error("Input must be a string");if("string"===typeof e)return n.split(e).join(t);if(Array.isArray(e))return e.forEach((function(e){"string"===typeof e&&(n=n.split(e).join(t))})),n;throw new Error("Search must be a string or an array")}}},79547:function(e,t,n){"use strict";e.exports=n(65988)},93351:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return ye},default:function(){return je}});var i=n(85893),r=n(25675),o=n.n(r),a=n(93549),s=n.n(a),l=n(80881),c=n(1531),d=n(19130),u=n(26461),f=n(67294),p=n(99685),m=n(11163),v=n(32120),h=n(79547),_=n.n(h),x=n(5616),g=n(15861),b=n(86886),y=n(20247),j=n(69417),w=n(50135),S=n(35294),k=n(23599),C=n(64666),N=(n(58936),n(17549)),Z=n.n(N),R=n(16310),T=n(30015),P=n(82175),D=n(9062),I=n(5623);function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},O.apply(this,arguments)}function F(e){var t=O({},e).formik,n=(0,f.useState)([]),r=n[0],o=n[1],a=(0,I.Z)((function(e){(0,p.C)(e).then((function(e){return o(e)}))}),500).Debouncesetter,s=function(e){var t=e.target.value;a(t)};return(0,i.jsx)("form",{onSubmit:t.handleSubmit,style:{width:"100%"},children:(0,i.jsxs)(x.Z,{sx:A({width:"100%",background:"#ffffff",borderRadius:"6px",p:1,pl:1.5},"pl",1.5),children:[(0,i.jsx)(g.Z,{component:"p",sx:{color:"#000000",fontSize:"14px",fontWeight:600},children:"TIME TABLE"}),(0,i.jsxs)(x.Z,{sx:{width:"100%",background:"#ffffff",display:"flex",alignItems:"center",mt:1},children:[(0,i.jsx)(x.Z,{sx:{flexGrow:1},children:(0,i.jsx)(y.Z,{disablePortal:!0,freeSolo:!0,id:"trainname",value:t.values.trainName,options:r.map((function(e){return"".concat(null===e||void 0===e?void 0:e.train_number," - ").concat(null===e||void 0===e?void 0:e.train_name)})),onChange:function(e,n){t.setFieldValue("trainName",n)},onBlur:t.handleBlur,sx:{width:"100%",background:"#f1f1f1",p:0},renderInput:function(e){return(0,i.jsx)(w.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){A(e,t,n[t])}))}return e}({fullWidth:!0,onChange:s,autoComplete:"off",id:"trainName",name:"trainName",label:"Train No/Name"},e,{error:t.touched.trainName&&Boolean(t.errors.trainName),InputLabelProps:{sx:{color:t.touched.trainName&&t.errors.trainName?"#ff0000":"#212121",top:-7,"&.Mui-focused":{top:2},"&.MuiFormLabel-filled":{top:2}}},sx:{"& .MuiOutlinedInput-root":{p:"0px"}}}))}})}),(0,i.jsx)(j.Z,{type:"submit",variant:"contained",size:"large",sx:{borderRadius:"4px",background:"#01478C",ml:1,p:1,pl:0,pr:0,fontSize:"12px",minWidth:"80px",fontWeight:600},"aria-label":"Get",children:"Get"})]})]})})}var M=n(76192),z=n(77010);function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},W.apply(this,arguments)}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
1)))),i.forEach((function(t){E(e,t,n[t])}))}return e}function B(e){var t=e.train_number,n=void 0===t?"":t,r=e.train_name,o=void 0===r?"":r,a=(e.source_station_code,e.destination_station_code,R.Ry({trainName:R.Z_().required("Train No or Name is required")})),s=R.Ry({stationName:R.Z_().required("Station Name/Code is required")}),l=(0,M.Z)(),d=(0,P.TA)({initialValues:{trainName:(0,c.PR)(n)?"".concat(n," - ").concat(o):""},validationSchema:a,onSubmit:function(e){if((0,c.PR)(null===e||void 0===e?void 0:e.trainName)){var t=e.trainName,n="/time-table/".concat((0,c.PR)(t)&&l("--","-",l("--","-",l(" ","-",t))).toLocaleLowerCase());window.location.assign(n)}},enableReinitialize:true}),u=(0,P.TA)({initialValues:{stationName:""},validationSchema:s,onSubmit:function(e){if((0,c.PR)(null===e||void 0===e?void 0:e.stationName)){var t=e.stationName;if((0,c.PR)(t)){var n=l([" ","|"],"-",t);n=l(["--","---"],"-",n),n=l("--","-",n).toLocaleLowerCase(),n="/arrival-departure/".concat(n),window.location.assign(n)}}},enableReinitialize:true});new Date;return(0,i.jsx)("div",{className:"flex3",children:(0,i.jsx)(b.ZP,{item:!0,xs:4,children:(0,i.jsxs)(x.Z,{sx:{ml:1},children:[(0,i.jsxs)(x.Z,{className:Z().qrCode,sx:{mb:1},children:[(0,i.jsx)(x.Z,{className:Z().qr_text_1,children:(0,i.jsxs)(g.Z,{component:"p",children:[(0,i.jsx)("span",{children:"Get 50 off"})," with App ",(0,i.jsx)("br",{})," and enjoy"," ",(0,i.jsx)("span",{children:"special deals"})]})}),(0,i.jsxs)(x.Z,{className:Z().qr_text_2,children:[(0,i.jsxs)(x.Z,{className:"".concat(Z().div_one," ").concat(Z().text_center),children:[" INSTALL ",(0,i.jsx)("br",{})," APP "]}),(0,i.jsx)(x.Z,{className:"".concat(Z().div_two," ").concat(Z().text_right),children:(0,i.jsx)("img",{width:"63px",height:"63px",src:"https://images.railyatri.in/ry_images_prod/appQR-1670240411.png",alt:"App qr image"})})]})]}),(0,i.jsx)(F,{formik:d}),(0,i.jsx)(x.Z,{sx:{m:.5,mt:1},children:(0,i.jsx)(D.LJ,{})}),(0,i.jsx)(T.w,{formik:u}),(0,i.jsx)(x.Z,{sx:{m:.5},children:(0,i.jsx)(D.uc,{})}),(0,i.jsx)(x.Z,{sx:{m:.5},children:(0,i.jsx)(z.e,{})})]})})})}function q(e){var t=W({},e),n=t.train_number,r=t.train_name,o=t.trainDay,a=(0,f.useState)(o),s=a[0],l=(a[1],(0,f.useState)([])),d=l[0],u=l[1],m=(0,I.Z)((function(e){(0,p.C)(e).then((function(e){return u(e)}))}),500).Debouncesetter,v=function(e){var t=e.target.value;m(t)},h=R.Ry({trainName:R.Z_().required("Train No or Name is required"),trainDay:R.Rx().required("Train Running Day is required")}),_=(0,P.TA)({initialValues:{trainName:(0,c.PR)(n)?"".concat(n," - ").concat(r):"",trainDay:s},validationSchema:h,onSubmit:function(e){if((0,c.PR)(null===e||void 0===e?void 0:e.trainName)){var t=e.trainName,n=e.trainDay,i="/live-train-status/".concat(t.replace(/ /g,""),"?start_day=").concat(n,"&start_date=").concat(n);window.location.assign(i)}},enableReinitialize:!0});return(0,i.jsx)("form",{onSubmit:_.handleSubmit,style:{width:"100%"},children:(0,i.jsxs)(x.Z,{sx:E({width:"100%",background:"#ffffff",display:"flex",alignItems:"center",p:1,pl:1.5},"pl",1.5),children:[(0,i.jsx)(g.Z,{component:"p",sx:{color:"#4990e2",fontSize:"14px",fontWeight:600},children:" Running Status "}),(0,i.jsx)(x.Z,{sx:{ml:1,flexGrow:1},children:(0,i.jsx)(y.Z,{disablePortal:!0,freeSolo:!0,id:"trainname",value:_.values.trainName,options:d.map((function(e){return"".concat(null===e||void 0===e?void 0:e.train_number," - ").concat(null===e||void 0===e?void 0:e.train_name)})),onChange:function(e,t){_.setFieldValue("trainName",t)},onBlur:_.handleBlur,sx:{width:"100%",background:"#f1f1f1",p:0},renderInput:function(e){return(0,i.jsx)(w.Z,L({fullWidth:!0,onChange:v,autoComplete:"off",id:"trainName",name:"trainName",label:"Train No or Name"},e,{error:_.touched.trainName&&Boolean(_.errors.trainName),InputLabelProps:{sx:{color:_.touched.trainName&&_.errors.trainName?"#ff0000":"#212121",top:-7,"&.Mui-focused":{top:2},"&.MuiFormLabel-filled":{top:2}}},sx:{"& .MuiOutlinedInput-root":{p:"0px"}}}))}})}),(0,i.jsx)(U,{setFieldValue:_.setFieldValue,trainDay:o}),(0,i.jsx)(j.Z,{type:"submit",variant:"contained",size:"large",sx:{borderRadius:"4px",background:"#01478C",ml:1,p:1,pl:0,pr:0,fontSize:"12px",minWidth:"145px",fontWeight:600},"aria-label":"Check Time Table",children:"Check Status"})]})})}function U(e){var t=e.setFieldValue,n=e.trainDay,r=(0,f.useState)(null),o=r[0],a=r[1],s=Boolean(o),l=function(){a(null)},c=(0,f.useState)([{count:0,text:"Start Day - Today",status:0==n,id:1},{count:1,text:"Start Day - Yesterday",status:1==n,id:2},{count:2,text:"2 Days ago",status:2==n,id:3},{count:3,text:"3 Days ago",status:3==n,id:4},{count:4,text:"4 Days ago",status:4==n,id:5}]),d=c[0],u=c[1],p=(0,f.useState)(d.find((function(e){return e.status})).text),m=p[0],v=p[1];return(0,i.jsxs)(x.Z,{sx:{display:"flex",width:"200px"},children:[(0,i.jsxs)(j.Z,{id:"basic-button","aria-controls":s?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,onClick:function(e){a(e.currentTarget)},sx:{display:"flex",gap:"4px",justifyContent:"space-between",textTransform:"capitalize",fontSize:"14px",background:"#ffffff",ml:1,borderRadius:"8px",backgroundColor:"#f1f1f1","&:hover":{background:"#ffffff"}},fullWidth:!0,children:[(0,i.jsx)("span",{style:{paddingLeft:"10px",color:"#555"},children:m}),(0,i.jsx)("img",{src:"https://images.railyatri.in/ry_images_prod/recomendedicon-1709906833.png",alt:"Recommended Icon",width:"12px",style:{marginRight:"10px"}})]}
1),(0,i.jsx)(S.Z,{id:"basic-menu",anchorEl:o,open:s,onClose:l,MenuListProps:{"aria-labelledby":"basic-button"},sx:{"& .MuiPaper-root":{width:"235px",mt:1,borderRadius:"10px",boxShadow:"0px 5px 20px 0px #0000001A"}},children:d.map((function(e){return(0,i.jsx)(k.Z,{onClick:function(){!function(e){var n=W({},e);v(null===n||void 0===n?void 0:n.text);var i=d.map((function(e){return e.id===n.id?(t("trainDay",n.count),L({},e,{status:!0})):L({},e,{status:!1})}));u(i),l()}(L({},e))},children:(0,i.jsx)(g.Z,{component:"div",sx:{color:"#141823",mr:1,fontWeight:700,fontSize:"15px"},children:e.text})},"sortedby_".concat(e.text))}))})]})}function Y(e){var t=e.open,n=e.onClose,r=e.trainNumber,o=e.trainName,a=e.trainDay,s=(0,f.useState)(a),l=s[0],c=s[1],d=function(e){c(e.target.value)};return(0,i.jsxs)(C.Z,{open:t,onClose:n,children:[(0,i.jsxs)("div",{className:"jsx-9b0829a6d37efaf4 modal-content",children:[(0,i.jsxs)("div",{style:{justifyContent:"space-between"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("h4",{className:"jsx-9b0829a6d37efaf4",children:"Change Start Date"}),(0,i.jsx)("button",{onClick:n,className:"jsx-9b0829a6d37efaf4 close-button",children:" \xd7 "})]}),(0,i.jsxs)("div",{className:"jsx-9b0829a6d37efaf4 modal-body",children:[(0,i.jsxs)("div",{className:"jsx-9b0829a6d37efaf4 radio-group flexCol",children:[(0,i.jsxs)("label",{style:{gap:"12px",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("input",{type:"radio",value:"0",checked:0==l,onChange:d,className:"jsx-9b0829a6d37efaf4"}),(0,i.jsxs)("div",{style:{justifyContent:"space-between",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("span",{className:"jsx-9b0829a6d37efaf4",children:" Today "}),(0,i.jsxs)("span",{className:"jsx-9b0829a6d37efaf4",children:[" (",(new Date).toLocaleDateString(),") "]})]})]}),(0,i.jsxs)("label",{style:{gap:"12px",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("input",{type:"radio",value:"1",checked:1==l,onChange:d,className:"jsx-9b0829a6d37efaf4"}),(0,i.jsxs)("div",{style:{justifyContent:"space-between",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("span",{className:"jsx-9b0829a6d37efaf4",children:" Yesterday "}),(0,i.jsxs)("span",{className:"jsx-9b0829a6d37efaf4",children:[" (",new Date((new Date).setDate((new Date).getDate()-1)).toLocaleDateString(),") "]})]})]}),(0,i.jsxs)("label",{style:{gap:"12px",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("input",{type:"radio",value:"2",checked:2==l,onChange:d,className:"jsx-9b0829a6d37efaf4"}),(0,i.jsxs)("div",{style:{justifyContent:"space-between",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("span",{className:"jsx-9b0829a6d37efaf4",children:" 2 Days ago"}),(0,i.jsxs)("span",{className:"jsx-9b0829a6d37efaf4",children:[" (",new Date((new Date).setDate((new Date).getDate()-2)).toLocaleDateString(),") "]})]})]}),(0,i.jsxs)("label",{style:{gap:"12px",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("input",{type:"radio",value:"3",checked:3==l,onChange:d,className:"jsx-9b0829a6d37efaf4"}),(0,i.jsxs)("div",{style:{justifyContent:"space-between",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("span",{className:"jsx-9b0829a6d37efaf4",children:" 3 Days ago"}),(0,i.jsxs)("span",{className:"jsx-9b0829a6d37efaf4",children:[" (",new Date((new Date).setDate((new Date).getDate()-3)).toLocaleDateString(),") "]})]})]}),(0,i.jsxs)("label",{style:{gap:"12px",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("input",{type:"radio",value:"4",checked:4==l,onChange:d,className:"jsx-9b0829a6d37efaf4"}),(0,i.jsxs)("div",{style:{justifyContent:"space-between",width:"100%"},className:"jsx-9b0829a6d37efaf4 flexRow",children:[(0,i.jsx)("span",{className:"jsx-9b0829a6d37efaf4",children:" 4 Days ago"}),(0,i.jsxs)("span",{className:"jsx-9b0829a6d37efaf4",children:[" (",new Date((new Date).setDate((new Date).getDate()-4)).toLocaleDateString(),") "]})]})]})]}),(0,i.jsx)("button",{onClick:function(){window.location.href="/live-train-status/".concat(r,"-").concat(o,"?start_date=").concat(l,"&start_day=").concat(l,"&"),n()},className:"jsx-9b0829a6d37efaf4 go-button",children:"GO"})]})]}
1),(0,i.jsx)(_(),{id:"9b0829a6d37efaf4",children:".modal-overlay.jsx-9b0829a6d37efaf4{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;z-index:99}.modal-content.jsx-9b0829a6d37efaf4{background-color:#fff;padding:20px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;width:400px;-webkit-box-shadow:0 4px 8px rgba(0,0,0,.2);-moz-box-shadow:0 4px 8px rgba(0,0,0,.2);box-shadow:0 4px 8px rgba(0,0,0,.2)}.modal-header.jsx-9b0829a6d37efaf4{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.modal-header.jsx-9b0829a6d37efaf4 h4.jsx-9b0829a6d37efaf4{margin:0;color:#707070}.close-button.jsx-9b0829a6d37efaf4{background:none;border:none;font-size:20px;cursor:pointer}.radio-group.jsx-9b0829a6d37efaf4 label.jsx-9b0829a6d37efaf4{margin-bottom:10px}.go-button.jsx-9b0829a6d37efaf4{width:100%;padding:10px;background-color:#2979ff;color:white;border:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;font-size:16px}.go-button.jsx-9b0829a6d37efaf4:hover{background-color:#0057e7}"})]})}var G=n(83521);function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(l){s=!0,r=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(e,t)||X(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){if(e){if("string"===typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}function J(e){var t,n,r,o,a,s,l,p,m,v,h,_,x,g,b,y,j,w=e.ltsServerSideData,S=e.startDay,k=e.trainNumber,C=e.timeTable,N=e.trainName,Z=e.trainStartDate,R=(0,f.useState)(w.current),T=R[0],P=R[1],D=(0,f.useState)(!1),I=D[0];D[1];return(0,f.useEffect)((function(){w.current=T}),[T]),(0,i.jsxs)("div",{children:[(0,i.jsx)(q,{train_number:k,train_name:N,trainDay:S}),(0,i.jsx)(K,{message:null!==(j=null!==(y=null===T||void 0===T?void 0:T.new_message)&&void 0!==y?y:null===T||void 0===T?void 0:T.new_alert_msg)&&void 0!==j?j:"",showMessage:!((null===T||void 0===T||null===(t=T.upcoming_stations)||void 0===t?void 0:t.length)>0||(null===T||void 0===T||null===(n=T.previous_stations)||void 0===n?void 0:n.length)>0)||(0,c.PR)(null===T||void 0===T?void 0:T.new_alert_msg),title:(0,c.PR)(null===T||void 0===T?void 0:T.new_alert_msg)?"Important Alert":null===T||void 0===T?void 0:T.title,newAlert:(0,c.PR)(null===T||void 0===T?void 0:T.new_alert_msg),trainNumber:k,trainName:N,trainStartDate:Z,trainDay:S}),((null===T||void 0===T||null===(r=T.upcoming_stations)||void 0===r?void 0:r.length)>0||(null===T||void 0===T||null===(o=T.previous_stations)||void 0===o?void 0:o.length)>0)&&(0,i.jsx)(se,{ltsData:T,setLtsData:P,ltsLoading:I}),(null===T||void 0===T||null===(a=T.upcoming_stations)||void 0===a?void 0:a.length)>0||(null===T||void 0===T||null===(s=T.previous_stations)||void 0===s?void 0:s.length)>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.r,{stationCode:null===T||void 0===T?void 0:T.current_station_code,stationName:null===T||void 0===T?void 0:T.current_station_name,trainNumber:null===T||void 0===T?void 0:T.train_number,trainName:null===T||void 0===T?void 0:T.train_name,stops:function(){for(var e,t=2,n=[],i=0;i<(null===T||void 0===T||null===(e=T.upcoming_stations)||void 0===e?void 0:e.length)&&0!=t;i++){var r,o,a,s,l;(null===(r=null===T||void 0===T?void 0:T.upcoming_stations[i])||void 0===r?void 0:r.station_code)&&(t--,n.push({code:null===(o=null===T||void 0===T?void 0:T.upcoming_stations[i])||void 0===o?void 0:o.station_code,name:null===(a=null===T||void 0===T?void 0:T.upcoming_stations[i])||void 0===a?void 0:a.station_name,arivalDelay:null===(s=null===T||void 0===T?void 0:T.upcoming_stations[i])||void 0===s?void 0:s.arrival_delay,eta:null===(l=null===T||void 0===T?void 0:T.upcoming_stations[i])||void 0===l?void 0:l.eta}))}return n}(),trainStatus:null===(l=u.Rg["".concat(null===T||void 0===T?void 0:T.status)])||void 0===l?void 0:l.name,currentLocationInfo:{message:(null===T||void 0===T||null===(p=T.current_location_info)||void 0===p?void 0:p.length)>0?null===(m=null===T||void 0===T?void 0:T.current_location_info[0])||void 0===m?void 0:m.message:"",hint:(null===T||void 0===T||null===(v=T.current_location_info)||void 0===v?void 0:v.length)?null===(h=null===T||void 0===T?void 0:T.current_location_info[0])||void 0===h?void 0:h.hint:""},lastStation:{stationName:(null===T||void 0===T||null===(_=T.upcoming_stations)||void 0===_?void 0:_.length)?null===T||void 0===T?void 0:T.upcoming_stations[(null===T||void 0===T||null===(x=T.upcoming_stations)||void 0===x?void 0:x.length)-1].station_name:"",eta:(null===T||void 0===T||null===(g=T.upcoming_stations)||void 0===g?void 0:g.length)?null===T||void 0===T?void 0:T.upcoming_stations[(null===T||void 0===T||null===(b=T.upcoming_stations)||void 0===b?void 0:b.length)-1].eta:""},currentStationArivalTime:null===T||void 0===T?void 0:T.cur_stn_sta,currentStationDeparture:null===T||void 0===T?void 0:T.cur_stn_std,upcommingStations:null===T||void 0===T?void 0:T.upcoming_stations,previousStations:null===T||void 0===T?void 0:T.previous_stations,source:null===T||void 0===T?void 0:T.source,destination:null===T||void 0===T?void 0:T.destination,eta:null===T||void 0===T?void 0:T.eta,etd:null===T||void 0===T?void 0:T.etd,halt:null===T||void 0===T?void 0:T.halt,platformNumber:null===T||void 0===T?void 0:T.platform_number,stoppageNumber:null===T||void 0===T?void 0:T.stoppage_number,mweb:!1})," "]}):C]})}function K(e){var t=e.message,n=void 0===t?"":t,r=e.title,a=void 0===r?"Oops !":r,d=e.showMessage,u=void 0!==d&&d,p=e.trainNumber,m=e.trainName,v=e.trainStartDate,h=e.trainDay,_=e.newAlert,x=(0,f.useState)(!1),g=x[0],b=x[1];return(0,i.jsxs)(l.e,{children:[(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsxs)("p",{className:"no-pad no-marg",style:{fontSize:"13px",fontWeight:"700",lineHeight:"1.3",color:"#000"},children:[p," ",m," Running Status"]}),(0,i.jsxs)("div",{className:"flexRow",style:{justifyContent:"space-between"},children:[(0,i.jsxs)("span",{style:{fontSize:"14px"},children:[" Start Date ",v]}),(0,i.jsx)("span",{style:{fontSize:"12px",fontWeight:"500",color:"#2196f3"},onClick:function(){b(!0)},children:" Change "})]})]}),(0,c.PR)(n)&&u&&(0,i.jsx)("div",{className:"flexCol ".concat(s().messageContainer),children:(0,i.jsxs)("div",{className:"flexCol ".concat(s().message," ").concat(_&&s().nonAlertMessage),children:[(0,i.jsxs)("div",{className:"flexRow flexCenter",children:[!_&&(0,i.jsx)("span",{style:{height:"20px",width:"20px"},children:(0,i.jsx)(o(),{height:20,width:20,src:"https://images.railyatri.in/ry_images_prod/exclamation-mark-1632132050.png"})}),(0,i.jsx)("h4",{children:a})]}),(0,i.jsxs)("p",{children:[" ",n," "]})]})}),(0,i.jsx)(Y,{open:g,onClose:function(){b(!1)},trainNumber:p,trainName:m,trainDay:h})]})}function $(e){var t,n=e.time,r=e.trainNumber,a=e.eta,l=e.std,c=e.current_station_code,d=e.showFood,u=void 0!==d&&d,f=e.nextStation,p=void 0!==f&&f,m=e.trainStartDate,v=e.etaTime,h=e.lastStationCode;return p?(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelineFooter),children:[(0,i.jsx)("span",{className:"flex1 flex",children:" "}),u&&(0,i.jsx)("a",{href:"https://www.railyatri.in/m/buy-food-in-train?train_number=".concat(r,"&day=2&station_code=").concat(c,"&train_start_date=").concat((t=m,"".concat(t.getDate(),"-").concat(t.getMonth(),"-").concat(t.getFullYear())),"&eta_time=").concat(v,"&lts=1&to_station=").concat(h,"&utm_source=lts&src=running_status_details&start_date="),children:(0,i.jsxs)("span",{className:"flex1 flex",style:{justifyContent:"start",ga
1p:"5px",fontSize:"12px !important",color:"#757575"},children:[(0,i.jsx)("span",{style:{width:"18px",height:"auto"},children:(0,i.jsx)(o(),{height:25,width:33,quality:100,src:"https://images.railyatri.in/assets/mobile_view/lts/food-dd3ff305a3a25f6e598781e63a509844b92025c65e31d5db12193014e9f646b7.png"})}),"Order Food"]})}),(0,i.jsx)("span",{className:"flex1 flex",style:{justifyContent:"end",gap:"5px",fontSize:"12px !important",color:"#757575 !important"}})]}):(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelineFooter),children:[(0,i.jsxs)("span",{className:"flex1 flex",children:[" Reached at ",n]}),(0,i.jsxs)("span",{className:"flex1 flex",children:[" ",(0,i.jsx)("a",{href:"https://www.railyatri.in/live-train-status-user-feedback?train_no=".concat(r,"&eta=").concat(a,"&start_date=").concat(l,"&current_station=").concat(c,"&status=false&device_type_id=4"),children:" Report Inaccurancy "})," "]})]})}function ee(e){var t=e.refreshInterval,n=e.setLtsData,r=e.trainNumber,a=(0,f.useState)(t),s=a[0],l=a[1],c=(0,m.useRouter)(),d=(0,f.useState)(0),u=d[0],v=d[1];(0,f.useEffect)((function(){var e=setInterval((function(){return l((function(e){return e-1}))}),1e3);return function(){return clearInterval(e)}}),[]),(0,f.useEffect)((function(){var e,i;s<1&&(i=null!==(e=c.query.start_day)&&void 0!==e?e:0,(0,p.Am)({trainNumber:r,day:i}).then((function(e){v((function(e){return e+360})),n(e)})),l(t))}),[s]);return(0,i.jsx)("div",{style:{float:"right",display:"flex",justifyContent:"end"},onClick:function(){return l(0)},children:(0,i.jsxs)("div",{className:"flexRow flexCenter",children:[(0,i.jsxs)("span",{className:"flexCenter",style:{boxShadow:"0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)",width:"75px",color:"#2196f3 !important",borderRadius:"3px",marginRight:"-2px",backgroundColor:"#fff"},children:[s," Sec"]}),function(e){var t={boxShadow:"0px 0px 6px 0px #333",borderRadius:"50%",height:"24px",width:"24px",backgroundColor:"#fff",transition:"transform .5s",transform:"rotate(".concat(e.reloadAnimation,"deg)"),cursor:"pointer"};return(0,i.jsx)("span",{className:"flexCenter",style:t,children:(0,i.jsx)(o(),{height:17,width:15,src:"https://images.railyatri.in/ry_images_prod/2021-06-09-1623233027.png"})})}({reloadAnimation:u})]})})}function te(e){e.status;var t=e.stationCode,n=e.stationName,r=e.refreshInterval,o=e.arivalDelay,a=e.distanceFromUpCommingStation,l=e.statusAsOf,d=e.nextStation,u=void 0!==d&&d,f=e.setLtsData,p=e.trainNumber,m=function(e){var t=e.time,n=void 0===t?"":t,r=(0,c.WK)(n),o=r.hour,a=r.min;return(0,i.jsx)("span",{style:a<2?{backgroundImage:"linear-gradient(to right, #449522, #55a229, #65ae2f, #75bb36, #86c83d)",color:"#fff"}:{backgroundColor:"#b41d2f",color:"#fff"},children:a<2?"Ontime":"Delay ".concat(0!=o?"".concat(o,"h"):""," ").concat(0!=a&&"".concat(a,"m"))})};return 1==u?parseInt(a)>1?(0,i.jsx)("div",{className:"flexRow ".concat(s().timelineheader),children:(0,i.jsxs)("p",{className:s().timelineheaderyellowbg,children:["Next Stop ",n," at ",a,"kms ",(0,i.jsx)(m,{time:o})," "]})}):(0,i.jsx)("div",{className:"flexRow ".concat(s().timelineheader),children:(0,i.jsxs)("p",{className:s().timelineheaderyellowbg,children:["Arriving at ",n,(0,i.jsx)(m,{time:o})]})}):(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelineheader),children:[(0,i.jsxs)("p",{children:[l,(0,i.jsxs)("span",{children:["At ",t," Station"]})," "]}),(0,i.jsx)(ee,{refreshInterval:r,setLtsData:f,trainNumber:p})]})}function ne(e){var t=e.prevSetShowHalt,n=e.haltStations,r=(0,f.useRef)(null);return(0,f.useEffect)((function(){null!=r&&(r.current.style.height="0px");var e=setTimeout((function(){var t;null!=r&&(r.current.style.height="".concat(73*(null!==(t=null===n||void 0===n?void 0:n.length)&&void 0!==t?t:0)+44,"px"),clearInterval(e))}),100);return function(){return clearInterval(e)}}),[]),(0,i.jsx)("div",{ref:r,className:"".concat(s().wrapAnimation),children:null===n||void 0===n?void 0:n.map((function(e,r){return(0,i.jsx)(ie,{style:{height:"10px !important"},showHaltStationFlag:0==r,haltStationLen:n.length,trainStartDate:new Date,etaTime:"",lastStationCode:"",stationDetail
1s:e,prevSetShowHalt:t,callfromhaltStation:!0,foodAvailable:null===e||void 0===e?void 0:e.food_available},"nonStopStatios".concat(r))}))})}function ie(e){var t,n,r,a=e.currentStation,l=void 0!==a&&a,d=e.header,u=void 0===d?(0,i.jsx)(i.Fragment,{}):d,p=e.footer,m=void 0===p?(0,i.jsx)(i.Fragment,{}):p,v=e.stationDetails,h=e.previousStation,_=void 0!==h&&h,x=e.nextStation,g=void 0!==x&&x,b=e.specialCase,y=void 0!==b&&b,j=e.day,w=void 0!==j&&j,S=e.foodAvailable,k=void 0!==S&&S,C=e.trainStartDate,N=e.etaTime,Z=e.lastStationCode,R=e.trainNumber,T=e.trainName,P=e.haltStations,D=e.showHaltStationFlag,I=void 0!==D&&D,A=e.haltStationLen,O=void 0===A?void 0:A,F=e.prevSetShowHalt,M=e.showOnlyHalt,z=void 0!==M&&M;(0,f.useEffect)((function(){var e=setTimeout((function(){(0,c.AR)(["trainIcon"],{behavior:"smooth",block:"center",inline:"center"})}),1e3);return function(){return clearTimeout(e)}}),[]);var E,W,L,B,q,U=function(e){var t,n=e.sta,r=void 0===n?"":n,o=e.eta,a=void 0===o?"":o;return(0,i.jsx)("span",{style:{color:"".concat((null===(t=(0,c.Ur)([r,a]))||void 0===t?void 0:t.smallestTime)==a?"#61992a":"#e94949")},children:a})},Y=function(e){var t=e.time,n=void 0===t?"":t,r=(0,c.WK)(n),o=r.hour,a=r.min;return(0,i.jsx)("span",{style:{color:"".concat(a<2?"#61992a":"#e94949")},children:a<2?"Ontime":"Delay ".concat(0!=o?"".concat(o,"h"):""," ").concat(0!=a?"".concat(a,"m"):"")})},G=(0,f.useState)(!1),H=G[0],Q=G[1],V=(0,f.useState)(!1),X=V[0],J=V[1];return(0,i.jsxs)("div",{className:"flexCol ".concat(l||y?s().bgBlue:""," ").concat(l?s().addmargin:""," ").concat(_?s().prevbg:""),children:[H&&(0,i.jsx)(ne,{haltStations:P,haltStationLen:P.length,trainStartDate:new Date,etaTime:"",lastStationCode:"",stationDetails:v,prevSetShowHalt:Q,foodAvailable:null===v||void 0===v?void 0:v.food_available}),u,(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelinev2),children:[(0,i.jsxs)("div",{className:"flex1 flexRow",children:[(0,i.jsxs)("div",{className:"flexCol ".concat(!(_||l)&&null!==(E=(null===v||void 0===v||null===(t=v.non_stops)||void 0===t?void 0:t.length)>0)&&void 0!==E&&E&&s().haltStationAdjust),children:[0!=w&&!l&&(0,i.jsxs)("span",{className:s().day,children:["DAY ",w+1]}),(0,i.jsx)("h2",{children:null===v||void 0===v?void 0:v.station_code}),(0,i.jsx)("span",{children:null===v||void 0===v?void 0:v.sta}),(0,i.jsx)(U,{sta:null===v||void 0===v?void 0:v.sta,eta:null===v||void 0===v?void 0:v.eta})]}),(0,i.jsx)("div",{className:"".concat(!_&&s().blueLine),children:!z&&(0,i.jsx)("span",{className:"flexCenter ".concat(l&&!g?s().currentStation:""," ").concat(_?s().grayDot:s().blueDot," "),style:{top:"".concat(0==w||l?_||l||null===(W=(null===v||void 0===v||null===(n=v.non_stops)||void 0===n?void 0:n.length)>0)||void 0===W||!W?"16px":"56px":"43px")},children:l&&!g&&(0,i.jsx)(o(),{id:"trainIcon",height:80,width:80,src:"https://images.railyatri.in/ry_images_prod/LTS-Icon-1623305181.gif"})})})]}),(0,i.jsxs)("div",{className:"flex2 flexCol",children:[(0,i.jsxs)("div",{className:"flexRow flex1",children:[(0,i.jsxs)("div",{className:"flexCol",children:[!(_||l)&&(null!==(L=(null===P||void 0===P?void 0:P.length)>0)&&void 0!==L&&L||I)&&!H&&(0,i.jsx)("div",{style:{backgroundColor:"#C6DFFC",padding:"2px 8px",borderRadius:"20px",fontSize:"10px",textAlign:"center",width:"fit-content",margin:"12px 0px"},onClick:function(){1==I?F(!1):Q(!0)},children:void 0==O?"+".concat(P.length," No-Halt stations"):"-".concat(O," No-Halt stations")}),(0,i.jsxs)("h2",{children:[" ",null===v||void 0===v||null===(r=v.station_name)||void 0===r?void 0:r.toLowerCase()," ",(0,i.jsx)("sup",{children:null===v||void 0===v?void 0:v.stoppage_number})]}),(0,c.PR)(null===v||void 0===v?void 0:v.distance_from_source)&&(0,i.jsxs)("p",{children:[(0,i.jsxs)("span",{children:[null===v||void 0===v?void 0:v.distance_from_source,"Kms "]}),"  ",(0,c.PR)(null===v||void 0===v?void 0:v.platform_number)?(0,i.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){J((function(e){return!e}))},children:["| PF #",null===v||void 0===v?void 0:v.platform_number]}):""," "]}),(0,c.PR)(null===v||void 0===v?void 0:v.arrival_delay)?(0,i.jsx)(Y,{time:null===v||void 0===v?void 0:v.arrival_delay}):(0,i.jsx)("span",{style:{height:"12px"}})]}),(0,c.PR)(null===v||void 0===v?void 0:v.std)&&(0,c.PR)(null===v||void 0===v?void 0:v.std)&&(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsx)("span",{children:null!==(B=null===v||void 0===v?void 0:v.std.substr(-6))&&void 0!==B?B:null===v||void 0===v?void 0:v.std}),(0,i.jsx)(U,{sta:null===v||void 0===v?void 0:v.std,eta:null===v||void 0===v?void 0:v.etd})]})]}),(0,i.jsxs)("div",{children:[k&&(0,i.jsx)("a",{href:"/buy-food-in-train?train_number=".concat(R,"&day=2&station_code=").concat(v.station_code,"&train_start_date=").concat((q=C,"".concat(q.getDate(),"-").concat(q.getMonth(),"-").concat(q.getFullYear())),"&eta_time=").concat(N,"&lts=1&to_station=").concat(Z,"&utm_source=lts&src=running_status_details&start_date="),children:(0,i.jsxs)("span",{className:"flex1 flex ".concat(s().bottomFoodIcon),children:[(0,i.jsx)("span",{style:{width:"18px",height:"auto"},children:(0,i.jsx)(o(),{height:25,width:33,quality:100,src:"https://images.railyatri.in/assets/mobile_view/lts/food-dd3ff305a3a25f6e598781e63a509844b92025c65e31d5db12193014e9f646b7.png"})}),"Order Food"]})}),(0,i.jsx)("hr",{})]})]})]}),m,X&&(0,i.jsx)(ae,{setShowPlatformChange:J,stationName:v.station_name,stationCode:v.station_code,trainNumber:R,platformNumber:v.platform_number,trainName:T})]})}function re(e){var t=e.refreshInterval,n=e.setLtsData,r=e.trainNumber,a=(0,f.useState)(t),s=a[0],l=a[1],d=(0,m.useRouter)();(0,f.useEffect)((function(){var e=setInterval((function(){return l((function(e){return e-1}))}),1e3);return function(){return clearInterval(e)}}),[]);var u=(0,f.useState)(0),v=u[0],h=u[1];(0,f.useEffect)((function(){var e;s<1&&(!function(e){var t=(0,c.PC)();(0,p.Am)({trainNumber:r,day:e,userId:t.userId}).then((function(e){h((function(e){return e+360})),0!=e&&n(e)}))}(null!==(e=d.query.start_day)&&void 0!==e?e:0),l(t))}),[s]);return(0,i.jsx)("div",{style:{float:"right",display:"flex",justifyContent:"end",cursor:"pointer"},onClick:function(){return l(0)},children:(0,i.jsxs)("div",{className:"flexRow flexCenter",children:[(0,i.jsxs)("span",{className:"flexCenter",style:{boxShadow:"0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)",width:"75px",color:"#2196f3 !important",borderRadius:"3px",marginRight:"-2px",backgroundColor:"#fff"},children:[s," Sec"]}),function(e){var t={boxShadow:"0px 0px 6px 0px #333",borderRadius:"50%",height:"24px",width:"24px",backgroundColor:"#fff",transition:"transform .5s",transform:"rotate(".concat(e.reloadAnimation,"deg)")};return(0,i.jsx)("span",{className:"flexCenter",style:t,children:(0,i.jsx)(o(),{height:17,width:15,src:"https://images.railyatri.in/ry_images_prod/2021-06-09-1623233027.png"})})}({reloadAnimation:v})]})})}function oe(e){var t,n,r,a,l,d,u=e.currentStation,p=void 0===u||u,m=e.refreshInterval,v=void 0===m?60:m,h=e.setshowNonStops,_=e.stationDetail
1s,x=e.previousStation,g=void 0===x||x,b=e.currentLocationMessages,y=void 0===b?[]:b,j=e.trainStatus,w=e.haltText,S=void 0===w?"":w,k=e.setLtsData,C=e.trainNumber,N=function(e){var t,n=e.sta,r=void 0===n?"":n,o=e.eta,a=void 0===o?"":o;return(0,i.jsx)("span",{style:{color:"".concat((null===(t=(0,c.Ur)([r,a]))||void 0===t?void 0:t.smallestTime)==a?"#61992a":"#e94949")},children:a})},Z=(0,f.useState)(0),R=Z[0],T=Z[1],P=(0,f.useState)(s().transitionleft),D=P[0],I=P[1];return(0,f.useEffect)((function(){var e=setInterval((function(){I(s().transitionleft),setTimeout((function(){T((function(e){return(e+1)%y.length})),I(s().transitionright)}),500)}),2e3);return function(){clearInterval(e)}})),(0,i.jsx)("div",{className:"flexCol",children:(0,i.jsxs)("div",{className:"flexRow ".concat(s().timelinev2," ").concat(p?s().currentStationPadding:""),children:[(0,i.jsxs)("div",{className:"flex1 flexRow",children:[(0,i.jsxs)("div",{className:"flexCol",style:{width:"37px",justifyContent:"center"},children:[(0,i.jsx)("h2",{children:null!==(l=null===_||void 0===_?void 0:_.station_code)&&void 0!==l?l:""}),(0,i.jsx)("span",{children:null!==(d=null===_||void 0===_?void 0:_.sta)&&void 0!==d?d:""}),"T"!=j&&(0,i.jsx)(N,{sta:null===_||void 0===_?void 0:_.sta,eta:null===_||void 0===_?void 0:_.eta})]}),(0,i.jsx)("div",{onClick:function(){return h((function(e){return!e}))},children:(0,i.jsx)("span",{className:"flexCenter ".concat(s().currentStation),style:{marginTop:"".concat(g?"26px":"0px"),backgroundColor:"".concat(g?"#b4b4b4 !important":"#2a9af3 !important")},children:p&&(0,i.jsx)(o(),{id:"trainIcon",height:80,width:80,src:"https://images.railyatri.in/ry_images_prod/LTS-Icon-1623305181.gif"})})})]}),(0,c.PR)(null===(t=y[R])||void 0===t?void 0:t.label)?(0,i.jsxs)("div",{className:"flex2 flexCol ".concat(s().marginReduce),children:[(0,i.jsx)(re,{refreshInterval:v,setLtsData:k,trainNumber:C}),(0,i.jsx)("span",{className:s().spare}),(0,i.jsxs)("div",{className:"flexCol ".concat(s().currentLocationMessage),children:[(0,i.jsx)("span",{style:{fontSize:"10px"},children:null===(n=y[R])||void 0===n?void 0:n.label}),(0,i.jsxs)("p",{className:"".concat(s().item," ").concat(D),style:{fontSize:"14px"},onClick:function(){return h((function(e){return!e}))},children:[null===(r=y[R])||void 0===r?void 0:r.message," ( ",null===(a=y[R])||void 0===a?void 0:a.hint," )"]})]})]}):(0,i.jsx)("div",{className:"flex2 flexCol",style:{height:"60px",justifyContent:"end"},onClick:function(){return h((function(e){return!e}))},children:(0,i.jsx)("p",{style:{fontSize:"14px"},children:S})})]})})}function ae(e){for(var t=e.setShowPlatformChange,n=e.stationName,r=e.stationCode,o=e.trainNumber,a=e.trainName,l=e.platformNumber,c=(0,f.useState)(""),d=c[0],u=c[1],m=(0,f.useState)(!1),v=m[0],h=m[1],_=[],x=1;x<=29;x++)_.push(x);var g={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},popup:{backgroundColor:"#fff",padding:"20px",borderRadius:"8px",width:"400px",boxShadow:"0px 0px 15px rgba(0,0,0,0.2)",position:"relative"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"15px",color:"#404040"},closeButton:{border:"none",background:"transparent",fontSize:"16px",cursor:"pointer"},content:{marginBottom:"20px"},inputContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"20px"},input:{width:"60px",padding:"8px",borderRadius:"4px",border:"1px solid #ccc"},select:{padding:"8px 16px",borderRadius:"4px",border:"1px solid #ccc",width:"100%"},updateButton:{width:"100%",padding:"10px",backgroundColor:"#2196f3",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontWeight:"bold"}};return(0,i.jsx)(G.Z,{onClose:function(){return t(!1)},children:(0,i.jsx)("div",{style:g.overlay,children:(0,i.jsxs)("div",{style:g.popup,children:[(0,i.jsxs)("div",{style:g.header,children:[(0,i.jsxs)("h5",{children:[o," ",a]}),(0,i.jsx)("button",{onClick:function(){return t(!1)},style:g.closeButton,children:"X"})]}),(0,i.jsxs)("div",{style:g.content,children:[(0,i.jsx)("p",{style:{color:"#757575",fontSize:"16px"},children:"Please suggest a new platform number"}),(0,i.jsx)("h3",{style:{color:"#404040",fontSize:"15px",fontWeight:"bold"},children:n})," ",(0,i.jsxs)("div",{style:g.inputContainer,children:[" ",(0,i.jsxs)("div",{className:"flexCol",children:[(0,i.jsx)("label",{style:{fontSize:"16px"},children:" Existing "}),(0,i.jsx)("input",{type:"text",value:l,readOnly:!0,style:g.input})]}),(0,i.jsxs)("div",{className:"flexCol flex1",children:[(0,i.jsx)("label",{style:{fontSize:"16px"},children:" New"}),(0,i.jsxs)("select",{value:d,onChange:function(e){return u(e.target.value)},style:g.select,children:[(0,i.jsx)("option",{value:"",children:"Select"}),_.map((function(e){return(0,i.jsx)("option",{value:e,onClick:function(){return u(e)},children:e},e)}))]})]})]})]}),(0,i.jsx)("button",{style:g.updateButton,onClick:function(){(0,p.Nb)({platformNumber:d,stationCode:r,trainNumber:o}).then((function(){h(!0)}))},children:"UPDATE"}),v&&(0,i.jsxs)("div",{className:"flexCol ".concat(s().platformSaveMessage),children:[(0,i.jsx)("p",{children:" Your contribution will be published upon approval. Thanks for keeping the RailYatri application fresh and updated always! "}),(0,i.jsx)("button",{onClick:function(){return h(!1)},children:"Okay"})]})]})})})}function se(e){var t,n,r,o=e.ltsData,a=e.setLtsData;if(e.ltsLoading)return(0,i.jsx)(v.Y,{count:5});for(var l,d=(0,f.useState)(!1),u=d[0],p=d[1],m={si_no:null===o||void 0===o?void 0:o.si_no,station_name:o.current_station_name,station_code:o.current_station_code,sta:o.cur_stn_sta,eta:o.eta,stoppage_number:o.stoppage_number,distance_from_source:o.distance_from_source,platform_number:o.platform_number,arrival_delay:o.delay,std:o.std,etd:o.etd,train_at:"C"},h=0;h<(null===o||void 0===o||null===(t=o.upcoming_stations)||void 0===t?void 0:t.length);h++){var _;if(null===(_=null===o||void 0===o?void 0:o.upcoming_stations[h])||void 0===_?void 0:_.station_code){var x;l=h,!!(0,c.PR)(null===(x=null===o||void 0===o?void 0:o.upcoming_stations[h])||void 0===x?void 0:x.non_stops);break}}var g=function(){try{var e,t,n,i,r=[];null===r||void 0===r||(e=r).push.apply(e,V(null===(n=null===o||void 0===o?void 0:o.previous_stations[(null===o||void 0===o||null===(t=o.previous_stations)||void 0===t?void 0:t.length)-1])||void 0===n?void 0:n.non_stops)),null===r||void 0===r||r.push(m);for(var a=0;a<(null===o||void 0===o||null===(i=o.upcoming_stations)||void 0===i?void 0:i.length);a++){var s;if(!(0,c.PR)(null===(s=null===o||void 0===o?void 0:o.upcoming_stations[a])||void 0===s?void 0:s.station_code)){var l,d;null===r||void 0===r||(l=r).push.apply(l,V(null===(d=o.upcoming_stations[a])||void 0===d?void 0:d.non_stops));break}}return r}catch(u){return[]}}(),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!=e){var t=Q(e.split(":"),2),n=t[0],i=t[1];return 60*parseInt(n)+i}},y=!1,j={};return(0,i.jsxs)("div",{id:"ltsdataheader",className:"flexCol ".concat(s().liveTrainContainer),children:[(0,i.jsxs)("div",{className:"flexRow ".concat(s().liveTrainsStatusHeader),children:[(0,i.jsxs)("div",{className:"flex1",children:[" ",(0,i.jsx)("span",{children:"Arival"})," "]}),(0,i.jsxs)("div",{className:"flex2",children:[" ",(0,i.jsx)("span",{children:"Station"})," ",(0,i.jsx)("span",{children:"Departure"})," "]})]}),(0,i.jsxs)("div",{className:"".concat(s().timelineContainer),children:[null===(n=o.previous_stations)||void 0===n?void 0:n.map((function(e,t){return(0,i.jsx)(ie,{stationDetail
1s:e,previousStation:!0,day:!(e.day==y||!(0,c.PR)(e.day))&&(y=e.day,e.day),trainStartDate:new Date,etaTime:b(o.eta),trainNumber:o.train_number,trainName:o.train_name,lastStationCode:o.destination,header:(null===e||void 0===e?void 0:e.station_code)==(null===m||void 0===m?void 0:m.station_code)?(0,i.jsx)(te,{status:o.status,statusAsOf:o.status_as_of,stationCode:o.current_station_code,stationName:m.station_name,refreshInterval:o.refresh_interval,distanceFromUpCommingStation:m.distance_from_current_station,setLtsData:a,trainNumber:o.train_number,arivalDelay:m.arrival_delay}):(0,i.jsx)(i.Fragment,{}),footer:(null===e||void 0===e?void 0:e.station_code)==(null===m||void 0===m?void 0:m.station_code)?(0,i.jsx)($,{time:o.eta,trainNumber:o.train_number,eta:o.eta,std:o.std,current_station_code:o.current_station_code,trainStartDate:new Date,etaTime:b(o.eta),lastStationCode:o.destination}):(0,i.jsx)(i.Fragment,{})},"ltsCard_".concat(t))})),"A"==(null===o||void 0===o?void 0:o.status)?(0,i.jsx)(ie,{stationDetails:m,currentStation:!0,foodAvailable:null===o||void 0===o?void 0:o.food_available,trainStartDate:new Date,trainNumber:o.train_number,trainName:o.train_name,etaTime:b(o.eta),lastStationCode:o.destination,header:(0,i.jsx)(te,{status:o.status,statusAsOf:o.status_as_of,stationCode:o.current_station_code,stationName:m.station_name,refreshInterval:o.refresh_interval,distanceFromUpCommingStation:m.distance_from_current_station,setLtsData:a,trainNumber:o.train_number,arivalDelay:m.arrival_delay}),footer:(0,i.jsx)($,{time:o.eta,trainNumber:o.train_number,eta:o.eta,std:o.std,current_station_code:o.current_station_code,trainStartDate:new Date,etaTime:b(o.eta),lastStationCode:o.destination})},"CurrentStation"):u?null===g||void 0===g?void 0:g.map((function(e,t){var n;return"C"==(null===e||void 0===e?void 0:e.train_at)?(0,i.jsx)(oe,{stationDetails:m,setshowNonStops:p,currentLocationMessages:null===o||void 0===o?void 0:o.current_location_info,trainStatus:"T",trainNumber:o.train_number,setLtsData:a,refreshinterval:o.refresh_interval},"CurrentStation"):(0,i.jsx)(ie,{trainStartDate:new Date,etaTime:b(o.eta),lastStationCode:o.destination,stationDetails:e,foodAvailable:null===e||void 0===e?void 0:e.food_available,showHaltStationFlag:0==t,haltStationLen:null!==(n=null===g||void 0===g?void 0:g.length)&&void 0!==n?n:void 0,prevSetShowHalt:p},"nonStopStatios".concat(t))})):(0,i.jsx)(oe,{stationDetails:m,setshowNonStops:p,currentLocationMessages:"A"==(null===o||void 0===o?void 0:o.status)?[]:null===o||void 0===o?void 0:o.current_location_info,trainStatus:o.status,haltText:"".concat((null===g||void 0===g?void 0:g.length)>0?"+"+g.length:"No"," halt Station"),setLtsData:a,trainNumber:o.train_number,refreshInterval:o.refresh_interval},"CurrentStation"),null===(r=o.upcoming_stations)||void 0===r?void 0:r.map((function(e,t){var n,r,s=(null===e||void 0===e?void 0:e.station_code)?(0,i.jsx)(ie,{stationDetails:e,haltStations:j,trainStartDate:new Date,trainNumber:o.train_number,trainName:o.train_name,etaTime:b(o.eta),lastStationCode:o.destination,nextStation:!0,day:!(e.day==y||!(0,c.PR)(e.day))&&(y=e.day,e.day),foodAvailable:(null===e||void 0===e?void 0:e.food_available)&&(null===e||void 0===e?void 0:e.station_code)!=(null===m||void 0===m?void 0:m.station_code)&&t!=l,currentStation:t==l||(null===e||void 0===e?void 0:e.station_code)==(null===m||void 0===m?void 0:m.station_code),header:t==l||(null===e||void 0===e?void 0:e.station_code)==(null===m||void 0===m?void 0:m.station_code)?(0,i.jsx)(te,{status:o.status,statusAsOf:o.status_as_of,stationCode:e.station_code,stationName:e.station_name,setLtsData:a,refreshInterval:o.refresh_interval,trainNumber:o.train_number,distanceFromUpCommingStation:e.distance_from_current_station,nextStation:!0,arivalDelay:e.arrival_delay}):(0,i.jsx)(i.Fragment,{}),footer:t==l||(null===e||void 0===e?void 0:e.station_code)==(null===m||void 0===m?void 0:m.station_code)?(0,i.jsx)($,{time:o.eta,trainNumber:o.train_number,eta:o.eta,std:o.std,current_station_code:o.current_station_code,nextStation:!0,trainStartDate:new Date,etaTime:b(o.eta),lastStationCode:o.destination,show
1Food:null===e||void 0===e?void 0:e.food_available}):(0,i.jsx)(i.Fragment,{})},"ltsCard_".concat(t)):null!==(n="T"!=(null===o||void 0===o?void 0:o.status)&&"D"!=(null===o||void 0===o?void 0:o.status))&&void 0!==n&&n&&(0,i.jsx)(ie,{trainStartDate:new Date,etaTime:"",lastStationCode:"",stationDetails:e,foodAvailable:!1,haltStations:e.non_stops,showOnlyHalt:!0},"nonStopStatios".concat(t));return j=null!==(r=null===e||void 0===e?void 0:e.non_stops)&&void 0!==r?r:[],s}))]})]})}var le=n(86891),ce=n(95534),de=n(11359),ue=n(66637),fe=n(66720),pe=n(68239),me=n(74223),ve=n(54151),he=n(5152),_e=n.n(he),xe=n(37690),ge=_e()((function(){return n.e(5785).then(n.bind(n,45785))}),{loadableGenerated:{webpack:function(){return[45785]}},ssr:!1}),be=(0,pe.Z)({typography:{htmlFontSize:12},components:{MuiCssBaseline:{styleOverrides:{body:{"&::-webkit-scrollbar-track":{WebkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.3)",backgroundColor:"#f5f5f5"},"&::-webkit-scrollbar":{width:"6px",backgroundColor:"#f5f5f5"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc"}}}}}}),ye=!0;function je(e){var t,n,r,o,a,s,l,d,u,p,m,v,h,_,x,g,b,y,j,w,S,k,C,N,Z,R,T,P,D,I,A,O,F,M,E,W,L,q,U,Y,G,H,Q,V,X,K,$,ee=e.ltsData,te=e.timeTableData,ne=e.startDay,ie=e.defaultSelection,re=e.trainNumber,oe=e.isMobileReq,ae=e.trainStartDate,se=(0,f.useRef)(ee),pe=(0,f.useState)(oe),he=pe[0],_e=pe[1];return(0,f.useEffect)((function(){var e=function(){window.innerWidth<=657?_e(!0):_e(!1)};return window.addEventListener("resize",e),window.innerWidth<=657?_e(!0):_e(!1),function(){return window.removeEventListener("resize",e)}}),[]),(0,i.jsxs)(me.Z,{theme:be,children:[(0,i.jsx)(fe.ZP,{}),(0,i.jsx)("meta",{charSet:"utf-8"}),(0,i.jsxs)(de.v,{title:"Live Running Status of Train ".concat(re,"(").concat(null!==(R=null!==(Z=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==Z?Z:null===(t=te[0])||void 0===t?void 0:t.train_name)&&void 0!==R?R:"",")- RailYatri"),script:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:'{ "@context":"http://schema.org", "@type":"ItemList", "itemListElement":[ { "@type":"SiteNavigationElement", "position":1, "name": "Live Train Status", "url":"https://www.railyatri.in/m/live-train-status" }, { "@type":"SiteNavigationElement", "position":2, "name": "Download App", "url":"https://www.railyatri.in/app" }, { "@type":"SiteNavigationElement", "position":3, "name": "Train Between Stations", "url":"https://www.railyatri.in/m/trains-between-stations" }, { "@type":"SiteNavigationElement", "position":4, "name": "Train Tickets", "url":"https://www.railyatri.in/m/train-ticket" }, { "@type":"SiteNavigationElement", "position":5, "name": "PNR Status", "url":"https://www.railyatri.in/m/pnr-status" }, { "@type":"SiteNavigationElement", "position":6, "name": "Bus Tickets", "url":"https://www.railyatri.in/m/bus-booking" } ] }'}}),(0,i.jsx)("script",{src:"https://revivifypro.in/refresh/rd/dfp.min.js"})]}),canonical:"https://www.railyatri.in/live-train-status/".concat(re,"-").concat(null!==(P=null!==(T=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==T?T:null===(n=te[0])||void 0===n?void 0:n.train_name)&&void 0!==P?P:""),androidAlt:"android-app://com.railyatri.in.mobile/http://m.rytr.in/live-train-status/".concat(re,"-").concat(null!==(D=null===ee||void 0===ee?void 0:ee.ir_train_name)&&void 0!==D?D:""),description:"Check live running status of train ".concat(re," ").concat(null!==(A=null!==(I=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==I?I:null===(r=te[0])||void 0===r?void 0:r.train_name)&&void 0!==A?A:""," on RailYatri. It departs from ").concat(null===(a=null===(o=te[0])||void 0===o?void 0:o.route[0])||void 0===a?void 0:a.station_name," | ").concat(null===(l=null===(s=te[0])||void 0===s?void 0:s.route[0])||void 0===l?void 0:l.station_code," at ").concat((0,c.Os)(null!==(O=null===(u=null===(d=te[0])||void 0===d?void 0:d.route[0])||void 0===u?void 0:u.std_min)&&void 0!==O?O:0),". Download app to get your live train updates today!"),ogDescription:"Check live running status of train ".concat(re," ").concat(null!==(M=null!==(F=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==F?F:null===(p=te[0])||void 0===p?void 0:p.train_name)&&void 0!==M?M:""," on RailYatri. It departs from ").concat(null===(v=null===(m=te[0])||void 0===m?void 0:m.route[0])||void 0===v?void 0:v.station_name," | ").concat(null===(_=null===(h=te[0])||void 0===h?void 0:h.route[0])||void 0===_?void 0:_.station_code," at ").concat((0,c.O
1s)(null!==(E=null===(g=null===(x=te[0])||void 0===x?void 0:x.route[0])||void 0===g?void 0:g.std_min)&&void 0!==E?E:0),". Download app to get your live train updates today!"),children:[(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:' { "@context": "http://schema.org", "@type": "Organization", "url": "https://www.railyatri.in/", "logo": "https://images.railyatri.in/assets/logo_header-16cb48a876cd8f1697ffbf97575db24fa7dcb7c682374f7ce5a1d5ea827b51ee.png" } { "@context": "http://schema.org", "@type": "Organization", "name": "RailYatri", "url": "https://www.railyatri.in/", "sameAs": [ "https://www.facebook.com/railyatri", "https://twitter.com/railyatri", "https://plus.google.com/+RailYatriIndia" ] } '}}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:' { "@context":"https://schema.org/", "@type":"MobileApplication", "name": "Railyatri","aggregateRating":{"@type":"AggregateRating","ratingValue":4.397,"reviewCount":1490755} }'}}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:' { "@context":"http://schema.org/", "@type":"MobileApplication", "name": "Railyatri", "aggregateRating":{ "@type":"AggregateRating", "ratingValue":"4.522", "reviewCount":"438627" }, "applicationCategory":"Travel", "operatingSystem":"Android", "URL":"https://play.google.com/store/apps/details?id=com.railyatri.in.mobile" } '}})]}),he?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ue.h4,{}),(0,i.jsx)(ge,{slotId:null===xe.x||void 0===xe.x||null===(b=xe.x.ltsresulttop)||void 0===b?void 0:b.slotId,adContainerId:null===xe.x||void 0===xe.x||null===(y=xe.x.ltsresulttop)||void 0===y?void 0:y.adContainerId,adSizes:null===xe.x||void 0===xe.x||null===(j=xe.x.ltsresulttop)||void 0===j?void 0:j.adSizes}),(0,i.jsx)(ue.Xp,{}),(0,i.jsx)(le.Z,{lts:(0,i.jsx)(z.Z,{ltsServerSideData:se,startDay:ne,trainNumber:re,timeTable:(0,i.jsx)(ce.A,{data:te,trainName:null!==(L=null!==(W=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==W?W:null===(w=te[0])||void 0===w?void 0:w.train_name)&&void 0!==L?L:"",showSeoSection:!0,journeyTime:null!==(q=null===ee||void 0===ee?void 0:ee.journey_time)&&void 0!==q?q:"",upcommingStations:null!==(U=null===ee||void 0===ee?void 0:ee.upcoming_stations)&&void 0!==U?U:""})}),timeTable:(0,i.jsx)(ce.A,{data:te,trainNumber:re}),defaultSelection:ie})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ve.YS,{children:(0,i.jsx)("div",{style:{marginTop:"12px",gap:"16px"},children:(0,i.jsxs)("div",{className:"flexRow",style:{width:"100%"},children:[(0,i.jsx)("div",{style:{width:"66.666667%",boxShadow:"-1px 3px 5px 0px rgba(0,0,0,0.13)"},children:(0,i.jsx)(le.Z,{lts:(0,i.jsx)(J,{ltsServerSideData:se,startDay:ne,trainNumber:(0,c.PR)(re)?re:null!==(Y=null===(S=te[0])||void 0===S?void 0:S.train_number)&&void 0!==Y?Y:"",trainName:null!==(H=null!==(G=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==G?G:null===(k=te[0])||void 0===k?void 0:k.train_name)&&void 0!==H?H:"",isMobile:he,trainStartDate:ae,timeTable:(0,i.jsx)(ce.A,{data:te,showSeoSection:!0,journeyTime:null!==(Q=null===ee||void 0===ee?void 0:ee.journey_time)&&void 0!==Q?Q:"",upcommingStations:null!==(V=null===ee||void 0===ee?void 0:ee.upcoming_stations)&&void 0!==V?V:"",isMobile:he})}),timeTable:(0,i.jsx)(ce.A,{data:te,trainNumber:re,isMobile:he}),defaultSelection:ie,isMobile:he})}),(0,i.jsx)("div",{style:{width:"33.333333%"},children:(0,i.jsx)(B,{train_number:(0,c.PR)(re)?re:null!==(X=null===(C=te[0])||void 0===C?void 0:C.train_number)&&void 0!==X?X:"",train_name:null!==($=null!==(K=null===ee||void 0===ee?void 0:ee.train_name)&&void 0!==K?K:null===(N=te[0])||void 0===N?void 0:N.train_name)&&void 0!==$?$:""})})]})})})})]})}},63018:function(e,t,n){"use strict";n.d(t,{W:function(){return d}});var i=n(34051),r=n.n(i),o=n(94226),a=n(99685);function s(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){s(o,i,r,a,l,"next",e)}function l(e){s(o,i,r,a,l,"throw",e)}a(void 0)}))}}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c.apply(this,arguments)}function d(e){return u.apply(this,arguments)}function u(){return(u=l(r().mark((function e(t){var n,i,s,l,d,u,f,p,m,v,h,_,x,g,b,y,j,w,S,k,C,N,Z,R,T;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c({},t),l=(s=n||{}).train_number,d=s.selectedClass,u=s.train_src,f=s.train_dstn,p=s.journey_date,m=s.quota,v=s.utm_source,h=s.device,_=s.dDay,x=s.trainSource,g=s.trainDestination,b=s.btbOrgId,y=s.btbUserId,j=s.v_code,w="minits_future_availability_request_count",S="".concat("https://sa.railyatri.in","/api/seat/enquiry/").concat(l,"/").concat(p,"/").concat(u,"/").concat(f,"/").concat(d,"/").concat(m,".json?device_type_id=").concat(h,"&src=ttb_landing&utm_source=").concat(v,"&is_update=true&update_duration=0&d_day=").concat(_,"&train_source=").concat(x,"&train_destination=").concat(g,"&v_code=").concat(j),k=function(e){return new Promise((function(t){return setTimeout(t,e)}))},C=!1,N=3,4==h&&(N=5),b&&y||4==h){Z=0;try{Z=Number(localStorage.getItem(w))||0}catch(r){Z=0}(Z+=1)>=N&&(C=!0),localStorage.setItem(w,Z)}if(!C){e.next=13;break}return e.next=13,k(5e3);case 13:return R={apiurl:S,type:"get"},e.next=16,(0,o.Z)(R);case 16:if(!(null===(T=e.sent)||void 0===T||null===(i=T.data)||void 0===i?void 0:i.success)){e.
1next=21;break}return e.abrupt("return",T.data);case 21:return(0,a.yW)("","",{step:"New_SixDay_API_Error",api_error:S,current_url:"".concat(JSON.stringify(T)),alt_availability:"",trip_guarantee:""}),e.abrupt("return",{});case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},64181:function(e,t,n){"use strict";n.d(t,{MS:function(){return o},Re:function(){return r},cK:function(){return a}});var i=n(1531);function r(e){return!!(0,i.PR)(e)&&(null===e||void 0===e?void 0:e.some((function(e){return!0===(null===e||void 0===e?void 0:e.alt_cnf_seat)})))}function o(e){return!!(0,i.PR)(e)&&(null===e||void 0===e?void 0:e.some((function(e){return!0===(null===e||void 0===e?void 0:e.ry_guarantee)})))}function a(e){try{var t=e,n="/Generic-Web/https://";return e.includes(n)&&(t="https://"+e.split(n)[1]),new URL(t).searchParams.get("avail")}catch(i){return null}}},24720:function(e){e.exports={popcontainer:"main_popcontainer__NCTlI",loaderBox:"main_loaderBox__eTqiz",loader_one:"main_loader_one__lWarz",loader_two:"main_loader_two__TMYN5",loader_three:"main_loader_three__AT4WZ",marg_left_24:"main_marg_left_24__c2hPv",spinner:"main_spinner__b_0YP","sk-bouncedelay":"main_sk-bouncedelay__udjea",bounce1:"main_bounce1__mYZJ1",bounce2:"main_bounce2__qYJE2",bounce3:"main_bounce3__AMQzg",inputWrapper:"main_inputWrapper__o0WOR"}},14592:function(e){e.exports={mainContainer:"mWebheaders_mainContainer__dkYV7",stickMainContainer:"mWebheaders_stickMainContainer__WEE1r",tab:"mWebheaders_tab__Detia",mainHeader:"mWebheaders_mainHeader__1q8cc"}},93549:function(e){e.exports={bgBlue:"result_bgBlue__2h1xj",currentStation:"result_currentStation__wP4PJ",currentStationPadding:"result_currentStationPadding__62adG",headerMainContainer:"result_headerMainContainer__X8yLZ",modify:"result_modify__xeRcM",message:"result_message__eFlAd",nonAlertMessage:"result_nonAlertMessage__IErRd",messageContainer:"result_messageContainer__TLqtZ",liveTrainsStatusHeader:"result_liveTrainsStatusHeader__f0bzO",timeTableContainer:"result_timeTableContainer__1NKpw",timeTableStatusHeader:"result_timeTableStatusHeader__5K0iw",timeTableStatusHeaderr:"result_timeTableStatusHeaderr__qGbAE",timeline:"result_timeline__lofcK",timelineDetails:"result_timelineDetails__tTQ_g",timelinev2:"result_timelinev2__7rdV_",timelineContainer:"result_timelineContainer__YLFp_",timelineFooter:"result_timelineFooter__Pe3Jw",timelineheader:"result_timelineheader__fj1wn",timelineheaderyellowbg:"result_timelineheaderyellowbg__BaHNn",disclaimer:"result_disclaimer__7E9VE",currentLocationMessage:"result_currentLocationMessage__ONL0g",spare:"result_spare__8_8Ot",blueDot:"result_blueDot__GQOMG",grayDot:"result_grayDot__Pa1oc",day:"result_day__boJ9y",bottomFoodIcon:"result_bottomFoodIcon__SvWye",prevbg:"result_prevbg__zC5F5",headerSticktop:"result_headerSticktop__mHjmI",item:"result_item__pnw5i",transitionleft:"result_transitionleft__e3oKl",transitionright:"result_transitionright__85XAW",haltStationAdjust:"result_haltStationAdjust__nqJwI",marginReduce:"result_marginReduce__aRet2",platformSaveMessage:"result_platformSaveMessage__snViv",wrapAnimation:"result_wrapAnimation__rsbtO",blueLine:"result_blueLine__voCzw"}},64993:function(e){e.exports={mainContainer:"freeForCancel_mainContainer__I3iWv",header:"freeForCancel_header__Tm3pw",recommended:"freeForCancel_recommended__xDNlt",middleSection:"freeForCancel_middleSection__GhVYg",radioButton:"freeForCancel_radioButton__ANbh8",popup:"freeForCancel_popup__dQEiJ",checked:"freeForCancel_checked__20mix",checkbox:"freeForCancel_checkbox__3EZIv",message:"freeForCancel_message__tsUpz",error:"freeForCancel_error__7hWOa"}},73763:function(e){e.exports={white_timeline_bg:"trainstopage_white_timeline_bg__yJQ4V",text_center:"trainstopage_text_center__WYlUJ",black_txt:"trainstopage_black_txt__t_XtF",l_grey:"trainstopage_l_grey__kicH5",lts_timeline_title:"trainstopage_lts_timeline_title__tNWeU","lts-timeline_time-table":"trainstopage_lts-timeline_time-table__oQFLN",text_right:"trainstopage_text_right__mjAmX",lts_timeline_header:"trainstopage_lts_timeline_header__DZhMd",white_txt:"trainstopage_white_txt__FkFer",fs12:"trainstopage_fs12__rh5jC",timeline_circle:"trainstopage_timeline_circle__lY6mU","lts-iconbg":"trainstopage_lts-iconbg__AkQRP","timeline-circle":"trainstopage_timeline-circle__S7Q6O","train-icon":"trainstopage_train-icon__jy0V3",clearfix:"trainstopage_clearfix__fI_Y0",timeline_listing:"trainstopage_timeline_listing___s1lT","lts-content":"trainstopage_lts-content__OmB8a","timeline-listing":"trainstopage_timeline-listing__Fe82Z",upcoming_stn_upsell:"trainstopage_upcoming_stn_upsell__JN73D",no_border_clr:"trainstopage_no_border_clr__W7oGr",blue_bg:"trainstopage_blue_bg__LgwyR",grey_bg:"trainstopage_grey_bg__yYn_z",day_count:"trainstopage_day_count__rWMg4",timeline_plus_minus_blk:"trainstopage_timeline_plus_minus_blk__Fma8U",font_w500:"trainstopage_font_w500__4G79A",grey_4a:"trainstopage_grey_4a__9i_Q8",fs11:"trainstopage_fs11___by8V",upcoming_stn_info:"trainstopage_upcoming_stn_info__JT5vi",dly_time:"trainstopage_dly_time__D5K_m",stn_pipe:"trainstopage_stn_pipe__gypCI",font_xxs:"trainstopage_font_xxs__e8DQl",marg_bot_2:"trainstopage_marg_bot_2__eF0v_","upcoming-stn_info":"trainstopage_upcoming-stn_info__ryNWl",blue_txt_op:"trainstopage_blue_txt_op__h8zv7",marg_top_10:"trainstopage_marg_top_10__3EyhS",marg_bot_15:"trainstopage_marg_bot_15__F0tPv",marg_top_30:"trainstopage_marg_top_30__VV_8c",dlts_cards_block:"trainstopage_dlts_cards_block__GHXXH",dlts_cards_content:"trainstopage_dlts_cards_content__sPObd",lts_cards_food:"trainstopage_lts_cards_food__L52r9",lts_cards_train:"trainstopage_lts_cards_train__v63IT",cust_overflow:"trainstopage_cust_overflow__zR_SH"}},7351:function(e){e.exports={errorbg:"sixDaysFlexiData_errorbg__e1tJo",RefreshSeatEnquiry:"sixDaysFlexiData_RefreshSeatEnquiry__7600N"}},74157:function(e){e.exports={travel_route:"style_travel_route__1PRNA",route_title:"style_route_title__ycgwt"}},55962:function(e){e.exports={formwrapper:"style_formwrapper__w8a3o",error:"style_error__eFpWE"}},41120:function(e){e.exports={SeoContent:"style_SeoContent__0IYYh",tbody:"style_tbody__xc_29",tr:"style_tr__D1kWd",td:"style_td__XQZy_",eventNone:"style_eventNone__urFvV",table:"style_table__u5bYE",seo_top_trn_bkroute:"style_seo_top_trn_bkroute__s7sRd"}},68657:function(e){e.exports={squared:"checkbox_squared__WkQ0s"}},86341:function(e){e.exports={layoutOptions:"layout_layoutOptions__koqyd",selected:"layout_selected__P7cn8",layout:"layout_layout__YpIa2",stickOption:"layout_stickOption__xkjw8"}},73704:function(e){e.exports={close:"tcStyle_close__agk_F",object:"tcStyle_object___49hn",modal:"tcStyle_modal__TC0II",middleSection:"tcStyle_middleSection__Qd0NX",checkBox:"tcStyle_checkBox__ApGSx",checked:"tcStyle_checked__s058d",checkbox:"tcStyle_checkbox__Hr4Ej"}},17549:function(e){e.exports={table:"timetable_table__4hbNj",info:"timetable_info__PwZvB",new_slick_dots:"timetable_new_slick_dots__Lcg4g",ltsNewSrchSection:"timetable_ltsNewSrchSection__yC01B",qrCode:"timetable_qrCode__nVjbH",qr_text_1:"timetable_qr_text_1__UyfdR",qr_text_2:"timetable_qr_text_2__Lr_MP",div_one:"timetable_div_one__Mb4lV",div_two:"timetable_div_two__RABms",text_center:"timetable_text_center__d2ECm",section_title:"timetable_section_title__9XXN8","dlts-prefill-block":"timetable_dlts-prefill-block__SyqTf","marg-top-30":"timetable_marg-top-30__unCG1","no-pad":"timetable_no-pad__c6fiR",white_timeline_bg:"timetable_white_timeline_bg__O68X3",black_txt:"timetable_black_txt__lfRpF",l_grey:"timetable_l_grey__b32VU",lts_timeline_title:"timetable_lts_timeline_title__7Patt","lts-timeline_time-table":"timetable_lts-timeline_time-table__78XaU",text_right:"timetable_text_right__TrRXa",lts_timeline_header:"timetable_lts_timeline_header__mAPis",white_txt:"timetable_white_txt__Qn6ga",fs12:"timetable_fs12__B_lTq",inputBox:"timetable_inputBox___j06S",goToLink:"timetable_goToLink__fevav",blockTitle:"timetable_blockTitle__AWWZt",trainPerfroms:"timetable_trainPerfroms__Bs18B"}},84207:function(e,t,n){var i=n(34155);!function(){"use strict";var t={583:function(e){e.exports=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0}},590:function(e,t,n){t.__esModule=!0,t.computeId=function(e,t){if(!t)return"jsx-"+e;var n=String(t),i=e+n;o[i]||(o[i]="jsx-"+(0,r.default)(e+"-"+n));return o[i]},t.computeSelector=function(e,t){"undefined"===typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;o[n]||(o[n]=t.replace(/__jsx-style-dynamic-selector/g,e));return o[n]};var i,r=(i=n(583))&&i.__esModule?i:{default:i};var o={}},503:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}
1t.__esModule=!0,t.default=void 0;var r="undefined"!==typeof i&&i.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},a=function(){function e(e){var t=void 0===e?{}:e,n=t.name,i=void 0===n?"stylesheet":n,a=t.optimizeForSpeed,l=void 0===a?r:a,c=t.isBrowser,d=void 0===c?"undefined"!==typeof window:c;s(o(i),"`name` must be a string"),this._name=i,this._deletedRulePlaceholder="#"+i+"-deleted-rule____{}",s("boolean"===typeof l,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=l,this._isBrowser=d,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var u=this._isBrowser&&document.querySelector('meta[property="csp-nonce"]');this._nonce=u?u.getAttribute("content"):null}var t,i,a,l=e.prototype;return l.setOptimizeForSpeed=function(e){s("boolean"===typeof e,"`setOptimizeForSpeed` accepts a boolean"),s(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},l.isOptimizeForSpeed=function(){return this._optimizeForSpeed},l.inject=function(){var e=this;if(s(!this._injected,"sheet already injected"),this._injected=!0,this._isBrowser&&this._optimizeForSpeed)return this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),void(this._optimizeForSpeed||(r||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0));this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"===typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},l.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},l.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},l.insertRule=function(e,t){if(s(o(e),"`insertRule` accepts only strings"),!this._isBrowser)return"number"!==typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!==typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(a){return r||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var i=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,i))}return this._rulesCount++},l.replaceRule=function(e,t){if(this._optimizeForSpeed||!this._isBrowser){var n=this._isBrowser?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(o){r||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var i=this._tags[e];s(i,"old rule at index `"+e+"` not found"),i.textContent=t}return e},l.deleteRule=function(e){if(this._isBrowser)if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];s(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}else this._serverSheet.deleteRule(e)},l.flush=function(){this._injected=!1,this._rulesCount=0,this._isBrowser?(this._tags.forEac
1h((function(e){return e&&e.parentNode.removeChild(e)})),this._tags=[]):this._serverSheet.cssRules=[]},l.cssRules=function(){var e=this;return this._isBrowser?this._tags.reduce((function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,(function(t){return t.cssText===e._deletedRulePlaceholder?null:t}))):t.push(null),t}),[]):this._serverSheet.cssRules},l.makeStyleTag=function(e,t,n){t&&s(o(t),"makeStyleTag accepts only strings as second parameter");var i=document.createElement("style");this._nonce&&i.setAttribute("nonce",this._nonce),i.type="text/css",i.setAttribute("data-"+e,""),t&&i.appendChild(document.createTextNode(t));var r=document.head||document.getElementsByTagName("head")[0];return n?r.insertBefore(i,n):r.appendChild(i),i},t=e,(i=[{key:"length",get:function(){return this._rulesCount}}])&&n(t.prototype,i),a&&n(t,a),e}();function s(e,t){if(!e)throw new Error("StyleSheet: "+t+".")}t.default=a},449:function(e,t,n){t.__esModule=!0,t.default=c;var i,r=(i=n(522))&&i.__esModule?i:{default:i},o=n(147),a=n(590);var s=r.default.useInsertionEffect||r.default.useLayoutEffect,l="undefined"!==typeof window?(0,o.createStyleRegistry)():void 0;function c(e){var t=l||(0,o.useStyleRegistry)();return t?"undefined"===typeof window?(t.add(e),null):(s((function(){return t.add(e),function(){t.remove(e)}}),[e.id,String(e.dynamic)]),null):null}c.dynamic=function(e){return e.map((function(e){var t=e[0],n=e[1];return(0,a.computeId)(t,n)})).join(" ")}},147:function(e,t,n){t.__esModule=!0,t.createStyleRegistry=d,t.StyleRegistry=function(e){var t=e.registry,n=e.children,i=(0,r.useContext)(c),o=(0,r.useState)((function(){return i||t||d()}))[0];return r.default.createElement(c.Provider,{value:o},n)},t.useStyleRegistry=function(){return(0,r.useContext)(c)},t.StyleSheetContext=t.StyleSheetRegistry=void 0;var i,r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=i?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(522)),o=(i=n(503))&&i.__esModule?i:{default:i},a=n(590);function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var l=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,i=void 0===n?null:n,r=t.optimizeForSpeed,a=void 0!==r&&r,s=t.isBrowser,l=void 0===s?"undefined"!==typeof window:s;this._sheet=i||new o.default({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),i&&"boolean"===typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._isBrowser=l,this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._isBrowser&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce((function(e,t){return e[t]=0,e}),{}));var n=this.getIdAndRules(e),i=n.styleId,r=n.rules;if(i in this._instancesCounts)this._instancesCounts[i]+=1;else{var o=r.map((function(e){return t._sheet.insertRule(e)})).filter((function(e){return-1!==e}));this._indices[i]=o,this._instancesCounts[i]=1}},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw new Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var i=this._fromServer&&this._fromServer[n];i?(i.parentNode.removeChild(i),delete this._fromServer[n]):(this._indices[n].forEach((function(e){return t._sheet.deleteRule(e)})),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map((function(t){return[t,e._fromServer[t]]})):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map((function(t){return[t,e._indices[t].map((function(e){return n[e].cssText})).join(e._optimizeForSpeed?"":"\n")]})).filter((function(e){return Boolean(e[1])})))},t.styles=function(e){return function(e,t){return void 0===t&&(t={}),e.map((function(e){var n=e[0],i=e[1];return r.default.createElement("style",{id:"__"+n,key:"__"+n,nonce:t.nonce?t.nonce:void 0,dangerouslySetInnerHTML:{__html:i}})}))}(this.cssRules(),e)},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,i=e.id;if(n){var r=(0,a.computeId)(i,n);return{styleId:r,rules:Array.isArray(t)?t.map((function(e){return(0,a.computeSelector)(r,e)})):[(0,a.computeSelector)(r,t)]}}return{styleId:(0,a.computeId)(i),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce((function(e,t){return e[t.id.slice(2)]=t,e}),{})},e}();t.StyleSheetRegistry=l;var c=(0,r.createContext)(null);function d(){return new l}t.StyleSheetContext=c},522:function(e){e.exports=n(67294)}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,o),a=!1}finally{a&&delete r[e]}return i.exports}o.ab="//";var a={};!function(){var e=a;
1e.__esModule=!0,e.style=e.useStyleRegistry=e.createStyleRegistry=e.StyleRegistry=void 0;var t=o(147);e.StyleRegistry=t.StyleRegistry,e.createStyleRegistry=t.createStyleRegistry,e.useStyleRegistry=t.useStyleRegistry;var n,i=(n=o(449))&&n.__esModule?n:{default:n};e.style=i.default}(),e.exports=a}()},65988:function(e,t,n){e.exports=n(84207).style}},function(e){e.O(0,[4976,296,5582,49,9990,3466,5675,2036,1994,2785,5554,135,1707,9947,9280,8221,509,8070,7042,3911,247,5576,8078,4432,4938,6449,6176,1497,9774,2888,179],(function(){return t=36641,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.