PageSourceSearch

https://booking.lejardinvillas.com/_next/static/chunks/1694-290ce896229b8284.js

js lejardinvillas.com collected 2026-09-26 13:07:25 UTC 11,673 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1694],{11694:(a,e,t)=>{t.r(e),t.d(e,{default:()=>j});var s=t(54568),d=t(37128),l=t.n(d),i=t(36459),n=t(79097),c=t(66124),r=t(66593);t(85252),t(46107);var o=t(7620),m=t(40825),h=t(27541),p=t(66013);t(59492);var x=t(69957),u=t(93401),v=t(21665),f=t(59477);function j(a){var e;let[t,d]=(0,o.useState)("info"),[j,y]=(0,o.useState)(+("Y"!=a.data.time||"N"!=a.data.all_day_pass)),[N,b]=(0,o.useState)(""),[_,g]=(0,o.useState)(null),[w,k]=(0,o.useState)(""),[S,M]=(0,o.useState)(!1),[C,D]=(0,o.useState)(!1),{dtHotelInfo:T,setDtHotelInfo:I,dtCurrencyStore:A,setCurrencyStore:Y,dtCartTs:q,setDtCartTs:O,addNewDtCartTs:F}=(0,u.D)(),{showTopCartStore:L,setShowTopCartStore:H,animationCart:J,setAnimationCart:P}=(0,f.A)(),[G,W]=(0,o.useState)(!1),[Z,z]=(0,o.useState)([]),E=(0,x.useTranslations)("TransportationPage"),[V,B]=(0,o.useState)("Y"==a.data.time&&"N"==a.data.all_day_pass?0:a.data.quantity),U=(0,n.f)(new Date,parseInt(a.data.cut_of_date)),Q=(0,h.usePathname)(),R=()=>!!q.find(e=>e.id==a.data.idadditional_package);(0,o.useEffect)(()=>{a.modalShow&&(D(!1),a.time?k(a.time):k(""),a.date?g(new Date(a.date)):g(null),y(a.qty),b(a.notes),B("Y"==a.data.time&&"N"==a.data.all_day_pass?0:a.data.quantity))},[a.modalShow]);let X=async e=>{try{var t;W(!0);let s="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJndWVzdCI6dHJ1ZSwiaWF0IjoxNzQ0MTAzMjk1LCJleHAiOjQ4OTc3MDMyOTUsImp0aSI6IjlveXZCemktdWRqZ3lSeDBOSy1KM1lSWnhTZkNuZ1hUX2dsLV94cExFM0E9In0.h0rWAisFpD6LmZzgh7l8h0ABG_fi_8wxZaULHFDu04U",d=v.A.getStateData(),l=null==d||null==(t=d.state)?void 0:t.dtAuthStore;if(l&&(s=l.token),"Y"!=a.data.all_day_pass&&"Y"==a.data.time){let t=await fetch("/api/v2/offers/additional-availability",{method:"POST",headers:{Authorization:"Bearer "+s,"Content-Type":"application/json"},body:JSON.stringify({id:a.data.idadditional_package,date:(0,c.GP)(e,"yyyy-MM-dd")})}),d=await t.json();if(z(d),a.time&&"All Day Pass"!=a.time&&e&&a.date==(0,c.GP)(e,"yyyy-MM-dd")){k(a.time);let e=d.times.find(e=>e.time==a.time);e&&B(e.available)}else k(""),B(0),y(0)}W(!1)}catch(a){}};return(0,o.useEffect)(()=>{null!=_&&X(_)},[_]),(0,s.jsx)(s.Fragment,{children:a.modalShow&&(0,s.jsx)("div",{className:"modal fade show modal-custom d-block ",children:(0,s.jsx)("div",{className:"modal-dialog modal-lg modal-dialog-centered",children:(0,s.jsxs)("div",{className:"modal-content",children:[(0,s.jsxs)("div",{className:"modal-header",children:[(0,s.jsx)("h5",{className:"modal-title fw-bold",children:"Detail"}),(0,s.jsx)("button",{onClick:()=>void(a.hideModal(),M(!1)),type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,s.jsx)("div",{className:"modal-body",children:(0,s.jsxs)("div",{className:"".concat(l()["transportation-modal"]),children:[(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)("div",{className:"col-md-4",children:(0,s.jsx)("img",{alt:a.data.title,src:a.data.image_m,className:"img-fluid w-100 rounded"})}),(0,s.jsxs)("div",{className:"col-md-8",children:[(0,s.jsxs)("div",{className:"".concat(l()["badge_box-modal"]),children:[a.data.badge_title&&(0,s.jsx)("div",{className:"".concat(l().badge_title),children:a.data.badge_title}),a.data.no_of_bought&&(0,s.jsxs)("div",{className:"".concat(l().badge_title," ").concat(l().yellow),children:[a.data.no_of_bought," ",E("bought")]})]}),(0,s.jsx)("h4",{className:"fs-22 fw-bold",children:a.data.title}),(0,s.jsxs)("div",{className:"price align-self-center",children:[a.data.normal_rate>a.data.special_offers&&(0,s.jsxs)("div",{className:"".concat(l()["price-discount"]," mb-1"),children:[(0,s.jsxs)("span",{className:"".concat(l()["badge-discount"]," me-1"),children:[Math.round(((e=a.data.normal_rate)-a.data.special_offers)/e*100),"% OFF"]}),(0,s.jsxs)("span",{className:"".concat(l().price),children:[A.id," ",(0,m.A)(a.data.normal_rate,A)]})]}),(0,s.jsxs)("p",{className:"price fw-bold fs-20 mb-0 d-flex",children:[A.id," ",(0,m.A)(a.data.special_offers,A),a.data.units&&""!=a.data.units&&(0,s.jsxs)("span",{className:"fs-13 text-secondary-2 fw-normal align-self-center",children:["\xa0 /",a.data.units]})]})]}),(0,s.jsxs)("div",{className:"".concat(l()["box-form"]," my-3"),children:[(0,s.jsxs)("p",{className:"fw-bold fs-14 mb-2",children:[E("chooseYourOptions")," :"]}),(0,s.jsxs)("div",{className:"row",children:["Y"==a.data.dates&&(0,s.jsx)("div",{className:"col-md-6",children:(0,s.jsxs)("div",{className:"mb-2 position-relative",children:[(0,s.jsxs)("label",{className:"form-label fs-14",children:[E("visitingDate")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)("input",{type:"text",className:"form-control bg-white fs-14",placeholder:"Select visiting date",value:_?(0,c.GP)(_,"dd MMM, yyyy"):"",onFocus:()=>M(!0),readOnly:!0}),S&&(0,s.jsx)("div",{className:"".concat(l()["box-calendar"]),children:(0,s.jsx)(i.Vv,{className:"cldr",minDate:U,maxDate:a.data.stay_to?(0,r.H)(a.data.stay_to):(0,n.f)(new Date,260),onChange:a=>{g(a),M(!1)}
1,date:_||new Date,preventSnapRefocus:!0,disabledDates:(()=>{let e=a.data.closed_date.split(","),t=[];return e.map(a=>{var e=a.substring(6,10),s=a.substring(3,5),d=a.substring(0,2);t.push((0,r.H)(e+"-"+s+"-"+d))}),t})(),disabledDay:e=>{var t;return!!((t=JSON.parse(a.data.closed_days))&&t.includes(e.getDay().toString()))}})})]})}),_&&"Y"==a.data.time&&"N"==a.data.all_day_pass&&Z&&Z.times&&Z.times.length>0&&(0,s.jsx)("div",{className:"col-md-6",children:(0,s.jsxs)("div",{className:"mb-2",children:[(0,s.jsxs)("label",{className:"form-label fs-14",children:[E("visitingTime")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsxs)("select",{value:w,className:"form-select fs-14",onChange:a=>{k(a.target.value);var e=a.target.value;let t=Z.times.find(a=>a.time==e);t?(B(t.available),y(0)):(y(0),B(0))},children:[(0,s.jsx)("option",{value:"",children:G?"Loading... ":"Select time"}),Z&&Z.times&&Z.times.map((a,e)=>(0,s.jsx)("option",{value:a.time,children:a.time},"keyVisitingTime"+e))]})]})})]}),"Y"==a.data.time&&"N"==a.data.all_day_pass&&Z&&Z.times&&0==Z.times.length&&(0,s.jsx)("div",{className:"alert alert-danger text-start fs-14 p-2 mb-1",role:"alert",children:"No products were found matching your selection."}),"Y"==a.data.notes&&(0,s.jsxs)("div",{className:"mb-2",children:[(0,s.jsxs)("label",{className:"form-label fs-14",children:["Notes ",a.data.notes_required?(0,s.jsx)("span",{className:"text-danger",children:"*"}):"(Optional)"]}),(0,s.jsx)("textarea",{onChange:a=>{b(a.target.value.replace(/<|>|\[|\]|\(|\)/,""))},value:N,className:"form-control fs-14"+(C?" is-invalid":""),placeholder:a.data.notes_placeholder,id:"exampleFormControlTextarea1",rows:3}),C&&(0,s.jsx)("div",{className:"invalid-feedback mt-2",children:"Notes field is required."})]}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)("div",{className:"col-md-4",children:(0,s.jsxs)("div",{className:"btn-stepper",children:[(0,s.jsx)("button",{className:"".concat((R()||1!=j)&&0!=j?"":"disable"," "),onClick:()=>{var e;return e=1,void(q.find(e=>e.id==a.data.idadditional_package)&&(e=0),j>e&&y(j-1))},"aria-label":"Decrease",children:(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2.25 7.5 H12.75",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})})}),(0,s.jsx)("span",{children:j}),(0,s.jsx)("button",{className:"".concat(0==V||V<=j?"disable":""," "),onClick:()=>void(V>j&&y(j+1)),"aria-label":"Increase",children:(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 2.25 V12.75 M2.25 7.5 H12.75",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})})})]})}),(0,s.jsxs)("div",{className:"col-md-8 d-flex justify-content-end",children:[j>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"d-block me-3",children:[(0,s.jsx)("p",{className:"text-secondary  mb-0 text-end me-2 mt-1",children:"Total"}),(0,s.jsxs)("div",{className:"price-info d-inline-block fs-18 fw-bold me-2 align-self-center pt-0",children:[A.id," ",(0,m.A)(a.data.special_offers*j,A)]}),(0,s.jsx)(p.A,{rewards:a.data.rewards,qty:j>0?j:0})]}),(0,s.jsxs)("button",{disabled:!_&&"Y"==a.data.dates,onClick:()=>void("Y"==a.data.notes&&a.data.notes_required&&""==N?D(!0):(D(!1),q.find(e=>e.id==a.data.idadditional_package)?O(q.map(e=>e.id===a.data.idadditional_package?{...e,qty:j,notes:N,date:_?(0,c.GP)(_,"yyyy-MM-dd"):"",time:"Y"==a.data.time||"null"!=a.data.time_slot?w:""}:e)):F({id:a.data.idadditional_package,name:a.data.title,price:a.data.special_offers,basic_price:a.data.normal_rate,qty:j,notes:N,date:_?(0,c.GP)(_,"yyyy-MM-dd"):"",time:"Y"==a.data.time||"null"!=a.data.time_slot?w:"",min_qty:a.data.min_pax,max_qty:a.data.quantity,image:a.data.image_m,tax_service:a.data.tsprice,units:a.data.units,rewards:{cashback:a.data.rewards.cashback?a.data.rewards.cashback:0,point:a.data.rewards.point?a.data.rewards.point:0,loyalty:a.data.rewards.loyalty_point?a.data.rewards.loyalty_point:0},hotel:{id:null==T?void 0:T.idproperty,name:null==T?void 0:T.property_name,address:null==T?void 0:T.property_address}}),(Q.includes("product")||Q.includes("transportations"))&&H(!L),a.hideModal(),P((null==T?void 0:T.idproperty)+"-ts-"+a.data.title))),className:"btn btn-primary btn-select mt-2",type:"button",children:[E(R()?"updateToCart":"addToCart")," "]})]}),0==j&&(0,s.jsx)(s.Fragment,{children:q.find(e=>e.id==a.data.idadditional_package)?(0,s.jsx)("button",{onClick:()=>(O(q.filter(e=>e.id!==a.data.idadditional_package)),void((Q.includes("product")||Q.includes("transportations"))&&H(!L),a.hideModal())),className:"btn btn-danger btn-select mt-2",type:"button",children:E("deleteItem")}):(0,s.jsx)("button",{disabled:!0,className:"btn btn-primary btn-select mt-2",type:"button",children:E("addToCart")})})]}),a.data.tsprice>0&&(0,s.jsx)("p",{className:"text-secondary  text-end pt-2 pe-3 fs-13",children:E("excludesTaxesFees")})]})})]})]})]}),(0,s.jsxs)("ul",{className:"nav nav-tabs mt-3",children:[(0,s.jsx)("li",{className:"nav-item fs-14",children:(0,s.jsx)("a",{onClick:a=>{d("info"),a.preventDefault()},className:"info"==t?"nav-link active":"nav-link",href:"#",children:E("detailInformation")})}),a.data.terms&&(0,s.jsx)("li",{className:"nav-item fs-14",children:(0,s.jsx)("a",{onClick:a=>{d("term"),a.preventDefault()},className:"term"==t?"nav-link active":"nav-link",href:"#",children:E("terms&Conditions")})}),a.data.cancellation_policy&&(0,s.jsx)("li",{className:"nav-item fs-14",children:(0,s.jsx)("a",{onClick:a=>{d("cancelation"),a.preventDefault()},className:"cancelation"==t?"nav-link active":"nav-link",href:"#",children:E("cancellation")})}),a.data.redemptions&&(0,s.jsx)("li",{className:"nav-item fs-14",children:(0,s.jsx)("a",{onClick:a=>{d("redeem"),a.preventDefault()},className:"redeem"==t?"nav-link active":"nav-link",href:"#",children:E("howToRedeem")})})]}),(0,s.jsxs)("div",{className:"content-tab py-3",children:["info"==t&&(0,s.jsx)("div",{className:"".concat(l()["modal-information"]),dangerouslySetInnerHTML:{__html:a.data.description}}),"term"==t&&a.data.terms&&(0,s.jsx)("div",{className:"".concat(l()["modal-information"]),dangerouslySetInnerHTML:{__html:a.data.terms}}),"cancelation"==t&&a.data.cancellation_policy&&(0,s.jsx)("div",{className:"".concat(l()["modal-information"]),dangerouslySetInnerHTML:{__html:a.data.cancellation_policy}}),"redeem"==t&&a.data.redemptions&&(0,s.jsx)("div",{className:"".concat(l()["modal-information"]),dangerouslySetInnerHTML:{__html:a.data.redemptions}})]})]})})]})})})})}}}]);

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.