(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Review-ShowCoupon-vue"],{"269a":function(t,e){t.exports=function(t,e){var o="function"===typeof t.exports?t.exports.extendOptions:t.options;for(var s in"function"===typeof t.exports&&(o.directives=t.exports.options.directives),o.directives=o.directives||{},e)o.directives[s]=o.directives[s]||e[s]}},"277e":function(t,e,o){"use strict";o("a9e3");var s=o("f977"),a=o("d9bd"),i=o("2b0e");e["a"]=i["default"].extend({name:"scrollable",directives:{Scroll:s["a"]},props:{scrollTarget:String,scrollThreshold:[String,Number]},data:function(){return{currentScroll:0,currentThreshold:0,isActive:!1,isScrollingUp:!1,previousScroll:0,savedScroll:0,target:null}},computed:{canScroll:function(){return"undefined"!==typeof window},computedScrollThreshold:function(){return this.scrollThreshold?Number(this.scrollThreshold):300}},watch:{isScrollingUp:function(){this.savedScroll=this.savedScroll||this.currentScroll},isActive:function(){this.savedScroll=0}},mounted:function(){this.scrollTarget&&(this.target=document.querySelector(this.scrollTarget),this.target||Object(a["c"])("Unable to locate element with identifier ".concat(this.scrollTarget),this))},methods:{onScroll:function(){var t=this;this.canScroll&&(this.previousScroll=this.currentScroll,this.currentScroll=this.target?this.target.scrollTop:window.pageYOffset,this.isScrollingUp=this.currentScroll<this.previousScroll,this.currentThreshold=Math.abs(this.currentScroll-this.computedScrollThreshold),this.$nextTick((function(){Math.abs(t.currentScroll-t.savedScroll)>t.computedScrollThreshold&&t.thresholdMet()})))},thresholdMet:function(){}}})},3860:function(t,e,o){"use strict";var s=o("604c");e["a"]=s["a"].extend({name:"button-group",provide:function(){return{btnToggle:this}},computed:{classes:function(){return s["a"].options.computed.classes.call(this)}},methods:{genData:s["a"].options.methods.genData}})},"6f9c":function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"scroll-threshold-example"}},[o("div",[t.settings?o("div",{staticClass:"mt-5"},[o("v-row",{class:t.$vuetify.breakpoint.smAndDown?"":"mx-1"},[o("v-col",{attrs:{cols:"12"}},[o("v-container",{staticStyle:{"max-width":"900px"}},[o("v-row",{staticClass:"px-3"},[t.settings?[o("v-card-text",[o("v-card",{staticClass:"text-h5 neu-glow text-center"},[o("div",{staticClass:"mt-3"},["ireview"==t.settings.origin?o("v-img",{staticClass:"mx-auto",attrs:{src:"https://ibookrestaurant.com/static/users/pictures/coupons/"+t.settings.picture,"lazy-src":"https://ibookrestaurant.com/static/users/pictures/coupons/"+t.settings.picture}}):o("v-img",{staticClass:"mx-auto",attrs:{src:"https://ibookrestaurant.com/static/users/pictures/wa/"+t.settings.picture,"lazy-src":"https://ibookrestaurant.com/static/users/pictures/wa/"+t.settings.picture}})],1)])],1),o("v-card-text",[o("v-card",{staticClass:"pa-4 neu-glow text-h6"},[o("p",{staticClass:"font-weight-bold text-h5"},[t._v(t._s(t.settings.options.brand))]),o("p",[t._v(t._s(t.settings.couponText1))]),o("p",[t._v(t._s(t.$t(t.page+".Coupon is valid until"))+" "+t._s(t.settings.expiry)+", ")]),7!=t.settings.validDoW.length?o("p",[t._v(" "+t._s(t.$t(t.page+".Coupon can be consumed only on"))+" "),t._l(t.dows.filter((function(e){return t.settings.validDoW.includes(e.code)})),(function(e,s){return o("span",{key:s},[t._v(" "+t._s(e[t.locale].substring(0,9).toUpperCase())+t._s(s<=t.dows.filter((function(e){return t.settings.validDoW.includes(e.code)})).length-2?",":""))])})),t._v(", ")],2):t._e(),o("p",[t.settings.maxCovers>0?o("span",[t._v(", "+t._s(t.$t(t.page+".and for not more than"))+" "+t._s(t.settings.maxCovers)+" "+t._s(t.$t(t.page+".persons")))]):t._e()])])],1),o("v-card-text",[t.settings.spentDate||t.settings.expired?t.settings.spentDate?o("v-card",{staticClass:"pa-4 neu-glow text-center"},[o("v-row",[o("v-col",[o("div",{staticClass:"text-h5 warning--text"},[t._v(" "+t._s(t.$t(t.page+".Sorry, Coupon already spent on")+" "+t.settings.spentDate)+" ")])])],1)],1):o("v-card",{staticClass:"pa-4 neu-glow text-center"},[o("v-row",[o("v-col",[o("div",{staticClass:"text-h5 warning--text"},[t._v(" "+t._s(t.$t(t.page+".Sorry, Coupon expired on")+" "+t.settings.expiry)+" ")])])],1)],1):o("v-card",{staticClass:"pa-4 neu-glow text-center"},[o("v-row",[o("v-col",[o("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.$t(t.page+".Show this QR Code to the waiter if requested"))+" ")])])],1),o("v-row",{staticClass:"text-center white theme--light"},[o("v-col",{staticClass:"d-flex justify-center"},[o("div",{staticClass:"px-4 pt-4 pb-2 white text-center",staticStyle:{background:"url( '/static/users/pictures/white_300_300.jpg') no-repeat center center","background-size":"cover"}},[o("qrcode-vue",{attrs:{value:"https://ibookrestaurant.com/validateqr/?p="+t.settings.couponId,size:200,"render-as":"canvas",level:"L"}})],1)])],1)],1)],1)]:o("v-col",{attrs:{cols:"12"}},[o("v-card",{staticClass:"text-center neu-glow py-5"},[o("v-progress-circular",{attrs:{indeterminate:"",size:"300",width:"20",color:"info"}})],1)],1)],2)],1)],1)],1)],1):t._e()]),t.settings?o("v-btn",{directives:[{name:"scroll",rawName:"v-scroll",value:t.onScroll,expression:"onScroll"},{name:"show",rawName:"v-show",value:t.scrollToTop,expression:"scrollToTop"}],attrs:{fab:"",dark:"",small:"",fixed:"",bottom:"",right:"",color:t.settings.options.color},on:{click:t.toTop}},[o("v-icon",[t._v("keyboard_arrow_up")])],1):t._e(),t.settings?o("v-bottom-navigation",{staticClass:"mt-3 mb-4",staticStyle:{position:"unset"},attrs:{color:"orange",absolute:"","hide-on-scroll":"","scroll-target":"#scroll-threshold-example","scroll-threshold":"500"}},[t.settings.options.facebookURL?o("v-btn",{attrs:{href:t.settings.options.facebookURL}},[o("span",[t._v("Facebook")]),o("v-icon",{attrs:{color:"#3b5998"}},[t._v("mdi-facebook")])],1):t._e(),t.settings.options.instagramURL?o("v-btn",{attrs:{href:t.settings.options.instagramURL}},[o("span",[t._v("Instagram")]),o("v-icon",{attrs:{color:"#C13584"}},[t._v("mdi-instagram")])],1):t._e(),t.settings.options.youtubeURL?o("v-btn",{attrs:{href:t.settings.options.youtubeURL}},[o("span",[t._v("YouTube")]),o("v-icon",{attrs:{color:"#c4302b"}},[t._v("mdi-youtube")])],1):t._e(),t.settings.options.linkedInURL?o("v-btn",{attrs:{href:t.settings.options.linkedInURL}},[o("span",[t._v("LinkedIn")]),o("v-icon",{attrs:{color:"#0077b5"}},[t._v("mdi-linkedin")])],1):t._e()],1):t._e(),o("div",{attrs:{id:"scroll-threshold-example"}},[t._v("   ")]),o("v-snackbar",{attrs:{top:"",timeout:"2000",color:t.snackbar.color},model:{value:t.snackbar.active,callback:function(e){t.$set(t.snackbar,"active",e)},expression:"snackbar.active"}},[t._v(" "+t._s(t.snackbar.text)+" ")])],1)},a=[],i=(o("96cf"),o("1da1")),n=o("5530"),r=o("ade3"),c=o("2f62"),l=o("d7b0"),u={components:{QrcodeVue:l["a"]},data:function(){var t;return t={page:"Review",wHeight:window.innerHeight,wWidth:window.innerWidth,dialog_thanks:!1,dialog_leave_to_tripadvisor:!1,dialog_connection_error:!1},Object(r["a"])(t,"dialog_leave_to_tripadvisor",!1),Object(r["a"])(t,"dialog_duplicated",!1),Object(r["a"])(t,"loading",!1),Object(r["a"])(t,"origin",null),Object(r["a"])(t,"date",null),Object(r["a"])(t,"today",(new Date).toISOString().substring(0,10)),Object(r["a"])(t,"locale","it"),Object(r["a"])(t,"snackbar",{active:!1,color:"success",text:""}),Object(r["a"])(t,"reviewSaved",!1),Object(r["a"])(t,"uu",null),Object(r["a"])(t,"user",{}),Object(r["a"])(t,"booking",{firstName:null,lastName:null}),Object(r["a"])(t,"bookingId",null),Object(r["a"])(t,"totalScore",0),Object(r["a"])(t,"coupon",null),Object(r["a"])(t,"partialScore",0),Object(r["a"])(t,"review",{food:5,service:5,value:5,location:5,review:null}),Object(r["a"])(t,"settings",null),Object(r["a"])(t,"reviewPrizeValidUntil",null),Object(r["a"])(t,"QRCodeLink",null),Object(r["a"])(t,"payloads",null),Object(r["a"])(t,"hostname",null),Object(r["a"])(t,"locale",null),Object(r["a"])(t,"dows",[{code:1,it:"Lunedì",en:"Mondays"},{code:2,it:"Martedì",en:"Tuesdays"},{code:3,it:"Mercoledì",en:"Wednsdays"},{code:4,it:"Giovedì",en:"Thursdays"},{code:5,it:"Venerdì",en:"Fridays"},{code:6,it:"Sabato",en:"Saturdays"},{code:7,it:"Domenica",en:"Sundays"}]),t},created:function(){this.$vuetify.theme.dark=!0,sessionStorage.removeItem("jwt");var t=window.navigator.userLanguage||window.navigator.language;this.$store.dispatch("setLocale",t.substring(0,2)),this.locale=t.substring(0,2),this.couponId=this.$route.query.p,console.log(818,this.$route,this.$route.query,this.$route.query.p),this.origin=this.$route.path,console.log(347,this.origin);var e=window.location.hostname;this.QRCodeLink="https://"+e+"/qrcodevalidate/?p="+this.couponId,this.Authenticate(this.couponId)},mounted:function(){},computed:Object(n["a"])({},Object(c["b"])(["settings","countries"])),watch:{},methods:{addDaysFormatted:function(t){var e=new Date;return e.setDate(e.getDate()+t),e.toLocaleDateString(this.settings.locale,{weekday:"long",month:"long",day:"numeric"})},onScroll:function(t){if("undefined"!==typeof window){var e=window.pageYOffset||t.target.scrollTop||0;this.scrollToTop=e>20}},toTop:function(){this.$vuetify.goTo(0)},Authenticate:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function o(){var s,a;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return e.loading=!0,s=JSON.stringify({action:"AuthenticateCoupon",payload:{couponId:t}}),o.next=4,e.$http.post("/review/review.php",s);case 4:a=o.sent,console.log(1026,a),o.t0=a.data.errorid,o.next="0"===o.t0?9:"0001"===o.t0?13:"0006"===o.t0?14:16;break;case 9:return sessionStorage.setItem("jwt",a.data.jwt),e.settings=a.data.payloads,console.log(374,e.settings),o.abrupt("break",16);case 13:return o.abrupt("break",16);case 14:return e.$router.push("/auth/login").catch((function(){})),o.abrupt("break",16);case 16:e.loading=!1;case 17:case"end":return o.stop()}}),o)})))()}}},d=u,h=o("2877"),v=o("6544"),p=o.n(v),g=o("b81c"),b=o("8336"),f=o("b0af"),m=o("99d9"),w=o("62ad"),S=o("a523"),_=o("132d"),x=o("adda"),y=o("490a"),k=o("0fd9"),C=o("2db4"),O=o("269a"),j=o.n(O),T=o("f977"),$=Object(h["a"])(d,s,a,!1,null,null,null);e["default"]=$.exports;p()($,{VBottomNavigation:g["a"],VBtn:b["a"],VCard:f["a"],VCardText:m["c"],VCol:w["a"],VContainer:S["a"],VIcon:_["a"],VImg:x["a"],VProgressCircular:y["a"],VRow:k["a"],VSnackbar:C["a"]}),j()($,{Scroll:T["b"]})},b81c:function(t,e,o){"use strict";o("a9e3"),o("c7cd");var s=o("5530"),a=(o("dd43"),o("3a66")),i=o("3860"),n=o("a9ad"),r=o("24b2"),c=o("a452"),l=o("277e"),u=o("7560"),d=o("f2e7"),h=o("58df"),v=o("d9bd");e["a"]=Object(h["a"])(Object(a["a"])("bottom",["height","inputValue"]),n["a"],r["a"],Object(d["b"])("inputValue"),c["a"],l["a"],u["a"]).extend({name:"v-bottom-navigation",props:{activeClass:{type:String,default:"v-btn--active"},backgroundColor:String,grow:Boolean,height:{type:[Number,String],default:56},hideOnScroll:Boolean,horizontal:Boolean,inputValue:{type:Boolean,default:!0},mandatory:Boolean,shift:Boolean},data:function(){return{isActive:this.inputValue}},computed:{canScroll:function(){return l["a"].options.computed.canScroll.call(this)&&(this.hideOnScroll||!this.inputValue)},classes:function(){return{"v-bottom-navigation--absolute":this.absolute,"v-bottom-navigation--grow":this.grow,"v-bottom-navigation--fixed":!this.absolute&&(this.app||this.fixed),"v-bottom-navigation--horizontal":this.horizontal,"v-bottom-navigation--shift":this.shift}},styles:function(){return Object(s["a"])(Object(s["a"])({},this.measurableStyles),{},{transform:this.isActive?"none":"translateY(100%)"})}},created:function(){this.$attrs.hasOwnProperty("active")&&Object(v["a"])("active.sync","value or v-model",this)},methods:{thresholdMet:function(){this.isActive=!this.isScrollingUp,this.$emit("update:input-value",this.isActive)},updateApplication:function(){return this.$el?this.$el.clientHeight:0},updateValue:function(t){this.$emit("change",t)}},render:function(t){var e=this.setBackgroundColor(this.backgroundColor,{staticClass:"v-bottom-navigation",class:this.classes,style:this.styles,props:{activeClass:this.activeClass,mandatory:Boolean(this.mandatory||void 0!==this.value),value:this.internalValue},on:{change:this.updateValue}});return this.canScroll&&(e.directives=e.directives||[],e.directives.push({arg:this.scrollTarget,name:"scroll",value:this.onScroll})),t(i["a"],this.setTextColor(this.color,e),this.$slots.default)}})},dd43:function(t,e,o){},f977:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var s=o("53ca");function a(t,e){var o=e.modifiers||{},a=o.self,i=void 0!==a&&a,n=e.value,r="object"===Object(s["a"])(n)&&n.options||{passive:!0},c="function"===typeof n||"handleEvent"in n?n:n.handler,l=i?t:e.arg?document.querySelector(e.arg):window;l&&(l.addEventListener("scroll",c,r),t._onScroll={handler:c,options:r,target:i?void 0:l})}function i(t){if(t._onScroll){var e=t._onScroll,o=e.handler,s=e.options,a=e.target,i=void 0===a?t:a;i.removeEventListener("scroll",o,s),delete t._onScroll}}var n={inserted:a,unbind:i};e["b"]=n}}]);
//# sourceMappingURL=Review-ShowCoupon-vue.6d513fa4.js.map