1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8703,4161,3472],{43172:function(e,n,t){var o=t(85893),i=t(41664),c=t.n(i);n.Z=function(e){var n=e.title,t=e.href,i=e.className,r=void 0===i?"":i,l=e.newWindow,a=void 0!==l&&l,d=e.onClick,s=void 0===d?null:d;return n&&(0,o.jsx)(c(),{href:t||"#",children:(0,o.jsx)("a",{onClick:function(){s&&s()},className:"moreLink ".concat(r," moreLink-specific"),target:a?"_blank":"_self",children:(0,o.jsx)("span",{children:n})})})}},77582:function(e,n,t){t.r(n);var o,i=t(34051),c=t.n(i),r=t(85893),l=t(9669),a=t.n(l),d=t(67433),s=t(43172),u=t(58299),f=t(20417),v=t(85739),_=t(67294),h=t(10682),m=t(21608),g=t(46066),p=t(7126),b=t.n(p),k=t(72045);function y(e,n,t,o,i,c,r){try{var l=e[c](r),a=l.value}catch(d){return void t(d)}l.done?n(a):Promise.resolve(a).then(o,i)}function x(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},o=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(n){x(e,n,t[n])}))}return e}var T=(x(o={dots:!0,infinite:!0,speed:500,slidesToShow:3,slidesToScroll:1,arrows:!1},"infinite",!1),x(o,"responsive",[{breakpoint:1290,settings:{slidesToShow:2,slidesToScroll:1,arrows:!1,dots:!0,focusOnSelect:!0}},{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:1,arrows:!1,dots:!0,focusOnSelect:!0}},{breakpoint:890,settings:{slidesToShow:2,slidesToScroll:1,arrows:!1,dots:!0,focusOnSelect:!0}},{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1,dots:!0,focusOnSelect:!0,infinite:!0}}]),o);n.default=function(e){var n,t=e.data,o=e.isMobile,i=void 0!==o&&o,l=e.dataBooking,p=void 0===l?null:l,x=e.strateName,S=void 0===x?"":x,j=(0,_.useState)(!1),O=j[0],N=j[1],A=(0,_.useState)((null===t||void 0===t?void 0:t.field_list_offres)||[]),D=A[0],P=A[1],C=p||{},I=C.pageLocale,Z=void 0===I?"en":I,E=(C.country,(0,_.useState)(null===p||void 0===p?void 0:p.country)),L=E[0],W=E[1];(0,_.useEffect)((function(){(null===p||void 0===p?void 0:p.country)&&W(null===p||void 0===p?void 0:p.country)}),[L,p]);var H=(0,_.useState)([]),J=H[0],Q=H[1],F=function(){var e,n=(e=c().mark((function e(n){var t,o,i,r,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(null===u.QA||void 0===u.QA?void 0:u.QA[Z])||1,!n||"129"!==n){e.next=6;break}o="".concat(u.a7,"&country_id=129&language_id=").concat(t),e.next=12;break;case 6:if(!n){e.next=10;break}o="".concat(u.a7,"&country_id=").concat(n,"&language_id=").concat(t),e.next=12;break;case 10:return console.error("CountryId is undefined"),e.abrupt("return");case 12:return e.prev=12,e.next=16,a().get(o);case 16:r=e.sent,l=(null===r||void 0===r||null===(i=r.data)||void 0===i?void 0:i.data)||[],Q(l),N(!1),e.next=26;break;case 22:e.prev=22,e.t0=e.catch(12),console.error("Error fetching offers data:",e.t0),N(!1);case 26:case"end":return e.stop()}}),e,null,[[12,22]])})),function(){var n=this,t=arguments;return new Promise((function(o,i){var c=e.apply(n,t);function r(e){y(c,o,i,r,l,"next",e)}function l(e){y(c,o,i,r,l,"throw",e)}r(void 0)}))});return function(e){return n.apply(this,arguments)}}();if((0,_.useEffect)((function(){N(!0),F(L)}),[L]),(0,_.useEffect)((function(){!function(){var e,n=null===t||void 0===t||null===(e=t.field_list_offres)||void 0===e?void 0:e.map((function(e,n){var t=e||{},o=t.field_mode_affichages_prix,i=t.offer_id,c=o||{},r=c.field_mode_affichages_prix,l=c.field_type,a=c.field_prefix,d=c.label_as_from,s=c.label_up_to,u=c.offers_remise_label,f=c.field_percent,v=c.field_currency,_=c.field_montant,h={};if("prix_dynamique"===r){var m=J.find((function(e){return(null===e||void 0===e?void 0:e.offer_type_id)===i})),g=(null===m||void 0===m?void 0:m.offer_best_percentage)||null;(h={amount:g?"".concat(g,"%"):"",lowerText:u||""}).upperText="as_from"===a?d||"":s||""}else"pourcentage"===l?(h={amount:f?"".concat(f,"%"):"",lowerText:u||""}).upperText="as_from"===a?d||"":s||"":(h={amount:_||"",lowerText:v||""}).upperText="as_from"===a?d||"":s||"";return w({},e,{formatedData:h,key:n})}));P(n)}()}),[J,t]),t){var M=t||{},R=M.field_cta,q=M.field_teaser_description_desktop,B=M.field_teaser_description_mobile,G=M.field_title_long;return(0,r.jsx)("section",{className:"offertHotel",children:(0,r.jsx)(h.Z,{children:(0,r.jsxs)(m.Z,{children:[(0,r.jsxs)("div",{className:b().sectionDesc,children:[G&&(0,r.jsx)("h2",{className:"h2",children:G}),(0,r.jsx)("div",{className:b().richText,children:(0,r.jsx)("div",{className:"text-align-center",children:i?(0,v.Z)(B||""):(0,v.Z)(q||"")})})]}),(0,r.jsx)("div",{className:b().hotelsContainer,children:(0,r.jsx)(g.Z,w({},T,{className:b().sliderOffers,children:null===D||void 0===D?void 0:D.map((function(e){var n,t,o,c,l=e.landing_pages_read_more,a=e.field_images_market,s=e.f
1ield_teaser_detail,u=e.title,f=e.path,v=e.formatedData,_=a||{},h=_.field_image_desktop,m=_.field_image_mobile,g=(null===h||void 0===h?void 0:h.imageDerivatives)||{},p=(null===m||void 0===m?void 0:m.imageDerivatives)||{},b=i?null===s||void 0===s?void 0:s.field_teaser_mobile:null===s||void 0===s?void 0:s.field_teaser_desktop;return(0,r.jsx)(d.Z,{titleTop:!0,priceWithDescription:!0,bigImage:!0,CTALabel:l||"",CTALink:null===f||void 0===f?void 0:f.alias,label:u,description:b,imageAlt:null===h||void 0===h?void 0:h.alt,imageWidth:null===h||void 0===h?void 0:h.width,imageHeight:null===h||void 0===h?void 0:h.height,imageDJ:(null===g||void 0===g||null===(n=g.teaser_desktop)||void 0===n?void 0:n.url)||(null===g||void 0===g?void 0:g.default_url),imageDW:(null===g||void 0===g||null===(t=g.teaser_desktop)||void 0===t?void 0:t.webp)||(null===g||void 0===g?void 0:g.default_url),imageTJ:(null===p||void 0===p||null===(o=p.image_250_x_312)||void 0===o?void 0:o.url)||(null===p||void 0===p?void 0:p.default_url),imageTW:(null===p||void 0===p||null===(c=p.image_250_x_312)||void 0===c?void 0:c.webp)||(null===p||void 0===p?void 0:p.default_url),loadingPrice:O,formatedData:v,strateName:S},(0,k.Z)())}))}))}),(0,r.jsx)(s.Z,{onClick:function(){S&&(0,f.D)("content","".concat(S," - view all offers"))},href:(null===R||void 0===R||null===(n=R.link)||void 0===n?void 0:n.url)||"#",title:null===R||void 0===R?void 0:R.title,className:"btnMob"})]})})})}}},13871:function(e,n,t){t.d(n,{SG:function(){return c},_2:function(){return l},bA:function(){return i},ib:function(){return d},nk:function(){return a},p7:function(){return r}});var o=t(83454),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en",n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:73;return e=e.toLowerCase(),t=t?"?f_country=".concat(t):"",n.includes("http")?"".concat(n).concat(t):"/".concat(e).concat(o.env.DRUPAL_JSONAPI_PREFIX).concat(n).concat(t)},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en",n=arguments.length>1?arguments[1]:void 0;return"/".concat(e,"/router/translate-path?path=").concat(n,"&_format=json")},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en",n=arguments.length>1?arguments[1]:void 0;return"/".concat(e,"/router/menu/hotel?nid=").concat(n)},l=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:73,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en",i=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l="https://bookings.beachcomber-hotels.com";return"".concat(l,"/?hotel_id=").concat(e,"&hotel_name=").concat(n,"&contryId=").concat(t,"&country_id=").concat(t,"&client_type_id=8&adults=2&infant=0&children=0&check_in=").concat(i,"&check_out=").concat(c,"&isIndustryPartner=0&isTravelAgent=0&lang=").concat(o).concat(r?"&room_id=".concat(r):"")},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:73,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",t="https://bookings.beachcomber-hotels.com";return"".concat(t,"/?hotel_id=&hotel_name=&contryId=").concat(e,"&country_id=").concat(e,"&client_type_id=8&adults=2&infant=0&children=0&check_in=&check_out=&isIndustryPartner=0&isTravelAgent=0&lang=").concat(n)},d=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:73,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en",i=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",a="https://bookings.beachcomber-hotels.com",d="";return l&&(d="&selectedOfferId=".concat(l,"&selectedOffer=").concat(l),"1"===l&&(d="".concat(d,"&type_of_stay=checkHoneymoon")),"7"===l&&(d="".concat(d,"&type_of_stay=checkAnniversary")),"Familymoon"!==l&&"77"!==l||(d="".concat(d,"&type_of_stay=checkHoneymoon"))),"".concat(a,"/?hotel_id=").concat(e,"&hotel_name=").concat(n,"&contryId=").concat(t,"&country_id=").concat(t,"&adults=").concat(r,"&check_in=").concat(i,"&check_out=").concat(c,"&lang=").concat(o).concat(d)}}}]);
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.