jQuery(document).ready((function(e){e("body");var t=e(window);e("#wpadminbar").height(),e(".masthead:not(.side-header):not(.side-header-v-stroke)").height();e.fn.smartGrid=function(){return this.each((function(){for(var t=e(this),a=parseInt(t.attr("data-columns")),i=parseInt(t.attr("data-width")),r=t.width();Math.floor(r/a) .wf-cell",t).css({width:(100/a).toFixed(6)+"%",display:"inline-block"})}))};var a=e(".benefits-grid, .logos-grid");a.smartGrid(),t.on("debouncedresize",(function(){a.smartGrid()}));e(".project-post");if(e(".phantom-sticky").length>0)e(".masthead:not(.side-header):not(.side-header-v-stroke)");else e("#phantom").css("display");if("none"!==e(".mobile-header-bar").css("display")){e(".mobile-header-bar");if(e(".phantom-sticky").length>0)if(e(".sticky-header .masthead.side-header").length>0||e(".overlay-navigation .masthead.side-header").length>0)e(".mobile-header-bar").parent(".masthead:not(.side-header)");else e(".mobile-header-bar").parent()}else e(".masthead:not(.side-header):not(.side-header-v-stroke) .header-bar");t.on("debouncedresize",(function(a){e(".stripe").each((function(){var a=e(this),i=a.attr("data-min-height");e.isNumeric(i)?a.css({minHeight:i+"px"}):i?i.search("%")>0?a.css({minHeight:t.height()*(parseInt(i)/100)+"px"}):a.css({minHeight:i}):a.css({minHeight:0})}))})).trigger("debouncedresize")})); ;/*! * jQuery Mousewheel 3.1.13 * Copyright OpenJS Foundation and other contributors */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}((function(e){var t,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in window.document||window.document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var s=n.length;s;)e.event.fixHooks[n[--s]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=o.length;t;)this.addEventListener(o[--t],h,!1);else this.onmousewheel=h;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=o.length;t;)this.removeEventListener(o[--t],h,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function h(n){var o,s=n||window.event,h=l.call(arguments,1),f=0,d=0,w=0;if((n=e.event.fix(s)).type="mousewheel","detail"in s&&(w=-1*s.detail),"wheelDelta"in s&&(w=s.wheelDelta),"wheelDeltaY"in s&&(w=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*w,w=0),f=0===w?d:w,"deltaY"in s&&(f=w=-1*s.deltaY),"deltaX"in s&&(d=s.deltaX,0===w&&(f=-1*d)),0!==w||0!==d){if(1===s.deltaMode){var c=e.data(this,"mousewheel-line-height");f*=c,w*=c,d*=c}else if(2===s.deltaMode){var m=e.data(this,"mousewheel-page-height");f*=m,w*=m,d*=m}if(o=Math.max(Math.abs(w),Math.abs(d)),(!i||o=1?"floor":"ceil"](f/i),d=Math[d>=1?"floor":"ceil"](d/i),w=Math[w>=1?"floor":"ceil"](w/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var g=this.getBoundingClientRect();n.offsetX=n.clientX-g.left,n.offsetY=n.clientY-g.top}return n.deltaX=d,n.deltaY=w,n.deltaFactor=i,n.deltaMode=0,h.unshift(n,f,d,w),t&&window.clearTimeout(t),t=window.setTimeout(r,200),(e.event.dispatch||e.event.handle).apply(this,h)}}function r(){i=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.on("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.off("mousewheel",e)}})})); ;!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}((function(e){var t,o,a,n,i,r,l,s,c,d,u,f,h,m,p,g,v,x,_,w,S,b,C,y,B,T,k,M,O,I,D,E,W,R,A,L,z,P,H,U,F,q,j,Y,X,N,V,Q,G,J,K,Z,$,ee,te,oe,ae,ne,ie,re,le;ie="function"==typeof define&&define.amd,re="undefined"!=typeof module&&module.exports,le="https:"==document.location.protocol?"https:":"http:",ie||(re?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+le+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){t=e.extend(!0,{},i,t);var o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout((function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)}),500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each((function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}}))},update:function(t,o){var n=t||f.call(this);return e(n).each((function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}}))},scrollTo:function(t,o){if(void 0!==t&&null!=t){var n=f.call(this);return e(n).each((function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout((function(){null!==c[0]&&void 0!==c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&void 0!==c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))}),s.timeout)}}))}},stop:function(){var t=f.call(this);return e(t).each((function(){var t=e(this);t.data(a)&&Q(t)}))},disable:function(t){var o=f.call(this);return e(o).each((function(){var o=e(this);o.data(a)&&(o.data(a),N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3]))}))},destroy:function(){var t=f.call(this);return e(t).each((function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}}))}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=!(e.inArray(t.theme,o)>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,a)>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,n)>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["
","
"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"
":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("
");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map((function(){return e(this).outerWidth(!0)})).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this).data(a),o=t.opt,n=e("#mCSB_"+t.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis){n.css({width:"auto","min-width":0,"overflow-x":"scroll"});var i=Math.ceil(n[0].scrollWidth);3===o.advanced.autoExpandHorizontalScroll||2!==o.advanced.autoExpandHorizontalScroll&&i>n.parent().width()?n.css({width:i,"min-width":"100%","overflow-x":"inherit"}):n.css({"overflow-x":"inherit",position:"absolute"}).wrap("
").css({width:Math.ceil(n[0].getBoundingClientRect().right+.4)-Math.floor(n[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this).data(a),o=t.opt,n=e(".mCSB_"+t.idx+"_scrollbar:first"),i=oe(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",r=["","","",""],l=["x"===o.axis?r[2]:r[0],"x"===o.axis?r[3]:r[1],r[2],r[3]];o.scrollButtons.enable&&n.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},S=function(){var t=e(this).data(a),o=e("#mCSB_"+t.idx),n=e("#mCSB_"+t.idx+"_container"),i=[e("#mCSB_"+t.idx+"_dragger_vertical"),e("#mCSB_"+t.idx+"_dragger_horizontal")],r=[o.height()/n.outerHeight(!1),o.width()/n.outerWidth(!1)],l=[parseInt(i[0].css("min-height")),Math.round(r[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(r[1]*i[1].parent().width())],c=s&&l[1]Math.round(i)&&(i=l),s>Math.round(r)&&(r=s),[i>o.height(),r>o.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){var t=e(this),o=t.data(a),n=o.opt;if(!o.bindEvents){if(I.call(this),n.contentTouchScroll&&D.call(this),E.call(this),n.mouseWheel.enable){function i(){r=setTimeout((function(){e.event.special.mousewheel?(clearTimeout(r),W.call(t[0])):i()}),100)}var r;i()}P.call(this),U.call(this),n.advanced.autoScrollOnFocus&&H.call(this),n.scrollButtons.enable&&F.call(this),n.keyboard.enable&&q.call(this),o.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each((function(){e(this).unbind("."+i)})),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){var t,o,n,i=e(this),r=i.data(a),l=r.opt,d=a+"_"+r.idx,u=["mCSB_"+r.idx+"_dragger_vertical","mCSB_"+r.idx+"_dragger_horizontal"],f=e("#mCSB_"+r.idx+"_container"),h=e("#"+u[0]+",#"+u[1]),m=l.advanced.releaseDraggableSelectors?h.add(e(l.advanced.releaseDraggableSelectors)):h,p=l.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(l.advanced.extraDraggableSelectors)):e(!A()||top.document);function g(e,o,a,n){if(f[0].idleTimer=l.scrollInertia<233?250:0,t.attr("id")===u[1])var s="x",c=(t[0].offsetLeft-o+n)*r.scrollRatio.x;else s="y",c=(t[0].offsetTop-e+a)*r.scrollRatio.y;G(i,c.toString(),{dir:s,drag:!0})}h.bind("contextmenu."+d,(function(e){e.preventDefault()})).bind("mousedown."+d+" touchstart."+d+" pointerdown."+d+" MSPointerDown."+d,(function(a){if(a.stopImmediatePropagation(),a.preventDefault(),ee(a)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(f,!1),Q(i);var r=(t=e(this)).offset(),d=O(a)[0]-r.top,u=O(a)[1]-r.left,h=t.height()+r.top,m=t.width()+r.left;d0&&u0&&(o=d,n=u),C(t,"active",l.autoExpandScrollbar)}})).bind("touchmove."+d,(function(e){e.stopImmediatePropagation(),e.preventDefault();var a=t.offset(),i=O(e)[0]-a.top,r=O(e)[1]-a.left;g(o,n,i,r)})),e(document).add(p).bind("mousemove."+d+" pointermove."+d+" MSPointerMove."+d,(function(e){if(t){var a=t.offset(),i=O(e)[0]-a.top,r=O(e)[1]-a.left;if(o===i&&n===r)return;g(o,n,i,r)}})).add(m).bind("mouseup."+d+" touchend."+d+" pointerup."+d+" MSPointerUp."+d,(function(e){t&&(C(t,"active",l.autoExpandScrollbar),t=null),c=!1,s&&(document.onselectstart=null),L.call(f,!0)}))},D=function(){var o,n,i,r,l,s,d,u,f,h,m,p,g,v,x=e(this),_=x.data(a),w=_.opt,S=a+"_"+_.idx,b=e("#mCSB_"+_.idx),C=e("#mCSB_"+_.idx+"_container"),y=[e("#mCSB_"+_.idx+"_dragger_vertical"),e("#mCSB_"+_.idx+"_dragger_horizontal")],B=[],T=[],k=0,M="yx"===w.axis?"none":"all",I=[],D=C.find("iframe"),E=["touchstart."+S+" pointerdown."+S+" MSPointerDown."+S,"touchmove."+S+" pointermove."+S+" MSPointerMove."+S,"touchend."+S+" pointerup."+S+" MSPointerUp."+S],W=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function R(e){if(!te(e)||c||O(e)[2])t=0;else{t=1,g=0,v=0,o=1,x.removeClass("mCS_touch_action");var a=C.offset();n=O(e)[0]-a.top,i=O(e)[1]-a.left,I=[O(e)[0],O(e)[1]]}}function L(e){if(te(e)&&!c&&!O(e)[2]&&(w.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!v||g)&&o)){d=K();var t=b.offset(),a=O(e)[0]-t.top,r=O(e)[1]-t.left,l="mcsLinearOut";if(B.push(a),T.push(r),I[2]=Math.abs(O(e)[0]-I[0]),I[3]=Math.abs(O(e)[1]-I[1]),_.overflowed[0])var s=y[0].parent().height()-y[0].height(),u=n-a>0&&a-n>-s*_.scrollRatio.y&&(2*I[3]0&&r-i>-f*_.scrollRatio.x&&(2*I[2]30)){var i="mcsEaseOut",x=(h=1e3/(u-s))<2.5,S=x?[B[B.length-2],T[T.length-2]]:[0,0];f=x?[a-S[0],n-S[1]]:[a-r,n-l];var y=[Math.abs(f[0]),Math.abs(f[1])];h=x?[Math.abs(f[0]/4),Math.abs(f[1]/4)]:[h,h];var k=[Math.abs(C[0].offsetTop)-f[0]*H(y[0]/h[0],h[0]),Math.abs(C[0].offsetLeft)-f[1]*H(y[1]/h[1],h[1])];m="yx"===w.axis?[k[0],k[1]]:"x"===w.axis?[null,k[1]]:[k[0],null],p=[4*y[0]+w.scrollInertia,4*y[1]+w.scrollInertia];var I=parseInt(w.contentTouchScroll)||0;m[0]=y[0]>I?m[0]:0,m[1]=y[1]>I?m[1]:0,_.overflowed[0]&&U(m[0],p[0],i,"y",M,!1),_.overflowed[1]&&U(m[1],p[1],i,"x",M,!1)}}}function H(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function U(e,t,o,a,n,i){e&&G(x,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}C.bind(E[0],(function(e){R(e)})).bind(E[1],(function(e){L(e)})),b.bind(E[0],(function(e){z(e)})).bind(E[2],(function(e){P(e)})),D.length&&D.each((function(){e(this).bind("load",(function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(E[0],(function(e){R(e),z(e)})).bind(E[1],(function(e){L(e)})).bind(E[2],(function(e){P(e)}))}))}))},E=function(){var o,n=e(this),i=n.data(a),r=i.opt,l=i.sequential,s=a+"_"+i.idx,d=e("#mCSB_"+i.idx+"_container"),u=d.parent();function f(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function h(e,t,a){l.type=a&&o?"stepped":"stepless",l.scrollAmount=10,j(n,e,t,"mcsLinearOut",a?60:null)}d.bind("mousedown."+s,(function(e){t||o||(o=1,c=!0)})).add(document).bind("mousemove."+s,(function(e){if(!t&&o&&f()){var a=d.offset(),n=O(e)[0]-a.top+d[0].offsetTop,s=O(e)[1]-a.left+d[0].offsetLeft;n>0&&n0&&su.height()&&h("on",40)),"y"!==r.axis&&i.overflowed[1]&&(s<0?h("on",37):s>u.width()&&h("on",39)))}})).bind("mouseup."+s+" dragend."+s,(function(e){t||(o&&(o=0,h("off",null)),c=!1)}))},W=function(){if(e(this).data(a)){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],c=e("#mCSB_"+o.idx+"_container").find("iframe");c.length&&c.each((function(){e(this).bind("load",(function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+i,(function(e,t){d(e,t)}))}))})),r.bind("mousewheel."+i,(function(e,t){d(e,t)}))}function d(a,i){if(Q(t),!z(t,a.target)){var c="auto"!==n.mouseWheel.deltaFactor?parseInt(n.mouseWheel.deltaFactor):s&&a.deltaFactor<100?100:a.deltaFactor||100,d=n.scrollInertia;if("x"===n.axis||"x"===n.mouseWheel.axis)var u="x",f=[Math.round(c*o.scrollRatio.x),parseInt(n.mouseWheel.scrollAmount)],h="auto"!==n.mouseWheel.scrollAmount?f[1]:f[0]>=r.width()?.9*r.width():f[0],m=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetLeft),p=l[1][0].offsetLeft,g=l[1].parent().width()-l[1].width(),v="y"===n.mouseWheel.axis?a.deltaY||i:a.deltaX;else u="y",f=[Math.round(c*o.scrollRatio.y),parseInt(n.mouseWheel.scrollAmount)],h="auto"!==n.mouseWheel.scrollAmount?f[1]:f[0]>=r.height()?.9*r.height():f[0],m=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetTop),p=l[0][0].offsetTop,g=l[0].parent().height()-l[0].height(),v=a.deltaY||i;"y"===u&&!o.overflowed[0]||"x"===u&&!o.overflowed[1]||((n.mouseWheel.invert||a.webkitDirectionInvertedFromDevice)&&(v=-v),n.mouseWheel.normalizeDelta&&(v=v<0?-1:1),(v>0&&0!==p||v<0&&p!==g||n.mouseWheel.preventDefault)&&(a.stopImmediatePropagation(),a.preventDefault()),a.deltaFactor<5&&!n.mouseWheel.normalizeDelta&&(h=a.deltaFactor,d=17),G(t,(m-v*h).toString(),{dir:u,dur:d}))}}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),!1!==a&&void 0!==R[a])return R[a];if(t){try{n=(t.contentDocument||t.contentWindow.document).body.innerHTML}catch(e){}o=null!==n}else{try{n=top.document.body.innerHTML}catch(e){}o=null!==n}return!1!==a&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent();e(".mCSB_"+n.idx+"_scrollbar ."+d[12]).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,(function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)})).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,(function(e){c=!1})).bind("click."+i,(function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}}))},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,(function(o){var a=e(document.activeElement),i=r.find(".mCustomScrollBox").length,s=0;a.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?(s+17)*i:0,t[0]._focusTimeout=setTimeout((function(){var e=[ae(a)[0],ae(a)[1]],o=[r[0].offsetTop,r[0].offsetLeft],i=[o[0]+e[0]>=0&&o[0]+e[0]=0&&o[0]+e[1]a").bind("contextmenu."+r,(function(e){e.preventDefault()})).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,(function(a){if(a.preventDefault(),ee(a)){var r=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,l("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&l("off",r);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;l("on",r)}}function l(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}}))},q=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=e("#mCSB_"+o.idx),s=e("#mCSB_"+o.idx+"_container"),c=s.parent(),d="input,textarea,select,datalist,keygen,[contenteditable='true']",u=s.find("iframe"),f=["blur."+r+" keydown."+r+" keyup."+r];function h(a){switch(a.type){case"blur":o.tweenRunning&&i.dir&&m("off",null);break;case"keydown":case"keyup":var r=a.keyCode?a.keyCode:a.which,l="on";if("x"!==n.axis&&(38===r||40===r)||"y"!==n.axis&&(37===r||39===r)){if((38===r||40===r)&&!o.overflowed[0]||(37===r||39===r)&&!o.overflowed[1])return;"keyup"===a.type&&(l="off"),e(document.activeElement).is(d)||(a.preventDefault(),a.stopImmediatePropagation(),m(l,r))}else if(33===r||34===r){if((o.overflowed[0]||o.overflowed[1])&&(a.preventDefault(),a.stopImmediatePropagation()),"keyup"===a.type){Q(t);var u=34===r?-1:1;if("x"===n.axis||"yx"===n.axis&&o.overflowed[1]&&!o.overflowed[0])var f="x",h=Math.abs(s[0].offsetLeft)-u*(.9*c.width());else f="y",h=Math.abs(s[0].offsetTop)-u*(.9*c.height());G(t,h.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}else 35!==r&&36!==r||e(document.activeElement).is(d)||((o.overflowed[0]||o.overflowed[1])&&(a.preventDefault(),a.stopImmediatePropagation()),"keyup"!==a.type)||("x"===n.axis||"yx"===n.axis&&o.overflowed[1]&&!o.overflowed[0]?(f="x",h=35===r?Math.abs(c.width()-s.outerWidth(!1)):0):(f="y",h=35===r?Math.abs(c.height()-s.outerHeight(!1)):0),G(t,h.toString(),{dir:f,scrollEasing:"mcsEaseInOut"}))}function m(e,a){i.type=n.keyboard.scrollType,i.scrollAmount=n.keyboard.scrollAmount,"stepped"===i.type&&o.tweenRunning||j(t,e,a)}}u.length&&u.each((function(){e(this).bind("load",(function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(f[0],(function(e){h(e)}))}))})),l.attr("tabindex","0").bind(f[0],(function(e){h(e)}))},j=function(t,o,n,i,r){var l=t.data(a),s=l.opt,c=l.sequential,u=e("#mCSB_"+l.idx+"_container"),f="stepped"===c.type,h=s.scrollInertia<26?26:s.scrollInertia,m=s.scrollInertia<1?17:s.scrollInertia;switch(o){case"on":if(c.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===c.type)return;p(f);break;case"off":g(),(f||l.tweenRunning&&c.dir)&&p(!0)}function p(e){s.snapAmount&&(c.scrollAmount=s.snapAmount instanceof Array?"x"===c.dir[0]?s.snapAmount[1]:s.snapAmount[0]:s.snapAmount);var o="stepped"!==c.type,a=r||(e?o?h/1.5:m:1e3/60),n=e?o?7.5:40:2.5,d=[Math.abs(u[0].offsetTop),Math.abs(u[0].offsetLeft)],f=[l.scrollRatio.y>10?10:l.scrollRatio.y,l.scrollRatio.x>10?10:l.scrollRatio.x],g="x"===c.dir[0]?d[1]+c.dir[1]*(f[1]*n):d[0]+c.dir[1]*(f[0]*n),v="x"===c.dir[0]?d[1]+c.dir[1]*parseInt(c.scrollAmount):d[0]+c.dir[1]*parseInt(c.scrollAmount),x="auto"!==c.scrollAmount?v:g,_=i||(e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),w=!!e;e&&a<17&&(x="x"===c.dir[0]?d[1]:d[0]),G(t,x.toString(),{dir:c.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?c.dir=!1:(clearTimeout(c.step),c.step=setTimeout((function(){p()}),a))}function g(){clearTimeout(c.step),$(c,"step"),Q(t)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&void 0!==t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":if(!(p=t.jquery?t:e(t)).length)return;return"x"===o?ae(p)[1]:ae(p)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var m=f+parseInt(t.split("+=")[1]);return m>=0?0:Math.abs(m)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var p=l.find(":"+t);return"x"===o?ae(p)[1]:ae(p)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container");if(t)return clearTimeout(r[0].autoUpdate),void $(r[0],"autoUpdate");function l(){clearTimeout(r[0].autoUpdate),0!==o.parents("html").length?r[0].autoUpdate=setTimeout((function(){return i.advanced.updateOnSelectorChange&&(n.poll.change.n=c(),n.poll.change.n!==n.poll.change.o)?(n.poll.change.o=n.poll.change.n,void f(3)):i.advanced.updateOnContentResize&&(n.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+r[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,n.poll.size.n!==n.poll.size.o)?(n.poll.size.o=n.poll.size.n,void f(1)):!i.advanced.updateOnImageLoad||"auto"===i.advanced.updateOnImageLoad&&"y"===i.axis||(n.poll.img.n=r.find("img").length,n.poll.img.n===n.poll.img.o)?void((i.advanced.updateOnSelectorChange||i.advanced.updateOnContentResize||i.advanced.updateOnImageLoad)&&l()):(n.poll.img.o=n.poll.img.n,void r.find("img").each((function(){s(this)})))}),i.advanced.autoUpdateTimeout):o=null}function s(t){if(e(t).hasClass(d[2]))f();else{var o=new Image;o.onload=a(o,n),o.src=t.src}function a(e,t){return function(){return t.apply(e,arguments)}}function n(){this.onload=null,e(t).addClass(d[2]),f(2)}}function c(){!0===i.advanced.updateOnSelectorChange&&(i.advanced.updateOnSelectorChange="*");var e=0,t=r.find(i.advanced.updateOnSelectorChange);return i.advanced.updateOnSelectorChange&&t.length>0&&t.each((function(){e+=this.offsetHeight+this.offsetWidth})),e}function f(e){clearTimeout(r[0].autoUpdate),u.update.call(null,o[0],e)}l()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a);e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal").each((function(){Z.call(this)}))},G=function(t,o,n){var i=t.data(a),r=i.opt,l={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:r.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=[(n=e.extend(l,n)).dur,n.drag?0:n.dur],c=e("#mCSB_"+i.idx),d=e("#mCSB_"+i.idx+"_container"),u=d.parent(),f=r.callbacks.onTotalScrollOffset?Y.call(t,r.callbacks.onTotalScrollOffset):[0,0],h=r.callbacks.onTotalScrollBackOffset?Y.call(t,r.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=n.trigger,0===u.scrollTop()&&0===u.scrollLeft()||(e(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),u.scrollTop(0).scrollLeft(0)),"_resetY"!==o||i.contentReset.y||(B("onOverflowYNone")&&r.callbacks.onOverflowYNone.call(t[0]),i.contentReset.y=1),"_resetX"!==o||i.contentReset.x||(B("onOverflowXNone")&&r.callbacks.onOverflowXNone.call(t[0]),i.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!i.contentReset.y&&t[0].mcs||!i.overflowed[0]||(B("onOverflowY")&&r.callbacks.onOverflowY.call(t[0]),i.contentReset.x=null),!i.contentReset.x&&t[0].mcs||!i.overflowed[1]||(B("onOverflowX")&&r.callbacks.onOverflowX.call(t[0]),i.contentReset.x=null),r.snapAmount){var m=r.snapAmount instanceof Array?"x"===n.dir?r.snapAmount[1]:r.snapAmount[0]:r.snapAmount;o=V(o,m,r.snapOffset)}switch(n.dir){case"x":var p=e("#mCSB_"+i.idx+"_dragger_horizontal"),g="left",v=d[0].offsetLeft,x=[c.width()-d.outerWidth(!1),p.parent().width()-p.width()],_=[o,0===o?0:o/i.scrollRatio.x],w=f[1],S=h[1],b=w>0?w/i.scrollRatio.x:0,y=S>0?S/i.scrollRatio.x:0;break;case"y":p=e("#mCSB_"+i.idx+"_dragger_vertical"),g="top",v=d[0].offsetTop,x=[c.height()-d.outerHeight(!1),p.parent().height()-p.height()],_=[o,0===o?0:o/i.scrollRatio.y],w=f[0],S=h[0],b=w>0?w/i.scrollRatio.y:0,y=S>0?S/i.scrollRatio.y:0}_[1]<0||0===_[0]&&0===_[1]?_=[0,0]:_[1]>=x[1]?_=[x[0],x[1]]:_[0]=-_[0],t[0].mcs||(k(),B("onInit")&&r.callbacks.onInit.call(t[0])),clearTimeout(d[0].onCompleteTimeout),J(p[0],g,Math.round(_[1]),s[1],n.scrollEasing),!i.tweenRunning&&(0===v&&_[0]>=0||v===x[0]&&_[0]<=x[0])||J(d[0],g,Math.round(_[0]),s[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!i.tweenRunning&&(B("onScrollStart")&&(k(),r.callbacks.onScrollStart.call(t[0])),i.tweenRunning=!0,C(p),i.cbOffsets=T())},onUpdate:function(){n.callbacks&&n.onUpdate&&B("whileScrolling")&&(k(),r.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===r.axis&&clearTimeout(d[0].onCompleteTimeout);var e=d[0].idleTimer||0;d[0].onCompleteTimeout=setTimeout((function(){B("onScroll")&&(k(),r.callbacks.onScroll.call(t[0])),B("onTotalScroll")&&_[1]>=x[1]-b&&i.cbOffsets[0]&&(k(),r.callbacks.onTotalScroll.call(t[0])),B("onTotalScrollBack")&&_[1]<=y&&i.cbOffsets[1]&&(k(),r.callbacks.onTotalScrollBack.call(t[0])),i.tweenRunning=!1,d[0].idleTimer=0,C(p,"hide")}),e)}}})}function B(e){return i&&r.callbacks[e]&&"function"==typeof r.callbacks[e]}function T(){return[r.callbacks.alwaysTriggerOffsets||v>=x[0]+w,r.callbacks.alwaysTriggerOffsets||v<=-S]}function k(){var e=[d[0].offsetTop,d[0].offsetLeft],o=[p[0].offsetTop,p[0].offsetLeft],a=[d.outerHeight(!1),d.outerWidth(!1)],i=[c.height(),c.width()];t[0].mcs={content:d,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}},J=function(e,t,o,a,n,i,r){e._mTween||(e._mTween={top:{},left:{}});var l,s,c=(r=r||{}).onStart||function(){},d=r.onUpdate||function(){},u=r.onComplete||function(){},f=K(),h=0,m=e.offsetTop,p=e.style,g=e._mTween[t];"left"===t&&(m=e.offsetLeft);var v=o-m;function x(){g.stop||(h||c.call(),h=K()-f,_(),h>=g.time&&(g.time=h>g.time?h+l-(h-g.time):h+l-1,g.time0?(g.currVal=b(g.time,m,v,a,n),p[t]=Math.round(g.currVal)+"px"):p[t]=o+"px",d.call()}function w(){l=1e3/60,g.time=h+l,s=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return _(),setTimeout(e,.01)},g.id=s(x)}function S(){null!=g.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(g.id):clearTimeout(g.id),g.id=null)}function b(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=a/2)<1?o/2*e*e+t:-o/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=a/2)<1?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=a/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=a,-o*(--e*e*e*e-1)+t;case"easeOutStrong":return o*(1-Math.pow(2,-10*e/a))+t;default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}g.stop=0,"none"!==i&&S(),w()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&a[0]+ae(n)[0]=0&&a[1]+ae(n)[1]=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})}))})); ;jQuery(document).ready(function(l){l.fn.exists=function(){return 0").appendTo(l(this)),t.addClass("icon-ready"))})},l(".links-container a").addIconToLinks(),l.fn.forwardToPost=function(){return this.each(function(){var t=l(this),e=t.find("a").first(),o=e.attr("href");o?t.hasClass("this-ready")||(t.on("click tap",function(){if(!t.parents(".ts-wrap").hasClass("ts-interceptClicks"))return"_blank"===e.attr("target")?window.open(o,"_blank"):window.location.href=o,!1}),t.addClass("this-ready")):t.addClass("this-ready")})},l(".mobile-false .forward-post, .mobile-true .portfolio-shortcode.the7-elementor-widget .forward-post").forwardToPost(),l.fn.touchforwardToPost=function(){return t.on("touchend",function(t){l(".mobile-true .rollover-content").removeClass("is-clicked"),l(".mobile-true .rollover-project").removeClass("is-clicked")}),this.each(function(){var i=l(this),r=i.find("a").first(),a=r.attr("href");a?i.hasClass("touch-hover-ready")||(i.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),i.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY;if(origY==o||origX==e){if(!i.hasClass("is-clicked"))return t.preventDefault(),l(".mobile-ture .rollover-content").removeClass("is-clicked"),l(".mobile-true .rollover-project").removeClass("is-clicked"),i.addClass("is-clicked"),i.parent(".rollover-project").addClass("is-clicked"),!1;if("_blank"===r.attr("target"))return window.open(a,"_blank"),!1;window.location.href=a}}),i.addClass("touch-hover-ready")):i.addClass("touch-hover-ready")})},l(".mobile-true .portfolio-shortcode:not(.the7-elementor-widget) .forward-post").touchforwardToPost(),l.fn.touchElementorforwardToPost=function(){return this.each(function(){var t=l(this),o=t.find(".post-thumbnail-wrap a").first(),i=o.attr("href");i?t.hasClass("touch-hover-ready")||(t.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),t.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,t=t.originalEvent.changedTouches[0].pageY;if(origY==t||origX==e){if("_blank"===o.attr("target"))return window.open(i,"_blank"),!1;window.location.href=i}}),t.addClass("touch-hover-ready")):t.addClass("touch-hover-ready")})},l(".mobile-true .portfolio-shortcode.the7-elementor-widget .forward-post").touchElementorforwardToPost(),l.fn.followCurentLink=function(){return this.each(function(){var t,e,o,i,r,a;(t=0 a, .project-links-container > a"),o=t.find(".portfolio-categories a"),i=t.find(".post-details"),r=!1,t.on("click",function(){if(!t.parents(".ts-wrap").hasClass("ts-interceptClicks"))return e.each(function(){a=l(this).attr("target")?l(this).attr("target"):"_self"}),e.hasClass("project-details")||e.hasClass("link")||e.hasClass("project-link")?window.open(e.attr("href"),a):r||(r=!0,e.trigger("click"),r=!1),!1}),t.find(o).click(function(t){t.stopPropagation(),window.location.href=o.attr("href")}),a=void 0!==i.attr("target")&&0 a, .project-links-container > a"),e=i.find(".portfolio-categories a"),a=!1,i.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),i.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY;if(origY==o||origX==e)return i.hasClass("is-clicked")?i.parents(".ts-wrap").hasClass("ts-interceptClicks")?void 0:(r.each(function(){$thisTarget=l(this).attr("target")?l(this).attr("target"):"_self"}),r.hasClass("project-details")||r.hasClass("link")||r.hasClass("project-link")?window.open(r.attr("href"),$thisTarget):a||(a=!0,r.trigger("click"),a=!1),!1):(t.preventDefault(),i.addClass("is-clicked"),!1)}),i.find(e).click(function(t){t.stopPropagation(),window.location.href=e.attr("href")}),i.addClass("this-ready"))})},l(".mobile-true .portfolio-shortcode:not(.the7-elementor-widget) .rollover-project.rollover-active, .mobile-true .portfolio-shortcode:not(.the7-elementor-widget) .rollover-active, .mobile-true .portfolio-shortcode:not(.the7-elementor-widget) .buttons-on-img.rollover-active").touchFollowCurentLink(),l.fn.touchRolloverPostClick=function(){return t.on("touchend",function(t){l(".mobile-true .portfolio-shortcode:not(.the7-elementor-widget) .post").removeClass("is-clicked")}),this.each(function(){var i=l(this);i.find(".post-thumbnail-rollover").first(),i.find(".entry-meta a, .fancy-date a, .fancy-categories a"),i.find(".entry-excerpt").height(),i.find(".post-details").height();i.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),i.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY;if(origY<=o+5&&origY>=o-5||origX<=e+5&&origX==e-5){if(!i.hasClass("is-clicked"))return t.preventDefault(),t.target.tagName.toLowerCase(),l(".mobile-ture .post").removeClass("is-clicked"),i.addClass("is-clicked"),i.parent().siblings().find(".post").removeClass("is-clicked"),!1;i.parents().hasClass("disable-layout-hover")&&"a"===t.target.tagName.toLowerCase()&&l(t.target).trigger("click")}})})},l(".mobile-true .content-rollover-layout-list.portfolio-shortcode:not(.the7-elementor-widget) .post, .mobile-true .gradient-overlay-layout-list.portfolio-shortcode:not(.the7-elementor-widget) .post").touchRolloverPostClick(),l.fn.touchElementorRolloverPostClick=function(){return t.on("touchend",function(t){l(".mobile-true .portfolio-shortcode.the7-elementor-widget .post").removeClass("is-clicked")}),this.each(function(){var i=l(this);i.find(".post-thumbnail-rollover").first(),i.find(".entry-meta a, .fancy-date a, .fancy-categories a"),i.find(".entry-excerpt").height(),i.find(".post-details").height();i.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),i.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY;(origY<=o+5&&origY>=o-5||origX<=e+5&&origX==e-5)&&i.parents().hasClass("disable-layout-hover")&&"a"===t.target.tagName.toLowerCase()&&l(t.target).trigger("click")})})},l(".mobile-true .content-rollover-layout-list.portfolio-shortcode.the7-elementor-widget .post, .mobile-true .gradient-overlay-layout-list.portfolio-shortcode.the7-elementor-widget .post").touchElementorRolloverPostClick(),l.fn.touchHoverImage=function(){return t.on("touchend",function(t){l(".mobile-true .rollover-content").removeClass("is-clicked")}),this.each(function(){var r,t=l(this);t.hasClass("hover-ready")||((r=l(this).find(".rollover-content")).parents(".wf-cell"),r.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),r.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY,i=r.prev("a.rollover");if(origY==o||origX==e){if(!r.hasClass("is-clicked"))return l(".links-container > a",r).on("touchend",function(t){t.stopPropagation(),r.addClass("is-clicked")}),t.preventDefault(),l(".mobile-true .buttons-on-img .rollover-content").removeClass("is-clicked"),r.addClass("is-clicked"),!1;"a"===t.target.tagName.toLowerCase()?l(t.target).trigger("click"):window.location.href=i.attr("href")}}),t.addClass("hover-ready"))})},l(".mobile-true .buttons-on-img").touchHoverImage(),l.fn.touchScrollerImage=function(){return t.on("touchend",function(t){l(".mobile-true .project-list-media").removeClass("is-clicked")}),this.each(function(){var i,r,a,t=l(this);t.hasClass("hover-ready")||t.children().hasClass("hover-ready")||(i=l(this),r=i.find("a.rollover-click-target").first(),a=i.find(".links-container"),i.on("touchstart",function(t){origY=t.originalEvent.touches[0].pageY,origX=t.originalEvent.touches[0].pageX}),i.on("touchend",function(t){var e=t.originalEvent.changedTouches[0].pageX,o=t.originalEvent.changedTouches[0].pageY;return i.parents(".ts-wrap").hasClass("ts-interceptClicks")||origY!=o&&origX!=e||i.hasClass("is-clicked")?void 0:(0 a ").each(function(){l(this).on("touchend",function(t){t.stopPropagation(),l(this).trigger("click")})}),t.preventDefault(),l(".mobile-true .dt-owl-item").removeClass("is-clicked"),i.addClass("is-clicked"),!1)}),t.addClass("hover-ready"))})},l(".mobile-true .project-list-media").touchScrollerImage(),l.fn.touchHoverLinks=function(){return this.each(function(){var e,t=l(this);t.hasClass("hover-ready")||((e=l(this)).on("touchend",function(t){return e.parents(".ts-wrap").hasClass("ts-interceptClicks")||e.hasClass("is-clicked")?void 0:(e.hasClass("project-zoom")?(e.trigger("click"),l(".mobile-true .links-container > a").removeClass("is-clicked"),e.addClass("is-clicked")):window.location.href=e.attr("href"),!1)}),t.addClass("hover-ready"))})},l(".mobile-true .dt-owl-item .links-container > a").touchHoverLinks(),l.fn.triggerAlbumsClick=function(){return this.each(function(){var e,o,i,t=l(this);t.hasClass("this-ready")||(e=l(this).find("a.rollover-click-target, a.dt-pswp-item").first(),o=l(this).find(".portfolio-categories a"),0=o-5||origX<=e+5&&origX==e-5){if(!i.hasClass("is-clicked"))return t.preventDefault(),l(".mobile-ture .post").removeClass("is-clicked"),i.parent().siblings().find(".post").removeClass("is-clicked"),i.addClass("is-clicked"),!1;r.hasClass("go-to")&&(window.location.href=r.attr("href")),r.trigger("click"),i.find(a).click(function(t){t.stopPropagation(),window.location.href=a.attr("href")})}})})},l(" .mobile-true .albums-shortcode.content-rollover-layout-list .post, .mobile-true .albums-shortcode.gradient-overlay-layout-list .post").triggerOverlayAlbumsTouch(),l.fn.triggerAlbumsTouch=function(){return t.on("touchend",function(t){l(".mobile-true .rollover-content").removeClass("is-clicked")}),this.each(function(){var o,e,i,r=l(this);r.hasClass("this-touch-ready")||(o=r.find("a.rollover-click-target, a.dt-pswp-item").first(),e=r.find(".portfolio-categories a"),0=t-5||origX<=e+5&&origX==e-5)&&!r.parents(".ts-wrap").hasClass("ts-interceptClicks"))return i||(i=!0,o.trigger("click"),i=!1),!1}),r.find(e).click(function(t){t.stopPropagation(),window.location.href=e.attr("href")})),r.addClass("this-touch-ready"))})},l(".mobile-true .dt-albums-template .rollover-project, .mobile-true .dt-albums-shortcode .rollover-project, .mobile-true .dt-albums-template .buttons-on-img, .mobile-true .dt-albums-shortcode .buttons-on-img, .mobile-true .archive .type-dt_gallery .buttons-on-img, .mobile-true .albums-shortcode:not(.content-rollover-layout-list):not(.gradient-overlay-layout-list) .post-thumbnail").triggerAlbumsTouch(),l.fn.triggerHoverClick=function(){return this.each(function(){var e,o,i,r,a,n,s=l(this);s.hasClass("click-ready")||(e=s.prev("a:not(.dt-single-pswp):not(.dt-pswp-item)").first(),o=s.find(".portfolio-categories a"),i=s.find(".project-link"),r=i.attr("target")?i.attr("target"):"_self",0l.albumWidth&&0!=n.length&&(c(n,a,l),delete a,delete n,a=0,n=[],s+=1),l.images.length-1==t&&0!=n.length&&(c(n,a,l),delete a,delete n,a=0,n=[],s+=1)}),g(this).trigger("jgDone")});function c(t,e,o){for(var i=o.padding*t.length+t.length*t[0][3],r=(o.albumWidth-i)/(e-i),a=e .content #jg-container-"+i+" .wf-cell{padding:"+e+";} .content #jg-container-"+i+".wf-container{margin:-"+e+";} .content .full-width-wrap #jg-container-"+i+".wf-container{margin-left:"+e+"; margin-right:"+e+"; margin-top:-"+e+"; margin-bottom:-"+e+";}").insertAfter(t),t.on("jgDone",function(){new Layzr({selector:".jgrid-lazy-load",attr:"data-src",attrSrcSet:"data-srcset",retinaAttr:"data-src-retina",threshold:0,before:function(){this.setAttribute("sizes",this.width+"px"),this.style.willChange="opacity"},callback:function(){this.classList.add("jgrid-layzr-loaded");var e=g(this);e.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(t){clearTimeout(o),o=setTimeout(function(){e.parent().removeClass("layzr-bg"),e.css("will-change","auto")},200)})}})})}),g.fn.collage=function(a){return this.each(function(){g(this);var t=g(this),e=t.attr("data-padding"),o=t.find(".wf-cell"),o=parseFloat(o.first().css("padding-left"))+parseFloat(o.first().css("padding-right")),i=parseInt(t.attr("data-target-height")),r=!0,i=("false"==t.attr("data-part-row")&&(r=!1),{albumWidth:e=t.parent(".full-width-wrap").length?t.parents(".full-width-wrap").width()-2*parseInt(e):t.parent().width()+2*parseInt(e),targetHeight:i,padding:o,allowPartialLastRow:r,fadeSpeed:2e3,effect:"effect-1",direction:"vertical"});g.extend(i,a),dtGlobals.jGrid=i,t.collagePlus(i),t.css({width:e})})},g(window).on("debouncedresize",function(){g(".jg-container").not(".jgrid-shortcode").collage(),g(".jgrid-shortcode").each(function(){var t=g(this),e=t.data("visibleItems");e?t.collage({images:e}):t.collage()})}).trigger("debouncedresize")}(jQuery); ;/*! For license information please see index.js.LICENSE.txt */ (()=>{var e={539(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o>>6-2*r);return n}},e.exports=n},445(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},892(e,t,n){var o,r,a,i,l;o=n(635),r=n(539).utf8,a=n(445),i=n(539).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?i.stringToBytes(e):r.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),c=8*e.length,s=1732584193,u=-271733879,p=-1732584194,_=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[c>>>5]|=128<>>9<<4)]=c;var d=l._ff,m=l._gg,h=l._hh,g=l._ii;for(f=0;f>>0,u=u+v>>>0,p=p+b>>>0,_=_+w>>>0}return o.endian([s,u,p,_])})._ff=function(e,t,n,o,r,a,i){var l=e+(t&n|~t&o)+(r>>>0)+i;return(l<>>32-a)+t},l._gg=function(e,t,n,o,r,a,i){var l=e+(t&o|n&~o)+(r>>>0)+i;return(l<>>32-a)+t},l._hh=function(e,t,n,o,r,a,i){var l=e+(t^n^o)+(r>>>0)+i;return(l<>>32-a)+t},l._ii=function(e,t,n,o,r,a,i){var l=e+(n^(t|~o))+(r>>>0)+i;return(l<>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):o.bytesToHex(n)}},500(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;oObject.hasOwn(e,t),(()=>{"use strict";var e,t,o,r,a,i,l,c,s,u,p,_,f,d,m,h={},g=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(t,n,o){var r,a,i,l={};for(i in n)"key"==i?r=n[i]:"ref"==i?a=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===l[i]&&(l[i]=t.defaultProps[i]);return T(t,l,r,a,null)}function T(e,n,r,a,i){var l={type:e,props:n,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++o,__i:-1,__u:0};return null==i&&null!=t.vnode&&t.vnode(l),l}function A(e){return e.children}function C(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;tt&&r.sort(l),e=r.shift(),t=r.length,x(e)}finally{r.length=O.__r=0}}function D(e,t,n,o,r,a,i,l,c,s,u){var p,_,f,d,m,y,v=o&&o.__k||g,b=t.length;for(c=R(n,t,v,c,b),p=0;p0?i=e.__k[a]=T(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[a]=i,c=a+_,i.__=e,i.__b=e.__b+1,l=null,-1!=(s=i.__i=P(i,n,c,p))&&(p--,(l=n[s])&&(l.__u|=2)),null==l||null==l.__v?(-1==s&&(r>u?_--:rc?_--:_++,i.__u|=4))):e.__k[a]=null;if(p)for(a=0;a(u?1:0))for(r=n-1,a=n+1;r>=0||a=0?r--:a++])&&!(2&s.__u)&&l==s.key&&c==s.type)return i;return-1}function M(e,t,n){"-"==t[0]?e.setProperty(t,n??""):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function q(e,t,n,o,r){var a,i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||M(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||M(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(p,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?o?n[u]=o[u]:(n[u]=_,e.addEventListener(t,a?d:f,a)):e.removeEventListener(t,a?d:f,a);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=n??"";break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function U(e){return function(n){if(this.l){var o=this.l[n.type+e];if(null==n[s])n[s]=_++;else if(n[s]0?e:v(e)?e.map($):void 0!==e.constructor?null:b({},e)}function B(n,o,r,a,i,l,c,s,u){var p,_,f,d,m,g,y,b=r.props||h,S=o.props,T=o.type;if("svg"==T?i="http://www.w3.org/2000/svg":"math"==T?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=l)for(p=0;p=n.__.length&&n.__.push({}),n.__[e]}function ce(e){return J=1,se(be,e)}function se(e,t,n){var o=le(V++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):be(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=Z,!Z.__f)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=!1,i=o.__c.props!==e;if(o.__c.__H.__.some(function(e){if(e.__N){r=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),a){var l=a.call(this,e,t,n);return r?l||i:l}return!r||i};Z.__f=!0;var a=Z.shouldComponentUpdate,i=Z.componentWillUpdate;Z.componentWillUpdate=function(e,t,n){if(this.__e){var o=a;a=void 0,r(e,t,n),a=o}i&&i.call(this,e,t,n)},Z.shouldComponentUpdate=r}return o.__N||o.__}function ue(e,t){var n=le(V++,3);!ee.__s&&ve(n.__H,t)&&(n.__=e,n.u=t,Z.__H.__h.push(n))}function pe(e){return J=5,_e(function(){return{current:e}},[])}function _e(e,t){var n=le(V++,7);return ve(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function fe(e,t){return J=8,_e(function(){return e},t)}function de(){for(var e;e=Q.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some(ye),t.__h=[]}catch(n){t.__h=[],ee.__e(n,e.__v)}}}ee.__b=function(e){Z=null,te&&te(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ie&&ie(e,t)},ee.__r=function(e){ne&&ne(e),V=0;var t=(Z=e.__c).__H;t&&(K===Z?(t.__h=[],Z.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ge),t.__h.some(ye),t.__h=[],V=0)),K=Z},ee.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&X===ee.requestAnimationFrame||((X=ee.requestAnimationFrame)||he)(de)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),K=Z=null},ee.__c=function(e,t){t.some(function(e){try{e.__h.some(ge),e.__h=e.__h.filter(function(e){return!e.__||ye(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ee.__e(n,e.__v)}}),re&&re(e,t)},ee.unmount=function(e){ae&&ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{ge(e)}catch(e){t=e}}),n.__H=void 0,t&&ee.__e(t,n.__v))};var me="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(o),me&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);me&&(t=requestAnimationFrame(n))}function ge(e){var t=Z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Z=t}function ye(e){var t=Z;e.__c=e.__(),Z=t}function ve(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function be(e,t){return"function"==typeof t?t(e):t}function we(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function Te(e,t){this.props=e,this.context=t}(Te.prototype=new C).isPureReactComponent=!0,Te.prototype.shouldComponentUpdate=function(e,t){return Se(this.props,e)||Se(this.state,t)};var Ae=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ae&&Ae(e)};var Ce="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ee(e){function t(t){var n=we({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ce,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var xe=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k||[]),r.__c(e,t);xe(e,t,n,o)};var Ne=t.unmount;function ke(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=we({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return ke(e,t,n)})),e}function Oe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Oe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function De(){this.__u=0,this.o=null,this.__b=null}function Re(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Ie(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ne&&Ne(e)},(De.prototype=new C).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=Re(o.__v),a=!1,i=function(){a||o.__z||(a=!0,n.__R=null,r?r(c):c())};n.__R=i;var l=n.__P;n.__P=null;var c=function(){if(!--o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.__P=l,t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},De.prototype.componentWillUnmount=function(){this.o=[]},De.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=ke(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&S(A,null,e.fallback);return r&&(r.__u&=-33),[S(A,null,t.__a?null:e.children),r]};var Le=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]{const r=e[o],a=t[o];et(r)&&et(a)&&!Array.isArray(r)?n[o]=tt(r,a):n[o]=a}),n}const nt=function(){function e(t){var n,o;return this.getChildContext||(n=new Set,(o={})[e.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,k(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),t.children}return e.__c="__cC"+m++,e.__=void 0,e.Provider=e.__l=(e.Consumer=function(e,t){return e.children(t)}).contextType=e,e}(),ot=(e,t)=>{const{contacts:n,contactId:o,storeName:r}=t.payload||{};switch(t.type){case"PERSIST_STATE":return((e,t,n=30)=>{let o=localStorage.getItem(e);if(o)o=JSON.parse(o),o.value=t;else{const e=new Date;o={value:t,expiration:new Date(e.getTime()+24*n*60*60*1e3).getTime()}}try{localStorage.setItem(e,JSON.stringify(o))}catch(t){if("QuotaExceededError"===t.name){console.warn("localStorage quota exceeded. Attempting to clear old data...");try{localStorage.removeItem(e),localStorage.setItem(e,JSON.stringify(o))}catch(e){console.error("Failed to save to localStorage even after clearing:",e)}}else console.error("Error saving to localStorage:",t)}})(r,{...e,contactsHash:Ke()(JSON.stringify(t.payload.contacts))}),e;case"HYDRATE_STATE":const a=(e=>{const t=localStorage.getItem(e);if(t){const n=JSON.parse(t);return(new Date).getTime()>n.expiration?(localStorage.removeItem(e),null):n.value}return null})(r),i=Ke()(JSON.stringify(n));return a?a.contactsHash!==i?{...Qe,contactsHash:i}:(n.find(e=>"bot"===e.type?e.bot_id===o:e.id===o)||(a.contactId=null),{...a}):e;case"SET_CONTACT_ID":if(null===o)return{...e,contactId:null};const l=n.find(e=>"bot"===e.type?e.bot_id===o:e.id===o),c=l?.message||"",s=e.contactsConversation[o];return s&&(s?.messageListArray?.[0]?.text||"")===c?{...e,contactId:o}:tt(e,{contactId:o,contactsConversation:{[o]:{messageListArray:""!==c?[{id:"",source:"user",text:c,status:""}]:[]}}});case"SET_GENERAL_CONSENT_ACCEPTED":const{accepted:u}=t.payload;return{...e,generalConsentAccepted:u}}return e},rt=()=>function(e){var t=Z.context[e.__c],n=le(V++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Z)),t.props.value):e.__}(nt),at=e=>{const{contacts:t,children:n}=e,[o,r]=se(ot,Qe),a=Je,i=fe(()=>{try{const e=[];for(let t=0;tlocalStorage.removeItem(e))}catch(e){console.warn("Failed to cleanup old storage entries:",e)}},[]),l=fe(()=>{r({type:"PERSIST_STATE",payload:{contacts:t,storeName:a}})},[t,a]),c=fe(()=>{r({type:"HYDRATE_STATE",payload:{contacts:t,storeName:a}})},[t,a]);return ue(()=>{i()},[i]),ue(()=>{c()},[c]),ue(()=>{l()},[o,l]),S(nt.Provider,{value:{...o,...e,setContactId:e=>{r({type:"SET_CONTACT_ID",payload:{contacts:t,contactId:e,storeName:a}})},setGeneralConsentAccepted:e=>{r({type:"SET_GENERAL_CONSENT_ACCEPTED",payload:{accepted:e}})}}},n)},it=(e,t,n)=>e,lt=(e,...t)=>{let n=0;return e.replace(/%(\d+\$)?s/g,(e,o)=>{var r,a;return o?null!==(r=t[parseInt(o)-1])&&void 0!==r?r:"":null!==(a=t[n++])&&void 0!==a?a:""})},ct=()=>S("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},S("path",{d:"M20.563 22.104l-1.875 1.875-8-8 8-8 1.875 1.875-6.125 6.125z"})),st=()=>S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},S("path",{d:"M12.001 2C6.47813 2 2.00098 6.47715 2.00098 12C2.00098 13.8893 2.50433 15.6617 3.38779 17.1902L2.05176 21.9922L6.97471 20.6842C8.45617 21.4958 10.1729 21.9999 12.001 21.9999C17.5238 21.9999 22.001 17.5228 22.001 11.9999C22.001 6.47706 17.5238 2 12.001 2ZM8.49659 7.3125C8.67819 7.3125 8.86375 7.31328 9.02603 7.32031C9.22603 7.32734 9.44788 7.34053 9.65845 7.82813C9.90845 8.39648 10.4397 9.76758 10.5084 9.91016C10.577 10.0527 10.6221 10.2198 10.5303 10.4023C10.4385 10.5848 10.3928 10.6987 10.2513 10.8633C10.1097 11.0273 9.95431 11.2295 9.82618 11.3574C9.68399 11.499 9.53643 11.653 9.70165 11.9355C9.86688 12.2181 10.4347 13.1504 11.2822 13.9082C12.3713 14.8828 13.2886 15.1826 13.5713 15.3252C13.854 15.4678 14.0226 15.4443 14.1878 15.2598C14.353 15.0752 14.8979 14.4336 15.0859 14.1504C15.274 13.8672 15.4619 13.916 15.7212 14.0117C15.9806 14.1074 17.3516 14.7773 17.6343 14.9199C17.917 15.0625 18.1059 15.1348 18.1748 15.2539C18.2441 15.373 18.2441 15.9414 18.0098 16.6074C17.7754 17.2734 16.6284 17.9072 16.1064 17.9531C15.5845 17.999 15.0918 18.1928 12.7432 17.2754C9.91772 16.1738 8.09619 13.3047 7.95361 13.1152C7.81103 12.9258 6.80176 11.5723 6.80176 10.1719C6.80176 8.77148 7.52759 8.08398 7.7876 7.79883C8.04736 7.51367 8.31494 7.3125 8.49659 7.3125Z"})),ut={phone:st,group:()=>S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},S("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})),bot:()=>S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},S("path",{fillRule:"evenodd",d:"M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM2 10H0V16H2V10ZM22 10H24V16H22V10ZM10.5 13C10.5 13.8284 9.82843 14.5 9 14.5C8.17157 14.5 7.5 13.8284 7.5 13C7.5 12.1716 8.17157 11.5 9 11.5C9.82843 11.5 10.5 12.1716 10.5 13ZM15 14.5C15.8284 14.5 16.5 13.8284 16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5Z"}))},pt=({contact:e})=>{const{box:t}=rt(),n=e?.type||"phone";return S("div",{className:"qlwapp__avatar"},S("div",{className:"qlwapp__avatar__type-badge","aria-hidden":"true"},S(ut[n]||st,null)),S("span",{className:"qlwapp__avatar__sr-only"},n),S("div",{className:"qlwapp__avatar__container"},e?.avatar?function(e){try{return new URL(e),!0}catch(e){return!1}}(e.avatar)?S("img",{src:e.avatar,alt:e.firstname,loading:"yes"===t.lazy_load&&"lazy"}):S("div",{className:"qlwapp__avatar__container qlwapp__avatar__container--icon"},S("span",null,e?.avatar)):S("div",{className:"qlwapp__avatar__container qlwapp__avatar__container--icon"},S("span",null,e?.name?.charAt(0).toUpperCase()))))},_t=(e,t)=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(e))};function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n2?n-2:0),r=2;r1?t-1:0),o=1;o1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:Rt;if(ht&&ht(e,null),!Dt(t))return e;let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(gt(t)||(t[o]=e),r=e)}e[r]=!0}return e}function Zt(e){for(let t=0;t/g),_n=wt(/\${[\w\W]*/g),fn=wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),dn=wt(/^aria-[\-\w]+$/),mn=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hn=wt(/^(?:\w+script|data):/i),gn=wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yn=wt(/^html$/i),vn=wt(/^[a-z][.\w]*(-[.\w]+)+$/i),bn=wt(/<[/\w!]/g),wn=wt(/<[/\w]/g),Sn=wt(/<\/no(script|embed|frames)/i),Tn=wt(/\/>/i),An=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Cn=bt(Vt({},An)),En=function(){const e={};return Et(An,t=>{e[t]=wt(new RegExp("])","i"))}),bt(e)}(),xn=function(){return"undefined"==typeof window?null:window},Nn=function(e,t,n,o){return $t(e,t)&&Dt(e[t])?Vt(o.base?Kt(o.base):{},e[t],o.transform):n},kn=function(e,t,n){const o=$t(e,t)?e[t]:void 0;return o&&"object"==typeof o?Kt(o):n()};var On=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xn();const n=t=>e(t);if(n.version="3.4.14",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let o=t.document;const r=o,a=r.currentScript;t.DocumentFragment;const i=t.HTMLTemplateElement,l=t.Node,c=t.Element,s=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const u=t.DOMParser,p=t.trustedTypes,_=c.prototype,f=Xt(_,"cloneNode"),d=Xt(_,"remove"),m=Xt(_,"nextSibling"),h=Xt(_,"childNodes"),g=Xt(_,"parentNode"),y=Xt(_,"shadowRoot"),v=Xt(_,"attributes"),b=l&&l.prototype?Xt(l.prototype,"nodeType"):null,w=l&&l.prototype?Xt(l.prototype,"nodeName"):null,S=l&&l.prototype?Xt(l.prototype,"ownerDocument"):null,T=function(e){return b?b(e):e.nodeType},A=function(e){return w?w(e):e.nodeName};if("function"==typeof i){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let C,E,x="",N=!1,k=0;const O=function(){if(k>0)throw jt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},D=function(e){O(),k++;try{return C.createHTML(e)}finally{k--}},R=o,I=R.implementation,L=R.createNodeIterator,P=R.createDocumentFragment,M=R.getElementsByTagName,q=r.importNode;let U={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof mt&&"function"==typeof g&&I&&void 0!==I.createHTMLDocument;const H=un,z=pn,F=_n,$=fn,B=dn,W=hn,j=gn,Y=vn;let G=mn,V=null;const Z=Vt({},[...Jt,...Qt,...en,...nn,...rn]);let K=null;const X=Vt({},[...an,...ln,...cn,...sn]);let J=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,ee=null;const te=Object.seal(St(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,oe=!0,re=!1,ae=!0,ie=!1,le=!0,ce=!1,se=!1,ue=null,pe=null,_e=!1,fe=!1,de=!1,me=!1,he=!0,ge=!1;const ye="user-content-";let ve=!0,be=!1,we={},Se=null;const Te=Vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ae=null;const Ce=Vt({},["audio","video","img","source","image","track"]);let Ee=null;const xe=Vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",Oe="http://www.w3.org/1999/xhtml";let De=Oe,Re=!1,Ie=null;const Le=Vt({},[Ne,ke,Oe],It),Pe=bt(["mi","mo","mn","ms","mtext"]);let Me=Vt({},Pe);const qe=bt(["annotation-xml"]);let Ue=Vt({},qe);const He=Vt({},["title","style","font","a","script"]);let ze=null;const Fe=["application/xhtml+xml","text/html"];let $e=null,Be=null;const We=o.createElement("form"),je=function(e){return e instanceof RegExp||e instanceof Function},Ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Be&&Be===e)return;e&&"object"==typeof e||(e={}),e=Kt(e),ze=-1===Fe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,$e="application/xhtml+xml"===ze?It:Rt,V=Nn(e,"ALLOWED_TAGS",Z,{transform:$e}),K=Nn(e,"ALLOWED_ATTR",X,{transform:$e}),Ie=Nn(e,"ALLOWED_NAMESPACES",Le,{transform:It}),Ee=Nn(e,"ADD_URI_SAFE_ATTR",xe,{transform:$e,base:xe}),Ae=Nn(e,"ADD_DATA_URI_TAGS",Ce,{transform:$e,base:Ce}),Se=Nn(e,"FORBID_CONTENTS",Te,{transform:$e}),Q=Nn(e,"FORBID_TAGS",Kt({}),{transform:$e}),ee=Nn(e,"FORBID_ATTR",Kt({}),{transform:$e}),we=!!$t(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Kt(e.USE_PROFILES):e.USE_PROFILES),ne=!1!==e.ALLOW_ARIA_ATTR,oe=!1!==e.ALLOW_DATA_ATTR,re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ie=e.SAFE_FOR_TEMPLATES||!1,le=!1!==e.SAFE_FOR_XML,ce=e.WHOLE_DOCUMENT||!1,fe=e.RETURN_DOM||!1,de=e.RETURN_DOM_FRAGMENT||!1,me=e.RETURN_TRUSTED_TYPE||!1,_e=e.FORCE_BODY||!1,he=!1!==e.SANITIZE_DOM,ge=e.SANITIZE_NAMED_PROPS||!1,ve=!1!==e.KEEP_CONTENT,be=e.IN_PLACE||!1,G=function(e){try{return Wt(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:mn,De="string"==typeof e.NAMESPACE?e.NAMESPACE:Oe,Me=kn(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>Vt({},Pe)),Ue=kn(e,"HTML_INTEGRATION_POINTS",()=>Vt({},qe));const t=kn(e,"CUSTOM_ELEMENT_HANDLING",()=>St(null));if(J=St(null),$t(t,"tagNameCheck")&&je(t.tagNameCheck)&&(J.tagNameCheck=t.tagNameCheck),$t(t,"attributeNameCheck")&&je(t.attributeNameCheck)&&(J.attributeNameCheck=t.attributeNameCheck),$t(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(J.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),wt(J),ie&&(oe=!1),de&&(fe=!0),we&&(V=Vt({},rn),K=St(null),!0===we.html&&(Vt(V,Jt),Vt(K,an)),!0===we.svg&&(Vt(V,Qt),Vt(K,ln),Vt(K,sn)),!0===we.svgFilters&&(Vt(V,en),Vt(K,ln),Vt(K,sn)),!0===we.mathMl&&(Vt(V,nn),Vt(K,cn),Vt(K,sn))),te.tagCheck=null,te.attributeCheck=null,$t(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?te.tagCheck=e.ADD_TAGS:Dt(e.ADD_TAGS)&&(V===Z&&(V=Kt(V)),Vt(V,e.ADD_TAGS,$e))),$t(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?te.attributeCheck=e.ADD_ATTR:Dt(e.ADD_ATTR)&&(K===X&&(K=Kt(K)),Vt(K,e.ADD_ATTR,$e))),$t(e,"ADD_FORBID_CONTENTS")&&Dt(e.ADD_FORBID_CONTENTS)&&(Se===Te&&(Se=Kt(Se)),Vt(Se,e.ADD_FORBID_CONTENTS,$e)),ve&&(V["#text"]=!0),ce&&Vt(V,["html","head","body"]),V.table&&(Vt(V,["tbody"]),delete Q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=C;C=e.TRUSTED_TYPES_POLICY;try{x=D("")}catch(e){throw C=t,e}}else null===e.TRUSTED_TYPES_POLICY?(C=void 0,x=""):(void 0===C&&(N||(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,a),N=!0),C=E),C&&"string"==typeof x&&(x=D("")));bt&&bt(e),Be=e},Ge=Vt({},[...Qt,...en,...tn]),Ve=Vt({},[...nn,...on]),Ze=function(e){kt(n.removed,{element:e});try{g(e).removeChild(e)}catch(t){if(d(e),!g(e))throw jt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ke=function(e,t,n){try{e.removeAttributeNode(t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},Xe=function(e){et(e);const t=h(e);if(t){const e=[];Et(t,t=>{kt(e,t)}),Et(e,e=>{try{d(e)}catch(e){}})}const n=v(e);if(n)for(let t=n.length-1;t>=0;--t){const o=n[t],r=o&&o.name;"string"==typeof r&&Ke(e,o,r)}},Je=function(e,t,o){if(!o)try{o=t.getAttributeNode(e)}catch(e){o=null}kt(n.removed,{attribute:o||null,from:t});try{o?t.removeAttributeNode(o):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(fe||de)try{Ze(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Qe=function(e){const t=v(e);if(t)for(let n=t.length-1;n>=0;--n){const o=t[n],r=o&&o.name;"string"!=typeof r||K[$e(r)]||Ke(e,o,r)}},et=function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===T(e)&&Qe(e);const n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tt=function(e,t){return!!le&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},nt=function(e){let t=null,n=null;if(_e)e=""+e;else{const t=Lt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ze&&De===Oe&&(e=''+e+"");const r=C?D(e):e;if(De===Oe)try{t=(new u).parseFromString(r,ze)}catch(e){}if(!t||!t.documentElement){t=I.createDocument(De,"template",null);try{t.documentElement.innerHTML=Re?x:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),De===Oe?M.call(t,ce?"html":"body")[0]:ce?t.documentElement:a},ot=function(e){const t=S?S(e):e.ownerDocument;return L.call(t||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},rt=function(e){return e=Pt(e,H," "),e=Pt(e,z," "),Pt(e,F," ")},at=function(e){var t;e.normalize();const n=S?S(e):e.ownerDocument,o=L.call(n||e,e,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let r=o.nextNode();for(;r;)r.data=rt(r.data),r=o.nextNode();const a=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");a&&Et(a,e=>{lt(e.content)&&at(e.content)})},it=function(e){const t=w?w(e):null;return"string"==typeof t&&"form"===$e(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==v(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==b(e)||e.childNodes!==h(e))},lt=function(e){if(!b||"object"!=typeof e||null===e)return!1;try{return 11===b(e)}catch(e){return!1}},ct=function(e){if(!b||"object"!=typeof e||null===e)return!1;try{return"number"==typeof b(e)}catch(e){return!1}};function st(e,t,o){0!==e.length&&Et(e,e=>{e.call(n,t,o,Be)})}const ut=function(e,t){if(e instanceof RegExp)return Wt(e,t);if(e instanceof Function){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r=0;--r){const a=e===n?f(o[r],!0):o[r];t.insertBefore(a,m(e))}}return Ze(e),!0}(e,o,t);return!1===n&&st(U.afterSanitizeElements,e,null),n}if(1===T(e)&&!function(e){let t=g(e);t&&t.tagName||(t={namespaceURI:De,tagName:"template"});const n=Rt(e.tagName),o=Rt(t.tagName);return!!Ie[e.namespaceURI]&&(e.namespaceURI===ke?function(e,t,n){return t.namespaceURI===Oe?"svg"===e:t.namespaceURI===Ne?"svg"===e&&("annotation-xml"===n||Me[n]):Boolean(Ge[e])}(n,t,o):e.namespaceURI===Ne?function(e,t,n){return t.namespaceURI===Oe?"math"===e:t.namespaceURI===ke?"math"===e&&Ue[n]:Boolean(Ve[e])}(n,t,o):e.namespaceURI===Oe?function(e,t,n){return!(t.namespaceURI===ke&&!Ue[n])&&!(t.namespaceURI===Ne&&!Me[n])&&!Ve[e]&&(He[e]||!Ge[e])}(n,t,o):!("application/xhtml+xml"!==ze||!Ie[e.namespaceURI]))}(e))return Ze(e),!0;if(("noscript"===o||"noembed"===o||"noframes"===o)&&Wt(Sn,e.innerHTML))return Ze(e),!0;if(ie&&3===e.nodeType){const t=rt(e.textContent);e.textContent!==t&&(kt(n.removed,{element:e.cloneNode()}),e.textContent=t)}return st(U.afterSanitizeElements,e,null),!1},dt=function(e,t,n){if(ee[t])return!1;if(tt(t,e))return!1;if(he&&("id"===t||"name"===t)&&(n in o||n in We))return!1;const r=K[t]||te.attributeCheck instanceof Function&&te.attributeCheck(t,e);return!(!oe||!Wt($,t))||!(!ne||!Wt(B,t))||(r?!(!Ee[t]&&!Wt(G,Pt(n,j,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Mt(n,"data:")||!Ae[e])&&(!re||Wt(W,Pt(n,j,"")))&&n):gt(e)&&ut(J.tagNameCheck,e)&&ut(J.attributeNameCheck,t,e)||"is"===t&&J.allowCustomizedBuiltInElements&&ut(J.tagNameCheck,n))},ht=Vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),gt=function(e){return!ht[Rt(e)]&&Wt(Y,e)},yt=function(e,t,n,o){if(C&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(e,t)){case"TrustedHTML":return D(o);case"TrustedScriptURL":return function(e){O(),k++;try{return C.createScriptURL(e)}finally{k--}}(o)}return o},vt=function(e,t,o,r){try{o?e.setAttributeNS(o,t,r):e.setAttribute(t,r),it(e)?Ze(e):Nt(n.removed)}catch(n){Je(t,e)}},Tt=function(e){st(U.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||it(e))return;K=pt(U.uponSanitizeAttribute,K,X,pe);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let o=t.length;const r=$e(e.nodeName);for(;o--;){const a=t[o],i=a.name,l=a.namespaceURI,c=a.value,s=$e(i),u=c;let p="value"===i?u:qt(u);n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,st(U.uponSanitizeAttribute,e,n),p=n.attrValue,!ge||"id"!==s&&"name"!==s||0===Mt(p,ye)||(Je(i,e,a),p=ye+p),le&&Wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===s&&Lt(p,"href")?Je(i,e,a):n.forceKeepAttr||(!n.keepAttr||!ae&&Wt(Tn,p)?Je(i,e,a):(ie&&(p=rt(p)),dt(r,s,p)?(p=yt(r,s,l,p),p!==u&&vt(e,i,l,p)):Je(i,e,a)))}st(U.afterSanitizeAttributes,e,null)},At=function(e){let t=null;const n=ot(e);for(st(U.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(st(U.uponSanitizeShadowNode,t,null),ft(t,e),Tt(t),lt(t.content)&&At(t.content),1===T(t)){const e=y(t);lt(e)&&(Ct(e),At(e))}st(U.afterSanitizeShadowDOM,e,null)},Ct=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){At(e.shadow);continue}const n=e.node,o=1===T(n),r=h(n);if(r)for(let e=r.length-1;e>=0;--e)t.push({node:r[e],shadow:null});if(o){const e=w?w(n):null;if("string"==typeof e&&"template"===$e(e)){const e=n.content;lt(e)&&t.push({node:e,shadow:null})}}if(o){const e=y(n);lt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,a=null,i=null,l=null;if(Re=!e,Re&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ct(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return Ut(e);case"boolean":return Ht(e);case"bigint":return zt?zt(e):"0";case"symbol":return Ft?Ft(e):"Symbol()";case"undefined":default:return Bt(e);case"function":case"object":{if(null===e)return Bt(e);const t=e,n=Xt(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:Bt(e)}return Bt(e)}}}(e)))throw jt("dirty is not a string, aborting");if(!n.isSupported)return e;se?(V=ue,K=pe):Ye(t),(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&(V=Kt(V)),U.uponSanitizeAttribute.length>0&&(K=Kt(K)),n.removed=[];const c=be&&"string"!=typeof e&&ct(e);if(c){!function(e){if(!le)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=T(e);if(7===n||8===n&&Wt(wn,e.data)){try{d(e)}catch(e){}continue}if(1===n){const t=e,n=$e(A(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&tt("for",n)&&t.removeAttribute("for")}catch(e){}}const o=h(e);if(o)for(let e=o.length-1;e>=0;--e)t.push(o[e])}}(e);const t=A(e);if("string"==typeof t){const n=$e(t);if(!V[n]||Q[n])throw Xe(e),jt("root node is forbidden and cannot be sanitized in-place")}if(it(e))throw Xe(e),jt("root node is clobbered and cannot be sanitized in-place");try{Ct(e)}catch(t){throw Xe(e),t}}else if(ct(e))o=nt("\x3c!----\x3e"),a=o.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a),Ct(a);else{if(!fe&&!ie&&!ce&&-1===e.indexOf("<"))return C&&me?D(e):e;if(o=nt(e),!o)return fe?null:me?x:""}o&&_e&&Ze(o.firstChild);const s=c?e:o;try{const e=ot(s);for(;i=e.nextNode();)ft(i,s),Tt(i),lt(i.content)&&At(i.content)}catch(t){throw c&&(Xe(e),Et(n.removed,e=>{e.element&&et(e.element)})),t}if(c)return Et(n.removed,e=>{e.element&&et(e.element)}),ie&&at(e),e;if(fe){if(ie&&at(o),de)for(l=P.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return(K.shadowroot||K.shadowrootmode)&&(l=q.call(r,l,!0)),l}let u=ce?o.outerHTML:o.innerHTML;return ce&&V["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&Wt(yn,o.ownerDocument.doctype.name)&&(u="\n"+u),ie&&(u=rt(u)),C&&me?D(u):u},n.setConfig=function(){Ye(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),se=!0,ue=V,pe=K},n.clearConfig=function(){Be=null,se=!1,ue=null,pe=null,C=E,x=""},n.isValidAttribute=function(e,t,n){Be||Ye({});const o=$e(e),r=$e(t);return dt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&$t(U,e)&&kt(U[e],t)},n.removeHook=function(e,t){if($t(U,e)){if(void 0!==t){const n=xt(U[e],t);return-1===n?void 0:Ot(U[e],n,1)[0]}return Nt(U[e])}},n.removeHooks=function(e){$t(U,e)&&(U[e]=[])},n.removeAllHooks=function(){U={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Dn=["style","form","input","button","textarea","select","option","iframe","frame","object","embed","base","link","meta"],Rn=["target","data-action","data-phone","data-message","data-whatsapp-link-type"],In=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix|whatsapp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;let Ln=!1;function Pn(e){return"string"!=typeof e||""===e?"":On.isSupported?(Ln||(On.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener noreferrer")}),Ln=!0),On.sanitize(e,{FORBID_TAGS:Dn,ADD_ATTR:Rn,ALLOWED_URI_REGEXP:In,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1})):""}const Mn=({onClose:e,onPrevious:t})=>{const{contactId:n,box:o,contacts:r}=rt(),a=r.find(e=>"bot"===e.type?e.bot_id===n:e.id===n),i=_e(()=>({__html:Pn(o.header)}),[o.header]);return S("div",{className:"qlwapp__header"},S("i",{className:"qlwapp__close",onClick:e,onKeyDown:t=>_t(t,e),role:"button",tabIndex:"0"},"×"),S("div",{className:"qlwapp__carousel"},S("div",{className:"qlwapp__carousel-slide"},o.header&&S("div",{className:"qlwapp__header-description",dangerouslySetInnerHTML:i})),S("div",{className:"qlwapp__carousel-slide"},S("div",{className:"qlwapp__header-contact"},S("div",{className:"qlwapp__header-contact-buttons"},S("a",{className:"qlwapp__previous",onClick:t,onKeyDown:e=>_t(e,t),role:"button",tabIndex:"0"},S(ct,null))),S("div",{className:"qlwapp__info"},S("span",{className:"qlwapp__name"},`${a?.firstname} ${a?.lastname}`),S("span",{className:"qlwapp__time"},a?.timefrom!==a?.timeto&<(it("Available from %1$s to %2$s"),a?.timefrom,a?.timeto),a?.label&&` - ${a?.label}`)),S(pt,{contact:a})))))},qn=()=>S("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},S("path",{d:"M2.776 31.54c-1.954 1.036-3.144 0.122-2.658-2.038l2.066-9.17c0.246-1.086 1.318-2.068 2.432-2.2l12.39-1.44c3.296-0.38 3.308-0.996 0-1.374l-12.39-1.416c-1.1-0.126-2.18-1.080-2.424-2.17l-2.080-9.264c-0.486-2.146 0.704-3.046 2.662-2.006l25.7 13.658c1.956 1.038 1.96 2.72 0 3.76l-25.7 13.66z"})),Un=()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=window.matchMedia("(pointer:coarse)");return t&&t.matches||e},Hn=({type:e,group:t,phone:n,message:o,whatsapp_link_type:r="web"})=>{const a=Un()?"api":r,i="api"===a?"https://api.whatsapp.com/send":"https://web.whatsapp.com/send";if("group"===e){const e=(e=>{try{const t=new URL(e);if("chat.whatsapp.com"===t.hostname)return t.pathname.replace("/","");if("web.whatsapp.com"===t.hostname&&"/accept"===t.pathname)return t.searchParams.get("code")}catch(e){console.error("Invalid URL",e)}return null})(t);return"api"===a?`https://chat.whatsapp.com/${e}`:`https://web.whatsapp.com/accept?code=${e}`}return`${i}?phone=${function(e){return(e=e.replace(new RegExp("[^0-9]","g"),"")).replace(new RegExp("^0+"),"")}(n?.toString())}&text=${encodeURIComponent(function(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}(o))}`};function zn(e){const t=Hn(e),n=new CustomEvent("qlwapp.click",{bubbles:!0,cancelable:!0});window.dispatchEvent(n),window.open(t,"_blank","noreferrer")}const Fn=()=>{const{box:e,contacts:t,contactId:n,generalConsentAccepted:o}=rt(),r=t.find(e=>"bot"===e.type?e.bot_id===n:e.id===n),[a,i]=ce(""),l=pe(),c=pe(null),s="yes"===e?.consent_enabled&&!o,u=!a.trim()||s,p=_e(()=>({__html:Pn(e.footer)}),[e.footer]);ue(()=>{l.current&&l.current.focus()},[]);const _=(e=!1)=>{const t=l.current;t&&(t.style.height="",e||""===a||(t.style.height=`${t.scrollHeight}px`))},f=e=>{e.preventDefault(),(()=>{if(u)return;const e=a.trim();i(""),_(!0),zn({...r,message:e})})()},d=fe(e=>{if(c.current&&(c.current.disconnect(),c.current=null),!e)return;const t=()=>{const t=e.getBoundingClientRect().width;document.documentElement.style.setProperty("--qlwapp-button-width",`${t}px`)};t();const n=requestAnimationFrame(t),o=new ResizeObserver(t);return o.observe(e),c.current=o,()=>{cancelAnimationFrame(n),o.disconnect()}},[]);return S(A,null,e?.footer&&S("div",{className:"qlwapp__footer",dangerouslySetInnerHTML:p}),S("div",{className:"qlwapp__response"},S("pre",{className:"qlwapp__response__input"},a),S("textarea",{className:"qlwapp__response__input",name:"message",ref:l,maxLength:"300",onChange:e=>{e.preventDefault(),i(e.target.value),_()},onKeyDown:e=>{e.shiftKey&&"Enter"===e.key||"Enter"!==e.key||u||f(e)},value:a,placeholder:e?.response,"aria-label":e?.response,tabIndex:"0",disabled:s}),S("div",{className:"qlwapp__response__buttons",ref:d},S("a",{className:Ve()("qlwapp__reply",u&&"qlwapp__reply--disabled"),role:"button",tabIndex:"0",onClick:f,title:"Send",target:"blank"},S(qn,null)))))};function $n(e,t){return parseInt(e+t)}function Bn(e){let t=""+e.getMinutes();return 1===t.length&&(t="0"+t),e.getHours()+":"+t}const Wn=({timezone:e,timefrom:t,timeto:n,timedays:o})=>{const r=(({timedays:e})=>{const t=(new Date).getDay().toString();return e?.includes(t)||0===e?.length})({timedays:o}),a=function(e){let t=0;if(e?.includes("UTC")){const n=e.replace(new RegExp("UTC\\+?"),"");isNaN(n)||(t=60*parseInt(n))}else try{const n=(new Date).toLocaleString("en-US",{timeZone:e});t=(new Date(n+" UTC")-new Date)/6e4}catch(e){return 0}return t}(e),i=new Date,l=new Date,c=new Date;let s=l.getTime(),u=i.getTime();if(t!==n){const e=-c.getTimezoneOffset()-(a||0);let o,p;o=$n(t[0],t[1]),p=$n(t[3],t[4]),l.setHours(o),l.setMinutes(p+e),s=l.getTime(),o=$n(n[0],n[1]),p=$n(n[3],n[4]),i.setHours(o),i.setMinutes(p+e),u=i.getTime(),s>u&&(s-=864e5);const _=s<=c.getTime()&&c.getTime()<=u;return{isAvailableNow:r&&_,isInAvailableDay:r,isInAvailableHour:_,timefrom:Bn(l),timeto:Bn(i)}}return{isAvailableNow:r,isInAvailableDay:r,isInAvailableHour:!0}};function jn(e,t){return!!e.includes(parseInt(t))||!!e.includes(t.toString())}function Yn({timedays:e,timezone:t}){const n=function(e){try{let t=new Date;const n={weekday:"long"},o=function(e){const t=e.match(new RegExp("^UTC([+-]\\d{1,2})$"));return t?60*parseInt(t[1],10)*60*1e3:null}(e);if(null!==o){const e=new Date(t.getTime()+6e4*t.getTimezoneOffset()+o);n.timeZone="UTC",t=e}else n.timeZone=e;return{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}[new Intl.DateTimeFormat("en-US",n).formatToParts(t).find(e=>"weekday"===e.type).value]}catch(e){return null}}(t);if(null===n)return!1;const o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];for(let t=n;t<=6;t++)if(jn(e,t))return o[t];for(let t=0;t{const{box:n,generalConsentAccepted:o}=rt(),{isAvailableNow:r,isInAvailableDay:a,isInAvailableHour:i,timefrom:l,timeto:c}=Wn(e);if(!r&&"hidden"===e.visibility)return;const s=Yn(e),u="yes"===n?.consent_enabled&&!o;return S("a",{className:Ve()("qlwapp__contact",!r&&"readonly"===e.visibility||u?"qlwapp__contact--disabled":""),onClick:t,onKeyDown:_t,role:"button",tabIndex:"0",target:"_blank"},S(pt,{contact:e}),S("div",{className:"qlwapp__info"},S("span",{className:"qlwapp__label"},e?.label),S("span",{className:"qlwapp__name"},"bot"===e?.type?e?.firstname:`${e?.firstname} ${e?.lastname}`),"with_status"===e?.visibility&&S("div",{className:"qlwapp__status qlwapp__info"},S("div",{className:"qlwapp__status__indicator "+(r?"qlwapp__status__indicator--online":"qlwapp__status__indicator--offline")}),S("span",{className:"qlwapp__status__text"},r?"Online":"Offline")),a?!i&&S("span",{className:"qlwapp__time"},lt(it("Available from %1$s to %2$s"),l,c)):s&&S("span",{className:"qlwapp__time"},lt(it("Available on %s"),s))))},Vn=({onClick:e})=>{const[,t]=(()=>{const[e,t]=ce(!1);return[e,e=>{t(!0),setTimeout(()=>{e(),t(!1)},0)}]})(),n=pe(null),{box:o,contacts:r,setContactId:a,generalConsentAccepted:i}=rt(),l=n=>r=>{r.preventDefault(),"yes"===o?.consent_enabled&&!i||(n.chat||"bot"===n?.type?(e("qlwapp__modal--opening"),t(()=>{a("bot"===n.type?n.bot_id:n.id)})):zn(n))},c=()=>{const e=document.querySelector(".qlwapp__header")?.offsetHeight,t=o.footer?document.querySelector(".qlwapp__footer")?.offsetHeight:document.querySelector(".qlwapp__response")?.offsetHeight;let n=window.innerHeight-e-t;Un()&&(n=.7*window.innerHeight-e-t),document.documentElement.style.setProperty("--qlwapp-scheme-box-height",`${n}px`)};return ue(()=>(window.addEventListener("resize",c()),window.addEventListener("load",c()),()=>{window.removeEventListener("resize",c()),window.removeEventListener("load",c())}),[]),ue(()=>{const e=n.current;if(!e)return;const t=t=>{const n=e.scrollTop<=0,o=Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight;(n&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]),S("div",{ref:n,className:"qlwapp__contact-list"},r.length?r.map(e=>S(Gn,{key:e.id,contact:e,onClick:l(e)})):S("div",{className:"qlwapp__contact-list__empty"},"No contacts found."))};var Zn={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
"]," ":["
"],"-":["
"]};function Kn(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Xn(e){return(e+"").replace(/"/g,""").replace(//g,">")}function Jn(e,t){var n,o,r,a,i,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,c=[],s="",u=t||{},p=0;function _(e){var t=Zn[e[1]||""],n=c[c.length-1]==e;return t?t[1]?(n?c.pop():c.push(e),t[0|n]):t[0]:e}function f(){for(var e="";c.length;)e+=_(c[c.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,t,n){return u[t.toLowerCase()]=n,""}).replace(/^\n+|\n+$/g,"");r=l.exec(e);)o=e.substring(p,r.index),p=l.lastIndex,n=r[0],o.match(/[^\\](\\\\)*\\$/)||((i=r[3]||r[4])?n='
"+Kn(Xn(i).replace(/^\n+|\n+$/g,""))+"
":(i=r[6])?(i.match(/\./)&&(r[5]=r[5].replace(/^\d+/gm,"")),a=Jn(Kn(r[5].replace(/^\s*[>*+.-]/gm,""))),">"==i?i="blockquote":(i=i.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"
  • $1
  • ")),n="<"+i+">"+a+""):r[8]?n=''+Xn(r[7])+'':r[10]?(s=s.replace("
    ",''),n=f()+""):r[9]?n="":r[12]||r[14]?n="<"+(i="h"+(r[14]?r[14].length:r[13]>"="?1:2))+">"+Jn(r[12]||r[15],u)+"":r[16]?n=""+Xn(r[16])+"":(r[17]||r[1])&&(n=_(r[17]||"--"))),s+=o,s+=n;return(s+e.substring(p)+f()).replace(/^\n+|\n+$/g,"")}function Qn(e){if(null==e)return"";const t=new RegExp("(https?:\\/\\/[^\\s<]+)","g"),n=[];let o=Jn(e.replace(t,e=>{const t=`URLPLACEHOLDER${n.length}URLPLACEHOLDER`;return n.push(e),t}));return n.forEach((e,t)=>{const n=`URLPLACEHOLDER${t}URLPLACEHOLDER`;o=o.replace(n,e)}),o}const eo=e=>{if(!e||"string"!=typeof e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value.replace(new RegExp("&","g"),"&").replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">").replace(new RegExp('"',"g"),""").replace(new RegExp("'","g"),"'").replace(new RegExp("\\n","g"),"
    ")},to=({text:e,status:t,source:n})=>{const o=_e(()=>({__html:Pn(Qn(eo(e)))}),[e]);return S("div",{className:Ve()("qlwapp__message",n&&`qlwapp__message--${n}`,t&&`qlwapp__message--${t}`)},S("div",{dangerouslySetInnerHTML:o}))},no=()=>{const e=pe(null),t=pe(null),{contactId:n,contactsConversation:o}=rt(),{messageListArray:r=[]}=o[n]||{messageListArray:[]};return ue(()=>{e.current&&r.length>0&&setTimeout(()=>{e.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[700])},[r]),ue(()=>{const e=t.current;if(!e)return;const n=t=>{const n=e.scrollTop<=0,o=Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight;(n&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()};return e.addEventListener("wheel",n,{passive:!1}),()=>e.removeEventListener("wheel",n)},[]),S("div",{ref:t,className:"qlwapp__message-list"},r.map(e=>S(to,{key:e.id,...e})),S("span",{ref:e}))},oo=()=>{const{contactId:e,box:t,generalConsentAccepted:n}=rt(),o=e;return!o||"yes"===t?.consent_enabled&&!n?null:S("iframe",{key:o,className:"qlwapp__bot-frame",src:`https://viewer.quick.bot/${encodeURIComponent(o)}`,title:"Chatbot conversation",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-downloads",allow:"microphone; clipboard-write"})},ro=()=>{const{box:e,generalConsentAccepted:t,setGeneralConsentAccepted:n}=rt(),[o,r]=ce(!0),[a,i]=ce(!1),l="yes"===e?.consent_enabled,c=e?.consent_message||"I accept cookies and privacy policy.",s=_e(()=>({__html:Pn(c)}),[c]);return l&&o?S("div",{className:`qlwapp__general-consent ${a?"qlwapp__general-consent--accepted":""} ${t?"":"qlwapp__general-consent--required"}`},S("label",{className:"qlwapp__general-consent-label"},S("input",{id:"qlwapp_general_consent",type:"checkbox",checked:t,onChange:e=>{const t=e.target.checked;n(t),t&&(i(!0),setTimeout(()=>{r(!1)},1e3))},className:"qlwapp__general-consent-checkbox",required:!0,"aria-required":"true"}),S("span",{className:"qlwapp__general-consent-text",dangerouslySetInnerHTML:s}))):null},ao=Ee(({handleBoxClose:e},t)=>{const{contactId:n,setContactId:o,contacts:r}=rt(),[a,i]=ce(""),l=null!==n,c=r?.find(e=>"bot"===e.type?e.bot_id===n:e.id===n),s="bot"===c?.type;return S("div",{ref:t,className:Ve()("qlwapp__modal",l&&"qlwapp__modal--response",a)},S(Mn,{onClose:e,onPrevious:e=>{e.preventDefault(),i("qlwapp__modal--closing"),setTimeout(()=>{o(null),i("")},[300])}}),S("div",{className:"qlwapp__body"},S("div",{className:"qlwapp__carousel"},S("div",{className:"qlwapp__carousel-slide"},S(Vn,{onClick:i})),S("div",{className:"qlwapp__carousel-slide"},null!==n&&S(s?oo:no,null)))),S(ro,null),!s&&S(Fn,null))}),io=Ee((e,t)=>S(ao,{...e,ref:t})),lo=e=>(e=>!(!e||"string"!=typeof e)&&(e.startsWith("http")||e.startsWith("https")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)||e.includes(".")))(e)?S("img",{src:e,alt:"Custom Icon",className:"qlwapp__icon"}):S("i",{className:Ve()("qlwapp__icon",e)}),co=function({onClick:e}){const{button:t,primaryContact:n,isModalOpen:o}=rt();if(!n)return null;const{isAvailableNow:r,isInAvailableDay:a,isInAvailableHour:i,timefrom:l,timeto:c}=Wn(t);if(!r&&"hidden"===t.visibility)return;const s=Yn(t);return S("a",{className:Ve()("qlwapp__button",`qlwapp__button--${t.layout}`,!r&&"qlwapp__button--disabled"),role:"button",tabIndex:"0",onClick:o=>(o=>{o.preventDefault(),"yes"===t.box?e(o):(e=>{e.preventDefault(),zn(n)})(o)})(o)},"image"===t.layout?lo(t.icon):S(A,null,lo(t.icon),"bubble"===t.layout&&S("i",{className:"qlwapp__close"},"×"),t.text&&S("span",{className:"qlwapp__text"},t.text)),"bubble"===t.notification_bubble&&r&&!o&&S("span",{className:Ve()("qlwapp__notification-bubble",t.notification_bubble_animation&&`qlwapp__notification-bubble--${t.notification_bubble_animation}`),"aria-label":"New message notification"},"1"),a?!i&&S("span",{className:"qlwapp__time"},lt(it("Available from %1$s to %2$s"),l,c)):s&&S("span",{className:"qlwapp__time"},lt(it("Available on %s"),s)))},so=()=>window.innerWidth<=430&&Un(),uo=({children:e,containerRef:t,boxTransitionClass:n,isMobilePreview:o})=>{const[r,a]=ce(so()),{button:i}=rt(),l="yes"===i.rounded;ue(()=>{const e=()=>{a(so())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const c=r||o;return S("div",{ref:t,className:Ve()("qlwapp__container",`qlwapp__container--${i.position}`,l&&"qlwapp__container--rounded",c&&"qlwapp-is-mobile",n)},e)},po=e=>!("hide"===e||"desktop"===e&&Un()||"mobile"===e&&!Un()),_o=e=>e?(Array.isArray(e)||(e=Object.values(e)),e.filter(e=>{const t=po(e?.display?.devices),n="hidden"===e?.visibility&&!Wn(e).isAvailableNow;return t&&!n}).sort((e,t)=>{const n=void 0!==e.order&&null!==e.order?e.order:Number.MAX_SAFE_INTEGER,o=void 0!==t.order&&null!==t.order?t.order:Number.MAX_SAFE_INTEGER;return n===o?0:n{const{box:t,button:n,contacts:o,isMobilePreview:r,previewContainerRef:a}=e,i=_o(o),l=pe(null),c=pe(null),[s,u]=ce(!1),[p,_]=ce(""),f="qlwapp_box_closed",d="yes"===t.auto_open&&"yes"===n.box,m="true"===function(e){const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}(f),h=Number(t.auto_delay_open);ue(()=>{d&&!m&&setTimeout(()=>{u(!0)},h)},[]),ue(()=>{const e=t.allow_outside_close||"no",n=t=>{s&&"yes"===e&&c.current&&!c.current.contains(t.target)&&(a?.current?a.current.contains(t.target)&&g(t):g(t))};if(s&&"yes"===e)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[s,t.allow_outside_close,a]);const g=e=>{e?.preventDefault(),_("qlwapp__container--closing"),function(e){let t="";{const e=new Date;e.setTime(e.getTime()+6048e5),t="; expires="+e.toUTCString()}document.cookie=e+"=true"+t+"; path=/"}(f),setTimeout(()=>{u(!1),_("")},300)};return S(at,{...e,contacts:i,isModalOpen:s},S(uo,{isMobilePreview:r,boxTransitionClass:p,containerRef:l},s&&S(io,{ref:c,handleBoxClose:g}),S(co,{onClick:()=>{s?g():(u(!0),_("qlwapp__container--opening"),setTimeout(()=>{_("qlwapp__container--open")},300))}})))}),mo=(e,t,n)=>{if(!e.hasAttribute(t))return n;try{var o;return null!==(o=JSON.parse(e.getAttribute(t)))&&void 0!==o?o:n}catch(e){return n}};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".qlwapp").forEach(e=>{var t,n;const o=mo(e,"data-display",{}),r=mo(e,"data-button",{}),a=null!==(t=r?.devices)&&void 0!==t?t:o?.devices;if(!po(a))return;const i=mo(e,"data-box",{}),l=mo(e,"data-contacts",[]),c=_o(l),s=e.hasAttribute("data-primary-contact")?mo(e,"data-primary-contact",null):null!==(n=l[0])&&void 0!==n?n:null;Ye(e).render(S(fo,{display:o,button:r,box:i,contacts:c,primaryContact:s}))}),document.addEventListener("click",e=>{const t=e.target.closest('[data-action="open"]');if(!t)return;e.preventDefault();const n=t.dataset.phone,o=t.dataset.message,r=t.dataset.whatsappLinkType||"api";if(!n)return;const a=Hn({type:"phone",phone:n,message:o,whatsappLinkType:r}),i=new CustomEvent("qlwapp.click",{bubbles:!0,cancelable:!0});window.dispatchEvent(i),window.open(a,"_blank","noreferrer")})})})()})(); ;/*! This file is auto-generated */ /*! * imagesLoaded PACKAGED v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License */ !function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})), /*! * imagesLoaded v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License */ function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n})); ;/*! This file is auto-generated */ /*! * Masonry PACKAGED v4.2.2 * Cascading grid layout library * https://masonry.desandro.com * MIT License * by David DeSandro */ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;oe;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});