@konnectio/core 4.0.22 → 4.0.24

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 (78) hide show
  1. package/dist/{ActionField-83fef1c1.cjs → ActionField-8ee667bd.cjs} +1 -1
  2. package/dist/{ActionField-4c47ccce.js → ActionField-b2ee8f91.js} +2 -2
  3. package/dist/ActionField-b2ee8f91.js.br +0 -0
  4. package/dist/AvailabilitySkeleton-16a3be88.js +227 -0
  5. package/dist/AvailabilitySkeleton-16a3be88.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-83a2e2c6.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-efec37d7.cjs → DateField.vue_vue_type_style_index_0_lang-4caf9daf.cjs} +2 -2
  8. package/dist/{DateField.vue_vue_type_style_index_0_lang-6242a55d.js → DateField.vue_vue_type_style_index_0_lang-a4abbe86.js} +6 -6
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-a4abbe86.js.br +0 -0
  10. package/dist/{Field-72b689c4.cjs → Field-877b4588.cjs} +1 -1
  11. package/dist/{Field-d3e306c7.js → Field-f5f98938.js} +2 -2
  12. package/dist/Field-f5f98938.js.br +0 -0
  13. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-e9425fa5.js → NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js} +2 -2
  14. package/dist/NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js.br +0 -0
  15. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-53cff536.cjs → NumberField.vue_vue_type_script_setup_true_lang-f72da2f4.cjs} +1 -1
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-727c44d8.cjs +855 -0
  17. package/dist/{SelectField.vue_vue_type_style_index_0_lang-b53d9177.js → SelectField.vue_vue_type_style_index_0_lang-f136675d.js} +8594 -8260
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-f136675d.js.br +0 -0
  19. package/dist/{ThankYou-ebdebf4e.js → ThankYou-58baa41d.js} +11 -11
  20. package/dist/ThankYou-58baa41d.js.br +0 -0
  21. package/dist/{ThankYou-98807e93.cjs → ThankYou-f027d958.cjs} +2 -2
  22. package/dist/{_-07462fdc.cjs → _-573e46fc.cjs} +1 -1
  23. package/dist/{_-f5b07fc1.js → _-e0a2fd6e.js} +1 -1
  24. package/dist/_-e0a2fd6e.js.br +0 -0
  25. package/dist/availability.cjs +2 -2
  26. package/dist/availability.js +62 -64
  27. package/dist/availability.js.br +0 -0
  28. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +1 -1
  29. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  30. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  31. package/dist/components/inputs/InputField.vue.d.ts +1 -1
  32. package/dist/components/inputs/grouped/NameField.vue.d.ts +1 -1
  33. package/dist/components/listings/Base.vue.d.ts +1 -1
  34. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  35. package/dist/{event-5c513f23.cjs → event-01f44344.cjs} +1 -1
  36. package/dist/{event-136853fa.js → event-3e48b8ad.js} +9 -9
  37. package/dist/event-3e48b8ad.js.br +0 -0
  38. package/dist/event.cjs +1 -1
  39. package/dist/event.js +18 -18
  40. package/dist/event.js.br +0 -0
  41. package/dist/gift-card-validation.cjs +1 -1
  42. package/dist/gift-card-validation.js +3 -3
  43. package/dist/gift-card-validation.js.br +0 -0
  44. package/dist/gift-card.cjs +1 -1
  45. package/dist/gift-card.js +12 -12
  46. package/dist/gift-card.js.br +0 -0
  47. package/dist/hotel.cjs +5 -5
  48. package/dist/hotel.js +1640 -1674
  49. package/dist/hotel.js.br +0 -0
  50. package/dist/index-68332b8a.cjs +1 -0
  51. package/dist/index-931022d3.js +405 -0
  52. package/dist/index-931022d3.js.br +0 -0
  53. package/dist/polyfill.cjs +1 -1
  54. package/dist/polyfill.js +1 -1
  55. package/dist/polyfill.js.br +0 -0
  56. package/dist/store/event.d.ts +1 -1
  57. package/dist/store/hotel.d.ts +1 -1
  58. package/dist/store/payment.d.ts +1 -1
  59. package/dist/style.css +1 -1
  60. package/dist/style.css.br +0 -0
  61. package/dist/types/index.d.ts +1 -0
  62. package/package.json +2 -2
  63. package/dist/ActionField-4c47ccce.js.br +0 -0
  64. package/dist/AvailabilitySkeleton-0e77a3ad.cjs +0 -1
  65. package/dist/AvailabilitySkeleton-6ba16e6b.js +0 -223
  66. package/dist/AvailabilitySkeleton-6ba16e6b.js.br +0 -0
  67. package/dist/DateField.vue_vue_type_style_index_0_lang-6242a55d.js.br +0 -0
  68. package/dist/Field-d3e306c7.js.br +0 -0
  69. package/dist/NumberField.vue_vue_type_script_setup_true_lang-e9425fa5.js.br +0 -0
  70. package/dist/SelectField.vue_vue_type_style_index_0_lang-b53d9177.js.br +0 -0
  71. package/dist/SelectField.vue_vue_type_style_index_0_lang-ed0ef984.cjs +0 -855
  72. package/dist/ThankYou-ebdebf4e.js.br +0 -0
  73. package/dist/_-f5b07fc1.js.br +0 -0
  74. package/dist/event-136853fa.js.br +0 -0
  75. package/dist/index-c407bc6f.cjs +0 -1
  76. package/dist/index-eab5c85f.js +0 -664
  77. package/dist/index-eab5c85f.js.br +0 -0
  78. package/dist/store/tracking.d.ts +0 -16
