PageSourceSearch

https://spb-cortinn.ru/module-price-load/assets/public/price-autoload.js

js spb-cortinn.ru collected 2026-10-09 23:30:34 UTC 24,708 bytes, 2 lines download raw bytes

vendor: 5,177 bytes, line 1
1/*! module-price-load 3.2.1 */!function(){var e={16:function(e,t,r){"use strict";var n=r(354),i=r.n(n),s=r(314),o=r.n(s)()(i());o.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.A=o},314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);n&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},354:function(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(i," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},353:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",s="minute",o="hour",a="day",c="week",u="month",l="quarter",h="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},M=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:M,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+M(n,2,"0")+":"+M(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,u),s=r-i<0,o=t.clone().add(n+(s?-1:1),u);return+(-(n+(r-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:h,w:c,d:a,D:d,h:o,m:s,s:i,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",$={};$[y]=p;var D=function(e){return e instanceof L},P=function(e,t,r){var n;if(!e)return y;if("string"==typeof e)$[e]&&(n=e),t&&($[e]=t,n=e);else{var i=e.name;$[i]=e,n=i}return!r&&n&&(y=n),n||!r&&y},b=function(e,t){if(D(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new L(r)},v=g;v.l=P,v.i=D,v.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var L=function(){function p(e){this.$L=P(e.locale,null,!0),this.parse(e)}var M=p.prototype;return M.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(v.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},M.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},M.$utils=function(){return v},M.isValid=function(){return!(this.$d.toString()===f)},M.isSame=function(e,t){var r=b(e);return this.startOf(t)<=r&&r<=this.endOf(t)},M.isAfter=function(e,t){return b(e)<this.startOf(t)},M.isBefore=function(e,t){return this.endOf(t)<b(e)},M.$g=function(e,t,r){return v.u(e)?this[t]:this.set(r,e)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(e,t){var r=this,n=!!v.u(t)||t,l=v.p(e),f=function(e,t){var i=v.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(a)},m=function(e,t){return v.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},_=this.$W,p=this.$M,M=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case h:return n?f(1,0):f(31,11);case u:return n?f(1,p):f(0,p+1);case c:var y=this.$locale().weekStart||0,$=(_<y?_+7:_)-y;return f(n?M-$:M+(6-$),p);case a:case d:return m(g+"Hours",0);case o:return m(g+"Minutes",1);case s:return m(g+"Seconds",2);case i:return m(g+"Milliseconds",3);default:return this.clone()}},M.endOf=function(e){return this.startOf(e,!1)},M.$set=function(e,t){var r,c=v.p(e),l="set"+(this.$u?"UTC":""),f=(r={},r[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[h]=l+"FullYear",r[o]=l+"Hours",r[s]=l+"Minutes",r[i]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],m=c===a?this.$D+(t-this.$W):t;if(c===u||c===h){var _=this.clone().set(d,1);
1_.$d[f](m),_.init(),this.$d=_.set(d,Math.min(this.$D,_.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},M.set=function(e,t){return this.clone().$set(e,t)},M.get=function(e){return this[v.p(e)]()},M.add=function(n,l){var d,f=this;n=Number(n);var m=v.p(l),_=function(e){var t=b(f);return v.w(t.date(t.date()+Math.round(e*n)),f)};if(m===u)return this.set(u,this.$M+n);if(m===h)return this.set(h,this.$y+n);if(m===a)return _(1);if(m===c)return _(7);var p=(d={},d[s]=t,d[o]=r,d[i]=e,d)[m]||1,M=this.$d.getTime()+n*p;return v.w(M,this)},M.subtract=function(e,t){return this.add(-1*e,t)},M.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=v.z(this),s=this.$H,o=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=function(e,r,i,s){return e&&(e[r]||e(t,n))||i[r].substr(0,s)},h=function(e){return v.s(s%12||12,e,"0")},d=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:v.s(a+1,2,"0"),MMM:l(r.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:v.s(this.$D,2,"0"),d:String(this.$W),dd:l(r.weekdaysMin,this.$W,c,2),ddd:l(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(s),HH:v.s(s,2,"0"),h:h(1),hh:h(2),a:d(s,o,!0),A:d(s,o,!1),m:String(o),mm:v.s(o,2,"0"),s:String(this.$s),ss:v.s(this.$s,2,"0"),SSS:v.s(this.$ms,3,"0"),Z:i};return n.replace(_,function(e,t){return t||m[e]||i.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(n,d,f){var m,_=v.p(d),p=b(n),M=(p.utcOffset()-this.utcOffset())*t,g=this-p,y=v.m(this,p);return y=(m={},m[h]=y/12,m[u]=y,m[l]=y/3,m[c]=(g-M)/6048e5,m[a]=(g-M)/864e5,m[o]=g/r,m[s]=g/t,m[i]=g/e,m)[_]||g,f?y:v.a(y)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return $[this.$L]},M.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=P(e,t,!0);return n&&(r.$L=n),r},M.clone=function(){return v.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},p}(),E=L.prototype;return b.prototype=E,[["$ms",n],["$s",i],["$m",s],["$H",o],["$W",a],["$M",u],["$y",h],["$D",d]].forEach(function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,L,b),e.$i=!0),b},b.locale=P,b.isDayjs=D,b.unix=function(e){return b(1e3*e)},b.en=$[y],b.Ls=$,b.p={},b}()},72:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=n.base?c[0]+n.base:c[0],l=s[u]||0,h="".concat(u," ").concat(l);s[u]=l+1;var d=r(h),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=i(f,n);n.byIndex=a,t.splice(a,0,{identifier:h,updater:m,references:1})}o.push(h)}return o}function i(e,t){var r=t.domAPI(t);r.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var s=n(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=r(s[o]);t[a].references--}for(var c=n(e,i),u=0;u<s.length;u++){var l=r(s[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}s=c}}},659:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var s=r.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={id:n,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}
1r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nc=void 0,function(){"use strict";var e=r(72),t=r.n(e),n=r(825),i=r.n(n),s=r(659),o=r.n(s),a=r(56),c=r.n(a),u=r(540),l=r.n(u),h=r(113),d=r.n(h),f=r(16),m={};m.styleTagTransform=d(),m.setAttributes=c(),m.insert=o().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=l();t()(f.A,m),f.A&&f.A.locals&&f.A.locals;const _=window.priceLoadDemoDevBuild?"http://module-price-load.local:8080/module-price-load/cache/price.json":"/module-price-load/cache/price.json",p="data-module-price-load-hotel-id",M="data-module-price-load-date",g="data-module-price-load-minlos",y="data-module-price-load-offer-name",$="data-module-price-load-link",D="data-module-price-load-restore-status",P="data-module-price-load-fill-status",b="module-price-load",v=`${b}:expire`,L=`${b}:prices`,E=`${b}_show_discount_prices`,S="not-supported",A="&nb[s]p",O="{{DateFormat}}",I="MMMM",C="{{minlos}}",w="{{minlosDayEnd}}",T="{{minlosDay}}",R="{{offer}}",x=!1,F="RoundDown",N="RoundUp",k="RoundNearest",U=`//${location.host}/booking/`;var Y=r(353),j=r.n(Y);const H=()=>"undefined"!=typeof priceLoadDemoMode&&"demo"===priceLoadDemoMode,J=()=>MODULE_PRICE_LOAD_LANG===S,G=e=>e.split("").reverse().join(""),B=()=>j()().unix(),W=(e,t)=>j()(e).format(t),z=(e,t,r,n,i,s)=>({hotel:e,room:t,date:r,nights:n,adults:i,offer:s}),q=()=>{const e=localStorage.getItem(L);return!e||localStorage.getItem(v)<=B()?"":e},Z=e=>{localStorage.setItem(L,e),localStorage.setItem(v,j()().add(30,"minute").unix().toString())};class V{constructor(){this._cachePrices=q()}isLoadNeeded(){return!this._cachePrices||H()}load(){return(async()=>{const e=await fetch(`${_}?${B()}`);return e.ok||console.error("Could't fetch price"),await e.json()})().then(e=>(Z(JSON.stringify(e)),e)).catch(e=>{console.log("PriceLoad load error:"),console.log(e)})}getFromCache(){return JSON.parse(this._cachePrices)}}const Q={en:{DateText:"The best price when booking online",DateFormat:`MMMM${A}D,${A}YYYY`,MinLosText:`When booking from ${C} ${T}`,OfferText:`on "${R}" special offer`,UsePriceRound:x,UsePriceSplit:!0,PriceDelimiter:","},fr:{DateText:`Le meilleur prix pour le ${O}`,DateFormat:`D${A}MMMM,${A}YYYY`,MinLosText:`Lors de la réservation à partir de ${C} ${T}`,OfferText:`pour la promotion "${R}"`,UsePriceRound:x,UsePriceSplit:!0,PriceDelimiter:","},zh:{DateText:`${O} 最優價`,DateFormat:`D${A}MMMM,${A}YYYY`,MinLosText:`從${C}${T}開始預訂`,OfferText:`用於"${R}"促銷活動`,UsePriceRound:x,UsePriceSplit:!0,PriceDelimiter:","},kk:{DateText:`Ең тиімді баға ${O}`,DateFormat:"DD.MM.YYYY",MinLosText:`${C} ${T} бастап брондау кезінде`,OfferText:`"${R}" акциясы үшін`,UsePriceRound:x,UsePriceSplit:!1,PriceDelimiter:","},ru:{DateText:"Лучший тариф при бронировании на сайте",DateFormat:`D${A}MMMM${A}YYYY`,MinLosText:`При бронировании от ${C}${w} ${T}`,OfferText:`по тарифу «${R}»`,UsePriceRound:x,UsePriceSplit:!0,PriceDelimiter:","}},K=e=>H()||J()?e:e=(e=>{const{PriceDelimiter:t}=Q[MODULE_PRICE_LOAD_LANG];return""!==t?`${e}`.replace(".",t):e})(e=(e=>{const{UsePriceSplit:t}=Q[MODULE_PRICE_LOAD_LANG];if(t){const t=(e=`${e}`).match(/(([,.])\d+$)/),r=t?t[0]:"",n=e.replace(r,"");e=G(n).match(/.{1,3}/g).map(e=>G(e)).reverse().join(" "),e+=r}return e})(e=(e=>{const{UsePriceRound:t}=Q[MODULE_PRICE_LOAD_LANG];if(t!==x)switch(t){case F:return Math.floor(e);case N:return Math.ceil(e);case k:return Math.round(e)}return e})(e))),X={en:{day:{one:"day",many:"days"}},fr:{month:{January:"Janvier",February:"Février",March:"Mars",April:"Avril",May:"Mai",June:"Juin",July:"Juillet",August:"Août",September:"Septembre",October:"Octobre",November:"Novembre",December:"Décembre"},day:{one:"jour",many:"jours"}},zh:{month:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},day:{one:"天",many:"天"}},kk:{month:{January:"қаңтарындағы",February:"ақпанындағы",March:"наурызындағы",April:"сәуіріндегі",May:"мамырындағы",June:"маусымындағы",July:"шілдесіндегі",August:"тамызындағы",September:"қыркүйегіндегі",October:"қазанындағы",November:"қарашасындағы",December:"желтоқсанындағы"},day:{one:"күннен",many:"күннен"}},ru:{month:{January:"января",February:"февраля",March:"марта",April:"апреля",May:"мая",June:"июня",July:"июля",August:"августа",September:"сентября",October:"октября",November:"ноября",December:"декабря"},day:{one:"дня",many:"дней"}}},ee={ru:{numeralEnds:{byNumbers:new Map([[[11,12,13,14],{end:"-и",day:X.ru.day.many}
1]]),byNumberEnds:new Map([[[1],{end:"-го",day:X.ru.day.one}],[[2,3,4],{end:"-х",day:X.ru.day.many}],[[5,6,7,8,9,0],{end:"-и",day:X.ru.day.many}]])}}},te=e=>{const{DateFormat:t,DateText:r}=Q[MODULE_PRICE_LOAD_LANG],n="en"!==MODULE_PRICE_LOAD_LANG?((e,t)=>{const r=W(e,I),n=X[MODULE_PRICE_LOAD_LANG].month[r];return t.replace(r,n)})(e,W(e,t)):W(e,t);return r.replace(O,n)},re=e=>"ru"!==MODULE_PRICE_LOAD_LANG?(e=>{const t=1===e?X[MODULE_PRICE_LOAD_LANG].day.one:X[MODULE_PRICE_LOAD_LANG].day.many;let r=Q[MODULE_PRICE_LOAD_LANG].MinLosText;return r=r.replace(T,t),r=r.replace(C,e),r})(e):(e=>{const t=ee.ru,r=+e.toString()[e.toString().length-1];let n=Q[MODULE_PRICE_LOAD_LANG].MinLosText,i="",s="",o=!1;for(const r of t.numeralEnds.byNumbers){const[t,n]=r,{end:a,day:c}=n;if(t.includes(e)){i=a,s=c,o=!0;break}}if(!o)for(const e of t.numeralEnds.byNumberEnds){const[t,n]=e,{end:o,day:a}=n;if(t.includes(r)){i=o,s=a;break}}return n=n.replace(w,i),n=n.replace(T,s),n=n.replace(C,e),n})(e),ne=z("hotel_id","room-type","date","nights","adults","special-offer"),ie=e=>H()||J()?e:e?(e=>Q[MODULE_PRICE_LOAD_LANG].OfferText.replace(R,e))(e):e,se=()=>{window.MODULE_PRICE_LOAD_LANG=(()=>{const e=document.documentElement.lang,t=Object.keys(Q),r=Object.keys(X),n=2===e.length?e.toLowerCase():e.substring(0,2);return t.includes(n)&&r.includes(n)?n:S})()};class oe{constructor(e){this._element=e,this._hotelId=this._element.getAttribute(p),this._roomType=this._element.getAttribute("data-module-price-load-room-type"),this._adults=this._element.getAttribute("data-module-price-load-adults"),this._currency=this._element.getAttribute("data-module-price-load-currency"),this._isDateField=this._element.hasAttribute(M),this._isMinLosField=this._element.hasAttribute(g),this._isOfferCodeField=this._element.hasAttribute("data-module-price-load-offer-code"),this._isOfferNameField=this._element.hasAttribute(y),this._isLinkField=this._element.hasAttribute($),this._hasRestoreStatusAttribute=this._element.hasAttribute(D),this._hasFillStatusAttribute=this._element.hasAttribute(P),this._isExtraPlacementPriceField=this._element.hasAttribute("data-module-price-load-extra-placement-price")}getHotel(){return this._hotelId}getRoomType(){return this._roomType}getAdults(){return this._adults}getLinkParams(){return this._element.getAttribute($)}getLinkBookUrl(){return this._element.getAttribute("data-module-price-load-link-book-url")}getCurrency(){return this._currency}setContent(e){this._element.innerHTML=e}setRestoreStatus(e){this._element.setAttribute(D,e.toString())}setFillStatus(e){this._element.setAttribute(P,e.toString())}setDataAttribute(e){this._element.setAttribute(M,e)}setMinLosAttribute(e){this._element.setAttribute(g,e)}setOfferAttribute(e){this._element.setAttribute(y,e)}setLink(e){this._element.href=e}isDate(){return this._isDateField}isMinLos(){return this._isMinLosField}isOfferCodeField(){return this._isOfferCodeField}isOfferName(){return this._isOfferNameField}isLink(){return this._isLinkField}hasRestoreStatus(){return this._hasRestoreStatusAttribute}hasFillStatus(){return this._hasFillStatusAttribute}isExtraPlacementPrice(){return this._isExtraPlacementPriceField}}class ae{constructor(e){this._priceInfo=e}getRestoreStatus(){return this._priceInfo.isRestored}getFillStatus(){return this._priceInfo.isFilled}getRatePlan(){return this._priceInfo.ratePlan?this._priceInfo.ratePlan:null}getRatePlaneCode(){const e=this.getRatePlan();return e?e.code:""}getData(){return this._priceInfo.date}getMinLos(){return this._priceInfo.minLos}getRatePlaneName(){const e=this.getRatePlan();if(e){const t=e.names,r=Object.keys(t);return t[MODULE_PRICE_LOAD_LANG]?t[MODULE_PRICE_LOAD_LANG]:t[r[0]]}return""}getPrice(){if(this._shouldShowDiscountPrice()){const e=this._getDiscountPrices();if(e)return Object.values(e)[0]}return Object.values(this._getPrices())[0]}getPriceByCurrency(e){if(this._shouldShowDiscountPrice()){const t=this._getDiscountPrices();if(t)return t[e]?t[e]:""}const t=this._getPrices();return t&&t[e]?t[e]:""}isEmpty(){return Boolean(this._priceInfo)}_getPrices(){return this._priceInfo.price}
1_getDiscountPrices(){return this._priceInfo.discountPrice}_getExtraPlacementPrices(){return this._priceInfo.extraPlacementPrice}getExtraPlacementPriceByCurrency(e){const t=this._getExtraPlacementPrices();return t&&t[e]?t[e]:""}_shouldShowDiscountPrice(){return"true"===this._getCookie(E)}_getCookie(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}}const ce="Empty price info";class ue{constructor(e){this._prices=e}getAdultsPriceInfo(e,t,r){try{return this._getPriceInfo(this._prices[e].rooms[t].guests[r])}catch(e){throw new Error(ce)}}getRoomMinPriceInfo(e,t){try{return this._getPriceInfo(this._prices[e].rooms[t].minPrice)}catch(e){throw new Error(ce)}}getHotelMinPriceInfo(e){try{return this._getPriceInfo(this._prices[e].hotelMinPrice)}catch(e){throw new Error(ce)}}_getPriceInfo(e){if(!e)throw new Error(ce);return new ae(e)}}class le{constructor(e,t){this._getAllPricesInfo(e),this._selectModuleElements(t),se()}placePrices(){this._checkEachElement(()=>{this._isPriceInfoForElement()&&(H()&&(this._setRestoreStatusToElement(),this._setFillStatusToElement(),this._setOfferCodeToElement()),this._isSetDateToElement()||this._isSetMinLosToElement()||this._isSetOfferNameToElement()||this._isSetLinkToElement()||this._isSetExtraPlacementPriceToElement()||this._hasElementCurrency()&&this._setPriceToElement())})}_getAllPricesInfo(e){this._pricesModel=new ue(e)}_selectModuleElements(e){this._elements=void 0!==e&&""!==e?document.querySelectorAll(`${e}, ${e} [${p}]`):document.querySelectorAll(`[${p}]`)}_checkEachElement(e){this._elements.forEach(t=>{this._elementModel=new oe(t),e()})}_isPriceInfoForElement(){const e=this._hasElementRoom()?this._getRoomsMinPriceInfo():this._getHotelPriceInfo();return!!this._isCorrectPriceInfo(e)&&(this._setPriceInfoForElement(e),!0)}_isCorrectPriceInfo(e){return e instanceof ae}_setPriceInfoForElement(e){this._priceInfoModel=e}_getRoomPriceInfo(e){const t=this._elementModel.getHotel(),r=this._elementModel.getAdults();return r?this._pricesModel.getAdultsPriceInfo(t,e,r):this._pricesModel.getRoomMinPriceInfo(t,e)}_getHotelPriceInfo(){try{return this._pricesModel.getHotelMinPriceInfo(this._elementModel.getHotel())}catch(e){return null}}_getRoomsMinPriceInfo(){const e=this._elementModel.getRoomType().split(",");let t=null;return e.forEach(e=>{try{const r=this._getRoomPriceInfo(e);t instanceof ae&&!(t instanceof ae&&t.getPrice()>r.getPrice())||(t=r)}catch(e){return null}}),t}_setRestoreStatusToElement(){this._elementModel.hasRestoreStatus()&&this._elementModel.setRestoreStatus(this._priceInfoModel.getRestoreStatus())}_setFillStatusToElement(){this._elementModel.hasFillStatus()&&this._elementModel.setFillStatus(this._priceInfoModel.getFillStatus())}_setOfferCodeToElement(){this._elementModel.isOfferCodeField()&&this._elementModel.setContent(this._priceInfoModel.getRatePlaneCode())}_isSetDateToElement(){if(this._elementModel.isDate()){const e=this._priceInfoModel.getData();return e&&(this._elementModel.setDataAttribute(e),this._elementModel.setContent((e=>H()||J()?e?W(e,"DD.MM.YYYY"):e:e?te(e):e)(e))),!0}return!1}_isSetMinLosToElement(){if(this._elementModel.isMinLos()){const e=this._priceInfoModel.getMinLos();return e&&(this._elementModel.setMinLosAttribute(e),this._elementModel.setContent((e=>H()||J()?e:e?re(e):e)(e))),!0}return!1}_isSetOfferNameToElement(){if(this._elementModel.isOfferName()){const e=this._priceInfoModel.getRatePlaneCode(),t=this._priceInfoModel.getRatePlaneName();return e&&t&&(this._elementModel.setOfferAttribute(e),this._elementModel.setContent(ie(t))),!0}return!1}_isSetLinkToElement(){if(this._elementModel.isLink()){const e=this._elementModel.getLinkParams(),t=this._elementModel.getLinkBookUrl();return this._elementModel.setLink(((e,t,r,n)=>{const i=z(r.getHotel(),r.getRoomType(),n.getData(),n.getMinLos(),r.getAdults(),n.getRatePlaneCode()),s=""!==e?e.split(","):[],o=[];return t||(t=U),s.length?(s.forEach(e=>{i[e]&&o.push(`${ne[e]}=${i[e]}`)}),`${t}?${o.join("&")}`):i.room?`${t}?${ne.room}=${i.room}`:`${t}?${ne.hotel}=${i.hotel}`})(e,t,this._elementModel,this._priceInfoModel)),!0}return!1}_hasElementCurrency(){return Boolean(this._elementModel.getCurrency())}_hasElementRoom(){return Boolean(this._elementModel.getRoomType())}_setPriceToElement(){const e=this._elementModel.getCurrency(),t=this._priceInfoModel.getPriceByCurrency(e);e&&t&&this._elementModel.setContent(K(t))}_isSetExtraPlacementPriceToElement(){if(this._elementModel.isExtraPlacementPrice()){if(this._hasElementCurrency()){const e=this._elementModel.getCurrency(),t=this._priceInfoModel.getExtraPlacementPriceByCurrency(e);e&&t&&this._elementModel.setContent(K(t))}return!0}return!1}}window.setLoadedPrices=(e="")=>{const t=new V;if(t.isLoadNeeded())t.load().then(t=>{new le(t,e).placePrices()});else{const r=t.getFromCache();new le(r,e).placePrices()}},document.addEventListener("DOMContentLoaded",()=>{window.setLoadedPrices()})}()}();
2//# sourceMappingURL=price-autoload.js.map

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.