1"use strict";(globalThis.webpackChunkweb=globalThis.webpackChunkweb||[]).push([[7337],{89857:((w,v,c)=>{c.d(v,{CH:()=>S,Ey:()=>a,Kt:()=>E,Lc:()=>D,P9:()=>A,z9:()=>T});var p=c(46153),m=c(64821),y=c(54271),f=c(12954);const o=e=>new CancelableAPI(familyLoungeAPIInstance,{method:"GET",url:`/reservations/${encodeURIComponent(e)}/periods`,data:{}}),h=e=>new CancelableAPI(familyLoungeAPIInstance,{method:"GET",url:`reservations/grade/${e}`,data:{},promiseManager:{key:"getFamilyLoungeMaxBenefitCountByGradeAPI",expiresIn:MINUTE_MIL}}),d=async e=>{try{const i=await h(e).request({data:{}});return Number(i.data.maximumCount)}catch(i){return Logger.networkError({name:"Failed to get maximum family lounge benefit count",error:i,location:"getFamilyLoungeMaxBenefitCountByGrade"},Logger.ERROR_LEVEL.MINOR),1}},E=e=>new m.Z(f.Gp,{method:"GET",url:"/companies",data:{},params:e}),S=()=>new m.Z(f.Gp,{method:"GET",url:"/statistics/reservations",data:{}}),D=()=>new m.Z(f.Gp,{method:"GET",url:"/region-categories",data:{}}),A=()=>new m.Z(f.Gp,{method:"GET",url:"/company-categories",data:{}}),T=e=>{const i=new m.Z(f.Gp,{method:"GET",url:`/subregions/${encodeURIComponent(e)}`,data:{}});return i.interceptor.response=_=>{const{data:u}=_;return{..._,data:{...u,subRegions:u.subRegions.map(C=>({...C,parentRegionId:e}))}}},i},a=()=>new m.Z(f.Gp,{method:"GET",url:"/admin/outlink-rules",data:{}})}),69572:((w,v,c)=>{c.d(v,{Z:()=>A});var p=c(58938),m=c(98910),y=c(66366),f=c(72019),o=c(11290),h=c(89857),d=Object.defineProperty,E=(T,a,e)=>a in T?d(T,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):T[a]=e,S=(T,a,e)=>E(T,typeof a!="symbol"?a+"":a,e);class D{static getCompanies(){return(0,h.Kt)().request({data:{}})}static async getCachedCompanies(a){if(this.companiesCache&&!this.companiesCache.isExpired)return this.companiesCache.data;const{data:e}=await this.getCompanies();return this.companiesCache=new f.Z({data:e,expiresIn:a}),e}static getBenefitUsageStatistics(){return(0,h.CH)().request({data:{}})}static async getCachedBenefitUsageStatistics(a){if(this.benefitUsageStatisticsCache&&!this.benefitUsageStatisticsCache.isExpired)return this.benefitUsageStatisticsCache.data;const{data:e}=await this.getBenefitUsageStatistics();return this.benefitUsageStatisticsCache=new f.Z({data:e,expiresIn:a}),e}static getRegionCategories(a){return(0,h.Lc)().request({data:{},headers:{Authorization:(0,m.I4)(a)}})}static async getCachedRegionCategories(a,e){if(this.regionCategoriesCache&&!this.regionCategoriesCache.isExpired)return this.regionCategoriesCache.data;const{data:i}=await this.getRegionCategories(a);return this.regionCategoriesCache=new f.Z({data:i,expiresIn:e}),i}static getCompanyCategories(a){return(0,h.P9)().request({data:{},headers:{Authorization:(0,m.I4)(a)}})}static async getCachedCompanyCategories(a,e){if(this.companyCategoriesCache&&!this.companyCategoriesCache.isExpired)return this.companyCategoriesCache.data;const{data:i}=await this.getCompanyCategories(a);return this.companyCategoriesCache=new f.Z({data:i,expiresIn:e}),i}static getSubregions(a,e){return(0,h.z9)(a).request({data:{},headers:{Authorization:(0,m.I4)(e)}})}static async getCachedSubregions(a,e,i){const _=this.subregionsCache.get(a);if(_&&!_.isExpired)return _.data;const{data:u}
1=await this.getSubregions(a,e);return this.subregionsCache.set(a,new f.Z({data:u,expiresIn:i})),u}static findOutlinkRule(a,e){var i;return e&&(i=a.find(_=>_.outlinkKey===e))!=null?i:null}static getEarliestDuringReservation(a){var e;const i=new o.Z().flat("hour");return(e=a.filter(u=>{const C=new o.Z(u.startDate).flat("hour"),t=new o.Z(u.endDate).flat("hour");return C.diff(i).isSameOrAfter&&i.diff(t).isSameOrAfter}).sort((u,C)=>new o.Z(u.startDate).getTime()-new o.Z(C.startDate).getTime())[0])!=null?e:null}static getClosestUpcomingReservation(a){var e;const i=new o.Z().flat("hour");return(e=a.filter(u=>new o.Z(u.startDate).flat("hour").diff(i).isBefore).sort((u,C)=>new o.Z(u.startDate).getTime()-new o.Z(C.startDate).getTime())[0])!=null?e:null}static getOutlinkRules(){return(0,h.Ey)().request({data:{}})}static async getCachedOutlinkRules(a){if(this.outlinkRulesCache&&!this.outlinkRulesCache.isExpired)return this.outlinkRulesCache.data;const{data:e}=await this.getOutlinkRules();return this.outlinkRulesCache=new f.Z({data:e,expiresIn:a}),e}static getClosestCompletedReservation(a){var e;const i=new o.Z().flat("hour");return(e=a.filter(u=>i.diff(new o.Z(u.endDate).flat("hour")).isBefore).sort((u,C)=>new o.Z(C.endDate).getTime()-new o.Z(u.endDate).getTime())[0])!=null?e:null}static matchReservationLocation(a,e,i){if(!a)return null;const _=(0,y.Bc)(),u=(0,y.dB)(p.u.SHORT),C=(0,y.QG)(),t=_.some(r=>r.areaCode===a),n=!t&&u.some(r=>r.areaCode===a),s=C.find(r=>r.area===a);if(!!!(s&&s.nationalCode!=="KR")&&!t&&!n)return null;const g=i.find(r=>r.codes.includes(a));if(g)return{type:"SUBREGION",subregion:g};const O=a.split("_")[0],P=e.find(r=>r.locationCodes.some(R=>R===a||R===O));return P?{type:"REGION",regionCategory:P}:null}static filterCompaniesByLocationMatch(a,e){if(e===null)return[];const i=e.type==="SUBREGION"?e.subregion.id:null,_=e.type==="SUBREGION"?e.subregion.parentRegionId:e.regionCategory.id;return a.filter(u=>{var C;return u.subRegionIds.length>0?i!==null&&u.subRegionIds.includes(i):((C=u.regionCategoryIds)!=null?C:[]).includes(_)})}}S(D,"companiesCache",null),S(D,"regionCategoriesCache",null),S(D,"companyCategoriesCache",null),S(D,"subregionsCache",new Map),S(D,"benefitUsageStatisticsCache",null),S(D,"outlinkRulesCache",null);const A=D}),47337:((w,v,c)=>{c.d(v,{Z:()=>u});var p=c(46153),m=c(58938),y=c(35589),f=c(79976),o=c(52613),h=c(54271),d=c(24356),E=c(69572),S=c(47630),D=c(15019),A=c(37150),T=Object.defineProperty,a=(C,t,n)=>t in C?T(C,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):C[t]=n,e=(C,t,n)=>a(C,typeof t!="symbol"?t+"":t,n);const i=class L{static async getRentalCarCandidates(t){const n=await A.Z.getCachedFullReservationInventory(t);return(n!=null?n:[]).filter(s=>s.rentType!==m.u.SUBSCRIBE&&s.rentType!==m.u.MONTH).map(s=>({startDate:s.startDate,endDate:s.endDate,locationCode:s.locationCode,isCanceled:s.reservationState===y.ND.CANCELED||s.reservationState===y.ND.CONTRACT_TERMINATED}))}static async getHotelCandidates(t){const s=(await D.Z.getReservations(t)).data.filter(r=>r.hotel.reservationState!==y.ND.CANCELED&&r.hotel.reservationState!==y.ND.CONTRACT_TERMINATED),l=(r,R)=>`${r},${R}`,g=new Map;s.forEach(r=>{var R;if((R=r.region)!=null&&R.coordinate){const[B,I]=r.region.coordinate;g.set(l(B,I),[B,I])}});const O=new Map;return await Promise.all(Array.from(g.entries()).map(async([r,[R,B]])=>{try{const I=await S.Z.searchLocationByCoordinate(R,B);O.set(r,I.data.locationCode)}catch(I){O.set(r,null)}})),s.map(r=>{var R;const B={startDate:r.hotel.startDate.toString(),endDate:r.hotel.endDate.toString()};if((R=r.region)!=null&&R.coordinate){const[I,M]=r.region.coordinate,b=O.get(l(I,M));if(b===null)return null;B.locationCode=b}return B}).filter(r=>r!==null)}static async getCompanies(){try{const n=(await E.Z.getCachedCompanies(3*p.Qm)).companies.filter(s=>s.status!=="CLOSING");return new d.Z(d.R.SUCCESS,n)}catch(t){throw h.Z.networkError({name:"\uD328\uBC00\uB9AC\uB77C\uC6B4\uC9C0 \uC5C5\uCCB4 \uBAA9\uB85D \uC870\uD68C \uC2E4\uD328",error:t,location:"FamilyLoungeBenefitService getCompanies"}
1),new o.Z(o.c.NETWORK_ERROR)}}static async getBenefitUsageStatistics(){try{const t=await E.Z.getCachedBenefitUsageStatistics(5*p.Qm);return new d.Z(d.R.SUCCESS,t)}catch(t){throw new o.Z(o.c.NETWORK_ERROR)}}static async getRegionCategories(t){try{const n=await E.Z.getCachedRegionCategories(t,3*p.Qm);return new d.Z(d.R.SUCCESS,n.categories)}catch(n){throw h.Z.networkError({name:"\uC9C0\uC5ED \uCE74\uD14C\uACE0\uB9AC \uC870\uD68C \uC2E4\uD328",error:n,location:"FamilyLoungeBenefitService getRegionCategories"}),new o.Z(o.c.NETWORK_ERROR)}}static async getCompanyCategories(t){try{const n=await E.Z.getCachedCompanyCategories(t,3*p.Qm);return new d.Z(d.R.SUCCESS,n.categories)}catch(n){throw h.Z.networkError({name:"\uC5C5\uCCB4 \uCE74\uD14C\uACE0\uB9AC \uC870\uD68C \uC2E4\uD328",error:n,location:"FamilyLoungeBenefitService getCompanyCategories"}),new o.Z(o.c.NETWORK_ERROR)}}static async getOutlinkRules(){try{const t=await E.Z.getCachedOutlinkRules(3*p.Qm);return new d.Z(d.R.SUCCESS,t.rules)}catch(t){throw h.Z.networkError({name:"\uC544\uC6C3\uB9C1\uD06C \uADDC\uCE59 \uC870\uD68C \uC2E4\uD328",error:t,location:"FamilyLoungeBenefitService getOutlinkRules"}),new o.Z(o.c.NETWORK_ERROR)}}static async getSubregions(t,n){try{const s=await E.Z.getCachedSubregions(t,n,3*p.Qm);return new d.Z(d.R.SUCCESS,s.subRegions)}catch(s){throw h.Z.networkError({name:"\uC138\uBD80\uC9C0\uC5ED \uC870\uD68C \uC2E4\uD328",error:s,location:"FamilyLoungeBenefitService getSubregions"}),new o.Z(o.c.NETWORK_ERROR)}}static async getAllSubregions(t,n){const l=(await Promise.allSettled(t.map(g=>L.getSubregions(g.id,n)))).flatMap(g=>g.status==="fulfilled"&&g.value.code===d.R.SUCCESS?g.value.data:[]);return new d.Z(d.R.SUCCESS,l)}static async getReservationCandidates(t){try{const[n,s]=await Promise.allSettled([L.getRentalCarCandidates(t),L.getHotelCandidates(t)]),l=[...n.status==="fulfilled"?n.value:[],...s.status==="fulfilled"?s.value:[]];return new d.Z(d.R.SUCCESS,l)}catch(n){throw new o.Z(o.c.NETWORK_ERROR)}}static selectActiveReservation(t){var n,s,l;const g=t.filter(O=>!O.isCanceled);return(l=(s=(n=E.Z.getEarliestDuringReservation(g))!=null?n:E.Z.getClosestUpcomingReservation(g))!=null?s:E.Z.getClosestCompletedReservation(g))!=null?l:null}static findOutlinkRule(t,n){return E.Z.findOutlinkRule(t,n)}static filterCompaniesByOutlinkRule(t,n){if(!t)return n;const s=new Set(t.excludedCompanyIds),l=new Set(t.excludedRegionCategoryIds);return n.filter(g=>s.has(g.id)?!1:l.size===0?!0:g.regionCategoryIds.some(O=>l.has(O)))}static getBenefitPhase({daysUntilStart:t,daysAfterEnd:n}){return t===null||n===null?null:t>=0?"BEFORE":n<=0?"NOW":n<=this.AFTER_PHASE_EXPIRY_DAYS?"AFTER_RECENT":"AFTER_OLD"}static filterCompaniesByAfterPhaseWhitelist(t){const n=(0,f.fW)()?this.AFTER_PHASE_BENEFIT_WHITELIST_DEV:this.AFTER_PHASE_BENEFIT_WHITELIST_PROD,s=new Map(t.map(l=>[l.id,l]));return n.map(l=>s.get(l)).filter(l=>!!l)}static matchReservationLocation(t,n,s){return E.Z.matchReservationLocation(t,n,s)}static filterCompaniesByLocationMatch(t,n){return E.Z.filterCompaniesByLocationMatch(t,n)}static sortCompaniesByTiming(t,n){const l={BEFORE:["BEFORE_DEPARTURE","DURING_RENTAL","AFTER_RETURN"],NOW:["DURING_RENTAL","AFTER_RETURN","BEFORE_DEPARTURE"]}[n];return[...t].sort((g,O)=>{const P=l.findIndex(R=>g.timing.includes(R)),r=l.findIndex(R=>O.timing.includes(R));return(P===-1?l.length:P)-(r===-1?l.length:r)})}};e(i,"AFTER_PHASE_EXPIRY_DAYS",3),e(i,"AFTER_PHASE_BENEFIT_WHITELIST_PROD",["857d32ad-83ea-42d6-a16d-4179257e1183","db852802-d48e-4e8d-92c2-78ba70af3f61","e58ffedf-c957-4fe8-88ab-3e4d116ffe69","86c29c31-a0c9-48a4-a123-71db4e6903c7","f3bb331a-b748-4b67-8dda-a41796c12968","67a6ef1f-61f3-4d60-a58d-f9a644c5a8ec","66643223-7af2-41cb-b838-c9777dbc931f","22ded071-c4fa-46cc-ba5a-6592c33c1a6e"]),e(i,"AFTER_PHASE_BENEFIT_WHITELIST_DEV",["58f40bd0-74e3-4344-b55e-d537baf08988","a8bfa651-6042-46b5-8e92-3c99a37fc0ee","6968d44d-a576-45da-8b92-cdd141db12d1","f4bbc265-7fa0-4a97-b1a4-152a56d12830","47709b42-2560-4949-aded-409222e9292e","dc8f4113-2e3c-4fd4-850f-7876ff2c38c7","2d881af2-6012-49b1-879d-44b27d448ff0","7fcf16b0-383a-4469-b81e-1aed40ede0e9"]);const u=i})}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.