-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3777.51ab308eb1ffe0a2.js
1 lines (1 loc) · 90.9 KB
/
3777.51ab308eb1ffe0a2.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[3777],{11787:(N,O,u)=>{u.d(O,{x:()=>t});var v=u(94650);let t=(()=>{class e{get btcResultData(){return JSON.parse(sessionStorage.getItem("btcResultData"))}set btcResultData(C){sessionStorage.setItem("btcResultData",JSON.stringify(C))}get btcCampaignData(){return JSON.parse(sessionStorage.getItem("btcCampaignData"))}set btcCampaignData(C){sessionStorage.setItem("btcCampaignData",JSON.stringify(C))}}return e.\u0275fac=function(C){return new(C||e)},e.\u0275prov=v.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},31380:(N,O,u)=>{u.d(O,{J:()=>S});var v=u(24006);class t{}var D=u(15439),C=u(50518),d=u(64070),M=u(94650),k=u(28490);let S=(()=>{class E{constructor(m,p){this._fb=m,this._locationDataSvc=p}updateJourneyByType(m,p){var y,h,a,_,r;const s=null===(y=m.controls[0])||void 0===y?void 0:y.value;"ONE_WAY"==p?(m.clear(),this.addJourney(s,m,p),null===(h=m.get("returnDate"))||void 0===h||h.clearValidators(),null===(a=m.get("returnDate"))||void 0===a||a.updateValueAndValidity()):"ROUND_TRIP"==p&&(m.clear(),this.addJourney(s,m,p),null===(_=m.get("returnDate"))||void 0===_||_.setValidators(v.kI.required),null===(r=m.get("returnDate"))||void 0===r||r.updateValueAndValidity())}addJourney(m,p,y){const h=this._fb.group({startPoint:[m.startPoint,v.kI.required],endPoint:[m.endPoint,v.kI.required],departDate:[m.departDate,v.kI.required],returnDate:[m.returnDate,"ROUND_TRIP"===y?v.kI.required:null],cabin:[null],paxType:[null],airline:[null]});h.patchValue(m),p.push(h)}resetCabinList(m){return m.map(p=>Object.assign(Object.assign({},p),{actived:"ECONOMY"===p.value}))}resetPaxTypeList(m){return m.map(p=>Object.assign(Object.assign({},p),{actived:""===p.value}))}progressAirlineFileByInternational(m,p,y){const h=y?y.split(","):[];return m.map(p?a=>Object.assign(Object.assign({},a),{actived:h.includes(a.value)||a.value.split(",").some(_=>h.includes(_)),disabled:!1}):a=>Object.assign(Object.assign({},a),{actived:!["FLY_ONE","GDS,BSP,AIR_1G"].includes(a.value)&&(!!h.includes(a.value)||a.actived),disabled:["FLY_ONE","GDS,BSP,AIR_1G"].includes(a.value)}))}progressJourneyFormArr(m,p,y){return p!==d.VB.OneWay&&p===d.VB.RoundTrip&&m[0].returnDate?p===d.VB.RoundTrip&&m[0].returnDate?[Object.assign(Object.assign(Object.assign({},m[0]),y),{leg:0}),Object.assign({startPoint:m[0].endPoint,endPoint:m[0].startPoint,departDate:m[0].returnDate||null,leg:1},y)]:[]:[Object.assign(Object.assign(Object.assign({},m[0]),y),{leg:0})]}progressQueryToRawData(m){const p=new d.HA;if(m.p){const a=m.p.split("").map(Number);p.adultCount=a[0],p.childCount=a[1],p.infantCount=a[2]}else p.adultCount=1,p.childCount=0,p.infantCount=0;p.isDirectFlight="1"===m.d,p.journey=[];const y=m.c||null;Object.keys(m).forEach(a=>{if(a.startsWith("l")){const _=parseInt(a.substring(1)),[r,s,f]=m[a].split("_"),T=new t;T.leg=_,T.startPoint=r||"",T.endPoint=s||"",T.departDate=f?new Date(f):null,T.cabin=y||"",T.airline=m.a||"",T.paxType=m.pt||"",p.journey.push(T)}}),p.journey.length||p.journey.push({startPoint:"",endPoint:"",departDate:null,cabin:y||"",airline:m.a||"",paxType:m.pt||"",leg:0}),p.journey.sort((a,_)=>a.leg-_.leg),p.promotion=[],p.promotionGroupFilters=C.Sc.map(a=>{var _,r;const s=(null===(r=null===(_=m.pg)||void 0===_?void 0:_.split(",").find(f=>f.startsWith(a.airline)))||void 0===r?void 0:r.split("_")[1])||"";return Object.assign(Object.assign({},a),{selectedCode:s,items:s?[{code:s,description:s,isSystemPromotion:!1,isSelected:!0}]:[]})}),p.type=+m.t||d.VB.OneWay;const h=p.journey.some(a=>this._locationDataSvc.checkAirportInternational(a.startPoint)||this._locationDataSvc.checkAirportInternational(a.endPoint));return p.typeOfList=h&&p.type===d.VB.RoundTrip?d.YI.Combo:d.YI.Single,p}progressJourneyByType(m,p,y=[]){var h;const a=y.find(_=>0===_.leg);p===d.VB.MultiWay||(p===d.VB.RoundTrip?(m.clear(),this.addJourney(a?{startPoint:a.startPoint,endPoint:a.endPoint,departDate:a.departDate,returnDate:(null===(h=y.find(_=>1===_.leg))||void 0===h?void 0:h.departDate)||null}:{startPoint:null,endPoint:null,departDate:null,returnDate:null},m,p===d.VB.RoundTrip?"ROUND_TRIP":"ONE_WAY")):(m.clear(),this.addJourney(a?{startPoint:a.startPoint,endPoint:a.endPoint,departDate:a.departDate}:{startPoint:null,endPoint:null,departDate:null},m,p===d.VB.OneWay?"ONE_WAY":"ROUND_TRIP")))}compactInputData({adult:m,child:p,infant:y,journey:h,promotion:a,isDirectFlight:_,promotionGroupFilters:s}){const{cabin:T,airline:w,paxType:K}=h[0];let A={pr:a.map(I=>`${I.airline}_${I.code}`).join(","),pg:null!=s&&s.length?s.filter(I=>I.selectedCode).map(I=>`${I.airline}_${I.selectedCode}`).join(","):"",p:""+m+p+y,d:_?1:null,c:T,a:w,pt:K,t:1===h.length?0:2===h.length?1:2};return h.forEach(I=>{const{startPoint:x,endPoint:B,departDate:P,leg:J}=I,U=`l${J}`,Q=`${x}_${B}_${D(P).format("YYYY-MM-DD")}`;A[U]=Q}),A}removeEmptyFields(m){return Object.fromEntries(Object.entries(m).filter(([p,y])=>null!=y&&""!==y))}}return E.\u0275fac=function(m){return new(m||E)(M.LFG(v.qu),M.LFG(k._))},E.\u0275prov=M.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()},50518:(N,O,u)=>{u.d(O,{Av:()=>e,Mf:()=>M,S:()=>d,Sc:()=>t,St:()=>C,_q:()=>D});var v=u(64070);const t=[{airline:"VN",airlineLogo:"assets/icons/vn-icon.svg",items:[],selectedCode:""},{airline:"QH",airlineLogo:"assets/icons/qh-icon.svg",items:[],selectedCode:""},{airline:"VJ",airlineLogo:"assets/icons/vj-icon.svg",items:[],selectedCode:""},{airline:"GDS",airlineLogo:"assets/icons/gds-icon.svg",items:[],selectedCode:""}],e={adultCount:1,childCount:0,infantCount:0,journey:[{startPoint:"",endPoint:"",departDate:null,cabin:"",paxType:"",airline:"",leg:0}],promotion:[],isDirectFlight:!1,type:v.VB.OneWay,typeOfList:v.YI.Single,promotionGroupFilters:t},D=[{name:"Vietnam Airlines (VN)",value:"VN",airlineDisplay:"VN",actived:!1,logo:"assets/icons/vn-icon.svg",disabled:!1},{name:"Vietjet Air (VJ)",value:"VJ",airlineDisplay:"VJ",actived:!1,logo:"assets/icons/vj-icon.svg",disabled:!1},{name:"Bamboo Airways (QH)",value:"QH",airlineDisplay:"QH",actived:!1,logo:"assets/icons/qh-icon.svg",disabled:!1},{name:"Vietravel Airlines (VU)",value:"VU",airlineDisplay:"VU",actived:!1,logo:"assets/icons/vu-icon.png",disabled:!1},{name:"Low Cost Carrier (LCC)",value:"FLY_ONE",airlineDisplay:"LCC",actived:!1,logo:"assets/icons/airline-default-icon.svg",disabled:!0},{name:"GDS (1G, 1A)",value:"GDS,BSP,AIR_1G",airlineDisplay:"GDS, 1A, 1G",actived:!1,logo:"assets/icons/airline-default-icon.svg",disabled:!0}],C=[{value:"ECONOMY",name:"Economy",actived:!1},{value:"PREMIUM_ECONOMY",name:"Premium Economy",actived:!1},{value:"FIRST",name:"First",actived:!1},{value:"BUSINESS",name:"Business",actived:!1}],d=[{value:"",name:"B\xecnh th\u01b0\u1eddng",actived:!1},{value:"LBR",name:"Lao \u0111\u1ed9ng",actived:!1},{value:"STU",name:"Du h\u1ecdc sinh",actived:!1},{value:"EMI",name:"Nh\u1eadp c\u01b0",actived:!1},{value:"SEA",name:"Thuy\u1ec1n vi\xean",actived:!1}],M=[{key:"flight",value:"Chi ti\u1ebft chuy\u1ebfn bay",valueMobile:"H\xe0nh tr\xecnh"},{key:"ticket",value:"Chi ti\u1ebft v\xe9",valueMobile:"Gi\xe1 v\xe9"},{key:"rule",value:"\u0110i\u1ec1u ki\u1ec7n gi\xe1 v\xe9",valueMobile:"\u0110i\u1ec1u ki\u1ec7n gi\xe1 v\xe9"}]},41047:(N,O,u)=>{u.d(O,{B:()=>v});const v=t=>Object.entries(t).map(([D,C])=>((D,C)=>null==C||"string"==typeof C&&""===C?null:Array.isArray(C)?`${D}=${C.map(d=>encodeURIComponent(String(d))).join(",")}`:"object"==typeof C?v(C):`${D}=${encodeURIComponent(String(C))}`)(D,C)).filter(D=>null!==D).join("&")},64070:(N,O,u)=>{u.d(O,{HA:()=>v,VB:()=>D,YI:()=>e});class v{constructor(){this.journey=[]}}var e=(()=>{return(d=e||(e={}))[d.Single=0]="Single",d[d.Combo=1]="Combo",e;var d})(),D=(()=>{return(d=D||(D={}))[d.OneWay=0]="OneWay",d[d.RoundTrip=1]="RoundTrip",d[d.MultiWay=2]="MultiWay",D;var d})()},54646:(N,O,u)=>{u.d(O,{x:()=>m});var v=u(36895),t=u(94650),e=u(83700),D=u(27898),C=u(72506),d=u(74891),M=u(80429),k=u(37094),S=u(98184);function E(p,y){if(1&p){const h=t.EpF();t.TgZ(0,"div",19)(1,"cf-checkbox",20),t.NdJ("checkChange",function(_){const s=t.CHM(h).$implicit,f=t.oxw(2);return t.KtG(f.checkChange(_,s.value))}),t.TgZ(2,"div",13),t._UZ(3,"img",21),t.TgZ(4,"div",22),t._uU(5),t.qZA()()()()}if(2&p){const h=y.$implicit;t.xp6(1),t.Q6J("disabled",h.disabled)("checked",h.actived),t.xp6(2),t.Q6J("src",h.logo,t.LSH),t.xp6(2),t.hij(" ",h.name," ")}}function Z(p,y){if(1&p){const h=t.EpF();t.TgZ(0,"div",10)(1,"div",11)(2,"cf-checkbox",12),t.NdJ("checkChange",function(_){t.CHM(h);const r=t.oxw();return t.KtG(r.checkChange(_,"ALL"))}),t.TgZ(3,"div",13)(4,"div",14),t._uU(5,"H\xe3ng bay"),t.qZA()()(),t.TgZ(6,"div",15),t.YNc(7,E,6,4,"div",16),t.qZA()(),t.TgZ(8,"div",17)(9,"button",18),t.NdJ("click",function(){t.CHM(h);const _=t.oxw();return t.KtG(_.closeBotomSheet())}),t._uU(10,"X\xe1c nh\u1eadn"),t.qZA()()()}if(2&p){const h=t.oxw();t.xp6(2),t.Q6J("checked",h.isSelectedAll),t.xp6(5),t.Q6J("ngForOf",h.airlineList)}}let m=(()=>{class p{constructor(h){this.bottomSheetService=h,this.airlineFilterChange=new t.vpe,this.isOpen=!1,this.airlineSelected=[],this.title="T\u1ea5t c\u1ea3 c\xe1c h\xe3ng",this.isSelectedAll=!1,this.viewTitle=a=>null!=a&&a.every(_=>_.disabled&&!_.actived||!_.disabled&&!_.actived)||null!=a&&a.every(_=>!_.disabled&&_.actived||_.disabled&&!_.actived)?"T\u1ea5t c\u1ea3 c\xe1c h\xe3ng":null==a?void 0:a.filter(_=>!_.disabled&&_.actived).map(_=>_.airlineDisplay).join(", ")}ngOnChanges(h){this.airlineList&&this.airlineList.length&&this.checkSelectedAll()}ngOnInit(){this.airlineSelected=this.airlineList.filter(h=>h.actived).map(h=>h.airlineDisplay),this.checkSelectedAll()}click(h,a){matchMedia("(max-width: 768px)").matches?this.openBottomSheet(a):this.isOpen=!this.isOpen,h.stopPropagation()}outsideClick(h){this.isOpen=!1}checkChange(h,a){this.airlineList="ALL"===a?[...this.airlineList.map(s=>s.disabled?s:Object.assign(Object.assign({},s),{actived:h}))]:[...this.airlineList.map(s=>s.value===a?Object.assign(Object.assign({},s),{actived:h}):s)];const _=this.airlineList.filter(s=>s.actived);this.airlineSelected=_.map(s=>s.airlineDisplay);const r=_.map(s=>s.value);this.checkSelectedAll(),this.airlineFilterChange.emit(r)}checkSelectedAll(){this.isSelectedAll=this.airlineList.filter(h=>!h.disabled).every(h=>h.actived)}openBottomSheet(h){this.bottomSheetService.open(h,{headerTitle:"H\xe3ng bay",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0}).containerInstance._rightButtonClick.subscribe(()=>this.bottomSheetService.dismiss())}closeBotomSheet(){this.bottomSheetService.dismiss()}}return p.\u0275fac=function(h){return new(h||p)(t.Y36(k.a2))},p.\u0275cmp=t.Xpm({type:p,selectors:[["btc-airline-filter"]],inputs:{airlineList:"airlineList"},outputs:{airlineFilterChange:"airlineFilterChange"},standalone:!0,features:[t.TTD,t.jDz],decls:16,vars:10,consts:[["cdkOverlayOrigin","","tabIndex","-1",1,"cursor-pointer",3,"click"],["trigger","","originOverlay","cdkOverlayOrigin"],[1,"md:hidden","flex","items-center","gap-x-2","border","border-neutral-gray-3","rounded-full","px-4","py-1"],["icon","grid","size","small",1,"text-neutral-gray-5"],[1,"text-body-md","text-neutral-black"],["icon","down","size","small",1,"text-neutral-gray-5"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex"],[1,"text-body-md","whitespace-nowrap"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","overlayOutsideClick"],["bottomSheet",""],[1,"p-4","shadow-cf-lg","w-[280px]","bg-neutral-white","rounded","md:w-full","flex","flex-col"],[1,"flex","flex-col","gap-y-2"],["size","medium",1,"inline-flex",3,"checked","checkChange"],[1,"flex","items-center","gap-x-2"],[1,"text-heading-sm","text-neutral-black"],[1,"flex","flex-col","gap-y-2","md:gap-y-4"],["class","flex items-center",4,"ngFor","ngForOf"],[1,"hidden","md:flex","flex-1","justify-end","flex-col"],["cf-button","",1,"w-full","justify-center",3,"click"],[1,"flex","items-center"],["size","medium",3,"disabled","checked","checkChange"],[1,"w-6","h-6","object-contain",3,"src"],[1,"text-body-md-long"]],template:function(h,a){if(1&h){const _=t.EpF();t.TgZ(0,"div",0,1),t.NdJ("click",function(s){t.CHM(_);const f=t.MAs(15);return t.KtG(a.click(s,f))}),t.TgZ(3,"div",2),t._UZ(4,"cf-icon",3),t.TgZ(5,"div",4),t._uU(6),t.ALo(7,"mapper"),t.qZA(),t._UZ(8,"cf-icon",5),t.qZA(),t.TgZ(9,"div",6),t._UZ(10,"cf-icon",3),t.TgZ(11,"div",7),t._uU(12),t.ALo(13,"mapper"),t.qZA()()(),t.YNc(14,Z,11,2,"ng-template",8,9,t.W1O),t.NdJ("overlayOutsideClick",function(s){return a.outsideClick(s)})}if(2&h){const _=t.MAs(2);t.xp6(6),t.Oqu(t.xi3(7,4,a.airlineList,a.viewTitle)),t.xp6(6),t.Oqu(t.xi3(13,7,a.airlineList,a.viewTitle)),t.xp6(2),t.Q6J("cdkConnectedOverlayOrigin",_)("cdkConnectedOverlayOpen",a.isOpen)}},dependencies:[C.AxE,C.Sm8,d.f,S.pI,S.xu,D.u,v.ax,e.N8,e.Xq,M.q],styles:[":host{display:block}\n"],encapsulation:2,changeDetection:0}),p})()},99137:(N,O,u)=>{u.d(O,{w:()=>h});var v=u(98184),t=u(36895),e=u(94650),D=u(24006),C=u(83700),d=u(72506),M=u(74891),k=u(19123),S=u(80429),E=u(37094);const Z=["bottomSheet"];function m(a,_){if(1&a){const r=e.EpF();e.ynx(0),e.TgZ(1,"cf-radio",19),e.NdJ("checkChange",function(){const T=e.CHM(r).$implicit,w=e.oxw(2);return e.KtG(w.onCabinSelected(T))}),e._uU(2),e.qZA(),e.BQk()}if(2&a){const r=_.$implicit;e.xp6(1),e.Q6J("value",r.value),e.xp6(1),e.Oqu(r.name)}}function p(a,_){if(1&a){const r=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13),e._uU(4,"Khoang h\u1ea1ng"),e.qZA()(),e.TgZ(5,"div",14)(6,"cf-radio-group",15),e.NdJ("ngModelChange",function(f){e.CHM(r);const T=e.oxw();return e.KtG(T.cabinSelectedTemp=f)}),e.YNc(7,m,3,2,"ng-container",16),e.qZA()()(),e.TgZ(8,"div",17)(9,"button",18),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.submitBottomSheet())}),e._uU(10,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&a){const r=e.oxw();e.xp6(6),e.Q6J("ngModel",r.cabinSelectedTemp),e.xp6(1),e.Q6J("ngForOf",r.cabinList)}}const y=function(a){return{"opacity-30 pointer-events-none":a}};let h=(()=>{class a{constructor(r,s){this.cfIconRegister=r,this.bottomSheetService=s,this.isOpen=!1,this.bottomCenter=[{originX:"start",originY:"bottom",overlayX:"center",overlayY:"top",offsetX:0,offsetY:0}],this.cabinChange=new e.vpe,this.cabinSelected=f=>f.find(T=>T.actived),this.cfIconRegister.registerIcons([d.Nnv,d._7G])}ngOnChanges(r){var s;r.cabinList&&(this.cabinSelectedTemp=null===(s=this.cabinSelected(this.cabinList))||void 0===s?void 0:s.value)}click(r){this.actived&&(this.isOpen=!this.isOpen,r.stopPropagation())}outsideClick(){this.isOpen=!1}onCabinSelected(r){if(matchMedia("(max-width: 768px)").matches)this.cabinSelectedTemp=r.value;else{const s=Object.assign(Object.assign({},r),{actived:!r.actived});this.cabinChange.emit(s),this.isOpen=!1}}openBottomSheet(){var r;this.actived&&(this.cabinSelectedTemp=null===(r=this.cabinSelected(this.cabinList))||void 0===r?void 0:r.value,this.bottomSheetService.open(this.bottomSheet,{headerTitle:"Khoang h\u1ea1ng",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0}).containerInstance._rightButtonClick.subscribe(()=>this.bottomSheetService.dismiss()))}submitBottomSheet(){const r=this.cabinList.find(s=>s.value===this.cabinSelectedTemp);this.cabinChange.emit(r),this.bottomSheetService.dismiss()}}return a.\u0275fac=function(r){return new(r||a)(e.Y36(d.KNP),e.Y36(E.a2))},a.\u0275cmp=e.Xpm({type:a,selectors:[["btc-cabin-selector"]],viewQuery:function(r,s){if(1&r&&e.Gf(Z,5),2&r){let f;e.iGM(f=e.CRH())&&(s.bottomSheet=f.first)}},inputs:{cabinList:"cabinList",actived:"actived"},outputs:{cabinChange:"cabinChange"},standalone:!0,features:[e.TTD,e.jDz],decls:16,vars:17,consts:[[1,"hidden","md:flex","gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]",3,"ngClass","click"],["icon","seat","size","small",1,"text-neutral-gray-5"],[1,"text-body-md","whitespace-nowrap"],["cdkOverlayOrigin","","tabIndex","-1",1,"cursor-pointer","md:hidden","border","border-neutral-gray-3","rounded-full","px-4","py-1",3,"ngClass","click"],["trigger","","originOverlay","cdkOverlayOrigin"],[1,"flex","items-center","gap-x-2"],[1,"text-body-md","text-neutral-black","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick"],["bottomSheet",""],[1,"shadow-cf-lg","w-[220px]","justify-between","bg-neutral-white","rounded","md:w-full","p-4","flex","flex-col","gap-y-4"],[1,"flex","flex-col","w-full","gap-y-4"],[1,"flex","justify-start","items-center","rounded","md:hidden"],[1,"text-heading-sm","text-neutral-black"],[1,"flex","flex-col","gap-y-4"],[1,"flex","flex-col","gap-y-2.5",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[1,"hidden","md:block"],["cf-button","",1,"w-full","justify-center",3,"click"],["size","medium",3,"value","checkChange"]],template:function(r,s){if(1&r&&(e.TgZ(0,"div",0),e.NdJ("click",function(){return s.openBottomSheet()}),e._UZ(1,"cf-icon",1),e.TgZ(2,"div",2),e._uU(3),e.ALo(4,"mapper"),e.qZA()(),e.TgZ(5,"div",3,4),e.NdJ("click",function(T){return s.click(T)}),e.TgZ(8,"div",5),e._UZ(9,"cf-icon",1),e.TgZ(10,"div",6),e._uU(11),e.ALo(12,"mapper"),e.qZA(),e._UZ(13,"cf-icon",7),e.qZA()(),e.YNc(14,p,11,2,"ng-template",8,9,e.W1O),e.NdJ("overlayOutsideClick",function(){return s.outsideClick()})),2&r){const f=e.MAs(7);let T,w;e.Q6J("ngClass",e.VKq(13,y,!s.actived)),e.xp6(3),e.hij(" ",(null==(T=e.xi3(4,7,s.cabinList,s.cabinSelected))?null:T.name)||"Khoang h\u1ea1ng",""),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,!s.actived)),e.xp6(6),e.hij(" ",(null==(w=e.xi3(12,10,s.cabinList,s.cabinSelected))?null:w.name)||"Khoang h\u1ea1ng"," "),e.xp6(3),e.Q6J("cdkConnectedOverlayOrigin",f)("cdkConnectedOverlayOpen",s.isOpen)("cdkConnectedOverlayPositions",s.bottomCenter)}},dependencies:[t.ez,t.mk,t.sg,d.AxE,d.Sm8,M.f,v.pI,v.xu,v.U8,k.o,k.T,D.u5,D.JJ,D.On,C.N8,C.Xq,S.q],styles:["[_nghost-%COMP%]{display:block}"]}),a})()},53620:(N,O,u)=>{u.d(O,{l:()=>h});var v=u(98184),t=u(36895),e=u(94650),D=u(37094),C=u(83700),d=u(72506),M=u(74891);const k=["bottomSheet"];function S(a,_){1&a&&e._UZ(0,"cf-icon",12)}function E(a,_){if(1&a&&(e.TgZ(0,"div",8),e._UZ(1,"cf-icon",9),e.TgZ(2,"div",10),e._uU(3),e.qZA(),e.YNc(4,S,1,0,"cf-icon",11),e.qZA()),2&a){const r=e.oxw();e.xp6(3),e.hij("",r.adultNumber+r.childNumber," kh\xe1ch"),e.xp6(1),e.Q6J("ngIf",r.showIcon)}}function Z(a,_){if(1&a&&(e.TgZ(0,"div",13),e._UZ(1,"cf-icon",14),e.TgZ(2,"div",15)(3,"label",16),e._uU(4," H\xe0nh kh\xe1ch "),e.qZA(),e.TgZ(5,"div",10),e._uU(6),e.qZA()()()),2&a){const r=e.oxw();e.xp6(6),e.hij("",r.adultNumber+r.childNumber," kh\xe1ch")}}function m(a,_){if(1&a&&(e.TgZ(0,"div",17),e._UZ(1,"cf-icon",9),e.TgZ(2,"div",18),e._uU(3),e.qZA()()),2&a){const r=e.oxw();e.xp6(3),e.hij("",r.adultNumber+r.childNumber," kh\xe1ch")}}function p(a,_){if(1&a&&(e.TgZ(0,"div",19),e._UZ(1,"cf-icon",14),e.TgZ(2,"div",15)(3,"label",16),e._uU(4," H\xe0nh kh\xe1ch "),e.qZA(),e.TgZ(5,"div",10),e._uU(6),e.qZA()()()),2&a){const r=e.oxw();e.xp6(6),e.hij("",r.adultNumber+r.childNumber," kh\xe1ch")}}function y(a,_){if(1&a){const r=e.EpF();e.TgZ(0,"div",20)(1,"div",21)(2,"div",22),e._uU(3,"H\xe0nh kh\xe1ch"),e.qZA()(),e.TgZ(4,"div",23)(5,"div",24),e._UZ(6,"cf-icon",25),e.TgZ(7,"div",15)(8,"div",26),e._uU(9,"Ng\u01b0\u1eddi l\u1edbn"),e.qZA(),e.TgZ(10,"div",27),e._uU(11,"Tr\xean 12 tu\u1ed5i"),e.qZA()()(),e.TgZ(12,"div",28)(13,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.decrease("ADT"))}),e._UZ(14,"cf-icon",30),e.qZA(),e.TgZ(15,"div",31),e._uU(16),e.qZA(),e.TgZ(17,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.increase("ADT"))}),e._UZ(18,"cf-icon",32),e.qZA()()(),e.TgZ(19,"div",23)(20,"div",24),e._UZ(21,"cf-icon",25),e.TgZ(22,"div",15)(23,"div",26),e._uU(24,"Tr\u1ebb em"),e.qZA(),e.TgZ(25,"div",27),e._uU(26,"T\u1eeb 2 - 12 tu\u1ed5i"),e.qZA()()(),e.TgZ(27,"div",28)(28,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.decrease("CHD"))}),e._UZ(29,"cf-icon",30),e.qZA(),e.TgZ(30,"div",31),e._uU(31),e.qZA(),e.TgZ(32,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.increase("CHD"))}),e._UZ(33,"cf-icon",32),e.qZA()()(),e.TgZ(34,"div",33)(35,"div",24),e._UZ(36,"cf-icon",25),e.TgZ(37,"div",15)(38,"div",26),e._uU(39,"Em b\xe9"),e.qZA(),e.TgZ(40,"div",27),e._uU(41,"D\u01b0\u1edbi 2 tu\u1ed5i"),e.qZA()()(),e.TgZ(42,"div",28)(43,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.decrease("INF"))}),e._UZ(44,"cf-icon",30),e.qZA(),e.TgZ(45,"div",31),e._uU(46),e.qZA(),e.TgZ(47,"button",29),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.increase("INF"))}),e._UZ(48,"cf-icon",32),e.qZA()()(),e.TgZ(49,"div",34)(50,"button",35),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.closeBotomSheet())}),e._uU(51,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&a){const r=e.oxw();e.xp6(13),e.Q6J("disabled",r._adultNumber<=1||1===r._adultNumber&&1===r._infantNumber),e.xp6(3),e.Oqu(r._adultNumber),e.xp6(1),e.Q6J("disabled",r._adultNumber+r._childNumber===r.ADULT_CHILD_LIMIT),e.xp6(11),e.Q6J("disabled",0===r._childNumber||r._adultNumber+r._childNumber===1),e.xp6(3),e.Oqu(r._childNumber),e.xp6(1),e.Q6J("disabled",r._adultNumber+r._childNumber===r.ADULT_CHILD_LIMIT||r._childNumber===r.CHILD_LIMIT),e.xp6(11),e.Q6J("disabled",0===r._infantNumber),e.xp6(3),e.Oqu(r._infantNumber),e.xp6(1),e.Q6J("disabled",r._infantNumber===r._adultNumber)}}let h=(()=>{class a{constructor(r,s){this.cfIconRegister=r,this._bottomSheetSvc=s,this.adultNumber=1,this.childNumber=0,this.infantNumber=0,this.showIcon=!0,this._adultNumber=0,this._childNumber=0,this._infantNumber=0,this.ADULT_CHILD_LIMIT=9,this.CHILD_LIMIT=8,this.numberOfPassengerChange=new e.vpe,this.isOpen=!1,this.cfIconRegister.registerIcons([d.TOh,d.KYu,d.TM4,d.gll,d._7G])}ngOnChanges(){this._adultNumber=this.adultNumber,this._childNumber=this.childNumber,this._infantNumber=this.infantNumber}click(r){this.loadTempData(),matchMedia("(max-width: 768px)").matches?this.openBottomSheet():this.isOpen=!this.isOpen,r.stopPropagation()}outsideClick(r){this.isOpen=!1}emitData(){this.numberOfPassengerChange.emit({adult:this._adultNumber,child:this._childNumber,infant:this._infantNumber})}reset(){this.loadTempData()}loadTempData(){this._adultNumber=this.adultNumber,this._childNumber=this.childNumber,this._infantNumber=this.infantNumber}increase(r){switch(r){case"ADT":this._adultNumber++;break;case"CHD":this._childNumber++;break;case"INF":this._infantNumber++}this.emitData()}decrease(r){switch(r){case"ADT":this._adultNumber===this._infantNumber&&1!==this._adultNumber&&this._infantNumber--,this._adultNumber--;break;case"CHD":this._childNumber--;break;case"INF":this._infantNumber--}this.emitData()}openBottomSheet(){this._bottomSheetSvc.open(this.bottomSheet,{headerTitle:"S\u1ed1 l\u01b0\u1ee3ng h\xe0nh kh\xe1ch",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0}).containerInstance._rightButtonClick.subscribe(()=>this._bottomSheetSvc.dismiss())}closeBotomSheet(){this._bottomSheetSvc.dismiss()}}return a.\u0275fac=function(r){return new(r||a)(e.Y36(d.KNP),e.Y36(D.a2))},a.\u0275cmp=e.Xpm({type:a,selectors:[["btc-num-of-pas"]],viewQuery:function(r,s){if(1&r&&e.Gf(k,5),2&r){let f;e.iGM(f=e.CRH())&&(s.bottomSheet=f.first)}},inputs:{adultNumber:"adultNumber",childNumber:"childNumber",infantNumber:"infantNumber",showIcon:"showIcon"},outputs:{numberOfPassengerChange:"numberOfPassengerChange"},standalone:!0,features:[e.TTD,e.jDz],decls:9,vars:6,consts:[["cdkOverlayOrigin","","tabIndex","-1",1,"cursor-pointer",3,"click"],["trigger","","originOverlay","cdkOverlayOrigin"],["class","flex items-center gap-x-2 md:hidden border border-neutral-gray-3 rounded-full px-4 py-1",4,"ngIf"],["class","flex items-center gap-x-3 md:hidden",4,"ngIf"],["class","gap-x-1.5 items-center border border-neutral-gray-3 rounded-full px-4 py-[5px] hidden md:flex",4,"ngIf"],["class","hidden md:flex md:items-center md:gap-x-3",4,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","overlayOutsideClick"],["bottomSheet",""],[1,"flex","items-center","gap-x-2","md:hidden","border","border-neutral-gray-3","rounded-full","px-4","py-1"],["icon","users","size","small",1,"text-neutral-gray-5"],[1,"text-body-md","text-neutral-black"],["class","text-neutral-gray-5","icon","down","size","small",4,"ngIf"],["icon","down","size","small",1,"text-neutral-gray-5"],[1,"flex","items-center","gap-x-3","md:hidden"],["icon","users","size","medium",1,"text-neutral-gray-4"],[1,"flex","flex-col","gap-y-1"],["cfLabel","","for","departDate",1,"text-express-md","text-neutral-gray-4","cursor-text"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex"],[1,"text-body-md","whitespace-nowrap"],[1,"hidden","md:flex","md:items-center","md:gap-x-3"],[1,"p-4","shadow-cf-lg","w-[280px]","bg-neutral-white","rounded","md:w-full","md:pt-5","md:overflow-hidden","flex","flex-col"],[1,"flex","justify-start","items-center","pb-3.5","rounded","md:hidden"],[1,"text-heading-sm","text-neutral-black"],[1,"flex","items-center","justify-between","mb-3","md:mb-4","md:gap-3"],[1,"flex","items-center","gap-x-3"],["icon","user","size","small"],[1,"text-espressive-md","text-neutral-black","md:text-heading-xs"],[1,"text-espressive-xs","text-neutral-gray-4","md:text-body-sm"],[1,"flex","items-center","justify-end"],["cf-button","","size","small","type","secondary",1,"!w-8","!h-8","flex","items-center","justify-center",3,"disabled","click"],["icon","minus","size","small"],[1,"text-espressive-md","text-neutral-black","mx-4"],["icon","plus","size","small"],[1,"flex","items-center","justify-between","mb-[22px]","md:mb-6","md:gap-3"],[1,"hidden","md:flex","flex-1","justify-end","flex-col"],["cf-button","",1,"w-full","justify-center",3,"click"]],template:function(r,s){if(1&r&&(e.TgZ(0,"div",0,1),e.NdJ("click",function(T){return s.click(T)}),e.YNc(3,E,5,2,"div",2),e.YNc(4,Z,7,1,"div",3),e.YNc(5,m,4,1,"div",4),e.YNc(6,p,7,1,"div",5),e.qZA(),e.YNc(7,y,52,9,"ng-template",6,7,e.W1O),e.NdJ("overlayOutsideClick",function(T){return s.outsideClick(T)})),2&r){const f=e.MAs(2);e.xp6(3),e.Q6J("ngIf",s.showIcon),e.xp6(1),e.Q6J("ngIf",!s.showIcon),e.xp6(1),e.Q6J("ngIf",s.showIcon),e.xp6(1),e.Q6J("ngIf",!s.showIcon),e.xp6(1),e.Q6J("cdkConnectedOverlayOrigin",f)("cdkConnectedOverlayOpen",s.isOpen)}},dependencies:[t.ez,t.O5,d.AxE,d.Sm8,C.N8,C.Xq,M.f,v.pI,v.xu,v.U8,D.DW],styles:[":host{display:block}\n"],encapsulation:2,changeDetection:0}),a})()},37453:(N,O,u)=>{u.d(O,{d:()=>h});var v=u(98184),t=u(36895),e=u(94650),D=u(24006),C=u(83700),d=u(72506),M=u(74891),k=u(19123),S=u(80429),E=u(37094);const Z=["bottomSheet"];function m(a,_){if(1&a){const r=e.EpF();e.ynx(0),e.TgZ(1,"cf-radio",19),e.NdJ("checkChange",function(){const T=e.CHM(r).$implicit,w=e.oxw(2);return e.KtG(w.onPaxTypeSelected(T))}),e._uU(2),e.qZA(),e.BQk()}if(2&a){const r=_.$implicit;e.xp6(1),e.Q6J("value",r.value),e.xp6(1),e.Oqu(r.name)}}function p(a,_){if(1&a){const r=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13),e._uU(4,"Lo\u1ea1i kh\xe1ch"),e.qZA()(),e.TgZ(5,"div",14)(6,"cf-radio-group",15),e.NdJ("ngModelChange",function(f){e.CHM(r);const T=e.oxw();return e.KtG(T.paxTypeSelectedTemp=f)}),e.YNc(7,m,3,2,"ng-container",16),e.qZA()()(),e.TgZ(8,"div",17)(9,"button",18),e.NdJ("click",function(){e.CHM(r);const f=e.oxw();return e.KtG(f.closeBottomSheet())}),e._uU(10,"X\xe1c nh\u1eadn"),e.qZA()()()}if(2&a){const r=e.oxw();e.xp6(6),e.Q6J("ngModel",r.paxTypeSelectedTemp),e.xp6(1),e.Q6J("ngForOf",r.paxTypeList)}}const y=function(a){return{"opacity-30 pointer-events-none":a}};let h=(()=>{class a{constructor(r,s){this.cfIconRegister=r,this.bottomSheetService=s,this.isOpen=!1,this.bottomCenter=[{originX:"start",originY:"bottom",overlayX:"center",overlayY:"top",offsetX:0,offsetY:0}],this.paxTypeChange=new e.vpe,this.paxTypeSelected=f=>f.find(T=>T.actived),this.cfIconRegister.registerIcons([d.KYu,d._7G])}ngOnChanges(r){var s;r.paxTypeList&&(this.paxTypeSelectedTemp=null===(s=this.paxTypeSelected(this.paxTypeList))||void 0===s?void 0:s.value)}click(r){this.actived&&(this.isOpen=!this.isOpen,r.stopPropagation())}outsideClick(){this.isOpen=!1}onPaxTypeSelected(r){if(matchMedia("(max-width: 768px)").matches)this.paxTypeSelectedTemp=r.value;else{const s=Object.assign(Object.assign({},r),{actived:!r.actived});this.paxTypeChange.emit(s),this.isOpen=!1}}openBottomSheet(){this.actived&&this.bottomSheetService.open(this.bottomSheet,{headerTitle:"Lo\u1ea1i kh\xe1ch",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0}).containerInstance._rightButtonClick.subscribe(()=>this.bottomSheetService.dismiss())}closeBottomSheet(){const r=this.paxTypeList.find(s=>s.value===this.paxTypeSelectedTemp);this.paxTypeChange.emit(r),this.bottomSheetService.dismiss()}}return a.\u0275fac=function(r){return new(r||a)(e.Y36(d.KNP),e.Y36(E.a2))},a.\u0275cmp=e.Xpm({type:a,selectors:[["btc-pax-type-selector"]],viewQuery:function(r,s){if(1&r&&e.Gf(Z,5),2&r){let f;e.iGM(f=e.CRH())&&(s.bottomSheet=f.first)}},inputs:{paxTypeList:"paxTypeList",actived:"actived"},outputs:{paxTypeChange:"paxTypeChange"},standalone:!0,features:[e.TTD,e.jDz],decls:16,vars:17,consts:[[1,"hidden","md:flex","gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]",3,"ngClass","click"],["icon","user","size","small",1,"text-neutral-gray-5"],[1,"text-body-md","whitespace-nowrap"],["cdkOverlayOrigin","","tabIndex","-1",1,"cursor-pointer","md:hidden","border","border-neutral-gray-3","rounded-full","px-4","py-1",3,"ngClass","click"],["trigger","","originOverlay","cdkOverlayOrigin"],[1,"flex","items-center","gap-x-2"],[1,"text-body-md","text-neutral-black","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick"],["bottomSheet",""],[1,"shadow-cf-lg","w-[220px]","bg-neutral-white","rounded","md:w-full","p-4","flex","flex-col","gap-y-4","justify-between"],[1,"flex","flex-col","gap-y-4","w-full"],[1,"flex","justify-start","items-center","rounded","md:hidden"],[1,"text-heading-sm","text-neutral-black"],[1,"flex","flex-col","gap-y-4"],[1,"flex","flex-col","gap-y-2.5",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[1,"hidden","md:block"],["cf-button","",1,"w-full","justify-center",3,"click"],["size","medium",3,"value","checkChange"]],template:function(r,s){if(1&r&&(e.TgZ(0,"div",0),e.NdJ("click",function(){return s.openBottomSheet()}),e._UZ(1,"cf-icon",1),e.TgZ(2,"div",2),e._uU(3),e.ALo(4,"mapper"),e.qZA()(),e.TgZ(5,"div",3,4),e.NdJ("click",function(T){return s.click(T)}),e.TgZ(8,"div",5),e._UZ(9,"cf-icon",1),e.TgZ(10,"div",6),e._uU(11),e.ALo(12,"mapper"),e.qZA(),e._UZ(13,"cf-icon",7),e.qZA()(),e.YNc(14,p,11,2,"ng-template",8,9,e.W1O),e.NdJ("overlayOutsideClick",function(){return s.outsideClick()})),2&r){const f=e.MAs(7);let T,w;e.Q6J("ngClass",e.VKq(13,y,!s.actived)),e.xp6(3),e.Oqu((null==(T=e.xi3(4,7,s.paxTypeList,s.paxTypeSelected))?null:T.name)||"Lo\u1ea1i kh\xe1ch"),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,!s.actived)),e.xp6(6),e.hij(" ",(null==(w=e.xi3(12,10,s.paxTypeList,s.paxTypeSelected))?null:w.name)||"Lo\u1ea1i kh\xe1ch"," "),e.xp6(3),e.Q6J("cdkConnectedOverlayOrigin",f)("cdkConnectedOverlayOpen",s.isOpen)("cdkConnectedOverlayPositions",s.bottomCenter)}},dependencies:[t.ez,t.mk,t.sg,d.AxE,d.Sm8,M.f,v.pI,v.xu,v.U8,k.o,k.T,D.u5,D.JJ,D.On,C.N8,C.Xq,S.q],styles:[":host{display:block}\n"],encapsulation:2,changeDetection:0}),a})()},82858:(N,O,u)=>{u.d(O,{_:()=>Nt});var v=u(36895),t=u(94650),e=u(24006),D=u(83700),C=u(27898),d=u(88516),M=u(99590),k=u(72853),S=u(72506),E=u(44143),Z=u(74713),m=u(64070),p=u(50633),y=u(15439),h=u(77296),a=u(77579),_=u(82722),r=u(37094),s=u(61135),f=u(78372);const T=["searchAirportEl"];function w(c,g){1&c&&(t.TgZ(0,"div",10),t._uU(1," Th\xe0nh ph\u1ed1 - S\xe2n bay "),t.qZA())}function K(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",14),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw(2);return t.KtG(l.optionClick(o))}),t._UZ(1,"div",15),t.ALo(2,"highlighter"),t._UZ(3,"div",16),t.ALo(4,"highlighter"),t.qZA()}if(2&c){const n=t.oxw().$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("innerHtml",t.xi3(2,2,n.CityName+", "+n.Title,i.data.currentSelected),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.xi3(4,5,n.Code+" - "+n.AirportName,i.data.currentSelected),t.oJD)}}function A(c,g){if(1&c&&(t.ynx(0),t.YNc(1,K,5,8,"div",13),t.BQk()),2&c){const n=g.index,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n<i.ticketInfiniteScrollCount)}}function I(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",11),t.NdJ("scrolled",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.onScrollDown())})("touchmove",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.onScrollDown())}),t.YNc(1,A,2,1,"ng-container",12),t.qZA()}if(2&c){const n=t.oxw();t.Q6J("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0),t.xp6(1),t.Q6J("ngForOf",n.optionsDisplay)("ngForTrackBy",n.airportTrackByFn)}}function x(c,g){1&c&&(t.TgZ(0,"div",17),t._UZ(1,"img",18),t.TgZ(2,"div",19)(3,"div",20),t._uU(4," Kh\xf4ng t\xecm th\u1ea5y k\u1ebft qu\u1ea3 "),t.qZA(),t.TgZ(5,"div",21),t._uU(6," Vui l\xf2ng nh\u1eadp \u0111\xfang t\xean th\xe0nh ph\u1ed1 "),t._UZ(7,"br"),t._uU(8,"v\xe0 s\xe2n bay. "),t.qZA()()())}let B=(()=>{class c{constructor(n,i,o,l){this.data=n,this.registerIcons=i,this.cfBottomSheetRef=o,this.elementRef=l,this.TICKET_INFINITE_SCROLL_DEFAULT=40,this.TICKET_INFINITE_OFSET_INCREASE=30,this.ticketInfiniteScrollCount=this.TICKET_INFINITE_SCROLL_DEFAULT,this.searchTextChange=new s.X(""),this.optionsDisplay=[],i.registerIcons([S.esH]),n.airportOptions=n.airportOptions.filter(b=>!n.excludes.includes(b.Code)),this.optionsDisplay=n.airportOptions,n.currentSelected||(n.currentSelected="")}ngAfterViewInit(){setTimeout(()=>{this.searchAirportEl.focus()},200)}ngOnInit(){this.searchTextChange.pipe((0,f.b)(200)).subscribe(n=>{this.searchFilter(n)})}searchChange(n){this.searchTextChange.next(n.target.value)}searchFilter(n){this.optionsDisplay=""===n?this.data.airportOptions:this.data.airportOptions.filter(i=>this.removeAccents(i.Code.toLocaleLowerCase()).includes(this.removeAccents(n.toLocaleLowerCase()))||this.removeAccents(i.AirportName.toLocaleLowerCase()).includes(this.removeAccents(n.toLocaleLowerCase()))||this.removeAccents(i.CityName.toLocaleLowerCase()).includes(this.removeAccents(n.toLocaleLowerCase()))||this.removeAccents(i.Title.toLocaleLowerCase()).includes(this.removeAccents(n.toLocaleLowerCase())))}removeAccents(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0111/g,"d").replace(/\u0110/g,"D")}airportTrackByFn(n,i){return i.Code}onScrollDown(){this.ticketInfiniteScrollCount+=this.TICKET_INFINITE_OFSET_INCREASE}optionClick(n){this.cfBottomSheetRef.dismiss(n)}resetSearch(){this.searchAirportEl.focus(),this.data.currentSelected="",this.searchFilter("")}}return c.\u0275fac=function(n){return new(n||c)(t.Y36(r.Rr),t.Y36(S.KNP),t.Y36(r.Zu),t.Y36(t.SBq))},c.\u0275cmp=t.Xpm({type:c,selectors:[["btc-flight-airport-bottom-sheet"]],viewQuery:function(n,i){if(1&n&&t.Gf(T,5),2&n){let o;t.iGM(o=t.CRH())&&(i.searchAirportEl=o.first)}},hostAttrs:[1,"w-full","flex"],standalone:!0,features:[t.jDz],decls:10,vars:4,consts:[[1,"p-4","pb-0","flex","flex-col","gap-y-4","flex-auto","w-full","h-full"],[1,"relative"],[1,"!max-w-none","w-full","flex-grow-0","flex"],["id","search-airport","cf-input","",3,"ngModel","ngModelChange","input"],["searchAirportEl",""],["cfHeadIcon","","icon","search","size","small",1,"text-neutral-gray-4"],["icon","close","size","small",1,"absolute","right-0","top-1/2","-translate-y-1/2","mr-3",3,"click"],["class","text-neutral-gray-6-brandcolor text-left relative text-heading-xs text-neutral-gray-6",4,"ngIf"],["class","flex flex-col w-full flex-auto overflow-y-auto","infinite-scroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","fromRoot","alwaysCallback","scrolled","touchmove",4,"ngIf"],["class","flex flex-col justify-center items-center gap-y-5 flex-auto pb-[168px]",4,"ngIf"],[1,"text-neutral-gray-6-brandcolor","text-left","relative","text-heading-xs","text-neutral-gray-6"],["infinite-scroll","",1,"flex","flex-col","w-full","flex-auto","overflow-y-auto",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","fromRoot","alwaysCallback","scrolled","touchmove"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","flex flex-col py-2 px-3 border-b border-b-neutral-gray-1 shrink-0",3,"click",4,"ngIf"],[1,"flex","flex-col","py-2","px-3","border-b","border-b-neutral-gray-1","shrink-0",3,"click"],[1,"text-body-md-short","text-neutral-gray-6",3,"innerHtml"],[1,"text-body-sm","text-neutral-gray-4",3,"innerHtml"],[1,"flex","flex-col","justify-center","items-center","gap-y-5","flex-auto","pb-[168px]"],["src","assets/images/empty-result.svg",1,"w-16","h-16","object-contain"],[1,"flex","flex-col","gap-1","items-center","justify-start","shrink-0","relative"],[1,"text-neutral-gray-6-brandcolor","text-center","relative","text-heading-sm"],[1,"text-neutral-gray-5","text-center","relative","w-[257px]","text-body-md-long"]],template:function(n,i){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"cf-input-group",2)(3,"input",3,4),t.NdJ("ngModelChange",function(l){return i.data.currentSelected=l})("input",function(l){return i.searchChange(l)}),t.qZA(),t._UZ(5,"cf-icon",5),t.qZA(),t.TgZ(6,"cf-icon",6),t.NdJ("click",function(){return i.resetSearch()}),t.qZA()(),t.YNc(7,w,2,0,"div",7),t.YNc(8,I,2,7,"div",8),t.YNc(9,x,9,0,"div",9),t.qZA()),2&n&&(t.xp6(3),t.Q6J("ngModel",i.data.currentSelected),t.xp6(4),t.Q6J("ngIf",i.optionsDisplay.length>0),t.xp6(1),t.Q6J("ngIf",i.optionsDisplay.length>0),t.xp6(1),t.Q6J("ngIf",0===i.optionsDisplay.length))},dependencies:[v.ez,v.sg,v.O5,E.j$,E.ND,E.BN,S.AxE,S.Sm8,h.Rq,h.Ry,e.u5,e.Fj,e.JJ,e.On,p.T],encapsulation:2}),c})();var P=u(28490),J=u(9381),U=u(88605);const Q=["dateFrom"],V=["dateRange"],j=["startPoint"];function W(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m kh\u1edfi h\xe0nh")}function q(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m kh\u1edfi h\xe0nh")}function z(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m \u0111\u1ebfn")}function $(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m \u0111\u1ebfn")}function X(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh")}function tt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y kh\u1edfi h\xe0nh ph\u1ea3i t\u1eeb ng\xe0y hi\u1ec7n t\u1ea1i tr\u1edf \u0111i")}function et(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function nt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh")}function it(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y kh\u1edfi h\xe0nh ph\u1ea3i t\u1eeb ng\xe0y hi\u1ec7n t\u1ea1i tr\u1edf \u0111i")}function ot(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function rt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",36)(1,"cf-field-group",37),t.NdJ("click",function(){t.CHM(n),t.oxw();const o=t.MAs(49),l=t.oxw(2);return t.KtG(l.oneWayDatePickerClick(o))}),t._UZ(2,"cf-icon",25),t.TgZ(3,"label",38),t._uU(4," Ng\xe0y kh\u1edfi h\xe0nh "),t.qZA(),t.TgZ(5,"input",39,40),t.NdJ("input",function(){t.CHM(n);const o=t.MAs(6);return t.KtG(o.close())})("dateSelect",function(){t.CHM(n);const o=t.MAs(6);return t.KtG(o.close())})("mousedown",function(o){t.CHM(n);const l=t.oxw(3);return t.KtG(l.roundTripFocus(o))}),t.qZA(),t.YNc(7,nt,1,1,"cf-input-hint",28),t.YNc(8,it,1,1,"cf-input-hint",28),t.YNc(9,ot,1,1,"cf-input-hint",28),t.qZA()()}if(2&c){const n=t.oxw(2),i=n.$implicit,o=n.index,l=t.oxw();t.xp6(1),t.Q6J("valid",i.controls.departDate.valid)("status",i.controls.departDate.invalid&&(i.controls.departDate.dirty||i.controls.departDate.touched)?"error":"default"),t.xp6(4),t.Q6J("secondaryCalendar","lunar")("displayMonths",1)("minDate",l.multiMinDate[o])("formControl",i.controls.departDate),t.xp6(2),t.Q6J("ngIf",(null==i.controls.departDate.errors?null:i.controls.departDate.errors.required)&&(i.controls.departDate.dirty||i.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==i.controls.departDate.errors||null==i.controls.departDate.errors.ngbDate?null:i.controls.departDate.errors.ngbDate.minDate)&&(i.controls.departDate.dirty||i.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==i.controls.departDate.errors||null==i.controls.departDate.errors.ngbDate?null:i.controls.departDate.errors.ngbDate.invalid)&&(i.controls.departDate.dirty||i.controls.departDate.touched))}}function ct(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"cf-icon",41),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2).index,l=t.oxw();return t.KtG(l.onRemoveRoute(o))}),t.qZA()}if(2&c){const n=t.oxw(2).first;t.ekj("invisible",n)("pointer-events-none",n)}}function at(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(4),l=t.MAs(5);return t.KtG(o.openAirlineMinFareBts(l))}),t.TgZ(1,"div",51),t._uU(2,"Ch\u1ecdn h\xe3ng"),t.qZA(),t._UZ(3,"cf-icon",52),t.qZA()}}function lt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(4),l=t.MAs(7);return t.KtG(o.openConfigMinFareBts(l))}),t.TgZ(1,"div",51),t._uU(2,"T\xf9y ch\u1ec9nh"),t.qZA(),t._UZ(3,"cf-icon",52),t.qZA()}}function st(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",42)(1,"div",43),t.YNc(2,at,4,0,"div",44),t.YNc(3,lt,4,0,"div",44),t.qZA(),t.TgZ(4,"div",45)(5,"div",46),t.NdJ("scrolled",function(){t.CHM(n);const o=t.oxw(3);return t.KtG(o.scrollDown())}),t.TgZ(6,"cf-datepicker-inline",47),t.NdJ("dateSelect",function(o){t.CHM(n);const l=t.oxw(2).index,b=t.oxw();return t.KtG(b.dateSelectMobile(o,l))}),t.qZA()()(),t.TgZ(7,"div",48)(8,"button",49),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(3);return t.KtG(o.onMobileDatePickerOK())}),t._uU(9,"X\xe1c nh\u1eadn"),t.qZA()()()}if(2&c){const n=t.oxw(2).$implicit,i=t.oxw();t.xp6(2),t.Q6J("ngIf",i.minFareOptionConfig&&i.minFareOptionConfig.airlineMinPrice),t.xp6(1),t.Q6J("ngIf",i.minFareOptionConfig),t.xp6(2),t.Q6J("infiniteScrollDistance",2)("infiniteScrollThrottle",300)("infiniteScrollUpDistance",2)("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0)("infiniteScrollContainer",".ngb-dp-content"),t.xp6(1),t.Q6J("minDate",i.currentDate)("displayMonths",i.numOfMonth)("rangeSelection",!0)("secondaryCalendar","lunar")("formControl",n.controls.departDate)("footerOptionConfig",i.minFareOptionConfig)("fromDate",n.controls.departDate.value)("startDate",i.startDate)("displayMonthsOffset",0)}}const L=function(c){return[c]},R=function(){return{"text-express-md":!0}};function ut(c,g){if(1&c){const n=t.EpF();t.ynx(0),t.TgZ(1,"cf-select",7,8),t.NdJ("selectedChange",function(o){t.CHM(n);const l=t.MAs(20),b=t.oxw(2);return b.startPointChange(o),t.KtG(b.nextPosition(l))}),t._UZ(3,"cf-icon",9),t.TgZ(4,"label",10),t._uU(5," \u0110i\u1ec3m kh\u1edfi h\xe0nh "),t.qZA(),t._UZ(6,"input",11,12),t.YNc(8,W,1,1,"cf-hint",13),t.qZA(),t.TgZ(9,"div",14),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.openAirportBottomSheet(o.controls.startPoint,o.controls.endPoint))}),t.TgZ(10,"cf-select",15),t._UZ(11,"cf-icon",9),t.TgZ(12,"label",10),t._uU(13," \u0110i\u1ec3m kh\u1edfi h\xe0nh "),t.qZA(),t._UZ(14,"input",16,12),t.YNc(16,q,1,1,"cf-hint",13),t.qZA()(),t.TgZ(17,"button",17),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.swapPoint(o.controls.startPoint,o.controls.endPoint))}),t._UZ(18,"cf-icon",18),t.qZA(),t.TgZ(19,"cf-select",19,20),t.NdJ("selectedChange",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.endPointChange(o))}),t._UZ(21,"cf-icon",9),t.TgZ(22,"label",21),t._uU(23," \u0110i\u1ec3m \u0111\u1ebfn "),t.qZA(),t._UZ(24,"input",22,12),t.YNc(26,z,1,1,"cf-hint",13),t.qZA(),t.TgZ(27,"div",14),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.openAirportBottomSheet(o.controls.endPoint,o.controls.startPoint))}),t.TgZ(28,"cf-select",15),t._UZ(29,"cf-icon",9),t.TgZ(30,"label",21),t._uU(31," \u0110i\u1ec3m \u0111\u1ebfn "),t.qZA(),t._UZ(32,"input",22,12),t.YNc(34,$,1,1,"cf-hint",13),t.qZA()(),t.TgZ(35,"div",23)(36,"cf-field-group",24),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.onFocusDate())}),t._UZ(37,"cf-icon",25),t.TgZ(38,"label",26),t._uU(39," Ng\xe0y kh\u1edfi h\xe0nh "),t.qZA(),t.TgZ(40,"input",27),t.NdJ("input",function(){t.CHM(n);const o=t.MAs(45);return t.KtG(o.close())})("mousedown",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.roundTripFocus(o))})("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.dateType="DEPART")}),t.qZA(),t.YNc(41,X,1,1,"cf-input-hint",28),t.YNc(42,tt,1,1,"cf-input-hint",28),t.YNc(43,et,1,1,"cf-input-hint",28),t.qZA(),t.TgZ(44,"input",29,30),t.NdJ("navigate",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.onNavigateDatepicker(o))})("dateSelect",function(o){t.CHM(n);const l=t.MAs(45),b=t.oxw().$implicit;return t.oxw().onDepartDateSelection(o,b.controls.departDate),t.KtG(l.close())})("closed",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.dateRangePickerClose())}),t.qZA()(),t.YNc(46,rt,10,9,"div",31),t.YNc(47,ct,1,4,"cf-icon",32),t.YNc(48,st,10,18,"ng-template",null,33,t.W1O),t.BQk()}if(2&c){const n=t.oxw(),i=n.$implicit,o=n.index,l=t.oxw(),b=t.MAs(3);t.xp6(1),t.ekj("!grow-269",i.controls.returnDate),t.Q6J("maxHeight",230)("typeInput","FIELD")("status",i.controls.startPoint.invalid&&(i.controls.startPoint.dirty||i.controls.startPoint.touched)?"error":"default")("customSearch",l.positionSearchCustom)("excludes",l.excludesStartPoint||t.VKq(62,L,i.controls.endPoint.value))("formControl",i.controls.startPoint)("data",l.data)("optionTmp",b),t.xp6(3),t.Q6J("ngClass",t.DdM(64,R)),t.xp6(4),t.Q6J("ngIf",(null==i.controls.startPoint.errors?null:i.controls.startPoint.errors.required)&&(i.controls.startPoint.dirty||i.controls.startPoint.touched)),t.xp6(2),t.ekj("!grow-269",i.controls.returnDate),t.Q6J("typeInput","FIELD")("status",i.controls.startPoint.invalid&&(i.controls.startPoint.dirty||i.controls.startPoint.touched)?"error":"default")("customSearch",l.positionSearchCustom)("excludes",t.VKq(65,L,i.controls.endPoint.value))("formControl",i.controls.startPoint)("data",l.data)("optionTmp",b),t.xp6(2),t.Q6J("ngClass",t.DdM(67,R)),t.xp6(4),t.Q6J("ngIf",(null==i.controls.startPoint.errors?null:i.controls.startPoint.errors.required)&&(i.controls.startPoint.dirty||i.controls.startPoint.touched)),t.xp6(3),t.ekj("!grow-269",i.controls.returnDate),t.Q6J("maxHeight",230)("typeInput","FIELD")("status",i.controls.endPoint.invalid&&(i.controls.endPoint.dirty||i.controls.endPoint.touched)?"error":"default")("customSearch",l.positionSearchCustom)("excludes",l.excludesEndPoint||t.VKq(68,L,i.controls.startPoint.value))("formControl",i.controls.endPoint)("data",l.data)("optionTmp",b),t.xp6(3),t.Q6J("ngClass",t.DdM(70,R)),t.xp6(4),t.Q6J("ngIf",(null==i.controls.endPoint.errors?null:i.controls.endPoint.errors.required)&&(i.controls.endPoint.dirty||i.controls.endPoint.touched)),t.xp6(2),t.ekj("!grow-269",i.controls.returnDate),t.Q6J("typeInput","FIELD")("status",i.controls.endPoint.invalid&&(i.controls.endPoint.dirty||i.controls.endPoint.touched)?"error":"default")("customSearch",l.positionSearchCustom)("excludes",t.VKq(71,L,i.controls.endPoint.value))("formControl",i.controls.endPoint)("data",l.data)("optionTmp",b),t.xp6(2),t.Q6J("ngClass",t.DdM(73,R)),t.xp6(4),t.Q6J("ngIf",(null==i.controls.endPoint.errors?null:i.controls.endPoint.errors.required)&&(i.controls.endPoint.dirty||i.controls.endPoint.touched)),t.xp6(2),t.Q6J("valid",i.controls.departDate.valid)("status",i.controls.departDate.invalid&&(i.controls.departDate.dirty||i.controls.departDate.touched)?"error":"default"),t.xp6(4),t.Q6J("minDate",l.multiMinDate[o])("formControl",i.controls.departDate),t.xp6(1),t.Q6J("ngIf",(null==i.controls.departDate.errors?null:i.controls.departDate.errors.required)&&(i.controls.departDate.dirty||i.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==i.controls.departDate.errors||null==i.controls.departDate.errors.ngbDate?null:i.controls.departDate.errors.ngbDate.minDate)&&(i.controls.departDate.dirty||i.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==i.controls.departDate.errors||null==i.controls.departDate.errors.ngbDate?null:i.controls.departDate.errors.ngbDate.invalid)&&(i.controls.departDate.dirty||i.controls.departDate.touched)),t.xp6(1),t.Q6J("minDate",l.multiMinDate[o])("secondaryCalendar","lunar")("displayMonths",l.isMobile?1:2)("rangeSelection",!0)("fromDate",i.controls.departDate.value)("startDate",l.startDate)("containerWidth",l.isMobile?300:600),t.xp6(2),t.Q6J("ngIf",l.isMobile),t.xp6(1),t.Q6J("ngIf",l.formArray.length>2)}}function _t(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m kh\u1edfi h\xe0nh")}function dt(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m kh\u1edfi h\xe0nh")}function pt(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m \u0111\u1ebfn")}function ht(c,g){1&c&&t._UZ(0,"cf-hint",34),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn \u0111i\u1ec3m \u0111\u1ebfn")}function mt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh")}function ft(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y kh\u1edfi h\xe0nh ph\u1ea3i t\u1eeb ng\xe0y hi\u1ec7n t\u1ea1i tr\u1edf \u0111i")}function gt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function xt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y v\u1ec1")}function Ct(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y v\u1ec1 ph\u1ea3i l\u1edbn h\u01a1n ng\xe0y \u0111i")}function vt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function yt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(4),l=t.MAs(5);return t.KtG(o.openAirlineMinFareBts(l))}),t.TgZ(1,"div",51),t._uU(2,"Ch\u1ecdn h\xe3ng"),t.qZA(),t._UZ(3,"cf-icon",52),t.qZA()}}function Dt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",50),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(4),l=t.MAs(7);return t.KtG(o.openConfigMinFareBts(l))}),t.TgZ(1,"div",51),t._uU(2,"T\xf9y ch\u1ec9nh"),t.qZA(),t._UZ(3,"cf-icon",52),t.qZA()}}function Tt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y kh\u1edfi h\xe0nh")}function Et(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y kh\u1edfi h\xe0nh ph\u1ea3i t\u1eeb ng\xe0y hi\u1ec7n t\u1ea1i tr\u1edf \u0111i")}function bt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function St(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y v\u1ec1")}function At(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y v\u1ec1 ph\u1ea3i l\u1edbn h\u01a1n ng\xe0y \u0111i")}function Bt(c,g){1&c&&t._UZ(0,"cf-input-hint",35),2&c&&t.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function Ot(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",68)(1,"div",43),t.YNc(2,yt,4,0,"div",44),t.YNc(3,Dt,4,0,"div",44),t.qZA(),t.TgZ(4,"div",69)(5,"cf-input-group",70)(6,"input",71),t.NdJ("ngModelChange",function(o){t.CHM(n);const l=t.oxw(2).$implicit,b=t.oxw();return t.KtG(b.fromDateChange(o,l.controls.returnDate))}),t.qZA(),t.YNc(7,Tt,1,1,"cf-input-hint",28),t.YNc(8,Et,1,1,"cf-input-hint",28),t.YNc(9,bt,1,1,"cf-input-hint",28),t.qZA(),t.TgZ(10,"div",72),t._uU(11,"~"),t.qZA(),t.TgZ(12,"cf-input-group",70)(13,"input",73),t.NdJ("ngModelChange",function(o){t.CHM(n);const l=t.oxw(2).$implicit,b=t.oxw();return t.KtG(b.toDateChange(o,l.controls.departDate))}),t.qZA(),t.YNc(14,St,1,1,"cf-input-hint",28),t.YNc(15,At,1,1,"cf-input-hint",28),t.YNc(16,Bt,1,1,"cf-input-hint",28),t.qZA()(),t.TgZ(17,"div",45)(18,"div",46),t.NdJ("scrolled",function(){t.CHM(n);const o=t.oxw(3);return t.KtG(o.scrollDown())}),t.TgZ(19,"cf-datepicker-inline",74),t.NdJ("dateSelect",function(o){t.CHM(n);const l=t.oxw(2).$implicit,b=t.oxw();return t.KtG(b.onMobileDateSelection(o,l.controls.departDate,l.controls.returnDate))}),t.qZA()()(),t.TgZ(20,"div",48)(21,"button",49),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(3);return t.KtG(o.onMobileDatePickerOK())}),t._uU(22," X\xe1c nh\u1eadn "),t.qZA()()()}if(2&c){const n=t.oxw(2).$implicit,i=t.oxw();t.xp6(2),t.Q6J("ngIf",i.minFareOptionConfig&&i.minFareOptionConfig.airlineMinPrice),t.xp6(1),t.Q6J("ngIf",i.minFareOptionConfig),t.xp6(2),t.Q6J("status",n.controls.departDate.invalid&&(n.controls.departDate.dirty||n.controls.departDate.touched)?"error":"default"),t.xp6(1),t.Q6J("minDate",i.currentDate)("formControl",n.controls.departDate),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors?null:n.controls.departDate.errors.required)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors||null==n.controls.departDate.errors.ngbDate?null:n.controls.departDate.errors.ngbDate.minDate)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors||null==n.controls.departDate.errors.ngbDate?null:n.controls.departDate.errors.ngbDate.invalid)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(3),t.Q6J("status",n.controls.returnDate.invalid&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)?"error":"default"),t.xp6(1),t.Q6J("minDate",i.minToDate)("formControl",n.controls.returnDate),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors?null:n.controls.returnDate.errors.required)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors||null==n.controls.returnDate.errors.ngbDate?null:n.controls.returnDate.errors.ngbDate.minDate)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors||null==n.controls.returnDate.errors.ngbDate?null:n.controls.returnDate.errors.ngbDate.invalid)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)),t.xp6(2),t.Q6J("infiniteScrollDistance",2)("infiniteScrollThrottle",300)("infiniteScrollUpDistance",2)("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0)("infiniteScrollContainer",".ngb-dp-content"),t.xp6(1),t.Q6J("minDate",i.currentDate)("displayMonths",i.numOfMonth)("rangeSelection",!0)("secondaryCalendar","lunar")("footerOptionConfig",i.minFareOptionConfig)("fromDate",n.controls.departDate.value)("startDate",i.startDate)("toDate",n.controls.returnDate.value)("displayMonthsOffset",0)}}function Mt(c,g){if(1&c){const n=t.EpF();t.ynx(0),t.TgZ(1,"cf-select",53,8),t.NdJ("selectedChange",function(o){t.CHM(n);const l=t.MAs(20),b=t.oxw(2);return b.startPointChange(o),t.KtG(b.nextPosition(l))}),t._UZ(3,"cf-icon",9),t.TgZ(4,"label",10),t._uU(5," \u0110i\u1ec3m kh\u1edfi h\xe0nh "),t.qZA(),t._UZ(6,"input",16,12),t.YNc(8,_t,1,1,"cf-hint",13),t.qZA(),t.TgZ(9,"div",54),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.openAirportBottomSheet(o.controls.startPoint,o.controls.endPoint))}),t.TgZ(10,"cf-select",55),t._UZ(11,"cf-icon",9),t.TgZ(12,"label",10),t._uU(13," \u0110i\u1ec3m kh\u1edfi h\xe0nh "),t.qZA(),t._UZ(14,"input",16,12),t.YNc(16,dt,1,1,"cf-hint",13),t.qZA()(),t.TgZ(17,"button",56),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.swapPoint(o.controls.startPoint,o.controls.endPoint))}),t._UZ(18,"cf-icon",18),t.qZA(),t.TgZ(19,"cf-select",57,20),t.NdJ("selectedChange",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.endPointChange(o))}),t._UZ(21,"cf-icon",9),t.TgZ(22,"label",21),t._uU(23," \u0110i\u1ec3m \u0111\u1ebfn "),t.qZA(),t._UZ(24,"input",22,12),t.YNc(26,pt,1,1,"cf-hint",13),t.qZA(),t.TgZ(27,"div",54),t.NdJ("click",function(){t.CHM(n);const o=t.oxw().$implicit,l=t.oxw();return t.KtG(l.openAirportBottomSheet(o.controls.endPoint,o.controls.startPoint))}),t.TgZ(28,"cf-select",58),t._UZ(29,"cf-icon",9),t.TgZ(30,"label",21),t._uU(31," \u0110i\u1ec3m \u0111\u1ebfn "),t.qZA(),t._UZ(32,"input",22,12),t.YNc(34,ht,1,1,"cf-hint",13),t.qZA()(),t.TgZ(35,"div",59)(36,"cf-field-group",60),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.onFocusDate())}),t._UZ(37,"cf-icon",25),t.TgZ(38,"label",61),t._uU(39," Ng\xe0y kh\u1edfi h\xe0nh "),t.qZA(),t.TgZ(40,"input",62),t.NdJ("input",function(){t.CHM(n);const o=t.MAs(45);return t.KtG(o.close())})("mousedown",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.roundTripFocus(o))})("ngModelChange",function(o){t.CHM(n);const l=t.oxw().$implicit,b=t.oxw();return t.KtG(b.fromDateChange(o,l.controls.returnDate))})("click",function(){t.CHM(n);const o=t.MAs(45),l=t.MAs(55),b=t.oxw().$implicit,F=t.oxw();return F.dateType="DEPART",t.KtG(F.roundTripDatePickerClick(o,l,b.controls.departDate))}),t.qZA(),t.YNc(41,mt,1,1,"cf-input-hint",28),t.YNc(42,ft,1,1,"cf-input-hint",28),t.YNc(43,gt,1,1,"cf-input-hint",28),t.qZA(),t.TgZ(44,"input",63,30),t.NdJ("reset",function(){t.CHM(n);const o=t.MAs(45),l=t.oxw().$implicit,b=t.oxw();return t.KtG(b.resetRangeDate(l.controls.departDate,l.controls.returnDate,o))})("dateSelect",function(o){t.CHM(n);const l=t.MAs(45),b=t.oxw().$implicit,F=t.oxw();return t.KtG(F.onDateSelection(o,b.controls.departDate,b.controls.returnDate,l))})("navigate",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.onNavigateDatepicker(o))})("closed",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.dateRangePickerClose())}),t.qZA(),t.TgZ(46,"cf-field-group",64),t.NdJ("click",function(){t.CHM(n);const o=t.oxw(2);return t.KtG(o.onFocusDate())}),t._UZ(47,"cf-icon",25),t.TgZ(48,"label",65),t._uU(49," Ng\xe0y v\u1ec1 "),t.qZA(),t.TgZ(50,"input",66),t.NdJ("input",function(){t.CHM(n);const o=t.MAs(45);return t.KtG(o.close())})("mousedown",function(o){t.CHM(n);const l=t.oxw(2);return t.KtG(l.roundTripFocus(o))})("ngModelChange",function(o){t.CHM(n);const l=t.oxw().$implicit,b=t.oxw();return t.KtG(b.toDateChange(o,l.controls.departDate))})("click",function(){t.CHM(n);const o=t.MAs(45),l=t.MAs(55),b=t.oxw().$implicit,F=t.oxw();return F.dateType="ARRIVE",t.KtG(F.roundTripDatePickerClick(o,l,b.controls.departDate))}),t.qZA(),t.YNc(51,xt,1,1,"cf-input-hint",28),t.YNc(52,Ct,1,1,"cf-input-hint",28),t.YNc(53,vt,1,1,"cf-input-hint",28),t.qZA(),t.YNc(54,Ot,23,30,"ng-template",null,67,t.W1O),t.qZA(),t.BQk()}if(2&c){const n=t.oxw().$implicit,i=t.oxw(),o=t.MAs(3);t.xp6(1),t.ekj("!grow-269",n.controls.returnDate),t.Q6J("maxHeight",230)("typeInput","FIELD")("status",n.controls.startPoint.invalid&&(n.controls.startPoint.dirty||n.controls.startPoint.touched)?"error":"default")("customSearch",i.positionSearchCustom)("excludes",i.excludesStartPoint||t.VKq(69,L,n.controls.endPoint.value))("formControl",n.controls.startPoint)("data",i.data)("optionTmp",o),t.xp6(3),t.Q6J("ngClass",t.DdM(71,R)),t.xp6(4),t.Q6J("ngIf",(null==n.controls.startPoint.errors?null:n.controls.startPoint.errors.required)&&(n.controls.startPoint.dirty||n.controls.startPoint.touched)),t.xp6(2),t.ekj("!grow-269",n.controls.returnDate),t.Q6J("typeInput","FIELD")("status",n.controls.startPoint.invalid&&(n.controls.startPoint.dirty||n.controls.startPoint.touched)?"error":"default")("customSearch",i.positionSearchCustom)("excludes",t.VKq(72,L,n.controls.endPoint.value))("formControl",n.controls.startPoint)("data",i.data)("optionTmp",o),t.xp6(2),t.Q6J("ngClass",t.DdM(74,R)),t.xp6(4),t.Q6J("ngIf",(null==n.controls.startPoint.errors?null:n.controls.startPoint.errors.required)&&(n.controls.startPoint.dirty||n.controls.startPoint.touched)),t.xp6(3),t.ekj("!grow-269",n.controls.returnDate),t.Q6J("maxHeight",230)("typeInput","FIELD")("status",n.controls.endPoint.invalid&&(n.controls.endPoint.dirty||n.controls.endPoint.touched)?"error":"default")("customSearch",i.positionSearchCustom)("excludes",i.excludesEndPoint||t.VKq(75,L,n.controls.startPoint.value))("formControl",n.controls.endPoint)("data",i.data)("optionTmp",o),t.xp6(3),t.Q6J("ngClass",t.DdM(77,R)),t.xp6(4),t.Q6J("ngIf",(null==n.controls.endPoint.errors?null:n.controls.endPoint.errors.required)&&(n.controls.endPoint.dirty||n.controls.endPoint.touched)),t.xp6(2),t.ekj("!grow-269",n.controls.returnDate),t.Q6J("typeInput","FIELD")("status",n.controls.endPoint.invalid&&(n.controls.endPoint.dirty||n.controls.endPoint.touched)?"error":"default")("customSearch",i.positionSearchCustom)("excludes",t.VKq(78,L,n.controls.endPoint.value))("formControl",n.controls.endPoint)("data",i.data)("optionTmp",o),t.xp6(2),t.Q6J("ngClass",t.DdM(80,R)),t.xp6(4),t.Q6J("ngIf",(null==n.controls.endPoint.errors?null:n.controls.endPoint.errors.required)&&(n.controls.endPoint.dirty||n.controls.endPoint.touched)),t.xp6(2),t.Q6J("valid",n.value.departDate)("status",n.controls.departDate.invalid&&(n.controls.departDate.dirty||n.controls.departDate.touched)?"error":"default"),t.xp6(4),t.Q6J("minDate",i.currentDate)("formControl",n.controls.departDate),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors?null:n.controls.departDate.errors.required)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors||null==n.controls.departDate.errors.ngbDate?null:n.controls.departDate.errors.ngbDate.minDate)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.departDate.errors||null==n.controls.departDate.errors.ngbDate?null:n.controls.departDate.errors.ngbDate.invalid)&&(n.controls.departDate.dirty||n.controls.departDate.touched)),t.xp6(1),t.Q6J("minDate",i.currentDate)("footerOptionConfig",i.minFareOptionConfig)("secondaryCalendar","lunar")("displayMonths",i.isMobile?1:2)("rangeSelection",!0)("fromDate",n.controls.departDate.value)("startDate",i.startDate)("containerWidth",i.isMobile?300:600)("toDate",n.controls.returnDate.value),t.xp6(2),t.Q6J("valid",n.value.returnDate)("status",n.controls.returnDate.invalid&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)?"error":"default"),t.xp6(4),t.Q6J("minDate",i.minToDate)("formControl",n.controls.returnDate),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors?null:n.controls.returnDate.errors.required)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors||null==n.controls.returnDate.errors.ngbDate?null:n.controls.returnDate.errors.ngbDate.minDate)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched)),t.xp6(1),t.Q6J("ngIf",(null==n.controls.returnDate.errors||null==n.controls.returnDate.errors.ngbDate?null:n.controls.returnDate.errors.ngbDate.invalid)&&(n.controls.returnDate.dirty||n.controls.returnDate.touched))}}function It(c,g){if(1&c&&(t.TgZ(0,"div")(1,"div",5),t.YNc(2,ut,50,74,"ng-container",6),t.YNc(3,Mt,56,81,"ng-container",6),t.qZA()()),2&c){const n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.type===n.FLIGHT_TYPE_SEARCH.OneWay),t.xp6(1),t.Q6J("ngIf",n.type===n.FLIGHT_TYPE_SEARCH.RoundTrip)}}function Pt(c,g){if(1&c&&(t.TgZ(0,"div",75),t._UZ(1,"div",76),t.ALo(2,"highlighter"),t._UZ(3,"div",77),t.ALo(4,"highlighter"),t.qZA()),2&c){const n=g.item,i=g.search;t.xp6(1),t.Q6J("innerHtml",t.xi3(2,2,n.CityName+", "+n.Title,i.text),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.xi3(4,5,n.Code+" - "+n.AirportName,i.text),t.oJD)}}function kt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div")(1,"cf-checkbox",84),t.NdJ("checkChange",function(o){const b=t.CHM(n).$implicit,F=t.oxw(2);return t.KtG(F.onToggleAirline(b,o))}),t.TgZ(2,"span"),t._uU(3),t.qZA()()()}if(2&c){const n=g.$implicit;t.xp6(1),t.Q6J("checked",n.selected),t.xp6(1),t.Udp("color",n.color),t.xp6(1),t.Oqu(n.airline)}}function Zt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",78)(1,"div",79)(2,"div",80),t._uU(3,"Gi\xe1 th\u1ea5p nh\u1ea5t t\u1eeb c\xe1c h\xe3ng"),t.qZA(),t.TgZ(4,"div",81),t.YNc(5,kt,4,4,"div",1),t.qZA()(),t.TgZ(6,"div",82)(7,"button",83),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.confirmAirlineMinFare())}),t._uU(8," X\xe1c nh\u1eadn "),t.qZA()()()}if(2&c){const n=t.oxw();t.xp6(5),t.Q6J("ngForOf",n.minFareOptionConfig.airlineMinPrice)}}function wt(c,g){if(1&c){const n=t.EpF();t.TgZ(0,"div",78)(1,"div",79)(2,"div",80),t._uU(3,"T\xf9y ch\u1ec9nh hi\u1ec3n th\u1ecb"),t.qZA(),t.TgZ(4,"div",81)(5,"cf-checkbox",84),t.NdJ("checkChange",function(o){t.CHM(n);const l=t.oxw();return t.KtG(l.onToggleMinPrice(o))}),t._uU(6," Gi\xe1 r\u1ebb "),t.qZA(),t.TgZ(7,"cf-checkbox",84),t.NdJ("checkChange",function(o){t.CHM(n);const l=t.oxw();return t.KtG(l.onToggleLunarDate(o))}),t._uU(8," L\u1ecbch \xe2m "),t.qZA()()(),t.TgZ(9,"div",82)(10,"button",83),t.NdJ("click",function(){t.CHM(n);const o=t.oxw();return t.KtG(o.confirmConfigMinFare())}),t._uU(11," X\xe1c nh\u1eadn "),t.qZA()()()}if(2&c){const n=t.oxw();t.xp6(5),t.Q6J("checked",n.minFareOptionConfig.showMinPrice),t.xp6(2),t.Q6J("checked",n.minFareOptionConfig.showLunarDate)}}let Nt=(()=>{class c{constructor(n,i,o,l,b,F,Y){this.calendar=n,this.changeDetectorRef=i,this._locationDataService=o,this._bottomSheetService=l,this._mobileDetectService=b,this._viewportRuler=F,this.cfIconRegister=Y,this.FLIGHT_TYPE_SEARCH=m.VB,this.removeRoute=new t.vpe,this.dataChange=new t.vpe,this.toggleAirline=new t.vpe,this.navigateDatepicker=new t.vpe,this.dateTypeChange=new t.vpe,this.data=[],this.isShowErrorDateRange=!1,this.multiMinDate=[],this.isMobile=!1,this.dateType="",this.hasMinFare=!0,this._destroy$=new a.x,this.positionSearchCustom=(H,Ft)=>{const Ut=this.removeAccents(H.Code.toLowerCase()),Jt=this.removeAccents(H.Title.toLowerCase()),Lt=this.removeAccents(H.CityName.toLowerCase()),Rt=this.removeAccents(H.AirportName.toLowerCase()),G=this.removeAccents(Ft.toLowerCase());return Ut.includes(G)||Jt.includes(G)||Lt.includes(G)||Rt.includes(G)},this.numOfMonth=4,this.currentDate=n.getToday(),Y.registerIcons([S.UNF,S.okA,S._tC,S.Ffn,S.wvd]),this.data=o.getAllOption(),this.isMobile=matchMedia("(max-width: 768px)").matches}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}ngOnChanges(n){this.hasMinFare=this.minFareOptionConfig&&this.minFareOptionConfig.minPrice.size>0}ngOnInit(){this.initMinDates(),this._viewportRuler.change().pipe((0,_.R)(this._destroy$)).subscribe(()=>{this.isMobile=matchMedia("(max-width: 768px)").matches,this.changeDetectorRef.detectChanges()})}startPointChange(n){this.excludesEndPoint=[n.Code]}endPointChange(n){this.excludesStartPoint=[n.Code],this.isMobile||this.nextDate(this.dateRange)}roundTripDatePickerClick(n,i,o){matchMedia("(max-width: 768px)").matches?(this.roundTripDatePickerBts=this._bottomSheetService.open(i,{headerTitle:"T\xf9y ch\u1ec9nh th\u1eddi gian",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:"",containerFullHeigh:!0}),this.roundTripDatePickerBts.containerInstance._leftButtonClick.subscribe(l=>this.roundTripDatePickerBts.dismiss())):("ARRIVE"===this.dateType&&o.value?(this.currentDate=(0,d.jy)(o.value),setTimeout(()=>{n.navigateTo(this.currentDate)})):"DEPART"===this.dateType&&o.value&&setTimeout(()=>{n.navigateTo({year:o.value.getFullYear(),month:o.value.getMonth()+1})}),n.open())}oneWayDatePickerClick(n){this.isMobile&&(this.oneWayDatePickerBts=this._bottomSheetService.open(n,{headerTitle:"T\xf9y ch\u1ec9nh th\u1eddi gian",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:"",containerFullHeigh:!0}),this.oneWayDatePickerBts.containerInstance._leftButtonClick.subscribe(i=>this.oneWayDatePickerBts.dismiss()))}onFocusDate(){this.isMobile||this.nextDate(this.dateRange)}roundTripFocus(n){if(this.isMobile)return n.preventDefault(),!1}initMinDates(){this.formArray.controls.forEach(()=>{this.multiMinDate.push(this.calendar.getToday())})}nextPosition(n){setTimeout(()=>{n.selectFocus(),this.dataChange.emit()})}nextDate(n){n.focusTrigger(),this.dataChange.emit()}nextPositionRow(n){const i=this.startPoints.get(n+1);i&&setTimeout(()=>{i.onFocus()}),this.dataChange.emit()}calulateMinDate(n){let i=new Date;for(let o=n-1;o>=0;o--){const l=this.formArray.at(o).controls.departDate.value;if(l){i=l;break}}i&&(this.multiMinDate[n]=new d.Ao(i.getFullYear(),i.getMonth()+1,i.getDate()),this.changeDetectorRef.detectChanges())}onRemoveRoute(n){this.removeRoute.emit(n)}onDepartDateSelection(n,i){i.setValue(n),this.dataChange.emit()}onDateSelection(n,i,o,l){i.value||o.value?i.value&&!o.value&&n&&n.getTime()>=i.value.getTime()?(o.setValue(n),l.close(),this.startDate=i.value):i.value&&o.value&&n&&n.getTime()>=i.value.getTime()?"DEPART"===this.dateType?(i.setValue(n),this.currentDate=(0,d.jy)(i.value),this.dateType="ARRIVE"):(o.setValue(n),l.close()):(i.setValue(n),this.dateType="ARRIVE",this.currentDate=(0,d.jy)(i.value)):(i.setValue(n),this.currentDate=(0,d.jy)(i.value),this.dateType="ARRIVE"),this.dateTypeChange.emit(this.dateType)}onToDateSelection(n,i,o){o.fromDate=n.value,o.toDate=i.value,o.open()}dateRangePickerClose(){this.isShowErrorDateRange=!0}dateSelect(n,i){for(let o=i;o<this.formArray.length-1;o++){const l=this.formArray.at(o+1).controls.departDate.value;l&&n.getTime()>l.getTime()&&(this.formArray.at(o+1).controls.departDate.setValue(new Date(n.getTime()+864e5)),n=new Date(n.getTime()+864e5))}}onNavigateDatepicker(n){this.navigateDatepicker.emit(y(new Date(n.next.year,n.next.month)).add(2,"month").startOf("month").format("YYYY-MM-DD"))}dateSelectMobile(n,i){this.formArray.at(i).controls.departDate.setValue(n);for(let o=i;o<this.formArray.length-1;o++){const l=this.formArray.at(o+1).controls.departDate.value;l&&n.getTime()>l.getTime()&&(this.formArray.at(o+1).controls.departDate.setValue(new Date(n.getTime()+864e5)),n=new Date(n.getTime()+864e5))}}fromDateChange(n,i){"string"!=typeof n&&(n?(this.minToDate=new d.Ao(n.getFullYear(),n.getMonth()+1,n.getDate()),i.hasValidator(e.kI.required)&&i.removeValidators(e.kI.required),i.value&&n.getTime()>=i.value.getTime()&&i.setValue(null)):i.hasValidator(e.kI.required)||i.addValidators(e.kI.required),i.updateValueAndValidity({onlySelf:!0}),this.dataChange.emit())}toDateChange(n,i){i.hasValidator(e.kI.required)||i.addValidators(e.kI.required),i.updateValueAndValidity(),this.dataChange.emit()}resetDate(n){n.setValue("")}resetRangeDate(n,i,o){n.setValue(""),i.setValue(""),this.currentDate=(0,d.jy)(new Date),setTimeout(()=>{o.navigateTo(this.currentDate)})}swapPoint(n,i){if(""!=n.value&&""!=i.value){const o=n.value;n.setValue(i.value),i.setValue(o),this.changeDetectorRef.detectChanges()}}removeAccents(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0111/g,"d").replace(/\u0110/g,"D")}focusFirstStartPoint(){const n=this.startPoints.get(0);n&&setTimeout(()=>{n.inputElement.nativeElement.focus(),n.selectFocus()}),this.dataChange.emit()}openAirportBottomSheet(n,i){const o=this._bottomSheetService.open(B,{headerTitle:"Chuy\u1ebfn bay c\u1ee7a b\u1ea1n",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:"",containerFullHeigh:!0,data:{airportOptions:this.data,currentSelected:this._locationDataService.getCityNameByCode(n.value),excludes:[i.value]}});o.containerInstance._leftButtonClick.subscribe(l=>{o.dismiss()}),o.afterDismissed().subscribe(l=>{l&&(n.setValue(l.Code),this.dataChange.emit())})}scrollDown(){this.numOfMonth=this.numOfMonth+4;const n=y(new Date).add(this.numOfMonth,"month").startOf("month").format("YYYY-MM-DD");this.navigateDatepicker.emit(n)}onMobileDateSelection(n,i,o){i.value||o.value?i.value&&!o.value&&n&&n.getTime()>=i.value.getTime()?(o.setValue(n),this.startDate=new Date):(o.setValue(null),i.setValue(n)):i.setValue(n)}onMobileDatePickerOK(){this.dataChange.emit(),this.oneWayDatePickerBts&&this.oneWayDatePickerBts.dismiss(),this.roundTripDatePickerBts&&this.roundTripDatePickerBts.dismiss()}openAirlineMinFareBts(n){this.isMobile&&(this.airlineMinFareBtsRef=this._bottomSheetService.open(n,{headerTitle:"Ch\u1ecdn h\xe3ng",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:""}),this.airlineMinFareBtsRef.containerInstance._leftButtonClick.subscribe(i=>this.airlineMinFareBtsRef.dismiss()))}openConfigMinFareBts(n){this.isMobile&&(this.configMinFareBtsRef=this._bottomSheetService.open(n,{headerTitle:"T\xf9y ch\u1ec9nh",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",rightButtonIcon:""}),this.configMinFareBtsRef.containerInstance._leftButtonClick.subscribe(i=>this.configMinFareBtsRef.dismiss()))}confirmAirlineMinFare(){this.airlineMinFareBtsRef&&this.airlineMinFareBtsRef.dismiss()}confirmConfigMinFare(){this.configMinFareBtsRef&&this.configMinFareBtsRef.dismiss()}onToggleMinPrice(n){this.minFareOptionConfig.showMinPrice=n,this.minFareOptionConfig=Object.assign({},this.minFareOptionConfig)}onToggleLunarDate(n){this.minFareOptionConfig.showLunarDate=n,this.minFareOptionConfig=Object.assign({},this.minFareOptionConfig)}onToggleAirline(n,i){n.selected=i,this.toggleAirline.emit(!0)}}return c.\u0275fac=function(n){return new(n||c)(t.Y36(d.jH),t.Y36(t.sBO),t.Y36(P._),t.Y36(r.a2),t.Y36(J.L),t.Y36(U.rL),t.Y36(S.KNP))},c.\u0275cmp=t.Xpm({type:c,selectors:[["btc-search-input"]],viewQuery:function(n,i){if(1&n&&(t.Gf(Q,5),t.Gf(V,5),t.Gf(j,5)),2&n){let o;t.iGM(o=t.CRH())&&(i.dateFrom=o.first),t.iGM(o=t.CRH())&&(i.dateRange=o.first),t.iGM(o=t.CRH())&&(i.startPoints=o)}},inputs:{formArray:"formArray",minFareOptionConfig:"minFareOptionConfig",type:"type"},outputs:{removeRoute:"removeRoute",dataChange:"dataChange",toggleAirline:"toggleAirline",navigateDatepicker:"navigateDatepicker",dateTypeChange:"dateTypeChange"},standalone:!0,features:[t.TTD,t.jDz],decls:8,vars:1,consts:[[1,"flex","flex-col","gap-y-2"],[4,"ngFor","ngForOf"],["optionTemplate",""],["airlineMinFareBts",""],["configMinFareBts",""],[1,"flex","items-start","gap-x-2","md:flex-wrap","md:gap-x-0","md:gap-y-4","md:flex-col","md:relative"],[4,"ngIf"],["textField","AirportDisplay","valueField","Code",1,"grow-[293]","!w-full","!max-w-none","md:flex-grow-0","md:w-[calc(50%-12px)]","md:hidden",3,"maxHeight","typeInput","status","customSearch","excludes","formControl","data","optionTmp","selectedChange"],["startPoint",""],["cf-head-icon","","icon","plane","size","medium",1,"text-neutral-gray-4"],["cf-label","","for","startPoint",1,"text-body-sm","text-neutral-gray-4","cursor-text",3,"ngClass"],["type","text","id","startPoint","type","text","size","medium","autocomplete","off","cf-field","",1,"text-neutral-gray-6","placeholder-neutral-gray-6","text-express-md","placeholder:text-express-md"],["cfInputElement",""],["cf-hint","",3,"hint",4,"ngIf"],[1,"grow-[293]","!max-w-none","md:flex-grow-0","md:w-[calc(50%-12px)]","hidden","md:block","!w-full",3,"click"],["textField","AirportDisplay","valueField","Code",1,"pointer-events-none","!w-full","!max-w-full",3,"typeInput","status","customSearch","excludes","formControl","data","optionTmp"],["type","text","id","startPoint","type","text","size","medium","autocomplete","off","cf-field","",1,"!p-0","placeholder-neutral-gray-6","placeholder:text-express-md"],["cf-button","","size","medium","type","secondary",1,"rounded-full","md:absolute","md:right-[10px]","flex","items-center","justify-center","!w-10","!h-10","md:bottom-[57%]","md:!bg-neutral-white","mt-2","md:m-0",3,"click"],["icon","switch","size","small",1,"text-primary-1-4","md:rotate-90"],["textField","AirportDisplay","valueField","Code",1,"grow-[293]","w-full","!max-w-none","md:flex-grow-0","md:hidden",3,"maxHeight","typeInput","status","customSearch","excludes","formControl","data","optionTmp","selectedChange"],["endPoint",""],["cf-label","","for","endPoint",1,"text-body-sm","text-neutral-gray-4","cursor-text",3,"ngClass"],["type","text","id","endPoint","type","text","size","medium","autocomplete","off","cf-field","",1,"!p-0","placeholder-neutral-gray-6","placeholder:text-express-md"],[1,"w-full","flex","md:hidden"],[1,"grow-[293]","!max-w-none","md:flex-grow-0","md:w-full","w-[calc(50%-12px)]",3,"valid","status","click"],["cfHeadIcon","","icon","calendar","size","medium",1,"text-neutral-gray-4"],["cfLabel","","for","departDate",1,"text-express-md","text-neutral-gray-4","cursor-text"],["id","departDate","cfDatepickerViewer","","type","text","size","medium","cf-input","","autocomplete","off",1,"!p-0",3,"minDate","formControl","input","mousedown","click"],["cfHint","",3,"hint",4,"ngIf"],["type","text","outsideDays","hidden","cfDatepicker","",1,"w-0","m-0","mr-2","bottom-0","md:h-0",3,"minDate","secondaryCalendar","displayMonths","rangeSelection","fromDate","startDate","containerWidth","navigate","dateSelect","closed"],["dateRange","cfDatepicker"],["class","w-full",4,"ngIf"],["icon","close","size","small","class","mt-3 cursor-pointer",3,"invisible","pointer-events-none","click",4,"ngIf"],["oneWayDatepickerBottomSheet",""],["cf-hint","",3,"hint"],["cfHint","",3,"hint"],[1,"w-full"],[1,"grow-[293]","md:flex-grow-0","w-full",3,"valid","status","click"],["cfLabel","",1,"text-express-md","text-neutral-gray-4","cursor-text"],["type","text","size","medium","cf-input","","autocomplete","off","cfDatepicker","",1,"!p-0",3,"secondaryCalendar","displayMonths","minDate","formControl","input","dateSelect","mousedown"],["dateFrom","cfDatepicker"],["icon","close","size","small",1,"mt-3","cursor-pointer",3,"click"],[1,"flex","w-full","flex-col","justify-between","h-full"],[1,"pt-4","px-4","flex","items-center","gap-x-2"],["class","flex gap-x-1.5 items-center border border-neutral-gray-3 rounded-full px-4 py-[5px]",3,"click",4,"ngIf"],[1,"grow","overflow-y-hidden","flex","pb-12"],["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","footerOptionConfig","fromDate","startDate","displayMonthsOffset","dateSelect"],[1,"p-4","fixed","bottom-0","w-full","right-0","bg-neutral-white"],["cf-button","",1,"justify-center","w-full",3,"click"],[1,"flex","gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]",3,"click"],[1,"text-body-md","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["textField","AirportDisplay","valueField","Code","placeholder","\u0110i\u1ec3m kh\u1edfi h\xe0nh",1,"grow-[293]","!max-w-none","md:flex-grow-0","w-[calc(50%-12px)]","md:hidden",3,"maxHeight","typeInput","status","customSearch","excludes","formControl","data","optionTmp","selectedChange"],[1,"grow-[293]","!max-w-none","md:flex-grow-0","hidden","md:block","md:w-full",3,"click"],["textField","AirportDisplay","valueField","Code","placeholder","\u0110i\u1ec3m kh\u1edfi h\xe0nh",1,"pointer-events-none","md:w-full","md:max-w-full",3,"typeInput","status","customSearch","excludes","formControl","data","optionTmp"],["cf-button","","size","medium","type","secondary",1,"rounded-full","md:absolute","md:right-[10px]","md:top-[45px]","md:!bg-neutral-white","mt-2","md:m-0","flex","items-center","justify-center","!w-10","!h-10",3,"click"],["textField","AirportDisplay","valueField","Code","placeholder","\u0110i\u1ec3m \u0111\u1ebfn",1,"grow-[293]","!max-w-none","md:flex-grow-0","w-[calc(50%-12px)]","md:hidden",3,"maxHeight","typeInput","status","customSearch","excludes","formControl","data","optionTmp","selectedChange"],["textField","AirportDisplay","valueField","Code","placeholder","\u0110i\u1ec3m \u0111\u1ebfn",1,"pointer-events-none","md:w-full","md:max-w-full",3,"typeInput","status","customSearch","excludes","formControl","data","optionTmp"],[1,"flex","w-full","md:flex-col"],[1,"grow","w-[calc(50%-12px)]","md:w-full","md:mb-4",3,"valid","status","click"],["cfLabel","","for","departDate",1,"text-express-md","text-neutral-gray-4","cursor-text","whitespace-nowrap"],["id","departDate","cfDatepickerViewer","","type","text","size","medium","cf-input","","autocomplete","off",1,"!p-0",3,"minDate","formControl","input","mousedown","ngModelChange","click"],["type","text","outsideDays","hidden","cfDatepicker","",1,"w-0","m-0","mr-2","bottom-0","md:h-0",3,"minDate","footerOptionConfig","secondaryCalendar","displayMonths","rangeSelection","fromDate","startDate","containerWidth","toDate","reset","dateSelect","navigate","closed"],[1,"grow","w-[calc(50%-12px)]","md:w-full",3,"valid","status","click"],["cfLabel","","for","returnDate",1,"text-express-md","text-neutral-gray-4","cursor-text","whitespace-nowrap"],["id","returnDate","autocomplete","off","cfDatepickerViewer","","type","text","size","medium","cf-input","",1,"!p-0",3,"minDate","formControl","input","mousedown","ngModelChange","click"],["roundTripDatepickerBottomSheet",""],[1,"flex","w-full","flex-col","justify-between","h-[100vh]"],[1,"flex","justify-between","items-center","p-4"],[1,"grow","!w-auto",3,"status"],["cfDatepickerViewer","","type","text","size","medium","cf-input","","placeholder","Ng\xe0y kh\u1edfi h\xe0nh","autocomplete","off",1,"py-[7px]",3,"minDate","formControl","ngModelChange"],[1,"text-body-md-short","text-neutral-gray-6","px-2"],["autocomplete","off","cfDatepickerViewer","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y v\u1ec1",1,"py-[7px]",3,"minDate","formControl","ngModelChange"],["outsideDays","hidden","navigation","none","direction","vertical",1,"",3,"minDate","displayMonths","rangeSelection","secondaryCalendar","footerOptionConfig","fromDate","startDate","toDate","displayMonthsOffset","dateSelect"],[1,"flex","flex-col"],[1,"text-body-md-short","text-neutral-gray-6",3,"innerHtml"],[1,"text-body-sm","text-neutral-gray-4",3,"innerHtml"],[1,"flex","flex-col","gap-y-2","w-full"],[1,"flex","flex-col","gap-y-1","pt-4","px-4"],[1,"text-body-md","text-neutral-gray-6"],[1,"flex","items-center","gap-x-6"],[1,"p-4"],["cf-button","","size","medium","color","primary-1",1,"justify-center","w-full",3,"click"],["size","medium",3,"checked","checkChange"]],template:function(n,i){1&n&&(t.TgZ(0,"div",0),t.YNc(1,It,4,2,"div",1),t.qZA(),t.YNc(2,Pt,5,8,"ng-template",null,2,t.W1O),t.YNc(4,Zt,9,1,"ng-template",null,3,t.W1O),t.YNc(6,wt,12,2,"ng-template",null,4,t.W1O)),2&n&&(t.xp6(1),t.Q6J("ngForOf",i.formArray.controls))},dependencies:[Z.q,D.N8,D.Xq,E.j$,E.ND,E.BN,E.v2,M.C,S.AxE,S.Sm8,e.u5,e.Fj,e.JJ,e.UX,e.oH,d.Cs,d.hI,k.m,v.ax,v.O5,v.mk,h.Rq,h.Ry,d._o,p.T,C.u],styles:["[_nghost-%COMP%]{display:block}"]}),c})()},82692:(N,O,u)=>{u.d(O,{T:()=>d});var v=u(36895),t=u(94650),e=u(24006),D=u(19123),C=u(64070);let d=(()=>{class M{constructor(){this.typeSearchChange=new t.vpe}set flightType(S){switch(S){case C.VB.OneWay:this._flightType="ONE_WAY";break;case C.VB.RoundTrip:this._flightType="ROUND_TRIP";break;case C.VB.MultiWay:this._flightType="MULTI_WAY"}}flightTypeChange(S){switch(S){case"ONE_WAY":this.typeSearchChange.emit(C.VB.OneWay);break;case"ROUND_TRIP":this.typeSearchChange.emit(C.VB.RoundTrip);break;case"MULTI_WAY":this.typeSearchChange.emit(C.VB.MultiWay)}}}return M.\u0275fac=function(S){return new(S||M)},M.\u0275cmp=t.Xpm({type:M,selectors:[["btc-type-search"]],inputs:{flightType:"flightType"},outputs:{typeSearchChange:"typeSearchChange"},standalone:!0,features:[t.jDz],decls:11,vars:19,consts:[[1,"flex","items-center","gap-x-8","md:hidden",3,"ngModel","checkChange"],["size","medium",3,"value"],[1,"items-center","gap-x-1.5","hidden","md:flex"],[1,"flex","justify-around","w-full","gap-x-4"],[1,"px-4","py-1.5","rounded-full","text-body-md-short","text-neutral-gray-4","border","border-transparent","w-1/2","flex","justify-center",3,"click"]],template:function(S,E){1&S&&(t.TgZ(0,"cf-radio-group",0),t.NdJ("checkChange",function(m){return E.flightTypeChange(m)}),t.TgZ(1,"cf-radio",1),t._uU(2,"M\u1ed9t chi\u1ec1u"),t.qZA(),t.TgZ(3,"cf-radio",1),t._uU(4,"Kh\u1ee9 h\u1ed3i"),t.qZA()(),t.TgZ(5,"div",2)(6,"div",3)(7,"div",4),t.NdJ("click",function(){return E.flightTypeChange("ONE_WAY")}),t._uU(8," M\u1ed9t chi\u1ec1u "),t.qZA(),t.TgZ(9,"div",4),t.NdJ("click",function(){return E.flightTypeChange("ROUND_TRIP")}),t._uU(10," Kh\u1ee9 h\u1ed3i "),t.qZA()()()),2&S&&(t.Q6J("ngModel",E._flightType),t.xp6(1),t.Q6J("value","ONE_WAY"),t.xp6(2),t.Q6J("value","ROUND_TRIP"),t.xp6(4),t.ekj("text-secondary-3-4","ONE_WAY"===E._flightType)("!border-secondary-3-4","ONE_WAY"===E._flightType)("bg-secondary-3-1","ONE_WAY"===E._flightType)("!text-espressive-md-short","ONE_WAY"===E._flightType),t.xp6(2),t.ekj("text-secondary-3-4","ROUND_TRIP"===E._flightType)("!border-secondary-3-4","ROUND_TRIP"===E._flightType)("bg-secondary-3-1","ROUND_TRIP"===E._flightType)("!text-espressive-md-short","ROUND_TRIP"===E._flightType))},dependencies:[D.o,D.T,e.u5,e.JJ,e.On,v.ez],styles:[":host{display:block}\n"],encapsulation:2,changeDetection:0}),M})()},53819:(N,O,u)=>{u.d(O,{W:()=>K});var v=u(36895),t=u(94650),e=u(24006),D=u(83700),C=u(72506),d=u(74891),M=u(74713),k=u(62331),S=u(24513),E=u(88605),Z=u(98184),m=u(37094);const p=["voucher"];function y(A,I){1&A&&t._UZ(0,"cf-icon",12)}function h(A,I){if(1&A&&(t.TgZ(0,"div",13),t._uU(1),t.qZA()),2&A){const x=t.oxw();t.xp6(1),t.hij(" ",x.promotionApplyCount," ")}}function a(A,I){1&A&&t._UZ(0,"cf-icon",12)}function _(A,I){if(1&A&&(t.TgZ(0,"div",13),t._uU(1),t.qZA()),2&A){const x=t.oxw();t.xp6(1),t.hij(" ",x.promotionApplyCount," ")}}function r(A,I){if(1&A){const x=t.EpF();t.TgZ(0,"div",19)(1,"div",20)(2,"cf-select",21),t.NdJ("ngModelChange",function(P){const U=t.CHM(x).$implicit;return t.KtG(U.selectedCode=P)})("ngModelChange",function(){t.CHM(x);const P=t.oxw(2);return t.KtG(P.onCodeChanges())})("selectedChange",function(P){const U=t.CHM(x).$implicit,Q=t.oxw(2);return t.KtG(Q.onPromotionChange(P,U))}),t.TgZ(3,"div",22),t._UZ(4,"img",23),t._uU(5),t.qZA()()()()}if(2&A){const x=I.$implicit;t.xp6(2),t.Q6J("ngModel",x.selectedCode)("allowCustomText",!0)("data",x.items)("allowClear",!0),t.xp6(2),t.Q6J("src",x.airlineLogo,t.LSH),t.xp6(1),t.hij(" ",x.airline," ")}}function s(A,I){if(1&A&&(t.TgZ(0,"div",14)(1,"div",15)(2,"div",16),t._uU(3,"M\xe3 khuy\u1ebfn m\xe3i"),t.qZA(),t.TgZ(4,"div",17),t.YNc(5,r,6,6,"div",18),t.qZA()()()),2&A){const x=t.oxw();t.xp6(5),t.Q6J("ngForOf",x.promotionGroupList)}}function f(A,I){if(1&A&&(t.TgZ(0,"div"),t._uU(1,"Ch\xfac m\u1eebng, "),t.TgZ(2,"strong"),t._uU(3),t.qZA(),t._uU(4," \u0111\xe3 \u0111\u01b0\u1ee3c \xe1p d\u1ee5ng cho b\u1ea1n!"),t.qZA()),2&A){const x=t.oxw(2);t.xp6(3),t.hij("",x.promotionApplyCount," m\xe3 khuy\u1ebfn m\xe3i")}}function T(A,I){1&A&&(t.TgZ(0,"div"),t._uU(1,"\u{1f525} Nh\u1eadp khuy\u1ebfn m\xe3i \u0111\u1ec3 \u0111\u01b0\u1ee3c gi\u1ea3m gi\xe1"),t.qZA())}function w(A,I){if(1&A&&(t.YNc(0,f,5,1,"div",24),t.YNc(1,T,2,0,"div",24)),2&A){const x=t.oxw();t.Q6J("ngIf",x.promotionApplyCount>0),t.xp6(1),t.Q6J("ngIf",0===x.promotionApplyCount)}}let K=(()=>{class A{constructor(x,B,P){this._toastService=x,this._viewportRuler=B,this.bottomSheetService=P,this.isShowTooltipFirstTime=!1,this.promotionChange=new t.vpe,this.isOpen=!1,this.promotionApplyCount=0,this.isMobile=matchMedia("(max-width: 768px)").matches,this.isDirty=!1}ngAfterViewInit(){setTimeout(()=>{this.promotionApplyCount=this.promotionGroupList.filter(x=>""!=x.selectedCode).length})}ngOnChanges(x){x.promotionGroupList&&!x.promotionGroupList.firstChange&&this.reloadTooltip()}click(x,B){matchMedia("(max-width: 768px)").matches?this.openBottomSheet(B):this.isOpen=!this.isOpen,x.stopPropagation(),this.isDirty=!0}reloadTooltip(x=!0){const B=this.promotionGroupList.filter(P=>""!=P.selectedCode).length;B>0?(this.promotionApplyCount=B,this.promotionApplyCount>0&&x&&(!this.isShowTooltipFirstTime&&this.isMobile||this.isShowTooltipFirstTime&&!this.isMobile)&&this._toastService.add({severity:"success",summary:"\xc1p d\u1ee5ng M\xe3 KM th\xe0nh c\xf4ng",detail:`${this.promotionApplyCount} m\xe3 khuy\u1ebfn m\xe3i \u0111\xe3 \u0111\u01b0\u1ee3c \xe1p d\u1ee5ng cho b\u1ea1n!`,sticky:!1,contentStyleClass:"!p-3"})):this.promotionApplyCount=0}outsideClick(x){this.isOpen=!1}onPromotionChange(x,B){x&&"GMBR"===x.code.substr(0,4)&&10===x.code.length?0===B.items.map(P=>P.code).filter(P=>P===x.code).length&&(B.items.push({code:x.code,description:x.description,isSystemPromotion:!1}),this.reloadTooltip()):(B.selectedCode="",this.reloadTooltip(!1)),this.promotionChange.emit(this.promotionGroupList)}onCodeChanges(){console.log(this.promotionGroupList)}openBottomSheet(x){this.bottomSheetService.open(x,{headerTitle:"Khuy\u1ebfn m\xe3i",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",containerFullHeigh:!0}).containerInstance._rightButtonClick.subscribe(()=>this.bottomSheetService.dismiss())}}return A.\u0275fac=function(x){return new(x||A)(t.Y36(k.BX),t.Y36(E.rL),t.Y36(m.a2))},A.\u0275cmp=t.Xpm({type:A,selectors:[["btc-voucher-selector"]],viewQuery:function(x,B){if(1&x&&t.Gf(p,5,S.Lk),2&x){let P;t.iGM(P=t.CRH())&&(B.voucher=P.first)}},inputs:{promotionGroupList:"promotionGroupList",isShowTooltipFirstTime:"isShowTooltipFirstTime"},outputs:{promotionChange:"promotionChange"},standalone:!0,features:[t.TTD,t.jDz],decls:20,vars:10,consts:[["tabIndex","-1","cdkOverlayOrigin","",1,"cursor-pointer",3,"manualHandle","placement","color","cfTooltip","click"],["voucher","","trigger","","originOverlay","cdkOverlayOrigin"],[1,"flex","items-center","gap-x-2","md:hidden","border","border-neutral-gray-3","rounded-full","px-4","py-1"],["icon","coupon","size","small",4,"ngIf"],["class","flex items-center rounded justify-center w-4 h-4 text-espressive-xs bg-secondary-6-4 text-neutral-white",4,"ngIf"],[1,"text-body-md"],["icon","down","size","small",1,"text-neutral-gray-5"],[1,"gap-x-1.5","items-center","hidden","md:flex","border","border-neutral-gray-3","rounded-full","px-4","py-1"],[1,"text-body-md","whitespace-nowrap"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","overlayOutsideClick"],["bottomSheet",""],["toolTipTemplate",""],["icon","coupon","size","small"],[1,"flex","items-center","rounded","justify-center","w-4","h-4","text-espressive-xs","bg-secondary-6-4","text-neutral-white"],[1,"p-4","shadow-cf-lg","w-[280px]","bg-neutral-white","rounded","md:w-full","md:pt-1"],[1,"flex-col","justify-start","items-center","rounded"],[1,"text-heading-sm","text-neutral-black","md:hidden"],[1,"flex","flex-col","pt-4","gap-y-2","md:gap-y-3"],["class","flex items-center",4,"ngFor","ngForOf"],[1,"flex","items-center"],[1,"flex","items-center","gap-x-2","md:w-full"],["textField","description","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"select-promotion","md:max-w-none","md:w-full",3,"ngModel","allowCustomText","data","allowClear","ngModelChange","selectedChange"],["cfPrefix","",1,"min-w-[112px]","py-2.5","px-3","text-body-md","flex","gap-x-2","items-center","border-r","border-neutral-gray-2"],[1,"w-8","h-5","object-contain","shrink-0",3,"src"],[4,"ngIf"]],template:function(x,B){if(1&x){const P=t.EpF();t.TgZ(0,"div",0,1),t.NdJ("click",function(U){t.CHM(P);const Q=t.MAs(16);return t.KtG(B.click(U,Q))}),t.TgZ(4,"div",2),t.YNc(5,y,1,0,"cf-icon",3),t.YNc(6,h,2,1,"div",4),t.TgZ(7,"div",5),t._uU(8,"M\xe3 khuy\u1ebfn m\xe3i"),t.qZA(),t._UZ(9,"cf-icon",6),t.qZA(),t.TgZ(10,"div",7),t.YNc(11,a,1,0,"cf-icon",3),t.YNc(12,_,2,1,"div",4),t.TgZ(13,"div",8),t._uU(14," Khuy\u1ebfn m\xe3i"),t.qZA()()(),t.YNc(15,s,6,1,"ng-template",9,10,t.W1O),t.NdJ("overlayOutsideClick",function(U){return B.outsideClick(U)}),t.YNc(17,w,2,2,"ng-template",null,11,t.W1O),t._UZ(19,"cf-toast")}if(2&x){const P=t.MAs(3),J=t.MAs(18);t.Q6J("manualHandle",!0)("placement","topRight")("color","black")("cfTooltip",J),t.xp6(5),t.Q6J("ngIf",0===B.promotionApplyCount),t.xp6(1),t.Q6J("ngIf",B.promotionApplyCount>0),t.xp6(5),t.Q6J("ngIf",0===B.promotionApplyCount),t.xp6(1),t.Q6J("ngIf",B.promotionApplyCount>0),t.xp6(3),t.Q6J("cdkConnectedOverlayOrigin",P)("cdkConnectedOverlayOpen",B.isOpen)}},dependencies:[v.ez,v.sg,v.O5,C.AxE,C.Sm8,d.f,Z.pI,Z.xu,M.q,e.u5,e.JJ,e.On,S.Lk,k.hj,D.N8],encapsulation:2}),A})()},80429:(N,O,u)=>{u.d(O,{q:()=>t});var v=u(94650);let t=(()=>{class e{transform(C,d,...M){return d(C,...M)}}return e.\u0275fac=function(C){return new(C||e)},e.\u0275pipe=v.Yjl({name:"mapper",type:e,pure:!0,standalone:!0}),e})()}}]);