(window.jsonpHiJiffyWidget=window.jsonpHiJiffyWidget||[]).push([[5],{510:function(t,e,n){"use strict";n.r(e);var i=n(980),o=n(881);for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);var r=n(58),a=Object(r.a)(o.default,i.a,i.b,!1,null,null,null);e.default=a.exports},718:function(t,e,n){"use strict";n.r(e);var i=n(735),o=n(720);for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);var r=n(58),a=Object(r.a)(o.default,i.a,i.b,!1,null,null,null);e.default=a.exports},720:function(t,e,n){"use strict";n.r(e);var i=n(721),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e.default=o.a},721:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(728)),o=r(n(39)),s=r(n(190));function r(t){return t&&t.__esModule?t:{default:t}}var a={left:"left",right:"right",center:"center"},l={initial:"initial","100%":"100%"},u={inline:"inline","inline-block":"inline-block",flex:"flex"},c={date:"ph-calendar-blank",adult:"ph-user",child:"ph-users-three",infant:"ph-baby",night:"ph-moon"};e.default={components:{IconLoader:s.default},props:{variant:{type:String,default:"body-S"},text:{type:[String,Array,Number],default:null},allowMarkdown:{type:Boolean,default:!1},alignment:{type:String,default:a.left,validator:function(t){return-1!==(0,i.default)(a).indexOf(t)}},width:{type:String,default:"initial",validator:function(t){return-1!==(0,i.default)(l).indexOf(t)}},display:{type:String,default:"inline",validator:function(t){return-1!==(0,i.default)(u).indexOf(t)}},color:{type:String,default:"unset"},iconType:{type:String,default:null}},computed:{dynamicStyle:function(){return{textAlign:a[this.alignment],width:l[this.width],display:u[this.display],color:"var("+this.color+")"}},iconTypeClass:function(){return c[this.iconType]||"squares-four"}},methods:{processedText:function(t){return t?Array.isArray(t)?t.join(" - "):this.allowMarkdown?o.default.processMarkdownText(t):t:""}}}},728:function(t,e,n){t.exports={default:n(733),__esModule:!0}},729:function(t,e,n){"use strict";n.r(e);var i=n(730),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e.default=o.a},730:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(884),s=(i=o)&&i.__esModule?i:{default:i};e.default={name:"FontPreloader",props:{fonts:{type:Array,default:function(){return[]}},context:{type:String,required:!1,default:null}},data:function(){return{loadCounter:0}},mounted:function(){var t=this,e=this.context?document.querySelector(this.context).contentWindow:window;this.fonts.forEach((function(n){new s.default(n,{},e).load().then((function(){t.$emit("loaded"),t.loadCounter+=1,t.loadCounter===t.fonts.length&&t.$emit("all-loaded")})).catch((function(){}))}))}}},732:function(t,e,n){var i=n(14),o=n(40),s=n(27),r=n(60).f;t.exports=function(t){return function(e){for(var n,a=s(e),l=o(a),u=l.length,c=0,d=[];u>c;)n=l[c++],i&&!r.call(a,n)||d.push(t?[n,a[n]]:a[n]);return d}}},733:function(t,e,n){n(734),t.exports=n(2).Object.values},734:function(t,e,n){var i=n(12),o=n(732)(!1);i(i.S,"Object",{values:function(t){return o(t)}})},735:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"text-component",class:t.variant,style:t.dynamicStyle},[t.iconType?n("IconLoader",{attrs:{icon:t.iconTypeClass,color:"#424F5A"}}):t._e(),t._v(" "),null===t.text?t._t("default"):n("span",{staticClass:"text-component__md",domProps:{innerHTML:t._s(t.processedText(t.text))}})],2)},o=[]},881:function(t,e,n){"use strict";n.r(e);var i=n(882),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e.default=o.a},882:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=f(n(123)),s=f(n(124)),r=f(n(121)),a=n(122),l=f(n(39)),u=f(n(718)),c=f(n(883)),d=f(n(885));function f(t){return t&&t.__esModule?t:{default:t}}e.default={components:{TextComponent:u.default,FontPreloader:c.default},mixins:[d.default],data:function(){return{show:!1,timerShow:null,timerHide:null}},computed:(0,r.default)({},(0,a.mapGetters)({alignment:"widgetAlignment",showMaxTimes:"showMaxTimes",getChannelButton:"getChannelButton"}),(0,a.mapGetters)(["defaultWelcomeMessage","getShowWelcome"]),(0,a.mapState)({trans:"translations"}),(0,a.mapState)(["showHomeWithOptions","visibleGreeting","loggedOnFb","widget","enduser","viewportSize"]),{crossColor:function(){return"fill: #424f5a"},buttonColor:function(){return"color: "+this.widget.color},replyColor:function(){return"background-color: "+this.widget.color+"; color:#FFFFFF; border: "+this.widget.color+" !important"},webButton:function(){return this.getChannelButton("WEBCHAT")},fbButton:function(){return this.getChannelButton("MESSENGER")},greetingContainerClass:function(){return{"align-left":"left"===this.alignment,"mobile-container":l.default.isMobileDevice()&&this.fbButton,"outline-buttons":this.showHomeWithOptions}}}),watch:{getShowWelcome:{handler:function(){var t=this;this.$nextTick((function(){t.updateDimensions(t.$refs.greetingContainer)}))}},show:{handler:function(t){if(t){this.setShowCloseWelcome(!0);var e="wg_"+this.$store.state.widget.token,n=this.$store.state.widget.showWelcomeMaxTimes;this.$cookies.isKey(e+"_hj_hm_mx")&&(n=parseInt(this.$cookies.get(e+"_hj_hm_mx"),10)-1),void 0!==n&&this.$store.dispatch("setCookie",{name:"hj_hm_mx",value:n<0?0:n}),this.showGreetingMessage()}else this.hideGreetingMessage()}}},mounted:(i=(0,s.default)(o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:clearTimeout(this.timerShow),clearTimeout(this.timerHide),this.updateDimensions(this.$refs.greetingContainer),this.visibleGreeting?this.showWelcome(!0):this.showMaxTimes&&this.initWelcomeBox();case 4:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)}),methods:(0,r.default)({},(0,a.mapActions)(["showGreetingMessage","hideGreetingMessage","setVisibleChatContainer","loadChannelChat","manageGreetingVisibility","setShowCloseWelcome"]),{manageGreetingClick:function(){this.showHomeWithOptions||this.loadChannelChat(this.webButton)},initWelcomeBox:function(){this.showWelcome(!0)},welcomeAutoHideInit:function(){var t=this;this.timerHide=setTimeout((function(){t.showWelcome(!1)}),this.$store.state.welcomeAutoHide)},showWelcome:function(t){this.show=t,!1===t&&this.manageGreetingVisibility(!1)}})}},883:function(t,e,n){"use strict";n.r(e);var i=n(894),o=n(729);for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);var r=n(58),a=Object(r.a)(o.default,i.a,i.b,!1,null,null,null);e.default=a.exports},884:function(t,e,n){!function(){function e(t,e){document.addEventListener?t.addEventListener("scroll",e,!1):t.attachEvent("scroll",e)}function n(t){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(t)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function i(t,e){t.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+e+";"}function o(t){var e=t.g.offsetWidth,n=e+100;return t.j.style.width=n+"px",t.i.scrollLeft=n,t.h.scrollLeft=t.h.scrollWidth+100,t.l!==e&&(t.l=e,!0)}function s(t,n){function i(){var t=s;o(t)&&null!==t.g.parentNode&&n(t.l)}var s=t;e(t.h,i),e(t.i,i),o(t)}function r(t,e,n){e=e||{},n=n||window,this.family=t,this.style=e.style||"normal",this.weight=e.weight||"normal",this.stretch=e.stretch||"normal",this.context=n}var a=null,l=null,u=null,c=null;function d(t){return null===c&&(c=!!t.document.fonts),c}function f(t,e){var n=t.style,i=t.weight;if(null===u){var o=document.createElement("div");try{o.style.font="condensed 100px sans-serif"}catch(t){}u=""!==o.style.font}return[n,i,u?t.stretch:"","100px",e].join(" ")}r.prototype.load=function(t,e){var o=this,r=t||"BESbswy",u=0,c=e||3e3,h=(new Date).getTime();return new Promise((function(t,e){if(d(o.context)&&!function(t){return null===l&&(d(t)&&/Apple/.test(window.navigator.vendor)?(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),l=!!t&&603>parseInt(t[1],10)):l=!1),l}(o.context)){var m=new Promise((function(t,e){!function n(){(new Date).getTime()-h>=c?e(Error(c+"ms timeout exceeded")):o.context.document.fonts.load(f(o,'"'+o.family+'"'),r).then((function(e){1<=e.length?t():setTimeout(n,25)}),e)}()})),p=new Promise((function(t,e){u=setTimeout((function(){e(Error(c+"ms timeout exceeded"))}),c)}));Promise.race([p,m]).then((function(){clearTimeout(u),t(o)}),e)}else!function(t){document.body?t():document.addEventListener?document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e),t()})):document.attachEvent("onreadystatechange",(function e(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",e),t())}))}((function(){function l(){var e;(e=-1!=g&&-1!=w||-1!=g&&-1!=v||-1!=w&&-1!=v)&&((e=g!=w&&g!=v&&w!=v)||(null===a&&(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),a=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))),e=a&&(g==y&&w==y&&v==y||g==x&&w==x&&v==x||g==b&&w==b&&v==b)),e=!e),e&&(null!==C.parentNode&&C.parentNode.removeChild(C),clearTimeout(u),t(o))}var d=new n(r),m=new n(r),p=new n(r),g=-1,w=-1,v=-1,y=-1,x=-1,b=-1,C=document.createElement("div");C.dir="ltr",i(d,f(o,"sans-serif")),i(m,f(o,"serif")),i(p,f(o,"monospace")),C.appendChild(d.g),C.appendChild(m.g),C.appendChild(p.g),o.context.document.body.appendChild(C),y=d.g.offsetWidth,x=m.g.offsetWidth,b=p.g.offsetWidth,function t(){if((new Date).getTime()-h>=c)null!==C.parentNode&&C.parentNode.removeChild(C),e(Error(c+"ms timeout exceeded"));else{var n=o.context.document.hidden;!0!==n&&void 0!==n||(g=d.g.offsetWidth,w=m.g.offsetWidth,v=p.g.offsetWidth,l()),u=setTimeout(t,50)}}(),s(d,(function(t){g=t,l()})),i(d,f(o,'"'+o.family+'",sans-serif')),s(m,(function(t){w=t,l()})),i(m,f(o,'"'+o.family+'",serif')),s(p,(function(t){v=t,l()})),i(p,f(o,'"'+o.family+'",monospace'))}))}))},t.exports=r}()},885:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(121),s=(i=o)&&i.__esModule?i:{default:i},r=n(122);e.default={methods:(0,s.default)({},(0,r.mapActions)(["setGreetingWidth","setGreetingHeight","setHiHomeHeight"]),{updateDimensions:function(t){var e,n,i=t||this.$refs.homeContainer;this.$refs.homeInner&&i&&(e=i.clientWidth,(n=i.clientHeight)>0&&e>0&&(this.setHiHomeHeight(n),this.setGreetingWidth(e),this.setGreetingHeight(n)))}}),watch:{"viewportSize.width":{handler:function(){this.updateDimensions(this.$refs.homeContainer)}}}}},894:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"preload",staticStyle:{position:"absolute",top:"-99999px",left:"-99999px"}},t._l(t.fonts,(function(e){return n("span",{key:e,style:"font-family: '"+e+"'"},[t._v(".")])})),0)},o=[]},980:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("font-preloader",{attrs:{fonts:["Work Sans","Open Sans"],context:"iframe#welcome"}}),t._v(" "),n("transition",{attrs:{name:"hi-fade"}},[t.getShowWelcome?n("div",{ref:"greetingContainer",staticClass:"home-container",class:t.greetingContainerClass},[n("div",{ref:"homeInner",staticClass:"home-inner",on:{click:t.manageGreetingClick}},[n("div",{staticClass:"greeting-text-container"},[n("text-component",{attrs:{text:t.defaultWelcomeMessage,"allow-markdown":!0,variant:"body-SS"}},[t._v("\n "+t._s(t.defaultWelcomeMessage)+"\n ")])],1)]),t._v(" "),t.showHomeWithOptions?n("div",{ref:"homeOptions",staticClass:"actions"},[n("span",{style:t.replyColor,on:{click:function(e){return t.loadChannelChat(t.webButton)}}},[t._v(t._s(t.trans.get("widget.home_mobile.reply_btn")))]),t._v(" "),n("span",{style:t.buttonColor,on:{click:function(e){return t.loadChannelChat(t.fbButton)}}},[n("i",{staticClass:"ph-messenger-logo mr-1"}),t._v("\n "+t._s(t.trans.get("widget.home_mobile.reply_messenger_btn"))+"\n ")])]):t._e()]):t._e()])],1)},o=[]}}]);