PageSourceSearch

https://lidomatrip.com/_next/static/chunks/pages/my-trips/[id]-4dcb8acab393066e.js

js lidomatrip.com collected 2026-10-02 20:27:57 UTC 52,159 bytes, 31 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3426,9990],{11716:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-trips/[id]",function(){return t(75030)}])},56286:function(e,l,t){"use strict";t.d(l,{HM:function(){return d},Lo:function(){return n},Q8:function(){return i},Vv:function(){return a}});var s=t(57149);async function i(e){let l=await s.Z.setUrl("/api/payment-methods").setCallMethod("GET").setParams({context:e}).call();if((null==l?void 0:l.status)!=="success"||!(null==l?void 0:l.data))throw Error((null==l?void 0:l.message)||"روش‌های پرداخت بارگذاری نشد");return l.data}async function n(e,l){let t=await s.Z.setUrl("/api/payment-methods/claims").setCallMethod("GET").setParams({context:e,...l?{reservationId:l}:{}}).call();if((null==t?void 0:t.status)!=="success")throw Error((null==t?void 0:t.message)||"رسیدها بارگذاری نشد");return t.data??[]}async function d(e){let l=await s.Z.setUrl("/api/payment-methods/claims").setCallMethod("POST").setBody(e).call();if((null==l?void 0:l.status)!=="success"||!(null==l?void 0:l.data))throw Error((null==l?void 0:l.message)||"ثبت رسید انجام نشد");return l.data}async function a(e){var l;let t=await s.Z.setUrl("/api/payment-methods/gateway").setCallMethod("POST").setBody(e).call(),i=null==t?void 0:null===(l=t.data)||void 0===l?void 0:l.url;if((null==t?void 0:t.status)!=="success"||"string"!=typeof i)throw Error((null==t?void 0:t.message)||"انتقال به درگاه انجام نشد");return i}},48011:function(e,l,t){"use strict";var s=t(85893),i=t(28855);l.Z=function(e){var l;let{inputReadonly:t=!0,inputName:n,formik:d,counterMinimum:a,counterMaximum:o,onInc:r,onDec:c,customValue:u}=e;return(0,s.jsxs)("div",{className:"w-full flex items-center",children:[(0,s.jsx)("div",{className:`
2          w-32 h-32 cursor-pointer rounded-8
3          flex items-center justify-center
4          shrink-0 grow-0
5          border-1 border-solid border-black
6          ${(o||0===o)&&Number(null==d?void 0:null===(l=d.values)||void 0===l?void 0:l[n])===o||(o||0===o)&&Number(u)===o?"opacity-30 cursor-not-allowed pointer-events-none":""}
7        `,onClick:()=>{if(d){var e,l;(o||0===o)&&Number(null==d?void 0:null===(e=d.values)||void 0===e?void 0:e[n])===o||null==d||d.setFieldValue(n,Number(null==d?void 0:null===(l=d.values)||void 0===l?void 0:l[n])+1)}else if(r){if((o||0===o)&&Number(u)===o)return;r()}},children:(0,s.jsx)("i",{className:"icon-Plus text-24 text-black"})}),(0,s.jsx)(i.n,{name:n,wrapperClassname:"!p-0 !border-none !bg-transparent",inputClassname:"!text-center !bg-transparent",readonly:t,...d?{formik:d}:{customValue:u}}),(0,s.jsx)("div",{className:`
8          w-32 h-32 cursor-pointer rounded-8 flex items-center justify-center
9          shrink-0 grow-0 border-1 border-solid border-black
10          ${u===a?"opacity-30":""}
11        `,onClick:()=>{if(d){var e,l;(a||0===a)&&Number(null==d?void 0:null===(e=d.values)||void 0===e?void 0:e[n])-1<a||null==d||d.setFieldValue(n,Number(null==d?void 0:null===(l=d.values)||void 0===l?void 0:l[n])-1)}else if(c){if((a||0===a)&&Number(u)-1<a)return;c()}},children:(0,s.jsx)("i",{className:"icon-Negative text-24 text-black"})})]})}},59073:function(e,l,t){"use strict";var s=t(85893);l.Z=function(e){let{className:l,province:t,city:i,neighborhood:n}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("p",{className:`text-12 leading-14 text-gray-57585C font-r OnlyOneLineAndEndWithElipsis ${l}`,children:[t," ، ",i,n?` ، ${n}`:null]})})}},99990:function(e,l,t){"use strict";t.r(l);var s=t(85893);l.default=function(){return(0,s.jsx)("div",{className:"bg-error-light px-12 py-4 rounded-full rounded-bl-0 text-12 leading-16 font-r text-white",children:"هنوز تعداد نفرات رو وارد نکردی"})}},2545:function(e,l,t){"use strict";t.r(l);var s=t(85893),i=t(67294),n=t(47300),d=t(28855);l.default=function(e){let{handleSmoothClose:l,guestName:t,guestPhoneNumber:a,onFormSubmit:o,onTapOfReturnBtn:r}=e,[c,u]=(0,i.useState)(t),[m,v]=(0,i.useState)(a);return(0,i.useEffect)(()=>{u(t),v(a)},[t,a]),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-8 mb-16",children:[(0,s.jsx)("i",{className:"icon-BirthCertificate text-24 text-black"}),(0,s.jsx)("p",{className:"text-14 leading-24 font-r text-black",children:"اطلاعات مهمان"})]}),(0,s.jsx)(d.n,{name:"guestNameInput",customValue:c,customOnChange:e=>u(e),placeholder:"نام و نام خانوادگی مهمان را وارد کنید."}),(0,s.jsx)(d.n,{name:"guestPhoneNumberInput",customValue:m,customOnChange:e=>
11v(e),placeholder:"شماره همراه مهمان را وارد کنید.",disabled:!0,wrapperClassname:"mt-12 bg-gray-F4F5F6"}),(0,s.jsx)("div",{className:"mt-16 border-t-1 border-solid border-t-gray-CACFD3 pt-16 text-12 leading-21 font-l text-black text-center",children:"نام و نام خانوادگی خود را دقیق و مطابق کارت شناسایی وارد کنید"}),(0,s.jsx)("div",{className:"mt-28",children:(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-x-12",children:[(0,s.jsx)("div",{className:"col-span-1",children:(0,s.jsx)(n.z,{isFullWidth:!0,color:"grey",onClick:()=>r(),children:"برگشت"})}),(0,s.jsx)("div",{className:"col-span-2",children:(0,s.jsx)(n.z,{isFullWidth:!0,type:"submit",onClick:()=>o(c),children:"ذخیره تغییرات"})})]})})]})}},1689:function(e,l,t){"use strict";var s=t(85893);let i=e=>{let{title:l,befor72:t,befor24:i,entry:n,longtermReserve:d,peakDays:a}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("div",{className:"flex flex-col pr-16 grow",children:[(0,s.jsxs)("div",{className:"relative border-r-2 pr-16 border-gray-C4CAD3",children:[(0,s.jsx)("span",{className:"block text-14 font-m mb-8",children:"تا 72 ساعت مانده به شروع اقامت"}),(0,s.jsx)("span",{className:"block text-12 font-light mb-16 leading-24",children:t}),(0,s.jsx)("div",{className:"absolute -right-7 top-1/3 -translate-y-1/3 bg-black rounded-[50%] h-12 w-12"})]}),(0,s.jsxs)("div",{className:"relative border-r-2 pr-16 border-gray-C4CAD3",children:[(0,s.jsx)("span",{className:"block text-14 font-m mb-8",children:"کمتر از 72 ساعت مانده به شروع اقامت"}),(0,s.jsx)("span",{className:"block text-12 font-light mb-16 leading-24",children:i}),(0,s.jsx)("div",{className:"absolute -right-7 top-1/3 -translate-y-1/3 bg-black rounded-[50%] h-12 w-12"})]}),(0,s.jsxs)("div",{className:"relative border-r-2 pr-16 border-gray-C4CAD3",children:[(0,s.jsx)("span",{className:"block text-14 font-m mb-8",children:"روز شروع اقامت به بعد"}),(0,s.jsx)("span",{className:"block text-12 font-light mb-16 leading-[26px]",children:n}),(0,s.jsx)("div",{className:"absolute -right-7 top-1/3 -translate-y-1/3 bg-black rounded-[50%] h-12 w-12"})]}),(0,s.jsxs)("div",{className:"relative border-r-2 pr-16 border-gray-C4CAD3",children:[(0,s.jsx)("span",{className:"block text-14 font-m mb-8",children:"رزرو های بلند مدت (بیشتر از 14 روز)"}),(0,s.jsx)("span",{className:"block text-12 font-light mb-16 leading-24",children:d}),(0,s.jsx)("div",{className:"absolute -right-7 top-1/3 -translate-y-1/3 bg-black rounded-[50%] h-12 w-12"})]}),(0,s.jsxs)("div",{className:"relative border-r-2 pr-16 border-gray-C4CAD3",children:[(0,s.jsx)("span",{className:"block text-14 font-m mb-8",children:"ایام پیک (مانند تعطیلات رسمی، نوروز و بین تعطیلات)"}),(0,s.jsx)("span",{className:"block text-12 font-light",children:a}),(0,s.jsx)("div",{className:"absolute -right-7 top-1/3 -translate-y-1/3 bg-red-main rounded-[50%] h-12 w-12"})]})]})})})};l.Z=i},75030:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSP:function(){return ev},default:function(){return ex}});var s=t(85893),i=t(24511),n=t(51687),d=t(47300),a=t(64427),o=t(47416),r=t(67294),c=t(36492),u=t(48228),m=t(12486),v=t(23765),x=t(11163),p=t(63245),h=t(2034),b=t(63871),f=t(68289),_=t.n(f),j=t(49276),g=t(85096),N=t(25675),y=t.n(N),k=function(e){let{onClick:l,disabled:t}=e;return(0,s.jsx)("div",{onClick:l,className:`
12        w-40 h-40 rounded-6
13        flex items-center justify-center
14        typical-gray-bg 
15        ${t?"cursor-not-allowed opacity-30 pointer-events-none":"cursor-pointer hover:text-primary-main"}
16      `,children:(0,s.jsx)("i",{className:"icon-FlashLeft text-16"})})},C=t(5152),S=t.n(C),D=t(34649),O=t(45551),w=t(68398),A=t(62384),E=t(37586),P=t(93695),T=t(89789),F=t(49754),R=t(85945),Y=t(62236),M=t(28855),I=function(e){let{handleSmoothClose:l,reserveId:t}=e,[i,n]=(0,r.useState)(""),[a,o]=(0,r.useState)(""),c=(0,u.D)(()=>(0,v.Pj)({order_id:t,voucher_code:i}),{onSuccess:e=>{(null==e?void 0:e.status)==="success"?((0,Y.J)(m),O.Z.message([{type:w.L.SUCCESS,title:"کد تخفیف با موفقیت اعمال شد."}]),l()):o(null==e?void 0:e.err_msg)}}),m=(0,R.NL)();return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsx)(M.n,{name:"guest-discount-code-input",customValue:i,customOnChange:e=>{n(e),o("")},customError:a,label:(0,s.jsxs)("span",{className:"flex items-center gap-x-8",children:[(0,s.jsx)("i",{className:"icon-Offer text-24 text-black"}),(0,s.jsx)("span",{className:"text-14 leading-24 text-black font-r",children:"کد تخفیف خود را در کادر زیر وارد کنید"})]}),fillFrom:"ltr",rightIcon:i?(0,s.jsx)("span",{className:"flex items-center justify-center bg-gray-F4F5F6 rounded-full cursor-pointer",onClick:()=>{n(""),o("")},children:(0,s.jsx)("i",{className:"icon-CloseButton text-24"})}):void 0})}),(0,s.jsx)("div",{className:"mt-24",children:(0,s.jsx)(d.z,{color:"primary",variant:"contained",isFullWidth:!0,isLoading:c.isLoading,onClick:()=>c.mutate(),disabled:!i,children:"بررسی و اعمال تخفیف"})})]})},U=t(46853),L=t(1689),$=function(e){let{isModalOpen:l,handleClose:t}=e;return(0,s.jsx)(U.default,{headerTitle:"قوانین لغو رزرو",onClose:()=>{t()},open:l,modalClassname:"md:!w-[368px]",children:(0,s.jsx)(L.Z,{befor24:"کسر مبلغ شب اول رزرو + 20% مابقی شب ها",befor72:"کسر 20% از مبلغ کل رزرو",entry:"کسر مبلغ دو شب اول رزرو (علاوه بر شب های سپری شده) و 20% از مابقی شب ها",longtermReserve:"تنها با توافق میزبان و کسر حداقل ۲۰٪ کل مبلغ رزرو",peakDays:"تنها با توافق میزبان و کسر حداقل ۲۰٪\xa0کل\xa0مبلغ\xa0رزرو"})})},Z=t(41664),W=t.n(Z),V=t(77087),B=t(70808),H=t(43632);function z(e){let{open:l,onClose:t,reservationId:i,amount:n,code:d}=e,a=(0,H.HH)();return(0,s.jsx)(U.default,{headerTitle:"پرداخت صورتحساب",open:l,onClose:t,modalClassname:"md:!w-[480px]",children:(0,s.jsxs)("div",{className:"md:pt-8",children:[(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-16 bg-[url('/assets/Wallet-Effect.svg')] bg-primary-main bg-no-repeat bg-cover p-16 mb-20 text-white",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-x-8",children:[(0,s.jsx)("span",{className:"text-12 leading-21 opacity-90",children:"مبلغ قابل پرداخت"}),!!d&&(0,s.jsx)("span",{dir:"ltr",className:"text-12 leading-21 font-m-en bg-white/15 rounded-8 px-8",children:d})]}),(0,s.jsx)("p",{className:"mt-8 text-20 leading-32 font-b drop-shadow-[0px_2px_4px_rgba(0,0,0,0.2)]",children:(0,H.ru)(n)})]}),(0,s.jsx)(H.ZP,{context:"reservation",amount:n,code:d,onGateway:e=>a.mutate({context:"reservation",gatewayId:e,amount:n,reservationId:i}),gatewayLoading:a.isLoading,cardFooter:e=>(0,s.jsx)(B.Z,{context:"reservation",card:e,amount:n,reservationId:i,onDone:t})})]})})}var q=t(24280),G=t(97474),K=t(60243),Q=t(2545),X=t(48011),J=t(27047),ee=t(99990);let el={n_of_discounted_special_days:0,n_of_discounted_peak_days:0,n_of_discounted_weekends:0,n_of_discounted_normaldays:0},et={special_days_total_discount_amount:0,peak_days_total_discount_amount:0,weekends_total_discount_amount:0,normaldays_total_discount_amount:0};var es=function(e){var l,t,n,a;let{handleSmoothClose:o,numberOfPeople:c,setNumberOfPeople:u,entranceDate:m,exitDate:v,guestName:x,guestPhoneNumber:p,openingThisBottomSheetFromObservePage:h,onTapOfEditGuestInfo:b,setShowChooseEnterAndExitDaysCalendarModal:f,resMaxCapacity:j,selectedRanges:g,checkoutData:N,checkoutTotal:y,calendarData:k,onReadyToSubmitReserve:C,onClickOfReturnBtn:S,single_extra_guest_price:D,baseCapacityOfSelectedResOrRoom:O,initialNumberOfPeople:w,initialEntranceDate:A,initialExitDate:E}=e,[P,T]=(0,r.useState)(!1),[F,R]=(0,r.useState)(el),[Y,M]=(0,r.useState)(et),[I,U]=(0,r.useState)(),[L,$]=(0,r.useState)(0),[Z,W]=(0,r.useState)(0),[V,B]=(0,r.useState)(0);(0,r.useEffect)(()=>{var e;if((null==g?void 0:g.length)===1&&(null==g?void 0:null===(e=g[0])||void 0===e?void 0:e[1])&&k&&(null==k?void 0:k.params)){let e=null==k?void 0:k.params,{checkoutPaperData:l,finalCalculatedCheckoutTotal:t,monthlyDiscountAmount:s,weeklyDiscountAmount:i,n_of_discounted_normaldays:n,n_of_discounted_peak_days:d,n_of_discounted_special_days:a,n_of_discounted_weekends:o,normaldays_total_discount_amount:r,peak_days_total_discount_amount:u,special_days_total_discount_amount:m,weekends_total_discount_amount:v}=(0,J.k)({serverCalendarData:e,theRangeSelected:g[0],numberOfPeople:c,baseCapacity:O||0,extraGuestUnitPrice:D||0,discountedDays:e.discounted_days.map(e=>({date:_()(e.date,"YYYY-MM-DD"),amount:e.amount}))});U(l),W(i),B(s),$(t),M({special_days_total_discount_amount:m,peak_days_total_discount_amount:u,weekends_total_discount_amount:v,normaldays_total_discount_amount:r}),R({n_of_discounted_special_days:a,n_of_discounted_peak_days:d,n_of_discounted_weekends:o,n_of_discounted_normaldays:n})}},[g,k,c,O,D]);let H=!(null==g?void 0:null===(l=g[0])||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.isSame(A))||!(null==g?void 0:null===(n=g[0])||void 0===n?void 0:null===(a=n[1])||void 0===a?void 0:a.isSame(E))||c!==w;return(0,s.jsxs)("div",{className:"relative max-h-[360px] md:h-auto md:max-h-none overflow-y-auto pb-54",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-24",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("i",{className:"icon-Calendar text-24 text-black"}),(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)("p",{className:"text-12 leading-21 font-l text-black",children:"تاریخ سفر"}),(0,s.jsxs)("p",{className:"text-14 leading-24 font-r text-black mt-4",children:[m," تا ",v]})]})]}),(0,s.jsx)(d.z,{color:"grey",onClick:()=>{h?o():(o(),setTimeout(()=>{f(!0)},200))},children:"ویرایش"})]}),(0,s.jsxs)("div",{className:"relative flex items-center justify-between mb-24",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("i",{className:"icon-Profile text-24 text-black"}),(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)("p",{className:"text-12 leading-21 font-l text-black",children:"تعداد مسافران"}),(0,s.jsxs)("p",{className:`
17                text-14 leading-24 font-r mt-4‍‍‍‍‍‍‍‍‍
18                ${0===c?"text-error-light":"text-black"}
19              `,children:[(0,s.jsxs)("span",{children:[c>O?O:c," ","نفر"]}),c>O&&(0,s.jsxs)("span",{className:"text-12",children:["+ ",c-O," نفر اضافه"]})]})]})]}),!!P&&(0,s.jsx)("div",{className:"absolute left-0 top-0 z-1 -translate-y-full",children:(0,s.jsx)(ee.default,{})}),(0,s.jsx)("div",{className:"w-[107px]",children:(0,s.jsx)(X.Z,{inputName:"number-of-people",counterMinimum:0,counterMaximum:j,customValue:c,onInc:()=>{u(e=>e+1),T(!1)},onDec:()=>{u(e=>e-1),T(!1)}})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pb-16 mb-16 border-b-1 border-solid border-b-gray-CACFD3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("i",{className:"icon-BirthCertificate text-24 text-black"}),(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)("p",{className:"text-12 leading-21 font-l text-black",children:"اطلاعات مهمان"}),(0,s.jsxs)("p",{className:"text-14 leading-24 font-r text-black mt-4",children:[x," ",p]})]})]}),(0,s.jsx)(d.z,{color:"grey",onClick:()=>b(),children:"ویرایش"})]}),(0,s.jsx)("div",{children:!!g&&1===g.length&&!!g[0][1]&&!!N&&!!y&&!!c&&(0,s.jsx)(i.Z,{data:H?[{label:"روزهای وسط هفته : ",numberOfDiscountedDays:0,valueOfKey:(null==I?void 0:I.weekDatesN)||0,key:"شب",per:(null==I?void 0:I.weekDatesUnitPrice)||0,total:((null==I?void 0:I.weekDatesN)||0)*((null==I?void 0:I.weekDatesUnitPrice)||0)},{label:"روزهای آخر هفته : ",numberOfDiscountedDays:0,valueOfKey:(null==I?void 0:I.weekEndDatesN)||0,key:"شب",per:(null==I?void 0:I.weekEndDatesUnitPrice)||0,total:((null==I?void 0:I.weekEndDatesN)||0)*((null==I?void 0:I.weekEndDatesUnitPrice)||0)},{label:"روزهای ایام پیک : ",numberOfDiscountedDays:0,valueOfKey:(null==I?void 0:I.peakDatesN)||0,key:"شب",per:(null==I?void 0:I.peakDatesUnitPrice)||0,total:((null==I?void 0:I.peakDatesN)||0)*((null==I?void 0:I.peakDatesUnitPrice)||0)},...Object.entries((null==I?void 0:I.specialDatesData)||{}).map(e=>({label:"روزهـــای خـاص : ",valueOfKey:e[1].repeated_frequency||0,numberOfDiscountedDays:e[1].n_of_discounted_nights||0,key:"شب",per:Number(e[0])||0,total:(Number(e[0])||0)*(e[1].repeated_frequency||0)})),{label:"نرخ نفر اضافه : ",numberOfDiscountedDays:0,valueOfKey:(null==I?void 0:I.extraGuestsN)||0,key:"نفر",per:(null==I?void 0:I.extraGuestsUnitPrice)||0,total:((null==I?void 0:I.extraGuestsN)||0)*((null==I?void 0:I.extraGuestsUnitPrice)||0)},{label:"تخفیف رزرو هفتگی : ",fullValue:Z?`${null==Z?void 0:Z.toLocaleStr
19ing("en-US")} تومان`:""},{label:"تخفیف رزرو ماهانه : ",fullValue:V?`${null==V?void 0:V.toLocaleString("en-US")} تومان`:""}]:N,total:H?L:y,n_of_discounted_special_days:H?F.n_of_discounted_special_days:0,n_of_discounted_peak_days:H?F.n_of_discounted_peak_days:0,n_of_discounted_weekends:H?F.n_of_discounted_weekends:0,n_of_discounted_normaldays:H?F.n_of_discounted_normaldays:0,totalDiscountAmount:H?Y.special_days_total_discount_amount+Y.peak_days_total_discount_amount+Y.weekends_total_discount_amount+Y.normaldays_total_discount_amount+V+Z:0})}),(0,s.jsx)("div",{className:"fixed bottom-0 right-0 left-0 pt-12 pb-16 px-20 bg-white md:rounded-br-20 md:rounded-bl-20",children:(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-x-12",children:[(0,s.jsx)("div",{className:"col-span-1",children:(0,s.jsx)(d.z,{isFullWidth:!0,color:"grey",onClick:()=>{S()},children:"برگشت"})}),(0,s.jsx)("div",{className:"col-span-2",children:(0,s.jsx)(d.z,{isFullWidth:!0,type:"submit",onClick:()=>void(0===c?T(!0):C()),children:"ثبت ویرایش"})})]})})]})},ei=t(59073),en=t(55666);let ed=S()(()=>Promise.all([t.e(9269),t.e(7859)]).then(t.bind(t,37859)),{loadableGenerated:{webpack:()=>[37859]},ssr:!1}),ea=S()(()=>t.e(7865).then(t.bind(t,97865)),{loadableGenerated:{webpack:()=>[97865]},ssr:!0});function eo(e){let{icon:l,title:t,desc:i}=e;return(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("div",{className:"flex items-center",children:l}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-12 leading-16 font-l text-gray-959FA7 mb-12",children:t}),(0,s.jsx)("p",{className:"text-16 leading-24 font-r text-black",children:i})]})]})}let er={show:!1,payload:{name:"",phoneNumber:""}},ec={show:!1,payload:{openingConfirmReserveBottomSheetFromObservePage:!1}};var eu=function(){var e,l,t,f,N,C,S,R,Y,M,U,L,Z,B,H,X,J,ee,el,et,eu,em,ev,ex,ep,eh,eb,ef,e_,ej,eg,eN,ey,ek,eC,eS,eD;(0,m.e)();let eO=(0,x.useRouter)(),[ew,eA]=(0,r.useState)(),[eE,eP]=(0,r.useState)(),[eT,eF]=(0,r.useState)(0),[eR,eY]=(0,r.useState)([]),[eM,eI]=(0,r.useState)(0),[eU,eL]=(0,r.useState)(),[e$,eZ]=(0,r.useState)(),eW=(0,r.useRef)(null),[eV,eB]=(0,r.useState)(null),[eH,ez]=(0,r.useState)(!1),[eq,eG]=(0,r.useState)(!1),[eK,eQ]=(0,r.useState)(ec),[eX,eJ]=(0,r.useState)(0),[e0,e1]=(0,r.useState)(er),[e2,e4]=(0,r.useState)(!1),[e8,e6]=(0,r.useState)([]),[e3,e5]=(0,r.useState)({name:"",phone:""});(0,r.useRef)();let[e7,e9]=(0,r.useState)(!1),[le,ll]=(0,r.useState)(!1),{isLoading:lt,isSuccess:ls,data:li,refetch:ln}=(0,c.a)(["getReserve",null==eO?void 0:null===(e=eO.query)||void 0===e?void 0:e.id],()=>{var e;return(0,v.Au)(+(null==eO?void 0:null===(e=eO.query)||void 0===e?void 0:e.id))},{enabled:!!(null==eO?void 0:null===(l=eO.query)||void 0===l?void 0:l.id),staleTime:0}),ld=(0,r.useMemo)(()=>(0,v.P0)(null==ew?void 0:ew.state,null==ew?void 0:ew.cancelled_by),[null==ew?void 0:ew.state,null==ew?void 0:ew.cancelled_by]),la=(0,u.D)(()=>(0,v.aP)({order_id:null==ew?void 0:ew.id}),{onSuccess:e=>{(null==e?void 0:e.status)==="success"?(ln(),O.Z.message([{type:w.L.SUCCESS,title:"کد تخفیف با موفقیت حذف شد."}])):O.Z.message([{type:w.L.ERROR,title:(null==e?void 0:e.err_msg)||w.i}])}});(0,r.useEffect)(()=>{if(li&&(null==li?void 0:li.status)==="success"){let e=null==li?void 0:li.params;e6([[_()(e.order_details.start_date,"YYYY-MM-DD"),_()(e.order_details.end_date,"YYYY-MM-DD")]]),eJ((e.order_details.guests_count||0)+(e.order_details.extra_guests_count||0)),e5({name:(null==e?void 0:e.order_details.guest.name)||"",phone:(null==e?void 0:e.order_details.guest.phone)||""})}},[li]),(0,r.useEffect)(()=>{if(li&&(null==li?void 0:li.status)==="success"){var e,l,t,s;let i=null==li?void 0:li.params,n=i.order_details.prices.find(e=>h.k.NORMAL_WEEKDAYS in e&&void 0!==e[h.k.NORMAL_WEEKDAYS]),d=i.order_details.prices.find(e=>h.k.WEEK_ENDS in e&&void 0!==e[h.k.WEEK_ENDS]),a=i.order_details.prices.find(e=>h.k.PEAK_DAYS in e&&void 0!==e[h.k.PEAK_DAYS]),o=i.order_details.prices.find(e=>h.k.SPECIAL_DAYS in e&&void 0!==e[h.k.SPECIAL_DAYS]),r=i.order_details.prices.find(e=>h.k.EXTRA_GUESTS in e&&void 0!==e[h.k.EXTRA_GUESTS]),c=i.order_details.prices.find(e=>h.k.HOST_DISCOUNT in e&&void 0!==e[h.k.HOST_DISCOUNT]),u=i.order_details.prices.find(e=>h.k.WEBSITE_DISCOUNT in e&&void 0!==e[h.k.WEBSITE_DISCOUNT]),m=i.order_details.prices.find(e=>h.k.COUPON_DISCOUNT in e&&void 0!==e[h.k.COUPON_DISCOUNT]),v=i.order_details.prices.find(e=>h.k.RESERVE_PERIOD_DISCOUNT in e&&void 0!==e[h.k.RESERVE_PERIOD_DISCOUNT]);eP([{label:"روزهای وسط هفته : ",valueOfKey:(null==n?void 0:n.weekdays)||0,numberOfDiscountedDays:0,key:"شب",per:(null==n?void 0:n.unit_price)||0,total:((null==n?void 0:n.weekdays)||0)*((null==n?void 0:n.unit_price)||0)},{label:"روزهای آخر هفته : ",valueOfKey:(null==d?void 0:d.weekends)||0,numberOfDiscountedDays:0,key:"شب",per:(null==d?void 0:d.unit_price)||0,total:((null==d?void 0:d.weekends)||0)*((null==d?void 0:d.unit_price)||0)},{label:"روزهای ایام پیک : ",valueOfKey:(null==a?void 0:a.peaks)||0,numberOfDiscountedDays:0,key:"شب",per:(null==a?void 0:a.unit_price)||0,total:((null==a?void 0:a.peaks)||0)*((null==a?void 0:a.unit_price)||0)},{label:"روزهـــای خـاص : ",valueOfKey:(null==o?void 0:o.specials)||0,numberOfDiscountedDays:0,key:"شب",per:(null==o?void 0:o.unit_price)||0,total:((null==o?void 0:o.specials)||0)*((null==o?void 0:o.unit_price)||0)},{label:"نرخ نفر اضافه : ",valueOfKey:(null==r?void 0:r.count)||0,numberOfDiscountedDays:0,key:"نفر",per:((null==r?void 0:r.extras)||0)*((null==r?void 0:r.unit_price)||0),total:(null==r?void 0:r.total_price)||0},{label:"تخفیف هدیه میزبان : ",fullValue:(null==c?void 0:c.host_discount)?`${null==c?void 0:null===(e=c.host_discount)||void 0===e?void 0:e.toLocaleStr
19ing("en-US")} تومان`:""},{label:"تخفیف مدت رزرو : ",fullValue:(null==v?void 0:v.period_discount)?`${null==v?void 0:null===(l=v.period_discount)||void 0===l?void 0:l.toLocaleString("en-US")} تومان`:""},{label:"تخفیف هدیه سایت : ",fullValue:(null==u?void 0:u.website_discount)?`${null==u?void 0:null===(t=u.website_discount)||void 0===t?void 0:t.toLocaleString("en-US")}  تومان`:""},{label:"کد تخفیف : ",fullValue:(null==m?void 0:m.coupon_discount)?`${null==m?void 0:null===(s=m.coupon_discount)||void 0===s?void 0:s.toLocaleString("en-US")}  تومان`:""}]),eF(((null==n?void 0:n.weekdays)||0)*((null==n?void 0:n.unit_price)||0)+((null==d?void 0:d.weekends)||0)*((null==d?void 0:d.unit_price)||0)+((null==a?void 0:a.peaks)||0)*((null==a?void 0:a.unit_price)||0)+((null==o?void 0:o.specials)||0)*((null==o?void 0:o.unit_price)||0)+((null==r?void 0:r.count)||0)*((null==r?void 0:r.extras)||0)*((null==r?void 0:r.unit_price)||0)-((null==c?void 0:c.host_discount)||0)-((null==u?void 0:u.website_discount)||0)-((null==m?void 0:m.coupon_discount)||0)-((null==v?void 0:v.period_discount)||0)),eI(((null==v?void 0:v.period_discount)||0)+((null==m?void 0:m.coupon_discount)||0)),eY(i.faqs),eA(i.order_details)}},[li]),(0,r.useEffect)(()=>((null==ew?void 0:ew.expiry_date)&&(eW.current=setInterval(()=>{let e=(0,D.getTimeDiff)(Date.now(),new Date((null==ew?void 0:ew.expiry_date)||"").getTime());0===e?(ln(),eW.current&&clearInterval(eW.current)):eB(e)},1e3)),()=>{eW.current&&clearInterval(eW.current)}),[null==ew?void 0:ew.expiry_date]);let{isSuccess:lo,isLoading:lr,refetch:lc,data:lu}=(0,c.a)(["getCalendarData",(null==ew?void 0:ew.product.display_type)==="suit"?ew.product.id:null==ew?void 0:null===(t=ew.rooms)||void 0===t?void 0:null===(f=t[0])||void 0===f?void 0:f.id],()=>(0,G.u)({residenceId:(null==ew?void 0:ew.product.display_type)==="suit"?ew.product.id:null==ew?void 0:ew.rooms[0].id,residenceType:(null==ew?void 0:ew.product.display_type)==="suit"?K.h.PRODUCT:K.h.ROOM}),{enabled:(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL,onSuccess:e=>{}}),[lm,lv]=(0,r.useState)(!1);(0,r.useEffect)(()=>{"1"===eO.query.pay&&(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT&&lv(!0)},[eO.query.pay,null==ew?void 0:ew.state]),(0,r.useEffect)(()=>{if(!eO.isReady||!eO.query.gateway)return;"success"===eO.query.gateway?(O.Z.message([{type:w.L.SUCCESS,title:"پرداخت با موفقیت انجام شد."}]),ln()):"failed"===eO.query.gateway&&O.Z.message([{type:w.L.ERROR,title:eO.query.message||"پرداخت ناموفق بود."}]);let{gateway:e,message:l,...t}=eO.query;eO.replace({pathname:eO.pathname,query:t},void 0,{shallow:!0})},[eO.isReady,eO.query.gateway]);let lx=(0,u.D)(()=>{var e,l,t,s;return(0,v.Dl)({order_id:null==ew?void 0:ew.id,start_date:null==e8?void 0:null===(e=e8[0])||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.format("jYYYY/jMM/jDD"),end_date:null===(t=null==e8?void 0:null===(s=e8[0])||void 0===s?void 0:s[1])||void 0===t?void 0:t.format("jYYYY/jMM/jDD"),guests_count:eX,guest:e3.name})},{onSuccess:e=>{if((null==e?void 0:e.status)==="error")O.Z.message([{type:w.L.ERROR,title:(null==e?void 0:e.err_msg)||w.i}]);else{var l;O.Z.message([{type:w.L.SUCCESS,title:"رزرو شما با موفقیت تغییر یافت."}]),e6([]),eJ(0),eQ(ec),lc(),eO.replace(`/my-trips/${null==e?void 0:null===(l=e.params)||void 0===l?void 0:l.order_id}`)}}}),lp=(null==eV?void 0:eV.split(":"))??[],[lh,lb,lf]=3===lp.length?lp:["00",...lp];return lt?(0,s.jsx)("div",{className:"pt-84 md:pt-[115px]",children:(0,s.jsx)(b.O,{})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`
20          pt-84 md:pt-[115px] md:pb-0 CustomContainer
21          ${(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT?"pb-[125px]":"pb-84"}
22        `,children:[(0,s.jsxs)("div",{className:"grid grid-cols-14 md:gap-x-40",children:[(0,s.jsxs)("div",{className:"col-span-full md:col-span-8",children:[(0,s.jsx)("div",{className:"mb-24",children:!!(null==ew?void 0:ew.state)&&(0,s.jsx)(A.Z,{state:null==ew?void 0:ew.state,tempState:null==ew?void 0:ew.temp_state,startDate:ew.start_date,endD
22ate:ew.end_date})}),(0,s.jsx)("div",{className:"md:px-4 pb-24 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[!!(null==ld?void 0:ld.iconPathInDesktop)&&(0,s.jsx)(y(),{src:null==ld?void 0:ld.iconPathInDesktop,width:48,height:48,alt:""}),(0,s.jsx)("p",{className:`text-20 leading-28 font-m mt-4 mb-16 ${null==ld?void 0:ld.textColor}`,children:null==ld?void 0:ld.name}),(0,s.jsx)("p",{className:"text-error-light text-center mb-4",children:(null===(N=v.Q6.find(e=>e.key===(null==ew?void 0:ew.cancel_desc))||v.iJ.find(e=>e.key===(null==ew?void 0:ew.cancel_reason)))||void 0===N?void 0:N.text)||(null==ew?void 0:ew.cancel_desc)||(null==ew?void 0:ew.cancel_reason)}),(0,s.jsx)("p",{className:"text-14 leading-20 font-l text-black text-center",children:null==ld?void 0:ld.stateDescription_ForGuest(null==ew?void 0:ew.product.city)}),((null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT)&&!!(null==ew?void 0:ew.expiry_date)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-14 leading-20 font-r text-black mb-12 mt-24",children:(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL?"حداکثر زمانی که منتظر خواهید ماند":(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT?"حداکثر مهلت پرداخت :":""}),(0,s.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,s.jsx)("div",{className:"w-40 h-40 bg-[rgba(118,118,128,0.12)] rounded-8 text-16 leading-24 font-r text-black flex items-center justify-center",children:lf}),(0,s.jsx)("span",{className:"text-16 leading-28 font-m text-black",children:":"}),(0,s.jsx)("div",{className:"w-40 h-40 bg-[rgba(118,118,128,0.12)] rounded-8 text-16 leading-24 font-r text-black flex items-center justify-center",children:lb}),(0,s.jsx)("span",{className:"text-16 leading-28 font-m text-black",children:":"}),(0,s.jsx)("div",{className:"w-40 h-40 bg-[rgba(118,118,128,0.12)] rounded-8 text-16 leading-24 font-r text-black flex items-center justify-center",children:lh})]})]}),((null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT)&&(0,s.jsx)("div",{className:"mt-24",children:(0,s.jsx)(d.z,{isFullWidth:!0,color:"grey",variant:"outlined",onClick:()=>eO.reload(),rightIcon:(0,s.jsx)("i",{className:"icon-Refresh text-24 text-black"}),rounded:!0,children:"بروزرسانی وضعیت درخواست"})}),(null==ew?void 0:ew.state)===g.A.DONE&&(0,s.jsx)("div",{className:"w-[318px] mt-16",children:(0,s.jsx)(E.Z,{reserveId:ew.id,endDate:ew.end_date})})]})}),(0,s.jsx)(a.Z,{className:"md:hidden"}),(0,s.jsxs)("div",{className:"block pb-24 pt-24 md:pt-0 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsx)("div",{className:"mb-16 md:hidden",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-12 grow",children:[(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("i",{className:"icon-Home text-24 text-black"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-12 leading-16 font-l text-gray-959FA7 mb-12",children:"نام اقامتگاه"}),(0,s.jsx)(W(),{prefetch:!1,passHref:!0,href:(0,V.$)({residenceId:null==ew?void 0:ew.product.id}),className:"text-16 leading-24 font-r text-blue-main",children:null==ew?void 0:ew.product.name})]})]}),!!(null==ew?void 0:ew.product.image_url)&&(0,s.jsx)("div",{className:"w-56 h-56 relative",children:(0,s.jsx)(y(),{src:null==ew?void 0:ew.product.image_url,fill:!0,style:{objectFit:"cover"},alt:null==ew?void 0:ew.product.name,className:"rounded-8 shrink-0"})})]})}),(0,s.jsx)("div",{className:"mb-16",children:(0,s.jsx)(eo,{icon:(0,s.jsx)("i",{className:"icon-Calendar text-24 text-black"}),title:"تاریخ سفر",desc:`${(0,j.mW)(null==ew?void 0:ew.start_date)} تا ${(0,j.mW)(null==ew?void 0:ew.end_date)}`})}),!!(null==ew?void 0:ew.rooms)&&(null==ew?void 0:ew.rooms.length)!==0&&(0,s.jsx)("div",{className:"mb-16",children:(0,s.jsx)(eo,{icon:(0,s.jsx)("i",{className:"icon-Rooms text-24 text-black"}
22),title:"نام اتاق",desc:null==ew?void 0:ew.rooms[0].name})}),(0,s.jsx)("div",{className:"mb-16",children:(0,s.jsx)(eo,{icon:(0,s.jsx)("i",{className:"icon-Profile text-24 text-black"}),title:"تعداد نفرات",desc:`${null==ew?void 0:ew.guests_count} نفر ${(null==ew?void 0:ew.extra_guests_count)?` + ${null==ew?void 0:ew.extra_guests_count} نفر اضافه`:""}`})}),(0,s.jsx)("div",{children:(0,s.jsx)(eo,{icon:(0,s.jsx)("i",{className:"icon-BirthCertificate text-24 text-black"}),title:"مشخصات مهمان",desc:`${null==ew?void 0:ew.guest.name} ${(null==ew?void 0:ew.guest.phone)||"*********09"}`})}),(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL&&(0,s.jsx)("div",{className:"mt-24 md:w-[174px]",children:(0,s.jsx)(d.z,{isFullWidth:!0,color:"light-blue",leftIcon:(0,s.jsx)("i",{className:"icon-FlashLeft text-24 text-info"}),className:"!pl-8 !pr-16 !py-12 justify-between",onClick:()=>{eQ({show:!0,payload:{openingConfirmReserveBottomSheetFromObservePage:!0}})},children:(0,s.jsxs)("span",{className:"flex items-center gap-x-8",children:[(0,s.jsx)("i",{className:"icon-Edit text-24 text-info"}),"ویرایش رزرو"]})})})]}),!!eT&&(0,s.jsxs)("div",{className:"md:hidden",children:[(0,s.jsx)(a.Z,{}),(0,s.jsx)("div",{className:"py-16",children:(0,s.jsx)(i.Z,{data:eE||[],total:eT,n_of_discounted_special_days:0,n_of_discounted_peak_days:0,n_of_discounted_weekends:0,n_of_discounted_normaldays:0,totalDiscountAmount:eM,guestCommission:null==ew?void 0:ew.guest_commission})})]}),((null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT)&&!(null===(C=ew.prices.find(e=>h.k.COUPON_DISCOUNT in e&&void 0!==e[h.k.COUPON_DISCOUNT]))||void 0===C?void 0:C.coupon_discount)&&(0,s.jsxs)("div",{className:"pb-24 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:`
23                      flex items-center gap-x-8
24                      ${(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL?"cursor-not-allowed pointer-events-none opacity-30":""}
25                    `,onClick:()=>{e9(!0)},children:[(0,s.jsx)("i",{className:"icon-Offer text-24 text-black"}),(0,s.jsx)("p",{className:"text-16 leading-24 text-black font-m",children:"اگر کد تخفیف دارید وارد کنید"})]}),(0,s.jsx)(k,{onClick:()=>{e9(!0)},disabled:(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL})]}),(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL&&(0,s.jsx)("p",{className:"text-12 leading-21 text-warning font-r mt-12",children:"( پس از تأیید میزبان می توانید کد تخفیف خود را وارد کنید )"})]}),!!(null===(S=null==ew?void 0:ew.prices.find(e=>h.k.COUPON_DISCOUNT in e&&void 0!==e[h.k.COUPON_DISCOUNT]))||void 0===S?void 0:S.coupon_discount)&&(0,s.jsxs)("div",{className:"pb-24 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-8 text-green-main",children:[(0,s.jsx)("i",{className:"icon-Offer text-24"}),(0,s.jsx)("p",{className:"text-16 leading-24 font-m",children:"کد تخفیف اعمال شد"})]}),(0,s.jsx)(d.z,{color:"grey",rightIcon:(0,s.jsx)("i",{className:"icon-Delete text-20 text-black"}),isLoading:la.isLoading,loadingText:"در حال حذف…",onClick:()=>{la.mutate()},children:"حذف کد تخفیف"})]}),(0,s.jsx)(a.Z,{className:"md:hidden"}),(0,s.jsxs)("div",{className:"py-24 md:!pt-0 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsx)(o.Z,{icon:(0,s.jsx)("i",{className:"icon-Profile text-20"}),title:"مشخصات میزبان",containerClassname:"mb-24"}),(0,s.jsxs)("div",{className:"flex items-center gap-x-24",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("i",{className:"icon-GuestProfile text-18"}),(0,s.jsx)("p",{className:"text-14 text-black leading-18",children:null==ew?void 0:ew.host.name})]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-12",children:[(0,s.jsx)("i",{className:"icon-Phone text-18"}),(0,s.jsx)("p",{className:"text-14 text-black leading-18",children:(0,p.pA)(null==ew?void 0:e
25w.state,null==ew?void 0:ew.end_date)&&(null==ew?void 0:ew.host.phone)?ew.host.phone:"*********09"})]})]}),((null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT)&&(0,s.jsx)("p",{className:"text-12 leading-21 text-warning font-r mt-12",children:"( اطلاعات کامل پس از قطعی شدن رزرو قابل مشاهده خواهد بود )"}),(null==ew?void 0:ew.state)===g.A.CANCEL||(null==ew?void 0:ew.state)===g.A.EXPIRED?null:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mt-18 md:mt-24 md:max-w-[224px]",children:(0,p.pA)(null==ew?void 0:ew.state,null==ew?void 0:ew.end_date)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Q,{href:`tel:${null==ew?void 0:ew.host.phone}`,color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-Phone text-24"}),children:"تماس با میزبان"}),(0,s.jsxs)("p",{className:"text-11 leading-18 text-gray-959FA7 mt-8 text-center",children:["تماس با میزبان ",p.y7]})]}):(0,s.jsx)(d.Q,{href:(null==ew?void 0:ew.conversation_public_id)?`/chats?c=${ew.conversation_public_id}`:"/chats",color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-message text-24"}),children:"چت آنلاین با میزبان"})})})]}),(0,s.jsx)(a.Z,{className:"md:hidden"}),(null==ew?void 0:ew.state)===g.A.DONE&&!!ew.product.latitude&&ew.product.longitude&&(0,s.jsxs)("div",{className:"pb-24 pt-24 md:pt-0 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsx)(o.Z,{icon:(0,s.jsx)("i",{className:"icon-Map text-20"}),title:"آدرس و لوکیشن",containerClassname:"mb-24"}),(0,s.jsx)("p",{className:"text-14 leading-24 text-black font-l mb-16",children:ew.product.address}),(0,s.jsx)("div",{className:"h-320",children:(0,s.jsx)(ed,{userLat:Number(ew.product.latitude),userLang:Number(ew.product.longitude),setUserLat:eL,setUserLang:eZ,showZoomControl:!1,name:"reslatlng",mapClassname:"rounded-12",hasRoutingOption:!0,isPinpointDraggable:!1,enableClickOnMap:!1,hasUserLocationBtn:!1})}),(0,s.jsx)("ul",{className:"text-12 leading-21 text-black font-l mt-16 list-disc list-inside",children:(0,s.jsx)("li",{children:"لوکیشن نشان داده شده، محدوده اقامتگاه می باشد. جهت دریافت آدرس دقیق، با میزبان خود در تماس باشید"})})]}),(0,s.jsx)(a.Z,{className:"md:hidden"}),(0,s.jsxs)("div",{className:"pb-24 pt-24 md:pt-0 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("p",{className:"text-16 leading-24 text-black font-m",children:"قوانین لغو رزرو"}),(0,s.jsx)(k,{onClick:()=>{eG(!0)}})]}),(0,s.jsx)("p",{className:"text-12 leading-30 text-black font-l mt-12",children:"تا 72 ساعت قبل از ورود مهمان : با کسر ٪۲۰ از مبلغ کل رزرو، مابقی مبلغ پرداخت شده عودت داده می شود"})]}),(0,s.jsx)(a.Z,{className:"md:hidden"}),(0,s.jsxs)("div",{className:"py-24 md:!pt-0 md:border-b-1 md:border-solid md:border-b-gray-CACFD3 md:mb-24",children:[(0,s.jsx)("p",{className:"text-12 leading-21 text-zilgara font-l mb-12 md:mb-16 text-center",children:"در صورت داشتن سوال و یا مشکل، با ما تماس بگیرید"}),(0,s.jsx)(d.Q,{href:"tel:02191070021",isFullWidth:!0,rounded:!0,className:"md:w-320 md:mx-auto",variant:"outlined",color:"black",rightIcon:(0,s.jsx)("i",{className:"icon-Phone text-24"}),children:"تماس با پشتیبانی"})]}),eR&&(null==eR?void 0:eR.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Z,{className:"md:hidden"}),(0,s.jsx)("div",{className:"py-24 md:!pt-0",children:(0,s.jsx)(P.Z,{faqs:eR})})]}):null,((null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT||(null==ew?void 0:ew.state)===g.A.DONE&&new(_())().isBefore(new(_())(null==ew?void 0:ew.end_date)))&&(0,s.jsx)("div",{className:"md:w-[147px]",children:(0,s.jsx)(d.z,{isFullWidth:!0,leftIcon:(0,s.jsx)("i",{className:"icon-FlashLeft text-24"}),color:"light-error",className:"!pl-8 !pr-12 !py-12 justify-between",onClick:()=>
25{(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL||(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT?ez(!0):ll(!0)},children:(0,s.jsxs)("span",{className:"flex items-center gap-x-8",children:[(0,s.jsx)("i",{className:"icon-Error text-24"}),"لغو رزرو"]})})})]}),(0,s.jsx)("div",{className:"hidden md:block md:col-span-6 relative",children:(0,s.jsxs)("div",{className:"sticky top-[115px] border-1 border-solid border-gray-CACFD3 rounded-16 p-24",children:[(0,s.jsxs)("div",{className:"pb-24 border-b-1 border-dashed border-b-[rgba(28,46,69,0.6)] mb-24 flex items-start gap-x-16",children:[(0,s.jsx)("div",{className:"w-120 h-120 relative",children:!!(null==ew?void 0:ew.product.image_url)&&(0,s.jsx)(y(),{src:null==ew?void 0:ew.product.image_url,fill:!0,style:{objectFit:"cover"},alt:"",className:"rounded-12"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(W(),{passHref:!0,prefetch:!1,href:(0,V.$)({residenceId:null==ew?void 0:ew.product.id}),className:"block text-14 leading-20 font-m text-blue-main mb-16",children:null==ew?void 0:ew.product.name}),(0,s.jsx)(ei.Z,{city:(null==ew?void 0:ew.product.city)||"",className:"mb-16",province:(null==ew?void 0:ew.product.province)||""}),(0,s.jsx)(en.default,{average_rating:(null==ew?void 0:ew.product.average_rating)||0,reviews_count:(null==ew?void 0:ew.product.reviews_count)||0})]})]}),(0,s.jsx)("div",{className:"mb-24",children:(0,s.jsx)(i.Z,{data:eE||[],total:eT,n_of_discounted_special_days:0,n_of_discounted_peak_days:0,n_of_discounted_weekends:0,n_of_discounted_normaldays:0,totalDiscountAmount:eM,guestCommission:null==ew?void 0:ew.guest_commission})}),(0,s.jsx)("div",{children:(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL?(0,s.jsx)(d.z,{isFullWidth:!0,disabled:!0,children:"پرداخت پس از تأیید میزبان"}):(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT?(0,s.jsx)(d.z,{isFullWidth:!0,onClick:()=>lv(!0),children:"پرداخت صورتحساب"}):(null==ew?void 0:ew.state)===g.A.DONE&&(null===(R=_()(null==ew?void 0:ew.end_date))||void 0===R?void 0:R.isBefore(_()()))?(0,s.jsx)(d.Q,{href:`/submit-review?id=${null==eO?void 0:null===(Y=eO.query)||void 0===Y?void 0:Y.id}`,color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-message text-24"}),children:(null==ew?void 0:ew.has_review)?"مشاهده نظر ثبت‌شده":"ثبت نظر"}):(0,p.pA)(null==ew?void 0:ew.state,null==ew?void 0:ew.end_date)?(0,s.jsx)(d.Q,{href:`tel:${null==ew?void 0:ew.host.phone}`,color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-Phone text-24"}),children:"تماس با میزبان"}):(0,s.jsxs)("div",{className:"flex flex-col gap-y-12",children:[!!(null==ew?void 0:null===(M=ew.alters)||void 0===M?void 0:M.length)&&(0,s.jsx)(d.z,{variant:"outlined",color:"black",isFullWidth:!0,children:"مشاهده اقامتگاه های مشابه"}),!!(null==ew?void 0:null===(U=ew.product)||void 0===U?void 0:U.id)&&(0,s.jsx)(d.Q,{href:(0,V.$)({residenceId:ew.product.id}),variant:"outlined",color:"black",isFullWidth:!0,children:"بازگشت به صفحه همین اقامتگاه"}),!!((null==ew?void 0:null===(L=ew.product)||void 0===L?void 0:L.city)||(null==ew?void 0:null===(Z=ew.product)||void 0===Z?void 0:Z.province))&&(0,s.jsxs)(d.Q,{href:`/search/${(null==ew?void 0:null===(B=ew.product)||void 0===B?void 0:B.city_title)||(null==ew?void 0:null===(H=ew.product)||void 0===H?void 0:H.province_title)}`,variant:"contained",color:"grey",isFullWidth:!0,children:["بازگشت به صفحه اقامتگاه های"," ",(null==ew?void 0:null===(X=ew.product)||void 0===X?void 0:X.city)||(null==ew?void 0:null===(J=ew.product)||void 0===J?void 0:J.province)]})]})})]})}),lm&&!!ew&&(0,s.jsx)(z,{open:lm,onClose:()=>lv(!1),reservationId:ew.id,amount:ew.total_amount||0,code:ew.reference}),(0,s.jsx)("div",{className:"fixed bottom-0 right-0 left-0 px-20 py-16 bg-white md:hidden border-t-1 border-solid border-t-gray-CACFD3 z-2",children:(null==ew?void 0:ew.state)===g.A.HOST_APPROVAL?(0,s.jsx)(d.z,{isFullWidth:!0,disabled:!0,children:"پرداخت پس از تأیید میزبان"}
25):(null==ew?void 0:ew.state)===g.A.SECOND_PAYMENT?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-16 flex items-center justify-between",children:[(0,s.jsxs)("p",{className:"flex items-center gap-x-8",children:[(0,s.jsx)("span",{className:"text-10 leading-17 text-gray-616E7C font-r",children:"جمع صورتحساب :"}),(0,s.jsxs)("span",{className:"text-14 leading-24 text-black font-m",children:[null===(ee=(null==ew?void 0:ew.total_amount)||0)||void 0===ee?void 0:ee.toLocaleString("en-US")," ","تومان"]})]}),(null===(el=ew.prices.find(e=>h.k.COUPON_DISCOUNT in e&&void 0!==e[h.k.COUPON_DISCOUNT]))||void 0===el?void 0:el.coupon_discount)?null:(0,s.jsx)(d.z,{variant:"contained",color:"grey",rounded:!0,className:"!py-4 !px-12 !text-10 !leading-17 !font-r",onClick:()=>e9(!0),children:"کد تخفیف دارید ؟"})]}),(0,s.jsx)(d.z,{isFullWidth:!0,onClick:()=>lv(!0),children:"پرداخت صورتحساب"})]}):(null==ew?void 0:ew.state)===g.A.DONE&&(null===(et=_()(null==ew?void 0:ew.end_date))||void 0===et?void 0:et.isBefore(_()()))?(0,s.jsx)(d.Q,{href:`/submit-review?id=${null==eO?void 0:null===(eu=eO.query)||void 0===eu?void 0:eu.id}`,color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-message text-24"}),children:(null==ew?void 0:ew.has_review)?"مشاهده نظر ثبت‌شده":"ثبت نظر"}):(0,p.pA)(null==ew?void 0:ew.state,null==ew?void 0:ew.end_date)?(0,s.jsx)(d.Q,{href:`tel:${null==ew?void 0:ew.host.phone}`,color:"secondary",isFullWidth:!0,rightIcon:(0,s.jsx)("i",{className:"icon-Phone text-24"}),children:"تماس با میزبان"}):(0,s.jsxs)("div",{className:"flex flex-col gap-y-12",children:[!!(null==ew?void 0:null===(em=ew.alters)||void 0===em?void 0:em.length)&&(0,s.jsx)(d.z,{variant:"outlined",color:"black",isFullWidth:!0,children:"مشاهده اقامتگاه های مشابه"}),!!(null==ew?void 0:null===(ev=ew.product)||void 0===ev?void 0:ev.id)&&(0,s.jsx)(d.Q,{href:(0,V.$)({residenceId:ew.product.id}),variant:"outlined",color:"black",isFullWidth:!0,children:"بازگشت به صفحه همین اقامتگاه"}),!!((null==ew?void 0:null===(ex=ew.product)||void 0===ex?void 0:ex.city)||(null==ew?void 0:null===(ep=ew.product)||void 0===ep?void 0:ep.province))&&(0,s.jsxs)(d.Q,{variant:"contained",color:"grey",isFullWidth:!0,href:`/search/${(null==ew?void 0:null===(eh=ew.product)||void 0===eh?void 0:eh.city_title)||(null==ew?void 0:null===(eb=ew.product)||void 0===eb?void 0:eb.province_title)}`,children:["بازگشت به صفحه اقامتگاه های"," ",(null==ew?void 0:null===(ef=ew.product)||void 0===ef?void 0:ef.city)||(null==ew?void 0:null===(e_=ew.product)||void 0===e_?void 0:e_.province)]})]})})]}),(0,s.jsx)(n.default,{open:le,handleClose:()=>ll(!1),headerTitle:"لغو رزرو قطعی شده",body:e=>{let{handleSmoothClose:l}=e;return(0,s.jsx)(T.Z,{handleSmoothClose:l,hostIsCancelling:!1})}}),(0,s.jsx)(n.default,{open:!!eK.show,handleClose:()=>eQ(ec),headerTitle:"جزئیات رزرو",body:e=>{var l,t,i,n,d,a,o,r,c;let{handleSmoothClose:u}=e;return(0,s.jsx)(es,{initialNumberOfPeople:((null==ew?void 0:ew.guests_count)||0)+((null==ew?void 0:ew.extra_guests_count)||0),initialEntranceDate:_()(null==ew?void 0:ew.start_date,"YYYY-MM-DD"),initialExitDate:_()(null==ew?void 0:ew.end_date,"YYYY-MM-DD"),handleSmoothClose:u,numberOfPeople:eX,setNumberOfPeople:eJ,entranceDate:`
26                ${parseInt(null==e8?void 0:null===(l=e8[0])||void 0===l?void 0:l[0].format("jDD"))} 
27                ${null==e8?void 0:null===(t=e8[0])||void 0===t?void 0:t[0].format("jMMMM")}
28                `,exitDate:`
29                ${parseInt((null===(i=e8[0])||void 0===i?void 0:i[1]).format("jDD"))} 
30                ${(null===(n=e8[0])||void 0===n?void 0:n[1]).format("jMMMM")}
31                `,guestName:e3.name,guestPhoneNumber:e3.phone,openingThisBottomSheetFromObservePage:!1,setShowChooseEnterAndExitDaysCalendarModal:(null==ew||ew.product.display_type,e4),onClickOfReturnBtn:()=>{u()},onTapOfEditGuestInfo:()=>{u(),setTimeout(()=>{e1({show:!0,payload:{name:e3.name,phoneNumber:e3.phone}})},200)}
31,resMaxCapacity:(null==ew?void 0:ew.product.display_type)==="suit"?null==ew?void 0:ew.product.max_capacity:(null==ew?void 0:ew.product.display_type)==="boomgardi"?null==lu?void 0:null===(d=lu.params)||void 0===d?void 0:d.max_capacity:1,selectedRanges:e8,checkoutData:eE,checkoutTotal:eT,calendarData:lu,onReadyToSubmitReserve:()=>void lx.mutate(),baseCapacityOfSelectedResOrRoom:(null==ew?void 0:ew.product.display_type)==="suit"?(null==ew?void 0:ew.product.capacity)||1:(null==ew?void 0:ew.product.display_type)==="boomgardi"&&(null==lu?void 0:null===(a=lu.params)||void 0===a?void 0:a.capacity)||1,single_extra_guest_price:(null==ew?void 0:ew.product.display_type)==="suit"?(null===(o=null==ew?void 0:ew.prices.find(e=>h.k.EXTRA_GUESTS in e&&void 0!==e[h.k.EXTRA_GUESTS]))||void 0===o?void 0:o.unit_price)||0:(null==ew?void 0:ew.product.display_type)==="boomgardi"?null==lu?void 0:null===(r=lu.params)||void 0===r?void 0:null===(c=r.prices)||void 0===c?void 0:c.extra_guests_price:0})}}),!!e2&&(0,s.jsx)(q.default,{isModalOpen:e2,handleClose:()=>{e4(!1),eQ({show:!0,payload:{openingConfirmReserveBottomSheetFromObservePage:!1}})},min_reservable_days:(null==ew?void 0:ew.product.min_reservable_days)||1,discounted_days:(null==lu?void 0:null===(ej=lu.params)||void 0===ej?void 0:ej.discounted_days)||[],fast_days:(null==lu?void 0:null===(eg=lu.params)||void 0===eg?void 0:eg.discounted_days)||[],filled_dates:(null==lu?void 0:null===(eN=lu.params)||void 0===eN?void 0:eN.filled_dates)||[],noCoOperation:!1,peak_dates:(null==lu?void 0:null===(ey=lu.params)||void 0===ey?void 0:ey.peak_dates)||[],holidays:(null==lu?void 0:null===(ek=lu.params)||void 0===ek?void 0:ek.holidays)||[],reserved_dates:(null==lu?void 0:null===(eC=lu.params)||void 0===eC?void 0:eC.reserved_dates.filter(e=>{let l=_()(null==ew?void 0:ew.start_date,"YYYY-MM-DD"),t=_()(null==ew?void 0:ew.end_date,"YYYY-MM-DD"),s=_()(e,"YYYY-MM-DD");return!(s.isBefore(t)&&s.isSameOrAfter(l))}))||[],special_dates:(null==lu?void 0:null===(eS=lu.params)||void 0===eS?void 0:eS.special_dates)||[],prices:(null==lu?void 0:null===(eD=lu.params)||void 0===eD?void 0:eD.prices)||[],selectedRanges:e8,setSelectedRanges:e6,onSubmit:e=>{e6(e),e4(!1),eQ({show:!0,payload:{openingConfirmReserveBottomSheetFromObservePage:!1}})}}),(0,s.jsx)(n.default,{open:!!e0.show,handleClose:()=>e1(er),headerTitle:"اطلاعات مهمان",body:e=>{let{handleSmoothClose:l}=e;return(0,s.jsx)(Q.default,{handleSmoothClose:l,onTapOfReturnBtn:()=>{l(),setTimeout(()=>{eQ({show:!0,payload:{openingConfirmReserveBottomSheetFromObservePage:!0}})},200)},guestName:e0.payload.name,guestPhoneNumber:e0.payload.phoneNumber,onFormSubmit:e=>{e5(l=>({...l,name:e})),l(),setTimeout(()=>{eQ({show:!0,payload:{openingConfirmReserveBottomSheetFromObservePage:!0}})},200)}})}}),(0,s.jsx)(n.default,{open:eH,handleClose:()=>ez(!1),headerTitle:"دلیل لغو رزرو",body:e=>{var l;let{handleSmoothClose:t}=e;return(0,s.jsx)(F.Z,{handleSmoothClose:t,reserveId:Number(null==eO?void 0:null===(l=eO.query)||void 0===l?void 0:l.id)})}}),(0,s.jsx)(n.default,{open:e7,handleClose:()=>e9(!1),headerTitle:"کد تخفیف",body:e=>{let{handleSmoothClose:l}=e;return(0,s.jsx)(I,{handleSmoothClose:l,reserveId:null==ew?void 0:ew.id})}}),!!eq&&(0,s.jsx)($,{isModalOpen:eq,handleClose:()=>eG(!1)})]}),(0,s.jsx)("div",{className:"hidden md:block mt-[84px]",children:(0,s.jsx)(ea,{})})]})};let em=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eu,{})});var ev=!0,ex=em}},function(e){e.O(0,[4885,8289,9238,2700,3765,4280,9462,3632,4067,5666,9321,9774,2888,179],function(){return e(e.s=11716)}),_N_E=e.O()}]);

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.