holidoit 1.0.162 → 1.0.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed.html +12 -1
- package/dist/holidoit-embed.js +1 -1
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/embed.html +32 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/holidoit-embed.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/holidoit.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/holidoit.umd.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/payment-redirect.html +209 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/experience-grid-drawer-loader.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/experience-page-drawer-loader.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/inline-book-now-loader.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-book-now-button.html +31 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-book-now-button.js +1 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-booking-box.html +151 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-booking-box.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-grid-drawer.html +56 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-grid-drawer.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-grid.html +58 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-grid.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-page-drawer.html +56 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience-page-drawer.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience.html +222 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widget-experience.js +2 -0
- package/dist/holidoit-js-releases/20260928135224166-07fe438b66bb-26ef6a21/widgets/widgets-loader.js +1 -0
- package/dist/holidoit.js +2 -0
- package/dist/holidoit.umd.js +1 -1
- package/dist/release-manifest.json +42 -0
- package/dist/widgets/experience-grid-drawer-loader.js +1 -1
- package/dist/widgets/experience-page-drawer-loader.js +2 -0
- package/dist/widgets/inline-book-now-loader.js +1 -1
- package/dist/widgets/widget-book-now-button.html +1 -1
- package/dist/widgets/widget-booking-box.html +109 -16
- package/dist/widgets/widget-booking-box.js +1 -1
- package/dist/widgets/widget-experience-grid-drawer.html +1 -1
- package/dist/widgets/widget-experience-grid-drawer.js +1 -1
- package/dist/widgets/widget-experience-grid.html +1 -1
- package/dist/widgets/widget-experience-grid.js +1 -1
- package/dist/widgets/widget-experience-page-drawer.html +56 -0
- package/dist/widgets/widget-experience-page-drawer.js +2 -0
- package/dist/widgets/widget-experience.html +181 -17
- package/dist/widgets/widget-experience.js +1 -1
- package/dist/widgets/widgets-loader.js +1 -1
- package/package.json +3 -4
- package/README.md +0 -13
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see experience-grid-drawer-loader.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitExperienceGridDrawer",[],t):"object"==typeof exports?exports.HolidoitExperienceGridDrawer=t():e.HolidoitExperienceGridDrawer=t()}(this,()=>(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},546:e=>{function t(r,n,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,i){function o(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,r)=>{var n=r(172),i=r(993),o=r(869),a=r(887),s=r(791),u=r(373),l=r(579);function c(){"use strict";var t=i(),r=t.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var g={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,g[e],t)},delegateYield:function(e,i,o){return t.resultName=i,r(n.d,l(e),o)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,r,n,i){return t.w(p(e),r,n,i&&i.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,i){return(f(t)?a:o)(p(e),t,r,n,i)},keys:u,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:(e,t,r)=>{var n=r(172),i=r(546);e.exports=function e(t,r){function o(e,i,a,s){try{var u=t[e](i),l=u.value;return l instanceof n?r.resolve(l.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):r.resolve(l).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,n){function i(){return new r(function(t,r){o(e,n,t,r)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,i,o){var a=n(e,t,r,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,r)=>{var n=r(993),i=r(791);e.exports=function(e,t,r,o,a){return new i(n().w(e,t,r,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,r)=>{var n=r(546);function i(){var t,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(e,i,o,a){var s=i&&i.prototype instanceof c?i:c,u=Object.create(s.prototype);return n(u,"_invoke",function(e,n,i){var o,a,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:g,f:g.bind(t,4),d:function(e,r){return o=e,a=0,s=t,f.n=r,l}};function g(e,n){for(a=e,s=n,r=0;!d&&u&&!i&&r<c.length;r++){var i,o=c[r],g=f.p,p=o[2];e>3?(i=p===n)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=g&&((i=e<2&&g<o[1])?(a=0,f.v=n,f.n=o[1]):g<p&&(i=e<3||o[0]>n||n>p)&&(o[4]=e,o[5]=n,f.n=p,a=0))}if(i||e>1)return l;throw d=!0,n}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&g(c,p),a=c,s=p;(r=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),g(a,s)):f.n=s:f.v=s);try{if(u=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((r=(d=f.n<0)?s:e.call(n,f))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:r,done:d}}}(e,o,a),!0),u}var l={};function c(){}function d(){}function f(){}r=Object.getPrototypeOf;var g=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),p=f.prototype=c.prototype=Object.create(g);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=f,n(p,"constructor",f),n(f,"constructor",d),d.displayName="GeneratorFunction",n(f,s,"GeneratorFunction"),n(p),n(p,s,"Generator"),n(p,a,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise(function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)})}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function s(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(n),r.d(n,{holidoitExperienceGridDrawerLoader:()=>j});var u=r(756),l=r.n(u),c="HOLIDOIT_ANALYTICS_EVENT";function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g="holidoit_analytics_dedupe_keys",p=new Set;function h(e){return"object"===i(e)&&null!==e&&!Array.isArray(e)}function v(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(e){return null}}function y(){var e=v();if(!e)return[];try{var t=e.getItem(g);if(!t)return[];var r=JSON.parse(t);return Array.isArray(r)?r.filter(function(e){return"string"==typeof e&&e.length>0}):[]}catch(e){return[]}}function m(e){if(e){p.add(e);var t=y().filter(function(t){return t!==e});t.push(e),function(e){var t=v();if(t)try{t.setItem(g,JSON.stringify(e.slice(-200)))}catch(e){}}(t)}}function w(e,t){return"undefined"!=typeof window&&(!function(e){return!(!e||!p.has(e)&&(!y().includes(e)||(p.add(e),0)))}(t)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),m(t),window.dataLayer.push(e),!0))}function b(e){if(!h(e)||e.type!==c)return null;var t,r=h(e.payload)?e.payload:e,n=r.channel,i=r.dedupeKey,o=r.eventData,a=r.source,s=r.widgetType;return"dataLayer"!==n||"embed"!==a&&"widget"!==a||"string"!=typeof i||""===i.trim()||(!h(t=o)||"string"!=typeof t.event||""===t.event.trim())?null:{channel:n,dedupeKey:i.trim(),eventData:o,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}function x(e){try{return new URL(e,window.location.href).origin}catch(e){return null}}var S=new Set(["holidoit.js","embed.html","payment-redirect.html","widgets/widget-book-now-button.html","widgets/widget-booking-box.html","widgets/widget-experience.html","widgets/widget-experience-grid.html","widgets/widget-experience-grid-drawer.html","widgets/widget-experience-page-drawer.html"]);function P(e){try{var t=new URL(e,"undefined"==typeof window?void 0:window.location.href),r=new URL("https://cdn.holidoit.com/");if(t.origin!==r.origin||!t.pathname.startsWith(r.pathname))return e;var n=t.pathname.slice(r.pathname.length);return S.has(n)?(t.pathname="".concat(r.pathname,"holidoit-js-releases/").concat("20260928135224166-07fe438b66bb-26ef6a21","/").concat(n),t.toString()):e}catch(t){return e}}function O(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var A="holidoitExperienceGridDrawerWidget",L="holidoitWidget",k=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"config",null),s(this,"widgets",[]),s(this,"isInitialized",!1),s(this,"mutationObserver",null),s(this,"resizeObserver",null),s(this,"autoInsertedElement",null),s(this,"handleMessage",function(e){var r=e.data||{},n=r.type,i=r.height;if(n!==c)if("HOLIDOIT_WIDGET_RESIZE"!==n||"number"!=typeof i){if("HOLIDOIT_WIDGET_READY"===n){if(!t.findTrustedWidgetForEvent(e))return;t.log("Widget ready:",e.data)}}else{var o=t.findTrustedWidgetForEvent(e);if(!o)return;if(Math.abs(i-o.lastAppliedHeight)<15)return;requestAnimationFrame(function(){o.iframe.style.height="".concat(i,"px"),o.lastAppliedHeight=i,t.log("Resized widget to",i,"px")})}else t.handleAnalyticsMessage(e)})},r=[{key:"init",value:function(e){if(e.embedId){if(this.isInitialized)return this.log("Already initialized, updating config"),this.config=I(I({},this.config),e),void this.scanAndCreateWidgets();this.config=e,this.isInitialized=!0,this.log("Initializing experience grid drawer loader",e),this.setupMessageListener(),this.setupResizeObserver(),this.bootstrap()}}},{key:"bootstrap",value:(o=t(l().mark(function e(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.ensureHolidoitApi();case 1:e.sent&&this.initializeHolidoit(),this.scanAndCreateWidgets(),this.observeForWidgets();case 2:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"getHolidoitApi",value:function(){return"undefined"==typeof window?null:window.Holidoit||null}},{key:"ensureHolidoitApi",value:(i=t(l().mark(function e(){var t,r,n,i,o,a,s;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.getHolidoitApi()){e.next=1;break}return e.abrupt("return",!0);case 1:if(!1!==(null===(t=this.config)||void 0===t?void 0:t.includeLoader)){e.next=2;break}return this.log("includeLoader=false and Holidoit API not found"),e.abrupt("return",!1);case 2:r=this.getLoaderSourceCandidates(),n=O(r),e.prev=3,n.s();case 4:if((i=n.n()).done){e.next=10;break}return o=i.value,e.prev=5,this.log("Attempting to load Holidoit loader from",o),e.next=6,this.loadExternalScript(o);case 6:if(!this.getHolidoitApi()){e.next=7;break}return this.log("Holidoit API loaded successfully"),e.abrupt("return",!0);case 7:e.next=9;break;case 8:e.prev=8,a=e.catch(5),this.log("Failed loading Holidoit loader from",o,a);case 9:e.next=4;break;case 10:e.next=12;break;case 11:e.prev=11,s=e.catch(3),n.e(s);case 12:return e.prev=12,n.f(),e.finish(12);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}},e,this,[[3,11,12,13],[5,8]])})),function(){return i.apply(this,arguments)})},{key:"getLoaderSourceCandidates",value:function(){var e,t,r=[],n=null===(e=this.config)||void 0===e?void 0:e.loaderSrc,i=null===(t=this.config)||void 0===t?void 0:t.scriptSrc;if(n&&r.push(n),i)try{r.push(new URL("../holidoit.js",i).toString())}catch(e){}return r.push("https://cdn.holidoit.com/holidoit.js"),Array.from(new Set(r.map(P)))}},{key:"loadExternalScript",value:function(e){var t=this;return new Promise(function(r,n){if(e){var i=Array.from(document.querySelectorAll("script")).find(function(t){return t.src===e});if(i)return t.getHolidoitApi()?void r():(i.addEventListener("load",function(){return r()},{once:!0}),void i.addEventListener("error",function(){return n(new Error("Failed to load script: ".concat(e)))},{once:!0}));var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){return r()},o.onerror=function(){return n(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}else n(new Error("Missing script src"))})}},{key:"initializeHolidoit",value:function(){var e=this.getHolidoitApi();if(null!=e&&e.init&&this.config){var t,r=this.config.drawerLanguage||this.config.language;document.getElementById("holidoit-loader-container")?(this.log("Holidoit drawer already initialized on page, reusing existing instance"),r&&(null===(t=e.changeLanguage)||void 0===t||t.call(e,r))):e.init({embedId:this.config.embedId,language:r,embedUrl:this.config.embedUrl,floatingButton:!1,debug:this.config.debug})}}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage)}},{key:"handleAnalyticsMessage",value:function(e){var t=this,r=this.findTrustedWidgetForEvent(e);!function(e){var t=e.event,r=e.isTrustedSource,n=e.widgetSrc,i=e.log;if(r){var o=b(t.data);o&&"widget"===o.source&&(w(o.eventData,o.dedupeKey)?null==i||i("Pushed analytics event to dataLayer",{dedupeKey:o.dedupeKey,widgetType:o.widgetType,src:n}):null==i||i("Skipped duplicate analytics event",o.dedupeKey))}else null==i||i("Ignored analytics message from untrusted iframe",t.origin)}({event:e,isTrustedSource:Boolean(r),widgetSrc:null==r?void 0:r.src,log:function(){return t.log.apply(t,arguments)}})}},{key:"findTrustedWidgetForEvent",value:function(e){return function(e){var t,r=e.widgets,n=e.event,i=e.getWidgetSrc,o=d(r);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(a.iframe.contentWindow===n.source){var s=x(i(a));return s&&n.origin===s?a:null}}}catch(e){o.e(e)}finally{o.f()}return null}({widgets:this.widgets,event:e,getWidgetSrc:function(e){return e.src}})}},{key:"setupResizeObserver",value:function(){var e=this;this.resizeObserver=new ResizeObserver(function(t){var r,n=O(t);try{for(n.s();!(r=n.n()).done;){var i,o=r.value.target,a=O(e.widgets);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.element===o){var u;null===(u=s.iframe.contentWindow)||void 0===u||u.postMessage({type:"HOLIDOIT_REQUEST_HEIGHT"},"*");break}}}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}})}},{key:"getWidgetElements",value:function(){var e=[],t=new Set;return document.querySelectorAll(".".concat(A)).forEach(function(r){var n=r;t.has(n)||(t.add(n),e.push(n))}),document.querySelectorAll(".".concat(L)).forEach(function(r){var n=r;(n.dataset.src||"").includes("widget-experience-grid-drawer.html")&&!t.has(n)&&(t.add(n),e.push(n))}),e}},{key:"ensureAutoInsertedPlaceholder",value:function(){var e,t;if(!1!==(null===(e=this.config)||void 0===e?void 0:e.autoInsertIfMissing)&&!(this.getWidgetElements().length>0||this.autoInsertedElement&&document.body.contains(this.autoInsertedElement))){var r=document.createElement("div");r.className=A;var n=null===(t=this.config)||void 0===t?void 0:t.scriptElement;null!=n&&n.parentNode?n.parentNode.insertBefore(r,n.nextSibling):document.body.appendChild(r),this.autoInsertedElement=r,this.log("Auto-inserted .holidoitExperienceGridDrawerWidget placeholder")}}},{key:"resolveWidgetUrl",value:function(){var e,t;if(null!==(e=this.config)&&void 0!==e&&e.widgetUrl)return this.config.widgetUrl;if(null!==(t=this.config)&&void 0!==t&&t.scriptSrc)try{return new URL("./widget-experience-grid-drawer.html",this.config.scriptSrc).toString()}catch(e){}return"https://cdn.holidoit.com/widgets/widget-experience-grid-drawer.html"}},{key:"scanAndCreateWidgets",value:function(){this.ensureAutoInsertedPlaceholder();var e,t=O(this.getWidgetElements());try{for(t.s();!(e=t.n()).done;){var r=e.value;"true"!==r.dataset.holidoitProcessed&&this.createWidget(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:"applyWidgetParams",value:function(e,t){var r,n,i,o,a,s;null!==(r=this.config)&&void 0!==r&&r.embedId&&!e.searchParams.has("embedId")&&e.searchParams.set("embedId",this.config.embedId);var u=t.dataset.language||(null===(n=this.config)||void 0===n?void 0:n.language);u&&!e.searchParams.has("lang")&&e.searchParams.set("lang",u);var l=t.dataset.experiences||(null===(i=this.config)||void 0===i?void 0:i.experiences);l&&!e.searchParams.has("experiences")&&e.searchParams.set("experiences",l);var c=t.dataset.showLanguagePicker,d=void 0===(null===(o=this.config)||void 0===o?void 0:o.showLanguagePicker)?void 0:String(this.config.showLanguagePicker),f=null!=c?c:d;void 0===f||e.searchParams.has("show_language_picker")||e.searchParams.set("show_language_picker",f);var g=t.dataset.withLogo,p=void 0===(null===(a=this.config)||void 0===a?void 0:a.withLogo)?void 0:String(this.config.withLogo),h=null!=g?g:p;void 0===h||e.searchParams.has("with_logo")||e.searchParams.set("with_logo",h);var v=t.dataset.gift,y=void 0===(null===(s=this.config)||void 0===s?void 0:s.gift)?void 0:String(this.config.gift),m=null!=v?v:y;void 0===m||e.searchParams.has("gift")||e.searchParams.set("gift",m)}},{key:"createWidget",value:function(e){var t,r,n=e.dataset.src;n||(n=this.resolveWidgetUrl());try{r=new URL(P(n),window.location.href)}catch(e){return}this.applyWidgetParams(r,e);var i=document.createElement("iframe");i.className="holidoit-experience-grid-drawer-iframe",i.src=r.toString(),i.allow="payment",i.setAttribute("scrolling","auto"),i.setAttribute("frameborder","0"),i.style.cssText="\n width: 100% !important;\n min-height: ".concat(400,"px !important;\n border: none !important;\n display: block !important;\n "),i.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"),e.innerHTML="",e.appendChild(i),e.dataset.holidoitProcessed="true";var o={element:e,iframe:i,src:r.toString(),lastAppliedHeight:400};this.widgets.push(o),null===(t=this.resizeObserver)||void 0===t||t.observe(e),this.log("Created experience grid drawer widget",o)}},{key:"observeForWidgets",value:function(){var e=this;this.mutationObserver||(this.mutationObserver=new MutationObserver(function(t){var r,n=!1,i=O(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if("childList"===o.type){for(var a=0,s=Array.from(o.addedNodes);a<s.length;a++){var u,l,c,d,f=s[a];if(f instanceof HTMLElement&&(null!==(u=f.classList)&&void 0!==u&&u.contains(A)||null!==(l=f.querySelector)&&void 0!==l&&l.call(f,".".concat(A))||null!==(c=f.matches)&&void 0!==c&&c.call(f,".".concat(L,'[data-src*="widget-experience-grid-drawer.html"]'))||null!==(d=f.querySelector)&&void 0!==d&&d.call(f,".".concat(L,'[data-src*="widget-experience-grid-drawer.html"]')))){n=!0;break}}if(n)break}}}catch(e){i.e(e)}finally{i.f()}n&&(e.log("Detected new grid drawer widget elements, scanning..."),e.scanAndCreateWidgets())}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}},{key:"changeLanguage",value:function(e){var t,r;this.config&&(this.config.language=e);var n=this.getHolidoitApi();null==n||null===(t=n.changeLanguage)||void 0===t||t.call(n,(null===(r=this.config)||void 0===r?void 0:r.drawerLanguage)||e);var i,o=O(this.widgets);try{for(o.s();!(i=o.n()).done;){var a;null===(a=i.value.iframe.contentWindow)||void 0===a||a.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}},"*")}}catch(e){o.e(e)}finally{o.f()}}},{key:"destroy",value:function(){var e,t,r;this.log("Destroying experience grid drawer widgets"),window.removeEventListener("message",this.handleMessage);var n,i=O(this.widgets);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.iframe.remove(),o.element.dataset.holidoitProcessed="false"}}catch(e){i.e(e)}finally{i.f()}this.widgets=[],null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=null,this.isInitialized=!1,this.config=null,null!==(r=this.autoInsertedElement)&&void 0!==r&&r.parentNode&&this.autoInsertedElement.parentNode.removeChild(this.autoInsertedElement),this.autoInsertedElement=null}},{key:"log",value:function(){var e;if(null!==(e=this.config)&&void 0!==e&&e.debug){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];(t=console).log.apply(t,["[HolidoitExperienceGridDrawer]"].concat(n))}}}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n,i,o}(),j=new k;if("undefined"!=typeof window){var T=document.currentScript;if(T){var M=new URL(T.src,window.location.href),H=M.searchParams.get("embedId")||T.dataset.embedId;if(H){var W=M.searchParams.get("lang")||T.dataset.language,D=M.searchParams.get("drawerLang")||T.dataset.drawerLang||T.dataset.drawerLanguage||W,U=M.searchParams.get("includeLoader")||T.dataset.includeLoader,G=null==U?void 0:"false"!==U,N=M.searchParams.get("show_language_picker")||M.searchParams.get("showLanguagePicker")||T.dataset.showLanguagePicker,z=null==N?void 0:"false"!==N,R=M.searchParams.get("with_logo")||M.searchParams.get("withLogo")||T.dataset.withLogo,C=null==R?void 0:"true"===R,F=M.searchParams.get("gift")||T.dataset.gift,q=null==F?void 0:"true"===F;j.init({embedId:H,language:W,drawerLanguage:D,includeLoader:G,withLogo:C,gift:q,loaderSrc:M.searchParams.get("loaderSrc")||T.dataset.loaderSrc||void 0,embedUrl:M.searchParams.get("embedUrl")||T.dataset.embedUrl||void 0,widgetUrl:M.searchParams.get("widgetUrl")||T.dataset.widgetUrl||void 0,experiences:M.searchParams.get("experiences")||T.dataset.experiences||void 0,showLanguagePicker:z,debug:"true"===M.searchParams.get("debug")||"true"===T.dataset.debug,autoInsertIfMissing:"false"!==(M.searchParams.get("autoInsertIfMissing")||T.dataset.autoInsertIfMissing),scriptSrc:T.src,scriptElement:T})}}window.HolidoitExperienceGridDrawer=j}})(),n})());
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see experience-page-drawer-loader.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitExperiencePageDrawer",[],t):"object"==typeof exports?exports.HolidoitExperiencePageDrawer=t():e.HolidoitExperiencePageDrawer=t()}(this,()=>(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},317:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},353:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",o="second",r="minute",a="hour",s="day",l="week",u="month",d="quarter",c="year",h="date",f="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(i,u),r=n-o<0,a=t.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:l,d:s,D:h,h:a,m:r,s:o,ms:i,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=p;var _="$isDayjsObject",k=function(e){return e instanceof x||!(!e||!e[_])},S=function e(t,n,i){var o;if(!t)return b;if("string"==typeof t){var r=t.toLowerCase();w[r]&&(o=r),n&&(w[r]=n,o=r);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!i&&o&&(b=o),o||!i&&b},O=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},M=y;M.l=S,M.i=k,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function p(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var v=p.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(g);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(t)}(e),this.init()},v.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()},v.$utils=function(){return M},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=O(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return O(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<O(e)},v.$g=function(e,t,n){return M.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,i=!!M.u(t)||t,d=M.p(e),f=function(e,t){var o=M.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?o:o.endOf(s)},g=function(e,t){return M.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,p=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case c:return i?f(1,0):f(31,11);case u:return i?f(1,p):f(0,p+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(i?v-w:v+(6-w),p);case s:case h:return g(y+"Hours",0);case a:return g(y+"Minutes",1);case r:return g(y+"Seconds",2);case o:return g(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=M.p(e),d="set"+(this.$u?"UTC":""),f=(n={},n[s]=d+"Date",n[h]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[a]=d+"Hours",n[r]=d+"Minutes",n[o]=d+"Seconds",n[i]=d+"Milliseconds",n)[l],g=l===s?this.$D+(t-this.$W):t;if(l===u||l===c){var m=this.clone().set(h,1);m.$d[f](g),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](g);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[M.p(e)]()},v.add=function(i,d){var h,f=this;i=Number(i);var g=M.p(d),m=function(e){var t=O(f);return M.w(t.date(t.date()+Math.round(e*i)),f)};if(g===u)return this.set(u,this.$M+i);if(g===c)return this.set(c,this.$y+i);if(g===s)return m(1);if(g===l)return m(7);var p=(h={},h[r]=t,h[a]=n,h[o]=e,h)[g]||1,v=this.$d.getTime()+i*p;return M.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=e||"YYYY-MM-DDTHH:mm:ssZ",o=M.z(this),r=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,c=function(e,n,o,r){return e&&(e[n]||e(t,i))||o[n].slice(0,r)},h=function(e){return M.s(r%12||12,e,"0")},g=d||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return c(n.monthsShort,s,u,3);case"MMMM":return c(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return c(n.weekdaysMin,t.$W,l,2);case"ddd":return c(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(r);case"HH":return M.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return g(r,a,!0);case"A":return g(r,a,!1);case"m":return String(a);case"mm":return M.s(a,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,h,f){var g,m=this,p=M.p(h),v=O(i),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return M.m(m,v)};switch(p){case c:g=w()/12;break;case u:g=w();break;case d:g=w()/3;break;case l:g=(b-y)/6048e5;break;case s:g=(b-y)/864e5;break;case a:g=b/n;break;case r:g=b/t;break;case o:g=b/e;break;default:g=b}return f?g:M.a(g)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=S(e,t,!0);return i&&(n.$L=i),n},v.clone=function(){return M.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},p}(),L=x.prototype;return O.prototype=L,[["$ms",i],["$s",o],["$m",r],["$H",a],["$W",s],["$M",u],["$y",c],["$D",h]].forEach(function(e){L[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),O.extend=function(e,t){return e.$i||(e(t,x,O),e.$i=!0),O},O.locale=S,O.isDayjs=k,O.unix=function(e){return O(1e3*e)},O.en=w[b],O.Ls=w,O.p={},O}()},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var i in t)n.unshift(i);return function e(){for(;n.length;)if((i=n.pop())in t)return e.value=i,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},445:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var a=o.prototype;r.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=r(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(i,o){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?u.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],r=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===r?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l,s};var d=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var c=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var i=this.local(),o=r(e).local();return h.call(i,o,t,n)}}}()},494:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function o(e,t,n){var o=i[n];return Array.isArray(o)&&(o=o[t?0:1]),o.replace("%d",e)}var r={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o}};return n.default.locale(r,null,!0),r}(n(353))},546:e=>{function t(n,i,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,i,o){function r(n,i){t(e,n,function(e){return this._invoke(n,i,e)})}n?a?a(e,n,{value:i,enumerable:!o,configurable:!o,writable:!o}):e[n]=i:(r("next",0),r("throw",1),r("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i,o,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,i,o){var r,a=function(e,n,i){void 0===i&&(i={});var o=new Date(e),r=function(e,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=e+"|"+i,r=t[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[o]=r),r}(n,i);return r.formatToParts(o)},s=function(t,n){for(var i=a(t,n),r=[],s=0;s<i.length;s+=1){var l=i[s],u=l.type,d=l.value,c=e[u];c>=0&&(r[c]=parseInt(d,10))}var h=r[3],f=24===h?0:h,g=r[0]+"-"+r[1]+"-"+r[2]+" "+f+":"+r[4]+":"+r[5]+":000",m=+t;return(o.utc(g).valueOf()-(m-=m%1e3))/6e4},l=i.prototype;l.tz=function(e,t){void 0===e&&(e=r);var n,i=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),l=Math.round((a-new Date(s))/1e3/60),u=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(u)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),t){var d=n.utcOffset();n=n.add(i-d,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var u=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return u.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var i=n&&t,a=n||t||r,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var u=function(e,t,n){var i=e-60*t*1e3,o=s(i,n);if(t===o)return[i,t];var r=s(i-=60*(o-t)*1e3,n);return o===r?[i,o]:[e-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(e,i).valueOf(),l,a),d=u[0],c=u[1],h=o(d).utcOffset(c);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){r=e}}}()},579:(e,t,n)=>{var i=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(i(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var i=n(172),o=n(993),r=n(869),a=n(887),s=n(791),l=n(373),u=n(579);function d(){"use strict";var t=o(),n=t.m(d),c=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===c||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function g(e){var t,n;return function(i){t||(t={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(e,t){return n(i.a,f[e],t)},delegateYield:function(e,o,r){return t.resultName=o,n(i.d,u(e),r)},finish:function(e){return n(i.f,e)}},n=function(e,n,o){i.p=t.prev,i.n=t.next;try{return e(n,o)}finally{t.next=i.n}}),t.resultName&&(t[t.resultName]=i.v,t.resultName=void 0),t.sent=i.v,t.next=i.n;try{return e.call(this,t)}finally{i.p=t.prev,i.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,n,i,o){return t.w(g(e),n,i,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new i(e,t)},AsyncIterator:s,async:function(e,t,n,i,o){return(h(t)?a:r)(g(e),t,n,i,o)},keys:l,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var i=n(633)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},791:(e,t,n)=>{var i=n(172),o=n(546);e.exports=function e(t,n){function r(e,o,a,s){try{var l=t[e](o),u=l.value;return u instanceof i?n.resolve(u.v).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):n.resolve(u).then(function(e){l.value=e,a(l)},function(e){return r("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,i){function o(){return new n(function(t,n){r(e,i,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},813:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return e+(1===e?"er":"")}};return n.default.locale(i,null,!0),i}(n(353))},826:function(e){e.exports=function(){"use strict";return{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("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}}()},840:function(e){e.exports=function(){"use strict";return function(e,t,n){var i=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},r=function(e,t,n,i,r){var a=e.name?e:e.$locale(),s=o(a[t]),l=o(a[n]),u=s||l.map(function(e){return e.slice(0,i)});if(!r)return u;var d=a.weekStart;return u.map(function(e,t){return u[(t+(d||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):r(e,"months")},monthsShort:function(t){return t?t.format("MMM"):r(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):r(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):r(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):r(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return l.bind(this)()},n.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return r(a(),"months")},n.monthsShort=function(){return r(a(),"monthsShort","months",3)},n.weekdays=function(e){return r(a(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return r(a(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return r(a(),"weekdaysMin","weekdays",2,e)}}}()},869:(e,t,n)=>{var i=n(887);e.exports=function(e,t,n,o,r){var a=i(e,t,n,o,r);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var i=n(993),o=n(791);e.exports=function(e,t,n,r,a){return new o(i().w(e,t,n,r),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},900:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},993:(e,t,n)=>{var i=n(546);function o(){var t,n,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function l(e,o,r,a){var s=o&&o.prototype instanceof d?o:d,l=Object.create(s.prototype);return i(l,"_invoke",function(e,i,o){var r,a,s,l=0,d=o||[],c=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return r=e,a=0,s=t,h.n=n,u}};function f(e,i){for(a=e,s=i,n=0;!c&&l&&!o&&n<d.length;n++){var o,r=d[n],f=h.p,g=r[2];e>3?(o=g===i)&&(s=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=t):r[0]<=f&&((o=e<2&&f<r[1])?(a=0,h.v=i,h.n=r[1]):f<g&&(o=e<3||r[0]>i||i>g)&&(r[4]=e,r[5]=i,h.n=g,a=0))}if(o||e>1)return u;throw c=!0,i}return function(o,d,g){if(l>1)throw TypeError("Generator is already running");for(c&&1===d&&f(d,g),a=d,s=g;(n=a<2?t:s)||!c;){r||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(l=2,r){if(a||(o="next"),n=r[o]){if(!(n=n.call(r,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=r.return)&&n.call(r),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);r=t}else if((n=(c=h.n<0)?s:e.call(i,h))!==u)break}catch(e){r=t,a=1,s=e}finally{l=1}}return{value:n,done:c}}}(e,r,a),!0),l}var u={};function d(){}function c(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),g=h.prototype=d.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,i(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return c.prototype=h,i(g,"constructor",h),i(h,"constructor",c),c.displayName="GeneratorFunction",i(h,s,"GeneratorFunction"),i(g),i(g,s,"Generator"),i(g,a,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(i),n.d(i,{holidoitExperiencePageDrawerLoader:()=>re});var l="HOLIDOIT_ANALYTICS_EVENT",u="holidoit-loader-iframe",d="holidoit-loader-container",c="2.0.0",h="_holidoit_payment_session";function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var m="holidoit_analytics_dedupe_keys",p=new Set;function v(e){return"object"===t(e)&&null!==e&&!Array.isArray(e)}function y(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(e){return null}}function b(){var e=y();if(!e)return[];try{var t=e.getItem(m);if(!t)return[];var n=JSON.parse(t);return Array.isArray(n)?n.filter(function(e){return"string"==typeof e&&e.length>0}):[]}catch(e){return[]}}function w(e){if(e){p.add(e);var t=b().filter(function(t){return t!==e});t.push(e),function(e){var t=y();if(t)try{t.setItem(m,JSON.stringify(e.slice(-200)))}catch(e){}}(t)}}function _(e,t){return"undefined"!=typeof window&&(!function(e){return!(!e||!p.has(e)&&(!b().includes(e)||(p.add(e),0)))}(t)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),w(t),window.dataLayer.push(e),!0))}function k(e){if(!v(e)||e.type!==l)return null;var t,n=v(e.payload)?e.payload:e,i=n.channel,o=n.dedupeKey,r=n.eventData,a=n.source,s=n.widgetType;return"dataLayer"!==i||"embed"!==a&&"widget"!==a||"string"!=typeof o||""===o.trim()||(!v(t=r)||"string"!=typeof t.event||""===t.event.trim())?null:{channel:i,dedupeKey:o.trim(),eventData:r,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}function S(e){try{return new URL(e,window.location.href).origin}catch(e){return null}}var O=new Set(["holidoit.js","embed.html","payment-redirect.html","widgets/widget-book-now-button.html","widgets/widget-booking-box.html","widgets/widget-experience.html","widgets/widget-experience-grid.html","widgets/widget-experience-grid-drawer.html","widgets/widget-experience-page-drawer.html"]);function M(e){try{var t=new URL(e,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(t.origin!==n.origin||!t.pathname.startsWith(n.pathname))return e;var i=t.pathname.slice(n.pathname.length);return O.has(i)?(t.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20260928135224166-07fe438b66bb-26ef6a21","/").concat(i),t.toString()):e}catch(t){return e}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}var E=n(756),D=n.n(E),T=n(353),H=n.n(T),A=(n(494),n(826),n(317),n(813),n(900),n(840)),B=n.n(A),C=n(569),P=n.n(C),$=n(445),U=n.n($);H().extend(U()),H().extend(P()),H().extend(B());var R=function(e){return e.ITALIAN="it",e.ENGLISH="en",e.SPANISH="es",e.FRENCH="fr",e.GERMAN="de",e}({});H()().locale("it").localeData().months(),H()().locale("it").localeData().weekdays(),H()().locale("en").localeData().months(),H()().locale("en").localeData().weekdays(),H()().locale("de").localeData().months(),H()().locale("de").localeData().weekdays(),H()().locale("es").localeData().months(),H()().locale("es").localeData().weekdays(),H()().locale("fr").localeData().months(),H()().locale("fr").localeData().weekdays();function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var W=function(){if("undefined"==typeof window)return null;try{var e=new URLSearchParams(window.location.search),t=e.get("payment_intent");if(!t)return null;var n={paymentIntent:t,paymentIntentClientSecret:e.get("payment_intent_client_secret"),redirectStatus:e.get("redirect_status")};"localhost"===window.location.hostname||window.location.hostname;return n}catch(e){return null}}(),N=!1,z=new Set(["holidoitExperienceSelected","holidoitIFrameChangeLanguage","holidoitExperienceCount"]),G=Object.values(R),K=s(s(s(s(s({},R.ITALIAN,"Prenota ora"),R.ENGLISH,"Book now"),R.SPANISH,"Reservar ahora"),R.FRENCH,"Réserver maintenant"),R.GERMAN,"Jetzt buchen");var J=function(){return a(function n(){var i=this;e(this,n),s(this,"config",null),s(this,"embedConfig",null),s(this,"iframe",null),s(this,"container",null),s(this,"floatingButton",null),s(this,"isOpen",!1),s(this,"hasDrawerEntered",!1),s(this,"closeTimeout",null),s(this,"isReady",!1),s(this,"pendingMessages",[]),s(this,"embedOrigin",""),s(this,"resolvedEmbedUrl",""),s(this,"resolvedApiUrl",""),s(this,"htmlLangObserver",null),s(this,"hasExplicitLanguageSelection",!1),s(this,"hasReceivedEmbedReady",!1),s(this,"embedConfigLoaded",!1),s(this,"previouslyFocusedElement",null),s(this,"visualViewportBaselineHeight",null),s(this,"visualViewportBaselineWidth",null),s(this,"visualViewportUpdateFrame",null),s(this,"isKeyboardVisible",!1),s(this,"lastKeyboardViewportHeight",null),s(this,"lastKeyboardViewportOffsetTop",0),s(this,"keyboardOpeningGuardUntil",0),s(this,"keyboardOpeningCheckTimeout",null),s(this,"keyboardDismissalGuardUntil",0),s(this,"hostCanvasStyles",null),s(this,"scrollLockState",null),s(this,"touchMoveHandler",null),s(this,"scheduleVisualViewportUpdate",function(){null!==i.visualViewportUpdateFrame&&cancelAnimationFrame(i.visualViewportUpdateFrame),i.visualViewportUpdateFrame=requestAnimationFrame(function(){i.visualViewportUpdateFrame=null,i.syncKeyboardViewport()})}),s(this,"handleExternalMessage",function(e){var t=e.data;if(t&&"string"==typeof t.action&&z.has(t.action)){var n=null;if(!(e.source===window)){if(!(n=i.getSenderIframe(e.source)))return void i.log("Ignoring external message from unknown iframe source",t.action);if(n.id===u)return;if(!i.isTrustedHolidoitOrigin(e.origin))return void i.log("Ignoring external message from untrusted origin",e.origin,t.action)}switch(i.log("Received external message",t),t.action){case"holidoitExperienceSelected":t.experienceId&&(i.log("Experience selected from external iframe",t.experienceId),i.open({experienceId:t.experienceId,gift:!!t.gift}));break;case"holidoitIFrameChangeLanguage":t.language&&(i.log("Language change from external iframe",t.language),i.changeLanguage(t.language));break;case"holidoitExperienceCount":if(!n)return;if(i.log("Experience count from external iframe",t.count),"number"==typeof t.height){var o=t.height+16,r=parseInt(n.style.height||"0",10);Math.abs(o-r)>15&&(n.style.height="".concat(o,"px"),i.log("Adjusted iframe height to",o,"for",n.id||n.src))}}}}),s(this,"handleMessage",function(e){var n,o,r,a;if(i.isMessageFromOwnEmbedIframe(e)){var s,l=e.data;if("object"===t(s=l)&&null!==s&&!Array.isArray(s)&&"string"==typeof l.type&&l.type.startsWith("HOLIDOIT_"))if(i.log("Received message from embed iframe",l),!i.handleAnalyticsMessage(l))switch(l.type){case"HOLIDOIT_READY":i.hasReceivedEmbedReady=!0,i.maybeSendInitMessage();break;case"HOLIDOIT_OPENED":i.isOpen&&null===i.closeTimeout&&(i.hasDrawerEntered=!0,i.syncContainerBackdrop());break;case"HOLIDOIT_CLOSED":i.close();break;case"HOLIDOIT_DRAWER_EXITED":null!==i.closeTimeout&&i.finishClose();break;case"HOLIDOIT_BOOKING_COMPLETE":var u=l.payload;i.log("Booking complete",u),null===(n=i.config)||void 0===n||null===(o=n.onBookingComplete)||void 0===o||o.call(n,u);break;case"HOLIDOIT_PAYMENT_REDIRECT_START":var d=l.payload;if(null!=d&&d.session){i.log("Saving payment session for redirect",d.session);try{localStorage.setItem(h,JSON.stringify(d.session))}catch(e){i.log("Failed to save payment session (incognito mode?)",e)}}break;case"HOLIDOIT_LANGUAGE_CHANGED":var c=l.payload,f=i.normalizeLanguage(null==c?void 0:c.language);f&&(i.log("Language changed from embed:",f),i.applyLanguage(f,{markAsExplicit:!0,syncEmbed:!1}),window.postMessage({action:"holidoitEmbedChangeLanguage",language:f},"*"));break;case"HOLIDOIT_CHECKOUT_FIELD_FOCUS":var g,m=l.payload;if(!i.isOpen||null!==i.closeTimeout||"boolean"!=typeof(null==m?void 0:m.focused)||window.innerWidth>=775)break;if(i.clearKeyboardOpeningCheck(),m.focused)i.keyboardOpeningGuardUntil=performance.now()+600,i.keyboardDismissalGuardUntil=0,i.updateKeyboardVisibility(!0,null===(g=window.visualViewport)||void 0===g?void 0:g.height),i.keyboardOpeningCheckTimeout=window.setTimeout(function(){i.keyboardOpeningCheckTimeout=null;var e=window.visualViewport;e&&null!==i.visualViewportBaselineHeight&&i.visualViewportBaselineHeight-e.height>100||i.scheduleVisualViewportUpdate()},650);else i.keyboardOpeningGuardUntil=0,i.keyboardDismissalGuardUntil=performance.now()+450,i.updateKeyboardVisibility(!1);break;case"HOLIDOIT_ERROR":var p=l.payload;null===(r=i.config)||void 0===r||null===(a=r.onError)||void 0===a||a.call(r,(null==p?void 0:p.message)||"Unknown error");break;case"HOLIDOIT_NAVIGATE_TO":var v=l.payload;null!=v&&v.url&&(i.log("Navigating parent page to:",v.url),window.location.href=v.url)}}})},[{key:"isIOSDevice",value:function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var e=navigator.userAgent||"",t=/iPad|iPhone|iPod/.test(e),n="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return t||n}},{key:"safeScrollToPosition",value:function(e,t){var n=null;try{(n=document.createElement("style")).textContent="html, body { scroll-behavior: auto !important; }",(document.head||document.documentElement).appendChild(n),window.scrollTo({left:e,top:t,behavior:"auto"})}catch(n){window.scrollTo(e,t)}finally{n&&requestAnimationFrame(function(){var e;null===(e=n)||void 0===e||e.remove()})}}},{key:"getDocumentScrollRoot",value:function(){var e=document.scrollingElement;return e instanceof HTMLElement?e:document.documentElement}},{key:"isDocumentScrollRoot",value:function(e){return e===this.getDocumentScrollRoot()||e===document.documentElement||e===document.body}},{key:"getScrollPosition",value:function(){return{top:window.scrollY,left:window.scrollX}}},{key:"getScrollbarWidth",value:function(){return window.innerWidth-document.documentElement.clientWidth}},{key:"restoreScrollPosition",value:function(e,t){var n=this.getScrollPosition();(Math.abs(n.top-e)>1||Math.abs(n.left-t)>1)&&this.safeScrollToPosition(t,e)}},{key:"focusWithoutScroll",value:function(e){if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch(t){e.focus()}}},{key:"init",value:function(e){var t,n,i=this;if(e.embedId&&(e.embedId=e.embedId.trim()),e.embedId){if(this.container)return this.log("Holidoit already initialized, skipping duplicate init"),this.config=F(F({},this.config),e),void this.syncLanguageWithDocument();var o=window.scrollY,r=history.scrollRestoration||"auto";try{history.scrollRestoration="manual"}catch(e){this.log("scrollRestoration not supported, continuing without it")}this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,this.config=F(F({},e),{},{language:this.normalizeLanguage(e.language)||void 0}),this.resolvedEmbedUrl=M(e.embedUrl||"https://cdn.holidoit.com/embed.html"),this.resolvedApiUrl="https://engine.holydoit.com",this.embedOrigin=this.getEmbedOrigin(this.resolvedEmbedUrl),this.log("Initializing Holidoit embed",{embedId:e.embedId,version:c}),this.createContainer(),this.createIframe(),null===(t=window.visualViewport)||void 0===t||t.addEventListener("resize",this.scheduleVisualViewportUpdate),null===(n=window.visualViewport)||void 0===n||n.addEventListener("scroll",this.scheduleVisualViewportUpdate,{passive:!0}),this.safeScrollToPosition(0,o),requestAnimationFrame(function(){try{history.scrollRestoration=r}catch(e){}}),this.setupMessageListener(),this.observeDocumentLanguage();var a=function(){i.bindBookNowButtons(),i.observeForBookNowButtons(),i.interceptHolidoitLinks()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a(),this.fetchEmbedConfig().then(function(){var t;((null===(t=i.embedConfig)||void 0===t?void 0:t.has_floating_button)||e.floatingButton)&&i.createFloatingButton(),i.maybeSendInitMessage()}),this.checkPaymentRedirect()}}},{key:"fetchEmbedConfig",value:(n=D().mark(function e(){var t,n,i,o,r,a,s;return D().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.config)&&void 0!==t&&t.embedId){e.next=1;break}return e.abrupt("return");case 1:return n="".concat(this.resolvedApiUrl,"/partner/v0/embed-config/").concat(this.config.embedId,"/get"),this.log("Fetching embed config from:",n),e.prev=2,e.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});case 3:if((i=e.sent).ok){e.next=4;break}throw new Error("Failed to fetch embed config: ".concat(i.status));case 4:return e.next=5,i.json();case 5:o=e.sent,this.embedConfig=o,this.log("Embed config loaded:",o),r=this.getDocumentLanguage(),a=this.isLanguageSupportedByEmbed(r),!this.hasExplicitLanguageSelection&&r&&a?(this.applyLanguage(r,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",r)):!this.config.language&&o.language&&(this.config.language=o.language,this.log("Language set from API config:",o.language)),o.floating_button_config&&(this.config.floatingButtonOptions=this.mergeFloatingButtonOptions(this.config.floatingButtonOptions,o.floating_button_config),this.log("Merged floating button options:",this.config.floatingButtonOptions)),e.next=7;break;case 6:e.prev=6,s=e.catch(2),this.log("Failed to fetch embed config, using local options:",s);case 7:return e.prev=7,this.embedConfigLoaded=!0,e.finish(7);case 8:case"end":return e.stop()}},e,this,[[2,6,7,8]])}),i=function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function a(e){I(r,i,o,a,s,"next",e)}function s(e){I(r,i,o,a,s,"throw",e)}a(void 0)})},function(){return i.apply(this,arguments)})},{key:"mergeFloatingButtonOptions",value:function(e,t){var n,i,o,r;return e?{desktop:F(F({},e.desktop),t.desktop),mobile:F(F({},e.mobile),t.mobile),zIndex:null!==(n=t.zIndex)&&void 0!==n?n:e.zIndex,callToAction:null!==(i=t.callToAction)&&void 0!==i?i:e.callToAction,italianCallToAction:null!==(o=t.italianCallToAction)&&void 0!==o?o:e.italianCallToAction,englishCallToAction:null!==(r=t.englishCallToAction)&&void 0!==r?r:e.englishCallToAction}:t}},{key:"open",value:function(e){var t,n,i,o,r;null!=e&&e.embedId&&(e.embedId=e.embedId.trim()),this.log("Opening embed",e),this.iframe&&this.container&&(this.clearCloseTimeout(),this.isOpen||(this.previouslyFocusedElement=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement!==document.documentElement?document.activeElement:null),this.isOpen=!0,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null!==(t=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==t?t:null,this.visualViewportBaselineWidth=window.innerWidth,this.lockBodyScroll(),this.container.style.display="block",this.container.style.pointerEvents="auto",this.syncContainerBackdrop(),this.scheduleVisualViewportUpdate(),this.floatingButton&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),this.postMessage({type:"HOLIDOIT_OPEN",payload:{embedId:(null==e?void 0:e.embedId)||(null===(i=this.config)||void 0===i?void 0:i.embedId),experienceId:null==e?void 0:e.experienceId,test:null==e?void 0:e.test,gift:null==e?void 0:e.gift}}),null===(o=this.config)||void 0===o||null===(r=o.onOpen)||void 0===r||r.call(o))}},{key:"close",value:function(){var e=this;this.isOpen&&null===this.closeTimeout&&(this.log("Closing embed"),this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.closeTimeout=window.setTimeout(function(){e.finishClose()},600),this.hasDrawerEntered=!1,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_CLOSE"}))}},{key:"finishClose",value:function(){var e,t;this.clearCloseTimeout(),this.isOpen=!1,this.hasDrawerEntered=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.updateKeyboardVisibility(!1),document.activeElement===this.iframe&&this.iframe.blur(),this.floatingButton&&(this.floatingButton.removeAttribute("inert"),this.floatingButton.removeAttribute("aria-hidden"),this.floatingButton.removeAttribute("tabindex")),this.focusWithoutScroll(this.previouslyFocusedElement),this.previouslyFocusedElement=null,this.unlockBodyScroll(),this.container&&(this.syncContainerBackdrop(),this.container.style.display="none",this.container.style.pointerEvents="none"),this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,null===(e=this.config)||void 0===e||null===(t=e.onClose)||void 0===t||t.call(e)}},{key:"toggle",value:function(e){this.isOpen?this.close():this.open(e)}},{key:"changeLanguage",value:function(e){var t=this.normalizeLanguage(e);t?(this.log("Changing language",t),this.applyLanguage(t,{markAsExplicit:!0,syncEmbed:!0})):this.log("Ignoring unsupported language change",e)}},{key:"updateFloatingButtonText",value:function(e){var t,n;if(this.floatingButton&&this.config){var i=this.config.floatingButtonOptions,o=this.resolveFloatingButtonResponsiveOption(null==i||null===(t=i.desktop)||void 0===t?void 0:t.textColor,null==i||null===(n=i.mobile)||void 0===n?void 0:n.textColor,"white"),r=this.getFloatingButtonCallToAction(e),a='<svg style="fill: '.concat(o,' !important;" xmlns="http://www.w3.org/2000/svg" height="19" width="19" viewBox="0 0 448 512"><path style="fill: ').concat(o,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(o," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(a," ").concat(r,"</span>"),this.log("Updated floating button text to:",r)}}},{key:"destroy",value:function(){var e,t;this.log("Destroying embed"),this.clearCloseTimeout(),this.syncHostCanvasBackdrop(!1),this.scrollLockState&&this.unlockBodyScroll(),this.container&&(this.container.remove(),this.container=null),this.floatingButton&&(this.floatingButton.remove(),this.floatingButton=null),this.htmlLangObserver&&(this.htmlLangObserver.disconnect(),this.htmlLangObserver=null),this.iframe=null,this.config=null,this.isOpen=!1,this.hasDrawerEntered=!1,this.isReady=!1,this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,window.removeEventListener("message",this.handleMessage),window.removeEventListener("message",this.handleExternalMessage),null===(e=window.visualViewport)||void 0===e||e.removeEventListener("resize",this.scheduleVisualViewportUpdate),null===(t=window.visualViewport)||void 0===t||t.removeEventListener("scroll",this.scheduleVisualViewportUpdate),null!==this.visualViewportUpdateFrame&&(cancelAnimationFrame(this.visualViewportUpdateFrame),this.visualViewportUpdateFrame=null),this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)}},{key:"clearKeyboardOpeningCheck",value:function(){null!==this.keyboardOpeningCheckTimeout&&(window.clearTimeout(this.keyboardOpeningCheckTimeout),this.keyboardOpeningCheckTimeout=null)}},{key:"clearCloseTimeout",value:function(){null!==this.closeTimeout&&(window.clearTimeout(this.closeTimeout),this.closeTimeout=null)}},{key:"syncKeyboardViewport",value:function(){var e,t=window.visualViewport;if(this.container&&this.isOpen&&null===this.closeTimeout&&t){if(this.syncContainerBackdrop(),window.innerWidth>=775)return this.visualViewportBaselineHeight=t.height,this.visualViewportBaselineWidth=window.innerWidth,void this.updateKeyboardVisibility(!1,t.height);if(performance.now()<this.keyboardDismissalGuardUntil)this.updateKeyboardVisibility(!1,t.height);else{if(null===this.visualViewportBaselineWidth||Math.abs(this.visualViewportBaselineWidth-window.innerWidth)>2)return this.visualViewportBaselineWidth=window.innerWidth,this.visualViewportBaselineHeight=t.height,void this.updateKeyboardVisibility(!1,t.height);var n=null!==(e=this.visualViewportBaselineHeight)&&void 0!==e?e:t.height;this.visualViewportBaselineHeight=Math.max(n,t.height);var i=this.visualViewportBaselineHeight-t.height>100||performance.now()<this.keyboardOpeningGuardUntil;this.updateKeyboardVisibility(i,t.height)}}}},{key:"updateKeyboardVisibility",value:function(e,t){e&&this.isOpen&&!this.hasDrawerEntered&&(this.hasDrawerEntered=!0,this.syncContainerBackdrop());var n="number"==typeof t&&t>0?Math.round(t):null,i=e&&this.iframe?Math.max(0,Math.round(-this.iframe.getBoundingClientRect().top)):0;(this.isKeyboardVisible!==e||e&&(this.lastKeyboardViewportHeight!==n||this.lastKeyboardViewportOffsetTop!==i))&&(this.isKeyboardVisible=e,this.lastKeyboardViewportHeight=e?n:null,this.lastKeyboardViewportOffsetTop=i,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_KEYBOARD_VISIBILITY",payload:F({visible:e,viewportOffsetTop:i},null!==n&&{viewportHeight:n})}))}},{key:"syncContainerBackdrop",value:function(){var e,t,n=this.isOpen&&this.hasDrawerEntered&&window.innerWidth<775,i=n?this.isKeyboardVisible?"#fff":"linear-gradient(to bottom, transparent calc(2dvh + 16px), #fff 0)":"transparent";null===(e=this.container)||void 0===e||e.style.setProperty("background",i,"important"),null===(t=this.iframe)||void 0===t||t.style.setProperty("background",i,"important");var o=window.visualViewport,r=null!==this.hostCanvasStyles&&o&&null!==this.visualViewportBaselineHeight&&this.visualViewportBaselineHeight-o.height>100;this.syncHostCanvasBackdrop(n&&this.isIOSDevice()&&(this.isKeyboardVisible||!!r))}},{key:"syncHostCanvasBackdrop",value:function(e){var t;if(e){if(this.hostCanvasStyles)return;this.hostCanvasStyles=[];for(var n=0,i=[document.documentElement,document.body];n<i.length;n++)for(var o=i[n],r=0,a=[["background-color","#fff"],["background-image","none"]];r<a.length;r++){var s=L(a[r],2),l=s[0],u=s[1],d=o.style.getPropertyValue(l),c=o.style.getPropertyPriority(l);o.style.setProperty(l,u,"important"),this.hostCanvasStyles.push({element:o,property:l,value:d,priority:c,appliedValue:o.style.getPropertyValue(l)})}}else{var h,f=V(null!==(t=this.hostCanvasStyles)&&void 0!==t?t:[]);try{for(f.s();!(h=f.n()).done;){var g=h.value,m=g.element,p=g.property,v=g.value,y=g.priority,b=g.appliedValue;m.style.getPropertyValue(p)===b&&"important"===m.style.getPropertyPriority(p)&&(v?m.style.setProperty(p,v,y):m.style.removeProperty(p))}}catch(e){f.e(e)}finally{f.f()}this.hostCanvasStyles=null}}},{key:"createContainer",value:function(){this.container=document.createElement("div"),this.container.id=d,this.container.style.cssText="\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n z-index: 2147483647 !important;\n display: none;\n pointer-events: none;\n ",document.body.appendChild(this.container)}},{key:"createIframe",value:function(){var e=this;this.container&&this.config&&(this.iframe=document.createElement("iframe"),this.iframe.id=u,this.iframe.src=this.resolvedEmbedUrl,this.iframe.allow="payment",this.iframe.setAttribute("tabindex","-1"),this.iframe.style.cssText="\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n border: none !important;\n background: transparent !important;\n ",this.iframe.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation"),this.container.appendChild(this.iframe),document.activeElement===this.iframe&&this.iframe.blur(),this.iframe.onload=function(){e.log("Iframe loaded, waiting for HOLIDOIT_READY from embed")})}},{key:"createFloatingButton",value:function(){var e,t,n,i,o,r,a,s,l,u,d,c,h,f,g,m,p,v,y,b,w,_,k,S,O=this;if(this.config){var M=this.config.floatingButtonOptions;this.floatingButton=document.createElement("button"),this.floatingButton.id="holidoit-floating-button";var x=window.innerWidth,L=x<775,I=this.resolveFloatingButtonResponsiveOption(null==M||null===(e=M.desktop)||void 0===e?void 0:e.width,null==M||null===(t=M.mobile)||void 0===t?void 0:t.width,L?x-34:190),E=this.resolveFloatingButtonResponsiveOption(null==M||null===(n=M.desktop)||void 0===n?void 0:n.height,null==M||null===(i=M.mobile)||void 0===i?void 0:i.height,54),D=this.resolveFloatingButtonResponsiveOption(null==M||null===(o=M.desktop)||void 0===o?void 0:o.backgroundColor,null==M||null===(r=M.mobile)||void 0===r?void 0:r.backgroundColor,"#0f172a"),T=this.resolveFloatingButtonResponsiveOption(null==M||null===(a=M.desktop)||void 0===a?void 0:a.textColor,null==M||null===(s=M.mobile)||void 0===s?void 0:s.textColor,"white"),H=this.resolveFloatingButtonResponsiveOption(null==M||null===(l=M.desktop)||void 0===l?void 0:l.borderRounding,null==M||null===(u=M.mobile)||void 0===u?void 0:u.borderRounding,30),A=this.resolveFloatingButtonResponsiveOption(null==M||null===(d=M.desktop)||void 0===d?void 0:d.fontSize,null==M||null===(c=M.mobile)||void 0===c?void 0:c.fontSize,16),B=this.resolveFloatingButtonResponsiveOption(null==M||null===(h=M.desktop)||void 0===h?void 0:h.fontWeight,null==M||null===(f=M.mobile)||void 0===f?void 0:f.fontWeight,500),C=this.resolveFloatingButtonResponsiveOption(null==M||null===(g=M.desktop)||void 0===g?void 0:g.textCase,null==M||null===(m=M.mobile)||void 0===m?void 0:m.textCase,"none"),P=this.resolveFloatingButtonResponsiveOption(null==M||null===(p=M.desktop)||void 0===p?void 0:p.bottomPosition,null==M||null===(v=M.mobile)||void 0===v?void 0:v.bottomPosition,L?22:30),$=this.resolveFloatingButtonResponsiveOption(null==M||null===(y=M.desktop)||void 0===y?void 0:y.rightPosition,null==M||null===(b=M.mobile)||void 0===b?void 0:b.rightPosition,L?17:30),U=this.resolveFloatingButtonResponsiveOption(null==M||null===(w=M.desktop)||void 0===w?void 0:w.leftPosition,null==M||null===(_=M.mobile)||void 0===_?void 0:_.leftPosition,void 0),V=this.resolveFloatingButtonResponsiveOption(null==M||null===(k=M.desktop)||void 0===k?void 0:k.topPosition,null==M||null===(S=M.mobile)||void 0===S?void 0:S.topPosition,void 0),Y=Math.min((null==M?void 0:M.zIndex)||2147483646,2147483646),j=this.config.language||R.ITALIAN,F=this.getFloatingButtonCallToAction(j),W="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",N="#0f172a"===D?"#1e293b":D;this.floatingButton.style.cssText="\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 10px !important;\n position: fixed !important;\n z-index: ".concat(Y," !important;\n width: ").concat(I,"px !important;\n height: ").concat(E,"px !important;\n background: ").concat(D," !important;\n color: ").concat(T," !important;\n border: none !important;\n border-radius: ").concat(H,"px !important;\n font-size: ").concat(A,"px !important;\n font-weight: ").concat(B," !important;\n text-transform: ").concat("uppercase"===C?"uppercase":"capitalize"===C?"capitalize":"none"," !important;\n cursor: pointer !important;\n box-shadow: ").concat(W,' !important;\n padding: 12px 24px !important;\n font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;\n transform: scale(1) !important;\n ').concat(void 0!==P?"bottom: ".concat(P,"px !important;"):"","\n ").concat(void 0!==$?"right: ".concat($,"px !important;"):"","\n ").concat(void 0!==U?"left: ".concat(U,"px !important;"):"left: auto !important;","\n ").concat(void 0!==V?"top: ".concat(V,"px !important;"):"top: auto !important;","\n "),this.floatingButton.addEventListener("mouseenter",function(){O.floatingButton&&(O.floatingButton.style.background="".concat(N," !important"),O.floatingButton.style.boxShadow="".concat("0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"," !important"))}),this.floatingButton.addEventListener("mouseleave",function(){O.floatingButton&&(O.floatingButton.style.background="".concat(D," !important"),O.floatingButton.style.boxShadow="".concat(W," !important"),O.floatingButton.style.transform="scale(1) !important")}),this.floatingButton.addEventListener("mousedown",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(0.98) !important")}),this.floatingButton.addEventListener("mouseup",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(1) !important")});var z='<svg style="fill: '.concat(T,' !important;" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><path style="fill: ').concat(T,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(T," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(z," ").concat(F,"</span>"),this.floatingButton.addEventListener("click",function(){return O.open()}),this.isOpen&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),document.body.appendChild(this.floatingButton)}}},{key:"normalizeLanguage",value:function(e){if(!e)return null;var t=e.trim().toLowerCase();if(!t)return null;if(G.includes(t))return t;var n=t.split(/[-_]/)[0];return G.includes(n)?n:null}},{key:"getDocumentLanguage",value:function(){var e;return"undefined"==typeof document?null:this.normalizeLanguage(null===(e=document.documentElement)||void 0===e?void 0:e.lang)}},{key:"syncLanguageWithDocument",value:function(){var e;if(!this.hasExplicitLanguageSelection){var t=this.getDocumentLanguage();t&&this.isLanguageSupportedByEmbed(t)&&(null===(e=this.config)||void 0===e?void 0:e.language)!==t&&(this.applyLanguage(t,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",t))}}},{key:"isLanguageSupportedByEmbed",value:function(e){var t;if(!e)return!1;var n=null===(t=this.embedConfig)||void 0===t?void 0:t.languages;return Array.isArray(n)&&n.includes(e)}},{key:"observeDocumentLanguage",value:function(){var e=this;"undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&(this.htmlLangObserver&&this.htmlLangObserver.disconnect(),this.htmlLangObserver=new MutationObserver(function(t){var n,i=V(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("attributes"===o.type&&"lang"===o.attributeName)return void e.syncLanguageWithDocument()}}catch(e){i.e(e)}finally{i.f()}}),this.htmlLangObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))}},{key:"applyLanguage",value:function(e,t){t.markAsExplicit&&(this.hasExplicitLanguageSelection=!0),this.config&&(this.config.language=e),this.updateFloatingButtonText(e),t.syncEmbed&&this.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}})}},{key:"getFloatingButtonCallToAction",value:function(e){var t,n=null===(t=this.config)||void 0===t?void 0:t.floatingButtonOptions;return e===R.ITALIAN&&null!=n&&n.italianCallToAction?n.italianCallToAction:e===R.ENGLISH&&null!=n&&n.englishCallToAction?n.englishCallToAction:null!=n&&n.callToAction?n.callToAction:K[e]||K[R.ENGLISH]}},{key:"resolveFloatingButtonResponsiveOption",value:function(e,t,n){return window.innerWidth<775?void 0!==t?t:n:void 0!==e?e:n}},{key:"bindBookNowButtons",value:function(){var e=this,t=document.querySelectorAll(".book-now-button");if(0!==t.length){var n=0;t.forEach(function(t){var i=t,o="_holidoitClickBound";i[o]||(i[o]=!0,n++,i.addEventListener("click",function(t){var n;t.preventDefault(),t.stopPropagation();var o=i.getAttribute("data-product-number")||(null===(n=i.closest("[data-product-number]"))||void 0===n?void 0:n.getAttribute("data-product-number"))||"";e.log("Book now button clicked",{element:i.tagName,productNumber:o});var r=parseInt(o,10);setTimeout(function(){isNaN(r)?e.open():e.open({experienceId:r})},0)}))}),n>0&&this.log("Bound click handlers to ".concat(n," .book-now-button element(s)"))}}},{key:"observeForBookNowButtons",value:function(){var e=this;window._holidoitObserverActive||(window._holidoitObserverActive=!0,new MutationObserver(function(t){for(var n=!1,i=0;i<t.length;i++){var o=t[i];if("childList"===o.type)for(var r=0;r<o.addedNodes.length;r++){var a,s,l=o.addedNodes[r];if(l instanceof HTMLElement)if(null!==(a=l.classList)&&void 0!==a&&a.contains("book-now-button")||null!==(s=l.querySelector)&&void 0!==s&&s.call(l,".book-now-button")){n=!0;break}}if(n)break}n&&(e.log("Detected dynamically added .book-now-button elements, binding..."),e.bindBookNowButtons())}).observe(document.body,{childList:!0,subtree:!0}),this.log("MutationObserver active for .book-now-button elements"))}},{key:"parseHolidoitEmbedUrl",value:function(e){try{var t=new URL(e),n=t.hostname.replace(/^www\./,"");if("holidoit.com"!==n&&"holido.it"!==n)return null;var i=t.pathname.match(/^\/embed\/web\/([^/]+)\/?$/);if(!i)return null;var o=i[1],r=t.searchParams.get("experienceId"),a=r?parseInt(r,10):void 0;return{embedId:o,experienceId:a&&!isNaN(a)?a:void 0}}catch(e){return null}}},{key:"interceptHolidoitLinks",value:function(){var e=this;document.addEventListener("click",function(t){var n,i,o,r=null===(n=t.target)||void 0===n||null===(i=n.closest)||void 0===i?void 0:i.call(n,"a[href]");if(null!=r&&r.href){var a=e.parseHolidoitEmbedUrl(r.href);a&&a.embedId===(null===(o=e.config)||void 0===o?void 0:o.embedId)&&(t.preventDefault(),t.stopPropagation(),e.log("Intercepted holidoit embed link",a),a.experienceId?e.open({experienceId:a.experienceId}):e.open())}},!0)}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage),window.addEventListener("message",this.handleExternalMessage)}},{key:"getSenderIframe",value:function(e){if(!e)return null;for(var t=0,n=Array.from(document.querySelectorAll("iframe"));t<n.length;t++){var i=n[t];if(i.contentWindow===e)return i}return null}},{key:"isMessageFromOwnEmbedIframe",value:function(e){var t;return!(null===(t=this.iframe)||void 0===t||!t.contentWindow)&&e.source===this.iframe.contentWindow&&e.origin===this.embedOrigin}},{key:"isTrustedHolidoitOrigin",value:function(e){if(!e||"null"===e)return!1;if(e===this.embedOrigin)return!0;try{var t=new URL(e).hostname;return"localhost"===t||"127.0.0.1"===t||("holidoit.com"===t||t.endsWith(".holidoit.com")||"holido.it"===t||t.endsWith(".holido.it")||"holydoit.com"===t||t.endsWith(".holydoit.com"))}catch(e){return!1}}},{key:"extractAnalyticsPayload",value:function(e){var t=k(e);return t&&"embed"===t.source?t:(this.log("Ignoring invalid analytics message payload",e),null)}},{key:"handleAnalyticsMessage",value:function(e){var t=this.extractAnalyticsPayload(e);return!!t&&(_(t.eventData,t.dedupeKey)?(this.log("Pushed analytics event to dataLayer",t.dedupeKey,t.eventData),!0):(this.log("Ignoring duplicate analytics event",t.dedupeKey),!0))}},{key:"postMessage",value:function(e){var t;return null!==(t=this.iframe)&&void 0!==t&&t.contentWindow?this.isReady||"HOLIDOIT_INIT"===e.type?(this.log("Posting message to iframe",e),void this.iframe.contentWindow.postMessage(e,this.embedOrigin)):(this.log("Embed not ready, queueing message",e),void this.pendingMessages.push(e)):(this.log("Iframe not ready, queueing message",e),void this.pendingMessages.push(e))}},{key:"maybeSendInitMessage",value:function(){var e=this;if(this.hasReceivedEmbedReady&&this.embedConfigLoaded&&!this.isReady&&this.config){this.log("Embed and config are ready, sending HOLIDOIT_INIT");var t="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname;this.postMessage({type:"HOLIDOIT_INIT",payload:{embedId:this.config.embedId,language:this.config.language,floatingButton:this.config.floatingButton,floatingButtonOptions:this.config.floatingButtonOptions,parentOrigin:window.location.origin,parentUrl:window.location.href,isMobile:window.innerWidth<775,debug:this.config.debug||t}}),this.isReady=!0,this.pendingMessages.forEach(function(t){return e.postMessage(t)}),this.pendingMessages=[]}}},{key:"checkPaymentRedirect",value:function(){var e=this;if(N)this.log("Payment redirect already processed, skipping");else{var t=null,n=null,i=null;if(W)t=W.paymentIntent,n=W.redirectStatus,i=W.paymentIntentClientSecret,this.log("Using captured Stripe params",W);else{var o=new URLSearchParams(window.location.search);t=o.get("payment_intent"),n=o.get("redirect_status"),i=o.get("payment_intent_client_secret")}if(t&&n){this.log("Payment redirect detected",{paymentIntent:t,redirectStatus:n}),N=!0;var r=null;try{r=localStorage.getItem(h)}catch(e){this.log("localStorage not available (incognito mode?)",e)}if(r)try{var a=JSON.parse(r);this.log("Found payment session",a),this.open();this.isReady?e.postMessage({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}):this.pendingMessages.push({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}),this.cleanUrlParams();try{localStorage.removeItem(h)}catch(e){this.log("Failed to remove payment session from localStorage",e)}}catch(e){this.log("Failed to parse payment session",e)}else this.log("Payment redirect params found but no session - cleaning URL"),this.cleanUrlParams()}}}},{key:"cleanUrlParams",value:function(){var e=new URL(window.location.href);e.searchParams.delete("payment_intent"),e.searchParams.delete("payment_intent_client_secret"),e.searchParams.delete("redirect_status"),window.history.replaceState({},"",e.toString())}},{key:"getEmbedOrigin",value:function(e){try{return new URL(e).origin}catch(e){return window.location.origin}}},{key:"lockBodyScroll",value:function(){var e=this;if(this.scrollLockState)this.log("Scroll already locked, skipping");else{var t=this.getDocumentScrollRoot(),n=this.getScrollPosition(),i=n.top,o=n.left,r=this.getScrollbarWidth(),a={overflow:document.body.style.overflow,overscrollBehavior:document.body.style.overscrollBehavior,paddingRight:document.body.style.paddingRight,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,width:document.body.style.width},s={overflow:document.documentElement.style.overflow,overscrollBehavior:document.documentElement.style.overscrollBehavior};this.scrollLockState={mode:this.isIOSDevice()&&this.isDocumentScrollRoot(t)?"fixed-body":"document-overflow",scrollTop:i,scrollLeft:o,scrollbarWidth:r,bodyStyles:a,htmlStyles:s},document.documentElement.style.overflow="hidden",document.documentElement.style.overscrollBehavior="none",document.body.style.overflow="hidden",document.body.style.overscrollBehavior="none",r>0&&(document.body.style.paddingRight="".concat(r,"px")),"fixed-body"===this.scrollLockState.mode&&(document.body.style.position="fixed",document.body.style.top="-".concat(i,"px"),document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",this.touchMoveHandler=function(t){var n,i=t.target;null!==(n=e.container)&&void 0!==n&&n.contains(i)||t.preventDefault()},document.addEventListener("touchmove",this.touchMoveHandler,{passive:!1})),this.log("Scroll locked",{mode:this.scrollLockState.mode,scrollbarWidth:r})}}},{key:"unlockBodyScroll",value:function(){if(this.scrollLockState){var e=this.scrollLockState,t=e.mode,n=e.scrollTop,i=e.scrollLeft,o=e.bodyStyles,r=e.htmlStyles;document.body.style.overflow=o.overflow,document.body.style.overscrollBehavior=o.overscrollBehavior,document.body.style.paddingRight=o.paddingRight,document.documentElement.style.overflow=r.overflow,document.documentElement.style.overscrollBehavior=r.overscrollBehavior,"fixed-body"===t&&(document.body.style.position=o.position,document.body.style.top=o.top,document.body.style.left=o.left,document.body.style.right=o.right,document.body.style.width=o.width,this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)),this.restoreScrollPosition(n,i),this.scrollLockState=null,this.log("Scroll unlocked",{mode:t})}else this.log("Scroll not locked, skipping unlock")}},{key:"log",value:function(){var e,t="undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);if(null!==(e=this.config)&&void 0!==e&&e.debug||t){for(var n,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];(n=console).log.apply(n,["[Holidoit]"].concat(o))}}}]);var n,i}(),q=new J;function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var te="holidoitExperiencePageDrawerWidget",ne="holidoitWidget",ie={init:function(e){return q.init(e)},open:function(e){return q.open(e)},close:function(){return q.close()},toggle:function(e){return q.toggle(e)},changeLanguage:function(e){return q.changeLanguage(e)},destroy:function(){return q.destroy()},version:c},oe=function(){return a(function t(){var n=this;e(this,t),s(this,"config",null),s(this,"widgets",[]),s(this,"isInitialized",!1),s(this,"mutationObserver",null),s(this,"resizeObserver",null),s(this,"autoInsertedElement",null),s(this,"handleMessage",function(e){var t=e.data||{},i=t.type,o=t.height;if(i!==l)if("HOLIDOIT_WIDGET_RESIZE"!==i||"number"!=typeof o){if("HOLIDOIT_WIDGET_READY"===i){if(!n.findTrustedWidgetForEvent(e))return;n.log("Widget ready:",e.data)}}else{var r=n.findTrustedWidgetForEvent(e);if(!r)return;if(Math.abs(o-r.lastAppliedHeight)<15)return;requestAnimationFrame(function(){r.iframe.style.height="".concat(o,"px"),r.lastAppliedHeight=o,n.log("Resized widget to",o,"px")})}else n.handleAnalyticsMessage(e)})},[{key:"init",value:function(e){var t=this;if(e.embedId){if(this.isInitialized)return this.log("Already initialized, updating config"),this.config=ee(ee({},this.config),e),void this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets()});this.config=e,this.isInitialized=!0,this.log("Initializing experience page drawer loader",e),this.setupMessageListener(),this.setupResizeObserver(),this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets(),t.observeForWidgets()})}}},{key:"runWhenBodyReady",value:function(e){document.body?e():document.addEventListener("DOMContentLoaded",function(){e()},{once:!0})}},{key:"getHolidoitApi",value:function(){if("undefined"==typeof window)return ie;var e=window.Holidoit;return null!=e&&e.init&&null!=e&&e.open?e:ie}},{key:"initializeHolidoit",value:function(){if(this.config){var e,t=this.getHolidoitApi(),n=this.config.drawerLanguage||this.config.language;if("undefined"!=typeof window&&window.Holidoit!==ie&&document.getElementById(d))this.log("Holidoit drawer already initialized on page, reusing existing instance"),n&&(null===(e=t.changeLanguage)||void 0===e||e.call(t,n));else t.init({embedId:this.config.embedId,language:n,embedUrl:this.config.embedUrl,floatingButton:!1,debug:this.config.debug})}}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage)}},{key:"handleAnalyticsMessage",value:function(e){var t=this,n=this.findTrustedWidgetForEvent(e);!function(e){var t=e.event,n=e.isTrustedSource,i=e.widgetSrc,o=e.log;if(n){var r=k(t.data);r&&"widget"===r.source&&(_(r.eventData,r.dedupeKey)?null==o||o("Pushed analytics event to dataLayer",{dedupeKey:r.dedupeKey,widgetType:r.widgetType,src:i}):null==o||o("Skipped duplicate analytics event",r.dedupeKey))}else null==o||o("Ignored analytics message from untrusted iframe",t.origin)}({event:e,isTrustedSource:Boolean(n),widgetSrc:null==n?void 0:n.src,log:function(){return t.log.apply(t,arguments)}})}},{key:"findTrustedWidgetForEvent",value:function(e){return function(e){var t,n=e.widgets,i=e.event,o=e.getWidgetSrc,r=f(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a.iframe.contentWindow===i.source){var s=S(o(a));return s&&i.origin===s?a:null}}}catch(e){r.e(e)}finally{r.f()}return null}({widgets:this.widgets,event:e,getWidgetSrc:function(e){return e.src}})}},{key:"setupResizeObserver",value:function(){var e=this;this.resizeObserver=new ResizeObserver(function(t){var n,i=Z(t);try{for(i.s();!(n=i.n()).done;){var o,r=n.value.target,a=Z(e.widgets);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.element===r){var l;null===(l=s.iframe.contentWindow)||void 0===l||l.postMessage({type:"HOLIDOIT_REQUEST_HEIGHT"},"*");break}}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}})}},{key:"getWidgetElements",value:function(){var e=[],t=new Set;return document.querySelectorAll(".".concat(te)).forEach(function(n){var i=n;t.has(i)||(t.add(i),e.push(i))}),document.querySelectorAll(".".concat(ne)).forEach(function(n){var i=n;(i.dataset.src||"").includes("widget-experience-page-drawer.html")&&!t.has(i)&&(t.add(i),e.push(i))}),e}},{key:"ensureAutoInsertedPlaceholder",value:function(){var e,t;if(!1!==(null===(e=this.config)||void 0===e?void 0:e.autoInsertIfMissing)&&!(this.getWidgetElements().length>0||this.autoInsertedElement&&document.body.contains(this.autoInsertedElement))){var n=document.createElement("div");n.className=te;var i=null===(t=this.config)||void 0===t?void 0:t.scriptElement;null!=i&&i.parentNode&&i.parentElement!==document.head?i.parentNode.insertBefore(n,i.nextSibling):document.body.appendChild(n),this.autoInsertedElement=n,this.log("Auto-inserted .holidoitExperiencePageDrawerWidget placeholder")}}},{key:"resolveWidgetUrl",value:function(){var e,t;if(null!==(e=this.config)&&void 0!==e&&e.widgetUrl)return this.config.widgetUrl;if(null!==(t=this.config)&&void 0!==t&&t.scriptSrc)try{return new URL("./widget-experience-page-drawer.html",this.config.scriptSrc).toString()}catch(e){}return"https://cdn.holidoit.com/widgets/widget-experience-page-drawer.html"}},{key:"scanAndCreateWidgets",value:function(){this.ensureAutoInsertedPlaceholder();var e,t=Z(this.getWidgetElements());try{for(t.s();!(e=t.n()).done;){var n=e.value;"true"!==n.dataset.holidoitProcessed&&this.createWidget(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"applyWidgetParams",value:function(e,t){var n,i,o,r,a,s;null!==(n=this.config)&&void 0!==n&&n.embedId&&!e.searchParams.has("embedId")&&e.searchParams.set("embedId",this.config.embedId);var l=t.dataset.experienceId||t.dataset.productNumber,u=null!==(i=this.config)&&void 0!==i&&i.experienceId?String(this.config.experienceId):void 0,d=l||u;d&&!e.searchParams.has("experienceId")&&e.searchParams.set("experienceId",d);var c=t.dataset.language||(null===(o=this.config)||void 0===o?void 0:o.language);c&&!e.searchParams.has("lang")&&e.searchParams.set("lang",c);var h=t.dataset.showLanguagePicker,f=void 0===(null===(r=this.config)||void 0===r?void 0:r.showLanguagePicker)?void 0:String(this.config.showLanguagePicker),g=null!=h?h:f;void 0===g||e.searchParams.has("show_language_picker")||e.searchParams.set("show_language_picker",g);var m=t.dataset.withLogo,p=void 0===(null===(a=this.config)||void 0===a?void 0:a.withLogo)?void 0:String(this.config.withLogo),v=null!=m?m:p;void 0===v||e.searchParams.has("with_logo")||e.searchParams.set("with_logo",v);var y=t.dataset.gift,b=void 0===(null===(s=this.config)||void 0===s?void 0:s.gift)?void 0:String(this.config.gift),w=null!=y?y:b;void 0===w||e.searchParams.has("gift")||e.searchParams.set("gift",w)}},{key:"createWidget",value:function(e){var t,n,i=e.dataset.src;i||(i=this.resolveWidgetUrl());try{n=new URL(M(i),window.location.href)}catch(e){return}this.applyWidgetParams(n,e);var o=document.createElement("iframe");o.className="holidoit-experience-page-drawer-iframe",o.src=n.toString(),o.allow="payment",o.setAttribute("scrolling","auto"),o.setAttribute("frameborder","0"),o.style.cssText="\n width: 100% !important;\n min-height: ".concat(600,"px !important;\n border: none !important;\n display: block !important;\n "),o.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"),e.innerHTML="",e.appendChild(o),e.dataset.holidoitProcessed="true";var r={element:e,iframe:o,src:n.toString(),lastAppliedHeight:600};this.widgets.push(r),null===(t=this.resizeObserver)||void 0===t||t.observe(e),this.log("Created experience page drawer widget",r)}},{key:"observeForWidgets",value:function(){var e=this;this.mutationObserver||(this.mutationObserver=new MutationObserver(function(t){var n,i=!1,o=Z(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if("childList"===r.type){for(var a=0,s=Array.from(r.addedNodes);a<s.length;a++){var l,u,d,c,h=s[a];if(h instanceof HTMLElement&&(null!==(l=h.classList)&&void 0!==l&&l.contains(te)||null!==(u=h.querySelector)&&void 0!==u&&u.call(h,".".concat(te))||null!==(d=h.matches)&&void 0!==d&&d.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]'))||null!==(c=h.querySelector)&&void 0!==c&&c.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]')))){i=!0;break}}if(i)break}}}catch(e){o.e(e)}finally{o.f()}i&&(e.log("Detected new experience page drawer widget elements, scanning..."),e.scanAndCreateWidgets())}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}},{key:"changeLanguage",value:function(e){var t;this.config&&(this.config.language=e,this.config.drawerLanguage=e);var n=this.getHolidoitApi();null===(t=n.changeLanguage)||void 0===t||t.call(n,e);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r;null===(r=i.value.iframe.contentWindow)||void 0===r||r.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}},"*")}}catch(e){o.e(e)}finally{o.f()}}},{key:"destroy",value:function(){var e,t,n;this.log("Destroying experience page drawer widgets"),window.removeEventListener("message",this.handleMessage);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r=i.value;r.iframe.remove(),r.element.dataset.holidoitProcessed="false"}}catch(e){o.e(e)}finally{o.f()}this.widgets=[],null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=null,this.isInitialized=!1,this.config=null,null!==(n=this.autoInsertedElement)&&void 0!==n&&n.parentNode&&this.autoInsertedElement.parentNode.removeChild(this.autoInsertedElement),this.autoInsertedElement=null}},{key:"log",value:function(){var e;if(null!==(e=this.config)&&void 0!==e&&e.debug){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];(t=console).log.apply(t,["[HolidoitExperiencePageDrawer]"].concat(i))}}}])}(),re=new oe;if("undefined"!=typeof window){window.Holidoit||(window.Holidoit=ie);var ae=document.currentScript;if(ae){var se=new URL(ae.src,window.location.href),le=se.searchParams.get("embedId")||ae.dataset.embedId;if(le){var ue=se.searchParams.get("lang")||ae.dataset.language,de=se.searchParams.get("drawerLang")||ae.dataset.drawerLang||ae.dataset.drawerLanguage||ue,ce=se.searchParams.get("experienceId")||se.searchParams.get("productNumber")||ae.dataset.experienceId||ae.dataset.productNumber,he=parseInt(ce||"",10),fe=se.searchParams.get("show_language_picker")||se.searchParams.get("showLanguagePicker")||ae.dataset.showLanguagePicker,ge=null==fe?void 0:"false"!==fe,me=se.searchParams.get("with_logo")||se.searchParams.get("withLogo")||ae.dataset.withLogo,pe=null==me?void 0:"true"===me,ve=se.searchParams.get("gift")||ae.dataset.gift,ye=null==ve?void 0:"true"===ve;re.init({embedId:le,language:ue,drawerLanguage:de,experienceId:Number.isNaN(he)?void 0:he,embedUrl:se.searchParams.get("embedUrl")||ae.dataset.embedUrl||void 0,widgetUrl:se.searchParams.get("widgetUrl")||ae.dataset.widgetUrl||void 0,showLanguagePicker:ge,withLogo:pe,gift:ye,debug:"true"===se.searchParams.get("debug")||"true"===ae.dataset.debug,autoInsertIfMissing:"false"!==(se.searchParams.get("autoInsertIfMissing")||ae.dataset.autoInsertIfMissing),scriptSrc:ae.src,scriptElement:ae})}}window.HolidoitExperiencePageDrawer=re}})(),i})());
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see inline-book-now-loader.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitInlineBookNow",[],t):"object"==typeof exports?exports.HolidoitInlineBookNow=t():e.HolidoitInlineBookNow=t()}(this,()=>(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},317:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return n.default.locale(r,null,!0),r}(n(353))},353:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,v={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("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),o=n-i<0,a=t.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:u,d:s,D:f,h:a,m:o,s:i,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",_={};_[b]=v;var w="$isDayjsObject",M=function(e){return e instanceof $||!(!e||!e[w])},S=function e(t,n,r){var i;if(!t)return b;if("string"==typeof t){var o=t.toLowerCase();_[o]&&(i=o),n&&(_[o]=n,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;_[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},x=function(e,t){if(M(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new $(n)},k=y;k.l=S,k.i=M,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var $=function(){function v(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.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()},g.$utils=function(){return k},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return k.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!k.u(t)||t,c=k.p(e),h=function(e,t){var i=k.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return k.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,v=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?h(1,0):h(31,11);case l:return r?h(1,v):h(0,v+1);case u:var b=this.$locale().weekStart||0,_=(p<b?p+7:p)-b;return h(r?g-_:g+(6-_),v);case s:case f:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case o:return m(y+"Seconds",2);case i:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=k.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[a]=c+"Hours",n[o]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===s?this.$D+(t-this.$W):t;if(u===l||u===d){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[k.p(e)]()},g.add=function(r,c){var f,h=this;r=Number(r);var m=k.p(c),p=function(e){var t=x(h);return k.w(t.date(t.date()+Math.round(e*r)),h)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return p(1);if(m===u)return p(7);var v=(f={},f[o]=t,f[a]=n,f[i]=e,f)[m]||1,g=this.$d.getTime()+r*v;return k.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=k.z(this),o=this.$H,a=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,d=function(e,n,i,o){return e&&(e[n]||e(t,r))||i[n].slice(0,o)},f=function(e){return k.s(o%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return s+1;case"MM":return k.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,l,3);case"MMMM":return d(l,s);case"D":return t.$D;case"DD":return k.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,u,2);case"ddd":return d(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(o);case"HH":return k.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,a,!0);case"A":return m(o,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,h){var m,p=this,v=k.p(f),g=x(r),y=(g.utcOffset()-this.utcOffset())*t,b=this-g,_=function(){return k.m(p,g)};switch(v){case d:m=_()/12;break;case l:m=_();break;case c:m=_()/3;break;case u:m=(b-y)/6048e5;break;case s:m=(b-y)/864e5;break;case a:m=b/n;break;case o:m=b/t;break;case i:m=b/e;break;default:m=b}return h?m:k.a(m)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return _[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return k.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),D=$.prototype;return x.prototype=D,[["$ms",r],["$s",i],["$m",o],["$H",a],["$W",s],["$M",l],["$y",d],["$D",f]].forEach(function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,$,x),e.$i=!0),x},x.locale=S,x.isDayjs=M,x.unix=function(e){return x(1e3*e)},x.en=_[b],x.Ls=_,x.p={},x}()},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},445:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,o){var a=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=a.utcOffset;a.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var i=(""+r[0]).match(n)||["-",0,0],o=i[0],a=60*+i[1]+ +i[2];return 0===a?0:"+"===o?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r;if(0===a)return this.utc(i);var s=this.clone();if(i)return s.$offset=a,s.$u=!1,s;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u,s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=o(e).local();return f.call(r,i,t,n)}}}()},494:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function i(e,t,n){var i=r[n];return Array.isArray(i)&&(i=i[t?0:1]),i.replace("%d",e)}var o={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i}};return n.default.locale(o,null,!0),o}(n(353))},546:e=>{function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var o,a=function(e,n,r){void 0===r&&(r={});var i=new Date(e),o=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",i=e+"|"+r,o=t[i];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[i]=o),o}(n,r);return o.formatToParts(i)},s=function(t,n){for(var r=a(t,n),o=[],s=0;s<r.length;s+=1){var u=r[s],l=u.type,c=u.value,d=e[l];d>=0&&(o[d]=parseInt(c,10))}var f=o[3],h=24===f?0:f,m=o[0]+"-"+o[1]+"-"+o[2]+" "+h+":"+o[4]+":"+o[5]+":000",p=+t;return(i.utc(m).valueOf()-(p-=p%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),u=Math.round((a-new Date(s))/1e3/60),l=15*-Math.round(a.getTimezoneOffset()/15)-u;if(Number(l)){if(n=i(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=n.utcOffset();n=n.add(r-c,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,a=n||t||o,u=s(+i(),a);if("string"!=typeof e)return i(e).tz(a);var l=function(e,t,n){var r=e-60*t*1e3,i=s(r,n);if(t===i)return[r,t];var o=s(r-=60*(i-t)*1e3,n);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,r).valueOf(),u,a),c=l[0],d=l[1],f=i(c).utcOffset(d);return f.$x.$timezone=a,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}}}()},579:(e,t,n)=>{var r=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var r=n(172),i=n(993),o=n(869),a=n(887),s=n(791),u=n(373),l=n(579);function c(){"use strict";var t=i(),n=t.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var h={throw:1,return:2,break:3,continue:3};function m(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,h[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,l(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,n,r,i){return t.w(m(e),n,r,i&&i.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,i){return(f(t)?a:o)(m(e),t,n,r,i)},keys:u,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var r=n(633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},791:(e,t,n)=>{var r=n(172),i=n(546);e.exports=function e(t,n){function o(e,i,a,s){try{var u=t[e](i),l=u.value;return l instanceof r?n.resolve(l.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):n.resolve(l).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){o(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},813:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return e+(1===e?"er":"")}};return n.default.locale(r,null,!0),r}(n(353))},826:function(e){e.exports=function(){"use strict";return{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("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}}()},840:function(e){e.exports=function(){"use strict";return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},o=function(e,t,n,r,o){var a=e.name?e:e.$locale(),s=i(a[t]),u=i(a[n]),l=s||u.map(function(e){return e.slice(0,r)});if(!o)return l;var c=a.weekStart;return l.map(function(e,t){return l[(t+(c||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},u=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):o(e,"months")},monthsShort:function(t){return t?t.format("MMM"):o(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):o(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):o(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):o(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return u.bind(this)()},n.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return o(a(),"months")},n.monthsShort=function(){return o(a(),"monthsShort","months",3)},n.weekdays=function(e){return o(a(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return o(a(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return o(a(),"weekdaysMin","weekdays",2,e)}}}()},869:(e,t,n)=>{var r=n(887);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var r=n(993),i=n(791);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},900:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return n.default.locale(r,null,!0),r}(n(353))},993:(e,t,n)=>{var r=n(546);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(e,i,o,a){var s=i&&i.prototype instanceof c?i:c,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,i){var o,a,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,s=t,f.n=n,l}};function h(e,r){for(a=e,s=r,n=0;!d&&u&&!i&&n<c.length;n++){var i,o=c[n],h=f.p,m=o[2];e>3?(i=m===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=e<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<m&&(i=e<3||o[0]>r||r>m)&&(o[4]=e,o[5]=r,f.n=m,a=0))}if(i||e>1)return l;throw d=!0,r}return function(i,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,m),a=c,s=m;(n=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,s)):f.n=s:f.v=s);try{if(u=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(d=f.n<0)?s:e.call(r,f))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:n,done:d}}}(e,o,a),!0),u}var l={};function c(){}function d(){}function f(){}n=Object.getPrototypeOf;var h=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),m=f.prototype=c.prototype=Object.create(h);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e}return d.prototype=f,r(m,"constructor",f),r(f,"constructor",d),d.displayName="GeneratorFunction",r(f,s,"GeneratorFunction"),r(m),r(m,s,"Generator"),r(m,a,function(){return this}),r(m,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function e(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(i,o){var a=t.apply(n,r);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)})}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(r),n.d(r,{holidoitInlineBookNowLoader:()=>P});var u=n(756),l=n.n(u),c="HOLIDOIT_ANALYTICS_EVENT";function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h="holidoit_analytics_dedupe_keys",m=new Set;function p(e){return"object"===i(e)&&null!==e&&!Array.isArray(e)}function v(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(e){return null}}function g(){var e=v();if(!e)return[];try{var t=e.getItem(h);if(!t)return[];var n=JSON.parse(t);return Array.isArray(n)?n.filter(function(e){return"string"==typeof e&&e.length>0}):[]}catch(e){return[]}}function y(e){if(e){m.add(e);var t=g().filter(function(t){return t!==e});t.push(e),function(e){var t=v();if(t)try{t.setItem(h,JSON.stringify(e.slice(-200)))}catch(e){}}(t)}}function b(e,t){return"undefined"!=typeof window&&(!function(e){return!(!e||!m.has(e)&&(!g().includes(e)||(m.add(e),0)))}(t)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),y(t),window.dataLayer.push(e),!0))}function _(e){if(!p(e)||e.type!==c)return null;var t,n=p(e.payload)?e.payload:e,r=n.channel,i=n.dedupeKey,o=n.eventData,a=n.source,s=n.widgetType;return"dataLayer"!==r||"embed"!==a&&"widget"!==a||"string"!=typeof i||""===i.trim()||(!p(t=o)||"string"!=typeof t.event||""===t.event.trim())?null:{channel:r,dedupeKey:i.trim(),eventData:o,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}function w(e){try{return new URL(e,window.location.href).origin}catch(e){return null}}var M=new Set(["holidoit.js","embed.html","payment-redirect.html","widgets/widget-book-now-button.html","widgets/widget-booking-box.html","widgets/widget-experience.html","widgets/widget-experience-grid.html","widgets/widget-experience-grid-drawer.html","widgets/widget-experience-page-drawer.html"]);function S(e){try{var t=new URL(e,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(t.origin!==n.origin||!t.pathname.startsWith(n.pathname))return e;var r=t.pathname.slice(n.pathname.length);return M.has(r)?(t.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20260928135224166-07fe438b66bb-26ef6a21","/").concat(r),t.toString()):e}catch(t){return e}}var x=n(353),k=n.n(x),$=(n(494),n(826),n(317),n(813),n(900),n(840)),D=n.n($),I=n(569),L=n.n(I),O=n(445),T=n.n(O);k().extend(T()),k().extend(L()),k().extend(D());var A=function(e){return e.ITALIAN="it",e.ENGLISH="en",e.SPANISH="es",e.FRENCH="fr",e.GERMAN="de",e}({});k()().locale("it").localeData().months(),k()().locale("it").localeData().weekdays(),k()().locale("en").localeData().months(),k()().locale("en").localeData().weekdays(),k()().locale("de").localeData().months(),k()().locale("de").localeData().weekdays(),k()().locale("es").localeData().months(),k()().locale("es").localeData().weekdays(),k()().locale("fr").localeData().months(),k()().locale("fr").localeData().weekdays();function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return H(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var C="holidoitBookNowWidget",N="holidoit-loader-container",F=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"config",null),s(this,"widgets",[]),s(this,"isInitialized",!1),s(this,"observer",null),s(this,"theme",{backgroundColor:"#0f172a",textColor:"white",callToAction:"Book now"}),s(this,"resolvedFloatingButtonOptions",void 0),s(this,"autoInsertedElement",null),s(this,"reopenFrameId",null),s(this,"handleMessage",function(e){var n=e.data||{},r=n.type,i=n.height,o=n.experienceId;if(r&&"string"==typeof r)if(r!==c)if("HOLIDOIT_WIDGET_RESIZE"!==r||"number"!=typeof i){if("HOLIDOIT_WIDGET_BOOK_NOW_CLICK"===r){var a=t.findTrustedWidgetForEvent(e);if(!a)return;var s=parseInt(String(null!=o?o:""),10),u=Number.isNaN(s)?a.experienceId:s;t.openDrawer(u)}}else{var l=t.findTrustedWidgetForEvent(e);if(!l)return;var d=Math.max(72,Math.ceil(i));l.iframe.style.height="".concat(d,"px")}else t.handleAnalyticsMessage(e)})},n=[{key:"init",value:function(e){if(e.embedId){if(this.isInitialized)return this.log("Already initialized, updating config"),void(this.config=E(E({},this.config),e));this.config=e,this.isInitialized=!0,this.log("Initializing inline book now loader",e),this.setupMessageListener(),this.bootstrap()}}},{key:"bootstrap",value:(u=t(l().mark(function e(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.ensureHolidoitApi();case 1:return e.sent&&this.initializeHolidoit(),e.next=2,this.resolveThemeFromEmbedConfig();case 2:this.scanAndCreateWidgets(),this.observeForWidgets();case 3:case"end":return e.stop()}},e,this)})),function(){return u.apply(this,arguments)})},{key:"getHolidoitApi",value:function(){return"undefined"==typeof window?null:window.Holidoit||null}},{key:"ensureHolidoitApi",value:(o=t(l().mark(function e(){var t,n,r,i,o,a,s;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.getHolidoitApi()){e.next=1;break}return e.abrupt("return",!0);case 1:if(!1!==(null===(t=this.config)||void 0===t?void 0:t.includeLoader)){e.next=2;break}return this.log("includeLoader=false and Holidoit API not found"),e.abrupt("return",!1);case 2:n=this.getLoaderSourceCandidates(),r=Y(n),e.prev=3,r.s();case 4:if((i=r.n()).done){e.next=10;break}return o=i.value,e.prev=5,this.log("Attempting to load Holidoit loader from",o),e.next=6,this.loadExternalScript(o);case 6:if(!this.getHolidoitApi()){e.next=7;break}return this.log("Holidoit API loaded successfully"),e.abrupt("return",!0);case 7:e.next=9;break;case 8:e.prev=8,a=e.catch(5),this.log("Failed loading Holidoit loader from",o,a);case 9:e.next=4;break;case 10:e.next=12;break;case 11:e.prev=11,s=e.catch(3),r.e(s);case 12:return e.prev=12,r.f(),e.finish(12);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}},e,this,[[3,11,12,13],[5,8]])})),function(){return o.apply(this,arguments)})},{key:"getLoaderSourceCandidates",value:function(){var e,t,n=[],r=null===(e=this.config)||void 0===e?void 0:e.loaderSrc,i=null===(t=this.config)||void 0===t?void 0:t.scriptSrc;if(r&&n.push(r),i)try{n.push(new URL("../holidoit.js",i).toString())}catch(e){}return n.push("https://cdn.holidoit.com/holidoit.js"),Array.from(new Set(n.map(S)))}},{key:"loadExternalScript",value:function(e){var t=this;return new Promise(function(n,r){if(e){var i=Array.from(document.querySelectorAll("script")).find(function(t){return t.src===e});if(i)return t.getHolidoitApi()?void n():(i.addEventListener("load",function(){return n()},{once:!0}),void i.addEventListener("error",function(){return r(new Error("Failed to load script: ".concat(e)))},{once:!0}));var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){return n()},o.onerror=function(){return r(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}else r(new Error("Missing script src"))})}},{key:"initializeHolidoit",value:function(){var e=this.getHolidoitApi();if(null!=e&&e.init&&this.config){var t,n=this.config.drawerLanguage||this.config.language;document.getElementById(N)?(this.log("Holidoit drawer already initialized on page, reusing existing instance"),n&&(null===(t=e.changeLanguage)||void 0===t||t.call(e,n))):e.init({embedId:this.config.embedId,language:n,embedUrl:this.config.embedUrl,floatingButton:!1,debug:this.config.debug})}}},{key:"resolveThemeFromEmbedConfig",value:(i=t(l().mark(function e(){var t,n,r,i,o,a;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.config)&&void 0!==t&&t.embedId){e.next=1;break}return e.abrupt("return");case 1:return e.prev=1,e.next=2,fetch("".concat("https://engine.holydoit.com","/partner/v0/embed-config/").concat(this.config.embedId,"/get"),{method:"GET",headers:{"Content-Type":"application/json"}});case 2:if((n=e.sent).ok){e.next=3;break}throw new Error("Failed to fetch embed config: ".concat(n.status));case 3:return e.next=4,n.json();case 4:r=e.sent,i=r.floating_button_config,this.resolvedFloatingButtonOptions=i,o=this.config.language||r.language||A.ENGLISH,this.theme={backgroundColor:this.getResponsiveColor(i,"backgroundColor","#0f172a"),textColor:this.getResponsiveColor(i,"textColor","white"),callToAction:this.resolveCallToAction(i,o)},this.log("Resolved inline button theme from embed config",this.theme),e.next=6;break;case 5:e.prev=5,a=e.catch(1),this.log("Failed to resolve theme from embed config, using defaults",a);case 6:case"end":return e.stop()}},e,this,[[1,5]])})),function(){return i.apply(this,arguments)})},{key:"getResponsiveColor",value:function(e,t,n){var r,i;return window.innerWidth<775?(null==e||null===(i=e.mobile)||void 0===i?void 0:i[t])||n:(null==e||null===(r=e.desktop)||void 0===r?void 0:r[t])||n}},{key:"resolveCallToAction",value:function(e,t){var n=s(s(s(s(s({},A.ITALIAN,"Prenota ora"),A.ENGLISH,"Book now"),A.SPANISH,"Reservar ahora"),A.FRENCH,"Reserver maintenant"),A.GERMAN,"Jetzt buchen");return t===A.ITALIAN&&null!=e&&e.italianCallToAction?e.italianCallToAction:t===A.ENGLISH&&null!=e&&e.englishCallToAction?e.englishCallToAction:null!=e&&e.callToAction?e.callToAction:n[t]||n[A.ENGLISH]}},{key:"scanAndCreateWidgets",value:function(){var e=this,t=Array.from(document.querySelectorAll(".".concat(C))).filter(function(e){return"true"!==e.dataset.holidoitProcessed});if(0===t.length){var n=this.insertAutoPlaceholderIfMissing();n&&t.push(n)}t.forEach(function(t){var n=t;e.createWidget(n)})}},{key:"insertAutoPlaceholderIfMissing",value:function(){var e,t;if(!1===(null===(e=this.config)||void 0===e?void 0:e.autoInsertIfMissing))return null;if(this.autoInsertedElement&&document.contains(this.autoInsertedElement))return this.autoInsertedElement;var n=document.createElement("div");n.className=C,n.dataset.holidoitAutoInserted="true";var r=null===(t=this.config)||void 0===t?void 0:t.scriptElement;if(r&&document.contains(r))if(r.parentElement===document.head){if(!document.body)return null;document.body.insertAdjacentElement("afterbegin",n)}else r.insertAdjacentElement("afterend",n);else{if(!document.body)return null;document.body.insertAdjacentElement("afterbegin",n)}return this.autoInsertedElement=n,this.log("Auto-inserted inline book now placeholder"),n}},{key:"createWidget",value:function(e){e.dataset.holidoitProcessed="true";var t=this.getElementExperienceId(e),n=this.buildWidgetUrl(e,t),r=document.createElement("iframe");r.className="holidoit-book-now-widget-iframe",r.src=n,r.setAttribute("scrolling","no"),r.setAttribute("frameborder","0"),r.style.cssText="\n width: 100% !important;\n min-height: ".concat(72,"px !important;\n border: none !important;\n display: block !important;\n background: transparent !important;\n "),r.setAttribute("sandbox","allow-scripts allow-same-origin"),e.innerHTML="",e.appendChild(r),this.widgets.push({element:e,iframe:r,experienceId:t}),this.log("Created inline book now widget",{experienceId:t,src:n})}},{key:"getElementExperienceId",value:function(e){var t,n=e.getAttribute("data-experience-id")||e.getAttribute("data-product-number")||(null!==(t=this.config)&&void 0!==t&&t.defaultExperienceId?String(this.config.defaultExperienceId):""),r=parseInt(n,10);return Number.isNaN(r)?void 0:r}},{key:"buildWidgetUrl",value:function(e,t){var n,r=e.dataset.src||(null===(n=this.config)||void 0===n?void 0:n.widgetUrl)||this.getDefaultWidgetUrl()||"/widgets/widget-book-now-button.html",i=new URL(S(r),window.location.href);return i.searchParams.set("cta",this.theme.callToAction),i.searchParams.set("backgroundColor",this.theme.backgroundColor),i.searchParams.set("textColor",this.theme.textColor),void 0!==t&&i.searchParams.set("experienceId",String(t)),i.toString()}},{key:"getDefaultWidgetUrl",value:function(){var e;if(null===(e=this.config)||void 0===e||!e.scriptSrc)return null;try{return new URL("./widget-book-now-button.html",this.config.scriptSrc).toString()}catch(e){return null}}},{key:"observeForWidgets",value:function(){var e=this;this.observer||(this.observer=new MutationObserver(function(t){var n,r=!1,i=Y(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("childList"===o.type)for(var a=0;a<o.addedNodes.length;a++){var s,u,l=o.addedNodes[a];if(l instanceof HTMLElement&&(null!==(s=l.classList)&&void 0!==s&&s.contains(C)||null!==(u=l.querySelector)&&void 0!==u&&u.call(l,".".concat(C)))){r=!0;break}}if(r)break}}catch(e){i.e(e)}finally{i.f()}r&&(e.log("Detected dynamically added book-now widget, rescanning..."),e.scanAndCreateWidgets())}),this.observer.observe(document.body,{childList:!0,subtree:!0}))}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage)}},{key:"handleAnalyticsMessage",value:function(e){var t=this,n=this.findTrustedWidgetForEvent(e);!function(e){var t=e.event,n=e.isTrustedSource,r=e.widgetSrc,i=e.log;if(n){var o=_(t.data);o&&"widget"===o.source&&(b(o.eventData,o.dedupeKey)?null==i||i("Pushed analytics event to dataLayer",{dedupeKey:o.dedupeKey,widgetType:o.widgetType,src:r}):null==i||i("Skipped duplicate analytics event",o.dedupeKey))}else null==i||i("Ignored analytics message from untrusted iframe",t.origin)}({event:e,isTrustedSource:Boolean(n),widgetSrc:null==n?void 0:n.iframe.src,log:function(){return t.log.apply(t,arguments)}})}},{key:"findTrustedWidgetForEvent",value:function(e){return function(e){var t,n=e.widgets,r=e.event,i=e.getWidgetSrc,o=d(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(a.iframe.contentWindow===r.source){var s=w(i(a));return s&&r.origin===s?a:null}}}catch(e){o.e(e)}finally{o.f()}return null}({widgets:this.widgets,event:e,getWidgetSrc:function(e){return e.iframe.src}})}},{key:"openDrawer",value:function(e){var t,n=this,r=this.getHolidoitApi();if(null!=r&&r.open&&null!==(t=this.config)&&void 0!==t&&t.embedId){var i=this.config.drawerLanguage||this.config.language,o=void 0!==e?{embedId:this.config.embedId,experienceId:e}:{embedId:this.config.embedId};r.open(o),i&&setTimeout(function(){var e;null===(e=r.changeLanguage)||void 0===e||e.call(r,i)},0),void 0!==e&&(null!==this.reopenFrameId&&(window.cancelAnimationFrame(this.reopenFrameId),this.reopenFrameId=null),this.reopenFrameId=window.requestAnimationFrame(function(){n.reopenFrameId=window.requestAnimationFrame(function(){n.reopenFrameId=null,n.isDrawerVisible()&&r.open(o)})}))}}},{key:"isDrawerVisible",value:function(){var e=document.getElementById(N);if(!e)return!1;if(e instanceof HTMLElement&&"none"===e.style.display)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility}},{key:"changeLanguage",value:function(e){var t;if(this.config){this.config.language=e,this.config.drawerLanguage=e,this.theme.callToAction=this.resolveCallToAction(this.resolvedFloatingButtonOptions,e);var n=this.getHolidoitApi();null==n||null===(t=n.changeLanguage)||void 0===t||t.call(n,e);var r,i=Y(this.widgets);try{for(i.s();!(r=i.n()).done;){var o;null===(o=r.value.iframe.contentWindow)||void 0===o||o.postMessage({type:"HOLIDOIT_WIDGET_BUTTON_THEME",payload:{cta:this.theme.callToAction,backgroundColor:this.theme.backgroundColor,textColor:this.theme.textColor}},"*")}}catch(e){i.e(e)}finally{i.f()}}}},{key:"destroy",value:function(){var e;null!==this.reopenFrameId&&(window.cancelAnimationFrame(this.reopenFrameId),this.reopenFrameId=null),null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null,window.removeEventListener("message",this.handleMessage);var t,n=Y(this.widgets);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.iframe.remove(),r.element.dataset.holidoitProcessed="false"}}catch(e){n.e(e)}finally{n.f()}this.widgets=[],this.config=null,this.isInitialized=!1,this.resolvedFloatingButtonOptions=void 0,this.autoInsertedElement=null}},{key:"log",value:function(){var e;if(null!==(e=this.config)&&void 0!==e&&e.debug){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).log.apply(t,["[HolidoitInlineBookNow]"].concat(r))}}}],n&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,i,o,u}(),P=new F;if("undefined"!=typeof window){var U=document.currentScript;if(U){var W=new URL(U.src,window.location.href),z=W.searchParams.get("embedId")||U.dataset.embedId;if(z){var R=W.searchParams.get("lang")||U.dataset.language,B=W.searchParams.get("drawerLang")||U.dataset.drawerLang||U.dataset.drawerLanguage||R,J=W.searchParams.get("includeLoader")||U.dataset.includeLoader,G=null==J?void 0:"false"!==J,Z=W.searchParams.get("experienceId")||U.dataset.experienceId,q=parseInt(Z||"",10);P.init({embedId:z,language:R,drawerLanguage:B,debug:"true"===W.searchParams.get("debug")||"true"===U.dataset.debug,includeLoader:G,loaderSrc:W.searchParams.get("loaderSrc")||U.dataset.loaderSrc||void 0,embedUrl:W.searchParams.get("embedUrl")||U.dataset.embedUrl||void 0,widgetUrl:W.searchParams.get("widgetUrl")||U.dataset.widgetUrl||void 0,defaultExperienceId:Number.isNaN(q)?void 0:q,autoInsertIfMissing:"false"!==(W.searchParams.get("autoInsertIfMissing")||U.dataset.autoInsertIfMissing),scriptSrc:U.src,scriptElement:U})}}window.HolidoitInlineBookNow=P}})(),r})());
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!doctype html><html lang="it"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta http-equiv="X-UA-Compatible" content="ie=edge"/><title>Holidoit Book Now Button</title><style>*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
html,
|
|
10
|
+
body {
|
|
11
|
+
width: 100%;
|
|
12
|
+
min-height: 100%;
|
|
13
|
+
background: transparent;
|
|
14
|
+
font-family:
|
|
15
|
+
'Google Sans',
|
|
16
|
+
-apple-system,
|
|
17
|
+
BlinkMacSystemFont,
|
|
18
|
+
'Segoe UI',
|
|
19
|
+
Roboto,
|
|
20
|
+
'Helvetica Neue',
|
|
21
|
+
Arial,
|
|
22
|
+
sans-serif;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#holidoit-widget-root {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}</style></head><body><div id="holidoit-widget-root"></div><script defer="defer" src="./widget-book-now-button.js"></script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitBookNowButtonWidget",[],t):"object"==typeof exports?exports.HolidoitBookNowButtonWidget=t():e.HolidoitBookNowButtonWidget=t()}(this,()=>(()=>{var e,t=document.getElementById("holidoit-widget-root"),n=null,o="holidoit-calendar-icon",i="holidoit-cta-label";function a(){var e=Math.ceil(document.body.getBoundingClientRect().height);window.parent.postMessage({type:"HOLIDOIT_WIDGET_RESIZE",height:e},"*")}function c(){if(t){var c,r,s=(c=new URLSearchParams(window.location.search),r=parseInt(c.get("experienceId")||"",10),e=Number.isNaN(r)?void 0:r,{cta:c.get("cta")||"Book now",backgroundColor:c.get("backgroundColor")||"#0f172a",textColor:c.get("textColor")||"white"}),d=s.cta,l=s.backgroundColor,p=s.textColor;(n=document.createElement("button")).type="button",n.innerHTML='<span style="display:inline-flex;align-items:center;gap:10px;"><span class="'.concat(o,'" style="display:inline-flex;fill:').concat(p,';">').concat('<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 448 512" aria-hidden="true" focusable="false"><path d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z" /></svg>','</span><span class="').concat(i,'">').concat(d,"</span></span>"),n.style.cssText='\n width: 100%;\n min-height: 54px;\n border: none;\n border-radius: 12px;\n padding: 12px 22px;\n font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 1.2;\n cursor: pointer;\n background: '.concat(l,";\n color: ").concat(p,";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n transition: opacity 120ms ease;\n "),n.addEventListener("mouseenter",function(){n&&(n.style.opacity="0.95")}),n.addEventListener("mouseleave",function(){n&&(n.style.opacity="1")}),n.addEventListener("click",function(){window.parent.postMessage({type:"HOLIDOIT_WIDGET_BOOK_NOW_CLICK",experienceId:e},"*")}),t.innerHTML="",t.appendChild(n),a(),window.parent.postMessage({type:"HOLIDOIT_WIDGET_READY"},"*")}}return window.addEventListener("message",function(e){var t=e.data||{},c=t.type,r=t.payload;"HOLIDOIT_WIDGET_BUTTON_THEME"===c&&(!function(e){if(n){if(e.cta){var t=n.querySelector(".".concat(i));t&&(t.textContent=e.cta)}if(e.backgroundColor&&(n.style.background=e.backgroundColor),e.textColor){n.style.color=e.textColor;var a=n.querySelector(".".concat(o));a&&(a.style.fill=e.textColor)}}}(r||{}),a())}),window.addEventListener("resize",a),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c(),{}})());
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<!doctype html><html lang="it"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta http-equiv="X-UA-Compatible" content="ie=edge"/><title>Holidoit Booking</title><style>/* Reset and base styles */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html,
|
|
11
|
+
body {
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-height: 100%;
|
|
14
|
+
font-family:
|
|
15
|
+
'Google Sans',
|
|
16
|
+
-apple-system,
|
|
17
|
+
BlinkMacSystemFont,
|
|
18
|
+
'Segoe UI',
|
|
19
|
+
Roboto,
|
|
20
|
+
'Helvetica Neue',
|
|
21
|
+
Arial,
|
|
22
|
+
sans-serif;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
-webkit-font-smoothing: antialiased;
|
|
26
|
+
-moz-osx-font-smoothing: grayscale;
|
|
27
|
+
background: transparent;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#holidoit-widget-root {
|
|
31
|
+
width: 100%;
|
|
32
|
+
touch-action: manipulation;
|
|
33
|
+
-webkit-overflow-scrolling: touch;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* This mirrors BookingBoxLoadingSkeleton so loading the bundle does not change layout. */
|
|
37
|
+
.booking-box-loading-skeleton {
|
|
38
|
+
min-height: 760px;
|
|
39
|
+
max-width: 500px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 20px 20px 24px;
|
|
42
|
+
border-left: 1px solid #e2e8f0;
|
|
43
|
+
border-right: 1px solid #e2e8f0;
|
|
44
|
+
background: #fff;
|
|
45
|
+
animation: booking-box-loading-pulse 1.5s ease-in-out infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.booking-box-loading-content {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.booking-box-loading-content {
|
|
54
|
+
gap: 12px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.booking-box-loading-section {
|
|
58
|
+
padding: 12px;
|
|
59
|
+
border: 1px solid #e2e8f0;
|
|
60
|
+
border-radius: 12px;
|
|
61
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.booking-box-loading-heading {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 12px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.booking-box-loading-tour .booking-box-loading-heading {
|
|
71
|
+
margin-bottom: 12px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.booking-box-loading-tour-options {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 8px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.booking-box-loading-tour-option {
|
|
81
|
+
height: 62px;
|
|
82
|
+
border-radius: 12px;
|
|
83
|
+
background: #f8fafc;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.booking-box-loading-calendar .booking-box-loading-heading {
|
|
87
|
+
margin-bottom: 20px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.booking-box-loading-icon {
|
|
91
|
+
width: 28px;
|
|
92
|
+
height: 28px;
|
|
93
|
+
flex: 0 0 auto;
|
|
94
|
+
border-radius: 9999px;
|
|
95
|
+
background: #f1f5f9;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.booking-box-loading-title,
|
|
99
|
+
.booking-box-loading-month {
|
|
100
|
+
height: 20px;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
background: #f1f5f9;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.booking-box-loading-title {
|
|
106
|
+
width: 176px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.booking-box-loading-calendar .booking-box-loading-title {
|
|
110
|
+
width: 160px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.booking-box-loading-month {
|
|
114
|
+
width: 128px;
|
|
115
|
+
margin: 0 auto 20px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.booking-box-loading-grid {
|
|
119
|
+
display: grid;
|
|
120
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
121
|
+
gap: 4px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.booking-box-loading-cell {
|
|
125
|
+
height: 46px;
|
|
126
|
+
border-radius: 8px;
|
|
127
|
+
background: #f8fafc;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.booking-box-loading-action {
|
|
131
|
+
height: 72px;
|
|
132
|
+
border-radius: 12px;
|
|
133
|
+
background: #f1f5f9;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (max-width: 775px) {
|
|
137
|
+
.booking-box-loading-skeleton {
|
|
138
|
+
padding-right: 12px;
|
|
139
|
+
padding-left: 12px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@keyframes booking-box-loading-pulse {
|
|
144
|
+
0%,
|
|
145
|
+
100% {
|
|
146
|
+
opacity: 0.4;
|
|
147
|
+
}
|
|
148
|
+
50% {
|
|
149
|
+
opacity: 0.2;
|
|
150
|
+
}
|
|
151
|
+
}</style></head><body><div id="holidoit-widget-root" class="booking-box-loading-skeleton" aria-busy="true"><div class="booking-box-loading-content"><div class="booking-box-loading-section booking-box-loading-tour"><div class="booking-box-loading-heading"><div class="booking-box-loading-icon"></div><div class="booking-box-loading-title"></div></div><div class="booking-box-loading-tour-options"><div class="booking-box-loading-tour-option"></div><div class="booking-box-loading-tour-option"></div></div></div><div class="booking-box-loading-section"><div class="booking-box-loading-heading"><div class="booking-box-loading-icon"></div><div class="booking-box-loading-title"></div></div></div><div class="booking-box-loading-section booking-box-loading-calendar"><div class="booking-box-loading-heading"><div class="booking-box-loading-icon"></div><div class="booking-box-loading-title"></div></div><div class="booking-box-loading-month"></div><div class="booking-box-loading-grid"><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div><div class="booking-box-loading-cell"></div></div></div><div class="booking-box-loading-action"></div></div></div><script defer="defer" src="./widget-booking-box.js"></script></body></html>
|