PageSourceSearch

https://simpletrain.app/de/chunk-ZNTB6PNM.js

js simpletrain.app collected 2026-10-08 09:41:28 UTC 83,010 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f42a04cc-869e-56a2-97f6-20a04186beb1")}catch(e){}}();
3import{a as Li,b as Fi}from"./chunk-OUWJFHOD.js";import{d as Pi,f as qi,g as ji,h as vt,i as Hi}from"./chunk-ECBDU2MO.js";import{d as Ct,f as Lt}from"./chunk-HXOAELYB.js";import{b as ke}from"./chunk-J2TL5A7L.js";import{a as gt,b as Nt,d as Ci,e as Ti,f as Ei,g as pi,h as mi,i as be,j as Ee,k as Mt,l as Ai,m as hi}from"./chunk-JRYFS2TR.js";import{a as kn,b as Gn,c as ft,d as xe,e as Te}from"./chunk-K6QOXBS3.js";import{a as It,b as At,c as Dt,d as Di}from"./chunk-22TDZNER.js";import{c as ct,e as fi,g as vi}from"./chunk-AJP7L3DG.js";import{a as li,b as si,c as ci,d as Oi,e as Ri,f as ui,g as Ni,h as Si,k as ht}from"./chunk-M4WYGNUI.js";import{b as Zn,c as ni,h as Ii,k as Ft}from"./chunk-O4LXOPGZ.js";import{a as dt,f as ei,g as Fe,h as Z,o as di,p as St,u as zi}from"./chunk-KUSRZ7HW.js";import{$ as ze,Af as ne,Ah as yi,B as Tn,Bc as rt,Be as Yn,Bh as ki,Ca as tt,Ch as Gi,Da as In,Dd as wn,Dh as wi,Ee as st,Ef as Rt,Eg as Mi,Eh as Ji,F as oe,Ff as ve,Fh as Bi,G as En,Gc as _t,Gh as Ui,H as ce,Ha as Ae,Hb as y,He as Kn,Hf as ue,I as le,Ic as xn,If as ut,Jb as g,Jf as Tt,Ka as a,Kb as J,Kf as Se,La as m,Lb as H,Lc as De,Lf as oi,M as ie,Mb as wt,Mc as bn,Mf as ri,Nb as Pn,Nd as Jn,Ob as Dn,Of as _i,P as pn,Pb as he,Pf as Et,Qb as Me,Qd as lt,R as Gt,Ra as qe,Rb as Pe,Rf as pt,Sb as Ln,Tf as ai,Tg as Pt,Va as C,Vb as W,Wb as G,Wf as mt,Xb as it,Xd as Bn,Xf as $e,Ya as An,Yb as Re,Yd as Un,Z as mn,Za as O,Zb as ot,_b as Fn,a as sn,aa as fe,ab as nt,af as Wn,ba as X,ca as Ie,ce as Xn,d as dn,db as E,e as cn,fa as Ze,fb as se,fc as D,g as xt,gb as q,gc as F,ge as zn,h as bt,ha as gn,hb as j,hc as Ve,he as qn,hh as ye,i as yt,ia as re,ib as r,ie as jn,j as Ke,jb as i,jc as de,jd as at,jf as ti,jh as ae,kb as R,ke as L,kh as pe,la as k,lb as Oe,ld as _e,le as Hn,mb as Ce,me as Ne,na as Nn,nb as b,ne as Vn,oa as Sn,ob as x,oe as Le,oh as $i,p as On,pc as vn,pe as Qn,q as Cn,qb as hn,qc as $n,qd as yn,rb as Mn,rd as te,s as K,sa as v,sb as d,t as We,ta as $,tc as ge,u as kt,ub as je,ui as Xi,vb as He,w as Rn,wg as gi,x as A,xb as P,y as un,ya as et,yb as s,yf as ii,yh as xi,z as ee,za as fn,zf as Ot,zh as bi}from"./chunk-Z5CL3VGY.js";import{a as U,b as Q,g as Ye}from"./chunk-QZ46XHL3.js";var Vi=(()=>{class t{constructor(e,n,o){this.host=e,this.zone=n,this.msgService=o;}ngOnInit(){this.host.nativeElement.classList.add("cursor-pointer");}onClick(){return Ye(this,null,function*(){this.host.nativeElement.classList.add("selected"),navigator.clipboard.writeText(this.host.nativeElement.innerText).then(()=>{this.msgService.add({severity:"success",summary:"Kopiert",detail:"Text wurde kopiert!",life:20*1e3});});});}onMouseLeave(){this.host.nativeElement.classList.remove("selected");}static{this.ɵfac=function(n){return new(n||t)(m(In),m(fn),m(_e));};}static{this.ɵdir=Nn({type:t,selectors:[["","copyToClipboard",""]],hostBindings:function(n,o){n&1&&P("click",function(){return o.onClick();})("mouseleave",function(){return o.onMouseLeave();});},standalone:!0});}}return t;})();var Qi=(()=>{class t{constructor(){this.showClear=!1,this.topicOptions=[{label:"Allgemein",value:Le.General},{label:"Technisches Problem",value:Le.TechnicalIssue},{label:"Unklarheiten",value:Le.Uncertainties}];}static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵcmp=k({type:t,selectors:[["lib-feedback-topic-dropdown"]],inputs:{control:"control",showClear:"showClear"},standalone:!0,features:[G],decls:3,vars:3,consts:()=>{let e;e="Thema ausw\xE4hlen";let n;return n="Thema",[n,["for","feedbackTopic"],["inputId","feedbackTopic","optionLabel","label","optionValue","value","placeholder",e,"styleClass","w-full",3,"formControl","options","showClear"]];},template:function(n,o){n&1&&(r(0,"label",1),d(1,0),i(),R(2,"p-dropdown",2)),n&2&&(a(2),O("formControl",o.control)("options",o.topicOptions)("showClear",o.showClear));},dependencies:[St,di,$e,ue,_i],encapsulation:2});}}return t;})();var Yi=(()=>{class t{transform(e){if(!e)return"";let n=new Date(Date.now()-ti(e)),o=Math.abs(n.getUTCFullYear()-1970);return""+o+" Jahre";}static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵpipe=Sn({name:"age",type:t,pure:!0,standalone:!0});}}return t;})();function mo(){return t=>new dn(_=>{let e,n,o=new sn();return o.add(t.subscribe({complete:()=>{e&&_.next(n),_.complete();},error:l=>{_.error(l);},next:l=>{n=l,e||(e=bt.schedule(()=>{_.next(n),e=void 0;}),o.add(e));}})),o;});}function Ki(t){return typeof t.ngrxOnStoreInit=="function";}function Wi(t){return typeof t.ngrxOnStateInit=="function";}var go=new gn("@ngrx/component-store Initial State"),eo=(()=>{class t{constructor(e){this.destroySubject$=new xt(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new xt(1),this.isInitialized=!1,this.state$=this.select(n=>n),this.state=Mi(this.stateSubject$.pipe(fe(this.destroy$)),{requireSync:!1,manualCleanup:!0}
3),this.ɵhasProvider=!1,e&&this.initState(e),this.checkProviderForHooks();}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next();}updater(e){return n=>{let o=!0,l,p=(kt(n)?n:K(n)).pipe(On(yt),X(()=>this.assertStateIsInitialized()),Ie(this.stateSubject$),A(([h,c])=>e(c,h)),X(h=>this.stateSubject$.next(h)),ce(h=>o?(l=h,Ke):We(h)),fe(this.destroy$)).subscribe();if(l)throw l;return o=!1,p;};}initState(e){Cn([e],yt).subscribe(n=>{this.isInitialized=!0,this.stateSubject$.next(n);});}setState(e){typeof e!="function"?this.initState(e):this.updater(e)();}patchState(e){let n=typeof e=="function"?e(this.get()):e;this.updater((o,l)=>U(U({},o),l))(n);}get(e){this.assertStateIsInitialized();let n;return this.stateSubject$.pipe(ie(1)).subscribe(o=>{n=e?e(o):o;}),n;}select(...e){let{observablesOrSelectorsObject:n,projector:o,config:l}=No(e);return(fo(n,o)?this.stateSubject$:un(n)).pipe(l.debounce?mo():Zi(),o?A(p=>n.length>0&&Array.isArray(p)?o(...p):o(p)):Zi(),pn(l.equal),mn({refCount:!0,bufferSize:1}),fe(this.destroy$));}selectSignal(...e){let n=[...e],o=typeof n[e.length-1]=="object"?n.pop():{},l=n.pop(),u=n,p=u.length===0?()=>l(this.state()):()=>{let h=u.map(c=>c());return l(...h);};return ge(p,o);}effect(e){let n=new cn();return e(n).pipe(fe(this.destroy$)).subscribe(),o=>(kt(o)?o:K(o)).pipe(fe(this.destroy$)).subscribe(u=>{n.next(u);});}checkProviderForHooks(){bt.schedule(()=>{if(vn()&&(Ki(this)||Wi(this))&&!this.ɵhasProvider){let e=[Ki(this)?"OnStoreInit":"",Wi(this)?"OnStateInit":""].filter(n=>n);console.warn(`@ngrx/component-store: ${this.constructor.name} has the ${e.join(" and ")} lifecycle hook(s) implemented without being provided using the provideComponentStore(${this.constructor.name}) function. To resolve this, provide the component store via provideComponentStore(${this.constructor.name})`);}});}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`);}static{this.ɵfac=function(n){return new(n||t)(re(go,8));};}static{this.ɵprov=Ze({token:t,factory:t.ɵfac});}}return t;})();function No(t){let _=Array.from(t),n={debounce:!1,equal:(u,p)=>u===p};if(So(_[_.length-1])&&(n=U(U({},n),_.pop())),_.length===1&&typeof _[0]!="function")return{observablesOrSelectorsObject:_[0],projector:void 0,config:n};let o=_.pop();return{observablesOrSelectorsObject:_,projector:o,config:n};}function So(t){let _=t;return typeof _.debounce<"u"||typeof _.equal<"u";}function fo(t,_){return Array.isArray(t)&&t.length===0&&_;}function Zi(){return t=>t;}var Io=[L.Payment,L.PaymentAborted,L.PaymentFailed],Ao=t=>Io.includes(t.state),to=t=>t?.state===L.Done||t?.state===L.DoneManually||t?.state===L.TicketsReady||!!t&&Ao(t)&&(t.pendingAmount?.value===0||ht(t.invoices))||t?.state===L.OnlyPartialBooking;var V=(()=>{class t extends eo{constructor(e,n,o,l,u,p,h){super({order:{},ticketsPerMainItem:{},loading:!1,cancellationRequestLoading:!1,cancellationRequestSuccess:!1,toBeChangedJourney:void 0,toBeCancelledJourney:void 0,changeRequestStatus:"Initial",changeDescription:"",settledPayments:[]}),this.orderQueryService=e,this.orderBookedSubscriptionService=n,this.orderCancellationRequested=o,this.journeyCancellationRequested=l,this.placeJourneyChangeRequest=u,this.store=p,this.getInquiryIdService=h,this.order$=this.select(c=>c.order),this.toBeCancelledJourney$=this.select(c=>c.toBeCancelledJourney),this.ticketsPerMainItem$=this.select(c=>c.ticketsPerMainItem),this.loading$=this.select(c=>c.loading),this.cancellationRequestLoading$=this.select(c=>c.cancellationRequestLoading),this.cancellationRequestSuccess$=this.select(c=>c.cancellationRequestSuccess),this.toBeChangedJourney$=this.select(c=>c.toBeChangedJourney),this.changeRequestStatus$=this.select(c=>c.changeRequestStatus),this.changeDescription$=this.select(c=>c.changeDescription),this.inquiryId$=this.select(c=>c.inquiryId),this.isManualOrder$=this.select(c=>!!c.inquiryId),this.settledPayments$=this.select(c=>c.settledPayments),this.resetChangeRequestForm=this.updater(c=>Q(U({},c),{changeRequestStatus:"Initial",changeDescription:"",toBeChangedJourney:void 0})),this.setToBeChangedJourney=this.updater((c,T)=>Q(U({},c),{toBeChangedJourney:T})),this.setToBeCancelledJourney=this.updater((c,T)=>Q(U({},c),{toBeCancelledJourney:T})),this.setChangeDescription=this.updater((c,T)=>Q(U({},c),{changeDescription:T})),this.setOrder=this.updater((c,T)=>Q(U({},c),{order:T,loading:!1})),this.setSettledPayments=this.updater((c,T)=>Q(U({},c),{settledPayments:T,loading:!1})),this.setJourneys=this.updater((c,T)=>c.order?Q(U({},c),{order:Q(U({},c.order),{journeys:T})}):c),this.updateOrderState=this.updater((c,T)=>c.order?Q(U({},c),{order:Q(U({},c.order),{state:T}),loading:!1}):c),this.setTicketsPerMainItem=this.updater((c,T)=>Q(U({},c),{ticketsPerMainItem:T})),this.resetCancellationRequestState=this.updater(c=>Q(U({},c),{cancellationRequestSuccess:!1,cancellationRequestLoading:!1})),this.setInquiryId=this.updater((c,T)=>Q(U({},c),{inquiryId:T})),this.confirmOrderCancellationRequest=this.effect(c=>c.pipe(X(()=>this.patchState({cancellationRequestLoading:!0})),ee(T=>this.orderCancellationRequested.mutate({orderUrn:T,cancellationRequested:new Date().toISOString()}).pipe(A(()=>T))),X(()=>this.patchState({cancellationRequestLoading:!1,cancellationRequestSuccess:!0})),ee(T=>this.loadOrder(T)),ce(T=>(this.patchState({cancellationRequestSuccess:!1}),K(!1))))),this.confirmJourneyCancellationRequest=this.effect(c=>c.pipe(X(()=>this.patchState({cancellationRequestLoading:!0})),ee(T=>this.journeyCancellationRequested.mutate({input:{journeyUrn:T.journeyUrn,orderUrn:T.orderUrn,cancellationRequested:new Date().toISOString()}}).pipe(A(()=>({orderUrn:T.orderUrn,journeyUrn:T.journeyUrn})))),X(()=>this.patchState({cancellationRequestLoading:!1,cancellationRequestSuccess:!0})),ee(T=>this.loadOrder(T.orderUrn)),ce(T=>(this.patchState({cancellationRequestSuccess:!1}),K(!1))))),this.placeChangeRequest=this.effect(c=>c.pipe(X(()=>this.patchState({changeRequestStatus:"Loading"})),Ie(this.toBeChangedJourney$,this.changeDescription$,this.store.select(ye),this.order$),ee(([T,I,f,S,N])=>I?.idURN&&N?.idURN?this.placeJourneyChangeRequest.mutate({input:{changeDescriptions:[{type:Qn.Freetext,value:f}],changeRequestPlaced:new Date().toISOString(),changeRequestUrn:Bn(),orderUrn:N.idURN,journeyUrn:I.idURN,localizationUrn:S}}):K({})),X(()=>this.patchState({changeRequestStatus:"Success"})),ce(()=>(this.patchState({changeRequestStatus:"Error"}),K({}))))),this.getOrder=this.effect(c=>(this.patchState({loading:!0}),c.pipe(ee(T=>this.loadOrder(T))))),this.reloadOrder=this.effect(c=>c.pipe(ee(T=>this.loadOrder(T)))),this.waitForTickets=this.effect(c=>{let T=c.pipe(le(this.store.select(ye)),ze(([S,N])=>this.orderBookedSubscriptionService.subscribe({orderUrn:S,localizationUrn:N}).pipe(oe(z=>z.data?.orderBookedEvent!==null),ie(1),X(z=>this.updateOrderState(z.data.orderBookedEvent.orderState)),A(z=>({journeys:z.data.orderBookedEvent.journeys,standaloneTariffs:[]})),X(z=>this.setJourneys(z.journeys))))),I=this.order$.pipe(oe(to),A(S=>({journeys:S.journeys,standaloneTariffs:S.standaloneTariffs}))),f=({journeys:S,standaloneTariffs:N})=>{let z={};return S?.forEach(w=>{z[w.leg.idURN]=w.leg.tickets??[];}),N?.forEach(w=>{z[w.id]=w.tickets??[];}),z;};return En(T,I).pipe(A(f),X(S=>this.setTicketsPerMainItem(S)));}),this.loadOrder=c=>K(c).pipe(le(this.store.select(ye)),ze(([T,I])=>this.orderQueryService.fetch({orderUrn:T,localizationUrn:I}).pipe(A(f=>f.data||void 0),X({next:({order:f,payments:S})=>{this.setOrder(f),this.setSettledPayments(S??[]);}}),X(f=>this.waitForTickets),ze(({order:f})=>f?.idURN?this.loadInquiryId(f.idURN):K(f))))),this.loadInquiryId=c=>K(c).pipe(ze(T=>this.getInquiryIdService.fetch({orderUrn:T}).pipe(A(I=>I.data?.inquiries),X({next:I=>{I&&I.length>0&&this.setInquiryId(I[0].idURN);}}))));}static{this.ɵfac=function(n){return new(n||t)(re(xi),re(bi),re(yi),re(ki),re(Gi),re(Pt),re(wi));};}static{this.ɵprov=Ze({token:t,factory:t.ɵfac});}}return t;})();function Po(t,_){t&1&&b(0);}function Do(t,_){if(t&1){let e=x();r(0,"form",17),P("submit",function(){v(e);let o=s();return $(o.onSubmit());}),r(1,"div",16),C(2,Po,1,0,"ng-container",18),r(3,"p",19),d(4,2),i(),r(5,"p",20),d(6,3),i(),R(7,"p-div
3ider"),r(8,"label",21),d(9,4),i(),R(10,"textarea",22)(11,"p-divider")(12,"lib-button",23),i()();}if(t&2){let e=s(),n=y(10);O("formGroup",e.form),a(2),O("ngTemplateOutlet",n),a(6),O("hidden",!0),a(2),O("autofocus",!0),a(2),O("disabled",e.form.invalid);}}function Lo(t,_){t&1&&b(0);}function Fo(t,_){t&1&&b(0);}function vo(t,_){if(t&1&&(r(0,"div",16),C(1,Lo,1,0,"ng-container",18),r(2,"p",24),d(3,5),i(),C(4,Fo,1,0,"ng-container",18),i()),t&2){s();let e=y(10),n=y(12);a(),O("ngTemplateOutlet",e),a(3),O("ngTemplateOutlet",n);}}function $o(t,_){t&1&&b(0);}function xo(t,_){if(t&1&&(r(0,"div",16),R(1,"i",25),r(2,"h3",26),d(3,6),i(),r(4,"p",24),d(5,7),i(),C(6,$o,1,0,"ng-container",18),i()),t&2){s();let e=y(12);a(6),O("ngTemplateOutlet",e);}}function bo(t,_){t&1&&b(0);}function yo(t,_){if(t&1&&(r(0,"div",16)(1,"p",27),d(2,8),i(),C(3,bo,1,0,"ng-container",18),i()),t&2){s();let e=y(12);a(3),O("ngTemplateOutlet",e);}}function ko(t,_){t&1&&b(0);}function Go(t,_){if(t&1&&(r(0,"div",16)(1,"p",27),d(2,9),i(),C(3,ko,1,0,"ng-container",18),i()),t&2){s();let e=y(12);a(3),O("ngTemplateOutlet",e);}}function wo(t,_){t&1&&b(0);}function Jo(t,_){if(t&1&&(r(0,"div",16)(1,"p",27),d(2,10),i(),C(3,wo,1,0,"ng-container",18),i()),t&2){s();let e=y(12);a(3),O("ngTemplateOutlet",e);}}function Bo(t,_){t&1&&b(0);}function Uo(t,_){if(t&1&&(r(0,"div",16)(1,"p",27),d(2,11),i(),C(3,Bo,1,0,"ng-container",18),i()),t&2){s();let e=y(12);a(3),O("ngTemplateOutlet",e);}}function Xo(t,_){if(t&1){let e=x();r(0,"div",28)(1,"h2",29),d(2,12),i(),r(3,"div",30)(4,"button",31),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),R(5,"i",32),i()()();}}function zo(t,_){if(t&1){let e=x();r(0,"button",33),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),r(1,"p",34),d(2,13),i()();}}var oo=(()=>{class t{constructor(e,n){this.store=e,this.ref=n,this.form=new Tt({changeDescription:new Se("",ve.required)}),this.subs=[],this.changeRequestStatus$=this.store.changeRequestStatus$,this.changeDescription$=this.store.changeDescription$,this.toBeChangedJourney$=this.store.toBeChangedJourney$,this.calculatedViewToShow$=this.toBeChangedJourney$.pipe(le(this.changeRequestStatus$),A(([o,l])=>{if(!o)return"ErrorInRequest";if(l==="Loading")return"Loading";if(l==="Success")return"SuccessfullyRequested";if(l==="Error")return"ErrorInRequest";let u=Bt(o.leg.sections),p=Ut(u);return u.length<=0?"ChangeRequestNotPossible":p?"ReadyForRequest":"ChangeRequestPeriodThrough";})),this.subs.push(this.form.valueChanges.subscribe(o=>{this.store.setChangeDescription(o.changeDescription||"");}));}ngOnInit(){this.store.changeDescription$.pipe(ie(1)).subscribe(e=>this.form.controls.changeDescription.patchValue(e));}ngOnDestroy(){this.subs.forEach(e=>e.unsubscribe());}cancelProcess(){this.ref.close();}onSubmit(){this.store.placeChangeRequest();}static{this.ɵfac=function(n){return new(n||t)(m(V),m(xe));};}static{this.ɵcmp=k({type:t,selectors:[["app-order-change-request"]],standalone:!0,features:[W([]),G],decls:13,vars:3,consts:()=>{let e;e="\xC4nderungsw\xFCnsche";let n;n="\xC4nderungen beantragen";let o;o=" Bitte liste alle \xC4nderungsw\xFCnsche vollst\xE4ndig auf. Dazu geh\xF6rt welchen Zug in der aktuellen Konstellation wir durch welchen anderen (mit Abfahrtsdatum & Zeit, Abfahrts und Ankunftsort) ersetzen sollen. ";let l;l=" Achte darauf, dass wir nur Reisen ver\xE4ndern k\xF6nnen, die weiter als 48 Stunden in der Zukunft stattfinden und von Trenitalia durchgef\xFChrt werden. Stornierungen bitte \xFCber die Stornierungsfunktion. ";let u;u="\xC4nderungsw\xFCnsche";let p;p="Deine Anfrage wird bearbeitet.";let h;h="\xC4nderungsanfrage abgeschickt!";let c;c=" Sobald wir uns mit deinen \xC4nderungsw\xFCnschen befasst haben, werden wir uns per Mail melden. ";let T;T="Etwas ist schief gelaufen! Bitte versuche es erneut.";let I;I=" Wir finden leider keine ver\xE4nderbaren Reisen. Deswegen k\xF6nnen wir keine \xC4nderungsw\xFCnsche akzeptieren. ";let f;f=" Leider ist die \xC4nderungsanfrage f\xFCr diese Reise nicht mehr verf\xFCgbar, da \xC4nderungen mindestens 48h im Voraus plaziert werden m\xFCssen. ";let S;S=" Zurzeit befindet sich die Bestellung noch in Arbeit, deswegen k\xF6nnen keine \xC4nderungsw\xFCnsche plaziert werden. ";let N;N="Reise ver\xE4ndern";let z;return z="Zur Reise\xFCbersicht",[["header",""],["backToOverviewButton",""],o,l,u,p,h,c,T,I,f,S,N,z,[1,"flex","flex-row","justify-content-between","align-items-center","md:w-30rem","w-full"],[3,"formGroup"],[1,"flex","flex-column","w-full"],[3,"submit","formGroup"],[4,"ngTemplateOutlet"],[1,"mb-2"],[1,"mb-4"],["for","changeDescription",3,"hidden"],["cols","30","formControlName","changeDescription","inputId","changeDescription","pInputTextarea","","placeholder",e,"rows","5",1,"w-full",3,"autofocus"],["label",n,"type","submit",1,"mt-2","align-self-center",3,"disabled"],[1,"text-center"],[1,"pi","pi-check-circle","text-green-500","align-self-center","pt-6","pb-5",2,"font-size","4rem"],[1,"text-center","m-0"],[1,"text-center","pt-4"],[1,"flex","flex-row","p-dialog-header"],[1,"text-primary","text-center","flex-grow-1","m-0"],[1,"fixed","top-0","right-0","pt-4","pr-5"],["type","button",1,"p-icon-wrapper","p-dialog-header-icon","p-dialog-header-close-icon",3,"click"],[1,"pi","pi-times","text-primary"],["type","button",1,"p-button","p-button-rounded","align-self-center","m-2",3,"click"],[1,"m-0"]];},template:function(n,o){if(n&1&&(r(0,"div",14),C(1,Do,13,5,"form",15),D(2,"ngrxPush"),C(3,vo,5,2,"div",16)(4,xo,7,1,"div",16)(5,yo,4,1,"div",16)(6,Go,4,1,"div",16)(7,Jo,4,1,"div",16)(8,Uo,4,1,"div",16),i(),C(9,Xo,6,0,"ng-template",null,0,de)(11,zo,3,0,"ng-template",null,1,de)),n&2){let l;a(),E((l=F(2,1,o.calculatedViewToShow$))==="ReadyForRequest"?1:l==="Loading"?3:l==="SuccessfullyRequested"?4:l==="ErrorInRequest"?5:l==="ChangeRequestNotPossible"?6:l==="ChangeRequestPeriodThrough"?7:l==="ChangeRequestNotYetPossible"?8:-1);}},dependencies:[te,pe,Ee,be,Nt,gt,Z,mt,ri,Rt,ue,ut,$e,Et,pt],changeDetection:0});}}return t;})();function qo(t,_){if(t&1){let e=x();Oe(0),r(1,"lib-button",2),P("onClick",function(){v(e);let o=s(2);return $(o.ticketChangeRequestClicked());}),i(),Ce();}if(t&2){let e=_.ngrxLet;a(),O("loading",e==="Loading")("secondary",!0)("text",!0);}}function jo(t,_){if(t&1&&C(0,qo,2,3,"ng-container",1),t&2){let e=s();O("ngrxLet",e.changeRequestStatus$);}}var Bt=t=>t.filter(_=>_.carrierURN===ii.Trenitalia).filter(_=>!!_.departure.time),Ut=t=>{let _=new Date(),e=new Date(_.setHours(_.getHours()+48));return t.some(n=>new Date(n.departure.time)>=e);},ro=(()=>{class t{set journey(e){if(this._journey=e,!e?.leg.sections){this.shouldShowCreateButton=!1;return;}let n=Bt(e.leg.sections),o=Ut(n);this.shouldShowCreateButton=n.length>0&&o;}constructor(e,n){this.store=e,this.dialogService=n,this.shouldShowCreateButton=!1,this.changeRequestStatus$=this.store.changeRequestStatus$;}ticketChangeRequestClicked(){this._journey&&(this.store.setToBeChangedJourney(this._journey),this.changeRequestDialogRef=this.dialogService.open(oo,{showHeader:!1}),this.changeRequestDialogRef.onClose.subscribe(()=>
3{this.store.resetChangeRequestForm();}));}static{this.ɵfac=function(n){return new(n||t)(m(V),m(Te));};}static{this.ɵcmp=k({type:t,selectors:[["app-order-change-request-button"]],inputs:{journey:"journey"},standalone:!0,features:[W([]),G],decls:2,vars:1,consts:()=>{let e;return e="Reise ver\xE4ndern",[[1,"no-print"],[4,"ngrxLet"],["label",e,1,"mb-4",3,"onClick","loading","secondary","text"]];},template:function(n,o){n&1&&(r(0,"div",0),C(1,jo,1,1,"ng-container"),i()),n&2&&(a(),E(o.shouldShowCreateButton?1:-1));},dependencies:[te,Ee,Z,ae],changeDetection:0});}}return t;})();function Ho(t,_){t&1&&b(0);}function Vo(t,_){if(t&1){let e=x();r(0,"div",15),C(1,Ho,1,0,"ng-container",16),r(2,"p",17),d(3,2),i(),R(4,"p-divider"),r(5,"button",18),P("click",function(){v(e);let o=s();return $(o.confirmCancellationRequest());}),r(6,"p",19),d(7,3),i()()();}if(t&2){s();let e=y(11);a(),O("ngTemplateOutlet",e);}}function Qo(t,_){t&1&&b(0);}function Yo(t,_){t&1&&b(0);}function Ko(t,_){if(t&1&&(r(0,"div",15),C(1,Qo,1,0,"ng-container",16),r(2,"p",17),d(3,4),i(),C(4,Yo,1,0,"ng-container",16),i()),t&2){s();let e=y(11),n=y(13);a(),O("ngTemplateOutlet",e),a(3),O("ngTemplateOutlet",n);}}function Wo(t,_){t&1&&b(0);}function Zo(t,_){if(t&1&&(r(0,"div",15),R(1,"i",20),r(2,"h3",21),d(3,5),i(),r(4,"p",17),d(5,6),i(),C(6,Wo,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(6),O("ngTemplateOutlet",e);}}function er(t,_){t&1&&b(0);}function tr(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,7),i(),C(3,er,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function nr(t,_){t&1&&b(0);}function ir(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,8),i(),C(3,nr,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function or(t,_){t&1&&b(0);}function rr(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,9),i(),C(3,or,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function _r(t,_){t&1&&b(0);}function ar(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,10),i(),C(3,_r,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function lr(t,_){t&1&&b(0);}function sr(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,11),i(),C(3,lr,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function dr(t,_){if(t&1){let e=x();r(0,"div",23)(1,"h2",24),d(2,12),i(),r(3,"div",25)(4,"button",26),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),R(5,"i",27),i()()();}}function cr(t,_){if(t&1){let e=x();r(0,"button",18),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),r(1,"p",19),d(2,13),i()();}}var _o=(()=>{class t{constructor(e,n,o){this.store=e,this.ref=n,this.dynamicDialogConfig=o,this.orderStateMutated=!1,this.moreThanOneJourney=()=>(this.order?.journeys.length??0)>1,this.moreThanOneCancellableJourney=()=>this.order?.journeys.some(l=>l.state===Ne.HasOrderProcessState)??!1,this.order=this.dynamicDialogConfig.data?.order,this.cancellationLoading$=this.store.cancellationRequestLoading$,this.cancellationSuccess$=this.store.cancellationRequestSuccess$,this.toBeCancelledJourney$=this.store.toBeCancelledJourney$,this.cancellationState$=this.cancellationLoading$.pipe(le(this.cancellationSuccess$,this.toBeCancelledJourney$),A(([l,u,p])=>p?l&&!u?"Loading":Xt(p)?"CancellationPeriodThrough":p.state===Ne.InCancellation||u?"SuccessfullyRequested":p.state===Ne.Cancelled?"CancellationAlreadyDone":p.state===Ne.HasOrderProcessState?"ConfirmRequest":u?"CancellationNotPossible":"ErrorInRequest":"CancellationNotPossible"));}cancelProcess(){this.ref.close({shouldReload:this.orderStateMutated});}confirmCancellationRequest(){let e=this.order?.idURN,n=this.dynamicDialogConfig.data?.journeyUrn;e&&n&&(this.orderStateMutated=!0,!this.moreThanOneCancellableJourney()&&!this.moreThanOneJourney()&&this.store.confirmOrderCancellationRequest(e),this.store.confirmJourneyCancellationRequest({orderUrn:e,journeyUrn:n}));}static{this.ɵfac=function(n){return new(n||t)(m(V),m(xe),m(ft));};}static{this.ɵcmp=k({type:t,selectors:[["app-journey-cancellation"]],standalone:!0,features:[W([]),G],decls:14,vars:3,consts:()=>{let e;e=" Wir stornieren deine Reise und verg\xFCten dir den Betrag auf dein urspr\xFCngliches Bezahlungsmittel zur\xFCck. ";let n;n="Stornierung best\xE4tigen";let o;o="Deine Anfrage wird bearbeitet.";let l;l="Stornierung abgeschickt!";let u;u="Sobald wir deine Reise storniert haben, informieren wir dich per E-Mail.";let p;p="Etwas ist schief gelaufen! Bitte versuche es erneut.";let h;h="Dieses Ticket wurde bereits zur\xFCckerstattet.";let c;c=" Diese Bestellung k\xF6nnen wir nicht zur\xFCckerstatten, weil wir in unserem System keine zugeh\xF6rige Zahlung im richtigen Status finden k\xF6nnen. Sollte dies aber der Fall sein, kontaktiere uns bitte direkt. ";let T;T="Gem\xE4ss unseren Stornierungsbedingungen ist keine Erstattung mehr m\xF6glich.";let I;I=" Diese Bestellung kann zurzeit noch nicht storniert werden, weil wir noch nicht alle Zahlungen verbucht haben. Bitte versuche es sp\xE4ter noch einmal. ";let f;f="Tickets stornieren";let S;return S="Zur Reise\xFCbersicht",[["header",""],["backToOverviewButton",""],e,n,o,l,u,p,h,c,T,I,f,S,[1,"flex","flex-row","justify-content-between","align-items-center","w-30rem"],[1,"flex","flex-column","w-full"],[4,"ngTemplateOutlet"],[1,"text-center"],["type","button",1,"p-button","p-button-rounded","align-self-center","m-2",3,"click"],[1,"m-0"],[1,"pi","pi-check-circle","text-green-500","align-self-center","pt-6","pb-5",2,"font-size","4rem"],[1,"text-center","m-0"],[1,"text-center","pt-4"],[1,"flex","flex-row","p-dialog-header"],[1,"text-primary","text-center","flex-grow-1","m-0"],[1,"fixed","top-0","right-0","pt-4","pr-5"],["type","button",1,"p-icon-wrapper","p-dialog-header-icon","p-dialog-header-close-icon",3,"click"],[1,"pi","pi-times","text-primary"]];},template:function(n,o){if(n&1&&(r(0,"div",14),C(1,Vo,8,1,"div",15),D(2,"ngrxPush"),C(3,Ko,5,2,"div",15)(4,Zo,7,1,"div",15)(5,tr,4,1,"div",15)(6,ir,4,1,"div",15)(7,rr,4,1,"div",15)(8,ar,4,1,"div",15)(9,sr,4,1,"div",15),i(),C(10,dr,6,0,"ng-template",null,0,de)(12,cr,3,0,"ng-template",null,1,de)),n&2){let l;a(),E((l=F(2,1,o.cancellationState$))==="ConfirmRequest"?1:l==="Loading"?3:l==="SuccessfullyRequested"?4:l==="ErrorInRequest"?5:l==="CancellationAlreadyDone"?6:l==="CancellationNotPossible"?7:l
3==="CancellationPeriodThrough"?8:l==="CancellationNotYetPossible"?9:-1);}},dependencies:[te,pe,Ee,be,_t],changeDetection:0});}}return t;})();var Or=t=>({isCancellationBlocked:t});function Cr(t,_){if(t&1){let e=x();Oe(0),r(1,"div",2)(2,"div",3)(3,"lib-button",4),P("onClick",function(){v(e);let o=s();return $(o.ticketCancellationPressed());}),d(4,0),i()(),R(5,"app-cancellation-info",5),i(),Ce();}if(t&2){let e=_.ngrxLet,n=s();a(3),O("disabled",e.isCancellationBlocked)("rounded",!0)("secondary",!0),a(2),O("centeredContent",!0)("fare",n.journey.leg.selectedFare);}}var Xt=t=>{let _=new Date(),e=new Date(_.setHours(_.getHours()+48));return new Date(t.leg.departure.time)<=e;},ao=(()=>{class t{constructor(e,n){this.store=e,this.dialogService=n,this.order$=this.store.order$,this.isCancellationBlocked$=this.order$.pipe(A(()=>Xt(this.journey)||!this.journey||!this.journey.leg.selectedFare?!0:!this.journey.leg.selectedFare?.cancellableAmounts.some(l=>l.amount.value>0)));}ticketCancellationPressed(){this.store.setToBeCancelledJourney(this.journey),this.order$.pipe(oe(e=>!!e),A(e=>e),ie(1),X(e=>{this.store.resetCancellationRequestState(),this.store.reloadOrder(e.idURN);}),ee(e=>this.dialogService.open(_o,{showHeader:!1,data:{order:e,journeyUrn:this.journey?.idURN}}).onClose.pipe(A(n=>({result:n,order:e}))))).subscribe(({result:e,order:n})=>{e?.shouldReload&&this.store.getOrder(n.idURN);});}static{this.ɵfac=function(n){return new(n||t)(m(V),m(Te));};}static{this.ɵcmp=k({type:t,selectors:[["app-journey-cancellation-button"]],inputs:{journey:"journey"},standalone:!0,features:[W([]),G],decls:1,vars:3,consts:()=>{let e;return e=" Tickets stornieren ",[e,[4,"ngrxLet"],[1,"flex","flex-column","gap-3","align-items-center"],[1,"flex","flex-row","align-items-center"],[1,"no-print",3,"onClick","disabled","rounded","secondary"],[3,"centeredContent","fare"]];},template:function(n,o){n&1&&C(0,Cr,6,5,"ng-container",1),n&2&&O("ngrxLet",Re(1,Or,o.isCancellationBlocked$));},dependencies:[te,vt,ae,Z,ne],changeDetection:0});}}return t;})();var Rr=(t,_)=>_.id,lo=(t,_)=>_.idURN;function ur(t,_){if(t&1&&(g(0),D(1,"travelClass")),t&2){let e=s().$implicit;H(" - ",F(1,1,e.travelClass)," ");}}function Tr(t,_){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"lib-toggle-panel",17)(3,"div",18)(4,"div",19)(5,"div",20)(6,"span"),g(7),C(8,ur,2,3),i()(),r(9,"div"),g(10),i()()(),r(11,"div",21)(12,"div",19),d(13,0),i(),r(14,"div",22),g(15),i(),r(16,"div",22),g(17),i()()()()()),t&2){let e=_.$implicit,n=s();a(2),O("forceOpen",n.allOpen)("headerShadowOnly",!0)("hideHr",!1)("hideHrMobile",!0)("shadow",!0)("toggleOnHeaderClick",!1),a(5),H(" ",e.name," "),a(),E(e.travelClass?8:-1),a(2),H(" ",e.selectedOptionName," "),a(5),H(" ",e.description," "),a(2),H(" ",e.selectedOptionDescription," ");}}function Er(t,_){t&1&&g(0),t&2&&H(" ",", "," ");}function pr(t,_){if(t&1&&(r(0,"div",35)(1,"div",36),d(2,4),i(),r(3,"div"),g(4),D(5,"gender"),D(6,"lowercase"),i(),r(7,"div"),Ln(8),g(9),D(10,"date"),D(11,"age"),C(12,Er,1,1),g(13),D(14,"reduction"),i()()),t&2){let e=_.$implicit,n=_.$index,o=s(2);a(2),je(n+1),He(2),a(2),Dn(" ",e.person==null?null:e.person.firstName," ",e.person==null?null:e.person.lastName,"",", ","",F(6,12,F(5,10,e.person==null?null:e.person.gender))," ");let l=e.reductions[0];a(5),Pn(" ",Ve(10,14,e.birthdate,o.DATE_ONLY_FORMAT),"",", ","",F(11,17,e.birthdate)," "),a(3),E(l?12:-1),a(),H(" ",F(14,19,l)," ");}}function mr(t,_){if(t&1&&(r(0,"div",35)(1,"div",36),R(2,"app-route-title",25),i(),r(3,"div",41),R(4,"app-reservation-summary",42),i()()),t&2){let e=_.$implicit;a(2),O("route",e),a(2),O("reservations",e.reservations);}}function gr(t,_){if(t&1&&q(0,mr,5,2,"div",35,lo),t&2){let e=s(2).$implicit,n=s();j(n.sectionsWithReservations(e.leg.sections));}}function Nr(t,_){if(t&1&&(r(0,"div",35)(1,"div",36),R(2,"app-route-title",25),i(),r(3,"div",41)(4,"div"),g(5),i()()()),t&2){let e=_.$implicit,n=s(3).$implicit,o=s();a(2),O("route",o.getSection(n.leg.sections,e.sectionURN)),a(3),J(e.description);}}function Sr(t,_){if(t&1&&q(0,Nr,6,2,"div",35,lo),t&2){let e=s(2).$implicit;j(e.leg.selectedFare==null?null:e.leg.selectedFare.selectedSeatOffers);}}function fr(t,_){t&1&&(r(0,"div",35)(1,"span"),d(2,6),i(),r(3,"a",43),d(4,7),i()());}function Ir(t,_){if(t&1&&(r(0,"div",46),R(1,"app-journey-cancellation-button",27),i()),t&2){let e=s(4).$implicit;a(),O("journey",e);}}function Ar(t,_){if(t&1&&(r(0,"div",45),R(1,"app-cancellation-info",47),i()),t&2){let e=s(4).$implicit;a(),O("fare",e.leg.selectedFare);}}function hr(t,_){if(t&1&&C(0,Ir,2,1,"div",46)(1,Ar,2,1,"div",45),t&2){let e,n=s(3).$implicit;E(((e=n.leg.selectedFare==null||n.leg.selectedFare.cancellableAmou
3nts==null||n.leg.selectedFare.cancellableAmounts[0]==null||n.leg.selectedFare.cancellableAmounts[0].amount==null?null:n.leg.selectedFare.cancellableAmounts[0].amount.value)!==null&&e!==void 0?e:0)>0?0:1);}}function Mr(t,_){t&1&&(r(0,"div",45)(1,"a",48),R(2,"lib-button",49),i()()),t&2&&(a(2),O("hideLabelOnSmall",!1)("secondary",!0));}function Pr(t,_){if(t&1&&(R(0,"hr",44),C(1,hr,2,1)(2,Mr,3,2,"div",45)),t&2){let e=s(2).$implicit,n=s();a(),E(n.isFutureJourney(e)?1:2);}}function Dr(t,_){if(t&1&&(R(0,"hr",44),r(1,"div",50)(2,"div",38),d(3,8),i(),r(4,"p"),d(5,9),i(),R(6,"app-cancellation-info",47),i()),t&2){let e=s(2).$implicit;a(6),O("fare",e.leg.selectedFare);}}function Lr(t,_){if(t&1&&(R(0,"hr",44),r(1,"div",50)(2,"div",38),d(3,10),i(),r(4,"p"),d(5,11),i(),R(6,"app-cancellation-info",47),i()),t&2){let e=s(2).$implicit;a(6),O("fare",e.leg.selectedFare);}}function Fr(t,_){t&1&&(r(0,"p"),d(1,13),i());}function vr(t,_){t&1&&(r(0,"p"),d(1,14),i());}function $r(t,_){if(t&1&&(r(0,"p"),g(1),i()),t&2){let e=s(3).$implicit;a(),J(e.otherCancellationDeniedReason);}}function xr(t,_){if(t&1&&(R(0,"hr",44),r(1,"div",50)(2,"div",38),d(3,12),i(),C(4,Fr,2,0,"p")(5,vr,2,0,"p")(6,$r,2,1,"p"),i()),t&2){let e,n=s(2).$implicit,o=s();a(4),E((e=n.cancellationDeniedReasonUrn)===o.JourneyCancellationDeniedReason.CarrierTerms?4:e===o.JourneyCancellationDeniedReason.CancellationPeriodsExpired?5:e===o.JourneyCancellationDeniedReason.Other?6:-1);}}function br(t,_){if(t&1&&(R(0,"hr",37),r(1,"div",38),d(2,5),i(),C(3,gr,2,0)(4,Sr,2,0),r(5,"div"),g(6),D(7,"travelClass"),i(),r(8,"div",39)(9,"div"),g(10),D(11,"fare"),i(),r(12,"div",40),g(13),D(14,"price"),i()(),C(15,fr,5,0,"div",35)(16,Pr,3,1)(17,Dr,7,1)(18,Lr,7,1)(19,xr,7,1)),t&2){let e=s().$implicit,n=s();a(3),E(n.sectionsWithReservations(e.leg.sections).length>0?3:n.order.state!==n.OrderStatus.Done&&n.order.state!==n.OrderStatus.DoneManually?4:-1),a(3),J(F(7,9,e.leg.selectedFare==null?null:e.leg.selectedFare.travelClassURN)),a(4),J(F(11,11,e.leg.selectedFare)),a(3),J(F(14,13,n.getInvoiceGroupPrice(e))),a(2),E(n.showTrenitaliaCheckinLink(e)?15:-1),a(),E(n.order.state===n.OrderStatus.Done&&e.state===n.JourneyStatus.HasOrderProcessState&&!e.cancellationDeniedReasonUrn?16:-1),a(),E(e.state===n.JourneyStatus.InCancellation?17:-1),a(),E(e.state===n.JourneyStatus.Cancelled?18:-1),a(),E(e.cancellationDeniedReasonUrn?19:-1);}}function yr(t,_){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"lib-toggle-panel",23)(3,"div",18)(4,"div",24)(5,"div")(6,"div",19)(7,"div",20)(8,"span"),d(9,1),i()(),R(10,"app-route-title",25),i()(),r(11,"div",26),R(12,"app-order-change-request-button",27),i()(),r(13,"div",28),R(14,"app-journey-summary",27),i()(),r(15,"div",29)(16,"div",30)(17,"div",31),d(18,2),i(),R(19,"app-section-detail",32),i(),r(20,"div",33),R(21,"hr",34),r(22,"div",31),d(23,3),i(),q(24,pr,15,21,"div",35,se),C(26,br,20,15),i()()()()()),t&2){let e=_.$implicit,n=_.$index,o=s();a(2),O("forceOpen",o.allOpen)("headerShadowOnly",!0)("hideHr",!1)("hideHrMobile",!0)("open",n===0)("shadow",!0)("toggleOnHeaderClick",!1),a(7),je(n+1),He(9),a(),O("route",e.leg),a(2),O("journey",e),a(2),O("journey",e),a(5),O("sections",e.leg.sections),a(5),j(o.getTravellers(e)),a(2),E(o.isManualOrder?-1:26);}}var so=(()=>{class t{constructor(){this.DATE_ONLY_FORMAT=st,this.OrderStatus=L,this.JourneyStatus=Ne,this.JourneyCancellationDeniedReason=Vn,this.getInvoiceGroupPrice=Mt,this.allOpen=!1,this.isManualOrder=!1,this.now=new Date();}getTravellers(e){let n=e.mainTraveller;return(e.additionalTravellers??[]).reduce((l,u)=>(u&&l.push(u),l),[n]);}isFutureJourney(e){return e.leg?.arrival.time?new Date(e.leg.arrival.time)>=this.now:!0;}showTrenitaliaCheckinLink(e){return e.leg.sections.some(Ct);}sectionsWithReservations(e){return e.filter(n=>n.reservations.length>0);}getSection(e,n){return e.find(o=>o.idURN===n);}static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵcmp=k({type:t,selectors:[["app-order-confirmation-details"]],inputs:{order:"order",journeys:"journeys",allOpen:"allOpen",isManualOrder:"isManualOrder"},standalone:!0,features:[G],decls:4,vars:0,consts:()=>{let e;e="bottom";let n;n="bottom";let o;o="Details";let l;l="bottom";let u;u="bottom";let p;p="Reise "+"\uFFFD0\uFFFD"+"";let h;h="Fahrplan";let c;c="Reisende";let T;T="Person "+"\uFFFD0\uFFFD"+"";let I;I="Tickets";let f;f="https://simpletrain.ch/regionaltickets-trenitalia";let S;S="Check-in nicht vergessen! Mehr infos:\xA0";let N;N=" simpletrain.ch/regionaltickets-trenitalia ";let z;z="R\xFCckerstattung anfragen";let w;w="Stornierung";let Ge;Ge="Die Reise befindet sich in R\xFCckerstattung.";let we;we="Stornierung";let Je;Je="R\xFCckerstattung f\xFCr diese Reise ist bereits erfolgt.";let Be;Be="Keine Stornierung m\xF6glich";let Ue;Ue="Die Konditionen des Carriers erlauben zu diesem Zeitpunkt keine Stornierung mehr.";let Xe;return Xe=" Der Zeitraum, in dem eine R\xFCckerstattung dieser Reise m\xF6glich gewesen w\xE4re, ist leider bereits abgelaufen. ",[o,p,h,c,T,I,S,N,w,Ge,we,Je,Be,Ue,Xe,[2,"break-before","page"],[1,"mb-3",2,"break-before","page"],["toggleLocation",e,"toggleLocationMobile",n,3,"forceOpen","headerShadowOnly","hideHr","hideHrMobile","shadow","toggleOnHeaderClick"],["header","",1,"pt-4","px-3","w-full","mb-3"],[1,"text-xl"],[1,"text-sm","text-gray-600","uppercase"],["content","",1,"m-0","py-4","px-2","md:px-3","flex","flex-column","gap-3","pr:border-1-gray-100"],[1,""],["toggleLocation",l,"toggleLocationMobile",u,3,"forceOpen","headerShadowOnly","hideHr","hideHrMobile","open","shadow","toggleOnHeaderClick"],[1,"flex","flex-column","md:flex-row","md:justify-content-between"],[3,"route"],[1,"pt-3","md:pt-0","md:align-self-start","align-self-center"],[3,"journey"],[1,"mt-4"],["content","",1,"grid","m-0","py-4","px-2","md:px-3","flex-column","sm:flex-row","pr:flex-row","pr:border-1-gray-100"],[1,"col-11","md:col-6","xl:col-5","pr:col-6"],[1,"text-gray-600","uppercase","text-xl","mb-3"],[3,"sections"],[1,"col-11","md:col","pr:col-6","md:border-left-1","pr:border-left-1","md:pl-4","pr:pl-4","border-gray-400"],[1,"md:hidden","pr:hidden","border-gray-300","border-bottom-none"],[1,"mb-3"],[1,"text-gray-600","text-sm","uppercase"],[1,"border-gray-300","border-bottom-none"],[1,"text-gray-600","uppercase","text-xl","mb-3","mt-4"],[1,"flex","flex-row","justify-content-between","mb-3"],[1,"font-bold"],[1,"ml-2"],[3,"reservations"],["href",f,"target","_blank",1,"text-primary","no-underline"],[1,"pr:hidden","border-gray-300","border-bottom-none"],[1,"w-full","mt-5"],["content","",1,"w-full","mt-5","no-print"],[3,"fare"],["href","https://simpletrain.ch/erstattungen/"],["label",z,3,"hideLabelOnSmall","secondary"],[1,"w-full","mt-5","no-print"]];},template:function(n,o){n&1&&(q(0,Tr,18,11,"div",15,Rr),q(2,yr,27,13,"div",15,se)),n&2&&(j(o.order.standaloneTariffs),a(2),j(o.journeys));},dependencies:[Dt,ji,fi,Ii,Yi,vi,Pi,ke,ne,Hi,ro,xn,De,vt,ao,Z,ct,qi],styles:[`@media print{.pr\\:col-4[_ngcontent-%COMP%]{flex:0 0 auto;padding:.5rem;width:33.3333%}.pr\\:col-6[_ngcontent-%COMP%]{flex:0 0 auto;padding:.5rem;width:50%}.pr\\:flex-row[_ngcontent-%COMP%]{flex-direction:row!important}.pr\\:pl-4[_ngcontent-%COMP%]{padding-left:1.5rem!important}.pr\\:border-left-1[_ngcontent-%COMP%]{border-left-width:1px!important;border-left-style:solid}.pr\\:hidden[_ngcontent-%COMP%]{display:none!important}.pr\\:border-1-gray-100[_ngcontent-%COMP%]{border:2px solid var(--gray-100)}}
4/*# sourceMappingURL=details.component-LGROAA2M.css.map */`],changeDetection:0});}}return t;})();var Gr=()=>({width:"35rem",maxWidth:"90vw"}),wr=(t,_)=>({"p-disabled text-gray-300":t,"text-primary":_}),Jr=t=>({"text-gray-300":t});function Br(t,_){if(t&1&&(r(0,"a",3),R(1,"lib-icon",5),r(2,"span",6),g(3),i()()),t&2){let e=s(2);O("ngClass",ot(5,wr,e.disabled,!e.disabled)),An("disabled",e.disabled?!0:null)("href",e.disabled?null:e.ticket.externalDownloadLink,Ae),a(2),O("ngClass",Re(8,Jr,e.disabled)),a(),H(" ",e.getDownloadButtonLabel(e.index)," ");}}function Ur(t,_){if(t&1){let e=x();r(0,"lib-button",7),P("click",function(o){v(e);let l=s(2);return $(l.confirmExternal(o,l.ticket.externalDownloadLink));}),i();}if(t&2){let e=s(2);O("additional",!0)("disabled",e.disabled)("hideLabelOnSmall",!1)("label",e.getDownloadButtonLabel(e.index))("loading",e.loading);}}function Xr(t,_){if(t&1&&C(0,Br,4,10,"a",3)(1,Ur,1,5,"lib-button",4),t&2){let e=s();E(e.isManualFetchRequired()?1:0);}}function zr(t,_){if(t&1){let e=x();r(0,"lib-button",9),P("click",function(){v(e);let o=s(2);return $(o.collectTicket());}),i();}if(t&2){let e=s(2);O("additional",!0)("disabled",e.disabled)("hideLabelOnSmall",!1)("label",e.getDownloadButtonLabel(e.index))("loading",e.loading&&!e.fetched);}}function qr(t,_){if(t&1){let e=x();r(0,"lib-button",9),P("click",function(o){v(e);let l=s(2);return $(l.confirm(o));}),i();}if(t&2){let e=s(2);O("additional",!0)("disabled",e.disabled)("hideLabelOnSmall",!1)("label",e.getFetchButtonLabel(e.index))("loading",e.loading);}}function jr(t,_){if(t&1&&C(0,zr,1,5,"lib-button",8)(1,qr,1,5,"lib-button",8),t&2){let e=s();E(e.isManualFetchRequired()?-1:0),a(),E(e.isManualFetchRequired()?1:-1);}}function Hr(t,_){t&1&&R(0,"lib-icon",2);}var Oo=(()=>{class t{constructor(e,n,o,l,u,p,h){this.confirmationService=e,this.messageService=n,this.ticketCollectionService=o,this.ticketFetchedSubscription=l,this.ticketFetchingService=u,this.appConfig=p,this.cdr=h,this.travellers=[],this.disabled=!1,this.disabledLinkClicked=new et(),this.loading=!1,this.fetched=!1,this.downloaded=!1;}ngOnInit(){this.ticket.status==="urn:simpletrain:ticketshop:ticket_status:fetched"?this.fetched=!0:this.waitForFetched();let e=this.ticket.correspondingPersons.length===1?"wird":"werden";this.confirmDialogOptions={message:"\n      Wenn Du dieses Ticket jetzt abrufst, dann erlischt sofort dein Anspruch auf jegliche Erstattung.\n      Rufe das Ticket nur ab, wenn du dir sicher bist, dass "+this.getTravellerNames()+" die Reise antreten\n      "+e+".",icon:"pi pi-exclamation-triangle",acceptLabel:" Ja, Ticket abrufen",rejectLabel:" Nein, Ticket sp\xE4ter abrufen",acceptIcon:"pi pi-download",defaultFocus:"reject",acceptButtonStyleClass:"gap-2"};}isManualFetchRequired(){return!this.fetched&&this.ticket.fetchVoidsCancellation;}getTravellerNames(){let e=this.ticket.correspondingPersons.map(n=>this.travellers.find(o=>o.personURN===n)).map(n=>n?.person?.firstName??n?.person?.lastName);return e.length===1?" "+e[0]+"":e.length===2?" "+e[0]+" und "+e[1]+"":"deine Gruppe";}collectTicket(){if(this.disabled){this.disabledLinkClicked.emit();return;}this.openTicket()||(this.loading=!0,this.ticketCollectionService.mutate({orderUrn:this.order.idURN,parentUrn:this.parentUrn,ticketUrn:this.ticket.idURN,collectedTime:new Date().toISOString()}).pipe(Gt(()=>{this.loading=!1;})).subscribe({next:e=>{this.fetched=!0,this.ticketPdfUrl=e.data?.collectTicket?.url,this.openTicket();},error:e=>{this.showErrorMessage();}}));}confirm(e){if(this.disabled){this.disabledLinkClicked.emit();return;}this.confirmationService.confirm(Q(U({},this.confirmDialogOptions),{target:e.target??void 0,accept:()=>{this.fetchTicket();}}));}confirmExternal(e,n){if(this.disabled){this.disabledLinkClicked.emit();return;}this.confirmationService.confirm(Q(U({},this.confirmDialogOptions),{target:e.target??void 0,accept:()=>{window.open(n.toString(),"_blank");}}));}fetchTicket(){if(!this.openTicket()){if(this.fetched){this.collectTicket();return;}this.loading=!0,this.ticketFetchedSubscription.subscribe({orderUrn:this.order.idURN,ticketUrn:this.ticket.idURN}).pipe(oe(e=>e.data?.ticketFetchedFromCarrierEvent!==void 0),ie(1),A(e=>e.data.ticketFetchedFromCarrierEvent),Rn({each:(this.appConfig.configuration?.ticketFetchTimeoutSeconds||2*60)*1e3,with:()=>We(()=>new Error("Timeout while waiting for ticket to be fetched"))})).subscribe({next:e=>{this.fetched=!0,this.collectTicket();},error:e=>(this.loading=!1,this.showErrorMessage(),Ke)}),this.ticketFetchingService.mutate({orderUrn:this.order.idURN,parentUrn:this.parentUrn,ticketUrn:this.ticket.idURN}).pipe(Gt(()=>{this.loading=!1;})).subscribe({error:e=>{this.showErrorMessage();}});}}showErrorMessage(){this.messageService.add({severity:"error",icon:"pi pi-exclamation-triangle",summary:" Ticket konnte nicht abgerufen werden.",detail:" Es gab einen Fehler beim Abruf deines Tickets. Bitte versuche es sp\xE4ter erneut."});}openTicket(){return this.ticketPdfUrl?(this.loading=!0,document.location.href=this.ticketPdfUrl.toString(),this.loading=!1,this.downloaded=!0,this.cdr.detectChanges(),!0):!1;}waitForFetched(){this.ticketFetchedSubscription.subscribe({orderUrn:this.order.idURN,ticketUrn:this.ticket.idURN}).pipe(oe(e=>e.data?.ticketFetchedFromCarrierEvent!==void 0),ie(1),A(e=>e.data.ticketFetchedFromCarrierEvent)).subscribe({next:e=>{this.fetched=!0;}});}getDownloadButtonLabel(e){return this.ticket.externalId.idProvider===qn.SimpleTrain?this.ticket.externalId.referenceId:"Ticket "+(e+1)+" herunterladen";}getFetchButtonLabel(e){return"Ticket "+(e+1)+" anfordern";}static{this.ɵfac=function(n){return new(n||t)(m(at),m(_e),m(Ji),m(Ui),m(Bi),m(Zn),m($n));};}static{this.ɵcmp=k({type:t,selectors:[["app-ticket"]],inputs:{ticket:"ticket",travellers:"travellers",index:"index",parentUrn:"parentUrn",order:"order",disabled:"disabled"},outputs:{disabledLinkClicked:"disabledLinkClicked"},standalone:!0,features:[W([at,_e]),G],decls:8,vars:5,consts:()=>{let e;return e="Du hast das Ticket bereits heruntergeladen. Du kannst es so oft herunterladen, wie du m\xF6chtest.",[[1,"flex","flex-row","justify-content-between","align-items-center"],[1,"mr-2","py-2"],["name","check","pTooltip",e,1,"text-green-300",2,"width","1.5rem","height","1.5rem"],["target","_blank","type","button",1,"flex","flex-row","align-items-center","no-underline","text-sm",3,"ngClass"],["
4icon","externalLink",3,"additional","disabled","hideLabelOnSmall","label","loading"],["name","externalLink",1,"icon","mr-2",2,"height","1.3125rem","width","1.3125rem"],[1,"pl-0","p-button","p-button-text",3,"ngClass"],["icon","externalLink",3,"click","additional","disabled","hideLabelOnSmall","label","loading"],["icon","download",3,"additional","disabled","hideLabelOnSmall","label","loading"],["icon","download",3,"click","additional","disabled","hideLabelOnSmall","label","loading"]];},template:function(n,o){n&1&&(r(0,"div",0)(1,"div",1),C(2,Xr,2,1)(3,jr,2,2),i(),r(4,"div"),C(5,Hr,1,0,"lib-icon",2),i()(),R(6,"p-confirmPopup")(7,"p-toast")),n&2&&(a(2),E(o.ticket.externalDownloadLink?2:3),a(3),E(o.downloaded?5:-1),a(),nt(it(4,Gr)));},dependencies:[Fe,Z,Ei,Ti,Gn,kn,dt,ne,Ot,rt],changeDetection:0});}}return t;})();var Qr=(t,_)=>_.id,Yr=t=>({"ng-invalid ng-dirty":t});function Kr(t,_){t&1&&(r(0,"div",2)(1,"p",3),d(2,0),i()());}function Wr(t,_){if(t&1){let e=x();r(0,"div",4)(1,"p-checkbox",5),Pe("ngModelChange",function(o){v(e);let l=s();return Me(l.checked,o)||(l.checked=o),$(o);}),i(),r(2,"label",6),d(3,1),i()(),R(4,"hr",7);}if(t&2){let e=s();a(),he("ngModel",e.checked),O("binary",!0)("ngClass",Re(3,Yr,e.highlightCheckbox()));}}function Zr(t,_){t&1&&R(0,"hr",13);}function e_(t,_){if(t&1){let e=x();r(0,"div")(1,"app-ticket",12),P("disabledLinkClicked",function(){v(e);let o=s(3);return $(o.highlightCheckbox.set(!0));}),i(),C(2,Zr,1,0,"hr",13),i();}if(t&2){let e=_.$implicit,n=_.$index,o=_.$count,l=s().$implicit,u=s(2);a(),O("disabled",u.disableTicketDownload())("index",n)("order",u.order())("parentUrn",l.idURN)("ticket",e)("travellers",u.getTravellers(l)),a(),E(n!==o-1?2:-1);}}function t_(t,_){t&1&&R(0,"p-skeleton",14);}function n_(t,_){if(t&1&&(r(0,"div",11),C(1,t_,1,0,"p-skeleton",14),i()),t&2){let e=s(3);a(),E(e.order().state!==e.OrderStatus.TicketCollection&&e.order().state!==e.OrderStatus.OnlyPartialBooking?1:-1);}}function i_(t,_){if(t&1&&(r(0,"div",2),R(1,"app-route-title",8),i(),r(2,"div",9)(3,"div",10),q(4,e_,3,7,"div",null,se,!1,n_,2,1,"div",11),i()()),t&2){let e=_.$implicit,n=s(2);a(),O("route",e.leg),a(3),j(n.getUniqueTickets(e.leg.idURN));}}function o_(t,_){t&1&&R(0,"hr",13);}function r_(t,_){if(t&1){let e=x();r(0,"div")(1,"app-ticket",15),P("disabledLinkClicked",function(){v(e);let o=s(4);return $(o.highlightCheckbox.set(!0));}),i(),C(2,o_,1,0,"hr",13),i();}if(t&2){let e=_.$implicit,n=_.$index,o=_.$count,l=s(2).$implicit,u=s(2);a(),O("disabled",u.disableTicketDownload())("index",n)("order",u.order())("parentUrn",l.id)("ticket",e),a(),E(n!==o-1?2:-1);}}function __(t,_){if(t&1&&(r(0,"div",2),g(1),i(),r(2,"div",9)(3,"div",10),q(4,r_,3,6,"div",null,se),i()()),t&2){let e=s().$implicit,n=s(2);a(),H(" ",e.name," "),a(3),j(n.getUniqueTickets(e.id));}}function a_(t,_){if(t&1&&C(0,__,6,1),t&2){let e=_.$implicit;E(e.tickets.length>0?0:-1);}}function l_(t,_){if(t&1&&(q(0,i_,7,2,null,null,se),q(2,a_,1,1,null,null,Qr)),t&2){let e=s();j(e.order().journeys),a(2),j(e.order().standaloneTariffs);}}var Co=(()=>{class t{constructor(){this.OrderStatus=L,this.ticketsPerMainItem=tt(),this.order=tt.required(),this.isManualOrder=tt.required(),this.requireTicketCheck=ge(()=>!!this.isManualOrder()),this.checked=qe(!1),this.disableTicketDownload=ge(()=>this.requireTicketCheck()&&!this.checked()),this.highlightCheckbox=qe(!1),this.ticketsReleased=ge(()=>this.order().invoices.length===0||ht(this.order().invoices)),this.someTicketsReady=ge(()=>this.ticketsReleased()&&Object.values(this.ticketsPerMainItem()??{}).some(e=>e.length>0));}getTickets(e){return this.ticketsPerMainItem()?.[e]??[];}getTravellers(e){return[e.mainTraveller,...e.additionalTravellers];}getUniqueTickets(e){let n=new Set();return this.getTickets(e).filter(o=>{let l=o.externalDownloadLink;return!l||n.has(l)?!l:(n.add(l),!0);});}static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵcmp=k({type:t,selectors:[["app-tickets"]],inputs:{ticketsPerMainItem:[1,"ticketsPerMainItem"],order:[1,"order"],isManualOrder:[1,"isManualOrder"]},standalone:!0,features:[G],decls:3,vars:2,consts:()=>{let e;
4e="Deine Tickets sind noch unterwegs und werden hier angezeigt, sobald sie verf\xFCgbar sind.";let n;return n=" Ich werde meine Tickets auf Richtigkeit und Vollst\xE4ndigkeit \xFCberpr\xFCfen und SimpleTrain allf\xE4llige Fehler mitteilen. ",[e,n,[1,"text-gray-600","text-sm"],[1,"mt-0"],[1,"flex","flex-row","gap-3","mb-3","px-2"],["inputId","binary",3,"ngModelChange","ngModel","binary","ngClass"],["for","binary",2,"text-transform","none"],[1,"w-full","mb-5"],[3,"route"],[1,"mb-3"],[1,"flex","flex-column"],[1,"py-3"],[3,"disabledLinkClicked","disabled","index","order","parentUrn","ticket","travellers"],[1,"my-0"],["height","2rem","width","50%"],[3,"disabledLinkClicked","disabled","index","order","parentUrn","ticket"]];},template:function(n,o){n&1&&C(0,Kr,3,0,"div",2)(1,Wr,5,5)(2,l_,4,0),n&2&&(E(o.someTicketsReady()?o.requireTicketCheck()?1:-1:0),a(2),E(o.ticketsReleased()?2:-1));},dependencies:[Oo,ke,At,It,Si,Ni,mt,ue,oi,rt],changeDetection:0});}}return t;})();var s_=()=>({"min-width":"60%"}),Ro=(()=>{class t{constructor(e,n){this.createFeedbackGql=e,this.messageService=n,this.visible=!1,this.visibleChange=new et(),this.form=new Tt({topic:new Se(Le.General,{nonNullable:!0}),email:new Se(void 0,{validators:ve.pattern(Kn),nonNullable:!0}),title:new Se("",{validators:ve.required,nonNullable:!0}),message:new Se("",{validators:ve.required,nonNullable:!0})}),this.topicControl=this.form.get("topic");}hidden(){this.visibleChange.emit(!1);}submit(){if(this.form.valid){let e=this.form.getRawValue();this.createFeedbackGql.mutate({command:{feedbackUrn:Un(),title:e.title,message:e.message,email:e.email,topic:e.topic}}).pipe(A(n=>n.data?.createFeedback)).subscribe({next:n=>{n?.boolean&&(this.form.reset(),this.messageService.add({severity:"success",icon:"pi pi-check",summary:"Feedback gesendet",detail:"Vielen Dank f\xFCr Dein Feedback!\n                            Durch Deine Hilfe k\xF6nnen wir daran arbeiten,\n                            unseren Service zu verbessern\n                            und Dir eine bestm\xF6gliche Erfahrung in unserem Ticketshop zu bieten.",life:1e4}),this.visibleChange.emit(!1));},error:()=>this.messageService.add({severity:"error",icon:"pi pi-exclamation-triangle",summary:"Feedback konnte nicht gesendet werden",detail:"Bitte versuche es sp\xE4ter erneut, oder schicke uns eine E-Mail an [email protected].\n                            Wir entschuldigen uns f\xFCr die Unannehmlichkeiten\n                            und bem\xFChen uns das Problem raschestm\xF6glich zu beheben.",life:1e4})});}}static{this.ɵfac=function(n){return new(n||t)(m($i),m(_e));};}static{this.ɵcmp=k({type:t,selectors:[["app-feedback-form"]],inputs:{visible:"visible"},outputs:{visibleChange:"visibleChange"},standalone:!0,features:[G],decls:19,vars:8,consts:()=>{let e;e="Feedback";let n;n="Titel";let o;o="Nachricht";let l;l="Deine E-Mail Adresse f\xFCr R\xFCckfragen (optional)";let u;return u="Abschicken",[n,o,l,u,["header",e,3,"visibleChange","onHide","visible","modal"],[1,"formgrid","grid",3,"formGroup"],[1,"field","col-12"],[3,"control"],[1,"field","col-12","flex","flex-column"],["for","feedbackTitle"],["formControlName","title","id","feedbackTitle","maxlength","300","pInputText","","type","text"],["for","feedbackMessage"],["cols","100","formControlName","message","id","feedbackMessage","maxlength","5000","pInputTextarea","","rows","8"],["for","feedbackEmail"],["formControlName","email","id","feedbackEmail","maxlength","150","pInputText","","type","email"],[1,"flex","justify-content-end"],[3,"onClick","disabled"]];},template:function(n,o){n&1&&(r(0,"p-dialog",4),Pe("visibleChange",function(u){return Me(o.visible,u)||(o.visible=u),u;}),P("onHide",function(){return o.hidden();}),r(1,"div",5)(2,"div",6),R(3,"lib-feedback-topic-dropdown",7),i(),r(4,"div",8)(5,"label",9),d(6,0),i(),R(7,"input",10),i(),r(8,"div",8)(9,"label",11),d(10,1),i(),R(11,"textarea",12),i(),r(12,"div",8)(13,"label",13),d(14,2),i(),R(15,"input",14),i()(),r(16,"div",15)(17,"p-button",16),P("onClick",function(){return o.submit();}),d(18,3),i()()()),n&2&&(nt(it(7,s_)),he("visible",o.visible),O("modal",!0),a(),O("formGroup",o.form),a(2),O("control",o.topicControl),a(14),O("disabled",!o.form.valid));},dependencies:[Oi,ci,si,li,$e,Rt,ue,ut,ai,Et,pt,St,Nt,gt,Fe,ei,Qi],encapsulation:2,changeDetection:0});}}return t;})();var c_=(t,_)=>_.key,zt=(t,_)=>_.idURN,O_=(t,_)=>["/",t,_];function C_(t,_){if(t&1&&(r(0,"div",24)(1,"div"),g(2),i(),r(3,"div"),g(4),D(5,"price"),i()()),t&2){let e=_.$implicit,n=s(3);a(2),J(e.name||n.getFallbackName(e)),a(2),J(F(5,2,e.basePrice));}}function R_(t,_){if(t&1&&q(0,C_,6,4,"div",24,zt),t&2){let e=_.$implicit;j(e.fares);}}function u_(t,_){if(t&1&&q(0,R_,2,0,null,null,zt),t&2){let e=s();j(e.order.invoices);}}function T_(t,_){if(t&1&&(r(0,"div",27)(1,"div"),d(2,4),i(),r(3,"div"),g(4),D(5,"price"),i()()),t&2){let e=s().$implicit;a(4),J(F(5,1,e.leg.selectedFare==null?null:e.leg.selectedFare.surcharge));}}function E_(t,_){if(t&1&&(r(0,"div",25),R(1,"app-route-title",26),r(2,"div"),g(3),D(4,"price"),i()(),C(5,T_,6,3,"div",27)),t&2){let e=_.$implicit,n=s(2);a(),O("route",e.leg),a(2),J(F(4,3,n.getInvoiceGroupPrice(e))),a(2),E((e.leg.selectedFare==null||e.leg.selectedFare.surcharge==null?null:e.leg.selectedFare.surcharge.value)>0?5:-1);}}function p_(t,_){if(t&1&&q(0,E_,6,5,null,null,zt),t&2){let e=s();j(e.order.journeys);}}function m_(t,_){if(t&1&&(r(0,"div",25)(1,"div"),d(2,5),D(3,"feeTypeWithVat"),i(),r(4,"div"),g(5),D(6,"price"),i()()),t&2){let e=s().$implicit;a(3),je(F(3,2,e.value)),He(2),a(2),J(Ve(6,4,e.value.price.netAmount,e.value.price.currencyURN));}}function g_(t,_){if(t&1&&C(0,m_,7,7,"div",25),t&2){let e=_.$implicit;E(e.value.price.netAmount>0?0:-1);}}function N_(t,_){if(t&1&&(r(0,"div",13)(1,"div",28)(2,"span"),d(3,6),i(),g(4),i(),r(5,"div"),g(6),D(7,"price"),i()()),t&2){let e=_;a(4),H(" \xA0",e.code," "),a(2),J(F(7,2,e.vatExemptAmount.value+e.vatRelevantAmount.netAmount));}}function S_(t,_){if(t&1){let e=x();r(0,"div",17)(1,"lib-button",29),P("onClick",function(){v(e);let o=s();return $(o.startPayment(o.order));}),i()();}}function f_(t,_){if(t&1&&(r(0,"div"),g(1),i()),t&2){let e=s();a(),J(e.order.billingContactPerson.organisation);}}function I_(t,_){if(t&1&&(r(0,"div"),g(1),i(),r(2,"div"),g(3),i(),r(4,"div"),g(5),i()),t&2){let e=s();a(),J(e.order.billingContactPerson.address.streetAddress),a(2),J(e.order.billingContactPerson.address.extendedAddress),a(2),wt("",e.order.billingContactPerson.address.postalCode," ",e.order.billingContactPerson.address.city,"");}}function A_(t,_){if(t&1&&(r(0,"div")(1,"p"),d(2,7),i(),r(3,"div",31)(4,"lib-button",32),d(5,8),i()()()),t&2){let e=s().ngrxLet,n=s();a(4),O("routerLink",ot(1,O_,n.INQUIRY_PATH,e));}}function h_(t,_){if(t&1&&(r(0,"p"),hn(1,9),R(2,"a",33),Mn(),i()),t&2){let e=s(2);a(2),O("href","mailto:"+e.SUPPORT_EMAIL,Ae);}}function M_(t,_){if(t&1&&(r(0,"div",30),C(1,A_,6,4,"div")(2,h_,3,1,"p"),i()),t&2){let e=_.ngrxLet;a(),E(e?1:2);}}var uo=(()=>{class t{constructor(e,n,o,l){this.paymentService=e,this.orderConfirmationStore=n,this.pdfInvoiceService=o,this.messageService=l,this.OrderStatus=L,this.SUPPORT_EMAIL=Wn,this.getInvoiceGroupPrice=Mt,this.INQUIRY_PATH=Xi,this.DATE_ONLY_FORMAT=st,this.inquiryId$=this.orderConfirmationStore.inquiryId$,this.qrBillInfo=qe(void 0);}printConfirmation(){return Ye(this,null,function*(){(this.order.pendingAmount?.value??0)>0?this.confirmOrderAndStartQrBillPayment():yield this.pdfInvoiceService.generateAndDownloadInvoice(this.order,this.settledPayments);});}getFeesGroupedByType(){return Ai(this.order.fees);}startPayment(e){this.paymentService.startPayment(e.idURN);}getFallbackName(e){return(this.order.journeys.find(o=>
4o.leg.selectedManualFares.map(l=>l.idURN).includes(e.idURN))??this.order.standaloneTariffs.find(o=>o.invoiceLineItems.map(l=>l.idURN).includes(e.idURN)))?.name??"";}confirmOrderAndStartQrBillPayment(){if(this.qrBillInfo()){this.downloadQrBill();return;}this.paymentService.confirmOrderAndStartQrPayment(this.order.idURN,this.order.tosAccepted??new Date(),[],this.order.invoices.filter(e=>e.state===Yn.Published).map(e=>e.idURN)??[]).pipe(X(e=>{if(e)return this.qrBillInfo.set(e),this.downloadQrBill();this.showErrorMessage();})).subscribe({error:()=>{this.showErrorMessage();}});}downloadQrBill(){let e=this.qrBillInfo();e?this.pdfInvoiceService.generateAndDownloadInvoice(this.order,this.settledPayments,e).catch(n=>{this.showErrorMessage();}):this.showErrorMessage();}showErrorMessage(){this.messageService.add({severity:"error",summary:"Fehler",detail:"Die Rechnung konnte nicht erstellt werden"});}static{this.ɵfac=function(n){return new(n||t)(m(Ft),m(V),m(hi),m(_e));};}static{this.ɵcmp=k({type:t,selectors:[["app-billing-details"]],inputs:{order:"order",settledPayments:"settledPayments"},standalone:!0,features:[G],decls:40,vars:22,consts:()=>{let e;e="Total";let n;n="von SimpleTrain erhobene MWST";let o;o=" Rechnung herunterladen ";let l;l="Rechnungsdaten";let u;u="Aufpreis";let p;p=""+"\uFFFD0\uFFFD"+"";let h;h="Gutschein";let c;c="Aufpreis bezahlen";let T;T="Hast du ein Problem bei deiner Reise?";let I;I="Zum Chat";let f;return f=" Hast du ein Problem bei deiner Reise? Schreib uns eine Email auf "+"\uFFFD#2\uFFFD"+"[email protected]"+"\uFFFD/#2\uFFFD"+" und wir werden uns so schnell wie m\xF6glich bei dir melden. ",[e,n,o,l,u,p,h,T,I,f,[1,"no-screen","text-sm"],[1,"mt-4","max-w-25rem"],[1,"max-w-25rem","mt-4"],[1,"max-w-25rem","mt-4","flex","gap-2","justify-content-between"],[1,"flex","justify-content-between","font-bold","text-lg"],[1,"flex","justify-content-between","font-medium","no-screen"],["icon","download",1,"mt-4","no-print",3,"click","additional"],[1,"max-w-25rem","mt-4","flex","justify-content-center"],[1,"mt-4"],[1,"text-xl","text-gray-600","uppercase","mt-4"],[1,"mt-2","text-sm"],[1,"mt-2"],[1,"mt-4","-ml-3","-mr-3","no-print"],["class","no-print",4,"ngrxLet"],[1,"flex","flex-row","gap-4","justify-content-between"],[1,"flex","justify-content-between","gap-4"],[3,"route"],[1,"flex","justify-content-between","gap-4","ml-3"],[1,"white-space-nowrap"],["label",c,3,"onClick"],[1,"no-print"],[1,"flex","flex-row","justify-content-center"],[3,"routerLink"],[1,"text-primary","no-underline",3,"href"]];},template:function(n,o){if(n&1&&(r(0,"div",10),g(1),D(2,"date"),i(),r(3,"div",11),C(4,u_,2,0)(5,p_,2,0),i(),r(6,"div",12),q(7,g_,1,1,null,null,c_),D(9,"keyvalue"),i(),C(10,N_,8,4,"div",13),r(11,"div",12)(12,"div",14)(13,"div"),d(14,0),i(),r(15,"div"),g(16),D(17,"price"),i()(),r(18,"div",15)(19,"div"),d(20,1),i(),r(21,"div"),g(22),D(23,"price"),i()()(),r(24,"div",12)(25,"lib-button",16),P("click",function(){return o.printConfirmation();}),d(26,2),i()(),C(27,S_,2,0,"div",17),R(28,"hr",18),r(29,"div",19),d(30,3),i(),r(31,"div",20)(32,"div"),g(33),i(),C(34,f_,2,1,"div")(35,I_,6,4),r(36,"div",21),g(37),i()(),R(38,"hr",22),C(39,M_,3,1,"div",23)),n&2){let l;a(),J(Ve(2,13,o.order.created,o.DATE_ONLY_FORMAT)),a(3),E(o.order.invoices.length>0?4:5),a(3),j(F(9,16,o.getFeesGroupedByType())),a(3),E((l=o.order.discount)?10:-1,l),a(6),J(F(17,18,o.order.total.net)),a(6),J(F(23,20,o.order.total.vat)),a(3),O("additional",!0),a(2),E(o.order.state===o.OrderStatus.PendingSurchargePayment?27:-1),a(6),wt("",o.order.billingContactPerson.firstName," ",o.order.billingContactPerson.lastName,""),a(),E(o.order.billingContactPerson.organisation?34:-1),a(),E(o.order.billingContactPerson.address?35:-1),a(2),J(o.order.billingContactPerson.primaryEmailAddress),a(2),O("ngrxLet",o.inquiryId$);}},dependencies:[ke,ct,ne,Di,De,bn,Z,ae,lt],changeDetection:0});}}return t;})();var To=(()=>{class t{static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵcmp=k({type:t,selectors:[["app-order-overview"]],inputs:{order:"order"},standalone:!0,features:[G],decls:14,vars:6,consts:()=>{let e;e="Klicke, um die Bestellnummer zu kopieren";let n;n="Allgemein";let o;o="Bestellnr.:";let l;return l="Bestelldatum:",[n,o,l,[1,"text-xl","text-gray-600","uppercase"],[1,"text-sm","uppercase","mt-1"],[1,"mr-1","text-gray-600","white-space-nowrap"],["copyToClipboard","","pTooltip",e,"tooltipPosition","top"],[1,"text-sm","uppercase","pt-1"],[1,"mr-1","text-gray-600"]];},template:function(n,o){n&1&&(r(0,"div",3),d(1,0),i(),r(2,"div",4)(3,"span",5),d(4,1),i(),r(5,"span",6),g(6),D(7,"urnId"),i()(),r(8,"div",7)(9,"span",8),d(10,2),i(),r(11,"span"),g(12),D(13,"date"),i()()),n&2&&(a(6),H(" ",F(7,2,o.order.idURN)," "),a(6),J(F(13,4,o.order.created)));},dependencies:[Vi,ni,ne,Ot,De],changeDetection:0});}}return t;})();function P_(t,_){t&1&&b(0);}function D_(t,_){if(t&1){let e=x();r(0,"div",15),C(1,P_,1,0,"ng-container",16),r(2,"p",17),d(3,2),i(),R(4,"p-divider"),r(5,"button",18),P("click",function(){v(e);let o=s();return $(o.confirmCancellationRequest());}),r(6,"p",19),d(7,3),i()()();}if(t&2){s();let e=y(11);a(),O("ngTemplateOutlet",e);}}function L_(t,_){t&1&&b(0);}function F_(t,_){t&1&&b(0);}function v_(t,_){if(t&1&&(r(0,"div",15),C(1,L_,1,0,"ng-container",16),r(2,"p",17),d(3,4),i(),C(4,F_,1,0,"ng-container",16),i()),t&2){s();let e=y(11),n=y(13);a(),O("ngTemplateOutlet",e),a(3),O("ngTemplateOutlet",n);}}function $_(t,_){t&1&&b(0);}function x_(t,_){if(t&1&&(r(0,"div",15),R(1,"i",20),r(2,"h3",21),d(3,5),i(),r(4,"p",17),d(5,6),i(),C(6,$_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(6),O("ngTemplateOutlet",e);}}function b_(t,_){t&1&&b(0);}function y_(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,7),i(),C(3,b_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function k_(t,_){t&1&&b(0);}function G_(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,8),i(),C(3,k_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function w_(t,_){t&1&&b(0);}function J_(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,9),i(),C(3,w_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function B_(t,_){t&1&&b(0);}function U_(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,10),i(),C(3,B_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function X_(t,_){t&1&&b(0);}function z_(t,_){if(t&1&&(r(0,"div",15)(1,"p",22),d(2,11),i(),C(3,X_,1,0,"ng-container",16),i()),t&2){s();let e=y(13);a(3),O("ngTemplateOutlet",e);}}function q_(t,_){if(t&1){let e=x();r(0,"div",23)(1,"h2",24),d(2,12),i(),r(3,"div",25)(4,"button",26),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),R(5,"i",27),i()()();}}function j_(t,_){if(t&1){let e=x();r(0,"button",18),P("click",function(){v(e);let o=s();return $(o.cancelProcess());}),r(1,"p",19),d(2,13),i()();}}var Eo=(()=>{class t{constructor(e,n,o){this.store=e,this.ref=n,this.dynamicDialogConfig=o,this.orderStateMutated=!1,this.cancellationLoading$=this.store.cancellationRequestLoading$,this.cancellationSuccess$=this.store.cancellationRequestSuccess$,this.order$=this.store.order$.pipe(oe(l=>!!l),A(l=>l)),this.orderCancellationState$=this.cancellationLoading$.pipe(le(this.cancellationSuccess$,this.order$),A(([l,u,p])=>l&&!u?"Loading":qt(p)?"CancellationPeriodThrough":p.state===L.InCancellation||u?"SuccessfullyRequested":p.state===L.Cancelled?"CancellationAlreadyDone":p.state===L.Done?"ConfirmRequest":u?"CancellationNotPossible":"ErrorInRequest"));}cancelProcess(){this.ref.close({shouldReload:this.orderStateMutated});}confirmCancellationRequest(){let e=this.dynamicDialogConfig.data?.orderUrn;e&&(this.orderStateMutated=!0,this.store.confirmOrderCancellationRequest(e));}static{this.ɵfac=function(n){return new(n||t)(m(V),m(xe),m(ft));};}static{this.ɵcmp=k({type:t,selectors:[["app-order-cancellation"]],standalone:!0,features:[W([]),G],decls:14,vars:3,consts:()=>{let e;e=" Wir stornieren deine Bestellung und verg\xFCten dir den Betrag auf dein urspr\xFCngliches Bezahlungsmittel zur\xFCck. ";let n;n="Stornierung best\xE4tigen";let o;o="Deine Anfrage wird bearbeitet.";let l;l="Stornierung abgeschickt!";let u;u="Sobald wir deine Bestellung storniert haben, informieren wir dich per E-Mail.";let p;p="Etwas ist schief gelaufen! Bitte versuche es erneut.";let h;h="Dieses Ticket wurde bereits zur\xFCckerstattet.";let c;c=" Diese Bestellung k\xF6nnen wir nicht zur\xFCckerstatten, weil wir in unserem System keine zugeh\xF6rige Zahlung im richtigen Status finden k\xF6nnen. Sollte dies aber der Fall sein, kontaktiere uns bitte direkt. ";let T;T="Gem\xE4ss unseren Stornierungsbedingungen ist keine Erstattung mehr m\xF6glich.";let I;I=" Diese Bestellung kann zurzeit noch nicht storniert werden, weil wir noch nicht alle Zahlungen verbucht haben. Bitte versuche es sp\xE4ter noch einmal. ";let f;f="Bestellung stornieren";let S;return S="Zur Bestell\xFCbersicht",[["header",""],["backToOverviewButton",""],e,n,o,l,u,p,h,c,T,I,f,S,[1,"flex","flex-row","justify-content-between","align-items-center","w-30rem"],[1,"flex","flex-column","w-full"],[4,"ngTemplateOutlet"],[1,"text-center"],["type","button",1,"p-button","p-button-rounded","align-self-center","m-2",3,"click"],[1,"m-0"],[1,"pi","pi-check-circle","text-green-500","align-self-center","pt-6","pb-5",2,"font-size","4rem"],[1,"text-center","m-0"],[1,"text-center","pt-4"],[1,"flex","flex-row","p-dialog-header"],[1,"text-primary","text-center","flex-grow-1","m-0"],[1,"fixed","top-0","right-0","pt-4","pr-5"],["type","button",1,"p-icon-wrapper","p-dialog-header-icon","p-dialog-header-close-icon",3,"click"],[1,"pi","pi-times","text-primary"]];},template:function(n,o){if(n&1&&(r(0,"div",14),C(1,D_,8,1,"div",15),D(2,"ngrxPush"),C(3,v_,5,2,"div",15)(4,x_,7,1,"div",15)(5,y_,4,1,"div",15)(6,G_,4,1,"div",15)(7,J_,4,1,"div",15)(8,U_,4,1,"div",15)(9,z_,4,1,"div",15),i(),C(10,q_,6,0,"ng-template",null,0,de)(12,j_,3,0,"ng-template",null,1,de)),n&2){let l;a(),E((l=F(2,1,o.orderCancellationState$))==="ConfirmRequest"?1:l==="Loading"?3:l==="SuccessfullyRequested"?4:l==="ErrorInRequest"?5:l==="CancellationAlreadyDone"?6:l==="CancellationNotPossible"?7:l
4==="CancellationPeriodThrough"?8:l==="CancellationNotYetPossible"?9:-1);}},dependencies:[te,pe,Ee,be,_t],changeDetection:0});}}return t;})();var H_=t=>({isCancellationBlocked:t});function V_(t,_){if(t&1){let e=x();Oe(0),r(1,"div",2)(2,"lib-button",3),P("onClick",function(){v(e);let o=s();return $(o.ticketCancellationPressed());}),d(3,0),i()(),Ce();}if(t&2){let e=_.ngrxLet;a(2),O("disabled",e.isCancellationBlocked)("rounded",!0)("secondary",!0);}}var qt=t=>{let _=new Date(),e=new Date(_.setHours(_.getHours()+48));return t.journeys.some(n=>new Date(n.leg.departure.time)<=e);},jt=t=>!t||qt(t)?!1:t.journeys.some(_=>_.leg.selectedFare?.cancellableAmounts.some(e=>e.amount.value>0)),po=(()=>{class t{constructor(e,n){this.store=e,this.dialogService=n,this.order$=this.store.order$,this.ticketsPerMainItem$=this.store.ticketsPerMainItem$,this.areTicketsStillLoading$=this.ticketsPerMainItem$.pipe(A(o=>this.journey?.leg?!o[this.journey.leg.idURN]:!0)),this.isCancellationBlocked$=this.order$.pipe(A(o=>!jt(o)));}ticketCancellationPressed(){this.order$.pipe(oe(e=>!!e),A(e=>e),ie(1),X(e=>{this.store.resetCancellationRequestState(),this.store.reloadOrder(e.idURN);}),ee(e=>this.dialogService.open(Eo,{showHeader:!1,data:{orderUrn:e.idURN}}).onClose.pipe(A(n=>({result:n,order:e}))))).subscribe(({result:e,order:n})=>{e?.shouldReload&&this.store.getOrder(n.idURN);});}static{this.ɵfac=function(n){return new(n||t)(m(V),m(Te));};}static{this.ɵcmp=k({type:t,selectors:[["app-order-cancellation-button"]],inputs:{journey:"journey"},standalone:!0,features:[W([]),G],decls:1,vars:3,consts:()=>{let e;return e=" Bestellung stornieren ",[e,[4,"ngrxLet"],[1,"flex","justify-content-center","align-items-center"],[1,"no-print",3,"onClick","disabled","rounded","secondary"]];},template:function(n,o){n&1&&C(0,V_,4,3,"ng-container",1),n&2&&O("ngrxLet",Re(1,H_,o.isCancellationBlocked$));},dependencies:[te,ae,Z,ne],changeDetection:0});}}return t;})();var Q_=(t,_,e)=>({order:t,language:_,settledPayments:e});function Y_(t,_){if(t&1&&R(0,"p-tag",37),t&2){let e=s().ngrxLet,n=s();O("rounded",!0)("severity",n.getOrderStateSeverity(e.order.state))("value",n.getOrderState(e.order));}}function K_(t,_){t&1&&(r(0,"div")(1,"p",54),d(2,3),i(),r(3,"p"),d(4,4),i(),r(5,"p"),d(6,5),i(),r(7,"div",55)(8,"a",56),d(9,6),i()()()),t&2&&(a(8),O("routerLink","/"));}function W_(t,_){t&1&&(r(0,"div",41)(1,"p-messages",52),C(2,K_,10,1,"ng-template",53),i()());}function Z_(t,_){t&1&&(r(0,"div")(1,"p",54),d(2,7),i(),r(3,"p"),d(4,8),i(),r(5,"p"),d(6,9),i(),r(7,"p"),d(8,10),i()());}function ea(t,_){t&1&&(r(0,"div",41)(1,"p-messages",52),C(2,Z_,9,0,"ng-template",53),i()());}function ta(t,_){if(t&1){let e=x();r(0,"div")(1,"p",54),d(2,11),i(),r(3,"p"),d(4,12),i(),r(5,"p"),d(6,13),i(),r(7,"p"),d(8,14),i(),r(9,"lib-button",57),P("onClick",function(){v(e);let o=s(4).ngrxLet,l=s();return $(l.startPayment(o.order));}),i()();}}function na(t,_){t&1&&(r(0,"div",41)(1,"p-messages",52),C(2,ta,10,0,"ng-template",53),i()());}function ia(t,_){if(t&1&&(r(0,"div",60),R(1,"app-tickets",61),D(2,"ngrxPush"),i()),t&2){let e=_.ngrxLet,n=s(4).ngrxLet,o=s();a(),O("isManualOrder",F(2,3,o.isManualOrder$))("order",n.order)("ticketsPerMainItem",e);}}function oa(t,_){t&1&&R(0,"hr");}function ra(t,_){if(t&1&&(r(0,"a",63),R(1,"lib-icon",65),r(2,"span",66),g(3),i()()),t&2){let e=_.$implicit;O("href",e.link,Ae),a(3),H(" ",e.text," ");}}function _a(t,_){t&1&&(r(0,"a",64),R(1,"lib-icon",67),r(2,"span",68),d(3,16),i()());}function aa(t,_){if(t&1&&(Oe(0),C(1,oa,1,0,"hr"),r(2,"div",62),q(3,ra,4,2,"a",63,se),C(5,_a,4,0,"a",64),i(),Ce()),t&2){let e=_.ngrxLet,n=s(4).ngrxLet,o=s();a(),E(e.length>0?1:-1),a(2),j(e),a(2),E(o.showTrenitaliaCheckinLink(n.order)?5:-1);}}function la(t,_){if(t&1&&(r(0,"div",43)(1,"div",48),d(2,15),i(),C(3,ia,3,5,"div",58)(4,aa,6,2,"ng-container",59),i()),t&2){let e=s(4);a(3),O("ngrxLet",e.ticketsPerMainItem$),a(),O("ngrxLet",e.journeyInfos$);}}function sa(t,_){t&1&&(r(0,"a",73),R(1,"lib-button",74),i()),t&2&&(a(),O("hideLabelOnSmall",!1)("secondary",!0));}function da(t,_){t&1&&R(0,"app-order-cancellation-button");}function ca(t,_){if(t&1&&(r(0,"lib-toggle-panel",45)(1,"div",69),R(2,"app-order-overview",70),i(),r(3,"span",71),d(4,17),i(),r(5,"div",72),C(6,sa,2,2,"a",73)(7,da,1,0,"app-order-cancellation-button"),i()()),t&2){let e=s(3).ngrxLet,n=s();O("headerShadowOnly",!0)("hideHr",!0)("hideHrMobile",!0)("shadow",!0),a(2),O("order",e.order),a(4),E(n.hasJourneyInThePast(e.order)?6:7);}}function Oa(t,_){t&1&&(r(0,"div",75)(1,"div",76),d(2,18),i(),r(3,"p"),d(4,19),i()());}function Ca(t,_){t&1&&(r(0,"p"),d(1,21),i());}function Ra(t,_){t&1&&(r(0,"p"),d(1,22),i());}function ua(t,_){if(t&1&&(r(0,"p"),g(1),i()),t&2){let e=s(5).ngrxLet;a(),J(e.order.otherCancellationDeniedReason);}}function Ta(t,_){if(t&1&&(r(0,"div",75)(1,"div",76),d(2,20),i(),C(3,Ca,2,0,"p")(4,Ra,2,0,"p")(5,ua,2,1,"p"),i()),t&2){let e,n=s(4).ngrxLet,o=s();a(3),E((e=n.order.cancellationDeniedReasonUrn)===o.OrderCancellationDeniedReason.CarrierTerms?3:e===o.OrderCancellationDeniedReason.CancellationPeriodsExpired?4:e===o.OrderCancellationDeniedReason.Other?5:-1);}}function Ea(t,_){if(t&1&&(r(0,"div",46),R(1,"app-order-overview",70),C(2,Oa,5,0,"div",75)(3,Ta,6,1,"div",75),i()),t&2){let e=s(3).ngrxLet,n=s();a(),O("order",e.order),a(),E(e.order.state===n.OrderStatus.Cancelled?2:-1),a(),E(e.order.cancellationDeniedReasonUrn?3:-1);}}function pa(t,_){if(t&1&&(r(0,"div",46),R(1,"app-order-overview",70),i()),t&2){let e=s(3).ngrxLet;a(),O("order",e.order);}}function ma(t,_){if(t&1&&(C(0,W_,3,0,"div",41)(1,ea,3,0,"div",41)(2,na,3,0,"div",41),r(3,"div",40)(4,"div",42),C(5,la,5,2,"div",43),r(6,"div",44),C(7,ca,8,6,"lib-toggle-panel",45)(8,Ea,4,3,"div",46)(9,pa,2,1,"div",46),i(),r(10,"div",47)(11,"div",48),d(12,2),i(),r(13,"div"),R(14,"app-billing-details",49),i()()(),r(15,"div",50),R(16,"app-order-confirmation-detail
4s",51),D(17,"ngrxPush"),i()()),t&2){let e=s(2).ngrxLet,n=s();E(e.order.state===n.OrderStatus.Failed||e.order.state===n.OrderStatus.PendingManualCleanup?0:-1),a(),E(e.order.state===n.OrderStatus.PendingManualBooking?1:-1),a(),E(e.order.state===n.OrderStatus.PendingSurchargePayment?2:-1),a(3),E(n.canViewTickets(e.order)?5:-1),a(2),E(e.order.state===n.OrderStatus.Done&&!e.order.cancellationDeniedReasonUrn&&(n.canCancelOrder(e.order)||n.hasJourneyInThePast(e.order))?7:e.order.state===n.OrderStatus.Cancelled||e.order.cancellationDeniedReasonUrn?8:9),a(7),O("order",e.order)("settledPayments",e.settledPayments),a(2),O("allOpen",!1)("isManualOrder",F(17,11,n.isManualOrder$))("journeys",e.order.journeys)("order",e.order);}}function ga(t,_){t&1&&(r(0,"h3"),d(1,23),i());}function Na(t,_){if(t&1&&C(0,ma,18,13,"div",40)(1,ga,2,0,"h3"),t&2){let e=s().ngrxLet;E(e.order?0:1);}}function Sa(t,_){t&1&&(r(0,"div",39)(1,"div",77)(2,"div",47)(3,"div",78),d(4,24),i(),r(5,"div",79),R(6,"p-skeleton",80)(7,"p-skeleton",81)(8,"p-skeleton",80)(9,"p-skeleton",81)(10,"p-skeleton",81),i()()(),r(11,"div",82)(12,"div",47)(13,"div",79)(14,"div",83),d(15,25),i(),R(16,"p-skeleton",81),r(17,"div",84)(18,"div",85),d(19,26),i(),r(20,"div",85),d(21,27),i(),r(22,"div",85),d(23,28),i(),r(24,"div",85),d(25,29),i(),r(26,"div",86),R(27,"p-skeleton"),i(),r(28,"div",86),R(29,"p-skeleton"),i(),r(30,"div",86),R(31,"p-skeleton"),i(),r(32,"div",86),R(33,"p-skeleton"),i()()()()()());}function fa(t,_){if(t&1&&(r(0,"div",34)(1,"div",35)(2,"h1",36),d(3,0),i(),C(4,Y_,1,3,"p-tag",37),r(5,"h1",38),d(6,1),i()(),C(7,Na,2,1),D(8,"ngrxPush"),C(9,Sa,34,0,"div",39),i()),t&2){let e=_.ngrxLet,n=s();a(4),E(e.order!=null&&e.order.state?4:-1),a(3),E(F(8,2,n.loading$)?9:7);}}var Ht=(()=>{class t{constructor(e,n,o,l,u,p,h){this.orderConfirmationStore=e,this.store=n,this.route=o,this.paymentService=l,this.countryPipe=u,this.httpClient=p,this.orderStatusPipe=h,this.OrderStatus=L,this.OrderCancellationDeniedReason=Hn,this.canCancelOrder=jt,this.getOrderStateSeverity=Fi,this.feedbackFormVisible=!1,this.loading$=this.orderConfirmationStore.loading$,this.language$=this.store.select(ye),this.journeyInfos$=K([]),this.order$=K(void 0),this.isManualOrder$=this.orderConfirmationStore.isManualOrder$,this.settledPayments$=K([]),this.route.params.subscribe(c=>{let T=c.orderUrn;T&&(this.orderConfirmationStore.getOrder(T),this.order$=this.orderConfirmationStore.order$,this.settledPayments$=this.orderConfirmationStore.settledPayments$,this.journeyInfos$=this.order$.pipe(Ie(this.language$),A(([I,f])=>this.getJourneyInformationLinks(I,f)),ee(I=>Tn(I.map(f=>this.httpClient.head(f.link).pipe(A(()=>f),ce(()=>K(void 0)))))),A(I=>I.filter(f=>!!f))),this.orderConfirmationStore.waitForTickets(T),this.ticketsPerMainItem$=this.orderConfirmationStore.ticketsPerMainItem$);});}startPayment(e){this.paymentService.startPayment(e.idURN);}ngOnDestroy(){this.cancellationRequestDialogRef?.close();}getJourneyInformationLinks(e,n){if(!e)return[];let o=e.journeys.flatMap(c=>[c.leg.departure.station?.countryURN,c.leg.arrival.station?.countryURN]).filter(c=>!!c).filter(c=>c!==jn.Switzerland),l=e.journeys.some(c=>c.leg.sections.some(T=>T.features?.includes(zn.NightTrain)))??!1,u=[...new Set(o)],p=gi[n].code,h=u.map(c=>({link:`assets/travel_info/${p}/travel_info_compr_${Xn(c)}.pdf`,text:"Reiseinformationen f\xFCr"+" "+this.countryPipe.transform(c)}));return l&&h.push({link:`assets/travel_info/${p}/travel_info_compr_nighttrain.pdf`,text:"Reiseinformationen f\xFCr Nachtz\xFCge"}),h;}hasJourneyInThePast(e){return e.journeys.some(n=>n.leg.departure.time?new Date(n.leg.departure.time)<new Date():!1);}showTrenitaliaCheckinLink(e){return e.journeys.flatMap(n=>n.leg.sections).some(Ct);}getOrderState(e){return e?this.orderStatusPipe.transform(e.state):"";}canViewTickets(e){return[L.Done,L.TicketBooking,L.OnlyPartialBooking,L.TicketCollection,L.DoneManually,L.Retrying,L.Payment,L.PaymentFailed,L.PaymentAborted,L.PendingManualBooking,L.TicketsReady,L.OnlyPartialBooking].includes(e.state);}static{this.ɵfac=function(n){return new(n||t)(m(V),m(Pt),m(Jn),m(Ft),m(Lt),m(wn),m(Li));};}static{this.ɵcmp=k({type:t,selectors:[["app-order-confirmation"]],standalone:!0,features:[W([V,Te,Lt]),G],decls:5,vars:6,consts:()=>{let e;e="Deine Bestellung";let n;n="Quittung";let o;o="bottom";let l;l="bottom";let u;u="Rechnung";let p;p="Hoppla, da hat etwas nicht geklappt";let h;h=" Gerne h\xE4tten wir dir hier deine Reise best\xE4tigt, aber ein unvorhergesehener Fehler macht uns einen Strich durch die Rechnung. Leider konnten wir deine Buchung nicht abschliessen. Sollte dir der Betrag bereits abgebucht worden sein, wird er dir nat\xFCrlich r\xFCckerstattet. ";let c;c="Damit du dennoch zu deinem Ziel kommst, versuche bitte erneut, die Reise zu buchen.";let T;T=" Zur Buchungsplattform ";let I;I="Hoppla, da hat etwas nicht geklappt";let f;f=" Bei deiner Buchung gab es einen unvorhergesehenen technischen Fehler. Das 
4ist aber keinen Grund zur Sorge. ";let S;S=" Unser Buchungsteam wird sich so schnell wie m\xF6glich um deine Reise k\xFCmmern und dir die Tickets innerhalb von den n\xE4chsten zwei Arbeitstagen per E-Mail zustellen. ";let N;N="Bis dahin bitten wir dich um etwas Geduld.";let z;z="Aufpreis bezahlen";let w;w="Hoppla, da mussten wir eingreifen";let Ge;Ge=" Bei deiner Buchung kam es zu unvorhergesehenen Komplikationen. Das ist aber kein Grund zur Sorge. ";let we;we=" Unser Buchungsteam hat deine Reise manuell bearbeitet. Dabei mussten wir aber einen Aufpreis feststellen. ";let Je;Je="Bitte begleiche den Aufpreis, um die Tickets freizuschalten.";let Be;Be="Ticket Box";let Ue;Ue="https://simpletrain.ch/regionaltickets-trenitalia";let Xe;Xe="Trenitalia: Check-in nicht vergessen!";let B;B="https://simpletrain.ch/erstattungen/";let Vt;Vt="Bestellungsoptionen";let Qt;Qt="R\xFCckerstattung anfragen";let Yt;Yt="Stornierung";let Kt;Kt="Stornierung ist erfolgt.";let Wt;Wt="Keine Stornierung m\xF6glich";let Zt;Zt=" Die Konditionen des Carriers erlauben zu diesem Zeitpunkt keine Stornierung mehr. ";let en;en=" Die Zeitr\xE4ume all deiner Reisen, in denen eine Stornierung m\xF6glich gewesen w\xE4re, sind leider bereits abgelaufen. ";let tn;tn="Diese Bestellung konnten wir bei uns nicht finden.";let nn;nn="\xDCbersicht";let on;on="Hinreise";let rn;rn="Abfahrt";let _n;_n="Ankunft";let an;an="Dauer";let ln;return ln="Reisende",[e,n,u,p,h,c,T,I,f,S,N,w,Ge,we,Je,Be,Xe,Vt,Yt,Kt,Wt,Zt,en,tn,nn,on,rn,_n,an,ln,[1,"flex","justify-content-center"],[1,"w-screen"],["class","w-11 m-auto mb-5 container",4,"ngrxLet"],[3,"visibleChange","visible"],[1,"w-11","m-auto","mb-5","container"],[1,"flex","flex-wrap","md:gap-3","align-items-center"],[1,"no-print"],["styleClass","no-print mb-3 md:mb-0 -mt-2 md:mt-2 text-xl px-3",3,"rounded","severity","value"],[1,"no-screen"],[1,"grid"],[1,"flex","flex-column","lg:flex-row","gap-4","w-full"],[1,"w-full","mb-3"],[1,"overview-box","w-full","lg:max-w-29rem"],[1,"shadow-2","py-4","px-3","no-print","mb-4"],[1,"mb-4"],["toggleLocation",o,"toggleLocationMobile",l,3,"headerShadowOnly","hideHr","hideHrMobile","shadow"],[1,"py-4","px-3","w-full","mb-3","shadow-2","no-print"],[1,"shadow-2","py-4","px-3"],[1,"text-xl","text-gray-600","uppercase"],[3,"order","settledPayments"],[1,"flex-1"],[3,"allOpen","isManualOrder","journeys","order"],["severity","warn","styleClass","w-full"],["pTemplate",""],[1,"font-bold"],[1,"flex","flex-wrap","gap-2"],[1,"p-button","no-underline","p-button-rounded",3,"routerLink"],["label",z,3,"onClick"],["class","pt-3",4,"ngrxLet"],[4,"ngrxLet"],[1,"pt-3"],[3,"isManualOrder","order","ticketsPerMainItem"],[1,"flex","flex-column","gap-3","mt-3"],["target","_blank","type","button",1,"flex","flex-row","align-items-center","text-primary","no-underline",3,"href"],["href",Ue,"target","_blank","type","button",1,"flex","flex-row","align-items-center","text-primary","no-underline"],["name","download",1,"icon","mr-2"],[1,"pl-0","p-button-icon-only-on-sm","p-button","p-button-text"],["name","externalLink",1,"icon","mr-2"],[1,"pl-0","p-button","p-button-text"],["header","",1,"pt-4","px-3","w-full","mb-3","no-print"],[3,"order"],["toggle-button-text","",1,"text-sm","mt-auto","mb-auto"],["content","",1,"w-full","mb-4","py-5","no-print","flex","justify-content-center"],["href",B],["label",Qt,3,"hideLabelOnSmall","secondary"],[1,"w-full","mt-5","no-print"],[1,"text-gray-600","uppercase","text-xl","mb-3","mt-4"],[1,"col-12","md:col-4"],[1,"text-xl","text-600","uppercase"],[1,"mt-2","flex","gap-2","flex-column"],[1,"w-6rem"],[1,"w-12rem"],[1,"col-12","md:col-7"],[1,"w-6rem","text-600","text-sm","uppercase"],[1,"grid","mt-2"],[1,"col-3","text-600","text-sm","uppercase"],[1,"col-3","-mt-3"]];},template:function(n,o){n&1&&(R(0,"app-header"),r(1,"main",30)(2,"div",31),C(3,fa,10,4,"div",32),i()(),r(4,"app-feedback-form",33),Pe("visibleChange",function(u){return Me(o.feedbackFormVisible,u)||(o.feedbackFormVisible=u),u;}),i()),n&2&&(a(3),O("ngrxLet",Fn(2,Q_,o.order$,o.language$,o.settledPayments$)),a(),he("visible",o.feedbackFormVisible));},dependencies:[pe,zi,uo,so,Co,ne,At,It,ae,Z,dt,mi,pi,yn,te,Fe,Ro,lt,po,Dt,To,Ci,ui,Ri],styles:[`@media print{.content[_ngcontent-%COMP%]{flex-direction:column!important}.overview-box[_ngcontent-%COMP%]{max-width:unset}}.icon[_ngcontent-%COMP%]{height:1.5em;width:1.5em}
5/*# sourceMappingURL=order-confirmation.component-GVY4XZYI.css.map */`],changeDetection:0});}}return t;})();
5var Bd=[{path:":orderUrn",component:Ht},{path:"",component:Ht}];export{Bd as routes};/**i18n:2f7b2c0147d28c52e1146cd220e0be380b4f41013f2652df72d5da41ba24c77f*///# sourceMappingURL=chunk-ZNTB6PNM.js.map
6//# debugId=f42a04cc-869e-56a2-97f6-20a04186beb1

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.