PageSourceSearch

https://etincelles.com/wp-content/themes/whitegold/js/min/offers_websdk.min.js?10_14_53&ver=1.0.1

js etincelles.com collected 2026-10-08 10:32:41 UTC 11,396 bytes, 1 lines download raw bytes

1function dateFormat(e,t){const o=new Date(e),a=o.getDate(),i=o.getMonth()+1,r=o.getFullYear();return(t=t.replace("MM",i.toString().padStart(2,"0"))).indexOf("yyyy")>-1?t=t.replace("yyyy",r.toString()):t.indexOf("yy")>-1&&(t=t.replace("yy",r.toString().substr(2,2))),t=t.replace("dd",a.toString().padStart(2,"0"))}function fusion_deepLink_from_plainBookLink(e,t,o=!1,a=!1,i=window.refPage,r=!1){var n=window.fusionFunnelPage+"?refPage="+i+"/#/deep-link",s="",d=new URL(e),f=d.searchParams.get("arrivalDate");s+=isEmpty(f)?"":(""===s?"?":"&")+"arrivalDate="+f;var c=d.searchParams.get("departureDate");s+=isEmpty(c)?"":(""===s?"?":"&")+"departureDate="+c;var l=d.searchParams.get("rateId");s+=isEmpty(l)?"":(""===s?"?":"&")+"rateID="+l;var m=d.searchParams.get("roomId");s+=isEmpty(m)?"":(""===s?"?":"&")+"roomID="+m;var h=d.searchParams.get("selectedAdultCount");s+=(""===s?"?":"&")+"roomAdults="+(h=isEmpty(h)?!isEmpty(t)&&t.params.adults>1?t.params.adults.toString():"1":h);var u=d.searchParams.get("selectedInfantCount");u=isEmpty(u)?"0":u;u=d.searchParams.get("selectedChildCount");s+=(""===s?"?":"&")+"roomChildren="+(u=isEmpty(u)?"0":u),s+=(""===s?"?":"&")+"roomInfants=0",a&&(s+=(""===s?"?":"&")+"accommodationOpenedTab=rates");var p=d.searchParams.get("promoCode");s+=isEmpty(p)?"":(""===s?"?":"&")+"promoCode="+p;var g={fr:lastPageFRLang,en:lastPageENLang};return localStorage.setItem("lastWebsitePage",JSON.stringify([g,fusion_last_page_type])),n+(s=r?s.replace(/[?&]$/,""):s.replace(/([?&])arrivalDate=[^&]*(&)?/g,"$1").replace(/([?&])departureDate=[^&]*(&)?/g,"$1").replace(/[?&]$/,""))}!function(e){function t(){var t=window.fusionFunnelPage+"?refPage="+window.refPage+"/#/deep-link",o="",a=(new URL(t),e("#check_in").val()||e("#check_in").attr("placeholder"),e("#check_out").val()||e("#check_out").attr("placeholder"),e('input[name="nbadults_room_1"]').val()),i=e('input[name="nbchildren_room_1"]').val();o+=(""===o?"?":"&")+"roomAdults="+(a=isEmpty(a)?!isEmpty(config)&&config.params.adults>1?config.params.adults.toString():"1":a),o+=(""===o?"?":"&")+"roomChildren="+(i=isEmpty(i)?"0":i),t+=o+=(""===o?"?":"&")+"roomInfants=0",e(".single_hotel_booking").attr("href",t)}e(window).on("load seasonnalContentLoaded barbaTransition",(function(o){if("undefined"!=typeof $fbsdk){var a=$fbsdk.StartingFrom.prototype.getOptionalParams();a.push("output"),a.push("roomRestriction")}if(e("body").hasClass("single-hotel")){if("undefined"!=typeof websdk_config&&void 0!==websdk_config.accomodation&&"undefined"!=typeof $fbsdk){config=websdk_config.accomodation,$fbsdk.Config.baseHost=config.baseHost;var i="Offers";if("undefined"!=typeof fromSearch&&fromSearch&&Cookies.get("wpe-us")){var r=JSON.parse(Cookies.get("wpe-us"));if(void 0!==r.dates.arrival){var n=e.datepicker.parseDate(e.datepicker._defaults.dateFormat,r.dates.arrival);config.params.arrivalDate=e.datepicker.formatDate("yy-mm-dd",n),i="Quotation"}if(config.params.adults=r.adults,config.params.minAdults=r.adults,r.children)for(var s="",d=1;d<=parseInt(r.children);d++)d>1&&(s+=","),s+="10";config.params.childrenAges=""!==s?s:"",config.params.nights=r.dates.nights,r.accessCode&&(config.params.accessCode=r.accessCode)}var f=new $fbsdk.Loader,c=e.extend(!0,{},config.params);if(c.offerComputeRule="lowerMinStay",quotation=new $fbsdk[i](c),quotation.setAuthToken(config._authCode),f.add("quotation",quotation),config.referenceRateCode){var l=e.extend(!0,{},c);l.rateName=config.referenceRateCode,refQuotation=new $fbsdk[i](l),refQuotation.setAuthToken(config._authCode),f.add("refQuotation",refQuotation)}refOffers=new $fbsdk[i](c),refOffers.setAuthToken(config._authCode),f.add("offers",refOffers),f.load((function(o){var a,r;if(o.quotation.error){var n=e(".slideshow .offer"),s=e("#accomodation_price_template").text();return html=Mustache.render(s,o.quotation),n.html(html),void n.removeClass("loading")}if(config.referenceRateCode&&(o.refQuotation.error?console.log("no reference quotation found"):r=getEndpointData(o.refQuotation.origObject.getRawData(),i)),!(a=getEndpointData(o.quotation.origObject.getRawData(),i))||isEmpty(a)||"0"===a.pricePerNight){if("chalet"===e(".slideshow .offer").data("type")){n=e(".slideshow .offer"),s=e("#accomodation_price_template").text();return a.totalPrice&&(a.totalPrice=!1),html=Mustache.render(s,a),n.html(html),void n.removeClass("loading")}c.adults=1,c.minAdults=1;var d=new $fbsdk[i](c);return d.setAuthToken(config._authCode),void d.load((function(r){var n=this.getRawData();if(r||isEmpty(n)){var s=e(".slideshow .offer"),d=e("#accomodation_price_template").text();return a.totalPrice&&(a.totalPrice=!1),html=Mustache.render(d,a),s.html(html),void s.removeClass("loading")}(a=getEndpointData(n,i)).isFallBack=!0,o.quotation=a,a.bookingParams.from_formated=dateFormat(a.bookingParams.from,"dd/MM/yyyy"),a.bookingParams.to_formated=dateFormat(a.bookingParams.to,"dd/MM/yyyy");s=e(".slideshow .offer"),d=e("#accomodation_price_template").text();if(html=Mustache.render(d,a),s.html(html),s.removeClass("loading"),a.plainBookLink){var f=a.plainBookLink;window.fusion_changed_enabled&&(f=fusion_deepLink_from_plainBookLink(a.plainBookLink,config,!0),s.find(".go_to_fusion").attr("href",f).removeAttr("target")),t()}}))}if(!isEmpty(r)&&r&&r.pricePerNight>
1a.pricePerNight&&(a.strikedPrice=r.totalPrice*(a.nights/r.nights)),a.rateName="Quotation"!==i||a.isFallBack?o.quotation.origObject.getRawData().rates[0].rate.title:"","Quotation"===i){var f=o.quotation.origObject.getRawData()[0].rate,l=e.extend(!0,{},config);window.hotelOffers={ongoing:!0,offers:new $fbsdk.Offers(l)},window.hotelOffers.offers.setAuthToken(config._authCode),window.hotelOffers.offers.load((function(t){window.hotelOffers.ongoing=!1,t?console.log(t):(hotelRates=this.getRawData().rates,isEmpty(hotelRates)||e.each(hotelRates,(function(){if("undefined"!==this.rate&&parseInt(this.rate.name)===f){a.rateName=this.rate.title;var t=e(".slideshow .offer"),o=e("#accomodation_price_template").text();return html=Mustache.render(o,a),t.html(html),window.fusion_changed_enabled&&(final_url=fusion_deepLink_from_plainBookLink(a.plainBookLink),t.find(".go_to_fusion").attr("href",final_url).removeAttr("target")),!1}})))}))}a.bookingParams.from_formated=dateFormat(a.bookingParams.from,"dd/MM/yyyy"),a.bookingParams.to_formated=dateFormat(a.bookingParams.to,"dd/MM/yyyy");n=e(".slideshow .offer"),s=e("#accomodation_price_template").text();html=Mustache.render(s,a),n.html(html),n.removeClass("loading")}))}t()}if(e(".accordions > .accordion").each((function(t,o){if(e(o).length&&""!==e(o).data("roomcode")&&void 0!==e(o).data("roomcode")){var a=!1,i=e(o).find(".js-tile");e(i).on("click contentLoad getPrices",(function(t){if(!a){a=!0;e(this).parents(".accordion ");var i=websdk_config.accomodation;$fbsdk.Config.baseHost=i.baseHost;var r="Offers",n=new $fbsdk.Loader,s=e.extend(!0,{},i.params);s.offerComputeRule="lowerMinStay",s.roomRestriction=e(o).data("roomcode"),quotation=new $fbsdk.Offers(s),quotation.setAuthToken(i._authCode),n.add("quotation",quotation),n.load((function(t){var a;if(t.quotation.error||!t.quotation.origObject.getRawData().rates[0])return e(o).find(".price").remove(),void e(o).find(".book").remove();a=getEndpointData(t.quotation.origObject.getRawData(),r);var n=e(o).find(".price"),s=e("#accomodation_room_price_template").text();html=Mustache.render(s,a),n.html(html);n=e(o).find(".book"),s=e("#accomodation_room_book_template").text();html=Mustache.render(s,a),n.html(html),window.fusion_changed_enabled&&(final_url=fusion_deepLink_from_plainBookLink(a.plainBookLink,i),n.find(".go_to_fusion").attr("href",final_url).removeAttr("target"))}))}}))}})),e(".accordions").each((function(t){if(e(this).parents(".block__accordion").hasClass("rooms_preview")||e(this).parents(".block__accordion").hasClass("meetings_preview"))if(e(this).find(".accordion .js-tile").each((function(){e(this).trigger("getPrices")})),!0===window.matchMedia("(min-width:769px)").matches);else{var o=e(this).find(".accordion").first(),a=e(this).find(".accordion .js-tile").first();o.hasClass("alone")&&a.trigger("contentLoad")}})),(e("body").hasClass("tax-hotel_destination")||e("body").hasClass("page-template-template-list-offers")||e("body").hasClass("single-brand")||e("body").hasClass("home"))&&(e("#accomodations_preview").length>0||e(".offers_list").length>0)){var m=[];let t=(t,o,a)=>{m[a]=[];var i={referenceRateCode:"",rateName:"",locale:websdk_config.hotel_list.params.locale,output:"jsonp",orderBy:"totalPrice",baseHost:websdk_config.hotel_list.baseHost,dayRange:websdk_config.hotel_list.params.dayRange};$fbsdk.Config.baseHost=i.baseHost,window.hotelPriceHtml={},e.each(hotel_list[a],(function(t,r){"undefined"!=typeof websdk_config&&void 0!==websdk_config.hotel_list&&"undefined"!=typeof $fbsdk&&m[a].push(new Promise(((n,s)=>{var d=new $fbsdk.Loader,f=e.extend(!0,{},i);r.rateName&&(f.rateName=r.rateName),f.property=t;var c="Offers";if(quotation=new $fbsdk.Offers(f),quotation.setAuthToken(r.token),d.add("quotation",quotation),r.referenceRateCode){var l=e.extend(!0,{},f);l.rateName=r.referenceRateCode,refQuotation=new $fbsdk.Offers(l),refQuotation.setAuthToken(r.token),d.add("refQuotation",refQuotation)}d.load((function(i){var s,d;e(o).find('.item.accodomation[data-hid="'+t+'"]'),e(".no-availabilities");if(i.quotation.error){window.hotelPriceHtml[t]=!1;var f=e(o).find('.item.accodomation[data-hid="'+t+'"]').find(".item__price"),l=e("#preview_acomodation_price_template").text();return s=[],html=Mustache.render(l,s),f.html(html),void n({data:s,hid:t,block:a})}if(r.referenceRateCode&&(i.refQuotation.error?console.log("no reference quotation found",t):d=getEndpointData(i.refQuotation.origObject.getRawData(),c)),!(s=getEndpointData(i.quotation.origObject.getRawData(),c))||isEmpty(s)||"0"===s.pricePerNight){window.hotelPriceHtml[t]=!1;f=e(o).find('.item.accodomation[data-hid="'+t+'"]').find(".item__price"),l=e("#preview_acomodation_price_template").text();return html=Mustache.render(l,s),f.html(html),void n({data:s,hid:t,block:a})}!isEmpty(d)&&d&&d.pricePerNight>s.pricePerNight&&(s.strikedPrice=d.pricePerNight,s.rateName=i.quotation.origObject.getRawData().rates[0].rate.title);f=e(o).find('.item.accodomation[data-hid="'+t+'"]').find(".item__price"),l=e("#preview_acomodation_price_template").text();html=Mustache.render(l,s),f.html(html),window.hotelPriceHtml[t]=html,n({data:s,hid:t,block:a})}))})))})),Promise.all(m[a]).then((function(t){if(e("body").hasClass("home")){if(t.sort((function(e,t){return!e.data||isEmpty(e.data)?1:!t.data||isEmpty(t.data)?-1:e.data.pricePerNight-t.data.pricePerNight})),"undefined"!==e(".offers_list")[a]&&e(e(".offers_list")[a]).hasClass("swiper-slide")){var o=e(e(".offers_list")[a]).find(".item__price").get(0),i=e("#preview_acomodation_price_template").text();html="",void 0!==t[0]&&void 0!==t[0].data&&(html=Mustache.render(i,t[0].data)),e(o).html(html)}}window.markers&&e.each(hotelPriceHtml,(function(t,o){e.each(markers,(function(a,i){if(i.hid===t&&o){var r=e.parseHTML(i.infowindow);e(r).find(".item__price").html(o),i.infowindow=e(r).prop("outerHTML")}}
1))})),window.resultsLoaded=!0})),t&&t.kill()};gsap.utils.toArray(".offers_list").forEach(((e,o)=>{lazyPrice=ScrollTrigger.create({trigger:e,start:"top center+=50%",end:"bottom center-=50%",onEnter:a=>t(a,e,o),onEnterBack:a=>t(a,e,o),onLeave:a=>t(a,e,o),onLeaveBack:a=>t(a,e,o)})}))}}))}(jQuery);

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.