package/dist/hotel.js.br CHANGED
Binary file
@@ -0,0 +1 @@
1
+ "use strict";const SelectField_vue_vue_type_style_index_0_lang=require("./SelectField.vue_vue_type_style_index_0_lang-727c44d8.cjs"),_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:i}){const l=i,t=e,s=t.id||SelectField_vue_vue_type_style_index_0_lang.ranId(),n=SelectField_vue_vue_type_style_index_0_lang.ref("+45"),d=SelectField_vue_vue_type_style_index_0_lang.ref("");function p(){l("update:modelValue",`${n.value} ${d.value}`)}return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{if(t.modelValue){const _=t.modelValue.split(" ");n.value=_[0],d.value=_[1]}}),(_,u)=>(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(s),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(SelectField_vue_vue_type_style_index_0_lang.TextField,{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=r=>n.value=r),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:u[1]||(u[1]=r=>p())},null,8,["modelValue","id","icon","icon-color","icon-type","required","readonly","input-style"]),SelectField_vue_vue_type_style_index_0_lang.createVNode(SelectField_vue_vue_type_style_index_0_lang.TextField,{modelValue:d.value,"onUpdate:modelValue":u[2]||(u[2]=r=>d.value=r),type:"number",name:"phone",autocomplete:"tel-national",id:SelectField_vue_vue_type_style_index_0_lang.unref(s),placeholder:_.placeholder,required:_.required,readonly:_.readonly,"input-style":_.inputStyle,onInput:u[3]||(u[3]=r=>p())},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:i}){const l=e,t=i;function s(){l.readonly!==!0&&t("update:modelValue",l.type==="radio"?l.val:l.numeric?l.modelValue?0:1:!l.modelValue)}return(n,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,{required:n.required,type:n.type,readonly:n.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":n.readonly},{"has-label":n.label},n.type==="radio"?"radio":"checkbox"])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("input",SelectField_vue_vue_type_style_index_0_lang.mergeProps(n.$attrs,{required:!!n.required,type:n.type,name:n.name,class:"hidden",readonly:!!n.readonly,disabled:!!n.readonly,value:n.type==="radio"?n.val:n.modelValue,checked:n.type==="radio"?n.val===n.modelValue:!!n.modelValue,onChange:d[0]||(d[0]=p=>s())}),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:n.type==="radio"?n.val===n.modelValue:!!n.modelValue}]),tabindex:"0",style:SelectField_vue_vue_type_style_index_0_lang.normalizeStyle(n.inputStyle),"data-test":n.name,onKeyup:d[1]||(d[1]=SelectField_vue_vue_type_style_index_0_lang.withKeys(p=>s(),["enter"]))},null,46,_hoisted_2$2),n.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":n.price}])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("span",null,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(n.label),1),n.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(n.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:i}=SelectField_vue_vue_type_style_index_0_lang.useI18n();return(l,t)=>(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(i)("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(i)("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(i)("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(i)("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(i)("googleApply"))+". ",1)]))}});function block0(e){const i=e;i.__i18n=i.__i18n||[],i.__i18n.push({locale:"",resource:{da:{googleNotice:l=>{const{normalize:t}=l;return t(["Denne side er beskyttet af reCAPTCHA og Google's"])},googlePrivacyPolicy:l=>{const{normalize:t}=l;return t(["Privatlivspolitik"])},googleAnd:l=>{const{normalize:t}=l;return t(["og"])},googleTOS:l=>{const{normalize:t}=l;return t(["Servicevilkår"])},googleApply:l=>{const{normalize:t}=l;return t(["er gældende"])}},en:{googleNotice:l=>{const{normalize:t}=l;return t(["This site is protected by reCAPTCHA and the Google"])},googlePrivacyPolicy:l=>{const{normalize:t}=l;return t(["Privacy Policy"])},googleAnd:l=>{const{normalize:t}=l;return t(["and"])},googleTOS:l=>{const{normalize:t}=l;return t(["Terms of Service"])},googleApply:l=>{const{normalize:t}=l;return t(["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:i}=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 l=document.createElement("script"),t=document.createElement("script");l.setAttribute("src","https://checkout.dibspayment.eu/v1/checkout.js?v=1"),t.setAttribute("src","https://checkout.reepay.com/checkout.js"),document.head.appendChild(l),document.head.appendChild(t)}),(l,t)=>(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(i)===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,i,l)=>i in e?a(e,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[i]=l,o=(e,i,l)=>(c(e,typeof i!="symbol"?i+"":i,l),l);const namespace="@@vue3-sticky-directive",events=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],batchStyle=(e,i={},l={})=>{for(let t in i)e.style[t]=i[t];for(let t in l)l[t]&&!e.classList.contains(t)?e.classList.add(t):!l[t]&&e.classList.contains(t)&&e.classList.remove(t)};class Sticky{constructor(e,i){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=i,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 l=this.getAttribute("sticky-offset")||{},t=this.getAttribute("sticky-side")||"top",s=this.getAttribute("sticky-z-index")||"10",n=this.getAttribute("on-stick")||null;this.options={topOffset:Number(l.top)||0,bottomOffset:Number(l.bottom)||0,shouldTopSticky:t==="top"||t==="both",shouldBottomSticky:t==="bottom"||t==="both",zIndex:s,onStick:n}}doBind(){if(this.unSubscribers.length>0)return;const{el:e,vm:i}=this;i.$nextTick(()=>{this.placeholderEl=document.createElement("div"),this.containerEl=this.getContainerEl(),e.parentElement.insertBefore(this.placeholderEl,e),events.forEach(l=>{const t=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(l,t)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(l,t)),window.addEventListener(l,t,{passive:!0}),this.containerEl.addEventListener(l,t,{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,i=this.state.containerElRect.bottom,l=this.options.topOffset,t=this.options.bottomOffset;return e<=l&&i>=t}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;const e=window.innerHeight-this.state.placeholderElRect.top-this.state.height,i=window.innerHeight-this.state.containerElRect.top,l=this.options.topOffset,t=this.options.bottomOffset;return e<=t&&i>=l}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},i={position:"static",top:"auto",bottom:"auto",left:"auto",width:"auto",zIndex:this.options.zIndex},l={"vue-sticky-placeholder":!0},t={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){i.position="fixed",i.top=this.options.topOffset+"px",i.left=this.state.xOffset+"px",i.width=this.state.width+"px";const s=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;s<0&&(i.top=s+this.options.topOffset+"px"),e.paddingTop=this.state.height+"px",t["top-sticky"]=!0}else if(this.state.isBottomSticky){i.position="fixed",i.bottom=this.options.bottomOffset+"px",i.left=this.state.xOffset+"px",i.width=this.state.width+"px";const s=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;s<0&&(i.bottom=s+this.options.bottomOffset+"px"),e.paddingTop=this.state.height+"px",t["bottom-sticky"]=!0}else e.paddingTop=0;batchStyle(this.el,i,t),batchStyle(this.placeholderEl,e,l),this.fireEvents()}resetElement(){["position","top","bottom","left","width","zIndex"].forEach(i=>{this.el.style.removeProperty(i)}),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,i){(typeof i.value>"u"||i.value)&&(e[namespace]=new Sticky(e,i.instance),e[namespace].doBind())},unmounted(e){e[namespace]&&(e[namespace].doUnbind(),e[namespace]=void 0)},updated(e,i){typeof i.value>"u"||i.value?(e[namespace]||(e[namespace]=new Sticky(e,i.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;
@@ -0,0 +1,405 @@
1
+ import { h as defineComponent, j as ranId, r as ref, o as onMounted, k as openBlock, l as createBlock, w as withCtx, x as createBaseVNode, m as createVNode, n as unref, T as TextField, I as InputField, _ as _export_sfc, ai as mergeProps, v as normalizeClass, aj as normalizeStyle, ak as withKeys, q as createElementBlock, A as toDisplayString, t as createCommentVNode, z as useI18n, a5 as createTextVNode, s as storeToRefs, a as useUtilityStore, R as PaymentGateway, L as pushScopeId, M as popScopeId } from "./SelectField.vue_vue_type_style_index_0_lang-f136675d.js";
2
+ const _hoisted_1$3 = { class: "fresh-booking-phone-input" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3
+ __name: "PhoneField",
4
+ props: {
5
+ modelValue: {},
6
+ label: {},
7
+ id: {},
8
+ placeholder: {},
9
+ icon: { default: "phone-office" },
10
+ iconColor: {},
11
+ iconType: { default: "fal" },
12
+ required: { type: Boolean, default: !1 },
13
+ readonly: { type: Boolean, default: !1 },
14
+ inputStyle: {}
15
+ },
16
+ emits: ["update:modelValue"],
17
+ setup(e, { emit: s }) {
18
+ const i = s, t = e, r = t.id || ranId(), n = ref("+45"), d = ref("");
19
+ function h() {
20
+ i("update:modelValue", `${n.value} ${d.value}`);
21
+ }
22
+ return onMounted(() => {
23
+ if (t.modelValue) {
24
+ const l = t.modelValue.split(" ");
25
+ n.value = l[0], d.value = l[1];
26
+ }
27
+ }), (l, p) => (openBlock(), createBlock(InputField, {
28
+ label: l.label,
29
+ id: unref(r),
30
+ type: "phone",
31
+ required: l.required,
32
+ readonly: l.readonly
33
+ }, {
34
+ default: withCtx(() => [
35
+ createBaseVNode("div", _hoisted_1$3, [
36
+ createVNode(TextField, {
37
+ modelValue: n.value,
38
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => n.value = u),
39
+ type: "text",
40
+ id: unref(ranId)(),
41
+ name: "phone-code",
42
+ autocomplete: "tel-country-code",
43
+ icon: l.icon,
44
+ "icon-color": l.iconColor,
45
+ "icon-type": l.iconType,
46
+ placeholder: "+45",
47
+ required: l.required,
48
+ readonly: l.readonly,
49
+ "input-style": l.inputStyle,
50
+ onInput: p[1] || (p[1] = (u) => h())
51
+ }, null, 8, ["modelValue", "id", "icon", "icon-color", "icon-type", "required", "readonly", "input-style"]),
52
+ createVNode(TextField, {
53
+ modelValue: d.value,
54
+ "onUpdate:modelValue": p[2] || (p[2] = (u) => d.value = u),
55
+ type: "number",
56
+ name: "phone",
57
+ autocomplete: "tel-national",
58
+ id: unref(r),
59
+ placeholder: l.placeholder,
60
+ required: l.required,
61
+ readonly: l.readonly,
62
+ "input-style": l.inputStyle,
63
+ onInput: p[3] || (p[3] = (u) => h())
64
+ }, null, 8, ["modelValue", "id", "placeholder", "required", "readonly", "input-style"])
65
+ ])
66
+ ]),
67
+ _: 1
68
+ }, 8, ["label", "id", "required", "readonly"]));
69
+ }
70
+ }), PhoneField_vue_vue_type_style_index_0_scoped_5cd094ab_lang = "", PhoneField = /* @__PURE__ */ _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 = /* @__PURE__ */ defineComponent({
71
+ __name: "Checkbox",
72
+ props: {
73
+ modelValue: { type: [String, Boolean, Number] },
74
+ numeric: { type: Boolean, default: !1 },
75
+ checked: { type: Boolean, default: !1 },
76
+ label: {},
77
+ price: {},
78
+ name: {},
79
+ readonly: { type: Boolean, default: !1 },
80
+ type: { default: "checkbox" },
81
+ required: { type: Boolean, default: !1 },
82
+ inputStyle: {},
83
+ val: {}
84
+ },
85
+ emits: ["update:modelValue"],
86
+ setup(e, { emit: s }) {
87
+ const i = e, t = s;
88
+ function r() {
89
+ i.readonly !== !0 && t(
90
+ "update:modelValue",
91
+ i.type === "radio" ? i.val : i.numeric ? i.modelValue ? 0 : 1 : !i.modelValue
92
+ );
93
+ }
94
+ return (n, d) => (openBlock(), createBlock(InputField, {
95
+ required: n.required,
96
+ type: n.type,
97
+ readonly: n.readonly
98
+ }, {
99
+ default: withCtx(() => [
100
+ createBaseVNode("label", {
101
+ class: normalizeClass([
102
+ "fresh-booking-click-box-container",
103
+ { "is-readonly": n.readonly },
104
+ { "has-label": n.label },
105
+ n.type === "radio" ? "radio" : "checkbox"
106
+ ])
107
+ }, [
108
+ createBaseVNode("input", mergeProps(n.$attrs, {
109
+ required: !!n.required,
110
+ type: n.type,
111
+ name: n.name,
112
+ class: "hidden",
113
+ readonly: !!n.readonly,
114
+ disabled: !!n.readonly,
115
+ value: n.type === "radio" ? n.val : n.modelValue,
116
+ checked: n.type === "radio" ? n.val === n.modelValue : !!n.modelValue,
117
+ onChange: d[0] || (d[0] = (h) => r())
118
+ }), null, 16, _hoisted_1$2),
119
+ createBaseVNode("div", {
120
+ class: normalizeClass([
121
+ "fresh-booking-click-box",
122
+ { checked: n.type === "radio" ? n.val === n.modelValue : !!n.modelValue }
123
+ ]),
124
+ tabindex: "0",
125
+ style: normalizeStyle(n.inputStyle),
126
+ "data-test": n.name,
127
+ onKeyup: d[1] || (d[1] = withKeys((h) => r(), ["enter"]))
128
+ }, null, 46, _hoisted_2$2),
129
+ n.label ? (openBlock(), createElementBlock("div", {
130
+ key: 0,
131
+ class: normalizeClass(["fresh-booking-click-box-label", { "with-price": n.price }])
132
+ }, [
133
+ createBaseVNode("span", null, toDisplayString(n.label), 1),
134
+ n.price ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(n.price), 1)) : createCommentVNode("", !0)
135
+ ], 2)) : createCommentVNode("", !0)
136
+ ], 2)
137
+ ]),
138
+ _: 1
139
+ }, 8, ["required", "type", "readonly"]));
140
+ }
141
+ }), Checkbox_vue_vue_type_style_index_0_scoped_7ef656cb_lang = "", Checkbox = /* @__PURE__ */ _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 = /* @__PURE__ */ defineComponent({
142
+ __name: "GoogleNotice",
143
+ setup(e) {
144
+ const { t: s } = useI18n();
145
+ return (i, t) => (openBlock(), createElementBlock("span", null, [
146
+ createTextVNode(toDisplayString(unref(s)("googleNotice")) + " ", 1),
147
+ createBaseVNode("a", _hoisted_1$1, toDisplayString(unref(s)("googlePrivacyPolicy")), 1),
148
+ createTextVNode(" " + toDisplayString(unref(s)("googleAnd")) + " ", 1),
149
+ createBaseVNode("a", _hoisted_2$1, toDisplayString(unref(s)("googleTOS")), 1),
150
+ createTextVNode(" " + toDisplayString(unref(s)("googleApply")) + ". ", 1)
151
+ ]));
152
+ }
153
+ });
154
+ function block0(e) {
155
+ const s = e;
156
+ s.__i18n = s.__i18n || [], s.__i18n.push({
157
+ locale: "",
158
+ resource: {
159
+ da: {
160
+ googleNotice: (i) => {
161
+ const { normalize: t } = i;
162
+ return t(["Denne side er beskyttet af reCAPTCHA og Google's"]);
163
+ },
164
+ googlePrivacyPolicy: (i) => {
165
+ const { normalize: t } = i;
166
+ return t(["Privatlivspolitik"]);
167
+ },
168
+ googleAnd: (i) => {
169
+ const { normalize: t } = i;
170
+ return t(["og"]);
171
+ },
172
+ googleTOS: (i) => {
173
+ const { normalize: t } = i;
174
+ return t(["Servicevilkår"]);
175
+ },
176
+ googleApply: (i) => {
177
+ const { normalize: t } = i;
178
+ return t(["er gældende"]);
179
+ }
180
+ },
181
+ en: {
182
+ googleNotice: (i) => {
183
+ const { normalize: t } = i;
184
+ return t(["This site is protected by reCAPTCHA and the Google"]);
185
+ },
186
+ googlePrivacyPolicy: (i) => {
187
+ const { normalize: t } = i;
188
+ return t(["Privacy Policy"]);
189
+ },
190
+ googleAnd: (i) => {
191
+ const { normalize: t } = i;
192
+ return t(["and"]);
193
+ },
194
+ googleTOS: (i) => {
195
+ const { normalize: t } = i;
196
+ return t(["Terms of Service"]);
197
+ },
198
+ googleApply: (i) => {
199
+ const { normalize: t } = i;
200
+ return t(["apply"]);
201
+ }
202
+ }
203
+ }
204
+ });
205
+ }
206
+ typeof block0 == "function" && block0(_sfc_main$1);
207
+ const _withScopeId = (e) => (pushScopeId("data-v-340cb9ce"), e = e(), popScopeId(), e), _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { id: "fresh-booking-payment-checkout" }, null, -1)), _hoisted_2 = [
208
+ _hoisted_1
209
+ ], _sfc_main = /* @__PURE__ */ defineComponent({
210
+ __name: "CheckoutWindow",
211
+ setup(e) {
212
+ const { paymentGatewayId: s } = storeToRefs(useUtilityStore());
213
+ return onMounted(() => {
214
+ const i = document.createElement("script"), t = document.createElement("script");
215
+ i.setAttribute("src", "https://checkout.dibspayment.eu/v1/checkout.js?v=1"), t.setAttribute("src", "https://checkout.reepay.com/checkout.js"), document.head.appendChild(i), document.head.appendChild(t);
216
+ }), (i, t) => (openBlock(), createElementBlock("div", null, [
217
+ createBaseVNode("div", {
218
+ id: "fresh-booking-payment-checkout-wrapper",
219
+ class: normalizeClass({ reePay: unref(s) === unref(PaymentGateway).ReePay })
220
+ }, _hoisted_2, 2)
221
+ ]));
222
+ }
223
+ }), CheckoutWindow_vue_vue_type_style_index_0_scoped_340cb9ce_lang = "", CheckoutWindow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-340cb9ce"]]);
224
+ var a = Object.defineProperty, c = (e, s, i) => s in e ? a(e, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[s] = i, o = (e, s, i) => (c(e, typeof s != "symbol" ? s + "" : s, i), i);
225
+ const namespace = "@@vue3-sticky-directive", events = [
226
+ "resize",
227
+ "scroll",
228
+ "touchstart",
229
+ "touchmove",
230
+ "touchend",
231
+ "pageshow",
232
+ "load"
233
+ ], batchStyle = (e, s = {}, i = {}) => {
234
+ for (let t in s)
235
+ e.style[t] = s[t];
236
+ for (let t in i)
237
+ i[t] && !e.classList.contains(t) ? e.classList.add(t) : !i[t] && e.classList.contains(t) && e.classList.remove(t);
238
+ };
239
+ class Sticky {
240
+ constructor(e, s) {
241
+ 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 = s, this.unSubscribers = [], this.isPending = !1, this.state = {
242
+ isTopSticky: null,
243
+ isBottomSticky: null,
244
+ height: null,
245
+ width: null,
246
+ xOffset: null
247
+ }, this.lastState = {
248
+ top: null,
249
+ bottom: null,
250
+ sticked: !1
251
+ };
252
+ const i = this.getAttribute("sticky-offset") || {}, t = this.getAttribute("sticky-side") || "top", r = this.getAttribute("sticky-z-index") || "10", n = this.getAttribute("on-stick") || null;
253
+ this.options = {
254
+ topOffset: Number(i.top) || 0,
255
+ bottomOffset: Number(i.bottom) || 0,
256
+ shouldTopSticky: t === "top" || t === "both",
257
+ shouldBottomSticky: t === "bottom" || t === "both",
258
+ zIndex: r,
259
+ onStick: n
260
+ };
261
+ }
262
+ doBind() {
263
+ if (this.unSubscribers.length > 0)
264
+ return;
265
+ const { el: e, vm: s } = this;
266
+ s.$nextTick(() => {
267
+ this.placeholderEl = document.createElement("div"), this.containerEl = this.getContainerEl(), e.parentElement.insertBefore(this.placeholderEl, e), events.forEach((i) => {
268
+ const t = this.update.bind(this);
269
+ this.unSubscribers.push(() => window.removeEventListener(i, t)), this.unSubscribers.push(() => this.containerEl.removeEventListener(i, t)), window.addEventListener(i, t, { passive: !0 }), this.containerEl.addEventListener(i, t, { passive: !0 });
270
+ });
271
+ });
272
+ }
273
+ doUnbind() {
274
+ this.unSubscribers.forEach((e) => e()), this.unSubscribers = [], this.resetElement();
275
+ }
276
+ update() {
277
+ this.isPending || (requestAnimationFrame(() => {
278
+ this.isPending = !1, this.recomputeState(), this.updateElements();
279
+ }), this.isPending = !0);
280
+ }
281
+ isTopSticky() {
282
+ if (!this.options.shouldTopSticky)
283
+ return !1;
284
+ const e = this.state.placeholderElRect.top, s = this.state.containerElRect.bottom, i = this.options.topOffset, t = this.options.bottomOffset;
285
+ return e <= i && s >= t;
286
+ }
287
+ isBottomSticky() {
288
+ if (!this.options.shouldBottomSticky)
289
+ return !1;
290
+ const e = window.innerHeight - this.state.placeholderElRect.top - this.state.height, s = window.innerHeight - this.state.containerElRect.top, i = this.options.topOffset, t = this.options.bottomOffset;
291
+ return e <= t && s >= i;
292
+ }
293
+ recomputeState() {
294
+ this.state = Object.assign({}, this.state, {
295
+ height: this.getHeight(),
296
+ width: this.getWidth(),
297
+ xOffset: this.getXOffset(),
298
+ placeholderElRect: this.getPlaceholderElRect(),
299
+ containerElRect: this.getContainerElRect()
300
+ }), this.state.isTopSticky = this.isTopSticky(), this.state.isBottomSticky = this.isBottomSticky();
301
+ }
302
+ fireEvents() {
303
+ 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 = {
304
+ top: this.state.isTopSticky,
305
+ bottom: this.state.isBottomSticky,
306
+ sticked: this.state.isBottomSticky || this.state.isTopSticky
307
+ }, this.options.onStick(this.lastState));
308
+ }
309
+ updateElements() {
310
+ const e = {
311
+ paddingTop: 0
312
+ }, s = {
313
+ position: "static",
314
+ top: "auto",
315
+ bottom: "auto",
316
+ left: "auto",
317
+ width: "auto",
318
+ zIndex: this.options.zIndex
319
+ }, i = {
320
+ "vue-sticky-placeholder": !0
321
+ }, t = {
322
+ "vue-sticky-el": !0,
323
+ "top-sticky": !1,
324
+ "bottom-sticky": !1
325
+ };
326
+ if (this.state.isTopSticky) {
327
+ s.position = "fixed", s.top = this.options.topOffset + "px", s.left = this.state.xOffset + "px", s.width = this.state.width + "px";
328
+ const r = this.state.containerElRect.bottom - this.state.height - this.options.bottomOffset - this.options.topOffset;
329
+ r < 0 && (s.top = r + this.options.topOffset + "px"), e.paddingTop = this.state.height + "px", t["top-sticky"] = !0;
330
+ } else if (this.state.isBottomSticky) {
331
+ s.position = "fixed", s.bottom = this.options.bottomOffset + "px", s.left = this.state.xOffset + "px", s.width = this.state.width + "px";
332
+ const r = window.innerHeight - this.state.containerElRect.top - this.state.height - this.options.bottomOffset - this.options.topOffset;
333
+ r < 0 && (s.bottom = r + this.options.bottomOffset + "px"), e.paddingTop = this.state.height + "px", t["bottom-sticky"] = !0;
334
+ } else
335
+ e.paddingTop = 0;
336
+ batchStyle(this.el, s, t), batchStyle(this.placeholderEl, e, i), this.fireEvents();
337
+ }
338
+ resetElement() {
339
+ ["position", "top", "bottom", "left", "width", "zIndex"].forEach((s) => {
340
+ this.el.style.removeProperty(s);
341
+ }), this.el.classList.remove("bottom-sticky", "top-sticky");
342
+ const { parentElement: e } = this.placeholderEl;
343
+ e && e.removeChild(this.placeholderEl);
344
+ }
345
+ getContainerEl() {
346
+ let e = this.el.parentElement;
347
+ for (; e && e.tagName !== "HTML" && e.tagName !== "BODY" && e.nodeType === 1; ) {
348
+ if (e.hasAttribute("sticky-container"))
349
+ return e;
350
+ e = e.parentElement;
351
+ }
352
+ return this.el.parentElement;
353
+ }
354
+ getXOffset() {
355
+ return this.placeholderEl.getBoundingClientRect().left;
356
+ }
357
+ getWidth() {
358
+ return this.placeholderEl.getBoundingClientRect().width;
359
+ }
360
+ getHeight() {
361
+ return this.el.getBoundingClientRect().height;
362
+ }
363
+ getPlaceholderElRect() {
364
+ return this.placeholderEl.getBoundingClientRect();
365
+ }
366
+ getContainerElRect() {
367
+ return this.containerEl.getBoundingClientRect();
368
+ }
369
+ getAttribute(name) {
370
+ const expr = this.el.getAttribute(name);
371
+ let result;
372
+ if (expr)
373
+ if (this.vm[expr])
374
+ result = this.vm[expr];
375
+ else
376
+ try {
377
+ result = eval(`(${expr})`);
378
+ } catch (e) {
379
+ result = expr;
380
+ }
381
+ return result;
382
+ }
383
+ }
384
+ const Sticky$1 = {
385
+ mounted(e, s) {
386
+ (typeof s.value > "u" || s.value) && (e[namespace] = new Sticky(e, s.instance), e[namespace].doBind());
387
+ },
388
+ unmounted(e) {
389
+ e[namespace] && (e[namespace].doUnbind(), e[namespace] = void 0);
390
+ },
391
+ updated(e, s) {
392
+ typeof s.value > "u" || s.value ? (e[namespace] || (e[namespace] = new Sticky(e, s.instance)), e[namespace].doBind()) : e[namespace] && e[namespace].doUnbind();
393
+ }
394
+ }, StickyPlugin = {
395
+ install(e) {
396
+ e.directive("Sticky", Sticky$1);
397
+ }
398
+ };
399
+ export {
400
+ Checkbox as C,
401
+ PhoneField as P,
402
+ StickyPlugin as S,
403
+ _sfc_main$1 as _,
404
+ CheckoutWindow as a
405
+ };
Binary file