@konnectio/core 4.0.16 → 4.0.18

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.
Files changed (88) hide show
  1. package/dist/ActionField-25ef64cf.js +163 -0
  2. package/dist/ActionField-25ef64cf.js.br +0 -0
  3. package/dist/ActionField-86389dfe.cjs +1 -0
  4. package/dist/AvailabilitySkeleton-3bb4b572.js +200 -0
  5. package/dist/AvailabilitySkeleton-3bb4b572.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-a72464a1.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-f7e8a940.js → DateField.vue_vue_type_style_index_0_lang-d1a56eb0.js} +707 -701
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-d1a56eb0.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-f99302dc.cjs +5 -0
  10. package/dist/{Field-c0c88ff7.js → Field-03e6b847.js} +5 -5
  11. package/dist/Field-03e6b847.js.br +0 -0
  12. package/dist/{Field-91254e17.cjs → Field-a7c1ed62.cjs} +1 -1
  13. package/dist/NumberField.vue_vue_type_style_index_0_lang-94fa5765.js +194 -0
  14. package/dist/NumberField.vue_vue_type_style_index_0_lang-94fa5765.js.br +0 -0
  15. package/dist/NumberField.vue_vue_type_style_index_0_lang-a779a531.cjs +1 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-03794d02.cjs +855 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-51defa22.js +28643 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-51defa22.js.br +0 -0
  19. package/dist/{ThankYou-266a1340.cjs → ThankYou-3ab29b45.cjs} +2 -2
  20. package/dist/{ThankYou-b353b8e0.js → ThankYou-f4945877.js} +11 -10
  21. package/dist/ThankYou-f4945877.js.br +0 -0
  22. package/dist/{_-f8481bc2.js → _-0787261e.js} +12 -12
  23. package/dist/_-0787261e.js.br +0 -0
  24. package/dist/{_-0a59e9b5.cjs → _-917dcead.cjs} +1 -1
  25. package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
  26. package/dist/applyGiftCard-ba1da572.cjs +1 -0
  27. package/dist/applyGiftCard-f2282bd2.js +53 -0
  28. package/dist/applyGiftCard-f2282bd2.js.br +0 -0
  29. package/dist/availability.cjs +2 -2
  30. package/dist/availability.d.ts +2 -0
  31. package/dist/availability.js +66 -58
  32. package/dist/availability.js.br +0 -0
  33. package/dist/components/Clickable.vue.d.ts +1 -1
  34. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  35. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  36. package/dist/components/listings/Base.vue.d.ts +1 -1
  37. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  38. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
  39. package/dist/entries/availability.d.ts +5 -1
  40. package/dist/event-07ba3a0e.cjs +1 -0
  41. package/dist/{event-1b2cce27.js → event-208206cf.js} +9 -9
  42. package/dist/event-208206cf.js.br +0 -0
  43. package/dist/event.cjs +1 -1
  44. package/dist/event.js +153 -153
  45. package/dist/event.js.br +0 -0
  46. package/dist/gift-card-validation.cjs +1 -1
  47. package/dist/gift-card-validation.js +27 -27
  48. package/dist/gift-card-validation.js.br +0 -0
  49. package/dist/gift-card.cjs +1 -1
  50. package/dist/gift-card.js +38 -38
  51. package/dist/gift-card.js.br +0 -0
  52. package/dist/hotel.cjs +5 -5
  53. package/dist/hotel.js +954 -957
  54. package/dist/hotel.js.br +0 -0
  55. package/dist/{index-1532370f.js → index-5e1ea6f0.js} +1 -2
  56. package/dist/index-5e1ea6f0.js.br +0 -0
  57. package/dist/index-7ef3288b.cjs +1 -0
  58. package/dist/layouts/Availability.vue.d.ts +7 -4
  59. package/dist/polyfill.cjs +1 -1
  60. package/dist/polyfill.js +2 -2
  61. package/dist/polyfill.js.br +0 -0
  62. package/dist/style.css +1 -1
  63. package/dist/style.css.br +0 -0
  64. package/package.json +9 -9
  65. package/dist/ActionField-3450fcba.cjs +0 -1
  66. package/dist/ActionField-c1dc7f3e.js +0 -101
  67. package/dist/ActionField-c1dc7f3e.js.br +0 -0
  68. package/dist/AvailabilitySkeleton-454ad0ec.js +0 -190
  69. package/dist/AvailabilitySkeleton-454ad0ec.js.br +0 -0
  70. package/dist/AvailabilitySkeleton-f0e12cb1.cjs +0 -1
  71. package/dist/DateField.vue_vue_type_style_index_0_lang-4f2f4c47.cjs +0 -5
  72. package/dist/DateField.vue_vue_type_style_index_0_lang-f7e8a940.js.br +0 -0
  73. package/dist/Field-c0c88ff7.js.br +0 -0
  74. package/dist/NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs +0 -1
  75. package/dist/NumberField.vue_vue_type_script_setup_true_lang-aad02565.js +0 -116
  76. package/dist/NumberField.vue_vue_type_script_setup_true_lang-aad02565.js.br +0 -0
  77. package/dist/SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs +0 -802
  78. package/dist/SelectField.vue_vue_type_style_index_0_lang-ab6da587.js +0 -19549
  79. package/dist/SelectField.vue_vue_type_style_index_0_lang-ab6da587.js.br +0 -0
  80. package/dist/TextField-2ccfa48b.cjs +0 -54
  81. package/dist/TextField-45a6d0f3.js +0 -9271
  82. package/dist/TextField-45a6d0f3.js.br +0 -0
  83. package/dist/ThankYou-b353b8e0.js.br +0 -0
  84. package/dist/_-f8481bc2.js.br +0 -0
  85. package/dist/event-0a73d10e.cjs +0 -1
  86. package/dist/event-1b2cce27.js.br +0 -0
  87. package/dist/index-1532370f.js.br +0 -0
  88. package/dist/index-4a6e0dad.cjs +0 -1
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs"),_e=require("./_-0a59e9b5.cjs"),Ce=require("./NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs"),Fe=e.defineStore("event",()=>{const X=_e.usePaymentStore(),{voucher:Y}=e.storeToRefs(Ce.useApplyGiftCardStore()),{display:g}=e.useAlertStore(),{bearerToken:S}=e.storeToRefs(e.useUtilityStore()),c=e.ref({}),f=e.ref({}),a=e.ref(void 0),u=e.ref(!0),s=e.ref(e.EventModuleState.InitialState),O=e.ref(new Date),P=e.ref(NaN),A=e.ref(1),b=e.ref(NaN),z=e.ref(NaN),E=e.ref(""),w=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),M=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),_=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),L=e.ref(""),k=e.ref({}),d=e.ref({}),C=e.ref("");function n(t){return t.templateID!==void 0}const Z=e.computed(()=>c.value.currency),ee=e.computed(()=>c.value.maxNumberPerBooking),te=e.computed(()=>c.value.title),ae=e.computed(()=>c.value.subtitle),oe=e.computed(()=>c.value.slideshow),D=e.computed(()=>O.value.toISOString()),ne=e.computed(()=>n(a.value)),F=e.computed(()=>n(a.value)?a.value.numberOfDays:A.value),ue=e.computed(()=>n(a.value)?a.value.packageCount:0),le=e.computed(()=>n(a.value)?a.value.fromDate:""),h=e.computed(()=>f.value.events.find(t=>t.id===b.value)),re=e.computed(()=>h.value?h.value.length:void 0),U=e.computed(()=>n(a.value)?a.value.templateID:0),se=e.computed(()=>f.value.events),ie=e.computed(()=>f.value.templates),ve=e.computed(()=>f.value.events.length>0),ce=e.computed(()=>f.value.templates.length>0),B=e.computed(()=>h.value&&h.value.eventRateType?h.value.eventRateType:e.OctopusEventRateType.None),T=e.computed(()=>{if(!n(a.value))return a.value}),G=e.computed(()=>{if(T.value!==void 0){const t=T.value.find(o=>o.time===E.value);if(t&&t.price)return t.price}return 0}),V=e.computed(()=>{if(n(a.value))return a.value.templateCounts}),de=e.computed(()=>t=>c.value.eventImages.filter(o=>o.eventID===t));function N(t,o,l){let i=0;if(n(a.value)){const r=a.value.templateCounts[l];if(r){const y=r.addons,p=k.value[`${o}.${t}.${l}`]||0;if(p>0){const m=y?.find(I=>I.addonID===t),v=typeof p=="boolean"?1:p;i+=e.getQuantityStrategyPrice(m?.price,m?.quantityStrategy,F.value,r.adultPerRoom)*v}}}else{const r=d.value[t]||0;if(r>0){const y=h.value?.products?.find(p=>p.productID===t);y&&(i+=y.price*r)}}return i}function R(t,o){let l=0;if(n(a.value))for(const i in k.value){const r=i.split(".");parseInt(r[0])===t&&parseInt(r[2])===o&&(l+=N(parseInt(r[1]),t,o))}else for(const i in d.value)l+=N(parseInt(i))*A.value;return l}const q=e.computed(()=>n(a.value)&&a.value.totalPrice||0),pe=e.computed(()=>{if(n(a.value))return a.value.templateCounts===void 0?NaN:a.value.templateCounts.flatMap(t=>t.roomGroupID).reduce((t,o,l)=>t+R(o,l),q.value)||0;{let t=R();return t+=G.value,t}}),me=e.computed(()=>n(a.value)&&a.value.templateCounts!==void 0&&a.value.templateCounts.flatMap(t=>t.weekendFee).reduce((t,o)=>t+o,0)||0),ge=e.computed(()=>n(a.value)&&a.value.templateCounts!==void 0&&a.value.templateCounts.flatMap(t=>t.roomUpgrade).reduce((t,o)=>t+o,0)||0),fe=e.computed(()=>{const t=d.value;let o=0;for(const l in t)o+=Number.isNaN(t[l])?0:t[l];return o>0}),x=e.computed(()=>n(a.value)?!1:Object.keys(d.value).length>0),he=e.computed(()=>!!(w.value!==""&&_.value!==""&&M.value.length>=5&&(!x.value||fe.value)&&(!(!n(a.value)&&B.value!==e.OctopusEventRateType.FullDayEvent)||E.value!=="")));function ye(t){return s.value===e.EventModuleState.ReservationState&&b.value===t&&u.value}const Se=e.computed(()=>!(s.value===e.EventModuleState.InitialState&&u.value)),be=e.computed(()=>!(s.value===e.EventModuleState.AvailabilityState&&u.value)),ke=e.computed(()=>a.value!==void 0),De=e.computed(()=>s.value===e.EventModuleState.PaymentState&&u.value);async function K(){try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/event/metadata",{params:{language:e.getUserLanguage()},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}})).data;c.value=t,j()}catch{g({message:e.i18n.t("alert.error.couldntFetchMetadata"),type:"warning"})}}async function j(){s.value=e.EventModuleState.AvailabilityState,u.value=!0;try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/event/restaurant-events",{params:{language:e.getUserLanguage(),date:D.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}})).data;f.value=t,u.value=!1}catch{g({message:e.i18n.t("alert.error.couldntFetchListings"),type:"warning"})}}async function Ie(t){s.value=e.EventModuleState.ReservationState,u.value=!0;try{const o=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-availability",{params:{language:e.getUserLanguage(),date:D.value,templateId:b.value,numberOfPeople:P.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}})).data;o.templateCounts.length===0?g({message:e.i18n.t("alert.error.eventNotAvailable"),type:"warning"}):(a.value=o,t()),u.value=!1}catch{u.value=!1,s.value=e.EventModuleState.AvailabilityState,g({message:e.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Ee(t){s.value=e.EventModuleState.ReservationState,u.value=!0;try{const o=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/get-table-availability",{params:{language:e.getUserLanguage(),date:D.value,numberOfPeople:P.value,eventId:b.value,tableGroupId:z.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}})).data;a.value=o,u.value=!1,t()}catch{u.value=!1,s.value=e.EventModuleState.AvailabilityState,g({message:e.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Pe(){try{const t=(await e.axios.get("https://stage.hotel-service.konnectio.dk/api/v3/event/validate-discount-code",{params:{language:e.getUserLanguage(),date:D.value,discountCode:C.value},headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}})).data;console.log(t)}catch(t){console.log(t),g({message:e.i18n.t("alert.error.discountCodeValidation"),type:"warning"})}}async function Ae(t){s.value=e.EventModuleState.PaymentState,u.value=!0;const o=()=>{u.value=!1,s.value=e.EventModuleState.ReservationState,g({message:e.i18n.t("booking.other.errorMessage"),type:"warning"})};let l,i,r;const y=[];if(n(a.value))V.value?.forEach((v,I)=>{const Q=[];let H=0;for(const J in k.value){const $=J.split("."),W=k.value[J];parseInt($[0])===v.roomGroupID&&parseInt($[2])===I&&W>0&&(Q.push({id:H,addonID:parseInt($[1]),quantity:W}),H++)}y.push({adultPerRoom:v.adultPerRoom,count:v.count,roomGroupID:v.roomGroupID,addons:Q})}),l={templateID:U.value,numberOfDays:A.value,templateCounts:y};else{i=[],r=E.value;for(const v in d.value){const I=d.value[parseInt(v)];I>0&&i.push({id:parseInt(v),quantity:I})}}let p="https://stage.hotel-service.konnectio.dk/api/v3/event/template-book";const m={date:D.value,name:w.value,email:_.value,phone:M.value,remark:L.value,numberOfPeople:P.value,days:F.value,discountCode:C.value,giftCardCode:Y.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin};n(a.value)?m.templateGroup=l:(m.time=r,m.eventId=b.value,m.products=i,p="https://stage.hotel-service.konnectio.dk/api/v3/event/event-book"),await e.axios.post(p,m,{headers:{Authorization:S.value,"Fresh-Booking-Ver":"4.0.16"}}).then(v=>{u.value=!1,X.pay({callback:t,response:v.data})}).catch(()=>o())}function we(t){k.value={},d.value={},E.value="",t()}function Me(){K()}return{metaData:c,listingData:f,tableBasePrice:G,availabilityData:a,isLoading:u,moduleState:s,searchDate:O,numberOfPeople:P,numberOfDays:A,eventId:b,tableGroupId:z,arrivalTime:E,addons:k,products:d,discountCode:C,name:w,phone:M,email:_,remark:L,isTemplateEvent:ne,currency:Z,maxNumberOfPeople:ee,title:te,subtitle:ae,slideshow:oe,date:D,numberOfTotalDays:F,numberOfRooms:ue,fromDate:le,getEventData:h,length:re,templateId:U,getEvents:se,getTemplates:ie,hasEvents:ve,hasTemplates:ce,basePrice:q,totalPrice:pe,getTemplateData:V,getEventTableData:T,roomUpgrade:ge,weekendFee:me,hasProducts:x,eventRateType:B,isReservationFormFilled:he,isMetaDataAvailable:Se,areListingsAvailable:be,isAvailabilityDataAvailable:ke,isPaymentLoading:De,getEventImages:de,isEventListingLoading:ye,fetchMetaData:K,fetchListings:j,getTemplateAvailability:Ie,getEventAvailability:Ee,validateDiscountCode:Pe,localAddonPrice:N,totalAddonPrice:R,createBooking:Ae,reset:we,initialize:Me}});exports.useEventStore=Fe;
Binary file
Binary file
@@ -1 +0,0 @@
1
- "use strict";const SelectField_vue_vue_type_style_index_0_lang=require("./SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs"),TextField=require("./TextField-2ccfa48b.cjs");function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(i){_defineProperty(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var load=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(i,r){if(!(typeof document>"u")){var l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");if(s.async=!0,s.src=t,s.defer=n.defer,n.preconnectOrigin){var u=document.createElement("link");u.href=n.preconnectOrigin,u.rel="preconnect",l.appendChild(u)}l.appendChild(s),s.onload=i,s.onerror=r}})},mergeDeep=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(!i.length)return t;var l=i.shift();if(!(!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(t)||!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(l))){for(var s in l)SelectField_vue_vue_type_style_index_0_lang.isPlainObject(l[s])?(t[s]||Object.assign(t,_defineProperty({},s,{})),e(t[s],l[s])):Object.assign(t,_defineProperty({},s,l[s]));return e.apply(void 0,[t].concat(i))}},isBrowser=function(){return!(typeof window>"u"||typeof document>"u")},warn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;isBrowser()},validateScreenviewShape=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return warn('Missing "appName" property inside the plugin options.',t.app_name==null),warn('Missing "name" property in the route.',t.screen_name==null),t};function getPathWithBase(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("/"),i=t.split("/");return n[0]===""&&t[t.length-1]==="/"&&n.shift(),i.join("/")+n.join("/")}var getDefaultParams=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},params={},setOptions=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=getDefaultParams();params=mergeDeep(n,t)},getOptions=function(){return params},query=function(){var e,t=getOptions(),n=t.globalObjectName;!isBrowser()||typeof window[n]>"u"||(e=window)[n].apply(e,arguments)},config=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=getOptions(),r=i.config,l=i.includes;query.apply(void 0,["config",r.id].concat(t)),Array.isArray(l)&&l.forEach(function(s){query.apply(void 0,["config",s.id].concat(t))})},assignGlobalProperty=function(t,n){isBrowser()&&(window["ga-disable-".concat(t)]=n)},disable=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=getOptions(),n=t.config,i=t.includes;assignGlobalProperty(n.id,e),Array.isArray(i)&&i.forEach(function(r){return assignGlobalProperty(r.id,e)})},optOut=function(){disable(!0)},optIn=function(){disable(!1)},router,setRouter=function(t){router=t},getRouter=function(){return router},event=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.includes,r=n.defaultGroupName;t.send_to==null&&Array.isArray(i)&&i.length&&(t.send_to=i.map(function(l){return l.id}).concat(r)),query("event",e,t)},pageview=function(e){if(isBrowser()){var t;if(typeof e=="string")t={page_path:e};else if(e.path||e.fullPath){var n=getOptions(),i=n.pageTrackerUseFullPath,r=n.pageTrackerPrependBase,l=getRouter(),s=l&&l.options.base,u=i?e.fullPath:e.path;t=_objectSpread2(_objectSpread2({},e.name&&{page_title:e.name}),{},{page_path:r?getPathWithBase(u,s):u})}else t=e;t.page_location==null&&(t.page_location=window.location.href),t.send_page_view==null&&(t.send_page_view=!0),event("page_view",t)}},screenview=function(e){var t=getOptions(),n=t.appName;if(e){var i;typeof e=="string"?i={screen_name:e}:i=e,i.app_name=i.app_name||n,event("screen_view",i)}},exception=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["exception"].concat(t))},linker=function(e){config("linker",e)},time=function(e){event("timing_complete",e)},set=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];query.apply(void 0,["set"].concat(t))},refund=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["refund"].concat(t))},purchase=function(e){event("purchase",e)},customMap=function(e){config({custom_map:e})},api=Object.freeze({__proto__:null,query,config,optOut,optIn,pageview,screenview,exception,linker,time,set,refund,purchase,customMap,event}),attachApi=function(t){t.config.globalProperties.$gtag=api},registerGlobals=function(){if(isBrowser()){var e=getOptions(),t=e.enabled,n=e.globalObjectName,i=e.globalDataLayerName;return window[n]==null&&(window[i]=window[i]||[],window[n]=function(){window[i].push(arguments)}),window[n]("js",new Date),t||optOut(),window[n]}},mergeDefaultParams=function(t){return _objectSpread2({send_page_view:!1},t)},addConfiguration=function(){var e=getOptions(),t=e.config,n=e.includes;query("config",t.id,mergeDefaultParams(t.params)),Array.isArray(n)&&n.forEach(function(i){query("config",i.id,mergeDefaultParams(i.params))})},track=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.appName,r=n.pageTrackerTemplate,l=n.pageTrackerScreenviewEnabled,s=n.pageTrackerSkipSamePath;if(!(s&&e.path===t.path)){var u=e;if(SelectField_vue_vue_type_style_index_0_lang.isFunction(r)?u=r(e,t):l&&(u=validateScreenviewShape({app_name:i,screen_name:e.name})),l){screenview(u);return}pageview(u)}},isRouteExcluded=function(t){var n=getOptions(),i=n.pageTrackerExcludedRoutes;return i.includes(t.path)||i.includes(t.name)},addRoutesTracker=function(){var e=getOptions(),t=e.onBeforeTrack,n=e.onAfterTrack,i=getRouter();i.isReady().then(function(){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){var r=i.currentRoute;addConfiguration(),!isRouteExcluded(r.value)&&track(r.value)}),i.afterEach(function(r,l){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){isRouteExcluded(r)||(SelectField_vue_vue_type_style_index_0_lang.isFunction(t)&&t(r,l),track(r,l),SelectField_vue_vue_type_style_index_0_lang.isFunction(n)&&n(r,l))})})})},bootstrap=function(){var e=getOptions(),t=e.onReady,n=e.onError,i=e.globalObjectName,r=e.globalDataLayerName,l=e.config,s=e.customResourceURL,u=e.customPreconnectOrigin,_=e.deferScriptLoad,d=e.pageTrackerEnabled,p=e.disableScriptLoad,v=!!(d&&getRouter());if(registerGlobals(),v?addRoutesTracker():addConfiguration(),!p)return load("".concat(s,"?id=").concat(l.id,"&l=").concat(r),{preconnectOrigin:u,defer:_}).then(function(){t&&t(window[i])}).catch(function(g){return n&&n(g),g})},install=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;attachApi(t),setOptions(n),setRouter(i),getOptions().bootstrap&&bootstrap()};const _hoisted_1$3={class:"fresh-booking-phone-input"},_sfc_main$3=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"PhoneField",props:{modelValue:{},label:{},id:{},placeholder:{},icon:{default:"phone-office"},iconColor:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputStyle:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,i=e,r=i.id||SelectField_vue_vue_type_style_index_0_lang.ranId(),l=SelectField_vue_vue_type_style_index_0_lang.ref("+45"),s=SelectField_vue_vue_type_style_index_0_lang.ref("");function u(){n("update:modelValue",`${l.value} ${s.value}`)}return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{if(i.modelValue){const _=i.modelValue.split(" ");l.value=_[0],s.value=_[1]}}),(_,d)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{label:_.label,id:SelectField_vue_vue_type_style_index_0_lang.unref(r),type:"phone",required:_.required,readonly:_.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",_hoisted_1$3,[SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=p=>l.value=p),type:"text",id:SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.ranId)(),name:"phone-code",autocomplete:"tel-country-code",icon:_.icon,"icon-color":_.iconColor,"icon-type":_.iconType,placeholder:"+45",required:_.required,readonly:_.readonly,"input-style":_.inputStyle,onInput:d[1]||(d[1]=p=>u())},null,8,["modelValue","id","icon","icon-color","icon-type","required","readonly","input-style"]),SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:s.value,"onUpdate:modelValue":d[2]||(d[2]=p=>s.value=p),type:"number",name:"phone",autocomplete:"tel-national",id:SelectField_vue_vue_type_style_index_0_lang.unref(r),placeholder:_.placeholder,required:_.required,readonly:_.readonly,"input-style":_.inputStyle,onInput:d[3]||(d[3]=p=>u())},null,8,["modelValue","id","placeholder","required","readonly","input-style"])])]),_:1},8,["label","id","required","readonly"]))}}),PhoneField_vue_vue_type_style_index_0_scoped_5cd094ab_lang="",PhoneField=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$3,[["__scopeId","data-v-5cd094ab"]]),_hoisted_1$2=["required","type","name","readonly","disabled","value","checked"],_hoisted_2$2=["data-test"],_hoisted_3={key:0},_sfc_main$2=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"Checkbox",props:{modelValue:{type:[String,Boolean,Number]},numeric:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},label:{},price:{},name:{},readonly:{type:Boolean,default:!1},type:{default:"checkbox"},required:{type:Boolean,default:!1},inputStyle:{},val:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t;function r(){n.readonly!==!0&&i("update:modelValue",n.type==="radio"?n.val:n.numeric?n.modelValue?0:1:!n.modelValue)}return(l,s)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{required:l.required,type:l.type,readonly:l.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("label",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-container",{"is-readonly":l.readonly},{"has-label":l.label},l.type==="radio"?"radio":"checkbox"])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("input",SelectField_vue_vue_type_style_index_0_lang.mergeProps(l.$attrs,{required:!!l.required,type:l.type,name:l.name,class:"hidden",readonly:!!l.readonly,disabled:!!l.readonly,value:l.type==="radio"?l.val:l.modelValue,checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue,onChange:s[0]||(s[0]=u=>r())}),null,16,_hoisted_1$2),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box",{checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue}]),tabindex:"0",style:SelectField_vue_vue_type_style_index_0_lang.normalizeStyle(l.inputStyle),"data-test":l.name,onKeyup:s[1]||(s[1]=SelectField_vue_vue_type_style_index_0_lang.withKeys(u=>r(),["enter"]))},null,46,_hoisted_2$2),l.label?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",{key:0,class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-label",{"with-price":l.price}])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("span",null,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.label),1),l.price?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",_hoisted_3,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.price),1)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)]),_:1},8,["required","type","readonly"]))}}),Checkbox_vue_vue_type_style_index_0_scoped_7ef656cb_lang="",Checkbox=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$2,[["__scopeId","data-v-7ef656cb"]]),_hoisted_1$1={href:"https://policies.google.com/privacy"},_hoisted_2$1={href:"https://policies.google.com/terms"},_sfc_main$1=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"GoogleNotice",setup(e){const{t}=SelectField_vue_vue_type_style_index_0_lang.useI18n();return(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",null,[SelectField_vue_vue_type_style_index_0_lang.createTextVNode(SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleNotice"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_1$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googlePrivacyPolicy")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleAnd"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_2$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleTOS")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleApply"))+". ",1)]))}});function block0(e){const t=e;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{da:{googleNotice:n=>{const{normalize:i}=n;return i(["Denne side er beskyttet af reCAPTCHA og Google's"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privatlivspolitik"])},googleAnd:n=>{const{normalize:i}=n;return i(["og"])},googleTOS:n=>{const{normalize:i}=n;return i(["Servicevilkår"])},googleApply:n=>{const{normalize:i}=n;return i(["er gældende"])}},en:{googleNotice:n=>{const{normalize:i}=n;return i(["This site is protected by reCAPTCHA and the Google"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privacy Policy"])},googleAnd:n=>{const{normalize:i}=n;return i(["and"])},googleTOS:n=>{const{normalize:i}=n;return i(["Terms of Service"])},googleApply:n=>{const{normalize:i}=n;return i(["apply"])}}}})}typeof block0=="function"&&block0(_sfc_main$1);const _withScopeId=e=>(SelectField_vue_vue_type_style_index_0_lang.pushScopeId("data-v-340cb9ce"),e=e(),SelectField_vue_vue_type_style_index_0_lang.popScopeId(),e),_hoisted_1=_withScopeId(()=>SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout"},null,-1)),_hoisted_2=[_hoisted_1],_sfc_main=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"CheckoutWindow",setup(e){const{paymentGatewayId:t}=SelectField_vue_vue_type_style_index_0_lang.storeToRefs(SelectField_vue_vue_type_style_index_0_lang.useUtilityStore());return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{const n=document.createElement("script"),i=document.createElement("script");n.setAttribute("src","https://checkout.dibspayment.eu/v1/checkout.js?v=1"),i.setAttribute("src","https://checkout.reepay.com/checkout.js"),document.head.appendChild(n),document.head.appendChild(i)}),(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",null,[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout-wrapper",class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass({reePay:SelectField_vue_vue_type_style_index_0_lang.unref(t)===SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.PaymentGateway).ReePay})},_hoisted_2,2)]))}}),CheckoutWindow_vue_vue_type_style_index_0_scoped_340cb9ce_lang="",CheckoutWindow=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main,[["__scopeId","data-v-340cb9ce"]]);var a=Object.defineProperty,c=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o=(e,t,n)=>(c(e,typeof t!="symbol"?t+"":t,n),n);const namespace="@@vue3-sticky-directive",events=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],batchStyle=(e,t={},n={})=>{for(let i in t)e.style[i]=t[i];for(let i in n)n[i]&&!e.classList.contains(i)?e.classList.add(i):!n[i]&&e.classList.contains(i)&&e.classList.remove(i)};class Sticky{constructor(e,t){o(this,"el"),o(this,"vm"),o(this,"unSubscribers"),o(this,"isPending"),o(this,"state"),o(this,"lastState"),o(this,"options"),o(this,"placeholderEl"),o(this,"containerEl"),this.el=e,this.vm=t,this.unSubscribers=[],this.isPending=!1,this.state={isTopSticky:null,isBottomSticky:null,height:null,width:null,xOffset:null},this.lastState={top:null,bottom:null,sticked:!1};const n=this.getAttribute("sticky-offset")||{},i=this.getAttribute("sticky-side")||"top",r=this.getAttribute("sticky-z-index")||"10",l=this.getAttribute("on-stick")||null;this.options={topOffset:Number(n.top)||0,bottomOffset:Number(n.bottom)||0,shouldTopSticky:i==="top"||i==="both",shouldBottomSticky:i==="bottom"||i==="both",zIndex:r,onStick:l}}doBind(){if(this.unSubscribers.length>0)return;const{el:e,vm:t}=this;t.$nextTick(()=>{this.placeholderEl=document.createElement("div"),this.containerEl=this.getContainerEl(),e.parentElement.insertBefore(this.placeholderEl,e),events.forEach(n=>{const i=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(n,i)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(n,i)),window.addEventListener(n,i,{passive:!0}),this.containerEl.addEventListener(n,i,{passive:!0})})})}doUnbind(){this.unSubscribers.forEach(e=>e()),this.unSubscribers=[],this.resetElement()}update(){this.isPending||(requestAnimationFrame(()=>{this.isPending=!1,this.recomputeState(),this.updateElements()}),this.isPending=!0)}isTopSticky(){if(!this.options.shouldTopSticky)return!1;const e=this.state.placeholderElRect.top,t=this.state.containerElRect.bottom,n=this.options.topOffset,i=this.options.bottomOffset;return e<=n&&t>=i}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;const e=window.innerHeight-this.state.placeholderElRect.top-this.state.height,t=window.innerHeight-this.state.containerElRect.top,n=this.options.topOffset,i=this.options.bottomOffset;return e<=i&&t>=n}recomputeState(){this.state=Object.assign({},this.state,{height:this.getHeight(),width:this.getWidth(),xOffset:this.getXOffset(),placeholderElRect:this.getPlaceholderElRect(),containerElRect:this.getContainerElRect()}),this.state.isTopSticky=this.isTopSticky(),this.state.isBottomSticky=this.isBottomSticky()}fireEvents(){typeof this.options.onStick=="function"&&(this.lastState.top!==this.state.isTopSticky||this.lastState.bottom!==this.state.isBottomSticky||this.lastState.sticked!==(this.state.isTopSticky||this.state.isBottomSticky))&&(this.lastState={top:this.state.isTopSticky,bottom:this.state.isBottomSticky,sticked:this.state.isBottomSticky||this.state.isTopSticky},this.options.onStick(this.lastState))}updateElements(){const e={paddingTop:0},t={position:"static",top:"auto",bottom:"auto",left:"auto",width:"auto",zIndex:this.options.zIndex},n={"vue-sticky-placeholder":!0},i={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){t.position="fixed",t.top=this.options.topOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const r=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;r<0&&(t.top=r+this.options.topOffset+"px"),e.paddingTop=this.state.height+"px",i["top-sticky"]=!0}else if(this.state.isBottomSticky){t.position="fixed",t.bottom=this.options.bottomOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const r=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;r<0&&(t.bottom=r+this.options.bottomOffset+"px"),e.paddingTop=this.state.height+"px",i["bottom-sticky"]=!0}else e.paddingTop=0;batchStyle(this.el,t,i),batchStyle(this.placeholderEl,e,n),this.fireEvents()}resetElement(){["position","top","bottom","left","width","zIndex"].forEach(t=>{this.el.style.removeProperty(t)}),this.el.classList.remove("bottom-sticky","top-sticky");const{parentElement:e}=this.placeholderEl;e&&e.removeChild(this.placeholderEl)}getContainerEl(){let e=this.el.parentElement;for(;e&&e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1;){if(e.hasAttribute("sticky-container"))return e;e=e.parentElement}return this.el.parentElement}getXOffset(){return this.placeholderEl.getBoundingClientRect().left}getWidth(){return this.placeholderEl.getBoundingClientRect().width}getHeight(){return this.el.getBoundingClientRect().height}getPlaceholderElRect(){return this.placeholderEl.getBoundingClientRect()}getContainerElRect(){return this.containerEl.getBoundingClientRect()}getAttribute(name){const expr=this.el.getAttribute(name);let result;if(expr)if(this.vm[expr])result=this.vm[expr];else try{result=eval(`(${expr})`)}catch(e){result=expr}return result}}const Sticky$1={mounted(e,t){(typeof t.value>"u"||t.value)&&(e[namespace]=new Sticky(e,t.instance),e[namespace].doBind())},unmounted(e){e[namespace]&&(e[namespace].doUnbind(),e[namespace]=void 0)},updated(e,t){typeof t.value>"u"||t.value?(e[namespace]||(e[namespace]=new Sticky(e,t.instance)),e[namespace].doBind()):e[namespace]&&e[namespace].doUnbind()}},StickyPlugin={install(e){e.directive("Sticky",Sticky$1)}};exports.Checkbox=Checkbox;exports.CheckoutWindow=CheckoutWindow;exports.PhoneField=PhoneField;exports.StickyPlugin=StickyPlugin;exports._sfc_main=_sfc_main$1;exports.event=event;exports.install=install;exports.setOptions=setOptions;