-
Notifications
You must be signed in to change notification settings - Fork 0
/
4586.16ba6252d2cbfca8.js
1 lines (1 loc) · 72.8 KB
/
4586.16ba6252d2cbfca8.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[4586],{89701:(Y,k,u)=>{u.d(k,{N:()=>A});const A=T=>{if(T<60)return`${T}p`;const P=Math.floor(T/60);return`${P}h ${T-60*P}p`}},80751:(Y,k,u)=>{u.d(k,{A:()=>A});const A=T=>{switch(T){case"MALE":return"MR";case"FEMALE":return"MS";default:return""}}},97218:(Y,k,u)=>{u.d(k,{X:()=>S});var A=u(36895),T=u(37094),P=u(83700),D=u(27898),w=u(72506),v=u(44143),o=u(94650),I=u(97579);function l(C,x){if(1&C){const _=o.EpF();o.TgZ(0,"button",17),o.NdJ("click",function(){o.CHM(_);const p=o.oxw().$implicit,E=o.oxw();return o.KtG(E.onFareTypeExpand(p))}),o._uU(1," Xem th\xeam "),o._UZ(2,"cf-icon",18),o.qZA()}}function U(C,x){if(1&C){const _=o.EpF();o.TgZ(0,"button",17),o.NdJ("click",function(){o.CHM(_);const p=o.oxw().$implicit,E=o.oxw();return o.KtG(E.onFareTypeColab(p))}),o._uU(1," \u1ea8n b\u1edbt "),o._UZ(2,"cf-icon",19),o.qZA()}}const B=function(C){return{"bg-[#FCB40A] text-neutral-white":C}};function Z(C,x){if(1&C){const _=o.EpF();o.TgZ(0,"div",22),o.NdJ("click",function(){const E=o.CHM(_).$implicit,g=o.oxw(2).$implicit,y=o.oxw();return o.KtG(y.onToggleFareSelected(g,E))}),o._uU(1),o.qZA()}if(2&C){const _=x.$implicit;o.Q6J("ngClass",o.VKq(2,B,_.isActive)),o.xp6(1),o.hij(" ",_.name," ")}}function b(C,x){if(1&C&&(o.TgZ(0,"div",20),o.YNc(1,Z,2,4,"div",21),o.qZA()),2&C){const _=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",_.fareClass)}}function N(C,x){if(1&C){const _=o.EpF();o.TgZ(0,"div")(1,"div",12)(2,"cf-checkbox",5),o.NdJ("checkChange",function(p){const g=o.CHM(_).$implicit,y=o.oxw();return o.KtG(y.onFareTypeSelectedChange(p,g))}),o.TgZ(3,"div",13),o._uU(4),o.TgZ(5,"span",14),o._uU(6),o.qZA()()(),o.YNc(7,l,3,0,"button",15),o.YNc(8,U,3,0,"button",15),o.qZA(),o.YNc(9,b,2,1,"div",16),o.qZA()}if(2&C){const _=x.$implicit;o.xp6(2),o.Q6J("checked",_.isActive),o.xp6(2),o.hij(" ",_.name," "),o.xp6(2),o.AsE("(",_.fareTypeSelected||0,"/",_.totalFareType,")"),o.xp6(1),o.Q6J("ngIf",!_.isExpand),o.xp6(1),o.Q6J("ngIf",_.isExpand),o.xp6(1),o.Q6J("ngIf",_.isExpand)}}let S=(()=>{class C{constructor(_,m,p){this.ref=_,this.bottomSheetRef=m,this.bottomSheetData=p,this.listFareTypeOptions=[],this.listFareTypeOptionsSource=[],_&&(this.listFareTypeOptionsSource=_.data.listFareTypeOptions,this.selectedAll=_.data.selectedAll,this.listFareTypeOptions=Object.assign({},_.data.listFareTypeOptionsSource)),p&&(this.listFareTypeOptionsSource=p.listFareTypeOptions,this.selectedAll=p.selectedAll),this.listFareTypeOptions=this.listFareTypeOptionsSource.map(E=>Object.assign(Object.assign({},E),{fareClass:E.fareClass.map(g=>Object.assign({},g))}))}reset(){this.listFareTypeOptions=this.listFareTypeOptionsSource.map(_=>Object.assign(Object.assign({},_),{isActive:!1,isAllFareClass:!1,fareTypeSelected:0,fareClass:_.fareClass.map(m=>Object.assign(Object.assign({},m),{isActive:!1}))})),this.selectedAll=!1}close(){this.ref&&this.ref.close(this.listFareTypeOptionsSource),this.bottomSheetData&&this.bottomSheetRef.dismiss(this.listFareTypeOptionsSource)}submit(){this.listFareTypeOptionsSource=this.listFareTypeOptions,this.ref&&this.ref.close(this.listFareTypeOptionsSource),this.bottomSheetData&&this.bottomSheetRef.dismiss(this.listFareTypeOptionsSource)}onSelectAllChange(_){this.listFareTypeOptions.forEach(m=>{m.isActive=_,m.isAllFareClass=_,m.fareClass.forEach(p=>{p.isActive=_})}),this.computeFareSelected()}onFareTypeSelectedChange(_,m){if(m.isActive=_,m.isAllFareClass=_,m.fareClass.forEach(p=>p.isActive=_),_){const p=this.listFareTypeOptions.every(E=>E.isActive);this.selectedAll=p}else this.selectedAll=!1;this.computeFareSelected()}onToggleFareSelected(_,m){m.isActive=!m.isActive;const p=_.fareClass.every(g=>g.isActive);_.isActive=_.fareClass.some(g=>g.isActive),_.isAllFareClass=p;const E=this.listFareTypeOptions.every(g=>g.isActive);this.selectedAll=E,this.computeFareSelected()}computeFareSelected(){this.listFareTypeOptions.forEach(_=>{_.fareTypeSelected=_.fareClass.filter(m=>m.isActive).length})}onFareTypeExpand(_){this.listFareTypeOptions.forEach(m=>{m.isExpand=m.code===_.code})}onFareTypeColab(_){_.isExpand=!1}}return C.\u0275fac=function(_){return new(_||C)(o.Y36(I.gb,8),o.Y36(T.Zu,8),o.Y36(T.Rr,8))},C.\u0275cmp=o.Xpm({type:C,selectors:[["lowfare-option-modal"]],standalone:!0,features:[o.jDz],decls:20,vars:2,consts:[[1,"w-[700px]","max-h-[600px]","overflow-hidden","rounded-lg","bg-neutral-white","flex","flex-col","md:w-screen","md:max-h-none","md:h-full","md:justify-between","md:rounded-none"],[1,"flex","justify-between","items-center","px-6","py-[13px]","md:hidden"],[1,"text-heading-xs","text-neutral-black"],["size","medium","icon","close",1,"text-neutral-gray-4","cursor-pointer",3,"click"],[1,"px-6","py-[13px]","border-b","border-neutral-gray-1"],["size","medium",3,"checked","checkChange"],[1,"w-full","h-full","flex-1","overflow-auto","flex","flex-col"],[4,"ngFor","ngForOf"],[1,"w-full","p-6","flex","justify-end","gap-x-2","md:justify-between"],["cf-button","","size","medium","type","secondary",1,"justify-center","md:w-full",3,"click"],["cf-button","","size","medium","type","secondary",1,"justify-center","hidden","md:flex","md:w-full",3,"click"],["cf-button","","size","medium","color","primary-1",1,"justify-center","md:w-full",3,"click"],[1,"w-full","flex","justify-between","py-4","px-6"],[1,"text-body-md-long"],[1,"text-express-md"],["class","flex !pt-2 !outline-none !outline-transparent !text-express-md !text-blue-4 bottom-0 gap-x-2 items-center text-center","type","secondary",3,"click",4,"ngIf"],["class","flex flex-wrap gap-2 p-2 px-6 justify-start items-center",4,"ngIf"],["type","secondary",1,"flex","!pt-2","!outline-none","!outline-transparent","!text-express-md","!text-blue-4","bottom-0","gap-x-2","items-center","text-center",3,"click"],["size","small","icon","chevron_down"],["size","small","icon","chevron_up"],[1,"flex","flex-wrap","gap-2","p-2","px-6","justify-start","items-center"],["class","ml-1 mr-1 bg-[#F2F2F2] text-espressive-md p-2 text-center cursor-pointer rounded",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"ml-1","mr-1","bg-[#F2F2F2]","text-espressive-md","p-2","text-center","cursor-pointer","rounded",3,"ngClass","click"]],template:function(_,m){1&_&&(o.TgZ(0,"div",0)(1,"div",1)(2,"div",2),o._uU(3,"Ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n"),o.qZA(),o.TgZ(4,"cf-icon",3),o.NdJ("click",function(){return m.close()}),o.qZA()(),o.TgZ(5,"div",4)(6,"cf-checkbox",5),o.NdJ("checkChange",function(E){return m.onSelectAllChange(E)}),o._uU(7," Ch\u1ecdn t\u1ea5t c\u1ea3 "),o.qZA()(),o.TgZ(8,"div",6),o.YNc(9,N,10,7,"div",7),o.qZA(),o.TgZ(10,"div",8)(11,"button",9),o.NdJ("click",function(){return m.close()}),o.TgZ(12,"span"),o._uU(13,"H\u1ee7y"),o.qZA()(),o.TgZ(14,"button",10),o.NdJ("click",function(){return m.reset()}),o.TgZ(15,"span"),o._uU(16,"\u0110\u1eb7t l\u1ea1i"),o.qZA()(),o.TgZ(17,"button",11),o.NdJ("click",function(){return m.submit()}),o.TgZ(18,"span"),o._uU(19,"X\xe1c nh\u1eadn"),o.qZA()()()()),2&_&&(o.xp6(6),o.Q6J("checked",m.selectedAll),o.xp6(3),o.Q6J("ngForOf",m.listFareTypeOptions))},dependencies:[A.ez,A.mk,A.sg,A.O5,w.AxE,w.Sm8,D.u,v.j$,P.N8,P.Xq],encapsulation:2}),C})()},44586:(Y,k,u)=>{u.d(k,{g:()=>je});var A=u(36895),T=u(24006),P=u(83700),D=u(88516),w=u(72853),v=u(72506),o=u(44143),I=u(4688),l=u(74891),U=u(74713),B=u(76331),Z=u(67460),b=u(62163),N=u(53820),S=u(38514),C=u(80751),x=u(15439),m=u(77296),p=u(77579),E=u(78372),g=u(28746),y=u(89701),F=u(52013),M=u(61545),Q=u(97218),J=u(37094),e=u(94650),K=u(97579),$=u(82761),V=u(70800),W=u(62733),j=u(77492),z=u(9381);function G(i,c){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"tooltip-available-slot",39),e.qZA()),2&i){const t=e.oxw(3),n=e.MAs(12);e.xp6(1),e.Q6J("availableSlotData",t.availableSlotData)("content",n)}}function X(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","M\xe3 canh v\xe9 kh\xf4ng h\u1ee3p l\u1ec7")}function ee(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","M\xe3 canh v\xe9 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng.")}function te(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",31)(1,"div",32)(2,"div",33),e._UZ(3,"cf-icon",34),e.TgZ(4,"span",35),e._uU(5,"M\xe3 \u0111\u1eb7t ch\u1ed7 mu\u1ed1n canh v\xe9"),e.qZA()(),e.YNc(6,G,2,2,"div",10),e.qZA(),e.TgZ(7,"cf-select",36),e.NdJ("onSearch",function(r){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onSearchValueChange(r))})("selectedChange",function(r){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onSelectedPnr(r))}),e._UZ(8,"cf-icon",37),e.YNc(9,X,1,1,"cf-hint",38),e.YNc(10,ee,1,1,"cf-hint",38),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(6),e.Q6J("ngIf",t.availableInfo),e.xp6(1),e.Q6J("status",t.registerOrderForm.controls.bookingCode.invalid&&(t.registerOrderForm.controls.bookingCode.dirty||t.registerOrderForm.controls.bookingCode.touched)?"error":"default")("data",t.pnrSuggestOptions)("placeholder","M\xe3 \u0111\u1eb7t ch\u1ed7 mu\u1ed1n canh v\xe9")("formControl",t.registerOrderForm.controls.bookingCode)("allowSearch",!0)("isEmpty",t.isDataEmpty),e.xp6(2),e.Q6J("ngIf",(null==t.registerOrderForm.controls.bookingCode.errors?null:t.registerOrderForm.controls.bookingCode.errors.invalid)&&(t.registerOrderForm.controls.bookingCode.dirty||t.registerOrderForm.controls.bookingCode.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.registerOrderForm.controls.bookingCode.errors?null:t.registerOrderForm.controls.bookingCode.errors.required)&&(t.registerOrderForm.controls.bookingCode.dirty||t.registerOrderForm.controls.bookingCode.touched))}}function ie(i,c){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"tooltip-available-slot",39),e.qZA()),2&i){const t=e.oxw(3),n=e.MAs(12);e.xp6(1),e.Q6J("availableSlotData",t.availableSlotData)("content",n)}}function re(i,c){if(1&i&&(e.TgZ(0,"div",31)(1,"div",32)(2,"div",33),e._UZ(3,"cf-icon",34),e.TgZ(4,"span",35),e._uU(5,"M\xe3 \u0111\u1eb7t ch\u1ed7 mu\u1ed1n canh v\xe9"),e.qZA()(),e.YNc(6,ie,2,2,"div",10),e.qZA(),e.TgZ(7,"div",41),e._uU(8),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(6),e.Q6J("ngIf",t.availableInfo),e.xp6(2),e.Oqu(t.pnrOrderData.bookingCode)}}function ne(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","Ng\xe0y kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng.")}function oe(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",69)(1,"div",70),e.NdJ("scrolled",function(){e.CHM(t);const r=e.oxw(3);return e.KtG(r.scrollDown())}),e._UZ(2,"cf-datepicker-inline",71),e.qZA(),e.TgZ(3,"div",72)(4,"div",73)(5,"button",74),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(3);return e.KtG(r.onCloseDatePicker())}),e._uU(6,"H\u1ee7y"),e.qZA(),e.TgZ(7,"button",75),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(3);return e.KtG(r.onMobileDatePickerOK())}),e._uU(8,"X\xe1c nh\u1eadn"),e.qZA()()()()}if(2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("infiniteScrollDistance",2)("infiniteScrollThrottle",300)("infiniteScrollUpDistance",2)("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0)("infiniteScrollContainer",".ngb-dp-content"),e.xp6(1),e.Q6J("minDate",t.minDate)("displayMonths",t.numOfMonth)("rangeSelection",!0)("secondaryCalendar","lunar")("formControl",t.registerOrderForm.controls.dayExpire)("maxDate",t.maxDate)("fromDate",t.registerOrderForm.controls.dayExpire.value)("displayMonthsOffset",0),e.xp6(5),e.Q6J("disabled",null==t.registerOrderForm?null:t.registerOrderForm.controls.dayExpire.invalid)}}function se(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","Gi\u1edd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng.")}function ae(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","Gi\u1edd k\u1ebft th\xfac kh\xf4ng h\u1ee3p l\u1ec7.")}function le(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","M\u1ee9c gi\xe1 mong mu\u1ed1n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng.")}function ce(i,c){1&i&&e._UZ(0,"cf-hint",40),2&i&&e.Q6J("hint","Gi\xe1 tr\u1ecb t\u1ed1i thi\u1ec3u l\xe0 1\u0111")}function de(i,c){if(1&i&&(e._UZ(0,"cf-hint",40),e.ALo(1,"number")),2&i){const t=e.oxw(4);e.Q6J("hint","Gi\xe1 tr\u1ecb t\u1ed1i \u0111a l\xe0 "+e.lcZ(1,1,t.totalFare)+" \u0111"||0)}}function ue(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",76)(1,"cf-input-group",77)(2,"label",78),e._uU(3,"Ch\u1ec9 canh gi\xe1 v\xe9 (c\u1ee7a 1 ng\u01b0\u1eddi l\u1edbn \u0111\u1ea1i di\u1ec7n) gi\u1ea3m th\u1ea5p h\u01a1n ho\u1eb7c b\u1eb1ng m\u1ee9c d\u01b0\u1edbi \u0111\xe2y"),e.qZA(),e.TgZ(4,"cf-input-number",79),e.NdJ("ngModelChange",function(r){e.CHM(t);const a=e.oxw(3);return e.KtG(a.checkDirtyNumber("targetPrice",r))}),e.qZA(),e.YNc(5,le,1,1,"cf-hint",38),e.YNc(6,ce,1,1,"cf-hint",38),e.YNc(7,de,2,3,"cf-hint",38),e.qZA()()}if(2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("status",t.registerOrderForm.controls.targetPrice.invalid&&(t.registerOrderForm.controls.targetPrice.dirty||t.registerOrderForm.controls.targetPrice.touched)?"error":"default"),e.xp6(3),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c gi\xe1 t\u1ed1i \u0111a mu\u1ed1n canh (gi\xe1 v\xe9 c\u1ee7a 1 ng\u01b0\u1eddi l\u1edbn \u0111\u1ea1i di\u1ec7n)")("decimal",!1)("negative",!1)("formControl",t.registerOrderForm.controls.targetPrice),e.xp6(1),e.Q6J("ngIf",(null==t.registerOrderForm.controls.targetPrice.errors?null:t.registerOrderForm.controls.targetPrice.errors.required)&&(t.registerOrderForm.controls.targetPrice.dirty||t.registerOrderForm.controls.targetPrice.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.registerOrderForm.controls.targetPrice.errors?null:t.registerOrderForm.controls.targetPrice.errors.minAmount)&&(t.registerOrderForm.controls.targetPrice.dirty||t.registerOrderForm.controls.targetPrice.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.registerOrderForm.controls.targetPrice.errors?null:t.registerOrderForm.controls.targetPrice.errors.maxAmount)&&(t.registerOrderForm.controls.targetPrice.dirty||t.registerOrderForm.controls.targetPrice.touched))}}function _e(i,c){1&i&&(e.TgZ(0,"div",85),e._uU(1," Ch\u1ecdn h\xe3ng bay mong mu\u1ed1n "),e.qZA())}function pe(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",90)(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"cf-icon",91),e.NdJ("click",function(r){e.CHM(t);const a=e.oxw().$implicit,h=e.oxw(5);return e.KtG(h.onRemoveFareTypeOption(r,a))}),e.qZA()()}if(2&i){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",t.name," ")}}function ge(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",90)(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"cf-icon",91),e.NdJ("click",function(r){e.CHM(t);const a=e.oxw().$implicit,h=e.oxw(6);return e.KtG(h.onRemoveFareClassOption(r,a))}),e.qZA()()}if(2&i){const t=e.oxw().$implicit,n=e.oxw().$implicit;e.xp6(2),e.AsE(" ",n.name," - ",t.name," ")}}function he(i,c){if(1&i&&(e.ynx(0),e.YNc(1,ge,4,2,"div",88),e.BQk()),2&i){const t=c.$implicit,n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",!n.isAllFareClass&&t.isActive)}}function fe(i,c){if(1&i&&(e.ynx(0,33),e.YNc(1,pe,4,1,"div",88),e.YNc(2,he,2,1,"ng-container",89),e.BQk()),2&i){const t=c.$implicit;e.xp6(1),e.Q6J("ngIf",t.isAllFareClass),e.xp6(1),e.Q6J("ngForOf",t.fareClass)}}function me(i,c){if(1&i&&(e.TgZ(0,"div",86),e.YNc(1,fe,3,2,"ng-container",87),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngForOf",t.listFareTypeOptions)}}function ve(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",80),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(3);return e.KtG(r.openFareOptions())}),e.TgZ(2,"div",81),e.YNc(3,_e,2,0,"div",82),e.YNc(4,me,2,1,"div",83),e.qZA(),e._UZ(5,"cf-icon",84),e.qZA()()}if(2&i){const t=e.oxw(3);e.xp6(3),e.Q6J("ngIf",!t.registerOrderForm.value.specifyFareClass),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.specifyFareClass)}}function xe(i,c){1&i&&e._UZ(0,"cf-icon",92)}function Ee(i,c){1&i&&e._UZ(0,"cf-icon",93)}function Te(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",94)(1,"div",95)(2,"div",33),e._UZ(3,"cf-icon",96),e.TgZ(4,"span",35),e._uU(5,"Th\xf4ng b\xe1o"),e.qZA()(),e.TgZ(6,"cf-switch",97),e.NdJ("checkedChange",function(r){e.CHM(t);const a=e.oxw(3);return e.KtG(a.onCheckNotify(r))}),e.qZA()(),e.TgZ(7,"div",98),e._uU(8,"Th\xf4ng b\xe1o s\u1eafp h\u1ebft h\u1ea1n canh v\xe9 tr\u01b0\u1edbc 15 ph\xfat"),e.qZA()()}if(2&i){const t=e.oxw(3);e.xp6(6),e.Q6J("disabled",t.notifyExpired)("checked",t.registerOrderForm.value.notifyBeforeExpired)}}const H=function(){return[]};function Oe(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",11),e._UZ(1,"div",42),e.TgZ(2,"div",11)(3,"div",31)(4,"div",43)(5,"div",33),e._UZ(6,"cf-icon",44),e.TgZ(7,"span",35),e._uU(8,"Th\u1eddi h\u1ea1n canh v\xe9"),e.qZA()(),e.TgZ(9,"cf-label",45),e._uU(10),e.ALo(11,"date"),e.qZA()(),e.TgZ(12,"div",46)(13,"cf-input-group",47),e._UZ(14,"cf-icon",48),e.TgZ(15,"input",49,50),e.NdJ("input",function(){e.CHM(t);const r=e.MAs(16);return e.KtG(r.close())})("dateSelect",function(r){e.CHM(t);const a=e.MAs(16);return e.oxw(2).onDateSelected(r),e.KtG(a.close())})("click",function(){e.CHM(t);const r=e.MAs(19),a=e.oxw(2);return e.KtG(a.expireDatePickerClick(r))})("mousedown",function(r){e.CHM(t);const a=e.oxw(2);return e.KtG(a.expireDateFocus(r))}),e.qZA(),e.YNc(17,ne,1,1,"cf-hint",38),e.qZA(),e.YNc(18,oe,9,16,"ng-template",null,51,e.W1O),e.TgZ(20,"div",52)(21,"cf-select",53),e.NdJ("selectedChange",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onSelectedTimeExpire())}),e._UZ(22,"cf-icon",54),e.YNc(23,se,1,1,"cf-hint",38),e.YNc(24,ae,1,1,"cf-hint",38),e.qZA()()()()(),e._UZ(25,"div",55),e.TgZ(26,"div",31)(27,"div",56)(28,"div",33),e._UZ(29,"cf-icon",57),e.TgZ(30,"span",35),e._uU(31,"Canh theo gi\xe1"),e.qZA()(),e.TgZ(32,"div",58),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onChangePrice())}),e._UZ(33,"cf-switch",59),e.qZA()(),e.YNc(34,ue,8,8,"div",60),e.qZA(),e._UZ(35,"div",55),e.TgZ(36,"div",31)(37,"div",56)(38,"div")(39,"div",33),e._UZ(40,"cf-icon",61),e.TgZ(41,"span",35),e._uU(42,"Ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n"),e.qZA()()(),e.TgZ(43,"div",58),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onChangeLowFare())}),e._UZ(44,"cf-switch",59),e.qZA()(),e.YNc(45,ve,6,2,"div",10),e.qZA(),e._UZ(46,"div",55),e.TgZ(47,"div",62)(48,"div",63),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onExpandConfig())}),e.TgZ(49,"div"),e._UZ(50,"cf-icon",64),e.qZA(),e.TgZ(51,"div",65),e._uU(52,"C\xe0i \u0111\u1eb7t n\xe2ng cao"),e.qZA(),e.TgZ(53,"div"),e.YNc(54,xe,1,0,"cf-icon",66),e.YNc(55,Ee,1,0,"cf-icon",67),e.qZA()(),e.YNc(56,Te,9,2,"div",68),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(9),e.Q6J("color","gray-2")("size","small"),e.xp6(1),e.hij(" Ch\u1ec9 \u0111\u01b0\u1ee3c ch\u1ecdn th\u1eddi h\u1ea1n \u0111\u1ebfn ",t.timeExpire?e.xi3(11,24,t.timeExpire,"dd/MM/yyyy HH:mm"):""," "),e.xp6(3),e.Q6J("status",t.registerOrderForm.controls.dayExpire.invalid&&(t.registerOrderForm.controls.dayExpire.dirty||t.registerOrderForm.controls.dayExpire.touched)?"error":"default"),e.xp6(2),e.Q6J("secondaryCalendar","lunar")("displayMonths",1)("minDate",t.minDate)("maxDate",t.maxDate)("formControl",t.registerOrderForm.controls.dayExpire),e.xp6(2),e.Q6J("ngIf",(null==t.registerOrderForm.controls.dayExpire.errors?null:t.registerOrderForm.controls.dayExpire.errors.required)&&(t.registerOrderForm.controls.dayExpire.dirty||t.registerOrderForm.controls.dayExpire.touched)),e.xp6(4),e.Q6J("status",t.registerOrderForm.controls.hoursExpire.invalid&&(t.registerOrderForm.controls.hoursExpire.dirty||t.registerOrderForm.controls.hoursExpire.touched)?"error":"default")("data",t.timeOption||e.DdM(27,H))("placeholder","Ch\u1ecdn gi\u1edd k\u1ebft th\xfac")("allowSearch",!0)("formControl",t.registerOrderForm.controls.hoursExpire),e.xp6(2),e.Q6J("ngIf",(null==t.registerOrderForm.controls.hoursExpire.errors?null:t.registerOrderForm.controls.hoursExpire.errors.required)&&(t.registerOrderForm.controls.hoursExpire.dirty||t.registerOrderForm.controls.hoursExpire.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.registerOrderForm.controls.hoursExpire.errors?null:t.registerOrderForm.controls.hoursExpire.errors.illegal)&&(t.registerOrderForm.controls.hoursExpire.dirty||t.registerOrderForm.controls.hoursExpire.touched)),e.xp6(9),e.Q6J("checked",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.PRICE),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.PRICE),e.xp6(10),e.Q6J("checked",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.FARE),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.FARE),e.xp6(9),e.Q6J("ngIf",!t.isExpand),e.xp6(1),e.Q6J("ngIf",t.isExpand),e.xp6(1),e.Q6J("ngIf",t.isExpand)}}function Ce(i,c){if(1&i&&(e.TgZ(0,"div",11)(1,"div",12)(2,"div",13)(3,"div",14),e._UZ(4,"cf-icon",15)(5,"div",16),e.qZA(),e.TgZ(6,"div",17)(7,"div",18),e._uU(8,"Gi\u1eef ch\u1ed7"),e.qZA(),e.TgZ(9,"div",19),e._uU(10,"Gi\u1eef ch\u1ed7 th\xe0nh c\xf4ng"),e.qZA()()(),e.TgZ(11,"div",20)(12,"div",21),e._uU(13," 2 "),e._UZ(14,"div",22),e.qZA(),e.TgZ(15,"div",23)(16,"div",24),e._uU(17,"Canh v\xe9 r\u1ebb"),e.qZA(),e.TgZ(18,"div",25),e._uU(19,"T\u1ea1o y\xeau c\u1ea7u canh v\xe9 r\u1ebb"),e.qZA()()(),e.TgZ(20,"div",20)(21,"div",26),e._uU(22," 3 "),e._UZ(23,"div",27),e.qZA(),e.TgZ(24,"div",28)(25,"div",24),e._uU(26,"Theo d\xf5i"),e.qZA(),e.TgZ(27,"div",25),e._uU(28,"Theo d\xf5i bi\u1ebfn \u0111\u1ed9ng gi\xe1"),e.qZA()()(),e.TgZ(29,"div",20)(30,"div",29),e._uU(31," 4 "),e.qZA(),e.TgZ(32,"div",28)(33,"div",24),e._uU(34,"H\u1ebft h\u1ea1n"),e.qZA(),e.TgZ(35,"div",25),e._uU(36,"C\xf3 th\u1ec3 h\u1ee7y b\u1ea5t k\xec l\xfac n\xe0o"),e.qZA()()()(),e.YNc(37,te,11,9,"div",30),e.YNc(38,re,9,2,"div",30),e.YNc(39,Oe,57,28,"div",5),e.qZA()),2&i){const t=e.oxw();e.xp6(37),e.Q6J("ngIf",t.isSuggest),e.xp6(1),e.Q6J("ngIf",!t.isSuggest),e.xp6(1),e.Q6J("ngIf",null==t.pnrOrderData?null:t.pnrOrderData.bookingCode)}}function ye(i,c){if(1&i&&(e.ynx(0),e.TgZ(1,"div",118)(2,"div",119)(3,"div",120),e._uU(4),e.qZA()(),e.TgZ(5,"div",121),e._UZ(6,"img",122),e.qZA(),e.TgZ(7,"div",123)(8,"div",124),e._uU(9),e.qZA(),e.TgZ(10,"div",125),e._uU(11),e.qZA()(),e.TgZ(12,"div",123)(13,"div",124),e._uU(14),e.qZA(),e.TgZ(15,"div",125),e._uU(16),e.qZA()(),e.TgZ(17,"div",123)(18,"div",124),e._uU(19),e.qZA(),e.TgZ(20,"div",125),e._uU(21),e.qZA()(),e.TgZ(22,"div",126)(23,"div",127)(24,"div"),e._uU(25),e.qZA(),e.TgZ(26,"div",128),e._UZ(27,"div",129)(28,"div",130),e.qZA(),e.TgZ(29,"div"),e._uU(30),e.qZA()(),e.TgZ(31,"div"),e._UZ(32,"cf-icon",131),e.qZA()(),e.TgZ(33,"div",123)(34,"div",124),e._uU(35),e.qZA(),e.TgZ(36,"div",125),e._uU(37),e.qZA()()(),e.TgZ(38,"div",132)(39,"div",133)(40,"div",128)(41,"div",120),e._uU(42),e.qZA()(),e.TgZ(43,"div",121),e._UZ(44,"img",122),e.qZA(),e.TgZ(45,"div",134)(46,"div",124),e._uU(47),e.qZA(),e.TgZ(48,"div",125),e._uU(49),e.qZA()(),e.TgZ(50,"div",123)(51,"div",124),e._uU(52),e.qZA(),e.TgZ(53,"div",125),e._uU(54),e.qZA()()(),e.TgZ(55,"div",135)(56,"div",123)(57,"div",124),e._uU(58),e.qZA(),e.TgZ(59,"div",125),e._uU(60),e.qZA()(),e.TgZ(61,"div",126)(62,"div",127)(63,"div"),e._uU(64),e.qZA(),e.TgZ(65,"div",128),e._UZ(66,"div",129)(67,"div",136),e.qZA(),e.TgZ(68,"div"),e._uU(69,"Bay th\u1eb3ng"),e.qZA()(),e.TgZ(70,"div"),e._UZ(71,"cf-icon",131),e.qZA()(),e.TgZ(72,"div",123)(73,"div",124),e._uU(74),e.qZA(),e.TgZ(75,"div",125),e._uU(76),e.qZA()()()(),e.BQk()),2&i){const t=c.$implicit,n=c.index;e.xp6(4),e.hij(" ",n+1," "),e.xp6(2),e.Q6J("src",t.airlineLogo,e.LSH),e.xp6(3),e.Oqu(t.flightNumber),e.xp6(2),e.Oqu(t.airlineName),e.xp6(3),e.Oqu(t.departure),e.xp6(2),e.Oqu(t.fareClass),e.xp6(3),e.Oqu(t.startTime),e.xp6(2),e.Oqu(t.startPoint),e.xp6(4),e.Oqu(t.durationStr),e.xp6(5),e.Oqu(t.departure),e.xp6(5),e.Oqu(t.endTime),e.xp6(2),e.Oqu(t.endPoint),e.xp6(5),e.hij(" ",n+1," "),e.xp6(2),e.Q6J("src",t.airlineLogo,e.LSH),e.xp6(3),e.Oqu(t.flightNumber),e.xp6(2),e.Oqu(t.airlineName),e.xp6(3),e.Oqu(t.departure),e.xp6(2),e.Oqu(t.fareClass),e.xp6(4),e.Oqu(t.startTime),e.xp6(2),e.Oqu(t.startPoint),e.xp6(4),e.Oqu(t.durationStr),e.xp6(10),e.Oqu(t.endTime),e.xp6(2),e.Oqu(t.endPoint)}}function be(i,c){1&i&&e._UZ(0,"div",55)}function Ae(i,c){if(1&i&&(e.TgZ(0,"div",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.lnq(" (",t.child.namePrefix,") ",null==t.child?null:t.child.displayName," - ",null==t.child?null:t.child.birthDay," ")}}function Fe(i,c){if(1&i&&(e.ynx(0),e.YNc(1,be,1,0,"div",137),e.TgZ(2,"div",138)(3,"div",24),e._uU(4),e.qZA(),e.TgZ(5,"div",139)(6,"div",24),e._uU(7),e.qZA(),e.YNc(8,Ae,2,3,"div",140),e.qZA()(),e.BQk()),2&i){const t=c.$implicit,n=c.index,r=c.first;e.xp6(1),e.Q6J("ngIf",!r),e.xp6(3),e.hij("",n+1,"."),e.xp6(3),e.AsE("(",t.namePrefix,") ",t.displayName,""),e.xp6(1),e.Q6J("ngIf",t.child)}}function De(i,c){if(1&i&&(e.TgZ(0,"div",90)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",t.name," ")}}function Ze(i,c){if(1&i&&(e.TgZ(0,"div",90)(1,"span"),e._uU(2),e.qZA()()),2&i){const t=e.oxw().$implicit,n=e.oxw().$implicit;e.xp6(2),e.AsE(" ",n.name," - ",t.name," ")}}function Pe(i,c){if(1&i&&(e.ynx(0),e.YNc(1,Ze,3,2,"div",88),e.BQk()),2&i){const t=c.$implicit,n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",!n.isAllFareClass&&t.isActive)}}function ke(i,c){if(1&i&&(e.ynx(0,33),e.YNc(1,De,3,1,"div",88),e.YNc(2,Pe,2,1,"ng-container",89),e.BQk()),2&i){const t=c.$implicit;e.xp6(1),e.Q6J("ngIf",t.isAllFareClass),e.xp6(1),e.Q6J("ngForOf",t.fareClass)}}function Se(i,c){if(1&i&&(e.TgZ(0,"div",86),e.YNc(1,ke,3,2,"ng-container",87),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.listFareTypeOptions)}}function Me(i,c){1&i&&(e.TgZ(0,"span"),e._uU(1,"B\u1ea5t k\xec"),e.qZA())}function Re(i,c){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,t.registerOrderForm.value.targetPrice)," \u0111 ")}}function we(i,c){1&i&&(e.TgZ(0,"span"),e._uU(1,"B\u1ea5t k\xec"),e.qZA())}function Ie(i,c){1&i&&(e.TgZ(0,"div",107)(1,"div",108),e._uU(2,"Th\xf4ng b\xe1o s\u1eafp h\u1ebft h\u1ea1n: "),e.qZA(),e.TgZ(3,"div",109),e._uU(4," Th\xf4ng b\xe1o tr\u01b0\u1edbc 15 ph\xfat tr\u01b0\u1edbc khi h\u1ebft h\u1ea1n canh v\xe9 "),e.qZA()())}function Ue(i,c){1&i&&(e.TgZ(0,"div",144),e._uU(1,"B\u1ea1n \u0111\u01b0\u1ee3c mi\u1ec5n ph\xed y\xeau c\u1ea7u n\xe0y "),e.qZA())}function Be(i,c){if(1&i&&(e.TgZ(0,"div",144),e._uU(1),e.ALo(2,"number"),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.AsE("N\u1ebfu canh \u0111\u01b0\u1ee3c v\xe9, b\u1ea1n s\u1ebd tr\u1ea3 ph\xed b\u1eb1ng ",e.lcZ(2,2,t.availableInfo.percent),"",t.availableInfo.currency," ch\xeanh l\u1ec7ch gi\xe1 ")}}function Ne(i,c){if(1&i&&(e.TgZ(0,"div",141)(1,"div")(2,"div",33),e._UZ(3,"cf-icon",142),e.TgZ(4,"span",35),e._uU(5,"Ph\xed y\xeau c\u1ea7u"),e.qZA()(),e.YNc(6,Ue,2,0,"div",143),e.YNc(7,Be,3,4,"div",143),e.qZA(),e._UZ(8,"tooltip-available-slot",39),e.qZA()),2&i){const t=e.oxw(2),n=e.MAs(14);e.xp6(6),e.Q6J("ngIf",t.availableInfo.free),e.xp6(1),e.Q6J("ngIf",!t.availableInfo.free),e.xp6(1),e.Q6J("availableSlotData",t.availableSlotData)("content",n)}}function qe(i,c){if(1&i&&(e.TgZ(0,"div",11)(1,"div",99)(2,"div",99)(3,"div",33),e._UZ(4,"cf-icon",100),e.TgZ(5,"span",35),e._uU(6,"Canh v\xe9 r\u1ebb c\xe1c chuy\u1ebfn bay sau"),e.qZA()(),e.TgZ(7,"div",101),e.YNc(8,ye,77,23,"ng-container",89),e.TgZ(9,"div",102)(10,"div",19),e._uU(11,"T\u1ed5ng gi\xe1 ban \u0111\u1ea7u"),e.qZA(),e.TgZ(12,"div",103),e._uU(13),e.ALo(14,"number"),e.qZA()()()(),e.TgZ(15,"div",99)(16,"div",33),e._UZ(17,"cf-icon",104),e.TgZ(18,"span",35),e._uU(19,"Th\xf4ng tin h\xe0nh kh\xe1ch"),e.qZA()(),e.TgZ(20,"div",105),e.YNc(21,Fe,9,5,"ng-container",89),e.qZA()()(),e.TgZ(22,"div",99)(23,"div",33),e._UZ(24,"cf-icon",106),e.TgZ(25,"span",35),e._uU(26,"Th\xf4ng tin y\xeau c\u1ea7u"),e.qZA()(),e.TgZ(27,"div",105)(28,"div",107)(29,"div",108),e._uU(30,"H\u1ea1n canh v\xe9:"),e.qZA(),e.TgZ(31,"div",109),e._uU(32),e.ALo(33,"date"),e.qZA()(),e.TgZ(34,"div",107)(35,"div",108),e._uU(36,"H\u1ea1ng gh\u1ebf mong mu\u1ed1n:"),e.qZA(),e.TgZ(37,"div",109),e.YNc(38,Se,2,1,"div",83),e.YNc(39,Me,2,0,"span",10),e.qZA()(),e.TgZ(40,"div",107)(41,"div",108),e._uU(42,"M\u1ee9c gi\xe1 mong mu\u1ed1n:"),e.qZA(),e.TgZ(43,"div",109),e.YNc(44,Re,3,3,"span",10),e.YNc(45,we,2,0,"span",10),e.qZA()(),e.YNc(46,Ie,5,0,"div",110),e.qZA()(),e.YNc(47,Ne,9,4,"div",111),e._UZ(48,"div",55),e.TgZ(49,"div",99)(50,"div",33),e._UZ(51,"cf-icon",112),e.TgZ(52,"span",35),e._uU(53,"M\u1ed9t s\u1ed1 l\u01b0u \xfd"),e.qZA()(),e.TgZ(54,"div",113)(55,"div",114)(56,"div"),e._UZ(57,"cf-icon",115),e.qZA(),e.TgZ(58,"div")(59,"span",24),e._uU(60,"N\u1ebfu gi\xe1 v\xe9 t\u0103ng,"),e.qZA(),e._uU(61," th\xf4ng b\xe1o \u0111\u1ebfn b\u1ea1n v\u1ec1 thay \u0111\u1ed5i gi\xe1 mi\u1ec5n ph\xed v\xe0 ti\u1ebfp t\u1ee5c canh \u0111\u1ebfn khi h\u1ebft h\u1ea1n canh v\xe9. "),e.qZA()(),e.TgZ(62,"div",114)(63,"div"),e._UZ(64,"cf-icon",44),e.qZA(),e.TgZ(65,"div")(66,"span",24),e._uU(67,"B\u1ea1n kh\xf4ng m\u1ea5t b\u1ea5t c\u1ee9 kho\u1ea3n ph\xed n\u1ebfu kh\xf4ng canh \u0111\u01b0\u1ee3c v\xe9 r\u1ebb."),e.qZA(),e._uU(68," C\xf3 th\u1ec3 h\u1ee7y canh v\xe9 b\u1ea5t k\xec l\xfac n\xe0o!"),e.qZA()(),e.TgZ(69,"div",114)(70,"div"),e._UZ(71,"cf-icon",116),e.qZA(),e.TgZ(72,"div",24),e._uU(73,"B\u1ea1n \u0111\u1ed3ng \xfd v\u1edbi "),e.TgZ(74,"span",117),e._uU(75,"\u0111i\u1ec1u kho\u1ea3n s\u1eed d\u1ee5ng"),e.qZA(),e._uU(76," khi s\u1eed d\u1ee5ng t\xednh n\u0103ng n\xe0y. "),e.qZA()()()()()),2&i){const t=e.oxw();e.xp6(8),e.Q6J("ngForOf",(null==t.pnrOrderData?null:t.pnrOrderData.journeys)||e.DdM(16,H)),e.xp6(5),e.hij("",e.lcZ(14,11,t.pnrOrderData.totalCharge||0)," \u0111 "),e.xp6(8),e.Q6J("ngForOf",t.pnrOrderData.passengers),e.xp6(11),e.AsE(" ",e.xi3(33,13,t.registerOrderForm.value.dayExpire,"dd/MM/yyyy")," ",t.registerOrderForm.value.hoursExpire," "),e.xp6(6),e.Q6J("ngIf",t.registerOrderForm.value.specifyFareClass),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.PRICE),e.xp6(5),e.Q6J("ngIf",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.PRICE),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.monitorType===t.MONITOR_TYPE.FARE),e.xp6(1),e.Q6J("ngIf",t.registerOrderForm.value.notifyBeforeExpired),e.xp6(1),e.Q6J("ngIf",t.availableInfo)}}function Ye(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",145)(1,"button",146),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.close())}),e._uU(2," \u0110\xf3ng "),e.qZA(),e.TgZ(3,"button",147),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.close())}),e._UZ(4,"cf-icon",148),e._uU(5," Quay l\u1ea1i "),e.qZA(),e.TgZ(6,"button",149),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onChangeStep(r.STEP_ORDER.REVIEW))}),e.TgZ(7,"span"),e._uU(8,"Ti\u1ebfp t\u1ee5c"),e.qZA(),e._UZ(9,"cf-icon",150),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(6),e.Q6J("disabled",t.registerOrderForm.invalid)}}function Je(i,c){if(1&i){const t=e.EpF();e.TgZ(0,"div",145)(1,"button",151),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onChangeStep(r.STEP_ORDER.CREATE))}),e._UZ(2,"cf-icon",148),e._uU(3," Quay l\u1ea1i "),e.qZA(),e.TgZ(4,"button",149),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return e.KtG(r.onRegisterOrder())}),e._uU(5," X\xe1c nh\u1eadn "),e._UZ(6,"cf-icon",152),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(4),e.Q6J("disabled",t.registerOrderForm.invalid)}}function Le(i,c){1&i&&(e.TgZ(0,"div",154)(1,"span",155),e._uU(2,"Thu ph\xed"),e.qZA(),e._UZ(3,"cf-icon",156),e.qZA())}function Qe(i,c){1&i&&(e.TgZ(0,"div",154)(1,"span",155),e._uU(2,"Mi\u1ec5n ph\xed"),e.qZA(),e._UZ(3,"cf-icon",156),e.qZA())}function Ke(i,c){if(1&i&&(e.YNc(0,Le,4,0,"div",153),e.YNc(1,Qe,4,0,"div",153)),2&i){const t=e.oxw();e.Q6J("ngIf",!t.availableSlotData.available),e.xp6(1),e.Q6J("ngIf",t.availableSlotData.available)}}function He(i,c){if(1&i&&(e.TgZ(0,"div",158)(1,"span",159),e._uU(2),e.ALo(3,"number"),e.qZA(),e._UZ(4,"cf-icon",156),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.AsE("",e.lcZ(3,2,t.availableInfo.percent),"",t.availableInfo.currency," ch\xeanh l\u1ec7ch gi\xe1")}}function $e(i,c){if(1&i&&(e.TgZ(0,"div",158)(1,"span"),e._uU(2),e.ALo(3,"number"),e.qZA(),e._UZ(4,"cf-icon",156),e.qZA()),2&i){const t=e.oxw(2);e.xp6(2),e.AsE("",e.lcZ(3,2,t.availableInfo.percent),"",t.availableInfo.currency," ch\xeanh l\u1ec7ch gi\xe1")}}function Ve(i,c){if(1&i&&(e.YNc(0,He,5,4,"div",157),e.YNc(1,$e,5,4,"div",157)),2&i){const t=e.oxw();e.Q6J("ngIf",t.availableInfo.free),e.xp6(1),e.Q6J("ngIf",!t.availableInfo.free)}}function We(i,c){1&i&&e._UZ(0,"cf-spinner")}var R=(()=>{return(i=R||(R={})).CREATE="CREATE",i.REVIEW="REVIEW",R;var i})();let je=(()=>{class i{constructor(t,n,r,a,h,s,d,f,O,q,ze,Ge,Xe,et){var L;this.ref=t,this.bottomSheetData=n,this.bottomSheetRef=r,this.calendar=h,this._fb=s,this._modal=d,this._route=f,this._cd=O,this._ticketLowFareService=q,this._flightDataService=ze,this._eventLogService=Ge,this._mobileDetectService=Xe,this._bottomSheetService=et,this.isOpen=!1,this.bottomCenter=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetX:0,offsetY:0}],this.timeExpireStr="",this.scheduleTimeOptions=[],this.steps=[{id:1,icon:"check"},{id:2,icon:"unlock"},{id:3,icon:"search"},{id:4,icon:"lock"}],this.currentStep=1,this.isExpand=!1,this.step=R.CREATE,this.MONITOR_TYPE=b.$,this.title="T\u1ea1o y\xeau c\u1ea7u canh v\xe9 r\u1ebb",this.STEP_ORDER=R,this.STATUS_ORDER=N.b,this.MAX_TIME_EXECUTE=48,this.isLoading=!1,this.lowerFareClassOptions=[],this.listFareTypeOptions=[],this.searchValueChanged$=new p.x,this.pnrSuggestOptions=[],this.isSuggest=!1,this.multiMinDate=[],this.hoursOption=[],this.minuteOption=[],this.timeOption=[],this.infiniteScrollCount=10,this.isDataEmpty=!1,this.regenerate=!1,this.numOfMonth=1,this.notifyExpired=!1,a.registerIcons([v.YvC,v.KMO,v.TM4,v.RxK,v.Vn9,v.NNX,v.Tas,v.$PG,v.toh,v.rJw,v._hx,v.okA,v.TOh,v.B2I,v.qDv,v.PcQ,v.PSW,v.cnj,v.Lji,v.Nnv,v.tLH,v.esH,v.ZlA,v.UNF,v.SK7]),t&&(this.bookingDetail=t.data.bookingDetail,this.registerOrderDetail=t.data.registerOrderDetail,this.regenerate=t.data.regenerate,this.isSuggest=null!==(L=t.data.isSuggest)&&void 0!==L&&L,this.sourceEvent=t.data.sourceEvent),n&&(this.bookingDetail=n.bookingDetail,this.registerOrderDetail=n.registerOrderDetail,this.regenerate=n.regenerate,this.isSuggest=n.isSuggest,this.sourceEvent=n.sourceEvent),this.minDate=h.getToday(),this.bookingDetail&&!this.regenerate&&(this.handleRegisterOrderData(),this.getAvailableAgent(this.bookingDetail.coOwnerId)),this.regenerate&&this.handleRegenerateRegister()}ngOnInit(){this.initFormGroup(),this.pnrOrderData&&(this.generateTime(),this.getListLowerFareClass(this.pnrOrderData.airline,this.pnrOrderData.journeys[0].fareClass)),this.isSuggest&&this.onSearchPnrSuggest(""),this.searchValueChanged$.pipe((0,E.b)(1e3)).subscribe(t=>{this.pnrSuggestOptions.some(n=>n.bookingCode===t)||this.onSearchPnrSuggest(t)})}initFormGroup(){var t,n,r;this.registerOrderForm=this._fb.group({notifyBeforeExpired:[!0],bookingCode:[(null===(t=this.pnrOrderData)||void 0===t?void 0:t.bookingCode)||"",T.kI.required],monitorType:[(null===(n=this.pnrOrderData)||void 0===n?void 0:n.monitorType)||b.$.PRICE],timeExecute:[this.MAX_TIME_EXECUTE],dayExpire:[null,T.kI.required],hoursExpire:[null,T.kI.required],targetPrice:[(null===(r=this.pnrOrderData)||void 0===r?void 0:r.targetPrice)||0,T.kI.required],specifyFareClass:[null]})}getAvailableAgent(t){this._ticketLowFareService.getInfoAvailableAgent({agentId:t||"",type:S.G.DOWN_FARE_TICKET}).subscribe({next:r=>{"OK"===r.status&&(this.availableInfo=r.data,this.availableSlotData={available:r.data.free,type:r.data.type,amount:r.data.type===S.G.DOWN_FARE_TICKET?r.data.percent:r.data.amountPerPax,currency:r.data.type===S.G.DOWN_FARE_TICKET?r.data.currency:"\u0111"})}})}getListLowerFareClass(t,n){this._ticketLowFareService.getListLowerFareClass({airline:t,fareClass:n}).subscribe({next:a=>{var h,s;"OK"===a.status&&(this.lowerFareClassOptions=(null===(h=a.data.cabin)||void 0===h?void 0:h.flatMap(d=>d.fareType.map(f=>({code:f.code,value:f.description,children:f.fareClass.map(O=>({code:O.code,value:O.name}))}))))||[],this.listFareTypeOptions=(null===(s=a.data.cabin)||void 0===s?void 0:s.flatMap(d=>d.fareType.map(f=>({order:f.order,code:f.code,name:f.description,isActive:!1,isExpand:!1,isAllFareClass:!1,fareTypeSelected:0,totalFareType:f.fareClass.length,fareClass:f.fareClass.map(O=>({order:O.order,code:O.code,name:O.name,isActive:!1}))}))))||[],this.pnrOrderData&&this.pnrOrderData.specifyFareClass&&(this.registerOrderForm.controls.specifyFareClass.setValue(this.pnrOrderData.specifyFareClass||null),this.listFareTypeOptions.forEach(d=>{d.fareClass.forEach(f=>{f.isActive=this.pnrOrderData.specifyFareClass.includes(f.code)}),d.isAllFareClass=d.fareClass.every(f=>f.isActive),d.isActive=d.fareClass.some(f=>f.isActive)})),this._cd.detectChanges())}})}generateTimeArrays(t=0,n=0,r=23,a=60){const h=[];let s=t,d=n;for(;s<r&&r<24||s===r&&d<a;){const f=s.toString().padStart(2,"0"),O=d.toString().padStart(2,"0");h.push({value:`${f}:${O}`,text:`${f}:${O}`}),d+=15,d>=a&&(d=0,s++)}return h}generateTime(){var t,n,r;const a=new Date,d=(this.pnrOrderData.journeys[0].departureDateTime.getTime()-a.getTime())/36e5-2,f=Math.min(Math.floor(d),this.MAX_TIME_EXECUTE);a.setHours(a.getHours()+f),this.timeExpire=a,this.maxDate=(0,D.jy)(this.timeExpire),null===(t=this.registerOrderForm)||void 0===t||t.controls.dayExpire.setValue(this.timeExpire),this.timeOption=this.generateTimeArrays(0,0,this.timeExpire.getHours(),this.timeExpire.getMinutes());const O=(null===(n=this.timeOption[this.timeOption.length-1])||void 0===n?void 0:n.value)||"";null===(r=this.registerOrderForm)||void 0===r||r.controls.hoursExpire.setValue(O),this._cd.detectChanges()}handleRegisterOrderData(){var t,n;const r=(null===(t=this.bookingDetail.passengers)||void 0===t?void 0:t.map(s=>({key:s.key||"",parentKey:s.parentKey||"",firstName:s.firstName||"",lastName:s.lastName||"",displayName:`${s.lastName} ${s.firstName}`||"",birthDay:s.birthday?x(s.birthday).format("DD/MM/YYYY"):"",type:s.type||"",namePrefix:"UNDEFINE"===s.namePrefix?(0,C.A)(s.gender):s.namePrefix,gender:s.gender})))||[],a=(null==r?void 0:r.filter(s=>"INF"===s.type.toUpperCase()))||[],h=(null==r?void 0:r.filter(s=>"INF"!==s.type.toUpperCase()))||[];a.forEach(s=>{var d;const f=h.find(O=>O.key===s.parentKey);f&&(f.child=Object.assign(Object.assign({},s),{namePrefix:"MALE"===(null===(d=s.gender)||void 0===d?void 0:d.toUpperCase())?"B\xc9 TRAI":"B\xc9 G\xc1I"}))}),this.pnrOrderData={airline:this.bookingDetail.airline,bookingCode:this.bookingDetail.bookingCode,passengers:h||[],monitorType:b.$.PRICE,specifyFareClass:[],journeys:(null===(n=this.bookingDetail.journeys)||void 0===n?void 0:n.map(s=>{var d,f,O,q;return{airline:s.airline,airlineName:s.airlineName,airlineLogo:s.airlineLogo,flightNumber:`${s.airline}${s.segments[0].flightNumber}`,startPoint:s.startPoint,endPoint:s.endPoint,startTime:x(null!==(d=s.startTime)&&void 0!==d?d:new Date).format("HH:mm"),endTime:x(null!==(f=s.endTime)&&void 0!==f?f:new Date).format("HH:mm"),departure:x(null!==(O=s.startTime)&&void 0!==O?O:new Date).format("DD/MM/YYYY"),departureDateTime:null!==(q=s.startTime)&&void 0!==q?q:new Date,fareClass:"QH"===s.airline?`${s.segments[0].fareClass}-${s.segments[0].fareBasic}`:s.segments[0].fareClass,duration:s.segments[0].duration,durationStr:s.segments[0].shortDuration}}))||[],targetPrice:this.bookingDetail.targetPriceOrder||0,totalCharge:this.bookingDetail.totalCharge||0+this.bookingDetail.totalServiceFee||0},this.totalFare=this.pnrOrderData.targetPrice}handleRegenerateRegister(){var t,n;this.pnrOrderData={airline:this.registerOrderDetail.airline,bookingCode:this.registerOrderDetail.bookingCode,passengers:this.registerOrderDetail.passengers||[],monitorType:this.registerOrderDetail.monitorType,specifyFareClass:(null===(t=this.registerOrderDetail.monitors[0])||void 0===t?void 0:t.specifyFareClass)||[],journeys:(null===(n=this.registerOrderDetail.journeys)||void 0===n?void 0:n.map(r=>{var a;return{airline:r.airline,airlineName:r.airlineName,airlineLogo:r.airlineLogo,flightNumber:r.flightNumber,startPoint:r.startPoint,endPoint:r.endPoint,startTime:x(r.startTime).format("HH:mm"),endTime:x(r.endTime).format("HH:mm"),departure:x(r.startTime).format("DD/MM/YYYY"),departureDateTime:r.startTime,fareClass:(null===(a=this.registerOrderDetail.monitors[0])||void 0===a?void 0:a.currentFareClass)||"",duration:r.segments[0].shortDuration,durationStr:r.segments[0].shortDuration}}))||[],targetPrice:this.registerOrderDetail.targetPrice||0,totalCharge:this.registerOrderDetail.totalCharge},this.getAvailableAgent(this.registerOrderDetail.ownerId||"")}close(){this.ref&&this.ref.close(!1),this.bottomSheetData&&this.bottomSheetRef.dismiss(!1)}onExpandConfig(){this.registerOrderForm.controls.targetPrice.valid&&(this.isExpand=!this.isExpand)}onChangeStep(t){t===R.REVIEW&&(this.title="X\xe1c nh\u1eadn y\xeau c\u1ea7u canh v\xe9 r\u1ebb"),this.step=t}checkDirtyNumber(t,n){this.registerOrderForm.controls[t].setErrors(n<=0?{minAmount:!0}:n>this.totalFare?{maxAmount:!0}:n?null:{required:!0})}onRegisterOrder(){if(this.registerOrderForm.markAllAsTouched(),this.registerOrderForm.invalid)return;const t=this.registerOrderForm.value,n={advanceSetting:{notifyBeforeExpired:t.notifyBeforeExpired},airline:this.pnrOrderData.airline,fareMonitor:{expectLowerFareClass:this.pnrOrderData.journeys[0].fareClass,specifyFareClass:t.specifyFareClass||[]},priceMonitor:{targetPrice:t.targetPrice},pnr:this.pnrOrderData.bookingCode,timeExpire:x(t.dayExpire).format("YYYY-MM-DD")+`T${t.hoursExpire}:00`,monitorType:t.monitorType,stateClientFree:this.availableInfo.free};this._eventLogService.captureRegisterDownFare({hasPNR:this.isSuggest?0:1,airline:this.pnrOrderData.airline,source:this.getSourceEvent(),mode:t.monitorType===b.$.FARE?1:0,isDuplicated:this.regenerate?1:0,createdDate:x().format("YYYY-MM-DD HH:mm:ss")}),this.isLoading=!0,this._ticketLowFareService.registerOrder(n).pipe((0,g.x)(()=>this.isLoading=!1)).subscribe({next:r=>{var a,h;if("OK"===r.status){let s="",d="";if(this.availableInfo.free?(d="well_done",s=`<div>Ch\xfac m\u1eebng b\u1ea1n, b\u1ea1n \u0111\u01b0\u1ee3c mi\u1ec5n ph\xed y\xeau c\u1ea7u canh v\xe9 r\u1ebb <strong>#${r.data.code}</strong> cho m\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.pnrOrderData.bookingCode}</strong>. Ch\xfang t\xf4i s\u1ebd th\xf4ng b\xe1o \u0111\u1ebfn b\u1ea1n khi c\xf3 c\u1eadp nh\u1eadt m\u1edbi nh\u1ea5t.</div>`):(d="success",s=`<div>Y\xeau c\u1ea7u canh v\xe9 r\u1ebb <strong>#${r.data.code}</strong> cho m\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.pnrOrderData.bookingCode}</strong> \u0111\xe3 \u0111\u01b0\u1ee3c t\u1ea1o. Ch\xfang t\xf4i s\u1ebd th\xf4ng b\xe1o \u0111\u1ebfn b\u1ea1n khi c\xf3 c\u1eadp nh\u1eadt m\u1edbi nh\u1ea5t.</div>`),this._mobileDetectService.isMobile()){const f=this._bottomSheetService.open(Z.Q4,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{title:"T\u1ea1o y\xeau c\u1ea7u canh v\xe9 th\xe0nh c\xf4ng",body:s,okText:"Xem danh s\xe1ch",cancelText:"\u0110\xf3ng",hasIcon:!0,status:d}});f.containerInstance._rightButtonClick.subscribe(()=>{f.dismiss()}),f.afterDismissed().subscribe(O=>{O?(this._route.navigate(["admin/manage-pnr-orders"]),this.bottomSheetRef.dismiss(!0)):this.bottomSheetRef.dismiss(!1)})}else this._modal.open(F.V,{title:"T\u1ea1o y\xeau c\u1ea7u canh v\xe9 th\xe0nh c\xf4ng",content:s,status:d,cancelText:"\u0110\xf3ng",okText:"Xem danh s\xe1ch"}).afterClosed$.subscribe({next:O=>{O.data?(this.ref.close(!0),this.isSuggest||this._route.navigate(["admin/manage-pnr-orders"])):this.ref.close(!1)}})}else if("TPS-TLF12"===r.objectError.errorCode)if(this.availableInfo.free=!1,this._mobileDetectService.isMobile()){const s=this._bottomSheetService.open(Z.Q4,{headerTitle:"X\xe1c nh\u1eadn",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{title:"",body:"B\u1ea1n \u0111\xe3 \u0111\u1ea1t gi\u1edbi h\u1ea1n 2 y\xeau c\u1ea7u mi\u1ec5n ph\xed. Y\xeau c\u1ea7u n\xe0y l\xe0 c\xf3 <strong>Thu ph\xed</strong>. B\u1ea1n c\xf3 mu\u1ed1n ti\u1ebfp t\u1ee5c y\xeau c\u1ea7u canh v\xe9 r\u1ebb kh\xf4ng?",okText:"X\xe1c nh\u1eadn",cancelText:"\u0110\xf3ng",hasIcon:!0,status:"info"}});s.containerInstance._rightButtonClick.subscribe(()=>{s.dismiss()}),s.afterDismissed().subscribe(d=>{d&&this.onRegisterOrder()})}else this._modal.open(Z.V0,{title:"X\xe1c nh\u1eadn thay \u0111\u1ed5i",body:"B\u1ea1n \u0111\xe3 \u0111\u1ea1t gi\u1edbi h\u1ea1n 2 y\xeau c\u1ea7u mi\u1ec5n ph\xed. Y\xeau c\u1ea7u n\xe0y l\xe0 c\xf3 <strong>Thu ph\xed</strong>. B\u1ea1n c\xf3 mu\u1ed1n ti\u1ebfp t\u1ee5c y\xeau c\u1ea7u canh v\xe9 r\u1ebb kh\xf4ng?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!0}).afterClosed$.subscribe({next:d=>{d.data&&this.onRegisterOrder()}});else{let s="Xem danh s\xe1ch";s="TPS-TLF006"===r.objectError.errorCode?"Qu\u1ea3n l\xfd canh v\xe9":"Canh v\xe9 kh\xe1c";const d=(null===(h=null===(a=r.objectError)||void 0===a?void 0:a.errorDescription)||void 0===h?void 0:h.vi)||`M\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.pnrOrderData.bookingCode}</strong> kh\xf4ng c\xf2n h\u1ee3p l\u1ec7 \u0111\u1ec3 t\u1ea1o y\xeau c\u1ea7u canh v\xe9. Vui l\xf2ng canh v\xe9 v\u1edbi m\xe3 \u0111\u1eb7t ch\u1ed7 kh\xe1c.`;if(this._mobileDetectService.isMobile()){const f=this._bottomSheetService.open(Z.Q4,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{title:"M\xe3 \u0111\u1eb7t ch\u1ed7 kh\xf4ng h\u1ee3p l\u1ec7",body:d,okText:s,cancelText:"\u0110\xf3ng",hasIcon:!0,status:"error"}});f.containerInstance._rightButtonClick.subscribe(()=>{f.dismiss()}),f.afterDismissed().subscribe(O=>{O?"TPS-TLF006"===r.objectError.errorCode?(this.bottomSheetRef.dismiss(!0),this._route.navigate(["admin/manage-pnr-orders"])):this.onRegisterNewPnrOrder():this.bottomSheetRef.dismiss(!1)})}else this._modal.open(F.V,{title:"M\xe3 \u0111\u1eb7t ch\u1ed7 kh\xf4ng h\u1ee3p l\u1ec7",content:d,status:"error",cancelText:"\u0110\xf3ng",okText:s}).afterClosed$.subscribe({next:O=>{O.data&&("TPS-TLF006"===r.objectError.errorCode?(this.ref.close(!0),this._route.navigate(["admin/manage-pnr-orders"])):this.onRegisterNewPnrOrder())}})}},error:()=>{const r="Canh v\xe9 kh\xe1c";if(this._mobileDetectService.isMobile()){const a=this._bottomSheetService.open(Z.Q4,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{title:"M\xe3 \u0111\u1eb7t ch\u1ed7 kh\xf4ng h\u1ee3p l\u1ec7",body:`<div>M\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.pnrOrderData.bookingCode}</strong> kh\xf4ng c\xf2n h\u1ee3p l\u1ec7 \u0111\u1ec3 t\u1ea1o y\xeau c\u1ea7u canh v\xe9. Vui l\xf2ng canh v\xe9 v\u1edbi m\xe3 \u0111\u1eb7t ch\u1ed7 kh\xe1c.</div>`,okText:r,cancelText:"\u0110\xf3ng",hasIcon:!0,status:"error"}});a.containerInstance._rightButtonClick.subscribe(()=>{a.dismiss()}),a.afterDismissed().subscribe(h=>{h?this.onRegisterNewPnrOrder():this.bottomSheetRef.dismiss(!1)})}else this._modal.open(F.V,{title:"M\xe3 \u0111\u1eb7t ch\u1ed7 kh\xf4ng h\u1ee3p l\u1ec7",content:`<div>M\xe3 \u0111\u1eb7t ch\u1ed7 <strong>${this.pnrOrderData.bookingCode}</strong> kh\xf4ng c\xf2n h\u1ee3p l\u1ec7 \u0111\u1ec3 t\u1ea1o y\xeau c\u1ea7u canh v\xe9. Vui l\xf2ng canh v\xe9 v\u1edbi m\xe3 \u0111\u1eb7t ch\u1ed7 kh\xe1c.</div>`,status:"error",cancelText:"\u0110\xf3ng",okText:r}).afterClosed$.subscribe({next:h=>{h.data&&this.onRegisterNewPnrOrder()}})}})}getSourceEvent(){switch(this.sourceEvent){case"BOOKING_SUCCESS":return 0;case"BOOKING_DETAIL":return 1;case"SUGGEST":return 2;case"HEADER_MANAGE":return 3;case"EMPTY_STATE":return 4;case"REGENERATE":return 5;default:return-1}}onRegisterNewPnrOrder(){this.isSuggest=!0,this.step=R.CREATE,this.pnrOrderData={bookingCode:"",airline:"",monitorType:b.$.PRICE,specifyFareClass:[],passengers:[],journeys:[],targetPrice:0,totalCharge:0},this.onSearchPnrSuggest(""),this.registerOrderForm.reset(),this.registerOrderForm.pacthValue({notifyBeforeExpired:!0})}onChangeLowFare(){if(this.registerOrderForm.value.monitorType===b.$.PRICE)if(this._mobileDetectService.isMobile()){const t=this._bottomSheetService.open(Z.Q4,{headerTitle:"X\xe1c nh\u1eadn",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{body:"Vi\u1ec7c ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n s\u1ebd h\u1ee7y c\xe1c ch\u1ec9nh s\u1eeda c\u1ee7a t\xednh n\u0103ng <strong>Canh theo gi\xe1 v\xe9</strong>. B\u1ea1n mu\u1ed1n ti\u1ebfp t\u1ee5c ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!0}});t.containerInstance._rightButtonClick.subscribe(()=>{t.dismiss()}),t.afterDismissed().subscribe(n=>{n&&(this.registerOrderForm.controls.monitorType.setValue(b.$.FARE),this.registerOrderForm.controls.specifyFareClass.setValue(null),this.registerOrderForm.controls.specifyFareClass.setValidators([T.kI.required]),this.registerOrderForm.controls.specifyFareClass.updateValueAndValidity(),this.registerOrderForm.controls.targetPrice.setErrors(null))})}else this._modal.open(Z.V0,{title:"X\xe1c nh\u1eadn thay \u0111\u1ed5i",body:"Vi\u1ec7c ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n s\u1ebd h\u1ee7y c\xe1c ch\u1ec9nh s\u1eeda c\u1ee7a t\xednh n\u0103ng <strong>Canh theo gi\xe1 v\xe9</strong>. B\u1ea1n mu\u1ed1n ti\u1ebfp t\u1ee5c ch\u1ecdn h\u1ea1ng gh\u1ebf mong mu\u1ed1n?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!0}).afterClosed$.subscribe({next:n=>{n.data&&(this.registerOrderForm.controls.monitorType.setValue(b.$.FARE),this.registerOrderForm.controls.specifyFareClass.setValue(null),this.registerOrderForm.controls.specifyFareClass.setValidators([T.kI.required]),this.registerOrderForm.controls.specifyFareClass.updateValueAndValidity(),this.registerOrderForm.controls.targetPrice.setErrors(null))}})}onChangePrice(){var t;if(this.registerOrderForm.value.monitorType===b.$.FARE&&null!==(t=this.registerOrderForm.value.specifyFareClass)&&void 0!==t&&t.length)if(this._mobileDetectService.isMobile()){const n=this._bottomSheetService.open(Z.Q4,{headerTitle:"X\xe1c nh\u1eadn",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",data:{body:"Vi\u1ec7c b\u1eadt t\xednh n\u0103ng <strong>Canh theo gi\xe1 v\xe9</strong> s\u1ebd h\u1ee7y ch\u1ec9nh s\u1eeda c\u1ee7a c\xe1c h\u1ea1ng gh\u1ebf mong mu\u1ed1n. B\u1ea1n mu\u1ed1n ti\u1ebfp t\u1ee5c canh theo gi\xe1 v\xe9?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!0}});n.containerInstance._rightButtonClick.subscribe(()=>{n.dismiss()}),n.afterDismissed().subscribe(r=>{r&&(this.registerOrderForm.controls.monitorType.setValue(b.$.PRICE),this.registerOrderForm.controls.targetPrice.setValue(this.pnrOrderData.targetPrice),this.registerOrderForm.controls.targetPrice.setValidators([T.kI.required]),this.registerOrderForm.controls.targetPrice.updateValueAndValidity(),this.registerOrderForm.controls.specifyFareClass.setErrors(null))})}else this._modal.open(Z.V0,{title:"X\xe1c nh\u1eadn thay \u0111\u1ed5i",body:"Vi\u1ec7c b\u1eadt t\xednh n\u0103ng <strong>Canh theo gi\xe1 v\xe9</strong> s\u1ebd h\u1ee7y ch\u1ec9nh s\u1eeda c\u1ee7a c\xe1c h\u1ea1ng gh\u1ebf mong mu\u1ed1n. B\u1ea1n mu\u1ed1n ti\u1ebfp t\u1ee5c canh theo gi\xe1 v\xe9?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y",hasIcon:!0}).afterClosed$.subscribe({next:r=>{r.data&&(this.registerOrderForm.controls.monitorType.setValue(b.$.PRICE),this.registerOrderForm.controls.targetPrice.setValue(this.pnrOrderData.targetPrice),this.registerOrderForm.controls.targetPrice.setValidators([T.kI.required]),this.registerOrderForm.controls.targetPrice.updateValueAndValidity(),this.registerOrderForm.controls.specifyFareClass.setErrors(null))}});else this.registerOrderForm.controls.monitorType.setValue(b.$.PRICE),this.registerOrderForm.controls.targetPrice.setValue(this.pnrOrderData.targetPrice),this.registerOrderForm.controls.targetPrice.setValidators([T.kI.required]),this.registerOrderForm.controls.targetPrice.updateValueAndValidity(),this.registerOrderForm.controls.specifyFareClass.setErrors(null)}onCheckNotify(t){this.registerOrderForm.controls.notifyBeforeExpired.setValue(t)}onSearchPnrSuggest(t){this._ticketLowFareService.searchSuggestPnrMonitorLowFare({pnrSearch:t}).subscribe({next:r=>{if("OK"===r.status&&r.data){(h=>{this.pnrSuggestOptions=(null==h?void 0:h.map(s=>({bookingCode:s.bookingCode,airline:s.airline,ownerId:s.ownerId,monitorType:b.$.PRICE,specifyFareClass:[],passengers:s.passengers.map(d=>({key:d.key,parentKey:d.parentKey,firstName:d.firstName,lastName:d.lastName,displayName:`${d.lastName} ${d.firstName}`,birthDay:"",type:d.type,namePrefix:d.namePrefix,gender:d.gender})),journeys:s.journeys.map(d=>({airline:s.airline,airlineName:this._flightDataService.getAirlineNameByCode(s.airline),airlineLogo:this._flightDataService.getAirlineLogoByCode(s.airline),flightNumber:`${s.airline}${d.segments[0].flightNumber}`,startPoint:d.startPoint,endPoint:d.endPoint,startTime:x(d.departTime).format("HH:mm"),endTime:x(d.arrivalTime).format("HH:mm"),departure:x(d.departTime).format("DD/MM/YYYY"),departureDateTime:x(d.departTime).toDate(),fareClass:"QH"===s.airline?`${d.segments[0].fareClass}-${d.segments[0].fareBasic}`:d.segments[0].fareClass,duration:"",durationStr:(0,y.N)(d.duration)})),targetPrice:s.totalFare,totalCharge:s.totalFareCharge||0+s.totalServiceFee||0})))||[],this.isDataEmpty=0===this.pnrSuggestOptions.length})(r.data.pnrSearch?r.data.pnrSearchResults:r.data.prnSuggest)}else this.isDataEmpty=!0;this.isDataEmpty&&t&&this.registerOrderForm.controls.bookingCode.setErrors({invalid:!0}),this._cd.detectChanges()},error:()=>{this.isDataEmpty&&t&&this.registerOrderForm.controls.bookingCode.setErrors({invalid:!0})}})}onSelectedPnr(t){this.getAvailableAgent(t.ownerId||""),this.getListLowerFareClass(t.airline,t.journeys[0].fareClass),this.pnrOrderData=t,this.totalFare=t.targetPrice,this.registerOrderForm.controls.targetPrice.setValue(t.targetPrice),this.generateTime(),this.pnrSuggestOptions.find(r=>r.bookingCode===t.bookingCode)||this.pnrSuggestOptions.unshift(t)}onSearchValueChange(t){this.registerOrderForm.controls.bookingCode.setErrors(t?null:{required:!0}),this.searchValueChanged$.next(t)}click(t){this.isOpen=!this.isOpen,t.stopPropagation()}onSelectedTimeExpire(){const t=this.registerOrderForm.value,n=new Date(x(t.dayExpire).format("YYYY-MM-DD")+`T${t.hoursExpire}:00`),a=new Date((new Date).getTime()+9e5);this.notifyExpired=n.getTime()<a.getTime(),this.registerOrderForm.controls.notifyBeforeExpired.setValue(!this.notifyExpired)}onDateSelected(t){var n;const r=x(t).format("DD/MM/YYYY"),a=x(new Date).format("DD/MM/YYYY"),h=x(this.timeExpire).format("DD/MM/YYYY");this.timeOption=r===a?this.generateTimeArrays((new Date).getHours(),(new Date).getMinutes(),23,60):r===h?this.generateTimeArrays(0,0,this.timeExpire.getHours(),this.timeExpire.getMinutes()):this.generateTimeArrays(0,0,23,60),(null===(n=this.timeOption)||void 0===n?void 0:n.map(d=>d.value).includes(this.registerOrderForm.controls.hoursExpire.value))?this.registerOrderForm.controls.hoursExpire.setErrors(null):(this.registerOrderForm.controls.hoursExpire.setErrors({illegal:!0}),this.registerOrderForm.markAllAsTouched())}onCheckedAll(t){var n,r;if(t){const a=(null===(r=null===(n=this.lowerFareClassOptions)||void 0===n?void 0:n.flatMap(h=>h.children))||void 0===r?void 0:r.map(h=>null==h?void 0:h.code))||[];this.registerOrderForm.controls.specifyFareClass.setValue(a)}else this.registerOrderForm.controls.specifyFareClass.setValue(null)}openFareOptions(){const t=this.listFareTypeOptions.every(n=>n.isActive);if(this._mobileDetectService.isMobile()){const n=this._bottomSheetService.open(Q.X,{headerTitle:"H\xe3ng bay/H\u1ea1ng gh\u1ebf",containerFullHeigh:!0,data:{listFareTypeOptions:this.listFareTypeOptions,selectedAll:t}});n.containerInstance._rightButtonClick.subscribe(()=>n.dismiss()),n.afterDismissed().subscribe({next:r=>{var a;r&&(this.listFareTypeOptions=r),n.dismiss();const h=(null===(a=this.listFareTypeOptions)||void 0===a?void 0:a.flatMap(s=>s.fareClass).filter(s=>s.isActive).map(s=>s.code))||[];this.registerOrderForm.controls.specifyFareClass.setValue(h||null)}})}else this._modal.open(Q.X,{listFareTypeOptions:this.listFareTypeOptions,selectedAll:t}).afterClosed$.subscribe(r=>{var a;r.data&&(this.listFareTypeOptions=r.data);const h=(null===(a=this.listFareTypeOptions)||void 0===a?void 0:a.flatMap(s=>s.fareClass).filter(s=>s.isActive).map(s=>s.code))||[];this.registerOrderForm.controls.specifyFareClass.setValue(h||null)})}onRemoveFareTypeOption(t,n){t.preventDefault(),t.stopPropagation(),n.isActive=!1,n.isAllFareClass=!1,n.fareClass.forEach(r=>r.isActive=!1),this.handleFareClassOption()}onRemoveFareClassOption(t,n){t.preventDefault(),t.stopPropagation(),n.isActive=!1,this.handleFareClassOption()}handleFareClassOption(){var t;if(this.listFareTypeOptions.every(r=>!r.isActive))this.registerOrderForm.controls.specifyFareClass.setValue(null);else{const r=(null===(t=this.listFareTypeOptions)||void 0===t?void 0:t.flatMap(a=>a.fareClass).filter(a=>a.isActive).map(a=>a.code))||[];this.registerOrderForm.controls.specifyFareClass.setValue(r||null)}}scrollDown(){this.numOfMonth=this.numOfMonth+4}expireDatePickerClick(t){if(this._mobileDetectService.isMobile()){const n=this._bottomSheetService.open(t,{headerTitle:"Ch\u1ecdn ng\xe0y k\u1ebft th\xfac",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:""});n.containerInstance._rightButtonClick.subscribe(()=>n.dismiss()),n.afterDismissed().subscribe(r=>{var a;r||null===(a=this.registerOrderForm)||void 0===a||a.controls.dayExpire.setValue(null)})}}onMobileDatePickerOK(){var t,n,r;this._bottomSheetService.dismiss(!0),null===(t=this.registerOrderForm)||void 0===t||t.controls.dayExpire.setValue(null===(n=this.registerOrderForm)||void 0===n?void 0:n.controls.dayExpire.value),this.onDateSelected(null===(r=this.registerOrderForm)||void 0===r?void 0:r.controls.dayExpire.value)}expireDateFocus(t){if(this._mobileDetectService.isMobile())return t.preventDefault(),!1}onCloseDatePicker(){this._bottomSheetService.dismiss()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(K.gb,8),e.Y36(J.Rr,8),e.Y36(J.Zu,8),e.Y36(v.KNP),e.Y36(D.jH),e.Y36(T.qu),e.Y36(K.oE),e.Y36($.F0),e.Y36(e.sBO),e.Y36(V.s),e.Y36(W.G),e.Y36(j.x),e.Y36(z.L),e.Y36(J.a2))},i.\u0275cmp=e.Xpm({type:i,selectors:[["register-pnr-order"]],standalone:!0,features:[e.jDz],decls:16,vars:6,consts:[[1,"w-[700px]","max-h-[600px]","overflow-hidden","rounded-lg","bg-neutral-white","flex","flex-col","md:w-screen","md:max-h-none","md:h-full","md:justify-between","md:rounded-none"],[1,"flex","justify-between","items-center","px-6","py-[13px]","border-b","border-neutral-gray-1","md:hidden"],[1,"text-heading-xs","text-neutral-black"],["size","medium","icon","close",1,"text-neutral-gray-4","cursor-pointer",3,"click"],[1,"p-6","w-full","h-full","flex-1","overflow-auto"],["class","flex flex-col gap-y-5",4,"ngIf"],[1,"p-6"],["class","flex justify-end gap-x-2 md:justify-between",4,"ngIf"],["availableSlotRef",""],["availableSlotFeeRef",""],[4,"ngIf"],[1,"flex","flex-col","gap-y-5"],[1,"flex","justify-around","items-center","md:hidden"],[1,"flex","flex-col","gap-y-3","justify-center","items-center"],[1,"relative","flex-shrink-0","w-9","h-9","rounded-full","flex","items-center","justify-center","border","border-secondary-7-4","text-white","bg-neutral-white"],["icon","check","size","small",1,"text-secondary-7-4"],[1,"absolute","w-[120px]","h-[1px]","bg-secondary-7-4","top-[50%]","left-[100%]"],[1,"flex","flex-col","items-center","justify-center","gap-y-"],[1,"text-express-md","text-neutral-gray-6"],[1,"text-body-sm","text-neutral-gray-4"],[1,"flex","flex-col","items-center","gap-y-3"],[1,"relative","flex-shrink-0","w-9","h-9","rounded-full","flex","items-center","justify-center","bg-secondary-7-4","text-white"],[1,"absolute","w-[126px]","h-[1px]","bg-neutral-gray-3","top-[50%]","left-[100%]"],[1,"flex","flex-col","items-center","justify-center","text-neutral-gray-6"],[1,"text-express-md"],[1,"text-body-sm"],[1,"relative","z-10","flex-shrink-0","w-9","h-9","rounded-full","flex","items-center","justify-center","border","border-neutral-gray-3","text-neutral-gray-3","bg-neutral-white"],[1,"absolute","w-[136px]","h-[1px]","bg-neutral-gray-3","top-[50%]","left-[100%]"],[1,"flex","flex-col","items-center","justify-center","text-neutral-gray-4"],[1,"z-10","flex-shrink-0","w-9","h-9","rounded-full","flex","items-center","justify-center","border","border-neutral-gray-3","text-neutral-gray-3","bg-neutral-white"],["class","flex flex-col gap-y-2.5",4,"ngIf"],[1,"flex","flex-col","gap-y-2.5"],[1,"flex","justify-between","items-center"],[1,"flex","items-center","gap-x-2"],["icon","coupon","size","small"],[1,"text-heading-sm","text-neutral-black"],["textField","bookingCode","valueField","bookingCode",1,"!max-w-none","w-full",3,"status","data","placeholder","formControl","allowSearch","isEmpty","onSearch","selectedChange"],["icon","search","size","small"],["cfHint","",3,"hint",4,"ngIf"],[3,"availableSlotData","content"],["cfHint","",3,"hint"],[1,"text-heading-lg"],[1,"w-full","h-[1px]","bg-neutral-gray-1","md:hidden"],[1,"flex","gap-x-2","items-center","md:flex-col","md:gap-y-2","md:items-baseline","md:justify-start"],["icon","clock","size","small"],[3,"color","size"],[1,"flex","justify-between","gap-x-6","md:flex-col","md:gap-y-4"],[1,"!w-1/2","md:!w-full",3,"status"],["cfHeadIcon","","icon","calendar","size","small"],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y k\u1ebft th\xfac",1,"py-[7px]",3,"secondaryCalendar","displayMonths","minDate","maxDate","formControl","input","dateSelect","click","mousedown"],["dateFrom","cfDatepicker"],["datepickerBottomSheet",""],[1,"!w-1/2","md:!w-full"],["textField","text","valueField","value",1,"!max-w-none","md:!max-w-full",3,"status","data","placeholder","allowSearch","formControl","selectedChange"],["cfHeadIcon","","icon","clock","size","small"],[1,"w-full","h-[1px]","bg-neutral-gray-1"],[1,"flex","justify-between","items-start"],["icon","price_down","size","small"],[1,"cursor-pointer",3,"click"],[1,"pointer-events-none",3,"checked"],["class","",4,"ngIf"],["icon","seat","size","small"],[1,"border","border-dashed","border-neutral-gray-3","rounded"],[1,"py-[9px]","px-[14px]","flex","items-center","gap-x-2","cursor-pointer",3,"click"],["icon","filter","size","small"],[1,"flex-1"],["icon","plus","size","small",4,"ngIf"],["icon","remove","size","small",4,"ngIf"],["class","p-4 border-t border-neutral-gray-2",4,"ngIf"],[1,"flex","w-full","flex-col","justify-between"],["infinite-scroll","",1,"w-full","flex",3,"infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollUpDistance","scrollWindow","fromRoot","alwaysCallback","infiniteScrollContainer","scrolled"],["outsideDays","hidden","navigation","none","direction","vertical",1,"",3,"minDate","displayMonths","rangeSelection","secondaryCalendar","formControl","maxDate","fromDate","displayMonthsOffset"],[1,"p-6","w-full","bg-neutral-white"],[1,"flex","gap-x-4"],["cf-button","","type","secondary",1,"justify-center","w-full",3,"click"],["cf-button","",1,"justify-center","w-full",3,"disabled","click"],[1,""],[1,"!w-full",3,"status"],["cfLabel",""],["size","medium",3,"placeholder","decimal","negative","formControl","ngModelChange"],[1,"flex","justify-between","items-center","border","border-[#CCCCCC]","rounded","mt-2","mb-2","cursor-pointer","p-2",3,"click"],["id","faresgroup",1,"flex","flex-wrap","gap-2","max-h-[7em]","overflow-y-auto"],["class","text-neutral-gray-4 text-body-md-short",4,"ngIf"],["class","flex items-center gap-2 flex-wrap",4,"ngIf"],["icon","chevron_down","size","small",1,"cursor-pointer"],[1,"text-neutral-gray-4","text-body-md-short"],[1,"flex","items-center","gap-2","flex-wrap"],["class","flex items-center gap-x-2",4,"ngFor","ngForOf"],["class","border border-neutral-gray-1 flex items-center gap-x-2 bg-[#F2F2F2] text-espressive-sm p-1",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"border","border-neutral-gray-1","flex","items-center","gap-x-2","bg-[#F2F2F2]","text-espressive-sm","p-1"],["icon","close","size","small",3,"click"],["icon","plus","size","small"],["icon","remove","size","small"],[1,"p-4","border-t","border-neutral-gray-2"],[1,"flex","items-center","justify-between","gap-x-2"],["icon","notification","size","small",1,"inline-block"],[3,"disabled","checked","checkedChange"],[1,"text-body-md","pl-6"],[1,"flex","flex-col","gap-y-4"],["icon","plane","size","small"],[1,"border","border-dashed","border-neutral-gray-3","rounded-lg","p-3","flex","flex-col","gap-y-4"],[1,"flex","gap-x-4","justify-end","items-center","border-t","border-neutral-gray-2","pt-2"],[1,"min-w-[104px]","text-heading-sm","text-right"],["icon","users","size","small"],[1,"border","border-dashed","border-neutral-gray-2","rounded-lg","p-3","flex","flex-col","gap-y-2"],["icon","clipboard_list","size","small"],[1,"p-3","border-b","border-neutral-gray-1","flex","gap-x-3","md:flex-col"],[1,"min-w-[142px]","whitespace-nowrap","text-body-md-short","text-neutral-black"],[1,"flex-1","text-express-md","text-neutral-gray-6"],["class","p-3 border-b border-neutral-gray-1 flex gap-x-3 md:flex-col",4,"ngIf"],["class","flex items-start justify-between gap-x-2",4,"ngIf"],["icon","circle_information","size","small"],[1,"flex","flex-col","gap-y-2","text-body-md-short"],[1,"flex","gap-x-3"],["icon","price_up","size","small"],["icon","document_check","size","small"],[1,"text-secondary-3-4"],[1,"flex","justify-between","gap-x-3","md:hidden"],[1,"flex","items-center","mr-4"],[1,"flex","justify-center","items-center","w-[22px]","h-[22px]","rounded-full","bg-neutral-gray-1","text-neutral-gray-4","text-heading-sm"],[1,"w-[80px]","flex-shrink-0","px-4"],[1,"w-[80px]","h-[40px]","object-contain",3,"src"],[1,"flex","flex-col","items-center"],[1,"text-heading-sm"],[1,"text-express-sm","text-neutral-gray-4"],[1,"flex","gap-x-1","items-center"],[1,"flex","flex-col","items-center","gap-y-1","text-express-sm","text-neutral-gray-4","relative"],[1,"flex","items-center"],[1,"w-1","h-1","bg-neutral-gray-3","rounded-full"],[1,"w-[100px]","h-[1px]","bg-neutral-gray-3"],["icon","plane","size","small",1,"text-neutral-gray-3"],[1,"hidden","md:flex","flex-col","gap-y-3"],[1,"flex","justify-between","gap-x-3"],[1,"flex-1","flex","flex-col","items-start"],[1,"flex","justify-end","gap-x-3"],[1,"w-[66px]","h-[1px]","bg-neutral-gray-3"],["class","w-full h-[1px] bg-neutral-gray-1",4,"ngIf"],[1,"flex","gap-x-2","justify-start"],[1,"flex","flex-col","gap-y-2"],["class","text-body-sm",4,"ngIf"],[1,"flex","items-start","justify-between","gap-x-2"],["icon","coupon","size","small",1,"inline-block"],["class","text-body-md pl-6 text-neutral-gray-4",4,"ngIf"],[1,"text-body-md","pl-6","text-neutral-gray-4"],[1,"flex","justify-end","gap-x-2","md:justify-between"],["cf-button","","size","medium","type","secondary",1,"justify-center","md:w-full","md:hidden",3,"click"],["cf-button","","size","medium","type","secondary",1,"justify-center","md:w-full","hidden","md:flex",3,"click"],["icon","chevron_left","size","small",1,"mr-2.5"],["cf-button","","size","medium","color","primary-1",1,"justify-center","md:w-full",3,"disabled","click"],["icon","chevron_right","size","small",1,"ml-2.5"],["cf-button","","size","medium","type","secondary",1,"justify-center","md:w-full",3,"click"],["icon","circle_check","size","small",1,"ml-2.5"],["class","px-2.5 py-1 rounded bg-black bg-opacity-30 flex items-center gap-x-2 cursor-default",4,"ngIf"],[1,"px-2.5","py-1","rounded","bg-black","bg-opacity-30","flex","items-center","gap-x-2","cursor-default"],[1,"text-neutral-white","text-button-md"],["icon","circle_help","size","small",1,"text-neutral-white"],["class","inline-flex gap-x-1 items-center whitespace-nowrap text-express-md text-neutral-white px-2 py-1 rounded bg-black bg-opacity-30",4,"ngIf"],[1,"inline-flex","gap-x-1","items-center","whitespace-nowrap","text-express-md","text-neutral-white","px-2","py-1","rounded","bg-black","bg-opacity-30"],[1,"line-through"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3),e.qZA(),e.TgZ(4,"cf-icon",3),e.NdJ("click",function(){return n.close()}),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,Ce,40,3,"div",5),e.YNc(7,qe,77,17,"div",5),e.qZA(),e.TgZ(8,"div",6),e.YNc(9,Ye,10,1,"div",7),e.YNc(10,Je,7,1,"div",7),e.qZA()(),e.YNc(11,Ke,2,2,"ng-template",null,8,e.W1O),e.YNc(13,Ve,2,2,"ng-template",null,9,e.W1O),e.YNc(15,We,1,0,"cf-spinner",10)),2&t&&(e.xp6(3),e.Oqu(n.title),e.xp6(3),e.Q6J("ngIf",n.step===n.STEP_ORDER.CREATE),e.xp6(1),e.Q6J("ngIf",n.step===n.STEP_ORDER.REVIEW),e.xp6(2),e.Q6J("ngIf","CREATE"===n.step),e.xp6(1),e.Q6J("ngIf",n.step===n.STEP_ORDER.REVIEW),e.xp6(5),e.Q6J("ngIf",n.isLoading))},dependencies:[A.ez,A.sg,A.O5,A.JJ,A.uU,v.AxE,v.Sm8,P.N8,P.Xq,U.q,T.u5,T.Fj,T.JJ,T.UX,T.oH,B.I,o.j$,o.ND,o.BN,o.lt,Z.OR,D.Cs,l.f,I.b,w.m,m.Rq,m.Ry,J.DW,D._o,M._],encapsulation:2}),i})()},61545:(Y,k,u)=>{u.d(k,{_:()=>m});var A=u(98184),T=u(36895),P=u(37094),D=u(72506),w=u(74891),v=u(24513),o=u(67460),I=u(38514),l=u(94650),U=u(9381);let B=(()=>{class p{constructor(){this.openTooltipAvailables=[]}addToolTip(g){this.openTooltipAvailables.push(g)}closeAllTooltip(){for(const g of this.openTooltipAvailables)g.hideTooltip();this.openTooltipAvailables=[]}getAllTooltip(){return this.openTooltipAvailables}}return p.\u0275fac=function(g){return new(g||p)},p.\u0275prov=l.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"}),p})();const Z=["tooltipAvailable"];function b(p,E){1&p&&l.GkF(0)}function N(p,E){if(1&p&&(l.TgZ(0,"div"),l.YNc(1,b,1,0,"ng-container",5),l.qZA()),2&p){const g=l.oxw(2);l.xp6(1),l.Q6J("ngTemplateOutlet",g.content)}}function S(p,E){if(1&p){const g=l.EpF();l.TgZ(0,"div",2,3),l.NdJ("click",function(F){l.CHM(g);const M=l.oxw();return l.KtG(M.toggleTooltip(F))}),l.YNc(2,N,2,1,"div",4),l.qZA()}if(2&p){const g=l.oxw(),y=l.MAs(2);l.Q6J("manualHandle",!0)("placement","topCenter")("cfTooltip",y),l.xp6(2),l.Q6J("ngIf",g.content)}}function C(p,E){1&p&&(l.TgZ(0,"li"),l._uU(1,"T\u1eeb y\xeau c\u1ea7u th\u1ee9 3 s\u1ebd b\u1eaft \u0111\u1ea7u thu ph\xed n\u1ebfu canh th\xe0nh c\xf4ng."),l.qZA())}function x(p,E){1&p&&(l.TgZ(0,"li"),l._uU(1,"T\u1eeb y\xeau c\u1ea7u th\u1ee9 3 s\u1ebd b\u1eaft \u0111\u1ea7u thu ph\xed n\u1ebfu s\u0103n th\xe0nh c\xf4ng."),l.qZA())}function _(p,E){if(1&p){const g=l.EpF();l.TgZ(0,"div",6)(1,"div",7)(2,"ul",8)(3,"li"),l._uU(4," B\u1ea1n \u0111\u01b0\u1ee3c "),l.TgZ(5,"strong"),l._uU(6,"mi\u1ec5n ph\xed"),l.qZA(),l._uU(7," t\u1ed1i \u0111a 2 y\xeau c\u1ea7u ho\u1ea1t \u0111\u1ed9ng c\xf9ng l\xfac. "),l.qZA(),l.YNc(8,C,2,0,"li",4),l.YNc(9,x,2,0,"li",4),l.qZA()(),l.TgZ(10,"cf-icon",9),l.NdJ("click",function(){l.CHM(g);const F=l.oxw();return l.KtG(F.closeTooltip())}),l.qZA()()}if(2&p){const g=l.oxw();l.xp6(8),l.Q6J("ngIf",g.availableSlotData.type===g.TYPE_ORDER.DOWN_FARE_TICKET),l.xp6(1),l.Q6J("ngIf",g.availableSlotData.type===g.TYPE_ORDER.HUNT_NEW_TICKET)}}let m=(()=>{class p{constructor(g,y,F,M){this._mobileDetectService=y,this._bottomSheetService=F,this._tooltipAvailableSlotService=M,this.isShowTooltipAvailable=!1,this.TYPE_ORDER=I.G,g.registerIcons([D.UNF,D.SK7])}clickout(){this.isShowTooltipAvailable&&!this._mobileDetectService.isMobile()&&(this._tooltipAvailableSlotService.closeAllTooltip(),this.isShowTooltipAvailable=!1)}toggleTooltip(g){if(g.preventDefault(),g.stopPropagation(),this._tooltipAvailableSlotService.closeAllTooltip(),this.isShowTooltipAvailable=!this.isShowTooltipAvailable,this.isShowTooltipAvailable)if(this._mobileDetectService.isMobile()){const y=this.availableSlotData.type===I.G.DOWN_FARE_TICKET?`<ul class="list-disc text-left">\n <li> B\u1ea1n \u0111\u01b0\u1ee3c <strong>mi\u1ec5n ph\xed</strong> t\u1ed1i \u0111a 2 y\xeau c\u1ea7u ho\u1ea1t \u0111\u1ed9ng c\xf9ng l\xfac. </li>\n <li><strong>T\u1eeb y\xeau c\u1ea7u th\u1ee9 3 s\u1ebd b\u1eaft \u0111\u1ea7u thu ph\xed n\u1ebfu canh th\xe0nh c\xf4ng.</strong></li>\n <li>B\u1ea1n kh\xf4ng m\u1ea5t b\u1ea5t c\u1ee9 kho\u1ea3n ph\xed n\u1ebfu kh\xf4ng canh \u0111\u01b0\u1ee3c v\xe9. C\xf3 th\u1ec3 h\u1ee7y canh v\xe9 b\u1ea5t k\xec l\xfac n\xe0o!</li>\n <li>N\u1ebfu canh \u0111\u01b0\u1ee3c v\xe9, b\u1ea1n s\u1ebd tr\u1ea3 ph\xed d\u1ecbch v\u1ee5 ${this.availableSlotData.amount}${this.availableSlotData.currency} ch\xeanh l\u1ec7ch gi\xe1 v\xe9 m\u1edbi so v\u1edbi gi\xe1 v\xe9 ban \u0111\u1ea7u.</li>\n </ul>`:`<ul class="list-disc text-left">\n <li> B\u1ea1n \u0111\u01b0\u1ee3c <strong>mi\u1ec5n ph\xed</strong> t\u1ed1i \u0111a 2 y\xeau c\u1ea7u ho\u1ea1t \u0111\u1ed9ng c\xf9ng l\xfac. </li>\n <li><strong>T\u1eeb y\xeau c\u1ea7u th\u1ee9 3 s\u1ebd b\u1eaft \u0111\u1ea7u thu ph\xed n\u1ebfu s\u0103n th\xe0nh c\xf4ng.</strong></li>\n <li>B\u1ea1n kh\xf4ng m\u1ea5t b\u1ea5t c\u1ee9 kho\u1ea3n ph\xed n\u1ebfu kh\xf4ng s\u0103n \u0111\u01b0\u1ee3c v\xe9. C\xf3 th\u1ec3 h\u1ee7y s\u0103n v\xe9 b\u1ea5t k\xec l\xfac n\xe0o!</li>\n <li>N\u1ebfu s\u0103n \u0111\u01b0\u1ee3c v\xe9, b\u1ea1n s\u1ebd tr\u1ea3 ph\xed d\u1ecbch v\u1ee5 ${new Intl.NumberFormat("vi-VN").format(this.availableSlotData.amount)}${this.availableSlotData.currency}/pax (ch\u1ec9 t\xednh h\xe0nh kh\xe1ch ADT v\xe0 CHD).</li>\n </ul>`,F=this._bottomSheetService.open(o.Q4,{headerTitle:"C\xe1ch t\xednh ph\xed",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:"",data:{body:y,okText:"\u0110\xe3 hi\u1ec3u",cancelText:"",hasIcon:!1}});F.containerInstance._leftButtonClick.subscribe(()=>{F.dismiss()})}else this.tooltipAvailable.showTooltip(),this._tooltipAvailableSlotService.addToolTip(this.tooltipAvailable);else this.tooltipAvailable.hideTooltip()}closeTooltip(){this.tooltipAvailable.hideTooltip()}}return p.\u0275fac=function(g){return new(g||p)(l.Y36(D.KNP),l.Y36(U.L),l.Y36(P.a2),l.Y36(B))},p.\u0275cmp=l.Xpm({type:p,selectors:[["tooltip-available-slot"]],viewQuery:function(g,y){if(1&g&&l.Gf(Z,5,v.Lk),2&g){let F;l.iGM(F=l.CRH())&&(y.tooltipAvailable=F.first)}},hostBindings:function(g,y){1&g&&l.NdJ("click",function(M){return y.clickout(M)},!1,l.evT)},inputs:{content:"content",availableSlotData:"availableSlotData"},standalone:!0,features:[l.jDz],decls:3,vars:1,consts:[["class","whitespace-nowrap cursor-default",3,"manualHandle","placement","cfTooltip","click",4,"ngIf"],["toolTipTemplate",""],[1,"whitespace-nowrap","cursor-default",3,"manualHandle","placement","cfTooltip","click"],["tooltipAvailable",""],[4,"ngIf"],[4,"ngTemplateOutlet"],[1,"flex","justify-between","gap-x-2","max-w-[260px]","!ml-3"],[1,"text-body-sm"],[1,"list-disc"],["icon","close","size","small",1,"text-neutral-white",3,"click"]],template:function(g,y){1&g&&(l.YNc(0,S,3,4,"div",0),l.YNc(1,_,11,2,"ng-template",null,1,l.W1O)),2&g&&l.Q6J("ngIf",y.availableSlotData)},dependencies:[T.ez,T.O5,T.tP,D.AxE,D.Sm8,v.Lk,w.f,A.U8,P.DW],encapsulation:2}),p})()}}]);