!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../keycode","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e<a;e++)s.push("<span tabindex='0'></span>");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t<s||s===t&&(e===l._lastChangedValue||l.values(e)===u.min))&&(s=t,a=o(this),n=e)}),!1!==this._start(e,n))&&(this._mouseSliding=!0,this._handleIndex=n,this._addClass(a,null,"ui-state-active"),a.trigger("focus"),t=a.offset(),h=!o(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-t.left-a.width()/2,top:e.pageY-t.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_uiHash:function(e,t,i){var s={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==t?t:this.values(e),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var s,a=this.value(),n=this.values();this._hasMultipleValues()&&(s=this.values(t?0:1),a=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(s,i):Math.max(s,i)),n[t]=i),i!==a&&!1!==this._trigger("slide",e,this._uiHash(t,i,n))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,s,a;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{if(!arguments.length)return this._values();if(!Array.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,s=e,a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(s[a]),this._change(null,a);this._refreshValue()}},_setOption:function(e,t){var i,s=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i;if(arguments.length)return e=this.options.values[e],this._trimAlignValue(e);if(this._hasMultipleValues()){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(e){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,u=!this._animateOff&&h.animate,r={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,r["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[u?"animate":"css"](r,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,r["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](r,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1!==this._start(e,a)))break;return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})});
!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var o,e=t.ui.mouse.prototype,u=e._mouseInit,n=e._mouseDestroy;e._touchStart=function(t){!o&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(o=!0,this._touchMoved=!1,c(t,"mouseover"),c(t,"mousemove"),c(t,"mousedown"))},e._touchMove=function(t){o&&(this._touchMoved=!0,c(t,"mousemove"))},e._touchEnd=function(t){o&&(c(t,"mouseup"),c(t,"mouseout"),this._touchMoved||c(t,"click"),o=!1)},e._mouseInit=function(){this.element.on({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),u.call(this)},e._mouseDestroy=function(){this.element.off({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),n.call(this)}}function c(t,o){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var e=t.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(o,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(u)}}}(jQuery);
!function(s){"use strict";var t=Array.prototype.slice;s.extend(s.event.special,{resizestop:{add:function(e){var i=e.handler;s(this).on("resize",function(t){clearTimeout(i._timer),t.type="resizestop",t=s.proxy(i,this,t),i._timer=setTimeout(t,e.data||200)})}},resizestart:{add:function(e){var i=e.handler;s(this).on("resize",function(t){clearTimeout(i._timer),i._started||(t.type="resizestart",i.apply(this,arguments),i._started=!0),i._timer=setTimeout(s.proxy(function(){i._started=!1},this),e.data||300)})}}}),s.extend(s.fn,{resizestop:function(){s(this).on.apply(this,["resizestop"].concat(t.call(arguments)))},resizestart:function(){s(this).on.apply(this,["resizestart"].concat(t.call(arguments)))}})}(window.jQuery);
!function(){"use strict";String.prototype.isNumeric||Object.defineProperty(String.prototype,"isNumeric",{value:function(){return!isNaN(parseFloat(this))&&isFinite(this)}})}(),window.jQuery.jMaskGlobals={maskElements:".tc-extra-product-options input"},function(i){"use strict";var t;i.epoAPI={},i.epoAPI.error=!1,i.epoAPI.math={},i.epoAPI.dom={},i.epoAPI.util={},i.epoAPI.locale={},i.epoAPI.template={},i.epoAPI.math.toFloat=function(e,t){var n;return"string"!=typeof e&&"number"!=typeof e||isNaN(e)?0:(n=parseFloat(e),isNaN(n)?void 0!==t?t:e:n)},i.epoAPI.math.toInt=function(e,t){var n;return"string"!=typeof e&&"number"!=typeof e||isNaN(e)||""===e?0:(n=parseInt(e,10),isNaN(n)?void 0!==t?t:e:n)},i.epoAPI.math.round=function(e,t,n){var o,r,i;if(t=parseInt(t,10),Number.isFinite(t)||(t=0),r=(e*=t=Math.pow(10,t))%1==.5*(i="number"==typeof e&&e?e<0?-1:1:0),o=Math.floor(e),r)switch(n){case"PHP_ROUND_HALF_DOWN":e=o+(i<0?1:0);break;case"PHP_ROUND_HALF_EVEN":e=o+o%2*i;break;case"PHP_ROUND_HALF_ODD":e=o+(o%2?0:1);break;default:e=o+(0<i?1:0)}return(e=r?e:Math.round(e))/t},i.epoAPI.math.uniqueid=function(e,t){function n(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?new Array(t-e.length+1).join("0")+e:e}return void 0===e&&(e=""),i.epoAPI.php=i.epoAPI.php||{},i.epoAPI.php.uniqidSeed||(i.epoAPI.php.uniqidSeed=Math.floor(123456789*Math.random())),i.epoAPI.php.uniqidSeed+=1,e=e,e=(e+=n(parseInt(Date.now()/1e3,10),8))+n(i.epoAPI.php.uniqidSeed,5),t&&(e+=(10*Math.random()).toFixed(8).toString()),e},i.epoAPI.dom.id=function(e){return void 0===e?e:"string"!=typeof e&&"number"!=typeof e||"number"==typeof e&&isNaN(e)?e.toString():e.toString().replace(/(%|:|\.|\[|\]|,|=)/g,"\\$1")},i.epoAPI.dom.scroll=function(){var e,t;return window.pageYOffset?(t=window.pageYOffset,e=window.pageXOffset):document.documentElement&&document.documentElement.scrollTop?(t=document.documentElement.scrollTop,e=document.documentElement.scrollLeft):document.body&&(t=document.body.scrollTop,e=document.body.scrollLeft),{left:e,top:t}},i.epoAPI.dom.size=function(){var e,t,n,o=window.innerHeight&&window.scrollMaxY?(e=window.innerWidth+window.scrollMaxX,window.innerHeight+window.scrollMaxY):document.body.scrollHeight>document.body.offsetHeight?(e=document.body.scrollWidth,document.body.scrollHeight):(e=document.body.offsetWidth,document.body.offsetHeight);return window.innerHeight?(t=document.documentElement.clientWidth||window.innerWidth,n=window.innerHeight):document.documentElement&&document.documentElement.clientHeight?(t=document.documentElement.clientWidth,n=document.documentElement.clientHeight):document.body&&(t=document.body.clientWidth,n=document.body.clientHeight),{fullWidth:e<t?t:e,fullHeight:o<n?n:o,visibleWidth:t,visibleHeight:n,totalWidth:e,totalHeight:o}},i.epoAPI.util.escapeSelector=(t=/([!"$%&'()*+,/:;<=>?@[\]^`{|}~])/g,function(e){return e.replace(t,"\\$1")}),i.epoAPI.util.parseParams=function(e,n){return"string"!=typeof e||void 0===e.split?[]:e.split("&").map(function(e){var t={};return 1<(e=(e=!0===n?decodeURIComponent(e.replace(/\+/g,"%20")):e).split("=").map(function(e){var t=e.split("?");return 1<t.length?t[1]:e})).length&&(t[e[0]]=e[1]),t}).filter(function(e){return null!==e}).reduce(function(e,t){return Object.assign({},e,t)},{})},i.epoAPI.util.trim=function(e){return"string"==typeof e?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e},i.epoAPI.util.parseJSON=function(e){var t,n=window.JSON;try{if((t=n.parse(e+""))&&"object"==typeof t&&null!==t)return t}catch(e){i.epoAPI.error=e}return!1},i.epoAPI.util.decodeHTML=function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},i.epoAPI.util.getStorage=function(e){var t,n;try{return t=window[e],n="__storage_test__",t.setItem(n,n),t.removeItem(n),t}catch(e){return!1}},i.epoAPI.util.basename=function(e){return e.replace(/.*\//,"")},i.epoAPI.util.getType=function(e){var t=Object.prototype.toString.call(e).match(/\[object (\w+)]/)[1].toLowerCase();return"object"===t&&Object.getPrototypeOf(e)===Object.prototype?"object":"object"===t?"other":t},i.epoAPI.util.deepCopyArray=function(t){var n,o;return void 0!==window.structuredClone?window.structuredClone(t):"object"!=typeof t||null===t?t:(n=Array.isArray(t)?[]:{},Object.keys(t).forEach(function(e){t&&(o=t[e],n[e]="object"==typeof o&&null!==o?i.epoAPI.util.deepCopyArray(o):o)}),n)},i.epoAPI.util.isEmpty=function(t,e){var e=1===(e||[void 0,null,!1,0,"","0"]).filter(function(e){return t===e}).length,n=!1;return t&&"object"==typeof t?0===Object.keys(t).filter(function(e){return Object.prototype.hasOwnProperty.call(t,e)}).length:e||n},i.epoAPI.util.isEmptyValue=function(e){return i.epoAPI.util.isEmpty(e,[void 0,null,!1])},i.epoAPI.util.clenValue=function(e,t){return i.epoAPI.util.isEmptyValue(e)?t||"":e},i.epoAPI.locale.getSystemDecimalSeparator=function(){var e=1.1;return e=(e=/^1(.+)1$/.exec(e.toLocaleString()))?e[1]:","},i.epoAPI.template.html=function(e,t){e=e(t);return e=(e=e.replace("","")).replace("/*]]>*/","")},i.epoAPI.filters={},i.epoAPI.addFilter=function(e,t,n,o){var r;return n=parseInt(n,10),isNaN(n)&&(n=10),o=parseInt(o,10),isNaN(o)&&(o=1),r=t+"_"+n,i.epoAPI.filters[e]||(i.epoAPI.filters[e]={}),i.epoAPI.filters[e][n]||(i.epoAPI.filters[e][n]={}),i.epoAPI.filters[e][n][r]={func:t,accepted_args:o},!0},i.epoAPI.removeFilter=function(e,t,n){return n=parseInt(n,10),t=t+"_"+(n=isNaN(n)?10:n),!!(i.epoAPI.filters[e]&&i.epoAPI.filters[e][n]&&i.epoAPI.filters[e][n][t])&&(delete i.epoAPI.filters[e][n][t],!0)},i.epoAPI.applyFilter=function(e,n){var o=i.makeArray(arguments);return o.splice(0,1),i.epoAPI.filters[e]&&(e=i.epoAPI.filters[e],i.each(e,function(e,t){i.each(t,function(e,t){t=t.func;t instanceof Function?n=t.apply(null,o):window[t]&&window[t]instanceof Function&&(n=window[t].apply(null,o))})})),n},i.tc_add_filter=i.epoAPI.addFilter,i.tc_remove_filter=i.epoAPI.removeFilter,i.tc_apply_filters=i.epoAPI.applyFilter}(window.jQuery),function(e){"use strict";function i(e,t){return e=Math.round(Math.abs(e)),isNaN(e)?t:e}function a(e,t){var n;return Array.isArray(e)?e.map(e,function(e){return a(e,t)}):"number"==typeof(e=e||0)?e:(t=t||".",n=new RegExp("[^0-9-"+t+"]",["g"]),e=parseFloat((""+e).replace(n,"").replace(t,".")),isNaN(e)?0:e)}function c(e,t){return Number.isFinite(e)?(t=i(t,2),e=Number(a(e)*Math.pow(10,t)),e=Math.round(e),Number(e/Math.pow(10,t)).toFixed(t)):"-"}e.epoAPI.math.unformat=a,e.epoAPI.math.format=function t(e,n){var o,r;if(Array.isArray(e))return e.map(function(e){return t(e,n)});if(e=a(e),n)if(n.precision=i(n.precision),n.format&&n.symbol)o={pos:n.format,neg:n.format.replace("-","").replace("%v","-%v"),zero:n.format},o=0<e?o.pos:e<0?o.neg:o.zero,n.opts={precision:n.precision,thousand:n.thousand,decimal:n.decimal},e=o.replace("%s",n.symbol).replace("%v",t(Math.abs(e),n.opts));else{if(!Number.isFinite(e))return"-";e=(e<0?"-":"")+((r=3<(o=parseInt(c(Math.abs(e||0),n.precision),10)+"").length?o.length%3:0)?o.substring(0,r)+n.thousand:"")+o.substring(r).replace(/(\d{3})(?=\d)/g,"$1"+n.thousand)+(n.precision?n.decimal+c(Math.abs(e),n.precision).split(".")[1]:"")}return e},e.epoAPI.math.toFixed=c}(window.jQuery),function(u){"use strict";var t,o=/\r?\n/g,n=/^(?:checkbox|radio)$/i,r=/^(?:submit|button|image|reset|file)$/i,i=/^(?:input|select|textarea|keygen)/i;u.easing.easeInExpo||(u.easing.easeInExpo=t=function(e){return Math.pow(e,6)},u.easing.easeOutExpo=function(e){return 1-t(1-e)},u.easing.easeInOutExpo=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}),u.fn.extend({tmcheckboxes:function(){var e=this.find(":checkbox:not('.tm-default-checkbox')").not(".wp-tab-panel :checkbox, .tm-weekdays-picker-wrap :checkbox, .tm-months-picker-wrap :checkbox");return e.wrap('<label class="tm-epo-switch-wrapper-label"></label>'),e.wrap('<span class="tm-epo-switch-wrapper tc"></span>'),e.after('<span class="tc-label tm-epo-switch tc"></span>'),this},tcSerializeArray:function(){return this.find(":input").filter(function(){var e=this.type;return this.name&&!u(this).is(":disabled")&&i.test(this.nodeName)&&!r.test(e)&&(this.checked||!n.test(e))}).map(function(e,t){var n=u(this).val();return null===n?null:Array.isArray(n)?u.map(n,function(e){return{name:t.name,value:e.replace(o,"\r\n")}}):{name:t.name,value:n.replace(o,"\r\n")}}).get()},tcSerializeObject:function(){var n={},e=this.tcSerializeArray();return u.each(e,function(){var e=this.name,t=this.value||"";e.endsWith("[]")?(n[e]||(n[e]=[]),n[e].push(t)):n[e]=t}),n},tcScrollTo:function(e,t,n){var o=this;return 0===(e=u(e)).length?this:(t=t||0,n=n||0,o[0].self!==window&&(o=o.find(".woodmart-scroll-content").length?o.find(".woodmart-scroll-content"):o).offset()?n+=o.scrollTop()-o.offset().top:o=u("html, body"),o.animate({scrollTop:u(e).offset().top+n},t))},tcClone:function(){for(var e,t,n=u.fn.clone.apply(this,arguments),o=this.find("textarea").add(this.filter("textarea")),r=n.find("textarea").add(n.filter("textarea")),i=this.find("select").add(this.filter("select")),a=n.find("select").add(n.filter("select")),c=0,l=o.length;c<l;c+=1)u(r[c]).val(u(o[c]).val());for(c=0,l=i.length;c<l;c+=1)for(e=0,t=i[c].options.length;e<t;e+=1)!0===i[c].options[e].selected&&(a[c].options[e].selected=!0);return n}})}(window.jQuery);
!function(s){"use strict";function a(t){return String(t).isNumeric()&&!String(t).startsWith("0")}function c(t){for(var r,n=[void 0,null,!1,0,"","0"],e=0,i=n.length;e<i;e++)if(t===n[e])return 1;if("object"==typeof t){for(r in t)if(t.hasOwnProperty(r))return;return 1}}function f(t,r){return!(!r||r.constructor!==Array&&r.constructor!==Object)&&t in r}function l(t){return s.jQuery.epoAPI.util.getType(t)}function h(t,r){var n;return"string"!=typeof t&&"number"!=typeof t||isNaN(t)?void 0!==r?r:0:(n=parseFloat(t),isNaN(n)?void 0!==r?r:t:n)}function n(t,r){return t===r?0:r<t?1:-1}function t(t){return t=(t+"").replace(/[^01]/gi,""),parseInt(t,2)}function r(t){return t<0&&(t=4294967295+t+1),parseInt(t,10).toString(2)}function e(t){return t<0&&(t=4294967295+t+1),parseInt(t,10).toString(16)}function i(t){return t<0&&(t=4294967295+t+1),parseInt(t,10).toString(8)}function o(t){return.017453292519943295*t}function _(t,r=0){var n=0<=t?1:-1;return 0===r?Math.round(t):parseFloat((Math.round(t*Math.pow(10,r)+1e-4*n)/Math.pow(10,r)).toFixed(r))}function p(t){return t=(t+"").replace(/[^a-f0-9]/gi,""),parseInt(t,16)}function g(t){return t=(t+"").replace(/[^0-7]/gi,""),parseInt(t,8)}function v(t,r){var n;return t=Math.abs(t),r=Math.abs(r),n=Math.min(t,r),n/=t=Math.max(t,r),t*Math.sqrt(1+n*n)||null}var u={variables:{},on_var_not_found:void 0,on_var_validation:void 0,operators:{},functions:{},cache:{},construct:function(){return this.add_defaults(),this.set_division_by_zero_to_zero(),this},add_operator:function(t){return this.operators[t.operator]=t,this},evaluate:function(t,r=!0){return this.execute(t,r)},parse:function(t){var r,n=0;for(r of t)if("("===r?n++:")"===r&&n--,n<0)return!1;return 0===n&&(t=(t=new b(t,this.operators)).tokenize().build_reverse_polish_notation(),t=new A(this.functions,this.operators).calculate(t,this.variables,this.on_var_not_found,this),"number"===l(t))&&!isNaN(t)&&t},execute:function(t,r=!0,n=!1){var e,i=t;return f(i,this.cache)?e=this.cache[i]:(e=(e=new b(t,this.operators)).tokenize().build_reverse_polish_notation(),r&&(this.cache[i]=e)),t=new A(this.functions,this.operators).calculate(e,this.variables,this.on_var_not_found,this),t=!1!==n||"number"===l(t)&&!isNaN(t)?t:0},add_function:function(t,r){return this.functions[t]=new y(t,r),this},get_vars:function(){return this.variables},get_var:function(t){return f(t,this.variables)?this.variables[t]:(this.on_var_not_found&&"function"==typeof this.on_var_not_found&&this.on_var_not_found(t),M.trigger("Variable ("+t+") not set","UnknownVariableError",0))},set_var:function(t,r){return this.on_var_validation&&"function"==typeof this.on_var_validation&&(r=this.on_var_validation(t,r)),this.variables[t]=r,this},var_exists:function(t){return f(t,this.variables)},set_vars:function(t,r=!0){var n=this;return r&&this.remove_vars(),t.forFach(function(t,r){n.set_var(r,t)}),this},set_var_not_found_handler:function(t){return this.on_var_not_found=t,this},set_var_validation_handler:function(t){return this.on_var_validation=t,this},remove_var:function(t){return delete this.variables[t],this},remove_vars:function(){return this.variables={},this.on_var_not_found=null,this},get_operators:function(){return this.operators},get_functions:function(){return this.functions},remove_operator:function(t){delete this.operators[t]},set_division_by_zero_to_zero:function(){return this.add_operator(new E("/",!1,180,function(t,r){return t=Number(t),0==(r=Number(r))?0:t/r})),this},get_cache:function(){return this.cache},clear_cache:function(){this.cache=[]},add_defaults:function(){var n=this,e=this.default_operators(),i=this.default_functions();return Object.keys(e).forEach(function(t){var r=e[t];n.add_operator(new E(t,r[2],r[1],r[0]))}),Object.keys(i).forEach(function(t){var r=i[t];n.add_function(t,r)}),this.on_var_validation=this.default_var_validation,this.variables=this.default_vars(),this},default_operators:function(){return{"+":[function(t,r){return(t=h(t,0))+(r=h(r,0))},170,!1],"-":[function(t,r){return(t=h(t,0))-(r=h(r,0))},170,!1],uPos:[function(t){return t=h(t,0)},200,!1],uNeg:[function(t){return 0-(t=h(t,0))},200,!1],"*":[function(t,r){return(t=h(t,0))*(r=h(r,0))},180,!1],"/":[function(t,r){return t=h(t,0),r=h(r,0),c(r)?M.trigger("Division By Zero","DivisionByZeroError",0):t/r},180,!1],"^":[function(t,r){return t=h(t,0),r=h(r,0),Math.pow(t,r)},220,!0],"%":[function(t,r){return(t=h(t,0))%(r=h(r,0))},180,!1],"&&":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&(t=h(t,0)),r.isNumeric()&&(r=h(r,0)),t&&r?1:0},100,!1],"||":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&(t=h(t,0)),r.isNumeric()&&(r=h(r,0)),t||r?1:0},90,!1],"==":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&r.isNumeric()?h(t)===h(r)?1:0:0===n(t,r)?1:0},140,!1],"!=":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&r.isNumeric()?h(t)!==h(r)?1:0:0!==n(t,r)?1:0},140,!1],">=":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&(t=h(t,0)),(r=r.isNumeric()?h(r,0):r)<=t?1:0},150,!1],">":[function(t,r){return t=String(t),r=String(r),t.isNumeric()&&(t=h(t,0)),(r=r.isNumeric()?h(r,0):r)<t?1:0},150,!1],"<=":[function(t,r){return t=String(t),r=String(r),(t=t.isNumeric()?h(t,0):t)<=(r=r.isNumeric()?h(r,0):r)?1:0},150,!1],"<":[function(t,r){return t=String(t),r=String(r),(t=t.isNumeric()?h(t,0):t)<(r=r.isNumeric()?h(r,0):r)?1:0},150,!1]}},default_functions:function(){var u=this;return{abs:Math.abs,acos:Math.acos,acosh:Math.acosh,arcsin:Math.asin,arcctg:function(t){return Math.PI/2-Math.atan(t)},arccot:function(t){return Math.PI/2-Math.atan(t)},arccotan:function(t){return Math.PI/2-Math.atan(t)},arcsec:function(t){return Math.acos(1/t)},arccosec:function(t){return Math.asin(1/t)},arccsc:function(t){return Math.asin(1/t)},arccos:Math.acos,arctan:Math.atan,arctg:Math.atan,array:function(...t){return t},asin:Math.asin,atan:Math.atan,atan2:Math.atan2,atanh:Math.atanh,atn:Math.atan,avg:function(t,...r){return Array.isArray(t)&&0===t.length?M.trigger("Array must contain at least one element!","InvalidArgumentError",0):(r=[].concat.apply([],[t,...r])).reduce(function(t,r){return h(r,0)+h(t,0)})/r.length},average:function(t,...r){return Array.isArray(t)&&0===t.length?M.trigger("Array must contain at least one element!","InvalidArgumentError",0):(r=[].concat.apply([],[t,...r])).reduce(function(t,r){return h(r,0)+h(t,0)})/r.length},bindec:t,ceil:Math.ceil,cos:Math.cos,cosec:function(t){return Math.sin(1/t)},csc:function(t){return Math.sin(1/t)},cosh:Math.cosh,ctg:function(t){return Math.cos(t)/Math.sin(t)},cot:function(t){return Math.cos(t)/Math.sin(t)},cotan:function(t){return Math.cos(t)/Math.sin(t)},cotg:function(t){return Math.cos(t)/Math.sin(t)},ctn:function(t){return Math.cos(t)/Math.sin(t)},decbin:r,dechex:e,decoct:i,deg2rad:o,exp:Math.exp,expm1:Math.expm1,floor:Math.floor,int:Math.floor,fmod:function(t,r){return t%r},hexdec:p,hypot:v,if:function(...t){var r=t[0],n=t[1],e=t[2];return"string"===l(n)&&(n="'"+n.replace(/'/g,"\\'")+"'"),"string"===l(e)&&(e="'"+e.replace(/'/g,"\\'")+"'"),t=void 0!==t[3]&&t[3],(0===r||1===r||!0===r||!1===r?r:u.execute(r,!0,t))?u.execute(n,!0,t):u.execute(e,!0,t)},intdiv:function(t,r){return Math.trunc(Math.trunc(t)/Math.trunc(r))},ln:Math.log,lg:Math.log10,log:Math.log,log1p:Math.log1p,max:function(t,...r){return Array.isArray(t)&&0===t.length?M.trigger("Array must contain at least one element!","InvalidArgumentError",0):(t=(t=Array.isArray(t)?t:[t,...r]).map(h),Math.max(...t))},min:function(t,...r){return Array.isArray(t)&&0===t.length?M.trigger("Array must contain at least one element!","InvalidArgumentError",0):(t=(t=Array.isArray(t)?t:[t,...r]).map(h),Math.min(...t))},octdec:g,pi:function(){return Math.PI},pow:Math.pow,rad2deg:function(t){return 57.29577951308232*t},round:_,sin:Math.sin,sinh:Math.sinh,sec:function(t){return 1/Math.cos(t)},sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh,tn:Math.tan,tg:Math.tan,lookuptable:function(t,r){var n,e=0,i=0,a=s.TMEPOJS;if(a&&(a=s.jQuery.epoAPI.util.parseJSON(a.lookupTables))){if(Array.isArray(r)&&(i=r[1],r=r[0]),c(r))return 0;c(i)&&(i=0),t=Array.isArray(t)?(n=String(t[0]),String(t[1])):(n=String(t),""),(a=(a=a[r])&&a[i])&&(void 0===(r=(a=a.data)[n])&&n&&void 0!==n&&(n.isNumeric()&&0===h(n)?r=a[Object.keys(a)[0]]:n&&(r=a[n=u.find_lookup_table_index(n,a)])),void 0!==r)&&(t=t&&void 0!==t?u.find_lookup_table_index(t,r):Object.keys(r)[0],e=h("max"===t?r[Object.keys(r)[Object.keys(r).length-1]]:r[t]))}return e},concat:function(t,...r){return Array.isArray(t)&&0===t.length?M.trigger("Array must contain at least one element!","InvalidArgumentError",0):(Array.isArray(t)?t:[t,...r]).join("")}}},find_lookup_table_index:function(n,t){var r,e,i,t=Object.keys(t);if(i=(e=t)[e.length-1],e.every(function(t){return String(t).isNumeric()})||"max"===i){if(n=a(n)?h(n):n,r=t.map(function(t){return a(t)?h(t):t}).reduce(function(t,r){return"max"===r&&t<n?r:"max"===t&&r<n?t:t<r?t<n&&n<=r||r<n?r:t:r<n&&n<=t||t<n||"max"===r?t:r}),t=t.map(function(t){return a(t)?h(t):t}),n>Math.max(...t)||n<Math.min(...t))return!1}else r=n;return r},default_vars:function(){return{pi:3.141592653589793,e:2.718281828459045}},default_var_validation:function(t,r){return/boolean|number|string/.test(typeof r)||Array.isArray(r)||void 0===r?r:M.trigger("Variable ("+t+") type ("+l(r)+") is not scalar or array!",0)}},b=function(t,r){var n={tokens:[],input:"",operators:{},number_buffer:"",string_buffer:"",allow_negative:!0,in_single_quoted_string:!1,in_double_quoted_string:!1,is_number:function(t){return"0"<=t&&t<="9"},is_alpha:function(t){return"a"<=t&&t<="z"||"A"<=t&&t<="Z"||"_"===t},is_dot:function(t){return"."===t},is_lp:function(t){return"("===t},is_rp:function(t){return")"===t},is_comma:function(t){return","===t},empty_number_buffer_as_literal:function(){this.number_buffer.length&&(this.tokens.push(d(m.LITERAL,this.number_buffer)),this.number_buffer="")},empty_str_buffer_as_variable:function(){""!==this.string_buffer&&(this.tokens.push(d(m.VARIABLE,this.string_buffer)),this.string_buffer="")},tokenize:function(){var r=!1,n=this,e=[];return this.tokens=[],this.input.toString().split("").forEach(function(t){switch(!0){case n.in_single_quoted_string:"\\"===t?r=!r||(n.string_buffer+="\\",!1):"'"===t?r?(n.string_buffer+="'",r=!1):(n.tokens.push(d(m.STRING,n.string_buffer)),n.in_single_quoted_string=!1,n.string_buffer=""):(r&&(n.string_buffer+="\\",r=!1),n.string_buffer+=t);break;case n.in_double_quoted_string:"\\"===t?r=!r||(n.string_buffer+="\\",!1):'"'===t?r?(n.string_buffer+='"',r=!1):(n.tokens.push(d(m.STRING,n.string_buffer)),n.in_double_quoted_string=!1,n.string_buffer=""):(r&&(n.string_buffer+="\\",r=!1),n.string_buffer+=t);break;case"["===t:n.tokens.push(d(m.FUNCTION,"array")),n.allow_negative=!0,n.tokens.push(d(m.LEFTPARENTHESIS,""));break;case" "===t||"\n"===t||"\r"===t||"\t"===t:break;case n.is_number(t):""!==n.string_buffer?n.string_buffer+=t:(n.number_buffer+=t,n.allow_negative=!1);break;case"e"===t.toLowerCase():if(n.number_buffer.length&&-1!==n.number_buffer.indexOf(".")){n.number_buffer+="e",n.allow_negative=!1;break}case n.is_alpha(t):n.number_buffer.length&&(n.empty_number_buffer_as_literal(),n.tokens.push(d(m.OPERATOR,"*"))),n.allow_negative=!1,n.string_buffer+=t;break;case'"'===t:n.in_double_quoted_string=!0;break;case"'"===t:n.in_single_quoted_string=!0;break;case n.is_dot(t):n.number_buffer+=t,n.allow_negative=!1;break;case n.is_lp(t):""!==n.string_buffer?(n.tokens.push(d(m.FUNCTION,n.string_buffer)),n.string_buffer=""):n.number_buffer.length&&(n.empty_number_buffer_as_literal(),n.tokens.push(d(m.OPERATOR,"*"))),n.allow_negative=!0,n.tokens.push(d(m.LEFTPARENTHESIS,t));break;case n.is_rp(t)||"]"===t:n.empty_number_buffer_as_literal(),n.empty_str_buffer_as_variable(),n.allow_negative=!1,n.tokens.push(d(m.RIGHTPARENTHESIS,t));break;case n.is_comma(t):n.empty_number_buffer_as_literal(),n.empty_str_buffer_as_variable(),n.allow_negative=!0,n.tokens.push(d(m.PARAMSEPARATOR,t));break;default:if("-"===t||"+"===t){if(n.allow_negative){n.allow_negative=!1,n.tokens.push(d(m.OPERATOR,"-"===t?"uNeg":"uPos"));break}if(n.number_buffer&&"e"===n.number_buffer[n.number_buffer.length-1]){n.number_buffer+=t;break}}n.empty_number_buffer_as_literal(),n.empty_str_buffer_as_variable(),"$"!==t&&(0<n.tokens.length&&m.OPERATOR===n.tokens[n.tokens.length-1].type?n.tokens[n.tokens.length-1].value+=t:n.tokens.push(d(m.OPERATOR,t))),n.allow_negative=!0}}),this.empty_number_buffer_as_literal(),this.empty_str_buffer_as_variable(),this.tokens.forEach(function(t,r){e[r]=t.type}),e.forEach(function(t,r){0<r&&"space"===t&&"variable"===e[r+1]&&"variable"===e[r-1]&&(n.tokens[r]=new d(m.LITERAL,0),n.tokens.splice(r+1,1),n.tokens.splice(r-1,1))}),this},build_reverse_polish_notation:function(){var r,n,e,i=[],a=[],u=[],o=this;try{this.tokens.forEach(function(t){switch(t.type){case m.LITERAL:case m.VARIABLE:case m.STRING:i.push(t),0<u.length&&0===u[u.length-1]&&u.push(u.pop()+1);break;case m.FUNCTION:0<u.length&&0===u[u.length-1]&&u.push(u.pop()+1),a.push(t),u.push(0);break;case m.LEFTPARENTHESIS:a.push(t);break;case m.PARAMSEPARATOR:for(;m.LEFTPARENTHESIS!==a[a.length-1].type;){if(0===a.length)return M.trigger("Incorrect Brackets","IncorrectBracketsError",i);i.push(a.pop())}u.push(u.pop()+1);break;case m.OPERATOR:if(!f(t.value,o.operators))return M.trigger(t.value,"UnknownOperatorError",i);for(e=o.operators[t.value];0<a.length&&m.OPERATOR===a[a.length-1].type;){if(!f(a[a.length-1].value,o.operators))return M.trigger(a[a.length-1].value,"UnknownOperatorError",i);if(!(o.operators[a[a.length-1].value].priority>=e.priority))break;i.push(a.pop())}a.push(t);break;case m.RIGHTPARENTHESIS:for(;;)try{if(r=a.pop(),m.LEFTPARENTHESIS===r.type)break;i.push(r)}catch(t){return M.trigger("Incorrect Brackets","IncorrectBracketsError",i)}0<a.length&&m.FUNCTION===a[a.length-1].type&&((n=a.pop()).param_count=u.pop(),i.push(n));break;case m.SPACE:}})}catch(t){return i=[],M.trigger(t,"Error",i)}for(;0!==a.length;){if(m.LEFTPARENTHESIS===a[a.length-1].type||m.RIGHTPARENTHESIS===a[a.length-1].type)return M.trigger("Incorrect Brackets","IncorrectBracketsError",i);m.SPACE===a[a.length-1].type?a.pop():i.push(a.pop())}return i}};return n.input=t,n.operators=r,n},m={LITERAL:"literal",VARIABLE:"variable",OPERATOR:"operator",LEFTPARENTHESIS:"LP",RIGHTPARENTHESIS:"RP",FUNCTION:"function",PARAMSEPARATOR:"separator",STRING:"string",SPACE:"space"},d=function(t,r,n){var e={type:m.LITERAL,value:void 0,name:void 0,param_count:null};return e.type=t,e.value=r,e.name=n,e},E=function(t,r,n,e){var i={operator:"",is_right_assoc:!1,priority:0,function:null,places:0};return i.operator=t,i.is_right_assoc=r,i.priority=n,i.function=e,i.places=function(t){var r=/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;const n=/^\s*(_?)(.+?)\1\s*$/;return((t||"").toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,"").match(r)||["","",""])[2].split(/,/).map(function(t){return t.replace(n,function(t,r,n){return n.split("=")[0].trim()})}).filter(String).length}(e),i.execute=function(t){var r,n,e=[];if(t.length<this.places)return t.splice(0,t.length),M.trigger("Incorrect Expression","IncorrectExpressionError",new d(m.LITERAL,0));for(r=0;r<this.places;r++)e.unshift(t.pop().value);return n=this.function.apply(null,e),"number"!==l(n)&&"string"!==l(n)&&(n=0),new d(m.LITERAL,n)},i},y=function(t,r){var n={name:"",function:void 0,required_param_count:void 0};return n.name=t,n.function=r,n.required_param_count=r.length,n.execute=function(t,r){var n,e,i,a=[];if((r=r<this.required_param_count?this.required_param_count:r)<this.required_param_count)return t.splice(0,t.length),M.trigger(this.name,"IncorrectNumberOfFunctionParametersError",new d(m.LITERAL,0));if(0<r)for(n=0;n<r;n++)null===(e=t.length?t.pop().value:0)?a.push(e="0"):a.unshift(e);return i=this.function.apply(null,a),d(m.LITERAL,i=i!==1/0&&i!==-1/0?i:0)},n},A=function(t,r){var n={functions:{},operators:{}};return n.functions=t,n.operators=r,n.calculate=function(t,e,i=null,a=!1){var u=this,o=[];if(c(t))return 0;try{t.forEach(function(t){var r,n;if(m.LITERAL===t.type||m.STRING===t.type)o.push(t);else if(m.VARIABLE===t.type)r=t.value,n=null,f(r,e)?n=e[r]:i&&"function"==typeof i?n=i(r):(a.variables[n=r]=n,e[r]=n),o.push(d(m.LITERAL,n,r));else if(m.FUNCTION===t.type){if(!f(t.value,u.functions)){if(a.add_function(t.value,function(){return 0}),u.functions=a.functions,!f(t.value,u.functions))return M.trigger(t.value,"UnknownFunctionError",0);M.trigger(t.value,"UnknownFunctionError",0)}o.push(u.functions[t.value].execute(o,t.param_count))}else if(m.OPERATOR===t.type){if(!f(t.value,u.operators))return M.trigger(t.value,"UnknownOperatorError",0);o.push(u.operators[t.value].execute(o))}})}catch(t){s.TMEPOJS&&s.TMEPOJS.WP_DEBUG&&s.console.log(t)}return null!=(t=o.pop())&&c(o)?(!1===t.value&&(t.value=0),!0===t.value&&(t.value=1),"string"===l(t.value)&&t.value.isNumeric()&&(t.value=h(t.value)),t.value):M.trigger("Stack must be empty","IncorrectExpressionError",0)},n},M={trigger:function(t,r="",n=!1){return s.TMEPOJS&&s.TMEPOJS.WP_DEBUG&&(s.console.log(r+"\n"+t),s.console.trace()),s.TMEPOGLOBALADMINJS&&s.TMEPOGLOBALADMINJS.WP_DEBUG?t:n}};s.tcmexp=u.construct()}(window);
!function(y,n,i){"use strict";function r(t,a,i,e,r){var o=this;o.field=a,o.currentCart=i,o.variableProductContainers=e,o.epoObject=r,o.$form=t,o.$wrap=t.closest(".tc-epo-element-product-container-wrap"),o.$attributeFields=t.find(".tc-epo-variable-product-selector"),o.$singleVariation=t.find(".tc-epo-element-single-variation"),o.$resetVariations=t.find(".tc-epo-element-variable-reset-variations"),o.variationData=t.data("product_variations"),o.useAjax=!1===o.variationData,o.xhr=!1,o.loading=!0,o.variationId=t.closest(".tc-epo-element-product-li-container").find(".tc-epo-element-product-container-variation-id input.product-variation-id"),o.getChosenAttributes=o.getChosenAttributes.bind(o),o.findMatchingVariations=o.findMatchingVariations.bind(o),o.isMatch=o.isMatch.bind(o),o.toggleResetLink=o.toggleResetLink.bind(o),t.on("click.tc-variation-form",".tc-epo-element-variable-reset-variations",{variationForm:o},o.onReset),t.on("tc_hide_variation",{variationForm:o},o.onHide),t.on("tc_show_variation",{variationForm:o},o.onShow),t.on("tc_reset_data",{variationForm:o},o.onResetDisplayedVariation),t.on("tc_reset_image",{variationForm:o},o.onResetImage),t.on("change.tc-variation-form",".tc-epo-variable-product-selector",{variationForm:o},o.onChange),t.on("tc_found_variation.tc-variation-form",{variationForm:o},o.onFoundVariation),t.on("tc_check_variations.tc-variation-form",{variationForm:o},o.onFindVariation),t.on("tc_update_variation_values.tc-variation-form",{variationForm:o},o.onUpdateAttributes),t.on("refresh.tc-variation-form",{variationForm:o},o.onRefreshContainer),t.on("update_field.tc-variation-form",{variationForm:o},o.onUpdateField),o.variationId.val(""),setTimeout(function(){t.trigger("refresh"),t.trigger("tc_variation_form"),o.loading=!1},100)}function l(t){var a=i.getElementById("tmpl-"+t).textContent;return/<#\s?data\./.test(a)||/{{{?\s?data\.(?!variation\.).+}}}?/.test(a)||/{{{?\s?data\.variation\.[\w-]*[^\s}]/.test(a)?n.wp.template(t):function(t){var r,o=t.variation||{};return a.replace(/({{{?)\s?data\.variation\.([\w-]*)\s?(}}}?)/g,function(t,a,i,e){return a.length!==e.length?"":(r=o[i]||"",2===a.length?n.escape(r):r)})}}r.prototype.onRefreshContainer=function(t){t=t.data.variationForm;t.variableProductContainers.find(".tc-epo-element-product-container").removeClass("variations_form"),t.$form.addClass("variations_form"),t.$form.trigger("tc_check_variations.tc-variation-form")},r.prototype.onUpdateField=function(t,a){var i=t.data.variationForm,e=i.field;t.preventDefault(),a||((t=e).is("select")&&(t=e.find("option:selected")),e.data("price_set",1),t.data("associated_price_set",1),t.data("price_set",1),t.data("raw_price",0),t.data("raw_original_price",0),t.data("price",0),t.data("original_price",0),e.data("price-changed",1),i.$form.trigger({type:"tm-epo-update",norules:2}),i.currentCart.trigger({type:"tm-epo-update",norules:2}))},r.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").trigger("change"),t.data.variationForm.$form.trigger("tc_reset_data")},r.prototype.onHide=function(t){t.preventDefault()},r.prototype.onShow=function(t){t.preventDefault()},r.prototype.onResetDisplayedVariation=function(t){t=t.data.variationForm;t.$form.find(".product-meta").find(".tc-product-sku").tc_reset_content(),t.$form.trigger("tc_reset_image"),t.$singleVariation.slideUp(200).trigger("tc_hide_variation")},r.prototype.onResetImage=function(t){t.data.variationForm.$form.tc_variations_image_update(!1)},r.prototype.onFindVariation=function(t){var a,i=t.data.variationForm,e=i.getChosenAttributes(),t=e.data;if(e.count===e.chosenCount)if(i.useAjax){if("undefined"==typeof wc_add_to_cart_variation_params)return;i.xhr&&i.xhr.abort(),a=i.$form.closest(".cpf-type-product"),i.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),t.product_id=parseInt(i.$form.data("product_id"),10),t.discount=a.attr("data-discount"),t.discount_type=a.attr("data-discount-type"),t.discount_exclude_addons=a.attr("data-discount-exclude-addons"),i.xhr=y.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:t,success:function(t){t?i.$form.trigger("tc_found_variation",[t]):(i.$form.trigger("tc_reset_data"),e.chosenCount=0,i.loading||(i.$form.find(".tc-epo-element-single-variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),i.$form.find(".wc-no-matching-variations").slideDown(200),i.$form.trigger("update_field",[])))},complete:function(){i.$form.unblock()}})}else i.$form.trigger("tc_update_variation_values"),(a=i.findMatchingVariations(i.variationData,t).shift())?i.$form.trigger("tc_found_variation",[a]):(i.$form.trigger("tc_reset_data"),e.chosenCount=0,i.loading||(i.$form.find(".tc-epo-element-single-variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),i.$form.find(".wc-no-matching-variations").slideDown(200)));else i.variationId.val("").trigger("change"),i.$form.trigger("tc_update_variation_values"),i.$form.trigger("tc_reset_data"),i.$form.trigger("update_field",[]);i.toggleResetLink(0<e.chosenCount)},r.prototype.onFoundVariation=function(t,a){var t=t.data.variationForm,i=t.$form.find(".product-meta").find(".tc-product-sku"),e=t.$wrap.find(".tm-quantity-alt"),r=e.find("input.tm-qty-alt"),o=y.epoAPI.math.toInt(r.attr("data-min")),n=y.epoAPI.math.toInt(r.attr("data-max")),c=r.attr("data-max"),s=!0,_=!1,d="";a.sku?i.tc_set_content(a.sku):i.tc_reset_content(),t.$form.tc_variations_image_update(a),_=a.variation_is_visible?l("variation-template"):l("unavailable-variation-template"),t.field.attr("data-no-price")&&(a.display_price="",a.display_regular_price="",a.price_html=""),t.$form.find(".tc-epo-element-product-container-cart").find(".stock").remove(),d=(d=(d=_({variation:a})).replace("","")).replace("/*]]>*/",""),t.$singleVariation.html(d),t.variationId.val(a.variation_id).trigger("change"),"yes"===a.is_sold_individually?(r.val("1").attr("min","1").attr("max","1"),e.hide()):(""!==a.min_qty&&a.min_qty>o&&0<o&&(o=a.min_qty),""!==a.max_qty&&a.max_qty<n&&(n=a.max_qty),""!==o?r.attr("min",o):r.removeAttr("min"),""!==c?r.attr("max",n):r.removeAttr("max"),n&&y.epoAPI.math.toInt(r.val())>n&&r.val(n),o>y.epoAPI.math.toInt(r.val())&&r.val(o),e.show()),a.is_purchasable&&a.is_in_stock&&a.variation_is_visible||(s=!1,r.val("0").attr("min","0").attr("max","0"),e.hide()),r.trigger("change"),(y.epoAPI.util.trim(t.$singleVariation.text())?t.$singleVariation.slideDown(200):t.$singleVariation.show()).trigger("tc_show_variation",[a,s]),t.$form.trigger("update_field",[a])},r.prototype.onChange=function(t){var t=t.data.variationForm,a=t.field;t.variationId.val("").trigger("change"),t.$form.find(".wc-no-matching-variations").remove(),t.useAjax||t.$form.trigger("woocommerce_variation_select_change"),t.$form.trigger("tc_check_variations"),t.$form.trigger("woocommerce_variation_has_changed"),setTimeout(function(){a.closest(".tcowl-carousel").trigger("refresh.owl.carousel")},50)},r.prototype.onUpdateAttributes=function(t){var h=t.data.variationForm,w=h.getChosenAttributes().data;h.useAjax||(h.$attributeFields.toArray().forEach(function(t){var a,i,e,r,o,n,c,s,_,d,l,m=y(t),v=m.data("attribute_name")||m.attr("name"),t=y(t).data("show_option_none"),g=":gt(0)",f=y("<select/>"),p=m.val()||"",u=!0;for(e in m.data("attribute_html")||((a=m.clone()).find("option").prop("disabled",!1).prop("selected",!1).removeAttr("attached"),m.data("attribute_options",a.find("option"+g).get()),m.data("attribute_html",a.html())),f.html(m.data("attribute_html")),(a=y.extend(!0,{},w))[v]="",i=h.findMatchingVariations(h.variationData,a))if(void 0!==i[e])for(c in n=i[e].attributes)if(Object.prototype.hasOwnProperty.call(n,c)&&(s=n[c],_="",c===v))if(i[e].variation_is_active&&(_="enabled"),s){if(s=y("<div/>").html(s).text(),(d=f.find("option")).length)for(r=0,o=d.length;r<o;r++)if(s===(l=y(d[r])).val()){l.addClass("attached "+_);break}}else f.find("option:gt(0)").addClass("attached "+_);a=f.find("option.attached").length,p&&(u=!1,0!==a)&&f.find("option.attached.enabled").toArray().forEach(function(t){t=y(t).val();if(p===t)return!(u=!0)}),0<a&&p&&u&&"no"===t&&(f.find("option:first").remove(),g=""),f.find("option"+g+":not(.attached)").remove(),m.html(f.html()),m.find("option"+g+":not(.enabled)").prop("disabled",!0),p?u?m.val(p):m.val("").trigger("change"):m.val("")}),h.$form.trigger("woocommerce_update_variation_values"))},r.prototype.getChosenAttributes=function(){var i={},e=0,r=0;return this.$attributeFields.toArray().forEach(function(t){var t=y(t),a=t.data("attribute_name")||t.attr("name"),t=t.val()||"";0<t.length&&r++,e++,i[a]=t}),{count:e,chosenCount:r,data:i}},r.prototype.findMatchingVariations=function(t,a){for(var i,e=[],r=0;r<t.length;r++)i=t[r],this.isMatch(i.attributes,a)&&e.push(i);return e},r.prototype.isMatch=function(t,a){var i,e,r,o=!0;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i=t[r],e=a[r],void 0!==i)&&void 0!==e&&0!==i.length&&0!==e.length&&i!==e&&(o=!1);return o},r.prototype.toggleResetLink=function(t){t?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},y.fn.tc_product_variation_form=function(t,a,i,e){return new r(this,t,a,i,e),this.trigger("tc_product_variation_form"),this},y.fn.tc_set_content=function(t){void 0===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(t)},y.fn.tc_reset_content=function(){void 0!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},y.fn.tc_set_variation_attr=function(t,a){void 0===this.attr("data-o_"+t)&&this.attr("data-o_"+t,this.attr(t)?this.attr(t):""),!1===a?this.removeAttr(t):this.attr(t,a)},y.fn.tc_reset_variation_attr=function(t){void 0!==this.attr("data-o_"+t)&&this.attr(t,this.attr("data-o_"+t))},y.fn.tc_variations_image_update=function(t){var a=this.find(".tc-product-image, .woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),i=a.find(".wp-post-image"),e=a.find("a").eq(0);t&&t.image&&t.image.src&&1<t.image.src.length?(i.tc_set_variation_attr("src",t.image.src),i.tc_set_variation_attr("height",t.image.src_h),i.tc_set_variation_attr("width",t.image.src_w),i.tc_set_variation_attr("srcset",t.image.srcset),i.tc_set_variation_attr("sizes",t.image.sizes),i.tc_set_variation_attr("title",t.image.title),i.tc_set_variation_attr("data-caption",t.image.caption),i.tc_set_variation_attr("alt",t.image.alt),i.tc_set_variation_attr("data-src",t.image.full_src),i.tc_set_variation_attr("data-large_image",t.image.full_src),i.tc_set_variation_attr("data-large_image_width",t.image.full_src_w),i.tc_set_variation_attr("data-large_image_height",t.image.full_src_h),a.tc_set_variation_attr("data-thumb",t.image.src),e.tc_set_variation_attr("href",t.image.full_src)):this.tc_variations_image_reset()},y.fn.tc_variations_image_reset=function(){var t=this.find(".tc-product-image, .woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),a=t.find(".wp-post-image"),i=t.find("a").eq(0);a.tc_reset_variation_attr("src"),a.tc_reset_variation_attr("width"),a.tc_reset_variation_attr("height"),a.tc_reset_variation_attr("srcset"),a.tc_reset_variation_attr("sizes"),a.tc_reset_variation_attr("title"),a.tc_reset_variation_attr("data-caption"),a.tc_reset_variation_attr("alt"),a.tc_reset_variation_attr("data-src"),a.tc_reset_variation_attr("data-large_image"),a.tc_reset_variation_attr("data-large_image_width"),a.tc_reset_variation_attr("data-large_image_height"),t.tc_reset_variation_attr("data-thumb"),i.tc_reset_variation_attr("href")}}(window.jQuery,window,document);
!function(s){"use strict";function o(t,e){return this.element=s(t),this.settings=s.extend({},s.fn.tcFloatBox.defaults,e),this.settings.type="<"+this.settings.type+">",1===this.element.length&&(this.init(),this)}o.prototype={constructor:o,destroy:function(){var t=this.settings;return void 0!==this.instance&&(s.fn.tcFloatBox.instances.splice(this.instance,1),delete this.instance,t.hideelements&&s("embed, object, select").css({visibility:"visible"}),t._ovl&&t._ovl.off(),s(t.floatboxIDMain).remove(),this.element.removeData("tcfloatbox"),s(window).off("scroll.tcfloatbox"+this.instance),s(window).off("resize.tcfloatbox"+this.instance)),this},hide:function(){var t=this.settings;t.hideelements&&s("embed, object, select").css({visibility:"visible"}),!0===t.showoverlay&&t._ovl&&t._ovl.removeClass("fl-overlay"),s(t.floatboxID).addClass("tc-closing").removeClass(t.animateIn).addClass(t.animateOut),s(t.floatboxID).animate({opacity:0},t.closefadeouttime,function(){s(t.floatboxIDMain).hide(),s(t.floatboxID).removeClass("tc-closing").addClass("tc-closed")}),s(window).off("scroll.tcfloatbox"+this.instance),s(window).off("resize.tcfloatbox"+this.instance)},show:function(){var e=this.settings;1===this.element.length&&(void 0===this.instance&&this.init(),e.hideelements&&s("embed, object, select").css({visibility:"hidden"}),!0===e.showoverlay&&(e._ovl||(e._ovl=e.main,e._ovl.css({zIndex:parseInt(e.zIndex,10)-1}),e.ismodal)||(e.cancelEvent||e.unique?e._ovl.on("click",function(t){t.target===s(e.floatboxID)[0]||s(t.target).closest(e.floatboxID).length||this.applyCancelEvent.call(this,this)}.bind(this)):e._ovl.on("click",function(t){t.target===s(e.floatboxID)[0]||s(t.target).closest(e.floatboxID).length||e.cancelfunc.call(this,this)}.bind(this))),e._ovl.addClass("fl-overlay")),e.showfunc&&e.showfunc.call(),s(e.floatboxID).removeClass("tc-closing tc-closed").addClass(e.animationBaseClass+" "+e.animateIn),s(e.floatboxID).addClass("flasho-center"))},applyCancelEvent:function(){var t=this.settings;!0===t.cancelEvent?this.destroy():"function"==typeof t.cancelEvent&&t.cancelEvent.call(this,this)},applyCancelEventFromKey:function(t){27===t.which&&this.applyCancelEvent()},applyUpdateEvent:function(){var t=this.settings;"function"==typeof t.updateEvent&&t.updateEvent.call(this,this)},applyUpdateEventFromKey:function(t){13===t.which&&this.applyUpdateEvent()},init:function(){var t,e=this.settings;1===this.element.length&&(0<s.fn.tcFloatBox.instances.length&&(e.zIndex=parseInt(s.fn.tcFloatBox.instances[s.fn.tcFloatBox.instances.length-1].zIndex,10)+100),this.instance=s.fn.tcFloatBox.instances.length,s.fn.tcFloatBox.instances.push(e),e.id=e.id+this.instance,e.floatboxID="#"+s.epoAPI.dom.id(e.id),e.idMain===e.id&&(e.idMain="main-"+e.idMain),e.idMain=e.idMain+this.instance,e.floatboxIDMain="#"+s.epoAPI.dom.id(e.idMain),this.hide(),t=s("<div>").attr("id",e.idMain).addClass(e.classnameMain),s(e.type).attr("id",e.id).addClass(e.classname).html(e.data).appendTo(t),t.appendTo(this.element),e.main=t,(e.leger?s(e.floatboxIDMain):s(e.floatboxID)).css({width:e.width,height:e.height}),e.minWidth&&s(e.floatboxID).css({"min-width":e.minWidth}),e.minHeight&&s(e.floatboxID).css({"min-height":e.minHeight}),e.maxWidth&&s(e.floatboxID).css({"max-width":e.maxWidth}),e.maxHeight&&s(e.floatboxID).css({"max-height":e.maxHeight}),s(e.floatboxIDMain).css({"z-index":e.zIndex}),this.cancelfunc=e.cancelfunc,e.cancelEvent&&e.cancelClass&&(s(e.floatboxID).find(e.cancelClass).on("click",this.applyCancelEvent.bind(this)),e.isconfirm)&&s(document).off("keyup.escape-"+e.floatboxID).on("keyup.escape-"+e.floatboxID,this.applyCancelEventFromKey.bind(this)),e.updateEvent&&e.updateClass&&(s(e.floatboxID).find(e.updateClass).on("click",this.applyUpdateEvent.bind(this)),e.isconfirm)&&s(document).off("keyup.enter-"+e.floatboxID).on("keyup.enter-"+e.floatboxID,this.applyUpdateEventFromKey.bind(this)),this.show())}},s.fn.tcFloatBox=function(t){var e,n=s(this),i=n.data("tcfloatbox"),a="object"==typeof t?t:{};return i||(i=new o(this,a),n.data("tcfloatbox",i)),void 0===(e="string"==typeof t?i[t].apply(i,[]):e)?n:e},s.fn.tcFloatBox.defaults={idMain:"floatbox",classnameMain:"floatbox",leger:!1,id:"flasho",classname:"flasho",type:"div",data:"",width:"auto",height:"auto",minWidth:0,minHeight:0,maxWidth:0,maxHeight:0,closefadeouttime:1e3,animationBaseClass:"tm-animated",animateIn:"fadein",animateOut:"fadeout",fps:4,hideelements:!1,showoverlay:!0,zIndex:100100,ismodal:!1,cancelfunc:o.prototype.hide,showfunc:null,cancelEvent:!0,cancelClass:".floatbox-cancel",updateEvent:!1,updateClass:!1,unique:!0,isconfirm:!1},s.fn.tcFloatBox.instances=[],s.fn.tcFloatBox.Constructor=o,s.tcFloatBox=function(t){var e=s("body"),n=!1;return e.map(function(){return s(this).data("tcfloatbox")||""}).get().some(function(t){return""===t})||t.unique?(n=new o(e,t),e.data("tcfloatbox",n)):(n=e.data("tcfloatbox")).init(),n}}(window.jQuery);
!function(m,v){"use strict";function l(t,i){return this.targets=v(t),this.settings=v.extend({},v.fn.tcToolTip.defaults,i),0<this.targets.length&&(this.init(),this)}var n;v(function(){n=m.TMEPOJS||{tm_epo_global_tooltip_max_width:"340px"}}),l.prototype={constructor:l,removeTooltip:function(t,i){var o=this.settings;t.data("is_moving")||(i.removeClass(o.fadin).addClass(o.fadeout),i.animate({opacity:0},o.speed,function(){v(this).remove()}),t.data("tmtip-title")&&void 0===t.data("tm-tip-html")&&!t.attr("data-tm-tooltip-html")&&t.attr("title",t.data("tmtip-title")),v(m).off("scroll.tcToolTip resize.tcToolTip"),o.onetime&&this.destroy())},initTooltip:function(t,i,o){var e,a,l,s,d=this.settings;t&&i&&1===t.length&&1===i.length&&1===t.data("tm-has-tm-tip")&&(1===o&&(e=void 0!==t.data("tm-tip-html")?t.data("tm-tip-html"):t.attr("data-tm-tooltip-html")?t.attr("data-tm-tooltip-html"):t.attr("title"),i.html(e),t.data("is_moving",!0)),i.find("aside").hide(),""===n.tm_epo_global_tooltip_max_width?v(m).width()<=1.2*i.outerWidth()?i.css("max-width",v(m).width()/1.2+"px"):i.css("max-width","340px"):(n.tm_epo_global_tooltip_max_width.isNumeric()&&(n.tm_epo_global_tooltip_max_width=n.tm_epo_global_tooltip_max_width+"px"),i.css("max-width",n.tm_epo_global_tooltip_max_width)),i.find("aside").show(),i.css({left:"",right:"",top:""}),e=v.epoAPI.dom.scroll(),(s=a=t.offset().left+t.outerWidth()/2-i.outerWidth()/2)<0?(a=t.offset().left+t.outerWidth()/2-20,i.addClass("left")):i.removeClass("left"),0<=s&&a+i.outerWidth()>v(m).width()?((a=t.offset().left-i.outerWidth()+t.outerWidth()/2+20)<0&&(a-=10,i.css("max-width","calc("+i.css("max-width")+" - "+Math.abs(a)+"px)"),a=10),i.addClass("right")):i.removeClass("right"),i.css({left:a,right:"auto",top:l}),l=t.offset().top-i.outerHeight()-10,s=t.offset().top-e.top-i.outerHeight()-10,l<0||s<0?(l=t.offset().top+t.outerHeight()+10,i.addClass("top"),i.removeClass("bottom")):(i.removeClass("top"),i.addClass("bottom")),v(m).trigger("tm_tooltip_show"),o?(i.css({left:a,top:l}),t.data("is_moving",!1)):i.css({left:a,top:l}).removeClass(d.fadeout).addClass(d.fadin))},show:function(t){var i,o=this.settings;if(!t.data("is_moving"))return 1===t.data("tm-has-tm-tip")&&(void 0!==t.data("tm-tip-html")?(i=t.data("tm-tip-html"),t.attr("title")&&t.data("tmtip-title",t.attr("title")),t.removeAttr("title")):t.attr("data-tm-tooltip-html")?(i=t.attr("data-tm-tooltip-html"),t.attr("title")&&t.data("tmtip-title",t.attr("title")),t.removeAttr("title")):i=t.attr("title"),void 0!==i)&&(v("#tm-tooltip").remove(),o.tipclass?o.tipclass=" "+o.tipclass:o.tipclass="",(o=v('<div id="tm-tooltip" class="tm-tip tm-animated'+o.tipclass+'"></div>')).css("opacity",0).html(i).appendTo("body"),0<(i=o.find("img")).length&&i.on("load",this.initTooltip.bind(this,t,o)),this.initTooltip(t,o),v(m).on("scroll.tcToolTip resize.tcToolTip",this.initTooltip.bind(this,t,o)),t.data("is_moving",!1),t.on("tmmovetooltip",this.initTooltip.bind(this,t,o,1)),t.on("mouseleave.tc tmhidetooltip",this.removeTooltip.bind(this,t,o)),t.closest("label").on("mouseleave.tc tmhidetooltip",this.removeTooltip.bind(this,t,o)),o.on("click",this.removeTooltip.bind(this,t,o))),!1},destroy:function(){0<this.targets.length&&(this.targets.toArray().forEach(function(t){t=v(t);t.closest("off").on("mouseleave.tc tmhidetooltip"),t.off("tc-tooltip-html-changed tmmovetooltip tmhidetooltip mouseenter.tc mouseleave.tc tmshowtooltip.tc"),t.removeData("tmtip-title"),t.removeData("tm-tip-html")}),this.targets.removeData("tctooltip tm-has-tm-tip is_moving"))},init:function(){var g=this,u=this.settings;0<this.targets.length&&this.targets.toArray().forEach(function(t){var i,o,e,a,l,s,d,m,n,r,p,h,c,f=v(t),t=u.tip||void 0;void 0===f.data("tm-has-tm-tip")&&(i=f.attr("data-tm-tooltip-swatch"),o=f.attr("data-tm-tooltip-swatch-desc"),e=f.attr("data-tm-tooltip-swatch-lbl-desc"),a=f.attr("data-tm-tooltip-swatch-img"),l=f.attr("data-tm-tooltip-swatch-img-lbl"),s=f.attr("data-tm-tooltip-swatch-img-desc"),d=f.attr("data-tm-tooltip-swatch-img-lbl-desc"),f.data("tm-has-tm-tip",1),r=void 0!==f.attr("data-original")?f.attr("data-original"):void 0!==f.attr("src")?void 0!==f.attr("data-src")?f.attr("data-src"):f.attr("src"):f[0].src,0===(p=0===(p=0===(p=(c=0===(c=(c=0===(c=(c=f.closest(".tmcp-field-wrap")).is(".tc-epo-element-product-holder")?f.closest(".cpf-element"):c).length?f.closest(".cpf-element"):c).is(".cpf-type-product")&&0===f.closest(".tm-epo-element-label").length&&f.closest(".cpf-section").length?f.closest(".cpf-section").find(".tc-section-inner-wrap .tm-section-description.tm-description"):c).length?f.closest(".cpf-section").find(".tc-section-inner-wrap .tm-section-description.tm-description"):c).find(".tm-tip-html")).length?c.find(".checkbox-image-label,.checkbox-image-label-inline,.radio-image-label,.radio-image-label-inline"):p).length?c.next(".checkbox-image-label,.checkbox-image-label-inline,.radio-image-label,.radio-image-label-inline,.tm-tip-html"):p).length&&c.is(".tm-description")&&(p=c),(c=(p=v(c=p)).find(".tc-label-text")).length||(c=p),h="yes"===f.attr("data-tm-hide-label")||void 0===f.attr("data-tm-hide-label")||p.is(".tm-tip-html"),n="",0===(m=(m=f.closest(".tmcp-field-wrap")).find("[data-tm-tooltip-html]")).length?0<(m=f.closest(".tmcp-field-wrap").find(".tc-inline-description")).length&&(n=m.html()):n=m.attr("data-tm-tooltip-html"),void 0===t?(i?t=c.html():o&&""!==n?t="<aside>"+n+"</aside>":!e||""===c.html()&&""===n?a&&""!==r?t='<img src="'+r+'">':!l||""===c.html()&&""===r?!s||""===r&&""===n?!d||""===c.html()&&""===r&&""===n||(t='<img src="'+r+'"><aside>'+c.html()+"</aside><aside>"+n+"</aside>"):t='<img src="'+r+'"><aside>'+n+"</aside>":t='<img src="'+r+'"><aside>'+c.html()+"</aside>":t="<aside>"+c.html()+"</aside><aside>"+n+"</aside>",void 0!==t&&(f.data("tm-tip-html",t),h)&&(p.find(".tm-tooltip").remove(),c.hide()),void 0===t&&(t=f.attr("data-tm-tooltip-html")?f.attr("data-tm-tooltip-html"):f.attr("title"))):f.data("tm-tip-html",t),f.on("tc-tooltip-html-changed",function(){f.attr("data-tm-tooltip-html")?f.show():f.hide()}),f.is("img")&&f.closest("label").on("mouseenter tmshowtooltip",g.show.bind(g,f)),f.on("mouseenter.tc tmshowtooltip.tc",g.show.bind(g,f)),u.trigger)&&g.show(f)})}},v.fn.tcToolTip=function(t){var i,o,e=v(this),a="object"==typeof t?t:{};return e.map(function(){return v(this).data("tctooltip")||""}).get().some(function(t){return""===t})&&(o=new l(this,a),e.data("tctooltip",o)),void 0===(i="string"==typeof t?(o=e.data("tctooltip"))[t].apply(o,[]):i)?e:i},v.fn.tcToolTip.defaults={fadin:"fadein",fadeout:"fadeout",speed:1500},v.fn.tcToolTip.instances=[],v.fn.tcToolTip.Constructor=l,v.tcToolTip=function(t,i){var o=!1;return(t=t||v(".tm-tooltip")).map(function(){return v(this).data("tctooltip")||""}).get().some(function(t){return""===t})&&(o=new l(t,i),t.data("tctooltip",o)),o}}(window,window.jQuery);
!function(t){"use strict";"function"==typeof window.define&&window.define.amd?window.define(["jquery"],t):"object"==typeof window.module&&window.module.exports?window.module.exports=t(window.require("jquery")):t(window.jQuery)}(function(d){"use strict";var i,e,n={};return d.extend(d.fn,{tc_validate:function(t){var s;if(this.length)return(s=d.data(this[0],"tc_validator"))||(this.attr("novalidate","novalidate"),s=new d.tc_validator(t,this[0]),d.data(this[0],"tc_validator",s),s.settings.onsubmit&&(this.on("click.tc_validate",":submit",function(t){s.submitButton=t.currentTarget,d(this).hasClass("cancel")&&(s.cancelSubmit=!0),void 0!==d(this).attr("formnovalidate")&&(s.cancelSubmit=!0)}),this.on("submit.tc_validate",function(i){function t(){var t,e;return s.submitButton&&(s.settings.submitHandler||s.formSubmitted)&&(t=d("<input type='hidden'>").attr("name",s.submitButton.name).val(d(s.submitButton).val()).appendTo(s.currentForm)),!(s.settings.submitHandler&&!s.settings.debug)||(e=s.settings.submitHandler.call(s,s.currentForm,i),t&&t.remove(),void 0!==e&&e)}return s.settings.debug&&i.preventDefault(),s.cancelSubmit?(s.cancelSubmit=!1,t()):s.form()?s.pendingRequest?!(s.formSubmitted=!0):t():(s.focusInvalid(),!1)}))),s},tc_valid:function(){var t,e,i;return d(this[0]).is("form")?t=this.tc_validate().form():(i=[],t=!0,e=d(this[0].form).tc_validate(),this.each(function(){(t=e.element(this)&&t)||(i=i.concat(e.errorList))}),e.errorList=i),t},tc_rules:function(t,e){var i,s,n,r,a,o=this[0],l=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!==o&&(!o.form&&l&&(o.form=this.closest("form")[0],o.name=this.attr("name")),null!==o.form)){if(t)switch(s=(i=d.data(o.form,"tc_validator").settings).rules,n=d.tc_validator.staticRules(o),t){case"add":d.extend(n,d.tc_validator.normalizeRule(e)),delete n.messages,s[o.name]=n,e.messages&&(i.messages[o.name]=d.extend(i.messages[o.name],e.messages));break;case"remove":return e?(a={},d.each(e.split(/\s/),function(t,e){a[e]=n[e],delete n[e]}),a):(delete s[o.name],n)}return(l=d.tc_validator.normalizeRules(d.extend({},d.tc_validator.classRules(o),d.tc_validator.attributeRules(o),d.tc_validator.dataRules(o),d.tc_validator.staticRules(o)),o)).required&&(r=l.required,delete l.required,l=d.extend({required:r},l)),l.remote&&(r=l.remote,delete l.remote,l=d.extend(l,{remote:r})),l}}}),e=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},d.extend(d.expr.pseudos||d.expr[":"],{blank:function(t){return!e(""+d(t).val())},filled:function(t){t=d(t).val();return null!==t&&!!e(""+t)},unchecked:function(t){return!d(t).prop("checked")}}),d.tc_validator=function(t,e){this.settings=d.extend(!0,{},d.tc_validator.defaults,t),this.currentForm=e,this.init()},d.tc_validator.format=function(i,t){return 1===arguments.length?function(){var t=d.makeArray(arguments);return t.unshift(i),d.tc_validator.format.apply(this,t)}:(void 0!==t&&((t=2<arguments.length&&t.constructor!==Array?d.makeArray(arguments).slice(1):t).constructor!==Array&&(t=[t]),d.each(t,function(t,e){i=i.replace(new RegExp("\\{"+t+"\\}","g"),function(){return e})})),i)},d.extend(d.tc_validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:d([]),errorLabelContainer:d([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){9===e.which&&""===this.elementValue(t)||-1!==d.inArray(e.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(t,e,i){("radio"===t.type?this.findByName(t.name):d(t)).addClass(e).removeClass(i)},unhighlight:function(t,e,i){("radio"===t.type?this.findByName(t.name):d(t)).removeClass(e).addClass(i)}},setDefaults:function(t){d.extend(d.tc_validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:d.tc_validator.format("Please enter no more than {0} characters."),maxlengthsingle:d.tc_validator.format("Please enter no more than {0} character."),minlength:d.tc_validator.format("Please enter at least {0} characters."),minlengthsingle:d.tc_validator.format("Please enter at least {0} character."),rangelength:d.tc_validator.format("Please enter a value between {0} and {1} characters long."),range:d.tc_validator.format("Please enter a value between {0} and {1}."),max:d.tc_validator.format("Please enter a value less than or equal to {0}."),min:d.tc_validator.format("Please enter a value greater than or equal to {0}."),step:d.tc_validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){var i,n=this.currentForm;function t(t){var e,i,s=void 0!==d(t.data.that).attr("contenteditable")&&"false"!==d(t.data.that).attr("contenteditable");!t.data.that.form&&s&&(t.data.that.form=d(t.data.that).closest("form")[0],t.data.that.name=d(t.data.that).attr("name")),n===t.data.that.form&&(s=d.data(t.data.that.form,"tc_validator"),e="on"+t.type.replace(/^validate/,""),(i=s.settings)[e])&&!d(t.data.that).is(i.ignore)&&i[e].call(s,t.data.that,t)}this.labelContainer=d(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||d(this.currentForm),this.containers=d(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset(),this.groups={},d.each(this.settings.groups,function(t,e){"string"==typeof e&&(e=e.split(/\s/)),d.each(e,function(t,e){e,0})}),i=this.settings.rules,d.each(i,function(t,e){i[t]=d.tc_validator.normalizeRule(e)}),d(this.currentForm).on("focusin.tc_validate focusout.tc_validate keyup.tc_validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",{that:this},t).on("click.tc_validate","select, option, [type='radio'], [type='checkbox']",{that:this},t),this.settings.invalidHandler&&d(this.currentForm).on("invalid-form.tc_validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),d.extend(this.submitted,this.errorMap),this.invalid=d.extend({},this.errorMap),this.tc_valid()||d(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.tc_valid()},checkForm:function(){var t,e;for(this.prepareForm(),t=0,e=this.elements();e[t];t+=1)this.currentElements=e,this.check(e[t]);return this.tc_valid()},element:function(t){var e,i,s=this.clean(t),n=this.validationTargetFor(s),r=this,a=!0;return void 0===n?delete this.invalid[s.name]:(this.prepareElement(n),this.currentElements=d(n),(i=this.groups[n.name])&&d.each(this.groups,function(t,e){e===i&&t!==n.name&&(s=r.validationTargetFor(r.clean(r.findByName(t))))&&s.name in r.invalid&&(r.currentElements.push(s),a=r.check(s)&&a)}),e=!1!==this.check(n),a=a&&e,this.invalid[n.name]=!e,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),d(t).attr("aria-invalid",!e)),a},showErrors:function(e){var i;e&&(d.extend((i=this).errorMap,e),this.errorList=d.map(this.errorMap,function(t,e){return{message:t,element:i.findByName(e)[0]}}),this.successList=d.grep(this.successList,function(t){return!(t.name in e)})),this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){var t;d.fn.resetForm&&d(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors(),t=this.elements().removeData("previousValue").removeAttr("aria-invalid"),this.resetElements(t)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e+=1)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&(i+=1);return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},tc_valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{d(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===d.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return d(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var t=this.name||d(this).attr("name");return void 0!==d(this).attr("contenteditable")&&"false"!==d(this).attr("contenteditable")&&(this.form=d(this).closest("form")[0],this.name=t),this.form===e.currentForm&&!(t in i||!e.objectLength(d(this).tc_rules()))&&(i[t]=!0)})},clean:function(t){return d(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return d(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=d([]),this.toHide=d([])},reset:function(){this.resetInternals(),this.currentElements=d([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(t){var e=d(t),i=t.type,s=void 0!==e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===i||"checkbox"===i?this.findByName(t.name).filter(":checked").val():"number"===i&&void 0!==t.validity?t.validity.badInput?"NaN":e.val():(t=s?e.text():e.val(),"file"===i?"C:\\fakepath\\"===t.substring(0,12)?t.substring(12):0<=(s=t.lastIndexOf("/"))||0<=(s=t.lastIndexOf("\\"))?t.substring(s+1):t:"string"==typeof t?t.replace(/\r/g,""):t)},check:function(e){var t,i,s,n,r,a,o,l;for(a in e=this.validationTargetFor(this.clean(e)),t=d(e).tc_rules(),i=d.map(t,function(t,e){return e}).length,s=!1,n=this.elementValue(e),"function"==typeof t.normalizer?l=t.normalizer:"function"==typeof this.settings.normalizer&&(l=this.settings.normalizer),l&&(n=l.call(e,n),delete t.normalizer),t)if(a){o={method:a,parameters:t[a]};try{if("dependency-mismatch"===(r=d.tc_validator.methods[a].call(this,n,e,o.parameters))&&1===i)s=!0;else{if(s=!1,"pending"===r)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!r)return this.formatAndAdd(e,o),!1}}catch(t){throw t instanceof TypeError&&(t.message+=".  Exception occurred when checking element "+e.id+", check the '"+o.method+"' method."),t}}if(!s)return this.objectLength(t)&&this.successList.push(e),!0},customDataMessage:function(t,e){return d(t).data("msg"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())||d(t).data("msg")},customMessage:function(t,e){t=this.settings.messages[t];return t&&(t.constructor===String?t:t[e])},findDefined:function(){for(var t=0;t<arguments.length;t+=1)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(t,e){var i,s="";return"minlength"!==(e="string"==typeof e?{method:e}:e).method&&"maxlength"!==e.method||1!==e.parameters&&"1"!==e.parameters||(s="single"),i=/\$?\{(\d+)\}/g,"function"==typeof(s=this.findDefined(this.customMessage(t.name,e.method+s),this.customDataMessage(t,e.method+s),!this.settings.ignoreTitle&&t.title||void 0,d.tc_validator.messages[e.method+s],"<strong>Warning: No message defined for "+t.name+"</strong>"))?s=s.call(this,e.parameters,t):i.test(s)&&(s=d.tc_validator.format(s.replace(i,"{$1}"),e.parameters)),s},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return t=this.settings.wrapper?t.add(t.parent(this.settings.wrapper)):t},defaultShowErrors:function(){for(var t,e,i=0;this.errorList[i];i+=1)e=this.errorList[i],this.settings.highlight&&this.settings.highlight.call(this,e.element,this.settings.errorClass,this.settings.validClass),this.showLabel(e.element,e.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(i=0;this.successList[i];i+=1)this.showLabel(this.successList[i]);if(this.settings.unhighlight)for(i=0,t=this.validElements();t[i];i+=1)this.settings.unhighlight.call(this,t[i],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return d(this.errorList).map(function(){return this.element})},showLabel:function(t,e){var i,s,n,r=this.errorsFor(t),a=this.idOrName(t),o=d(t).attr("aria-describedby");r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(e)):(s=r=d("<"+this.settings.errorElement+">").attr("id",a+"-error").addClass(this.settings.errorClass).html(e||""),this.settings.wrapper&&(s=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(s):this.settings.errorPlacement?this.settings.errorPlacement.call(this,s,d(t)):s.insertAfter(t),r.is("label")?r.attr("for",a):0===r.parents("label[for='"+this.escapeCssMeta(a)+"']").length&&(s=r.attr("id"),o?o.match(new RegExp("\\b"+this.escapeCssMeta(s)+"\\b"))||(o+=" "+s):o=s,d(t).attr("aria-describedby",o),i=this.groups[t.name])&&d.each((n=this).groups,function(t,e){e===i&&d("[name='"+n.escapeCssMeta(t)+"']",n.currentForm).attr("aria-describedby",r.attr("id"))})),!e&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var e=this.escapeCssMeta(this.idOrName(t)),t=d(t).attr("aria-describedby"),e="label[for='"+e+"'], label[for='"+e+"'] *";return t&&(e=e+", #"+this.escapeCssMeta(t).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]\^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||!this.checkable(t)&&t.id||t.name},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),d(t).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(t){return d(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,e){switch(e.nodeName.toLowerCase()){case"select":return d("option:selected",e).length;case"input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return t.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(t,e){return!!d(t,e.form).length},function:function(t,e){return t(e)}},optional:function(t){var e=this.elementValue(t);return!d.tc_validator.methods.required.call(this,e,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest+=1,d(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,e){--this.pendingRequest,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],d(t).removeClass(this.settings.pendingClass),e&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(d(this.currentForm).trigger("submit"),this.submitButton&&d("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!e&&0===this.pendingRequest&&this.formSubmitted&&(d(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,e){return e="string"==typeof e&&e||"remote",d.data(t,"previousValue")||d.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:e})})},destroy:function(){this.resetForm(),d(this.currentForm).off(".tc_validate").removeData("tc_validator").find(".tc_validate-equalTo-blur").off(".tc_validate-equalTo").removeClass("validate-equalTo-blur").find(".tc_validate-lessThan-blur").off(".tc_validate-lessThan").removeClass("validate-lessThan-blur").find(".tc_validate-lessThanEqual-blur").off(".tc_validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".tc_validate-greaterThanEqual-blur").off(".tc_validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".tc_validate-greaterThan-blur").off(".tc_validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,e){t.constructor===String?this.classRuleSettings[t]=e:d.extend(this.classRuleSettings,t)},classRules:function(t){var e={},t=d(t).attr("class");return t&&d.each(t.split(" "),function(){this in d.tc_validator.classRuleSettings&&d.extend(e,d.tc_validator.classRuleSettings[this])}),e},normalizeAttributeRule:function(t,e,i,s){(s=/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(s=Number(s),isNaN(s))?void 0:s)||0===s?t[i]=s:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(t){var e,i,s={},n=d(t),r=t.getAttribute("type");for(e in d.tc_validator.methods)e&&(i="required"===e?!!(i=""===(i=t.getAttribute(e))?!0:i):n.attr(e),this.normalizeAttributeRule(s,r,e,i));return s.maxlength&&/-1|2147483647|524288/.test(s.maxlength)&&delete s.maxlength,s},dataRules:function(t){var e,i,s={},n=d(t),r=t.getAttribute("type");for(e in d.tc_validator.methods)e&&(""===(i=n.data("rule"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))&&(i=!0),this.normalizeAttributeRule(s,r,e,i));return s},staticRules:function(t){var e={},i=d.data(t.form,"tc_validator");return e=i.settings.rules?d.tc_validator.normalizeRule(i.settings.rules[t.name])||{}:e},normalizeRules:function(i,s){var n;return d.each(i,function(t,e){if(!1===e)delete i[t];else if(e.param||e.depends){switch(n=!0,typeof e.depends){case"string":n=!!d(e.depends,s.form).length;break;case"function":n=e.depends.call(s,s)}n?i[t]=void 0===e.param||e.param:(d.data(s.form,"tc_validator").resetElements(d(s)),delete i[t])}}),d.each(i,function(t,e){i[t]="function"==typeof e&&"normalizer"!==t?e(s):e}),d.each(["minlength","maxlength"],function(){i[this]&&(i[this]=Number(i[this]))}),d.each(["rangelength","range"],function(){var t;i[this]&&(Array.isArray(i[this])?i[this]=[Number(i[this][0]),Number(i[this][1])]:"string"==typeof i[this]&&(t=i[this].replace(/[[\]]/g,"").split(/[\s,]+/),i[this]=[Number(t[0]),Number(t[1])]))}),d.tc_validator.autoCreateRanges&&(null!==i.min&&null!==i.max&&(i.range=[i.min,i.max],delete i.min,delete i.max),null!==i.minlength)&&null!==i.maxlength&&(i.rangelength=[i.minlength,i.maxlength],delete i.minlength,delete i.maxlength),i},normalizeRule:function(t){var e;return"string"==typeof t&&(e={},d.each(t.split(/\s/),function(){e[this]=!0}),t=e),t},addMethod:function(t,e,i){d.tc_validator.methods[t]=e,d.tc_validator.messages[t]=void 0!==i?i:d.tc_validator.messages[t],e.length<3&&d.tc_validator.addClassRules(t,d.tc_validator.normalizeRule(t))},methods:{required:function(t,e,i){return this.depend(i,e)?"select"===e.nodeName.toLowerCase()?(i=d(e).val())&&0<i.length:this.checkable(e)?0<this.getLength(t,e):null!=t&&0<t.length:"dependency-mismatch"},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?\^_`{|}~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(t,e,i){t=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||i<=t},maxlength:function(t,e,i){t=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||t<=i},rangelength:function(t,e,i){t=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||t>=i[0]&&t<=i[1]},min:function(t,e,i){return this.optional(e)||i<=t},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(t,e,i){function s(t){return(t=(""+t).match(/(?:\.(\d+))?$/))&&t[1]?t[1].length:0}function n(t){return Math.round(t*Math.pow(10,r))}var r,a=d(e).attr("type"),o="Step attribute on input type "+a+" is not supported.",l=new RegExp("\\b"+a+"\\b"),h=!0;if(a&&!l.test(["text","number","range"].join()))throw new Error(o);return r=s(i),(s(t)>r||n(t)%n(i)!=0)&&(h=!1),this.optional(e)||h},equalTo:function(t,e,i){i=d(i);return this.settings.onfocusout&&i.not(".tc_validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.tc_validate-equalTo",function(){d(e).tc_valid()}),t===i.val()},remote:function(s,n,t,r){var a,o,e;return this.optional(n)?"dependency-mismatch":(r="string"==typeof r&&r||"remote",a=this.previousValue(n,r),this.settings.messages[n.name]||(this.settings.messages[n.name]={}),a.originalMessage=a.originalMessage||this.settings.messages[n.name][r],this.settings.messages[n.name][r]=a.message,e=d.param(d.extend({data:s},(t="string"==typeof t?{url:t}:t).data)),a.old===e?a.valid:(a.old=e,(o=this).startRequest(n),(e={})[n.name]=s,d.ajax(d.extend(!0,{mode:"abort",port:"validate"+n.name,dataType:"json",data:e,context:o.currentForm,success:function(t){var e,i=!0===t||"true"===t;o.settings.messages[n.name][r]=a.originalMessage,i?(e=o.formSubmitted,o.resetInternals(),o.toHide=o.errorsFor(n),o.formSubmitted=e,o.successList.push(n),o.invalid[n.name]=!1,o.showErrors()):(e={},t=t||o.defaultMessage(n,{method:r,parameters:s}),a.message=t,e[n.name]=t,o.invalid[n.name]=!0,o.showErrors(e)),a.valid=i,o.stopRequest(n,i)}},t)),"pending"))}}}),d.ajaxPrefilter?d.ajaxPrefilter(function(t,e,i){var s=t.port;"abort"===t.mode&&(n[s]&&n[s].abort(),n[s]=i)}):(i=d.ajax,d.ajax=function(t){var e=("mode"in t?t:d.ajaxSettings).mode,t=("port"in t?t:d.ajaxSettings).port;return"abort"===e?(n[t]&&n[t].abort(),n[t]=i.apply(this,arguments),n[t]):i.apply(this,arguments)}),d});
!function(t){"use strict";"function"==typeof window.define&&window.define.amd?window.define(["jquery"],t):t(window.jQuery)}(function(M){"use strict";var n;function r(t){M.tm_datepicker._isDisabledDatepicker((n.inline?n.dpDiv.parent():n.input)[0])||(M(t).parents(".ui-tm-datepicker-calendar").find("a").removeClass("ui-state-hover"),M(t).addClass("ui-state-hover"),-1!==t.className.indexOf("ui-tm-datepicker-prev")&&M(t).addClass("ui-tm-datepicker-prev-hover"),-1!==t.className.indexOf("ui-tm-datepicker-next")&&M(t).addClass("ui-tm-datepicker-next-hover"))}function a(t){var e="button, .ui-tm-datepicker-prev, .ui-tm-datepicker-next, .ui-tm-datepicker-calendar td a";return t.on("mouseout",e,function(){M(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-tm-datepicker-prev")&&M(this).removeClass("ui-tm-datepicker-prev-hover"),-1!==this.className.indexOf("ui-tm-datepicker-next")&&M(this).removeClass("ui-tm-datepicker-next-hover")}).on("mouseover",e,function(){r(this)})}function d(t,e){for(var a in M.extend(t,e),e)null===e[a]&&(t[a]=e[a])}function t(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-tm-datepicker-div",this._inlineClass="ui-tm-datepicker-inline",this._appendClass="ui-tm-datepicker-append",this._triggerClass="ui-tm-datepicker-trigger",this._dialogClass="ui-tm-datepicker-dialog",this._disableClass="ui-tm-datepicker-disabled",this._unselectableClass="ui-tm-datepicker-unselectable",this._currentClass="ui-tm-datepicker-current-day",this._dayOverClass="ui-tm-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},M.extend(this._defaults,this.regional[""]),this.regional.en=M.extend(!0,{},this.regional[""]),this.regional["en-US"]=M.extend(!0,{},this.regional.en),this.dpDiv=a(M("<div id='"+this._mainDivId+"' class='ui-tm-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}M.ui.tm_datepicker=M.ui.tm_datepicker||{},M.ui.tm_datepicker.version||(M.extend(M.ui,{tm_datepicker:{version:"1.11.4"}}),M.extend(t.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return d(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var a,i=t.nodeName.toLowerCase(),s="div"===i||"span"===i;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(a=this._newInst(M(t),s)).settings=M.extend({},e||{}),"input"===i?this._connectDatepicker(t,a):s&&this._inlineDatepicker(t,a)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?a(M("<div class='"+this._inlineClass+" ui-tm-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var a=M(t);e.append=M([]),e.trigger=M([]),a.hasClass(this.markerClassName)||(this._attachments(a,e),a.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),M.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var a,i=this._get(e,"appendText"),s=this._get(e,"isRTL");e.append&&e.append.remove(),i&&(e.append=M("<span class='"+this._appendClass+"'>"+i+"</span>"),t[s?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(i=this._get(e,"buttonText"),a=this._get(e,"buttonImage"),e.trigger=M(this._get(e,"buttonImageOnly")?M("<img/>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):M("<button type='button'></button>").addClass(this._triggerClass).html(a?M("<img/>").attr({src:a,alt:i,title:i}):i)),t[s?"before":"after"](e.trigger),e.trigger.on("click",function(){return M.tm_datepicker._datepickerShowing&&M.tm_datepicker._lastInput===t[0]?M.tm_datepicker._hideDatepicker():(M.tm_datepicker._datepickerShowing&&M.tm_datepicker._lastInput!==t[0]&&M.tm_datepicker._hideDatepicker(),M.tm_datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,a,i,s,n,r=this._get(t,"dateFormat");this._get(t,"autoSize")&&!t.inline&&(n=new Date(2009,11,20),(r=this._get(t,"dateFormat")).match(/[DM]/)&&(n.setMonth((e=function(t){for(s=i=a=0;s<t.length;s+=1)t[s].length>a&&(a=t[s].length,i=s);return i})(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),t.input.attr("size",this._formatDate(t,n).length))},_inlineDatepicker:function(t,e){var a=M(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(e.dpDiv),M.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,a,i,s){var n,r=this._dialogInst;return r||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=M("<input type='text' id='"+n+"'>"),this._dialogInput.on("keydown",this._doKeyDown),M("body").append(this._dialogInput),r=this._newInst(this._dialogInput,!1),(this._dialogInst=r).settings={},M.data(this._dialogInput[0],"datepicker",r)),d(r.settings,i||{}),e=e&&e.constructor===Date?this._formatDate(r,e):e,this._dialogInput.val(e),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,i=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+e,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),M.blockUI&&M.blockUI(this.dpDiv),M.data(this._dialogInput[0],"datepicker",r),this},_destroyDatepicker:function(t){var e,a=M(t),i=M.data(t,"datepicker");a.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),M.removeData(t,"datepicker"),"input"===e?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||a.removeClass(this.markerClassName).empty(),n===i)&&(n=null)},_enableDatepicker:function(e){var t,a=M(e),i=M.data(e,"datepicker");a.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-tm-datepicker-month, select.ui-tm-datepicker-year").prop("disabled",!1)),this._disabledInputs=M.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,a=M(e),i=M.data(e,"datepicker");a.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-tm-datepicker-month, select.ui-tm-datepicker-year").prop("disabled",!0)),this._disabledInputs=M.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){var e;if(t)for(e=0;e<this._disabledInputs.length;e+=1)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return M.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,a){var i,s,n=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?M.extend({},M.tm_datepicker._defaults):n?"all"===e?M.extend({},n.settings):this._get(n,e):null;i=e||{},"string"==typeof e&&((i={})[e]=a),n&&(this._curInst===n&&this._hideDatepicker(),e=this._getDateDatepicker(t,!0),a=this._getMinMaxDate(n,"min"),s=this._getMinMaxDate(n,"max"),d(n.settings,i),null!==a&&void 0!==i.dateFormat&&void 0===i.minDate&&(n.settings.minDate=this._formatDate(n,a)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(n.settings.maxDate=this._formatDate(n,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(M(t),n),this._autoSize(n),this._setDate(n,e),this._updateAlternate(n),this._updateDatepicker(n))},_changeDatepicker:function(t,e,a){this._optionDatepicker(t,e,a)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,a,i=M.tm_datepicker._getInst(t.target),s=!0,n=i.dpDiv.is(".ui-tm-datepicker-rtl");if(i._keyEvent=!0,M.tm_datepicker._datepickerShowing)switch(t.keyCode){case 9:M.tm_datepicker._hideDatepicker(),s=!1;break;case 13:return(a=M("td."+M.tm_datepicker._dayOverClass+":not(."+M.tm_datepicker._currentClass+")",i.dpDiv))[0]&&M.tm_datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,a[0]),(a=M.tm_datepicker._get(i,"onSelect"))?(e=M.tm_datepicker._formatDate(i),a.apply(i.input?i.input[0]:null,[e,i])):M.tm_datepicker._hideDatepicker(),!1;case 27:M.tm_datepicker._hideDatepicker();break;case 33:M.tm_datepicker._adjustDate(t.target,t.ctrlKey?-M.tm_datepicker._get(i,"stepBigMonths"):-M.tm_datepicker._get(i,"stepMonths"),"M");break;case 34:M.tm_datepicker._adjustDate(t.target,t.ctrlKey?+M.tm_datepicker._get(i,"stepBigMonths"):+M.tm_datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._adjustDate(t.target,n?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&M.tm_datepicker._adjustDate(t.target,t.ctrlKey?-M.tm_datepicker._get(i,"stepBigMonths"):-M.tm_datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._adjustDate(t.target,n?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&M.tm_datepicker._adjustDate(t.target,t.ctrlKey?+M.tm_datepicker._get(i,"stepBigMonths"):+M.tm_datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&M.tm_datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?M.tm_datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,a=M.tm_datepicker._getInst(t.target);if(M.tm_datepicker._get(a,"constrainInput"))return a=M.tm_datepicker._possibleChars(M.tm_datepicker._get(a,"dateFormat")),e=String.fromCharCode(null===t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||e<" "||!a||-1<a.indexOf(e)},_doKeyUp:function(t){t=M.tm_datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{M.tm_datepicker.parseDate(M.tm_datepicker._get(t,"dateFormat"),t.input?t.input.val():null,M.tm_datepicker._getFormatConfig(t))&&(M.tm_datepicker._setDateFromField(t),M.tm_datepicker._updateAlternate(t),M.tm_datepicker._updateDatepicker(t))}catch(t){return!1}return!0},_showDatepicker:function(t){var e,a,i,s;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=M("input",t.parentNode)[0]),M.tm_datepicker._isDisabledDatepicker(t)||M.tm_datepicker._lastInput===t||(e=M.tm_datepicker._getInst(t),M.tm_datepicker._curInst&&M.tm_datepicker._curInst!==e&&(M.tm_datepicker._curInst.dpDiv.stop(!0,!0),e)&&M.tm_datepicker._datepickerShowing&&M.tm_datepicker._hideDatepicker(M.tm_datepicker._curInst.input[0]),!1===(i=(i=M.tm_datepicker._get(e,"beforeShow"))?i.apply(t,[t,e]):{}))||(d(e.settings,i),e.lastVal=null,M.tm_datepicker._lastInput=t,M.tm_datepicker._setDateFromField(e),M.tm_datepicker._inDialog&&(t.value=""),M.tm_datepicker._pos||(M.tm_datepicker._pos=M.tm_datepicker._findPos(t),M.tm_datepicker._pos[1]+=t.offsetHeight),a=!1,M(t).parents().each(function(){return!(a=a||"fixed"===M(this).css("position"))}),i={left:M.tm_datepicker._pos[0],top:M.tm_datepicker._pos[1]},M.tm_datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),M.tm_datepicker._updateDatepicker(e),i=M.tm_datepicker._checkOffset(e,i,a),e.dpDiv.css({position:M.tm_datepicker._inDialog&&M.blockUI?"static":a?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),e.inline)||(i=M.tm_datepicker._get(e,"showAnim"),s=M.tm_datepicker._get(e,"duration"),e.dpDiv.css("z-index",function(t){for(var e;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(e=parseInt(t.css("zIndex"),10),!isNaN(e))&&0!==e)return e;t=t.parent()}return 0}(M(t))+1),M.tm_datepicker._datepickerShowing=!0,M.effects&&M.effects.effect[i]?e.dpDiv.show(i,M.tm_datepicker._get(e,"showOptions"),s):e.dpDiv[i||"show"](i?s:null),M.tm_datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),M.tm_datepicker._curInst=e)},_updateDatepicker:function(t){var e,a,i,s;this.maxRows=4,(n=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),i=(a=this._getNumberOfMonths(t))[1],0<(s=t.dpDiv.find("."+this._dayOverClass+" a")).length&&r.apply(s.get(0),[s.get(0)]),t.dpDiv.removeClass("ui-tm-datepicker-multi-2 ui-tm-datepicker-multi-3 ui-tm-datepicker-multi-4").width(""),1<i&&t.dpDiv.addClass("ui-tm-datepicker-multi-"+i).css("width",17*i+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-tm-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-tm-datepicker-rtl"),t===M.tm_datepicker._curInst&&M.tm_datepicker._datepickerShowing&&M.tm_datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-tm-datepicker-year:first").replaceWith(t.yearshtml),e=null,t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,a){var i=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),n=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:M(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:M(document).scrollTop());return e.left-=this._get(t,"isRTL")?i-n:0,e.left-=a&&e.left===t.input.offset().left?M(document).scrollLeft():0,e.top-=a&&e.top===t.input.offset().top+r?M(document).scrollTop():0,e.left-=Math.min(e.left,e.left+i>d&&i<d?Math.abs(e.left+i-d):0),e.top-=Math.min(e.top,e.top+s>c&&s<c?Math.abs(s+r):0),e},_findPos:function(t){for(var e=this._getInst(t),a=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||M.expr.pseudos.hidden(t));)t=t[a?"previousSibling":"nextSibling"];return[(e=M(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,a,i=this._curInst;!i||t&&i!==M.data(t,"datepicker")||this._datepickerShowing&&(t=this._get(i,"showAnim"),a=this._get(i,"duration"),e=function(){M.tm_datepicker._tidyDialog(i)},M.effects&&(M.effects.effect[t]||M.effects[t])?i.dpDiv.hide(t,M.tm_datepicker._get(i,"showOptions"),a,e):i.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?a:null,e),t||e(),this._datepickerShowing=!1,(a=this._get(i,"onClose"))&&a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),M.blockUI)&&(M.unblockUI(),M("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-tm-datepicker-calendar")},_checkExternalClick:function(t){var e;M.tm_datepicker._curInst&&(t=M(t.target),e=M.tm_datepicker._getInst(t[0]),!(t[0].id===M.tm_datepicker._mainDivId||0!==t.parents("#"+M.tm_datepicker._mainDivId).length||t.hasClass(M.tm_datepicker.markerClassName)||t.closest("."+M.tm_datepicker._triggerClass).length||!M.tm_datepicker._datepickerShowing||M.tm_datepicker._inDialog&&M.blockUI)||t.hasClass(M.tm_datepicker.markerClassName)&&M.tm_datepicker._curInst!==e)&&M.tm_datepicker._hideDatepicker()},_adjustDate:function(t,e,a){var t=M(t),i=this._getInst(t[0]);this._isDisabledDatepicker(t[0])||(this._adjustInstDate(i,e+("M"===a?this._get(i,"showCurrentAtPos"):0),a),this._updateDatepicker(i))},_gotoToday:function(t){var e,t=M(t),a=this._getInst(t[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.currentMonth,a.selectedMonth=a.currentMonth,a.drawYear=a.currentYear,a.selectedYear=a.currentYear):(e=new Date,a.selectedDay=e.getDate(),a.drawMonth=e.getMonth(),a.selectedMonth=a.drawMonth,a.drawYear=e.getFullYear(),a.selectedYear=a.drawYear),this._notifyChange(a),this._adjustDate(t)},_selectMonthYear:function(t,e,a){var t=M(t),i=this._getInst(t[0]);i["selected"+("M"===a?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),i["draw"+("M"===a?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(t)},_selectDay:function(t,e,a,i){var s=M(t);M(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=M("a",i).html(),s.currentDay=s.selectedDay,s.selectedMonth=e,s.currentMonth=e,s.selectedYear=a,s.currentYear=a,this._selectDate(t,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(t){t=M(t);this._selectDate(t,"")},_selectDate:function(t,e){var a,t=M(t),t=this._getInst(t[0]);e=null!==e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(a=this._get(t,"onSelect"))?a.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,a,i=this._get(t,"altField");i&&(a=this._get(t,"altFormat")||this._get(t,"dateFormat"),e=this._getDate(t),a=this.formatDate(a,e,this._getFormatConfig(t)),M(i).val(a))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e,t=new Date(t.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(e,s,t){var a,i,n,r,d,c,l,o,u,h,p,m,_,g=0,f=-1,k=-1,D=-1,v=-1,y=!1;if(null===e||null===s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(n="string"!=typeof(n=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff)?n:(new Date).getFullYear()%100+parseInt(n,10),r=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,d=(t?t.dayNames:null)||this._defaults.dayNames,c=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,l=(t?t.monthNames:null)||this._defaults.monthNames,u=function(t){t=a+1<e.length&&e.charAt(a+1)===t;return t&&(a+=1),t},h=function(t){var e=u(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,t=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=s.substring(g).match(t);if(e)return g+=e[0].length,parseInt(e[0],10);throw"Missing number at position "+g},p=function(t,e,a){var i=-1,t=M.map(u(t)?a:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(M.each(t,function(t,e){var a=e[1];if(s.substring(g,parseInt(g,10)+a.length).toLowerCase()===a.toLowerCase())return i=e[0],g+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+g},m=function(){if(s.charAt(g)!==e.charAt(a))throw"Unexpected literal at position "+g;g+=1},a=0;a<e.length;a+=1)if(y)"'"!==e.charAt(a)||u("'")?m():y=!1;else switch(e.charAt(a)){case"d":D=h("d");break;case"D":p("D",r,d);break;case"o":v=h("o");break;case"m":k=h("m");break;case"M":k=p("M",c,l);break;case"y":f=h("y");break;case"@":f=(o=new Date(h("@"))).getFullYear(),k=o.getMonth()+1,D=o.getDate();break;case"!":f=(o=new Date((h("!")-this._ticksTo1970)/1e4)).getFullYear(),k=o.getMonth()+1,D=o.getDate();break;case"'":u("'")?m():y=!0;break;default:m()}if(g<s.length&&(t=s.substring(g),!/^\s+/.test(t)))throw"Extra/unparsed characters found in date: "+t;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=n?0:-100)),-1<v)for(k=1,D=v,_=!0;D<=(i=this._getDaysInMonth(f,k-1))?_=!1:(k+=1,D-=i),_;);if((o=this._daylightSavingAdjust(new Date(f,k-1,D))).getFullYear()!==f||o.getMonth()+1!==k||o.getDate()!==D)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,a){function i(t,e,a){var i=""+e;if(o(t))for(;i.length<a;)i="0"+i;return i}function s(t,e,a,i){return(o(t)?i:a)[e]}var n,r=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,d=(a?a.dayNames:null)||this._defaults.dayNames,c=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,l=(a?a.monthNames:null)||this._defaults.monthNames,o=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&(n+=1),t},u="",h=!1;if(!t)return"";if(t)for(n=0;n<e.length;n+=1)if(h)"'"!==e.charAt(n)||o("'")?u+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":u+=i("d",t.getDate(),2);break;case"D":u+=s("D",t.getDay(),r,d);break;case"o":u+=i("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=i("m",t.getMonth()+1,2);break;case"M":u+=s("M",t.getMonth(),c,l);break;case"y":u+=o("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":o("'")?u+="'":h=!0;break;default:u+=e.charAt(n)}return u},_possibleChars:function(e){for(var t="",a=!1,i=function(t){t=s+1<e.length&&e.charAt(s+1)===t;return t&&(s+=1),t},s=0;s<e.length;s+=1)if(a)"'"!==e.charAt(s)||i("'")?t+=e.charAt(s):a=!1;else switch(e.charAt(s)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":i("'")?t+="'":a=!0;break;default:t+=e.charAt(s)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){var a,i,s,n,r;if(t.input.val()!==t.lastVal){a=this._get(t,"dateFormat"),i=t.input?t.input.val():null,n=s=this._getDefaultDate(t),r=this._getFormatConfig(t),t.lastVal=i;try{n=this.parseDate(a,i,r)||s}catch(t){i=e?"":i}t.selectedDay=n.getDate(),t.selectedMonth=n.getMonth(),t.drawMonth=t.selectedMonth,t.selectedYear=n.getFullYear(),t.drawYear=t.selectedYear,t.currentDay=i?n.getDate():0,t.currentMonth=i?n.getMonth():0,t.currentYear=i?n.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(d,t,e){var a,i=null===t||""===t?e:"string"==typeof t?function(t){var e,a,i,s,n,r;try{return M.tm_datepicker.parseDate(M.tm_datepicker._get(d,"dateFormat"),t,M.tm_datepicker._getFormatConfig(d))}catch(t){}for(a=(e=(t.toLowerCase().match(/^c/)?M.tm_datepicker._getDate(d):null)||new Date).getFullYear(),i=e.getMonth(),s=e.getDate(),r=(n=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g).exec(t);r;){switch(r[2]||"d"){case"d":case"D":s+=parseInt(r[1],10);break;case"w":case"W":s+=7*parseInt(r[1],10);break;case"m":case"M":i+=parseInt(r[1],10),s=Math.min(s,M.tm_datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(r[1],10),s=Math.min(s,M.tm_datepicker._getDaysInMonth(a,i))}r=n.exec(t)}return new Date(a,i,s)}(t):"number"==typeof t?Number.isFinite(t)?(i=t,(a=new Date).setDate(a.getDate()+i),a):e:new Date(t.getTime());return(i=i&&"Invalid Date"===i.toString()?e:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,a){var i=!e,s=t.selectedMonth,n=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.currentDay=e.getDate(),t.selectedDay=t.currentDay,t.currentMonth=e.getMonth(),t.drawMonth=t.currentMonth,t.selectedMonth=t.currentMonth,t.currentYear=e.getFullYear(),t.drawYear=t.currentYear,t.selectedYear=t.currentYear,s===t.selectedMonth&&n===t.selectedYear||a||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prevM:function(){M.tm_datepicker._adjustDate(a,-1,"M")},nextM:function(){M.tm_datepicker._adjustDate(a,1,"M")},prevY:function(){M.tm_datepicker._adjustDate(a,-1,"Y")},nextY:function(){M.tm_datepicker._adjustDate(a,1,"Y")},prev:function(){M.tm_datepicker._adjustDate(a,-e,"M")},next:function(){M.tm_datepicker._adjustDate(a,+e,"M")},hide:function(){M.tm_datepicker._hideDatepicker()},today:function(){},selectDay:function(){return M.tm_datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return M.tm_datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return M.tm_datepicker._selectMonthYear(a,this,"Y"),!1}};return M(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")]),null})},_tm_canAdjustMonth:function(t,e,a,i){a=this._daylightSavingAdjust(new Date(a,i+e,1));return e<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_generateHTML:function(t){var e,a,i,s,n,O,R,r,d,c,L,l,o,u,h,p,m,_,g,f,W,E,k,H,D,P,U,v,y,M,z,B,b,w,I=new Date,J=this._daylightSavingAdjust(new Date(I.getFullYear(),I.getMonth(),I.getDate())),C=this._get(t,"isRTL"),I=this._get(t,"showButtonPanel"),x=this._get(t,"hideIfNoPrevNext"),Y=this._get(t,"navigationAsDateFormat"),F=this._getNumberOfMonths(t),S=this._get(t,"showCurrentAtPos"),N=this._get(t,"stepMonths"),V=1!==F[0]||1!==F[1],q=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),A=this._getMinMaxDate(t,"min"),T=this._getMinMaxDate(t,"max"),j=t.drawMonth-S,K=t.drawYear;if(j<0&&(j+=12,--K),T)for(e=this._daylightSavingAdjust(new Date(T.getFullYear(),T.getMonth()-F[0]*F[1]+1,T.getDate())),e=A&&e<A?A:e;this._daylightSavingAdjust(new Date(K,j,1))>e;)--j<0&&(j=11,--K);for(t.drawMonth=j,t.drawYear=K,S=this._get(t,"prevText"),S=Y?this.formatDate(S,this._daylightSavingAdjust(new Date(K,j-N,1)),this._getFormatConfig(t)):S,a=this._canAdjustMonth(t,-1,K,j)?"<a class='ui-tm-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+S+"'><span class='ui-icon ui-icon-circle-triangle-"+(C?"e":"w")+"'>"+S+"</span></a>":x?"":"<a class='ui-tm-datepicker-prev ui-corner-all ui-state-disabled' title='"+S+"'><span class='ui-icon ui-icon-circle-triangle-"+(C?"e":"w")+"'>"+S+"</span></a>",b=this._get(t,"nextText"),b=Y?this.formatDate(b,this._daylightSavingAdjust(new Date(K,j+N,1)),this._getFormatConfig(t)):b,i=this._canAdjustMonth(t,1,K,j)?"<a class='ui-tm-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+b+"'><span class='ui-icon ui-icon-circle-triangle-"+(C?"w":"e")+"'>"+b+"</span></a>":x?"":"<a class='ui-tm-datepicker-next ui-corner-all ui-state-disabled' title='"+b+"'><span class='ui-icon ui-icon-circle-triangle-"+(C?"w":"e")+"'>"+b+"</span></a>",N=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?q:J,N=Y?this.formatDate(N,r,this._getFormatConfig(t)):N,Y=t.inline?"":"<div class='tm-ui-dp-btn-wrap tm-ui-dp-close'><div role='button' class='tm-ui-dp-btn ui-tm-datepicker-close' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</div></div>",I=I?"<div class='tm-ui-dp-buttonpane'>"+(C?Y:"")+(this._isInRange(t,r)?"<div class='tm-ui-dp-btn-wrap tm-ui-dp-current'><div role='button' class='tm-ui-dp-btn ui-tm-datepicker-current' data-handler='today' data-event='click'>"+N+"</div></div>":"")+(C?"":Y)+"</div>":"",s=parseInt(this._get(t,"firstDay"),10),s=isNaN(s)?0:s,n=this._get(t,"showWeek"),O=this._get(t,"dayNames"),R=this._get(t,"dayNamesMin"),r=this._get(t,"monthNames"),d=this._get(t,"beforeShowDay"),c=this._get(t,"showOtherMonths"),L=this._get(t,"selectOtherMonths"),l=this._getDefaultDate(t),o="",Y='<div class="tm-ui-dp-button-prev tm-ui-dp-button"><div '+((N=this._tm_canAdjustMonth(t,-1,K,j))?'data-handler="prevM" data-event="click" ':"")+'aria-label="'+S+'" class="'+(N?"":"tm-ui-dp-button-disabled ")+'tm-ui-dp-button-arrow tcfa tcfa-angle-left" tabindex="0" role="button"></div></div>',N='<div class="tm-ui-dp-button-next tm-ui-dp-button"><div '+((N=this._tm_canAdjustMonth(t,1,K,j))?'data-handler="nextM" data-event="click" ':"")+'aria-label="'+b+'" class="'+(N?"":"tm-ui-dp-button-disabled ")+'tm-ui-dp-button-arrow tcfa tcfa-angle-right" tabindex="0" role="button"></div></div>',S='<div class="tm-ui-dp-button-prev tm-ui-dp-button"><div '+((w=this._tm_canAdjustMonth(t,-12,K,j))?'data-handler="prevY" data-event="click" ':"")+'aria-label="'+S+'" class="'+(w?"":"tm-ui-dp-button-disabled ")+'tm-ui-dp-button-arrow tcfa tcfa-angle-left" tabindex="0" role="button"></div></div>',b='<div class="tm-ui-dp-button-next tm-ui-dp-button"><div '+((w=this._tm_canAdjustMonth(t,12,K,j))?'data-handler="nextY" data-event="click" ':"")+'aria-label="'+b+'" class="'+(w?"":"tm-ui-dp-button-disabled ")+'tm-ui-dp-button-arrow tcfa tcfa-angle-right" tabindex="0" role="button"></div></div>',z=x?"":'<div class="tm-ui-dp-title-button">'+(C?N:Y)+'<span aria-label="'+r[j]+'" role="button" class="tm-ui-dp-month">'+r[j]+"</span>"+(C?Y:N)+"</div>",B=x?"":'<div class="tm-ui-dp-title-button">'+(C?b:S)+'<span class="tm-ui-dp-year" role="button" aria-label="'+K+'">'+K+"</span>"+(C?S:b)+"</div>",o+="<div class='tm-ui-dp-wrap'><div class='tm-ui-dp-overlay'></div><div class='tm-ui-dp'><div class='tm-ui-dp-container'><div class='tm-ui-dp-inner-container'><div class='tm-ui-dp-ui'><div class='tm-ui-dp-ui-inner'><div class='tm-ui-dp-main-wrap'><div class='tm-ui-dp-main'>",h=0;h<F[0];h+=1){for(p="",this.maxRows=4,m=0;m<F[1];m+=1){if(_=this._daylightSavingAdjust(new Date(K,j,t.selectedDay)),g=" ui-corner-all",f="",V){if(f+="<div class='ui-tm-datepicker-group",1<F[1])switch(m){case 0:f+=" ui-tm-datepicker-group-first",g=" ui-corner-"+(C?"right":"left");break;case F[1]-1:f+=" ui-tm-datepicker-group-last",g=" ui-corner-"+(C?"left":"right");break;default:f+=" ui-tm-datepicker-group-middle",g=""}f+="'>"}for(f=(f=f+("<div class='tm-ui-dp-header ui-tm-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===h?C?i:a:"")+(/all|right/.test(g)&&0===h?C?a:i:"")+'<div class="ui-tm-datepicker-title tm-ui-dp-title">'+(/all|left/.test(g)&&0===h?C?B+z:z+B:"")+"</div></div>")+"<div class='tm-ui-dp-main-content'>")+"<div class='tm-ui-dp-main-header-wrap'><div class='tm-ui-dp-main-header'>"+"<table class='ui-tm-datepicker-calendar'><tbody><tr>",W=n?"<th class='ui-tm-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",u=0;u<7;u+=1)W+="<th scope='col'"+(5<=(u+s+6)%7?" class='ui-tm-datepicker-week-end'":"")+"><span title='"+O[E=(u+s)%7]+"'>"+R[E]+"</span></th>";for(f=(f+=W+"</tr></tbody></table>")+"</div></div>"+"<div class='tm-ui-dp-main-table'>",k=this._getDaysInMonth(K,j),K===t.selectedYear&&j===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,k)),k=(this._getFirstDayOfMonth(K,j)-s+7)%7,H=V&&6<this.maxRows?this.maxRows:6,this.maxRows=H,D=this._daylightSavingAdjust(new Date(K,j,1-k)),P=0;P<H;P+=1){for(f+="<div class='tm-ui-dp-main-row'>",U=n?"<div class='ui-tm-datepicker-week-col'>"+this._get(t,"calculateWeek")(D)+"</div>":"",u=0;u<7;u+=1)v=d?d.apply(t.input?t.input[0]:null,[D]):[!0,""],M=(y=D.getMonth()!==j)&&!L||!v[0]||A&&D<A||T&&T<D,U+="<div class='tm-ui-dp-main-cell "+(5<=(u+s+6)%7?" ui-tm-datepicker-week-end":"")+(y?" ui-tm-datepicker-other-month":"")+(D.getTime()===_.getTime()&&j===t.selectedMonth&&t._keyEvent||l.getTime()===D.getTime()&&l.getTime()===_.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(y&&!c?"":" "+v[1]+(D.getTime()===q.getTime()?" "+this._currentClass:"")+(D.getTime()===J.getTime()?" ui-tm-datepicker-today":""))+"'"+(y&&!c||!v[2]?"":" title='"+v[2].replace(/'/g,"&#39;")+"'")+(M?"":" data-handler='selectDay' data-event='click' data-month='"+D.getMonth()+"' data-year='"+D.getFullYear()+"'")+"><div class='tm-ui-dp-main-cell-inner'><div class='tm-ui-dp-main-cell-content'>"+(y&&!c?"&#xa0;":M?"<span class='ui-state-default'>"+D.getDate()+"</span>":"<a class='ui-state-default"+(D.getTime()===J.getTime()?" ui-state-highlight":"")+(D.getTime()===q.getTime()?" ui-state-active":"")+(y?" ui-priority-secondary":"")+"' href='#'>"+D.getDate()+"</a>")+"</div></div></div>",D.setDate(D.getDate()+1),D=this._daylightSavingAdjust(D);f+=U+"</div>"}11<(j+=1)&&(j=0,K+=1),p+=f=(f+="</div>")+("</div>"+(V?"</div>"+(0<F[0]&&m===F[1]-1?"<div class='ui-tm-datepicker-row-break'></div>":""):""))}o+=p}return o=(o+="</div></div></div></div></div>")+I+"</div></div></div>",t._keyEvent=!1,o},_generateMonthYearHeader:function(t,e,a,i,s,n,r,d){var c,l,o,u,h,p,m,_=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),f=this._get(t,"showMonthAfterYear"),k="<div class='ui-tm-datepicker-title'>",D="";if(n||!_)D+="<span class='ui-tm-datepicker-month'>"+r[e]+"</span>";else{for(c=i&&i.getFullYear()===a,l=s&&s.getFullYear()===a,D+="<select class='ui-tm-datepicker-month' data-handler='selectMonth' data-event='change'>",o=0;o<12;o+=1)(!c||o>=i.getMonth())&&(!l||o<=s.getMonth())&&(D+="<option value='"+o+"'"+(o===e?" selected='selected'":"")+">"+d[o]+"</option>");D+="</select>"}if(f||(k+=D+(!n&&_&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",n||!g)k+="<span class='ui-tm-datepicker-year'>"+a+"</span>";else{for(r=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),p=(h=function(t){t=t.match(/c[+-].*/)?a+parseInt(t.substring(1),10):t.match(/[+-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(r[0]),m=Math.max(p,h(r[1]||"")),p=i?Math.max(p,i.getFullYear()):p,m=s?Math.min(m,s.getFullYear()):m,t.yearshtml+="<select class='ui-tm-datepicker-year' data-handler='selectYear' data-event='change'>";p<=m;p+=1)t.yearshtml+="<option value='"+p+"'"+(p===a?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",k+=t.yearshtml,t.yearshtml=null}return k+=this._get(t,"yearSuffix"),f&&(k+=(!n&&_&&g?"":"&#xa0;")+D),k+="</div>"},_adjustInstDate:function(t,e,a){var i=t.selectedYear+("Y"===a?e:0),s=t.selectedMonth+("M"===a?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(i,s))+("D"===a?e:0),i=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,s,e)));t.selectedDay=i.getDate(),t.selectedMonth=i.getMonth(),t.drawMonth=t.selectedMonth,t.selectedYear=i.getFullYear(),t.drawYear=t.selectedYear,"M"!==a&&"Y"!==a||this._notifyChange(t)},_restrictMinMax:function(t,e){var a=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),a=a&&e<a?a:e;return t&&t<a?t:a},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null===t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,a,i){var s=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(a,i+(e<0?e:s[0]*s[1]),1));return e<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var a,i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,r=null,t=this._get(t,"yearRange");return t&&(t=t.split(":"),a=(new Date).getFullYear(),n=parseInt(t[0],10),r=parseInt(t[1],10),t[0].match(/[+-].*/)&&(n+=a),t[1].match(/[+-].*/))&&(r+=a),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,a,i){return e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear),i=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,a,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay)),this.formatDate(this._get(t,"dateFormat"),i,this._getFormatConfig(t))}}),M.fn.tm_datepicker=function(t){var e;return this.length?(M.tm_datepicker.initialized||(M(document).on("mousedown",M.tm_datepicker._checkExternalClick),M.tm_datepicker.initialized=!0),0===M("#"+M.tm_datepicker._mainDivId).length&&M("body").append(M.tm_datepicker.dpDiv),e=Array.prototype.slice.call(arguments,1),"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?M.tm_datepicker["_"+t+"Datepicker"].apply(M.tm_datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?M.tm_datepicker["_"+t+"Datepicker"].apply(M.tm_datepicker,[this].concat(e)):M.tm_datepicker._attachDatepicker(this,t)})):this},M.tm_datepicker=new t,M.tm_datepicker.initialized=!1,M.tm_datepicker.uuid=(new Date).getTime(),M.tm_datepicker.version="1.11.4")});
!function(e){"use strict";"function"==typeof window.define&&window.define.amd?window.define(["jquery","jquery-ui"],e):e(window.jQuery)}(function(k){"use strict";function n(e,t){for(var i in k.extend(e,t),t)null!==t[i]&&void 0!==t[i]||(e[i]=t[i]);return e}function u(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function h(e){function t(e,t){return-1!==e.indexOf(t)}var i=e.replace(/'.*?'/g,"").toLowerCase();return{hour:t(i,"h"),minute:t(i,"m"),second:t(i,"s"),millisec:t(i,"l"),microsec:t(i,"c"),timezone:t(i,"z"),ampm:t(i,"t")&&t(e,"h"),iso8601:t(e,"Z")}}function r(e){return 0===(e%=12)&&(e=12),String(e)}function l(e,t){var i=o(t,"separator"),t=o(t,"timeFormat").split(i).length,s=e.split(i),a=s.length;return 1<a?{dateString:s.splice(0,a-t).join(i),timeString:s.splice(0,t).join(i)}:{dateString:e,timeString:""}}function m(e,t,i,s,a){if(i=l(i,a),e=k.tm_datepicker._base_parseDate(e,i.dateString,s),""===i.timeString)return{date:e};if(s=k.tm_datepicker.parseTime(t,i.timeString,a))return{date:e,timeObj:s};throw"Wrong time format"}function T(e,t){e&&e.timezone_select&&(t=t||new Date,e.timezone_select.val(-t.getTimezoneOffset()))}function _(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},k.extend(this._defaults,this.regional[""])}var o=function(e,t){return(e&&e[t]?e:k.tm_timepicker._defaults)[t]};k.ui.tm_timepicker=k.ui.tm_timepicker||{},k.ui.tm_timepicker.version||(k.extend(k.ui,{tm_timepicker:{version:"1.6.3"}}),k.extend(_.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return n(this._defaults,e||{}),this},_newInst:function(s,e){var t,i,a,n,r,l,m,o=new _,c={},u={},d=0;for(a in this._defaults)Object.prototype.hasOwnProperty.call(this._defaults,a)&&(n=s.attr("data-"+a))&&(c[a]=n);for(i in t={beforeShow:function(e,t){if("function"==typeof o._defaults.evnts.beforeShow)return o._defaults.evnts.beforeShow.call(s[0],e,t,o)},onChangeMonthYear:function(e,t,i){"function"==typeof o._defaults.evnts.onChangeMonthYear&&o._defaults.evnts.onChangeMonthYear.call(s[0],e,t,i,o)},onClose:function(e,t){!0===o.timeDefined&&""!==s.val()&&o._updateDateTime(t),"function"==typeof o._defaults.evnts.onClose&&o._defaults.evnts.onClose.call(s[0],e,t,o)}})Object.prototype.hasOwnProperty.call(t,i)&&(u[i]=e[i]||this._defaults[i]||null);if(o._defaults=k.extend({},this._defaults,c,e,t,{evnts:u,tm_timepicker:o}),o.amNames=k.map(o._defaults.amNames,function(e){return e.toUpperCase()}),o.pmNames=k.map(o._defaults.pmNames,function(e){return e.toUpperCase()}),o.support=h(o._defaults.timeFormat+(o._defaults.pickerTimeFormat||"")+(o._defaults.altTimeFormat||"")),"string"==typeof o._defaults.controlType?("slider"===o._defaults.controlType&&void 0===k.ui.slider&&(o._defaults.controlType="select"),o.control=o._controls[o._defaults.controlType]):o.control=o._defaults.controlType,r=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840],0<(l=(r=null!==o._defaults.timezoneList?o._defaults.timezoneList:r).length)&&"object"!=typeof r[0])for(;d<l;d+=1)m=r[d],r[d]={value:m,label:k.tm_timepicker.timezoneOffsetString(m,o.support.iso8601)};return o._defaults.timezoneList=r,o.timezone=null!==o._defaults.timezone?k.tm_timepicker.timezoneOffsetNumber(o._defaults.timezone):-1*(new Date).getTimezoneOffset(),o.hour=o._defaults.hour<o._defaults.hourMin?o._defaults.hourMin:o._defaults.hour>o._defaults.hourMax?o._defaults.hourMax:o._defaults.hour,o.minute=o._defaults.minute<o._defaults.minuteMin?o._defaults.minuteMin:o._defaults.minute>o._defaults.minuteMax?o._defaults.minuteMax:o._defaults.minute,o.second=o._defaults.second<o._defaults.secondMin?o._defaults.secondMin:o._defaults.second>o._defaults.secondMax?o._defaults.secondMax:o._defaults.second,o.millisec=o._defaults.millisec<o._defaults.millisecMin?o._defaults.millisecMin:o._defaults.millisec>o._defaults.millisecMax?o._defaults.millisecMax:o._defaults.millisec,o.microsec=o._defaults.microsec<o._defaults.microsecMin?o._defaults.microsecMin:o._defaults.microsec>o._defaults.microsecMax?o._defaults.microsecMax:o._defaults.microsec,o.ampm="",o.$input=s,o._defaults.altField&&(o.$altInput=k(o._defaults.altField),!0===o._defaults.altRedirectFocus)&&o.$altInput.css({cursor:"pointer"}).on("focus",function(){s.trigger("focus")}),0!==o._defaults.minDate&&0!==o._defaults.minDateTime||(o._defaults.minDate=new Date),0!==o._defaults.maxDate&&0!==o._defaults.maxDateTime||(o._defaults.maxDate=new Date),void 0!==o._defaults.minDate&&o._defaults.minDate instanceof Date&&(o._defaults.minDateTime=new Date(o._defaults.minDate.getTime())),void 0!==o._defaults.minDateTime&&o._defaults.minDateTime instanceof Date&&(o._defaults.minDate=new Date(o._defaults.minDateTime.getTime())),void 0!==o._defaults.maxDate&&o._defaults.maxDate instanceof Date&&(o._defaults.maxDateTime=new Date(o._defaults.maxDate.getTime())),void 0!==o._defaults.maxDateTime&&o._defaults.maxDateTime instanceof Date&&(o._defaults.maxDate=new Date(o._defaults.maxDateTime.getTime())),o.$input.on("focus",function(){o._onFocus()}),o.$input.next(".ui-tm-timepicker-trigger").on("click",function(){return o._onFocus(),!1}),o},_addTimePicker:function(e){var t=k.epoAPI.util.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(t,i){var e;if(this.inst||(this.inst=k.tm_datepicker._getInst(this.$input[0])),i||!this._defaults.timeOnly){i=k.tm_datepicker._get(this.inst,"dateFormat");try{if(!(e=m(i,this._defaults.timeFormat,t,k.tm_datepicker._getFormatConfig(this.inst),this._defaults)).timeObj)return!1;k.extend(this,e.timeObj)}catch(e){return k.tm_timepicker.log("Error parsing the date/time string: "+e+"\ndate/time string="+t+"\ntimeFormat="+this._defaults.timeFormat+"\ndateFormat="+i),!1}}else{if(!(e=k.tm_datepicker.parseTime(this._defaults.timeFormat,t,this._defaults)))return!1;k.extend(this,e)}return!0},_afterInject:function(){var e=this.inst.settings;"function"==typeof e.afterInject&&e.afterInject.call(this)},_ui_tpicker_onclick:function(e){var t=k(e.target),i=t.html(),s=parseInt(i.replace(/[^0-9]/g),10),i=i.replace(/[^apm]/gi),t=t.data("for");"hour"===t&&(-1!==i.indexOf("p")&&s<12?s+=12:-1!==i.indexOf("a")&&12===s&&(s=0)),e.data.tp_inst.control.value(e.data.tp_inst,e.data.tp_inst[t+"_slider"],e.data.litem,s),e.data.tp_inst._onTimeChange(),e.data.tp_inst._onSelectHandler()},_injectTimePicker:function(){var e,t,i,s,a,r,n,l,m,o=this.inst.dpDiv,c=this.inst.settings,u=this,d="",h="",_=null,f={},p={},g=0,M=0;if(0===o.find("div.ui-tm-timepicker-div").length&&c.showTimepicker){for(t=" ui_tpicker_unit_hide",i='<div class="ui-tm-timepicker-div'+(c.isRTL?" ui-tm-timepicker-rtl":"")+(c.oneLine&&"select"===c.controlType?" ui-tm-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(c.showTime?"":t)+'">'+c.timeText+'</dt><dd class="ui_tpicker_time '+(c.showTime?"":t)+'"><input class="ui_tpicker_time_input" '+(c.timeInput?"":"disabled")+"></dd>",g=0,M=this.units.length;g<M;g+=1){if(_=null!==c["show"+(h=(d=this.units[g]).substring(0,1).toUpperCase()+d.substring(1))]?c["show"+h]:this.support[d],f[d]=parseInt(c[d+"Max"]-(c[d+"Max"]-c[d+"Min"])%c["step"+h],10),p[d]=0,i+='<dt class="ui_tpicker_'+d+"_label"+(_?"":t)+'">'+c[d+"Text"]+'</dt><dd class="ui_tpicker_'+d+(_?"":t)+'"><div class="ui_tpicker_'+d+"_slider"+(_?"":t)+'"></div>',_&&0<c[d+"Grid"]){if(i+='<div><table class="ui-tpicker-grid-label"><tr>',"hour"===d)for(s=c[d+"Min"];s<=f[d];s+=parseInt(c[d+"Grid"],10))p[d]+=1,i+='<td data-for="'+d+'">'+k.tm_datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:s},c)+"</td>";else for(a=c[d+"Min"];a<=f[d];a+=parseInt(c[d+"Grid"],10))p[d]+=1,i+='<td data-for="'+d+'">'+(a<10?"0":"")+a+"</td>";i+="</tr></table></div>"}i+="</dd>"}for(i+='<dt class="ui_tpicker_timezone_label'+((n=null!==c.showTimezone?c.showTimezone:this.support.timezone)?"":t)+'">'+c.timezoneText+"</dt>",r=k(i=i+('<dd class="ui_tpicker_timezone'+(n?"":t)+'"></dd>')+"</dl></div>"),!0===c.timeOnly&&(r.prepend('<div class="tm-ui-widget-header"><div class="tm-ui-tp-title">'+c.timeOnlyTitle+"</div></div>"),o.find(".tm-ui-dp-inner-container").hide()),g=0,M=u.units.length;g<M;g+=1)_=null!==c["show"+(h=(d=u.units[g]).substring(0,1).toUpperCase()+d.substring(1))]?c["show"+h]:this.support[d],u[d+"_slider"]=u.control.create(u,r.find(".ui_tpicker_"+d+"_slider"),d,u[d],c[d+"Min"],f[d],c["step"+h]),_&&0<c[d+"Grid"]&&(e=100*p[d]*c[d+"Grid"]/(f[d]-c[d+"Min"]),r.find(".ui_tpicker_"+d+" table").css({width:e+"%",marginLeft:c.isRTL?"0":e/(-2*p[d])+"%",marginRight:c.isRTL?e/(-2*p[d])+"%":"0",borderCollapse:"collapse"}).find("td").on("click",{that:this,tp_inst:u,litem:d},this._ui_tpicker_onclick).css({cursor:"pointer",width:100/p[d]+"%",textAlign:"center",overflow:"hidden"}));this.timezone_select=r.find(".ui_tpicker_timezone").append("<select></select>").find("select"),k.fn.append.apply(this.timezone_select,k.map(c.timezoneList,function(e){return k("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),void 0!==this.timezone&&null!==this.timezone&&""!==this.timezone?-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset()===this.timezone?T(u):this.timezone_select.val(this.timezone):void 0!==this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(c.timezone):T(u),this.timezone_select.on("change",function(){u._onTimeChange(),u._onSelectHandler(),u._afterInject()}),(n=o.find(".tm-ui-dp-buttonpane")).length?n.before(r):o.append(r),this.$timeObj=r.find(".ui_tpicker_time_input"),this.$timeObj.on("change",function(){var e=u.inst.settings.timeFormat,e=k.tm_datepicker.parseTime(e,this.value),t=new Date;e?(t.setHours(e.hour),t.setMinutes(e.minute),t.setSeconds(e.second),k.datepicker._setTime(u.inst,t)):(this.value=u.formattedTime,this.trigger("blur"))}),null!==this.inst&&(n=this.timeDefined,this._onTimeChange(),this.timeDefined=n),this._defaults.addSliderAccess&&(l=this._defaults.sliderAccessArgs,m=this._defaults.isRTL,l.isRTL=m,setTimeout(function(){var n;0===r.find(".ui-slider-access").length&&(r.find(".ui-slider:visible").sliderAccess(l),n=r.find(".ui-slider-access:eq(0)").outerWidth(!0))&&r.find("table:visible").each(function(){var e=k(this),t=e.outerWidth(),i=e.css(m?"marginRight":"marginLeft").toString().replace("%",""),s=t-n,a={width:s,marginRight:0,marginLeft:0};a[m?"marginRight":"marginLeft"]=i*s/t+"%",e.css(a)})},10)),u._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i,s,a=this._defaults,n=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);this._defaults.showTimepicker&&(null!==k.tm_datepicker._get(e,"minDateTime")&&void 0!==k.tm_datepicker._get(e,"minDateTime")&&n&&(s=k.tm_datepicker._get(e,"minDateTime"),i=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0),null!==this.hourMinOriginal&&null!==this.minuteMinOriginal&&null!==this.secondMinOriginal&&null!==this.millisecMinOriginal&&null!==this.microsecMinOriginal||(this.hourMinOriginal=a.hourMin,this.minuteMinOriginal=a.minuteMin,this.secondMinOriginal=a.secondMin,this.millisecMinOriginal=a.millisecMin,this.microsecMinOriginal=a.microsecMin),e.settings.timeOnly||i.getTime()===n.getTime()?(this._defaults.hourMin=s.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=s.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=s.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=s.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=s.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)),null!==k.tm_datepicker._get(e,"maxDateTime")&&void 0!==k.tm_datepicker._get(e,"maxDateTime")&&n&&(i=k.tm_datepicker._get(e,"maxDateTime"),s=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0,0),null!==this.hourMaxOriginal&&null!==this.minuteMaxOriginal&&null!==this.secondMaxOriginal&&null!==this.millisecMaxOriginal||(this.hourMaxOriginal=a.hourMax,this.minuteMaxOriginal=a.minuteMax,this.secondMaxOriginal=a.secondMax,this.millisecMaxOriginal=a.millisecMax,this.microsecMaxOriginal=a.microsecMax),e.settings.timeOnly||s.getTime()===n.getTime()?(this._defaults.hourMax=i.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=i.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=i.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=i.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=i.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)),null!==e.settings.minTime&&(a=new Date("01/01/1970 "+e.settings.minTime),parseFloat(e.settings.minTime).toString()===e.settings.minTime&&(a=new Date(Date.now()+parseFloat(e.settings.minTime))),this.hour<a.getHours()?(this._defaults.hourMin=a.getHours(),this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute=this._defaults.minuteMin):this.hour===a.getHours()&&this.minute<a.getMinutes()?(this._defaults.minuteMin=a.getMinutes(),this.minute=this._defaults.minuteMin):this._defaults.hourMin<a.getHours()?(this._defaults.hourMin=a.getHours(),this._defaults.minuteMin=a.getMinutes()):this._defaults.hourMin===a.getHours()===this.hour&&this._defaults.minuteMin<a.getMinutes()?this._defaults.minuteMin=a.getMinutes():this._defaults.minuteMin=0),null!==e.settings.maxTime&&(s=new Date("01/01/1970 "+e.settings.maxTime),this.hour>s.getHours()?(this._defaults.hourMax=s.getHours(),this.hour=this._defaults.hourMax,this._defaults.minuteMax=s.getMinutes(),this.minute=this._defaults.minuteMax):this.hour===s.getHours()&&this.minute>s.getMinutes()?(this._defaults.minuteMax=s.getMinutes(),this.minute=this._defaults.minuteMax):this._defaults.hourMax>s.getHours()?(this._defaults.hourMax=s.getHours(),this._defaults.minuteMax=s.getMinutes()):this._defaults.hourMax===s.getHours()===this.hour&&this._defaults.minuteMax>s.getMinutes()?this._defaults.minuteMax=s.getMinutes():this._defaults.minuteMax=59),void 0!==t)&&!0===t&&(n=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),i=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),a=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),e=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),s=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10),this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:n,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:i,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:a,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:e,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider)&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:s,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))},_onTimeChange:function(){var e,t,i=!!this.hour_slider&&this.control.value(this,this.hour_slider,"hour"),s=!!this.minute_slider&&this.control.value(this,this.minute_slider,"minute"),a=!!this.second_slider&&this.control.value(this,this.second_slider,"second"),n=!!this.millisec_slider&&this.control.value(this,this.millisec_slider,"millisec"),r=!!this.microsec_slider&&this.control.value(this,this.microsec_slider,"microsec"),l=!!this.timezone_select&&this.timezone_select.val(),m=this._defaults,o=m.pickerTimeFormat||m.timeFormat,c=m.pickerTimeSuffix||m.timeSuffix;this._defaults.showTimepicker&&("object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),"object"==typeof r&&(r=!1),"object"==typeof l&&(l=!1),!1!==(i="object"==typeof i?!1:i)&&(i=parseInt(i,10)),!1!==s&&(s=parseInt(s,10)),!1!==a&&(a=parseInt(a,10)),!1!==n&&(n=parseInt(n,10)),!1!==r&&(r=parseInt(r,10)),!1!==l&&(l=l.toString()),e=m[i<12?"amNames":"pmNames"][0],(t=i!==parseInt(this.hour,10)||s!==parseInt(this.minute,10)||a!==parseInt(this.second,10)||n!==parseInt(this.millisec,10)||r!==parseInt(this.microsec,10)||0<this.ampm.length&&i<12!=(-1!==k.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&l!==this.timezone.toString())&&(!1!==i&&(this.hour=i),!1!==s&&(this.minute=s),!1!==a&&(this.second=a),!1!==n&&(this.millisec=n),!1!==r&&(this.microsec=r),!1!==l&&(this.timezone=l),this.inst||(this.inst=k.tm_datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=e),this.formattedTime=k.tm_datepicker.formatTime(m.timeFormat,this,m),this.$timeObj&&(o===m.timeFormat?this.$timeObj.val(this.formattedTime+c):this.$timeObj.val(k.tm_datepicker.formatTime(o,this,m)+c),this.$timeObj[0].setSelectionRange)&&(i=this.$timeObj[0].selectionStart,s=this.$timeObj[0].selectionEnd,this.$timeObj[0].setSelectionRange(i,s)),this.timeDefined=!0,t)&&this._updateDateTime()},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){var t="",i=0<(e=this.inst||e).currentYear?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=k.tm_datepicker._daylightSavingAdjust(i),s=k.tm_datepicker._get(e,"dateFormat"),a=k.tm_datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=k.tm_datepicker.formatDate(s,null===i?new Date:i,a),s=this.formattedDate,""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),!0===this._defaults.timeOnly&&!1===this._defaults.timeOnlyShowDate?s=this.formattedTime:(!0!==this._defaults.timeOnly&&(this._defaults.alwaysSetTime||n)||!0===this._defaults.timeOnly&&!0===this._defaults.timeOnlyShowDate)&&(s+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=s,this._defaults.showTimepicker?this.$altInput&&!1===this._defaults.timeOnly&&!0===this._defaults.altFieldTimeOnly?(this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate)):this.$altInput?(this.$input.val(s),t="",e=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,n=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix,this._defaults.timeOnly||(t=this._defaults.altFormat?k.tm_datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate)&&(t+=e),null!==this._defaults.altTimeFormat?t+=k.tm_datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+n:t+=this.formattedTime+n,this.$altInput.val(t)):this.$input.val(s):this.$input.val(this.formattedDate),this.$input.trigger("change")},_onFocus:function(){var e,t;if(!this.$input.val()&&this._defaults.defaultValue&&(this.$input.val(this._defaults.defaultValue),e=k.tm_datepicker._getInst(this.$input.get(0)),t=k.tm_datepicker._get(e,"tm_timepicker"))&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{k.tm_datepicker._updateDatepicker(e)}catch(e){k.tm_timepicker.log(e)}},_controls:{slider:{create:function(i,e,s,t,a,n,r){var l=i._defaults.isRTL;return e.prop("slide",null).slider({orientation:"horizontal",value:l?-1*t:t,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(e,t){i.control.value(i,k(this),s,l?-1*t.value:t.value),i._onTimeChange()},stop:function(){i._onSelectHandler()}})},options:function(e,t,i,s,a){var n;return e._defaults.isRTL?"string"==typeof s?"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s):(e=s.min,n=s.max,s.max=null,s.min=null,void 0!==e&&(s.max=-1*e),void 0!==n&&(s.min=-1*n),t.slider(s)):"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-tm-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',m=e._defaults.pickerTimeFormat||e._defaults.timeFormat,o=a;o<=n;o+=r)l=(l+='<option value="'+o+'"'+(o===s?" selected":"")+">")+("hour"===i?k.tm_datepicker.formatTime(k.epoAPI.util.trim(m.replace(/[^ht ]/gi,"")),{hour:o},e._defaults):"millisec"===i||"microsec"===i||10<=o?o:"0"+o.toString())+"</option>";return l+="</select>",t.children("select").remove(),k(l).appendTo(t).on("change",function(){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),0<=n.min?n.min:r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){t=t.children("select");return void 0!==s?t.val(s):t.val()}}}}),k.fn.extend({tm_timepicker:function(e){var t=Array.prototype.slice.call(arguments);return"object"==typeof(e=e||{})&&(t[0]=k.extend(e,{timeOnly:!0})),k(this).each(function(){k.fn.tm_datetimepicker.apply(k(this),t)})},tm_datetimepicker:function(t){var i=arguments;return"string"==typeof(t=t||{})?"getDate"===t||"option"===t&&2===i.length&&"string"==typeof i[1]?k.fn.tm_datepicker.apply(k(this[0]),i):this.each(function(){var e=k(this);e.tm_datepicker.apply(e,i)}):this.each(function(){var e=k(this);e.tm_datepicker(k.tm_timepicker._newInst(e,t)._defaults)})}}),k.tm_datepicker.parseDateTime=function(e,t,i,s,a){e=m(e,t,i,s,a);return e.timeObj&&(t=e.timeObj,e.date.setHours(t.hour,t.minute,t.second,t.millisec),e.date.setMicroseconds(t.microsec)),e.date},k.tm_datepicker.parseTime=function(t,i,s){function a(e,t,n){var i="^"+e.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t,i,s,a=e.length;switch(e.charAt(0).toLowerCase()){case"h":case"m":case"s":return 1===a?"(\\d?\\d)":"(\\d{"+a+"})";case"l":case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return t=n.amNames,i=n.pmNames,s=[],t&&k.merge(s,t),i&&k.merge(s,i),"("+(s=k.map(s,function(e){return e.replace(/[.*+?|()[\]{}\\]/g,"\\$&")})).join("|")+")?";default:return"("+e.replace(/'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+n.timeSuffix+"$",e=function(e){var t,i=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),s={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(i)for(t=0;t<i.length;t+=1)-1===s[i[t].toString().charAt(0)]&&(s[i[t].toString().charAt(0)]=t+1);return s}(e),s="",a={hour:0,minute:0,second:0,millisec:0,microsec:0};return!!(t=t.match(new RegExp(i,"i")))&&(-1!==e.t&&(void 0===t[e.t]||0===t[e.t].length?a.ampm=s="":(s=-1!==k.inArray(t[e.t].toUpperCase(),k.map(n.amNames,function(e){return e.toUpperCase()}))?"AM":"PM",a.ampm=n["AM"===s?"amNames":"pmNames"][0])),-1!==e.h&&("AM"===s&&"12"===t[e.h]?a.hour=0:"PM"===s&&"12"!==t[e.h]?a.hour=parseInt(t[e.h],10)+12:a.hour=Number(t[e.h])),-1!==e.m&&(a.minute=Number(t[e.m])),-1!==e.s&&(a.second=Number(t[e.s])),-1!==e.l&&(a.millisec=Number(t[e.l])),-1!==e.c&&(a.microsec=Number(t[e.c])),-1!==e.z&&void 0!==t[e.z]&&(a.timezone=k.tm_timepicker.timezoneOffsetNumber(t[e.z])),a)}s=n(n({},k.tm_timepicker._defaults),s||{});if("function"==typeof s.parse)return s.parse(t,i,s);if("loose"!==s.parse)return a(t,i,s);var e;try{if(e=new Date("2012-01-01 "+i),isNaN(e.getTime())&&(e=new Date("2012-01-01T"+i),isNaN(e.getTime()))&&(e=new Date("01/01/2012 "+i),isNaN(e.getTime())))throw"Unable to parse time with native Date: "+i;return{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisec:e.getMilliseconds(),microsec:e.getMicroseconds(),timezone:-1*e.getTimezoneOffset()}}catch(e){try{return a(t,i,s)}catch(e){k.tm_timepicker.log("Unable to parse \ntimeString: "+i+"\ntimeFormat: "+t)}}return!1},k.tm_datepicker.formatTime=function(e,t,i){var s,a;return i=i||{},i=k.extend({},k.tm_timepicker._defaults,i),t=k.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t),e=e,s=i.amNames[0],11<(a=parseInt(t.hour,10))&&(s=i.pmNames[0]),e=e.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+a).slice(-2);case"H":return a;case"hh":return("0"+r(a)).slice(-2);case"h":return r(a);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return k.tm_timepicker.timezoneOffsetString((null===t.timezone?i:t).timezone,!1);case"Z":return k.tm_timepicker.timezoneOffsetString((null===t.timezone?i:t).timezone,!0);case"T":return s.charAt(0).toUpperCase();case"TT":return s.toUpperCase();case"t":return s.charAt(0).toLowerCase();case"tt":return s.toLowerCase();default:return e.replace(/'/g,"")}})},k.tm_datepicker._base_selectDate=k.tm_datepicker._selectDate,k.tm_datepicker._selectDate=function(e,t){var i=this._getInst(k(e)[0]),s=this._get(i,"tm_timepicker");s&&i.settings.showTimepicker?(s._limitMinMaxDateTime(i,!0),s=i.inline,i.stay_open=!0,i.inline=!0,this._base_selectDate(e,t),i.inline=s,i.stay_open=!1,this._notifyChange(i),this._updateDatepicker(i)):this._base_selectDate(e,t)},k.tm_datepicker._base_updateDatepicker=k.tm_datepicker._updateDatepicker,k.tm_datepicker._updateDatepicker=function(e){var t=e.input[0];k.tm_datepicker._curInst&&k.tm_datepicker._curInst!==e&&k.tm_datepicker._datepickerShowing&&k.tm_datepicker._lastInput!==t||("boolean"!=typeof e.stay_open||!1===e.stay_open)&&(this._base_updateDatepicker(e),t=this._get(e,"tm_timepicker"))&&t._addTimePicker(e)},k.tm_datepicker._base_doKeyPress=k.tm_datepicker._doKeyPress,k.tm_datepicker._doKeyPress=function(e){var t,i,s=k.tm_datepicker._getInst(e.target),a=k.tm_datepicker._get(s,"tm_timepicker");return a&&k.tm_datepicker._get(s,"constrainInput")?(t=a.support.ampm,i=null!==a._defaults.showTimezone?a._defaults.showTimezone:a.support.timezone,s=k.tm_datepicker._possibleChars(k.tm_datepicker._get(s,"dateFormat")),t=a._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,t?"APM":"").replace(/Tt/g,t?"AaPpMm":"").replace(/tT/g,t?"AaPpMm":"").replace(/T/g,t?"AP":"").replace(/tt/g,t?"apm":"").replace(/t/g,t?"ap":"")+" "+a._defaults.separator+a._defaults.timeSuffix+(i?a._defaults.timezoneList.join(""):"")+a._defaults.amNames.join("")+a._defaults.pmNames.join("")+s,i=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode),e.ctrlKey||i<" "||!s||-1<t.indexOf(i)):k.tm_datepicker._base_doKeyPress(e)},k.tm_datepicker._base_updateAlternate=k.tm_datepicker._updateAlternate,k.tm_datepicker._updateAlternate=function(e){var t,i,s,a,n,r,l,m=this._get(e,"tm_timepicker");m?(t=m._defaults.altField)&&(i=this._getDate(e),s=k.tm_datepicker._getFormatConfig(e),a="",n=m._defaults.altSeparator||m._defaults.separator,r=m._defaults.altTimeSuffix||m._defaults.timeSuffix,l=null!==m._defaults.altTimeFormat?m._defaults.altTimeFormat:m._defaults.timeFormat,a+=k.tm_datepicker.formatTime(l,m,m._defaults)+r,m._defaults.timeOnly||m._defaults.altFieldTimeOnly||null===i||(a=m._defaults.altFormat?k.tm_datepicker.formatDate(m._defaults.altFormat,i,s)+n+a:m.formattedDate+n+a),k(t).val(e.input.val()?a:"")):k.tm_datepicker._base_updateAlternate(e)},k.tm_datepicker._base_doKeyUp=k.tm_datepicker._doKeyUp,k.tm_datepicker._doKeyUp=function(e){var t=k.tm_datepicker._getInst(e.target),i=k.tm_datepicker._get(t,"tm_timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{k.tm_datepicker._updateDatepicker(t)}catch(e){k.tm_timepicker.log(e)}return k.tm_datepicker._base_doKeyUp(e)},k.tm_datepicker._base_gotoToday=k.tm_datepicker._gotoToday,k.tm_datepicker._gotoToday=function(e){var t,i,s=this._getInst(k(e)[0]);this._base_gotoToday(e),(e=this._get(s,"timepicker"))&&(t=k.tm_timepicker.timezoneOffsetNumber(e.timezone),(i=new Date).setMinutes(i.getMinutes()+i.getTimezoneOffset()+parseInt(t,10)),this._setTime(s,i),this._setDate(s,i),e._onSelectHandler())},k.tm_datepicker._disableTimepickerDatepicker=function(e){var t,i=this._getInst(e);i&&(t=this._get(i,"tm_timepicker"),k(e).tm_datepicker("getDate"),t)&&(i.settings.showTimepicker=!1,t._defaults.showTimepicker=!1,t._updateDateTime(i))},k.tm_datepicker._enableTimepickerDatepicker=function(e){var t,i=this._getInst(e);i&&(t=this._get(i,"tm_timepicker"),k(e).tm_datepicker("getDate"),t)&&(i.settings.showTimepicker=!0,t._defaults.showTimepicker=!0,t._addTimePicker(i),t._updateDateTime(i))},k.tm_datepicker._setTime=function(e,t){var i,s=this._get(e,"tm_timepicker");s&&(i=s._defaults,s.hour=t?t.getHours():i.hour,s.minute=t?t.getMinutes():i.minute,s.second=t?t.getSeconds():i.second,s.millisec=t?t.getMilliseconds():i.millisec,s.microsec=t?t.getMicroseconds():i.microsec,s._limitMinMaxDateTime(e,!0),s._onTimeChange(),s._updateDateTime(e))},k.tm_datepicker._setTimeDatepicker=function(e,t,i){var s,a,e=this._getInst(e);e&&(s=this._get(e,"tm_timepicker"))&&(this._setDateFromField(e),t)&&("string"==typeof t?(s._parseTime(t,i),(a=new Date).setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec)):(a=new Date(t.getTime())).setMicroseconds(t.getMicroseconds()),"Invalid Date"===a.toString()&&(a=void 0),this._setTime(e,a))},k.tm_datepicker._base_setDateDatepicker=k.tm_datepicker._setDateDatepicker,k.tm_datepicker._setDateDatepicker=function(e,t){var i,s=this._getInst(e),a=t;s&&("string"!=typeof t||(a=new Date(t)).getTime()||(this._base_setDateDatepicker.apply(this,arguments),a=k(e).tm_datepicker("getDate")),t=this._get(s,"tm_timepicker"),a instanceof Date?(i=new Date(a.getTime())).setMicroseconds(a.getMicroseconds()):i=a,t&&i&&(t.support.timezone||null!==t._defaults.timezone||(t.timezone=-1*i.getTimezoneOffset()),a=k.tm_timepicker.timezoneAdjust(a,k.tm_timepicker.timezoneOffsetString(-a.getTimezoneOffset()),t.timezone),i=k.tm_timepicker.timezoneAdjust(i,k.tm_timepicker.timezoneOffsetString(-i.getTimezoneOffset()),t.timezone)),this._updateDatepicker(s),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,i,!0))},k.tm_datepicker._base_getDateDatepicker=k.tm_datepicker._getDateDatepicker,k.tm_datepicker._getDateDatepicker=function(e,t){var i,s,a,n=this._getInst(e);if(n)return(i=this._get(n,"tm_timepicker"))?(void 0===n.lastVal&&this._setDateFromField(n,t),s=this._getDate(n),a=null,a=i.$altInput&&i._defaults.altFieldTimeOnly?i.$input.val()+" "+i.$altInput.val():("INPUT"!==i.$input.get(0).tagName&&i.$altInput?i.$altInput:i.$input).val(),s&&i._parseTime(a,!n.settings.timeOnly)&&(s.setHours(i.hour,i.minute,i.second,i.millisec),s.setMicroseconds(i.microsec),null!==i.timezone)&&(i.support.timezone||null!==i._defaults.timezone||(i.timezone=-1*s.getTimezoneOffset()),s=k.tm_timepicker.timezoneAdjust(s,i.timezone,k.tm_timepicker.timezoneOffsetString(-s.getTimezoneOffset()))),s):this._base_getDateDatepicker(e,t)},k.tm_datepicker._base_parseDate=k.tm_datepicker.parseDate,k.tm_datepicker.parseDate=function(t,i,s){var a;try{a=this._base_parseDate(t,i,s)}catch(e){if(!(0<=e.indexOf(":")))throw e;a=this._base_parseDate(t,i.substring(0,i.length-(e.length-e.indexOf(":")-2)),s),k.tm_timepicker.log("Error parsing the date string: "+e+"\ndate string="+i+"\ndate format="+t)}return a},k.tm_datepicker._base_formatDate=k.tm_datepicker._formatDate,k.tm_datepicker._formatDate=function(e){var t=this._get(e,"tm_timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},k.tm_datepicker._base_optionDatepicker=k.tm_datepicker._optionDatepicker,k.tm_datepicker._optionDatepicker=function(e,t,i){var s,a,n,r,l,m,o,c=this._getInst(e);if(!c)return null;if(c=this._get(c,"tm_timepicker")){if(o=a=m=null,n=c._defaults.evnts,r={},"string"==typeof t){if("minDate"===t||"minDateTime"===t)m=i;else if("maxDate"===t||"maxDateTime"===t)a=i;else if("onSelect"===t)o=i;else if(Object.prototype.hasOwnProperty.call(n,t)){if(void 0===i)return n[t];r[t]=i,s={}}}else if("object"==typeof t)for(l in t.minDate?m=t.minDate:t.minDateTime?m=t.minDateTime:t.maxDate?a=t.maxDate:t.maxDateTime&&(a=t.maxDateTime),n)Object.prototype.hasOwnProperty.call(n,l)&&t[l]&&(r[l]=t[l]);for(l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l],delete(s=s||k.extend({},t))[l]);if(s&&u(s))return;if(m?(m=0===m?new Date:new Date(m),c._defaults.minDate=m,c._defaults.minDateTime=m):a?(a=0===a?new Date:new Date(a),c._defaults.maxDate=a,c._defaults.maxDateTime=a):o&&(c._defaults.onSelect=o),m||a)return o=(c=k(e)).tm_datetimepicker("getDate"),m=this._base_optionDatepicker.call(k.tm_datepicker,e,s||t,i),c.tm_datetimepicker("setDate",o),m}return void 0===i?this._base_optionDatepicker.call(k.tm_datepicker,e,t):this._base_optionDatepicker.call(k.tm_datepicker,e,s||t,i)},k.tm_timepicker=new _,k.tm_timepicker.timezoneOffsetString=function(e,t){var i;return!(isNaN(e)||840<e||e<-720)&&(i=e%60,t=t?":":"","+00:00"==(e=(0<=e?"+":"-")+("0"+Math.abs((e-i)/60)).slice(-2)+t+("0"+Math.abs(i)).slice(-2)))?"Z":e},k.tm_timepicker.timezoneOffsetNumber=function(e){var t=e.toString().replace(":","");return"Z"===t.toUpperCase()?0:/^(-|\+)\d{4}$/.test(t)?("-"===t.substring(0,1)?-1:1)*(60*parseInt(t.substring(1,3),10)+parseInt(t.substring(3,5),10)):parseInt(e,10)},k.tm_timepicker.timezoneAdjust=function(e,t,i){t=k.timepicker.timezoneOffsetNumber(t),i=k.tm_timepicker.timezoneOffsetNumber(i);return isNaN(i)||e.setMinutes(e.getMinutes()+-t- -i),e},k.tm_timepicker.timeRange=function(e,t,i){return k.tm_timepicker.handleRange("tm_timepicker",e,t,i)},k.tm_timepicker.datetimeRange=function(e,t,i){k.tm_timepicker.handleRange("tm_datetimepicker",e,t,i)},k.tm_timepicker.dateRange=function(e,t,i){k.tm_timepicker.handleRange("tm_datepicker",e,t,i)},k.tm_timepicker.handleRange=function(r,l,m,o){var e=!1;function t(e,t){var i,s,a=l[r]("getDate"),n=m[r]("getDate"),e=e[r]("getDate");null!==a&&(i=new Date(a.getTime()),s=new Date(a.getTime()),i.setMilliseconds(i.getMilliseconds()+o.minInterval),s.setMilliseconds(s.getMilliseconds()+o.maxInterval),0<o.minInterval&&n<i?m[r]("setDate",i):0<o.maxInterval&&s<n?m[r]("setDate",s):n<a&&t[r]("setDate",e))}function i(e,t,i){e.val()&&(null!==(e=e[r].call(e,"getDate"))&&0<o.minInterval&&("minDate"===i&&e.setMilliseconds(e.getMilliseconds()+o.minInterval),"maxDate"===i)&&e.setMilliseconds(e.getMilliseconds()-o.minInterval),e.getTime)&&t[r].call(t,"option",i,e)}return o=k.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},o),"tm_timepicker"===r&&(e=!0,r="tm_datetimepicker"),k.fn[r].call(l,k.extend({timeOnly:e,onClose:function(){t(k(this),m)},onSelect:function(){i(k(this),m,"minDate")}},o,o.start)),k.fn[r].call(m,k.extend({timeOnly:e,onClose:function(){t(k(this),l)},onSelect:function(){i(k(this),l,"maxDate")}},o,o.end)),t(l,m),i(l,m,"minDate"),i(m,l,"maxDate"),k([l.get(0),m.get(0)])},k.tm_timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},k.tm_timepicker._util={_extendRemove:n,_isEmptyObject:u,_convert24to12:r,_detectSupport:h,_selectLocalTimezone:T,_computeEffectiveSetting:o,_splitDateTime:l,_parseDateTimeInternal:m},Date.prototype.getMicroseconds||(Object.defineProperty(Date.prototype,"microseconds",{value:0,writable:!0}),Object.defineProperty(Date.prototype,"getMicroseconds",{value:function(){return this.microseconds}}),Object.defineProperty(Date.prototype,"setMicroseconds",{value:function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}})),k.tm_timepicker.version="1.6.3")});
!function(v){"use strict";function n(t,s){return this.elements=v(t),this.last=[],this.current=[],this.enableEvents=!0,this.backup=[],this.options=v.extend({},v.fn.tcTabs.defaults,s),0<this.elements.length&&(this.init(),this)}var w=v.epoAPI.util.getStorage("localStorage"),h=window.confirm;n.prototype={constructor:n,set:function(t){this.options=v.extend({},this.options,t),this.init(!0)},addHeaderEvents:function(i,o,e,t,n,l,r,d,c){var s="",p=this;t.off("closetab.tmtabs").on("closetab.tmtabs",function(){var t=v(this),s=i.find(t.data("tab"));t.removeClass("closed open").addClass("closed"),t.find(".tm-arrow").removeClass(p.options.classdown+" "+p.options.classup).addClass(p.options.classdown),p.options.useclasstohide?s.addClass("tm-hide").removeClass("tm-show"):s.hide(),s.removeClass("tm-animated "+p.options.animationclass),v(window).trigger("tc-closetab.tmtabs",{header:t,tab:s})}),t.off("opentab.tmtabs").on("opentab.tmtabs",function(){var t=v(this),s=i.find(t.data("tab"));t.removeClass("closed open").addClass("open"),t.find(".tm-arrow").removeClass(p.options.classdown+" "+p.options.classup).addClass(p.options.classup),p.options.useclasstohide?s.removeClass("tm-hide").addClass("tm-show"):s.show(),s.removeClass("tm-animated "+p.options.animationclass).addClass("tm-animated "+p.options.animationclass),p.current[o]=t.data("tab"),v(window).trigger("tc-opentab.tmtabs",{header:t,tab:p.current[o],table:s}),p.scrollIntoView(i,t,c)}),!0!==p.options.showonhover&&"function"!=typeof p.options.showonhover||(s=" mouseover"),t.off("keydown.tmtabs").on("keydown.tmtabs",function(t){var s,o=v(this);13===t.keyCode&&o.trigger("click.tmtabs"),40===t.keyCode&&(s=o.closest(".tm-box").next().find("."+p.options.header)),(s=38===t.keyCode?o.closest(".tm-box").prev().find("."+p.options.header):s)&&s.length&&(o.trigger("blur"),s.trigger(" focus").trigger("click"),t.preventDefault())}),t.off("click.tmtabs").on("click.tmtabs"+s,function(t){var s=v(this);t.preventDefault(),"mouseover"===t.type&&"function"==typeof p.options.showonhover&&!p.options.showonhover.call()||(p.current[o]===s.data("tab")?v(window).trigger("tc-isopentab.tmtabs",{header:s,tab:p.current[o],table:i.find(p.current[o])}):(p.last[o]&&v(p.last[o]).trigger("closetab.tmtabs"),s.trigger("opentab.tmtabs"),p.last[o]=s,w&&w.setItem("tmadmintab-"+e,s.attr(p.options.dataopenattribute)),v(window).trigger("tc-tmtabs-clicked",{tc:e,options:p.options,header:s,tab:p.current[o],table:i.find(p.current[o])})))}),t.find("."+this.options.deleteheader).remove(),this.options.deletebutton&&(t.append(this.options.deletebuttonhtml),t.find("."+this.options.deleteheader).off("click.tmtabs").on("click.tmtabs",function(t){var s=v(this),o=s.closest(".tm-box"),e=o.find("."+p.options.header),a=i.find("."+e.attr(p.options.dataattribute));t.stopPropagation(),i.find("."+p.options.headers+" ."+p.options.header).length<2||p.options.deleteconfirm&&!h(window.TMEPOGLOBALADMINJS.i18n_builder_delete)||("function"==typeof p.options.beforedeletetab&&p.options.beforedeletetab.call(i,s,a),a.remove(),e.is(".open")&&(o.next().find("."+p.options.header).is(".closed")?o.next().find("."+p.options.header).trigger("click.tmtabs"):o.prev().find("."+p.options.header).is(".closed")&&o.prev().find("."+p.options.header).trigger("click.tmtabs")),o.remove(),p.checkSize(n,l,r,d,c,!0),"function"==typeof p.options.afterdeletetab&&p.options.afterdeletetab.call(i))})),t.find("."+this.options.editheader).remove(),this.options.editbutton&&(t.append(p.options.editbuttonhtml),t.find("."+p.options.editheader).off("click.tmtabs").on("click.tmtabs",function(t){var s;p.enableEvents&&"function"==typeof p.options.oneditbutton&&(t.stopPropagation(),t=v(this),s=i.find("."+t.closest(".tm-box").find("."+p.options.header).attr(p.options.dataattribute)),p.options.oneditbutton.call(i,t,s))}))},initHeader:function(t,s,o,e,a,i,n,l){var r=s.attr("class"),d="."+(t=v(t)).attr(this.options.dataattribute);t.data("tab",d),this.options.useclasstohide?s.find(d).addClass("tm-hide").removeClass("tm-show"):s.find(d).hide(),s.find(d).data("state","closed"),t.is(".open")?(t.removeClass("closed open").addClass("open").data("state","open"),t.find(".tm-arrow").removeClass(this.options.classdown+" "+this.options.classup).addClass(this.options.classup),this.options.useclasstohide?s.find(d).removeClass("tm-hide").addClass("tm-show"):s.find(d).show(),s.find(d).data("state","open"),this.current[o]=d,this.last[o]=t):t.removeClass("closed open").addClass("closed").data("state","closed"),this.addHeaderEvents(s,o,r,t,e,a,i,n,l)},checkSize:function(t,s,o,e,a,i){var n,l=[];s.parents().addBack().not(":visible").each(function(){var t=v(this),s=this.style.display,o=t.css("display"),e=this.style.visibility,a=!1,o={styleDisplay:s,cssDisplay:o,styleVisibility:e,cssVisibility:t.css("visibility"),display:null,visibility:null,element:t};"none"===s&&(this.style.display="",o.display=!0,"none"===t.css("display")&&(this.style.display="block"),a=!0),"hidden"===e&&(this.style.visibility="",o.visibility=!0,"hidden"===t.css("visibility")&&(this.style.visibility="visible"),a=!0),a&&l.push(o)}),n=Math.round(s.outerWidth()),s.is(".has-scroll-arrows")&&(s.removeClass(".has-scroll-arrows"),n=Math.round(t.outerWidth())),i&&((t=s.find("."+this.options.header+".open")).length&&t.removeClass("open"),a.scrollWidth=s[0].scrollWidth,t.length)&&t.addClass("open"),a.scrollWidth>n?(e.addClass("scroll-arrow-show"),o.addClass("scroll-arrow-show"),s.addClass("has-scroll-arrows"),a.scrollWidth-n===s.scrollLeft()?e.addClass("scroll-arrow-disabled scroll-arrow-right-disabled"):e.removeClass("scroll-arrow-disabled scroll-arrow-right-disabled"),0===s.scrollLeft()?o.addClass("scroll-arrow-disabled scroll-arrow-left-disabled"):o.removeClass("scroll-arrow-disabled scroll-arrow-left-disabled")):(e.removeClass("scroll-arrow-show"),o.removeClass("scroll-arrow-show"),s[0].scrollLeft=0,s.removeClass("has-scroll-arrows")),l.forEach(function(t){t.display&&(t.element[0].style.display=t.styleDisplay),t.visibility&&(t.element[0].style.visibility=t.styleVisibility)})},scrollIntoView:function(t,s,o){var e=o.scrollPos,t=t.find("."+this.options.headers),a=t.width();t.is(".has-scroll-arrows")&&s&&void 0!==s&&s.position()&&void 0!==s.position()&&(s.position().left<0?(o.scrollPos=Math.max(e+s.position().left+1,0),t.animate({scrollLeft:o.scrollPos+1+"px"},this.options.scrollDuration)):s.position().left+s.outerWidth()>a&&(o.scrollPos=Math.min(e+(s.position().left+s.outerWidth()-a),t[0].scrollWidth-t.outerWidth()),t.animate({scrollLeft:o.scrollPos-1+"px"},this.options.scrollDuration)))},initElement:function(l,r,d,t){var c,p,h,f,s,i,o,m=this,b=l.attr("class"),e=l.find("."+this.options.headers+" ."+this.options.header),n=0,u="",a={};0!==e.length&&((c=l.find("."+this.options.headers)).wrap('<div class="'+this.options.headersWrap+'"></div>'),p=l.find("."+this.options.headersWrap),this.options.scroll&&(p.html('<div class="tc-scroll-left-arrow"></div>'+p.html()+'<div class="tc-scroll-right-arrow"></div>'),e=l.find("."+this.options.headers+" ."+this.options.header),c=l.find("."+this.options.headers),h=l.find(".tc-scroll-left-arrow"),f=l.find(".tc-scroll-right-arrow"),"function"==typeof v.fn.mousewheel&&c.mousewheel(function(t,s){"none"!==f.css("display")&&(this.scrollLeft-=30*s,d.scrollPos=this.scrollLeft,t.preventDefault())}),c.animate({scrollLeft:d.scrollPos+"px"},0),this.checkSize(p,c,h,f,d,!0),v(window).off("resize.tmtabs"+t).on("resize.tmtabs"+t,function(){m.checkSize(p,c,h,f,d,!0)}),l.off("refresh.tmtabs"+t).on("refresh.tmtabs"+t,function(){m.checkSize(p,c,h,f,d,!0)}),v(function(){m.checkSize(p,c,h,f,d,!0)}),f.off("mousedown.tmtabs mouseup.tmtabs mouseleave.tmtabs mouseover.tmtabs mouseout.tmtabs").on("mousedown.tmtabs",function(t){function s(){var t=c.scrollLeft();d.scrollPos=Math.min(t+m.options.scrollDistance,d.scrollWidth-c.outerWidth()),c.animate({scrollLeft:d.scrollPos+"px"},m.options.scrollDuration,function(){m.checkSize(p,c,h,f,d)})}t.stopPropagation(),s(),o=setInterval(function(){s()},m.options.scrollDuration)}).on("mouseup.tmtabs mouseleave.tmtabs",function(){clearInterval(o)}).on("mouseover.tmtabs",function(){v(this).addClass("scroll-arrow-over scroll-arrow-right-over")}).on("mouseout.tmtabs",function(){v(this).removeClass("scroll-arrow-over scroll-arrow-right-over")}),h.off("mousedown.tmtabs mouseup.tmtabs mouseleave.tmtabs mouseover.tmtabs mouseout.tmtabs").on("mousedown.tmtabs",function(t){function s(){var t=c.scrollLeft();d.scrollPos=Math.max(t-m.options.scrollDistance,0),c.animate({scrollLeft:d.scrollPos+"px"},m.options.scrollDuration,function(){m.checkSize(p,c,h,f,d)})}t.stopPropagation(),s(),o=setInterval(function(){s()},m.options.scrollDuration)}).on("mouseup.tmtabs mouseleave.tmtabs",function(){clearInterval(o)}).on("mouseover.tmtabs",function(){v(this).addClass("scroll-arrow-over scroll-arrow-left-over")}).on("mouseout.tmtabs",function(){v(this).removeClass("scroll-arrow-over scroll-arrow-left-over")})),window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(t,s,o){a[s]=o}),this.last[r]=!1,this.current[r]="",l.data("tm-has-tmtabs",1),e.each(function(t,s){m.initHeader(s,l,r,p,c,h,f,d)}),this.options.sortabletabs&&(t="."+this.options.headers,l.find(t+" ."+this.options.headers+"-inner").length&&(t="."+this.options.headers+"-inner"),l.find(t+":not(.section_elements "+t+",.tm-settings-wrap "+t+",.builder-element-wrap "+t+")").sortablejs({draggable:".tm-box:not(.tm-add-box)",handle:".tm-box:not(.tm-add-box)",onStart:function(t){var t=v(t.item),s=l.find("."+t.closest(".tm-box").find("."+m.options.header).attr(m.options.dataattribute));n=t.index(),u=t.find("."+m.options.header).attr(m.options.dataopenattribute),i=v.tmEPOAdmin.find_index(!0,s.find(".bitem").first()),"function"==typeof m.options.beforemovetab&&m.options.beforemovetab.call(this,n,s,i),m.enableEvents=!1},onEnd:function(t){var s,o,t=v(t.item),e=l.find("."+t.closest(".tm-box").find("."+m.options.header).attr(m.options.dataattribute)),t=l.find("."+m.options.slide+"."+u),a=l.find("."+m.options.headers+" ."+m.options.header+"["+m.options.dataopenattribute+"='"+u+"']").parent().index();a!==n&&(s=l.find("."+m.options.slide).eq(a),(o=t.tcClone()).find(".bitem").remove(),n<a?s.after(o):a<n&&s.before(o),t.find(".bitem").toArray().forEach(function(t){t=v(t),"function"==typeof m.options.beforemovebitem&&m.options.beforemovebitem.call(this,a,n,e,i,t),o.append(t),"function"==typeof m.options.aftermovebitem&&m.options.aftermovebitem.call(this,a,n,e,i,t)}),t.remove(),"function"==typeof m.options.aftermovetab)&&m.options.aftermovetab.call(this,a,n,e,i),m.enableEvents=!0},filter:".tm-add-box",ghostClass:"sortable-ghost",dragClass:"sortable-drag"})),this.options.addbutton?(p.append(this.options.addbuttonhtml),l.addClass("has-add-button").find("."+this.options.addheader).off("click.tmtabs").on("click.tmtabs",function(t){var s=l.find("."+m.options.headers+" ."+m.options.header),o=s.last(),e=o.attr(m.options.dataattribute),a=l.find("."+e),i=o.tcClone().off("closetab.tmtabs opentab.tmtabs click.tmtabs"),n=a.tcClone().empty(),s=m.options.slide+s.length;t.preventDefault(),i.html('<span class="tab-text">'+(l.find("."+m.options.headers+" ."+m.options.header).length+1)+"</span>").removeClass("closed open").addClass("closed").data("tab","."+s).data("state","closed").attr(m.options.dataattribute,s),n.removeClass(e).addClass(s),m.options.useclasstohide?n.addClass("tm-hide").removeClass(".tm-show"):n.hide(),n.removeClass("tm-animated "+m.options.animationclass),o.closest(".tm-box").after(i),i.wrap('<div class="tm-box"></div>'),m.addHeaderEvents(l,r,b,i,p,c,h,f,d),a.after(n),m.options.scroll&&c.animate({scrollLeft:i.width()+"px"},m.options.scrollDuration,function(){m.checkSize(p,c,h,f,d,!0)}),"function"==typeof m.options.afteraddtab&&m.options.afteraddtab.call(this,i,n)})):p.find("."+this.options.addheader).remove(),"auto"===this.options.selectedtab?(w&&(s=w.getItem("tmadmintab-"+b)),void 0!==a.selected_tab&&(s=a.selected_tab),null==(s=void 0!==a.menu?a.menu:s)&&(s=l.find("."+this.options.header).eq(0).attr(this.options.dataopenattribute)),(l.find("."+this.options.header+"["+this.options.dataopenattribute+'="'+s+'"]').is(":visible")?l.find("."+this.options.header+"["+this.options.dataopenattribute+'="'+s+'"]'):l.find("."+this.options.header).eq(0)).trigger("click.tmtabs")):!1!==this.options.selectedtab&&(s=parseInt(this.options.selectedtab,10),l.find("."+this.options.header+":eq("+s+")").trigger("click.tmtabs")))},init:function(i){var n=this;this.elements.each(function(t){var s=v(this),o={},e=s.html(),a=v(n.options.animateDiv);!i&&n.backup[t]?s.html(n.backup[t]):n.backup[t]=e,o.scrollPos=0,o.scrollWidth=0,e=s.css("display"),a.show(),s.show(),n.initElement(s,t,o,v.epoAPI.math.uniqueid("")),s.css("display",e),a.addClass("appear")})}},v.fn.tcTabs=function(t){var s,o,e=v(this),a=e.data("tctabs"),i=v.makeArray(arguments);return i.splice(0,1),o="object"==typeof t?t:{},a||(a=new n(this,o),e.data("tctabs",a)),void 0===(s="string"==typeof t?a[t].apply(a,i):s)?e:s},v.fn.tcTabs.defaults={headers:"tm-tab-headers",headersWrap:"tc-tab-headers-wrap",header:"tab-header",slide:"tc-tab-slide",classdown:"tcfa-angle-down",classup:"tcfa-angle-up",animationclass:"appear",dataattribute:"data-id",dataopenattribute:"data-id",selectedtab:"auto",showonhover:!1,useclasstohide:!0,sortabletabs:!0,addbutton:!1,addheader:"tm-add-tab",addbuttonhtml:'<div class="tm-add-tab"><span class="tmicon tcfa tcfa-plus"></span></div>',afteraddtab:null,beforemovetab:null,aftermovetab:null,beforemovebitem:null,aftermovebitem:null,deletebutton:!1,deletebuttonhtml:'<div class="tm-del-tab"><span class="tcfa tcfa-times"></span></div>',deleteheader:"tm-del-tab",deleteconfirm:!1,beforedeletetab:null,afterdeletetab:null,editbutton:!1,editbuttonhtml:'<span class="tm-edit-tab"><span class="tcfa tcfa-edit"></span></span>',editheader:"tm-edit-tab",oneditbutton:null,scroll:!0,scrollDistance:300,scrollDuration:300,animateDiv:""},v.fn.tcTabs.Constructor=n,v.fn.tmtabs=v.fn.tcTabs}(window.jQuery);
!function(h,s,n){"use strict";function r(t,e){this.settings=null,this.options=h.extend({},r.Defaults,e),this.$element=h(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},h.each(["onResize","onThrottledResize"],h.proxy(function(t,e){this._handlers[e]=h.proxy(this[e],this)},this)),h.each(r.Plugins,h.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),h.each(r.Workers,h.proxy(function(t,e){this._pipe.push({filter:e.filter,run:h.proxy(e.run,this)})},this)),this.setup(),this.initialize()}r.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:s,fallbackEasing:"linear",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},r.Width={Default:"default",Inner:"inner",Outer:"outer"},r.Type={Event:"event",State:"state"},r.Plugins={},r.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,s={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(s),t.css=s}},{filter:["width","items","settings"],run:function(t){var e,i=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,s=this._items.length,n=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:i};0<s;)e=this._mergers[s-=1],e=this.settings.mergeFit&&Math.min(e,this.settings.items)||e,t.items.merge=1<e||t.items.merge,o[s]=n?i*e:this._items[s].width();this._widths=o}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,h(r).addClass("cloned").appendTo(this.$stage),h(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t,e,i=this.settings.rtl?1:-1,s=this._clones.length+this._items.length,n=0,o=[];n<s;)t=o[n-1]||0,e=this._widths[this.relative(n)]+this.settings.margin,o.push(t+e*i),n+=1;this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,e={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(e)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;0<e;)t.css.width=this._widths[this.relative(e-=1)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){for(var t,e,i=this.settings.rtl?1:-1,s=2*this.settings.stagePadding,n=this.coordinates(this.current())+s,o=n+this.width()*i,r=[],a=0,h=this._coordinates.length;a<h;a+=1)t=this._coordinates[a-1]||0,e=Math.abs(this._coordinates[a])+s*i,(this.op(t,"<=",n)&&this.op(t,">",o)||this.op(e,"<",n)&&this.op(e,">",o))&&r.push(a);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+r.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],r.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=h("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(h("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},r.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");t.length?(this._items=t.get().map(function(t){return h(t)}),this._mergers=this._items.map(function(){return 1}),this.refresh()):(this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass))},r.prototype.initialize=function(){var t,e;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:void 0,e=this.$element.children(e).width(),t.length)&&e<=0&&this.preloadAutoWidthImages(t),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},r.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},r.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(h.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=h.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=h.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},r.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},r.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=h("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},r.prototype.update=function(){for(var t=0,e=this._pipe.length,i=h.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<h.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t+=1;this._invalidated={},this.is("valid")||this.enter("valid")},r.prototype.width=function(t){switch(t=t||r.Width.Default){case r.Width.Inner:case r.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},r.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},r.prototype.onThrottledResize=function(){s.clearTimeout(this.resizeTimer),this.resizeTimer=s.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},r.prototype.onResize=function(){return!!this._items.length&&this._width!==this.$element.width()&&!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))},r.prototype.registerEventHandlers=function(){h.support.transition&&this.$stage.on(h.support.transition.end+".owl.core",h.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(s,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",h.proxy(this.onDragEnd,this)))},r.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=h.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(h.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=h(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),h(n).on("mouseup.owl.core touchend.owl.core",h.proxy(this.onDragEnd,this)),h(n).one("mousemove.owl.core touchmove.owl.core",h.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));h(n).on("mousemove.owl.core touchmove.owl.core",h.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},r.prototype.onDragMove=function(t){var e=null,i=null,s=this.difference(this._drag.pointer,this.pointer(t)),n=this.difference(this._drag.stage.start,s);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,n.x=((n.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),t=this.settings.pullDrag?-1*s.x/5:0,n.x=Math.max(Math.min(n.x,e+t),i+t)),this._drag.stage.current=n,this.animate(n.x))},r.prototype.onDragEnd=function(t){var t=this.difference(this._drag.pointer,this.pointer(t)),e=this._drag.stage.current,i=0<t.x,i=i&&!this.settings.rtl||this.settings.rtl&&!i?"left":"right";h(n).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==t.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==t.x?i:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=i,3<Math.abs(t.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1}),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},r.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||h.each(r,h.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",void 0!==r[t+1]?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?(i=this.minimum(),n=i):this.op(i,"<",r[this.maximum()])&&(i=this.maximum(),n=i)),n},r.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),h.support.transform3d&&h.support.transition?this.$stage.css({transform:"translate3d("+t+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,h.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"})},r.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},r.prototype.current=function(t){var e;return void 0===t?this._current:0!==this._items.length?(t=this.normalize(t),this._current!==t&&(void 0!==(e=this.trigger("change",{property:{name:"position",value:t}})).data&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current):void 0},r.prototype.invalidate=function(t){return"string"==typeof t&&(this._invalidated[t]=!0,this.is("valid"))&&this.leave("valid"),h.map(this._invalidated,function(t,e){return e})},r.prototype.reset=function(t){void 0!==(t=this.normalize(t))&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},r.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=void 0:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},r.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},r.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[e-=1].width(),s=this.$element.width();0<e&&!(s<(i+=this._items[e].width()+this.settings.margin));)e-=1;o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},r.prototype.minimum=function(t){return t?0:this._clones.length/2},r.prototype.items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},r.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},r.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return void 0===i?h.map(this._clones,function(t,e){return s(e)}):h.map(this._clones,function(t,e){return t===i?s(e):null})},r.prototype.speed=function(t){return void 0!==t&&(this._speed=t),this._speed},r.prototype.coordinates=function(t){var e,i=1,s=t-1;return void 0===t?h.map(this._coordinates,h.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,Math.ceil(e))},r.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},r.prototype.to=function(t,e){var i=this.current(),s=t-this.relative(i),n=(0<s)-(s<0),o=this._items.length,r=this.minimum(),a=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(s)>o/2&&(s+=-1*n*o),(n=(((t=i+s)-r)%o+o)%o+r)!==t&&n-s<=a&&0<n-s&&this.reset(i=(t=n)-s)):t=this.settings.rewind?(t%(a+=1)+a)%a:Math.max(r,Math.min(a,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},r.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},r.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},r.prototype.onTransitionEnd=function(t){if(void 0!==t&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},r.prototype.viewport=function(){var t;if(this.options.responsiveBaseElement!==s)t=h(this.options.responsiveBaseElement).width();else if(s.innerWidth)t=s.innerWidth;else{if(!n.documentElement||!n.documentElement.clientWidth)return t;t=n.documentElement.clientWidth}return t},r.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof s.jQuery?t:h(t)),(t=this.settings.nestedItemSelector?t.find("."+this.settings.nestedItemSelector):t).filter(function(){return 1===this.nodeType}).each(h.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},r.prototype.add=function(t,e){var i=this.relative(this._current);e=void 0===e?this._items.length:this.normalize(e,!0),t=t instanceof s.jQuery?t:h(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},r.prototype.remove=function(t){void 0!==(t=this.normalize(t,!0))&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},r.prototype.preloadAutoWidthImages=function(t){t.each(h.proxy(function(t,e){this.enter("pre-loading"),e=h(e),h(new Image).one("load",h.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},r.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),h(n).off(".owl.core"),!1!==this.settings.responsive&&(s.clearTimeout(this.resizeTimer),this.off(s,"resize",this._handlers.onThrottledResize)),h.map(this._plugins,function(t){return t}).forEach(function(t){t&&t.destroy()}),this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},r.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},r.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},r.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},r.prototype.trigger=function(t,e,i){var s={item:{count:this._items.length,index:this.current()}},n=h.camelCase(h.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),o=h.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),h.extend({relatedTarget:this},s,e));return this._supress[t]||(h.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(o)}),this.register({type:r.Type.Event,name:t}),this.$element.trigger(o),this.settings&&"function"==typeof this.settings[n]&&this.settings[n].call(this,o)),o},r.prototype.enter=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){void 0===this._states.current[e]&&(this._states.current[e]=0),this._states.current[e]+=1},this))},r.prototype.leave=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){--this._states.current[e]},this))},r.prototype.register=function(i){var e;i.type===r.Type.Event?(h.event.special[i.name]||(h.event.special[i.name]={}),h.event.special[i.name].owl||(e=h.event.special[i.name]._default,h.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},h.event.special[i.name].owl=!0)):i.type===r.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=h.grep(this._states.tags[i.name],h.proxy(function(t,e){return h.inArray(t,this._states.tags[i.name])===e},this)))},r.prototype.suppress=function(t){h.each(t,h.proxy(function(t,e){this._supress[e]=!0},this))},r.prototype.release=function(t){h.each(t,h.proxy(function(t,e){delete this._supress[e]},this))},r.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||s.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},r.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},r.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},h.fn.tmowlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=h(this),i=t.data("owl.carousel");i||(i=new r(this,"object"==typeof e&&e),t.data("owl.carousel",i),h.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:r.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",h.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},h.fn.tmowlCarousel.Constructor=r}(window.Zepto||window.jQuery,window,document),function(e,i){"use strict";function s(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)}s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible)&&this._core.invalidate("width")&&this._core.refresh()},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)t&&this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.tmowlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window),function(a,n){"use strict";function e(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){var e,i,s,n,o,r;if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"===t.property.name||"initialized"===t.type))for(i=(e=this._core.settings).center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this),0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop)&&(n-=e.lazyLoadEager,i+=1);s<i;)s+=1,this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n+=1},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)}e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var t=this._core.$stage.children().eq(t),e=t&&t.find(".owl-lazy");!e||-1<a.inArray(t.get(0),this._loaded)||(e.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(t.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)t&&this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.tmowlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window),function(n){"use strict";function i(t){var e=this;this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null,n(void 0).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(void 0).on("resize",function(){e._core.settings.autoHeight&&(null!==e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})}i.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},i.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},i.prototype.destroy=function(){var t,e;for(t in this._handlers)t&&this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.tmowlCarousel.Constructor.Plugins.AutoHeight=i}(window.Zepto||window.jQuery),function(c,e){"use strict";function i(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;t.namespace&&(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))}i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e,t=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[t.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),t=this._core.items(this._core.relative(t.index())),this._core.reset(t.index()),(e=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),e.attr("width",s),"youtube"===i.type?e.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?e.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&e.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(e).wrap('<div class="owl-video-frame" />').insertAfter(t.find(".owl-video")),this._playing=t.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)t&&this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.tmowlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){"use strict";function e(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&"position"===t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"===t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)}e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){var t,e,i,s,n,o;1===this.core.settings.items&&r.support.animation&&r.support.transition&&(this.core.speed(0),e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut,this.core.current()!==this.previous)&&(o&&(t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.one(r.support.animation.end,e).css({left:t+"px"}).addClass("animated owl-animated-out").addClass(o)),n)&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)t&&this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.tmowlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery),function(s,n,e){"use strict";function i(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)}i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},i.prototype._next=function(t){this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.play=function(t,e){var i;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i)},i.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"))},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call))},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)t&&this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.tmowlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(r){"use strict";function e(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":r.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+r(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":r.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":r.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":r.proxy(function(t){t.namespace&&"position"===t.property.name&&this.draw()},this),"initialized.owl.carousel":r.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":r.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=r.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)}e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var t,i=this._core.settings;for(t in this._controls.$relative=(i.navContainer?r(i.navContainer):r("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=r("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",r.proxy(function(){this.prev(i.navSpeed)},this)),this._controls.$next=r("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",r.proxy(function(){this.next(i.navSpeed)},this)),i.dotsData||(this._templates=[r('<button role="button">').addClass(i.dotClass).append(r("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?r(i.dotsContainer):r("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",r.proxy(function(t){var e=(r(t.target).parent().is(this._controls.$absolute)?r(t.target):r(t.target).parent()).index();t.preventDefault(),this.to(e,i.dotsSpeed)},this)),this._overrides)t&&(this._core[t]=r.proxy(this[t],this))},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)t&&this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)s&&(this._core[s]=this._overrides[s]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"===o.slideBy)for(this._pages=[],t=i,e=0;t<s;t+=1){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=this._core.items().length<=t.items,i=this._core.relative(this._core.current()),s=t.loop||t.rewind;this._controls.$relative.toggleClass("disabled",!t.nav||e),t.nav&&(this._controls.$previous.toggleClass("disabled",!s&&i<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!s&&i>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!t.dots||e),t.dots&&(s=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=s?this._controls.$absolute.html(this._templates.join("")):0<s?this._controls.$absolute.append(new Array(1+s).join(this._templates[0])):s<0&&this._controls.$absolute.children().slice(s).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(r.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:r.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var e=this._core.relative(this._core.current());return r.grep(this._pages,r.proxy(function(t){return t.start<=e&&t.end>=e},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"===s.slideBy?(e=r.inArray(this.current(),this._pages),i=this._pages.length,t?e+=1:e-=1,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.getAvailableSlide=function(e,i){function s(){var t=this.getPosition(i);this._core._items[t]&&this._core._items[t].is(".tc-hidden-visibility")?o<n&&(o++,this._core.current(t),setTimeout(function(){s.call(this)}.bind(this),50)):r.proxy(this._overrides.to,this._core)(t,e)}var n=this._core._items.length-this._core._current||100,o=0;s.call(this)},e.prototype.next=function(t){this.getAvailableSlide(t,!0)},e.prototype.prev=function(t){this.getAvailableSlide(t,!1)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,r.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):r.proxy(this._overrides.to,this._core)(t,e)},r.fn.tmowlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery),function(s,n){"use strict";function e(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;t.namespace&&(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t)},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(){var t=n.location.hash.substring(1),e=this._core.$stage.children(),e=this._hashes[t]&&e.index(this._hashes[t]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))}e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)t&&this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.tmowlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window),function(n){"use strict";var t,o=n("<support>").get(0).style,r="Webkit Moz O ms".split(" "),e={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}};function i(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+r.join(e+" ")+e).split(" "),function(t,e){if(void 0!==o[e])return s=!i||e,!1}),s}function s(t){return i(t,!0)}(t={csstransforms:function(){return!!i("transform")},csstransforms3d:function(){return!!i("perspective")},csstransitions:function(){return!!i("transition")},cssanimations:function(){return!!i("animation")}}).csstransitions()&&(n.support.transition=new String(s("transition")),n.support.transition.end=e.transition.end[n.support.transition]),t.cssanimations()&&(n.support.animation=new String(s("animation")),n.support.animation.end=e.animation.end[n.support.animation]),t.csstransforms()&&(n.support.transform=new String(s("transform")),n.support.transform3d=t.csstransforms3d())}(window.Zepto||window.jQuery);
!function(h,g,t){"use strict";var m="lazyLoadXT",y="lazied",p="load error",e="lazy-hidden",w=t.documentElement||t.body,C={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:void 0===g.onscroll||!!g.operamini||!w.getBoundingClientRect,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"lazyloadall",oninit:{removeClass:"lazy"},onshow:{addClass:e},onload:{removeClass:e,addClass:"lazy-loaded"},onerror:{removeClass:e},checkDuplicates:!0},o={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},n=h(g),z=function(t){return"function"==typeof t},s=h.extend,E=h.data||function(t,e){return h(t).data(e)},T=[],b=0,a=0;function d(t,e){return(void 0===t[e]?C:t)[e]}function L(){var t=g.pageYOffset;return void 0===t?w.scrollTop:t}function r(){1<a?(a=1,i(),setTimeout(r,C.throttle)):a=0}function u(t){!T.length||t&&"scroll"===t.type&&t.currentTarget===g&&b>=L()||(a||setTimeout(r,0),a=2)}function I(t,e){var o=C["on"+t];o&&(z(o)?o.call(e[0]):(o.addClass&&e.addClass(o.addClass),o.removeClass&&e.removeClass(o.removeClass))),e.trigger("lazy"+t,[e]),u()}function X(t){I(t.type,h(t.currentTarget).off(p,X))}function i(t){var e,o,n,a,r,i,c,l,s,d,u,f,A,v;if(T.length){for(t=t||C.forceLoad,b=1/0,e=L(),o=g.innerHeight||w.clientHeight,n=g.innerWidth||w.clientWidth,a=0,r=T.length;a<r;a+=1)c=(i=T[a])[0],l=i[m],s=!1,d=t||E(c,y)<0,h.contains(w,c)?(t||!l.visibleOnly||c.offsetWidth||c.offsetHeight)&&(d||(v=c.getBoundingClientRect(),f=l.edgeX,A=l.edgeY,d=(u=v.top+e-A-o)<=e&&v.bottom>-A&&v.left<=n+f&&v.right>-f),d?(i.on(p,X),I("show",i),A=l.srcAttr,(v=z(A)?A(i):c.getAttribute(A))&&(c.src=v),s=!0):u<b&&(b=u)):s=!0,s&&(E(c,y,0),T.splice(a,1),a-=1,r-=1);r||I("complete",h(w))}}function c(){n.lazyLoadXT()}function l(){i(!0)}h[m]=s(C,o,h[m]),h.fn[m]=function(a){var r={},i=d(a=a||{},"blankImage"),c=d(a,"checkDuplicates"),t=d(a,"scrollContainer"),l=d(a,"show");return h(t).on("scroll",u),Object.keys(o).forEach(function(t){r[t]=d(a,t)}),this.each(function(t,e){var o,n;e===g?h(C.selector).lazyLoadXT(a):(o=c&&E(e,y),n=h(e).data(y,l?-1:1),o||(i&&"IMG"===e.tagName&&!e.src&&(e.src=i),n[m]=s({},r),I("init",n),T.push(n)),u())})},h(function(){I("start",n),n.on(C.updateEvent,u).on(C.forceEvent,l),h(t).on(C.updateEvent,u),C.autoInit&&(n.on(C.loadEvent,c),c())})}(window.jQuery||window.Zepto||window.$,window,document),function(i){"use strict";var o=i.lazyLoadXT;o.selector+=",video,iframe[data-src]",o.videoPoster="data-poster",i(document).on("lazyshow","video",function(t,e){var n=e.lazyLoadXT.srcAttr,a="function"==typeof n,r=!1;e.attr("poster",e.attr(o.videoPoster)),e.children("source,track").each(function(t,e){var e=i(e),o=a?n(e):e.attr(n);o&&(e.attr("src",o),r=!0)}),r&&this.load()})}(window.jQuery||window.Zepto||window.$);
!function(t,a,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"undefined"==typeof Meteor?window.module.exports=t(window.require("jquery")):t(a||e)}(function(r){"use strict";function i(u,M,y){var s,o,w=this,b={invalid:[],getCaret:function(){var t,a,e,n,s=0;try{return a=u.get(0),e=document.selection,n=a.selectionStart,e&&-1===navigator.appVersion.indexOf("MSIE 10")?((t=e.createRange()).moveStart("character",-b.val().length),s=t.text.length):!n&&"0"!==n||(s=n),s}catch(t){window.console.log(t)}},setCaret:function(t){var a,e;try{u.is(":focus")&&((e=u.get(0)).setSelectionRange?e.setSelectionRange(t,t):((a=e.createTextRange()).collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select()))}catch(t){window.console.log(t)}},events:function(){u.on("keydown.mask",function(t){u.data("mask-keycode",t.keyCode||t.which),u.data("mask-previus-value",u.val()),u.data("mask-previus-caret-pos",b.getCaret()),b.maskDigitPosMapOld=b.maskDigitPosMap}).on(r.jMaskGlobals.useInput?"input.mask":"keyup.mask",b.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){u.keydown().keyup()},100)}).on("change.mask",function(){u.data("changed",!0)}).on("blur.mask",function(){o===b.val()||u.data("changed")||u.trigger("change"),u.data("changed",!1)}).on("blur.mask",function(){o=b.val()}).on("focus.mask",function(t){!0===y.selectOnFocus&&r(t.target).select()}).on("focusout.mask",function(){y.clearIfNotMatch&&!s.test(b.val())&&b.val("")})},getRegexMask:function(){for(var t,a,e,n,s,o=[],r=0;r<M.length;r+=1)(e=w.translation[M.charAt(r)])?(t=e.pattern.toString().replace(/.{1}$|^.{1}/g,""),a=e.optional,(e=e.recursive)?(o.push(M.charAt(r)),n={digit:M.charAt(r),pattern:t}):o.push(a||e?t+"?":t)):o.push(M.charAt(r).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return s=o.join(""),n&&(s=s.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern)),new RegExp(s)},destroyEvents:function(){u.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(t){var a=u.is("input")?"val":"text",t=0<arguments.length?(u[a]()!==t&&u[a](t),u):u[a]();return t},calculateCaretPosition:function(t){var a,e,n=b.getMasked(),s=b.getCaret(),o=0,r=0,i=0,l=0,c=0;if(t!==n){for(a=u.data("mask-previus-caret-pos")||0,e=n.length,n=t.length,c=s;c<e&&b.maskDigitPosMap[c];c+=1)r+=1;for(c=s-1;0<=c&&b.maskDigitPosMap[c];--c)o+=1;for(c=s-1;0<=c;--c)b.maskDigitPosMap[c]&&(i+=1);for(c=a-1;0<=c;--c)b.maskDigitPosMapOld[c]&&(l+=1);n<s?s=10*e:s<=a&&a!==n?b.maskDigitPosMapOld[s]||(t=s,b.maskDigitPosMap[s=s-(l-i)-o]&&(s=t)):a<s&&(s=s+(i-l)+r)}return s},behaviour:function(t){var a,e,n=u.data("mask-keycode");if(t=t||window.event,b.invalid=[],-1===r.inArray(n,w.byPassKeys))return n=b.getMasked(),e=b.getCaret(),a=u.data("mask-previus-value")||"",setTimeout(function(){b.setCaret(b.calculateCaretPosition(a))},r.jMaskGlobals.keyStrokeCompensation),b.val(n),b.setCaret(e),b.callbacks(t)},getMasked:function(t,a){for(var e,n,s,o,r,i=[],l=void 0===a?b.val():a+"",c=0,u=M.length,d=0,k=l.length,p=1,h="push",f=-1,g=0,v=[],m=y.reverse?(h="unshift",p=-1,e=0,c=u-1,d=k-1,function(){return-1<c&&-1<d}):(e=u-1,function(){return c<u&&d<k});m();)s=M.charAt(c),o=l.charAt(d),(r=w.translation[s])?(o.match(r.pattern)?(i[h](o),r.recursive&&(-1===f?f=c:c===e&&c!==f&&(c=f-p),e===f)&&(c-=p),c+=p):o===n?(g-=1,n=void 0):r.optional?(c+=p,d-=p):r.fallback?(i[h](r.fallback),c+=p,d-=p):b.invalid.push({p:d,v:o,e:r.pattern}),d+=p):(t||i[h](s),o===s?(v.push(d),d+=p):(n=s,v.push(d+g),g+=1),c+=p);return a=M.charAt(e),u!==k+1||w.translation[a]||i.push(a),a=i.join(""),b.mapMaskdigitPositions(a,v,k),a},mapMaskdigitPositions:function(t,a,e){var n,s=y.reverse?t.length-e:0;for(b.maskDigitPosMap={},n=0;n<a.length;n+=1)b.maskDigitPosMap[a[n]+s]=1},callbacks:function(t){function a(t,a,e){"function"==typeof y[t]&&a&&y[t].apply(this,e)}var e=b.val(),n=e!==o,s=[e,t,u,y];a("onChange",!0==n,s),a("onKeyPress",!0==n,s),a("onComplete",e.length===M.length,s),a("onInvalid",0<b.invalid.length,[e,t,u,b.invalid,y])}};u=r(u),o=b.val(),M="function"==typeof M?M(b.val(),void 0,u,y):M,w.mask=M,w.options=y,w.remove=function(){var t=b.getCaret();return w.options.placeholder&&u.removeAttr("placeholder"),u.data("mask-maxlength")&&u.removeAttr("maxlength"),b.destroyEvents(),b.val(w.getCleanVal()),b.setCaret(t),u},w.getCleanVal=function(){return b.getMasked(!0)},w.getMaskedVal=function(t){return b.getMasked(!1,t)},w.init=function(t){var a,e,n;if(t=t||!1,y=y||{},w.clearIfNotMatch=r.jMaskGlobals.clearIfNotMatch,w.byPassKeys=r.jMaskGlobals.byPassKeys,w.translation=r.extend({},r.jMaskGlobals.translation,y.translation),w=r.extend(!0,{},w,y),s=b.getRegexMask(),t)b.events(),b.val(b.getMasked());else{for(y.placeholder&&u.attr("placeholder",y.placeholder),u.data("mask")&&u.attr("autocomplete","off"),n=!(a=0);a<M.length;a+=1)if((e=w.translation[M.charAt(a)])&&e.recursive){n=!1;break}n&&u.attr("maxlength",M.length).data("mask-maxlength",!0),b.destroyEvents(),b.events(),t=b.getCaret(),b.val(b.getMasked()),b.setCaret(t)}},w.init(!u.is("input"))}function l(t,a,e){var n=r(t).data("mask"),s=o.stringify,t=r(t).val()||r(t).text();e=e||{};try{return"function"==typeof a&&(a=a(t)),"object"!=typeof n||s(n.options)!==s(e)||n.mask!==a}catch(t){window.console.log(t)}}function a(){var t=r(this),a={},e="data-mask-",n=t.attr("data-mask");if(t.attr(e+"reverse")&&(a.reverse=!0),t.attr(e+"clearifnotmatch")&&(a.clearIfNotMatch=!0),"true"===t.attr(e+"selectonfocus")&&(a.selectOnFocus=!0),t.attr(e+"placeholder")&&(a.placeholder=t.attr(e+"placeholder")),l(t,n,a))return t.data("mask",new i(this,n,a))}var t,e,n,o=window.JSON;r.maskWatchers={},r.fn.mask=function(t,a){var e=this.selector,n=r.jMaskGlobals,s=n.watchInterval,n=(a=a||{}).watchInputs||n.watchInputs,o=function(){if(l(this,t,a))return r(this).data("mask",new i(this,t,a))};return r(this).each(o),e&&""!==e&&n&&(clearInterval(r.maskWatchers[e]),r.maskWatchers[e]=setInterval(function(){r(document).find(e).each(o)},s)),this},r.fn.masked=function(t){return this.data("mask").getMaskedVal(t)},r.fn.unmask=function(){return clearInterval(r.maskWatchers[this.selector]),delete r.maskWatchers[this.selector],this.each(function(){var t=r(this).data("mask");t&&t.remove().removeData("mask")})},r.fn.cleanVal=function(){return this.data("mask").getCleanVal()},r.applyDataMask=function(t){((t=t||r.jMaskGlobals.maskElements)instanceof r?t:r(t)).filter(r.jMaskGlobals.dataMaskAttr).each(a)},t={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&(t="input",n=document.createElement("div"),(e=(t="on"+t)in n)||(n.setAttribute(t,"return;"),e="function"==typeof n[t]),n=null,e),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}},r.jMaskGlobals=r.jMaskGlobals||{},(t=r.jMaskGlobals=r.extend(!0,{},t,r.jMaskGlobals)).dataMask&&r.applyDataMask(),setInterval(function(){r.jMaskGlobals.watchDataMask&&r.applyDataMask()},t.watchInterval)},window.jQuery,window.Zepto);
!function(e){"use strict";!function(Pe){"use strict";var e,l={to:function(e){return e===undefined?"":e.toFixed(2)},from:Number},u={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},Ce={tooltips:".__tooltips",aria:".__aria"},r=function(){function e(t,e,r){var n;var i=[];this.xPct=[];this.xVal=[];this.xSteps=[];this.xNumSteps=[];this.xHighestCompleteStep=[];this.xSteps=[r||false];this.xNumSteps=[false];this.snap=e;Object.keys(t).forEach(function(e){i.push([Oe(t[e]),e])});i.sort(function(e,t){return e[0][0]-t[0][0]});for(n=0;n<i.length;n++)this.handleEntryPoint(i[n][1],i[n][0]);this.xNumSteps=this.xSteps.slice(0);for(n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}e.prototype.getDistance=function(e){var t;var r=[];for(t=0;t<this.xNumSteps.length-1;t++)r[t]=p(this.xVal,e,t);return r};e.prototype.getAbsoluteDistance=function(e,t,r){var n=0;var i;var a=1;var s;var o=0;var l=0;var u=0;var f=0;if(e<this.xPct[this.xPct.length-1])while(e>this.xPct[n+1])n++;else if(e===this.xPct[this.xPct.length-1])n=this.xPct.length-2;if(!r&&e===this.xPct[n+1])n++;if(t===null)t=[];s=t[n];if(r)i=(e-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]);else i=(this.xPct[n+1]-e)/(this.xPct[n+1]-this.xPct[n]);while(s>0){o=this.xPct[n+1+f]-this.xPct[n+f];if(t[n+f]*a+100-i*100>100){l=o*i;a=(s-100*i)/t[n+f];i=1}else{l=t[n+f]*o/100*a;a=0}if(r){u=u-l;if(this.xPct.length+f>=1)f--}else{u=u+l;if(this.xPct.length-f>=1)f++}s=t[n+f]*a}return e+u};e.prototype.toStepping=function(e){e=b(this.xVal,this.xPct,e);return e};e.prototype.fromStepping=function(e){return S(this.xVal,this.xPct,e)};e.prototype.getStep=function(e){e=x(this.xPct,this.xSteps,this.snap,e);return e};e.prototype.getDefaultStep=function(e,t,r){var n=v(e,this.xPct);if(e===100||t&&e===this.xPct[n-1])n=Math.max(n-1,1);return(this.xVal[n]-this.xVal[n-1])/r};e.prototype.getNearbySteps=function(e){var t=v(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}};e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(f);return Math.max.apply(null,e)};e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]};e.prototype.convert=function(e){return this.getStep(this.toStepping(e))};e.prototype.handleEntryPoint=function(e,t){var r;var n;if(e==="min")r=0;else if(e==="max")r=100;else r=parseFloat(e);if(!s(r)||!s(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r);this.xVal.push(t[0]);n=Number(t[1]);if(!r){if(!isNaN(n))this.xSteps[0]=n}else this.xSteps.push(isNaN(n)?false:n);this.xHighestCompleteStep.push(0)};e.prototype.handleStepPoint=function(e,t){var r;var n;var i;if(!t)return;if(this.xVal[e]===this.xVal[e+1]){this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e];return}this.xSteps[e]=p([this.xVal[e],this.xVal[e+1]],t,0)/c(this.xPct[e],this.xPct[e+1]);r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e];n=Math.ceil(Number(r.toFixed(3))-1);i=this.xVal[e]+this.xNumSteps[e]*n;this.xHighestCompleteStep[e]=i};return e}(),t=(Pe.PipsMode=void 0,Pe.PipsMode||(Pe.PipsMode={})),n=(t.Range="range",t.Steps="steps",t.Positions="positions",t.Count="count",t.Values="values",Pe.PipsType=void 0,Pe.PipsType||(Pe.PipsType={}));function i(e){return a(e)&&typeof e.from==="function"}function a(e){return typeof e==="object"&&typeof e.to==="function"}function Ne(e){e.parentElement.removeChild(e)}function Ve(e){return e!==null&&e!==undefined}function Ae(e){e.preventDefault()}function ke(e){return e.filter(function(e){return!this[e]?this[e]=true:false},{})}function o(e,t){return Math.round(e/t)*t}function Me(e,t){var r=e.getBoundingClientRect();var n=e.ownerDocument;var i=n.documentElement;var a=je(n);if(/webkit.*Chrome.*Mobile/i.test(navigator.userAgent))a.x=0;return t?r.top+a.y-i.clientTop:r.left+a.x-i.clientLeft}function s(e){return typeof e==="number"&&!isNaN(e)&&isFinite(e)}function Ue(e,t,r){if(r>0){Le(e,t);setTimeout(function(){Te(e,t)},r)}}function De(e){return Math.max(Math.min(e,100),0)}function Oe(e){return Array.isArray(e)?e:[e]}function f(e){var t;e=String(e);t=e.split(".");return t.length>1?t[1].length:0}function Le(e,t){if(e.classList&&!/\s/.test(t))e.classList.add(t);else e.className+=" "+t}function Te(e,t){if(e.classList&&!/\s/.test(t))e.classList.remove(t);else e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function ze(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function je(e){var t=window.pageXOffset!==undefined;var r=(e.compatMode||"")==="CSS1Compat";var n=t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft;var i=t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop;return{x:n,y:i}}function He(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Fe(){var e=false;try{var t=Object.defineProperty({},"passive",{get:function(){e=true}});window.addEventListener("test",null,t)}catch(e){}return e}function Re(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function c(e,t){return 100/(t-e)}function p(e,t,r){return t*100/(e[r+1]-e[r])}function d(e,t){return p(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function h(e,t){return t*(e[1]-e[0])/100+e[0]}function v(e,t){var r=1;while(e>=t[r])r+=1;return r}function b(e,t,r){var n;var i;var a;var s;var o;if(r>=e.slice(-1)[0])return 100;n=v(r,e);i=e[n-1];a=e[n];s=t[n-1];o=t[n];return s+d([i,a],r)/c(s,o)}function S(e,t,r){var n;var i;var a;var s;var o;if(r>=100)return e.slice(-1)[0];n=v(r,t);i=e[n-1];a=e[n];s=t[n-1];o=t[n];return h([i,a],(r-s)*c(s,o))}function x(e,t,r,n){var i;var a;var s;if(n===100)return n;i=v(n,e);a=e[i-1];s=e[i];if(r){if(n-a>(s-a)/2)return s;return a}if(!t[i-1])return n;return e[i-1]+o(n-e[i-1],t[i-1])}function y(e,t){if(!s(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function w(e,t){if(!s(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function E(e,t){if(!s(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function P(e,t){if(!s(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function C(e,t){if(typeof t!=="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===undefined||t.max===undefined)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new r(t,e.snap||false,e.singleStep)}function N(e,t){t=Oe(t);if(!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length;e.start=t}function V(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function A(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function k(e,t){if(typeof t!=="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function M(e,t){var r=[false];var n;if(t==="lower")t=[true,false];else if(t==="upper")t=[false,true];if(t===true||t===false){for(n=1;n<e.handles;n++)r.push(t);r.push(false)}else if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");else r=t;e.connect=r}function U(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function m(e,t){if(!s(t))throw new Error("noUiSlider: 'margin' option must be numeric.");if(t===0)return;e.margin=e.spectrum.getDistance(t)}function D(e,t){if(!s(t))throw new Error("noUiSlider: 'limit' option must be numeric.");e.limit=e.spectrum.getDistance(t);if(!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function O(e,t){var r;var n;var i;var a;if(!s(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||s(t[0])||s(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t===0)return;if(!Array.isArray(t))t=[t,t];e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])];for(r=0;r<e.spectrum.xNumSteps.length-1;r++)if(e.padding[0][r]<0||e.padding[1][r]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");n=t[0]+t[1];i=e.spectrum.xVal[0];a=e.spectrum.xVal[e.spectrum.xVal.length-1];if(n/(a-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}function L(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function T(e,t){var r;var n;var i;var a;var s;var o;var l;var u;if(typeof t!=="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");r=t.indexOf("tap")>=0;n=t.indexOf("drag")>=0;i=t.indexOf("fixed")>=0;a=t.indexOf("snap")>=0;s=t.indexOf("hover")>=0;o=t.indexOf("unconstrained")>=0;l=t.indexOf("drag-all")>=0;u=t.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");m(e,e.start[1]-e.start[0])}if(o&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||a,drag:n,dragAll:l,smoothSteps:u,fixed:i,snap:a,hover:s,unconstrained:o}}function z(e,t){var r;if(t===false)return;if(t===true||a(t)){e.tooltips=[];for(r=0;r<e.handles;r++)e.tooltips.push(t)}else{t=Oe(t);if(t.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(e){if(typeof e!=="boolean"&&!a(e))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")});e.tooltips=t}}function j(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function H(e,t){if(!a(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function F(e,t){if(!i(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function R(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function _(e,t){e.documentElement=t}function B(e,t){if(typeof t!=="string"&&t!==false)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function q(t,r){if(typeof r!=="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");if(typeof t.cssPrefix==="string"){t.cssClasses={};Object.keys(r).forEach(function(e){t.cssClasses[e]=t.cssPrefix+r[e]})}else t.cssClasses=r}function _e(t){var r={margin:null,limit:null,padding:null,animate:true,animationDuration:300,ariaFormat:l,format:l};var n={step:{r:false,t:y},keyboardPageMultiplier:{r:false,t:w},keyboardMultiplier:{r:false,t:E},keyboardDefaultStep:{r:false,t:P},start:{r:true,t:N},connect:{r:true,t:M},direction:{r:true,t:L},snap:{r:false,t:V},animate:{r:false,t:A},animationDuration:{r:false,t:k},range:{r:true,t:C},orientation:{r:false,t:U},margin:{r:false,t:m},limit:{r:false,t:D},padding:{r:false,t:O},behaviour:{r:true,t:T},ariaFormat:{r:false,t:H},format:{r:false,t:F},tooltips:{r:false,t:z},keyboardSupport:{r:true,t:R},documentElement:{r:false,t:_},cssPrefix:{r:true,t:B},cssClasses:{r:true,t:q},handleAttributes:{r:false,t:j}};var i={connect:false,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:true,cssPrefix:"noui-",cssClasses:u,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};var e;var a;var s;var o;if(t.format&&!t.ariaFormat)t.ariaFormat=t.format;Object.keys(n).forEach(function(e){if(!Ve(t[e])&&i[e]===undefined){if(n[e].r)throw new Error("noUiSlider: '"+e+"' is required.");return}n[e].t(r,!Ve(t[e])?i[e]:t[e])});r.pips=t.pips;e=document.createElement("div");a=e.style.msTransform!==undefined;s=e.style.transform!==undefined;r.transformRule=s?"transform":a?"msTransform":"webkitTransform";o=[["left","top"],["right","bottom"]];r.style=o[r.dir][r.ort];return r}function X(e,g,a){var l=He();var n=Re();var j=n&&Fe();var u=e;var f;var c;var p;var i;var s;var w=g.spectrum;var b=[];var S=[];var d=[];var h=0;var o={};var v=e.ownerDocument;var m=g.documentElement||v.documentElement;var x=v.body;var H=v.dir==="rtl"||g.ort===1?0:100;var y;function E(e,t){var r=v.createElement("div");if(t)Le(r,t);e.appendChild(r);return r}function F(e,t){var r=E(e,g.cssClasses.origin);var n=E(r,g.cssClasses.handle);var i;E(n,g.cssClasses.touchArea);n.setAttribute("data-handle",String(t));if(g.keyboardSupport){n.setAttribute("tabindex","0");n.addEventListener("keydown",function(e){return oe(e,t)})}if(g.handleAttributes!==undefined){i=g.handleAttributes[t];Object.keys(i).forEach(function(e){n.setAttribute(e,i[e])})}n.setAttribute("role","slider");n.setAttribute("aria-orientation",g.ort?"vertical":"horizontal");if(t===0)Le(n,g.cssClasses.handleLower);else if(t===g.handles-1)Le(n,g.cssClasses.handleUpper);r.handle=n;return r}function R(e,t){if(!t)return false;return E(e,g.cssClasses.connect)}function _(e,t){var r=E(t,g.cssClasses.connects);var n;c=[];p=[];p.push(R(r,e[0]));for(n=0;n<g.handles;n++){c.push(F(t,n));d[n]=n;p.push(R(r,e[n+1]))}}function B(e){var t;Le(e,g.cssClasses.target);if(g.dir===0)Le(e,g.cssClasses.ltr);else Le(e,g.cssClasses.rtl);if(g.ort===0)Le(e,g.cssClasses.horizontal);else Le(e,g.cssClasses.vertical);t=getComputedStyle(e).direction;if(t==="rtl")Le(e,g.cssClasses.textDirectionRtl);else Le(e,g.cssClasses.textDirectionLtr);return E(e,g.cssClasses.base)}function q(e,t){if(!g.tooltips||!g.tooltips[t])return false;return E(e.firstChild,g.cssClasses.tooltip)}function X(){return u.hasAttribute("disabled")}function P(e){var t=c[e];return t.hasAttribute("disabled")}function Y(e){if(e!==null&&e!==undefined){c[e].setAttribute("disabled","");c[e].handle.removeAttribute("tabindex")}else{u.setAttribute("disabled","");c.forEach(function(e){e.handle.removeAttribute("tabindex")})}}function I(e){if(e!==null&&e!==undefined){c[e].removeAttribute("disabled");c[e].handle.setAttribute("tabindex","0")}else{u.removeAttribute("disabled");c.forEach(function(e){e.removeAttribute("disabled");e.handle.setAttribute("tabindex","0")})}}function C(){if(s){r("update"+Ce.tooltips);s.forEach(function(e){if(e)Ne(e)});s=null}}function W(){var n;C();s=c.map(q);t("update"+Ce.tooltips,function(e,t,r){if(!s||!g.tooltips)return;if(s[t]===false)return;n=e[t];if(g.tooltips[t]!==true)n=g.tooltips[t].to(r[t]);s[t].innerHTML=n})}function $(){r("update"+Ce.aria);t("update"+Ce.aria,function(e,t,s,r,o){d.forEach(function(e){var t=c[e];var r=D(S,e,0,true,true,true);var n=D(S,e,100,true,true,true);var i=o[e];var a=String(g.ariaFormat.to(s[e]));r=w.fromStepping(r).toFixed(1);n=w.fromStepping(n).toFixed(1);i=w.fromStepping(i).toFixed(1);t.children[0].setAttribute("aria-valuemin",r);t.children[0].setAttribute("aria-valuemax",n);t.children[0].setAttribute("aria-valuenow",i);t.children[0].setAttribute("aria-valuetext",a)})})}function G(e){var t;var r;var n;if(e.mode===Pe.PipsMode.Range||e.mode===Pe.PipsMode.Steps)return w.xVal;if(e.mode===Pe.PipsMode.Count){if(e.values<2)throw new Error("noUiSlider: 'values' (>=2) required for mode 'count'.");t=e.values-1;r=100/t;n=[];while(t--)n[t]=t*r;n.push(100);return J(n,e.stepped)}if(e.mode===Pe.PipsMode.Positions)return J(e.values,e.stepped);if(e.mode===Pe.PipsMode.Values){if(e.stepped)return e.values.map(function(e){return w.fromStepping(w.getStep(w.toStepping(e)))});return e.values}return[]}function J(e,t){return e.map(function(e){return w.fromStepping(t?w.getStep(e):e)})}function K(v){var m=G(v);var g={};var e=w.xVal[0];var t=w.xVal[w.xVal.length-1];var b=false;var S=false;var x=0;function y(e,t){return Number((e+t).toFixed(7))}m=ke(m.slice().sort(function(e,t){return e-t}));if(m[0]!==e){m.unshift(e);b=true}if(m[m.length-1]!==t){m.push(t);S=true}m.forEach(function(e,t){var r;var n;var i;var a=e;var s=m[t+1];var o;var l;var u;var f;var c;var p;var d;var h=v.mode===Pe.PipsMode.Steps;if(h)r=w.xNumSteps[t];if(!r)r=s-a;if(s===undefined)s=a;r=Math.max(r,1e-7);for(n=a;n<=s;n=y(n,r)){o=w.toStepping(n);l=o-x;c=l/(v.density||1);p=Math.round(c);d=l/p;for(i=1;i<=p;i+=1){u=x+i*d;g[u.toFixed(5)]=[w.fromStepping(u),0]}f=m.indexOf(n)>-1?Pe.PipsType.LargeValue:h?Pe.PipsType.SmallValue:Pe.PipsType.NoValue;if(!t&&b&&n!==s)f=0;if(!(n===s&&S))g[o.toFixed(5)]=[n,f];x=o}});return g}function Q(t,i,a){var e,r;var s=v.createElement("div");var o=(e={},e[Pe.PipsType.None]="",e[Pe.PipsType.NoValue]=g.cssClasses.valueNormal,e[Pe.PipsType.LargeValue]=g.cssClasses.valueLarge,e[Pe.PipsType.SmallValue]=g.cssClasses.valueSub,e);var l=(r={},r[Pe.PipsType.None]="",r[Pe.PipsType.NoValue]=g.cssClasses.markerNormal,r[Pe.PipsType.LargeValue]=g.cssClasses.markerLarge,r[Pe.PipsType.SmallValue]=g.cssClasses.markerSub,r);var u=[g.cssClasses.valueHorizontal,g.cssClasses.valueVertical];var f=[g.cssClasses.markerHorizontal,g.cssClasses.markerVertical];Le(s,g.cssClasses.pips);Le(s,g.ort===0?g.cssClasses.pipsHorizontal:g.cssClasses.pipsVertical);function c(e,t){var r=t===g.cssClasses.value;var n=r?u:f;var i=r?o:l;return t+" "+n[g.ort]+" "+i[e]}function n(e,t,r){var n;r=i?i(t,r):r;if(r===Pe.PipsType.None)return;n=E(s,false);n.className=c(r,g.cssClasses.marker);n.style[g.style]=e+"%";if(r>Pe.PipsType.NoValue){n=E(s,false);n.className=c(r,g.cssClasses.value);n.setAttribute("data-value",String(t));n.style[g.style]=e+"%";n.innerHTML=String(a.to(t))}}Object.keys(t).forEach(function(e){n(e,t[e][0],t[e][1])});return s}function N(){if(i){Ne(i);i=null}}function V(e){var t;var r;var n;N();r=K(e);t=e.filter;n=e.format||{to:function(e){return String(Math.round(e))}};i=u.appendChild(Q(r,t,n));return i}function Z(){var e=f.getBoundingClientRect();var t="offset"+["Width","Height"][g.ort];return g.ort===0?e.width||f[t]:e.height||f[t]}function A(r,n,i,a){var t=function(e){var t=ee(e,a.pageOffset,a.target||n);if(!t)return false;if(X()&&!a.doNotReject)return false;if(ze(u,g.cssClasses.tap)&&!a.doNotReject)return false;if(r===l.start&&t.buttons!==undefined&&t.buttons>1)return false;if(a.hover&&t.buttons)return false;if(!j)t.preventDefault();t.calcPoint=t.points[g.ort];i(t,a)};var s=[];r.split(" ").forEach(function(e){n.addEventListener(e,t,j?{passive:true}:false);s.push([e,t])});return s}function ee(t,e,r){var n=t.type.indexOf("touch")===0;var i=t.type.indexOf("mouse")===0;var a=t.type.indexOf("pointer")===0;var s=0;var o=0;var l;var u;var f;if(t.type.indexOf("MSPointer")===0)a=true;if(t.type==="mousedown"&&!t.buttons&&!t.touches)return false;if(n){l=function(e){return e.target===r||r.contains(e.target)||t.composed&&t.composedPath().shift()===r};if(t.type==="touchstart"){u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return false;s=u[0].pageX;o=u[0].pageY}else{f=Array.prototype.find.call(t.changedTouches,l);if(!f)return false;s=f.pageX;o=f.pageY}}e=e||je(v);if(i||a){s=t.clientX+e.x;o=t.clientY+e.y}t.pageOffset=e;t.points=[s,o];t.cursor=i||a;return t}function te(e){var t=e-Me(f,g.ort);var r=t*100/Z();r=De(r);return g.dir?100-r:r}function re(o){var l=100;var u=false;c.forEach(function(e,t){var r;var n;var i;var a;var s;if(P(t))return;r=S[t];n=Math.abs(r-o);i=n===100&&l===100;a=n<l;s=n<=l&&o>r;if(a||s||i){u=t;l=n}});return u}function ne(e,t){if(e.type==="mouseout"&&e.target.nodeName==="HTML"&&e.relatedTarget===null)k(e,t)}function ie(e,t){var r;var n;if(navigator.appVersion.indexOf("MSIE 9")===-1&&e.buttons===0&&t.buttonsProperty!==0)return k(e,t);r=(g.dir?-1:1)*(e.calcPoint-t.startCalcPoint);n=r*100/t.baseSize;fe(r>0,n,t.locations,t.handleNumbers,t.connect)}function k(e,t){if(t.handle){Te(t.handle,g.cssClasses.active);h-=1}t.listeners.forEach(function(e){m.removeEventListener(e[0],e[1])});if(h===0){Te(u,g.cssClasses.drag);L();if(e.cursor){x.style.cursor="";x.removeEventListener("selectstart",Ae)}}if(g.events.smoothSteps){t.handleNumbers.forEach(function(e){T(e,S[e],true,true,false,false)});t.handleNumbers.forEach(function(e){U("update",e)})}t.handleNumbers.forEach(function(e){U("change",e);U("set",e);U("end",e)})}function M(e,t){var r;var n;var i;var a;var s;var o;if(t.handleNumbers.some(P))return;if(t.handleNumbers.length===1){n=c[t.handleNumbers[0]];r=n.children[0];h+=1;Le(r,g.cssClasses.active)}e.stopPropagation();i=[];a=A(l.move,m,ie,{target:e.target,handle:r,connect:t.connect,listeners:i,startCalcPoint:e.calcPoint,baseSize:Z(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:S.slice()});s=A(l.end,m,k,{target:e.target,handle:r,listeners:i,doNotReject:true,handleNumbers:t.handleNumbers});o=A("mouseout",m,ne,{target:e.target,handle:r,listeners:i,doNotReject:true,handleNumbers:t.handleNumbers});i.push.apply(i,a.concat(s,o));if(e.cursor){x.style.cursor=getComputedStyle(e.target).cursor;if(c.length>1)Le(u,g.cssClasses.drag);x.addEventListener("selectstart",Ae,false)}t.handleNumbers.forEach(function(e){U("start",e)})}function ae(e){var t;var r;e.stopPropagation();t=te(e.calcPoint);r=re(t);if(r===false)return;if(!g.events.snap)Ue(u,g.cssClasses.tap,g.animationDuration);T(r,t,true,true);L();U("slide",r,true);U("update",r,true);if(!g.events.snap){U("change",r,true);U("set",r,true)}else M(e,{handleNumbers:[r]})}function se(e){var t=te(e.calcPoint);var r=w.getStep(t);var n=w.fromStepping(r);Object.keys(o).forEach(function(e){if("hover"===e.split(".")[0])o[e].forEach(function(e){e.call(y,n)})})}function oe(e,t){var r;var n;var i;var a;var s;var o;var l;var u;var f;var c;var p;var d;var h;var v;var m;if(X()||P(t))return false;r=["Left","Right"];n=["Down","Up"];i=["PageDown","PageUp"];a=["Home","End"];if(g.dir&&!g.ort)r.reverse();else if(g.ort&&!g.dir){n.reverse();i.reverse()}s=e.key.replace("Arrow","");o=s===i[0];l=s===i[1];u=s===n[0]||s===r[0]||o;f=s===n[1]||s===r[1]||l;c=s===a[0];p=s===a[1];if(!u&&!f&&!c&&!p)return true;e.preventDefault();if(f||u){h=u?0:1;v=xe(t);m=v[h];if(m===null)return false;if(m===false)m=w.getDefaultStep(S[t],u,g.keyboardDefaultStep);if(l||o)m*=g.keyboardPageMultiplier;else m*=g.keyboardMultiplier;m=Math.max(m,1e-7);m=(u?-1:1)*m;d=b[t]+m}else if(p)d=g.spectrum.xVal[g.spectrum.xVal.length-1];else d=g.spectrum.xVal[0];T(t,w.toStepping(d),true,true);U("slide",t);U("update",t);U("change",t);U("set",t);return false}function le(r){var n;var i;var a;var s;var o;if(!r.fixed)c.forEach(function(e,t){A(l.start,e.children[0],M,{handleNumbers:[t]})});if(r.tap)A(l.start,f,ae,{});if(r.hover)A(l.move,f,se,{hover:true});if(r.drag)p.forEach(function(t,e){if(t===false||e===0||e===p.length-1)return;n=c[e-1];i=c[e];a=[t];s=[n,i];o=[e-1,e];Le(t,g.cssClasses.draggable);if(r.fixed){a.push(n.children[0]);a.push(i.children[0])}if(r.dragAll){s=c;o=d}a.forEach(function(e){A(l.start,e,M,{handles:s,handleNumbers:o,connect:t})})})}function t(e,t){o[e]=o[e]||[];o[e].push(t);if(e.split(".")[0]==="update")c.forEach(function(e,t){U("update",t)})}function ue(e){return e===Ce.aria||e===Ce.tooltips}function r(e){var n=e&&e.split(".")[0];var i=n?e.substring(n.length):e;Object.keys(o).forEach(function(e){var t=e.split(".")[0];var r=e.substring(t.length);if((!n||n===t)&&(!i||i===r))if(!ue(r)||i===r)delete o[e]})}function U(r,n,i){Object.keys(o).forEach(function(e){var t=e.split(".")[0];if(r===t)o[e].forEach(function(e){e.call(y,b.map(g.format.to),n,b.slice(),i||false,S.slice(),y)})})}function D(e,t,r,n,i,a,s){var o;if(c.length>1&&!g.events.unconstrained){if(n&&t>0){o=w.getAbsoluteDistance(e[t-1],g.margin,false);r=Math.max(r,o)}if(i&&t<c.length-1){o=w.getAbsoluteDistance(e[t+1],g.margin,true);r=Math.min(r,o)}}if(c.length>1&&g.limit){if(n&&t>0){o=w.getAbsoluteDistance(e[t-1],g.limit,false);r=Math.min(r,o)}if(i&&t<c.length-1){o=w.getAbsoluteDistance(e[t+1],g.limit,true);r=Math.max(r,o)}}if(g.padding){if(t===0){o=w.getAbsoluteDistance(0,g.padding[0],false);r=Math.max(r,o)}if(t===c.length-1){o=w.getAbsoluteDistance(100,g.padding[1],true);r=Math.min(r,o)}}if(!s)r=w.getStep(r);r=De(r);if(r===e[t]&&!a)return false;return r}function O(e,t){var r=g.ort;return(r?t:e)+", "+(r?e:t)}function fe(e,n,r,t,i){var a=r.slice();var s=t[0];var o=g.events.smoothSteps;var l=[!e,e];var u=[e,!e];var f=false;t=t.slice();if(e)t.reverse();if(t.length>1)t.forEach(function(e,t){var r=D(a,e,a[e]+n,l[t],u[t],false,o);if(r===false)n=0;else{n=r-a[e];a[e]=r}});else l=u=[true];t.forEach(function(e,t){f=T(e,r[e]+n,l[t],u[t],false,o)||f});if(f){t.forEach(function(e){U("update",e);U("slide",e)});if(i!==undefined)U("drag",s)}}function ce(e,t){return g.dir?100-e-t:e}function pe(e,t){var r;var n;S[e]=t;b[e]=w.fromStepping(t);r=ce(t,0)-H;n="translate("+O(r+"%","0")+")";c[e].style[g.transformRule]=n;de(e);de(e+1)}function L(){d.forEach(function(e){var t=S[e]>50?-1:1;var r=3+(c.length+t*e);c[e].style.zIndex=String(r)})}function T(e,t,r,n,i,a){if(!i)t=D(S,e,t,r,n,false,a);if(t===false)return false;pe(e,t);return true}function de(e){var t;var r;var n;var i;var a;if(!p[e])return;t=0;r=100;if(e!==0)t=S[e-1];if(e!==p.length-1)r=S[e];n=r-t;i="translate("+O(ce(t,n)+"%","0")+")";a="scale("+O(n/100,"1")+")";p[e].style[g.transformRule]=i+" "+a}function he(e,t){if(e===null||e===false||e===undefined)return S[t];if(typeof e==="number")e=String(e);e=g.format.from(e);if(e!==false)e=w.toStepping(e);if(e===false||isNaN(e))return S[t];return e}function ve(t){return function(e){T(e,S[e],true,true,t)}}function z(e,t,r){var n=Oe(e);var i=S[0]===undefined;var a;var s;t=t===undefined?true:t;if(g.animate&&!i)Ue(u,g.cssClasses.tap,g.animationDuration);d.forEach(function(e){T(e,he(n[e],e),true,false,r)});a=d.length===1?0:1;if(i&&w.hasNoSize()){r=true;S[0]=0;if(d.length>1){s=100/(d.length-1);d.forEach(function(e){S[e]=e*s})}}for(;a<d.length;++a)d.forEach(ve(r));L();d.forEach(function(e){U("update",e);if(n[e]!==null&&t)U("set",e)})}function me(e){z(g.start,e)}function ge(e,t,r,n){e=Number(e);if(!(e>=0&&e<d.length))throw new Error("noUiSlider: invalid handle number, got: "+e);T(e,he(t,e),true,true,n);U("update",e);if(r)U("set",e)}function be(e){var t;if(e===void 0)e=false;if(e)return b.length===1?b[0]:b.slice(0);t=b.map(g.format.to);if(t.length===1)return t[0];return t}function Se(){r(Ce.aria);r(Ce.tooltips);Object.keys(g.cssClasses).forEach(function(e){Te(u,g.cssClasses[e])});while(u.firstChild)u.removeChild(u.firstChild);delete u.noUiSlider}function xe(e){var t=S[e];var r=w.getNearbySteps(t);var n=b[e];var i=r.thisStep.step;var a=null;var s;if(g.snap)return[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null];if(i!==false)if(n+i>r.stepAfter.startValue)i=r.stepAfter.startValue-n;if(n>r.thisStep.startValue)a=r.thisStep.step;else if(r.stepBefore.step===false)a=false;else a=n-r.stepBefore.highestStep;if(t===100)i=null;else if(t===0)a=null;s=w.countStepDecimals();if(i!==null&&i!==false)i=Number(i.toFixed(s));if(a!==null&&a!==false)a=Number(a.toFixed(s));return[a,i]}function ye(){return d.map(xe)}function we(t,e){var r=be();var n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];var i;n.forEach(function(e){if(t[e]!==undefined)a[e]=t[e]});i=_e(a);n.forEach(function(e){if(t[e]!==undefined)g[e]=i[e]});w=i.spectrum;g.margin=i.margin;g.limit=i.limit;g.padding=i.padding;if(g.pips)V(g.pips);else N();if(g.tooltips)W();else C();S=[];z(Ve(t.start)?t.start:r,e)}function Ee(){f=B(u);_(g.connect,f);le(g.events);z(g.start);if(g.pips)V(g.pips);if(g.tooltips)W();$()}Ee();y={destroy:Se,steps:ye,on:t,off:r,get:be,set:z,setHandle:ge,reset:me,disable:Y,enable:I,__moveHandles:function(e,t,r){fe(e,t,S,r)},options:a,updateOptions:we,target:u,removePips:N,removeTooltips:C,getPositions:function(){return S.slice()},getTooltips:function(){return s},getOrigins:function(){return c},pips:V};return y}function g(e,t){var r;var n;if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");r=_e(t);n=X(e,r,t);e.noUiSlider=n;return n}n[n.None=-1]="None",n[n.NoValue=0]="NoValue",n[n.LargeValue=1]="LargeValue",n[n.SmallValue=2]="SmallValue",e={__spectrum:r,cssClasses:u,create:g},Pe.create=g,Pe.cssClasses=u,Pe.default=e,Object.defineProperty(Pe,"__esModule",{value:true})}(e.noUiSlider={})}(this);
!function(m){"use strict";var t,e,a,v=/^\s+/,w=/\s+$/,n=0,o=m.round,y=m.min,_=m.max,r=m.random,x={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},s=function(t){var e,a={};for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[t[e]]=e);return a}(x),k=(e="[\\s|\\(]+("+(t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function A(t){return k.CSS_UNIT.exec(t)}function S(t){return parseInt(t,16)}function C(t){return S(t)/255}function P(t){return t=parseFloat(t),t=isNaN(t)||t<0||1<t?1:t}function R(t,e){var a;return"string"==typeof(a=t)&&-1!==a.indexOf(".")&&1===parseFloat(a)&&(t="100%"),a="string"==typeof(a=t)&&-1!==a.indexOf("%"),t=y(e,_(0,parseFloat(t))),a&&(t=parseInt(t*e,10)/100),m.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function i(t){return y(1,_(0,t))}function l(t){return 1===t.length?"0"+t:""+t}function F(t){return t=t<=1?100*t+"%":t}function c(t){return m.round(255*parseFloat(t)).toString(16)}function f(t,e,a){var n,r,o,s,i,l;if(t=R(t,255),e=R(e,255),a=R(a,255),i=((n=_(t,e,a))+(r=y(t,e,a)))/2,n===r)o=s=0;else{switch(l=n-r,s=.5<i?l/(2-n-r):l/(n+r),n){case t:o=(e-a)/l+(e<a?6:0);break;case e:o=(a-t)/l+2;break;case a:o=(t-e)/l+4}o/=6}return{h:o,s:s,l:i}}function u(t,e,a){var n,r,o,s,i,l;if(t=R(t,255),e=R(e,255),a=R(a,255),l=(i=n=_(t,e,a))-(r=y(t,e,a)),s=0===n?0:l/n,n===r)o=0;else{switch(n){case t:o=(e-a)/l+(e<a?6:0);break;case e:o=(a-t)/l+2;break;case a:o=(t-e)/l+4}o/=6}return{h:o,s:s,v:i}}function d(t,e,a,n){t=[l(o(t).toString(16)),l(o(e).toString(16)),l(o(a).toString(16))];return n&&t[0].charAt(0)===t[0].charAt(1)&&t[1].charAt(0)===t[1].charAt(1)&&t[2].charAt(0)===t[2].charAt(1)?t[0].charAt(0)+t[1].charAt(0)+t[2].charAt(0):t.join("")}function h(t,e,a,n){return[l(c(n)),l(o(t).toString(16)),l(o(e).toString(16)),l(o(a).toString(16))].join("")}function p(t){var e,a,n,r,o,s,i,l,c,f,u={r:0,g:0,b:0},d=1,h=null,p=!1,g=!1;function b(t,e,a){return a<0&&(a+=1),1<a&&--a,a<1/6?t+6*(e-t)*a:a<.5?e:a<2/3?t+(e-t)*(2/3-a)*6:t}return d=P(d="object"==typeof(t="string"==typeof t?function(t){var e,a=!1;if(t=t.replace(v,"").replace(w,"").toLowerCase(),x[t])t=x[t],a=!0;else if("transparent"===t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=k.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=k.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=k.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=k.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=k.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=k.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=k.hex8.exec(t))?{r:S(e[1]),g:S(e[2]),b:S(e[3]),a:C(e[4]),format:a?"name":"hex8"}:(e=k.hex6.exec(t))?{r:S(e[1]),g:S(e[2]),b:S(e[3]),format:a?"name":"hex"}:(e=k.hex4.exec(t))?{r:S(e[1]+""+e[1]),g:S(e[2]+""+e[2]),b:S(e[3]+""+e[3]),a:C(e[4]+""+e[4]),format:a?"name":"hex8"}:!!(e=k.hex3.exec(t))&&{r:S(e[1]+""+e[1]),g:S(e[2]+""+e[2]),b:S(e[3]+""+e[3]),format:a?"name":"hex"}}(t):t)&&(A(t.r)&&A(t.g)&&A(t.b)?(l=t.r,c=t.g,f=t.b,u={r:255*R(l,255),g:255*R(c,255),b:255*R(f,255)},p=!0,g="%"===String(t.r).substring(String(t.r).length-1)?"prgb":"rgb"):A(t.h)&&A(t.s)&&A(t.v)?(h=F(t.s),l=F(t.v),c=t.h,f=h,r=l,c=6*R(c,360),f=R(f,100),u={r:255*[r=R(r,100),s=r*(1-(i=c-(c=m.floor(c)))*f),o=r*(1-f),o,i=r*(1-(1-i)*f),r][f=c%6],g:255*[i,r,r,s,o,o][f],b:255*[o,o,i,r,r,s][f]},p=!0,g="hsv"):A(t.h)&&A(t.s)&&A(t.l)&&(h=F(t.s),o=F(t.l),i=t.h,r=h,s=o,i=R(i,360),r=R(r,100),s=R(s,100),0===r?e=a=n=s:(e=b(r=2*s-(s=s<.5?s*(1+r):s+r-s*r),s,i+1/3),a=b(r,s,i),n=b(r,s,i-1/3)),u={r:255*e,g:255*a,b:255*n},p=!0,g="hsl"),Object.prototype.hasOwnProperty.call(t,"a"))?t.a:d),{ok:p,format:t.format||g,r:y(255,_(u.r,0)),g:y(255,_(u.g,0)),b:y(255,_(u.b,0)),a:d}}function g(t,e){var a;return e=e||{},(t=t||"")instanceof g?t:this instanceof g?(a=p(t),this._originalInput=t,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=o(100*this._a)/100,e.format?this._format=e.format:this._format=a.format,this._gradientType=e.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=a.ok,n+=1,void(this._tc_id=n)):new g(t,e)}function b(t,e){return new g(t,e)}function H(t,e){return e=0===e?0:e||10,(t=b(t).toHsl()).s-=e/100,t.s=i(t.s),b(t)}function T(t,e){return e=0===e?0:e||10,(t=b(t).toHsl()).s+=e/100,t.s=i(t.s),b(t)}function M(t){return b(t).desaturate(100)}function O(t,e){return e=0===e?0:e||10,(t=b(t).toHsl()).l+=e/100,t.l=i(t.l),b(t)}function z(t,e){return e=0===e?0:e||10,(t=b(t).toRgb()).r=_(0,y(255,t.r-o(-e/100*255))),t.g=_(0,y(255,t.g-o(-e/100*255))),t.b=_(0,y(255,t.b-o(-e/100*255))),b(t)}function j(t,e){return e=0===e?0:e||10,(t=b(t).toHsl()).l-=e/100,t.l=i(t.l),b(t)}function E(t,e){t=b(t).toHsl(),e=(t.h+e)%360;return t.h=e<0?360+e:e,b(t)}function I(t){t=b(t).toHsl();return t.h=(t.h+180)%360,b(t)}function N(t){var e=b(t).toHsl(),a=e.h;return[b(t),b({h:(a+120)%360,s:e.s,l:e.l}),b({h:(a+240)%360,s:e.s,l:e.l})]}function q(t){var e=b(t).toHsl(),a=e.h;return[b(t),b({h:(a+90)%360,s:e.s,l:e.l}),b({h:(a+180)%360,s:e.s,l:e.l}),b({h:(a+270)%360,s:e.s,l:e.l})]}function D(t){var e=b(t).toHsl(),a=e.h;return[b(t),b({h:(a+72)%360,s:e.s,l:e.l}),b({h:(a+216)%360,s:e.s,l:e.l})]}g.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t=this.toRgb(),e=t.r/255,a=t.g/255,t=t.b/255,e=e<=.03928?e/12.92:m.pow((.055+e)/1.055,2.4),a=a<=.03928?a/12.92:m.pow((.055+a)/1.055,2.4),t=t<=.03928?t/12.92:m.pow((.055+t)/1.055,2.4);return.2126*e+.7152*a+.0722*t},setAlpha:function(t){return this._a=P(t),this._roundA=o(100*this._a)/100,this},toHsv:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=u(this._r,this._g,this._b),e=o(360*t.h),a=o(100*t.s),t=o(100*t.v);return 1===this._a?"hsv("+e+", "+a+"%, "+t+"%)":"hsva("+e+", "+a+"%, "+t+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=o(360*t.h),a=o(100*t.s),t=o(100*t.l);return 1===this._a?"hsl("+e+", "+a+"%, "+t+"%)":"hsla("+e+", "+a+"%, "+t+"%, "+this._roundA+")"},toHex:function(t){return d(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return e=this._r,a=this._g,n=this._b,r=this._a,t=t,e=[l(o(e).toString(16)),l(o(a).toString(16)),l(o(n).toString(16)),l(c(r))],t&&e[0].charAt(0)===e[0].charAt(1)&&e[1].charAt(0)===e[1].charAt(1)&&e[2].charAt(0)===e[2].charAt(1)&&e[3].charAt(0)===e[3].charAt(1)?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0)+e[3].charAt(0):e.join("");var e,a,n,r},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1===this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*R(this._r,255))+"%",g:o(100*R(this._g,255))+"%",b:o(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1===this._a?"rgb("+o(100*R(this._r,255))+"%, "+o(100*R(this._g,255))+"%, "+o(100*R(this._b,255))+"%)":"rgba("+o(100*R(this._r,255))+"%, "+o(100*R(this._g,255))+"%, "+o(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&s[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),a=e;return"progid:DXImageTransform.Microsoft.gradient("+(this._gradientType?"GradientType=1, ":"")+"startColorstr="+e+",endColorstr="+(a=t?"#"+h((e=b(t))._r,e._g,e._b,e._a):a)+")"},toString:function(t){var e,a,n=!!t;return t=t||this._format,e=!1,a=this._a<1&&0<=this._a,n||!a||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),(e="hsv"===t?this.toHsvString():e)||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(t,e){t=t.apply(null,[this].concat([].slice.call(e)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(O,arguments)},brighten:function(){return this._applyModification(z,arguments)},darken:function(){return this._applyModification(j,arguments)},desaturate:function(){return this._applyModification(H,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(M,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},complement:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(N,arguments)},tetrad:function(){return this._applyCombination(q,arguments)}},g.fromRatio=function(t,e){var a,n;if("object"==typeof t){for(n in a={},t)Object.prototype.hasOwnProperty.call(t,n)&&(a[n]="a"===n?t[n]:F(t[n]));t=a}return b(t,e)},g.equals=function(t,e){return!(!t||!e)&&b(t).toRgbString()===b(e).toRgbString()},g.random=function(){return g.fromRatio({r:r(),g:r(),b:r()})},g.mix=function(t,e,a){return a=0===a?0:a||50,t=b(t).toRgb(),e=b(e).toRgb(),b({r:(e.r-t.r)*(a=a/100)+t.r,g:(e.g-t.g)*a+t.g,b:(e.b-t.b)*a+t.b,a:(e.a-t.a)*a+t.a})},g.readability=function(t,e){t=b(t),e=b(e);return(m.max(t.getLuminance(),e.getLuminance())+.05)/(m.min(t.getLuminance(),e.getLuminance())+.05)},g.isReadable=function(t,e,a){var n=g.readability(t,e),r=!1;switch((a={level:e="AA"!==(e=((t=(t=a)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e?"AA":e,size:e="small"!==(e=(t.size||"small").toLowerCase())&&"large"!==e?"small":e}).level+a.size){case"AAsmall":case"AAAlarge":r=4.5<=n;break;case"AAlarge":r=3<=n;break;case"AAAsmall":r=7<=n}return r},g.mostReadable=function(t,e,a){for(var n,r=null,o=0,s=(a=a||{}).includeFallbackColors,i=a.level,l=a.size,c=0;c<e.length;c+=1)o<(n=g.readability(t,e[c]))&&(o=n,r=b(e[c]));return g.isReadable(t,r,{level:i,size:l})||!s?r:(a.includeFallbackColors=!1,g.mostReadable(t,["#fff","#000"],a))},g.names=x,g.hexNames=s,void 0!==window.module&&window.module.exports?window.module.exports=g:"function"==typeof window.define&&window.define.amd?window.define(function(){return g}):window.tinycolor=g}(Math),function(t){"use strict";"function"==typeof window.define&&window.define.amd?window.define(["jquery"],t):"object"==typeof exports&&"object"==typeof module?window.module.exports=t(window.require("jquery")):t(window.jQuery)}(function(It){"use strict";var t,o="spectrum.id",Nt=window.tinycolor,qt={beforeShow:a,move:a,change:a,show:a,hide:a,color:!1,flat:!1,type:"color",showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:8,locale:"en",cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",preferredFormat:"hex",className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"epo",palette:[["#000000","#444444","#5b5b5b","#999999","#bcbcbc","#eeeeee","#f3f6f4","#ffffff"],["#f44336","#744700","#ce7e00","#8fce00","#2986cc","#16537e","#6a329f","#c90076"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#cc0000","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#990000","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#660000","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]],selectionPalette:[],disabled:!1,offset:null},Dt=[],Lt=!!/msie/i.exec(window.navigator.userAgent),Bt=((t=document.createElement("div").style).cssText="background-color:rgba(0,0,0,.5)",e(t.backgroundColor,"rgba")||e(t.backgroundColor,"hsla")),$t=['<button type="button" class="sp-replacer">','<span class="sp-preview"><span class="sp-preview-inner"></span></span>','<span class="sp-dd">&#9660;</span>',"</button>"].join(""),Kt=function(){var t,e="";if(Lt)for(t=1;t<=6;t++)e+="<div class='sp-"+t+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger' tabindex='0'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider' tabindex='0'></div>",e,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle' tabindex='0'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false'>","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<button type='button' class='sp-cancel'></button>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function e(t,e){return 1!==(""+t).indexOf(e)}function Vt(t,e,a,n){for(var r,o,s,i,l=[],c=0;c<t.length;c++)(s=t[c])?(o=(r=Nt(s)).toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light",o+=Nt.equals(e,s)?" sp-thumb-active":"",s=r.toString(n.preferredFormat||"rgb"),i=Bt?"background-color:"+r.toRgbString():"filter:"+r.toFilter(),l.push('<span title="'+s+'" data-color="'+r.toRgbString()+'" class="'+o+'" role="button" tabindex="0"><span class="sp-thumb-inner" style="'+i+';"></span></span>')):l.push('<span class="sp-thumb-el sp-clear-display" role="button" tabindex="0"><span class="sp-clear-palette-only" style="background-color: transparent;"></span></span>');return"<div class='sp-cf "+a+"'>"+l.join("")+"</div>"}function s(t,e){n=t,(e=e).locale=e.locale||window.navigator.language,e.locale&&(e.locale=e.locale.split("-")[0].toLowerCase()),"en"!==e.locale&&It.spectrum.localization[e.locale]&&(e=It.extend({},It.spectrum.localization[e.locale],e)),(e=It.extend({},qt,e)).callbacks={move:Wt(e.move,n),change:Wt(e.change,n),show:Wt(e.show,n),hide:Wt(e.hide,n),beforeShow:Wt(e.beforeShow,n)};var E,I,N,q,D,a,l=e,n=l.type,c="flat"===n,L=l.showSelectionPalette,r=l.localStorageKey,e=l.theme,o=l.callbacks,B=(I=j,function(){var t=this,e=arguments;q&&clearTimeout(D),!q&&D||(D=setTimeout(function(){D=null,I.apply(t,e)},N))}),f=!(N=10),$=!1,u=0,d=0,h=0,K=0,V=0,U=0,W=0,s=0,X=0,Y=0,i=1,p=[],G=[],Q={},g=l.selectionPalette.slice(0),J=l.maxSelectionSize,Z="sp-dragging",tt=!1,b=null,et=t.ownerDocument,m=It(t),at=!1,v=It(Kt,et).addClass(e),nt=v.find(".sp-picker-container"),rt=v.find(".sp-color"),ot=v.find(".sp-dragger"),st=v.find(".sp-hue"),it=v.find(".sp-slider"),lt=v.find(".sp-alpha-inner"),ct=v.find(".sp-alpha"),ft=v.find(".sp-alpha-handle"),w=v.find(".sp-input"),ut=v.find(".sp-palette"),dt=v.find(".sp-initial"),t=v.find(".sp-cancel"),ht=v.find(".sp-clear"),pt=v.find(".sp-choose"),gt=v.find(".sp-palette-toggle"),bt=m.is("input"),mt=bt&&"color"===n,y=mt?It($t).addClass(e).addClass(l.className).addClass(l.replacerClassName):It([]),vt=mt?y:m,_=y.find(".sp-preview-inner"),x=l.color||bt&&m.val(),k=!1,A=l.preferredFormat,wt=!l.showButtons||l.clickoutFiresChange,S=!x,C=l.allowEmpty,P=null,R=null,yt=null,_t=null,e=m.attr("id");function xt(){var t,e,a;if(l.showPaletteOnly&&(l.showPalette=!0),gt.text(l.showPaletteOnly?l.togglePaletteMoreText:l.togglePaletteLessText),l.palette){for(p=l.palette.slice(0),G=Array.isArray(p[0])?p:[p],Q={},t=0;t<G.length;t++)for(e=0;e<G[t].length;e++)a=Nt(G[t][e]).toRgbString(),Q[a]=!0;l.showPaletteOnly&&!x&&(x=(""===p[0][0]?p[0]:Object.keys(Q))[0])}v.toggleClass("sp-flat",c),v.toggleClass("sp-input-disabled",!l.showInput),v.toggleClass("sp-alpha-enabled",l.showAlpha),v.toggleClass("sp-clear-enabled",C),v.toggleClass("sp-buttons-disabled",!l.showButtons),v.toggleClass("sp-palette-buttons-disabled",!l.togglePaletteOnly),v.toggleClass("sp-palette-disabled",!l.showPalette),v.toggleClass("sp-palette-only",l.showPaletteOnly),v.toggleClass("sp-initial-disabled",!l.showInitial),v.addClass(l.className).addClass(l.containerClassName),j()}function kt(){var t,e;if(r){try{1<(e=(t=window.localStorage)[r].split(",#")).length&&(delete t[r],It.each(e,function(t,e){At(e)}))}catch(t){window.console.log(t)}try{g=window.localStorage[r].split(";")}catch(t){window.console.log(t)}}}function At(t){if(L){if(t=Nt(t).toRgbString(),!Q[t]&&-1===It.inArray(t,g))for(g.push(t);g.length>J;)g.shift();if(r)try{window.localStorage[r]=g.join(";")}catch(t){window.console.log(t)}}}function St(){var a=T(),t=It.map(G,function(t,e){return Vt(t,a,"sp-palette-row sp-palette-row-"+e,l)});kt(),g&&t.push(Vt(function(){var t,e,a=[];if(l.showPalette)for(t=0;t<g.length;t++)e=Nt(g[t]).toRgbString(),Q[e]||a.push(g[t]);return a.reverse().slice(0,l.maxSelectionSize)}(),a,"sp-palette-row sp-palette-row-selection",l)),ut.html(t.join(""))}function Ct(){var t,e;l.showInitial&&(t=k,e=T(),dt.html(Vt([t,e],e,"sp-palette-row-initial",l)))}function Pt(){(d<=0||u<=0||K<=0)&&j(),$=!0,v.addClass(Z),b=null,m.trigger("dragstart.spectrum",[T()])}function Rt(){$=!1,v.removeClass(Z),m.trigger("dragstop.spectrum",[T()])}function Ft(t){tt?tt=!1:null!==t&&""!==t||!C?(t=Nt(t)).isValid()?(H(t),M(),z()):w.addClass("sp-validation-error"):(H(null),M(),z())}function Ht(){var t=It.Event("beforeShow.spectrum");if(f)j();else if(m.trigger(t,[T()]),!1!==o.beforeShow(T())&&!t.isDefaultPrevented()){for(var e=0;e<Dt.length;e++)Dt[e]&&Dt[e].hide();f=!0,It(et).on("keydown.spectrum",Tt),It(et).on("click.spectrum",Mt),It(window).on("resize.spectrum",B),y.attr("aria-expanded",!0),y.addClass("sp-active"),v.removeClass("sp-hidden"),j(),O(),k=T(),Ct(),o.show(k),m.trigger("show.spectrum",[k])}}function Tt(t){27===t.keyCode&&F()}function Mt(t){2===t.button||$||(wt?z(!0):Ot(),F())}function F(){f&&!c&&(f=!1,It(et).off("keydown.spectrum",Tt),It(et).off("click.spectrum",Mt),It(window).off("resize.spectrum",B),y.attr("aria-expanded",!1),y.removeClass("sp-active"),v.addClass("sp-hidden"),o.hide(T()),m.trigger("hide.spectrum",[T()]))}function Ot(){H(k,!0),z(!0)}function H(t,e){var a;Nt.equals(t,T())?O():(t&&void 0!==t||!C?(S=!1,t=(a=Nt(t)).toHsv(),s=t.h%360/360,X=t.s,Y=t.v,i=t.a):S=!0,O(),a&&a.isValid()&&!e&&(A=l.preferredFormat||a.getFormat()))}function T(t){return t=t||{},C&&S?null:Nt.fromRatio({h:s,s:X,v:Y,a:Math.round(1e3*i)/1e3},{format:t.format||A})}function M(){O(),o.move(T()),m.trigger("move.spectrum",[T()])}function O(){var t,e,a,n,r,o;w.removeClass("sp-validation-error"),zt(),t=Nt.fromRatio({h:s,s:1,v:1}),rt.css("background-color",t.toHexString()),t=A,e=T({format:t=!(i<1)||0===i&&"name"===A||"hex"!==A&&"hex3"!==A&&"hex6"!==A&&"name"!==A?A:"rgb"}),a="",_.removeClass("sp-clear-display"),_.css("background-color","transparent"),!e&&C?_.addClass("sp-clear-display"):(n=e.toHexString(),o=e.toRgbString(),Bt||1===e.alpha?_.css("background-color",o):(_.css("background-color","transparent"),_.css("filter",e.toFilter())),l.showAlpha&&((o=e.toRgb()).a=0,r="linear-gradient(left, "+(o=Nt(o).toRgbString())+", "+n+")",Lt?lt.css("filter",Nt(o).toFilter({gradientType:1},n)):(lt.css("background","-webkit-"+r),lt.css("background","-moz-"+r),lt.css("background","-ms-"+r),lt.css("background","linear-gradient(to right, "+o+", "+n+")"))),a=e.toString(t)),l.showInput&&w.val(a),m.val(a),"text"!==l.type&&"component"!==l.type||((r=e)&&R?(o=r.isLight()||r.getAlpha()<.4?"black":"white",R.css("background-color",r.toRgbString()).css("color",o)):R.css("background-color",_t).css("color",yt)),l.showPalette&&St(),Ct()}function zt(){var t=X,e=Y;C&&S?(ft.hide(),it.hide(),ot.hide()):(ft.show(),it.show(),ot.show(),t=t*u,e=d-e*d,t=Math.max(-h,Math.min(u-h,t-h)),e=Math.max(-h,Math.min(d-h,e-h)),ot.css({top:e+"px",left:t+"px"}),e=i*V,ft.css({left:e-U/2+"px"}),t=s*K,it.css({top:t-W+"px"}))}function z(t){var e=T(),a=!Nt.equals(e,k);e&&At(e),t&&a&&(o.change(e),tt=!0,m.trigger("change",[e]))}function j(){var t,e,a,n,r,o,s,i;f&&(u=rt.width(),d=rt.height(),h=ot.height(),K=st.height(),W=it.height(),V=ct.width(),U=ft.width(),c||(v.attr("aria-haspopup",!0),v.css("position","absolute"),l.offset?v.offset(l.offset):v.offset((e=vt,a=(t=v).outerWidth(),n=t.outerHeight(),r=e.outerHeight(),t=t[0].ownerDocument,o=t.documentElement,s=o.clientWidth+It(t).scrollLeft(),o=o.clientHeight+It(t).scrollTop(),e=(t=e.offset()).left,i=t.top,i+=r,e-=Math.min(e,s<e+a&&a<s?Math.abs(e+a-s):0),{top:i-=Math.min(i,o<i+n&&n<o?Math.abs(+(n+r)):0),bottom:t.bottom,left:e,right:t.right,width:t.width,height:t.height}))),zt(),l.showPalette&&St(),m.trigger("reflow.spectrum"))}function jt(){F(),at=!0,m.attr("disabled",!0),vt.addClass("sp-disabled")}function Et(t){return(t.data&&t.data.ignore?(H(It(t.target).closest(".sp-thumb-el").data("color")),M):(H(It(t.target).closest(".sp-thumb-el").data("color")),M(),l.hideAfterPaletteSelect?(z(!0),F):z))(),!1}return void 0!==e&&0<e.length&&(bt=It('label[for="'+e+'"]')).length&&bt.on("click",function(t){return t.preventDefault(),m.spectrum("show"),!1}),Lt&&v.find("*:not(input)").attr("unselectable","on"),xt(),P=It('<span class="sp-original-input-container"></span>'),["margin"].forEach(function(t){P.css(t,m.css(t))}),"block"===m.css("display")&&P.css("display","flex"),mt?m.after(y).hide():"text"===n?(P.addClass("sp-colorize-container"),m.addClass("spectrum sp-colorize").wrap(P)):"component"===n&&(m.addClass("spectrum").wrap(P),(a=It(["<div class='sp-colorize-container sp-add-on'>","<div class='sp-colorize'></div> ","</div>"].join(""))).width(m.outerHeight()+"px").css("border-radius",m.css("border-radius")).css("border",m.css("border")),m.addClass("with-add-on").before(a)),R=m.parent().find(".sp-colorize"),yt=R.css("color"),_t=R.css("background-color"),C||ht.hide(),c?m.after(v).hide():(a=1!==(a="parent"===l.appendTo?m.parent():It(l.appendTo)).length?It("body"):a).append(v),kt(),vt.on("click.spectrum touchstart.spectrum",function(t){at||Ht(),t.stopPropagation(),It(t.target).is("input")||t.preventDefault()}),!m.is(":disabled")&&!0!==l.disabled||jt(),v.on("click",Ut),v.on("keydown",'div[role="button"]',function(t){13===t.keyCode&&(t.preventDefault(),It(this).click())}),[w,m].forEach(function(e){e.on("change",function(){Ft(e.val())}),e.on("paste",function(){setTimeout(function(){Ft(e.val())},1)}),e.on("keydown",function(t){13===t.keyCode&&(Ft(It(e).val()),e==m)&&F()})}),t.text(l.cancelText),t.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Ot(),F()}),ht.attr("title",l.clearText),ht.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),S=!0,M(),c&&z(!0)}),pt.text(l.chooseText),pt.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Lt&&w.is(":focus")&&w.trigger("change"),w.hasClass("sp-validation-error")||(z(!0),F())}),gt.text(l.showPaletteOnly?l.togglePaletteMoreText:l.togglePaletteLessText),gt.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),l.showPaletteOnly=!l.showPaletteOnly,l.showPaletteOnly||c||v.css("left","-="+(nt.outerWidth(!0)+5)),xt()}),Xt(ct,function(t,e,a){i=t/V,S=!1,a.shiftKey&&(i=Math.round(10*i)/10),M()},Pt,Rt),Xt(st,function(t,e){s=parseFloat(e/K),S=!1,l.showAlpha||(i=1),M()},Pt,Rt),Xt(rt,function(t,e,a){var n;a.shiftKey?b||(a=X*u,n=d-Y*d,a=Math.abs(t-a)>Math.abs(e-n),b=a?"x":"y"):b=null,n=!b||"y"===b,b&&"x"!==b||(X=parseFloat(t/u)),n&&(Y=parseFloat((d-e)/d)),S=!1,l.showAlpha||(i=1),M()},Pt,Rt),!1!==x&&""!==x?(H(x),O(),A=Nt(x).format||l.preferredFormat,At(x)):(""===x&&H(x),O()),c&&Ht(),ut.on(a=Lt?"mousedown.spectrum":"click.spectrum touchstart.spectrum",".sp-thumb-el",Et),dt.on(a,".sp-thumb-el:nth-child(1)",{ignore:!0},Et),(E={show:Ht,hide:F,toggle:function(){(f?F:Ht)()},reflow:j,option:function(t,e){return void 0===t?It.extend({},l):void 0===e?l[t]:(l[t]=e,"preferredFormat"===t&&(A=l.preferredFormat),void xt())},enable:function(){at=!1,m.attr("disabled",!1),vt.removeClass("sp-disabled")},disable:jt,offset:function(t){l.offset=t,j()},set:function(t){H(t),z()},get:T,destroy:function(){var t;m.show().removeClass("spectrum with-add-on sp-colorize"),vt.off("click.spectrum touchstart.spectrum"),v.remove(),y.remove(),R&&R.css("background-color",_t).css("color",yt),0<(t=m.closest(".sp-original-input-container")).length&&t.after(m).remove(),Dt[E.id]=null},container:v}).id=Dt.push(E)-1,E}function a(){}function Ut(t){t.stopPropagation()}function Wt(t,e){var a=Array.prototype.slice,n=a.call(arguments,2);return function(){return t.apply(e,n.concat(a.call(arguments)))}}function Xt(n,r,e,t){var o=document,s=!1,i={},l=0,c=0,f="ontouchstart"in window,a={};function u(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function d(t){var e,a;if(s){if(Lt&&o.documentMode<9&&!t.button)return h();e=(a=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0])&&a.pageX||t.pageX,a=a&&a.pageY||t.pageY,e=Math.max(0,Math.min(e-i.left,c)),a=Math.max(0,Math.min(a-i.top,l)),f&&u(t),r.apply(n,[e,a,t])}}function h(){s&&(It(o).off(a),It(o.body).removeClass("sp-dragging"),setTimeout(function(){t.apply(n,arguments)},0)),s=!1}r=r||function(){},e=e||function(){},t=t||function(){},a.selectstart=u,a.dragstart=u,a["touchmove mousemove"]=d,a["touchend mouseup"]=h,It(n).on("touchstart mousedown",function(t){(t.which?3===t.which:2===t.button)||s||!1!==e.apply(n,arguments)&&(s=!0,l=It(n).height(),c=It(n).width(),i=It(n).offset(),It(o).on(a),It(o.body).addClass("sp-dragging"),d(t),u(t))})}function n(){return It.fn.spectrum.inputTypeColorSupport()}It.fn.spectrum=function(e){var t,a,n,r;return"string"==typeof e?(t=this,a=Array.prototype.slice.call(arguments,1),this.each(function(){if(n=Dt[It(this).data(o)]){if(!(r=n[e]))throw new Error("Spectrum: no such method: '"+e+"'");"get"===e?t=n.get():"container"===e?t=n.container:"option"===e?t=n.option.apply(n,a):"destroy"===e?(n.destroy(),It(this).removeData(o)):r.apply(n,a)}}),t):this.spectrum("destroy").each(function(){var t=It.extend({},It(this).data(),e);It(this).is("input")?t.flat||"flat"===t.type?t.type="flat":"color"===It(this).attr("type")&&(t.type="color"):t.type="noInput",t=s(this,t),It(this).data(o,t.id)})},It.fn.spectrum.load=!0,It.fn.spectrum.loadOpts={},It.fn.spectrum.draggable=Xt,It.fn.spectrum.defaults=qt,It.fn.spectrum.inputTypeColorSupport=function(){var t;return void 0===n._cachedResult&&(t=It("<input type='color'>")[0],n._cachedResult="color"===t.type&&""!==t.value),n._cachedResult},It.spectrum={},It.spectrum.localization={},It.spectrum.palettes={},It.fn.spectrum.processNativeColorInputs=function(){var t=It("input[type=color]");t.length&&!n()&&t.spectrum({preferredFormat:"hex6"})},It(function(){It.fn.spectrum.load&&It.fn.spectrum.processNativeColorInputs()})});
!function(P,x,Lt){"use strict";var b,o,f,v,Mt={},Rt=P.TMEPOJS,e=P.wp,i=P.TMEPOQTRANSLATEXJS,_=P.noUiSlider,A=P.ClipboardEvent,k=P.DataTransfer,F=[],u=[],g=!1,y=!1,I=Lt("body"),Qt=Lt(P),E=Lt(x),C=Lt(P),M=P.tcmexp,R=P._,z=!1,a=Lt.fn.val;function w(t,i){t.toArray().forEach(function(t){(t=Lt(t)).find(":input").prop("disabled",function(t,e){var a=Lt(this).data("tc-state");return void 0===a?(Lt(this).data("tc-state",e),i):!1===a?i:a})})}function Ut(t,e){var a,i,o,r,c,n=0;return e&&(a=e.attr("data-taxable"),i=e.attr("data-tax-rate"),o=e.attr("data-prices-include-tax")||Rt.prices_include_tax,r=e.attr("data-tax-display-mode"),void 0!==(c=void 0!==e.data("current_variation")?e.data("current_variation"):c))&&(a=(c=e.data("current_variation")).tc_is_taxable,i=c.tc_tax_rate),a&&(i=parseFloat(i/100),"1"===o?n="incl"===r?(t=parseFloat(t))-t/(1+i):t*i:"incl"===r&&(n=t-t/(1+i)),n=Lt.epoAPI.math.toFloat(n)),n}function Q(t,e,a,i,o,r,c){var n,l,d,s,p,m,_,f,u;return Number.isFinite(parseFloat(t))||(t=0),t*=1e4,e&&(n=e.attr("data-taxable"),l=e.attr("data-tax-rate"),d=e.attr("data-prices-include-tax")||Rt.prices_include_tax,s=e.attr("data-is-vat-exempt"),p=e.attr("data-non-base-location-prices"),m=e.attr("data-taxes-of-one"),_=e.attr("data-base-taxes-of-one"),f=e.attr("data-modded-taxes-of-one"),void 0!==e.data("current_variation")?u=e.data("current_variation"):void 0!==o&&(u=o),void 0!==u&&(n=(u=e.data("current_variation")).tc_is_taxable,l=u.tc_tax_rate,p=u.tc_non_base_location_prices,m=u.tc_taxes_of_one,_=u.tc_base_taxes_of_one,f=u.tc_modded_taxes_of_one),a&&a.data("tax-obj")&&("no"===(l=a.data("tax-obj")).has_fee?n=!1:"yes"===l.has_fee&&(n=!0),""!==_&&void 0!==_||(_=l/100),void 0!==l.base_taxes_of_one&&(_=l.base_taxes_of_one),m=(l=l.tax_rate)/100),n)&&("1"!==d||i?(a||void 0===u||c)&&(t=parseFloat(t)+parseFloat(t)*m):"1"===s?t="1"===p?parseFloat(t)-m*t:parseFloat(t)-_*t:"1"===p&&(t=parseFloat(t)-_*t+f*t)),t/=1e4}function U(t,e,a,i,o,r,c){var n,l,d,s,p,m,_;return Number.isFinite(parseFloat(t))||(t=0),t*=1e4,e&&(_=e.attr("data-tax-display-mode"),n=e.attr("data-taxable"),l=e.attr("data-tax-rate"),d=e.attr("data-taxes-of-one"),s=e.attr("data-base-taxes-of-one"),p=e.attr("data-prices-include-tax"),void 0!==e.data("current_variation")?m=e.data("current_variation"):void 0!==o&&(m=o),void 0!==m&&(n=m.tc_is_taxable,l=m.tc_tax_rate,d=m.tc_taxes_of_one,s=m.tc_base_taxes_of_one),a&&a.data("tax-obj")&&("no"===(l=a.data("tax-obj")).has_fee?n=!1:"yes"===l.has_fee&&(n=!0),""!==s&&void 0!==s||(s=l/100),void 0!==l.base_taxes_of_one&&(s=l.base_taxes_of_one),l=l.tax_rate),n)&&("1"===p||i)&&"incl"!==_&&(a||void 0===m||i||c)&&(s===d?t=parseFloat(t)-parseFloat(d*t):t*=1-parseFloat(s)),t/=1e4}function $t(t,e,a,i,o,r,c){return Number.isFinite(parseFloat(t))||(t=0),t=e?("incl"===(e.attr("data-tax-display-mode")||Rt.tax_display_mode)?Q:U)(t,e,a,o,r,0,c):t}function Jt(t,e){e=Lt.extend({symbol:"",format:"",decimal:Mt.localDecimalSeparator,thousand:Mt.localThousandSeparator,precision:Rt.currency_format_num_decimals},e=e||{});return"yes"===Rt.tm_epo_trim_zeros&&"0"!==(t%1).toString()==!1&&(e.precision=0),Lt.epoAPI.applyFilter("tc_formatPrice",Lt.epoAPI.math.format(t,e),e,t)}function c(t,e){return e+Jt(t,{symbol:Rt.currency_format_symbol,format:Rt.currency_format})}function Zt(t,e,a,i,o){var r=Rt.option_plus_sign+" ";return a||(t=$t(t,e,i)),a=Math.abs(t),"minus"===Rt.tm_epo_global_options_price_sign&&(r=""),c(a,r=t<0?Rt.option_minus_sign+" ":r)}function D(t,e,a,i,o,r){return t=a?t:$t(t,e,i,0,r)}function Kt(t){return 0<t.find("input.variation_id").length?"input.variation_id":"input.product-variation-id"}function te(t){var e=t.find(Mt.qtySelector).last();return 0===e.length&&(e=t.find(Mt.associateQtySelector).last()),e=Lt.epoAPI.applyFilter("tc_getQtyElement",e,t)}function $(t,e,a){F[F.length]={name:t,selector:e,func:a}}function q(e,a,i,o){var r,c=!0,n=!1;return e=Lt(e),(r=e.filter(".tc-epo-field-product")).length&&void 0===r.data("islogicinit")&&(n=!0),e.toArray().forEach(function(t){!c&&e.has(".tc-epo-field-product").length?(n||r.is(".tcdisabled"))&&(o?l(t):d(t,a,i)):c=o?l(t):d(t,a,i)&&c}),c}function l(t){var e,a,i,o;return(t=Lt(t)).is(".cpf-element")?t=(e=t).find(".tmcp-field, .tmcp-fee-field"):e=t.closest(".cpf-element"),o=e.closest(".cpf-section"),(t=!t.is(".tc-epo-field-product")&&e.closest(".cpf-type-product")).length&&(a=t.data("isactive"),i=(t=t.closest(".cpf-section")).data("isactive")),!1!==a&&!1!==i&&!1!==e.data("isactive")&&!1!==o.data("isactive")}function d(t,e,a){var i,o,r,c,n,l;return(t=Lt(t)).is(".cpf-element")?t=(i=t).find(".tmcp-field, .tmcp-fee-field"):i=t.closest(".cpf-element"),n=(c=i.closest(".cpf-section")).closest(".tm-extra-product-options-field"),a=a?t.closest(".tmcp-ul-wrap"):i,t.is(".tc-epo-field-product")&&void 0===t.data("islogicinit")&&t.data("islogicinit",1),t.is(".tc-force-disabled")||((l=!t.is(".tc-epo-field-product")&&i.closest(".cpf-type-product")).length&&((r=l.find(Mt.associateQtySelector)).length&&(0<Lt.epoAPI.math.toFloat(r.val())?(t.removeClass("ignore"),r.removeClass("ignore")):(t.addClass("ignore"),r.addClass("ignore"))),r=l.data("isactive"),o=(l=l.closest(".cpf-section")).data("isactive")),!1===r)||!1===o||!1===i.data("isactive")||!1===c.data("isactive")?(t.is(".cpf-element")||(t.prop("disabled",!0).removeClass("tcenabled").addClass("tcdisabled"),void 0!==t.data("tc-state")&&t.data("tc-state",!0),i.find(".tm-qty, .tc-qty-button").prop("disabled",!0),t.is(".tmcp-upload")&&t.next(".tmcp-upload-hidden").length&&t.next(".tmcp-upload-hidden").removeClass("tcenabled").addClass("tcdisabled").prop("disabled",!0)),t.is(".tc-force-disabled")&&(l=i.find(".tmcp-field, .tmcp-fee-field")).length!==l.filter(".tc-force-disabled").length||(i.removeClass("tc-container-enabled").addClass("tc-container-disabled"),i.find(".product-variation-id, .tc-epo-field-product-counter").prop("disabled",!0),t.trigger({type:"tm-field-is-active",field:t,value:!1}),0===c.find(".cpf-element.tc-container-enabled").length&&(c.addClass("section-disabled"),0===n.children(".cpf-section").filter(function(){return!Lt(this).hasClass("section-disabled")}).length)&&n.addClass("tc-hidden"),0===i.closest(".tc-tab-slide").find(".cpf-element.tc-container-enabled").length&&i.closest(".owl-item").addClass("tc-hidden-visibility")),!1):(r=t.first(),t.prop("disabled",!1),void 0!==t.data("tc-state")&&t.data("tc-state",!1),"yes"!==Rt.tm_epo_show_only_active_quantities?r.is(":radio, .cpf-type-radio")||r.is(":checkbox, .cpf-type-checkbox")?(t.filter(":checked").closest(".tmcp-field-wrap").find(".tm-qty, .tc-qty-button").prop("disabled",!1),t.not(":checked").closest(".tmcp-field-wrap").find(".tm-qty, .tc-qty-button").prop("disabled",!0)):(r.is("select, .cpf-type-select, .cpf-type-selectmultiple"),r.val()?a.find(".tm-qty, .tc-qty-button").prop("disabled",!1):a.find(".tm-qty, .tc-qty-button").prop("disabled",!0)):e||i.find(".tm-quantity").trigger("showhide.cpfcustom"),r.is(".cpf-element")||(t.removeClass("tcdisabled").addClass("tcenabled"),t.is(".tmcp-upload")&&t.next(".tmcp-upload-hidden").length&&t.next(".tmcp-upload-hidden").removeClass("tcdisabled").addClass("tcenabled").prop("disabled",!1)),i.removeClass("tc-container-disabled").addClass("tc-container-enabled"),i.find(".product-variation-id, .tc-epo-field-product-counter").prop("disabled",!1),t.trigger({type:"tm-field-is-active",field:t,value:!0}),c.removeClass("section-disabled"),n.removeClass("tc-hidden"),i.closest(".owl-item").removeClass("tc-hidden-visibility"),!0)}function J(t,e,a){var i,o,r=Lt(t),c=r.attr("data-epo_id")||r.attr("data-epo-id"),n=r.attr("data-product_id")||r.attr("data-product-id"),l=Lt('.variations_form[data-epo_id="'+c+'"][data-product_id="'+n+'"]'),l=Lt.epoAPI.applyFilter("tm_variation_check_match_variationsForm",l,c,n,r);if("variation"===r.attr("data-product_type")&&(l=r,o=n),0!==l.length||!r.is(".cpf-type-variations")||c||n||(l=r.closest(".tc-epo-element-product-container")).length&&(o=l.attr("data-product_id")),0!==l.length)switch(o=o||((o=0===(o=l.find('input[name^="variation_id"]')).length&&0===(o=l.find("input.variation_id")).length?l.closest(".tc-epo-element-product-li-container").find(".product-variation-id"):o).length?o.val():0),null!==t&&null!==e&&void 0!==t&&void 0!==e&&!1!==t&&!1!==e&&(e=e?parseInt(e,10):-1),i=parseInt(o,10),Number.isFinite(i)||(i=0),Number.isFinite(e)||(e=0),a){case"is":return""!==i&&i===e;case"isnot":return""!==i&&i!==e;case"isempty":return""===i||0===i;case"isnotempty":return""!==i&&0!==i;case"startswith":return i.toString().startsWith(e);case"endswith":return i.toString().endsWith(e);case"greaterthan":return parseFloat(i)>parseFloat(e);case"lessthan":return parseFloat(i)<parseFloat(e);case"greaterthanequal":return parseFloat(i)>=parseFloat(e);case"lessthanequal":return parseFloat(i)<=parseFloat(e)}return!1}function S(t,e,a){if(null!==t&&null!==e)switch(t=encodeURIComponent(t),e=Lt.qtranxj_split?encodeURIComponent(Lt.qtranxj_split(decodeURIComponent(e))[i.language]):encodeURIComponent(decodeURIComponent(e)),t=t?t.toLowerCase():"",e=e?e.toLowerCase():"",t=t.toString(),e=e.toString(),a){case"is":return null!==t&&t===e;case"isnot":return null!==t&&t!==e;case"isempty":return!("undefined"!==t&&void 0!==t&&""!==t);case"isnotempty":return"undefined"!==t&&void 0!==t&&""!==t;case"startswith":return t.startsWith(e);case"endswith":return t.endsWith(e);case"greaterthan":return parseFloat(t)>parseFloat(e);case"lessthan":return parseFloat(t)<parseFloat(e);case"greaterthanequal":return parseFloat(t)>=parseFloat(e);case"lessthanequal":return parseFloat(t)<=parseFloat(e)}return!1}function Z(t){var a,e,i,o=t.element,r=t.rule.operator,c=t.rule.value,n=t.type,l=!1,d="";if("quantity"===n)return S(o.val(),c,r);if("productid"===n)return S(o,c,r);if("variation"===n)return J(o,c,r);if("variationattributes"===n){var s,p,n=o,m=t.rule,n=Lt(n),_=m.value,f=m.operator,u=n.attr("data-epo_id")||n.attr("data-epo-id"),g=n.attr("data-product_id")||n.attr("data-product-id"),h=Lt('.variations_form[data-epo_id="'+u+'"][data-product_id="'+g+'"]'),h=Lt.epoAPI.applyFilter("tm_variation_check_match_variationsForm",h,u,g,n);if(0!==(h="variation"===n.attr("data-product_type")?n:h).length||!n.is(".cpf-type-variations")||u||g||(h=n.closest(".tc-epo-element-product-container")).length&&h.attr("data-product_id"),0!==h.length&&(p=h.find('[name="attribute_'+m.taxonomy+'"]')).length)switch(s=p.find("option:selected").attr("value"),f){case"is":return""!==s&&s===_;case"isnot":return""!==s&&s!==_;case"isempty":return""===s||0===s;case"isnotempty":return""!==s&&0!==s;case"startswith":return s.toString().startsWith(_);case"endswith":return s.toString().endsWith(_)}}else if((o=Lt(t.element)).length){if(o.is(".cpf-section")){var v,y,b,u=o,w=r,g=u.find(".cpf-element"),x=!1;if(u.is(".tc-hidden")){if("isnotempty"===w)return;if("isempty"===w)return 1}return"isnotempty"===w?v=!1:"isempty"===w&&(v=!0),Lt(g).toArray().forEach(function(t){var e,a="";if((t=Lt(t)).is(".cpf-type-product")&&(a=":not("+Mt.associatedEpoSelector+" .tm-epo-field)"),q(t,void 0,void 0,!0))if(0<(e=t.attr("class").split(" ").map(function(t){return-1!==t.indexOf("cpf-type-",0)?t:null}).filter(function(t){return null!=t?t:null})).length){switch("cpf-type-product"===(e=e[0])&&(x=!0,e=t.is(".cpf-type-product-mode-product")||t.is(".cpf-type-product-checkbox")||t.is(".cpf-type-product-thumbnailmultiple")||t.is(".cpf-type-product-custombundle")?"cpf-type-checkbox":t.is(".cpf-type-product-dropdown")?"cpf-type-select":"cpf-type-radio"),e){case"cpf-type-radio":b=t.find("input.tm-epo-field.tmcp-radio:checked"+a),"isnotempty"===w?(v=v||0<b.length,0<b.length&&(y=b.length)):"isempty"===w&&(v=v&&0===b.length);break;case"cpf-type-checkbox":b=t.find("input.tm-epo-field.tmcp-checkbox:checked"+a),"isnotempty"===w?(v=v||0<b.length,0<b.length&&(y=b.length)):"isempty"===w&&(v=v&&0===b.length);break;case"cpf-type-select":(y=t.find("select.tm-epo-field.tmcp-select"+a).val())&&!x&&(y=y.slice(0,y.lastIndexOf("_")));break;case"cpf-type-selectmultiple":(y=t.find("select.tm-epo-field.tmcp-selectmultiple"+a).val())&&!x&&y.forEach(function(t,e){y[e]=t.slice(0,t.lastIndexOf("_"))});break;default:y=t.find(".tm-epo-field"+a).val()}Array.isArray(y)?"isnotempty"===w?v=v||y.some(function(t){return S(t,"",w)}):"isempty"===w&&(v=v&&y.every(function(t){return S(t,"",w)})):"isnotempty"===w?v=v||S(y,"",w):"isempty"===w&&(v=v&&S(y,"",w))}else v=!1}),v}if(o.is(".cpf-type-product")&&(d=":not("+Mt.associatedEpoSelector+" .tm-epo-field)"),0<(n=o.attr("class").split(" ").map(function(t){return-1!==t.indexOf("cpf-type-",0)?t:null}).filter(function(t){return null!=t?t:null})).length){switch("cpf-type-product"===(n=n[0])&&(l=!0,n=o.is(".cpf-type-product-mode-product")||o.is(".cpf-type-product-checkbox")||o.is(".cpf-type-product-thumbnailmultiple")||o.is(".cpf-type-product-custombundle")?"cpf-type-checkbox":o.is(".cpf-type-product-dropdown")?"cpf-type-select":"cpf-type-radio"),n){case"cpf-type-radio":if(e=o.find("input.tm-epo-field.tmcp-radio:checked"+d),"is"===r||"isnot"===r){if(0===e.length&&"is"===r)return;if(0===e.length&&"isnot"===r)return 1}if("isnotempty"===r)return 0<e.length;if("isempty"===r)return 0===e.length;(a=o.find("input.tm-epo-field.tmcp-radio:checked"+d).val())&&!l&&(a=a.slice(0,a.lastIndexOf("_")));break;case"cpf-type-checkbox":if(e=o.find("input.tm-epo-field.tmcp-checkbox:checked"+d),"is"===r||"isnot"===r)return(0!==e.length||"is"!==r)&&(0===e.length&&"isnot"===r||(i=!1,e.toArray().forEach(function(t){if(S(a=(a=Lt(t).val())&&!l?a.slice(0,a.lastIndexOf("_")):a,c,r))i=!0;else if("isnot"===r)return i=!1}),i));if("isnotempty"===r)return 0<e.length;if("isempty"===r)return 0===e.length;break;case"cpf-type-select":(a=o.find("select.tm-epo-field.tmcp-select"+d).val())&&!l&&(a=a.slice(0,a.lastIndexOf("_")));break;case"cpf-type-selectmultiple":(a=o.find("select.tm-epo-field.tmcp-selectmultiple"+d).val())&&!l&&a.forEach(function(t,e){a[e]=t.slice(0,t.lastIndexOf("_"))});break;case"cpf-type-variations":return J(o,c,r);default:a=o.find(".tm-epo-field"+d).val()}return Array.isArray(a)?a.some(function(t){return S(t,c,r)}):S(a,c,r)}}}function r(t,_){t.toArray().forEach(function(t){var e,a,i,o,r,c,n,l=Lt(t),d=l.data("matches"),t=l.data("toggle"),s=l.data("fields"),p=[],m="show"!==t;if(s){for(n=(c=l.closest(".tc-section-fields")).is(".tc-repeater-section"),a=0;a<s.length;a++)if(e=s[a],Array.isArray(e))for(o=p[a]=0;o<e.length;o++)i=e[o],n&&(i.element=c.find('[data-uniqid="'+i.element.attr("data-uniqid")+'"')),("cpflogic"!==_||q(Lt(i.element),void 0,void 0,!0))&&Z(i)&&(p[a]=(p[a]||0)+1);for(r=0;r<d.length;r++)if(parseInt(p[r],10)===parseInt(d[r],10)){m=!m;break}m?("cpflogic"!==_||l.data("did_initial_activation")||u.push(function(){var t=l.find(".tm-epo-field.tcenabled");t.toArray().forEach(function(t){(t=Lt(t)).data("initial_activation")||l.closest(".cpf-section").is(".tc-hidden")||!q(t)||(t.trigger("tc_element_epo_rules"),t.data("initial_activation",1))}),(l.is(".cpf-element")&&t.length||l.is(".cpf-section"))&&l.data("did_initial_activation",1)}),l.removeClass("tc-hidden")):l.addClass("tc-hidden"),l.data("isactive",m).trigger("tc-logic")}})}function T(t){var e,a=[];Lt(t).length||(t="body"),(e=(t=Lt(t)).find(".iscpfdependson")).toArray().forEach(function(t){Lt(t).toArray().forEach(function(t){r(Lt(t))})}),e.toArray().forEach(function(t){Lt(t).toArray().forEach(function(t){r(Lt(t),"cpflogic")})}),e.toArray().forEach(function(t){Lt(t).toArray().forEach(function(t){(t=(t=Lt(t)).is(".cpf-section")?t.find(".cpf-element"):t).toArray().forEach(function(t){var t=Lt(t),e=t.find(".tm-epo-field");q(0<e.length?e:t)})})}),u.forEach(function(t){t()}),u=[],Lt().selectric&&Lt(".tm-extra-product-options select").selectric("refresh"),setTimeout(function(){Lt(".tm-owl-slider").toArray().forEach(function(t){Lt(t).trigger("refresh.owl.carousel")})},200),t.find(".tm-product-image:checked,select.tm-product-image").toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&a.push(t)}),a.length?a[a.length-1].trigger("tm_trigger_product_image"):(e=t.data("epo_object"))&&e.main_product.trigger("tm_restore_product_image"),Qt.trigger("cpflogicrun"),Qt.trigger("tmlazy"),Qt.trigger("cpflogicdone")}function W(t){return"object"==typeof t&&"toggle"in t&&"rules"in t&&0<t.rules.length}function V(t){return t.what&&("all"===t.what?t.rules=[t.rules]:"any"===t.what&&(t.rules=t.rules.reduce(function(t,e){return t.push([e]),t},[])),delete t.what),t}function X(t,e){var a="element";if("product-properties"===t)switch(String(e)){case"0":a="quantity";break;case"1":a="productid";break;case"2":a="variation";break;case"3":a="variationattributes"}return a}function G(r){var c,n,l,d,s,p,m,_,f,u,t=r.this_epo_container,g=Lt(t),t=g.find(".cpf-section").not(".cpf-type-product .cpf-section"),e='[data-haslogic="1"]',h=!g.is(".cpf-section")&&t;r.is_associated||(e='[data-haslogic="1"]:not(".cpf-type-product .cpf-section")'),g.toArray().forEach(function(t){(Lt(t).is(".cpf-section")?Lt(t):Lt(t).find(".cpf-section")).filter(e).toArray().forEach(function(t){var e,a,i,o;if(c=Lt(t),n=V(c.data("logic")),l=parseInt(c.data("haslogic"),10),d=[],u=c.parent().closest(".cpf-type-product"),1===l&&W(n)){for(i=0;i<n.rules.length;i++)if((e=n.rules[i])&&Array.isArray(e))for(d[i]=[],o=0;o<e.length;o++)a=e[o],s=a.section,p=a.element,"quantity"===(m=X(s,p))?f=u.length?r.main_cart.find(Mt.associateQtySelector):r.main_cart.find(r.qtySelector):"productid"===m?f=r.product_id:"variation"===m||"variationattributes"===m?u.length?(f=u.find(".tc-epo-element-product-container")).length||(f=u.closest(".tc-epo-element-product-container")):f=g:f=h?u.length?(_=g.find(".cpf-section").filter("[data-uniqid='"+s+"']"),p!==s?_.find(".cpf-element").eq(p):_):(_=h.filter("[data-uniqid='"+s+"']"),p!==s?_.find(".cpf-element:not(.cpf-element .cpf-element)").eq(p):_):p!==s?g.find(".cpf-element").eq(p):_=g.find(".cpf-section").filter("[data-uniqid='"+s+"']"),d[i].push({element:f,rule:a,type:m});c.data("iscpfdependson")?c.cpfdependson(c.data("cpfdependson-fields"),n.toggle,!0,r):(c.data("cpfdependson-fields",d),c.cpfdependson(d,n.toggle,!1,r))}})})}function Y(c){var n,l,d,s,p,m,_,f,u,g,t=c.this_epo_container,h=Lt(t),t=h.find(".cpf-section").not(".cpf-type-product .cpf-section"),v=!1,e='.cpf-element[data-haslogic="1"]';h.parent().is(Mt.associatedEpoSelector)&&(t=h.find(".cpf-section"),v=!0),n=!h.is(".cpf-section")&&t,c.is_associated||(e='.cpf-element[data-haslogic="1"]:not(".cpf-type-product .cpf-element")'),h.find(e).toArray().forEach(function(t){var e,a,i,o,r=[];if(l=Lt(t),d=V(l.data("logic")),s=parseInt(l.data("haslogic"),10),g=v?h:l.parent().closest(".cpf-type-product"),1===s&&W(d)){for(i=0;i<d.rules.length;i++)if((e=d.rules[i])&&Array.isArray(e))for(r[i]=[],o=0;o<e.length;o++)a=e[o],p=a.section,m=a.element,"quantity"===(_=X(p,m))?u=g.length?c.main_cart.find(Mt.associateQtySelector):c.main_cart.find(c.qtySelector):"productid"===_?u=c.product_id:"variation"===_||"variationattributes"===_?g.length?(u=g.find(".tc-epo-element-product-container")).length||(u=g.closest(".tc-epo-element-product-container")):u=h:u=n?g.length?(f=h.find(".cpf-section").filter("[data-uniqid='"+p+"']"),m!==p?f.find(".cpf-element").eq(m):f):(f=n.filter("[data-uniqid='"+p+"']"),m!==p?f.find(".cpf-element:not(.cpf-element .cpf-element)").eq(m):f):m!==p?h.find(".cpf-element").eq(m):f=h.find(".cpf-section").filter("[data-uniqid='"+p+"']"),r[i].push({element:u,rule:a,type:_});l.data("iscpfdependson")?l.cpfdependson(l.data("cpfdependson-fields"),d.toggle,!0,c):(l.data("cpfdependson-fields",r),l.cpfdependson(r,d.toggle,!1,c))}})}function K(t,e,a){var i,o,r;return t=e&&(i=e.attr("data-taxable"),o=e.attr("data-tax-rate"),r=e.attr("data-tax-display-mode"),e=e.attr("data-prices-include-tax"),a||i&&"incl"===r&&"1"!==e)?parseFloat(t)/(1+o/100):t}function n(t,e,a){var i,o,r;return t=e&&(i=e.attr("data-taxable"),o=e.attr("data-tax-rate"),r=e.attr("data-tax-display-mode"),e=e.attr("data-prices-include-tax"),a||i&&"incl"!==r&&"1"===e)?parseFloat(t)*(1+o/100):t}function tt(t,e,a){var i,o,r;if(e&&(i=e.attr("data-taxable"),o=e.attr("data-tax-display-mode"),r=e.attr("data-prices-include-tax"),i)){if(a&&a.tc_tax_rate&&"0"===String(a.tc_tax_rate))return t;"1"===r?"incl"===o?a.tc_base_taxes_of_one!==a.tc_modded_taxes_of_one&&(t=parseFloat((1-a.tc_taxes_of_one)*t*(1/(1-a.tc_base_taxes_of_one)))):t=n(t,e):"1"!==r&&"incl"===o&&(t=K(t,e))}return t}function Wt(t,e,a,i){var o="";return a||(t=$t(t,e,i,0,!0)),c(Math.abs(t),o=t<0?Rt.minus_sign+" ":o)}function Vt(t,e,a,i){return"excl"===i.attr("data-tax-display-mode")?(a[t]=a[t].replaceAll("{price_excluding_tax}",Wt(a[e],i,!0)),a[t]=a[t].replaceAll("{price_including_tax}",Wt(n(a[e],i,!0),i,!0))):(a[t]=a[t].replaceAll("{price_including_tax}",Wt(a[e],i,!0)),a[t]=a[t].replaceAll("{price_excluding_tax}",Wt(K(a[e],i,!0),i,!0))),a}function ee(t,e,a){return t="excl"===a.attr("data-tax-display-mode")?(t=t.replaceAll("{price_excluding_tax}",Wt(e,a,!0))).replaceAll("{price_including_tax}",Wt(n(e,a,!0),a,!0)):(t=t.replaceAll("{price_including_tax}",Wt(e,a,!0))).replaceAll("{price_excluding_tax}",Wt(K(e,a,!0),a,!0))}function ae(t,e,a,i,o,r){H({epoObject:t,obj:e,price:a,formatted_price:i,original_price:o,force:!0,useFormattedPrice:r})}function H(t){var e,a,i,o,r,c,n,l,d,s=Lt(t.obj);0!==s.length&&(e=s.closest(".tmcp-field-wrap"),a=s.closest(".tc-price-wrap"),l=e.find(".tm-epo-field"),i=t.price||0,o=t.formatted_price||"",d=t.original_price||"",n=t.force||!1,r=t.useFormattedPrice||!1,t=t.epoObject.this_epo_totals_container,n||"1"!==l.attr("data-no-price-change")||!l.data("price-changed"))&&(i=Lt.epoAPI.applyFilter("tc_adjust_update_price_price",i),o=Lt.epoAPI.applyFilter("tc_adjust_update_price_formatted_price",o,i),d=Lt.epoAPI.applyFilter("tc_adjust_update_price_original_price",d),Number.isFinite(parseFloat(d))||(d=0),Number.isFinite(parseFloat(i))||(i=0),e=e.find(".before-amount,.after-amount"),("yes"!==Rt.tm_epo_auto_hide_price_if_zero||!1!==Lt.epoAPI.util.isEmpty(i)&&("yes"!==Rt.tm_epo_no_hide_price_if_original_not_zero||!0!==Lt.epoAPI.util.isEmpty(i)||!1!==Lt.epoAPI.util.isEmpty(d)))&&"yes"===Rt.tm_epo_auto_hide_price_if_zero||!0===Lt.epoAPI.util.isEmpty(i)&&"1"===l.attr("data-no-price")||!n&&0<l.length&&("1"===l.attr("data-no-price")||"variable"===l.attr("data-type")&&!l.data("price"))?(a.addClass("tm-hidden"),s.addClass("tm-hidden"),s.empty(),e.addClass("tm-hidden")):(n=d&&void 0!==d&&parseFloat(d)!==parseFloat(i)?r?(c=Mt.templateEngine.plain_price,{price:o}):(i<0&&!d<0?(c=Mt.templateEngine.sale_price_m10,i=Math.abs(i)):!i<0&&d<0?(c=Mt.templateEngine.sale_price_m01,d=Math.abs(d)):i<0&&d<0?(c=Mt.templateEngine.sale_price_m11,i=Math.abs(i),d=Math.abs(d)):c=Mt.templateEngine.sale_price,{price:Jt(d),sale_price:Jt(i)}):r?(c=Mt.templateEngine.plain_price,{price:o}):(c=Mt.templateEngine.price,i<0&&(c=Mt.templateEngine.price_m,i=Math.abs(i)),{price:Jt(i)}),l=ee(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(c,n)),i,t),l=Lt.epoAPI.applyFilter("tc_adjust_update_price_formatted_price_html",l),d="",!r&&0<i&&"minus"!==Rt.tm_epo_global_options_price_sign&&(d=Rt.option_plus_sign+" "),s.html(d+l),a.removeClass("tm-hidden"),s.removeClass("tm-hidden"),e.removeClass("tm-hidden")))}function s(i,n,t){var e,a,o,l=[],d=(e=i,a={},(e=(t=t).thisForm?t.thisForm:e).find(".variations select, .tc-epo-variable-product-selector").toArray().forEach(function(t){var e=void 0!==(t=Lt(t)).data("attribute_name")?t.data("attribute_name"):t.attr("name"),t=t.val();a[e]=t}),a),r=!0,t="0"!==(t=i.find(Kt(i)).val())&&""!==t||0<i.find(".cpf-type-variations").find(".tm-epo-variation-element:checked").length||i.find(".cpf-type-variations").find('.tm-epo-variation-element option[value!=""]:selected');if(t&&(i.find(".cpf-type-variations").toArray().forEach(function(t,o){var r,c,t=Lt(t).find(".tm-epo-variation-element"),a=!1;l[o]=!0,t.is("select")?(r=Lt.epoAPI.dom.id(t.attr("data-tm-for-variation")),(c=t.val())&&(l[o]=!1),t.children("option").toArray().forEach(function(e){a=!1,i.find("[data-attribute_name='attribute_"+r+"']").children("option").toArray().forEach(function(t){if(Lt(t).attr("value")===Lt(e).attr("value"))return!(a=!0)}),a?Lt(e).prop("disabled",!1).show():Lt(e).prop("disabled",!0).hide()})):t.toArray().forEach(function(t){var t=Lt(t),e=t.closest("li"),a=e.find(".tm-epo-variation-element"),i=Lt.extend(!0,{},d);r=t.attr("data-tm-for-variation"),c=t.val(),t.is(":checked")&&(l[o]=!1),i["attribute_"+r]=c,(i=(i=Lt.fn.tm_find_matching_variations(n,i).shift())&&"is_in_stock"in i&&i.is_in_stock)?(t.prop("disabled",!1).removeClass("tm-disabled"),e.removeClass("pointereventsoff tm-attribute-disabled").fadeTo("fast",1,function(){Lt(this).css("opacity","")}),a.prop("disabled",!1),a.removeAttr("data-tm-disabled")):(a.is(":checked")||i?e.removeClass("pointereventsoff"):e.addClass("pointereventsoff"),t.attr("disabled","disabled").addClass("tm-disabled"),a.attr("disabled","disabled"),a.attr("data-tm-disabled","disabled"),e.addClass("tm-attribute-disabled").fadeTo("fast",.5))})}),l)){for(l.shift(),o=0;o<l.length;o++)if(!1===l[o]){r=!1;break}r&&i.find(".cpf-type-variations").first().toArray().forEach(function(t){var e,a,t=Lt(t).find(".tm-epo-variation-element");t.is("select")||t.toArray().forEach(function(t){t=Lt(t),e=t.closest("li"),a=e.find(".tm-epo-variation-element"),t.prop("disabled",!1).removeClass("tm-disabled"),e.removeClass("tm-attribute-disabled").stop().css("opacity",""),a.prop("disabled",!1),a.removeAttr("data-tm-disabled")})})}}function et(e,a){var t=e.data("product_variations"),i=parseInt(e.data("product_id"),10),o=e.data("globalVariationObject")||!1;Rt.skipCustomVariationsUpdate||(!(i=i||e.data("tc_product_id"))&&e.is(Mt.compositeSelector)&&(i=e.find(".component_options").data("options_data")[0].option_id,t=t||e.find(".details.component_data").data("product_variations")),a.is_associated||!(t=!(t=!t&&P.product_variations&&P.product_variations.product_id?P.product_variations.product_id:t)&&P.product_variations?P.product_variations:t)&&P["product_variations_"+i]&&(t=P["product_variations_"+i]),t?s(e,t,a):o?s(e,o.variations,a):Lt.post(Rt.ajax_url,{action:"woocommerce_tm_get_variations_array",post_id:i},function(t){o=t,e.data("globalVariationObject",t),s(e,o.variations,a)},"json"))}function at(t,e){var a,i,o,r;"no"!==Rt.tm_epo_global_move_out_of_stock&&((r=(r=t.find(".woocommerce-variation-availability").last()).length?r:t.find(".stock").last()).length?(e.find(".tm-stock").remove(),t=e,void 0!==(a=r.prop("outerHTML"))&&(o=(i=(t=Lt(t)).find(".tm-epo-variation-element").first()).closest(".tm-epo-variation-section"),i.length?(o.find(".tm-stock").remove(),o.append('<div class="tm-stock">'+a+"</div>")):(t.find(".tm-stock").remove(),t.find(".variations").after('<div class="tm-stock">'+a+"</div>")),1)&&r.remove()):e.find(".tm-stock").remove())}function it(t,e,a,i){return a=a||"form",t=t,i=i,o="",(t=0===(t=(e=(e=e)||t).find(Mt.addToCartSelector+(o=i?o+"[value='"+i+"']":o))).length?e.find(Mt.tcAddToCartSelector+o):t).last().closest(a);var o}function ot(t,e,a,i){return it(t,e,a,i)}function Xt(t){var e=Lt.epoAPI.applyFilter("tcGetNativePricesBlockSelector",".single_variation .price",t);return Lt(t).find(e).not(".tc-price")}function ie(t,e){var a,i,o=e.showHideCart;e.is_associated||void 0===o||"yes"!==Rt.tm_epo_hide_add_cart_button&&"yes"!==Rt.tm_epo_hide_all_add_cart_button&&"yes"!==Rt.tm_epo_hide_required_add_cart_button||(a=t.find(Mt.addToCartButtonSelector).first(),i=t.find(Mt.qtySelector).first(),o?(a.removeClass("tc-hide-add-to-cart-button"),i.removeClass("tc-hide-add-to-cart-button")):(a.addClass("tc-hide-add-to-cart-button"),i.addClass("tc-hide-add-to-cart-button")),Qt.trigger("epoShowHideCart",{main_product:t,currentEpoObject:e,showHideCart:o,button:a,qty:i}))}function oe(t,e,a){var i,o,r,c=!0,n=!0,l=Lt.tcepo.oneOptionIsSelected[e];return t.is_associated?Lt.epoAPI.applyFilter("tc_currentEpoObject_associated",t,e,a):(i="object"==typeof a?(i=a.has_epo,o=a.this_epo_container,i&&(o.find(".tmcp-fee-field").length||o.find(".tmcp-field").not(".cpf-type-variations .tmcp-field").length)):a,t.showHideCart=void 0,t.showHideTotal=void 0,!i||"yes"!==Rt.tm_epo_hide_add_cart_button&&"yes"!==Rt.tm_epo_hide_all_add_cart_button&&"yes"!==Rt.tm_epo_hide_required_add_cart_button&&"yes"!==Rt.tm_epo_hide_totals_until_any&&"yes"!==Rt.tm_epo_hide_totals_until_all_required&&"yes"!==Rt.tm_epo_hide_totals_until_all||("yes"===Rt.tm_epo_hide_add_cart_button&&(c=l),"yes"===Rt.tm_epo_hide_totals_until_any&&(n=l),"yes"!==Rt.tm_epo_hide_required_add_cart_button&&"yes"!==Rt.tm_epo_hide_totals_until_all_required||(r=p(t.this_epo_container.find(".cpf-element").not(".cpf-type-variations").filter(".tc-container-enabled.tc-is-required")),"yes"===Rt.tm_epo_hide_required_add_cart_button&&(c=r),"yes"===Rt.tm_epo_hide_totals_until_all_required&&(n=r)),"yes"!==Rt.tm_epo_hide_all_add_cart_button&&"yes"!==Rt.tm_epo_hide_totals_until_all||(r=p(t.this_epo_container.find(".cpf-element").not(".cpf-type-variations").filter(".tc-container-enabled")),"yes"===Rt.tm_epo_hide_all_add_cart_button&&(c=r),"yes"===Rt.tm_epo_hide_totals_until_all&&(n=r)),t.showHideCart=c,t.showHideTotal=n,Lt.tcepo.showHideTotal[e]=n),Lt.epoAPI.applyFilter("tc_currentEpoObject",t,e,a))}function p(t,e){function a(t){var e,a,i="",o=!1;if((t=Lt(t)).is(".cpf-type-product")&&(i=":not("+Mt.associatedEpoSelector+" .tm-epo-field)"),0<(e=t.attr("class").split(" ").map(function(t){return-1!==t.indexOf("cpf-type-",0)?t:null}).filter(function(t){return null!=t?t:null})).length){switch("cpf-type-product"===(e=e[0])&&(o=!0,e=t.is(".cpf-type-product-mode-product")||t.is(".cpf-type-product-checkbox")||t.is(".cpf-type-product-thumbnailmultiple")||t.is(".cpf-type-product-custombundle")?"cpf-type-checkbox":t.is(".cpf-type-product-dropdown")?"cpf-type-select":"cpf-type-radio"),e){case"cpf-type-radio":return 0<t.find("input.tm-epo-field.tmcp-radio:checked"+i).length;case"cpf-type-checkbox":return 0<t.find("input.tm-epo-field.tmcp-checkbox:checked"+i).length;case"cpf-type-select":(a=t.find("select.tm-epo-field.tmcp-select"+i).val())&&!o&&(a=a.slice(0,a.lastIndexOf("_")));break;case"cpf-type-selectmultiple":(a=t.find("select.tm-epo-field.tmcp-selectmultiple"+i).val())&&!o&&a.forEach(function(t,e){a[e]=t.slice(0,t.lastIndexOf("_"))});break;default:a=t.find(".tm-epo-field"+i).val()}return Array.isArray(a)?a.some(function(t){return""!==t}):""!==a}return!1}return"some"===e?t.toArray().some(a):t.toArray().every(a)}function m(t,e){var a,i,o,r,c,n=Lt.tcepo.errorObject[e]||t;n&&("yes"!==Rt.tm_epo_disable_error_scroll&&(i=(a=n.closest(".cpf-section")).find(".tm-section-link"),o=n.closest(".cpf-element"),(r=n.closest(".cpf-type-product").closest(".cpf-section")).length&&r.find(".tm-toggle").length&&r.find(".tm-toggle").trigger("openwrap.tmtoggle"),a.find(".tm-toggle").length&&a.find(".tm-toggle").trigger("openwrap.tmtoggle"),void 0===P.tc_validation_offset&&(P.tc_validation_offset=-100),a.is(".section_popup")?(C.tcScrollTo(i,300,P.tc_validation_offset),i.trigger("click.tmsectionpoplink")):a.is(".tm-owl-slider-section")?(c=n.closest(".owl-item").index(),a.find(".tcowl-carousel").trigger("to.owl.carousel",[c,100]),setTimeout(function(){a.find(".tcowl-carousel").trigger("refresh.owl.carousel"),0<o.length&&C.tcScrollTo(o,300,P.tc_validation_offset)},200)):a.is(".tc-tabs-section")?(c=n.closest(".tc-tab-slide").index(),n.closest(".tc-tabs").find('.tc-tab-headers .tc-tab-header .tab-header[data-id="tc-tab-slide'+c+'"]').trigger("click.tmtabs"),setTimeout(function(){0<o.length&&C.tcScrollTo(o,300,P.tc_validation_offset)},200)):0<o.length&&C.tcScrollTo(o,300,P.tc_validation_offset)),t||(Lt.tcepo.errorObject[e]=!1))}function rt(t,e){var a,i=parseInt(t.attr("data-limit"),10),o=!1;return!(0<i&&(o=0,t.closest(".tm-extra-product-options-checkbox").find("input.tm-epo-field[type='checkbox']:checked").toArray().forEach(function(t){t=Lt(t),a=t.closest("li.tmcp-field-wrap").find("input.tm-qty"),o=0<a.length?((a=parseInt(a.val(),10))<=0&&(a=1),parseInt(o,10)+a):parseInt(o,10)+1}),i<o)&&(e&&t.prop("checked","").trigger("change"),1))}function ct(t,e){var a,i=parseInt(t.attr("data-exactlimit"),10),o=!1;return!(0<i&&(o=0,t.closest(".tm-extra-product-options-checkbox").find("input.tm-epo-field[type='checkbox']:checked").toArray().forEach(function(t){t=Lt(t),a=t.closest("li.tmcp-field-wrap").find("input.tm-qty"),o=0<a.length?((a=parseInt(a.val(),10))<=0&&(a=1),parseInt(o,10)+a):parseInt(o,10)+1}),i<o)&&(e&&t.prop("checked","").trigger("change"),1))}function nt(l,d,s){Lt.tcepo.formSubmitEvents[s][Lt.tcepo.formSubmitEvents[s].length]={trigger:function(){return e=d,t=s,n=!(c=!0),l.toArray().forEach(function(t){t=Lt(t),(r=t.find("[type='checkbox'][data-limit]")).length&&q(r)&&(r=parseInt(r.attr("data-limit"),10),a=0,t.find("input.tm-epo-field[type='checkbox']:checked").toArray().forEach(function(t){t=Lt(t),i=t.closest("li.tmcp-field-wrap").find("input.tm-qty"),a=0<i.length?((i=parseInt(i.val(),10))<=0&&(i=1),parseInt(a,10)+i):parseInt(a,10)+1}),o=t.closest(".cpf-element"),o=o.find("div.tm-error-min"),r<a?(c=!1,n=t,r=(1===r?Rt.tm_epo_global_validator_messages.epolimitsingle:Rt.tm_epo_global_validator_messages.epolimit).replaceAll("{0}",r),o.length&&o.remove(),"before"===Rt.tm_epo_global_error_label_placement?t.closest(".tc-element-container").before('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>"):t.closest(".tc-element-container").after('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>"),e.find(Mt.addToCartButtonSelector).first().removeClass("disabled loading fpd-disabled").prop("disabled",!1)):o.remove())}),n&&(Lt.tcepo.errorObject[t]=n),c;var e,t,a,i,o,r,c,n},on_true:function(){return!0},on_false:function(){return m(Lt(l).find(".tm-epo-field").first(),s),!0}}}function lt(l,d,s){Lt.tcepo.formSubmitEvents[s][Lt.tcepo.formSubmitEvents[s].length]={trigger:function(){return e=d,t=s,n=!(c=!0),l.toArray().forEach(function(t){t=Lt(t),(r=t.find("[type='checkbox'][data-exactlimit]")).length&&q(r)&&(r=parseInt(r.attr("data-exactlimit"),10),a=0,t.find("input.tm-epo-field[type='checkbox']:checked").toArray().forEach(function(t){t=Lt(t),i=t.closest("li.tmcp-field-wrap").find("input.tm-qty"),a=0<i.length?((i=parseInt(i.val(),10))<=0&&(i=1),parseInt(a,10)+i):parseInt(a,10)+1}),o=t.closest(".cpf-element"),o=o.find("div.tm-error-min"),r!==a?(c=!1,n=t,r=(1===r?Rt.tm_epo_global_validator_messages.epoexactsingle:Rt.tm_epo_global_validator_messages.epoexact).replaceAll("{0}",r),o.length&&o.remove(),"before"===Rt.tm_epo_global_error_label_placement?t.closest(".tc-element-container").before('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>"):t.closest(".tc-element-container").after('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>"),e.find(Mt.addToCartButtonSelector).first().removeClass("disabled loading fpd-disabled").prop("disabled",!1)):o.remove())}),n&&(Lt.tcepo.errorObject[t]=n),c;var e,t,a,i,o,r,c,n},on_true:function(){return!0},on_false:function(){return m(Lt(l).find(".tm-epo-field").first(),s),!0}}}function dt(e,l){Lt.tcepo.formSubmitEvents[l][Lt.tcepo.formSubmitEvents[l].length]={trigger:function(){return t=l,n=!(c=!0),e.toArray().forEach(function(t){var e;(e=(t=Lt(t)).find("[type='checkbox'][data-minimumlimit]")).length&&q(e)&&(r=parseInt(e.attr("data-minimumlimit"),10),a=0,t.find("input.tm-epo-field[type='checkbox']:checked").toArray().forEach(function(t){t=Lt(t),i=t.closest("li.tmcp-field-wrap").find("input.tm-qty"),a=0<i.length?((i=parseInt(i.val(),10))<=0&&(i=1),parseInt(a,10)+i):parseInt(a,10)+1}),o=t.closest(".cpf-element"),o=o.find("div.tm-error-min"),a<r?(c=!1,n=t,r=(1===r?Rt.tm_epo_global_validator_messages.epominsingle:Rt.tm_epo_global_validator_messages.epomin).replaceAll("{0}",r),o.length&&o.remove(),"before"===Rt.tm_epo_global_error_label_placement?t.closest(".tc-element-container").before('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>"):t.closest(".tc-element-container").after('<div class="tm-error-min tm-error tc-cell tcwidth tcwidth-100">'+r+"</div>")):o.remove())}),n&&(Lt.tcepo.errorObject[t]=n),c;var t,a,i,o,r,c,n},on_true:function(){return!0},on_false:function(){return m(!1,l),!0}}}function st(t){return null!==t&&("object"==typeof t&&(t=t[0]),Number.isFinite(parseFloat(t)))?t:0}function B(t,e,a,i){return t=st(t),t=a?Lt.epoAPI.applyFilter("tc_apply_dpd",t,e,a,i):t}function re(t,e){var a=0;return 0<t.length&&(a=t.data("regular-price")),a=Lt.epoAPI.applyFilter("tc_calculate_product_regular_price",a,t),(!e||!1!==a)&&(a=parseFloat(a),Number.isFinite(a)?a:0)}function ce(t,e){var a=0;return 0<t.length&&(a=t.data("price")),a=Lt.epoAPI.applyFilter("tc_calculate_product_price",a,t),(!e||!1!==a)&&(a=parseFloat(a),Number.isFinite(a)?a:0)}function pt(e,a,i,o,t,r,c,n){var l,d,s,p,m,_,f,u,g,h=e.toString(),v=0,e=0,y=a.closest(".cpf-element").attr("data-uniqid"),b=a.closest(".tmcp-ul-wrap"),w=i.this_epo_totals_container.data("totalsHolder_tc_totals_ob"),x=b.find(".tmcp-field, .tmcp-fee-field, .tmcp-sub-fee-field").filter(":checked").index(a),A=b.find(".tmcp-field, .tmcp-fee-field, .tmcp-sub-fee-field").index(a),k=i.is_associated?i.this_epo_container:i.this_epo_container.not(Mt.epoSelector+" "+Mt.associatedEpoSelector),F=Lt.epoAPI.util.parseJSON(Rt.tm_epo_math)||{};-1===x&&a.is(".tmcp-checkbox, .tmcp-radio"),-1!==A||a.is(".tmcp-checkbox, .tmcp-radio")||(A=0),a.is(".tcdisabled")||o||a.data("addedtcEpoBeforeOptionPriceCalculation")||(Qt.on("tcEpoBeforeOptionPriceCalculation.math"+y,function(){Gt(i,a,void 0,void 0,void 0,!0)}),Qt.on("tcEpoAfterNormalOptionPriceCalculation.math"+y,function(){a.data("fetchOptionPrices",!1),a.data("fetchOptionPrices-forced",!1),a.data("fetchOptionPrices-fee",!1),a.data("fetchOptionPrices-fee-forced",!1),a.data("fetchOptionPrices-sub-fee",!1),a.data("fetchOptionPrices-sub-fee-forced",!1)}),a.data("addedtcEpoBeforeOptionPriceCalculation",1)),a.is(".tmcp-field")?a.data("fetchOptionPrices")?(_=a.data("fetchOptionPrices"),f=a.data("fetchOptionPrices-forced")):(_=Yt(i,b,".tmcp-field",0,0,[],!0,void 0,void 0,void 0,void 0,void 0,!0),f=Yt(i,b,".tmcp-field",0,0,[],!0,!0,void 0,void 0,void 0,void 0,!0),a.data("fetchOptionPrices",_),a.data("fetchOptionPrices-forced",f)):a.is(".tmcp-fee-field")?a.data("fetchOptionPrices-fee")?(_=a.data("fetchOptionPrices-fee"),f=a.data("fetchOptionPrices-fee-forced")):(_=Yt(i,b,".tmcp-fee-field",0,0,[],!0,void 0,void 0,void 0,void 0,void 0,!0),f=Yt(i,b,".tmcp-fee-field",0,0,[],!0,!0,void 0,void 0,void 0,void 0,!0),a.data("fetchOptionPrices-fee",_),a.data("fetchOptionPrices-fee-forced",f)):a.is(".tmcp-sub-fee-field")&&(a.data("fetchOptionPrices-sub-fee")?(_=a.data("fetchOptionPrices-sub-fee"),f=a.data("fetchOptionPrices-sub-fee-forced")):(_=Yt(i,b,".tmcp-sub-fee-field",0,0,[],!0,void 0,void 0,void 0,void 0,void 0,!0),f=Yt(i,b,".tmcp-sub-fee-field",0,0,[],!0,!0,void 0,void 0,void 0,void 0,!0),a.data("fetchOptionPrices-sub-fee",_),a.data("fetchOptionPrices-sub-fee-forced",f))),Object.keys(F).forEach(function(t){var e,a;""!==F[t].name&&""!==F[t].value&&(e=F[t].name,a=F[t].value,h=e.startsWith("{")?h.replaceAll(e,a):F[t].name.isNumeric()?h.replaceAll("{"+e+"}",a):(e="{"+e+"}",a.startsWith("{")?h.replaceAll(e,a):h.replaceAll(e,Lt.epoAPI.math.unformat(a.replace(",",".")))))}),x=void 0!==w?(h=h.replaceAll("{quantity}",Lt.epoAPI.math.unformat(w.qty)),u=t&&void 0!==w.original_product_price?Lt.epoAPI.math.unformat(w.original_product_price):Lt.epoAPI.math.unformat(w.product_price),void 0!==w.dynamic_product_price?Lt.epoAPI.math.unformat(w.dynamic_product_price):0):(h=h.replaceAll("{quantity}",0),u=0),u=Lt.epoAPI.math.toFloat(u),h=(h=h.replaceAll("{product_price}",u)).replaceAll("{dynamic_product_price}",x),r=Lt.epoAPI.math.toFloat(r=r||0),c=Lt.epoAPI.math.toFloat(c=c||0),h=(h=(h=(h=h.replaceAll("{options_total}",r)).replaceAll("{product_price_plus_options_total}",u+r)).replaceAll("{cumulative_total}",c)).replaceAll("{product_price_plus_cumulative_total}",u+c),(h=(h=void 0!==f.floatingBoxData&&void 0!==f.floatingBoxData[A]?(h=(h=(h="number"===f.floatingBoxData[A].input_type||"hidden"===f.floatingBoxData[A].input_type?h.replaceAll("{this.value}",Lt.epoAPI.math.toFloat(Lt.epoAPI.math.unformat(f.floatingBoxData[A].valueText))):h.replaceAll("{this.value}",Lt.epoAPI.math.toFloat(Lt.epoAPI.math.unformat(f.floatingBoxData[A].valueText,Mt.localDecimalSeparator)))).replaceAll("{this.rawvalue}",f.floatingBoxData[A].valueText)).replaceAll("{this.text}",f.floatingBoxData[A].valueText)).replaceAll("{this.value.length}",f.floatingBoxData[A].valueText.length):h.replaceAll("{this.value}",0).replaceAll("{this.rawvalue}","").replaceAll("{this.text}","").replaceAll("{this.value.length}",0)).replaceAll("{this.count}",_.floatingBoxData.length).replaceAll("{this.count.quantity}",_.floatingBoxData.map(function(t){return t.quantity}).reduce(function(t,e){return Lt.epoAPI.math.toFloat(t)+Lt.epoAPI.math.toFloat(e)},0)).replaceAll("{this.quantity}",a.data("tm-quantity"))).match(/\{(\s)*?field\.([^}]*)}/)&&h.match(/\{(\s)*?field\.([^}]*)}/g).forEach(function(t){if(void 0!==(l=t.match(/\{(\s)*?field\.([^}]*)}/))[2]&&"string"==typeof l[2]&&-1!==(s=l[2].lastIndexOf("."))&&(m=l[2].substring(0,s),p=l[2].substring(s+1),-1!==Lt.inArray(p,["price","value","value.length","rawvalue","text","text.length","quantity","count","count.quantity"]))){if((s=k.find("[data-uniqid='"+Lt.epoAPI.util.escapeSelector(m)+"']")).length){switch(m=s.find(".tmcp-field, .tmcp-fee-field, .tmcp-sub-fee-field"),d=m.first(),a.is(".tcdisabled")||o||a.data("addedfieldtcEpoBeforeOptionPriceCalculation")||(Qt.on("tcEpoBeforeOptionPriceCalculation.math"+y,function(){Gt(i,a,void 0,void 0,void 0,!0),a.trigger("tm-math-select-change-html-all")}),a.data("addedfieldtcEpoBeforeOptionPriceCalculation",1)),v=0,p){case"text":case"rawvalue":v=""}if(s.is(".tc-container-enabled")){switch(n||m.toArray().forEach(function(t){t=Lt(t),a.attr("id")!==t.attr("id")&&(a.is(".tmcp-dynamic")||t.is(".tmcp-dynamic"))&&Gt(i,t,void 0,void 0,void 0,!0,void 0,void 0,!0),o||t.data("addedmathevent")||(t.on("input.mathevent",function(){a.is(".tcdisabled")||a.trigger("change.cpf",{calculateMathPrice:1})}),t.data("addedmathevent",1))}),d.is(".tmcp-field")?v=Yt(i,s,".tmcp-field",0,0,[],!0,void 0,void 0,!0,void 0,void 0,!0):d.is(".tmcp-fee-field")?v=Yt(i,s,".tmcp-fee-field",0,0,[],!0,void 0,void 0,!0,void 0,void 0,!0):d.is(".tmcp-sub-fee-field")&&(v=Yt(i,s,".tmcp-sub-fee-field",0,0,[],!0,void 0,void 0,!0,void 0,void 0,!0)),p){case"price":v=v.total,a.is(".tmcp-dynamic")&&(g=ne(i,d,"price"),"math"===ne(i,d,"price_type"))&&g.includes("{dynamic_product_price}")&&(v=0);break;case"value":case"text":case"rawvalue":v.floatingBoxData&&(v=v.floatingBoxData.map(function(t){return"number"===t.input_type||"hidden"===t.input_type?"text"===p||"rawvalue"===p?t.valueText:Lt.epoAPI.math.unformat(t.valueText):"text"===p||"rawvalue"===p?t.valueText:Lt.epoAPI.math.unformat(t.valueText,Mt.localInputDecimalSeparator)}).reduce(function(t,e){return"text"===p||"rawvalue"===p?t+e:Lt.epoAPI.math.toFloat(t)+Lt.epoAPI.math.toFloat(e)},"text"===p||"rawvalue"===p?"":0),"text"!==p&&"rawvalue"!==p||(""===v?v="''":v.toString().isNumeric()||(v="'"+v.replaceAll("'","\\'")+"'")));break;case"value.length":case"text.length":v.floatingBoxData&&(v=v.floatingBoxData.map(function(t){return t.valueText}).reduce(function(t,e){return Lt.epoAPI.math.toFloat(t)+e.length},0));break;case"quantity":case"count.quantity":v.floatingBoxData&&(v=v.floatingBoxData.map(function(t){return t.quantity}).reduce(function(t,e){return Lt.epoAPI.math.toFloat(t)+Lt.epoAPI.math.toFloat(e)},0));break;case"count":v.floatingBoxData&&(v=v.floatingBoxData.length)}"text"!==p&&"rawvalue"!==p&&(v=Lt.epoAPI.math.toFloat(v),Number.isFinite(v)||(v=0))}}else switch(v=0,p){case"text":case"rawvalue":v=""}m=new RegExp(l[0]),h="text"===p||"rawvalue"===p?""===v?h.replace(m,"''"):h.replace(m,v):Number.isFinite(v)?h.replace(m,v):h.replace(m,"'"+v.replace("'","\\'")+"'")}});try{e=M.evaluate(h)}catch(t){e=0}return e}function ne(t,e,a){var i,o,r,c,e=Lt(e),n=e,t=t.main_cart,l="input[name^='variation_id']";return 0<t.find("input.variation_id").length&&(l="input.variation_id"),t=(t=t.find(l).val())||0,e.is("select")&&(n=e.find("option:selected")),l=Lt.epoAPI.util.parseJSON(n.attr("data-rules")),n=Lt.epoAPI.util.parseJSON(n.attr("data-rulestype")),o="","object"==typeof l?(c=t in l?l[t]:"object"==typeof(c=Lt.epoAPI.util.parseJSON(e.closest(".tmcp-ul-wrap").attr("data-rules")))&&t in c?c[t]:l[0],"object"==typeof n?o=t in n?n[t]:"object"==typeof(i=Lt.epoAPI.util.parseJSON(e.closest(".tmcp-ul-wrap").attr("data-rulestype")))&&t in i?i[t]:n[0]:"object"==typeof(n=Lt.epoAPI.util.parseJSON(e.closest(".tmcp-ul-wrap").attr("data-rulestype")))&&(o=t in n?n[t]:n[0])):(r=e.closest(".tmcp-ul-wrap"),"object"==typeof(l=Lt.epoAPI.util.parseJSON(r.attr("data-rules")))&&(c=t in l?l[t]:l[0],"object"==typeof n?o=t in n?n[t]:"object"==typeof(i=Lt.epoAPI.util.parseJSON(r.attr("data-rulestype")))&&t in i?i[t]:n[0]:"object"==typeof(n=Lt.epoAPI.util.parseJSON(r.attr("data-rulestype")))&&(o=t in n?n[t]:n[0]))),"object"==typeof c&&(c=c[0]),"object"==typeof o&&(o=o[0]),e.is(".tmcp-fee-field")&&-1!==Lt.inArray(o,["fee","stepfee","currentstepfee"])&&(o=""),"price"===a?c:o}function N(t){for(var e,a=new RegExp(/[\p{L}\d!@#$%^&*()_+=\{[\}\]|\\"':;?/>.<,-]+/,"gu"),i=0;null!==(e=a.exec(t));)e.index===a.lastIndex&&a.lastIndex++,i+=e.length;return i}function Gt(e,t,a,i,o,r,c,n,l){var d,s,p,m,_,f,u,g,h,v,y,b,w,x,A,k,F,P=t instanceof Lt?t:Lt(t),t=P,I=P.is(".tmcp-range"),E="",C=e.main_product,q=e.epoEventId,S=!0,T=0,j=0,O=!1;P.data("associated_price_set")||(a?(d=a.cart,s=a.current_variation,p=a.bundleid,m=a.epoTotalsContainer,f=a.product_price,u=a.product_original_price,_=a.apply_dpd,S=a.per_product_pricing):(void 0!==(d=e.main_cart).data("per_product_pricing")&&(S=d.data("per_product_pricing")),a="input[name^='variation_id']",0<d.find("input.variation_id").length&&(a="input.variation_id"),s=d.find(a).val(),p=Lt.epoAPI.applyFilter("tc_get_bundleid",d.attr("data-product_id"),d,e),s=s||0,m=Lt.epoAPI.applyFilter("tc_get_totals_container",e.this_epo_totals_container,P,C,p),f=ce(m),u=re(m),_=m.data("fields-price-rules")),f=Lt.epoAPI.applyFilter("tc_alter_product_price",f,P,d,m,p),u=Lt.epoAPI.applyFilter("tc_alter_product_original_price",u,P,d,m),!1!==f&&S&&(P.is("select")&&(t=P.find("option:selected")),(t=i?i:t).toArray().forEach(function(t){t=Lt(t),k=Lt.epoAPI.util.parseJSON(t.attr("data-rules")),F=Lt.epoAPI.util.parseJSON(t.attr("data-rulestype")),w=Lt.epoAPI.util.parseJSON(t.attr("data-original-rules")),P.is(".tmcp-dynamic")&&(k=Lt.epoAPI.util.parseJSON(t.attr("data-formula")),w=Lt.epoAPI.util.parseJSON(t.attr("data-formula")),F=Lt.epoAPI.util.parseJSON(t.attr("data-calculation-type"))),void 0===w&&(w=k),x="","object"==typeof k?(v=s in k?(h=k[s],w[s]):(v=Lt.epoAPI.util.parseJSON(P.closest(".tmcp-ul-wrap").attr("data-rules")),b=P.closest(".tmcp-ul-wrap").data("original-rules"),h="object"==typeof v&&s in v?v[s]:k[0],"object"==typeof b&&s in b?b[s]:w[0]),"object"==typeof F?x=s in F?F[s]:"object"==typeof(g=Lt.epoAPI.util.parseJSON(P.closest(".tmcp-ul-wrap").attr("data-rulestype")))&&s in g?g[s]:F[0]:"object"==typeof(F=Lt.epoAPI.util.parseJSON(P.closest(".tmcp-ul-wrap").attr("data-rulestype")))&&(x=s in F?F[s]:F[0])):(b=P.closest(".tmcp-ul-wrap"),k=Lt.epoAPI.util.parseJSON(b.attr("data-rules")),w=Lt.epoAPI.util.parseJSON(b.attr("data-original-rules")),"object"==typeof k&&(h=s in k?k[s]:k[0],v="object"==typeof w?s in w?w[s]:w[0]:h,"object"==typeof F?x=s in F?F[s]:"object"==typeof(g=Lt.epoAPI.util.parseJSON(b.attr("data-rulestype")))&&s in g?g[s]:F[0]:"object"==typeof(F=Lt.epoAPI.util.parseJSON(b.attr("data-rulestype")))&&(x=s in F?F[s]:F[0]))),"object"==typeof x&&(x=x[0]),P.is(".tmcp-fee-field")&&(-1!==Lt.inArray(x,["fee","stepfee","currentstepfee"])&&(x=""),_=0),void 0===o&&(P.is("select")?P.find("option"):t).removeClass("tm-epo-late-field").removeData("tm-price-for-late islate"),"math"!==x?(h=st(h),v=st(v)):"object"==typeof h&&(h=h[0]),F=function(t,e,a,i,o,r,c,n,l,d,s,p,m,_,f,u,g,h){var v,y,b,w,x=!1,A=i.val();switch(t){case"":e=B(v=e,c,n);break;case"fixednon":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),e=B(v=e=(b=A.length-y)<=0?0:e,c,n);break;case"math":(x=e!==a)&&(a=pt(a,_,f,!0,!0,l,d,s)),e=pt(e,_,f,p,Lt.epoAPI.applyFilter("tc_use_undiscounted_price",void 0,_,m,c),l,d,s),x||(a=e),e=B(v=e,c,n);break;case"percent_cart_total":w=parseFloat(Rt.cart_total),v=e/100*(w=Number.isFinite(w)?w:0),e=B(e,c,n)/100*w,a=B(a,c,n)/100*w;break;case"percent":v=e/100*o,e=B(e,c,n)/100*o,a=a/100*r;break;case"percentcurrenttotal":Lt.tcepo.lateFieldsPrices[g].push({setter:i,price:e,original_price:a,bundleid:u,pricetype:t}),i.data("tm-price-for-late",e).data("tm-original-price-for-late",a).data("islate",1).addClass("tm-epo-late-field"),a=e=v=0;break;case"fixedcurrenttotal":e=B(e,c,n),Lt.tcepo.lateFieldsPrices[g].push({setter:i,price:e,original_price:a,bundleid:u,pricetype:t}),i.data("tm-price-for-late",e).data("tm-original-price-for-late",a).data("islate",1).addClass("tm-epo-late-field"),a=e=v=0;break;case"word":v=e*N(A),e=B(e,c,n)*N(A),a*=N(A);break;case"wordpercent":v=e/100*o*N(A),e=B(e,c,n)/100*o*N(A),a=a/100*r*N(A);break;case"wordnon":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e*(b=(b=N(A)-y)<0?0:b),e=B(e,c,n)*b,a*=b;break;case"wordpercentnon":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e/100*o*(b=(b=N(A)-y)<0?0:b),e=B(e,c,n)/100*o*b,a=a/100*r*b;break;case"char":v=e*A.length,e=B(e,c,n)*A.length,a*=A.length;break;case"charpercent":v=e/100*o*A.length,e=B(e,c,n)/100*o*A.length,a=a/100*r*A.length;break;case"charnospaces":v=e*A.replace(/\s/g,"").length,e=B(e,c,n)*A.replace(/\s/g,"").length,a*=A.replace(/\s/g,"").length;break;case"charnofirst":v=e*(b=(b=A.length-1)<0?0:b),e=B(e,c,n)*b,a*=b;break;case"charnon":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e*(b=(b=A.length-y)<0?0:b),e=B(e,c,n)*b,a*=b;break;case"charpercentnon":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e/100*o*(b=(b=A.length-y)<0?0:b),e=B(e,c,n)/100*o*b,a=a/100*r*b;break;case"charnonnospaces":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e*(b=(b=A.replace(/\s/g,"").length-y)<0?0:b),e=B(e,c,n)*b,a*=b;break;case"charpercentnonnospaces":y=parseInt(i.attr("data-freechars"),10),Number.isFinite(y)||(y=0),v=e/100*o*(b=(b=A.replace(/\s/g,"").length-y)<0?0:b),e=B(e,c,n)/100*o*b,a=a/100*r*b;break;case"charpercentnofirst":v=e/100*o*(b=(b=A.length-1)<0?0:b),e=B(e,c,n)/100*o*b,a=a/100*r*b;break;case"step":e=h?(v=e*A,B(e,c,n)*A):(v=e*Lt.epoAPI.math.toFloat(A),B(e,c,n)*Lt.epoAPI.math.toFloat(A)),a*=Lt.epoAPI.math.toFloat(A);break;case"currentstep":a=h?(e=B(v=A,c,n),B(A,c,n)):(v=Lt.epoAPI.math.toFloat(A),e=B(Lt.epoAPI.math.toFloat(A),c,n),B(Lt.epoAPI.math.toFloat(A),c,n));break;case"intervalstep":h&&(v=e*(A-(w=parseFloat(Lt('.tm-range-picker[data-field-id="'+i.attr("id")+'"]').attr("data-min")))),e=B(e,c,n)*(A-w),a*=A-w);break;case"row":v=e*((A.match(/(\r\n|\n|\r)/gm)||[]).length+1),e=B(e,c,n)*((A.match(/(\r\n|\n|\r)/gm)||[]).length+1),a*=(A.match(/(\r\n|\n|\r)/gm)||[]).length+1}return{price:e,original_price:a,undiscounted_price:v}}(x,k=h,w=v,t,f,u,m,_,c,n,l,r,d,P,e,p,q,I),h=F.price,v=F.original_price,x=F.undiscounted_price,F=h,k=x,w=A=y=v,P.data("tm-quantity")&&(x*=parseFloat(P.data("tm-quantity")),A*=parseFloat(P.data("tm-quantity")),k*=parseFloat(P.data("tm-quantity")),w*=parseFloat(P.data("tm-quantity")),h*=parseFloat(P.data("tm-quantity")),v*=parseFloat(P.data("tm-quantity")),F*=parseFloat(P.data("tm-quantity")),y*=parseFloat(P.data("tm-quantity"))),T+=parseFloat(h),j+=parseFloat(v),P.data("price_set",1),t.data("price_set",1),t.data("undiscounted_raw_price",k),t.data("undiscounted_raw_original_price",w),t.data("undiscounted_price",$t(x,m,t)),t.data("undiscounted_original_price",$t(A,m,t)),t.data("raw_price",F),t.data("raw_original_price",y),t.data("price",$t(h,m,t)),t.data("original_price",$t(v,m,t)),i||(P.is(".tc-epo-field-product")&&(k=!1,!P.is("select")&&(P.is(":checkbox")||P.is(":radio"))?P.is(":checked")&&(k=!0):""!==P.val()&&(k=!0),k||(E=t.data("price-html"),O=!0)),H({epoObject:e,obj:t.closest(".tmcp-field-wrap").find(".tc-price"),price:D(T,m,!1,t),formatted_price:E,original_price:D(j,m,!1,t),force:!1,useFormattedPrice:O}),P.data("price-changed",1))})))}function le(e,t){var a,i,o,r,c,n,l,d,s,p,m,_,f=!0,u=e.main_product,g=e.epoEventId,h=e.this_epo_container,v=e.this_epo_totals_container,t=t||u.find(".cart");t.length<=0||(Lt.tcepo.lateFieldsPrices[g]=[],t.toArray().forEach(function(t){if(t=Lt(t),p="input[name^='variation_id']",0<t.find("input.variation_id").length&&(p="input.variation_id"),void 0!==t.data("per_product_pricing")&&(f=t.data("per_product_pricing")),a=t.find(p).val(),p=Lt.epoAPI.applyFilter("tc_get_bundleid",t.attr("data-product_id"),t,e),a=a||0,i=Lt.epoAPI.applyFilter("tc_get_epo_container",h,t,u,p),o=Lt.epoAPI.applyFilter("tc_get_totals_container",v,t,u,p),r=o.data("fields-price-rules"),i.data("tm_rules_init_done")||(o.data("force-quantity")&&t.find(Mt.qtySelector).val(o.data("force-quantity")),i.toArray().forEach(function(t){Lt(t).closest(".tmcp-field-wrap").find(".tm-epo-field").data("tm-quantity",Lt(t).val())}),i.find(".tmcp-attributes, .tmcp-elements").toArray().forEach(function(t){t=Lt(t),c=Lt.epoAPI.util.parseJSON(t.attr("data-rules")),"object"!=typeof(n=Lt.epoAPI.util.parseJSON(t.attr("data-original-rules")))&&(n={0:"0"}),"object"==typeof(c="object"!=typeof c?{0:"0"}:c)&&(l=B(c[Lt.epoAPI.math.toFloat(a)],o,r),d=B(n[Lt.epoAPI.math.toFloat(a)],o,r),t.find(".tmcp-field, .tmcp-fee-field ").toArray().forEach(function(t){t=Lt(t),f?("1"===t.attr("data-no-price")&&(d=l=0),t.data("raw_price",l),t.data("raw_original_price",d),t.data("price",$t(l,o,t)),t.data("original_price",$t(d,o,t)),H({epoObject:e,obj:t.closest(".tmcp-field-wrap").find(".tc-price"),price:D(l,o),original_price:D(d,o),force:!1,useFormattedPrice:!1})):(t.data("price",0),t.data("original_price",0),t.closest(".tmcp-field-wrap").find(".amount").empty())}))}),i.data("tm_rules_init_done",1)),!f)return!0;m=ce(o),s=re(o),_={cart:t,current_variation:a,bundleid:p,epoTotalsContainer:o,product_price:m,product_original_price:s,apply_dpd:r,per_product_pricing:f},p=i.find(".tmcp-field,.tmcp-sub-fee-field,.tmcp-fee-field"),e.is_associated||(p=p.not(Mt.associatedEpoSelector+" .tmcp-field,"+Mt.associatedEpoSelector+" .tmcp-sub-fee-field,"+Mt.associatedEpoSelector+" .tmcp-fee-field")),m=p.filter(".tcenabled"),(!Lt.tcepo.initialActivation[g]||0===m.length&&0<p.length)&&(p.toArray().forEach(function(t){q(Lt(t))}),i.find(".cpf-type-divider,.cpf-type-header").toArray().forEach(function(t){q(Lt(t))}),Lt.tcepo.initialActivation[g]=!0),p.filter(".tcenabled").toArray().forEach(function(t){Gt(e,t,_)}),p.toArray().forEach(function(t){Lt(t).on("tc_element_epo_rules",function(){Gt(e,t,_)})})}))}function de(e,t,a,i,o,r,c,n){var l,d,s,p,m,_,f,u,g,h,v=0,y=0,b=0,w=0,x=e.epoEventId,A=void 0!==n?n:e.this_epo_totals_container.data("fields-price-rules"),k=t,F=a;return Lt.tcepo.lateFieldsPrices[x].forEach(function(t){l=t.price,d=t.original_price,s=t.pricetype,p=t.setter,g=t.bundleid,h="percentcurrenttotal"===s?"_hidden":"_hiddenfixed",(_=p).is("option")&&(_=p.closest("select")),k=parseFloat(Lt.epoAPI.applyFilter("tc_alter_product_price",k,_,c,e.this_epo_totals_container,r)),F=parseFloat(Lt.epoAPI.applyFilter("tc_alter_original_product_price",F,_,c,e.this_epo_totals_container,r)),m=Lt.epoAPI.dom.id(_.attr("name")),f=Lt(".tc-totals-form.tm-totals-form-"+c.attr("data-cart-id")).attr("data-product-id"),u=Lt(".tc-totals-form.tm-totals-form-"+c.attr("data-cart-id")).attr("data-epo-id"),f=Lt(Mt.epoSelector+".tm-product-id-"+f+"[data-epo-id='"+u+"']").find("#"+m+h),g===r?("percentcurrenttotal"===s?(l=parseFloat(l)/100*(B(parseFloat(k),e.this_epo_totals_container,A)+parseFloat(i)),d=parseFloat(d)/100*(parseFloat(F)+parseFloat(o))):"fixedcurrenttotal"===s&&(l=parseFloat(l)+parseFloat(i),d=parseFloat(d)+parseFloat(o)),_.data("tm-quantity")&&(l*=parseFloat(_.data("tm-quantity")),d*=parseFloat(_.data("tm-quantity"))),1===p.data("isset")&&q(p)&&(_.is(".tmcp-field")?(v+=l,y+=d):_.is(".tmcp-fee-field")&&(b+=l,w+=d)),u=$t(l,c,p),g=$t(d,c,p),p.data("price",u),p.data("pricew",u),p.data("original_price",g),p.data("original_pricew",g),H({epoObject:e,obj:p.closest(".tmcp-field-wrap").find(".tc-price"),price:D(u,c,!1,p),original_price:D(g,c,!1,p),force:!1,useFormattedPrice:!1}),0===f.length&&_.before('<input type="hidden" id="'+m+h+'" name="'+m+h+'" value="'+K(l,c)+'">'),(p.is(".tm-epo-field.tmcp-radio")||p.is(".tm-epo-field.tmcp-checkbox"))&&!p.is(":checked")||f.val(K(l,c))):void 0!==p.data("pricew")&&H({epoObject:e,obj:p.closest(".tmcp-field-wrap").find(".tc-price"),price:p.data("pricew"),original_price:void 0!==p.data("original_pricew")?p.data("original_pricew"):p.data("pricew"),force:!1,useFormattedPrice:!1})}),{normal:[v,y],fees:[b,w]}}function mt(){var t;"yes"!==Rt.tm_epo_no_lazy_load&&((t=g?Lt(g).find("img.tmlazy"):Lt(Mt.epoSelector+" img.tmlazy, .tc-styled-variations img.tmlazy")).lazyLoadXT(),t.on("lazyshow",function(){Qt.trigger("lazyLoadXToncomplete")}))}function _t(t){var e,a;t&&(e=Lt(".cart"),(a=(a=t.find(".tm-owl-slider-section")).length||(a=t).is(".tc-repeater-section")?a:!1)&&a.toArray().forEach(function(t){(t=Lt(t)).find(".tc-slider-content").addClass("tm-owl-slider"),(t=t.find(".tm-owl-slider")).length&&(t.addClass("tcowl-carousel-show").addClass("tcowl-carousel").on("changed.owl.carousel",function(){e.css("display","block").addClass("slider-setup")}).tmowlCarousel(Object.assign({rtl:"1"===Rt.isRTL,dots:!1,nav:!0,items:1,autoHeight:!0,mouseDrag:!1,touchDrag:!0,navText:[Rt.i18n_prev_text,Rt.i18n_next_text],navClass:["owl-prev button","owl-next button"],navElement:"a",loop:!1,navRewind:!1},P.tmowlCarouselSettings||{})),t.removeClass("tcowl-carousel-show"))}),Lt.fn.tcTabs)&&t.find(".tc-tabs").tcTabs({headers:"tc-tab-headers",header:"tab-header",dataopenattribute:"data-tab",sortabletabs:!1})}function ft(a,t){var e,i=t.closest(".cpf-element"),o=i.data("repeater-max-rows"),i=i.data("repeater-min-rows")||1,r=t.find(".tc-repeater-element"),c=r.length,r=r.last(),n=r.find(".tmcp-ul-wrap"),l=a.data("tc-repeater-init");return!(o&&o<=c)&&(o<=c+1&&a.is(".tc-repeater-add")&&a.closest(".tc-repeater-wrap").addClass("tc-hidden"),n.is(".tm-element-ul-date, .tm-element-ul-time")&&(n.find(".tm-epo-field").tm_datepicker("destroy"),n.find(".tmcp-date-select").off()),n.is(".tm-element-ul-color")&&n.find(".tm-epo-field").spectrum("destroy"),(o=r.tcClone(!0)).find(".tm-epo-field").attr("id",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+l}),o.find("[data-for]").attr("data-for",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+l}),o.find("[for]:not(:has(.tmcp-date-select))").attr("for",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+l}),o.find("[data-field-id]").attr("data-field-id",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+l}),o.find("[data-tm-date]").attr("data-tm-date",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+l}),o.find(".tmcp-date-select").attr("id",function(t,e){return Lt(this).attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),o.find("[for]:has(.tmcp-date-select)").attr("for",function(t,e){return Lt(this).find(".tmcp-date-select").attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),o.find(".tm-epo-field").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+l+"]")}),o.find(".tm-qty").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+l+"]")}),o.find(".tmcp-date-select").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+l+"]")}),e=o.find(".tmcp-ul-wrap"),i<=c&&1<=t.find(".tc-repeater-element").length&&(t.find(".tc-repeater-delete").removeClass("tc-hidden"),o.find(".tc-repeater-delete").removeClass("tc-hidden")),e.is(".tm-element-ul-checkbox")?(o.find("li.tmcp-field-wrap").removeClass("tc-active"),o.find(".tm-epo-field.tmcp-checkbox").prop("checked",!1),o.find(".tm-epo-field.tmcp-checkbox").filter(function(t,e){return-1!==Lt.inArray(Lt(e).val(),a.data("repeater-init-value"))}).prop("checked",!0).closest("li.tmcp-field-wrap").addClass("tc-active")):e.is(".tm-element-ul-radio")?(o.find("li.tmcp-field-wrap").removeClass("tc-active"),o.find(".tm-epo-field.tmcp-radio").filter(function(t,e){return Lt(e).val()===a.data("repeater-init-value")}).prop("checked",!0).closest("li.tmcp-field-wrap").addClass("tc-active")):o.find(".tm-epo-field").val(a.data("repeater-init-value")),e.is(".tm-element-ul-checkbox")||e.is(".tm-element-ul-radio")||o.find(".tm-epo-field").val(a.data("repeater-init-value")),e.is(".tm-element-ul-upload")&&(o.find(".tc-upload-preview").remove(),o.find(".tm-filename").remove()),o.find(".tc-element-qty").toArray().forEach(function(t){var t=Lt(t),e=t.attr("data-default-value");t.val(e).trigger("change")}),a.data("tc-repeater-init",a.data("tc-repeater-init")+1),[o,r,n])}function ut(e,t,a,i){var o=t.find(".tmcp-ul-wrap");o.is(".tm-element-ul-range")&&(t.find(".tm-range-picker").removeData("tc-picker-init").attr("class","tm-range-picker").html(""),qt(t)),o.is(".tm-element-ul-date, .tm-element-ul-time")&&(L(a),L(o)),o.is(".tm-element-ul-color")&&(j(a),j(o)),t.find(".tm-tooltip").removeData("tctooltip").removeData("tm-has-tm-tip"),Lt.tcToolTip(t.find(".tm-tooltip")),t.find(".tm-epo-field").removeData("addedtcEpoBeforeOptionPriceCalculation").toArray().forEach(function(t){q(t=Lt(t),!1,!0),t.is(".tcenabled")&&Gt(e,t),t.on("tc_element_epo_rules",function(){Gt(e,t)})}),i&&(o.is(".tm-element-ul-checkbox")?t.find(".tm-epo-field.tmcp-checkbox").filter(":checked"):o.is(".tm-element-ul-radio")?t.find(".tm-epo-field.tmcp-radio").filter(":checked"):t.find(".tm-epo-field")).trigger("change.cpf")}function gt(t,e,a,i){var o,r=t.closest(".cpf-element").data("repeater-min-rows"),c=t.find(".tc-repeater-element").length,n=e.index();r&&c<=r?Lt.tc_validator&&i&&(o='<div class="tm-error-repeater tm-error tc-cell tcwidth tcwidth-100">'+Lt.tc_validator.messages.repeaterminrows(r)+"</div>",i.tcToolTip({tip:o,onetime:!0,trigger:!0,tipclass:"tc-error"})):1!==c&&((2===c||c-1<=r)&&t.find(".tc-repeater-delete").addClass("tc-hidden"),a.is(".tc-repeater-add")&&a.closest(".tc-repeater-wrap").removeClass("tc-hidden"),e.remove(),a.data("tc-repeater-init",a.data("tc-repeater-init")-1),n+1!==c)&&t.find(".tc-repeater-element").toArray().forEach(function(t,a){(t=Lt(t)).find(".tm-epo-field").attr("id",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-for]").attr("data-for",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[for]:not(:has(.tmcp-date-select))").attr("for",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-field-id]").attr("data-field-id",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-tm-date]").attr("data-tm-date",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find(".tmcp-date-select").attr("id",function(t,e){return Lt(this).attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),t.find("[for]:has(.tmcp-date-select)").attr("for",function(t,e){return Lt(this).find(".tmcp-date-select").attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),t.find(".tm-epo-field").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")}),t.find(".tm-qty").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")}),t.find(".tmcp-date-select").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")})})}function ht(t,e,a,i){var o,r=t.closest(".cpf-section"),c=r.data("repeater-min-rows"),n=t.find(".tc-repeater-section").length,l=e.index();c&&n<=c?Lt.tc_validator&&i&&(o='<div class="tm-error-repeater tm-error tc-cell tcwidth tcwidth-100">'+Lt.tc_validator.messages.repeaterminrows(c)+"</div>",i.tcToolTip({tip:o,onetime:!0,trigger:!0,tipclass:"tc-error"})):1!==n&&((2===n||n-1<=c)&&(t.find(".tc-repeater-section-delete").addClass("tc-hidden"),t.find(".tc-repeater-section").removeClass("has-delete"),r.find(".tcowl-carousel").trigger("refresh.owl.carousel")),a.is(".tc-section-repeater-add")&&a.closest(".tc-repeater-wrap").removeClass("tc-hidden"),e.remove(),a.data("tc-repeater-init",a.data("tc-repeater-init")-1),l+1!==n)&&t.find(".tc-repeater-section").toArray().forEach(function(t,a){(t=Lt(t)).find(".tm-epo-field").attr("id",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-for]").attr("data-for",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[for]:not(:has(.tmcp-date-select))").attr("for",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-field-id]").attr("data-field-id",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find("[data-tm-date]").attr("data-tm-date",function(t,e){return e.replace(/\_\d+$/g,"")+(0!==a?"_"+a:"")}),t.find(".tmcp-date-select").attr("id",function(t,e){return Lt(this).attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),t.find("[for]:has(.tmcp-date-select)").attr("for",function(t,e){return Lt(this).find(".tmcp-date-select").attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),t.find(".tm-epo-field").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")}),t.find(".tm-qty").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")}),t.find(".tmcp-date-select").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+a+"]")})})}function vt(t,e){var a,i=e.closest(".cpf-section"),o=i.data("repeater-max-rows"),r=i.data("repeater-min-rows")||1,c=e.find(".tc-repeater-section"),n=c.length,l=c.last(),d=l.find(".tmcp-ul-wrap"),s=t.data("tc-repeater-init"),p=t.data("repeater-init-value");return!(o&&o<=n)&&(o<=n+1&&t.is(".tc-repeater-add")&&t.closest(".tc-repeater-wrap").addClass("tc-hidden"),d.toArray().forEach(function(t){t=Lt(t);t.is(".tm-element-ul-date, .tm-element-ul-time")&&(t.find(".tm-epo-field").tm_datepicker("destroy"),t.find(".tmcp-date-select").off()),t.is(".tm-element-ul-color")&&t.find(".tm-epo-field").spectrum("destroy")}),(o=l.tcClone(!0)).find(".tm-epo-field").attr("id",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+s}),o.find("[data-for]").attr("data-for",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+s}),o.find("[for]:not(:has(.tmcp-date-select))").attr("for",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+s}),o.find("[data-field-id]").attr("data-field-id",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+s}),o.find("[data-tm-date]").attr("data-tm-date",function(t,e){return e.replace(/\_\d+$/g,"")+"_"+s}),o.find(".tmcp-date-select").attr("id",function(t,e){return Lt(this).attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),o.find("[for]:has(.tmcp-date-select)").attr("for",function(t,e){return Lt(this).find(".tmcp-date-select").attr("data-tm-date")+"_"+e.substring(e.lastIndexOf("_")+1)}),o.find(".tm-epo-field").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+s+"]")}),o.find(".tm-qty").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+s+"]")}),o.find(".tmcp-date-select").attr("name",function(t,e){return e.replace(/\[\d+\]/g,"["+s+"]")}),a=o.find(".tmcp-ul-wrap"),r<=n&&1<=e.find(".tc-repeater-section").length&&(e.find(".tc-repeater-section-delete").removeClass("tc-hidden"),o.find(".tc-repeater-section-delete").removeClass("tc-hidden"),c.addClass("has-delete"),o.addClass("has-delete"),i.find(".tcowl-carousel").trigger("refresh.owl.carousel")),a.toArray().forEach(function(t){t=Lt(t);t.is(".tm-element-ul-checkbox")?(t.find("li.tmcp-field-wrap").removeClass("tc-active"),t.find(".tm-epo-field.tmcp-checkbox").prop("checked",!1),t.find(".tm-epo-field.tmcp-checkbox").filter(function(t,e){var e=Lt(e),a=e.attr("id").replace(/_(\d+)$/,"");return-1!==Lt.inArray(e.val(),p[a])}).prop("checked",!0).closest("li.tmcp-field-wrap").addClass("tc-active")):t.is(".tm-element-ul-radio")?(t.find("li.tmcp-field-wrap").removeClass("tc-active"),t.find(".tm-epo-field.tmcp-radio").filter(function(t,e){var e=Lt(e),a=e.attr("id").replace(/_(\d+)$/,"");return e.val()===p[a]}).prop("checked",!0).closest("li.tmcp-field-wrap").addClass("tc-active")):t.find(".tm-epo-field").each(function(){var t=Lt(this),e=t.attr("id").replace(/_(\d+)$/,"");p.hasOwnProperty(e)&&t.val(p[e])}),t.is(".tm-element-ul-checkbox")||t.is(".tm-element-ul-radio")||t.find(".tm-epo-field").each(function(){var t=Lt(this),e=t.attr("id").replace(/_(\d+)$/,"");p.hasOwnProperty(e)&&t.val(p[e])}),t.is(".tm-element-ul-upload")&&(t.find(".tc-upload-preview").remove(),t.find(".tm-filename").remove())}),o.find(".tc-element-qty").toArray().forEach(function(t){var t=Lt(t),e=t.attr("data-default-value");t.val(e).trigger("change")}),t.data("tc-repeater-init",t.data("tc-repeater-init")+1),[o,l,d])}function yt(e,t,a,i){var o,r;t.find(".tmcp-ul-wrap").toArray().forEach(function(t){t=Lt(t);t.is(".tm-element-ul-range")&&(t.find(".tm-range-picker").removeData("tc-picker-init").attr("class","tm-range-picker").html(""),qt(t)),t.is(".tm-element-ul-date, .tm-element-ul-time")&&(o=!0,L(t)),t.is(".tm-element-ul-color")&&(r=!0,j(t)),i&&(t.is(".tm-element-ul-checkbox")?t.find(".tm-epo-field.tmcp-checkbox").filter(":checked"):t.is(".tm-element-ul-radio")?t.find(".tm-epo-field.tmcp-radio").filter(":checked"):t.find(".tm-epo-field")).trigger("change.cpf")}),o&&L(a),r&&j(a),t.find(".tm-tooltip").removeData("tctooltip").removeData("tm-has-tm-tip"),Lt.tcToolTip(t.find(".tm-tooltip")),t.find(".tm-epo-field").removeData("addedtcEpoBeforeOptionPriceCalculation").toArray().forEach(function(t){q(t=Lt(t),!1,!0),t.is(".tcenabled")&&Gt(e,t),t.on("tc_element_epo_rules",function(){Gt(e,t)})}),t.find(".tc-tabs").removeData("tctabs"),t.find(".tcowl-carousel").removeData("owl.carousel"),t.find(".owl-nav, .owl-dots").remove(),_t(t)}function bt(g,h){var v,y,b;g&&(g=Lt(g)).length&&(v=h.main_cart,y=te(v),y=Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantity",y,{epo:h,currentCart:v,obj:g,qtyElement:y}),(b=g.find(".tc-repeater-quantity")).toArray().forEach(function(t,s){var e,p,m=Lt(t),_=m.data("repeater-max-rows");m.data("tc-repeater-init")||(e=(t=m.find(".tc-repeater-element")).length,(t=t.first().find(".tm-epo-field")).is(":checkbox")?m.data("repeater-init-value",t.filter(":checked").toArray().map(function(t){return Lt(t).val()})):t.is(":radio")?m.data("repeater-init-value",t.filter(":checked").val()):m.data("repeater-init-value",t.val()),m.data("tc-repeater-init",e),m.data("tc-repeater-name",t.attr("name")),y.length&&(p=m.find(".tc-element-inner-wrap"),y.off("change.r"+s+"cpf input.r"+s+"cpf").on("change.r"+s+"cpf input.r"+s+"cpf",function(t){var e,a,i,o,r,c=Lt(this),n=c.data("epopreviousvalue"),l=Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantityValue",c.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:c}),d=l-n;if(void 0===n&&(d=l-(n=l-1)),void 0!==t.isTrigger&&(d=l-(n=m.find(".tc-element-inner-wrap").find(".tc-repeater-element").length)),0!==(d=_&&_<d?_-1:d)){if((t=Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantity_epopreviousvalue",c.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:c}))<=0&&(t=1),s===b.length&&c.data("epopreviousvalue",t),0<d){if((e=p.find(".tc-repeater-element").eq(l-1)).length)return;for(a=0;a<d;a++)(o=ft(m,p))&&(i=i?i.add(o[0]):o[0],0===a)&&(r=o[2]);i&&(i.appendTo(p.find(".tc-element-container")),ut(h,i,r))}else for(a=l-d;l<a;--a)e=p.find(".tc-repeater-element").eq(a-1),gt(p,e,m);v.trigger({type:"tm-epo-update",norules:2})}}),y.data("epopreviousvalue",Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantityValue",y.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:y})).trigger("change")))}),g.find(".tc-repeater-add").toArray().forEach(function(t){var e,a,i=Lt(t);i.data("tc-repeater-init")||(a=(t=(e=i.closest(".tc-element-inner-wrap")).find(".tc-repeater-element")).length,t=t.first().find(".tm-epo-field"),1<e.find(".tc-repeater-element").length&&e.find(".tc-repeater-delete").removeClass("tc-hidden"),t.is(":checkbox")?i.data("repeater-init-value",t.filter(":checked").toArray().map(function(t){return Lt(t).val()})):t.is(":radio")?i.data("repeater-init-value",t.filter(":checked").val()):i.data("repeater-init-value",t.val()),i.data("tc-repeater-init",a),i.data("tc-repeater-name",t.attr("name")),i.on("click.repeater",function(){var t=ft(i,e);t&&(t[0].appendTo(e.find(".tc-element-container")),ut(h,t[0],t[2],!0))}))}),g.find(".tc-repeater-delete .delete").on("click",function(){var t=Lt(this),e=t.closest(".tc-element-inner-wrap");gt(e,t.closest(".tc-repeater-element"),e.find(".tc-repeater-add"),t),h.form.trigger({type:"tm-epo-update",norules:2})}),g.find(".tc-section-repeater-add").toArray().forEach(function(t){var e,a,i,o=Lt(t),r=[];o.data("tc-repeater-init")||(i=(t=(a=o.closest(".tc-section-inner-wrap")).find(".tc-repeater-section")).length,e=a.find(".sections_repeater"),1<a.find(".tc-repeater-section").length&&a.find(".tc-section-repeater-delete").removeClass("tc-hidden"),t.first().find(".tm-epo-field").toArray().forEach(function(t){var t=Lt(t),e=t.attr("id");t.is(":checkbox")?r[e]=t.filter(":checked").toArray().map(function(t){return Lt(t).val()}):t.is(":radio")?r[e]=t.filter(":checked").val():r[e]=t.val()}),o.data("repeater-init-value",r),o.data("tc-repeater-init",i),o.data("tc-repeater-name",e.attr("name")),o.on("click.repeater",function(){var t=vt(o,a);t&&(t[1].after(t[0]),yt(h,t[0],t[2],!0),e.val(function(t,e){return e?parseInt(e,10)+1:2}))}))}),g.find(".tc-section-repeater-quantity").toArray().forEach(function(t,p){var m,_,e,f=Lt(t),a=[],u=f.closest(".cpf-section").data("repeater-max-rows");f.data("tc-repeater-init")||(e=(t=(_=f.find(".tc-section-inner-wrap")).find(".tc-repeater-section")).length,m=_.find(".sections_repeater"),t.first().find(".tm-epo-field").toArray().forEach(function(t){var t=Lt(t),e=t.attr("id");t.is(":checkbox")?a[e]=t.filter(":checked").toArray().map(function(t){return Lt(t).val()}):t.is(":radio")?a[e]=t.filter(":checked").val():a[e]=t.val()}),f.data("repeater-init-value",a),f.data("tc-repeater-init",e),f.data("tc-repeater-name",m.attr("name")),y.length&&(y.off("change.rs"+p+"cpf input.rs"+p+"cpf").on("change.rs"+p+"cpf input.rs"+p+"cpf",function(t){var e,a,i,o,r,c,n=Lt(this),l=n.data("epopreviousvalue"+p),d=Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantityValue",n.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:n}),s=d-l;if(void 0===l&&(s=d-(l=d-1)),void 0!==t.isTrigger&&(l=f.find(".tc-section-inner-wrap").find(".tc-repeater-section").length,s=d-l),0!==(s=u&&u<s?u-1:s)){if((t=Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantity_epopreviousvalue",n.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:n}))<=0&&(t=1),p===b.length&&n.data("epopreviousvalue"+p,t),0<s){if((e=_.find(".tc-repeater-section").eq(d-1)).length)return;for(a=0;a<s;a++)(o=vt(f,_))&&(c=c||o,i=i?i.add(o[0]):o[0],0===a)&&(r=o[2]);i&&(m.val(function(t,e){return e?parseInt(e,10)+parseInt(s,10):2}),c[1].after(i),yt(h,i,r))}else{for(a=d-s;d<a;--a)e=_.find(".tc-repeater-section").eq(a-1),ht(_,e,f);m.val(_.find(".tc-repeater-section").length)}v.trigger({type:"tm-epo-update",norules:2})}}),y.data("epopreviousvalue"+p,Lt.epoAPI.applyFilter("qtyElementForRepeaterQuantityValue",y.val(),{epo:h,currentCart:v,obj:g,qtyElement:y,field:y})).trigger("change")))}),g.find(".tc-repeater-section-delete .delete").on("click",function(){var t=Lt(this),e=t.closest(".tc-section-inner-wrap"),a=t.closest(".tc-repeater-section"),i=e.find(".sections_repeater");ht(e,a,e.find(".tc-section-repeater-add"),t),i.val(function(t,e){return e?parseInt(e,10)-1:2}),h.form.trigger({type:"tm-epo-update",norules:2})}))}function j(t){t&&(t=Lt(t).find(".tm-color-picker")).length&&(t.spectrum({type:"color",theme:"epo",showButtons:!0,allowEmpty:!0,showInitial:!0,showInput:!0,clickoutFiresChange:!1,chooseText:Rt.closeText,cancelText:Rt.i18n_cancel,clearText:""}),t.spectrum("enable"))}function wt(t){t&&Lt(t).length&&Lt(function(){Lt(t).tclightbox()})}function xt(t){var e=t.closest(".tmcp-field-wrap").find("label img"),a=Lt(e).first().attr("data-original");return t.is("select.tm-product-image")&&(t=t.children("option:selected")),a=(a=a||Lt(e).first().attr("src"))||t.attr("data-image"),!(t.attr("data-imagep")?!t.attr("data-imagep"):!a)}function At(t){var i,o,r,c,t=t.is_associated?t.this_epo_container.find(".tm-epo-field.tmcp-upload"):t.this_epo_container.find(".tm-epo-field.tmcp-upload").not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field.tmcp-upload");try{t.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field.tmcp-upload").toArray().forEach(function(t){var e,a;return c=[],""!==(i=Lt(t)).attr("data-file")&&0!==(e=i.attr("data-file").split("|")).length&&((A||k)&&(o=new A("").clipboardData||new k),e.forEach(function(t){a=Lt.epoAPI.util.basename(t),(A||k)&&o.items.add(new File([t],a)),c.push(t)}),o&&(t.files=o.files),c=c.join("|"),r=i.attr("name"),i.trigger("tcupload"),i.after('<input type="hidden" class="tmcp-upload-hidden" name="'+r+'" value="'+c+'">'),void i.removeAttr("data-file"))})}catch(t){P.console.log(t),Lt(".tm-epo-field.tmcp-upload").not(".tm-multiple-file-upload").addClass("tc-nodt"),b=t}}function kt(t,e,a){var i=a.find(".flex-control-nav li:eq(0) img"),a=a.find(".woocommerce-product-gallery__wrapper ").find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),o=e,e=e.closest("a"),r=e.next(".zoomImg");t&&t.image_link&&t.image_link&&1<t.image_link.length?(null!==t.full_src&&""!==t.full_src||(t.full_src=t.image_link),null!==t.full_src_w&&""!==t.full_src_w||(t.full_src_w=o.attr("data-large_image_width")),null!==t.full_src_h&&""!==t.full_src_h||(t.full_src_h=o.attr("data-large_image_height")),o.length&&(t.image_srcset||(t.image_sizes=!1),t.image_sizes||(t.image_srcset=!1),o.tc_set_attr("src",t.image_link,0),o.tc_set_attr("srcset",t.image_srcset,0),o.tc_set_attr("sizes",t.image_sizes,0),o.tc_set_attr("title",t.image_title,0),o.tc_set_attr("alt",t.image_alt,0),o.tc_set_attr("data-src",t.full_src,0),o.tc_set_attr("data-large_image",t.full_src,0),o.tc_set_attr("data-large_image_width",t.full_src_w,0),o.tc_set_attr("data-large_image_height",t.full_src_h,0),a.tc_set_attr("data-thumb",t.image_link,1)),i.length&&(i.tc_set_attr("src",t.image_link,2),i.tc_set_attr("srcset",t.image_srcset,2),i.tc_set_attr("sizes",t.image_sizes,2)),e.length&&(e.tc_set_attr("href",t.full_src,3),e.tc_set_attr("title",t.image_caption,3)),r.length&&r.tc_set_attr("src",t.full_src,4)):(o.length&&(o.tc_reset_attr("src",0),o.tc_reset_attr("srcset",0),o.tc_reset_attr("sizes",0),o.tc_reset_attr("title",0),o.tc_reset_attr("alt",0),o.tc_reset_attr("data-src",0),o.tc_reset_attr("data-large_image",0),o.tc_reset_attr("data-large_image_width",0),o.tc_reset_attr("data-large_image_height",0),a.tc_reset_attr("data-thumb",1)),i.length&&(i.tc_reset_attr("src",2),i.tc_reset_attr("srcset",2),i.tc_reset_attr("sizes",2)),e.length&&(e.tc_reset_attr("href",3),e.tc_reset_attr("title",3)),r.length&&r.tc_reset_attr("src",4))}function O(t,e){var a;return t.is_associated?a=e.find(".tc-product-image .wp-post-image").first():""!==Rt.tm_epo_global_product_image_selector?a=Lt(Rt.tm_epo_global_product_image_selector):0===(a=0===(a=0===(a=0===(a=0===(a=e.find(".woocommerce-product-gallery__image:not(.clone), .woocommerce-product-gallery__image--placeholder:not(.clone)").eq(0).find(".wp-post-image").first()).length?e.find("a.woocommerce-main-image img, img.woocommerce-main-image,a img").not(".thumbnails img,.product_list_widget img").first():a).length?e.find("img.wp-post-image").not(".thumbnails img,.product_list_widget img").first():a).length?e.find(".elementor-widget-wd_single_product_gallery img.wp-post-image").first():a).length?e.find(".elementor-widget-ae-post-image .wp-post-image").first():a).length&&(a=Lt(".woocommerce div.product div.images").not(".thumbnails img,.product_list_widget img").first()),a=1<Lt(a).length?Lt(a).first():a}function Ft(t){var e,a;return t.is_associated?t.main_product.closest(".tc-epo-element-product-container"):(e=t.main_product,t=t.product_id,(a=e.closest("#product-"+t)).length<=0?e.closest(".post-"+t):a)}function Pt(t,e,a,i,o,r,c){var n,l,d,s;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&(n=t[n]).enabled)switch(n.type){case"yith":e?(e.attr("srcset",a).attr("src-orig",a),n.element.data("yith_magnifier")&&n.element.yith_magnifier("destroy"),l={elements:{zoom:Lt(".yith_magnifier_zoom"),zoomImage:e,gallery:Lt(".yith_magnifier_gallery li a")}},n.element.yith_magnifier(Lt.extend(!0,{},P.yith_magnifier_options,l))):(i?n.yith_wcmg_zoom.attr("href",n.yith_wcmg_default_zoom):n.yith_wcmg_zoom.attr("href",n._yith_wcmg_default_zoom),n.element.data("yith_magnifier")&&n.element.yith_magnifier("destroy"),n.element.yith_magnifier(P.yith_magnifier_options));break;case"iosslider":setTimeout(function(t){t.element.iosSlider("update")}.bind(null,n),150);break;case"flexslider":Qt.trigger("resize");break;case"elevatezoom":n.element.each(function(t,e){e=e(this).data("elevateZoom");void 0!==e&&e.swaptheimage(t,t)}.bind(null,a,Lt));break;case"easyzoom":n.element.swap(null,a);break;case"easyzoom-flatsome":n.element.swap(a,a);break;case"woocommerce":e&&(n.element.flexslider(0),n.element.trigger("woocommerce_gallery_reset_slide_position"),l=n.element,P.setTimeout(function(t,e){t.trigger("woocommerce_gallery_init_zoom"),e.trigger("resize")}.bind(null,l,Qt),10));break;case"zoom":c&&(s=c.find(".woocommerce-product-gallery--with-images").width(),d=!1,(d=n.element.find("img.wp-post-image").attr("data-large_image_width")>s?!0:d)?(s={touch:!1},"ontouchstart"in P&&(s.on="click"),n.element.trigger("zoom.destroy"),n.element.zoom(s)):n.element.trigger("zoom.destroy"))}Qt.trigger("tm_gallery_compatibility_actions",{event_data:o,product_element:c,form:r})}function It(t,e,a){var i,o,r,c,n,l,d,s,p,m,_,f,u,g,h,v,y,b,w;return t.is_associated?{}:(t=!1,i=Lt(".images"),o=Lt(".yith_magnifier_zoom"),r=i.find(".yith_magnifier_zoom").first().attr("href"),c=i.find(".yith_magnifier_zoom img").first().attr("src"),n=!1,l=Lt(".iosSlider.product-gallery-slider,.iosSlider.product-slider"),d=!1,s=a.find(".images .fusion-flexslider"),p=e.data("elevateZoom")||!1,m=a.find("div.product-images .woocommerce-main-image"),_=!1,f=a.find(".images .easyzoom"),u=!1,g=a.find(".images .easyzoom"),h=!1,v=a.find(".woocommerce-product-gallery"),y=P.wc_single_product_params,b="function"==typeof Lt.fn.zoom&&y&&y.zoom_enabled,w=!1,P.yith_magnifier_options&&i.data("yith_magnifier")&&(t=!0),l.length&&l.iosSlider&&(n=!0),s.length&&s.flexslider&&(d=!0),f.length&&f.filter(".images .easyzoom.first").data("easyZoom")&&(f=f.filter(".images .easyzoom.first").data("easyZoom"),_=!0),_||(g=a.find(".images .has-image-zoom .slide")).length&&g.filter(".images .has-image-zoom .slide.first").data("easyZoom")&&(g=g.filter(".images .has-image-zoom .slide.first").data("easyZoom"),u=!0),"complete"===x.readyState?setTimeout(function(){f.length&&f.data("easyZoom")&&(f=f.data("easyZoom"),_=!0),g.length&&g.data("easyZoom")&&(g=g.data("easyZoom"),u=!0)},150):Qt.on("load",function(){setTimeout(function(){f.length&&f.data("easyZoom")&&(f=f.data("easyZoom"),_=!0),g.length&&g.data("easyZoom")&&(g=g.data("easyZoom"),u=!0)},150)}),v.length&&v.data("flexslider")&&(h=!0,"function"==typeof Lt.fn.zoom)&&y&&y.zoom_enabled&&0<(y=e.closest(".woocommerce-product-gallery__image")).length&&(e.data.wc27_zoom_target=y),!h&&b&&(w=a.find(".woocommerce-product-gallery .woocommerce-product-gallery__image")),{is_yith_wcmg:{type:"yith",enabled:t,element:i,yith_wcmg_zoom:o,_yith_wcmg_default_zoom:r,yith_wcmg_default_image:c},is_iosSlider:{type:"iosslider",enabled:n,element:l},is_flexslider:{type:"flexslider",enabled:d,element:s},is_elevateZoom:{type:"elevatezoom",enabled:p,element:m},is_easyzoom:{type:"easyzoom",enabled:_,element:f},is_easyzoom_flatsome:{type:"easyzoom-flatsome",enabled:u,element:g},is_wc27_gallery:{type:"woocommerce",enabled:h,element:v},is_zoom_enabled:{type:"zoom",enabled:!h&&b,element:w}})}function Et(c){var i,o,r,t,n=c.is_associated?c.this_epo_container:c.this_epo_container.not(Mt.epoSelector+" "+Mt.associatedEpoSelector),l=c.variations_form,e=c.main_product,d=c.form,s=Ft(c),p=[],a=c.is_associated?"tc_":"",m=O(c,s),_=It(c,m,s);0<Lt(m).length&&(d.on(a+"reset_image.tcpi",function(){setTimeout(function(){"yes"===Rt.tm_epo_global_image_recalculate&&(m=O(c,s),Lt.tc_product_image_store=t),Lt.tc_product_image=Lt.tc_replace_object_values(Lt.tc_product_image,Lt.tc_product_image_store),p=[],Lt(n.find(".tm-product-image:checked,select.tm-product-image")).add(l.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&p.push(t)}),p.length?p[p.length-1].trigger("tm_trigger_product_image"):Lt.tc_product_image_store=Lt.tc_populate_store(m,s)},P.tc_epo_product_image_change_delay||0)}),d.on(a+"found_variation.tcpi",function(){setTimeout(function(){var t,e,a,i,o,r;"yes"===Rt.tm_epo_global_image_recalculate&&(m=O(c,s)),a=m,t=(i=s).find(".flex-control-nav li:eq(0) img"),r=i.find(".woocommerce-product-gallery__wrapper ").find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),e=(o=a).closest("a"),Lt.isEmptyObject(Lt.tc_product_image)?Lt.tc_product_image_store=Lt.tc_populate_store(a,i):(Lt.tc_product_image_store=Lt.tc_pre_populate_store(),Lt.tc_product_image_store=Lt.tc_maybe_copy_object_values(Lt.tc_product_image_store,Lt.tc_product_image)),o.tc_update_attr("src",0),o.tc_update_attr("srcset",0),o.tc_update_attr("sizes",0),o.tc_update_attr("title",0),o.tc_update_attr("alt",0),o.tc_update_attr("data-src",0),o.tc_update_attr("data-large_image",0),o.tc_update_attr("data-large_image_width",0),o.tc_update_attr("data-large_image_height",0),r.tc_update_attr("data-thumb",1),t.tc_update_attr("src",2),e.tc_update_attr("href",3),e.tc_update_attr("title",3),p=[],Lt(n.find(".tm-product-image:checked,select.tm-product-image")).add(l.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&p.push(t)}),p.length&&(a=m,o=(i=s).find(".flex-control-nav li:eq(0) img"),i=i.find(".woocommerce-product-gallery__wrapper ").find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),a=(r=a).closest("a"),r.attr("data-o_src",Lt.tc_product_image_store[0].src),r.attr("data-o_srcset",Lt.tc_product_image_store[0].srcset),r.attr("data-o_sizes",Lt.tc_product_image_store[0].sizes),r.attr("data-o_title",Lt.tc_product_image_store[0].title),r.attr("data-o_alt",Lt.tc_product_image_store[0].alt),r.attr("data-o_data-src",Lt.tc_product_image_store[0]["data-src"]),r.attr("data-o_data-large_image",Lt.tc_product_image_store[0]["data-large_image"]),r.attr("data-o_data-large_image_width",Lt.tc_product_image_store[0]["data-large_image_width"]),r.attr("data-o_data-large_image_height",Lt.tc_product_image_store[0]["data-large_image_height"]),i.attr("data-o_data-thumb",Lt.tc_product_image_store[1]["data-thumb"]),Lt.tc_product_image_store[2]&&o.attr("data-o_src",Lt.tc_product_image_store[2].src),a.attr("data-o_href",Lt.tc_product_image_store[3].href),a.attr("data-o_title",Lt.tc_product_image_store[3].title),p[p.length-1].trigger("tm_trigger_product_image"))},P.tc_epo_product_image_change_delay||0)}),Lt.tc_product_image_store=Lt.tc_maybe_copy_object_values_from_img(Lt.tc_product_image_store,m,s),t=Lt.epoAPI.util.deepCopyArray(Lt.tc_product_image_store),e.off("tm_change_product_image").on("tm_change_product_image",function(t,e){var a;t.stopImmediatePropagation(),i=e.element,o=e.element_current,i&&o&&(o=i.data("imagep"),(r="")!==o?r="imagep":"images"===i.data("changes-product-image")&&(r="image"),void 0!==(a=(a=e.element_current.data("image-variations"))&&a[r]))&&(p=[],Lt(n.find(".tm-product-image:checked,select.tm-product-image")).add(l.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){""!==(t=(t=Lt(t)).is("option")?t.closest("select"):t).val()&&q(t)&&p.push(t)}),!p.length||p[p.length-1].is(i))&&setTimeout(function(){"yes"===Rt.tm_epo_global_image_recalculate&&(m=O(c,s)),kt(a,m,s),Pt(_,m,a.image_link,!1,e,d,s)},P.tc_epo_product_image_change_delay||0)}),e.off("tm_restore_product_image").on("tm_restore_product_image",function(t,e){t.stopImmediatePropagation(),i=!!e&&e.element,p=[],i&&(Lt(n.find(".tm-product-image:checked,select.tm-product-image")).add(l.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&p.push(t)}),p.length)&&!p[p.length-1].is(i)?p[p.length-1].trigger("tm_trigger_product_image"):setTimeout(function(){kt(!1,m="yes"===Rt.tm_epo_global_image_recalculate?O(c,s):m,s),Pt(_,!1,m.attr("src"),!1,e,d,s)},P.tc_epo_product_image_change_delay||0)}),p=[],Lt(n.find(".tm-product-image:checked,select.tm-product-image")).add(l.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&p.push(t)}),p.length)&&p[p.length-1].trigger("tm_trigger_product_image"),Qt.trigger("tm_product_image_loaded")}function Ct(i){var o;setTimeout(function(){var f,u,g,_,h,t,e,v,y,b,a,w,x;"inline"===Rt.tm_epo_global_product_image_mode?(t=(f=i).is_associated?f.this_epo_container:f.this_epo_container.not(Mt.epoSelector+" "+Mt.associatedEpoSelector),e=f.main_product,v=f.product_id,y=f.form,b=Ft(f),a=[],w=O(f,b),x=It(f,w,b),0<Lt(w).length&&(w.data("tm-current-image",!1),u=w.closest("a"),g=w.attr("src"),_=w.width(),h=w.height(),e.off("tm_change_product_image").on("tm_change_product_image",function(t,m){setTimeout(function(){var t,e,a,i,o,r,c,n,l,d,s,p=[];"yes"===Rt.tm_epo_global_image_recalculate&&(w=O(f,b)),t=(a=m.element.closest(".cpf-section")).is(".tm-epo-variation-section"),c=m.epo_holder,t=(c=t?a:c).find(".tm-product-image:checked,select.tm-product-image"),p=[],e=m.element.attr("id"),a=!0,c=m.main_product,i=c.closest("#product-"+v),o=_,r=h,n=Lt("<div class='blockUI blockOverlay tm-preloader-img'></div>"),0===(c=(i=i.length<=0?c.closest(".post-"+v):i).find("#"+e+"_tmimage")).length&&(c=w),s=function(){n.remove(),y.tc_image_update(!1),w.data("tm-current-image",!1),i.find(".tm-clone-product-image").hide(),w.show()},m.src===c.attr("src")&&c.is(":visible")||(!1===m.src?s():(n.css({width:o,height:r}),t.toArray().forEach(function(t){q(t=Lt(t))&&xt(t)&&Z({element:t.closest(".cpf-element"),rule:{operator:"isnotempty",value:""},type:"element"})&&p.push(t)}),(t=p.length?p[p.length-1]:t).attr("id")!==m.element.attr("id")&&(a=!1),l=w.tcClone(),d=new Image,l.removeAttr("data-o_src").removeAttr("data-o_title").removeAttr("data-o_alt").removeAttr("data-o_srcset").removeAttr("data-o_sizes").removeAttr("srcset").removeAttr("sizes"),a&&w.before(n),x.is_yith_wcmg.yith_wcmg_default_zoom=x.is_yith_wcmg.element.find(".yith_magnifier_zoom").first().attr("href"),x.is_yith_wcmg.yith_wcmg_default_image=x.is_yith_wcmg.element.find(".yith_magnifier_zoom img").first().attr("src"),d.onerror=function(){s()},d.onload=function(){if("naturalHeight"in this){if(this.naturalHeight+this.naturalWidth===0)return void this.onerror()}else if(this.width+this.height===0)return void this.onerror();i.find("#"+e+"_tmimage").remove(),i.find(".tm-clone-product-image").hide(),l.prop("src",d.src).hide(),w.hide().after(l),l.css("opacity",0).show(),Pt(x,l,d.src),n.animate({opacity:0},750,"easeOutExpo",function(){n.remove()}),l.animate({opacity:1},P.tc_epo_image_animation_delay||1500,"easeOutExpo",function(){}),Qt.trigger("tm_change_product_image_loaded",{src:m.src,element:m.element,main_product:m.main_product,epo_holder:m.epo_holder})},l.attr("id",e+"_tmimage").addClass("tm-clone-product-image").hide(),l.attr("src-orig")&&l.attr("src-orig",m.src),a?(d.src=m.src,y.tc_image_update(m.element,l),w.data("tm-current-image",e),Qt.trigger("tm_change_product_image_show",{src:m.src,element:m.element,main_product:m.main_product,epo_holder:m.epo_holder})):(l.prop("src",m.src).hide(),w.after(l)),Qt.trigger("tm_change_product_image_end",{src:m.src,element:m.element,main_product:m.main_product,epo_holder:m.epo_holder})))},P.tc_epo_product_image_change_delay||0)}),e.off("tm_restore_product_image").on("tm_restore_product_image",function(t,m){setTimeout(function(){var t,e,a,i,o,r,c,n,l,d,s,p;if(!m||!m.element)return!1;if("yes"===Rt.tm_epo_global_image_recalculate&&(w=O(f,b)),Qt.trigger("tm_restore_product_image_pre",{element:m.element,main_product:m.main_product,epo_holder:m.epo_holder}),t=m.element.attr("id"),a=(e=m.main_product).closest("#product-"+v),c=(n=m.element.closest(".cpf-section")).is(".tm-epo-variation-section"),r=!1,d=g,s=m.epo_holder,c&&(s=n),c=(a=a.length<=0?e.closest(".post-"+v):a).find("#"+t+"_tmimage").is(":visible"),a.find("#"+t+"_tmimage").remove(),0===a.find(".tm-clone-product-image").length)w.show(),w.data("tm-current-image",!1),y.tc_image_update(!1);else{if(!c)return void Qt.trigger("tm_restore_product_image_loaded_exit",{element:m.element,main_product:m.main_product,epo_holder:m.epo_holder});for(n=a.find(".tm-clone-product-image").length,t=w.data("tm-current-image"),p=n-1;0<=p;--p){if(i=(o=a.find(".tm-clone-product-image").eq(p)).attr("id").replace("_tmimage",""),(l=s.find("[id='"+i+"']")).is(":checked")&&l.closest(".cpf-element").is(":visible")){a.find(".tm-clone-product-image").eq(p).show(),u.attr("href",a.find(".tm-clone-product-image").eq(p).prop("src")),w.data("tm-current-image",i),r=!0;break}a.find(".tm-clone-product-image").eq(p).hide()}r?a.find("#"+t+"_tmimage").remove():(w.show(),w.data("tm-current-image",!1),y.tc_image_update(!1))}r&&(d=o.attr("src")),Pt(x,!1,d,a.find(".tm-clone-product-image").filter(":visible").length),Qt.trigger("tm_restore_product_image_loaded",{element:m.element,main_product:m.main_product,epo_holder:m.epo_holder})},P.tc_epo_product_image_change_delay||0)}),e.off("tm_attempt_product_image").on("tm_attempt_product_image",function(t,_){setTimeout(function(){var t,e,a,i,o,r,c,n,l,d,s,p,m;if("yes"===Rt.tm_epo_global_image_recalculate&&(w=O(f,b)),t=(p=_.main_product).closest("#product-"+v),a=(l=_.element?_.element.closest(".cpf-section"):Lt(p.find(".tm-epo-variation-section").first(),_.epo_holder)).is(".tm-epo-variation-section"),e=_.epo_holder,a=(e=a?l:e).find(".tm-product-image:checked,select.tm-product-image"),l="",c=!(i=[]),n=w.data("tm-current-image"),d=g,t.length<=0&&(t=p.closest(".post-"+v)),(a=(e=p.find(".tm-epo-variation-section").first().add(_.epo_holder)).find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&xt(t)&&Z({element:t.closest(".cpf-element"),rule:{operator:"isnotempty",value:""},type:"element"})&&i.push(t)}),i.length&&(l=(a=i[i.length-1]).attr("id")),!i.length||!a.length||n&&l===n){if(p=e.find("[id='"+n+"']").closest(".cpf-element"),n&&(!1===p.data("isactive")||!1===p.closest(".cpf-section").data("isactive"))){if(t.find("#"+n+"_tmimage").remove(),0===(l=t.find(".tm-clone-product-image").length))w.show(),w.data("tm-current-image",!1),y.tc_image_update(!1);else{for(m=l-1;0<=m;--m){if(r=(o=t.find(".tm-clone-product-image").eq(m)).attr("id").replace("_tmimage",""),(s=e.find("[id='"+r+"']")).is(":checked")&&s.closest(".cpf-element").is(":visible")){t.find(".tm-clone-product-image").eq(m).show(),u.attr("href",t.find(".tm-clone-product-image").eq(m).prop("src")),w.data("tm-current-image",r),c=!0;break}t.find(".tm-clone-product-image").eq(m).hide()}c||(w.show(),w.data("tm-current-image",!1),y.tc_image_update(!1))}c&&(d=o.attr("src")),Pt(x,!1,d,t.find(".tm-clone-product-image").filter(":visible").length)}}else a.last().trigger("tm_trigger_product_image")},P.tc_epo_product_image_change_delay||0)}),Lt(t.find(".tm-product-image:checked,select.tm-product-image")).add(e.find(".tm-epo-variation-section").first().find(".tm-product-image:checked,select.tm-product-image")).toArray().forEach(function(t){q(t=Lt(t))&&""!==t.val()&&a.push(t)}),a.length)&&a[a.length-1].trigger("tm_trigger_product_image"),Qt.trigger("tm_product_image_loaded")):Et(i),Lt.fn.wc_product_gallery&&(o=i.this_epo_container,(o=i.is_associated?i.main_product:o).find(".cpf-type-product-custombundle .tc-associated-product-image").tclightbox())},P.tc_epo_product_image_setup_delay||0)}function qt(m){_&&m.find(".tm-range-picker").toArray().forEach(function(t){var a,t=Lt(t),i=t.attr("data-step").split("."),o=m.find("#"+Lt.epoAPI.dom.id(t.attr("data-field-id"))),e=parseFloat(t.attr("data-min")),r=parseFloat(t.attr("data-max")),c=parseFloat(t.attr("data-start")),n=parseFloat(t.attr("data-step")),l=t.attr("data-show-picker-value"),d=t.closest("li").find(".tm-show-picker-value"),s=parseFloat(t.attr("data-noofpips")),p=null;t.data("tc-picker-init")||(t.data("tc-picker-init",1),i=1===i.length?0:i[1].length,Number.isFinite(e)||(e=0),(r=Number.isFinite(r)?r:0)<=e&&(r=parseFloat(r)+1),c=Lt.epoAPI.math.unformat(c,Mt.localDecimalSeparator),c=Jt(c=Number.isFinite(c)?c:0,{precision:i}),Number.isFinite(n)||(n=0),(s=Number.isFinite(s)?s:10)<2&&(s=2),"yes"===t.attr("data-pips")&&(p={mode:"count",values:s,filter:function(t,e){return t=parseFloat(Lt.epoAPI.math.toFixed(t,i)),n<=0?0:1!==e||Number.isInteger(t)?e:2},format:{from:function(t){return Lt.epoAPI.math.unformat(t,Mt.localInputDecimalSeparator)},to:function(t){return Jt(t,{precision:i})}},density:2}),_.create(t.get(0),{direction:Rt.text_direction,start:c,step:n,connect:"lower",behaviour:"tap",format:{from:function(t){return Lt.epoAPI.math.unformat(t,Mt.localDecimalSeparator)},to:function(t){return Jt(t,{precision:i})}},range:{min:[e],max:[r]},pips:p,tooltips:{from:function(t){return Lt.epoAPI.math.unformat(t,Mt.localInputDecimalSeparator)},to:function(t){return Jt(t,{precision:i})}}}),a=t.find(".noui-handle-lower"),t.get(0).noUiSlider.on("slide",function(){o.trigger("change.cpf")}),t.get(0).noUiSlider.on("update",function(t,e){t[e]=Lt.epoAPI.math.unformat(t[e],Mt.localDecimalSeparator),e=0,"left"!==l&&"right"!==l&&a.attr("title",Jt(t[e],{precision:i})),o.val(t[e]).trigger("change"),""!==l&&d.html(Jt(t[e],{precision:i}))}),""!==l&&d.html(c),"left"!==l&&"right"!==l&&(a.attr("title",c),t.addClass("noui-show-tooltip")))})}function St(){_&&!E.data("setRangePickersEvents")&&(E.on("click",".tm-show-picker-value",function(){var t,e=Lt(this),a=e.closest(".tmcp-field-wrap"),i=a.find(".tmcp-range").val(),o=e.closest(".tmcp-field-wrap").find(".tm-range-picker");e.addClass("tc-hidden").after(Lt('<input type="number" class="tm-show-picker-value-edit">')),(t=a.find(".tm-show-picker-value-edit")).focus().val(i).wrap('<div class="tm-show-picker-value-edit-wrap"></div>'),t.attr("step",o.attr("data-step")),t.attr("min",o.attr("data-min")),t.attr("max",o.attr("data-max")),Lt(".tm-show-picker-value-edit").focus().on("focusout",function(){(e=a.find(".tm-show-picker-value-edit")).closest(".tmcp-field-wrap").find(".tm-show-picker-value").removeClass("tc-hidden"),e.closest(".tm-show-picker-value-edit-wrap").remove()})}),E.on("change input",".tm-show-picker-value-edit",function(){var t=Lt(this),e=t.closest(".tmcp-field-wrap").find(".tm-range-picker"),a=e.attr("data-step").split("."),t=t.val(),a=1===a.length?0:a[1].length;e.get(0).noUiSlider.set([Jt(t,{precision:a}),null])}),E.on("keydown",".tm-show-picker-value-edit",function(t){13===t.which&&t.preventDefault()}),E.data("setRangePickersEvents",1))}function Tt(t){var e,a,i,o,r;if(t.toString().isNumeric()&&0!==(e=0===t?t:0<t?1:-1)){for(a=new Date,o=!(i=1),r=Math.abs(t);i<=r;)!1===o&&(o=0),a.setDate(a.getDate()+ +e),o++,0!==a.getDay()&&6!==a.getDay()&&i++;!1!==o&&(t=o*e)}return t}function L(y){var h,t,e=".tm-epo-timepicker";Lt.tm_datepicker&&(h=Lt("input").map(function(){return this.id}).get().join(" "),(t=x.createElement("input")).setAttribute("type","date"),"text"===t.type&&(e=".tm-epo-system-timepicker"),y.find(e).toArray().forEach(function(t){var a=Lt(t),t=null,e=null,i=a.attr("data-time-format").trim(),o=a.attr("data-time-theme").trim(),r=a.attr("data-time-theme-size").trim(),c=a.attr("data-time-theme-position").trim(),n=a.attr("data-tranlation-hour").trim(),l=a.attr("data-tranlation-minute").trim(),d=a.attr("data-tranlation-second").trim();a.attr("type","text"),""!==a.attr("data-min-time").trim()&&(t=a.attr("data-min-time").trim()),""!==a.attr("data-max-time").trim()&&(e=a.attr("data-max-time").trim()),""!==a.attr("data-custom-time-format").trim()&&(i=a.attr("data-custom-time-format").trim()),n=n||Rt.hourText,l=l||Rt.minuteText,d=d||Rt.secondText,a.tm_timepicker(Object.assign({isRTL:Rt.isRTL,hourText:n,minuteText:l,secondText:d,timeFormat:i,minTime:t,maxTime:e,closeText:Rt.closeText,showOn:"both",buttonText:"",beforeShow:function(t,e){Lt(e.dpDiv).removeClass(h).removeClass("tm-ui-skin-epo tm-ui-skin-epo-black tm-datepicker-medium tm-datepicker-small tm-datepicker-large tm-datepicker-normal tm-datepicker-top tm-datepicker-bottom").addClass(this.id+" tm-bsbb-all tm-ui-skin-"+o+" tm-timepicker tm-datepicker tm-datepicker-"+c+" tm-datepicker-"+r).appendTo("body"),E.off("click",".tm-ui-dp-overlay").on("click",".tm-ui-dp-overlay",function(){a.tm_timepicker("hide")}),I.addClass("tm-static"),a.prop("readonly",!0),Qt.trigger({type:"tm-timepicker-beforeShow",input:t,inst:e})},onClose:function(){I.removeClass("tm-static"),a.prop("readonly",!1),a.trigger("change")}},P.tmTimepickerSettings||P.timepicker_settings||{})),Lt("#ui-tm-datepicker-div").hide()}),y.find(".tm-epo-datepicker").toArray().forEach(function(t){var e,l=Lt(t),t=parseInt(l.attr("data-start-year").trim(),10),a=parseInt(l.attr("data-end-year").trim(),10),i=l.attr("data-min-date").trim(),o=l.attr("data-max-date").trim(),d=l.attr("data-disabled-dates").trim(),s=l.attr("data-enabled-only-dates").trim(),r=l.attr("data-exlude-disabled").trim(),p=l.attr("data-disabled-weekdays").trim().split(","),m=l.attr("data-disabled-months").trim().split(","),_=l.attr("data-date-format").trim(),c=l.attr("data-date-showon").trim(),n=l.attr("data-date-defaultdate").trim(),f=l.attr("data-date-theme").trim(),u=l.attr("data-date-theme-size").trim(),g=l.attr("data-date-theme-position").trim();""!==d&&(e=d.split(","),-1!==d.indexOf(","))&&0<e.length&&(d=e),""!==s&&(e=s.split(","),-1!==s.indexOf(","))&&0<e.length&&(s=e),""===i?i=""===t?null:new Date(t,0,1):r&&(i=Tt(i)),""===o?o=""===a?null:new Date(a,11,31):r&&(o=Tt(o)),l.data("tc-enabled_only_dates",s),l.data("tc-disabled_weekdays",p),l.data("tc-disabled_months",m),l.data("tc-disabled_dates",d),l.data("tc-format",_),l.tm_datepicker(Object.assign({monthNames:Rt.monthNames,monthNamesShort:Rt.monthNamesShort,dayNames:Rt.dayNames,dayNamesShort:Rt.dayNamesShort,dayNamesMin:Rt.dayNamesMin,isRTL:Rt.isRTL,showOtherMonths:!0,selectOtherMonths:!0,showOn:c,defaultDate:n,buttonText:"",showButtonPanel:!0,firstDay:Rt.first_day,closeText:Rt.closeText,currentText:Rt.currentText,dateFormat:_,minDate:i,maxDate:o,onSelect:function(){var t,e=Lt(this),a="#"+Lt.epoAPI.dom.id(e.attr("id")),i=e.tm_datepicker("getDate"),o="",r="",c="",n=y.find(a+"_day"),l=y.find(a+"_month"),a=y.find(a+"_year");i&&(o=i.getDate(),r=i.getMonth()+1,c=i.getFullYear(),t=Lt.tm_datepicker.formatDate(_,i),-1!==m.indexOf(r.toString())||-1!==p.indexOf(i.getDay().toString())||-1!==d.indexOf(t)||""!==s&&-1===s.indexOf(t))&&(t=e.data("tm-last-date"),t=e.data("tm-last-date")?e.data("tm-last-date"):"",e.val(t),e.tm_datepicker("setDate",t),c=t?(o=(i=e.tm_datepicker("getDate")).getDate(),r=i.getMonth()+1,i.getFullYear()):r=o=""),n.val(o),l.val(r),a.val(c),e.data("tm-last-date",e.val()),e.tm_datepicker("hide")},beforeShow:function(t,n){Lt(n.dpDiv).removeClass(h).removeClass("tm-datepicker-normal tm-datepicker-top tm-datepicker-bottom").addClass(this.id+" tm-bsbb-all tm-ui-skin-"+f+" tm-datepicker tm-datepicker-"+g+" tm-datepicker-"+u).appendTo("body"),E.off("click",".tm-ui-dp-overlay").on("click",".tm-ui-dp-overlay",function(){l.tm_datepicker("hide")}),E.off("click",".ui-tm-datepicker-current").on("click",".ui-tm-datepicker-current",function(){var t,e=new Date,e=Lt.tm_datepicker._daylightSavingAdjust(new Date(e.getFullYear(),e.getMonth(),e.getDate())),a=e.getDay(),i=e.getMonth()+1,o="#"+n.id.replace(/\\\\/g,"\\"),r=!1,c=l.tm_datepicker("getDate");if(""!==s)t=Lt.tm_datepicker.formatDate(_,c),r=-1!==s.indexOf(t);else if(-1!==m.indexOf(i.toString())||-1!==p.indexOf(a.toString()))r=!1;else{if(""!==d)return t=Lt.tm_datepicker.formatDate(_,c),[-1===d.indexOf(t),""];r=!0}r&&(Lt.tm_datepicker._setDate(n,e),Lt.tm_datepicker._gotoToday(o))}),I.addClass("tm-static"),Qt.trigger({type:"tm-datepicker-beforeShow",input:t,inst:n})},onClose:function(){I.removeClass("tm-static"),l.trigger("change")},beforeShowDay:function(t){var e,a=t.getDay(),i=t.getMonth()+1;return""!==s?(e=Lt.tm_datepicker.formatDate(_,t),[-1!==s.indexOf(e),""]):-1!==m.indexOf(i.toString())||-1!==p.indexOf(a.toString())?[!1,""]:""!==d?(e=Lt.tm_datepicker.formatDate(_,t),[-1===d.indexOf(e),""]):[!0,""]}},P.tmDatepickerSettings||{})),Lt("#ui-tm-datepicker-div").hide()}),y.find(".tmcp-date-select").on("change.cpf",function(){var t="#"+Lt.epoAPI.dom.id(Lt(this).attr("data-tm-date")),e=y.find(t),a=e.attr("data-date-format"),i=y.find(t+"_day").val(),o=y.find(t+"_month").val(),t=y.find(t+"_year").val(),a=Lt.tm_datepicker.formatDate(a,new Date(t,parseInt(o,10)-1,i));0<i&&0<o&&0<t?(e.tm_datepicker("setDate",a),e.trigger("change")):(e.val(""),e.trigger("change.cpf"))}).on("focus.cpf",function(){var t="#"+Lt.epoAPI.dom.id(Lt(this).attr("data-tm-date")),f=y.find(t),e=y.find(t+"_day"),a=y.find(t+"_month"),t=y.find(t+"_year"),u=e.val(),g=a.val(),h=t.val(),v=Lt(this);""!==h&&""!==g&&""!==u||""!==h&&""!==g&&""===u||""!==u&&""!==h&&""===g||""!==u&&""!==g&&""===h?v.find("option").toArray().forEach(function(e){var t,a,i,o,r,c,n,l,d,s,p,e=Lt(e),m=e.val(),_=h+"-"+g+"-"+u;if(v.is(".tmcp-date-day")){if(""===h||""===g)return;_=h+"-"+g+"-"+m}else if(v.is(".tmcp-date-month")){if(""===h||""===u)return;_=h+"-"+m+"-"+u}else if(v.is(".tmcp-date-year")){if(""===u||""===g)return;_=m+"-"+g+"-"+u}if(""!==m)try{(t=Lt.tm_datepicker.parseDate("yy-mm-dd",_))&&(a=t,i=Lt(i=f),r=Lt.tm_datepicker._getInst(i[0]),c=i.data("tc-enabled_only_dates"),n=i.data("tc-disabled_weekdays"),l=i.data("tc-disabled_months"),d=i.data("tc-disabled_dates"),i=i.data("tc-format"),s=a.getDay(),p=a.getDay()+1,!Lt.tm_datepicker._isInRange(r,a)||(""!==c?(o=Lt.tm_datepicker.formatDate(i,a),-1===c.indexOf(o)):-1!==n.indexOf(s.toString())||-1!==l.indexOf(p.toString())||""!==d&&(o=Lt.tm_datepicker.formatDate(i,a),-1!==d.indexOf(o)))?e.prop("disabled",!0):e.prop("disabled",!1))}catch(t){P.console.log(t),e.prop("disabled",!0),b=t}}):(e.find("option").prop("disabled",!1),a.find("option").prop("disabled",!1),t.find("option").prop("disabled",!1))}),Qt.on("resizestart",function(){var t=Lt(x.activeElement);t.is(".hasDatepicker")&&(t.data("resizestarted",!0),Lt(P).width()<768?t.data("resizewidth",!0):t.tm_datepicker("hide"))}),Qt.on("resizestop",function(){var t=Lt(x.activeElement);t.is(".hasDatepicker")&&t.data("resizestarted")&&(t.data("resizewidth")&&t.tm_datepicker("hide"),t.tm_datepicker("show")),t.data("resizestarted",!1),t.data("resizewidth",!1)}))}function jt(t){var e=t.epoEventId,a=t.main_product,i=!Lt.tcepo.formSubmitEvents[e].some(function(t){return typeof t&&"function"==typeof t.trigger&&!t.trigger()});return Lt.tcepo.formSubmitEvents[e].forEach(function(t){"object"==typeof t&&(i?t.on_true():t.on_false())}),i||setTimeout(function(){a.find(Mt.addToCartButtonSelector).first().removeClass("disabled").removeClass("loading").prop("disabled",!1).removeClass("fpd-disabled")},100),Qt.trigger("tm-apply-submit-events",{epo:{form_is_submit:i}}),i}function Ot(e){var c,n,a=e.form,t=e.this_epo_container,i=e.main_product,o=e.epoEventId;return"yes"===Rt.tm_epo_global_enable_validation&&(c={},t.find(".tmcp-ul-wrap").toArray().forEach(function(i){var o,t,e,a,r;i=Lt(i),(n=i.data("tm-validation"))&&"object"===Lt.tmType(n)&&(t=(o=i.find(".tm-epo-field")).first().attr("name"),i.is(".tm-extra-product-options-radio.tm-element-ul-radio")?(t=o.last().attr("name"),c[t]=n):i.is(".tm-extra-product-options-checkbox.tm-element-ul-checkbox")?o.toArray().forEach(function(t){"required"in n&&(n.required=function(t){var e=i.find("input.tm-epo-field.tmcp-checkbox:checked").length;return 0===e?o.last().attr("name")===Lt(t).attr("name"):e<=0}),c[Lt(t).attr("name")]=n}):i.is(".tm-extra-product-options-product.tm-element-ul-product")?(o=o.filter(".tc-epo-field-product")).is(":checkbox")?o.toArray().forEach(function(t){"required"in n&&(r=Lt(t)).is(":checkbox")&&(n.required=function(t){var e=i.find("input.tm-epo-field.tmcp-checkbox:checked"),a=e.length;return 0===a?o.last().attr("name")===Lt(t).attr("name"):(t=e.map(function(){return Lt(this)}).get().some(function(t){return t.closest(".tc-epo-element-product-holder").find(".tm-qty").first().val()<=0}),0<a?t:a<=0)},"variable"===r.attr("data-type"))&&(e=r.closest(".tc-epo-element-product-holder").find(".product-variation-id").first().attr("name"),a={required:function(t){t=Lt(t).closest(".tc-epo-element-product-holder").find(".tc-epo-field-product");return!(!q(t,!0)||!t.is(":checked"))}},c[e]=a),c[r.attr("name")]=n}):o.is(":radio")?(n.product_element_radio_qty=!0,c[o.attr("name")]=n,e=o.closest(".tc-element-container").find(".product-variation-id").first().attr("name"),a={required:function(t){t=Lt(t).closest(".tc-element-container").find(".tc-epo-field-product:checked");return!!(t.length&&"variable"===t.attr("data-type")&&q(t,!0)&&t.is(":checked"))}},c[e]=a):o.is("select")&&(n.product_element_select_qty=!0,c[o.attr("name")]=n,e=o.closest(".tc-element-container").find(".product-variation-id").first().attr("name"),a={required:function(t){t=Lt(t).closest(".tc-element-container").find(".tc-epo-field-product");return!(!t.length||"variable"!==t.children(":selected").attr("data-type")||!q(t,!0))}},c[e]=a):c[t]=n)}),a.removeData("tc_validator"),a.tc_validate({focusInvalid:!1,ignore:Mt.qtySelector+',.tcdisabled,.tmcp-upload-hidden,#wc_bookings_field_duration,input.tm-qty:hidden[type="number"],input.input-text.qty,.ignore,.variations select,.tc-epo-variable-product-selector,.tm-extra-product-options-variations input,.tm-extra-product-options-variations select,input:not('+Mt.epoSelector+" input),select:not("+Mt.epoSelector+" select)",rules:c,errorClass:"tm-error",validClass:"tm-valid",errorElement:"label",errorPlacement:function(t,e){return t.addClass("tc-cell tcwidth tcwidth-100"),"before"===Rt.tm_epo_global_error_label_placement?e.closest(".tc-element-container").before(t):e.closest(".tc-element-container").after(t),!1},invalidHandler:function(t,e){Qt.trigger("tm-invalidHandler",{epo:{validator:e}}),setTimeout(function(){i.find(Mt.addToCartButtonSelector).first().is(".disabled")||(i.find(Mt.addToCartButtonSelector).first().removeClass("loading").prop("disabled",!1).removeClass("fpd-disabled"),i.find(Mt.addToCartButtonSelector).first().removeClass("disabled").removeClass("loading").prop("disabled",!1).removeClass("fpd-disabled"))},100),e.errorList&&e.errorList[0]&&e.errorList[0].element&&m(Lt(e.errorList[0].element),o)},submitHandler:function(){var t;return e.is_quickview||(i.find(Mt.addToCartButtonSelector).first().addClass("disabled"),t=function(){i.find(Mt.addToCartButtonSelector).first().removeClass("disabled"),E.off("ajaxSuccess",t)},E.on("ajaxSuccess",t)),jt(e)}}),a.find(Mt.addToCartButtonSelector).on("click",function(t){a.tc_validate().form()||(t.preventDefault(),t.stopImmediatePropagation())}),!0)}function Yt(g,t,h,v,y,b,w,x,A,e,k,F,a,P){var I,E,C,q,S,T,j,i="none",O=0;return"none"!==(i=a?i:t.attr("class")+t.attr("data-uniqid")+h+g.is_associated+A+x+A+e||"none")&&!0!==z&&!1!==z&&void 0!==z[i]?z[i]:(I=e?"undiscounted_":"",a=t.find(h),!1===g.is_associated&&(a=a.not(Mt.associatedEpoSelector+" "+h+",.cpf-type-variations "+h)),x||(a=a.filter(".tcenabled")),E=j=T=v=v||0,C=y=y||0,b=b||[],q=g.this_epo_totals_container,a.length&&a.toArray().forEach(function(t){var e,a,i,o,r,c,n,l=Lt(t),d="",t=l.closest(".cpf-element"),s=l.closest(".tmcp-field-wrap"),p=t.attr("data-fblabelshow"),m=t.attr("data-fbvalueshow"),_="",s=s.find(".tm-qty").val(),f="",u=!1;".tc-epo-field-product"===h&&(t.is(".cpf-type-product-thumbnailmultiple")||t.is(".cpf-type-product-checkbox")||t.is(".cpf-type-product-custombundle")?S=l.closest(".tc-epo-element-product-holder").find(Mt.associatedEpoSelector):t.is(".cpf-type-product-thumbnail")||t.is(".cpf-type-product-radio")||t.is(".cpf-type-product-dropdown")?S=t.find('.tc-epo-element-product-container[data-product_id="'+l.val()+'"]').find(Mt.associatedEpoSelector):t.is(".cpf-type-product-single")&&(S=t.find(Mt.associatedEpoSelector)),q=Lt(".tc-epo-totals.tm-product-id-"+S.attr("data-product-id")+'[data-epo-id="'+S.attr("data-epo-id")+'"]')),q.length&&(""===p&&(_=t.find(".tc-epo-element-label-text").html()),void 0===s&&(s=""),k&&Gt(g,l,void 0,void 0,void 0,void 0,T,j),l.is(":checkbox, :radio, :input"))&&(o=i=a=e=0,l.is(".tmcp-checkbox, .tmcp-radio")?x||l.is(":checked")?(e=l.data(I+"raw_price"),a=l.data(I+"price"),i=l.data(I+"raw_original_price"),o=l.data(I+"original_price"),w=!0,l.data("isset",1),t=l.closest("li.tmcp-field-wrap").find(".tc-image"),f=d="",(r=l.closest("li.tmcp-field-wrap").find(".tc-label-text")).length&&(d=r.html(),f=d),t.length&&((t=t.closest(".tc-label-wrap").clone().addClass("tc-img-floating")).find(".tc-label, .tc-epo-style-wrapper, .tc-input-wrap").remove(),d=t[0].outerHTML+'<span class="tc-label-text">'+d+"</span>"),u=!0):l.data("isset",0):l.is(".tmcp-select")?(n=l.find("option:selected"),e=n.data(I+"raw_price"),a=n.data(I+"price"),i=n.data(I+"raw_original_price"),o=n.data(I+"original_price"),""===(c=l.children("option:selected")).val()&&""===c.attr("data-rulestype")||(w=!0),l.find("option").data("isset",0),n.data("isset",1),""===n.val()&&""===n.attr("data-rulestype")||(d=n.attr("data-text"),u=!0,f=d)):l.is(".tmcp-selectmultiple")?(n=l.find("option:selected")).toArray().forEach(function(t){t=Lt(t),e+=Lt.epoAPI.math.toFloat(t.data(I+"raw_price")),a+=Lt.epoAPI.math.toFloat(t.data(I+"price")),i+=Lt.epoAPI.math.toFloat(t.data(I+"raw_original_price")),o+=Lt.epoAPI.math.toFloat(t.data(I+"original_price")),""===(c=l.children("option:selected")).val()&&""===c.attr("data-rulestype")||(w=!0),l.find("option").data("isset",0),t.data("isset",1),""===t.val()&&""===t.attr("data-rulestype")||(d=t.attr("data-text"),u=!0,f=d)}):(r=l.val(),!(r=l.is("[type='file']")?r.replace("C:\\fakepath\\",""):r)||l.is(".tmcp-range")&&"0"===r?l.data("isset",0):(e=l.data(I+"raw_price"),a=l.data(I+"price"),i=l.data(I+"raw_original_price"),o=l.data(I+"original_price"),w=!0,l.data("isset",1),d=r,l.is(".tmcp-range")&&(t=1===(t=l.closest(".tmcp-field-wrap").find(".tm-range-picker").attr("data-step").split(".")).length?0:t[1].length,d=Jt(d,{precision:t})),u=!0,l.is(".tmcp-dynamic")&&(m=p="hidden"),f=r)),e=e||0,i=i||0,a=a||0,o=o||0,u&&b.push({title:_,value:d,valueText:f,price:a,original_price:o,quantity:s,label_show:p,value_show:m,input_type:l.attr("type")}),void 0!==P&&0<P&&l.is(".tc-is-dnmpbq")&&(e/=P),a=$t(e,q,l,0,void 0,void 0,!0),o=$t(i,q,l,0,void 0,void 0,!0),A&&(e=a,i=o),v=Lt.epoAPI.math.toFloat(v)+Lt.epoAPI.math.toFloat(e),v=Lt.epoAPI.math.toFloat(Lt.epoAPI.math.round(v,10)),y=Lt.epoAPI.math.toFloat(y)+Lt.epoAPI.math.toFloat(i),y=Lt.epoAPI.math.toFloat(Lt.epoAPI.math.round(y,10)),E=Lt.epoAPI.math.toFloat(E)+Lt.epoAPI.math.toFloat(a),E=Lt.epoAPI.math.toFloat(Lt.epoAPI.math.round(E,10)),O+=Lt.epoAPI.math.toFloat(Ut(a,q)),C=Lt.epoAPI.math.toFloat(C)+Lt.epoAPI.math.toFloat(o),C=Lt.epoAPI.math.toFloat(Lt.epoAPI.math.round(C,10)),F)&&(j=v)}),e={total:v,original_total:y,total_taxed:E,original_total_taxed:C,vat_total:O,floatingBoxData:b,showTotal:w,elementsLength:a.length},!0===z?(z={})[i]=e:!0!==z&&!1!==z&&(z[i]=e),e)}function se(t,e,a,i,o,r,c,n,l){var d,s=Lt.extend(!0,{},t),p=a.find(Mt.associatedEpoSelector),m=a,_=!0;o.removeData("triggeredforced"),m.closest(".cpf-element").is(".tc-hidden")||(c.addClass("tm-hidden"),c.length&&w(c,!0),"variable"===i?a.is(".tc-init-variations")?a.trigger("refresh.tc-variation-form"):(a.addClass("variations_form"),setTimeout(function(){d=h(m,!1,p.attr("data-product-id"),p.attr("data-epo-id"),o,s),a.addClass("tc-init-variations"),a.tc_product_variation_form(o,r,c,d)},40),_=!1):a.is(".tc-init-product")||(a.addClass("tc-init-product"),c.find(".tc-epo-element-variable-product").removeClass("variations_form"),c.find(".tc-epo-element-variations").removeClass("variations"),setTimeout(function(){h(m,!1,p.attr("data-product-id"),p.attr("data-epo-id"),o,s)},20),_=!1),setTimeout(function(){c.length&&w(a,!1),a.find(":checkbox:checked, :radio:checked").toArray().forEach(function(t){Lt(t).closest(".tmcp-field-wrap").addClass("tc-active")})},10),setTimeout(function(){l.length&&l.trigger("change"),0===a.find(Mt.epoSelector).length&&a.addClass("no-epo"),a.removeClass("tm-hidden"),_&&(Qt.trigger("cpflogicdone"),a.find(".tm-quantity").trigger("showhide.cpfcustom")),void 0===n&&"yes"===Rt.tm_epo_global_product_element_scroll&&Qt.tcScrollTo(a,200,Lt.epoAPI.math.toFloat(Rt.tm_epo_global_product_element_scroll_offset)),Qt.trigger("show_product_html",{thisEpoObject:t,thisMainProduct:e,thisVariableProductContainer:a,type:i,this:o,currentCart:r,variableProductContainers:c,isTrigger:n,qtyalt:l})},210))}function pe(e,a){var t=e.data();void 0===a&&(a=e.val()),t&&Object.keys(t).filter(function(t){return 0===t.indexOf("epopreviousvalue")}).forEach(function(t){e.data(t,a)})}function zt(kt,Ft,Pt){var It,Et,Ct,qt,t,St,y,Tt,jt,Ot,e,a,i,o,r,c,n,l,d,s,p=kt.product_id,zt=kt.main_product,Dt=kt.main_cart,m=kt.this_epo_container,_=kt.this_totals_container,Ht=kt.this_epo_totals_container,Bt=kt.epoEventId,Nt=kt.main_epo_inside_form,f=kt.epo_id_selector,b=kt.epo_id,w=kt.product_id_selector,u="main",g=kt.is_associated?"tc-variation-form":"wc-variation-form",h=kt.is_associated?"tc_":"",v=Pt&&Ft?(u=Lt.epoAPI.applyFilter("tc_get_item_id",Ft.attr("data-item_id"),Ft),It=zt.find(".tm-extra-product-options.tm-cart-"+u),Et=zt.find(".tm-totals-form-"+u),Ct=zt.find(".tm-epo-totals.tm-cart-"+u),Ft.find(".variations_form").first()):(Dt&&0!==Dt.length||(Dt=m.is(".tc-shortcode")?zt:ot(zt,zt,"form",p)),Ft=Dt.parent(),It=m,Et=_,Ct=Ht,kt.variations_form);kt.is_associated&&(u=It.attr("data-cart-id")),qt=Pt||Dt,Ct.data("tm_for_cart",qt),t=Kt(qt),y=te(qt),Ct.data("variationIdElement",(l=".wceb_picker_wrap "+t,d=Kt(n=qt),s=n.find(d),s=n.is(".tc-epo-element-product-container-cart")?n.closest(".tc-epo-element-product-li-container").find(d):n.find(d).not(".tc-epo-element-product-container-variation-id "+d),s=l?s.not(l):s)),Ct.data("qty_element",y),St=Ct.data("type"),v.data("tc_product_id",p),Tt=Ct.attr("data-tm-epo-final-total-box"),jt=Ct.attr("data-tm-epo-show-final-total"),Ot=Ct.attr("data-tm-epo-show-options-total"),Qt.trigger("epoEventHandlersStart",{epo:kt,cart:qt,alternativeCart:Pt,cartContainer:Ft,totalsHolderContainer:Et,totalsHolder:Ct,epoHolder:It}),Qt.on("epoCalculateRules",function(t,e){t&&e&&e.currentCart&&le(kt,e.currentCart)}),qt.is("form")&&qt.on("reset",function(){var t=Lt(this);setTimeout(function(){Lt(t.data("epo_id_selector")).find(".tm-epo-field").trigger("change")},1)}),le(kt,qt),n=It.find(".tm-epo-field"),kt.is_associated||(n=n.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field")),d=It.find(".tm-epo-field.tmcp-textarea,.tm-epo-field.tmcp-textfield"),kt.is_associated||(d=d.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field")),l=It.find(".tm-epo-reset-radio"),kt.is_associated||(l=l.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-reset-radio")),s=It.find(".tm-epo-field.tmcp-upload"),kt.is_associated||(s=s.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field.tmcp-upload")),o=It.find(".tm-has-clearbutton .tm-epo-field"),kt.is_associated||(o=o.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-has-clearbutton .tm-epo-field")),r=It.find(".tm-quantity .tm-qty"),kt.is_associated||(r=r.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-quantity .tm-qty")),c=It.find(".tm-quantity"),kt.is_associated||(c=c.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-quantity")),i=It.find("select.tm-epo-field"),(i=kt.is_associated?i:i.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" select.tm-epo-field")).off("tm-select-change-html").on("tm-select-change-html",function(){var t,e,a,i=Lt(this);i.is(".tc-epo-field-product")||i.is(".tmcp-selectmultiple")||Dt&&void 0!==Dt.data("per_product_pricing")&&!Dt.data("per_product_pricing")||(a=Zt(i.find("option:selected").data("price"),Ct,!0,i),t=i.closest(".tmcp-field-wrap").find(".tc-tooltip"),e=i.closest(".tmcp-field-wrap").find(".tc-inline-description"),H({epoObject:kt,obj:i.closest(".tmcp-field-wrap").find(".tc-price"),price:i.find("option:selected").data("price"),original_price:i.find("option:selected").data("original_price"),force:!1,useFormattedPrice:!1}),0<t.length&&t.attr("data-tm-tooltip-html",i.find("option:selected").attr("data-tm-tooltip-html")).trigger("tc-tooltip-html-changed"),0<e.length&&(i.find("option:selected").attr("data-tm-tooltip-html")?e.html(i.find("option:selected").attr("data-tm-tooltip-html")):e.html("")),("0"===i.find("option:selected").attr("data-hide-amount")||"yes"===Rt.tm_epo_show_price_inside_option_hidden_even)&&"yes"===Rt.tm_epo_show_price_inside_option&&i.find("option:selected").attr("data-text")&&(i.find("option:selected").data("price")||"yes"===Rt.tm_epo_no_hide_price_if_original_not_zero&&i.find("option:selected").data("original_price"))&&("yes"===Rt.tm_epo_auto_hide_price_if_zero&&!1===Lt.epoAPI.util.isEmpty(i.find("option:selected").data("price"))||"yes"!==Rt.tm_epo_auto_hide_price_if_zero&&""!==i.find("option:selected").attr("data-price")?i.find("option:selected").html(i.find("option:selected").attr("data-text")+" ("+a+")"):i.find("option:selected").html(i.find("option:selected").attr("data-text"))),""!==i.val()&&i.find("option:selected").attr("data-tm-tooltip-html")?t.removeClass("tm-hidden"):t.addClass("tm-hidden"))}).off("tm-math-select-change-html-all tm-select-change-html-all tm-select-change-html-all-math").on("tm-math-select-change-html-all tm-select-change-html-all tm-select-change-html-all-math",function(e){var t,a,i,o=Lt(this);o.is(".tc-epo-field-product")||(t=o.closest(".tmcp-field-wrap").find(".tc-tooltip"),a=o.closest(".tmcp-field-wrap").find(".tc-inline-description"),0<t.length&&t.attr("data-tm-tooltip-html",o.find("option:selected").attr("data-tm-tooltip-html")).trigger("tc-tooltip-html-changed"),""!==o.val()&&o.find("option:selected").attr("data-tm-tooltip-html")?t.removeClass("tm-hidden"):t.addClass("tm-hidden"),0<a.length&&(o.find("option:selected").attr("data-tm-tooltip-html")?a.html(o.find("option:selected").attr("data-tm-tooltip-html")):a.html("")),Dt&&void 0!==Dt.data("per_product_pricing")&&!Dt.data("per_product_pricing"))||"yes"===Rt.tm_epo_show_price_inside_option&&o.find("option").toArray().forEach(function(t){if(!(t=Lt(t)).val())return!0;"tm-select-change-html-all"===e.type?(t.removeClass("tm-epo-late-field").removeData("tm-price-for-late islate"),Gt(kt,o,void 0,t,1)):"tm-math-select-change-html-all"===e.type?Gt(kt,o,void 0,t,1,!0):"tm-select-change-html-all-math"===e.type&&(t.removeClass("tm-epo-late-field").removeData("tm-price-for-late islate"),Gt(kt,o,void 0,t,1,!0)),i=1,i=(i="yes"!==Rt.tm_epo_multiply_price_inside_option?o.data("tm-quantity"):i)||1,"yes"===Rt.tm_epo_auto_hide_price_if_zero&&!1===Lt.epoAPI.util.isEmpty(t.data("price"))||"yes"!==Rt.tm_epo_auto_hide_price_if_zero&&""!==t.attr("data-price")?(i=Zt(t.data("price")/i,Ct,!0,o),"0"!==t.attr("data-hide-amount")&&"yes"!==Rt.tm_epo_show_price_inside_option_hidden_even||!t.attr("data-text")||t.html(t.attr("data-text")+" ("+i+")")):t.html(t.attr("data-text"))})}).off("tm-select-price-update-html-all").on("tm-select-price-update-html-all",function(){var e,a=Lt(this);a.is(".tc-epo-field-product")||Dt&&void 0!==Dt.data("per_product_pricing")&&!Dt.data("per_product_pricing")||"yes"===Rt.tm_epo_show_price_inside_option&&a.find("option").toArray().forEach(function(t){if(!(t=Lt(t)).val())return!0;e=1,e=(e="yes"!==Rt.tm_epo_multiply_price_inside_option?a.data("tm-quantity"):e)||1,"yes"===Rt.tm_epo_auto_hide_price_if_zero&&!1===Lt.epoAPI.util.isEmpty(t.data("price"))||"yes"!==Rt.tm_epo_auto_hide_price_if_zero&&""!==t.attr("data-price")?(e=Zt(t.data("price")/e,Ct,!0,a),"0"!==t.attr("data-hide-amount")&&"yes"!==Rt.tm_epo_show_price_inside_option_hidden_even||!t.attr("data-text")||t.html(t.attr("data-text")+" ("+e+")")):t.html(t.attr("data-text"))})}).off("tm-select-change").on("tm-select-change",function(){var t=Lt(this),e=t.closest(".cpf-element").attr("data-uniqid");t.is(".tc-epo-field-product")||Dt&&void 0!==Dt.data("per_product_pricing")&&!Dt.data("per_product_pricing")||(t.removeData("addedtcEpoBeforeOptionPriceCalculation"),t.removeData("addedfieldtcEpoBeforeOptionPriceCalculation"),Qt.off("tcEpoBeforeOptionPriceCalculation.math"+e),Qt.off("tcEpoAfterNormalOptionPriceCalculation.math"+e),t.trigger("tm-select-change-html"),t.trigger("tm-select-change-html-all"),qt.trigger({type:"tm-epo-update",norules:1,element:t}))}).trigger("tm-select-change-html-all"),r.off("focus.cpf").on("focus.cpf",function(){var t=Lt(this),e=t.closest(".tmcp-field-wrap").find(".tm-epo-field"),a=parseFloat(t.val()),i=parseFloat(t.attr("max")),o=parseFloat(t.attr("min")),r=t.attr("step"),c=rt(e,!1),e=ct(e,!1),n=!0;a&&""!==a&&"NaN"!==a||(a=0),""!==i&&"NaN"!==i||(i=""),""!==o&&"NaN"!==o||(o=0),"any"!==r&&""!==r&&void 0!==r&&parseFloat(r),(a<o||i<a)&&(n=!1),pe(t,c&&e&&n?a:o)}).off("change.cpf").on("change.cpf",function(t,e){var a=Lt(this),i=a.closest(".tmcp-field-wrap").find(".tm-epo-field"),o=parseFloat(a.val()),r=parseFloat(a.attr("max")),c=parseFloat(a.attr("min")),n=a.attr("step"),l=rt(i,!1),d=ct(i,!1),s=!0;o&&""!==o&&"NaN"!==o||(o=0),""!==r&&"NaN"!==r||(r=""),""!==c&&"NaN"!==c||(c=0),"any"!==n&&""!==n&&void 0!==n&&parseFloat(n),(o<c||r<o)&&(s=!1),l&&d&&s?(kt.noEpoUpdate?i.data("tm-quantity",a.val()).trigger("change.cpf",e).trigger("change.cpfproduct",e):i.data("tm-quantity",a.val()).trigger("change",e),i.trigger("tm-select-change-html-all")):a.data("epopreviousvalue")?a.val(a.data("epopreviousvalue")):a.val(c),a.trigger("cpf-changed")}).off("tmaddquantity").on("tmaddquantity",function(){var t=Lt(this);t.closest(".tmcp-field-wrap").find(".tm-epo-field").data("tm-quantity",t.val())}),a=It.find(".tmcp-textfield.tm-epo-field[maxlength],textarea.tm-epo-field[maxlength]"),(a=kt.is_associated?a:a.not(Mt.epoSelector+" "+Mt.associatedEpoSelector+" .tm-epo-field")).toArray().forEach(function(t){var e;(t=Lt(t)).data("tcmaxlength")||(t.data("tcmaxlength",1),e=t.closest(".tmcp-field-wrap-inner"),t=Lt.epoAPI.template.html(Mt.templateEngine.tc_chars_remanining,{maxlength:t.attr("maxlength"),characters_remaining:Rt.i18n_characters_remaining}),e.append(Lt(t)))}),a.off("change.tc_maxlen input.tc_maxlen").on("change.tc_maxlen input.tc_maxlen",function(){var t=Lt(this);t.closest(".tmcp-field-wrap").find(".tc-chars-remanining").html(parseInt(t.attr("maxlength"),10)-parseInt(t.val().length,10))}),n.off("tm_trigger_product_image").on("tm_trigger_product_image",function(){var t,e,a,i,o=Lt(this);o.is(".tm-product-image:checkbox, .tm-product-image:radio, select.tm-product-image")?(e=o.closest(".tmcp-field-wrap").find("label img"),a=o.closest(".cpf-section").is(".tm-epo-variation-section"),(t=o).is("select.tm-product-image")&&(t=o.children("option:selected")),(0<Lt(e).length||a&&void 0!==t.attr("data-image")||void 0!==t.attr("data-image")&&""!==t.attr("data-image")||void 0!==t.attr("data-imagep")&&""!==t.attr("data-imagep"))&&(o.is(":checked")||o.is("select.tm-product-image")&&""!==o.val()&&(""!==o.find("option:selected").attr("data-rules")||o.is(".tm-epo-variation-element")))?(i=(i=(i=Lt(e).first().attr("data-original"))||a?i:Lt(e).first().attr("src"))||t.attr("data-image"),(i=t.attr("data-imagep")?t.attr("data-imagep"):i)?zt.trigger("tm_change_product_image",{src:i,element:o,element_current:t,main_product:zt,epo_holder:It}):zt.trigger("tm_change_product_image",{src:!1,element:o,element_current:t,main_product:zt,epo_holder:It})):zt.trigger("tm_restore_product_image",{element:o,element_current:t,main_product:zt,epo_holder:It})):zt.trigger("tm_attempt_product_image",{element:o,element_current:t,main_product:zt,epo_holder:It})}),c.off("showhide.cpfcustom").on("showhide.cpfcustom",function(){var t,e,a,i=Lt(this),o=i.closest(".tmcp-field-wrap").find(".tm-epo-field"),r=!1;o.is(".tm-epo-variation-element")||(o.is("select")?""!==o.val()&&(r=!0):o.is(":checkbox")?o.is(":checked")&&(r=!0):o.is(":radio")?o.is(":checked")&&(r=!0,"yes"===Rt.tm_epo_show_only_active_quantities)&&o.closest(".tc-element-inner-wrap").find(".tm-epo-field.tmcp-radio").toArray().forEach(function(t){Lt(t).closest(".tmcp-field-wrap").find(".tm-quantity").hide()}):o.val()&&(r=!0),o=i.find(".tm-qty"),a=i.find(".tc-qty-button"),t=o.val(),e=o.attr("min")||"",r?("yes"===Rt.tm_epo_show_only_active_quantities&&i.show(),o.removeClass("ignore").prop("disabled",!1),a.prop("disabled",!1)):("yes"===Rt.tm_epo_show_only_active_quantities&&(i.hide(),t||o.val(e)),o.addClass("ignore").prop("disabled",!0),a.prop("disabled",!0)),It.is(".tc-show")&&setTimeout(function(){i.closest(".tcowl-carousel").trigger("refresh.owl.carousel")},200))}),n.off("change.cpfcustom").on("change.cpfcustom",function(){Lt(this).closest(".tmcp-field-wrap").find(".tm-quantity").trigger("showhide.cpfcustom")}),n.off("change.cpf").on("change.cpf",function(t,e){var a=Lt(this),i=a.closest(".tmcp-field-wrap"),o=a.closest(".tmcp-ul-wrap"),r=o.attr("data-tm-connector");a.is(":checkbox, :radio")&&(a.is(":radio")&&(e||(void 0!==r?Lt('[data-tm-connector="'+r+'"]').find(".tmcp-field-wrap").removeClass("tc-active").find(".tm-epo-reset-radio").addClass("tm-hidden"):o.find(".tmcp-field-wrap").removeClass("tc-active")),void 0!==r)&&Lt('[data-tm-connector="'+r+'"]').find(".tmcp-field-wrap").removeClass("tc-active").find(".tm-epo-reset-radio").addClass("tm-hidden"),a.is(":checked")?i.addClass("tc-active"):i.removeClass("tc-active")),a.is(".tm-epo-variation-element")||(a.is(".use_images:checkbox, .use_images:radio")&&a.attr("data-imagec")&&0<(o=i.find(".radio-image,.checkbox-image").first()).length&&(a.is(":checked")?o.prop("src",a.attr("data-imagec")):o.prop("src",a.attr("data-image"))),a.is(".use_images:radio")&&!e&&a.closest(".cpf-type-radio").find(".use_images:radio").not(a).toArray().forEach(function(t){(t=Lt(t)).closest(".tmcp-field-wrap").find(".radio-image").first().prop("src",t.attr("data-image"))}),a.is(".tmcp-range")&&a.trigger("change.cpflogic"),a.is("select")?a.trigger("tm-select-change"):(a.is(".tmcp-radio")&&a.closest(".cpf-element").find(".tm-quantity .tm-qty").toArray().forEach(function(t){(t=Lt(t)).closest("li.tmcp-field-wrap").find(".tmcp-radio").is(":checked")?t.prop("disabled",!1):t.attr("disabled","disabled")}),z=!0,qt.trigger({type:"tm-epo-update",norules:1,element:a}),z=!1)),a.trigger("tm_trigger_product_image"),It.is(".tc-show")&&setTimeout(function(){Lt(".tm-owl-slider").toArray().forEach(function(t){Lt(t).trigger("refresh.owl.carousel")})},200),zt.trigger("tm_attempt_product_image",{element:a,main_product:zt,epo_holder:It})}),n.filter('.tm-epo-field:text,input.tm-epo-field[type="number"],textarea.tm-epo-field').off("input.cpf").on("input.cpf",function(){Lt(this).trigger("change.cpf",{autoload:1})}),n.filter(":checkbox:checked, :radio:checked").toArray().forEach(function(t){Lt(t).closest(".tmcp-field-wrap").addClass("tc-active").trigger("change.cpf",{autoload:1})}),o.off("change.cpfclearbutton").on("change.cpfclearbutton cpfclearbutton",function(){var t,e=Lt(this),a=e.closest(".tmcp-field-wrap");e.is(":checked")&&((t=(t=(t=(t=e.closest(".tc-element-inner-wrap")).find(".tc-epo-element-product-li-container").length?t.find(".tmcp-ul-wrap").first().children(".tmcp-field-wrap").not(".tc-epo-element-product-li-container"):t).find(".tm-epo-reset-radio")).length?t:e.closest(".tc-element-inner-wrap").find(".tm-epo-reset-radio").first()).removeClass("tm-hidden"),a.append(t))}),l.off("click.cpf").on("click.cpf",function(){var t=Lt(this),e=t.closest(".tc-element-inner-wrap").find(".tm-epo-field.tmcp-radio:checked");e.length&&(e.prop("checked",!1),e.trigger("change",{forced:1})),t.addClass("tm-hidden")}),R&&R.debounce&&d.on("keyup",R.debounce(function(){var t=Lt(this),e=qt;kt.is_associated&&(e=kt.mainEpoObject.form),"yes"===Rt.tm_epo_global_enable_validation&&Lt.tc_validator&&t.closest(".tmcp-ul-wrap").data("tm-validation")&&t.tc_rules()&&e.tc_validate().element(t),t.trigger("change.cpf"),t.closest(".tmcp-field-wrap").find(".tm-quantity").trigger("showhide.cpfcustom")},10)),s.off("change.cpfv tcupload").on("change.cpfv tcupload",function(){var i,t,o,r,c,n=Lt(this),e=n.closest("label"),a=n.closest(".tmcp-field-wrap"),l=a.find(".cpf-upload-container"),d=a.find(".tm-filename"),s=n.val().replace("C:\\fakepath\\",""),p=[],m=P.URL||P.webkitURL,_=a.find(".tc-upload-preview");l.length&&d.length<=0&&(d=Lt('<span class="tm-filename"></span>'),e.after(d)),void 0!==s&&"undefined"!==s||(s=""),n.next(".tmcp-upload-hidden").remove(),p=(p=n.attr("data-file"))?p.split("|"):[],this.files?t=Array.from(this.files):0<p.length&&(t=p),1<t.length?d.html(t.length+" "+(1===t.length?Rt.i18n_file:Rt.i18n_files)):1===t.length?d.html(s):d.empty(),_.length||(_=Lt('<div class="tc-upload-preview tc-hidden"></div>'),a.append(_)),_.empty(),i=(i=It.data("num_uploads"))||[],c=n.closest(".cpf-element").attr("data-uniqid"),i[c]||(i[c]=[]),(s||0<t.length)&&m&&m.createObjectURL?("yes"===Rt.tm_epo_upload_inline_image_preview&&(1<t.length?_.addClass("multiple"):_.removeClass("multiple"),_.removeClass("tc-hidden")),r=function(t,e,a,i,o){var a=n[0].files&&n[0].files[a]&&n[0].files[a].size?n[0].files[a].size:0,r='<div class="tc-upload-image">';e?r=r+'<img src="'+e+'">':r+='<div class="tc-file-ext-overlay"></div>',r=r+'<div class="tc-file-name">'+t.name+"</div>",(A||k)&&(r+='<button type="button" class="tc-upload-remove"><svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg></button>'),r=(r=o?r+'<div class="tc-file-ext">'+o+"</div>":r)+'<div class="tc-file-size">'+(e=a,a=(o=(t=Math).log)(e)/o(1024)|0,(e/t.pow(1024,a)).toFixed(a?2:0))+" "+(a?"KMGTPEZY"[--a]+"B":"bytes")+"</div>",i.append(r+="</div>")},t.forEach(function(t,e){var a;"yes"===Rt.tm_epo_upload_inline_image_preview&&(a=Lt('<div class="tc-upload-file"></div>'),_.append(a),(o=new Image).onload=function(){r(t,this.src,e,a)},o.onerror=function(){r(t,!1,e,a,t.name.split(".").pop())},0<p.length?o.src=p[e]:(o.src=m.createObjectURL(t),m.revokeObjectURL(t))),i[c].push(t.name)}),It.data("num_uploads",i)):delete i[c],i[c]&&0===i[c].length&&delete i[c]}),E.on("click",".tc-upload-remove",function(){var t,e,a,i,o,r,c,n,l=Lt(this);(A||k)&&(e=(t=l.closest(".cpf-element")).find(".tm-epo-field"),c=l.closest(".tc-upload-file"),r=(l=l.closest(".tmcp-field-wrap")).find(".tc-upload-preview"),l=l.find(".tm-filename"),a=c.index(),void 0!==(n=e.val().replace("C:\\fakepath\\",""))&&"undefined"!==n||(n=""),(o=Array.from(e[0].files)).splice(a,1),i=new A("").clipboardData||new k,o.forEach(function(t){i.items.add(t)}),1<o.length?r.addClass("multiple"):r.removeClass("multiple"),e[0].files=i.files,c.remove(),1<i.files.length?l.html(i.files.length+" "+(1===i.files.length?Rt.i18n_file:Rt.i18n_files)):1===i.files.length?l.html(n):l.empty(),(o=(o=It.data("num_uploads"))||[])[r=t.closest(".cpf-element").attr("data-uniqid")]||(o[r]=[]),o[r].splice(a,1),0===o[r].length&&(delete o[r],e.val("")),(c=e.next(".tmcp-upload-hidden")).length&&(0<(n=c.val().split("|")).length&&n.splice(a,1),0===n.length?c.remove():c.val(n.join("|"))),It.data("num_uploads",o))}),y.off("change.cpf input.cpf").on("change.cpf input.cpf",function(){var t=Lt(this);qt.trigger("tm-epo-check-dpd"),pe(t),qt.trigger({type:"tm-epo-update",norules:2})}),pe(y),It.find(".cpf-type-product").off("tc-logic").on("tc-logic",function(){var t=Lt(this);t.find(".tc-init").length||t.data("isactive")&&!t.data("donetclogic")&&(t.data("donetclogic",!0),t.find(".tc-epo-field-product").trigger("change.cpfproduct",{forced:3}))}),It.find(".cpf-type-product .tc-epo-field-product.tc-epo-field-product-checkbox").off("change.cpfrequired").on("change.cpfrequired",function(){var t,e,a=Lt(this).closest(".cpf-element");a.is(".tc-is-required")&&(e=(t=a.find(".tmcp-field.tc-epo-field-product-checkbox")).not(":checked"),(0<(a=a.find(".tmcp-field.tc-epo-field-product-checkbox:checked")).length?(e.prop("required",!1),a):(t.attr("required",!0),t)).prop("required",!0))}),It.find(".cpf-type-product .tc-epo-field-product").off("change.cpfproduct").on("change.cpfproduct",function(t,e){var a,i,o,r,c,n,l=Lt(this),d=l.closest(".cpf-element"),s=d.find(".tc-epo-element-product-container-wrap"),p=l.closest(".tmcp-field-wrap").find(".tc-epo-element-product-container-wrap"),m=0<p.length,_=!1,f=1e3,u=l,g=d.find(".tm-epo-field").not(".tc-epo-element-product-li-container .tm-epo-field"),h=g.filter(":checked"),v=l.attr("data-counter");if(!1!==d.data("isactive")&&(!e||2!==e.forced)&&(void 0===t.isTrigger||!l.data("triggeredonce")||e&&e.forced)&&3!==l.data("triggeredforced")){if(l.data("triggeredonce",1),l.is(":checkbox")||(f=t.isTrigger),g.is(":radio")?0<h.length&&(n=h.closest(".tmcp-field-wrap").find("input.tm-qty")):g.is(":checkbox")?0<h.length&&(n=l.closest(".tmcp-field-wrap").find("input.tm-qty")):n=g.closest(".tmcp-field-wrap").find("input.tm-qty"),l.is(":checkbox"))if(l.is(".tc-epo-field-product-hidden"))l.is(":checked")?s.addClass("tc-active-product"):s.removeClass("tc-active-product"),a=l.val(),i=l.attr("data-type"),d.find(".tc-epo-element-product-li-container:not(.tc-hidden-container .tc-epo-element-product-li-container)").removeClass("tm-hidden");else{if(l.is(":checked"))m&&p.removeClass("tm-hidden");else{if(m&&p.addClass("tm-hidden"),!e||!e.forced)return;_=!0}_||(a=l.val(),i=l.attr("data-type"),d.find(".tc-epo-element-product-li-container:not(.tc-hidden-container .tc-epo-element-product-li-container)").removeClass("tm-hidden"))}else if(l.is(":radio")){if(l.is(":checked"))m&&(s.addClass("tm-hidden"),p.removeClass("tm-hidden"));else{if(m&&p.addClass("tm-hidden"),!e||!e.forced)return;_=!0}_||(a=l.val(),i=l.attr("data-type"),d.find(".tc-epo-element-product-li-container:not(.tc-hidden-container .tc-epo-element-product-li-container)").removeClass("tm-hidden"))}else l.is("select")&&(v=(u=t=l.children(":selected")).index(),""===l.children(":first").val()&&v--,a=l.val(),i=t.attr("data-type"),d.find(".tc-epo-element-product-li-container:not(.tc-hidden-container .tc-epo-element-product-li-container)").removeClass("tm-hidden"));if(o=(l.is(".tc-epo-field-product-checkbox")?p:d).find(".tc-epo-element-product-container"),r=o.filter('[data-product_id="'+a+'"]'),c=r.find(Mt.associateQtySelector),""!==s.html()&&n&&0<n.length&&0===c.length&&n.val(0),l.is(":checkbox"))l.is(".tc-epo-field-product-hidden")&&(l.is(":checked")?"0"===c.val()&&"0"!==c.attr("min")&&c.val(c.attr("min")).trigger("change"):(c.val(0),c.closest(".tm-quantity-alt").removeClass("tm-hidden"),1!==e.forced&&c.closest(".tm-quantity-alt").find(".single_add_to_cart_product").trigger("cpfqtybutton"),s.find(Mt.associatedEpoCart).trigger("tm-epo-update")));else{if(!l.is(":radio")&&!l.is("select"))return;l.val()&&!l.data("set_initial")&&"0"===c.val()&&("0"!==c.attr("min")&&c.val(c.attr("min")).trigger("change"),l.data("set_initial",1))}a?0===r.length?(e&&3===e.forced&&l.data("triggeredforced",3),h={action:"wc_epo_get_associated_product_html",product_id:a,parent_id:It.attr("data-product-id"),mode:d.attr("data-mode"),layout_mode:d.attr("data-product-layout-mode"),uniqid:d.attr("data-uniqid"),name:l.attr("name"),counter:v,quantity_min:d.attr("data-quantity-min"),quantity_max:d.attr("data-quantity-max"),priced_individually:d.attr("data-priced-individually"),discount:d.attr("data-discount"),discount_type:d.attr("data-discount-type"),discount_exclude_addons:d.attr("data-discount-exclude-addons"),show_image:d.attr("data-show-image"),show_title:d.attr("data-show-title"),show_title_link:d.attr("data-show-title-link"),show_price:d.attr("data-show-price"),show_description:d.attr("data-show-description"),show_meta:d.attr("data-show-meta"),disable_epo:d.attr("data-disable-epo")},d.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),Lt.ajax({url:Rt.ajax_url,type:"POST",data:h,dataType:"json",success:function(t){200===t.result&&(r=Lt(t.html),(m?l.closest(".tmcp-field-wrap").find(".tc-epo-element-product-container-wrap").empty():d.find(".tc-epo-element-product-container-wrap")).append(r),se(kt,zt,r,i,l,qt,o,f,c),r.find(Mt.associateQtySelector).trigger("change"),Qt.trigger("tc_apply_validation"))},complete:function(){d.unblock()}})):(se(kt,zt,r,i,l,qt,o,f,c),r.find(Mt.associateQtySelector).trigger("change")):(o.addClass("tm-hidden"),g=Lt.epoAPI.util.parseJSON(u.attr("data-rules"))[0]||0,_=Lt.epoAPI.util.parseJSON(u.attr("data-original-rules"))||0,u.is(".tcenabled")&&u.data("associated_price_set",1),u.data("price_set",1),u.data("raw_price",g),u.data("raw_original_price",_),u.data("price",g),u.data("original_price",_),t=!1,(p=(p=u).is("option")?u.closest("select"):p).is(".tc-epo-field-product")&&(!p.is("select")&&(p.is(":checkbox")||p.is(":radio"))?p.is(":checked")&&(t=!0):""!==p.val()&&(t=!0)),ae(kt,u.closest(".tmcp-field-wrap").find(".tc-price").not(Mt.associatedEpoSelector+" .tc-price"),g,t?Wt(g):u.data("price-html"),_,!t),y.trigger("change.cpf"))}}),E.off("click.cpfqtybutton cpfqtybutton",".cpf-type-product .single_add_to_cart_product").on("click.cpfqtybutton cpfqtybutton",".cpf-type-product .single_add_to_cart_product",function(){var t,e,a=Lt(this),i=a.closest(".tm-quantity-alt").find(Mt.associateQtySelector),o=a.is(".alt"),r=a.closest(".cpf-element").find(".tc-epo-element-product-container-wrap");a.data("inittriggeredonce")&&(t=Lt.epoAPI.math.toInt(i.attr("data-min")),e=Lt.epoAPI.math.toInt(i.attr("data-max")),o?(r.addClass("tc-active-product"),i.attr("min",t),e&&i.attr("max",e),"0"===i.val()&&("0"===i.attr("min")?i.val(1):i.val(i.attr("min"))).trigger("change"),a.removeClass("alt").text(a.attr("data-remove"))):(r.removeClass("tc-active-product"),i.val(0).trigger("change"),i.closest(".tm-quantity-alt").removeClass("tm-hidden"),a.addClass("alt").text(a.attr("data-add")))),a.data("inittriggeredonce",1),r.find(Mt.associatedEpoCart).trigger("tm-epo-update")}),E.off("change.cpfqtyalt input.cpfqtyalt",".cpf-type-product "+Mt.associateQtySelector).on("change.cpfqtyalt input.cpfqtyalt",".cpf-type-product "+Mt.associateQtySelector,function(){var t,e=Lt(this),a=e.closest(".cpf-element").find(".tm-epo-field").not(".tc-epo-element-product-li-container .tm-epo-field"),i=e.closest(".tm-quantity-alt").find(".single_add_to_cart_product"),o=a.filter(":checked"),r=Lt.epoAPI.math.toInt(e.attr("min")),c=Lt.epoAPI.math.toInt(e.attr("max"));if(a.is(".tc-epo-field-product-hidden")&&a.is(":checkbox")&&(0===o.length&&"0"!==e.val()?(a.prop("checked",!0).trigger("change"),o=a.filter(":checked")):"0"===e.val()&&o.length&&a.prop("checked",!1).trigger("change")),a.is(":radio")){if(0===o.length)return;t=o.closest(".tmcp-field-wrap").find("input.tm-qty").not(".tc-element-qty")}else if(a.is(":checkbox")){if(0===o.length)return;t=e.closest(".tmcp-field-wrap").find("input.tm-qty").not(".tc-element-qty")}else t=a.closest(".tmcp-field-wrap").find("input.tm-qty").not(".tc-element-qty");0!==t.length&&(t.attr("min",r),c&&t.attr("max",c),(o=e.closest(".tc-epo-element-product-container").find(Mt.associatedEpoCart)).trigger("tm-epo-update"),t.val(e.val()),0<Lt.epoAPI.math.toFloat(e.val())?(o.find(".tm-epo-field.tcenabled").removeClass("ignore"),e.removeClass("ignore")):(o.find(".tm-epo-field.tcenabled").addClass("ignore"),e.addClass("ignore")),a.trigger("change.cpfproduct",{forced:2}),i.data("inittriggeredonce")&&("0"===e.val()?i.removeClass("alt"):i.addClass("alt")),i.trigger("cpfqtybutton"))}),E.off("click.cbsmel").on("click.cbsmel",".tc-choice-button-selector",function(t){var e=Lt(this).closest(".tmcp-field-wrap").find(".tm-epo-field");t.stopPropagation(),e.length&&e.trigger("click")}),qt.off("tm-epo-update").on("tm-epo-update",function(t){var D,H,e,a,B,N,L,M,R,Q,U,$,i,J,o,r,Z,c,W,V,X,G,n,l,Y,K,tt,et,at,d,s,it,ot,p,rt,m,_,ct,nt,lt,dt,st,pt,mt,_t,f,u,ft,g,h=Lt(this),v=!1,y=0,b=!1,w=0,x=0,A=0,k=!1,ut=!0,F=[],P=0,I=0,E={},C=0,gt=!1,ht=!1,vt=!1,yt="",bt=!1,wt=!1,xt="",At="",q=0,S=0,T=0,j=0,O=0,z=t.epoObject?Lt.extend(!0,{},t.epoObject):Lt.extend(!0,{},kt);z&&!z.noEpoUpdate&&(Qt.trigger("tcEpoUpdateStart",{epo:z,alternativeCart:z,this_product_type:St,cart:h,totalsHolder:Ct,fetchOptionPrices:Yt,epoHolder:It}),D=Lt.epoAPI.applyFilter("tc_get_bundleid",h.attr("data-product_id"),h,z),H=Ct.attr("data-price-override"),f=h,f=Lt.epoAPI.applyFilter("tc_getCurrentQty",Lt.epoAPI.math.toFloat(te(f).val()),f),ft=(u=(u=h).is(".tc-epo-element-product-container-cart")&&((ft=u.closest(".cpf-element")).is(".cpf-type-product-thumbnailmultiple")||ft.is(".cpf-type-product-checkbox")||ft.is(".cpf-type-product-custombundle")?g=u.closest(".tc-epo-element-product-holder").find(".tc-epo-element-product-container-variation-id"):(ft.is(".cpf-type-product-thumbnail")||ft.is(".cpf-type-product-radio")||ft.is(".cpf-type-product-dropdown")||ft.is(".cpf-type-product-single"))&&(g=ft.find(".tc-epo-element-product-container-variation-id")),g)&&g.length?g:u).find(Kt(u)).val()||0,z.associated_connect&&1===z.associated_connect.length&&(f=parseFloat(z.main_product.find(Mt.associateQtySelector).not(Mt.associatedEpoSelector+" "+Mt.qtySelector).last().val())),t.stopImmediatePropagation(),y=v=Lt.epoAPI.applyFilter("tcGetCurrentProductPrice",ce(Ct,!0),qt,Ct),w=b=Lt.epoAPI.applyFilter("tcGetCurrentProductRegularPrice",re(Ct,!0),qt,Ct),v=Lt.epoAPI.applyFilter("tcCalculateCurrentProductPrice",v,{epo:z,alternativeCart:Pt,cart:h,main_product:zt}),Number.isFinite(f)&&!Ct.attr("data-is-sold-individually")&&0!==te(h).length||(f=1),g={qty:f="yes"===Rt.tm_epo_total_price_as_unit_price?1:f,product_price:y,original_product_price:w},Ct.data("totalsHolder_tc_totals_ob",g),t.norules?t.norules&&(1===t.norules&&Gt(z,t.element),Lt.tcepo.lateFieldsPrices[Bt]=[],It.find(".tm-epo-late-field").toArray().forEach(function(t){(t=Lt(t)).data("price",0),Lt.tcepo.lateFieldsPrices[Bt].push({setter:t,price:t.data("tm-price-for-late"),original_price:t.data("tm-original-price-for-late"),bundleid:D,pricetype:ne(z,t,"price_type")})})):le(z,h),u=It.find(".tmcp-dynamic.dynamic-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.dynamic-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)"):u).filter(".tcenabled")).length&&(v=(n=Yt(z,It,".tmcp-dynamic.dynamic-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)",0,0,F,k,void 0,void 0,void 0,!0,void 0,void 0,f)).total,O=v,w=n.original_total,b=y=O,Et.find(".cpf-dynamic-product-price").val(O),g.dynamic_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),z.associated_connect&&1===z.associated_connect.length&&(l=z.associated_connect,z.associated_connect.is("select"))&&(l=z.associated_connect.find("option:selected")),!1===v?(Ct.data("tm-floating-box-data",[]),Ct.empty(),z.associated_connect&&1===z.associated_connect.length&&ae(kt,l.closest(".tmcp-field-wrap").find(".tc-price").not(Mt.associatedEpoSelector+" .tc-price"),0,"",0),Dt.trigger("tm-epo-short-update",{container:Ft})):(c=Lt.epoAPI.applyFilter("tcAlterElementQty",1,{epo:z,alternativeCart:Pt,currentCart:qt,main_product:zt}),void 0!==qt.data("per_product_pricing")&&(ut=qt.data("per_product_pricing")),ut=Lt.epoAPI.applyFilter("tcCalculatePerProductPricing",ut,{epo:z,alternativeCart:Pt,cart:h,main_product:zt}),!Nt||"woocommerce_before_add_to_cart_button"!==Rt.tm_epo_totals_box_placement||"variable"!==St&&"variable-subscription"!==St||Ct.data("moved_inside")||Ct.data("moved_inside",1),Qt.trigger("tcEpoBeforeOptionPriceCalculation",{epo:z,alternativeCart:z,this_product_type:St,cart:h,totalsHolder:Ct,fetchOptionPrices:Yt,epoHolder:It,total:x,original_total:A,floatingBoxData:F,showTotal:k,cart_fee_options_total:0,cart_fee_options_original_total:0}),z.associated_connect||t.noassociated||"yes"!==Rt.tm_epo_global_product_element_quantity_sync||h.is(Lt.tcAPI().associatedEpoCart)||h.find(Lt.tcAPI().associatedEpoCart).filter(":visible").toArray().forEach(function(t){Lt(t).trigger({type:"tm-epo-update",noassociated:1})}),n=Yt(z,It,".tmcp-field:not(.tmcp-dynamic,.tc-epo-field-product, .tc-is-math-special, .tc-is-math-cumulative)",x,A,F,k,void 0,void 0,void 0,void 0,void 0,void 0,f),x=n.total,A=n.original_total,F=n.floatingBoxData,k=n.showTotal,s=n.elementsLength,it=(n=Yt(z,It,".tc-epo-field-product",0,0,F,k,void 0,void 0,void 0,void 0,void 0,void 0,f)).total,ot=n.original_total,p=n.total_taxed,rt=n.original_total_taxed,mt=n.vat_total,F=n.floatingBoxData,k=n.showTotal,s+=n.elementsLength,Ct.data("tm-floating-box-data",F),P=(n=Yt(z,It,".tmcp-fee-field",0,0,F,k,!1,!0,void 0,void 0,void 0,void 0,f)).total,I=n.original_total,F=n.floatingBoxData,k=n.showTotal,s+=n.elementsLength,Qt.trigger("tcEpoAfterNormalOptionPriceCalculation",{epo:z,alternativeCart:z,this_product_type:St,cart:h,totalsHolder:Ct,fetchOptionPrices:Yt,epoHolder:It,total:x,original_total:A,floatingBoxData:F,showTotal:k,cart_fee_options_total:P,cart_fee_options_original_total:I}),e=x,a=A,m=de(z,parseFloat(v),parseFloat(w),parseFloat(e+it),parseFloat(a+ot),D,Ct),n=Yt(z,It,".tmcp-field.tc-is-math-special:not(.tmcp-dynamic)",x,A,F,k,void 0,void 0,void 0,!0,void 0,void 0,f),x=n.total,A=n.original_total,F=n.floatingBoxData,k=n.showTotal,s+=n.elementsLength,e=x,a=A,e+=m.normal[0],a+=m.normal[1],P+=m.fees[0],I+=m.fees[1],x=(n=Yt(z,It,".tmcp-field.tc-is-math-cumulative:not(.tmcp-dynamic)",x=e,A=a,F,k,void 0,void 0,void 0,!0,!0,void 0,f)).total,A=n.original_total,F=n.floatingBoxData,k=n.showTotal,s+=n.elementsLength,e=x,a=A,u=It.find(".tmcp-dynamic.dynamic-product-price.tc-is-math-special"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.dynamic-product-price.tc-is-math-special"):u).filter(".tcenabled")).length&&(n=Yt(z,It,".tmcp-field.tmcp-dynamic.dynamic-product-price.tc-is-math-special",O+x,O+A,F,k,void 0,void 0,void 0,!0,void 0,void 0,f),v=O=Lt.epoAPI.math.toFloat(n.total)-Lt.epoAPI.math.toFloat(x),w=Lt.epoAPI.math.toFloat(n.original_total)-Lt.epoAPI.math.toFloat(A),b=y=O,Et.find(".cpf-dynamic-product-price").val(O),g.dynamic_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),u=It.find(".tmcp-dynamic.dynamic-product-price.tc-is-math-cumulative"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.dynamic-product-price.tc-is-math-cumulative"):u).filter(".tcenabled")).length&&(n=Yt(z,It,".tmcp-field.tmcp-dynamic.dynamic-product-price.tc-is-math-cumulative",O+x,O+A,F,k,void 0,void 0,void 0,!0,void 0,void 0,f),v=O=Lt.epoAPI.math.toFloat(n.total)-Lt.epoAPI.math.toFloat(x),w=Lt.epoAPI.math.toFloat(n.original_total)-Lt.epoAPI.math.toFloat(A),b=y=O,Et.find(".cpf-dynamic-product-price").val(O),g.dynamic_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),u=It.find(".tmcp-dynamic.dynamic-product-price"),0<!(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.dynamic-product-price"):u).filter(".tcenabled")).length&&Et.find(".cpf-dynamic-product-price").val(""),O=0,u=It.find(".tmcp-dynamic.calculation:not(.tc-is-math-special, .tc-is-math-cumulative)"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.calculation:not(.tc-is-math-special, .tc-is-math-cumulative)"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var e=(t=Lt(t)).closest(".tmcp-ul-wrap"),a=Yt(kt,e,".tmcp-dynamic.calculation:not(.tc-is-math-special, .tc-is-math-cumulative)",O,O,[],!0,!0,void 0,void 0,void 0,!0,void 0,void 0).total;t.is(".result-as-price")&&(a=Wt(a,Ct,!0)),e.find(".tc-result").html(a)}),u=It.find(".tmcp-dynamic.calculation.tc-is-math-special"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.calculation.tc-is-math-special"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var e=(t=Lt(t)).closest(".tmcp-ul-wrap"),a=Yt(kt,e,".tmcp-field.tmcp-dynamic.calculation.tc-is-math-special",O+x,O+A,[],!0,!0,void 0,void 0,!0),a=Lt.epoAPI.math.toFloat(a.total)-Lt.epoAPI.math.toFloat(x);t.is(".result-as-price")&&(a=Wt(a,Ct,!0)),e.find(".tc-result").html(a)}),u=It.find(".tmcp-dynamic.calculation.tc-is-math-cumulative"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.calculation.tc-is-math-cumulative"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var e=(t=Lt(t)).closest(".tmcp-ul-wrap"),a=Yt(kt,e,".tmcp-field.tmcp-dynamic.calculation.tc-is-math-cumulative",O+x,O+A,[],!0,!0,void 0,void 0,!0,void 0,void 0,void 0),a=Lt.epoAPI.math.toFloat(a.total)-Lt.epoAPI.math.toFloat(x);t.is(".result-as-price")&&(a=Wt(a,Ct,!0)),e.find(".tc-result").html(a)}),O=0,u=It.find(".tmcp-dynamic.change-product-weight:not(.tc-is-math-special, .tc-is-math-cumulative)"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.change-product-weight:not(.tc-is-math-special, .tc-is-math-cumulative)"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var t=(t=Lt(t)).closest(".tmcp-ul-wrap"),e=Yt(kt,t,".tmcp-dynamic.change-product-weight:not(.tc-is-math-special, .tc-is-math-cumulative)",O,O,[],!0,!0,void 0,void 0,void 0,void 0,void 0,void 0);t.find(".tc-result").html(e.total)}),u=It.find(".tmcp-dynamic.change-product-weight.tc-is-math-special"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.change-product-weight.tc-is-math-special"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var t=(t=Lt(t)).closest(".tmcp-ul-wrap"),e=Yt(kt,t,".tmcp-field.tmcp-dynamic.change-product-weight.tc-is-math-special",O+x,O+A,[],!0,!0,void 0,void 0,!0,void 0,void 0,void 0);t.find(".tc-result").html(Lt.epoAPI.math.toFloat(e.total)-Lt.epoAPI.math.toFloat(x))}),u=It.find(".tmcp-dynamic.change-product-weight.tc-is-math-cumulative"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.change-product-weight.tc-is-math-cumulative"):u).filter(".tcenabled")).length&&u.toArray().forEach(function(t){var t=(t=Lt(t)).closest(".tmcp-ul-wrap"),e=Yt(kt,t,".tmcp-field.tmcp-dynamic.change-product-weight.tc-is-math-cumulative",O+x,O+A,[],!0,!0,void 0,void 0,!0,void 0,void 0,void 0);t.find(".tc-result").html(Lt.epoAPI.math.toFloat(e.total)-Lt.epoAPI.math.toFloat(x))}),O=0,u=It.find(".tmcp-dynamic.override-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.override-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)"):u).filter(".tcenabled")).length&&(n=Yt(z,It,".tmcp-dynamic.override-product-price:not(.tc-is-math-special, .tc-is-math-cumulative)",O,O,F,k,void 0,void 0,void 0,void 0,void 0,void 0,f),v=O=n.total,w=n.original_total,a=e=b=y=O,Et.find(".cpf-override-product-price").val(O),g.override_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),u=It.find(".tmcp-dynamic.override-product-price.tc-is-math-special"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.override-product-price.tc-is-math-special"):u).filter(".tcenabled")).length&&(n=Yt(z,It,".tmcp-field.tmcp-dynamic.override-product-price.tc-is-math-special",O+x,O+A,F,k,void 0,void 0,void 0,!0,void 0,void 0,f),v=O=Lt.epoAPI.math.toFloat(n.total)-Lt.epoAPI.math.toFloat(x),w=Lt.epoAPI.math.toFloat(n.original_total)-Lt.epoAPI.math.toFloat(A),a=e=b=y=O,Et.find(".cpf-override-product-price").val(O),g.override_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),u=It.find(".tmcp-dynamic.override-product-price.tc-is-math-cumulative"),0<(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.override-product-price.tc-is-math-cumulative"):u).filter(".tcenabled")).length&&(n=Yt(z,It,".tmcp-field.tmcp-dynamic.override-product-price.tc-is-math-cumulative",O+x,O+A,F,k,void 0,void 0,void 0,!0,void 0,void 0,f),v=O=Lt.epoAPI.math.toFloat(n.total)-Lt.epoAPI.math.toFloat(x),w=Lt.epoAPI.math.toFloat(n.original_total)-Lt.epoAPI.math.toFloat(A),a=e=b=y=O,Et.find(".cpf-override-product-price").val(O),g.override_product_price=O,Ct.data("totalsHolder_tc_totals_ob",g)),u=It.find(".tmcp-dynamic.override-product-price"),0<!(u=(u=!1===z.is_associated?u.not(Mt.associatedEpoSelector+" .tmcp-dynamic.override-product-price"):u).filter(".tcenabled")).length?Et.find(".cpf-override-product-price").val(""):a=e=0,Qt.trigger("tcEpoAfterOptionPriceCalculation",{epo:z,alternativeCart:z,this_product_type:St,cart:h,totalsHolder:Ct,fetchOptionPrices:Yt,epoHolder:It,total:x,original_total:A,floatingBoxData:F,showTotal:k,cart_fee_options_total:P,cart_fee_options_original_total:I}),setTimeout(function(){It.find("select.tm-epo-field").trigger("tm-select-price-update-html-all")},1),Lt.tcepo.oneOptionIsSelected[Bt]=k,z=oe(z,Bt,s),ie(zt,z),0<P&&(k=!0),Pt&&!ut&&(k=!1),"enable"!==Tt&&"hideifoptionsiszero"!==Tt&&"hideiftotaliszero"!==Tt||(k=!0),1<f&&(k=!0),"variable"!==St&&"variable-subscription"!==St||Lt.epoAPI.math.toFloat(ft)||(k=!1),"disable"===Tt&&(k=!1),"yes"!==Rt.tm_epo_change_variation_price&&"yes"!==Rt.tm_epo_change_original_price||(k=!0),z.is_associated&&!ut&&(k=!1),n=parseFloat(v*f),Rt.extraFee&&(C=parseFloat(Rt.extraFee),Number.isFinite(C)||(C=0)),!1!==(u=Lt.epoAPI.applyFilter("tcCalculateFinalProductPrice",!1,{alternativeCart:Pt,product_price:v,product_total_price:n,v_product_price:y,tm_set_tax_price:$t,main_product:zt,totalsHolder:Ct,cartQty:f}))&&"object"==typeof u&&Object.prototype.hasOwnProperty.call(u,"productPrice")&&Object.prototype.hasOwnProperty.call(u,"productTotalPrice")&&(v=u.productPrice,n=u.productTotalPrice),e=Lt.epoAPI.applyFilter("tc_adjust_options_price_per_unit",e,n),x=parseFloat(e*f*c),x=Lt.epoAPI.applyFilter("tc_adjust_options_total_price",x,f,c,e,Ct),T="no"===Rt.tm_epo_global_product_element_quantity_sync?(q=parseFloat(it),parseFloat(p)):(q=parseFloat(it*f*c),parseFloat(p*f*c)),q=Lt.epoAPI.applyFilter("tc_adjust_options_productfield_total_price",q,f,c,e,Ct),T=Lt.epoAPI.applyFilter("tc_adjust_options_productfield_total_price_taxed",T,f,c,e,Ct),a=Lt.epoAPI.applyFilter("tc_adjust_options_price_per_unit",a,n),A=parseFloat(a*f*c),A=Lt.epoAPI.applyFilter("tc_adjust_options_original_total_price",A,f,c,a,Ct),j="no"===Rt.tm_epo_global_product_element_quantity_sync?(S=parseFloat(ot),parseFloat(rt)):(S=parseFloat(ot*f*c),parseFloat(rt*f*c)),S=Lt.epoAPI.applyFilter("tc_adjust_options_productfield_original_total_price",S,f,c,a,Ct),j=Lt.epoAPI.applyFilter("tc_adjust_options_productfield_original_total_price_taxed",j,f,c,a,Ct),"1"===H&&0<parseFloat(x)&&(n=y=v=0),n=Lt.epoAPI.applyFilter("tc_adjust_product_total_price_without_options",n),x=Lt.epoAPI.applyFilter("tcAdjustTotal",x,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),q=Lt.epoAPI.applyFilter("tcAdjustProductFieldTotal",q,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),T=Lt.epoAPI.applyFilter("tcAdjustProductFieldTotalTaxed",T,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),A=Lt.epoAPI.applyFilter("tcAdjustOriginalTotal",A,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),S=Lt.epoAPI.applyFilter("tcAdjustProductFieldOriginalTotal",S,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),j=Lt.epoAPI.applyFilter("tcAdjustProductFieldOriginalTotalTaxed",j,{epo:z,totalsHolder:Ct,cart:h,main_product:zt}),x=parseFloat(Lt.epoAPI.applyFilter("tc_adjust_total",x,Ct)),P=parseFloat(Lt.epoAPI.applyFilter("tc_adjust_totals_fee",P,Ct)),A=parseFloat(Lt.epoAPI.applyFilter("tc_adjust_original_total",A,Ct)),I=parseFloat(Lt.epoAPI.applyFilter("tc_adjust_original_total_fee",I,Ct)),F=C,s=e,ot=p=(u=x)+(it=P),rt=a,V=$=(c=A)+(W=I),X=n,G=parseFloat(n+p+F),F=parseFloat(w+$+F),v=$t(v,Ct,void 0,0,void 0,void 0,!0),b=$t(b,Ct,void 0,0,void 0,void 0,!0),n=$t(n,Ct,void 0,0,void 0,void 0,!0),x=$t(x,Ct,void 0,0,void 0,void 0,!0),e=$t(e,Ct,void 0,0,void 0,void 0,!0),p=parseFloat(P)+parseFloat(x),A=$t(A,Ct,void 0,0,void 0,void 0,!0),a=$t(a,Ct,void 0,0,void 0,void 0,!0),$=parseFloat(I)+parseFloat(A),C=$t(C,Ct,void 0,0,void 0,void 0,!0),i=n,n=Lt.epoAPI.applyFilter("tc_adjust_product_total_price",parseFloat(n+p+C),i,p,C,x,P,Ct),U=Lt.epoAPI.applyFilter("tc_adjust_product_total_original_price",parseFloat(i+$+C),i,$,C,A,I,Ct),mt="1"===(Ct.attr("data-prices-include-tax")||Rt.prices_include_tax)?(ct=mt+parseFloat(Ut(x,Ct)),nt=mt+parseFloat(Ut(p,Ct)),st=mt+parseFloat(Ut(n,Ct)),parseFloat(Ut(i,Ct))):(ct=mt+parseFloat(x-u),nt=mt+parseFloat(p-ot),st=mt+parseFloat(n-G),parseFloat(i-X)),u+=q,s+=q,ot+=q,c+=S,rt+=S,V+=S,G+=q,F+=S,x+=T,e+=T,p+=T,A+=j,a+=j,$+=j,n+=T,U+=j,q=parseFloat(v+parseFloat(e)),S=parseFloat(v+parseFloat(a)),"yes"===Rt.tm_epo_fees_on_unit_price&&(q=parseFloat(v+parseFloat(e)+parseFloat(parseFloat(P)/f)),S=parseFloat(v+parseFloat(a)+parseFloat(parseFloat(I)/f))),T=Wt(q,Ct,!0),j=Wt(S,Ct,!0),C&&(bt=!0,yt=Wt(C,Ct,!0)),R=Wt(n,Ct,!0),Q=Wt(U,Ct,!0),B=Wt(x,Ct,!0),L=Wt(P,Ct,!0),N=Wt(A,Ct,!0),M=Wt(I,Ct,!0),lt=Wt(ct),dt=Wt(nt),pt=Wt(st),_t=Wt(mt),T=Lt.epoAPI.applyFilter("tc_adjust_formatted_unit_price",T,v,e,P,f),B=Lt.epoAPI.applyFilter("tc_adjust_formatted_options_total",B,x,e,f),L=Lt.epoAPI.applyFilter("tc_adjust_formatted_fees_total",L,P),R=Lt.epoAPI.applyFilter("tc_adjust_formatted_final_total",R,n,i,p,C,f),T=Lt.epoAPI.applyFilter("tcAdjustFormattedUnitPrice",T,{epo:z,totalsHolder:Ct,event:t,unit_price:q,productPrice:v,_total:e,total_plcart_fee_options_totals_fee:P,cartQty:f}),j=Lt.epoAPI.applyFilter("tcAdjustFormattedUnitOriginalPrice",j,{epo:z,totalsHolder:Ct,event:t,unit_original_price:S,productPrice:v,_original_total:a,total_plcart_fee_options_totals_fee:P,cartQty:f}),B=Lt.epoAPI.applyFilter("tcAdjustFormattedOptionsTotal",B,{epo:z,totalsHolder:Ct,event:t,total:x,_total:e,total_plus_fee:p,extraFee:C,cartQty:f}),N=Lt.epoAPI.applyFilter("tcAdjustFormattedOptionsOriginalTotal",N,{epo:z,totalsHolder:Ct,event:t,original_total:A,_original_total:a,original_total_plus_fee:$,extraFee:C,cartQty:f}),L=Lt.epoAPI.applyFilter("tcAdjustFormattedFeesTotal",L,{epo:z,totalsHolder:Ct,event:t,cart_fee_options_total:P,extraFee:C,cartQty:f}),M=Lt.epoAPI.applyFilter("tcAdjustFormattedFeesOriginalTotal",M,{epo:z,totalsHolder:Ct,event:t,cart_fee_options_original_total:I,extraFee:C,cartQty:f}),R=Lt.epoAPI.applyFilter("tcAdjustFormattedFinalTotal",R,{epo:z,totalsHolder:Ct,event:t,product_total_price:n,product_total_price_without_options:i,total_plus_fee:p,extraFee:C,cartQty:f}),Q=Lt.epoAPI.applyFilter("tcAdjustFormattedFinalOriginalTotal",Q,{epo:z,totalsHolder:Ct,event:t,product_total_original_price:U,product_total_price_without_options:i,original_total_plus_fee:$,extraFee:C,cartQty:f}),(0<x&&"showtgz"===Ot||"show"===Ot)&&(gt=!0,"yes"===Rt.tm_epo_enable_vat_options_total)&&(ht=!0),0!==P&&(vt=!0),R&&"show"===jt&&(wt=!0),E={qty:f,product_price:v,raw_product_price:y,product_regular_price:b,raw_product_regular_price:w,formatted_product_price:Wt(parseFloat(v)*f),late_total_prices:m,late_total_price:$t(m[0],Ct),late_total_original_price:$t(m[1],Ct),raw_options_price_per_unit:s,raw_options_total_price:u,raw_cart_fee_options_total_price:it,raw_total_plus_fee:ot,raw_options_original_price_per_unit:rt,raw_options_original_total_price:c,raw_cart_fee_options_original_total_price:W,raw_original_total_plus_fee:V,raw_product_total_price:G,raw_product_total_original_price:F,raw_product_total_price_without_options:X,options_price_per_unit:e,options_total_price:x,cart_fee_options_total_price:P,total_plus_fee:p,options_original_price_per_unit:a,options_original_total_price:A,cart_fee_options_total_original_price:I,original_total_plus_fee:$,vat_options_total:ct,vat_options_total_plus_fee:nt,formatted_vat_options_total:lt,formatted_vat_options_total_plus_fee:dt,vat_total:st,formatted_vat_total:pt,vat_product_base:mt,formatted_vat_product_base:_t,product_total_price:n,product_total_original_price:U,product_total_price_without_options:i,product_unit_price:q,product_unit_original_price:S,formatted_unit_price:T,formatted_options_total:B,formatted_fees_total:L,formatted_final_total:R,formatted_unit_original_price:j,formatted_options_original_total:N,formatted_fees_original_total:M,formatted_final_original_total:Q,formatted_extra_fee:yt,show_options_total:gt,show_fees_total:vt,show_extra_fee:bt,show_final_total:wt,show_options_vat:ht,show_unit_price:"yes"===Rt.tm_epo_show_unit_price,unit_price:z.is_associated?Rt.i18n_item_unit_price:Rt.i18n_unit_price,options_total:z.is_associated?Rt.i18n_item_options_total:Rt.i18n_options_total,options_vat_total:z.is_associated?Rt.i18n_item_vat_options_total:Rt.i18n_vat_options_total,final_total:z.is_associated?Rt.i18n_item_final_total:Rt.i18n_final_total,fees_total:Rt.i18n_fees_total,extra_fee:Rt.i18n_extra_fee,totals_box_before_unit_price:Rt.totals_box_before_unit_price,totals_box_after_unit_price:Rt.totals_box_after_unit_price,totals_box_before_vat_options_totals_price:Rt.totals_box_before_vat_options_totals_price,totals_box_after_vat_options_totals_price:Rt.totals_box_after_vat_options_totals_price,totals_box_before_options_totals_price:Rt.totals_box_before_options_totals_price,totals_box_after_options_totals_price:Rt.totals_box_after_options_totals_price,totals_box_before_fee_totals_price:Rt.totals_box_before_fee_totals_price,totals_box_after_fee_totals_price:Rt.totals_box_after_fee_totals_price,totals_box_before_extra_fee_price:Rt.totals_box_before_extra_fee_price,totals_box_after_extra_fee_price:Rt.totals_box_after_extra_fee_price,totals_box_before_final_totals_price:Rt.totals_box_before_final_totals_price,totals_box_after_final_totals_price:Rt.totals_box_after_final_totals_price},Rt.customer_price_format&&(xt=Rt.customer_price_format_wrap_start,At=Rt.customer_price_format_wrap_end,Z=Rt.customer_price_format),B&&0<=x&&(b=Jt(x),m=Jt(A),Z&&(b=Z.replaceAll("__PRICE__",b).replaceAll("__CODE__",Rt.current_currency),Ct.data("is-on-sale")||(m=Z.replaceAll("__PRICE__",m).replaceAll("__CODE__",Rt.current_currency))),b=Lt.epoAPI.applyFilter("tcFilterFormattedFTotal",b,{epo:z,totalsHolder:Ct,event:t,total:x,_total:e,total_plus_fee:p,extraFee:C,cartQty:f}),m=Lt.epoAPI.applyFilter("tcFilterFormattedFOriginalTotal",m,{epo:z,totalsHolder:Ct,event:t,original_total:A,total:A,_total:e,total_plus_fee:p,extraFee:C,cartQty:f}),"yes"===Rt.tm_epo_enable_original_final_total&&x!==A?(E.formatted_options_total=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_sale_price,{price:m,sale_price:b,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At})),E._foriginal_total=m,E._ftotal=b):E.formatted_options_total=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_price,{price:b,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At})))),R&&0<=n&&(o=Jt(n),r="1"===H&&0<parseFloat(x)?parseFloat(c+C):parseFloat(parseFloat(w*f)+c),Z&&(o=Z.replaceAll("__PRICE__",o).replaceAll("__CODE__",Rt.current_currency),Ct.data("is-on-sale")||(r=Z.replaceAll("__PRICE__",r).replaceAll("__CODE__",Rt.current_currency))),o=Lt.epoAPI.applyFilter("tc_adjust_native_price",o,n),r=Jt(r=$t(r,Ct,void 0,0,void 0,void 0,!0)+parseFloat(I)+parseFloat(C)),r=Lt.epoAPI.applyFilter("tc_adjust_native_regular_price",r,n),"yes"===Rt.tm_epo_enable_original_final_total&&(Ct.data("is-on-sale")&&"1"!==H||r!==o)?E.formatted_final_total=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_sale_price,{price:r,sale_price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At})):E.formatted_final_total=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_price,{price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At}))),E._f_regular_price=r,E._fprice=o),E.formatted_unit_price=E.formatted_unit_price+Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.suffix))),E.formatted_options_total=E.formatted_options_total+Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.suffix))),E.formatted_final_total=E.formatted_final_total+Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.suffix))),E=Vt("formatted_fees_original_total","cart_fee_options_total_original_price",E,Ct),E=Vt("formatted_fees_total","cart_fee_options_total_price",E,Ct),E=Vt("formatted_final_original_total","product_total_original_price",E,Ct),E=Vt("formatted_final_total","product_total_price",E,Ct),E=Vt("formatted_options_original_total","options_original_total_price",E,Ct),E=Vt("formatted_options_total","options_total_price",E,Ct),E=Vt("formatted_unit_original_price","product_unit_original_price",E,Ct),E=Vt("formatted_unit_price","product_unit_price",E,Ct),void 0!==Lt.tcepo.showHideTotal&&void 0!==Lt.tcepo.showHideTotal[Bt]&&(k=Lt.tcepo.showHideTotal[Bt]),void 0!==(E=Lt.epoAPI.applyFilter("tc_adjust_tc_totals_ob",E,{epo_object:z,showTotal:k,epoHolder:It,totalsHolder:Ct,replace_suffixes:Vt,replace_suffixes_in_html:ee,tm_set_tax_price:$t,tm_set_price:Zt,tm_set_price_totals:Wt,product_total_price:n,product_price:v,qty:f})).showTotal&&(k=E.showTotal),z.tc_totals_ob=E,k=Lt.epoAPI.applyFilter("tcFinalTotalsBoxVisibility",k,{epo:z,alternativeCart:Pt,cart:h,main_product:zt,totalsHolder:Ct,this_epo_totals_container:Ht}),s=Lt.epoAPI.template.html(Mt.templateEngine.tc_final_totals,E),Ct.data("tm-html",s),Ct.data("tc_totals_ob",E),z.associated_connect&&1===z.associated_connect.length&&("1"===z.associated_connect.attr("data-no-price")?(et=tt=K=Y=0,at="",ae(kt,l.closest(".tmcp-field-wrap").find(".tc-price").not(Mt.associatedEpoSelector+" .tc-price"),Y,at,tt)):(Y=E.product_price+E.options_price_per_unit+E.cart_fee_options_total_price/E.qty,K=E.raw_product_price+E.raw_options_price_per_unit+E.raw_cart_fee_options_total_price/E.qty,tt=E.product_regular_price+E.options_original_price_per_unit+E.cart_fee_options_total_original_price/E.qty,et=E.raw_product_regular_price+E.raw_options_original_price_per_unit+E.raw_cart_fee_options_original_total_price/E.qty,at=Zt(Y,z.this_epo_totals_container,!1,l),ae(kt,l.closest(".tmcp-field-wrap").find(".tc-price").not(Mt.associatedEpoSelector+" .tc-price"),Y,at,tt),z.associated_connect.data("tm-quantity",E.qty),z.associated_connect.data("tm-quantity")&&(Y*=parseFloat(z.associated_connect.data("tm-quantity")),K*=parseFloat(z.associated_connect.data("tm-quantity")),tt*=parseFloat(z.associated_connect.data("tm-quantity")),et*=parseFloat(z.associated_connect.data("tm-quantity"))),at=Zt(Y,z.this_epo_totals_container,!1,l)),z.associated_connect.data("price_set",1),l.is(".tcenabled")&&l.data("associated_price_set",1),l.data("price_set",1),l.data("raw_price",K),l.data("raw_original_price",et),l.data("price",$t(Y,z.this_epo_totals_container,l)),l.data("original_price",$t(tt,z.this_epo_totals_container,l)),z.associated_connect.data("price-changed",1),setTimeout(function(){z.associated_connect&&t.noassociated||z.mainEpoObject.main_cart.trigger({type:"tm-epo-update",norules:2})},20)),Qt.trigger("tcEpoAfterCalculateTotals",{epo:z,alternativeCart:Pt,this_product_type:St,cart:h,bundleid:D,totalsObject:E,main_product:zt,per_product_pricing:ut,event:t}),u=Lt.epoAPI.applyFilter("hide_native_price",!0),0<f?("yes"===Rt.tm_epo_change_variation_price&&(!0===u&&"disable"!==Tt?Xt(h).hide():Xt(h).show()),!k||"disable"===Tt||"hideiftotaliszero"===Tt&&0===n||"hideifoptionsiszero"===Tt&&0===p?(Ct.html(s=""),Ct.data("tm-floating-box-data",[])):(Ct.html(s),Qt.trigger("tc-totals-container",{epo:E,totals_holder:Ct,data:{epo_object:z,tm_set_price:Zt,tm_set_price_totals:Wt,product_total_price:n,product_price:v,qty:f},tm_epo_js:Rt})),R&&0<=n&&("yes"===Rt.tm_epo_change_variation_price&&setTimeout(function(){J=Xt(h),_=(_=Ct.data("is-on-sale")?Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_sale_price,{price:r,sale_price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At,before_price_text:Rt.variation_price_before_price_text,after_price_text:Rt.variation_price_after_price_text})):Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_price,{price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At,before_price_text:Rt.variation_price_before_price_text,after_price_text:Rt.variation_price_after_price_text})),(_=Vt("formatted","raw",_={formatted:_+=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.main_suffix))),raw:E.product_total_price},Ct)).formatted),J.html(_).show()},310),"yes"===Rt.tm_epo_change_original_price)&&(Pt&&0!==zt.find(".cpf-bto-price").length||(z.associated_connect?d=z.main_product.find(Mt.associatedNativeProductPriceSelector):0===(d=z.main_product.find(Mt.nativeProductPriceSelector)).length&&(d=Lt(Mt.nativeProductPriceSelector)),void 0===(d=0===d.length&&zt.is(".tc-after-shop-loop")?zt.closest(".product").find(".price").not(".tc-after-shop-loop .price"):d).data("tc-original-html")&&d.data("tc-original-html",d.html()),0<n?(_=(_=Ct.data("is-on-sale")?Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_sale_price,{price:r,sale_price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At,before_price_text:Rt.product_price_before_price_text,after_price_text:Rt.product_price_after_price_text})):Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.tc_formatted_price,{price:o,customer_price_format_wrap_start:xt,customer_price_format_wrap_end:At,before_price_text:Rt.product_price_before_price_text,after_price_text:Rt.product_price_after_price_text})),(_=Vt("formatted","raw",_={formatted:_+=Lt.epoAPI.util.decodeHTML(Lt.epoAPI.util.decodeHTML(Lt.epoAPI.template.html(Mt.templateEngine.main_suffix))),raw:E.product_total_price},Ct)).formatted),d.html(_).show()):St&&"composite"!==St&&(z.associated_connect?(!z.variations_form.length||0<(_=z.this_epo_totals_container.data("variationIdElement")).length&&(_=parseFloat(_.val()))&&0!==_)&&d.html(Lt.epoAPI.util.decodeHTML(Rt.assoc_current_free_text)):d.html(Lt.epoAPI.util.decodeHTML(Rt.current_free_text)))),Qt.trigger("tcEpoMaybeChangePriceHtml",{epo:z,alternativeCart:Pt,this_product_type:St,cart:h,bundleid:D,totalsObject:E,main_product:zt,nativePrice:o})),Pt?Dt.trigger({type:"tm-epo-update",norules:1}):Ht.data("is_active",!0)):(z.associated_connect&&(d=z.main_product.find(Mt.associatedNativeProductPriceSelector)).html(d.data("tc-original-html")),Xt(h).toArray().forEach(function(t){t=Lt(t);t.data("tm-original-html")?t.html(t.data("tm-original-html")):t.data("tm-original-html",t.html())}),0===y&&"yes"===Rt.tm_epo_remove_free_price_label?Xt(h).hide():"yes"!==Rt.tm_epo_change_variation_price||!0===u&&"disable"!==Tt||Xt(h).show(),Ct.empty(),Pt&&Dt.trigger({type:"tm-epo-update",norules:1})),Dt.trigger("tm-epo-after-update",{container:Ft}),Qt.trigger("tc-epo-after-update",{epo:E,totals_holder:Ct,data:{epo_object:z,add_late_fields_prices:de,tm_set_price:Zt,tm_set_price_totals:Wt,product_total_price:n,replace_suffixes_in_html:ee,product_price:v,qty:f,bundleid:D,currentCart:qt},tm_epo_js:Rt})))}),"variable"!==St&&"variable-subscription"!==St||((e=It.find(".tm-epo-variation-section").first()).find(".tm-epo-reset-variation").off("click.cpfv").on("click.cpfv",function(){var t=Lt(this),e=Lt.epoAPI.dom.id(t.attr("data-tm-for-variation")),a=t.closest(".cpf-type-variations"),i=t.closest(".cpf-element").find(".tm-epo-variation-element"),o=t.closest(".cpf-element").find(".tmcp-field-wrap");i.prop("checked",!1),o.removeClass("tc-active"),v.find("[data-attribute_name='attribute_"+e+"']").val("").trigger("change"),v.find("[data-attribute_name='attribute_"+e+"']").trigger("focusin"),zt.find(".cpf-type-variations").not(a).toArray().forEach(function(t){v.find("[data-attribute_name='attribute_"+Lt.epoAPI.dom.id(Lt(t).find(".tm-epo-variation-element").first().attr("data-tm-for-variation"))+"']").trigger("focusin")}),t.trigger("blur"),v.trigger("woocommerce_update_variation_values_tmlogic")}),e.find("input.tm-epo-variation-element,input.tm-epo-variation-element + span").off("mouseup.cpfv").on("mouseup.cpfv",function(){var t=Lt(this);(t=t.is("span")?t.prev("input"):t).attr("disabled")&&v.find(".reset_variations").trigger("click"),t=Lt.epoAPI.dom.id(t.attr("data-tm-for-variation")),v.find("[data-attribute_name='attribute_"+t+"']").trigger("focusin")}),e.off("click."+g+".tmepo",".reset_variations, .tc-epo-element-variable-reset-variations").on("click."+g+".tmepo",".reset_variations, .tc-epo-element-variable-reset-variations",{_epoObject:kt},function(t){"yes"!==Rt.tm_epo_change_original_price||Pt&&0!==zt.find(".cpf-bto-price").length||(t=t.data._epoObject.associated_connect?t.data._epoObject.main_product.find(Mt.associatedNativeProductPriceSelector):Lt(Mt.nativeProductPriceSelector)).data("tc-original-html")&&t.html(t.data("tc-original-html")),v.find(".variations .reset_variations, .tc-epo-element-variable-reset-variations").first().trigger("click")}),e.find(".tm-epo-variation-element").off("change.cpfv tm_epo_variation_element_change").on("change.cpfv tm_epo_variation_element_change",function(t){var e,a=Lt(this),i=Lt.epoAPI.dom.id(a.attr("data-tm-for-variation")),o=a.val(),r=a.closest(".cpf-type-variations"),i=v.find("[data-attribute_name='attribute_"+i+"']");a.closest(".tm-epo-variation-section").is(".tm-hidden")||(t&&t.type&&"tm_epo_variation_element_change"===t.type||(e=!1,i.each(function(){if(this.value===o)return!(e=!0)}),e||i.trigger("focusin"),i.val(o).trigger("change")),o||i.trigger("focusin"),zt.find(".cpf-type-variations").not(r).toArray().forEach(function(t){v.find("#"+Lt.epoAPI.dom.id(Lt(t).find(".tm-epo-variation-element").first().attr("data-tm-for-variation"))).trigger("focusin")}),a.trigger("blur"),v.trigger("woocommerce_update_variation_values_tmlogic"))}).off("focusin.cpfv").on("focusin.cpfv",function(){var t=Lt(this);t.is("select")&&(t=Lt.epoAPI.dom.id(t.attr("data-tm-for-variation")),v.find("[data-attribute_name='attribute_"+t+"']").trigger("focusin"),v.trigger("woocommerce_update_variation_values_tmlogic"))}),v.off(h+"found_variation.tmepo tm_fix_stock",".single_variation_wrap").on(h+"found_variation.tmepo tm_fix_stock",".single_variation_wrap",function(){at(Lt(this),Ft)}),v.off(h+"found_variation.tmepo").on(h+"found_variation.tmepo",function(t,e){var a,i,o,r,c,n,l,d=Lt(this);Ct.data("is-on-sale",e.tc_is_on_sale),Ct.data("regular-price",tt(e.display_regular_price,Ct,e)),Qt.trigger("tm-epo-found-variation",{epo:kt,totalsHolder:Ct,totalsHolderContainer:Et,currentCart:qt,variationForm:d,variation:e}),i=(e={epoHolder:It,totalsHolder:Ct,totalsHolderContainer:Et,currentCart:qt,variationForm:d,variation:e}).epoHolder,o=e.totalsHolder,r=e.totalsHolderContainer,c=e.currentCart,n=e.variationForm,e=e.variation,l=o.data("variations"),o.data("current_variation",e),e&&"display_price"in e&&!o.data("tm-epo-is-woocs")?(a=e.display_price,o.data("priceIsWithDiscount","1"),o.removeData("tcprice")):l&&e&&e.variation_id&&void 0!==l[e.variation_id]?(a=l[e.variation_id],o.removeData("tcprice")):e&&Lt(e.price_html).find(".amount:last").length&&(a=(a=(a=(a=Lt(e.price_html).find(".amount:last").text()).replace(Rt.currency_format_thousand_sep,"")).replace(Rt.currency_format_decimal_sep,".")).replace(/[^0-9.]/g,""),a=parseFloat(a),o.removeData("tcprice")),a=tt(a,o,e),o.data("price",a),r.find(".cpf-product-price").val(a),setTimeout(function(){i.find("select.tm-epo-field").trigger("tm-select-change-html-all-math")},100),n.data("tm-styled-variations")||c.trigger({type:"tm-epo-update"}),at(d,Ft)}).off(h+"hide_variation.tmepo").on(h+"hide_variation.tmepo",{_epoObject:kt},function(t){"yes"!==Rt.tm_epo_change_original_price||Pt&&0!==zt.find(".cpf-bto-price").length||(t=t.data._epoObject.associated_connect?t.data._epoObject.main_product.find(Mt.associatedNativeProductPriceSelector):Lt(Mt.nativeProductPriceSelector)).data("tc-original-html")&&t.html(t.data("tc-original-html")),Ct.data("price",!1),Ct.removeData("tcprice"),qt.trigger({type:"tm-epo-update",norules:2})}).off(h+"check_variations.tmepo").on(h+"check_variations.tmepo",function(){var a=0,t=e.find(".reset_variations");v.find(".variations select, .tc-epo-variable-product-selector").toArray().forEach(function(t){var t=Lt(t),e=t.data("attribute_name")||t.attr("name"),t=t.val()||"";0<t.length&&a++,e,0}),0<a?"hidden"===t.css("visibility")&&t.css("visibility","visible").hide().fadeIn():t.css("visibility","hidden")}).trigger(h+"check_variations"),function(t,e,a,i){var o,r,c,n,l,d,s,p,m=t.epoEventId,_="input[name^='variation_id']",f=t.is_associated?"tc_variation_form.tmlogic":"wc_variation_form.tmlogic",u=t.is_associated?"tc_":"",g=t.variations_form,h=t.is_associated?g.find(".tc-epo-element-variations"):g.find(".variations"),v=t.is_associated?".tc-epo-element-variable-reset-variations":".reset_variations";if(g.attr("data-epo_id",t.epo_id),0<e.find("input.variation_id").length&&(_="input.variation_id"),i.find(".tm-epo-variation-element").length||i.data("tm-epo-variation-element")){if((o=i.find(".tm-epo-variation-section").first()).find(".cpf-type-variations").attr("data-epo_id",t.epo_id).attr("data-product_id",g.attr("data-product_id")),i.data("tm-epo-variation-element",o.find(".tm-epo-variation-element")),a&&"main"!==a&&!t.is_associated){if(h=(g=t.form).find('.composite_component[data-item_id="'+a+'"]').find(".variations"),g.attr("data-epo_id",t.epo_id),0===h.length)return;r=o.closest("li.tm-extra-product-options-field"),o.is(".tm-hidden")||h.hide(),h.after(o.addClass("tm-extra-product-options nopadding")),r.is(":empty")&&r.hide(),o.is(".section_popup")?o.wrap("<div class='tc-styled-variations tc-row'></div>"):(o.removeClass("tc-cell"),o.wrap("<div class='tc-styled-variations'></div>")),c=!1,e.off(f).on(f,function(){for(c=!0,g.on("click.tmlogic",".reset_variations",function(){o.find("select.tm-epo-variation-element").val("").children("option").prop("disabled",!1).show(),o.find(".tm-epo-variation-element").prop("disabled",!1).removeClass("tm-disabled").prop("checked",!1).closest("li").show(),Qt.trigger("tmlazy"),o.find(".tm-epo-variation-element").trigger("tm_trigger_product_image"),o.find("li").removeClass("tc-active tm-attribute-disabled").css("opacity","")}),e.off("woocommerce_update_variation_values_tmlogic").on("woocommerce_update_variation_values_tmlogic",function(){et(e,t)}),p=0;p<F.length;p+=1)n=F[p],"object"===typeof n&&(l="string"==typeof n.name||!1,d="string"==typeof n.selector||!1,s="function"==typeof n.func||!1,l)&&s&&("input[name='variation_id']"===d&&(d=_),n.selector?e.data("tm-styled-variations",1).off(u+n.name+p,d).on(u+n.name+p,d,n.func):e.data("tm-styled-variations",1).off(u+n.name+p).on(u+n.name+p,n.func));F=[],o.find(".tm-epo-variation-element:not(.tm-hidden .tm-epo-variation-element)").last().trigger("tm_epo_variation_element_change")}),Lt(function(){!1===c&&e.trigger(f)})}else{for(o.length&&(o.is(".tm-hidden")||h.hide(),r=o.closest("li.tm-extra-product-options-field"),h.after(o.addClass("tm-extra-product-options nopadding")),r.is(":empty")&&r.hide(),o.is(".section_popup")?o.wrap("<div class='tc-styled-variations tc-row'></div>"):(o.removeClass("tc-cell"),o.wrap("<div class='tc-styled-variations'></div>")),g.off("click.tmlogic",v).on("click.tmlogic",v,function(){o.find("select.tm-epo-variation-element").val("").children("option").prop("disabled",!1).show(),o.find(".tm-epo-variation-element").prop("disabled",!1).removeClass("tm-disabled").prop("checked",!1).closest("li").show(),Qt.trigger("tmlazy"),o.find(".tm-epo-variation-element").trigger("tm_trigger_product_image"),o.find("li").removeClass("tc-active tm-attribute-disabled").css("opacity","")})),g.off("woocommerce_update_variation_values_tmlogic").on("woocommerce_update_variation_values_tmlogic",function(){et(g,t)}),p=0;p<F.length;p+=1)n=F[p],"object"===typeof n&&(l="string"==typeof n.name||!1,d="string"==typeof n.selector||!1,s="function"==typeof n.func||!1,l)&&s&&("input[name='variation_id']"===d&&(d=_),n.selector?g.data("tm-styled-variations",1).off(u+n.name+p,d).on(u+n.name+p,d,n.func):g.data("tm-styled-variations",1).off(u+n.name+p).on(u+n.name+p,n.func));F=[],o.find(".tm-epo-variation-element:not(.tm-hidden .tm-epo-variation-element)").last().trigger("tm_epo_variation_element_change")}Lt.tcepo.formSubmitEvents[m][Lt.tcepo.formSubmitEvents[m].length]={trigger:function(){return!0},on_true:function(){return o.find(".tm-epo-variation-element").attr("disabled","disabled"),!0},on_false:function(){o.find(".tm-epo-variation-element").prop("disabled",!1)}},Lt(x.body).on("added_to_cart",function(){o.find(".tm-epo-variation-element").prop("disabled",!1)})}}(kt,Ft,u,It)),i.trigger("tm-select-change-html"),r.trigger("change.cpf",{init:1}),c.trigger("showhide.cpfcustom"),o.filter(":checked").trigger("cpfclearbutton"),Qt.on("tm-do-epo-update",function(){qt.trigger({type:"tm-epo-update"})}),Qt.trigger("tm-epo-init-events",{epo:{epo_id:b,form:kt.form,currentCart:qt,cart_container:Ft,epo_holder:It,totals_holder_container:Et,totals_holder:Ct,main_cart:Dt,main_epo_inside_form:Nt,product_id_selector:w,epo_id_selector:f,product_id:p,this_epo_container:m,this_totals_container:_,this_epo_totals_container:Ht}}),Qt.trigger("epoEventHandlers",{epo:kt,currentCart:qt,cartContainer:Ft,qtyElement:y,epoHolder:It,totalsHolderContainer:Et,totalsHolder:Ct,variationForm:v,variation_id_selector:t,main_epo_inside_form:Nt,this_product_type:St,get_price_excluding_tax:U,get_price_including_tax:Q}),"disable"!==Tt&&Et.addClass("tc-show"),Qt.trigger("epo_options_before_visible"),"yes"===Rt.tm_epo_progressive_display?setTimeout(function(){It.css("opacity",0).addClass("tc-show").animate({opacity:1},Mt.epoAnimationDelay,"easeOutExpo",function(){Qt.trigger("epo_options_visible"),Qt.trigger("tmlazy")})},Mt.epoDelay):(It.addClass("tc-show"),Qt.trigger("epo_options_visible"),Qt.trigger("tmlazy")),zt.addClass("tc-init")}function Dt(t){var e=t.variations_form,a=t.main_cart,i=t.this_epo_container,o=t.is_associated?"tc_variation_form.cpf":"wc_variation_form.cpf";e.off(o).on(o,function(){e.data("epo_loaded")||(G(t),Y(t),Qt.on("epoEventHandlers",function(){T(i),mt()}),Lt.tcepo.lateFieldsPrices[t.epoEventId]=[],zt(t),At(t),Ct(t),Qt.trigger("epo-after-init-in-timeout",{epo:t}),t.noEpoUpdate=!1,a.trigger("tm-epo-check-dpd"),a.trigger({type:"tm-epo-update",rules:"init"}),e.data("epo_loaded",!0))}),setTimeout(function(){e.trigger(o)},P.tcVariationDelayCheck||2e3),y&&e.trigger(o),Qt.trigger("epo-after-init",{epo:t})}function Ht(t,e,a,i,o){var r=Lt.extend(!0,{},t),c=i.attr("data-product-id"),n=i.attr("data-epo-id"),l=".tm-product-id-"+c,d="[data-epo-id='"+n+"']",s="p"+c+"e"+n,p=Lt(Mt.epoSelector+l+d),m=Lt(".tc-totals-form"+l+d),_=Lt(".tc-epo-totals"+l+d);t.isManual=!0,Lt.tcepo.formSubmitEvents[s]=[],Lt.tcepo.errorObject[s]=!1,Lt.tcepo.initialActivation[s]=!1,t.product_id=c,t.product_id_selector=l,t.epo_id=n,t.epo_id_selector=d,t.epoEventId=s,t.noEpoUpdate=!0,t.thisForm=e,t.this_epo_container=p,t.this_totals_container=m,t.this_epo_totals_container=_,mt(),o.find(".tm-collapse").tmtoggle(),o.find(".tm-section-link").tmsectionpoplink(),L(e),qt(e),St(),bt(e,t),_t(e),j(i),wt(i.find(".tc-lightbox-image").not(".tm-extra-product-options-variations .radio-image")),G(t),Y(t),T(i),Lt.tcToolTip(e.find(".tm-tooltip")),zt(t,e,a),t.noEpoUpdate=!1,a.trigger({type:"tm-epo-update",norules:2}),setTimeout(function(){t.main_cart.trigger({type:"tm-epo-update",epoObject:r,norules:1})},200),at(a,e)}function h(t,e,a,i,o,r,c){var n,l,d,s,p,m=!1,_=!1,f=!1,u=void 0!==a,g=!1,h=0<Lt(".variation_form_section .variations-table").length,v=!1;if((t=Lt(t)).is(".tc-init")&&!c)return!0;if(C=e?t:Lt(P),Qt.trigger("tm-epo-init-start"),u||t.is(".product")&&(g=!0,u=I.find(Mt.epoSelector).length),u||"no"!==Rt.tm_epo_enable_final_total_box_all||t.is(".tm-no-options-composite")){g&&(Qt.trigger("tm-epo-init-no-options"),!t.is(".product")||t.is(".tm-no-options-pxq")||t.is(".tm-no-options-composite")||(t=I)),a||(g=t.find(Mt.addToCartSelector).last(),a=(a=0<g.length?g.val():(g=Lt(".tc-totals-form.tm-totals-form-main")).attr("data-product-id"))||""),i||(i=parseInt(t.find("input.tm-epo-counter").last().val(),10),Number.isFinite(i))||(i=""),g=".tm-product-id-"+a,y="[data-epo-id='"+i+"']",l=Lt(Mt.epoSelector+g+y),x=Lt(".tc-totals-form"+g+y),d=Lt(".tc-epo-totals"+g+y),p=t.find(".variations_form").not(".composite_component .variations_form").first(),n="p"+a+"e"+i,p&&p.attr("data-product_id")&&p.attr("data-product_id")!==a&&(p=t.find(".variations_form[data-product_id='"+a+"']")),0===(m=ot(t,t,"form",a)).length&&(t.is(".tc-shortcode-wrap")?m=ot(x,x,".tc-totals-form",a):t.is(".tc-epo-element-product-container")&&(0===(m=t.find(Mt.associatedEpoCart)).length&&0===(m=l.parent(Mt.associatedEpoSelector)).length&&(m=t.find(".tc-epo-element-product-container-right")),v=!0)),v&&0===p.length&&t.is(".variations_form")&&(p=t),Lt.tcepo.formSubmitEvents[n]=[],Lt.tcepo.errorObject[n]=!1,Lt.tcepo.initialActivation[n]=!1,0<m.find(Mt.epoSelector).length&&(_=!0),(f=0<m.find(".tc-totals-form").length?!0:f)||(Lt.tcepo.formSubmitEvents[n][Lt.tcepo.formSubmitEvents[n].length]={trigger:function(){return!0},on_true:function(){var t=Lt(".tc-totals-form.tm-product-id-"+a+"[data-epo-id='"+i+"']").tcClone(),e=Lt('<div class="tm-hidden tm-formepo-normal"></div>');return m.find(".tm-formepo-normal").remove(),e.append(t),m.append(e),!0},on_false:function(){setTimeout(function(){Lt(".tm-formepo-normal").remove()},100)}}),_||(Lt.tcepo.formSubmitEvents[n][Lt.tcepo.formSubmitEvents[n].length]={trigger:function(){return!0},on_true:function(){var t=Lt(Mt.epoSelector+".tm-product-id-"+a+"[data-epo-id='"+i+"']").tcClone().addClass("formepo"),e=Lt('<div class="tm-hidden tm-formepo"></div>');return m.find(".tm-formepo").remove(),e.append(t),m.append(e),!0},on_false:function(){setTimeout(function(){Lt(".tm-formepo").remove()},100)}}),s={main_product:t,main_cart:m,epo_id:i,form:it(t),main_epo_inside_form:_,product_id_selector:g,epo_id_selector:y,product_id:a,this_epo_container:l,this_totals_container:x,this_epo_totals_container:d,qtySelector:Mt.qtySelector,manualInitEPO:Ht,epoEventId:n,variations_form:p,has_epo:u,is_quickview:e,is_associated:v,is_epo_shortcode:l.is(".tc-shortcode"),mainEpoObject:r,associated_connect:o,noEpoUpdate:!0},Lt(s.form).data("epo_object",s),l.data("epo_object",s),m.data("product_id",a).data("epo_id",i).data("product_id_selector",g).data("epo_id_selector",y),_=(f=s).this_epo_container,x=f.main_product,f=f.epoEventId,u=_.find(".tm-limit"),r=_.find(".tm-exactlimit"),o=_.find(".tm-minimumlimit"),_.on("change.cpflimit","input.tm-epo-field.tmcp-checkbox",function(){var t=Lt(this);rt(t,!0),ct(t,!0)}),u.length&&nt(u,x,f),r.length&&lt(r,x,f),o.length&&dt(o,f),y=(g=s).epoEventId,b=g.this_epo_container,"yes"===Rt.tm_epo_upload_popup&&(Lt.tcepo.formSubmitEvents[y][Lt.tcepo.formSubmitEvents[y].length]={trigger:function(){return!0},on_true:function(){var t,e,a=b.data("num_uploads");return a&&Object.keys(a).length&&(t=Lt.tcFloatBox({fps:1,ismodal:!0,width:"50%",height:"300px",classname:"flasho tc-wrapper",data:Lt.epoAPI.template.html(Mt.templateEngine.tc_upload_messages,{files:a,title:Rt.i18n_uploading_files,message:Rt.i18n_uploading_message})}),e=function(){t.destroy(),E.off("ajaxSuccess",e)},E.on("ajaxSuccess",e)),!0},on_false:function(){return!0}}),L(l),qt(l),St(),bt(l,s),E.on("click.cpfurl change.cpfurl tmredirect",".tc-url-container .tmcp-radio, .tc-url-container .tmcp-radio+label",function(t){var e=Lt(this).attr("data-url");e&&P.location!==e&&(t.preventDefault(),P.location=e)}),E.on("change.cpfurl tmredirect",".tc-url-container .tmcp-select",function(t){var e=Lt(this).children("option:selected").attr("data-url");e&&P.location!==e&&(t.preventDefault(),P.location=e)}),Lt.tcToolTip(l.find(".tm-tooltip")),l.find(".tm-collapse").tmtoggle(),l.find(".tm-section-link").tmsectionpoplink(),c&&l.addClass("reactivate"),0<p.length?(c&&p.data("epo_loaded",!1),d.data("price",!1),(h?function t(e){var a=requestAnimationFrame(function(){t(e)}),i=e.variations_form,o=i.data("bound"),r=e.is_associated?"tc_variation_form.cpf":"wc_variation_form.cpf";o&&(cancelAnimationFrame(a),Dt(e),i.trigger(r))}:Dt)(s)):(setTimeout(function(){G(s),Y(s),Qt.on("epoEventHandlers",function(){T(l),mt()}),Lt.tcepo.lateFieldsPrices[n]=[],zt(s),At(s),Ct(s),Qt.trigger("epo-after-init-in-timeout",{epo:s}),m.trigger("tm-epo-check-dpd"),s.noEpoUpdate=!1,m.trigger({type:"tm-epo-update",rules:"init"})},20),Qt.trigger("epo-after-init",{epo:s})),_t(l),j(l),wt(l.find(".tc-lightbox-image").not(".tm-extra-product-options-variations .radio-image"));var y,b,w,x,A,k,_=s,F=_.this_epo_container;if(_=Rt.theme_name){switch(_=_.toLowerCase(),A=F.find("select"),_){case"flatsome":case"flatsome-child":case"flatsome child":A.wrap('<div class="custom select-wrapper"/>');break;case"avada":case"avada-child":case"avada child":A.wrap('<div class="avada-select-parent tm-select-parent"></div>'),Lt('<div class="select-arrow">&#xe61f;</div>').appendTo(F.find(".tm-select-parent")),P.calc_select_arrow_dimensions?(P.calc_select_arrow_dimensions(),Qt.on("tmsectionpoplink cpflogicdone",function(){P.calc_select_arrow_dimensions()})):P.calcSelectArrowDimensions&&(P.calcSelectArrowDimensions(),Qt.on("tmsectionpoplink cpflogicdone",function(){P.calcSelectArrowDimensions()}));break;case"bazar":case"bazar-child":case"bazar child":A.wrap('<div class="tm-select-wrapper select-wrapper"/>');break;case"blaszok":case"blaszok-child":case"blaszok child":k=function(){setTimeout(function(){Lt(".tm-extra-product-options select").not(".hasCustomSelect").filter(":visible").toArray().forEach(function(t){(t=Lt(t)).is(".mpcthSelect")||(t.width(t.outerWidth()),t.customSelect({customClass:"mpcthSelect"}))})},100)},Qt.on("cpflogicrun",function(){k()}),Qt.on("epo_options_visible",function(){k()});break;case"handmade":case"handmade child theme":Lt(".tm-owl-slider.tcowl-carousel").addClass("manual")}Qt.trigger("tm-theme-specific-actions",{epo:{theme_name:_,all_epo_selects:A}})}return E.off("click.cpf",".quantity:not(.buttons_added) .minus, .quantity:not(.buttons_added) .plus").on("click.cpf",".quantity:not(.buttons_added) .minus, .quantity:not(.buttons_added) .plus",function(){Lt(this).closest(".quantity").find(Mt.qtySelector).trigger("change.cpf")}),u=s,Qt.trigger("tm-epo-compatibility",{epo:u}),v||(r=d,x=m,Lt.tcFloatingTotalsBox(r,e,x),o=(w=s).form,f=w.epoEventId,Qt.trigger("tm-from-submit",{epo:w,functions:{tm_apply_validation:Ot,apply_submit_events:jt}}),!Ot(w)&&Lt.tcepo.formSubmitEvents[f].length&&o.on("submit",function(){jt(w)}),Qt.on("tc_apply_validation",function(){return Ot(w)}),ie(t,s=oe(s,n,s))),Qt.trigger("tm-epo-init-end",{epo:s,replace_suffixes_in_html:ee}),s}Qt.trigger("tm-epo-init-end-no-options")}function Bt(){var a,t;"no"===Rt.tm_epo_no_lazy_load&&Lt.extend(Lt.lazyLoadXT,{autoInit:!1,selector:"img.tmlazy",srcAttr:"data-original",visibleOnly:!1,updateEvent:Lt.lazyLoadXT.updateEvent+" tmlazy"}),0<(a=Lt(".tm-no-options-pxq, .tm-no-options-composite")).length&&(a.addClass("initializing"),a.toArray().forEach(function(t){var e;1<(e=(t=Lt(t)).find("input.tm-epo-counter")).length?e.toArray().forEach(function(t){var t=Lt(t),e=t.closest(".cart").parent();(e=e.is("form")?e.parent():e).is(".initializing")||h(e,!1,void 0,parseInt(t.val(),10))}):h(t,!1),a.removeClass("initializing")})),setTimeout(function(){try{0<(t=Lt(Mt.epoSelector).not(Mt.associatedEpoSelector+" "+Mt.epoSelector+", .tm-no-options-pxq, .tm-no-options-composite, .wc-product-table "+Mt.epoSelector)).length&&(a.addClass("initializing"),t.toArray().forEach(function(t){var t=Lt(t),a=t.attr("data-product-id"),e=t.attr("data-epo-id"),i=!1,o=!1,r=t.closest(".tc-after-shop-loop.tm-has-options");(0!==r.length||0===(r=Lt(Mt.tcAddToCartSelector+"[data-epo-id='"+e+"'][value='"+a+"']").closest("form,.cart").first().parent()).length&&0===(r=Lt(Mt.addToCartSelector+"[value='"+a+"']").closest("form,.cart").first().parent()).length&&0===(r=t.closest("form,.cart").first().parent(".tm-has-options")).length&&(t.is(".tc-shortcode")&&(r=t.wrap('<div class="tc-shortcode-wrap tc-wrap-'+e+'"></div>'),r=t.parent()),0<r.length))&&(o=!0),0<r.length&&(o&&(i=!0,t.closest("form,.cart").first().append(Lt('<input name="add-to-cart" value="'+a+'" type="hidden">')),t.closest("form,.cart").first().append(Lt('<input type="hidden" value="" class="variation_id" name="variation_id">'))),1<(o=(r=r.is("form")?r.parent():r).find("input.tm-epo-counter")).length?o.toArray().forEach(function(t){var t=Lt(t),e=t.closest(".cart").parent();(e=e.is("form")?e.parent():e).is(".initializing")||h(e,i,a,parseInt(t.val(),10))}):h(r,i,a,e))}),a.removeClass("initializing"))}catch(t){P.console.log(t),b=t}},1)}function Nt(t){var e,a,i,o,r,c;void 0===(t=void 0===(t=(f=t).attr("data-product_id"))?f.val():t)||!(c=(c=f.closest(".cart").find(".tm-epo-counter").val())||f.attr("data-epo-id"))||1!==f.closest(".tm-has-options").length&&void 0===f.attr("data-epo-id")||(o={},1===(e=1<(e=Lt(Mt.epoSelector+".tm-product-id-"+t+'[data-epo-id="'+c+'"]')).length?e.filter(".formepo")?e.filter(".formepo"):e.first():e).length&&(r=(c=Lt(".tc-totals-form.tm-product-id-"+t+'[data-epo-id="'+c+'"]')).find(".cpf-product-price").val(),a=c.find(".cpf-dynamic-product-price").val(),i=c.find(".cpf-override-product-price").val(),c=c.find(".tc_form_prefix").val(),o=Lt.extend(o,{tcajax:1,tcaddtocart:t,cpf_product_price:r,dynamic_product_price:a,override_product_price:i}),c)&&(o.tc_form_prefix=c),r=f.data(),Rt.ajaxbuttondata=Lt.epoAPI.util.deepCopyArray(r),(Rt.ajaxbutton=f).removeData(),f.data(Lt.extend(r,e.tcSerializeObject(),o)),Rt.ajaxdata={epos:e,_pid:t,data:r})}function t(){Lt(".tc-associated-table-product td.product-name").toArray().forEach(function(t){0===(t=Lt(t)).find(".product-name").length&&t.wrapInner(Lt('<div class="tc-associated-table-product-indent"></div>'))})}Rt&&e&&(Lt.fn.val=function(){var t=a.apply(this,arguments);return 0<arguments.length&&Lt(this).is(".input-text.qty")&&Lt(this).trigger("change.cpf"),t},"no"===Rt.tm_epo_no_lazy_load&&Lt.lazyLoadXT&&Lt.extend(Lt.lazyLoadXT,{autoInit:!1,updateEvent:Lt.lazyLoadXT.updateEvent+" tmlazy"}),Mt.localInputDecimalSeparator=""===Rt.tm_epo_global_input_decimal_separator?Rt.currency_format_decimal_sep:Lt.epoAPI.locale.getSystemDecimalSeparator(),Mt.localDecimalSeparator=""===Rt.tm_epo_global_displayed_decimal_separator?Rt.currency_format_decimal_sep:Lt.epoAPI.locale.getSystemDecimalSeparator(),Mt.localThousandSeparator=""===Rt.tm_epo_global_displayed_decimal_separator?Rt.currency_format_thousand_sep:Lt.epoAPI.locale.getSystemDecimalSeparator(),Mt.epoDelay=Rt.tm_epo_start_animation_delay||P.tc_epo_delay||500,Mt.epoAnimationDelay=Rt.tm_epo_animation_delay?Rt.tm_epo_start_animation_delay:P.tc_epo_animation_delay||500,Mt.getElementFromFieldCache=[],Mt.epoSelector=".tc-extra-product-options",Mt.associatedEpoSelector=".tc-extra-product-options-inline",Mt.associatedEpoCart=".tc-epo-element-product-container-cart",Mt.addToCartSelector="input[name='add-to-cart']",Mt.tcAddToCartSelector="input.tc-add-to-cart",Mt.qtySelector="input.qty,input[name='quantity'],select.qty,.drop-down-button #qty,.plus-minus-button #qty,.slider-input #amount",Mt.associateQtySelector="input.tm-qty-alt",Mt.addToCartButtonSelector=".add_to_cart_button, .single_add_to_cart_button",Mt.compositeSelector=".bto_item,.component",Mt.nativeProductPriceSelector=Rt.tm_epo_global_product_price_selector||".woocommerce .product p.price, .wc-block-components-product-price",Mt.associatedNativeProductPriceSelector=".product-price .associated-price",Mt.templateEngine=Lt.epoAPI.applyFilter("tc_adjust_templateEngine",{plain_price:e.template("tc-plain-price"),suffix:e.template("tc-suffix"),main_suffix:e.template("tc-main-suffix"),price:e.template("tc-price"),price_m:e.template("tc-price-m"),sale_price:e.template("tc-sale-price"),sale_price_m10:e.template("tc-sale-price-m10"),sale_price_m01:e.template("tc-sale-price-m01"),sale_price_m11:e.template("tc-sale-price-m11"),tc_chars_remanining:e.template("tc-chars-remanining"),tc_final_totals:e.template("tc-final-totals"),tc_floating_box:e.template("tc-floating-box"),tc_floating_box_nks:e.template("tc-floating-box-nks"),tc_formatted_price:e.template("tc-formatted-price"),tc_formatted_sale_price:e.template("tc-formatted-sale-price"),tc_lightbox:e.template("tc-lightbox"),tc_lightbox_zoom:e.template("tc-lightbox-zoom"),tc_section_pop_link:e.template("tc-section-pop-link"),tc_upload_messages:e.template("tc-upload-messages")}),Lt.tcAPI=function(){return Mt},Lt.tcAPIGet=function(t){return Mt[t]},Lt.tcAPISet=function(t,e){Mt[t]=e},Lt.tc_validator&&(Lt.extend(Lt.tc_validator.messages,{required:Rt.tm_epo_global_validator_messages.required,email:Rt.tm_epo_global_validator_messages.email,url:Rt.tm_epo_global_validator_messages.url,number:Rt.tm_epo_global_validator_messages.number,digits:Rt.tm_epo_global_validator_messages.digits,maxlengthsingle:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.maxlengthsingle),maxlength:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.maxlength),minlengthsingle:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.minlengthsingle),minlength:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.minlength),max:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.max),min:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.min),step:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.step),lettersonly:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.lettersonly),lettersspaceonly:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.lettersspaceonly),alphanumeric:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.alphanumeric),alphanumericunicode:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.alphanumericunicode),alphanumericunicodespace:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.alphanumericunicodespace),repeaterminrows:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.repeaterminrows),repeatermaxrows:Lt.tc_validator.format(Rt.tm_epo_global_validator_messages.repeatermaxrows)}),Lt.tc_validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^[a-zA-Z0-9.-]+$/i.test(t)},Lt.tc_validator.messages.alphanumeric),Lt.tc_validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},Lt.tc_validator.messages.lettersonly),Lt.tc_validator.addMethod("lettersspaceonly",function(t,e){return this.optional(e)||/^[a-z,\u0020]+$/i.test(t)},Lt.tc_validator.messages.lettersspaceonly),Lt.tc_validator.addMethod("alphanumericunicode",function(t,e){return this.optional(e)||/^[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0148\u014A-\u017F\u0180-\u01BF\u01C4-\u024F\u1E02-\u1EF3\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf\u3400-\u4dbf\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF\u10E60-\u10E7F\u1EC70-\u1ECBF\u1ED00-\u1ED4F\u1EE00-\u1EEFF\u0530-\u1058F]+$/i.test(t)},Lt.tc_validator.messages.alphanumericunicode),Lt.tc_validator.addMethod("alphanumericunicodespace",function(t,e){return this.optional(e)||/^[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0148\u014A-\u017F\u0180-\u01BF\u01C4-\u024F\u1E02-\u1EF3\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf\u3400-\u4dbf\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF\u10E60-\u10E7F\u1EC70-\u1ECBF\u1ED00-\u1ED4F\u1EE00-\u1EEFF\u0530-\u1058F,\u0020]+$/i.test(t)},Lt.tc_validator.messages.alphanumericunicodespace),Lt.tc_validator.addMethod("repeaterminrows",function(t,e,a){return Lt.epoAPI.math.toInt(Lt(e).closest(".tc-element-inner-wrap").find(".tc-repeater-element").length)>=Lt.epoAPI.math.toInt(a)},Lt.tc_validator.messages.repeaterminrows),Lt.tc_validator.addMethod("repeatermaxrows",function(t,e,a){return Lt.epoAPI.math.toInt(Lt(e).closest(".tc-element-inner-wrap").find(".tc-repeater-element").length)<=Lt.epoAPI.math.toInt(a)},Lt.tc_validator.messages.repeatermaxrows),Lt.tc_validator.addMethod("product_element_radio_qty",function(t,e){return 0<Lt(e).closest(".tm-element-ul-product").find("input.tc-epo-field-product.tmcp-radio:checked").closest(".tc-epo-element-product-holder").find(".tm-qty").first().val()},Lt.tc_validator.messages.required),Lt.tc_validator.addMethod("product_element_select_qty",function(t,e){return 0<Lt(e).closest(".tm-element-ul-product").find("select.tc-epo-field-product.tmcp-select").closest(".tc-epo-element-product-holder").find(".tm-qty").first().val()},Lt.tc_validator.messages.required)),Lt.epoAPI.util.unformat=function(t){var t=Lt.epoAPI.math.unformat(t,Mt.localInputDecimalSeparator),e=parseFloat(t);return Number.isFinite(e)?e:t},Lt.tmType||(Lt.tmType=function(t){return Object.prototype.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}),Lt.is_on_screen||(Lt.fn.is_on_screen=function(){var t=Lt(P),e=Lt.epoAPI.dom.scroll(),a=this.offset(),e={top:e.top,left:e.left};return e.right=e.left+t.width(),e.bottom=e.top+t.height(),a.right=a.left+this.outerWidth(),a.bottom=a.top+this.outerHeight(),!(e.right<a.left||e.left>a.right||e.bottom<a.top||e.top>a.bottom)}),Lt().tmtoggle||(Lt.fn.tmtoggle=function(){var t=this,e=!1,c=0;if(0!==t.length)return void 0===P.tc_accordion_offset&&(P.tc_accordion_offset=-100),t.toArray().forEach(function(i){var t,o,r;(i=Lt(i)).data("tm-toggle-init")||(i.data("tm-toggle-init",1),t=i.find(".tm-toggle"),o=i.find(".tm-collapse-wrap"),r=(0<(r=Lt(".tm-collapse.tmaccordion")).closest(".tc-epo-element-product-holder").length?r.closest(".tc-epo-element-product-holder").find(".tm-collapse.tmaccordion"):Lt(".tm-collapse.tmaccordion").not(".tc-epo-element-product-holder .tm-collapse.tmaccordion")).find(".tm-toggle"),0!==t.length&&0!==o.length&&(o.is(".closed")?(Lt(o).removeClass("closed open").addClass("closed").hide(),Lt(t).find(".tm-arrow").removeClass("tcfa-angle-down tcfa-angle-up").addClass("tcfa-angle-down"),Lt(t).removeClass("toggle-header-open toggle-header-closed").addClass("toggle-header-closed"),Lt(t).attr("aria-expanded",!1)):(Lt(o).removeClass("closed open").addClass("open").show(),Lt(t).find(".tm-arrow").removeClass("tcfa-angle-down tcfa-angle-up").addClass("tcfa-angle-up"),Lt(t).removeClass("toggle-header-open toggle-header-closed").addClass("toggle-header-open"),Lt(t).attr("aria-expanded",!0),e=!0),t.toArray().forEach(function(a){(a=Lt(a)).on("closewrap.tmtoggle",function(){i.is(".tmaccordion")&&Lt(o).is(".closed")||(Lt(o).removeClass("closed open").addClass("closed"),Lt(this).find(".tm-arrow").removeClass("tcfa-angle-down tcfa-angle-up").addClass("tcfa-angle-down"),Lt(this).removeClass("toggle-header-open toggle-header-closed").addClass("toggle-header-closed"),Lt(this).attr("aria-expanded",!1),Lt(o).removeClass("tm-animated fadein"),i.is(".tmaccordion"),Lt(o).animate({height:"toggle"},100,function(){Lt(o).hide()}),Qt.trigger("tmlazy"))}),a.on("openwrap.tmtoggle",function(t,e){i.is(".tmaccordion")&&Lt(r).not(Lt(this)).trigger("closewrap.tmtoggle"),Lt(o).removeClass("closed open").addClass("open"),Lt(this).find(".tm-arrow").removeClass("tcfa-angle-down tcfa-angle-up").addClass("tcfa-angle-up"),Lt(this).removeClass("toggle-header-open toggle-header-closed").addClass("toggle-header-open"),Lt(this).attr("aria-expanded",!0),Lt(o).show().removeClass("tm-animated fadein").addClass("tm-animated fadein"),setTimeout(function(){Qt.trigger("tmlazy")},200),setTimeout(function(){void 0===e&&c&&i.is(".tmaccordion")&&!i.is_on_screen()&&Qt.tcScrollTo(a,10,P.tc_accordion_offset)},110)}),a.on("click.tmtoggle keydown.tmtoggle",function(t){"keydown"===t.type&&"Enter"!==t.key||(t.preventDefault(),Lt(o).is(".closed")?Lt(this).trigger("openwrap.tmtoggle"):Lt(this).trigger("closewrap.tmtoggle"))}),a.find(".tm-qty").closest(".cpf-element").find(".tm-epo-field").on("change.cpf",function(){a.trigger("openwrap.tmtoggle")})})))}),void 0===P.tc_accordion_closed_on_page_load&&!e&&0<t.filter(".tmaccordion").length&&t.filter(".tmaccordion").first().find(".tm-toggle").trigger("openwrap.tmtoggle",{nomove:1}),c=1,t}),Lt().tmpoplink||(Lt.fn.tmpoplink=function(t){var o,r={classname:"flasho tc-wrapper cart-popup"};if(0!==this.length)return t&&(r=Lt.extend({},r,t)),o=function(t){return Lt.epoAPI.template.html(e.template("tc-cart-options-popup"),{title:t.title,id:t.id,html:t.html,close:Rt.i18n_close})},this.toArray().forEach(function(t){var e,a,i;(t=Lt(t)).is(".tc-poplink")||(t.addClass("tc-poplink"),a=t.attr("href"),e=t.attr("data-title"),a=Lt(a).html(),e=e||Rt.i18n_addition_options,i=o({id:"tc-floatbox-content",html:a,title:e}),t.on("click.tmpoplink",function(t){Lt.tcFloatBox({fps:1,ismodal:!1,width:"80%",height:"80%",classname:r.classname,data:i}),t.preventDefault()}))})}),(o=function(t,e,a){return this.this_epo_totals_container=t,this.is_quickview=e,this.main_cart=a,!(e||!Rt.floating_totals_box||"disable"===Rt.floating_totals_box||!a||!t.length)&&(this.init(),this)}).prototype={constructor:o,onUpdate:function(){var t,e,a,i,o,r,c,n=this.this_epo_totals_container.data("tm-html"),l=this.this_epo_totals_container.data("tm-floating-box-data"),d=[];if(l&&l.length)for(e=l.length,a=0;a<e;a++){if((i=l[a]).title=i.title?String(i.title):"&nbsp;",i.value=i.value?String(i.value):"&nbsp;","&nbsp;"!==i.title){for((o=x.createElement("div")).innerHTML=i.title,c=o.querySelectorAll("span"),r=0;r<c.length;r++)c[r].remove();i.title=o.innerHTML}this.is_nks&&(""!==i.label_show&&(i.title=""),""!==i.value_show)&&(i.value=""),"yes"===Rt.tm_epo_auto_hide_price_if_zero&&!0===Lt.epoAPI.util.isEmpty(i.price)?i.price="":i.price=Zt(i.price,this.this_epo_totals_container,!0),d.push({label_show:i.label_show,value_show:i.value_show,title:i.title,value:i.value,quantity:i.quantity,price:i.price})}(!n||""!==n||l&&l.length)&&(n&&""!==n||this.is_nks)||(n="",this.floatingBox.hide()),n=Lt.epoAPI.template.html(this.engineTemplate,{html_before:Rt.floating_totals_box_html_before,html_after:Rt.floating_totals_box_html_after,option_label:Rt.i18n_option_label,option_value:Rt.i18n_option_value,option_qty:Rt.i18n_option_qty,option_price:Rt.i18n_option_price,values:d,totals:n}),this.floatingBox.html(n),this.onUpdateScroll(),"yes"!==Rt.tm_epo_no_lazy_load&&(this.floatingBox.addClass("lazyxt"),(n=this.floatingBox.find("img.tmlazy")).lazyLoadXT(),n.on("lazyshow",function(){Qt.trigger("lazyLoadXToncomplete")})),"yes"===Rt.floating_totals_box_add_button&&(t=this.main_cart.find(Mt.addToCartButtonSelector).first()).tcClone().addClass("tc-add-to-cart-button").on("click",function(){t.trigger("click")}).appendTo(this.floatingBox)},onUpdateScroll:function(){"always"===Rt.floating_totals_box_visibility?this.floatingBox.is(":empty")&&!this.is_nks_alt?this.floatingBox.hide():this.floatingBox.show():("hideafterscroll"===Rt.floating_totals_box_visibility&&(Qt.scrollTop()>Lt.epoAPI.math.toFloat(Rt.floating_totals_box_pixels)&&!this.is_nks_alt?this.floatingBox.is(":hidden")||(!1===this.is_nks?this.floatingBox.fadeOut():this.floatingBox.hide()):!this.floatingBox.is(":hidden")&&!this.is_nks_alt||this.floatingBox.is(":empty")&&!this.is_nks_alt||(!1===this.is_nks?this.floatingBox.fadeIn():this.floatingBox.show())),"afterscroll"===Rt.floating_totals_box_visibility&&(Qt.scrollTop()>Lt.epoAPI.math.toFloat(Rt.floating_totals_box_pixels)||this.is_nks_alt?this.floatingBox.is(":hidden")&&!this.floatingBox.is(":empty")||this.is_nks_alt?!1===this.is_nks?this.floatingBox.fadeIn():this.floatingBox.show():!this.floatingBox.is(":hidden")&&this.floatingBox.is(":empty")&&(!1===this.is_nks?this.floatingBox.fadeOut():this.floatingBox.hide()):this.floatingBox.is(":hidden")||(!1===this.is_nks?this.floatingBox.fadeOut():this.floatingBox.hide())))},addEvents:function(){this.onUpdate(),this.main_cart.on("tm-epo-after-update",this.onUpdate.bind(this)),this.main_cart.on("tm-epo-short-update",this.onUpdate.bind(this)),!1===this.is_nks&&Qt.on("scroll",this.onUpdateScroll.bind(this))},init:function(){this.floatingBox=Lt('<div class="tm-floating-box '+Rt.floating_totals_box+'"></div>'),this.nks_selector=Lt(".tm-floating-box-nks").first(),this.alt_selector=Lt(".tm-floating-box-alt").first(),this.engineTemplate=Mt.templateEngine.tc_floating_box,this.is_nks=!1,this.is_nks_alt=!1,0<this.nks_selector.length?(this.is_nks=!0,this.floatingBox.removeClass("top left right bottom").appendTo(this.nks_selector).show()):(0<this.alt_selector.length?this.floatingBox.removeClass("top left right bottom").appendTo(this.alt_selector):this.floatingBox.appendTo("body")).hide(),(0<this.nks_selector.length||0<this.alt_selector.length)&&(this.is_nks_alt=!0,this.engineTemplate=Mt.templateEngine.tc_floating_box_nks),this.addEvents()}},Lt.tcFloatingTotalsBox=function(t,e,a){var i=!1;return t&&t.length&&void 0===t.data("tcfloatingtotalsbox")&&(i=new o(t,e,a),t.data("tcfloatingtotalsbox",i)),i},Lt.tc_product_image={},Lt.tc_product_image_store={},Lt.tc_replace_object_values=function(a,i){return Object.keys(a).forEach(function(e){Object.keys(a[e]).forEach(function(t){void 0!==i[e]&&void 0!==i[e][t]&&Object.prototype.hasOwnProperty.call(i[e],t)&&(a[e][t]=i[e][t])})}),a},Lt.tc_maybe_copy_object_values=function(a,i){return Object.keys(i).forEach(function(e){Object.keys(i[e]).forEach(function(t){void 0===i[e]||!Object.prototype.hasOwnProperty.call(i[e],t)||void 0===i[e][t]||void 0!==a[e]&&void 0!==a[e][t]||(void 0===a[e]&&(a[e]={}),a[e][t]=i[e][t])})}),a},Lt.tc_pre_populate_store=function(){var t={0:{},1:{},2:{},3:{}};return t[0].src="",t[0].srcset="",t[0].sizes="",t[0].title="",t[0].alt="",t[0]["data-src"]="",t[0]["data-large_image"]="",t[0]["data-large_image_width"]="",t[0]["data-large_image_height"]="",t[1]["data-thumb"]="",t[2].src="",t[3].href="",t[3].title="",t},Lt.tc_populate_store=function(t,e){var a=e.find(".flex-control-nav li:eq(0) img"),e=e.find(".woocommerce-product-gallery__wrapper ").find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),i=t,t=t.closest("a"),o={0:{},1:{},2:{},3:{}};return o[0].src=i.attr("src"),o[0].srcset=i.attr("srcset"),o[0].sizes=i.attr("sizes"),o[0].title=i.attr("title"),o[0].alt=i.attr("alt"),o[0]["data-src"]=i.attr("data-src"),o[0]["data-large_image"]=i.attr("data-large_image"),o[0]["data-large_image_width"]=i.attr("data-large_image_width"),o[0]["data-large_image_height"]=i.attr("data-large_image_height"),o[1]["data-thumb"]=e.attr("data-thumb"),o[2].src=a.attr("src"),o[3].href=t.attr("href"),o[3].title=t.attr("title"),o},Lt.tc_maybe_copy_object_values_from_img=function(t,e,a){for(var i,o,r,c,n=a.find(".flex-control-nav li:eq(0) img"),l=[e,a.find(".woocommerce-product-gallery__wrapper").find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),n,e.closest("a")],d=[["src","srcset","sizes","title","alt","data-src","data-large_image","data-large_image_width","data-large_image_height","large-image"],["data-thumb"],["src"],["href","title"]],s=0;s<l.length;s++)if((i=l[s])&&i[0])for(o=i[0].attributes,c=0;c<o.length;c++)(r=o[c]).specified&&-1!==d[s].indexOf(r.name)&&(void 0===t[s]||void 0!==t[s]&&void 0===t[s][r.name])&&(void 0===t[s]&&(t[s]={}),t[s][r.name]=r.value);return t},Lt.fn.tc_set_attr=function(t,e,a){(void 0===Lt.tc_product_image[a=void 0===a?0:a]||void 0!==Lt.tc_product_image[a]&&void 0===Lt.tc_product_image[a][t])&&(void 0===Lt.tc_product_image[a]&&(Lt.tc_product_image[a]={}),Lt.tc_product_image[a][t]="",this.attr(t))&&(Lt.tc_product_image[a][t]=this.attr(t)),!1===e?this.removeAttr(t):this.attr(t,e)},Lt.fn.tc_reset_attr=function(t,e){void 0!==Lt.tc_product_image[e=void 0===e?0:e]&&(void 0!==Lt.tc_product_image[e][t]&&this.attr(t,Lt.tc_product_image[e][t]),delete Lt.tc_product_image[e][t])},Lt.fn.tc_update_attr=function(t,e){void 0!==Lt.tc_product_image[e=void 0===e?0:e]&&(Lt.tc_product_image[e][t]=this.attr(t))},Lt.fn.tc_image_update=function(t,e){var t=Lt(t),e=Lt(e),a=this.data("epo_object"),i=a.main_product.closest("#product-"+a.product_id),o=i,i=(o=i.length<=0?a.main_product.closest(".post-"+a.product_id):o).find(".flex-control-nav li:eq(0) img"),a=(t=t.is("select")?t.children("option:selected"):t).data("image-variations"),r=(o=""!==Rt.tm_epo_global_product_image_selector?Lt(Rt.tm_epo_global_product_image_selector):o.find("a.woocommerce-main-image img, img.woocommerce-main-image,a img").not(".thumbnails img,.product_list_widget img,img.emoji,a.woocommerce-product-gallery__trigger img").first()).closest("a");1<o.length&&(o=o.first()),t&&a&&0<e.length?(e.removeAttr("data-o_src").removeAttr("data-o_title").removeAttr("data-o_alt").removeAttr("data-o_srcset").removeAttr("data-o_sizes").removeAttr("srcset").removeAttr("sizes"),t=a.imagep,a.imagep.image_link||(t=a.image),e.attr("title",t.image_title),e.attr("alt",t.image_alt),t.image_srcset&&e.attr("srcset",t.image_srcset),t.image_sizes&&e.attr("sizes",t.image_sizes),o.tc_set_attr("title",t.image_title),o.tc_set_attr("alt",t.image_alt),o.tc_set_attr("data-large-image",t.image_link),o.data.wc27_zoom_target&&(o.data.wc27_zoom_target.tc_set_attr("data-thumb",t.image_link),i.tc_set_attr("src",t.image_link),t.image_srcset&&i.tc_set_attr("srcset",t.image_srcset),t.image_sizes)&&i.tc_set_attr("sizes",t.image_sizes),r.tc_set_attr("href",t.image_link),r.tc_set_attr("title",t.image_caption)):(o.tc_reset_attr("title"),o.tc_reset_attr("alt"),o.tc_reset_attr("data-large-image"),o.data.wc27_zoom_target&&(o.data.wc27_zoom_target.tc_reset_attr("data-thumb"),i.tc_reset_attr("src"),i.tc_reset_attr("srcset"),i.tc_reset_attr("sizes")),r.tc_reset_attr("href"),r.tc_reset_attr("title"))},Lt.fn.tm_find_matching_variations=function(t,e){var a,i,o=[];if(t)for(a=0;a<t.length;a+=1)i=t[a],Lt.fn.tm_variations_match(i.attributes,e)&&o.push(i);return o},Lt.fn.tm_variations_match=function(e,a){var i,o,r=!0;return Object.keys(e).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&(i=e[t],o=a[t],void 0!==i)&&void 0!==o&&0!==i.length&&0!==o.length&&i!==o&&(r=!1)}),r},Lt().tclightbox||(Lt.fn.tclightbox=function(){if(0!==this.length)return this.toArray().forEach(function(t){var a,e,i,o,t=Lt(t);!t.is(".tcinit")&&(a=t.attr("src")||t.attr("data-original"),e=(e=t.closest("label")).closest(".tmcp-field-wrap").find(".tm-epo-field[id='"+e.attr("for")+"']"),a=t.attr("data-large_image")||e.attr("data-imagel")||e.attr("data-imagep")||e.attr("data-image")||a)&&(t.addClass("tcinit").before(Lt.epoAPI.template.html(Mt.templateEngine.tc_lightbox,{})),e=t.prev(),t.wrap("<div class='tc-lightbox-image-wrap'/>"),t.after(e),i=e.find(".tc-lightbox-button"),o=function(){i.addClass("tcinit").on("click.tclightbox",function(t){var e;0<Lt(".tc-closing.tc-lightbox").length||(e=Lt.epoAPI.dom.size(),e=Lt("<img>").addClass("tc-lightbox-img").attr("src",a).css("maxHeight",e.visibleHeight+"px").css("maxWidth",e.visibleWidth+"px"),Lt.tcFloatBox({fps:1,ismodal:!1,width:"auto",height:"auto",classname:"flasho tc-lightbox",animateIn:"tc-lightbox-zoomin",animateOut:"tc-lightbox-zoomout",data:Lt.epoAPI.template.html(Mt.templateEngine.tc_lightbox_zoom,{img:e[0].outerHTML}),zIndex:102001,cancelClass:".tc-lightbox-img, .tc-lightbox-button-close",unique:!0}),t.preventDefault())})},"yes"===Rt.tm_epo_preload_lightbox_image?((t=new Image).src=a,t.onload=function(){o()}):o())})}),Lt().tmsectionpoplink||(Lt.fn.tmsectionpoplink=function(){if(0!==this.length)return this.toArray().forEach(function(t){var e,a,i,o,r,c,t=Lt(t);t.data("tmsectionpoplink")||(t.data("tmsectionpoplink",!0),e=t.attr("data-sectionid"),a=Rt.i18n_addition_options,i=t.closest(".cpf-section[data-uniqid='"+e+"']"),o=!1,r=function(){var t=Lt("#tm-section-pop-up");t.parents().removeClass("noanimated"),t.after(i),t.remove(),i.find(".tm-section-link").show(),i.find(".tm-section-pop").hide()},c=function(t){t.target===Lt(".flasho")[0]||Lt(t.target).closest(".flasho").length||r()},t.attr("data-title")&&(a=t.attr("data-title")),t.on("click.tmsectionpoplink",function(t){t.preventDefault(),o=!1,i.before(Lt.epoAPI.template.html(Mt.templateEngine.tc_section_pop_link,{title:a,close:Rt.i18n_close})),(t=Lt("#tm-section-pop-up")).on("click",c),t.find(".float-editbox").prepend(i),i.find(".tm-section-link").hide(),i.find(".tm-section-pop").show(),t.parents().addClass("noanimated"),t.find(".floatbox-cancel").on("click",function(){o||(o=!0,r())}),Qt.trigger("tmlazy"),Qt.trigger("tmsectionpoplink")}))})}),Lt().cpfdependson||(Lt.fn.cpfdependson=function(t,e,a,i){var o,r,c,n,l,d,s,p,m,_,f,u,g,h,v,y=this,b=[],w=null;if(y.length&&"object"==typeof t){for(e=e||"show",v=(h=y.first().closest(".tc-section-fields")).is(".tc-repeater-section"),d=0;d<t.length;d++)if(b[d]=0,_=t[d],Array.isArray(_))for(s=0;s<_.length;s++)if("object"==typeof(f=_[s])){if(v&&(f.element=h.find('[data-uniqid="'+f.element.attr("data-uniqid")+'"')),"quantity"===f.type)f.element.data("didcpflogic")||f.element.off(n="change.cpflogic input.cpflogic").on(n,function(){T(i.this_epo_container)}).data("didcpflogic",1);else if("variation"===f.type||"variationattributes"===f.type)$("found_variation.tmlogic",!1,function(){T(f.element),Qt.trigger("tm-do-epo-update")}),$("hide_variation.tmlogic",!1,function(){T(f.element),Qt.trigger("tm-do-epo-update")});else if((o=function(t,e){var a,i,o=Lt(t);if(0!==o.length){if(o.is(".cpf-section"))return t.find(".tm-epo-field");if(a=o.attr("data-uniqid"),i=(t=o.closest(Mt.epoSelector)).attr("data-epo-id"),!t.is(".reactivate")&&Mt.getElementFromFieldCache&&Mt.getElementFromFieldCache[i]&&Mt.getElementFromFieldCache[i][a]&&Mt.getElementFromFieldCache[i][a][e])return Mt.getElementFromFieldCache[i][a][e];if(0<(t=o.attr("class").split(" ").map(function(t){return-1!==t.indexOf("cpf-type-",0)?t:null}).filter(function(t){return null!=t?t:null})).length)switch("cpf-type-product"===(t=t[0])&&(t=o.is(".cpf-type-product-mode-product")||o.is(".cpf-type-product-checkbox")||o.is(".cpf-type-product-thumbnailmultiple")||o.is(".cpf-type-product-custombundle")?"cpf-type-checkbox":o.is(".cpf-type-product-dropdown")?"cpf-type-select":"cpf-type-radio"),void 0===Mt.getElementFromFieldCache[i]&&(Mt.getElementFromFieldCache[i]=[]),void 0===Mt.getElementFromFieldCache[i][a]&&(Mt.getElementFromFieldCache[i][a]=[]),t){case"cpf-type-radio":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-radio"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-checkbox":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-checkbox"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-select":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-select"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-selectmultiple":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-selectmultiple"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-textarea":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-textarea"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-textfield":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-textfield"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-color":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tm-color-picker"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-range":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-range"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-date":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-date"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-time":return Mt.getElementFromFieldCache[i][a][e]=o.find(".tm-epo-field.tmcp-time"),Mt.getElementFromFieldCache[i][a][e];case"cpf-type-variations":return Mt.getElementFromFieldCache[i][a][e]=o.closest(".cpf-section").find(".tm-epo-field.tm-epo-variation-element"),Mt.getElementFromFieldCache[i][a][e]}}}(f.element,v?h.index():0))&&0<o.length)for(p=0;p<o.length;p++)o[p]&&0!==(r=Lt(o[p])).length&&(n="change.cpflogic",w&&!w.closest(Mt.associatedEpoSelector).length||(c=".tm-product-id-"+(l=r.closest(Mt.epoSelector)).attr("data-product-id"),l="[data-epo-id='"+l.attr("data-epo-id")+"']",w=Lt(Mt.epoSelector+c+l)),!r.data("tmhaslogicevents")||a)&&(!r.data("tmhaslogicevents")&&r.is(".tm-epo-variation-element")?($("found_variation.tmlogic",!1,function(){T(w),Qt.trigger("tm-do-epo-update")}),$("hide_variation.tmlogic",!1,function(){T(w),Qt.trigger("tm-do-epo-update")})):(r.is(":text, textarea")&&(n="change.cpflogic input.cpflogic"),r.is(':input[type="number"]')&&(n="change.cpflogic input.cpflogic keypress.cpflogic"),r.off(n).on(n,function(){T(w)})),r.data("tmhaslogicevents",1));b[d]++}for(m=0;m<y.length;m++)(u=Lt(y[m])).data({matches:b,toggle:e,fields:t,isactive:g="hide"===e}),g?u.removeClass("tc-hidden"):u.addClass("tc-hidden");return y.addClass("iscpfdependson is-epo-depend").data("iscpfdependson",1),y}},Lt.fn.run_cpfdependson=function(){T()}),Lt.tcepo={formSubmitEvents:{},oneOptionIsSelected:{},initialActivation:{},lateFieldsPrices:{},errorObject:{},showHideTotal:{}},Lt.tcepo.tm_init_epo=function(t,e,a,i){h(t,e,a,i)},Lt.tcepo.tmLazyloadContainer=function(t){g=t},Qt.on("tc_manual_init",function(t,e){var a,i,o,r;"container"in e&&"reactivate"in e&&(a=e.reactivate,e=e.container),a=a,i=(e=Lt(e=e)).attr("data-product-id"),o=e.attr("data-epo-id"),h(r=(r=(r=e.parent()).is("form")||(r=e.closest("form")).is("form")?r:e.parent()).parent(),!1,i,o,void 0,void 0,a)}),Lt(x).on("click.tcajax","body.mfn-ajax-add-to-cart .single_add_to_cart_button:not(.disabled)",function(){var t,e=Lt(this);Nt(e),Rt.ajaxdata.cart=e.closest(".cart"),Rt.ajaxdata.cart.find(".tm-formepo").remove(),(t=Lt("<div class='tm-hidden tm-formepo'></div>")).append(Rt.ajaxdata.epos.tcClone().addClass("formepo")),e.after(t)}),I.on("click.tcajax",".ajax_add_to_cart",function(){Nt(Lt(this)),void 0!==Rt.ajaxdata&&delete Rt.ajaxdata}),I.on("click.tcajax",".single_add_to_cart_button",function(){v=Lt(this)}),Lt(x.body).on("added_to_cart",function(){Rt.ajaxbuttondata&&Rt.ajaxbutton instanceof Lt&&(Rt.ajaxbutton.removeData(),Rt.ajaxbutton.data(Rt.ajaxbuttondata))}),Lt(function(){Mt=Lt.epoAPI.applyFilter("tc_api",Mt),Qt.on("lazyLoadXToncomplete",function(){Lt(".tm-owl-slider").toArray().forEach(function(t){Lt(t).trigger("refresh.owl.carousel")})}),Qt.on("tc_init_epo_plugin",function(t){Bt()}),Qt.on("tcShowLastError",function(){P.console.log(b)}),Lt.ajaxPrefilter(function(e,a){var t,i,o,r,c,n,l,d,s,p=!1,m=!1,_={};if("yes"===Rt.tm_epo_enable_in_shop&&(s=e.url.split("?"))&&1<=s.length&&(s=s[1])){for(t=s.split("&"),i=0;i<t.length;i+=1)1<=(o=t[i].split("=")).length&&o[0]&&o[1]&&"wc-ajax"===o[0]&&"add_to_cart"===o[1]&&(p=!0);p&&(e.originalsuccess=e.success,e.success=function(t){t&&t.error&&t.product_url?(f&&1===f.length&&(r=f),(r=Lt(".ajax_add_to_cart[data-product_id='"+a.data.product_id+"']")).removeClass("added"),r.removeClass("loading")):e.originalsuccess.call(null,t)})}FormData&&a.data&&(s=a.data,"object"==typeof(s="string"==typeof a.data?Lt.epoAPI.util.parseParams(a.data):s)[0]&&(s.forEach(function(t){_[t.name]=t.value}),s=_),c=[],a.url&&a.url.indexOf&&(c=Lt.epoAPI.util.parseParams(a.url.slice(a.url.indexOf("?")+1))),"quantity"in s&&s.tcaddtocart&&(s.product_id||s["add-to-cart"]||c.product_id||c["add-to-cart"])?(m=!0,n=s.tcaddtocart):Array.isArray(s)&&(m=s.some(function(t){return"quantity"===t.name})&&s.some(function(t){return"add-to-cart"===t.name})&&s.some(function(t){return"tcaddtocart"===t.name}),n=!!(n=s.find(function(t){return"tcaddtocart"===t.name}))&&n.value),n||"qty"in s&&s.tcaddtocart&&(m=!0,n=s.tcaddtocart),m)&&1===(c=1<(c=f&&1===f.length&&1===f.closest(".tm-has-options").length?f.closest(".tm-has-options").find(Mt.epoSelector+".tm-product-id-"+n):Lt(Mt.epoSelector+".tm-product-id-"+n)).length?c.filter(".formepo")?c.filter(".formepo"):c.first():c).length&&(m={tcajax:1,tcaddtocart:n,cpf_product_price:(s=Lt(".tc-totals-form.tm-product-id-"+n)).find(".cpf-product-price").val(),dynamic_product_price:s.find(".cpf-dynamic-product-price").val(),override_product_price:s.find(".cpf-override-product-price").val()},(n=s.find(".tc_form_prefix").val())&&(m.tc_form_prefix=n),l=Lt.epoAPI.util.parseParams(e.data,!0),l=Lt.extend(l,c.tcSerializeObject(),m),d=new FormData,Object.keys(l).forEach(function(t){t&&d.append(t,l[t])}),c.find(":file").toArray().forEach(function(t){for(i=0;i<Lt(t)[0].files.length;i++)t.multiple||d.delete(Lt(t).attr("name")),d.append(Lt(t).attr("name"),Lt(t)[0].files[i])}),e.data=d,e.contentType=!1,e.cache=!1,e.processData=!1)}),E.ajaxSuccess(function(t,e,r){var a,c,n,l,d,s,p,m,_,f=Rt.quickview_array||"null",i=Rt.quickview_container||"null",o={},u=1;if(void 0!==Rt.ajaxdata&&(Rt.ajaxdata.cart.find(".tm-formepo").remove(),delete Rt.ajaxdata),"wc_epo_get_associated_product_html"!==(p=Lt.epoAPI.util.parseParams(r.data)).action){for(a in Lt(".tm-formepo-normal").remove(),Lt(".tm-formepo").remove(),Lt(".tm-cart-link").tmpoplink(),f=Lt.epoAPI.util.parseJSON(f),i=Lt.epoAPI.util.parseJSON(i))Object.prototype.hasOwnProperty.call(i,a)&&(o[i[a][0]]=Lt(i[a][1]));Lt.extend(f,o),m=function(){var e=!1;return Object.keys(f).forEach(function(t){Lt(f[t]).length&&(e=t)}),e},(_=function(t){var e,i,a=requestAnimationFrame(function(){setTimeout(function(){_(t-1)},200)}),o=m();if((o||0===t)&&(cancelAnimationFrame(a),o)){if(d=!1,1<(c=1<(c=Lt(f[o])).length&&v&&v.length?v.closest(f[o]):c).length&&"quickview_pro"!==o)return!0;if("woothemes_quick_view"===o&&c.is(".fusion-woocommerce-quick-view-container"))return!0;if("fusion_quick_view_load"===o&&0===c.find(Mt.epoSelector).length)return!0;if("woodmart_quick_shop"===o&&"woodmart_quick_shop"===(p=Lt.epoAPI.util.parseParams(r.url)).action&&(s=Lt(Lt.epoAPI.util.escapeSelector(f[o]+".post-"+p.id))).length&&(c=s,d=!0),"woodmart_quick_view"===o&&"woodmart_quick_view"===(p=Lt.epoAPI.util.parseParams(r.url)).action&&(s=Lt(Lt.epoAPI.util.escapeSelector(f[o]+".post-"+p.id))).length&&(c=s,d=!0),"quickview_pro"===o&&(p=r.url.split("/")).length&&(s=Lt(Lt.epoAPI.util.escapeSelector(f[o]+" .post-"+p[p.length-1]))).length&&(c=s,d=!0),"exwoofood_booking_info"!==o&&"wqv_popup_content"!==o&&"wp_food"!==o&&"jet_popup_get_content"!==o||(d=!0),"woofood"===o&&r.data&&"woofood_quickview_ajax"===(p=Lt.epoAPI.util.parseParams(r.data)).action&&(s=c.find("form").parent()).length&&(c=s,d=!0),0===c.find(".product").length&&c.is(".product")&&(d=!0),0<c.find(".product").length||d){if(c.removeClass("tc-init"),"fusion_quick_view_load"!==o&&"jet_popup_get_content"!==o&&"wp_food"!==o&&"woodmart_quick_shop"!==o&&"woodmart_quick_view"!==o&&"lightboxpro"!==o&&"jckqv_quick_view"!==o&&"yith_quick_view"!==o&&"theme_flatsome_quick_view"!==o||(y=!0),1<(g=c).length){for(;1<g.length&&0!==(g=g.filter(function(){return 0<Lt(this).find(Mt.epoSelector).length})).length;);if(0===g.length)return setTimeout(function(){_(10)},1e3),!0}if(0===(e=g.find(Mt.epoSelector)).length)return delete f[o],_(10),!0;"fusion_quick_view_load"===o&&(u=1400),(i=function(t){setTimeout(function(){n=e.attr("data-product-id"),l=e.attr("data-epo-id"),"woodmart_quick_shop"===o&&c.addClass("has-options"),Mt.getElementFromFieldCache=[],h(g,!0,n,l,void 0,void 0,t),Qt.trigger("tmlazy"),Qt.trigger("tm_epo_loaded_quickview"),Lt.jMaskGlobals&&g.find(Lt.jMaskGlobals.maskElements).toArray().forEach(function(t){(t=Lt(t)).attr("data-mask")&&t.mask(t.attr("data-mask"))})},u)})(),"minimog_product_quick_view"===o&&Lt(".minimog-product").on("click",".quick-view-btn",function(t){var e=Lt(this),a=e.data("pid"),a=I.children("#modal-quick-view-product-"+a);t.preventDefault(),t.stopPropagation(),e.hasClass("loading")||Lt.fn.MinimogModal&&0<a.length&&(g=Lt(".modal-quick-view-popup"),i(!0))})}}})(10)}}),Bt(),Lt(".tm-cart-link").tmpoplink(),I.on("updated_checkout wc_fragments_loaded wc_fragments_refreshed wc_fragment_refresh",function(){Lt(".tm-cart-link").tmpoplink()}),Qt.trigger("tmlazy"),Qt.trigger("tm_epo_loaded")}),I.on("updated_checkout updated_cart_totals",function(){t()}),t(),Lt(function(){var t=navigator.userAgent||navigator.vendor||P.opera;(t=-1<t.indexOf("FBAN")||-1<t.indexOf("FBAV")||-1<t.indexOf("Instagram"))&&Lt(".tmcp-upload").removeAttr("accept"),E.on("click",".quantity .jckqv-qty-spinner, .quantity .ui-spinner-button",function(){Lt(this).closest(".quantity").find(Mt.qtySelector).trigger("change")}),Lt(x).on("click",".tm-quantity .tc-qty-button, .tm-quantity-alt .tc-qty-button",function(){var t=Lt(this).closest(".tm-quantity, .tm-quantity-alt").find(".tm-qty, .tm-qty-alt"),e=parseFloat(t.val()),a=parseFloat(t.attr("max")),i=parseFloat(t.attr("min")),o=parseFloat(t.attr("step"));isNaN(o)&&(o=1),Lt(this).is(".plus")?!isNaN(a)&&a<=e?t.val(a):t.val(e+o):!isNaN(i)&&e<=i?t.val(i):0<e&&t.val(e-o),Lt(this).closest(".tm-quantity, .tm-quantity-alt").find("input.tm-qty, input.tm-qty-alt").trigger("change")}),Lt("#wholesale_form").on("submit",function(){var t=Lt("form.cart").find(Mt.addToCartSelector).val(),e=Lt(Mt.epoSelector+".tm-cart-main[data-product-id='"+t+"']").tcClone(),t=Lt(".tm-totals-form-main[data-product-id='"+t+"']").tcClone(),a=Lt("<div class='tm-hidden tm-formepo'></div>");return a.append(e),a.append(t),Lt(this).append(a),!0}),E.on("click","#add_to_quote",function(t){var e,a;Rt&&"yes"===Rt.tm_epo_global_enable_validation&&(e=Lt(this).parents("form"),a=parseInt(e.find(".tm-epo-counter").val(),10),a=Lt(Mt.epoSelector+"[data-epo-id='"+a+"']"),"yes"===Rt.tm_epo_global_enable_validation)&&Lt.tc_validator&&0<e.length&&0<a.length&&!e.tc_validate().form()&&t.stopImmediatePropagation()}),Lt(".single_add_to_cart_button.paypal_checkout_button").on("click",function(t){var e=Lt(".cart");e.data("tc_validator")&&e.data("tc_validator").errorList&&t.stopImmediatePropagation()}),Lt(".wc-product-table").on("init.wcpt",function(t,e){e.$table.find(Mt.epoSelector).addClass("hidden"),e.$table.find("thead tr").append("<th>&nbsp;</th>"),setTimeout(function(){e.$table.find(".cart:not(.cart_group)").toArray().forEach(function(t){var t=Lt(t).find(Mt.epoSelector),e=t.closest("tr");Lt("<td class='wc-product-table-epo'></td>").appendTo(e).append(t),Lt(P).trigger("tc_manual_init",t),t.removeClass("hidden")})},500)}),Lt(".generate-product-link").on("click",function(t){var e,a,i,o=new URL(P.location.href),r=o.searchParams,c={};t.preventDefault(),Lt(Mt.epoSelector+":visible").find(".tm-epo-field:enabled").each(function(){var t,e=this.name;if("radio"===this.type){if(c[e])return;c[e]=!0,t=(t=Lt(Mt.epoSelector+":visible").find('.tm-epo-field[name="'+e+'"]:checked')).length?t.val():""}else t="checkbox"===this.type?this.checked?this.value:"":Lt(this).val();e&&""!==t&&r.set(e,t),""===t&&r.delete(e)});for([a,i]of r.entries())""===i&&r.delete(a);e=o.toString(),history.replaceState(null,null,e),navigator.clipboard.writeText(e).then(function(){P.alert("Link copied to clipboard:\n"+e)}).catch(function(t){P.console.error("Could not copy: ",t)})})}))}(window,document,window.jQuery);
(function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,r,o;for(r=new i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,s,i,n,r,o,h,l,c,_,a,u,d,p,f;for(this.no_results_clear(),_=0,e=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),i=0,n=(l=this.results_data).length;i<n;i++)(r=l[i]).search_match=!1,a=null,u=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(a=this.results_data[r.group_array_index]).active_options&&a.search_match&&(_+=1),a.active_options+=1),f=r.group?r.label:r.text,r.group&&!this.group_search||(u=this.search_string_match(f,c),r.search_match=null!=u,r.search_match&&!r.group&&(_+=1),r.search_match?(h.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+h.length),p=f.slice(d+h.length),r.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=a&&(a.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n  <span>'+this.default_text+'</span>\n  <div><b></b></div>\n</a>\n<div class="chosen-drop">\n  <div class="chosen-search">\n    <input class="chosen-search-input" type="text" autocomplete="off" />\n  </div>\n  <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n  <li class="search-field">\n    <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n  </li>\n</ul>\n<div class="chosen-drop">\n  <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n  '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
(()=>{"use strict";const t=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},n=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},e=function(e,o){return function(r,i,s){let c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;const l=e[o];if(!n(r))return;if(!t(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:i};if(l[r]){const t=l[r].handlers;let n;for(n=t.length;n>0&&!(c>=t[n-1].priority);n--);n===t.length?t[n]=a:t.splice(n,0,a),l.__current.forEach((t=>{t.name===r&&t.currentIndex>=n&&t.currentIndex++}))}else l[r]={handlers:[a],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,i,s,c)}},o=function(e,o){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,s){const c=e[o];if(!n(i))return;if(!r&&!t(s))return;if(!c[i])return 0;let l=0;if(r)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let n=t.length-1;n>=0;n--)t[n].namespace===s&&(t.splice(n,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=n&&t.currentIndex--})))}return"hookRemoved"!==i&&e.doAction("hookRemoved",i,s),l}},r=function(t,n){return function(e,o){const r=t[n];return void 0!==o?e in r&&r[e].handlers.some((t=>t.namespace===o)):e in r}},i=function(t,n){let e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(o){const r=t[n];r[o]||(r[o]={handlers:[],runs:0}),r[o].runs++;const i=r[o].handlers;for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];if(!i||!i.length)return e?c[0]:void 0;const a={name:o,currentIndex:0};for(r.__current.push(a);a.currentIndex<i.length;){const t=i[a.currentIndex].callback.apply(null,c);e&&(c[0]=t),a.currentIndex++}return r.__current.pop(),e?c[0]:void 0}},s=function(t,n){return function(){var e,o;const r=t[n];return null!==(e=null===(o=r.__current[r.__current.length-1])||void 0===o?void 0:o.name)&&void 0!==e?e:null}},c=function(t,n){return function(e){const o=t[n];return void 0===e?void 0!==o.__current[0]:!!o.__current[0]&&e===o.__current[0].name}},l=function(t,e){return function(o){const r=t[e];if(n(o))return r[o]&&r[o].runs?r[o].runs:0}};class a{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=e(this,"actions"),this.addFilter=e(this,"filters"),this.removeAction=o(this,"actions"),this.removeFilter=o(this,"filters"),this.hasAction=r(this,"actions"),this.hasFilter=r(this,"filters"),this.removeAllActions=o(this,"actions",!0),this.removeAllFilters=o(this,"filters",!0),this.doAction=i(this,"actions"),this.applyFilters=i(this,"filters",!0),this.currentAction=s(this,"actions"),this.currentFilter=s(this,"filters"),this.doingAction=c(this,"actions"),this.doingFilter=c(this,"filters"),this.didAction=l(this,"actions"),this.didFilter=l(this,"filters")}}const u=function(){return new a},h=u(),{addAction:d,addFilter:f,removeAction:m,removeFilter:k,hasAction:v,hasFilter:p,removeAllActions:b,removeAllFilters:y,doAction:g,applyFilters:A,currentAction:_,currentFilter:F,doingAction:B,doingFilter:w,didAction:I,didFilter:N,actions:j,filters:x}=h;function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function T(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,C(o.key),o)}}function P(t,n,e){return(n=C(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function C(t){var n=function(t,n){if("object"!==S(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!==S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===S(n)?n:String(n)}var O=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"hooks",void 0),P(this,"globalNamespace","jet-plugins"),P(this,"blocksNamespace","frontend.element-ready"),P(this,"blocksConditions",{}),this.hooks=n||u()}var n,e;return n=t,(e=[{key:"hookNameFromBlock",value:function(t){var n=this.getBlockName(t);return n?"".concat(this.globalNamespace,".").concat(this.blocksNamespace,".").concat(n):""}},{key:"getBlockName",value:function(t){var n;return"string"==typeof t?t.replace("/","."):this.getBlockName((null==t||null===(n=t.dataset)||void 0===n?void 0:n.isBlock)||"")}},{key:"init",value:function(t,n){var e=this;if(n&&n.length&&this.bulkBlocksInit(n),(t=t||jQuery("body"))&&t.length){var o=t.find('[data-is-block*="/"]');o&&o.length&&o.each((function(t,n){e.initBlock(n)}))}}},{key:"isBlockRequiresInit",value:function(t){var n=void 0===t.dataset.jetInited,e=this.getBlockName(t);return n&&this.blocksConditions[e]&&(n=this.blocksConditions[e](t)),n}},{key:"initBlock",value:function(t,n){n=n||!1;var e=this.hookNameFromBlock(t);if(e&&this.hasHandlers(e)){var o=n;o||(o=this.isBlockRequiresInit(t)),o&&(this.hooks.doAction(e,jQuery(t)),t.dataset.jetInited=!0)}}},{key:"hasHandlers",value:function(t){return!!this.hooks.actions[t]&&!(!this.hooks.actions[t].handlers||!this.hooks.actions[t].handlers.length)}},{key:"registerBlockHandlers",value:function(t){var n=this.getBlockName(t.block);this.hooks.addAction(this.hookNameFromBlock(n),"".concat(this.globalNamespace,"/").concat(t.block),t.callback),t.condition&&"function"==typeof t.condition&&(this.blocksConditions[n]=t.condition)}},{key:"bulkBlocksInit",value:function(t){for(var n=0;n<t.length;n++)this.registerBlockHandlers(t[n])}}])&&T(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}();window.JetPlugins=window.JetPlugins||new O})();
(function($){
'use strict';
var JetSearch={
addedScripts: [],
addedStyles: [],
addedPostCSS: [],
assetsPromises: [],
initElementor: function(){
var widgets={
'jet-ajax-search.default': JetSearch.widgetAjaxSearch,
'jet-search-suggestions.default': JetSearch.widgetSearchSuggestions
};
$.each(widgets, function(widget, callback){
window.elementorFrontend.hooks.addAction('frontend/element_ready/' + widget, callback);
});
window.elementorFrontend.elements.$window.on('elementor/nested-tabs/activate',
(event, content)=> {
const $content=$(content);
JetSearch.reinitSlickSlider($content);
JetSearch.initElementsHandlers($content);
}
);
window.addEventListener('elementor/popup/show',(event)=> {
const instance=event.detail.instance;
const interval=setInterval(()=> {
if(! instance.keyboardHandler) return;
const handler=instance.keyboardHandler;
const config=handler.config;
if(! config||! config.$modalElements) return;
if(handler.changeFocusAfterAnimation!==true){
clearInterval(interval);
return;
}
const $input=instance.$element.find('.jet-ajax-search__field');
if($input.length){
handler.firstFocusableElement=$input[0];
}
clearInterval(interval);
}, 50) ;
setTimeout(()=> clearInterval(interval), 1000);
});
/*
$(document).on('jet-ajax-search/show-results', function(event, searchResults){
searchResults.find('.jet-ajax-search__results-item').css('border', '2px solid red');
});
*/
/*
* Example of usage `jet-ajax-search/results-area/listing-add-suggestion` trigger
*
* Parameters:
* - itemWrapper: A CSS selector that points to the element containing the wrapper of the search result item.
* - itemLink: Represents the element that contains the link of the search result item.
* - itemTitle: A CSS selector that points to the element containing the title of the search result item.
* - itemUrlAttr: Specifies the attribute used to extract the URL from the itemLink.
$(document).on("jet-ajax-search/results-area/listing-add-suggestion", function(event, itemWrapper, itemLink, itemTitle, itemUrlAttr){
itemWrapper='.jet-ajax-search__results-item',
itemLink=$('.jet-listing-dynamic-image__link', itemWrapper);
itemTitle='.jet-ajax-search-item-title .jet-listing-dynamic-field__content';
itemUrlAttr='href';
window.JetSearch.addSuggestionFromResultAreaItem(itemWrapper, itemLink, itemTitle, itemUrlAttr);
});
*/
},
initBricks: function($scope){
if(window.bricksIsFrontend){
return;
}
$scope=$scope||$('body');
JetSearch.initBlocks($scope);
},
initBlocks: function($scope){
$scope=$scope||$('body');
window.JetPlugins.init($scope, [
{
block: 'jet-search/ajax-search',
callback: JetSearch.widgetAjaxSearch
},
{
block: 'jet-search/search-suggestions',
callback: JetSearch.widgetSearchSuggestions
}
]);
},
widgetAjaxSearch: function($scope){
var settings={
searchClass:                 '.jet-ajax-search',
searchFormClass:             '.jet-ajax-search__form',
fieldsHolderClass:           '.jet-ajax-search__fields-holder',
inputClass:                  '.jet-ajax-search__field',
settingsInput:               'input[name="jet_ajax_search_settings"]',
submitClass:                 '.jet-ajax-search__submit',
chosenClass:                 '.jet-ajax-search__categories select[name="jet_ajax_search_categories"]',
resultsAreaClass:            '.jet-ajax-search__results-area',
resultsHeaderClass:          '.jet-ajax-search__results-header',
resultsFooterClass:          '.jet-ajax-search__results-footer',
listHolderClass:             '.jet-ajax-search__results-holder',
listClass:                   '.jet-ajax-search__results-list',
listInnerClass:              '.jet-ajax-search__results-list-inner',
listSlideClass:              '.jet-ajax-search__results-slide',
itemClass:                   '.jet-ajax-search__results-item',
inlineSuggestionsAreaClass:  '.jet-ajax-search__suggestions-inline-area',
inlineSuggestionsItemClass:  '.jet-ajax-search__suggestions-inline-area-item',
resultsSuggestionsAreaClass: '.jet-ajax-search__results-suggestions-area',
resultsSuggestionItemClass:  '.jet-ajax-search__results-suggestions-area-item',
countClass:                  '.jet-ajax-search__results-count',
messageHolderClass:          '.jet-ajax-search__message',
fullResultsClass:            '.jet-ajax-search__full-results',
navigationClass:             '.jet-ajax-search__navigation-holder',
navButtonClass:              '.jet-ajax-search__navigate-button',
bulletClass:                 '.jet-ajax-search__bullet-button',
numberClass:                 '.jet-ajax-search__number-button',
prevClass:                   '.jet-ajax-search__prev-button',
nextClass:                   '.jet-ajax-search__next-button',
activeNavClass:              '.jet-ajax-search__active-button',
disableNavClass:             '.jet-ajax-search__navigate-button-disable',
spinnerClass:                '.jet-ajax-search__spinner-holder',
handlerId:                   'jetSearchSettings',
isRtl:(window.elementorFrontend&&window.elementorFrontend.config.is_rtl) ? window.elementorFrontend.config.is_rtl:$('body').hasClass('rtl')
};
if($scope.hasClass('jet-ajax-search-block')){
var resultAreaWidthBy=$scope.find(settings.searchClass).data('settings')['results_area_width_by'],
resultAreaCustomWidth=$scope.find(settings.searchClass).data('settings')['results_area_custom_width'],
resultAreaCustomWidthPosition=$scope.find(settings.searchClass).data('settings')['results_area_custom_position'],
resultAreaContainer=$('.jet-ajax-search__results-area', $scope);
if("custom"===resultAreaWidthBy){
if(""!==resultAreaCustomWidth){
resultAreaContainer.width(resultAreaCustomWidth);
}
switch(resultAreaCustomWidthPosition){
case 'left':
resultAreaContainer.css("left", 0);
resultAreaContainer.css("right", "auto");
break;
case 'center':
resultAreaContainer.css("left", "50%");
resultAreaContainer.css("right", "auto");
resultAreaContainer.css("-webkit-transform", "translateX(-55%)");
resultAreaContainer.css("transform", "translateX(-50%)");
break;
case 'right':
resultAreaContainer.css("left", "auto");
resultAreaContainer.css("right", 0);
break;
}}
}
$scope.find(settings.searchClass).jetAjaxSearch(settings);
$scope.find(settings.inputClass)
.on('focus.jetSearchSlick input.jetSearchSlick', function(){
window.JetSearch.pauseAllSlick($(document) );
})
.on('blur.jetSearchSlick', function(){
window.JetSearch.playAllSlick($(document) );
});
var $chosenSelect=$scope.find(settings.chosenClass);
if($chosenSelect[0]){
$chosenSelect.chosen({
disable_search: true,
placeholder_text: '',
placeholder_text_single: ''
});
}},
widgetSearchSuggestions: function($scope){
let	$target=$scope.find('.jet-search-suggestions'),
settings={
searchClass:        '.jet-search-suggestions',
searchFormClass:    '.jet-search-suggestions__form',
fieldsHolderClass:  '.jet-search-suggestions__fields-holder',
inputClass:         '.jet-search-suggestions__field',
spinnerClass:       '.jet-search-suggestions__spinner-holder',
messageHolderClass: '.jet-search-suggestions__message',
settingsInput:      'input[name="jet_search_suggestions_settings"]',
submitClass:        '.jet-search-suggestions__submit',
chosenClass:        '.jet-search-suggestions__categories select[name="jet_search_suggestions_categories"]',
inlineClass:        '.jet-search-suggestions__inline-area',
inlineItemClass:    '.jet-search-suggestions__inline-area-item',
focusClass:         '.jet-search-suggestions__focus-area',
focusHolderClass:   '.jet-search-suggestions__focus-results-holder',
focusItemClass:     '.jet-search-suggestions__focus-area-item',
handlerId:          'jetSearchSettings',
isRtl:(window.elementorFrontend&&window.elementorFrontend.config.is_rtl) ? window.elementorFrontend.config.is_rtl:$('body').hasClass('rtl')
},
$chosenSelect=$scope.find(settings.chosenClass);
$target.jetAjaxSearchSuggestions(settings);
if($chosenSelect[0]){
$chosenSelect.chosen({
disable_search: true,
placeholder_text: '',
placeholder_text_single: ''
});
}},
setFormSuggestion: function(name, form, url=''){
const ajaxSettings=window['jetSearchSettings']['searchSuggestions']||{},
sendData={
name: name
},
nonce=ajaxSettings.nonce_rest;
const ajaxData={
action: ajaxSettings.add_action,
data: sendData||{},
nonce: ajaxSettings.nonce
};
$.ajax({
type: 'POST',
url: ajaxSettings.add_suggestions_rest_api_url,
data: ajaxData,
dataType: 'json',
beforeSend: function(jqXHR){
jqXHR.setRequestHeader('X-WP-Nonce', nonce);
},
complete: function(){
if(false!=form){
if(''!=url){
url=JetSearch.getResultsUrl(form, url);
window.location.href=url;
}else{
form.submit();
}}else{
window.location.href=url;
}}
});
},
getResultsUrl: function(form, url=''){
let redirectUrl='';
if(''!=url){
redirectUrl=url;
}else{
redirectUrl=form.attr('action');
}
if(redirectUrl&&! redirectUrl.startsWith('http')&&! redirectUrl.startsWith('/') ){
const actionBase=(form.attr('action')||'/').replace(/\/+$/, '');
redirectUrl=actionBase + '/' + redirectUrl.replace(/^\/+/, '');
}
let formData={},
result='';
formData=form.serializeArray().reduce(function(obj, item){
if(item.name==='s'){
item.value=item.value.replace(/\u3000/g, ' ');
}
obj[item.name]=item.value;
return obj;
}, {});
if(Object.keys(formData).length > 0){
const queryString=$.param(formData).replace(/=&/g, '&').replace(/=$/, '');
const separator=redirectUrl.indexOf('?')===-1 ? '?':'&';
result=redirectUrl + separator + queryString;
}else{
result=redirectUrl;
}
return result;
},
suggestionsPreloader: function(is_active, state, preloader){
if(! is_active){
return;
}
if(''!=preloader){
if('show'===state){
preloader.addClass('show');
}else if('hide'===state){
preloader.removeClass('show');
}}
},
getUrlParams: function(){
let params={},
queryString=window.location.search.slice(1);
if(queryString){
let pairs=queryString.split('&');
for(let i=0; i < pairs.length; i++){
let pair=pairs[i].split('=');
params[pair[0]]=decodeURIComponent(pair[1]||'');
}}
return params;
},
md5: function(str){
let hash='';
for (let i=0; i < str.length; i++){
let char=str.charCodeAt(i);
hash +=char;
}
return hash;
},
generateHash: function(string, length=6){
let md5Hash=JetSearch.md5(string),
hash='';
for(let i=0; i < length; i++){
hash +=md5Hash.charAt(Math.floor(Math.random() * md5Hash.length) );
}
hash=hash.toLowerCase();
return hash;
},
generateRandomId: function(){
let hash=JetSearch.generateHash(Math.random().toString());
return hash;
},
initElementsHandlers: function($selector){
window.JetPlugins.init($selector);
$selector.find('[data-element_type]').each(function(){
var excludeWidgets=[
'jet-form-builder-form.default',
'nav-menu.default',
'jet-woo-product-gallery-slider.default',
'accordion.default'
];
var $this=$(this),
elementType=$this.data('element_type');
if(!elementType){
return;
}
if('widget'===elementType){
elementType=$this.data('widget_type');
if(excludeWidgets.includes(elementType) ){
return;
}
window.elementorFrontend.hooks.doAction('frontend/element_ready/widget', $this, $);
}
window.elementorFrontend.hooks.doAction('frontend/element_ready/global', $this, $);
window.elementorFrontend.hooks.doAction('frontend/element_ready/' + elementType, $this, $);
});
if(window.elementorFrontend){
const elementorLazyLoad=new Event("elementor/lazyload/observe");
document.dispatchEvent(elementorLazyLoad);
}
if(window.JetPopupFrontend&&window.JetPopupFrontend.initAttachedPopups){
window.JetPopupFrontend.initAttachedPopups($selector);
}},
reinitSlickSlider: function($scope){
var $slider=$scope.find('.slick-initialized');
if($slider.length){
$slider.each(function(){
$(this).slick('unslick');
});
}},
toggleSlickAutoplay: function($root, shouldPlay){
const $slicks=$root ? $root.find('.slick-initialized'):$('.slick-initialized');
$slicks.each(function(){
try {
$(this).slick(shouldPlay ? 'slickPlay':'slickPause');
} catch(e){}});
},
pauseAllSlick: function($root){
this.toggleSlickAutoplay($root||$(document), false);
},
playAllSlick: function($root){
setTimeout(()=> this.toggleSlickAutoplay($root||$(document), true), 60);
},
enqueueAssetsFromResponse: function(response){
if(response.data.scripts){
JetSearch.enqueueScripts(response.data.scripts);
}
if(response.data.styles){
JetSearch.enqueueStyles(response.data.styles);
}},
enqueueScripts: function(scripts){
$.each(scripts, function(handle, scriptHtml){
JetSearch.enqueueScript(handle, scriptHtml)
});
},
enqueueStyles: function(styles){
$.each(styles, function(handle, styleHtml){
JetSearch.enqueueStyle(handle, styleHtml)
});
},
enqueueScript: function(handle, scriptHtml){
if(-1!==JetSearch.addedScripts.indexOf(handle) ){
return;
}
if(! scriptHtml){
return;
}
var selector='script[id="' + handle + '-js"]';
if($(selector).length){
return;
}
var scriptsTags=scriptHtml.match(/<script[\s\S]*?<\/script>/gm);
if(scriptsTags.length){
for(var i=0; i < scriptsTags.length; i++){
JetSearch.assetsPromises.push(new Promise(function(resolve, reject){
var $tag=$(scriptsTags[i]);
if($tag[0].src){
var tag=document.createElement('script');
tag.type=$tag[0].type;
tag.src=$tag[0].src;
tag.id=$tag[0].id;
tag.async=false;
tag.onload=function(){
resolve();
};
document.body.append(tag);
}else{
$('body').append(scriptsTags[i]);
resolve();
}})
);
}}
JetSearch.addedScripts.push(handle);
},
enqueueStyle: function(handle, styleHtml){
if(-1!==handle.indexOf('google-fonts') ){
JetSearch.enqueueGoogleFonts(handle, styleHtml);
return;
}
if(-1!==JetSearch.addedStyles.indexOf(handle) ){
return;
}
var selector='link[id="' + handle + '-css"],style[id="' + handle + '"]';
if($(selector).length){
return;
}
$('head').append(styleHtml);
JetSearch.addedStyles.push(handle);
if(-1!==handle.indexOf('elementor-post') ){
var postID=handle.replace('elementor-post-', '');
JetSearch.addedPostCSS.push(postID);
}},
enqueueGoogleFonts: function(handle, styleHtml){
var selector='link[id="' + handle + '-css"]';
if($(selector).length){}
$('head').append(styleHtml);
},
reinitBricksScripts: function(_this){
if(!$('body').hasClass('theme-bricks')&&!$('body').hasClass('bricks-is-frontend')){
return;
}
const resultsArea=$('.jet-ajax-search__results-list', _this);
const sourcesHolder=$('.jet-ajax-search__source-results-holder', _this);
resultsArea.find('[data-script-id]').each(function(){
const newId=JetSearch.generateRandomId();
$(this).attr('data-script-id', newId);
});
resultsArea.find('[id^="brxe-"]').each(function(){
var id=$(this).attr('id');
$(this).addClass(id);
});
const bricksScripts={
".bricks-lightbox": 'bricksPhotoswipe',
".brxe-accordion, .brxe-accordion-nested": 'bricksAccordion',
".brxe-animated-typing": 'bricksAnimatedTyping',
".brxe-audio": 'bricksAudio',
".brxe-countdown": 'bricksCountdown',
".brxe-counter": 'bricksCounter',
".brxe-video": 'bricksVideo',
".bricks-lazy-hidden": 'bricksLazyLoad',
".brx-animated": 'bricksAnimation',
".brxe-pie-chart": 'bricksPieChart',
".brxe-progress-bar .bar span": 'bricksProgressBar',
".brxe-form": 'bricksForm',
".brx-query-trail": 'bricksInitQueryLoopInstances',
"[data-interactions]": 'bricksInteractions',
".brxe-alert svg": 'bricksAlertDismiss',
".brxe-tabs, .brxe-tabs-nested": 'bricksTabs',
".bricks-video-overlay, .bricks-video-overlay-icon, .bricks-video-preview-image": 'bricksVideoOverlayClickDetector',
".bricks-background-video-wrapper": 'bricksBackgroundVideoInit',
".brxe-toggle": 'bricksToggle',
".brxe-offcanvas": 'bricksOffcanvas',
'.brxe-slider': 'bricksSwiper',
'.brxe-slider-nested': 'bricksSplide',
'.brxe-image': 'bricksSwiper'
};
const contentWrapper=resultsArea[0];
for(const key in bricksScripts){
const widget=contentWrapper.querySelector(key);
if(widget&&typeof window[bricksScripts[key]]==="function"&&bricksScripts[key]){
window[bricksScripts[key]]();
}}
if(sourcesHolder.length){
sourcesHolder.find('[data-script-id]').each(function(){
const newId=JetSearch.generateRandomId();
$(this).attr('data-script-id', newId);
});
sourcesHolder.find('[id^="brxe-"]').each(function(){
var id=$(this).attr('id');
$(this).addClass(id);
});
const sourcesWrapper=sourcesHolder[0];
for(const key in bricksScripts){
const widget=sourcesWrapper.querySelector(key);
if(widget&&typeof window[bricksScripts[key]]==="function"&&bricksScripts[key]){
window[bricksScripts[key]]();
}}
}},
getCurrentDeviceMode: function(){
const width=window.innerWidth;
if(width > 1024){
return 'desktop';
}else if(width <=1024&&width > 767){
return 'tablet';
}else{
return 'mobile';
}},
trimString: function(str, numWords){
if(typeof str!=='string'){
return str;
}
let wordsArray=str.split(' ');
if(wordsArray.length <=numWords){
return str;
}
let truncatedString=wordsArray.slice(0, numWords).join(' ');
return truncatedString + '...';
},
escapeHTML: function(str){
return str.replace(/[&<>"']/g, function(match){
const escapeMap={
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#039;'
};
return escapeMap[match];
});
},
addSuggestionFromResultAreaItem: function(itemWrapper, itemLink, itemTitle, itemUrlAttr){
itemLink.on('click', function(e){
e.stopImmediatePropagation();
e.preventDefault();
let	item=$(this).closest(itemWrapper),
value=$(itemTitle, item).text(),
url=$(this).attr(itemUrlAttr);
JetSearch.setFormSuggestion(value, false, url);
});
}};
$.fn.getSuggestionsList=function(options, settings, showSpinner, hightlightText=false, callback=()=> {}){
let self=this[0],
outputHtml='',
listPosition=options.list_position,
inlineItemTemplate=wp.template('jet-search-inline-suggestion-item'),
focusItemTemplate=wp.template('jet-search-focus-suggestion-item'),
spinner=$(settings.spinnerClass, self),
manualList=[];
const ajaxSettings=window['jetSearchSettings']['searchSuggestions']||{};
function highlightMatches(item){
let searched=options.value.trim();
if(searched!==""){
let reg=new RegExp("[\>][^\<]*"+searched+"[^\<]*[\<]","gi"),
reg2=new RegExp(searched, "gi"),
regHtml=new RegExp("<\/?[a-z](.*?)[\s\S]*>", "gi");
if(reg.test(item) ){
item=item.replace(reg, function(item){
let subRegex=new RegExp(searched, "gi");
return item.replace(subRegex,`<mark>${searched}</mark>`);
});
}
if(regHtml.test(item) ){
return item;
}else{
item=item.replace(reg2, str=> `<mark>${str}</mark>`);
}}
return item;
}
if('manual'===options.list_type){
if(options['manual_list'].length){
let list=options['manual_list'].split(",");
list.map(function(suggestion, i){
manualList[i]={ name: suggestion };});
if('inline'===listPosition){
manualList.map(function(suggestion){
outputHtml +=inlineItemTemplate(suggestion);
});
$(self).html(outputHtml);
}else if('focus'===listPosition){
manualList.map(function(suggestion){
outputHtml +=focusItemTemplate(suggestion);
});
$(settings.focusHolderClass ,self).html(outputHtml);
if(typeof callback==='function'){
callback();
}
JetSearch.suggestionsPreloader(showSpinner, 'hide', spinner);
}}
return;
}
let sendData={
list_type: options.list_type||'',
value: options.value||'',
limit: options.limit
},
ajaxData={
action: ajaxSettings.get_action,
data: sendData||{},
};
jQuery.ajax({
type: 'GET',
url: ajaxSettings.get_suggestions_rest_api_url,
data: ajaxData,
dataType: 'json',
cache: false,
processData: true,
error: function(jqXHR, textStatus, errorThrown){
errorCallback(jqXHR);
},
success: function(response, textStatus, jqXHR){
successCallback(response);
if(typeof callback==='function'){
callback();
}}
});
const successCallback=function(response){
if(response){
JetSearch.suggestionsPreloader(showSpinner, 'hide', spinner);
if('inline'===listPosition){
response.map(function(suggestion){
suggestion['name']=JetSearch.escapeHTML(suggestion['name']);
suggestion['fullName']=JetSearch.escapeHTML(suggestion['name']);
if(0 < options.maxLength){
suggestion['name']=JetSearch.trimString(suggestion['name'], options.maxLength);
}
outputHtml +=inlineItemTemplate(suggestion);
});
$(self).html(outputHtml);
}else if('focus'===listPosition){
response.map(function(suggestion){
suggestion['name']=JetSearch.escapeHTML(suggestion['name']);
suggestion['fullName']=JetSearch.escapeHTML(suggestion['name']);
if(0 < options.maxLength){
suggestion['name']=JetSearch.trimString(suggestion['name'], options.maxLength);
}
if(options.value&&("yes"===hightlightText||true===hightlightText) ){
suggestion['name']=highlightMatches(suggestion['name']);
}
outputHtml +=focusItemTemplate(suggestion);
});
$(settings.focusHolderClass, self).html(outputHtml);
}}
}
const errorCallback=function(jqXHR){
if('abort'!==jqXHR.statusText){
JetSearch.suggestionsPreloader(showSpinner, 'hide', spinner);
}};};
$.fn.jetAjaxSearchSuggestions=function(args){
let self=this[0],
settings=args,
options=$(self).data('settings')||{},
timer=null,
showformList=options['show_search_suggestions_list_inline']||false,
showfocusList=options['show_search_suggestions_list_on_focus']||false,
formListType=options['search_suggestions_list_inline']||false,
focusListType=options['search_suggestions_list_on_focus']||false,
searchSuggestionsLimit=options['search_suggestions_quantity_limit']||10,
inlineLimit=options['search_suggestions_list_inline_quantity']||5,
focusLimit=options['search_suggestions_list_on_focus_quantity']||5,
showSpinner=options['show_search_suggestions_list_on_focus_preloader']||'',
hightlightText=options['highlight_searched_text']||'',
spinner=$(settings.spinnerClass, self),
formFocusClass=settings.searchFormClass.replace('.', '') + '--focus',
form=$(settings.searchFormClass, self),
focusTarget=$(settings.focusHolderClass, self),
disableInputs=false,
customResultUrl=options['search_results_url']||'',
useSession='false',
focusItem;
if(window.elementorFrontend){
var editMode=Boolean(window.elementorFrontend.isEditMode())
}else{
var editMode=false;
}
if(!self.isInit){
self.isInit=true;
self.ajaxSettings=window[ settings.handlerId ]['searchSuggestions']||{};
customResultUrl=$.trim(customResultUrl);
useSession=self.ajaxSettings.use_session;
self.selectSuggestion=function(event){
const keyCode=event.keyCode||event.which;
const $target=$(event.currentTarget);
let value=$target.attr('aria-label');
if(! value){
return;
}
value=value.trim();
if(false===disableInputs&&!editMode){
if('keydown'===event.type){
if(13===keyCode){
disableInputs=true;
$(settings.inputClass, self)[0].value=value;
JetSearch.setFormSuggestion(value, form, customResultUrl);
}}else if('click'===event.type){
disableInputs=true;
$(settings.inputClass, self)[0].value=value;
JetSearch.setFormSuggestion(value, form, customResultUrl);
}}
}
self.focusItemsNav=function(){
focusItem=$('.jet-search-suggestions__focus-area-item', self);
if(0 < focusItem.length){
focusItem.on('keydown', function(e){
const keyCode=e.keyCode||e.which;
switch(keyCode){
case 40:
e.preventDefault();
var next=$(this).next();
if(next.length > 0){
focusItem.removeClass('focused');
next.addClass('focused');
next.focus();
}
break;
case 38:
e.preventDefault();
var prev=$(this).prev();
if(prev.length > 0){
focusItem.removeClass('focused');
prev.addClass('focused');
prev.focus();
}else{
focusItem.removeClass('focused');
$(settings.inputClass, self).focus();
}
break;
case 13:
e.preventDefault();
let value=e.target.innerText.trim();
$(settings.inputClass, self)[0].value=value;
JetSearch.setFormSuggestion(value, form, customResultUrl);
break;
}
if($(this).is(':focus-visible') ){
focusItem.removeClass('focused');
}});
}}
if(formListType||focusListType){
if(''!=formListType&&("yes"===showformList||true===showformList) ){
let listOptions={
list_position: 'inline',
list_type: formListType,
limit: inlineLimit,
maxLength: options.search_suggestions_list_inline_item_title_length,
};
if('manual'===formListType){
listOptions.manual_list=options['search_suggestions_list_inline_manual'];
}
$(settings.inlineClass, self).getSuggestionsList(listOptions, settings, showSpinner, false, ()=> {
let inlineItem=$('.jet-search-suggestions__inline-area-item', self);
if(0 < inlineItem.length){
inlineItem.on('focus', function (){
if($(this).is(':focus-visible') ){
self.hideList();
}});
}
inlineItem.on('keydown', function(e){
const keyCode=e.keyCode||e.which;
let value=$(this).attr('aria-label');
if(! value){
return;
}
value=value.trim();
if(13===keyCode){
$(settings.inputClass, self)[0].value=value;
JetSearch.setFormSuggestion(value, form, customResultUrl);
}});
});
}
if(''!=focusListType&&("yes"===showfocusList||true===showfocusList) ){
let listOptions={
list_position: 'focus',
list_type: focusListType,
limit: focusLimit,
maxLength: options.search_suggestions_list_on_focus_item_title_length||0,
};
if('manual'===focusListType){
listOptions.manual_list=options['search_suggestions_list_on_focus_manual'];
}
$(settings.focusClass, self).getSuggestionsList(listOptions, settings, showSpinner, false, ()=> {
self.focusItemsNav();
});
}}
self.inputChangeHandler=function(event){
let value=$(event.target).val(),
listOptions={
list_position: 'focus',
value: value,
limit: searchSuggestionsLimit,
maxLength: options.search_suggestions_list_on_focus_item_title_length||0,
};
if(''!=value){
focusTarget.empty();
self.showList();
JetSearch.suggestionsPreloader(showSpinner, 'show', spinner);
clearTimeout(timer);
timer=setTimeout(function(){
$(settings.focusClass, self).getSuggestionsList(listOptions, settings, showSpinner, hightlightText, ()=> {
self.focusItemsNav();
});
}, 450);
}else{
clearTimeout(timer);
focusTarget.empty();
JetSearch.suggestionsPreloader(showSpinner, 'hide', spinner);
if(false!=focusListType&&("yes"===showfocusList||true===showfocusList) ){
JetSearch.suggestionsPreloader(showSpinner, 'show', spinner);
listOptions.limit=focusLimit;
if('manual'===focusListType){
listOptions.list_type=focusListType;
listOptions.manual_list=options['search_suggestions_list_on_focus_manual'];
}
$(settings.focusClass, self).getSuggestionsList(listOptions, settings, showSpinner, false, ()=> {
self.focusItemsNav();
});
}}
};
self.hideList=function(event){
$(settings.focusClass, self).removeClass('show');
$('.chosen-single', self).removeClass('focused');
if(focusItem&&0 < focusItem.length){
focusItem.removeClass('focused');
}};
self.showList=function(){
$(settings.focusClass, self).addClass('show');
};
self.focusHandler=function(event){
$(settings.searchFormClass, self).addClass(formFocusClass);
self.showList();
};
self.chosenFocusHandler=function(){
self.hideList();
};
self.formClick=function(event){
event.stopPropagation();
};
self.changeHandler=function(event){
let target=$(event.target),
settingsInput=$(settings.settingsInput, self),
querySettings=JSON.parse(settingsInput.val()),
globalQuerySettings=$(self).data('settings');
querySettings.category__in=target.val();
globalQuerySettings.category__in=target.val();
settingsInput.val(JSON.stringify(querySettings) );
$(self).data('settings', globalQuerySettings);
self.inputChangeHandler({ target: $(settings.inputClass, self) })
};
self.formSubmit=function(event){
let keyCode=event.keyCode||event.which;
if(false===disableInputs){
let value=event.target.value;
if(13===keyCode&&value.length!=0){
disableInputs=true;
event.preventDefault();
JetSearch.setFormSuggestion(value, form, customResultUrl);
}}
if(40===keyCode){
if(focusItem&&0 < focusItem.length){
event.preventDefault();
focusItem.removeClass('focused');
focusItem.first().addClass('focused');
focusItem.first().focus();
}}
}
self.blurHandler=function(event){
$(settings.searchFormClass, self).removeClass(formFocusClass);
};
self.clickFullResults=function(event){
if(false===disableInputs){
disableInputs=true;
var searchInput=$(settings.inputClass, self),
value=searchInput.val();
event.preventDefault();
JetSearch.setFormSuggestion(value, form, customResultUrl);
}};
$(settings.inputClass, self)
.on('input' + settings.searchClass, self.inputChangeHandler)
.on('focus' + settings.searchClass, self.focusHandler)
.on('blur' + settings.searchClass, self.blurHandler)
.on('keydown' + settings.searchClass, self.formSubmit);
$(settings.submitClass, self).on('click' + settings.searchClass, self.clickFullResults);
$(self)
.on('click' + settings.searchClass, settings.focusItemClass, self.selectSuggestion)
.on('click keydown' + settings.searchClass, settings.inlineItemClass, self.selectSuggestion)
.on('click' + settings.searchClass, self.formClick)
.on('change', settings.chosenClass, self.changeHandler)
.on('touchend' + settings.searchClass, self.formClick)
.on('chosen:showing_dropdown', settings.chosenClass, self.chosenFocusHandler);
$(self).on('keydown', function(e){
const keyCode=e.keyCode||e.which;
if(9===keyCode){
setTimeout(()=> {
const focusedElement=document.activeElement;
if($(focusedElement).is('.chosen-search-input') ){
$('.chosen-single', self).addClass('focused');
}else{
$('.chosen-single', self).removeClass('focused');
}
if($(focusedElement).is('.jet-search-suggestions__inline-area-item') ){
self.hideList();
}}, 50);
}});
$(settings.inputClass, self).on('click' + settings.searchClass, ()=> {
$('.chosen-single', self).removeClass('focused');
});
$('body')
.on('click' + settings.searchClass, self.hideList)
.on('touchend' + settings.searchClass, self.hideList);
if('0'!==$(settings.chosenClass, self).val()){
$(settings.chosenClass, self).trigger('change');
}}
};
$.fn.jetAjaxSearch=function(args){
var self=this[0],
settings=args,
timer=null,
itemTemplate=null,
resultsArea=$(settings.resultsAreaClass, self),
resultsHolder=$(settings.listHolderClass, resultsArea),
resultsHeader=$(settings.resultsHeaderClass, resultsArea),
resultsFooter=$(settings.resultsFooterClass, resultsArea),
countHolder=$(settings.countClass, resultsArea),
fullResults=$(settings.fullResultsClass, resultsArea),
resultsList=$(settings.listClass, resultsArea),
resultsListInner=$(settings.listInnerClass, resultsArea),
resultsHeaderNav=$(settings.navigationClass, resultsHeader),
resultsFooterNav=$(settings.navigationClass, resultsFooter),
messageHolder=$(settings.messageHolderClass, resultsArea),
spinner=$(settings.spinnerClass, resultsArea),
form=$(settings.searchFormClass, self),
resultsSuggestions=$(settings.resultsSuggestionsAreaClass, self),
inlineSuggestions=$(settings.inlineSuggestionsAreaClass, self),
data=$(self).data('settings')||[],
customResultUrl=data['search_results_url']||'',
hightlightText=data['highlight_searched_text']||'',
formFocusClass=settings.searchFormClass.replace('.', '') + '--focus',
searchLogging=data['search_logging']||'',
currentPosition=1,
lang='',
disableInputs=false,
allowEmptyString=false,
allowSubmitOnEnter=1,
urlParams=JetSearch.getUrlParams(),
listingID=data['listing_id']||'',
categoryIndex=urlParams.jet_ajax_search_categories||'',
getResultsOnFocus=true,
maxUserSearches=20,
showSearchSuggestions=data['show_search_suggestions']||false,
suggestionsTitle='',
suggestionsType=data['search_suggestions_source']||false,
suggestionsPosition=data['search_suggestions_position']||false,
searchSuggestionsLimits=data['search_suggestions_limits']||20,
storedUserSearches=JSON.parse(localStorage.getItem('jetUserSearches'))||[],
suggestionsList=[];
if('yes'===data.search_by_empty_value||true===data.search_by_empty_value){
allowEmptyString=true;
}
if(!self.isInit){
self.isInit=true;
self.ajaxRequest=null;
self.suggestionsListLoaded=false;
if(data.hasOwnProperty('lang')){
lang=data.lang;
delete data.lang;
}
self.ajaxSettings=window[ settings.handlerId ]||{};
self.suggestionsSettings=window['jetSearchSettings']['searchSuggestions']||{};
if(self.ajaxSettings['ajaxSearchSuggestionsLimits']){
maxUserSearches=self.ajaxSettings['ajaxSearchSuggestionsLimits'];
}
if('yes'===data.submit_on_enter||true===data.submit_on_enter){
allowSubmitOnEnter=false;
}else{
allowSubmitOnEnter=true;
}
if(''===self.ajaxSettings.sumbitOnEnter){
allowSubmitOnEnter=false;
}
if(window.elementorFrontend){
var editMode=Boolean(window.elementorFrontend.isEditMode())
}else{
var editMode=false;
}
self.suggestionsListHTML=function(suggestionsList){
let resultsSuggestionsTemplate=wp.template('jet-ajax-search-results-suggestion-item'),
inlineSuggestionsTemplate=wp.template('jet-ajax-search-inline-suggestion-item'),
inlineOutputHtml='',
resultsOutputHtml='';
suggestionsList.forEach(item=> {
let inlineListItemHtml='',
resultsListItemHtml='',
maxLength=data.search_suggestions_item_title_length||0,
suggestionItem={};
suggestionItem['fullName']=JetSearch.escapeHTML(item);
suggestionItem['name']=JetSearch.escapeHTML(item);
if(0 < maxLength){
suggestionItem['name']=JetSearch.trimString(suggestionItem['name'], maxLength);
}
if('under_form'===suggestionsPosition){
inlineListItemHtml=inlineSuggestionsTemplate(suggestionItem);
}else if('inside_results_area'===suggestionsPosition){
resultsListItemHtml=resultsSuggestionsTemplate(suggestionItem);
}
inlineOutputHtml  +=inlineListItemHtml;
resultsOutputHtml +=resultsListItemHtml;
});
if('under_form'===suggestionsPosition){
suggestionsTitle=inlineSuggestions.html();
inlineSuggestions.html(inlineOutputHtml).prepend(suggestionsTitle);
}else if('inside_results_area'===suggestionsPosition){
suggestionsTitle=resultsSuggestions.html();
resultsSuggestions.html(resultsOutputHtml).prepend(suggestionsTitle);
}};
self.showSuggestions=function(){
if(suggestionsType){
if('popular'===suggestionsType){
if(false===window.bricksIsFrontend){
let sendData={
list_type: 'popular',
value: '',
limit: searchSuggestionsLimits
},
ajaxData={
action: self.ajaxSettings['searchSuggestions'].get_action,
data: sendData||{},
};
$.ajax({
type: 'GET',
url: self.ajaxSettings['searchSuggestions'].get_suggestions_rest_api_url,
data: ajaxData,
dataType: 'json',
cache: false,
processData: true,
error: function(jqXHR, textStatus, errorThrown){
errorCallback(jqXHR);
},
success: function(response, textStatus, jqXHR){
if(response.length){
suggestionsList=$.map(response, function(obj){
return obj.name;
});
self.suggestionsListLoaded=true;
if(suggestionsList.length){
suggestionsList=suggestionsList.slice(0, searchSuggestionsLimits);
self.suggestionsListHTML(suggestionsList);
}else{
resultsSuggestions.hide();
inlineSuggestions.hide();
}}
}});
}else{
suggestionsList=self.ajaxSettings['ajaxSearchPopularSuggestions']||[];
if(suggestionsList.length){
suggestionsList=suggestionsList.slice(0, searchSuggestionsLimits);
self.suggestionsListHTML(suggestionsList);
}else{
resultsSuggestions.hide();
inlineSuggestions.hide();
}}
}else if('user'===suggestionsType){
let userSearches=localStorage.getItem('jetUserSearches');
if(userSearches){
suggestionsList=JSON.parse(userSearches)||[];
suggestionsList.reverse();
suggestionsList=suggestionsList.slice(0, searchSuggestionsLimits);
self.suggestionsListHTML(suggestionsList);
}else{
resultsSuggestions.hide();
inlineSuggestions.hide();
}}
}};
if('yes'===showSearchSuggestions||true===showSearchSuggestions){
self.showSuggestions();
}
self.inputChangeHandler=function(event){
var value=$(event.target).val(),
symbolNumberForStart='number'===$.type(data.symbols_for_start_searching) ? data.symbols_for_start_searching:2;
value=value.replace(/\u3000/g, ' ');
if('number'===$.type(symbolNumberForStart)&&symbolNumberForStart > value.length){
if('inside_results_area'===suggestionsPosition&&suggestionsList.length){
resultsHeader.hide();
resultsFooter.hide();
resultsList.hide();
resultsSuggestions.show();
resultsSuggestions.addClass('active');
resultsHolder.addClass('show');
self.showList();
}else{
self.hideList();
}
return false;
}
if('inside_results_area'===suggestionsPosition&&suggestionsList.length){
resultsSuggestions.removeClass('active');
resultsHeader.show();
resultsFooter.show();
resultsList.show();
}
resultsHolder.removeClass('show');
self.outputMessage('', '');
resultsListInner.css('transform', 'translateX(0)');
resultsList.css('height', 'auto');
if(value){
self.showList();
spinner.addClass('show');
clearTimeout(timer);
timer=setTimeout(function(){
data.value=value;
data.deviceMode=window.elementorFrontend&&window.elementorFrontend.getCurrentDeviceMode() ? window.elementorFrontend.getCurrentDeviceMode():JetSearch.getCurrentDeviceMode();
self.ajaxSendData(data, lang);
}, 450);
}else{
self.hideList();
}};
self.successCallback=function(response){
if(response.error){
spinner.removeClass('show');
self.outputMessage(data.server_error, 'error show');
return;
}
JetSearch.enqueueAssetsFromResponse(response);
var responseData=response.data,
error=responseData.error,
message=responseData.message,
posts=responseData.posts,
listingItems=responseData.listing_items,
post=null,
outputHtml='',
listItemHtml='',
listHtml='<div class="' + settings.listSlideClass.replace('.', '') + '">%s</div>',
searchSources=responseData.sources,
searchSourcesBeforePosts=null,
searchSourcesAfterPosts=null,
countAllResults=null,
searchSourcesHolder=$('.jet-ajax-search__source-results-holder', self);
resultsHolder.removeClass('show');
spinner.removeClass('show');
currentPosition=1;
searchSourcesHolder.remove();
resultsListInner.html('');
resultsHeaderNav.html('');
resultsFooterNav.html('');
searchSourcesBeforePosts=searchSources
.filter(item=> item.priority < 0&&''!=item.content)
.sort(( a, b)=> a.priority - b.priority);
searchSourcesAfterPosts=searchSources
.filter(item=> item.priority > 0&&''!=item.content)
.sort(( a, b)=> a.priority - b.priority);
if(''!=listingID&&0!==responseData.post_count&&!error){
var outputHtml='',
listItemHtml='',
listHtml='<div class="jet-listing-grid__items jet-listing-base ' + settings.listSlideClass.replace('.', '') + '">%s</div>';
if(listingItems.length){
$.each(listingItems,(i, item)=> {
listItemHtml +=item;
if(( parseInt(i) + 1) % responseData.limit_query==0||parseInt(i)===listingItems.length - 1){
outputHtml +=listHtml.replace('%s', listItemHtml);
listItemHtml='';
}});
}
messageHolder.removeClass('show');
countAllResults=responseData.post_count;
if(responseData.sources_results_count&&0 < responseData.sources_results_count){
countAllResults +=responseData.sources_results_count;
}
$('span', countHolder).html(countAllResults);
resultsListInner
.html(outputHtml)
.data('columns', responseData.columns);
Promise.all(JetSearch.assetsPromises).then(function(){
JetSearch.initElementsHandlers(resultsListInner);
JetSearch.reinitBricksScripts(self);
JetSearch.assetsPromises=[];
});
resultsHeaderNav.html(responseData.results_navigation.in_header);
resultsFooterNav.html(responseData.results_navigation.in_footer);
if(!countHolder[0]&&!responseData.results_navigation.in_header){
resultsHeader.addClass('is-empty');
}else{
resultsHeader.removeClass('is-empty');
}
if(!fullResults[0]&&!responseData.results_navigation.in_footer){
resultsFooter.addClass('is-empty');
}else{
resultsFooter.removeClass('is-empty');
}
resultsList.css('height', 'auto');
$(document).trigger('jet-ajax-search/show-results/listing', [ resultsListInner ]);
resultsHolder.addClass('show');
if('yes'===searchLogging||true===searchLogging){
let itemWrapper=settings.itemClass,
itemLink=$('.jet-engine-listing-overlay-wrap', itemWrapper),
itemTitle='.jet-ajax-search-item-title .jet-listing-dynamic-field__content',
itemUrlAttr='data-url';
$(document).trigger('jet-ajax-search/results-area/listing-add-suggestion', [ self, itemWrapper, itemLink, itemTitle, itemUrlAttr ]);
JetSearch.addSuggestionFromResultAreaItem(itemWrapper, itemLink, itemTitle, itemUrlAttr);
}}
const allowedHighlightFields=[ 'title', 'after_content', 'after_title', 'before_content', 'before_title', 'content', 'price' ];
function highlightMatches(item){
let searched=responseData.search_value.trim();
if(searched!==""){
let reg=new RegExp("[\>][^\<]*"+searched+"[^\<]*[\<]","gi"),
reg2=new RegExp(searched, "gi"),
regHtml=new RegExp("<\/?[a-z](.*?)[\s\S]*>", "gi");
if(reg.test(item) ){
item=item.replace(reg, function(item){
let subRegex=new RegExp(searched, "gi");
return item.replace(subRegex,`<mark>${searched}</mark>`);
});
}
if(regHtml.test(item) ){
return item;
}else{
item=item.replace(reg2, str=> `<mark>${str}</mark>`);
}}
return item;
}
function highlightFields(fields, allowHighlightFields){
$.each(fields, function(key, value){
if(-1!=$.inArray(key, allowHighlightFields)&&(null!=value&&''!=value) ){
fields[key]=highlightMatches(value);
}});
return fields;
}
if(0!==responseData.post_count&&!error&&''===listingID){
messageHolder.removeClass('show');
itemTemplate=wp.template('jet-ajax-search-results-item');
for(post in posts){
if(responseData.search_highlight&&true===responseData.search_highlight){
if(''!=hightlightText&&("yes"===hightlightText||true===hightlightText) ){
highlightFields(posts[post], allowedHighlightFields);
}}
if(posts[post].is_product){
let productType=posts[post].product_type,
productTypeClass='add-to-cart-button';
if('product_type_variable'===productType){
productTypeClass='select-options-button';
}
posts[post].add_to_cart='<div class="jet-ajax-search__item-add-to-cart"><button data-quantity="1" class="jet-ajax-search__results-item-cart-button ' + productTypeClass + '" data-product_id="' + posts[post].product_id + '" data-product_sku="' + posts[post].product_sku + '" aria-label="' + posts[post].product_label + '" data-product_url="' + posts[post].product_url + '" rel="nofollow" target="_blank">' + posts[post].product_add_text + '</button></div>';
}
let templateResult=itemTemplate(posts[post]);
listItemHtml +=templateResult;
if((parseInt(post) + 1) % responseData.limit_query==0||parseInt(post)===posts.length - 1){
outputHtml +=listHtml.replace('%s', listItemHtml);
listItemHtml='';
}}
countAllResults=responseData.post_count;
if(responseData.sources_results_count&&0 < responseData.sources_results_count){
countAllResults +=responseData.sources_results_count;
}
$('span', countHolder).html(countAllResults);
resultsListInner
.html(outputHtml)
.data('columns', responseData.columns);
$('.jet-ajax-search__results-item-cart-button.add-to-cart-button', self).on('click', function(e){
e.preventDefault();
let _this=$(this);
if(_this.attr('data-product_id') ){
let addToCartData={};
$.each(_this[0].dataset, function(key, value){
addToCartData[ key ]=value;
});
_this.prop('disabled', true);
$.ajax({
type: 'POST',
url: wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'add_to_cart'),
dataType: 'json',
data: addToCartData,
success: function(response){
$(document.body).trigger('wc_fragment_refresh');
$(document.body).trigger('added_to_cart');
_this.prop('disabled', false);
},
error: function(xhr, status, error){
_this.prop('disabled', false);
}});
}});
$('.jet-ajax-search__results-item-cart-button.select-options-button', self).on('click', function(e){
e.preventDefault();
const productUrl=$(this).data('product_url');
window.open(productUrl, '_blank');
});
resultsHeaderNav.html(responseData.results_navigation.in_header);
resultsFooterNav.html(responseData.results_navigation.in_footer);
if(!countHolder[0]&&!responseData.results_navigation.in_header){
resultsHeader.addClass('is-empty');
}else{
resultsHeader.removeClass('is-empty');
}
if(!fullResults[0]&&!responseData.results_navigation.in_footer){
resultsFooter.addClass('is-empty');
}else{
resultsFooter.removeClass('is-empty');
}
resultsHolder.addClass('show');
$(document).trigger('jet-ajax-search/show-results', [ resultsHolder ]);
var inputField=$('.jet-ajax-search__field', self),
resultsItem=$('.jet-ajax-search__item-link', self),
focusedItem=resultsItem.filter(':focus');
inputField.on('keydown', function(e){
const keyCode=e.keyCode||e.which;
if(40===keyCode){
e.preventDefault();
var position=currentPosition - 1,
activeSlide=$(settings.listSlideClass, resultsListInner).eq(position),
next=activeSlide.find('.jet-ajax-search__item-link').first();
if(focusedItem.length===0){
setTimeout(()=> {
resultsItem.removeClass('focused');
next.addClass('focused');
next.focus();
}, 0);
}}
});
resultsItem.on('keydown', function(e){
const keyCode=e.keyCode||e.which;
switch(keyCode){
case 40:
e.preventDefault();
var next=$(this).parent().next().find('.jet-ajax-search__item-link').first();
if(0 < next.length){
resultsItem.removeClass('focused');
next.addClass('focused');
next.focus();
}
break;
case 38:
e.preventDefault();
var prev=$(this).parent().prev().find('.jet-ajax-search__item-link').first();
if(0 < prev.length){
resultsItem.removeClass('focused');
prev.addClass('focused');
prev.focus();
}else{
resultsItem.removeClass('focused');
inputField.focus();
}
break;
case 37:
var prevSlide=$(this).closest('.jet-ajax-search__results-slide').prev();
if(0 < prevSlide.length){
$(settings.prevClass + ':not(' + settings.disableNavClass + ')').click();
resultsItem.removeClass('focused');
setTimeout(()=> {
$(settings.listSlideClass, resultsListInner).eq(currentPosition - 1).find('.jet-ajax-search__item-link').first().focus().addClass('focused');
}, 350);
}
break;
case 39:
var nextSlide=$(this).closest('.jet-ajax-search__results-slide').next();
if(0 < nextSlide.length){
$(settings.nextClass + ':not(' + settings.disableNavClass + ')').click();
resultsItem.removeClass('focused');
setTimeout(()=> {
$(settings.listSlideClass, resultsListInner).eq(currentPosition - 1).find('.jet-ajax-search__item-link').first().focus().addClass('focused');
}, 350);
}
break;
case 9:
resultsItem.removeClass('focused');
break;
}});
if('yes'===searchLogging||true===searchLogging){
let	itemWrapper=settings.itemClass,
resultAreaItemLink=$('.jet-ajax-search__item-link', itemWrapper),
resultAreaItemTitle='.jet-ajax-search__item-title',
resultAreaItemUrlAttr='href';
JetSearch.addSuggestionFromResultAreaItem(itemWrapper, resultAreaItemLink, resultAreaItemTitle, resultAreaItemUrlAttr);
}
searchSourcesBeforePosts.forEach(function(item){
self.maybeHasListing(item);
resultsListInner.before(item.content);
resultsHolder.addClass('show');
});
searchSourcesAfterPosts.forEach(function(item){
self.maybeHasListing(item);
resultsListInner.after(item.content);
resultsHolder.addClass('show');
});
}else{
if(searchSourcesBeforePosts.length||searchSourcesAfterPosts.length){
searchSourcesBeforePosts.forEach(function(item){
self.maybeHasListing(item);
resultsListInner.before(item.content);
resultsHolder.addClass('show');
});
searchSourcesAfterPosts.forEach(function(item){
self.maybeHasListing(item);
resultsListInner.after(item.content);
resultsHolder.addClass('show');
});
countAllResults=responseData.post_count;
if(responseData.sources_results_count&&0 < responseData.sources_results_count){
countAllResults +=responseData.sources_results_count;
}
$('span', countHolder).html(countAllResults);
}else{
self.outputMessage(message, 'show');
}}
};
self.maybeHasListing=function(item){
if(typeof item.listing_template!=='undefined'&&true===item.listing_template){
Promise.all(JetSearch.assetsPromises).then(function(){
JetSearch.initElementsHandlers(resultsListInner);
JetSearch.reinitBricksScripts(self);
JetSearch.assetsPromises=[];
});
}}
self.errorCallback=function(jqXHR){
if('abort'!==jqXHR.statusText){
spinner.removeClass('show');
self.outputMessage(data.server_error, 'error show');
}};
self.ajaxSendData=function(sendData, lang=''){
let filteredData={};
Object.keys(sendData).forEach(key=> {
if(sendData[key]!=='' &&
sendData[key]!==null &&
sendData[key]!==undefined &&
!(Array.isArray(sendData[key])&&sendData[key].length===0)
){
filteredData[key]=sendData[key];
}});
var ajaxData={
action: self.ajaxSettings.action,
nonce: self.ajaxSettings.nonce,
data: filteredData||{}};
if(''!=lang){
ajaxData.lang=lang;
}
const isRestAPI=self.ajaxSettings.rest_api_url&&self.ajaxSettings.rest_api_url.includes('/wp-json/');
self.ajaxRequest=jQuery.ajax({
type: 'GET',
url: self.ajaxSettings.rest_api_url,
data: ajaxData,
dataType: 'json',
cache: false,
processData: true,
beforeSend: function(jqXHR, ajaxSettings){
if(null!==self.ajaxRequest){
self.ajaxRequest.abort();
}
if(isRestAPI){
jqXHR.setRequestHeader('X-WP-Nonce', self.ajaxSettings.nonce);
}},
error: function(jqXHR, textStatus, errorThrown){
self.errorCallback(jqXHR);
},
success: function(response, textStatus, jqXHR){
self.successCallback(response);
}});
};
self.hideList=function(){
resultsArea.removeClass('show');
$('.chosen-single', self).removeClass('focused');
};
self.showList=function(){
resultsArea.addClass('show');
};
self.focusHandler=function(event){
var value=event.target.value,
symbolNumberForStart='number'===$.type(data.symbols_for_start_searching) ? data.symbols_for_start_searching:2;
$(settings.searchFormClass, self).addClass(formFocusClass);
if('inside_results_area'===suggestionsPosition&&suggestionsList.length){
if(value&&getResultsOnFocus){
spinner.addClass('show');
data.value=value;
data.deviceMode=window.elementorFrontend&&window.elementorFrontend.getCurrentDeviceMode() ? window.elementorFrontend.getCurrentDeviceMode():JetSearch.getCurrentDeviceMode();
self.ajaxSendData(data, lang);
getResultsOnFocus=false;
}
if(''===value){
resultsHeader.hide();
resultsFooter.hide();
resultsList.hide();
resultsSuggestions.addClass('active');
resultsHolder.addClass('show');
self.showList();
}}
if('number'===$.type(symbolNumberForStart)&&symbolNumberForStart > value.length){
return;
}
self.showList();
};
self.blurHandler=function(event){
$(settings.searchFormClass, self).removeClass(formFocusClass);
};
self.outputMessage=function(message, messageClass){
message=message.replace(/\\/g, '');
message=message.replace(/\\*"/g, '');
messageHolder.removeClass('error show').addClass(messageClass).html(message);
};
self.formClick=function(event){
event.stopPropagation();
};
self.clickFullResults=function(event){
var searchInput=$(settings.inputClass, self),
value=searchInput.val(),
url=JetSearch.getResultsUrl(form);
event.preventDefault();
if(value.length!=0||true===allowEmptyString){
if(false===disableInputs){
disableInputs=true;
value=value.replace(/\u3000/g, ' ');
searchInput.val(value);
if(''!=customResultUrl){
customResultUrl=$.trim(customResultUrl);
url=JetSearch.getResultsUrl(form, customResultUrl);
}
if('yes'===showSearchSuggestions||true===showSearchSuggestions){
self.addUserSearch(value);
}
if('yes'===searchLogging||true===searchLogging){
JetSearch.setFormSuggestion(value, form, url);
}else{
window.location.href=url;
}}
}};
self.changeSlide=function(number){
var currentSlide=$(settings.listSlideClass, resultsListInner).eq(number),
direction=settings.isRtl ? 1:-1,
position=number * 100 * direction;
currentSlide.scrollTop(0);
resultsListInner.css('transform', 'translateX(' + position + '%)');
resultsList.css('height', 'auto');
};
self.clickBulletHandler=function(event){
var target=$(event.target);
currentPosition=target.data('number');
self.syncNavigation();
self.changeSlide(currentPosition - 1);
};
self.clickNavigationButtonHandler=function(event){
var target=$(event.target),
direction=target.data('direction');
currentPosition=currentPosition + direction;
self.syncNavigation();
self.changeSlide(currentPosition - 1);
};
self.syncNavigation=function(){
var lastPosition=resultsListInner.data('columns'),
disableClass=settings.disableNavClass.replace('.', ''),
activeClass=settings.activeNavClass.replace('.', '');
$(settings.activeNavClass, self).removeClass(activeClass);
$(settings.disableNavClass, self).removeClass(disableClass);
$(settings.navButtonClass + '[data-number="' + currentPosition +'"]', self).addClass(activeClass);
if(1===currentPosition){
$(settings.prevClass, self).addClass(disableClass);
}
if(lastPosition===currentPosition){
$(settings.nextClass, self).addClass(disableClass);
}};
self.formSubmit=function(event){
var value=event.target.value,
url=JetSearch.getResultsUrl(form);
if(( 1 > value.length&&false===allowEmptyString)&&(13===event.keyCode||'click'===event.type) ){
return false;
}else{
if(13===event.keyCode&&allowSubmitOnEnter){
if(false===disableInputs){
disableInputs=true;
event.preventDefault();
if(''!=customResultUrl){
customResultUrl=$.trim(customResultUrl);
url=JetSearch.getResultsUrl(form, customResultUrl);
}
self.addUserSearch(value);
if('yes'===searchLogging||true===searchLogging){
JetSearch.setFormSuggestion(value, form, url);
}else{
window.location.href=url;
}}
}}
};
self.changeHandler=function(event){
var target=$(event.target),
globalQuerySettings=$(self).data('settings');
globalQuerySettings.category__in=target.val();
data.category__in=target.val();
$(self).data('settings', globalQuerySettings);
self.inputChangeHandler({ target: $(settings.inputClass, self) })
};
self.chosenFocusHandler=function(){
self.hideList();
};
self.setResultsAreaWidth=function(){
if('fields_holder'!==data.results_area_width_by){
return;
}
resultsArea.css('width', $(settings.fieldsHolderClass, self).outerWidth());
};
self.addUserSearch=function(newSearchRequest){
if('user'===suggestionsType){
newSearchRequest=newSearchRequest.trim();
if(! storedUserSearches.some(search=> search===newSearchRequest) ){
if(storedUserSearches.length >=maxUserSearches){
storedUserSearches.shift();
}
storedUserSearches.push(newSearchRequest);
localStorage.setItem('jetUserSearches', JSON.stringify(storedUserSearches) );
}}
}
self.selectSuggestion=function(event){
const keyCode=event.keyCode||event.which;
const $target=$(event.currentTarget);
let value=$target.attr('aria-label');
if(! value){
return;
}
value=value.trim();
let url=null;
if(false===disableInputs&&!editMode){
if('keydown'===event.type){
if(13===keyCode){
disableInputs=true;
$(settings.inputClass, self)[0].value=value;
self.addUserSearch(value);
url=JetSearch.getResultsUrl(form);
if(''!=customResultUrl){
customResultUrl=$.trim(customResultUrl);
url=JetSearch.getResultsUrl(form, customResultUrl);
}
if('yes'===searchLogging||true===searchLogging){
JetSearch.setFormSuggestion(value, false, url);
}else{
window.location.href=url;
}}
}else if('click'===event.type){
disableInputs=true;
$(settings.inputClass, self)[0].value=value;
self.addUserSearch(value);
url=JetSearch.getResultsUrl(form);
if(''!=customResultUrl){
customResultUrl=$.trim(customResultUrl);
url=JetSearch.getResultsUrl(form, customResultUrl);
}
if('yes'===searchLogging||true===searchLogging){
JetSearch.setFormSuggestion(value, false, url);
}else{
window.location.href=url;
}}
}}
self.customUrlActions={
selectorOnClick: 'a[href^="#jet-engine-action"][href*="event=click"]',
selectorOnHover: 'a[href^="#jet-engine-action"][href*="event=hover"], [data-url^="#jet-engine-action"][data-url*="event=hover"]',
init: function(){
var timeout=null;
$(document).on('click.JetSearch', this.selectorOnClick, function(event){
event.preventDefault();
self.customUrlActions.actionHandler(event)
});
$(document).on('click.JetSearch', this.selectorOnHover, function(event){
if('A'===event.currentTarget.nodeName){
event.preventDefault();
}});
$(document).on({
'mouseenter.JetSearch': function(event){
if(timeout){
clearTimeout(timeout);
}
timeout=setTimeout(function(){
self.customUrlActions.actionHandler(event)
}, window.JetEngineSettings.hoverActionTimeout);
},
'mouseleave.JetSearch': function(){
if(timeout){
clearTimeout(timeout);
timeout=null;
}},
}, this.selectorOnHover);
},
actions: {},
addAction: function(name, callback){
this.actions[ name ]=callback;
},
actionHandler: function(event){
var url=$(event.currentTarget).attr('href')||$(event.currentTarget).attr('data-url');
this.runAction(url);
},
runAction: function(url){
var queryParts=url.split('&'),
settings={};
queryParts.forEach(function(item){
if(-1!==item.indexOf('=') ){
var pair=item.split('=');
settings[ pair[0] ]=decodeURIComponent(pair[1]);
}});
if(! settings.action){
return;
}
var actionCb=this.actions[ settings.action ];
if(! actionCb){
return;
}
actionCb(settings);
}};
self.handleListingItemClick=function(event){
var url=$(this).data('url'),
target=$(this).data('target')||false;
if(url){
event.preventDefault();
if(window.elementorFrontend&&window.elementorFrontend.isEditMode()){
return;
}
if(-1!==url.indexOf('#jet-engine-action') ){
self.customUrlActions.runAction(url);
}else{
if('_blank'===target){
window.open(url);
return;
}
window.location=url;
}}
};
self.isWooAddToCartTrigger=function($target){
if($target.data('product_id')||$target.attr('data-product_id') ){
return true;
}
const href=$target.attr('href')||'';
if(href&&href.includes('add-to-cart=') ){
return true;
}
if($target.closest('form.cart').length){
return true;
}
if($target.is('.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button') ){
return true;
}
return false;
};
self.getWooAddToCartData=function($trigger){
let addToCartData={},
href=$trigger.attr('href')||'',
form=$trigger.closest('form.cart'),
productId=$trigger.attr('data-product_id')||$trigger.data('product_id')||'',
quantity=$trigger.attr('data-quantity')||$trigger.data('quantity')||1;
$.each($trigger[0].dataset||{}, function(key, value){
addToCartData[ key ]=value;
});
if(form.length){
$.each(form.serializeArray(), function(index, field){
if(''!==field.value){
addToCartData[ field.name ]=field.value;
}});
}
if(href&&-1!==href.indexOf('add-to-cart=')&&! productId){
try {
let parsedUrl=new URL(href, window.location.origin),
hrefProduct=parsedUrl.searchParams.get('add-to-cart');
if(hrefProduct){
productId=hrefProduct;
}} catch(e){}}
if(! productId&&addToCartData.product_id){
productId=addToCartData.product_id;
}
if(! productId&&addToCartData['add-to-cart']){
productId=addToCartData['add-to-cart'];
}
if(productId){
addToCartData.product_id=productId;
}
if(quantity&&! addToCartData.quantity){
addToCartData.quantity=quantity;
}
$(document).trigger('jet-ajax-search/resolve-add-to-cart-data', [ addToCartData, $trigger, self ]);
return addToCartData;
};
self.normalizeWooAddToCartData=function(addToCartData){
let normalizedData={};
if(addToCartData.product_id){
normalizedData.product_id=addToCartData.product_id;
}
if(addToCartData.quantity){
normalizedData.quantity=addToCartData.quantity;
}else{
normalizedData.quantity=1;
}
if(addToCartData.variation_id){
normalizedData.variation_id=addToCartData.variation_id;
}
$.each(addToCartData, function(key, value){
if(0===key.indexOf('attribute_') ){
normalizedData[ key ]=value;
}});
return normalizedData;
};
self.handleWooAddToCartInResults=function(event){
const $trigger=$(event.target).closest('.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button, [data-product_id], a[href*="add-to-cart="], form.cart button'
);
if(! $trigger.length||! self.isWooAddToCartTrigger($trigger) ){
return;
}
if('undefined'===typeof wc_add_to_cart_params||! wc_add_to_cart_params.wc_ajax_url){
return;
}
event.preventDefault();
event.stopImmediatePropagation();
if($trigger.prop('disabled')||$trigger.hasClass('loading') ){
return;
}
let addToCartData=self.getWooAddToCartData($trigger);
addToCartData=self.normalizeWooAddToCartData(addToCartData);
if(! addToCartData.product_id){
return;
}
$trigger.addClass('loading').prop('disabled', true);
$(document.body).trigger('adding_to_cart', [ $trigger, addToCartData ]);
$.ajax({
type: 'POST',
url: wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'add_to_cart'),
dataType: 'json',
data: addToCartData,
success: function(response){
if(response&&response.error&&response.product_url){
window.location=response.product_url;
return;
}
if(response&&response.fragments){
$.each(response.fragments, function(key, value){
$(key).replaceWith(value);
});
}
$(document.body).trigger('added_to_cart', [ response.fragments||{}, response.cart_hash||'', $trigger ]);
},
complete: function(){
$trigger.removeClass('loading').prop('disabled', false);
}});
};
$(settings.inputClass, self)
.on('input' + settings.searchClass, self.inputChangeHandler)
.on('focus' + settings.searchClass, self.focusHandler)
.on('blur' + settings.searchClass, self.blurHandler)
.on('keydown' + settings.searchClass, self.formSubmit);
$(settings.submitClass, self).on('click' + settings.searchClass, self.clickFullResults);
$(self)
.on('click' + settings.searchClass, self.formClick)
.on('touchend' + settings.searchClass, self.formClick)
.on('click' + settings.searchClass, settings.fullResultsClass, self.clickFullResults)
.on('click' + settings.searchClass, settings.countClass, self.clickFullResults)
.on('click' + settings.searchClass, settings.bulletClass, self.clickBulletHandler)
.on('click' + settings.searchClass, settings.numberClass, self.clickBulletHandler)
.on('click' + settings.searchClass, settings.prevClass + ':not(' + settings.disableNavClass + ')', self.clickNavigationButtonHandler)
.on('click' + settings.searchClass, settings.nextClass + ':not(' + settings.disableNavClass + ')', self.clickNavigationButtonHandler)
.on('click keydown' + settings.searchClass, settings.inlineSuggestionsItemClass, self.selectSuggestion)
.on('click keydown' + settings.searchClass, settings.resultsSuggestionItemClass, self.selectSuggestion)
.on('change', settings.chosenClass, self.changeHandler)
.on('chosen:showing_dropdown', settings.chosenClass, self.chosenFocusHandler)
.on('click' + settings.searchClass, '.jet-engine-listing-overlay-wrap:not([data-url*="event=hover"])', self.handleListingItemClick)
.on('click' + settings.searchClass,
settings.resultsAreaClass + ' .add_to_cart_button, ' +
settings.resultsAreaClass + ' .ajax_add_to_cart, ' +
settings.resultsAreaClass + ' form.cart .single_add_to_cart_button',
self.handleWooAddToCartInResults
);
if(! allowSubmitOnEnter){
$(window).keydown(function(event){
if(13===event.keyCode&&event.target.className.includes('jet-ajax-search') ){
event.preventDefault();
return false;
}});
}
$(self).on('keydown', function(e){
const keyCode=e.keyCode||e.which;
if(9===keyCode){
setTimeout(()=> {
const focusedElement=document.activeElement;
if($(focusedElement).is('.chosen-search-input') ){
$('.chosen-single', self).addClass('focused');
}else{
$('.chosen-single', self).removeClass('focused');
}}, 50);
}});
$(settings.inputClass, self).on('click' + settings.searchClass, ()=> {
$('.chosen-single', self).removeClass('focused');
});
if(''!=categoryIndex){
let target=$(settings.chosenClass, self),
globalQuerySettings=$(self).data('settings'),
categorySelect=$('.jet-ajax-search__categories-select', self),
currentCategory='';
categorySelect.find('option').each(function(){
var value=$(this).val();
if(value===categoryIndex){
currentCategory=$(this).text();
}});
categorySelect.find('option:contains("' + currentCategory + '")').attr('selected', 'selected');
globalQuerySettings.category__in=target.val();
data.category__in=target.val();
$(self).data('settings', globalQuerySettings);
}else{
if('0'!==$(settings.chosenClass, self).val()){
$(settings.chosenClass, self).trigger('change');
}}
$('body')
.on('click' + settings.searchClass, self.hideList)
.on('touchend' + settings.searchClass, self.hideList);
self.setResultsAreaWidth();
$(window).on('resize' + settings.searchClass, self.setResultsAreaWidth);
$(window).on('orientationchange resize', function (){
resultsListInner.imagesLoaded(function(){
const $firstSlide=$(settings.listSlideClass, resultsListInner).eq(0);
const firstSlideHeight=$firstSlide.length ? $firstSlide.outerHeight():0;
resultsList.css('height', firstSlideHeight > 0 ? firstSlideHeight:'auto');
});
});
}else{
return 'is init: true';
}};
$(window).on('elementor/frontend/init', JetSearch.initElementor);
JetSearch.initBlocks();
window.jetSearchBricks=function(){
JetSearch.initBricks();
}
window.JetSearch=JetSearch;
}(jQuery));
(()=> {
var t={
874: function (t, e){
!(function (t){
"use strict";
function e(t){
for (var e, i, n=1, o=arguments.length; n < o; n++)
for (e in (i=arguments[n])) t[e]=i[e];
return t;
}
var i =
Object.create ||
function (t){
return (n.prototype=t), new n();
};
function n(){}
function o(t, e){
var i,
n=Array.prototype.slice;
return t.bind
? t.bind.apply(t, n.call(arguments, 1))
: ((i=n.call(arguments, 2)),
function (){
return t.apply(e,
i.length ? i.concat(n.call(arguments)):arguments
);
});
}
var s=0;
function r(t){
return "_leaflet_id" in t||(t._leaflet_id=++s), t._leaflet_id;
}
function a(t, e, i){
var n,
o,
s=function (){
(n = !1), o&&(r.apply(i, o), (o = !1));
},
r=function (){
n
? (o=arguments)
: (t.apply(i, arguments), setTimeout(s, e), (n = !0));
};
return r;
}
function h(t, e, i){
var n=e[1],
o=n - (e=e[0]);
return t===n&&i ? t:((((t - e) % o) + o) % o) + e;
}
function l(){
return !1;
}
function c(t, e){
return !1===e
? t
: ((e=Math.pow(10, void 0===e ? 6:e)),
Math.round(t * e) / e);
}
function d(t){
return t.trim ? t.trim():t.replace(/^\s+|\s+$/g, "");
}
function u(t){
return d(t).split(/\s+/);
}
function p(t, e){
for (var n in (Object.prototype.hasOwnProperty.call(t, "options") ||
(t.options=t.options ? i(t.options):{}),
e))
t.options[n]=e[n];
return t.options;
}
function _(t, e, i){
var n,
o=[];
for (n in t)
o.push(encodeURIComponent(i ? n.toUpperCase():n) +
"=" +
encodeURIComponent(t[n])
);
return (e&&-1!==e.indexOf("?") ? "&":"?") + o.join("&");
}
var m=/\{ *([\w_ -]+) *\}/g;
function f(t, e){
return t.replace(m, function (t, i){
if(void 0===(i=e[i]))
throw new Error("No value provided for variable " + t);
return "function"==typeof i ? i(e):i;
});
}
var g =
Array.isArray ||
function (t){
return "[object Array]"===Object.prototype.toString.call(t);
};
function y(t, e){
for (var i=0; i < t.length; i++) if(t[i]===e) return i;
return -1;
}
var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
function w(t){
return (
window["webkit" + t]||window["moz" + t]||window["ms" + t]
);
}
var x=0;
function b(t){
var e=+new Date(),
i=Math.max(0, 16 - (e - x));
return (x=e + i), window.setTimeout(t, i);
}
var P =
window.requestAnimationFrame||w("RequestAnimationFrame")||b,
k =
window.cancelAnimationFrame ||
w("CancelAnimationFrame") ||
w("CancelRequestAnimationFrame") ||
function (t){
window.clearTimeout(t);
};
function T(t, e, i){
if(!i||P!==b) return P.call(window, o(t, e));
t.call(e);
}
function z(t){
t&&k.call(window, t);
}
var C={
__proto__: null,
extend: e,
create: i,
bind: o,
get lastId(){
return s;
},
stamp: r,
throttle: a,
wrapNum: h,
falseFn: l,
formatNum: c,
trim: d,
splitWords: u,
setOptions: p,
getParamString: _,
template: f,
isArray: g,
indexOf: y,
emptyImageUrl: v,
requestFn: P,
cancelFn: k,
requestAnimFrame: T,
cancelAnimFrame: z,
};
function M(){}
(M.extend=function (t){
function n(){
p(this),
this.initialize&&this.initialize.apply(this, arguments),
this.callInitHooks();
}
var o,
s=(n.__super__=this.prototype),
r=i(s);
for (o in (((r.constructor=n).prototype=r), this))
Object.prototype.hasOwnProperty.call(this, o) &&
"prototype"!==o &&
"__super__"!==o &&
(n[o]=this[o]);
if((t.statics&&e(n, t.statics), t.includes)){
var a=t.includes;
if("undefined"!=typeof L&&L && L.Mixin){
a=g(a) ? a:[a];
for (var h=0; h < a.length; h++)
a[h]===L.Mixin.Events &&
console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",
new Error().stack
);
}
e.apply(null, [r].concat(t.includes));
}
return (
e(r, t),
delete r.statics,
delete r.includes,
r.options &&
((r.options=s.options ? i(s.options):{}),
e(r.options, t.options)),
(r._initHooks=[]),
(r.callInitHooks=function (){
if(!this._initHooksCalled){
s.callInitHooks&&s.callInitHooks.call(this),
(this._initHooksCalled = !0);
for (var t=0, e=r._initHooks.length; t < e; t++)
r._initHooks[t].call(this);
}}),
n
);
}),
(M.include=function (t){
var i=this.prototype.options;
return (
e(this.prototype, t),
t.options &&
((this.prototype.options=i), this.mergeOptions(t.options)),
this
);
}),
(M.mergeOptions=function (t){
return e(this.prototype.options, t), this;
}),
(M.addInitHook=function (t){
var e=Array.prototype.slice.call(arguments, 1),
i =
"function"==typeof t
? t
: function (){
this[t].apply(this, e);
};
return (
(this.prototype._initHooks=this.prototype._initHooks||[]),
this.prototype._initHooks.push(i),
this
);
});
var S={
on: function (t, e, i){
if("object"==typeof t) for (var n in t) this._on(n, t[n], e);
else
for (var o=0, s=(t=u(t)).length; o < s; o++)
this._on(t[o], e, i);
return this;
},
off: function (t, e, i){
if(arguments.length)
if("object"==typeof t)
for (var n in t) this._off(n, t[n], e);
else {
t=u(t);
for (
var o=1===arguments.length, s=0, r=t.length;
s < r;
s++
)
o ? this._off(t[s]):this._off(t[s], e, i);
}
else delete this._events;
return this;
},
_on: function (t, e, i, n){
"function"!=typeof e
? console.warn("wrong listener type: " + typeof e)
: !1===this._listens(t, e, i) &&
((e={ fn: e, ctx: (i=i===this ? void 0:i) }),
n&&(e.once = !0),
(this._events=this._events||{}),
(this._events[t]=this._events[t]||[]),
this._events[t].push(e));
},
_off: function (t, e, i){
var n, o, s;
if(this._events&&(n=this._events[t]))
if(1===arguments.length){
if(this._firingCount)
for (o=0, s=n.length; o < s; o++) n[o].fn=l;
delete this._events[t];
} else
"function"!=typeof e
? console.warn("wrong listener type: " + typeof e)
: !1!==(e=this._listens(t, e, i)) &&
((i=n[e]),
this._firingCount &&
((i.fn=l), (this._events[t]=n = n.slice())),
n.splice(e, 1));
},
fire: function (t, i, n){
if(this.listens(t, n)){
var o=e({}, i, {
type: t,
target: this,
sourceTarget: (i&&i.sourceTarget)||this,
});
if(this._events){
var s=this._events[t];
if(s){
this._firingCount=this._firingCount + 1||1;
for (var r=0, a=s.length; r < a; r++){
var h=s[r],
l=h.fn;
h.once&&this.off(t, l, h.ctx),
l.call(h.ctx||this, o);
}
this._firingCount--;
}}
n&&this._propagateEvent(o);
}
return this;
},
listens: function (t, e, i, n){
"string"!=typeof t &&
console.warn('"string" type argument expected');
var o=e,
s =
("function"!=typeof e&&((n = !!e), (i=o = void 0)),
this._events&&this._events[t]);
if(s&&s.length&&!1!==this._listens(t, o, i)) return !0;
if(n)
for (var r in this._eventParents)
if(this._eventParents[r].listens(t, e, i, n)) return !0;
return !1;
},
_listens: function (t, e, i){
if(this._events){
var n=this._events[t]||[];
if(!e) return !!n.length;
i===this&&(i=void 0);
for (var o=0, s=n.length; o < s; o++)
if(n[o].fn===e&&n[o].ctx===i) return o;
}
return !1;
},
once: function (t, e, i){
if("object"==typeof t)
for (var n in t) this._on(n, t[n], e, !0);
else
for (var o=0, s=(t=u(t)).length; o < s; o++)
this._on(t[o], e, i, !0);
return this;
},
addEventParent: function (t){
return (
(this._eventParents=this._eventParents||{}),
(this._eventParents[r(t)]=t),
this
);
},
removeEventParent: function (t){
return (
this._eventParents&&delete this._eventParents[r(t)], this
);
},
_propagateEvent: function (t){
for (var i in this._eventParents)
this._eventParents[i].fire(t.type,
e({ layer: t.target, propagatedFrom: t.target }, t),
!0
);
},
},
I =
((S.addEventListener=S.on),
(S.removeEventListener=S.clearAllEventListeners=S.off),
(S.addOneTimeEventListener=S.once),
(S.fireEvent=S.fire),
(S.hasEventListeners=S.listens),
M.extend(S));
function j(t, e, i){
(this.x=i ? Math.round(t):t), (this.y=i ? Math.round(e):e);
}
var E =
Math.trunc ||
function (t){
return 0 < t ? Math.floor(t):Math.ceil(t);
};
function Z(t, e, i){
return t instanceof j
? t
: g(t)
? new j(t[0], t[1])
: null==t
? t
: "object"==typeof t&&"x" in t&&"y" in t
? new j(t.x, t.y)
: new j(t, e, i);
}
function A(t, e){
if(t)
for (var i=e ? [t, e]:t, n=0, o=i.length; n < o; n++)
this.extend(i[n]);
}
function B(t, e){
return !t||t instanceof A ? t:new A(t, e);
}
function O(t, e){
if(t)
for (var i=e ? [t, e]:t, n=0, o=i.length; n < o; n++)
this.extend(i[n]);
}
function R(t, e){
return t instanceof O ? t:new O(t, e);
}
function N(t, e, i){
if(isNaN(t)||isNaN(e))
throw new Error("Invalid LatLng object: (" + t + ", " + e + ")");
(this.lat=+t), (this.lng=+e), void 0!==i&&(this.alt=+i);
}
function D(t, e, i){
return t instanceof N
? t
: g(t)&&"object"!=typeof t[0]
? 3===t.length
? new N(t[0], t[1], t[2])
: 2===t.length
? new N(t[0], t[1])
: null
: null==t
? t
: "object"==typeof t&&"lat" in t
? new N(t.lat, "lng" in t ? t.lng:t.lon, t.alt)
: void 0===e
? null
: new N(t, e, i);
}
(j.prototype={
clone: function (){
return new j(this.x, this.y);
},
add: function (t){
return this.clone()._add(Z(t));
},
_add: function (t){
return (this.x +=t.x), (this.y +=t.y), this;
},
subtract: function (t){
return this.clone()._subtract(Z(t));
},
_subtract: function (t){
return (this.x -=t.x), (this.y -=t.y), this;
},
divideBy: function (t){
return this.clone()._divideBy(t);
},
_divideBy: function (t){
return (this.x /=t), (this.y /=t), this;
},
multiplyBy: function (t){
return this.clone()._multiplyBy(t);
},
_multiplyBy: function (t){
return (this.x *=t), (this.y *=t), this;
},
scaleBy: function (t){
return new j(this.x * t.x, this.y * t.y);
},
unscaleBy: function (t){
return new j(this.x / t.x, this.y / t.y);
},
round: function (){
return this.clone()._round();
},
_round: function (){
return (
(this.x=Math.round(this.x)),
(this.y=Math.round(this.y)),
this
);
},
floor: function (){
return this.clone()._floor();
},
_floor: function (){
return (
(this.x=Math.floor(this.x)),
(this.y=Math.floor(this.y)),
this
);
},
ceil: function (){
return this.clone()._ceil();
},
_ceil: function (){
return (
(this.x=Math.ceil(this.x)), (this.y=Math.ceil(this.y)), this
);
},
trunc: function (){
return this.clone()._trunc();
},
_trunc: function (){
return (this.x=E(this.x)), (this.y=E(this.y)), this;
},
distanceTo: function (t){
var e=(t=Z(t)).x - this.x;
return (t=t.y - this.y), Math.sqrt(e * e + t * t);
},
equals: function (t){
return (t=Z(t)).x===this.x&&t.y===this.y;
},
contains: function (t){
return (
(t=Z(t)),
Math.abs(t.x) <=Math.abs(this.x) &&
Math.abs(t.y) <=Math.abs(this.y)
);
},
toString: function (){
return "Point(" + c(this.x) + ", " + c(this.y) + ")";
},
}),
(A.prototype={
extend: function (t){
var e, i;
if(t){
if(t instanceof j||"number"==typeof t[0]||"x" in t)
e=i = Z(t);
else if(((e=(t=B(t)).min), (i=t.max), !e||!i))
return this;
this.min||this.max
? ((this.min.x=Math.min(e.x, this.min.x)),
(this.max.x=Math.max(i.x, this.max.x)),
(this.min.y=Math.min(e.y, this.min.y)),
(this.max.y=Math.max(i.y, this.max.y)))
: ((this.min=e.clone()), (this.max=i.clone()));
}
return this;
},
getCenter: function (t){
return Z(
(this.min.x + this.max.x) / 2,
(this.min.y + this.max.y) / 2,
t
);
},
getBottomLeft: function (){
return Z(this.min.x, this.max.y);
},
getTopRight: function (){
return Z(this.max.x, this.min.y);
},
getTopLeft: function (){
return this.min;
},
getBottomRight: function (){
return this.max;
},
getSize: function (){
return this.max.subtract(this.min);
},
contains: function (t){
var e, i;
return (
(t=("number"==typeof t[0]||t instanceof j ? Z:B)(
t
)) instanceof A
? ((e=t.min), (i=t.max))
: (e=i = t),
e.x >=this.min.x &&
i.x <=this.max.x &&
e.y >=this.min.y &&
i.y <=this.max.y
);
},
intersects: function (t){
t=B(t);
var e=this.min,
i=this.max,
n=t.min,
o=(t=t.max).x >=e.x&&n.x <=i.x;
return (t=t.y >=e.y&&n.y <=i.y), o&&t;
},
overlaps: function (t){
t=B(t);
var e=this.min,
i=this.max,
n=t.min,
o=(t=t.max).x > e.x&&n.x < i.x;
return (t=t.y > e.y&&n.y < i.y), o&&t;
},
isValid: function (){
return !(!this.min||!this.max);
},
pad: function (t){
var e=this.min,
i=this.max,
n=Math.abs(e.x - i.x) * t;
return (
(t=Math.abs(e.y - i.y) * t),
B(Z(e.x - n, e.y - t), Z(i.x + n, i.y + t))
);
},
equals: function (t){
return (
!!t &&
((t=B(t)),
this.min.equals(t.getTopLeft()) &&
this.max.equals(t.getBottomRight()))
);
},
}),
(O.prototype={
extend: function (t){
var e,
i,
n=this._southWest,
o=this._northEast;
if(t instanceof N) i=e = t;
else {
if(!(t instanceof O))
return t ? this.extend(D(t)||R(t)):this;
if(((e=t._southWest), (i=t._northEast), !e||!i))
return this;
}
return (
n||o
? ((n.lat=Math.min(e.lat, n.lat)),
(n.lng=Math.min(e.lng, n.lng)),
(o.lat=Math.max(i.lat, o.lat)),
(o.lng=Math.max(i.lng, o.lng)))
: ((this._southWest=new N(e.lat, e.lng)),
(this._northEast=new N(i.lat, i.lng))),
this
);
},
pad: function (t){
var e=this._southWest,
i=this._northEast,
n=Math.abs(e.lat - i.lat) * t;
return (
(t=Math.abs(e.lng - i.lng) * t),
new O(
new N(e.lat - n, e.lng - t),
new N(i.lat + n, i.lng + t)
)
);
},
getCenter: function (){
return new N(
(this._southWest.lat + this._northEast.lat) / 2,
(this._southWest.lng + this._northEast.lng) / 2
);
},
getSouthWest: function (){
return this._southWest;
},
getNorthEast: function (){
return this._northEast;
},
getNorthWest: function (){
return new N(this.getNorth(), this.getWest());
},
getSouthEast: function (){
return new N(this.getSouth(), this.getEast());
},
getWest: function (){
return this._southWest.lng;
},
getSouth: function (){
return this._southWest.lat;
},
getEast: function (){
return this._northEast.lng;
},
getNorth: function (){
return this._northEast.lat;
},
contains: function (t){
t=(
"number"==typeof t[0]||t instanceof N||"lat" in t
? D
: R
)(t);
var e,
i,
n=this._southWest,
o=this._northEast;
return (
t instanceof O
? ((e=t.getSouthWest()), (i=t.getNorthEast()))
: (e=i = t),
e.lat >=n.lat &&
i.lat <=o.lat &&
e.lng >=n.lng &&
i.lng <=o.lng
);
},
intersects: function (t){
t=R(t);
var e=this._southWest,
i=this._northEast,
n=t.getSouthWest(),
o=(t=t.getNorthEast()).lat >=e.lat&&n.lat <=i.lat;
return (t=t.lng >=e.lng&&n.lng <=i.lng), o&&t;
},
overlaps: function (t){
t=R(t);
var e=this._southWest,
i=this._northEast,
n=t.getSouthWest(),
o=(t=t.getNorthEast()).lat > e.lat&&n.lat < i.lat;
return (t=t.lng > e.lng&&n.lng < i.lng), o&&t;
},
toBBoxString: function (){
return [
this.getWest(),
this.getSouth(),
this.getEast(),
this.getNorth(),
].join(",");
},
equals: function (t, e){
return (
!!t &&
((t=R(t)),
this._southWest.equals(t.getSouthWest(), e) &&
this._northEast.equals(t.getNorthEast(), e))
);
},
isValid: function (){
return !(!this._southWest||!this._northEast);
},
});
var Q={
latLngToPoint: function (t, e){
return (
(t=this.projection.project(t)),
(e=this.scale(e)),
this.transformation._transform(t, e)
);
},
pointToLatLng: function (t, e){
return (
(e=this.scale(e)),
(t=this.transformation.untransform(t, e)),
this.projection.unproject(t)
);
},
project: function (t){
return this.projection.project(t);
},
unproject: function (t){
return this.projection.unproject(t);
},
scale: function (t){
return 256 * Math.pow(2, t);
},
zoom: function (t){
return Math.log(t / 256) / Math.LN2;
},
getProjectedBounds: function (t){
var e;
return this.infinite
? null
: ((e=this.projection.bounds),
(t=this.scale(t)),
new A(
this.transformation.transform(e.min, t),
this.transformation.transform(e.max, t)
));
},
infinite: !(N.prototype={
equals: function (t, e){
return (
!!t &&
((t=D(t)),
Math.max(Math.abs(this.lat - t.lat),
Math.abs(this.lng - t.lng)
) <=(void 0===e ? 1e-9:e))
);
},
toString: function (t){
return (
"LatLng(" + c(this.lat, t) + ", " + c(this.lng, t) + ")"
);
},
distanceTo: function (t){
return F.distance(this, D(t));
},
wrap: function (){
return F.wrapLatLng(this);
},
toBounds: function (t){
var e =
(t=(180 * t) / 40075017) /
Math.cos((Math.PI / 180) * this.lat);
return R(
[this.lat - t, this.lng - e],
[this.lat + t, this.lng + e]
);
},
clone: function (){
return new N(this.lat, this.lng, this.alt);
},
}),
wrapLatLng: function (t){
var e=this.wrapLng ? h(t.lng, this.wrapLng, !0):t.lng;
return new N(
this.wrapLat ? h(t.lat, this.wrapLat, !0):t.lat,
e,
t.alt
);
},
wrapLatLngBounds: function (t){
var e=t.getCenter(),
i=this.wrapLatLng(e),
n=e.lat - i.lat;
return (
(e=e.lng - i.lng),
0==n&&0==e
? t
: ((i=t.getSouthWest()),
(t=t.getNorthEast()),
new O(
new N(i.lat - n, i.lng - e),
new N(t.lat - n, t.lng - e)
))
);
},
},
F=e({}, Q, {
wrapLng: [-180, 180],
R: 6371e3,
distance: function (t, e){
var i=Math.PI / 180,
n=t.lat * i,
o=e.lat * i,
s=Math.sin(((e.lat - t.lat) * i) / 2);
return (
(e=Math.sin(((e.lng - t.lng) * i) / 2)),
(t=s * s + Math.cos(n) * Math.cos(o) * e * e),
(i=2 * Math.atan2(Math.sqrt(t), Math.sqrt(1 - t))),
this.R * i
);
},
}),
H={
R: (H=6378137),
MAX_LATITUDE: 85.0511287798,
project: function (t){
var e=Math.PI / 180,
i=this.MAX_LATITUDE;
return (
(i=Math.max(Math.min(i, t.lat), -i)),
(i=Math.sin(i * e)),
new j(
this.R * t.lng * e,
(this.R * Math.log((1 + i) / (1 - i))) / 2
)
);
},
unproject: function (t){
var e=180 / Math.PI;
return new N(
(2 * Math.atan(Math.exp(t.y / this.R)) - Math.PI / 2) * e,
(t.x * e) / this.R
);
},
bounds: new A([-(H *=Math.PI), -H], [H, H]),
};
function q(t, e, i, n){
g(t)
? ((this._a=t[0]),
(this._b=t[1]),
(this._c=t[2]),
(this._d=t[3]))
: ((this._a=t), (this._b=e), (this._c=i), (this._d=n));
}
function W(t, e, i, n){
return new q(t, e, i, n);
}
q.prototype={
transform: function (t, e){
return this._transform(t.clone(), e);
},
_transform: function (t, e){
return (
(t.x=(e=e||1) * (this._a * t.x + this._b)),
(t.y=e * (this._c * t.y + this._d)),
t
);
},
untransform: function (t, e){
return new j(
(t.x / (e=e||1) - this._b) / this._a,
(t.y / e - this._d) / this._c
);
},
};
var U=e({}, F, {
code: "EPSG:3857",
projection: H,
transformation: W((U=0.5 / (Math.PI * H.R)), 0.5, -U, 0.5),
}),
$=e({}, U, { code: "EPSG:900913" });
function V(t){
return document.createElementNS("http://www.w3.org/2000/svg", t);
}
function G(t, e){
for (var i, n, o, s, r="", a=0, h=t.length; a < h; a++){
for (i=0, n=(o=t[a]).length; i < n; i++)
r +=(i ? "L":"M") + (s=o[i]).x + " " + s.y;
r +=e ? (Ct.svg ? "z":"x"):"";
}
return r||"M0 0";
}
var K=document.documentElement.style,
J="ActiveXObject" in window,
Y=J&&!document.addEventListener,
X="msLaunchUri" in navigator&&!("documentMode" in document),
tt=zt("webkit"),
et=zt("android"),
it=zt("android 2")||zt("android 3"),
nt=parseInt(
/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],
10
),
ot =
((nt =
et&&zt("Google")&&nt < 537&&!("AudioNode" in window)),
!!window.opera),
st = !X&&zt("chrome"),
rt=zt("gecko")&&!tt&&!ot&&!J,
at = !st&&zt("safari"),
ht=zt("phantom"),
lt="OTransition" in K,
ct=0===navigator.platform.indexOf("Win"),
dt=J&&"transition" in K,
ut =
"WebKitCSSMatrix" in window &&
"m11" in new window.WebKitCSSMatrix() &&
!it,
pt =
((K="MozPerspective" in K),
!window.L_DISABLE_3D&&(dt||ut||K)&&!lt&&!ht),
_t=(Gi="undefined"!=typeof orientation||zt("mobile"))&&tt,
mt=Gi&&ut,
ft = !window.PointerEvent&&window.MSPointerEvent,
gt = !(!window.PointerEvent&&!ft),
yt="ontouchstart" in window||!!window.TouchEvent,
vt = !window.L_NO_TOUCH&&(yt||gt),
wt=Gi&&ot,
xt=Gi&&rt,
bt =
1 <
(window.devicePixelRatio ||
window.screen.deviceXDPI / window.screen.logicalXDPI),
Pt=(function (){
var t = !1;
try {
var e=Object.defineProperty({}, "passive", {
get: function (){
t = !0;
},
});
window.addEventListener("testPassiveEventSupport", l, e),
window.removeEventListener("testPassiveEventSupport", l, e);
} catch (t){}
return t;
})(),
kt = !!document.createElement("canvas").getContext,
Lt = !(!document.createElementNS||!V("svg").createSVGRect),
Tt =
!!Lt &&
(((Tt=document.createElement("div")).innerHTML="<svg/>"),
"http://www.w3.org/2000/svg"===(Tt.firstChild&&Tt.firstChild.namespaceURI));
function zt(t){
return 0 <=navigator.userAgent.toLowerCase().indexOf(t);
}
var Ct={
ie: J,
ielt9: Y,
edge: X,
webkit: tt,
android: et,
android23: it,
androidStock: nt,
opera: ot,
chrome: st,
gecko: rt,
safari: at,
phantom: ht,
opera12: lt,
win: ct,
ie3d: dt,
webkit3d: ut,
gecko3d: K,
any3d: pt,
mobile: Gi,
mobileWebkit: _t,
mobileWebkit3d: mt,
msPointer: ft,
pointer: gt,
touch: vt,
touchNative: yt,
mobileOpera: wt,
mobileGecko: xt,
retina: bt,
passiveEvents: Pt,
canvas: kt,
svg: Lt,
vml:
!Lt &&
(function (){
try {
var t=document.createElement("div"),
e=((t.innerHTML='<v:shape adj="1"/>'), t.firstChild);
return (
(e.style.behavior="url(#default#VML)"),
e&&"object"==typeof e.adj
);
} catch (t){
return !1;
}})(),
inlineSvg: Tt,
mac: 0===navigator.platform.indexOf("Mac"),
linux: 0===navigator.platform.indexOf("Linux"),
},
Mt=Ct.msPointer ? "MSPointerDown":"pointerdown",
St=Ct.msPointer ? "MSPointerMove":"pointermove",
It=Ct.msPointer ? "MSPointerUp":"pointerup",
jt=Ct.msPointer ? "MSPointerCancel":"pointercancel",
Et={
touchstart: Mt,
touchmove: St,
touchend: It,
touchcancel: jt,
},
Zt={
touchstart: function (t, e){
e.MSPOINTER_TYPE_TOUCH &&
e.pointerType===e.MSPOINTER_TYPE_TOUCH &&
je(e),
Qt(t, e);
},
touchmove: Qt,
touchend: Qt,
touchcancel: Qt,
},
At={},
Bt = !1;
function Ot(t, e, i){
return (
"touchstart"!==e ||
Bt ||
(document.addEventListener(Mt, Rt, !0),
document.addEventListener(St, Nt, !0),
document.addEventListener(It, Dt, !0),
document.addEventListener(jt, Dt, !0),
(Bt = !0)),
Zt[e]
? ((i=Zt[e].bind(this, i)),
t.addEventListener(Et[e], i, !1),
i)
: (console.warn("wrong event specified:", e), l)
);
}
function Rt(t){
At[t.pointerId]=t;
}
function Nt(t){
At[t.pointerId]&&(At[t.pointerId]=t);
}
function Dt(t){
delete At[t.pointerId];
}
function Qt(t, e){
if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){
for (var i in ((e.touches=[]), At)) e.touches.push(At[i]);
(e.changedTouches=[e]), t(e);
}}
var Ft=200;
function Ht(t, e){
t.addEventListener("dblclick", e);
var i,
n=0;
function o(t){
var o;
1!==t.detail
? (i=t.detail)
: "mouse"===t.pointerType ||
(t.sourceCapabilities &&
!t.sourceCapabilities.firesTouchEvents) ||
((o=Ze(t)).some(function (t){
return t instanceof HTMLLabelElement&&t.attributes.for;
}) &&
!o.some(function (t){
return (
t instanceof HTMLInputElement ||
t instanceof HTMLSelectElement
);
})) ||
((o=Date.now()) - n <=Ft
? 2===++i &&
e(
(function (t){
var e,
i,
n={};
for (i in t)
(e=t[i]), (n[i]=e&&e.bind ? e.bind(t):e);
return (
((t=n).type="dblclick"),
(n.detail=2),
(n.isTrusted = !1),
(n._simulated = !0),
n
);
})(t)
)
: (i=1),
(n=o));
}
return (
t.addEventListener("click", o), { dblclick: e, simDblclick: o }
);
}
var qt,
Wt,
Ut,
$t,
Vt,
Gt,
Kt=ue([
"transform",
"webkitTransform",
"OTransform",
"MozTransform",
"msTransform",
]),
Jt=ue([
"webkitTransition",
"transition",
"OTransition",
"MozTransition",
"msTransition",
]),
Yt =
"webkitTransition"===Jt||"OTransition"===Jt
? Jt + "End"
: "transitionend";
function Xt(t){
return "string"==typeof t ? document.getElementById(t):t;
}
function te(t, e){
var i=t.style[e]||(t.currentStyle&&t.currentStyle[e]);
return "auto"===(i =
(i&&"auto"!==i)||!document.defaultView
? i
: (t=document.defaultView.getComputedStyle(t, null))
? t[e]
: null)
? null
: i;
}
function ee(t, e, i){
return (
((t=document.createElement(t)).className=e||""),
i&&i.appendChild(t),
t
);
}
function ie(t){
var e=t.parentNode;
e&&e.removeChild(t);
}
function ne(t){
for (; t.firstChild;) t.removeChild(t.firstChild);
}
function oe(t){
var e=t.parentNode;
e&&e.lastChild!==t&&e.appendChild(t);
}
function se(t){
var e=t.parentNode;
e&&e.firstChild!==t&&e.insertBefore(t, e.firstChild);
}
function re(t, e){
return void 0!==t.classList
? t.classList.contains(e)
: 0 < (t=ce(t)).length &&
new RegExp("(^|\\s)" + e + "(\\s|$)").test(t);
}
function ae(t, e){
var i;
if(void 0!==t.classList)
for (var n=u(e), o=0, s=n.length; o < s; o++)
t.classList.add(n[o]);
else re(t, e)||le(t, ((i=ce(t)) ? i + " ":"") + e);
}
function he(t, e){
void 0!==t.classList
? t.classList.remove(e)
: le(t, d((" " + ce(t) + " ").replace(" " + e + " ", " ")));
}
function le(t, e){
void 0===t.className.baseVal
? (t.className=e)
: (t.className.baseVal=e);
}
function ce(t){
return void 0===(t=t.correspondingElement ? t.correspondingElement:t)
.className.baseVal
? t.className
: t.className.baseVal;
}
function de(t, e){
if("opacity" in t.style) t.style.opacity=e;
else if("filter" in t.style){
var i = !1,
n="DXImageTransform.Microsoft.Alpha";
try {
i=t.filters.item(n);
} catch (t){
if(1===e) return;
}
(e=Math.round(100 * e)),
i
? ((i.Enabled=100!==e), (i.Opacity=e))
: (t.style.filter +=" progid:" + n + "(opacity=" + e + ")");
}}
function ue(t){
for (
var e=document.documentElement.style, i=0;
i < t.length;
i++
)
if(t[i] in e) return t[i];
return !1;
}
function pe(t, e, i){
(e=e||new j(0, 0)),
(t.style[Kt] =
(Ct.ie3d
? "translate(" + e.x + "px," + e.y + "px)"
: "translate3d(" + e.x + "px," + e.y + "px,0)") +
(i ? " scale(" + i + ")":""));
}
function _e(t, e){
(t._leaflet_pos=e),
Ct.any3d
? pe(t, e)
: ((t.style.left=e.x + "px"), (t.style.top=e.y + "px"));
}
function me(t){
return t._leaflet_pos||new j(0, 0);
}
function fe(){
be(window, "dragstart", je);
}
function ge(){
ke(window, "dragstart", je);
}
function ye(t){
for (; -1===t.tabIndex;) t=t.parentNode;
t.style &&
(ve(),
(Gt=(Vt=t).style.outlineStyle),
(t.style.outlineStyle="none"),
be(window, "keydown", ve));
}
function ve(){
Vt &&
((Vt.style.outlineStyle=Gt),
(Gt=Vt=void 0),
ke(window, "keydown", ve));
}
function we(t){
for (
;
!(
((t=t.parentNode).offsetWidth&&t.offsetHeight) ||
t===document.body
);
);
return t;
}
function xe(t){
var e=t.getBoundingClientRect();
return {
x: e.width / t.offsetWidth||1,
y: e.height / t.offsetHeight||1,
boundingClientRect: e,
};}
function be(t, e, i, n){
if(e&&"object"==typeof e) for (var o in e) ze(t, o, e[o], i);
else
for (var s=0, r=(e=u(e)).length; s < r; s++)
ze(t, e[s], i, n);
return this;
}
($t =
"onselectstart" in document
? ((Ut=function (){
be(window, "selectstart", je);
}),
function (){
ke(window, "selectstart", je);
})
: ((Wt=ue([
"userSelect",
"WebkitUserSelect",
"OUserSelect",
"MozUserSelect",
"msUserSelect",
])),
(Ut=function (){
var t;
Wt &&
((t=document.documentElement.style),
(qt=t[Wt]),
(t[Wt]="none"));
}),
function (){
Wt &&
((document.documentElement.style[Wt]=qt), (qt=void 0));
})),
(J={
__proto__: null,
TRANSFORM: Kt,
TRANSITION: Jt,
TRANSITION_END: Yt,
get: Xt,
getStyle: te,
create: ee,
remove: ie,
empty: ne,
toFront: oe,
toBack: se,
hasClass: re,
addClass: ae,
removeClass: he,
setClass: le,
getClass: ce,
setOpacity: de,
testProp: ue,
setTransform: pe,
setPosition: _e,
getPosition: me,
get disableTextSelection(){
return Ut;
},
get enableTextSelection(){
return $t;
},
disableImageDrag: fe,
enableImageDrag: ge,
preventOutline: ye,
restoreOutline: ve,
getSizedParentNode: we,
getScale: xe,
});
var Pe="_leaflet_events";
function ke(t, e, i, n){
if(1===arguments.length) Le(t), delete t[Pe];
else if(e&&"object"==typeof e)
for (var o in e) Ce(t, o, e[o], i);
else if(((e=u(e)), 2===arguments.length))
Le(t, function (t){
return -1!==y(e, t);
});
else for (var s=0, r=e.length; s < r; s++) Ce(t, e[s], i, n);
return this;
}
function Le(t, e){
for (var i in t[Pe]){
var n=i.split(/\d/)[0];
(e&&!e(n))||Ce(t, n, null, null, i);
}}
var Te={
mouseenter: "mouseover",
mouseleave: "mouseout",
wheel: !("onwheel" in window)&&"mousewheel",
};
function ze(t, e, i, n){
var o,
s,
a=e + r(i) + (n ? "_" + r(n):"");
(t[Pe]&&t[Pe][a]) ||
((s=o =
function (e){
return i.call(n||t, e||window.event);
}),
!Ct.touchNative&&Ct.pointer&&0===e.indexOf("touch")
? (o=Ot(t, e, o))
: Ct.touch&&"dblclick"===e
? (o=Ht(t, o))
: "addEventListener" in t
? "touchstart"===e ||
"touchmove"===e ||
"wheel"===e ||
"mousewheel"===e
? t.addEventListener(Te[e]||e,
o,
!!Ct.passiveEvents&&{ passive: !1 }
)
: "mouseenter"===e||"mouseleave"===e
? t.addEventListener(Te[e],
(o=function (e){
(e=e||window.event), Re(t, e)&&s(e);
}),
!1
)
: t.addEventListener(e, s, !1)
: t.attachEvent("on" + e, o),
(t[Pe]=t[Pe]||{}),
(t[Pe][a]=o));
}
function Ce(t, e, i, n, o){
var s, a;
(o=o||e + r(i) + (n ? "_" + r(n):"")),
(i=t[Pe]&&t[Pe][o]) &&
(!Ct.touchNative&&Ct.pointer&&0===e.indexOf("touch")
? ((n=t),
(a=i),
Et[(s=e)]
? n.removeEventListener(Et[s], a, !1)
: console.warn("wrong event specified:", s))
: Ct.touch&&"dblclick"===e
? ((n=i),
(a=t).removeEventListener("dblclick", n.dblclick),
a.removeEventListener("click", n.simDblclick))
: "removeEventListener" in t
? t.removeEventListener(Te[e]||e, i, !1)
: t.detachEvent("on" + e, i),
(t[Pe][o]=null));
}
function Me(t){
return (
t.stopPropagation
? t.stopPropagation()
: t.originalEvent
? (t.originalEvent._stopped = !0)
: (t.cancelBubble = !0),
this
);
}
function Se(t){
return ze(t, "wheel", Me), this;
}
function Ie(t){
return (
be(t, "mousedown touchstart dblclick contextmenu", Me),
(t._leaflet_disable_click = !0),
this
);
}
function je(t){
return (
t.preventDefault ? t.preventDefault():(t.returnValue = !1), this
);
}
function Ee(t){
return je(t), Me(t), this;
}
function Ze(t){
if(t.composedPath) return t.composedPath();
for (var e=[], i=t.target; i;) e.push(i), (i=i.parentNode);
return e;
}
function Ae(t, e){
var i, n;
return e
? ((n=(i=xe(e)).boundingClientRect),
new j(
(t.clientX - n.left) / i.x - e.clientLeft,
(t.clientY - n.top) / i.y - e.clientTop
))
: new j(t.clientX, t.clientY);
}
var Be =
Ct.linux&&Ct.chrome
? window.devicePixelRatio
: Ct.mac
? 3 * window.devicePixelRatio
: 0 < window.devicePixelRatio
? 2 * window.devicePixelRatio
: 1;
function Oe(t){
return Ct.edge
? t.wheelDeltaY / 2
: t.deltaY&&0===t.deltaMode
? -t.deltaY / Be
: t.deltaY&&1===t.deltaMode
? 20 * -t.deltaY
: t.deltaY&&2===t.deltaMode
? 60 * -t.deltaY
: t.deltaX||t.deltaZ
? 0
: t.wheelDelta
? (t.wheelDeltaY||t.wheelDelta) / 2
: t.detail&&Math.abs(t.detail) < 32765
? 20 * -t.detail
: t.detail
? (t.detail / -32765) * 60
: 0;
}
function Re(t, e){
var i=e.relatedTarget;
if(!i) return !0;
try {
for (; i&&i!==t;) i=i.parentNode;
} catch (t){
return !1;
}
return i!==t;
}
Y={
__proto__: null,
on: be,
off: ke,
stopPropagation: Me,
disableScrollPropagation: Se,
disableClickPropagation: Ie,
preventDefault: je,
stop: Ee,
getPropagationPath: Ze,
getMousePosition: Ae,
getWheelDelta: Oe,
isExternalTarget: Re,
addListener: be,
removeListener: ke,
};
var Ne=I.extend({
run: function (t, e, i, n){
this.stop(),
(this._el=t),
(this._inProgress = !0),
(this._duration=i||0.25),
(this._easeOutPower=1 / Math.max(n||0.5, 0.2)),
(this._startPos=me(t)),
(this._offset=e.subtract(this._startPos)),
(this._startTime=+new Date()),
this.fire("start"),
this._animate();
},
stop: function (){
this._inProgress&&(this._step(!0), this._complete());
},
_animate: function (){
(this._animId=T(this._animate, this)), this._step();
},
_step: function (t){
var e=+new Date() - this._startTime,
i=1e3 * this._duration;
e < i
? this._runFrame(this._easeOut(e / i), t)
: (this._runFrame(1), this._complete());
},
_runFrame: function (t, e){
(t=this._startPos.add(this._offset.multiplyBy(t))),
e&&t._round(),
_e(this._el, t),
this.fire("step");
},
_complete: function (){
z(this._animId), (this._inProgress = !1), this.fire("end");
},
_easeOut: function (t){
return 1 - Math.pow(1 - t, this._easeOutPower);
},
}),
De=I.extend({
options: {
crs: U,
center: void 0,
zoom: void 0,
minZoom: void 0,
maxZoom: void 0,
layers: [],
maxBounds: void 0,
renderer: void 0,
zoomAnimation: !0,
zoomAnimationThreshold: 4,
fadeAnimation: !0,
markerZoomAnimation: !0,
transform3DLimit: 8388608,
zoomSnap: 1,
zoomDelta: 1,
trackResize: !0,
},
initialize: function (t, e){
(e=p(this, e)),
(this._handlers=[]),
(this._layers={}),
(this._zoomBoundLayers={}),
(this._sizeChanged = !0),
this._initContainer(t),
this._initLayout(),
(this._onResize=o(this._onResize, this)),
this._initEvents(),
e.maxBounds&&this.setMaxBounds(e.maxBounds),
void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),
e.center &&
void 0!==e.zoom &&
this.setView(D(e.center), e.zoom, { reset: !0 }),
this.callInitHooks(),
(this._zoomAnimated =
Jt &&
Ct.any3d &&
!Ct.mobileOpera &&
this.options.zoomAnimation),
this._zoomAnimated &&
(this._createAnimProxy(),
be(this._proxy, Yt, this._catchTransitionEnd, this)),
this._addLayers(this.options.layers);
},
setView: function (t, i, n){
return (
(i=void 0===i ? this._zoom:this._limitZoom(i)),
(t=this._limitCenter(D(t), i, this.options.maxBounds)),
(n=n||{}),
this._stop(),
this._loaded &&
!n.reset &&
!0!==n &&
(void 0!==n.animate &&
((n.zoom=e({ animate: n.animate }, n.zoom)),
(n.pan=e(
{ animate: n.animate, duration: n.duration },
n.pan
))),
this._zoom!==i
? this._tryAnimatedZoom &&
this._tryAnimatedZoom(t, i, n.zoom)
: this._tryAnimatedPan(t, n.pan))
? (clearTimeout(this._sizeTimer), this)
: (this._resetView(t, i, n.pan&&n.pan.noMoveStart), this)
);
},
setZoom: function (t, e){
return this._loaded
? this.setView(this.getCenter(), t, { zoom: e })
: ((this._zoom=t), this);
},
zoomIn: function (t, e){
return (
(t=t||(Ct.any3d ? this.options.zoomDelta:1)),
this.setZoom(this._zoom + t, e)
);
},
zoomOut: function (t, e){
return (
(t=t||(Ct.any3d ? this.options.zoomDelta:1)),
this.setZoom(this._zoom - t, e)
);
},
setZoomAround: function (t, e, i){
var n=this.getZoomScale(e),
o=this.getSize().divideBy(2);
return (
(t=(t instanceof j ? t:this.latLngToContainerPoint(t))
.subtract(o)
.multiplyBy(1 - 1 / n)),
(n=this.containerPointToLatLng(o.add(t))),
this.setView(n, e, { zoom: i })
);
},
_getBoundsCenterZoom: function (t, e){
(e=e||{}), (t=t.getBounds ? t.getBounds():R(t));
var i=Z(e.paddingTopLeft||e.padding||[0, 0]),
n=Z(e.paddingBottomRight||e.padding||[0, 0]),
o=this.getBoundsZoom(t, !1, i.add(n));
return (o =
"number"==typeof e.maxZoom ? Math.min(e.maxZoom, o):o)===1 / 0
? { center: t.getCenter(), zoom: o }
: ((e=n.subtract(i).divideBy(2)),
(n=this.project(t.getSouthWest(), o)),
(i=this.project(t.getNorthEast(), o)),
{
center: this.unproject(n.add(i).divideBy(2).add(e), o),
zoom: o,
});
},
fitBounds: function (t, e){
if((t=R(t)).isValid())
return (
(t=this._getBoundsCenterZoom(t, e)),
this.setView(t.center, t.zoom, e)
);
throw new Error("Bounds are not valid.");
},
fitWorld: function (t){
return this.fitBounds([
[-90, -180],
[90, 180],
],
t
);
},
panTo: function (t, e){
return this.setView(t, this._zoom, { pan: e });
},
panBy: function (t, e){
var i;
return (
(e=e||{}),
(t=Z(t).round()).x||t.y
? (!0===e.animate||this.getSize().contains(t)
? (this._panAnim ||
((this._panAnim=new Ne()),
this._panAnim.on({
step: this._onPanTransitionStep,
end: this._onPanTransitionEnd,
},
this
)),
e.noMoveStart||this.fire("movestart"),
!1!==e.animate
? (ae(this._mapPane, "leaflet-pan-anim"),
(i=this._getMapPanePos().subtract(t).round()),
this._panAnim.run(this._mapPane,
i,
e.duration||0.25,
e.easeLinearity
))
: (this._rawPanBy(t),
this.fire("move").fire("moveend")))
: this._resetView(this.unproject(this.project(this.getCenter()).add(t)
),
this.getZoom()
),
this)
: this.fire("moveend")
);
},
flyTo: function (t, e, i){
if(!1===(i=i||{}).animate||!Ct.any3d)
return this.setView(t, e, i);
this._stop();
var n=this.project(this.getCenter()),
o=this.project(t),
s=this.getSize(),
r=this._zoom,
a =
((t=D(t)),
(e=void 0===e ? r:e),
Math.max(s.x, s.y)),
h=a * this.getZoomScale(r, e),
l=o.distanceTo(n)||1,
c=1.42,
d=c * c;
function u(t){
return (
(t =
(h * h - a * a + (t ? -1:1) * d * d * l * l) /
(2 * (t ? h:a) * d * l)),
(t=Math.sqrt(t * t + 1) - t) < 1e-9 ? -18:Math.log(t)
);
}
function p(t){
return (Math.exp(t) - Math.exp(-t)) / 2;
}
function _(t){
return (Math.exp(t) + Math.exp(-t)) / 2;
}
var m=u(0);
function f(t){
return (a * (_(m) * (p((t=m + c * t)) / _(t)) - p(m))) / d;
}
var g=Date.now(),
y=(u(1) - m) / c,
v=i.duration ? 1e3 * i.duration:1e3 * y * 0.8;
return (
this._moveStart(!0, i.noMoveStart),
function i(){
var s=(Date.now() - g) / v,
h=(1 - Math.pow(1 - s, 1.5)) * y;
s <=1
? ((this._flyToFrame=T(i, this)),
this._move(this.unproject(n.add(o.subtract(n).multiplyBy(f(h) / l)),
r
),
this.getScaleZoom(a / ((s=h), a * (_(m) / _(m + c * s))),
r
),
{ flyTo: !0 }
))
: this._move(t, e)._moveEnd(!0);
}.call(this),
this
);
},
flyToBounds: function (t, e){
return (
(t=this._getBoundsCenterZoom(t, e)),
this.flyTo(t.center, t.zoom, e)
);
},
setMaxBounds: function (t){
return (
(t=R(t)),
this.listens("moveend", this._panInsideMaxBounds) &&
this.off("moveend", this._panInsideMaxBounds),
t.isValid()
? ((this.options.maxBounds=t),
this._loaded&&this._panInsideMaxBounds(),
this.on("moveend", this._panInsideMaxBounds))
: ((this.options.maxBounds=null), this)
);
},
setMinZoom: function (t){
var e=this.options.minZoom;
return (
(this.options.minZoom=t),
this._loaded &&
e!==t &&
(this.fire("zoomlevelschange"),
this.getZoom() < this.options.minZoom)
? this.setZoom(t)
: this
);
},
setMaxZoom: function (t){
var e=this.options.maxZoom;
return (
(this.options.maxZoom=t),
this._loaded &&
e!==t &&
(this.fire("zoomlevelschange"),
this.getZoom() > this.options.maxZoom)
? this.setZoom(t)
: this
);
},
panInsideBounds: function (t, e){
this._enforcingBounds = !0;
var i=this.getCenter();
return (
(t=this._limitCenter(i, this._zoom, R(t))),
i.equals(t)||this.panTo(t, e),
(this._enforcingBounds = !1),
this
);
},
panInside: function (t, e){
var i=Z((e=e||{}).paddingTopLeft||e.padding||[0, 0]),
n=Z(e.paddingBottomRight||e.padding||[0, 0]),
o=this.project(this.getCenter()),
s =
((t=this.project(t)),
(i=B([
(s=this.getPixelBounds()).min.add(i),
s.max.subtract(n),
])).getSize());
return (
i.contains(t) ||
((this._enforcingBounds = !0),
(n=t.subtract(i.getCenter())),
(i=i.extend(t).getSize().subtract(s)),
(o.x +=n.x < 0 ? -i.x:i.x),
(o.y +=n.y < 0 ? -i.y:i.y),
this.panTo(this.unproject(o), e),
(this._enforcingBounds = !1)),
this
);
},
invalidateSize: function (t){
if(!this._loaded) return this;
t=e({ animate: !1, pan: !0 }, !0===t ? { animate: !0 }:t);
var i=this.getSize(),
n =
((this._sizeChanged = !0),
(this._lastCenter=null),
this.getSize()),
s=i.divideBy(2).round(),
r=n.divideBy(2).round();
return (s=s.subtract(r)).x||s.y
? (t.animate&&t.pan
? this.panBy(s)
: (t.pan&&this._rawPanBy(s),
this.fire("move"),
t.debounceMoveend
? (clearTimeout(this._sizeTimer),
(this._sizeTimer=setTimeout(
o(this.fire, this, "moveend"),
200
)))
: this.fire("moveend")),
this.fire("resize", { oldSize: i, newSize: n }))
: this;
},
stop: function (){
return (
this.setZoom(this._limitZoom(this._zoom)),
this.options.zoomSnap||this.fire("viewreset"),
this._stop()
);
},
locate: function (t){
var i, n;
return (
(t=this._locateOptions=e({ timeout: 1e4, watch: !1 }, t)),
"geolocation" in navigator
? ((i=o(this._handleGeolocationResponse, this)),
(n=o(this._handleGeolocationError, this)),
t.watch
? (this._locationWatchId =
navigator.geolocation.watchPosition(i, n, t))
: navigator.geolocation.getCurrentPosition(i, n, t))
: this._handleGeolocationError({
code: 0,
message: "Geolocation not supported.",
}),
this
);
},
stopLocate: function (){
return (
navigator.geolocation &&
navigator.geolocation.clearWatch &&
navigator.geolocation.clearWatch(this._locationWatchId),
this._locateOptions&&(this._locateOptions.setView = !1),
this
);
},
_handleGeolocationError: function (t){
var e;
this._container._leaflet_id &&
((e=t.code),
(t =
t.message ||
(1===e
? "permission denied"
: 2===e
? "position unavailable"
: "timeout")),
this._locateOptions.setView &&
!this._loaded &&
this.fitWorld(),
this.fire("locationerror", {
code: e,
message: "Geolocation error: " + t + ".",
}));
},
_handleGeolocationResponse: function (t){
if(this._container._leaflet_id){
var e,
i,
n=new N(t.coords.latitude, t.coords.longitude),
o=n.toBounds(2 * t.coords.accuracy),
s=this._locateOptions,
r =
(s.setView &&
((e=this.getBoundsZoom(o)),
this.setView(n,
s.maxZoom ? Math.min(e, s.maxZoom):e
)),
{ latlng: n, bounds: o, timestamp: t.timestamp });
for (i in t.coords)
"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);
this.fire("locationfound", r);
}},
addHandler: function (t, e){
return (
e &&
((e=this[t]=new e(this)),
this._handlers.push(e),
this.options[t]&&e.enable()),
this
);
},
remove: function (){
if((this._initEvents(!0),
this.options.maxBounds &&
this.off("moveend", this._panInsideMaxBounds),
this._containerId!==this._container._leaflet_id)
)
throw new Error(
"Map container is being reused by another instance"
);
try {
delete this._container._leaflet_id, delete this._containerId;
} catch (t){
(this._container._leaflet_id=void 0),
(this._containerId=void 0);
}
for (var t in (void 0!==this._locationWatchId &&
this.stopLocate(),
this._stop(),
ie(this._mapPane),
this._clearControlPos&&this._clearControlPos(),
this._resizeRequest &&
(z(this._resizeRequest), (this._resizeRequest=null)),
this._clearHandlers(),
this._loaded&&this.fire("unload"),
this._layers))
this._layers[t].remove();
for (t in this._panes) ie(this._panes[t]);
return (
(this._layers=[]),
(this._panes=[]),
delete this._mapPane,
delete this._renderer,
this
);
},
createPane: function (t, e){
return (
(e=ee(
"div",
"leaflet-pane" +
(t ? " leaflet-" + t.replace("Pane", "") + "-pane":""),
e||this._mapPane
)),
t&&(this._panes[t]=e),
e
);
},
getCenter: function (){
return (
this._checkIfLoaded(),
this._lastCenter&&!this._moved()
? this._lastCenter.clone()
: this.layerPointToLatLng(this._getCenterLayerPoint())
);
},
getZoom: function (){
return this._zoom;
},
getBounds: function (){
var t=this.getPixelBounds();
return new O(
this.unproject(t.getBottomLeft()),
this.unproject(t.getTopRight())
);
},
getMinZoom: function (){
return void 0===this.options.minZoom
? this._layersMinZoom||0
: this.options.minZoom;
},
getMaxZoom: function (){
return void 0===this.options.maxZoom
? void 0===this._layersMaxZoom
? 1 / 0
: this._layersMaxZoom
: this.options.maxZoom;
},
getBoundsZoom: function (t, e, i){
(t=R(t)), (i=Z(i||[0, 0]));
var n=this.getZoom()||0,
o=this.getMinZoom(),
s=this.getMaxZoom(),
r=t.getNorthWest(),
a =
((t=t.getSouthEast()),
(i=this.getSize().subtract(i)),
(t=B(this.project(t, n), this.project(r, n)).getSize()),
(r=Ct.any3d ? this.options.zoomSnap:1),
i.x / t.x);
return (
(i=i.y / t.y),
(t=e ? Math.max(a, i):Math.min(a, i)),
(n=this.getScaleZoom(t, n)),
r &&
((n=Math.round(n / (r / 100)) * (r / 100)),
(n=e ? Math.ceil(n / r) * r:Math.floor(n / r) * r)),
Math.max(o, Math.min(s, n))
);
},
getSize: function (){
return (
(this._size&&!this._sizeChanged) ||
((this._size=new j(
this._container.clientWidth||0,
this._container.clientHeight||0
)),
(this._sizeChanged = !1)),
this._size.clone()
);
},
getPixelBounds: function (t, e){
return new A(
(t=this._getTopLeftPoint(t, e)),
t.add(this.getSize())
);
},
getPixelOrigin: function (){
return this._checkIfLoaded(), this._pixelOrigin;
},
getPixelWorldBounds: function (t){
return this.options.crs.getProjectedBounds(void 0===t ? this.getZoom():t
);
},
getPane: function (t){
return "string"==typeof t ? this._panes[t]:t;
},
getPanes: function (){
return this._panes;
},
getContainer: function (){
return this._container;
},
getZoomScale: function (t, e){
var i=this.options.crs;
return (
(e=void 0===e ? this._zoom:e), i.scale(t) / i.scale(e)
);
},
getScaleZoom: function (t, e){
var i=this.options.crs;
return (
(e=void 0===e ? this._zoom:e),
(t=i.zoom(t * i.scale(e))),
isNaN(t) ? 1 / 0:t
);
},
project: function (t, e){
return (
(e=void 0===e ? this._zoom:e),
this.options.crs.latLngToPoint(D(t), e)
);
},
unproject: function (t, e){
return (
(e=void 0===e ? this._zoom:e),
this.options.crs.pointToLatLng(Z(t), e)
);
},
layerPointToLatLng: function (t){
return (t=Z(t).add(this.getPixelOrigin())), this.unproject(t);
},
latLngToLayerPoint: function (t){
return this.project(D(t))
._round()
._subtract(this.getPixelOrigin());
},
wrapLatLng: function (t){
return this.options.crs.wrapLatLng(D(t));
},
wrapLatLngBounds: function (t){
return this.options.crs.wrapLatLngBounds(R(t));
},
distance: function (t, e){
return this.options.crs.distance(D(t), D(e));
},
containerPointToLayerPoint: function (t){
return Z(t).subtract(this._getMapPanePos());
},
layerPointToContainerPoint: function (t){
return Z(t).add(this._getMapPanePos());
},
containerPointToLatLng: function (t){
return (
(t=this.containerPointToLayerPoint(Z(t))),
this.layerPointToLatLng(t)
);
},
latLngToContainerPoint: function (t){
return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t))
);
},
mouseEventToContainerPoint: function (t){
return Ae(t, this._container);
},
mouseEventToLayerPoint: function (t){
return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t)
);
},
mouseEventToLatLng: function (t){
return this.layerPointToLatLng(this.mouseEventToLayerPoint(t));
},
_initContainer: function (t){
if(!(t=this._container=Xt(t)))
throw new Error("Map container not found.");
if(t._leaflet_id)
throw new Error("Map container is already initialized.");
be(t, "scroll", this._onScroll, this),
(this._containerId=r(t));
},
_initLayout: function (){
var t=this._container,
e =
((this._fadeAnimated =
this.options.fadeAnimation&&Ct.any3d),
ae(
t,
"leaflet-container" +
(Ct.touch ? " leaflet-touch":"") +
(Ct.retina ? " leaflet-retina":"") +
(Ct.ielt9 ? " leaflet-oldie":"") +
(Ct.safari ? " leaflet-safari":"") +
(this._fadeAnimated ? " leaflet-fade-anim":"")
),
te(t, "position"));
"absolute"!==e &&
"relative"!==e &&
"fixed"!==e &&
"sticky"!==e &&
(t.style.position="relative"),
this._initPanes(),
this._initControlPos&&this._initControlPos();
},
_initPanes: function (){
var t=(this._panes={});
(this._paneRenderers={}),
(this._mapPane=this.createPane("mapPane", this._container)),
_e(this._mapPane, new j(0, 0)),
this.createPane("tilePane"),
this.createPane("overlayPane"),
this.createPane("shadowPane"),
this.createPane("markerPane"),
this.createPane("tooltipPane"),
this.createPane("popupPane"),
this.options.markerZoomAnimation ||
(ae(t.markerPane, "leaflet-zoom-hide"),
ae(t.shadowPane, "leaflet-zoom-hide"));
},
_resetView: function (t, e, i){
_e(this._mapPane, new j(0, 0));
var n = !this._loaded,
o =
((this._loaded = !0),
(e=this._limitZoom(e)),
this.fire("viewprereset"),
this._zoom!==e);
this._moveStart(o, i)._move(t, e)._moveEnd(o),
this.fire("viewreset"),
n&&this.fire("load");
},
_moveStart: function (t, e){
return (
t&&this.fire("zoomstart"), e||this.fire("movestart"), this
);
},
_move: function (t, e, i, n){
void 0===e&&(e=this._zoom);
var o=this._zoom!==e;
return (
(this._zoom=e),
(this._lastCenter=t),
(this._pixelOrigin=this._getNewPixelOrigin(t)),
n
? i&&i.pinch&&this.fire("zoom", i)
: ((o||(i&&i.pinch))&&this.fire("zoom", i),
this.fire("move", i)),
this
);
},
_moveEnd: function (t){
return t&&this.fire("zoomend"), this.fire("moveend");
},
_stop: function (){
return (
z(this._flyToFrame),
this._panAnim&&this._panAnim.stop(),
this
);
},
_rawPanBy: function (t){
_e(this._mapPane, this._getMapPanePos().subtract(t));
},
_getZoomSpan: function (){
return this.getMaxZoom() - this.getMinZoom();
},
_panInsideMaxBounds: function (){
this._enforcingBounds ||
this.panInsideBounds(this.options.maxBounds);
},
_checkIfLoaded: function (){
if(!this._loaded)
throw new Error("Set map center and zoom first.");
},
_initEvents: function (t){
this._targets={};
var e=t ? ke:be;
e(
(this._targets[r(this._container)]=this)._container,
"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",
this._handleDOMEvent,
this
),
this.options.trackResize &&
e(window, "resize", this._onResize, this),
Ct.any3d &&
this.options.transform3DLimit &&
(t ? this.off:this.on).call(this,
"moveend",
this._onMoveEnd
);
},
_onResize: function (){
z(this._resizeRequest),
(this._resizeRequest=T(function (){
this.invalidateSize({ debounceMoveend: !0 });
}, this));
},
_onScroll: function (){
(this._container.scrollTop=0),
(this._container.scrollLeft=0);
},
_onMoveEnd: function (){
var t=this._getMapPanePos();
Math.max(Math.abs(t.x), Math.abs(t.y)) >=
this.options.transform3DLimit &&
this._resetView(this.getCenter(), this.getZoom());
},
_findEventTargets: function (t, e){
for (
var i,
n=[],
o="mouseout"===e||"mouseover"===e,
s=t.target||t.srcElement,
a = !1;
s;
){
if((i=this._targets[r(s)]) &&
("click"===e||"preclick"===e) &&
this._draggableMoved(i)
){
a = !0;
break;
}
if(i&&i.listens(e, !0)){
if(o&&!Re(s, t)) break;
if((n.push(i), o)) break;
}
if(s===this._container) break;
s=s.parentNode;
}
return n.length||a || o||!this.listens(e, !0) ? n:[this];
},
_isClickDisabled: function (t){
for (; t&&t!==this._container;){
if(t._leaflet_disable_click) return !0;
t=t.parentNode;
}},
_handleDOMEvent: function (t){
var e,
i=t.target||t.srcElement;
!this._loaded ||
i._leaflet_disable_events ||
("click"===t.type&&this._isClickDisabled(i)) ||
("mousedown"===(e=t.type)&&ye(i),
this._fireDOMEvent(t, e));
},
_mouseEvents: [
"click",
"dblclick",
"mouseover",
"mouseout",
"contextmenu",
],
_fireDOMEvent: function (t, i, n){
"click"===t.type &&
(((h=e({}, t)).type="preclick"),
this._fireDOMEvent(h, h.type, n));
var o=this._findEventTargets(t, i);
if(n){
for (var s=[], r=0; r < n.length; r++)
n[r].listens(i, !0)&&s.push(n[r]);
o=s.concat(o);
}
if(o.length){
"contextmenu"===i&&je(t);
var a,
h=o[0],
l={ originalEvent: t };
for (
"keypress"!==t.type &&
"keydown"!==t.type &&
"keyup"!==t.type &&
((a=h.getLatLng&&(!h._radius||h._radius <=10)),
(l.containerPoint=a
? this.latLngToContainerPoint(h.getLatLng())
: this.mouseEventToContainerPoint(t)),
(l.layerPoint=this.containerPointToLayerPoint(l.containerPoint
)),
(l.latlng=a
? h.getLatLng()
: this.layerPointToLatLng(l.layerPoint))),
r=0;
r < o.length;
r++
)
if((o[r].fire(i, l, !0),
l.originalEvent._stopped ||
(!1===o[r].options.bubblingMouseEvents &&
-1!==y(this._mouseEvents, i)))
)
return;
}},
_draggableMoved: function (t){
return (
((t=t.dragging&&t.dragging.enabled() ? t:this)
.dragging &&
t.dragging.moved()) ||
(this.boxZoom&&this.boxZoom.moved())
);
},
_clearHandlers: function (){
for (var t=0, e=this._handlers.length; t < e; t++)
this._handlers[t].disable();
},
whenReady: function (t, e){
return (
this._loaded
? t.call(e||this, { target: this })
: this.on("load", t, e),
this
);
},
_getMapPanePos: function (){
return me(this._mapPane)||new j(0, 0);
},
_moved: function (){
var t=this._getMapPanePos();
return t&&!t.equals([0, 0]);
},
_getTopLeftPoint: function (t, e){
return (
t&&void 0!==e
? this._getNewPixelOrigin(t, e)
: this.getPixelOrigin()
).subtract(this._getMapPanePos());
},
_getNewPixelOrigin: function (t, e){
var i=this.getSize()._divideBy(2);
return this.project(t, e)
._subtract(i)
._add(this._getMapPanePos())
._round();
},
_latLngToNewLayerPoint: function (t, e, i){
return (
(i=this._getNewPixelOrigin(i, e)),
this.project(t, e)._subtract(i)
);
},
_latLngBoundsToNewLayerBounds: function (t, e, i){
return (
(i=this._getNewPixelOrigin(i, e)),
B([
this.project(t.getSouthWest(), e)._subtract(i),
this.project(t.getNorthWest(), e)._subtract(i),
this.project(t.getSouthEast(), e)._subtract(i),
this.project(t.getNorthEast(), e)._subtract(i),
])
);
},
_getCenterLayerPoint: function (){
return this.containerPointToLayerPoint(this.getSize()._divideBy(2)
);
},
_getCenterOffset: function (t){
return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint()
);
},
_limitCenter: function (t, e, i){
var n, o;
return !i ||
((n=this.project(t, e)),
(o=this.getSize().divideBy(2)),
(o=new A(n.subtract(o), n.add(o))),
(o=this._getBoundsOffset(o, i, e)),
Math.abs(o.x) <=1&&Math.abs(o.y) <=1)
? t
: this.unproject(n.add(o), e);
},
_limitOffset: function (t, e){
var i;
return e
? ((i=new A(
(i=this.getPixelBounds()).min.add(t),
i.max.add(t)
)),
t.add(this._getBoundsOffset(i, e)))
: t;
},
_getBoundsOffset: function (t, e, i){
return (
(i=(e=B(
this.project(e.getNorthEast(), i),
this.project(e.getSouthWest(), i)
)).min.subtract(t.min)),
(e=e.max.subtract(t.max)),
new j(this._rebound(i.x, -e.x), this._rebound(i.y, -e.y))
);
},
_rebound: function (t, e){
return 0 < t + e
? Math.round(t - e) / 2
: Math.max(0, Math.ceil(t)) - Math.max(0, Math.floor(e));
},
_limitZoom: function (t){
var e=this.getMinZoom(),
i=this.getMaxZoom(),
n=Ct.any3d ? this.options.zoomSnap:1;
return (
n&&(t=Math.round(t / n) * n), Math.max(e, Math.min(i, t))
);
},
_onPanTransitionStep: function (){
this.fire("move");
},
_onPanTransitionEnd: function (){
he(this._mapPane, "leaflet-pan-anim"), this.fire("moveend");
},
_tryAnimatedPan: function (t, e){
return (
(t=this._getCenterOffset(t)._trunc()),
!(
(!0!==(e&&e.animate)&&!this.getSize().contains(t)) ||
(this.panBy(t, e), 0)
)
);
},
_createAnimProxy: function (){
var t=(this._proxy=ee(
"div",
"leaflet-proxy leaflet-zoom-animated"
));
this._panes.mapPane.appendChild(t),
this.on("zoomanim",
function (t){
var e=Kt,
i=this._proxy.style[e];
pe(
this._proxy,
this.project(t.center, t.zoom),
this.getZoomScale(t.zoom, 1)
),
i===this._proxy.style[e] &&
this._animatingZoom &&
this._onZoomTransitionEnd();
},
this
),
this.on("load moveend", this._animMoveEnd, this),
this._on("unload", this._destroyAnimProxy, this);
},
_destroyAnimProxy: function (){
ie(this._proxy),
this.off("load moveend", this._animMoveEnd, this),
delete this._proxy;
},
_animMoveEnd: function (){
var t=this.getCenter(),
e=this.getZoom();
pe(this._proxy, this.project(t, e), this.getZoomScale(e, 1));
},
_catchTransitionEnd: function (t){
this._animatingZoom &&
0 <=t.propertyName.indexOf("transform") &&
this._onZoomTransitionEnd();
},
_nothingToAnimate: function (){
return !this._container.getElementsByClassName("leaflet-zoom-animated"
).length;
},
_tryAnimatedZoom: function (t, e, i){
if(!this._animatingZoom){
if(((i=i||{}),
!this._zoomAnimated ||
!1===i.animate ||
this._nothingToAnimate() ||
Math.abs(e - this._zoom) >
this.options.zoomAnimationThreshold)
)
return !1;
var n=this.getZoomScale(e);
if(((n=this._getCenterOffset(t)._divideBy(1 - 1 / n)),
!0!==i.animate&&!this.getSize().contains(n))
)
return !1;
T(function (){
this._moveStart(!0, i.noMoveStart||!1)._animateZoom(t,
e,
!0
);
}, this);
}
return !0;
},
_animateZoom: function (t, e, i, n){
this._mapPane &&
(i &&
((this._animatingZoom = !0),
(this._animateToCenter=t),
(this._animateToZoom=e),
ae(this._mapPane, "leaflet-zoom-anim")),
this.fire("zoomanim", { center: t, zoom: e, noUpdate: n }),
this._tempFireZoomEvent ||
(this._tempFireZoomEvent =
this._zoom!==this._animateToZoom),
this._move(this._animateToCenter,
this._animateToZoom,
void 0,
!0
),
setTimeout(o(this._onZoomTransitionEnd, this), 250));
},
_onZoomTransitionEnd: function (){
this._animatingZoom &&
(this._mapPane&&he(this._mapPane, "leaflet-zoom-anim"),
(this._animatingZoom = !1),
this._move(this._animateToCenter,
this._animateToZoom,
void 0,
!0
),
this._tempFireZoomEvent&&this.fire("zoom"),
delete this._tempFireZoomEvent,
this.fire("move"),
this._moveEnd(!0));
},
});
function Qe(t){
return new He(t);
}
var Fe,
He=M.extend({
options: { position: "topright" },
initialize: function (t){
p(this, t);
},
getPosition: function (){
return this.options.position;
},
setPosition: function (t){
var e=this._map;
return (
e&&e.removeControl(this),
(this.options.position=t),
e&&e.addControl(this),
this
);
},
getContainer: function (){
return this._container;
},
addTo: function (t){
this.remove(), (this._map=t);
var e=(this._container=this.onAdd(t)),
i=this.getPosition();
return (
(t=t._controlCorners[i]),
ae(e, "leaflet-control"),
-1!==i.indexOf("bottom")
? t.insertBefore(e, t.firstChild)
: t.appendChild(e),
this._map.on("unload", this.remove, this),
this
);
},
remove: function (){
return (
this._map &&
(ie(this._container),
this.onRemove&&this.onRemove(this._map),
this._map.off("unload", this.remove, this),
(this._map=null)),
this
);
},
_refocusOnMap: function (t){
this._map &&
t &&
0 < t.screenX &&
0 < t.screenY &&
this._map.getContainer().focus();
},
}),
qe =
(De.include({
addControl: function (t){
return t.addTo(this), this;
},
removeControl: function (t){
return t.remove(), this;
},
_initControlPos: function (){
var t=(this._controlCorners={}),
e="leaflet-",
i=(this._controlContainer=ee(
"div",
e + "control-container",
this._container
));
function n(n, o){
t[n + o]=ee("div", e + n + " " + e + o, i);
}
n("top", "left"),
n("top", "right"),
n("bottom", "left"),
n("bottom", "right");
},
_clearControlPos: function (){
for (var t in this._controlCorners)
ie(this._controlCorners[t]);
ie(this._controlContainer),
delete this._controlCorners,
delete this._controlContainer;
},
}),
He.extend({
options: {
collapsed: !0,
position: "topright",
autoZIndex: !0,
hideSingleBase: !1,
sortLayers: !1,
sortFunction: function (t, e, i, n){
return i < n ? -1:n < i ? 1:0;
},
},
initialize: function (t, e, i){
for (var n in (p(this, i),
(this._layerControlInputs=[]),
(this._layers=[]),
(this._lastZIndex=0),
(this._handlingClick = !1),
(this._preventClick = !1),
t))
this._addLayer(t[n], n);
for (n in e) this._addLayer(e[n], n, !0);
},
onAdd: function (t){
this._initLayout(),
this._update(),
(this._map=t).on("zoomend",
this._checkDisabledLayers,
this
);
for (var e=0; e < this._layers.length; e++)
this._layers[e].layer.on("add remove",
this._onLayerChange,
this
);
return this._container;
},
addTo: function (t){
return (
He.prototype.addTo.call(this, t),
this._expandIfNotCollapsed()
);
},
onRemove: function (){
this._map.off("zoomend", this._checkDisabledLayers, this);
for (var t=0; t < this._layers.length; t++)
this._layers[t].layer.off("add remove",
this._onLayerChange,
this
);
},
addBaseLayer: function (t, e){
return (
this._addLayer(t, e), this._map ? this._update():this
);
},
addOverlay: function (t, e){
return (
this._addLayer(t, e, !0), this._map ? this._update():this
);
},
removeLayer: function (t){
return (
t.off("add remove", this._onLayerChange, this),
(t=this._getLayer(r(t))) &&
this._layers.splice(this._layers.indexOf(t), 1),
this._map ? this._update():this
);
},
expand: function (){
ae(this._container, "leaflet-control-layers-expanded"),
(this._section.style.height=null);
var t =
this._map.getSize().y - (this._container.offsetTop + 50);
return (
t < this._section.clientHeight
? (ae(this._section, "leaflet-control-layers-scrollbar"),
(this._section.style.height=t + "px"))
: he(this._section, "leaflet-control-layers-scrollbar"),
this._checkDisabledLayers(),
this
);
},
collapse: function (){
return (
he(this._container, "leaflet-control-layers-expanded"), this
);
},
_initLayout: function (){
var t="leaflet-control-layers",
e=(this._container=ee("div", t)),
i=this.options.collapsed,
n =
(e.setAttribute("aria-haspopup", !0),
Ie(e),
Se(e),
(this._section=ee("section", t + "-list"))),
o =
(i &&
(this._map.on("click", this.collapse, this),
be(
e,
{
mouseenter: this._expandSafely,
mouseleave: this.collapse,
},
this
)),
(this._layersLink=ee("a", t + "-toggle", e)));
(o.href="#"),
(o.title="Layers"),
o.setAttribute("role", "button"),
be(
o,
{
keydown: function (t){
13===t.keyCode&&this._expandSafely();
},
click: function (t){
je(t), this._expandSafely();
},
},
this
),
i||this.expand (),
(this._baseLayersList=ee("div", t + "-base", n)),
(this._separator=ee("div", t + "-separator", n)),
(this._overlaysList=ee("div", t + "-overlays", n)),
e.appendChild(n);
},
_getLayer: function (t){
for (var e=0; e < this._layers.length; e++)
if(this._layers[e]&&r(this._layers[e].layer)===t)
return this._layers[e];
},
_addLayer: function (t, e, i){
this._map&&t.on("add remove", this._onLayerChange, this),
this._layers.push({ layer: t, name: e, overlay: i }),
this.options.sortLayers &&
this._layers.sort(o(function (t, e){
return this.options.sortFunction(t.layer,
e.layer,
t.name,
e.name
);
}, this)
),
this.options.autoZIndex &&
t.setZIndex &&
(this._lastZIndex++, t.setZIndex(this._lastZIndex)),
this._expandIfNotCollapsed();
},
_update: function (){
if(this._container){
ne(this._baseLayersList),
ne(this._overlaysList),
(this._layerControlInputs=[]);
for (
var t, e, i, n=0, o=0;
o < this._layers.length;
o++
)
(i=this._layers[o]),
this._addItem(i),
(e=e||i.overlay),
(t=t||!i.overlay),
(n +=i.overlay ? 0:1);
this.options.hideSingleBase &&
(this._baseLayersList.style.display=(t=t&&1 < n)
? ""
: "none"),
(this._separator.style.display=e&&t ? "":"none");
}
return this;
},
_onLayerChange: function (t){
this._handlingClick||this._update();
var e=this._getLayer(r(t.target));
(t=e.overlay
? "add"===t.type
? "overlayadd"
: "overlayremove"
: "add"===t.type
? "baselayerchange"
: null)&&this._map.fire(t, e);
},
_createRadioElement: function (t, e){
return (
(t =
'<input type="radio" class="leaflet-control-layers-selector" name="' +
t +
'"' +
(e ? ' checked="checked"':"") +
"/>"),
((e=document.createElement("div")).innerHTML=t),
e.firstChild
);
},
_addItem: function (t){
var e,
i=document.createElement("label"),
n=this._map.hasLayer(t.layer),
o =
(((t.overlay
? (((e=document.createElement("input")).type =
"checkbox"),
(e.className="leaflet-control-layers-selector"),
(e.defaultChecked=n))
: (e=this._createRadioElement("leaflet-base-layers_" + r(this),
n
)),
this._layerControlInputs.push(e),
(e.layerId=r(t.layer)),
be(e, "click", this._onInputClick, this),
(n=document.createElement("span"))).innerHTML =
" " + t.name),
document.createElement("span"));
return (
i.appendChild(o),
o.appendChild(e),
o.appendChild(n),
(t.overlay
? this._overlaysList
: this._baseLayersList
).appendChild(i),
this._checkDisabledLayers(),
i
);
},
_onInputClick: function (){
if(!this._preventClick){
var t,
e,
i=this._layerControlInputs,
n=[],
o=[];
this._handlingClick = !0;
for (var s=i.length - 1; 0 <=s; s--)
(t=i[s]),
(e=this._getLayer(t.layerId).layer),
t.checked ? n.push(e):t.checked||o.push(e);
for (s=0; s < o.length; s++)
this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);
for (s=0; s < n.length; s++)
this._map.hasLayer(n[s])||this._map.addLayer(n[s]);
(this._handlingClick = !1), this._refocusOnMap();
}},
_checkDisabledLayers: function (){
for (
var t,
e,
i=this._layerControlInputs,
n=this._map.getZoom(),
o=i.length - 1;
0 <=o;
o--
)
(t=i[o]),
(e=this._getLayer(t.layerId).layer),
(t.disabled =
(void 0!==e.options.minZoom &&
n < e.options.minZoom) ||
(void 0!==e.options.maxZoom &&
n > e.options.maxZoom));
},
_expandIfNotCollapsed: function (){
return (
this._map&&!this.options.collapsed&&this.expand (), this
);
},
_expandSafely: function (){
var t=this._section,
e =
((this._preventClick = !0),
be(t, "click", je),
this.expand (),
this);
setTimeout(function (){
ke(t, "click", je), (e._preventClick = !1);
});
},
})),
We=He.extend({
options: {
position: "topleft",
zoomInText: '<span aria-hidden="true">+</span>',
zoomInTitle: "Zoom in",
zoomOutText: '<span aria-hidden="true">&#x2212;</span>',
zoomOutTitle: "Zoom out",
},
onAdd: function (t){
var e="leaflet-control-zoom",
i=ee("div", e + " leaflet-bar"),
n=this.options;
return (
(this._zoomInButton=this._createButton(n.zoomInText,
n.zoomInTitle,
e + "-in",
i,
this._zoomIn
)),
(this._zoomOutButton=this._createButton(n.zoomOutText,
n.zoomOutTitle,
e + "-out",
i,
this._zoomOut
)),
this._updateDisabled(),
t.on("zoomend zoomlevelschange", this._updateDisabled, this),
i
);
},
onRemove: function (t){
t.off("zoomend zoomlevelschange", this._updateDisabled, this);
},
disable: function (){
return (this._disabled = !0), this._updateDisabled(), this;
},
enable: function (){
return (this._disabled = !1), this._updateDisabled(), this;
},
_zoomIn: function (t){
!this._disabled &&
this._map._zoom < this._map.getMaxZoom() &&
this._map.zoomIn(this._map.options.zoomDelta * (t.shiftKey ? 3:1)
);
},
_zoomOut: function (t){
!this._disabled &&
this._map._zoom > this._map.getMinZoom() &&
this._map.zoomOut(this._map.options.zoomDelta * (t.shiftKey ? 3:1)
);
},
_createButton: function (t, e, i, n, o){
return (
((i=ee("a", i, n)).innerHTML=t),
(i.href="#"),
(i.title=e),
i.setAttribute("role", "button"),
i.setAttribute("aria-label", e),
Ie(i),
be(i, "click", Ee),
be(i, "click", o, this),
be(i, "click", this._refocusOnMap, this),
i
);
},
_updateDisabled: function (){
var t=this._map,
e="leaflet-disabled";
he(this._zoomInButton, e),
he(this._zoomOutButton, e),
this._zoomInButton.setAttribute("aria-disabled", "false"),
this._zoomOutButton.setAttribute("aria-disabled", "false"),
(!this._disabled&&t._zoom!==t.getMinZoom()) ||
(ae(this._zoomOutButton, e),
this._zoomOutButton.setAttribute("aria-disabled", "true")),
(!this._disabled&&t._zoom!==t.getMaxZoom()) ||
(ae(this._zoomInButton, e),
this._zoomInButton.setAttribute("aria-disabled", "true"));
},
}),
Ue =
(De.mergeOptions({ zoomControl: !0 }),
De.addInitHook(function (){
this.options.zoomControl &&
((this.zoomControl=new We()),
this.addControl(this.zoomControl));
}),
He.extend({
options: {
position: "bottomleft",
maxWidth: 100,
metric: !0,
imperial: !0,
},
onAdd: function (t){
var e="leaflet-control-scale",
i=ee("div", e),
n=this.options;
return (
this._addScales(n, e + "-line", i),
t.on(n.updateWhenIdle ? "moveend":"move",
this._update,
this
),
t.whenReady(this._update, this),
i
);
},
onRemove: function (t){
t.off(this.options.updateWhenIdle ? "moveend":"move",
this._update,
this
);
},
_addScales: function (t, e, i){
t.metric&&(this._mScale=ee("div", e, i)),
t.imperial&&(this._iScale=ee("div", e, i));
},
_update: function (){
var t=(e=this._map).getSize().y / 2,
e=e.distance(e.containerPointToLatLng([0, t]),
e.containerPointToLatLng([this.options.maxWidth, t])
);
this._updateScales(e);
},
_updateScales: function (t){
this.options.metric&&t && this._updateMetric(t),
this.options.imperial&&t && this._updateImperial(t);
},
_updateMetric: function (t){
var e=this._getRoundNum(t);
this._updateScale(this._mScale,
e < 1e3 ? e + " m":e / 1e3 + " km",
e / t
);
},
_updateImperial: function (t){
var e, i;
5280 < (t *=3.2808399)
? ((i=this._getRoundNum((e=t / 5280))),
this._updateScale(this._iScale, i + " mi", i / e))
: ((i=this._getRoundNum(t)),
this._updateScale(this._iScale, i + " ft", i / t));
},
_updateScale: function (t, e, i){
(t.style.width =
Math.round(this.options.maxWidth * i) + "px"),
(t.innerHTML=e);
},
_getRoundNum: function (t){
var e=Math.pow(10, (Math.floor(t) + "").length - 1);
return (
e *
(10 <=(t /=e)
? 10
: 5 <=t
? 5
: 3 <=t
? 3
: 2 <=t
? 2
: 1)
);
},
})),
$e=He.extend({
options: {
position: "bottomright",
prefix:
'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' +
(Ct.inlineSvg
? '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> '
: "") +
"Leaflet</a>",
},
initialize: function (t){
p(this, t), (this._attributions={});
},
onAdd: function (t){
for (var e in (((t.attributionControl=this)._container=ee(
"div",
"leaflet-control-attribution"
)),
Ie(this._container),
t._layers))
t._layers[e].getAttribution &&
this.addAttribution(t._layers[e].getAttribution());
return (
this._update(),
t.on("layeradd", this._addAttribution, this),
this._container
);
},
onRemove: function (t){
t.off("layeradd", this._addAttribution, this);
},
_addAttribution: function (t){
t.layer.getAttribution &&
(this.addAttribution(t.layer.getAttribution()),
t.layer.once("remove",
function (){
this.removeAttribution(t.layer.getAttribution());
},
this
));
},
setPrefix: function (t){
return (this.options.prefix=t), this._update(), this;
},
addAttribution: function (t){
return (
t &&
(this._attributions[t]||(this._attributions[t]=0),
this._attributions[t]++,
this._update()),
this
);
},
removeAttribution: function (t){
return (
t &&
this._attributions[t] &&
(this._attributions[t]--, this._update()),
this
);
},
_update: function (){
if(this._map){
var t,
e=[];
for (t in this._attributions)
this._attributions[t]&&e.push(t);
var i=[];
this.options.prefix&&i.push(this.options.prefix),
e.length&&i.push(e.join(", ")),
(this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> '
));
}},
}),
Ve =
(De.mergeOptions({ attributionControl: !0 }),
De.addInitHook(function (){
this.options.attributionControl&&new $e().addTo(this);
}),
(He.Layers=qe),
(He.Zoom=We),
(He.Scale=Ue),
(He.Attribution=$e),
(Qe.layers=function (t, e, i){
return new qe(t, e, i);
}),
(Qe.zoom=function (t){
return new We(t);
}),
(Qe.scale=function (t){
return new Ue(t);
}),
(Qe.attribution=function (t){
return new $e(t);
}),
(X=M.extend({
initialize: function (t){
this._map=t;
},
enable: function (){
return (
this._enabled||((this._enabled = !0), this.addHooks()),
this
);
},
disable: function (){
return (
this._enabled&&((this._enabled = !1), this.removeHooks()),
this
);
},
enabled: function (){
return !!this._enabled;
},
})),
(X.addTo=function (t, e){
return t.addHandler(e, this), this;
}),
(tt={ Events: S }),
Ct.touch ? "touchstart mousedown":"mousedown"),
Ge=I.extend({
options: { clickTolerance: 3 },
initialize: function (t, e, i, n){
p(this, n),
(this._element=t),
(this._dragStartTarget=e||t),
(this._preventOutline=i);
},
enable: function (){
this._enabled ||
(be(this._dragStartTarget, Ve, this._onDown, this),
(this._enabled = !0));
},
disable: function (){
this._enabled &&
(Ge._dragging===this&&this.finishDrag(!0),
ke(this._dragStartTarget, Ve, this._onDown, this),
(this._enabled = !1),
(this._moved = !1));
},
_onDown: function (t){
var e, i;
this._enabled &&
((this._moved = !1),
re(this._element, "leaflet-zoom-anim") ||
(t.touches&&1!==t.touches.length
? Ge._dragging===this&&this.finishDrag()
: Ge._dragging ||
t.shiftKey ||
(1!==t.which&&1!==t.button&&!t.touches) ||
((Ge._dragging=this)._preventOutline &&
ye(this._element),
fe(),
Ut(),
this._moving ||
(this.fire("down"),
(i=t.touches ? t.touches[0]:t),
(e=we(this._element)),
(this._startPoint=new j(i.clientX, i.clientY)),
(this._startPos=me(this._element)),
(this._parentScale=xe(e)),
(i="mousedown"===t.type),
be(
document,
i ? "mousemove":"touchmove",
this._onMove,
this
),
be(
document,
i ? "mouseup":"touchend touchcancel",
this._onUp,
this
)))));
},
_onMove: function (t){
var e;
this._enabled &&
(t.touches&&1 < t.touches.length
? (this._moved = !0)
: (!(e=new j(
(e =
t.touches&&1===t.touches.length
? t.touches[0]
: t).clientX,
e.clientY
)._subtract(this._startPoint)).x &&
!e.y) ||
Math.abs(e.x) + Math.abs(e.y) <
this.options.clickTolerance ||
((e.x /=this._parentScale.x),
(e.y /=this._parentScale.y),
je(t),
this._moved ||
(this.fire("dragstart"),
(this._moved = !0),
ae(document.body, "leaflet-dragging"),
(this._lastTarget=t.target||t.srcElement),
window.SVGElementInstance &&
this._lastTarget instanceof
window.SVGElementInstance &&
(this._lastTarget =
this._lastTarget.correspondingUseElement),
ae(this._lastTarget, "leaflet-drag-target")),
(this._newPos=this._startPos.add(e)),
(this._moving = !0),
(this._lastEvent=t),
this._updatePosition()));
},
_updatePosition: function (){
var t={ originalEvent: this._lastEvent };
this.fire("predrag", t),
_e(this._element, this._newPos),
this.fire("drag", t);
},
_onUp: function (){
this._enabled&&this.finishDrag();
},
finishDrag: function (t){
he(document.body, "leaflet-dragging"),
this._lastTarget &&
(he(this._lastTarget, "leaflet-drag-target"),
(this._lastTarget=null)),
ke(document, "mousemove touchmove", this._onMove, this),
ke(
document,
"mouseup touchend touchcancel",
this._onUp,
this
),
ge(),
$t();
var e=this._moved&&this._moving;
(this._moving = !1),
(Ge._dragging = !1),
e &&
this.fire("dragend", {
noInertia: t,
distance: this._newPos.distanceTo(this._startPos),
});
},
});
function Ke(t, e, i){
for (
var n, o, s, r, a, h, l, c=[1, 4, 2, 8], d=0, u=t.length;
d < u;
d++
)
t[d]._code=ni(t[d], e);
for (s=0; s < 4; s++){
for (
h=c[s], n=[], d=0, o=(u=t.length) - 1;
d < u;
o=d++
)
(r=t[d]),
(a=t[o]),
r._code & h
? a._code & h ||
(((l=ii(a, r, h, e, i))._code=ni(l, e)), n.push(l))
: (a._code & h &&
(((l=ii(a, r, h, e, i))._code=ni(l, e)), n.push(l)),
n.push(r));
t=n;
}
return t;
}
function Je(t, e){
var i, n, o, s, r, a, h;
if(!t||0===t.length) throw new Error("latlngs not passed");
si(t) ||
(console.warn("latlngs are not flat! Only the first ring will be used"
),
(t=t[0]));
for (
var l=D([0, 0]),
c=R(t),
d =
(c.getNorthWest().distanceTo(c.getSouthWest()) *
c.getNorthEast().distanceTo(c.getNorthWest()) <
1700&&(l=Ye(t)),
t.length),
u=[],
p=0;
p < d;
p++
){
var _=D(t[p]);
u.push(e.project(D([_.lat - l.lat, _.lng - l.lng])));
}
for (p=r = a=h = 0, i=d - 1; p < d; i=p++)
(n=u[p]),
(o=u[i]),
(s=n.y * o.x - o.y * n.x),
(a +=(n.x + o.x) * s),
(h +=(n.y + o.y) * s),
(r +=3 * s);
return (
(c=0===r ? u[0]:[a / r, h / r]),
D([(c=e.unproject(Z(c))).lat + l.lat, c.lng + l.lng])
);
}
function Ye(t){
for (var e=0, i=0, n=0, o=0; o < t.length; o++){
var s=D(t[o]);
(e +=s.lat), (i +=s.lng), n++;
}
return D([e / n, i / n]);
}
function Xe(t, e){
if(e&&t.length){
var i=(t=(function (t, e){
for (var i=[t[0]], n=1, o=0, s=t.length; n < s; n++)
(function (t, e){
var i=e.x - t.x;
return i * i + (e=e.y - t.y) * e;
})(t[n], t[o]) > e&&(i.push(t[n]), (o=n));
return o < s - 1&&i.push(t[s - 1]), i;
})(t, (e *=e))),
n=i.length,
o=new (typeof Uint8Array!=void 0 + "" ? Uint8Array:Array)(
n
);
(o[0]=o[n - 1]=1),
(function t(e, i, n, o, s){
var r,
a,
h,
l=0;
for (a=o + 1; a <=s - 1; a++)
l < (h=oi(e[a], e[o], e[s], !0))&&((r=a), (l=h));
n < l&&((i[r]=1), t(e, i, n, o, r), t(e, i, n, r, s));
})(i, o, e, 0, n - 1);
var s,
r=[];
for (s=0; s < n; s++) o[s]&&r.push(i[s]);
return r;
}
return t.slice();
}
function ti(t, e, i){
return Math.sqrt(oi(t, e, i, !0));
}
function ei(t, e, i, n, o){
var s,
r,
a,
h=n ? Fe:ni(t, i),
l=ni(e, i);
for (Fe=l; ;){
if(!(h | l)) return [t, e];
if(h & l) return !1;
(a=ni((r=ii(t, e, (s=h||l), i, o)), i)),
s===h ? ((t=r), (h=a)):((e=r), (l=a));
}}
function ii(t, e, i, n, o){
var s,
r,
a=e.x - t.x,
h=((e=e.y - t.y), n.min);
return (
(n=n.max),
8 & i
? ((s=t.x + (a * (n.y - t.y)) / e), (r=n.y))
: 4 & i
? ((s=t.x + (a * (h.y - t.y)) / e), (r=h.y))
: 2 & i
? ((s=n.x), (r=t.y + (e * (n.x - t.x)) / a))
: 1 & i&&((s=h.x), (r=t.y + (e * (h.x - t.x)) / a)),
new j(s, r, o)
);
}
function ni(t, e){
var i=0;
return (
t.x < e.min.x ? (i |=1):t.x > e.max.x&&(i |=2),
t.y < e.min.y ? (i |=4):t.y > e.max.y&&(i |=8),
i
);
}
function oi(t, e, i, n){
var o=e.x,
s=((e=e.y), i.x - o),
r=i.y - e,
a=s * s + r * r;
return (
0 < a &&
(1 < (a=((t.x - o) * s + (t.y - e) * r) / a)
? ((o=i.x), (e=i.y))
: 0 < a&&((o +=s * a), (e +=r * a))),
(s=t.x - o),
(r=t.y - e),
n ? s * s + r * r:new j(o, e)
);
}
function si(t){
return (
!g(t[0])||("object"!=typeof t[0][0]&&void 0!==t[0][0])
);
}
function ri(t){
return (
console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."
),
si(t)
);
}
function ai(t, e){
var i, n, o, s, r, a;
if(!t||0===t.length) throw new Error("latlngs not passed");
si(t) ||
(console.warn("latlngs are not flat! Only the first ring will be used"
),
(t=t[0]));
for (
var h=D([0, 0]),
l=R(t),
c =
(l.getNorthWest().distanceTo(l.getSouthWest()) *
l.getNorthEast().distanceTo(l.getNorthWest()) <
1700&&(h=Ye(t)),
t.length),
d=[],
u=0;
u < c;
u++
){
var p=D(t[u]);
d.push(e.project(D([p.lat - h.lat, p.lng - h.lng])));
}
for (i=u = 0; u < c - 1; u++) i +=d[u].distanceTo(d[u + 1]) / 2;
if(0===i) a=d[0];
else
for (n=u = 0; u < c - 1; u++)
if(((o=d[u]), (s=d[u + 1]), i < (n +=r = o.distanceTo(s)))
){
a=[
s.x - (r=(n - i) / r) * (s.x - o.x),
s.y - r * (s.y - o.y),
];
break;
}
return D([(l=e.unproject(Z(a))).lat + h.lat, l.lng + h.lng]);
}
(et={
__proto__: null,
clipPolygon: Ke,
polygonCenter: Je,
centroid: Ye,
}),
(it={
__proto__: null,
simplify: Xe,
pointToSegmentDistance: ti,
closestPointOnSegment: function (t, e, i){
return oi(t, e, i);
},
clipSegment: ei,
_getEdgeIntersection: ii,
_getBitCode: ni,
_sqClosestPointOnSegment: oi,
isFlat: si,
_flat: ri,
polylineCenter: ai,
}),
(nt={
project: function (t){
return new j(t.lng, t.lat);
},
unproject: function (t){
return new N(t.y, t.x);
},
bounds: new A([-180, -90], [180, 90]),
}),
(ot={
R: 6378137,
R_MINOR: 6356752.314245179,
bounds: new A(
[-20037508.34279, -15496570.73972],
[20037508.34279, 18764656.23138]
),
project: function (t){
var e=Math.PI / 180,
i=this.R,
n=t.lat * e,
o=this.R_MINOR / i,
s=(o=Math.sqrt(1 - o * o)) * Math.sin(n);
return (
(s =
Math.tan(Math.PI / 4 - n / 2) /
Math.pow((1 - s) / (1 + s), o / 2)),
(n=-i * Math.log(Math.max(s, 1e-10))),
new j(t.lng * e * i, n)
);
},
unproject: function (t){
for (
var e,
i=180 / Math.PI,
n=this.R,
o=this.R_MINOR / n,
s=Math.sqrt(1 - o * o),
r=Math.exp(-t.y / n),
a=Math.PI / 2 - 2 * Math.atan(r),
h=0,
l=0.1;
h < 15&&1e-7 < Math.abs(l);
h++
)
(e=s * Math.sin(a)),
(e=Math.pow((1 - e) / (1 + e), s / 2)),
(a +=l = Math.PI / 2 - 2 * Math.atan(r * e) - a);
return new N(a * i, (t.x * i) / n);
},
}),
(st={
__proto__: null,
LonLat: nt,
Mercator: ot,
SphericalMercator: H,
}),
(at=e({}, F, {
code: "EPSG:3395",
projection: ot,
transformation: W((rt=0.5 / (Math.PI * ot.R)), 0.5, -rt, 0.5),
}));
var hi=e({}, F, {
code: "EPSG:4326",
projection: nt,
transformation: W(1 / 180, 1, -1 / 180, 0.5),
}),
li =
((ht=e({}, Q, {
projection: nt,
transformation: W(1, 0, -1, 0),
scale: function (t){
return Math.pow(2, t);
},
zoom: function (t){
return Math.log(t) / Math.LN2;
},
distance: function (t, e){
var i=e.lng - t.lng;
return (e=e.lat - t.lat), Math.sqrt(i * i + e * e);
},
infinite: !0,
})),
(Q.Earth=F),
(Q.EPSG3395=at),
(Q.EPSG3857=U),
(Q.EPSG900913=$),
(Q.EPSG4326=hi),
(Q.Simple=ht),
(lt=I.extend({
options: {
pane: "overlayPane",
attribution: null,
bubblingMouseEvents: !0,
},
addTo: function (t){
return t.addLayer(this), this;
},
remove: function (){
return this.removeFrom(this._map||this._mapToAdd);
},
removeFrom: function (t){
return t&&t.removeLayer(this), this;
},
getPane: function (t){
return this._map.getPane(t ? this.options[t]||t:this.options.pane
);
},
addInteractiveTarget: function (t){
return (this._map._targets[r(t)]=this);
},
removeInteractiveTarget: function (t){
return delete this._map._targets[r(t)], this;
},
getAttribution: function (){
return this.options.attribution;
},
_layerAdd: function (t){
var e,
i=t.target;
i.hasLayer(this) &&
((this._map=i),
(this._zoomAnimated=i._zoomAnimated),
this.getEvents &&
((e=this.getEvents()),
i.on(e, this),
this.once("remove",
function (){
i.off(e, this);
},
this
)),
this.onAdd(i),
this.fire("add"),
i.fire("layeradd", { layer: this }));
},
})),
De.include({
addLayer: function (t){
var e;
if(t._layerAdd)
return (
(e=r(t)),
this._layers[e] ||
(((this._layers[e]=t)._mapToAdd=this),
t.beforeAdd&&t.beforeAdd(this),
this.whenReady(t._layerAdd, t)),
this
);
throw new Error("The provided object is not a Layer.");
},
removeLayer: function (t){
var e=r(t);
return (
this._layers[e] &&
(this._loaded&&t.onRemove(this),
delete this._layers[e],
this._loaded &&
(this.fire("layerremove", { layer: t }),
t.fire("remove")),
(t._map=t._mapToAdd=null)),
this
);
},
hasLayer: function (t){
return r(t) in this._layers;
},
eachLayer: function (t, e){
for (var i in this._layers) t.call(e, this._layers[i]);
return this;
},
_addLayers: function (t){
for (
var e=0, i=(t=t ? (g(t) ? t:[t]):[]).length;
e < i;
e++
)
this.addLayer(t[e]);
},
_addZoomLimit: function (t){
(isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)) ||
((this._zoomBoundLayers[r(t)]=t),
this._updateZoomLevels());
},
_removeZoomLimit: function (t){
(t=r(t)),
this._zoomBoundLayers[t] &&
(delete this._zoomBoundLayers[t],
this._updateZoomLevels());
},
_updateZoomLevels: function (){
var t,
e=1 / 0,
i=-1 / 0,
n=this._getZoomSpan();
for (t in this._zoomBoundLayers){
var o=this._zoomBoundLayers[t].options;
(e=void 0===o.minZoom ? e:Math.min(e, o.minZoom)),
(i=void 0===o.maxZoom ? i:Math.max(i, o.maxZoom));
}
(this._layersMaxZoom=i===-1 / 0 ? void 0:i),
(this._layersMinZoom=e===1 / 0 ? void 0:e),
n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),
void 0===this.options.maxZoom &&
this._layersMaxZoom &&
this.getZoom() > this._layersMaxZoom &&
this.setZoom(this._layersMaxZoom),
void 0===this.options.minZoom &&
this._layersMinZoom &&
this.getZoom() < this._layersMinZoom &&
this.setZoom(this._layersMinZoom);
},
}),
lt.extend({
initialize: function (t, e){
var i, n;
if((p(this, e), (this._layers={}), t))
for (i=0, n=t.length; i < n; i++) this.addLayer(t[i]);
},
addLayer: function (t){
var e=this.getLayerId(t);
return (
(this._layers[e]=t),
this._map&&this._map.addLayer(t),
this
);
},
removeLayer: function (t){
return (
(t=t in this._layers ? t:this.getLayerId(t)),
this._map &&
this._layers[t] &&
this._map.removeLayer(this._layers[t]),
delete this._layers[t],
this
);
},
hasLayer: function (t){
return (
("number"==typeof t ? t:this.getLayerId(t)) in
this._layers
);
},
clearLayers: function (){
return this.eachLayer(this.removeLayer, this);
},
invoke: function (t){
var e,
i,
n=Array.prototype.slice.call(arguments, 1);
for (e in this._layers)
(i=this._layers[e])[t]&&i[t].apply(i, n);
return this;
},
onAdd: function (t){
this.eachLayer(t.addLayer, t);
},
onRemove: function (t){
this.eachLayer(t.removeLayer, t);
},
eachLayer: function (t, e){
for (var i in this._layers) t.call(e, this._layers[i]);
return this;
},
getLayer: function (t){
return this._layers[t];
},
getLayers: function (){
var t=[];
return this.eachLayer(t.push, t), t;
},
setZIndex: function (t){
return this.invoke("setZIndex", t);
},
getLayerId: r,
})),
ci=li.extend({
addLayer: function (t){
return this.hasLayer(t)
? this
: (t.addEventParent(this),
li.prototype.addLayer.call(this, t),
this.fire("layeradd", { layer: t }));
},
removeLayer: function (t){
return this.hasLayer(t)
? ((t =
t in this._layers
? this._layers[t]
: t).removeEventParent(this),
li.prototype.removeLayer.call(this, t),
this.fire("layerremove", { layer: t }))
: this;
},
setStyle: function (t){
return this.invoke("setStyle", t);
},
bringToFront: function (){
return this.invoke("bringToFront");
},
bringToBack: function (){
return this.invoke("bringToBack");
},
getBounds: function (){
var t,
e=new O();
for (t in this._layers){
var i=this._layers[t];
e.extend(i.getBounds ? i.getBounds():i.getLatLng());
}
return e;
},
}),
di=M.extend({
options: {
popupAnchor: [0, 0],
tooltipAnchor: [0, 0],
crossOrigin: !1,
},
initialize: function (t){
p(this, t);
},
createIcon: function (t){
return this._createIcon("icon", t);
},
createShadow: function (t){
return this._createIcon("shadow", t);
},
_createIcon: function (t, e){
var i=this._getIconUrl(t);
if(i)
return (
(i=this._createImg(i,
e&&"IMG"===e.tagName ? e:null
)),
this._setIconStyles(i, t),
(!this.options.crossOrigin &&
""!==this.options.crossOrigin) ||
(i.crossOrigin =
!0===this.options.crossOrigin
? ""
: this.options.crossOrigin),
i
);
if("icon"===t)
throw new Error(
"iconUrl not set in Icon options (see the docs)."
);
return null;
},
_setIconStyles: function (t, e){
var i=this.options,
n=Z(
(n="number"==typeof (n=i[e + "Size"]) ? [n, n]:n)
),
o=Z(
("shadow"===e&&i.shadowAnchor) ||
i.iconAnchor ||
(n&&n.divideBy(2, !0))
);
(t.className =
"leaflet-marker-" + e + " " + (i.className||"")),
o &&
((t.style.marginLeft=-o.x + "px"),
(t.style.marginTop=-o.y + "px")),
n &&
((t.style.width=n.x + "px"),
(t.style.height=n.y + "px"));
},
_createImg: function (t, e){
return ((e=e||document.createElement("img")).src=t), e;
},
_getIconUrl: function (t){
return (
(Ct.retina&&this.options[t + "RetinaUrl"]) ||
this.options[t + "Url"]
);
},
}),
ui=di.extend({
options: {
iconUrl: "marker-icon.png",
iconRetinaUrl: "marker-icon-2x.png",
shadowUrl: "marker-shadow.png",
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
tooltipAnchor: [16, -28],
shadowSize: [41, 41],
},
_getIconUrl: function (t){
return (
"string"!=typeof ui.imagePath &&
(ui.imagePath=this._detectIconPath()),
(this.options.imagePath||ui.imagePath) +
di.prototype._getIconUrl.call(this, t)
);
},
_stripUrl: function (t){
function e(t, e, i){
return (e=e.exec(t))&&e[i];
}
return (
(t=e(t, /^url\((['"])?(.+)\1\)$/, 2)) &&
e(t, /^(.*)marker-icon\.png$/, 1)
);
},
_detectIconPath: function (){
var t=ee("div", "leaflet-default-icon-path", document.body),
e=te(t, "background-image")||te(t, "backgroundImage");
return (
document.body.removeChild(t),
(e=this._stripUrl(e))
? e
: (t=document.querySelector('link[href$="leaflet.css"]'))
? t.href.substring(0, t.href.length - 11 - 1)
: ""
);
},
}),
pi=X.extend({
initialize: function (t){
this._marker=t;
},
addHooks: function (){
var t=this._marker._icon;
this._draggable||(this._draggable=new Ge(t, t, !0)),
this._draggable
.on({
dragstart: this._onDragStart,
predrag: this._onPreDrag,
drag: this._onDrag,
dragend: this._onDragEnd,
},
this
)
.enable(),
ae(t, "leaflet-marker-draggable");
},
removeHooks: function (){
this._draggable
.off({
dragstart: this._onDragStart,
predrag: this._onPreDrag,
drag: this._onDrag,
dragend: this._onDragEnd,
},
this
)
.disable(),
this._marker._icon &&
he(this._marker._icon, "leaflet-marker-draggable");
},
moved: function (){
return this._draggable&&this._draggable._moved;
},
_adjustPan: function (t){
var e=this._marker,
i=e._map,
n=this._marker.options.autoPanSpeed,
o=this._marker.options.autoPanPadding,
s=me(e._icon),
r=i.getPixelBounds(),
a=i.getPixelOrigin();
(a=B(
r.min._subtract(a).add(o),
r.max._subtract(a).subtract(o)
)).contains(s) ||
((o=Z(
(Math.max(a.max.x, s.x) - a.max.x) / (r.max.x - a.max.x) -
(Math.min(a.min.x, s.x) - a.min.x) / (r.min.x - a.min.x),
(Math.max(a.max.y, s.y) - a.max.y) / (r.max.y - a.max.y) -
(Math.min(a.min.y, s.y) - a.min.y) / (r.min.y - a.min.y)
).multiplyBy(n)),
i.panBy(o, { animate: !1 }),
this._draggable._newPos._add(o),
this._draggable._startPos._add(o),
_e(e._icon, this._draggable._newPos),
this._onDrag(t),
(this._panRequest=T(this._adjustPan.bind(this, t))));
},
_onDragStart: function (){
(this._oldLatLng=this._marker.getLatLng()),
this._marker.closePopup&&this._marker.closePopup(),
this._marker.fire("movestart").fire("dragstart");
},
_onPreDrag: function (t){
this._marker.options.autoPan &&
(z(this._panRequest),
(this._panRequest=T(this._adjustPan.bind(this, t))));
},
_onDrag: function (t){
var e=this._marker,
i=e._shadow,
n=me(e._icon),
o=e._map.layerPointToLatLng(n);
i&&_e(i, n),
(e._latlng=o),
(t.latlng=o),
(t.oldLatLng=this._oldLatLng),
e.fire("move", t).fire("drag", t);
},
_onDragEnd: function (t){
z(this._panRequest),
delete this._oldLatLng,
this._marker.fire("moveend").fire("dragend", t);
},
}),
_i=lt.extend({
options: {
icon: new ui(),
interactive: !0,
keyboard: !0,
title: "",
alt: "Marker",
zIndexOffset: 0,
opacity: 1,
riseOnHover: !1,
riseOffset: 250,
pane: "markerPane",
shadowPane: "shadowPane",
bubblingMouseEvents: !1,
autoPanOnFocus: !0,
draggable: !1,
autoPan: !1,
autoPanPadding: [50, 50],
autoPanSpeed: 10,
},
initialize: function (t, e){
p(this, e), (this._latlng=D(t));
},
onAdd: function (t){
(this._zoomAnimated =
this._zoomAnimated&&t.options.markerZoomAnimation),
this._zoomAnimated &&
t.on("zoomanim", this._animateZoom, this),
this._initIcon(),
this.update();
},
onRemove: function (t){
this.dragging &&
this.dragging.enabled() &&
((this.options.draggable = !0), this.dragging.removeHooks()),
delete this.dragging,
this._zoomAnimated &&
t.off("zoomanim", this._animateZoom, this),
this._removeIcon(),
this._removeShadow();
},
getEvents: function (){
return { zoom: this.update, viewreset: this.update };},
getLatLng: function (){
return this._latlng;
},
setLatLng: function (t){
var e=this._latlng;
return (
(this._latlng=D(t)),
this.update(),
this.fire("move", { oldLatLng: e, latlng: this._latlng })
);
},
setZIndexOffset: function (t){
return (this.options.zIndexOffset=t), this.update();
},
getIcon: function (){
return this.options.icon;
},
setIcon: function (t){
return (
(this.options.icon=t),
this._map&&(this._initIcon(), this.update()),
this._popup &&
this.bindPopup(this._popup, this._popup.options),
this
);
},
getElement: function (){
return this._icon;
},
update: function (){
var t;
return (
this._icon &&
this._map &&
((t=this._map.latLngToLayerPoint(this._latlng).round()),
this._setPos(t)),
this
);
},
_initIcon: function (){
var t,
e=this.options,
i =
"leaflet-zoom-" +
(this._zoomAnimated ? "animated":"hide"),
n = !1,
o = !1;
(t=e.icon.createIcon(this._icon))!==this._icon &&
(this._icon&&this._removeIcon(),
(n = !0),
e.title&&(t.title=e.title),
"IMG"===t.tagName&&(t.alt=e.alt||"")),
ae(t, i),
e.keyboard &&
((t.tabIndex="0"), t.setAttribute("role", "button")),
(this._icon=t),
e.riseOnHover &&
this.on({
mouseover: this._bringToFront,
mouseout: this._resetZIndex,
}),
this.options.autoPanOnFocus &&
be(t, "focus", this._panOnFocus, this),
(t=e.icon.createShadow(this._shadow))!==this._shadow &&
(this._removeShadow(), (o = !0)),
t&&(ae(t, i), (t.alt="")),
(this._shadow=t),
e.opacity < 1&&this._updateOpacity(),
n&&this.getPane().appendChild(this._icon),
this._initInteraction(),
t &&
o &&
this.getPane(e.shadowPane).appendChild(this._shadow);
},
_removeIcon: function (){
this.options.riseOnHover &&
this.off({
mouseover: this._bringToFront,
mouseout: this._resetZIndex,
}),
this.options.autoPanOnFocus &&
ke(this._icon, "focus", this._panOnFocus, this),
ie(this._icon),
this.removeInteractiveTarget(this._icon),
(this._icon=null);
},
_removeShadow: function (){
this._shadow&&ie(this._shadow), (this._shadow=null);
},
_setPos: function (t){
this._icon&&_e(this._icon, t),
this._shadow&&_e(this._shadow, t),
(this._zIndex=t.y + this.options.zIndexOffset),
this._resetZIndex();
},
_updateZIndex: function (t){
this._icon&&(this._icon.style.zIndex=this._zIndex + t);
},
_animateZoom: function (t){
(t=this._map
._latLngToNewLayerPoint(this._latlng, t.zoom, t.center)
.round()),
this._setPos(t);
},
_initInteraction: function (){
var t;
this.options.interactive &&
(ae(this._icon, "leaflet-interactive"),
this.addInteractiveTarget(this._icon),
pi &&
((t=this.options.draggable),
this.dragging &&
((t=this.dragging.enabled()), this.dragging.disable()),
(this.dragging=new pi(this)),
t&&this.dragging.enable()));
},
setOpacity: function (t){
return (
(this.options.opacity=t),
this._map&&this._updateOpacity(),
this
);
},
_updateOpacity: function (){
var t=this.options.opacity;
this._icon&&de(this._icon, t),
this._shadow&&de(this._shadow, t);
},
_bringToFront: function (){
this._updateZIndex(this.options.riseOffset);
},
_resetZIndex: function (){
this._updateZIndex(0);
},
_panOnFocus: function (){
var t,
e,
i=this._map;
i &&
((t=(e=this.options.icon.options).iconSize
? Z(e.iconSize)
: Z(0, 0)),
(e=e.iconAnchor ? Z(e.iconAnchor):Z(0, 0)),
i.panInside(this._latlng, {
paddingTopLeft: e,
paddingBottomRight: t.subtract(e),
}));
},
_getPopupAnchor: function (){
return this.options.icon.options.popupAnchor;
},
_getTooltipAnchor: function (){
return this.options.icon.options.tooltipAnchor;
},
}),
mi=lt.extend({
options: {
stroke: !0,
color: "#3388ff",
weight: 3,
opacity: 1,
lineCap: "round",
lineJoin: "round",
dashArray: null,
dashOffset: null,
fill: !1,
fillColor: null,
fillOpacity: 0.2,
fillRule: "evenodd",
interactive: !0,
bubblingMouseEvents: !0,
},
beforeAdd: function (t){
this._renderer=t.getRenderer(this);
},
onAdd: function (){
this._renderer._initPath(this),
this._reset(),
this._renderer._addPath(this);
},
onRemove: function (){
this._renderer._removePath(this);
},
redraw: function (){
return this._map&&this._renderer._updatePath(this), this;
},
setStyle: function (t){
return (
p(this, t),
this._renderer &&
(this._renderer._updateStyle(this),
this.options.stroke &&
t &&
Object.prototype.hasOwnProperty.call(t, "weight") &&
this._updateBounds()),
this
);
},
bringToFront: function (){
return (
this._renderer&&this._renderer._bringToFront(this), this
);
},
bringToBack: function (){
return (
this._renderer&&this._renderer._bringToBack(this), this
);
},
getElement: function (){
return this._path;
},
_reset: function (){
this._project(), this._update();
},
_clickTolerance: function (){
return (
(this.options.stroke ? this.options.weight / 2:0) +
(this._renderer.options.tolerance||0)
);
},
}),
fi=mi.extend({
options: { fill: !0, radius: 10 },
initialize: function (t, e){
p(this, e),
(this._latlng=D(t)),
(this._radius=this.options.radius);
},
setLatLng: function (t){
var e=this._latlng;
return (
(this._latlng=D(t)),
this.redraw(),
this.fire("move", { oldLatLng: e, latlng: this._latlng })
);
},
getLatLng: function (){
return this._latlng;
},
setRadius: function (t){
return (this.options.radius=this._radius=t), this.redraw();
},
getRadius: function (){
return this._radius;
},
setStyle: function (t){
var e=(t&&t.radius)||this._radius;
return (
mi.prototype.setStyle.call(this, t), this.setRadius(e), this
);
},
_project: function (){
(this._point=this._map.latLngToLayerPoint(this._latlng)),
this._updateBounds();
},
_updateBounds: function (){
var t=this._radius,
e=this._radiusY||t,
i=this._clickTolerance();
(t=[t + i, e + i]),
(this._pxBounds=new A(
this._point.subtract(t),
this._point.add(t)
));
},
_update: function (){
this._map&&this._updatePath();
},
_updatePath: function (){
this._renderer._updateCircle(this);
},
_empty: function (){
return (
this._radius &&
!this._renderer._bounds.intersects(this._pxBounds)
);
},
_containsPoint: function (t){
return (
t.distanceTo(this._point) <=
this._radius + this._clickTolerance()
);
},
}),
gi=fi.extend({
initialize: function (t, i, n){
if((p(
this,
(i="number"==typeof i ? e({}, n, { radius: i }):i)
),
(this._latlng=D(t)),
isNaN(this.options.radius))
)
throw new Error("Circle radius cannot be NaN");
this._mRadius=this.options.radius;
},
setRadius: function (t){
return (this._mRadius=t), this.redraw();
},
getRadius: function (){
return this._mRadius;
},
getBounds: function (){
var t=[this._radius, this._radiusY||this._radius];
return new O(
this._map.layerPointToLatLng(this._point.subtract(t)),
this._map.layerPointToLatLng(this._point.add(t))
);
},
setStyle: mi.prototype.setStyle,
_project: function (){
var t,
e,
i,
n,
o,
s=this._latlng.lng,
r=this._latlng.lat,
a=this._map,
h=a.options.crs;
h.distance===F.distance
? ((n=Math.PI / 180),
(o=this._mRadius / F.R / n),
(t=a.project([r + o, s])),
(e=a.project([r - o, s])),
(e=t.add(e).divideBy(2)),
(i=a.unproject(e).lat),
(n =
Math.acos((Math.cos(o * n) - Math.sin(r * n) * Math.sin(i * n)) /
(Math.cos(r * n) * Math.cos(i * n))
) / n),
(!isNaN(n)&&0!==n) ||
(n=o / Math.cos((Math.PI / 180) * r)),
(this._point=e.subtract(a.getPixelOrigin())),
(this._radius=isNaN(n)
? 0
: e.x - a.project([i, s - n]).x),
(this._radiusY=e.y - t.y))
: ((o=h.unproject(h.project(this._latlng).subtract([this._mRadius, 0])
)),
(this._point=a.latLngToLayerPoint(this._latlng)),
(this._radius=this._point.x - a.latLngToLayerPoint(o).x)),
this._updateBounds();
},
}),
yi=mi.extend({
options: { smoothFactor: 1, noClip: !1 },
initialize: function (t, e){
p(this, e), this._setLatLngs(t);
},
getLatLngs: function (){
return this._latlngs;
},
setLatLngs: function (t){
return this._setLatLngs(t), this.redraw();
},
isEmpty: function (){
return !this._latlngs.length;
},
closestLayerPoint: function (t){
for (
var e=1 / 0,
i=null,
n=oi,
o=0,
s=this._parts.length;
o < s;
o++
)
for (
var r=this._parts[o], a=1, h=r.length;
a < h;
a++
){
var l,
c,
d=n(t, (l=r[a - 1]), (c=r[a]), !0);
d < e&&((e=d), (i=n(t, l, c)));
}
return i&&(i.distance=Math.sqrt(e)), i;
},
getCenter: function (){
if(this._map)
return ai(this._defaultShape(), this._map.options.crs);
throw new Error(
"Must add layer to map before using getCenter()"
);
},
getBounds: function (){
return this._bounds;
},
addLatLng: function (t, e){
return (
(e=e||this._defaultShape()),
(t=D(t)),
e.push(t),
this._bounds.extend(t),
this.redraw()
);
},
_setLatLngs: function (t){
(this._bounds=new O()),
(this._latlngs=this._convertLatLngs(t));
},
_defaultShape: function (){
return si(this._latlngs) ? this._latlngs:this._latlngs[0];
},
_convertLatLngs: function (t){
for (var e=[], i=si(t), n=0, o=t.length; n < o; n++)
i
? ((e[n]=D(t[n])), this._bounds.extend(e[n]))
: (e[n]=this._convertLatLngs(t[n]));
return e;
},
_project: function (){
var t=new A();
(this._rings=[]),
this._projectLatlngs(this._latlngs, this._rings, t),
this._bounds.isValid() &&
t.isValid() &&
((this._rawPxBounds=t), this._updateBounds());
},
_updateBounds: function (){
var t=new j((t=this._clickTolerance()), t);
this._rawPxBounds &&
(this._pxBounds=new A([
this._rawPxBounds.min.subtract(t),
this._rawPxBounds.max.add(t),
]));
},
_projectLatlngs: function (t, e, i){
var n,
o,
s=t[0] instanceof N,
r=t.length;
if(s){
for (o=[], n=0; n < r; n++)
(o[n]=this._map.latLngToLayerPoint(t[n])), i.extend(o[n]);
e.push(o);
} else for (n=0; n < r; n++) this._projectLatlngs(t[n], e, i);
},
_clipPoints: function (){
var t=this._renderer._bounds;
if(((this._parts=[]),
this._pxBounds&&this._pxBounds.intersects(t))
)
if(this.options.noClip) this._parts=this._rings;
else
for (
var e,
i,
n,
o,
s=this._parts,
r=0,
a=0,
h=this._rings.length;
r < h;
r++
)
for (
e=0, i=(o=this._rings[r]).length;
e < i - 1;
e++
)
(n=ei(o[e], o[e + 1], t, e, !0)) &&
((s[a]=s[a]||[]),
s[a].push(n[0]),
(n[1]===o[e + 1]&&e!==i - 2) ||
(s[a].push(n[1]), a++));
},
_simplifyPoints: function (){
for (
var t=this._parts,
e=this.options.smoothFactor,
i=0,
n=t.length;
i < n;
i++
)
t[i]=Xe(t[i], e);
},
_update: function (){
this._map &&
(this._clipPoints(),
this._simplifyPoints(),
this._updatePath());
},
_updatePath: function (){
this._renderer._updatePoly(this);
},
_containsPoint: function (t, e){
var i,
n,
o,
s,
r,
a,
h=this._clickTolerance();
if(this._pxBounds&&this._pxBounds.contains(t))
for (i=0, s=this._parts.length; i < s; i++)
for (
n=0, o=(r=(a=this._parts[i]).length) - 1;
n < r;
o=n++
)
if((e||0!==n)&&ti(t, a[o], a[n]) <=h) return !0;
return !1;
},
});
yi._flat=ri;
var vi=yi.extend({
options: { fill: !0 },
isEmpty: function (){
return !this._latlngs.length||!this._latlngs[0].length;
},
getCenter: function (){
if(this._map)
return Je(this._defaultShape(), this._map.options.crs);
throw new Error(
"Must add layer to map before using getCenter()"
);
},
_convertLatLngs: function (t){
var e=(t=yi.prototype._convertLatLngs.call(this, t)).length;
return (
2 <=e &&
t[0] instanceof N &&
t[0].equals(t[e - 1]) &&
t.pop(),
t
);
},
_setLatLngs: function (t){
yi.prototype._setLatLngs.call(this, t),
si(this._latlngs)&&(this._latlngs=[this._latlngs]);
},
_defaultShape: function (){
return (
si(this._latlngs[0]) ? this._latlngs:this._latlngs[0]
)[0];
},
_clipPoints: function (){
var t=this._renderer._bounds,
e=new j((e=this.options.weight), e);
if(((t=new A(t.min.subtract(e), t.max.add(e))),
(this._parts=[]),
this._pxBounds&&this._pxBounds.intersects(t))
)
if(this.options.noClip) this._parts=this._rings;
else
for (var i, n=0, o=this._rings.length; n < o; n++)
(i=Ke(this._rings[n], t, !0)).length &&
this._parts.push(i);
},
_updatePath: function (){
this._renderer._updatePoly(this, !0);
},
_containsPoint: function (t){
var e,
i,
n,
o,
s,
r,
a,
h,
l = !1;
if(!this._pxBounds||!this._pxBounds.contains(t)) return !1;
for (o=0, a=this._parts.length; o < a; o++)
for (
s=0, r=(h=(e=this._parts[o]).length) - 1;
s < h;
r=s++
)
(i=e[s]),
(n=e[r]),
i.y > t.y!=n.y > t.y &&
t.x < ((n.x - i.x) * (t.y - i.y)) / (n.y - i.y) + i.x &&
(l = !l);
return l||yi.prototype._containsPoint.call(this, t, !0);
},
}),
wi=ci.extend({
initialize: function (t, e){
p(this, e), (this._layers={}), t&&this.addData(t);
},
addData: function (t){
var e,
i,
n,
o=g(t) ? t:t.features;
if(o){
for (e=0, i=o.length; e < i; e++)
((n=o[e]).geometries ||
n.geometry ||
n.features ||
n.coordinates) &&
this.addData(n);
return this;
}
var s,
r=this.options;
return (r.filter&&!r.filter(t))||!(s=xi(t, r))
? this
: ((s.feature=Ci(t)),
(s.defaultOptions=s.options),
this.resetStyle(s),
r.onEachFeature&&r.onEachFeature(t, s),
this.addLayer(s));
},
resetStyle: function (t){
return void 0===t
? this.eachLayer(this.resetStyle, this)
: ((t.options=e({}, t.defaultOptions)),
this._setLayerStyle(t, this.options.style),
this);
},
setStyle: function (t){
return this.eachLayer(function (e){
this._setLayerStyle(e, t);
}, this);
},
_setLayerStyle: function (t, e){
t.setStyle &&
("function"==typeof e&&(e=e(t.feature)), t.setStyle(e));
},
});
function xi(t, e){
var i,
n,
o,
s,
r="Feature"===t.type ? t.geometry:t,
a=r ? r.coordinates:null,
h=[],
l=e&&e.pointToLayer,
c=(e&&e.coordsToLatLng)||Pi;
if(!a&&!r) return null;
switch (r.type){
case "Point":
return bi(l, t, (i=c(a)), e);
case "MultiPoint":
for (o=0, s=a.length; o < s; o++)
(i=c(a[o])), h.push(bi(l, t, i, e));
return new ci(h);
case "LineString":
case "MultiLineString":
return (
(n=ki(a, "LineString"===r.type ? 0:1, c)), new yi(n, e)
);
case "Polygon":
case "MultiPolygon":
return (
(n=ki(a, "Polygon"===r.type ? 1:2, c)), new vi(n, e)
);
case "GeometryCollection":
for (o=0, s=r.geometries.length; o < s; o++){
var d=xi(
{
geometry: r.geometries[o],
type: "Feature",
properties: t.properties,
},
e
);
d&&h.push(d);
}
return new ci(h);
case "FeatureCollection":
for (o=0, s=r.features.length; o < s; o++){
var u=xi(r.features[o], e);
u&&h.push(u);
}
return new ci(h);
default:
throw new Error("Invalid GeoJSON object.");
}}
function bi(t, e, i, n){
return t ? t(e, i):new _i(i, n&&n.markersInheritOptions&&n);
}
function Pi(t){
return new N(t[1], t[0], t[2]);
}
function ki(t, e, i){
for (var n, o=[], s=0, r=t.length; s < r; s++)
(n=e ? ki(t[s], e - 1, i):(i||Pi)(t[s])), o.push(n);
return o;
}
function Li(t, e){
return void 0!==(t=D(t)).alt
? [c(t.lng, e), c(t.lat, e), c(t.alt, e)]
: [c(t.lng, e), c(t.lat, e)];
}
function Ti(t, e, i, n){
for (var o=[], s=0, r=t.length; s < r; s++)
o.push(e ? Ti(t[s], si(t[s]) ? 0:e - 1, i, n):Li(t[s], n));
return !e&&i && 0 < o.length&&o.push(o[0].slice()), o;
}
function zi(t, i){
return t.feature ? e({}, t.feature, { geometry: i }):Ci(i);
}
function Ci(t){
return "Feature"===t.type||"FeatureCollection"===t.type
? t
: { type: "Feature", properties: {}, geometry: t };}
function Mi(t, e){
return new wi(t, e);
}
(ct={
toGeoJSON: function (t){
return zi(this, {
type: "Point",
coordinates: Li(this.getLatLng(), t),
});
},
}),
_i.include(ct),
gi.include(ct),
fi.include(ct),
yi.include({
toGeoJSON: function (t){
var e = !si(this._latlngs);
return zi(this, {
type: (e ? "Multi":"") + "LineString",
coordinates: Ti(this._latlngs, e ? 1:0, !1, t),
});
},
}),
vi.include({
toGeoJSON: function (t){
var e = !si(this._latlngs),
i=e&&!si(this._latlngs[0]);
return (
(t=Ti(this._latlngs, i ? 2:e ? 1:0, !0, t)),
zi(this, {
type: (i ? "Multi":"") + "Polygon",
coordinates: (t=e ? t:[t]),
})
);
},
}),
li.include({
toMultiPoint: function (t){
var e=[];
return (
this.eachLayer(function (i){
e.push(i.toGeoJSON(t).geometry.coordinates);
}),
zi(this, { type: "MultiPoint", coordinates: e })
);
},
toGeoJSON: function (t){
var e,
i,
n =
this.feature &&
this.feature.geometry &&
this.feature.geometry.type;
return "MultiPoint"===n
? this.toMultiPoint(t)
: ((e="GeometryCollection"===n),
(i=[]),
this.eachLayer(function (n){
n.toGeoJSON &&
((n=n.toGeoJSON(t)),
e
? i.push(n.geometry)
: "FeatureCollection"===(n=Ci(n)).type
? i.push.apply(i, n.features)
: i.push(n));
}),
e
? zi(this, { geometries: i, type: "GeometryCollection" })
: { type: "FeatureCollection", features: i });
},
}),
(dt=Mi);
var Si=lt.extend({
options: {
opacity: 1,
alt: "",
interactive: !1,
crossOrigin: !1,
errorOverlayUrl: "",
zIndex: 1,
className: "",
},
initialize: function (t, e, i){
(this._url=t), (this._bounds=R(e)), p(this, i);
},
onAdd: function (){
this._image ||
(this._initImage(),
this.options.opacity < 1&&this._updateOpacity()),
this.options.interactive &&
(ae(this._image, "leaflet-interactive"),
this.addInteractiveTarget(this._image)),
this.getPane().appendChild(this._image),
this._reset();
},
onRemove: function (){
ie(this._image),
this.options.interactive &&
this.removeInteractiveTarget(this._image);
},
setOpacity: function (t){
return (
(this.options.opacity=t),
this._image&&this._updateOpacity(),
this
);
},
setStyle: function (t){
return t.opacity&&this.setOpacity(t.opacity), this;
},
bringToFront: function (){
return this._map&&oe(this._image), this;
},
bringToBack: function (){
return this._map&&se(this._image), this;
},
setUrl: function (t){
return (
(this._url=t), this._image&&(this._image.src=t), this
);
},
setBounds: function (t){
return (this._bounds=R(t)), this._map&&this._reset(), this;
},
getEvents: function (){
var t={ zoom: this._reset, viewreset: this._reset };
return (
this._zoomAnimated&&(t.zoomanim=this._animateZoom), t
);
},
setZIndex: function (t){
return (this.options.zIndex=t), this._updateZIndex(), this;
},
getBounds: function (){
return this._bounds;
},
getElement: function (){
return this._image;
},
_initImage: function (){
var t="IMG"===this._url.tagName,
e=(this._image=t ? this._url:ee("img"));
ae(e, "leaflet-image-layer"),
this._zoomAnimated&&ae(e, "leaflet-zoom-animated"),
this.options.className&&ae(e, this.options.className),
(e.onselectstart=l),
(e.onmousemove=l),
(e.onload=o(this.fire, this, "load")),
(e.onerror=o(this._overlayOnError, this, "error")),
(!this.options.crossOrigin &&
""!==this.options.crossOrigin) ||
(e.crossOrigin =
!0===this.options.crossOrigin
? ""
: this.options.crossOrigin),
this.options.zIndex&&this._updateZIndex(),
t
? (this._url=e.src)
: ((e.src=this._url), (e.alt=this.options.alt));
},
_animateZoom: function (t){
var e=this._map.getZoomScale(t.zoom);
(t=this._map._latLngBoundsToNewLayerBounds(this._bounds,
t.zoom,
t.center
).min),
pe(this._image, t, e);
},
_reset: function (){
var t=this._image,
e=new A(
this._map.latLngToLayerPoint(this._bounds.getNorthWest()),
this._map.latLngToLayerPoint(this._bounds.getSouthEast())
),
i=e.getSize();
_e(t, e.min),
(t.style.width=i.x + "px"),
(t.style.height=i.y + "px");
},
_updateOpacity: function (){
de(this._image, this.options.opacity);
},
_updateZIndex: function (){
this._image &&
void 0!==this.options.zIndex &&
null!==this.options.zIndex &&
(this._image.style.zIndex=this.options.zIndex);
},
_overlayOnError: function (){
this.fire("error");
var t=this.options.errorOverlayUrl;
t &&
this._url!==t &&
((this._url=t), (this._image.src=t));
},
getCenter: function (){
return this._bounds.getCenter();
},
}),
Ii=Si.extend({
options: {
autoplay: !0,
loop: !0,
keepAspectRatio: !0,
muted: !1,
playsInline: !0,
},
_initImage: function (){
var t="VIDEO"===this._url.tagName,
e=(this._image=t ? this._url:ee("video"));
if((ae(e, "leaflet-image-layer"),
this._zoomAnimated&&ae(e, "leaflet-zoom-animated"),
this.options.className&&ae(e, this.options.className),
(e.onselectstart=l),
(e.onmousemove=l),
(e.onloadeddata=o(this.fire, this, "load")),
t)
){
for (
var i=e.getElementsByTagName("source"), n=[], s=0;
s < i.length;
s++
)
n.push(i[s].src);
this._url=0 < i.length ? n:[e.src];
}else{
g(this._url)||(this._url=[this._url]),
!this.options.keepAspectRatio &&
Object.prototype.hasOwnProperty.call(e.style,
"objectFit"
) &&
(e.style.objectFit="fill"),
(e.autoplay = !!this.options.autoplay),
(e.loop = !!this.options.loop),
(e.muted = !!this.options.muted),
(e.playsInline = !!this.options.playsInline);
for (var r=0; r < this._url.length; r++){
var a=ee("source");
(a.src=this._url[r]), e.appendChild(a);
}}
},
}),
ji=Si.extend({
_initImage: function (){
var t=(this._image=this._url);
ae(t, "leaflet-image-layer"),
this._zoomAnimated&&ae(t, "leaflet-zoom-animated"),
this.options.className&&ae(t, this.options.className),
(t.onselectstart=l),
(t.onmousemove=l);
},
}),
Ei=lt.extend({
options: {
interactive: !1,
offset: [0, 0],
className: "",
pane: void 0,
content: "",
},
initialize: function (t, e){
t&&(t instanceof N||g(t))
? ((this._latlng=D(t)), p(this, e))
: (p(this, t), (this._source=e)),
this.options.content &&
(this._content=this.options.content);
},
openOn: function (t){
return (
(t=arguments.length ? t:this._source._map).hasLayer(this
)||t.addLayer(this),
this
);
},
close: function (){
return this._map&&this._map.removeLayer(this), this;
},
toggle: function (t){
return (
this._map
? this.close()
: (arguments.length
? (this._source=t)
: (t=this._source),
this._prepareOpen(),
this.openOn(t._map)),
this
);
},
onAdd: function (t){
(this._zoomAnimated=t._zoomAnimated),
this._container||this._initLayout(),
t._fadeAnimated&&de(this._container, 0),
clearTimeout(this._removeTimeout),
this.getPane().appendChild(this._container),
this.update(),
t._fadeAnimated&&de(this._container, 1),
this.bringToFront(),
this.options.interactive &&
(ae(this._container, "leaflet-interactive"),
this.addInteractiveTarget(this._container));
},
onRemove: function (t){
t._fadeAnimated
? (de(this._container, 0),
(this._removeTimeout=setTimeout(
o(ie, void 0, this._container),
200
)))
: ie(this._container),
this.options.interactive &&
(he(this._container, "leaflet-interactive"),
this.removeInteractiveTarget(this._container));
},
getLatLng: function (){
return this._latlng;
},
setLatLng: function (t){
return (
(this._latlng=D(t)),
this._map&&(this._updatePosition(), this._adjustPan()),
this
);
},
getContent: function (){
return this._content;
},
setContent: function (t){
return (this._content=t), this.update(), this;
},
getElement: function (){
return this._container;
},
update: function (){
this._map &&
((this._container.style.visibility="hidden"),
this._updateContent(),
this._updateLayout(),
this._updatePosition(),
(this._container.style.visibility=""),
this._adjustPan());
},
getEvents: function (){
var t={
zoom: this._updatePosition,
viewreset: this._updatePosition,
};
return (
this._zoomAnimated&&(t.zoomanim=this._animateZoom), t
);
},
isOpen: function (){
return !!this._map&&this._map.hasLayer(this);
},
bringToFront: function (){
return this._map&&oe(this._container), this;
},
bringToBack: function (){
return this._map&&se(this._container), this;
},
_prepareOpen: function (t){
if(!(i=this._source)._map) return !1;
if(i instanceof ci){
var e,
i=null,
n=this._source._layers;
for (e in n)
if(n[e]._map){
i=n[e];
break;
}
if(!i) return !1;
this._source=i;
}
if(!t)
if(i.getCenter) t=i.getCenter();
else if(i.getLatLng) t=i.getLatLng();
else {
if(!i.getBounds)
throw new Error("Unable to get source layer LatLng.");
t=i.getBounds().getCenter();
}
return this.setLatLng(t), this._map&&this.update(), !0;
},
_updateContent: function (){
if(this._content){
var t=this._contentNode,
e =
"function"==typeof this._content
? this._content(this._source||this)
: this._content;
if("string"==typeof e) t.innerHTML=e;
else {
for (; t.hasChildNodes();) t.removeChild(t.firstChild);
t.appendChild(e);
}
this.fire("contentupdate");
}},
_updatePosition: function (){
var t, e, i;
this._map &&
((e=this._map.latLngToLayerPoint(this._latlng)),
(t=Z(this.options.offset)),
(i=this._getAnchor()),
this._zoomAnimated
? _e(this._container, e.add(i))
: (t=t.add(e).add(i)),
(e=this._containerBottom=-t.y),
(i=this._containerLeft =
-Math.round(this._containerWidth / 2) + t.x),
(this._container.style.bottom=e + "px"),
(this._container.style.left=i + "px"));
},
_getAnchor: function (){
return [0, 0];
},
}),
Zi =
(De.include({
_initOverlay: function (t, e, i, n){
var o=e;
return (
o instanceof t||(o=new t(n).setContent(e)),
i&&o.setLatLng(i),
o
);
},
}),
lt.include({
_initOverlay: function (t, e, i, n){
var o=i;
return (
o instanceof t
? (p(o, n), (o._source=this))
: (o=e&&!n ? e:new t(n, this)).setContent(i),
o
);
},
}),
Ei.extend({
options: {
pane: "popupPane",
offset: [0, 7],
maxWidth: 300,
minWidth: 50,
maxHeight: null,
autoPan: !0,
autoPanPaddingTopLeft: null,
autoPanPaddingBottomRight: null,
autoPanPadding: [5, 5],
keepInView: !1,
closeButton: !0,
autoClose: !0,
closeOnEscapeKey: !0,
className: "",
},
openOn: function (t){
return (
!(t=arguments.length ? t:this._source._map).hasLayer(this
) &&
t._popup &&
t._popup.options.autoClose &&
t.removeLayer(t._popup),
(t._popup=this),
Ei.prototype.openOn.call(this, t)
);
},
onAdd: function (t){
Ei.prototype.onAdd.call(this, t),
t.fire("popupopen", { popup: this }),
this._source &&
(this._source.fire("popupopen", { popup: this }, !0),
this._source instanceof mi ||
this._source.on("preclick", Me));
},
onRemove: function (t){
Ei.prototype.onRemove.call(this, t),
t.fire("popupclose", { popup: this }),
this._source &&
(this._source.fire("popupclose", { popup: this }, !0),
this._source instanceof mi ||
this._source.off("preclick", Me));
},
getEvents: function (){
var t=Ei.prototype.getEvents.call(this);
return (
(void 0!==this.options.closeOnClick
? this.options.closeOnClick
: this._map.options.closePopupOnClick) &&
(t.preclick=this.close),
this.options.keepInView&&(t.moveend=this._adjustPan),
t
);
},
_initLayout: function (){
var t="leaflet-popup",
e=(this._container=ee(
"div",
t +
" " +
(this.options.className||"") +
" leaflet-zoom-animated"
)),
i=(this._wrapper=ee("div", t + "-content-wrapper", e));
(this._contentNode=ee("div", t + "-content", i)),
Ie(e),
Se(this._contentNode),
be(e, "contextmenu", Me),
(this._tipContainer=ee("div", t + "-tip-container", e)),
(this._tip=ee("div", t + "-tip", this._tipContainer)),
this.options.closeButton &&
((i=this._closeButton =
ee("a", t + "-close-button", e)).setAttribute("role",
"button"
),
i.setAttribute("aria-label", "Close popup"),
(i.href="#close"),
(i.innerHTML='<span aria-hidden="true">&#215;</span>'),
be(
i,
"click",
function (t){
je(t), this.close();
},
this
));
},
_updateLayout: function (){
var t=this._contentNode,
e=t.style,
i =
((e.width=""),
(e.whiteSpace="nowrap"),
t.offsetWidth),
n =
((i=Math.min(i, this.options.maxWidth)),
(i=Math.max(i, this.options.minWidth)),
(e.width=i + 1 + "px"),
(e.whiteSpace=""),
(e.height=""),
(i=t.offsetHeight),
this.options.maxHeight),
o="leaflet-popup-scrolled";
(n&&n < i ? ((e.height=n + "px"), ae):he)(t, o),
(this._containerWidth=this._container.offsetWidth);
},
_animateZoom: function (t){
t=this._map._latLngToNewLayerPoint(this._latlng,
t.zoom,
t.center
);
var e=this._getAnchor();
_e(this._container, t.add(e));
},
_adjustPan: function (){
var t, e, i, n, o, s, r, a;
this.options.autoPan &&
(this._map._panAnim&&this._map._panAnim.stop(),
this._autopanning
? (this._autopanning = !1)
: ((t=this._map),
(e =
parseInt(te(this._container, "marginBottom"), 10) ||
0),
(e=this._container.offsetHeight + e),
(a=this._containerWidth),
(i=new j(
this._containerLeft,
-e - this._containerBottom
))._add(me(this._container)),
(i=t.layerPointToContainerPoint(i)),
(o=Z(this.options.autoPanPadding)),
(n=Z(this.options.autoPanPaddingTopLeft||o)),
(o=Z(this.options.autoPanPaddingBottomRight||o)),
(s=t.getSize()),
(r=0),
i.x + a + o.x > s.x&&(r=i.x + a - s.x + o.x),
i.x - r - n.x < (a=0)&&(r=i.x - n.x),
i.y + e + o.y > s.y&&(a=i.y + e - s.y + o.y),
i.y - a - n.y < 0&&(a=i.y - n.y),
(r||a) &&
(this.options.keepInView&&(this._autopanning = !0),
t.fire("autopanstart").panBy([r, a]))));
},
_getAnchor: function (){
return Z(
this._source&&this._source._getPopupAnchor
? this._source._getPopupAnchor()
: [0, 0]
);
},
})),
Ai =
(De.mergeOptions({ closePopupOnClick: !0 }),
De.include({
openPopup: function (t, e, i){
return this._initOverlay(Zi, t, e, i).openOn(this), this;
},
closePopup: function (t){
return (
(t=arguments.length ? t:this._popup)&&t.close(), this
);
},
}),
lt.include({
bindPopup: function (t, e){
return (
(this._popup=this._initOverlay(Zi, this._popup, t, e)),
this._popupHandlersAdded ||
(this.on({
click: this._openPopup,
keypress: this._onKeyPress,
remove: this.closePopup,
move: this._movePopup,
}),
(this._popupHandlersAdded = !0)),
this
);
},
unbindPopup: function (){
return (
this._popup &&
(this.off({
click: this._openPopup,
keypress: this._onKeyPress,
remove: this.closePopup,
move: this._movePopup,
}),
(this._popupHandlersAdded = !1),
(this._popup=null)),
this
);
},
openPopup: function (t){
return (
this._popup &&
(this instanceof ci||(this._popup._source=this),
this._popup._prepareOpen(t||this._latlng) &&
this._popup.openOn(this._map)),
this
);
},
closePopup: function (){
return this._popup&&this._popup.close(), this;
},
togglePopup: function (){
return this._popup&&this._popup.toggle(this), this;
},
isPopupOpen: function (){
return !!this._popup&&this._popup.isOpen();
},
setPopupContent: function (t){
return this._popup&&this._popup.setContent(t), this;
},
getPopup: function (){
return this._popup;
},
_openPopup: function (t){
var e;
this._popup &&
this._map &&
(Ee(t),
(e=t.layer||t.target),
this._popup._source!==e||e instanceof mi
? ((this._popup._source=e), this.openPopup(t.latlng))
: this._map.hasLayer(this._popup)
? this.closePopup()
: this.openPopup(t.latlng));
},
_movePopup: function (t){
this._popup.setLatLng(t.latlng);
},
_onKeyPress: function (t){
13===t.originalEvent.keyCode&&this._openPopup(t);
},
}),
Ei.extend({
options: {
pane: "tooltipPane",
offset: [0, 0],
direction: "auto",
permanent: !1,
sticky: !1,
opacity: 0.9,
},
onAdd: function (t){
Ei.prototype.onAdd.call(this, t),
this.setOpacity(this.options.opacity),
t.fire("tooltipopen", { tooltip: this }),
this._source &&
(this.addEventParent(this._source),
this._source.fire("tooltipopen", { tooltip: this }, !0));
},
onRemove: function (t){
Ei.prototype.onRemove.call(this, t),
t.fire("tooltipclose", { tooltip: this }),
this._source &&
(this.removeEventParent(this._source),
this._source.fire("tooltipclose", { tooltip: this }, !0));
},
getEvents: function (){
var t=Ei.prototype.getEvents.call(this);
return this.options.permanent||(t.preclick=this.close), t;
},
_initLayout: function (){
var t =
"leaflet-tooltip " +
(this.options.className||"") +
" leaflet-zoom-" +
(this._zoomAnimated ? "animated":"hide");
(this._contentNode=this._container=ee("div", t)),
this._container.setAttribute("role", "tooltip"),
this._container.setAttribute("id",
"leaflet-tooltip-" + r(this)
);
},
_updateLayout: function (){},
_adjustPan: function (){},
_setPosition: function (t){
var e,
i=this._map,
n=this._container,
o=i.latLngToContainerPoint(i.getCenter()),
s =
((i=i.layerPointToContainerPoint(t)),
this.options.direction),
r=n.offsetWidth,
a=n.offsetHeight,
h=Z(this.options.offset),
l=this._getAnchor();
(i =
"top"===s
? ((e=r / 2), a)
: "bottom"===s
? ((e=r / 2), 0)
: ((e =
"center"===s
? r / 2
: "right"===s
? 0
: "left"===s
? r
: i.x < o.x
? ((s="right"), 0)
: ((s="left"), r + 2 * (h.x + l.x))),
a / 2)),
(t=t.subtract(Z(e, i, !0)).add(h).add(l)),
he(n, "leaflet-tooltip-right"),
he(n, "leaflet-tooltip-left"),
he(n, "leaflet-tooltip-top"),
he(n, "leaflet-tooltip-bottom"),
ae(n, "leaflet-tooltip-" + s),
_e(n, t);
},
_updatePosition: function (){
var t=this._map.latLngToLayerPoint(this._latlng);
this._setPosition(t);
},
setOpacity: function (t){
(this.options.opacity=t),
this._container&&de(this._container, t);
},
_animateZoom: function (t){
(t=this._map._latLngToNewLayerPoint(this._latlng,
t.zoom,
t.center
)),
this._setPosition(t);
},
_getAnchor: function (){
return Z(
this._source &&
this._source._getTooltipAnchor &&
!this.options.sticky
? this._source._getTooltipAnchor()
: [0, 0]
);
},
})),
Bi =
(De.include({
openTooltip: function (t, e, i){
return this._initOverlay(Ai, t, e, i).openOn(this), this;
},
closeTooltip: function (t){
return t.close(), this;
},
}),
lt.include({
bindTooltip: function (t, e){
return (
this._tooltip &&
this.isTooltipOpen() &&
this.unbindTooltip(),
(this._tooltip=this._initOverlay(Ai,
this._tooltip,
t,
e
)),
this._initTooltipInteractions(),
this._tooltip.options.permanent &&
this._map &&
this._map.hasLayer(this) &&
this.openTooltip(),
this
);
},
unbindTooltip: function (){
return (
this._tooltip &&
(this._initTooltipInteractions(!0),
this.closeTooltip(),
(this._tooltip=null)),
this
);
},
_initTooltipInteractions: function (t){
var e, i;
(!t&&this._tooltipHandlersAdded) ||
((e=t ? "off":"on"),
(i={
remove: this.closeTooltip,
move: this._moveTooltip,
}),
this._tooltip.options.permanent
? (i.add=this._openTooltip)
: ((i.mouseover=this._openTooltip),
(i.mouseout=this.closeTooltip),
(i.click=this._openTooltip),
this._map
? this._addFocusListeners()
: (i.add=this._addFocusListeners)),
this._tooltip.options.sticky &&
(i.mousemove=this._moveTooltip),
this[e](i),
(this._tooltipHandlersAdded = !t));
},
openTooltip: function (t){
return (
this._tooltip &&
(this instanceof ci||(this._tooltip._source=this),
this._tooltip._prepareOpen(t) &&
(this._tooltip.openOn(this._map),
this.getElement
? this._setAriaDescribedByOnLayer(this)
: this.eachLayer &&
this.eachLayer(this._setAriaDescribedByOnLayer,
this
))),
this
);
},
closeTooltip: function (){
if(this._tooltip) return this._tooltip.close();
},
toggleTooltip: function (){
return this._tooltip&&this._tooltip.toggle(this), this;
},
isTooltipOpen: function (){
return this._tooltip.isOpen();
},
setTooltipContent: function (t){
return this._tooltip&&this._tooltip.setContent(t), this;
},
getTooltip: function (){
return this._tooltip;
},
_addFocusListeners: function (){
this.getElement
? this._addFocusListenersOnLayer(this)
: this.eachLayer &&
this.eachLayer(this._addFocusListenersOnLayer, this);
},
_addFocusListenersOnLayer: function (t){
var e="function"==typeof t.getElement&&t.getElement();
e &&
(be(
e,
"focus",
function (){
(this._tooltip._source=t), this.openTooltip();
},
this
),
be(e, "blur", this.closeTooltip, this));
},
_setAriaDescribedByOnLayer: function (t){
(t="function"==typeof t.getElement&&t.getElement()) &&
t.setAttribute("aria-describedby",
this._tooltip._container.id
);
},
_openTooltip: function (t){
var e;
this._tooltip &&
this._map &&
(this._map.dragging &&
this._map.dragging.moving() &&
!this._openOnceFlag
? ((this._openOnceFlag = !0),
(e=this)._map.once("moveend", function (){
(e._openOnceFlag = !1), e._openTooltip(t);
}))
: ((this._tooltip._source=t.layer||t.target),
this.openTooltip(this._tooltip.options.sticky ? t.latlng:void 0
)));
},
_moveTooltip: function (t){
var e=t.latlng;
this._tooltip.options.sticky &&
t.originalEvent &&
((t=this._map.mouseEventToContainerPoint(t.originalEvent
)),
(t=this._map.containerPointToLayerPoint(t)),
(e=this._map.layerPointToLatLng(t))),
this._tooltip.setLatLng(e);
},
}),
di.extend({
options: {
iconSize: [12, 12],
html: !1,
bgPos: null,
className: "leaflet-div-icon",
},
createIcon: function (t){
t =
t&&"DIV"===t.tagName
? t
: document.createElement("div");
var e=this.options;
return (
e.html instanceof Element
? (ne(t), t.appendChild(e.html))
: (t.innerHTML = !1!==e.html ? e.html:""),
e.bgPos &&
((e=Z(e.bgPos)),
(t.style.backgroundPosition =
-e.x + "px " + -e.y + "px")),
this._setIconStyles(t, "icon"),
t
);
},
createShadow: function (){
return null;
},
}));
di.Default=ui;
var Oi=lt.extend({
options: {
tileSize: 256,
opacity: 1,
updateWhenIdle: Ct.mobile,
updateWhenZooming: !0,
updateInterval: 200,
zIndex: 1,
bounds: null,
minZoom: 0,
maxZoom: void 0,
maxNativeZoom: void 0,
minNativeZoom: void 0,
noWrap: !1,
pane: "tilePane",
className: "",
keepBuffer: 2,
},
initialize: function (t){
p(this, t);
},
onAdd: function (){
this._initContainer(),
(this._levels={}),
(this._tiles={}),
this._resetView();
},
beforeAdd: function (t){
t._addZoomLimit(this);
},
onRemove: function (t){
this._removeAllTiles(),
ie(this._container),
t._removeZoomLimit(this),
(this._container=null),
(this._tileZoom=void 0);
},
bringToFront: function (){
return (
this._map &&
(oe(this._container), this._setAutoZIndex(Math.max)),
this
);
},
bringToBack: function (){
return (
this._map &&
(se(this._container), this._setAutoZIndex(Math.min)),
this
);
},
getContainer: function (){
return this._container;
},
setOpacity: function (t){
return (this.options.opacity=t), this._updateOpacity(), this;
},
setZIndex: function (t){
return (this.options.zIndex=t), this._updateZIndex(), this;
},
isLoading: function (){
return this._loading;
},
redraw: function (){
var t;
return (
this._map &&
(this._removeAllTiles(),
(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom &&
((this._tileZoom=t), this._updateLevels()),
this._update()),
this
);
},
getEvents: function (){
var t={
viewprereset: this._invalidateAll,
viewreset: this._resetView,
zoom: this._resetView,
moveend: this._onMoveEnd,
};
return (
this.options.updateWhenIdle ||
(this._onMove ||
(this._onMove=a(
this._onMoveEnd,
this.options.updateInterval,
this
)),
(t.move=this._onMove)),
this._zoomAnimated&&(t.zoomanim=this._animateZoom),
t
);
},
createTile: function (){
return document.createElement("div");
},
getTileSize: function (){
var t=this.options.tileSize;
return t instanceof j ? t:new j(t, t);
},
_updateZIndex: function (){
this._container &&
void 0!==this.options.zIndex &&
null!==this.options.zIndex &&
(this._container.style.zIndex=this.options.zIndex);
},
_setAutoZIndex: function (t){
for (
var e,
i=this.getPane().children,
n=-t(-1 / 0, 1 / 0),
o=0,
s=i.length;
o < s;
o++
)
(e=i[o].style.zIndex),
i[o]!==this._container&&e && (n=t(n, +e));
isFinite(n) &&
((this.options.zIndex=n + t(-1, 1)), this._updateZIndex());
},
_updateOpacity: function (){
if(this._map&&!Ct.ielt9){
de(this._container, this.options.opacity);
var t,
e=+new Date(),
i = !1,
n = !1;
for (t in this._tiles){
var o,
s=this._tiles[t];
s.current &&
s.loaded &&
((o=Math.min(1, (e - s.loaded) / 200)),
de(s.el, o),
o < 1
? (i = !0)
: (s.active ? (n = !0):this._onOpaqueTile(s),
(s.active = !0)));
}
n&&!this._noPrune&&this._pruneTiles(),
i &&
(z(this._fadeFrame),
(this._fadeFrame=T(this._updateOpacity, this)));
}},
_onOpaqueTile: l,
_initContainer: function (){
this._container ||
((this._container=ee(
"div",
"leaflet-layer " + (this.options.className||"")
)),
this._updateZIndex(),
this.options.opacity < 1&&this._updateOpacity(),
this.getPane().appendChild(this._container));
},
_updateLevels: function (){
var t=this._tileZoom,
e=this.options.maxZoom;
if(void 0!==t){
for (var i in this._levels)
(i=Number(i)),
this._levels[i].el.children.length||i===t
? ((this._levels[i].el.style.zIndex =
e - Math.abs(t - i)),
this._onUpdateLevel(i))
: (ie(this._levels[i].el),
this._removeTilesAtZoom(i),
this._onRemoveLevel(i),
delete this._levels[i]);
var n=this._levels[t],
o=this._map;
return (
n ||
(((n=this._levels[t]={}).el=ee(
"div",
"leaflet-tile-container leaflet-zoom-animated",
this._container
)),
(n.el.style.zIndex=e),
(n.origin=o
.project(o.unproject(o.getPixelOrigin()), t)
.round()),
(n.zoom=t),
this._setZoomTransform(n, o.getCenter(), o.getZoom()),
l(n.el.offsetWidth),
this._onCreateLevel(n)),
(this._level=n)
);
}},
_onUpdateLevel: l,
_onRemoveLevel: l,
_onCreateLevel: l,
_pruneTiles: function (){
if(this._map){
var t,
e,
i,
n=this._map.getZoom();
if(n > this.options.maxZoom||n < this.options.minZoom)
this._removeAllTiles();
else {
for (t in this._tiles)
(i=this._tiles[t]).retain=i.current;
for (t in this._tiles)
(i=this._tiles[t]).current &&
!i.active &&
((e=i.coords),
this._retainParent(e.x, e.y, e.z, e.z - 5) ||
this._retainChildren(e.x, e.y, e.z, e.z + 2));
for (t in this._tiles)
this._tiles[t].retain||this._removeTile(t);
}}
},
_removeTilesAtZoom: function (t){
for (var e in this._tiles)
this._tiles[e].coords.z===t&&this._removeTile(e);
},
_removeAllTiles: function (){
for (var t in this._tiles) this._removeTile(t);
},
_invalidateAll: function (){
for (var t in this._levels)
ie(this._levels[t].el),
this._onRemoveLevel(Number(t)),
delete this._levels[t];
this._removeAllTiles(), (this._tileZoom=void 0);
},
_retainParent: function (t, e, i, n){
i -=1;
var o =
(((o=new j(
+(t=Math.floor(t / 2)),
+(e=Math.floor(e / 2))
)).z=i),
this._tileCoordsToKey(o));
return (o=this._tiles[o])&&o.active
? (o.retain = !0)
: (o&&o.loaded&&(o.retain = !0),
n < i&&this._retainParent(t, e, i, n));
},
_retainChildren: function (t, e, i, n){
for (var o=2 * t; o < 2 * t + 2; o++)
for (var s=2 * e; s < 2 * e + 2; s++){
var r =
(((r=new j(o, s)).z=i + 1), this._tileCoordsToKey(r));
(r=this._tiles[r])&&r.active
? (r.retain = !0)
: (r&&r.loaded&&(r.retain = !0),
i + 1 < n&&this._retainChildren(o, s, i + 1, n));
}},
_resetView: function (t){
(t=t&&(t.pinch||t.flyTo)),
this._setView(this._map.getCenter(),
this._map.getZoom(),
t,
t
);
},
_animateZoom: function (t){
this._setView(t.center, t.zoom, !0, t.noUpdate);
},
_clampZoom: function (t){
var e=this.options;
return void 0!==e.minNativeZoom&&t < e.minNativeZoom
? e.minNativeZoom
: void 0!==e.maxNativeZoom&&e.maxNativeZoom < t
? e.maxNativeZoom
: t;
},
_setView: function (t, e, i, n){
var o=Math.round(e),
s =
((o =
(void 0!==this.options.maxZoom &&
o > this.options.maxZoom) ||
(void 0!==this.options.minZoom &&
o < this.options.minZoom)
? void 0
: this._clampZoom(o)),
this.options.updateWhenZooming&&o!==this._tileZoom);
(n&&!s) ||
((this._tileZoom=o),
this._abortLoading&&this._abortLoading(),
this._updateLevels(),
this._resetGrid(),
void 0!==o&&this._update(t),
i||this._pruneTiles(),
(this._noPrune = !!i)),
this._setZoomTransforms(t, e);
},
_setZoomTransforms: function (t, e){
for (var i in this._levels)
this._setZoomTransform(this._levels[i], t, e);
},
_setZoomTransform: function (t, e, i){
var n=this._map.getZoomScale(i, t.zoom);
(e=t.origin
.multiplyBy(n)
.subtract(this._map._getNewPixelOrigin(e, i))
.round()),
Ct.any3d ? pe(t.el, e, n):_e(t.el, e);
},
_resetGrid: function (){
var t=this._map,
e=t.options.crs,
i=(this._tileSize=this.getTileSize()),
n=this._tileZoom,
o=this._map.getPixelWorldBounds(this._tileZoom);
o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),
(this._wrapX=e.wrapLng &&
!this.options.noWrap&&[
Math.floor(t.project([0, e.wrapLng[0]], n).x / i.x),
Math.ceil(t.project([0, e.wrapLng[1]], n).x / i.y),
]),
(this._wrapY=e.wrapLat &&
!this.options.noWrap&&[
Math.floor(t.project([e.wrapLat[0], 0], n).y / i.x),
Math.ceil(t.project([e.wrapLat[1], 0], n).y / i.y),
]);
},
_onMoveEnd: function (){
this._map&&!this._map._animatingZoom&&this._update();
},
_getTiledPixelBounds: function (t){
var e=(i=this._map)._animatingZoom
? Math.max(i._animateToZoom, i.getZoom())
: i.getZoom(),
i =
((e=i.getZoomScale(e, this._tileZoom)),
(t=i.project(t, this._tileZoom).floor()),
i.getSize().divideBy(2 * e));
return new A(t.subtract(i), t.add(i));
},
_update: function (t){
if((n=this._map)){
var e=this._clampZoom(n.getZoom());
if((void 0===t&&(t=n.getCenter()),
void 0!==this._tileZoom)
){
var i,
n=this._getTiledPixelBounds(t),
o=this._pxBoundsToTileRange(n),
s=o.getCenter(),
r=[],
a =
((n=this.options.keepBuffer),
new A(
o.getBottomLeft().subtract([n, -n]),
o.getTopRight().add([n, -n])
));
if(!(
isFinite(o.min.x) &&
isFinite(o.min.y) &&
isFinite(o.max.x) &&
isFinite(o.max.y)
)
)
throw new Error(
"Attempted to load an infinite number of tiles"
);
for (i in this._tiles){
var h=this._tiles[i].coords;
(h.z===this._tileZoom&&a.contains(new j(h.x, h.y))) ||
(this._tiles[i].current = !1);
}
if(1 < Math.abs(e - this._tileZoom)) this._setView(t, e);
else {
for (var l=o.min.y; l <=o.max.y; l++)
for (var c=o.min.x; c <=o.max.x; c++){
var d,
u=new j(c, l);
(u.z=this._tileZoom),
this._isValidTile(u) &&
((d=this._tiles[this._tileCoordsToKey(u)])
? (d.current = !0)
: r.push(u));
}
if((r.sort(function (t, e){
return t.distanceTo(s) - e.distanceTo(s);
}),
0!==r.length)
){
this._loading ||
((this._loading = !0), this.fire("loading"));
var p=document.createDocumentFragment();
for (c=0; c < r.length; c++) this._addTile(r[c], p);
this._level.el.appendChild(p);
}}
}}
},
_isValidTile: function (t){
var e=this._map.options.crs;
if(!e.infinite){
var i=this._globalTileRange;
if((!e.wrapLng&&(t.x < i.min.x||t.x > i.max.x)) ||
(!e.wrapLat&&(t.y < i.min.y||t.y > i.max.y))
)
return !1;
}
return (
!this.options.bounds ||
((e=this._tileCoordsToBounds(t)),
R(this.options.bounds).overlaps(e))
);
},
_keyToBounds: function (t){
return this._tileCoordsToBounds(this._keyToTileCoords(t));
},
_tileCoordsToNwSe: function (t){
var e=this._map,
i=this.getTileSize(),
n=t.scaleBy(i);
return (
(i=n.add(i)), [e.unproject(n, t.z), e.unproject(i, t.z)]
);
},
_tileCoordsToBounds: function (t){
return (
(t=new O((t=this._tileCoordsToNwSe(t))[0], t[1])),
this.options.noWrap ? t:this._map.wrapLatLngBounds(t)
);
},
_tileCoordsToKey: function (t){
return t.x + ":" + t.y + ":" + t.z;
},
_keyToTileCoords: function (t){
var e=new j(+(t=t.split(":"))[0], +t[1]);
return (e.z=+t[2]), e;
},
_removeTile: function (t){
var e=this._tiles[t];
e &&
(ie(e.el),
delete this._tiles[t],
this.fire("tileunload", {
tile: e.el,
coords: this._keyToTileCoords(t),
}));
},
_initTile: function (t){
ae(t, "leaflet-tile");
var e=this.getTileSize();
(t.style.width=e.x + "px"),
(t.style.height=e.y + "px"),
(t.onselectstart=l),
(t.onmousemove=l),
Ct.ielt9 &&
this.options.opacity < 1 &&
de(t, this.options.opacity);
},
_addTile: function (t, e){
var i=this._getTilePos(t),
n=this._tileCoordsToKey(t),
s=this.createTile(this._wrapCoords(t),
o(this._tileReady, this, t)
);
this._initTile(s),
this.createTile.length < 2 &&
T(o(this._tileReady, this, t, null, s)),
_e(s, i),
(this._tiles[n]={ el: s, coords: t, current: !0 }),
e.appendChild(s),
this.fire("tileloadstart", { tile: s, coords: t });
},
_tileReady: function (t, e, i){
e&&this.fire("tileerror", { error: e, tile: i, coords: t });
var n=this._tileCoordsToKey(t);
(i=this._tiles[n]) &&
((i.loaded=+new Date()),
this._map._fadeAnimated
? (de(i.el, 0),
z(this._fadeFrame),
(this._fadeFrame=T(this._updateOpacity, this)))
: ((i.active = !0), this._pruneTiles()),
e ||
(ae(i.el, "leaflet-tile-loaded"),
this.fire("tileload", { tile: i.el, coords: t })),
this._noTilesToLoad() &&
((this._loading = !1),
this.fire("load"),
Ct.ielt9||!this._map._fadeAnimated
? T(this._pruneTiles, this)
: setTimeout(o(this._pruneTiles, this), 250)));
},
_getTilePos: function (t){
return t
.scaleBy(this.getTileSize())
.subtract(this._level.origin);
},
_wrapCoords: function (t){
var e=new j(
this._wrapX ? h(t.x, this._wrapX):t.x,
this._wrapY ? h(t.y, this._wrapY):t.y
);
return (e.z=t.z), e;
},
_pxBoundsToTileRange: function (t){
var e=this.getTileSize();
return new A(
t.min.unscaleBy(e).floor(),
t.max.unscaleBy(e).ceil().subtract([1, 1])
);
},
_noTilesToLoad: function (){
for (var t in this._tiles)
if(!this._tiles[t].loaded) return !1;
return !0;
},
}),
Ri=Oi.extend({
options: {
minZoom: 0,
maxZoom: 18,
subdomains: "abc",
errorTileUrl: "",
zoomOffset: 0,
tms: !1,
zoomReverse: !1,
detectRetina: !1,
crossOrigin: !1,
referrerPolicy: !1,
},
initialize: function (t, e){
(this._url=t),
(e=p(this, e)).detectRetina&&Ct.retina&&0 < e.maxZoom
? ((e.tileSize=Math.floor(e.tileSize / 2)),
e.zoomReverse
? (e.zoomOffset--,
(e.minZoom=Math.min(e.maxZoom, e.minZoom + 1)))
: (e.zoomOffset++,
(e.maxZoom=Math.max(e.minZoom, e.maxZoom - 1))),
(e.minZoom=Math.max(0, e.minZoom)))
: e.zoomReverse
? (e.minZoom=Math.min(e.maxZoom, e.minZoom))
: (e.maxZoom=Math.max(e.minZoom, e.maxZoom)),
"string"==typeof e.subdomains &&
(e.subdomains=e.subdomains.split("")),
this.on("tileunload", this._onTileRemove);
},
setUrl: function (t, e){
return (
this._url===t&&void 0===e&&(e = !0),
(this._url=t),
e||this.redraw(),
this
);
},
createTile: function (t, e){
var i=document.createElement("img");
return (
be(i, "load", o(this._tileOnLoad, this, e, i)),
be(i, "error", o(this._tileOnError, this, e, i)),
(!this.options.crossOrigin &&
""!==this.options.crossOrigin) ||
(i.crossOrigin =
!0===this.options.crossOrigin
? ""
: this.options.crossOrigin),
"string"==typeof this.options.referrerPolicy &&
(i.referrerPolicy=this.options.referrerPolicy),
(i.alt=""),
(i.src=this.getTileUrl(t)),
i
);
},
getTileUrl: function (t){
var i={
r: Ct.retina ? "@2x":"",
s: this._getSubdomain(t),
x: t.x,
y: t.y,
z: this._getZoomForUrl(),
};
return (
this._map &&
!this._map.options.crs.infinite &&
((t=this._globalTileRange.max.y - t.y),
this.options.tms&&(i.y=t),
(i["-y"]=t)),
f(this._url, e(i, this.options))
);
},
_tileOnLoad: function (t, e){
Ct.ielt9 ? setTimeout(o(t, this, null, e), 0):t(null, e);
},
_tileOnError: function (t, e, i){
var n=this.options.errorTileUrl;
n&&e.getAttribute("src")!==n&&(e.src=n), t(i, e);
},
_onTileRemove: function (t){
t.tile.onload=null;
},
_getZoomForUrl: function (){
var t=this._tileZoom,
e=this.options.maxZoom;
return (
(t=this.options.zoomReverse ? e - t:t) +
this.options.zoomOffset
);
},
_getSubdomain: function (t){
return (
(t=Math.abs(t.x + t.y) % this.options.subdomains.length),
this.options.subdomains[t]
);
},
_abortLoading: function (){
var t, e, i;
for (t in this._tiles)
this._tiles[t].coords.z!==this._tileZoom &&
(((i=this._tiles[t].el).onload=l),
(i.onerror=l),
i.complete ||
((i.src=v),
(e=this._tiles[t].coords),
ie(i),
delete this._tiles[t],
this.fire("tileabort", { tile: i, coords: e })));
},
_removeTile: function (t){
var e=this._tiles[t];
if(e)
return (
e.el.setAttribute("src", v),
Oi.prototype._removeTile.call(this, t)
);
},
_tileReady: function (t, e, i){
if(this._map&&(!i||i.getAttribute("src")!==v))
return Oi.prototype._tileReady.call(this, t, e, i);
},
});
function Ni(t, e){
return new Ri(t, e);
}
var Di=Ri.extend({
defaultWmsParams: {
service: "WMS",
request: "GetMap",
layers: "",
styles: "",
format: "image/jpeg",
transparent: !1,
version: "1.1.1",
},
options: { crs: null, uppercase: !1 },
initialize: function (t, i){
this._url=t;
var n,
o=e({}, this.defaultWmsParams);
for (n in i) n in this.options||(o[n]=i[n]);
t=(i=p(this, i)).detectRetina&&Ct.retina ? 2:1;
var s=this.getTileSize();
(o.width=s.x * t), (o.height=s.y * t), (this.wmsParams=o);
},
onAdd: function (t){
(this._crs=this.options.crs||t.options.crs),
(this._wmsVersion=parseFloat(this.wmsParams.version));
var e=1.3 <=this._wmsVersion ? "crs":"srs";
(this.wmsParams[e]=this._crs.code),
Ri.prototype.onAdd.call(this, t);
},
getTileUrl: function (t){
var e=this._tileCoordsToNwSe(t),
i =
((e=(i=B((i=this._crs).project(e[0]), i.project(e[1])))
.min),
i.max);
return (
(e=(
1.3 <=this._wmsVersion&&this._crs===hi
? [e.y, e.x, i.y, i.x]
: [e.x, e.y, i.x, i.y]
).join(",")),
(i=Ri.prototype.getTileUrl.call(this, t)) +
_(this.wmsParams, i, this.options.uppercase) +
(this.options.uppercase ? "&BBOX=":"&bbox=") +
e
);
},
setParams: function (t, i){
return e(this.wmsParams, t), i||this.redraw(), this;
},
});
(Ri.WMS=Di),
(Ni.wms=function (t, e){
return new Di(t, e);
});
var Qi=lt.extend({
options: { padding: 0.1 },
initialize: function (t){
p(this, t), r(this), (this._layers=this._layers||{});
},
onAdd: function (){
this._container ||
(this._initContainer(),
ae(this._container, "leaflet-zoom-animated")),
this.getPane().appendChild(this._container),
this._update(),
this.on("update", this._updatePaths, this);
},
onRemove: function (){
this.off("update", this._updatePaths, this),
this._destroyContainer();
},
getEvents: function (){
var t={
viewreset: this._reset,
zoom: this._onZoom,
moveend: this._update,
zoomend: this._onZoomEnd,
};
return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom), t;
},
_onAnimZoom: function (t){
this._updateTransform(t.center, t.zoom);
},
_onZoom: function (){
this._updateTransform(this._map.getCenter(),
this._map.getZoom()
);
},
_updateTransform: function (t, e){
var i=this._map.getZoomScale(e, this._zoom),
n=this._map
.getSize()
.multiplyBy(0.5 + this.options.padding),
o=this._map.project(this._center, e);
(n=n
.multiplyBy(-i)
.add(o)
.subtract(this._map._getNewPixelOrigin(t, e))),
Ct.any3d ? pe(this._container, n, i):_e(this._container, n);
},
_reset: function (){
for (var t in (this._update(),
this._updateTransform(this._center, this._zoom),
this._layers))
this._layers[t]._reset();
},
_onZoomEnd: function (){
for (var t in this._layers) this._layers[t]._project();
},
_updatePaths: function (){
for (var t in this._layers) this._layers[t]._update();
},
_update: function (){
var t=this.options.padding,
e=this._map.getSize(),
i=this._map
.containerPointToLayerPoint(e.multiplyBy(-t))
.round();
(this._bounds=new A(
i,
i.add(e.multiplyBy(1 + 2 * t)).round()
)),
(this._center=this._map.getCenter()),
(this._zoom=this._map.getZoom());
},
}),
Fi=Qi.extend({
options: { tolerance: 0 },
getEvents: function (){
var t=Qi.prototype.getEvents.call(this);
return (t.viewprereset=this._onViewPreReset), t;
},
_onViewPreReset: function (){
this._postponeUpdatePaths = !0;
},
onAdd: function (){
Qi.prototype.onAdd.call(this), this._draw();
},
_initContainer: function (){
var t=(this._container=document.createElement("canvas"));
be(t, "mousemove", this._onMouseMove, this),
be(
t,
"click dblclick mousedown mouseup contextmenu",
this._onClick,
this
),
be(t, "mouseout", this._handleMouseOut, this),
(t._leaflet_disable_events = !0),
(this._ctx=t.getContext("2d"));
},
_destroyContainer: function (){
z(this._redrawRequest),
delete this._ctx,
ie(this._container),
ke(this._container),
delete this._container;
},
_updatePaths: function (){
if(!this._postponeUpdatePaths){
for (var t in ((this._redrawBounds=null), this._layers))
this._layers[t]._update();
this._redraw();
}},
_update: function (){
var t, e, i, n;
(this._map._animatingZoom&&this._bounds) ||
(Qi.prototype._update.call(this),
(t=this._bounds),
(e=this._container),
(i=t.getSize()),
(n=Ct.retina ? 2:1),
_e(e, t.min),
(e.width=n * i.x),
(e.height=n * i.y),
(e.style.width=i.x + "px"),
(e.style.height=i.y + "px"),
Ct.retina&&this._ctx.scale(2, 2),
this._ctx.translate(-t.min.x, -t.min.y),
this.fire("update"));
},
_reset: function (){
Qi.prototype._reset.call(this),
this._postponeUpdatePaths &&
((this._postponeUpdatePaths = !1), this._updatePaths());
},
_initPath: function (t){
this._updateDashArray(t),
(t=(this._layers[r(t)]=t)._order =
{ layer: t, prev: this._drawLast, next: null }),
this._drawLast&&(this._drawLast.next=t),
(this._drawLast=t),
(this._drawFirst=this._drawFirst||this._drawLast);
},
_addPath: function (t){
this._requestRedraw(t);
},
_removePath: function (t){
var e=(i=t._order).next,
i=i.prev;
e ? (e.prev=i):(this._drawLast=i),
i ? (i.next=e):(this._drawFirst=e),
delete t._order,
delete this._layers[r(t)],
this._requestRedraw(t);
},
_updatePath: function (t){
this._extendRedrawBounds(t),
t._project(),
t._update(),
this._requestRedraw(t);
},
_updateStyle: function (t){
this._updateDashArray(t), this._requestRedraw(t);
},
_updateDashArray: function (t){
if("string"==typeof t.options.dashArray){
for (
var e,
i=t.options.dashArray.split(/[, ]+/),
n=[],
o=0;
o < i.length;
o++
){
if(((e=Number(i[o])), isNaN(e))) return;
n.push(e);
}
t.options._dashArray=n;
} else t.options._dashArray=t.options.dashArray;
},
_requestRedraw: function (t){
this._map &&
(this._extendRedrawBounds(t),
(this._redrawRequest =
this._redrawRequest||T(this._redraw, this)));
},
_extendRedrawBounds: function (t){
var e;
t._pxBounds &&
((e=(t.options.weight||0) + 1),
(this._redrawBounds=this._redrawBounds||new A()),
this._redrawBounds.extend(t._pxBounds.min.subtract([e, e])),
this._redrawBounds.extend(t._pxBounds.max.add([e, e])));
},
_redraw: function (){
(this._redrawRequest=null),
this._redrawBounds &&
(this._redrawBounds.min._floor(),
this._redrawBounds.max._ceil()),
this._clear(),
this._draw(),
(this._redrawBounds=null);
},
_clear: function (){
var t,
e=this._redrawBounds;
e
? ((t=e.getSize()),
this._ctx.clearRect(e.min.x, e.min.y, t.x, t.y))
: (this._ctx.save(),
this._ctx.setTransform(1, 0, 0, 1, 0, 0),
this._ctx.clearRect(0,
0,
this._container.width,
this._container.height
),
this._ctx.restore());
},
_draw: function (){
var t,
e,
i=this._redrawBounds;
this._ctx.save(),
i &&
((e=i.getSize()),
this._ctx.beginPath(),
this._ctx.rect(i.min.x, i.min.y, e.x, e.y),
this._ctx.clip()),
(this._drawing = !0);
for (var n=this._drawFirst; n; n=n.next)
(t=n.layer),
(!i||(t._pxBounds&&t._pxBounds.intersects(i))) &&
t._updatePath();
(this._drawing = !1), this._ctx.restore();
},
_updatePoly: function (t, e){
if(this._drawing){
var i,
n,
o,
s,
r=t._parts,
a=r.length,
h=this._ctx;
if(a){
for (h.beginPath(), i=0; i < a; i++){
for (n=0, o=r[i].length; n < o; n++)
(s=r[i][n]), h[n ? "lineTo":"moveTo"](s.x, s.y);
e&&h.closePath();
}
this._fillStroke(h, t);
}}
},
_updateCircle: function (t){
var e, i, n, o;
this._drawing &&
!t._empty() &&
((e=t._point),
(i=this._ctx),
(n=Math.max(Math.round(t._radius), 1)),
1!=(o=(Math.max(Math.round(t._radiusY), 1)||n) / n) &&
(i.save(), i.scale(1, o)),
i.beginPath(),
i.arc(e.x, e.y / o, n, 0, 2 * Math.PI, !1),
1!=o&&i.restore(),
this._fillStroke(i, t));
},
_fillStroke: function (t, e){
var i=e.options;
i.fill &&
((t.globalAlpha=i.fillOpacity),
(t.fillStyle=i.fillColor||i.color),
t.fill(i.fillRule||"evenodd")),
i.stroke &&
0!==i.weight &&
(t.setLineDash &&
t.setLineDash((e.options&&e.options._dashArray)||[]),
(t.globalAlpha=i.opacity),
(t.lineWidth=i.weight),
(t.strokeStyle=i.color),
(t.lineCap=i.lineCap),
(t.lineJoin=i.lineJoin),
t.stroke());
},
_onClick: function (t){
for (
var e,
i,
n=this._map.mouseEventToLayerPoint(t),
o=this._drawFirst;
o;
o=o.next
)
(e=o.layer).options.interactive &&
e._containsPoint(n) &&
((("click"===t.type||"preclick"===t.type) &&
this._map._draggableMoved(e)) ||
(i=e));
this._fireEvent(!!i&&[i], t);
},
_onMouseMove: function (t){
var e;
!this._map ||
this._map.dragging.moving() ||
this._map._animatingZoom ||
((e=this._map.mouseEventToLayerPoint(t)),
this._handleMouseHover(t, e));
},
_handleMouseOut: function (t){
var e=this._hoveredLayer;
e &&
(he(this._container, "leaflet-interactive"),
this._fireEvent([e], t, "mouseout"),
(this._hoveredLayer=null),
(this._mouseHoverThrottled = !1));
},
_handleMouseHover: function (t, e){
if(!this._mouseHoverThrottled){
for (var i, n, s=this._drawFirst; s; s=s.next)
(i=s.layer).options.interactive &&
i._containsPoint(e) &&
(n=i);
n!==this._hoveredLayer &&
(this._handleMouseOut(t),
n &&
(ae(this._container, "leaflet-interactive"),
this._fireEvent([n], t, "mouseover"),
(this._hoveredLayer=n))),
this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],
t
),
(this._mouseHoverThrottled = !0),
setTimeout(
o(function (){
this._mouseHoverThrottled = !1;
}, this),
32
);
}},
_fireEvent: function (t, e, i){
this._map._fireDOMEvent(e, i||e.type, t);
},
_bringToFront: function (t){
var e,
i,
n=t._order;
n &&
((e=n.next),
(i=n.prev),
e &&
((e.prev=i) ? (i.next=e):e&&(this._drawFirst=e),
(n.prev=this._drawLast),
((this._drawLast.next=n).next=null),
(this._drawLast=n),
this._requestRedraw(t)));
},
_bringToBack: function (t){
var e,
i,
n=t._order;
n &&
((e=n.next),
(i=n.prev) &&
((i.next=e) ? (e.prev=i):i&&(this._drawLast=i),
(n.prev=null),
(n.next=this._drawFirst),
(this._drawFirst.prev=n),
(this._drawFirst=n),
this._requestRedraw(t)));
},
});
function Hi(t){
return Ct.canvas ? new Fi(t):null;
}
var qi=(function (){
try {
return (
document.namespaces.add("lvml",
"urn:schemas-microsoft-com:vml"
),
function (t){
return document.createElement("<lvml:" + t + ' class="lvml">'
);
}
);
} catch (t){}
return function (t){
return document.createElement("<" +
t +
' xmlns="urn:schemas-microsoft.com:vml" class="lvml">'
);
};})(),
Wi =
((ut={
_initContainer: function (){
this._container=ee("div", "leaflet-vml-container");
},
_update: function (){
this._map._animatingZoom ||
(Qi.prototype._update.call(this), this.fire("update"));
},
_initPath: function (t){
var e=(t._container=qi("shape"));
ae(e, "leaflet-vml-shape " + (this.options.className||"")),
(e.coordsize="1 1"),
(t._path=qi("path")),
e.appendChild(t._path),
this._updateStyle(t),
(this._layers[r(t)]=t);
},
_addPath: function (t){
var e=t._container;
this._container.appendChild(e),
t.options.interactive&&t.addInteractiveTarget(e);
},
_removePath: function (t){
var e=t._container;
ie(e),
t.removeInteractiveTarget(e),
delete this._layers[r(t)];
},
_updateStyle: function (t){
var e=t._stroke,
i=t._fill,
n=t.options,
o=t._container;
(o.stroked = !!n.stroke),
(o.filled = !!n.fill),
n.stroke
? ((e=e||(t._stroke=qi("stroke"))),
o.appendChild(e),
(e.weight=n.weight + "px"),
(e.color=n.color),
(e.opacity=n.opacity),
n.dashArray
? (e.dashStyle=g(n.dashArray)
? n.dashArray.join(" ")
: n.dashArray.replace(/( *, *)/g, " "))
: (e.dashStyle=""),
(e.endcap=n.lineCap.replace("butt", "flat")),
(e.joinstyle=n.lineJoin))
: e&&(o.removeChild(e), (t._stroke=null)),
n.fill
? ((i=i||(t._fill=qi("fill"))),
o.appendChild(i),
(i.color=n.fillColor||n.color),
(i.opacity=n.fillOpacity))
: i&&(o.removeChild(i), (t._fill=null));
},
_updateCircle: function (t){
var e=t._point.round(),
i=Math.round(t._radius),
n=Math.round(t._radiusY||i);
this._setPath(t,
t._empty()
? "M0 0"
: "AL " +
e.x +
"," +
e.y +
" " +
i +
"," +
n +
" 0,23592600"
);
},
_setPath: function (t, e){
t._path.v=e;
},
_bringToFront: function (t){
oe(t._container);
},
_bringToBack: function (t){
se(t._container);
},
}),
Ct.vml ? qi:V),
Ui=Qi.extend({
_initContainer: function (){
(this._container=Wi("svg")),
this._container.setAttribute("pointer-events", "none"),
(this._rootGroup=Wi("g")),
this._container.appendChild(this._rootGroup);
},
_destroyContainer: function (){
ie(this._container),
ke(this._container),
delete this._container,
delete this._rootGroup,
delete this._svgSize;
},
_update: function (){
var t, e, i;
(this._map._animatingZoom&&this._bounds) ||
(Qi.prototype._update.call(this),
(e=(t=this._bounds).getSize()),
(i=this._container),
(this._svgSize&&this._svgSize.equals(e)) ||
((this._svgSize=e),
i.setAttribute("width", e.x),
i.setAttribute("height", e.y)),
_e(i, t.min),
i.setAttribute("viewBox",
[t.min.x, t.min.y, e.x, e.y].join(" ")
),
this.fire("update"));
},
_initPath: function (t){
var e=(t._path=Wi("path"));
t.options.className&&ae(e, t.options.className),
t.options.interactive&&ae(e, "leaflet-interactive"),
this._updateStyle(t),
(this._layers[r(t)]=t);
},
_addPath: function (t){
this._rootGroup||this._initContainer(),
this._rootGroup.appendChild(t._path),
t.addInteractiveTarget(t._path);
},
_removePath: function (t){
ie(t._path),
t.removeInteractiveTarget(t._path),
delete this._layers[r(t)];
},
_updatePath: function (t){
t._project(), t._update();
},
_updateStyle: function (t){
var e=t._path;
(t=t.options),
e &&
(t.stroke
? (e.setAttribute("stroke", t.color),
e.setAttribute("stroke-opacity", t.opacity),
e.setAttribute("stroke-width", t.weight),
e.setAttribute("stroke-linecap", t.lineCap),
e.setAttribute("stroke-linejoin", t.lineJoin),
t.dashArray
? e.setAttribute("stroke-dasharray", t.dashArray)
: e.removeAttribute("stroke-dasharray"),
t.dashOffset
? e.setAttribute("stroke-dashoffset", t.dashOffset)
: e.removeAttribute("stroke-dashoffset"))
: e.setAttribute("stroke", "none"),
t.fill
? (e.setAttribute("fill", t.fillColor||t.color),
e.setAttribute("fill-opacity", t.fillOpacity),
e.setAttribute("fill-rule", t.fillRule||"evenodd"))
: e.setAttribute("fill", "none"));
},
_updatePoly: function (t, e){
this._setPath(t, G(t._parts, e));
},
_updateCircle: function (t){
var e=t._point,
i=Math.max(Math.round(t._radius), 1),
n =
"a" +
i +
"," +
(Math.max(Math.round(t._radiusY), 1)||i) +
" 0 1,0 ";
(e=t._empty()
? "M0 0"
: "M" +
(e.x - i) +
"," +
e.y +
n +
2 * i +
",0 " +
n +
2 * -i +
",0 "),
this._setPath(t, e);
},
_setPath: function (t, e){
t._path.setAttribute("d", e);
},
_bringToFront: function (t){
oe(t._path);
},
_bringToBack: function (t){
se(t._path);
},
});
function $i(t){
return Ct.svg||Ct.vml ? new Ui(t):null;
}
Ct.vml&&Ui.include(ut),
De.include({
getRenderer: function (t){
return (
(t =
(t =
t.options.renderer ||
this._getPaneRenderer(t.options.pane) ||
this.options.renderer ||
this._renderer) ||
(this._renderer=this._createRenderer())),
this.hasLayer(t)||this.addLayer(t),
t
);
},
_getPaneRenderer: function (t){
var e;
return (
"overlayPane"!==t &&
void 0!==t &&
(void 0===(e=this._paneRenderers[t]) &&
((e=this._createRenderer({ pane: t })),
(this._paneRenderers[t]=e)),
e)
);
},
_createRenderer: function (t){
return (this.options.preferCanvas&&Hi(t))||$i(t);
},
});
var Vi=vi.extend({
initialize: function (t, e){
vi.prototype.initialize.call(this, this._boundsToLatLngs(t), e);
},
setBounds: function (t){
return this.setLatLngs(this._boundsToLatLngs(t));
},
_boundsToLatLngs: function (t){
return [
(t=R(t)).getSouthWest(),
t.getNorthWest(),
t.getNorthEast(),
t.getSouthEast(),
];
},
});
(Ui.create=Wi),
(Ui.pointsToPath=G),
(wi.geometryToLayer=xi),
(wi.coordsToLatLng=Pi),
(wi.coordsToLatLngs=ki),
(wi.latLngToCoords=Li),
(wi.latLngsToCoords=Ti),
(wi.getFeature=zi),
(wi.asFeature=Ci),
De.mergeOptions({ boxZoom: !0 }),
(K=X.extend({
initialize: function (t){
(this._map=t),
(this._container=t._container),
(this._pane=t._panes.overlayPane),
(this._resetStateTimeout=0),
t.on("unload", this._destroy, this);
},
addHooks: function (){
be(this._container, "mousedown", this._onMouseDown, this);
},
removeHooks: function (){
ke(this._container, "mousedown", this._onMouseDown, this);
},
moved: function (){
return this._moved;
},
_destroy: function (){
ie(this._pane), delete this._pane;
},
_resetState: function (){
(this._resetStateTimeout=0), (this._moved = !1);
},
_clearDeferredResetState: function (){
0!==this._resetStateTimeout &&
(clearTimeout(this._resetStateTimeout),
(this._resetStateTimeout=0));
},
_onMouseDown: function (t){
if(!t.shiftKey||(1!==t.which&&1!==t.button)) return !1;
this._clearDeferredResetState(),
this._resetState(),
Ut(),
fe(),
(this._startPoint=this._map.mouseEventToContainerPoint(t)),
be(
document,
{
contextmenu: Ee,
mousemove: this._onMouseMove,
mouseup: this._onMouseUp,
keydown: this._onKeyDown,
},
this
);
},
_onMouseMove: function (t){
this._moved ||
((this._moved = !0),
(this._box=ee("div", "leaflet-zoom-box", this._container)),
ae(this._container, "leaflet-crosshair"),
this._map.fire("boxzoomstart")),
(this._point=this._map.mouseEventToContainerPoint(t));
var e=(t=new A(this._point, this._startPoint)).getSize();
_e(this._box, t.min),
(this._box.style.width=e.x + "px"),
(this._box.style.height=e.y + "px");
},
_finish: function (){
this._moved &&
(ie(this._box), he(this._container, "leaflet-crosshair")),
$t(),
ge(),
ke(
document,
{
contextmenu: Ee,
mousemove: this._onMouseMove,
mouseup: this._onMouseUp,
keydown: this._onKeyDown,
},
this
);
},
_onMouseUp: function (t){
(1!==t.which&&1!==t.button) ||
(this._finish(),
this._moved &&
(this._clearDeferredResetState(),
(this._resetStateTimeout=setTimeout(
o(this._resetState, this),
0
)),
(t=new O(
this._map.containerPointToLatLng(this._startPoint),
this._map.containerPointToLatLng(this._point)
)),
this._map
.fitBounds(t)
.fire("boxzoomend", { boxZoomBounds: t })));
},
_onKeyDown: function (t){
27===t.keyCode &&
(this._finish(),
this._clearDeferredResetState(),
this._resetState());
},
})),
De.addInitHook("addHandler", "boxZoom", K),
De.mergeOptions({ doubleClickZoom: !0 }),
(pt=X.extend({
addHooks: function (){
this._map.on("dblclick", this._onDoubleClick, this);
},
removeHooks: function (){
this._map.off("dblclick", this._onDoubleClick, this);
},
_onDoubleClick: function (t){
var e=this._map,
i=e.getZoom(),
n=e.options.zoomDelta;
(i=t.originalEvent.shiftKey ? i - n:i + n),
"center"===e.options.doubleClickZoom
? e.setZoom(i)
: e.setZoomAround(t.containerPoint, i);
},
}));
var Gi =
(De.addInitHook("addHandler", "doubleClickZoom", pt),
De.mergeOptions({
dragging: !0,
inertia: !0,
inertiaDeceleration: 3400,
inertiaMaxSpeed: 1 / 0,
easeLinearity: 0.2,
worldCopyJump: !1,
maxBoundsViscosity: 0,
}),
X.extend({
addHooks: function (){
var t;
this._draggable ||
((t=this._map),
(this._draggable=new Ge(t._mapPane, t._container)),
this._draggable.on({
dragstart: this._onDragStart,
drag: this._onDrag,
dragend: this._onDragEnd,
},
this
),
this._draggable.on("predrag", this._onPreDragLimit, this),
t.options.worldCopyJump &&
(this._draggable.on("predrag", this._onPreDragWrap, this),
t.on("zoomend", this._onZoomEnd, this),
t.whenReady(this._onZoomEnd, this))),
ae(this._map._container, "leaflet-grab leaflet-touch-drag"),
this._draggable.enable(),
(this._positions=[]),
(this._times=[]);
},
removeHooks: function (){
he(this._map._container, "leaflet-grab"),
he(this._map._container, "leaflet-touch-drag"),
this._draggable.disable();
},
moved: function (){
return this._draggable&&this._draggable._moved;
},
moving: function (){
return this._draggable&&this._draggable._moving;
},
_onDragStart: function (){
var t,
e=this._map;
e._stop(),
this._map.options.maxBounds &&
this._map.options.maxBoundsViscosity
? ((t=R(this._map.options.maxBounds)),
(this._offsetLimit=B(
this._map
.latLngToContainerPoint(t.getNorthWest())
.multiplyBy(-1),
this._map
.latLngToContainerPoint(t.getSouthEast())
.multiplyBy(-1)
.add(this._map.getSize())
)),
(this._viscosity=Math.min(1,
Math.max(0, this._map.options.maxBoundsViscosity)
)))
: (this._offsetLimit=null),
e.fire("movestart").fire("dragstart"),
e.options.inertia &&
((this._positions=[]), (this._times=[]));
},
_onDrag: function (t){
var e, i;
this._map.options.inertia &&
((e=this._lastTime=+new Date()),
(i=this._lastPos =
this._draggable._absPos||this._draggable._newPos),
this._positions.push(i),
this._times.push(e),
this._prunePositions(e)),
this._map.fire("move", t).fire("drag", t);
},
_prunePositions: function (t){
for (
;
1 < this._positions.length&&50 < t - this._times[0];
)
this._positions.shift(), this._times.shift();
},
_onZoomEnd: function (){
var t=this._map.getSize().divideBy(2),
e=this._map.latLngToLayerPoint([0, 0]);
(this._initialWorldOffset=e.subtract(t).x),
(this._worldWidth=this._map
.getPixelWorldBounds()
.getSize().x);
},
_viscousLimit: function (t, e){
return t - (t - e) * this._viscosity;
},
_onPreDragLimit: function (){
var t, e;
this._viscosity &&
this._offsetLimit &&
((t=this._draggable._newPos.subtract(this._draggable._startPos
)),
(e=this._offsetLimit),
t.x < e.min.x&&(t.x=this._viscousLimit(t.x, e.min.x)),
t.y < e.min.y&&(t.y=this._viscousLimit(t.y, e.min.y)),
t.x > e.max.x&&(t.x=this._viscousLimit(t.x, e.max.x)),
t.y > e.max.y&&(t.y=this._viscousLimit(t.y, e.max.y)),
(this._draggable._newPos =
this._draggable._startPos.add(t)));
},
_onPreDragWrap: function (){
var t=this._worldWidth,
e=Math.round(t / 2),
i=this._initialWorldOffset,
n=(((o=this._draggable._newPos.x) - e + i) % t) + e - i,
o=((o + e + i) % t) - e - i;
(t=Math.abs(n + i) < Math.abs(o + i) ? n:o),
(this._draggable._absPos=this._draggable._newPos.clone()),
(this._draggable._newPos.x=t);
},
_onDragEnd: function (t){
var e,
i,
n,
o,
s=this._map,
r=s.options,
a = !r.inertia||t.noInertia||this._times.length < 2;
s.fire("dragend", t),
!a &&
(this._prunePositions(+new Date()),
(t=this._lastPos.subtract(this._positions[0])),
(a=(this._lastTime - this._times[0]) / 1e3),
(e=r.easeLinearity),
(a=(t=t.multiplyBy(e / a)).distanceTo([0, 0])),
(i=Math.min(r.inertiaMaxSpeed, a)),
(t=t.multiplyBy(i / a)),
(n=i / (r.inertiaDeceleration * e)),
(o=t.multiplyBy(-n / 2).round()).x||o.y)
? ((o=s._limitOffset(o, s.options.maxBounds)),
T(function (){
s.panBy(o, {
duration: n,
easeLinearity: e,
noMoveStart: !0,
animate: !0,
});
}))
: s.fire("moveend");
},
})),
Ki =
(De.addInitHook("addHandler", "dragging", Gi),
De.mergeOptions({ keyboard: !0, keyboardPanDelta: 80 }),
(_t=X.extend({
keyCodes: {
left: [37],
right: [39],
down: [40],
up: [38],
zoomIn: [187, 107, 61, 171],
zoomOut: [189, 109, 54, 173],
},
initialize: function (t){
(this._map=t),
this._setPanDelta(t.options.keyboardPanDelta),
this._setZoomDelta(t.options.zoomDelta);
},
addHooks: function (){
var t=this._map._container;
t.tabIndex <=0&&(t.tabIndex="0"),
be(
t,
{
focus: this._onFocus,
blur: this._onBlur,
mousedown: this._onMouseDown,
},
this
),
this._map.on({ focus: this._addHooks, blur: this._removeHooks },
this
);
},
removeHooks: function (){
this._removeHooks(),
ke(
this._map._container,
{
focus: this._onFocus,
blur: this._onBlur,
mousedown: this._onMouseDown,
},
this
),
this._map.off({ focus: this._addHooks, blur: this._removeHooks },
this
);
},
_onMouseDown: function (){
var t, e, i;
this._focused ||
((i=document.body),
(t=document.documentElement),
(e=i.scrollTop||t.scrollTop),
(i=i.scrollLeft||t.scrollLeft),
this._map._container.focus(),
window.scrollTo(i, e));
},
_onFocus: function (){
(this._focused = !0), this._map.fire("focus");
},
_onBlur: function (){
(this._focused = !1), this._map.fire("blur");
},
_setPanDelta: function (t){
for (
var e=(this._panKeys={}),
i=this.keyCodes,
n=0,
o=i.left.length;
n < o;
n++
)
e[i.left[n]]=[-1 * t, 0];
for (n=0, o=i.right.length; n < o; n++)
e[i.right[n]]=[t, 0];
for (n=0, o=i.down.length; n < o; n++)
e[i.down[n]]=[0, t];
for (n=0, o=i.up.length; n < o; n++)
e[i.up[n]]=[0, -1 * t];
},
_setZoomDelta: function (t){
for (
var e=(this._zoomKeys={}),
i=this.keyCodes,
n=0,
o=i.zoomIn.length;
n < o;
n++
)
e[i.zoomIn[n]]=t;
for (n=0, o=i.zoomOut.length; n < o; n++)
e[i.zoomOut[n]]=-t;
},
_addHooks: function (){
be(document, "keydown", this._onKeyDown, this);
},
_removeHooks: function (){
ke(document, "keydown", this._onKeyDown, this);
},
_onKeyDown: function (t){
if(!(t.altKey||t.ctrlKey||t.metaKey)){
var e,
i,
n=t.keyCode,
o=this._map;
if(n in this._panKeys)
(o._panAnim&&o._panAnim._inProgress) ||
((i=this._panKeys[n]),
t.shiftKey&&(i=Z(i).multiplyBy(3)),
o.options.maxBounds &&
(i=o._limitOffset(Z(i), o.options.maxBounds)),
o.options.worldCopyJump
? ((e=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(i))
)),
o.panTo(e))
: o.panBy(i));
else if(n in this._zoomKeys)
o.setZoom(o.getZoom() + (t.shiftKey ? 3:1) * this._zoomKeys[n]
);
else {
if(27!==n ||
!o._popup ||
!o._popup.options.closeOnEscapeKey
)
return;
o.closePopup();
}
Ee(t);
}},
})),
De.addInitHook("addHandler", "keyboard", _t),
De.mergeOptions({
scrollWheelZoom: !0,
wheelDebounceTime: 40,
wheelPxPerZoomLevel: 60,
}),
(mt=X.extend({
addHooks: function (){
be(this._map._container, "wheel", this._onWheelScroll, this),
(this._delta=0);
},
removeHooks: function (){
ke(this._map._container, "wheel", this._onWheelScroll, this);
},
_onWheelScroll: function (t){
var e=Oe(t),
i=this._map.options.wheelDebounceTime;
(this._delta +=e),
(this._lastMousePos =
this._map.mouseEventToContainerPoint(t)),
this._startTime||(this._startTime=+new Date()),
(e=Math.max(i - (+new Date() - this._startTime), 0)),
clearTimeout(this._timer),
(this._timer=setTimeout(o(this._performZoom, this), e)),
Ee(t);
},
_performZoom: function (){
var t=this._map,
e=t.getZoom(),
i=this._map.options.zoomSnap||0,
n =
(t._stop(),
this._delta /
(4 * this._map.options.wheelPxPerZoomLevel));
(n =
(4 * Math.log(2 / (1 + Math.exp(-Math.abs(n))))) /
Math.LN2),
(i=i ? Math.ceil(n / i) * i:n),
(n=t._limitZoom(e + (0 < this._delta ? i:-i)) - e),
(this._delta=0),
(this._startTime=null),
n &&
("center"===t.options.scrollWheelZoom
? t.setZoom(e + n)
: t.setZoomAround(this._lastMousePos, e + n));
},
})),
De.addInitHook("addHandler", "scrollWheelZoom", mt),
De.mergeOptions({
tapHold: Ct.touchNative&&Ct.safari&&Ct.mobile,
tapTolerance: 15,
}),
(ft=X.extend({
addHooks: function (){
be(this._map._container, "touchstart", this._onDown, this);
},
removeHooks: function (){
ke(this._map._container, "touchstart", this._onDown, this);
},
_onDown: function (t){
var e;
clearTimeout(this._holdTimeout),
1===t.touches.length &&
((e=t.touches[0]),
(this._startPos=this._newPos =
new j(e.clientX, e.clientY)),
(this._holdTimeout=setTimeout(
o(function (){
this._cancel(),
this._isTapValid() &&
(be(document, "touchend", je),
be(
document,
"touchend touchcancel",
this._cancelClickPrevent
),
this._simulateEvent("contextmenu", e));
}, this),
600
)),
be(
document,
"touchend touchcancel contextmenu",
this._cancel,
this
),
be(document, "touchmove", this._onMove, this));
},
_cancelClickPrevent: function t(){
ke(document, "touchend", je),
ke(document, "touchend touchcancel", t);
},
_cancel: function (){
clearTimeout(this._holdTimeout),
ke(
document,
"touchend touchcancel contextmenu",
this._cancel,
this
),
ke(document, "touchmove", this._onMove, this);
},
_onMove: function (t){
(t=t.touches[0]),
(this._newPos=new j(t.clientX, t.clientY));
},
_isTapValid: function (){
return (
this._newPos.distanceTo(this._startPos) <=
this._map.options.tapTolerance
);
},
_simulateEvent: function (t, e){
((t=new MouseEvent(t, {
bubbles: !0,
cancelable: !0,
view: window,
screenX: e.screenX,
screenY: e.screenY,
clientX: e.clientX,
clientY: e.clientY,
}))._simulated = !0),
e.target.dispatchEvent(t);
},
})),
De.addInitHook("addHandler", "tapHold", ft),
De.mergeOptions({ touchZoom: Ct.touch, bounceAtZoomLimits: !0 }),
(gt=X.extend({
addHooks: function (){
ae(this._map._container, "leaflet-touch-zoom"),
be(
this._map._container,
"touchstart",
this._onTouchStart,
this
);
},
removeHooks: function (){
he(this._map._container, "leaflet-touch-zoom"),
ke(
this._map._container,
"touchstart",
this._onTouchStart,
this
);
},
_onTouchStart: function (t){
var e,
i,
n=this._map;
!t.touches ||
2!==t.touches.length ||
n._animatingZoom ||
this._zooming ||
((e=n.mouseEventToContainerPoint(t.touches[0])),
(i=n.mouseEventToContainerPoint(t.touches[1])),
(this._centerPoint=n.getSize()._divideBy(2)),
(this._startLatLng=n.containerPointToLatLng(this._centerPoint
)),
"center"!==n.options.touchZoom &&
(this._pinchStartLatLng=n.containerPointToLatLng(e.add(i)._divideBy(2)
)),
(this._startDist=e.distanceTo(i)),
(this._startZoom=n.getZoom()),
(this._moved = !1),
(this._zooming = !0),
n._stop(),
be(document, "touchmove", this._onTouchMove, this),
be(
document,
"touchend touchcancel",
this._onTouchEnd,
this
),
je(t));
},
_onTouchMove: function (t){
if(t.touches&&2===t.touches.length&&this._zooming){
var e=this._map,
i=e.mouseEventToContainerPoint(t.touches[0]),
n=e.mouseEventToContainerPoint(t.touches[1]),
s=i.distanceTo(n) / this._startDist;
if(((this._zoom=e.getScaleZoom(s, this._startZoom)),
!e.options.bounceAtZoomLimits &&
((this._zoom < e.getMinZoom()&&s < 1) ||
(this._zoom > e.getMaxZoom()&&1 < s)) &&
(this._zoom=e._limitZoom(this._zoom)),
"center"===e.options.touchZoom)
){
if(((this._center=this._startLatLng), 1==s)) return;
}else{
if(((i=i
._add(n)
._divideBy(2)
._subtract(this._centerPoint)),
1==s&&0===i.x&&0===i.y)
)
return;
this._center=e.unproject(e
.project(this._pinchStartLatLng, this._zoom)
.subtract(i),
this._zoom
);
}
this._moved||(e._moveStart(!0, !1), (this._moved = !0)),
z(this._animRequest),
(n=o(
e._move,
e,
this._center,
this._zoom,
{ pinch: !0, round: !1 },
void 0
)),
(this._animRequest=T(n, this, !0)),
je(t);
}},
_onTouchEnd: function (){
this._moved&&this._zooming
? ((this._zooming = !1),
z(this._animRequest),
ke(document, "touchmove", this._onTouchMove, this),
ke(
document,
"touchend touchcancel",
this._onTouchEnd,
this
),
this._map.options.zoomAnimation
? this._map._animateZoom(this._center,
this._map._limitZoom(this._zoom),
!0,
this._map.options.zoomSnap
)
: this._map._resetView(this._center,
this._map._limitZoom(this._zoom)
))
: (this._zooming = !1);
},
})),
De.addInitHook("addHandler", "touchZoom", gt),
(De.BoxZoom=K),
(De.DoubleClickZoom=pt),
(De.Drag=Gi),
(De.Keyboard=_t),
(De.ScrollWheelZoom=mt),
(De.TapHold=ft),
(De.TouchZoom=gt),
(t.Bounds=A),
(t.Browser=Ct),
(t.CRS=Q),
(t.Canvas=Fi),
(t.Circle=gi),
(t.CircleMarker=fi),
(t.Class=M),
(t.Control=He),
(t.DivIcon=Bi),
(t.DivOverlay=Ei),
(t.DomEvent=Y),
(t.DomUtil=J),
(t.Draggable=Ge),
(t.Evented=I),
(t.FeatureGroup=ci),
(t.GeoJSON=wi),
(t.GridLayer=Oi),
(t.Handler=X),
(t.Icon=di),
(t.ImageOverlay=Si),
(t.LatLng=N),
(t.LatLngBounds=O),
(t.Layer=lt),
(t.LayerGroup=li),
(t.LineUtil=it),
(t.Map=De),
(t.Marker=_i),
(t.Mixin=tt),
(t.Path=mi),
(t.Point=j),
(t.PolyUtil=et),
(t.Polygon=vi),
(t.Polyline=yi),
(t.Popup=Zi),
(t.PosAnimation=Ne),
(t.Projection=st),
(t.Rectangle=Vi),
(t.Renderer=Qi),
(t.SVG=Ui),
(t.SVGOverlay=ji),
(t.TileLayer=Ri),
(t.Tooltip=Ai),
(t.Transformation=q),
(t.Util=C),
(t.VideoOverlay=Ii),
(t.bind=o),
(t.bounds=B),
(t.canvas=Hi),
(t.circle=function (t, e, i){
return new gi(t, e, i);
}),
(t.circleMarker=function (t, e){
return new fi(t, e);
}),
(t.control=Qe),
(t.divIcon=function (t){
return new Bi(t);
}),
(t.extend=e),
(t.featureGroup=function (t, e){
return new ci(t, e);
}),
(t.geoJSON=Mi),
(t.geoJson=dt),
(t.gridLayer=function (t){
return new Oi(t);
}),
(t.icon=function (t){
return new di(t);
}),
(t.imageOverlay=function (t, e, i){
return new Si(t, e, i);
}),
(t.latLng=D),
(t.latLngBounds=R),
(t.layerGroup=function (t, e){
return new li(t, e);
}),
(t.map=function (t, e){
return new De(t, e);
}),
(t.marker=function (t, e){
return new _i(t, e);
}),
(t.point=Z),
(t.polygon=function (t, e){
return new vi(t, e);
}),
(t.polyline=function (t, e){
return new yi(t, e);
}),
(t.popup=function (t, e){
return new Zi(t, e);
}),
(t.rectangle=function (t, e){
return new Vi(t, e);
}),
(t.setOptions=p),
(t.stamp=r),
(t.svg=$i),
(t.svgOverlay=function (t, e, i){
return new ji(t, e, i);
}),
(t.tileLayer=Ni),
(t.tooltip=function (t, e){
return new Ai(t, e);
}),
(t.transformation=W),
(t.version="1.9.4"),
(t.videoOverlay=function (t, e, i){
return new Ii(t, e, i);
}),
window.L);
(t.noConflict=function (){
return (window.L=Ki), this;
}),
(window.L=t);
})(e);
},
},
e={};
function i(n){
var o=e[n];
if(void 0!==o) return o.exports;
var s=(e[n]={ exports: {}});
return t[n].call(s.exports, s, s.exports, i), s.exports;
}
(i.n=(t)=> {
var e=t&&t.__esModule ? ()=> t.default:()=> t;
return i.d(e, { a: e }), e;
}),
(i.d=(t, e)=> {
for (var n in e)
i.o(e, n) &&
!i.o(t, n) &&
Object.defineProperty(t, n, { enumerable: !0, get: e[n] });
}),
(i.o=(t, e)=> Object.prototype.hasOwnProperty.call(t, e)),
(()=> {
"use strict";
const t=new (class {
constructor(){}
injectScript(t, e = !0){
const i=document.createElement("script");
e ? (i.src=t):(i.textContent=t), document.body.appendChild(i);
}
removeNonNumeric(t){
return t.replace(/\D/g, "");
}
isUrlValid(t){
var e=new XMLHttpRequest();
return e.open("HEAD", t, !1), e.send(), 200==e.status;
}
openNewWindow(t, e){
let i=window.open(t, "_blank", e);
return !(!i||i.closed||void 0===i.closed);
}})();
class e {
constructor(t=""){
this.ajax_url=t;
}
isCheckout(){
return (
console.log("Checkout"),
jQuery("body").hasClass("woocommerce-checkout")
);
}
getShippingMethodId(){
if(jQuery(".wc-block-checkout").length > 0){
console.log("🧩 Detected block checkout, trying to fetch shipping method..."
);
let e=jQuery("[data-shipping-method-id]:first");
if(e.length > 0){
const i=e.data("shipping-method-id");
return (
console.log("✅ Found block-based method ID:", i),
t.removeNonNumeric(i)
);
}
if(window.wc &&
window.wc.blocksStore &&
window.wc.blocksStore.getState
)
try {
const e=window.wc.blocksStore.getState().shippingRates;
if(e&&e.length > 0){
const i=e.find((t)=> t.selected);
if(i)
return (
console.log("✅ Found active shipping method in wc.blocksStore:",
i
),
t.removeNonNumeric(i.rate_id||i.id)
);
}} catch (t){
console.warn("⚠️ Could not read from wc.blocksStore:", t);
}
return (
console.warn("⚠️ No shipping method found yet in block checkout."
),
""
);
}
let e=jQuery("input[name='shipping_method[0]']:checked"),
i=jQuery("input[name='shipping_method[0]']"),
n=e.length > 0 ? e.val():i.val();
if(!n||"string"!=typeof n)
return (
console.warn("⚠️ No shipping method found yet (classic checkout)."
),
""
);
if(n.indexOf(":") > 0){
const e=n.split(":");
return t.removeNonNumeric(e[0]);
}
return n;
}
getShippingData(){
let t, e, i, n, o, s, r, a, h, l, c;
if(jQuery(".wc-block-checkout").length > 0){
console.log("Reading Block Checkout data"),
(l =
jQuery("#shipping-address_1").val() ||
jQuery("#billing-address_1").val() ||
""),
(c =
jQuery("#shipping-address_2").val() ||
jQuery("#billing-address_2").val() ||
""),
(h =
jQuery("#shipping-city").val() ||
jQuery("#billing-city").val() ||
""),
(a =
jQuery("#shipping-postcode").val() ||
jQuery("#billing-postcode").val() ||
""),
(r =
jQuery("#shipping-state").val() ||
jQuery("#billing-state").val() ||
"");
const e=[
"#components-form-token-input-0",
'input[aria-label*="Country"]',
"#shipping-country",
"#billing-country",
];
for (const i of e){
const e=jQuery(i);
if(e.length&&e.val()){
(t=e.val()),
console.log(`Found country using selector: ${i}=${t}`);
break;
}}
if(!t){
const e =
jQuery("#shipping-country option:selected").text() ||
jQuery("#billing-country option:selected").text();
e &&
((t=e), console.log(`Found country from option text: ${t}`));
}} else
console.log("Reading Classic Checkout data"),
(t =
jQuery("#shipping-country").val() ||
jQuery("#billing-country").val()),
(e=jQuery("#billing_state").val()),
(i=jQuery("input#billing_postcode").val()),
(n=jQuery("#billing_city").val()),
(o=jQuery("input#billing_address_1").val()),
(s=jQuery("input#billing_address_2").val()),
(r=e),
(a=i),
(h=n),
(l=o),
(c=s),
jQuery("#ship-to-different-address")
.find("input")
.is(":checked") &&
((t=jQuery("#shipping_country").val()),
(r=jQuery("#shipping_state").val()),
(a=jQuery("input#shipping_postcode").val()),
(h=jQuery("#shipping_city").val()),
(l=jQuery("input#shipping_address_1").val()),
(c=jQuery("input#shipping_address_2").val()));
t
? console.log(`Final country value: ${t}`)
: (console.log("Country still not found - will be populated when form loads"
),
(t=""));
const d={
Address: {
Lat: "",
Long: "",
Streetname1: l||"",
Streetname2: c||"",
HouseNumber: "",
NumberExtension: "",
PostalCode: a||"",
s_postcode: a||"",
City: h||"",
Country: t||"",
State: r||"",
},
post_data: jQuery("form.checkout").serialize(),
CarrierId: jQuery("#shipping_carrier_id").val()||0,
};
return (window.GLS_shipping_address=d), d;
}
setCarrier(t){
console.log("Set carrier id"),
console.log("CarrierIDDDD", t),
(this.carrier_id=void 0!==t ? t:this.getShippingMethodId()),
jQuery("#shipping_carrier_id").val(this.carrier_id);
}
setPickupPoint(t){
console.log("SET PICKUP POINT @#@#"), console.log(t);
let e=t.Information.Name + " " + t.Information.Address,
i={
action: "GLS_set_pickup_point",
shipping_pickup_label: e,
GLS_pickup_extended: jQuery(".GLS_mapfields" + t.PointId).val(),
"GLS-pickup__description": e,
shipping_pickup_id: t.PointId,
shipping_carrier_id: window.carrier_id,
GLS_nonce: GLS_vars.nonce,
};
jQuery
.getJSON(this.ajax_url, i, (t)=> {
console.log(t);
document.querySelectorAll(".GLS-pick-location").forEach((t)=> {
const i=t.parentNode.querySelector(".pickup-label-display");
i&&i.remove();
const n=document.createElement("div");
(n.className="pickup-label-display"),
(n.style.cssText =
"margin-top: 10px; padding: 8px; background-color: #f0f0f0; border-radius: 4px; font-size: 14px; color: #333;"),
(n.innerHTML=`<strong>Selected Pickup Location:</strong><br>${e}`),
t.parentNode.insertBefore(n, t.nextSibling);
});
})
.fail((t)=> {
console.log("Fatal error widget requesting points do we have an API bug?",
t.responseText
);
}),
jQuery(".GLS_mapfields" + t.PointId).length > 0 &&
jQuery("#shipping_pickup_extended").val(jQuery(".GLS_mapfields" + t.PointId).val()
);
}}
var n=i(874),
o=i.n(n);
class s {
constructor(t, e){
(this.GLS=e),
(this.options=t),
(this.map=null),
(this.host=t.host||"https://my.GLS.me"),
(this.icon_folder =
"undefined"!=typeof GLS_icon_folder ? GLS_icon_folder:""),
(this.mapWrapper=null),
(this.stylePath =
t.stylePath ||
this.host + "/shopsystems/v2/assets/GLSwidget.css"),
(this.markers=[]),
(this.pickupPoints=[]),
(this.carrier_icon_config={
30: { extension: "svg", selectedState: !0, iconSize: [32, 32] },
68: { extension: "svg", selectedState: !0, iconSize: [57, 92] },
71: { extension: "svg", selectedState: !0, iconSize: [57, 92] },
}),
(this.selectedPointIdx=null),
(this.moveListeners=[]),
(this.isMoving = !1),
(this.isUserMoving = !1),
(this.bounds=null);
}
setCarrierId(t){
(this.carrier_id=t),
(this.current_icon=this.getCarrierIconOfType(this.carrier_id));
}
selectPoint(t){
null!=this.selectedPointIdx &&
this.markers[this.selectedPointIdx].setIcon(this.getCarrierIconOfType(this.carrier_id,
this.pickupPoints[this.selectedPointIdx].Type,
0
)
),
(this.selectedPointIdx=t),
this.markers[t].setIcon(this.getCarrierIconOfType(this.carrier_id,
this.pickupPoints[t].Type,
1
)
);
}
createIcon(t){
let e =
void 0!==this.carrier_icon_config[this.carrier_id]
? this.carrier_icon_config[this.carrier_id].iconSize
: 50;
return o().icon({
iconUrl: t,
iconSize: [e, e],
iconAnchor: [e / 2, e],
popupAnchor: [(-1 * e) / 2, (-1 * e) / 2],
});
}
setZoom=function (t){
this.map.setZoom(t);
};
isMapMoving(){
return this.isMoving||this.isUserMoving;
}
centerMap(t, e){
if(isNaN(t)||isNaN(e))
return void console.error("Invalid coordinates passed to centerMap:",
{ lat: t, lng: e }
);
let i=o().latLng(t, e);
this.map.setView(i);
}
grantReady(){
this.isScriptLoaded||this.loadScript();
}
geocodeBpost(t, e){
this._geocode(t.address, e);
}
_geocode(t, e){
jQuery.getJSON("https://plugins.bpost.be/shopsystems/v2/shopify/bpostgeocode?searchText=" +
t,
{},
function (t){
let i=[];
if(t.response&&t.response.topSuggestions){
let e=t.response.topSuggestions;
for (let t=0; t < e.length; ++t)
e[t].address.searchBarString &&
i.push({
display_name: e[t].address.searchBarString,
address: {
City: e[t].address.municipalityName,
Country: "be",
PostalCode: e[t].address.postalCode,
Streetname1: e[t].address.searchBarString,
},
lat: e[t].address.latitude,
lng: e[t].address.longitude,
});
}
e&&e(i);
}
);
}
geocode(t, e){
let i=t.address,
n="";
const o=t.country ? t.country.toLowerCase():null;
if(i.match(/^([0-9\-]+)$/)){
if("Portugal"==t.country&&"undefined"!=typeof missingZipPT){
let t=i.substring(0, 4);
for (let i=0; i < missingZipPT.length; ++i)
if(missingZipPT[i].zipcode==t)
return (
(this.queryResults={
display_name: missingZipPT[i].display_name,
lat: missingZipPT[i].lat,
lon: missingZipPT[i].lng,
}),
e([this.queryResults])
);
}
n="postalcode=" + i;
} else n="q=" + i;
jQuery("#sw-query-results").html('<div class="sw-loader"><div></div><div></div><div></div></div>'
),
jQuery.getJSON("https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&" +
n,
(n)=> {
if(0==n.length &&
i.match(/^([0-9\-]+)$/) &&
o &&
("PT"==o.toUpperCase()||"portugal"==o.toLowerCase())
)
return (
jQuery("#sw-query").val(i.substring(0, 4)),
void this.geocode(t, e)
);
this.queryResults=[];
for (let e=0; e < n.length; ++e){
(n[e].address.postcode ||
n[e].address.city ||
n[e].address.county) &&
this.pushDisplayedResults(n[e], t);
}
e&&e(this.queryResults);
}
);
}
pushDisplayedResults(t, e){
let i=t;
const n=void 0!==i.address.road ? i.address.road:i.display_name;
let o =
(n||"") + " " + (i.address.postcode ? i.address.postcode:"");
void 0!==i.address.city&&(o +=" " + i.address.city),
void 0!==i.address.region&&(o +=" " + i.address.region),
i.address.county&&(o +=" " + i.address.county),
i.address.country &&
i.address.country.toLowerCase() &&
(o +=" " + i.address.country_code),
this.queryResults.push({
display_name: o,
address: {
City: i.address.city,
Country: i.address.country_code,
PostalCode: i.address.postcode,
Streetname1: n,
State: i.address.region,
},
lat: i.lat,
lng: i.lon,
});
}
geocodeAddress(t, e, i, n, o){
var s =
"https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&city=" +
e +
"&country=" +
i;
void 0!==n &&
(("PT"!=i&&"Portugal"!=i)||(n=n.substr(0, 4)),
(s +="&postalcode=" + n)),
void 0!==o&&(s +="&street=" + o),
"undefined"!=typeof btoa&&void 0!==this.address_cache[btoa(s)]
? t(this.address_cache[btoa(s)])
: jQuery.getJSON(s, {}, (e)=> {
let i={ iso2: "", lat: "", lng: "" };
if(e.length > 0){
let t=e[0];
(i.iso2=t.address.country_code),
(i.lat=t.lat),
(i.lng=t.lon);
}
(this.address_cache[btoa(s)]=i), t(i);
});
}
geocodeAddressParts(t, e, i, n, o){
if(GLS_PLUGIN_URL.includes("bpost") &&
["BE", "be", "Belgium"].includes(i)
)
return this.geocodeAddressPartsBpost(t, e, i, n, o);
let s=`https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&city=${e}&country_code=${i}`;
if(n){
s +=`&postalcode=${
["PT", "Portugal"].includes(i) ? n.substr(0, 4):n
}`;
}
o&&(s +=`&street=${encodeURI(o)}`),
jQuery.getJSON(s, {}, (e)=> {
const i={ iso2: "", lat: "", lng: "" };
if(e.length > 0){
const t=e[0];
(i.iso2=t.address.country_code),
(i.lat=t.lat),
(i.lng=t.lon);
}
t(i);
});
}
geocodeAddressPartsBpost(t, e, i, n, o){
let s="";
o&&(s +=encodeURI(o)),
n&&(s +=`,${n}`),
this._geocode(s, (e)=> {
const i =
e.length > 0
? { lat: e[0].latitude, lng: e[0].longitude }
: { lat: 0, lng: 0 };
t?.(i);
});
}
loadScript(){
t.injectScript(GLS_PLUGIN_URL + "views/js/leaflet-1.9.4.js"),
(this.isScriptLoaded = !0);
}
initMap(){
(this.mapWrapper=jQuery("body")),
this.mapWrapper.hasClass("leaflet-container") ||
((this.icon_selected=this.createIcon(this.icon_folder + "selected.png"
)),
(this.icon_default=this.createIcon(this.icon_folder + "default.png"
)),
this.current_icon||(this.current_icon=this.icon_default),
(this.map=new (o().map)("sw-map", {
zoom: 16,
center: [51.505, -0.09],
})),
o()
.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}
)
.addTo(this.map),
this.options.onmapready&&this.options.onmapready(),
this.map.on("click", ()=> {
jQuery(".sw-map-selected-point").html("");
}),
this.map.on("moveend", ()=> {
let t=this.getCenter();
this.isInBounds(t.lat, t.lng)||this.moveEnd();
}));
}
async moveEnd(){
if(this.isMapMoving()) return;
this.isUserMoving = !0;
let t=this.map.getCenter();
for (
let e=0;
this.moveListeners&&e < this.moveListeners.length;
++e
)
await this.moveListeners[e](t);
this.isUserMoving = !1;
}
addMapMoveListener(t){
this.moveListeners.push(t);
}
getCenter(){
return this.map.getCenter();
}
isInBounds(t, e){
if(!this.bounds) return !1;
let i,
n=t > this.bounds.bottomLeft.lat&&t < this.bounds.topRight.lat,
o=e < this.bounds.topRight.lng,
s=e > this.bounds.bottomLeft.lng;
return (
(i =
this.bounds.topRight.lng < this.bounds.bottomLeft.lng
? o||s
: o&&s),
i&&n
);
}
clearMarkers(){
if(((this.bounds=null),
(this.selectedPointIdx=null),
this.markers.length > 0)
)
for (let t=0; t < this.markers.length; ++t)
this.map.removeLayer(this.markers[t]);
(this.markers=[]), this.isMoving||this.map.setMinZoom(0);
}
addMarkers(t, e){
(this.isMoving = !0), (this.pickupPoints=t);
for (let i=0; i < t.length; ++i)
(this.markers[i]=this.getMarker(t[i])),
this.markers[i] &&
((this.pickupPoints[i].marker=this.markers[i]),
this.markers[i].on("click", function (){
"function"==typeof e&&e(i);
}));
this.fitBounds();
}
resetMarker(t){
t.setIcon(this.icon_default);
}
selectMarker(t){
t.setIcon(this.icon_selected);
}
fitBounds=function (){
jQuery("html,body").scrollTop(0),
this.map.invalidateSize(),
(this.isMoving = !0);
let t=[
parseFloat(this.pickupPoints[0].Lat),
parseFloat(this.pickupPoints[0].Long),
],
e=[
parseFloat(this.pickupPoints[0].Lat),
parseFloat(this.pickupPoints[0].Long),
];
for (let i=0; i < this.pickupPoints.length; ++i){
let n=parseFloat(this.pickupPoints[i].Lat),
o=parseFloat(this.pickupPoints[i].Long);
n < t[0]&&(t[0]=n),
n > e[0]&&(e[0]=n),
o > e[1]&&(e[1]=o),
o < t[1]&&(t[1]=o);
}
let i=t[0] + (e[0] - t[0]) / 2,
n=t[1] + (e[1] - t[1]) / 2;
if(((this.center=[i, n]),
this.centerMap(i, n),
!t.some((t)=> isNaN(t))&&!e.some((t)=> isNaN(t)))
)
return (
this.map.fitBounds([t, e]),
(this.bounds={
bottomLeft: { lat: t[0], lng: t[1] },
topRight: { lat: e[0], lng: e[1] },
}),
setTimeout(()=> {
this.isMoving = !1;
let t=10;
(t > 16||t < 10)&&(t=10), this.map.setMinZoom(t);
}, 1e3),
!1
);
console.log("Bottom left or top right contain NaN coordinates:", {
bottomLeft: t,
topRight: e,
});
};
getIcon(t){
return t.Type > 0
? this.getCarrierIconOfType(this.carrier_id, t.Type)
: this.current_icon;
}
getMarker(t){
const e=parseFloat(t.Lat),
i=parseFloat(t.Long);
if(isNaN(e)||isNaN(i))
return (
console.log("Pickup point Lat or Long is NaN:", {
lat: e,
lng: i,
pickupPoint: t,
}),
null
);
let n=o().marker([e, i], {
icon: this.getIcon(t),
title: t.Information.Name + "\n" + t.Information.Address,
keyboard: !1,
});
return n.addTo(this.map), n;
}
getCarrierIconOfType(t, e, i){
let n,
o =
"." +
(void 0!==this.carrier_icon_config[t]
? this.carrier_icon_config[t].extension
: "png"),
s =
void 0!==this.carrier_icon_config[t] &&
this.carrier_icon_config[t].selectedState &&
i
? "_s"
: "";
return i&&!s
? this.icon_selected
: ((n =
e&&[1, 2, 4, 16, 990].includes(e)
? this.icon_folder + "" + t + "_" + e + s + o
: this.icon_folder + t + s + o),
this.createIcon(n));
}
setCarrierIcon(e){
if(void 0===o())
return void setTimeout(()=> {
this.setCarrierIcon(e);
}, 200);
this.carrier_id=e;
let i=this.icon_folder + "" + e + ".png";
void 0===this.cache_icon_valid[i] &&
(this.cache_icon_valid[i]=t.carrierIconExists(e,
"",
this.icon_folder
)),
(this.current_icon=this.cache_icon_valid[i]
? this.createIcon(i)
: this.icon_default);
}}
const r=class {
constructor(t){
console.log("Entered"),
(this.isScriptLoaded = !1),
(this.markers=[]),
(this.map=null),
(this.pickupPoints=[]),
(this.options=t),
(this.host=t.host),
console.log("Icon folder"),
console.log(GLS_icon_folder),
(this.icon_folder =
"undefined"!=typeof GLS_icon_folder ? GLS_icon_folder:""),
(this.icon_selected=this.icon_folder + "selected.png"),
(this.icon_default=this.icon_folder + "default.png"),
(this.current_icon=this.icon_default),
(this.moveListeners=[]),
(this.carrier_id=null),
(this.carrier_icon_config={
30: { extension: "svg", selectedState: !0, iconSize: 98 },
}),
(this.GLSWidget=new a(t));
}
initMap(t, e){
this.carrier_id=t;
let i=this;
this.loadScript("https://maps.googleapis.com/maps/api/js?key=" +
this.options.gmapskey +
"&callback=",
()=> {
console.log("USAO U IF"),
(i.isScriptLoaded = !0),
e&&e(),
this.loadMap();
}
),
console.log("Initmap Nije usao u if");
}
loadScript(t, e){
var i=document.createElement("script");
(i.type="text/javascript"),
i.readyState
? (i.onreadystatechange=function (){
("loaded"!=i.readyState&&"complete"!=i.readyState) ||
((i.onreadystatechange=null), calback&&e());
})
: (i.onload=function (){
e&&e();
}),
(i.src=t),
document.getElementsByTagName("head")[0].appendChild(i);
}
addMarkers(t, e){
this.pickupPoints=t;
for (let i=0; i < t.length; ++i)
(this.markers[i]=this.getMarker(t[i])),
(t[i].marker=this.markers[i]),
this.markers[i].addListener("click", ()=> {
void 0!==e&&e(i);
});
this.fitBounds();
}
addMapMoveListener(t){
this.moveListeners.push(t);
}
centerMap(t, e){
this.map.setCenter(new google.maps.LatLng(t, e));
}
clearMarkers(){
if(this.markers.length > 0){
for (let t=0; t < this.markers.length; ++t)
this.markers[t].setMap(null);
this.markers=[];
}}
fitBounds(){
var t=new google.maps.LatLngBounds();
for (let e=0; e < this.markers.length; ++e)
t.extend(this.markers[e].getPosition());
this.map.fitBounds(t), (this.bounds=this.map.getBounds());
}
getMarker(t){
console.log("GETMARKER");
let e=this.getCarrierIconUrl(t.Type, 0),
i={
position: new google.maps.LatLng(t.Lat, t.Long),
map: this.map,
icon: { url: e },
};
return (
console.log("PRE IF"),
void 0!==this.carrier_icon_config[this.carrier_id]
? (console.log("IF GET MARKER"),
console.log(this.carrier_icon_config),
console.log(this.carrier_icon_config[this.carrier_id].iconSize),
(i.icon.size=new google.maps.Size(this.carrier_icon_config[this.carrier_id].iconSize,
this.carrier_icon_config[this.carrier_id].iconSize
)))
: (console.log("ELSE GET MARKER"),
(i.icon.scaledSize=new google.maps.Size(50, 50))),
console.log("POSLE IF"),
new google.maps.Marker(i)
);
}
isMapMoving(){
return this.isMoving||this.isUserMoving;
}
async moveEnd(){
if(this.isMapMoving()) return;
this.isUserMoving = !0;
let t=this.map.getCenter();
for (
let e=0;
this.moveListeners&&e < this.moveListeners.length;
++e
)
await this.moveListeners[e]({ lat: t.lat(), lng: t.lng() });
console.log("MOVE LISTENERS ENDED"), (this.isUserMoving = !1);
}
loadMap(){
console.log("LOADMAP"),
(this.map=new google.maps.Map(document.getElementById("sw-map"), {
center: { lat: -34.397, lng: 150.644 },
zoom: 16,
mapTypeControl: !1,
})),
this.map.addListener("center_changed", ()=> {
let t=this.map.getCenter();
this.bounds&&!this.bounds.contains(t)&&this.moveEnd();
});
}
geocode(t, e){
if("undefined"==typeof google)
return void setTimeout(()=> {
this.geocode(shippingData, e);
}, 200);
this.clearMarkers();
new google.maps.Geocoder();
let i=this;
console.log("geocoding ", t);
let n="components=country:" + t.country;
if(t.address &&
t.address.match(/^([0-9\-]+)$/) &&
"PT"==t.country.toUpperCase() &&
"undefined"!=typeof missingZipPT
){
let i=t.address.substring(0, 4);
for (let t=0; t < missingZipPT.length; ++t)
if(missingZipPT[t].zipcode==i){
let i=[
{
display_name: missingZipPT[t].display_name,
lat: missingZipPT[t].lat,
lon: missingZipPT[t].lng,
},
];
return e(i);
}}
t.components
? (n +="|" + t.components)
: t.address.match(/^[0-9]/)
? (n +="|postal_code:" + t.address)
: (n +="&address=" + t.address),
jQuery.get("https://maps.google.com/maps/api/geocode/json?sensor=false&key=" +
this.options.gmapskey +
"&" +
n,
function (t){
let n=t.results,
o=t.status;
console.log(n);
let s={ iso2: "", lat: "", lng: "" };
if("OK"!=o)
return (
console.log("Geocode was not successful for the following reason: " +
o,
t.error_msg
),
void e(s)
);
let r=[];
for (let t=0; t < n.length; ++t){
s=n[t];
let e="";
for (
let t=0;
s.address_components&&t < s.address_components.length;
++t
)
e +=(e ? ", ":"") + s.address_components[t].long_name;
r.push({
iso2: i.getCountryCodeFromResult(s),
display_name: e,
lat: s.geometry.location.lat,
lng: s.geometry.location.lng,
});
}
e(r);
}
);
}
getCountryCodeFromResult(t){
if(void 0===t.address_components) return "";
let e=t.address_components;
for (let t=0; t < e.length; ++t){
let i=e[t].types;
for (let n=0; n < i.length; ++n)
if("country"==i[n]) return e[t].short_name;
}}
geocodeAddressParts(t, e, i, n, o){
void 0!==n &&
(("PT"!=i&&"Portugal"!=i)||(n=n.substr(0, 4)));
let s="postal_code:" + n + "|locality:" + e;
this.geocode({ country: i, components: s }, (e)=> {
t(e[0]);
});
}
setCarrierId(t){
this.carrier_id=t;
}
selectPoint(t){
console.log("Selectpoint");
for (let e=0; e < this.markers.length; ++e){
let i=this.pickupPoints[e];
console.log(i);
let n={ url: this.getCarrierIconUrl(i.Type, t==e) };
void 0!==this.carrier_icon_config[this.carrier_id]
? (n.size=new google.maps.Size(this.carrier_icon_config[this.carrier_id].iconSize,
this.carrier_icon_config[this.carrier_id].iconSize
))
: (n.scaledSize=new google.maps.Size(50, 50)),
console.log("SetICOD"),
console.log(n),
this.markers[e].setIcon(n);
}}
setCarrierId(t){
this.carrier_id=t;
}
getCarrierIconUrl(t, e){
let i,
n =
"." +
(void 0!==this.carrier_icon_config[this.carrier_id]
? this.carrier_icon_config[this.carrier_id].extension
: "png"),
o =
void 0!==this.carrier_icon_config[this.carrier_id] &&
this.carrier_icon_config[this.carrier_id].selectedState &&
e
? "_s"
: "";
return e&&!o
? this.icon_selected
: (t &&
"undefined"!=typeof GLS_carrier_imgs &&
GLS_carrier_imgs.indexOf(this.carrier_id + "_" + t + n)
? (console.log("getCarrierIconUrl 1"),
(i =
this.icon_folder + "" + this.carrier_id + "_" + t + o + n))
: (console.log("getCarrierIconUrl 2"),
console.log(this.carrier_id),
(i=this.icon_folder + this.carrier_id + o + ".png")),
i);
}};
const a=class {
constructor(t){
(this.pickupPoints=[]),
(this.selectedPoint=null),
(this.options=t),
(this.markers=[]),
(this.host=t.host||"https://GLS.me"),
(this.debug=t.debug||0),
(this.mapParentContainer=t.mapParentContainer||"body"),
(this.buttonParentContainer=t.buttonParentContainer||""),
(this.buttonClass=this.options.button_class||""),
(this.labels=this.options.labels||{}),
(this.platform=new e(t.ajax_url)),
(this.timeoutKeyDown=null),
(this.searchRunning = !1),
(this.address=this.options.address||null),
(this.carrier_id=this.options.carrierId||0),
(this.weekdaynames=[
GLS_monday,
GLS_tuesday,
GLS_wednesday,
GLS_thursday,
GLS_friday,
GLS_saturday,
GLS_sunday,
]),
(this.selectedDisplayOption=0),
(this.cacheResults={}),
(this.lastMandatoryCarrierId=null),
(this.hasShownToastForCarrier = !1),
(this.checkoutType=this.detectCheckoutType()),
(this.isPickupRequired = !1),
this.initializeCheckout(),
(window.GLSWidget=this);
}
getFormChange(){
let t,
e="";
jQuery(".wc-block-checkout__form").on("change", ()=> {
clearTimeout(t),
(t=setTimeout(()=> {
this.extractAddressData(!0);
const t=this.getSelectedShippingText();
t!==e
? ((e=t), (window.selectedText=t))
: jQuery("#shipping-loader").remove();
}, 500));
}),
this.enableButton();
}
getSelectedShippingText(){
let t=jQuery("fieldset.wc-block-checkout__shipping-option")
.find(".wc-block-components-radio-control__input:checked")
.closest("label")
.find(".wc-block-components-radio-control__label")
.text();
return (
t ||
jQuery("fieldset.wc-block-checkout__shipping-option")
.find(".wc-block-components-radio-control__option-layout")
.each(function (){
return (
(t=jQuery(this)
.find(".wc-block-components-radio-control__label")
.text()),
!1
);
}),
t
);
}
detectCheckoutType(){
return jQuery(".wc-block-checkout").length > 0 ||
jQuery("[data-block-name='woocommerce/checkout']").length > 0 ||
(window.wp &&
window.wp.data &&
window.wp.data.select("wc/store/cart"))
? "block"
: jQuery("form.checkout").length > 0 ||
jQuery(".woocommerce-checkout").length > 0 ||
jQuery("#place_order").length > 0
? "classic"
: "unknown";
}
isBlockCheckout(){
return "block"===this.checkoutType;
}
isClassicCheckout(){
return "classic"===this.checkoutType;
}
initializeCheckout(){
setTimeout(()=> {
this.isBlockCheckout()
? (this.extractAddressData(!0), this.initializeBlockCheckout())
: this.isClassicCheckout() &&
(this.extractClassicAddressData(),
this.initializeClassicCheckout());
}, 500),
(window.GLSPickupManager=this);
}
initializeBlockCheckout(){
this.setupAPIInterceptor(),
jQuery(document).ready(()=> {
this.waitForBlockCheckoutElements();
});
}
setupAPIInterceptor(){
const t=window.fetch;
window.fetch=async (...e)=> {
const [i, n]=e;
if(("string"==typeof i&&i.includes("/wp-json/wc/store/"),
"string"==typeof i &&
i.includes("/wp-json/wc/store/v1/cart/select-shipping-rate"))
)
try {
if(n&&n.body)
try {
const t=JSON.parse(n.body);
if(t.rate_id){
const e=this.extractCarrierIdFromMethodId(t.rate_id);
e &&
((this.carrier_id=e),
(window.carrier_id=e),
this.mapinterface &&
this.mapinterface.setCarrierId &&
this.mapinterface.setCarrierId(this.carrier_id));
}} catch (t){}
const i=await t(...e);
return (
i.ok &&
(this.removeAllPickupButtons(),
setTimeout(()=> this.checkShippingRates(), 200)),
i
);
} catch (i){
return (
console.error("Error in shipping rate API call:", i), t(...e)
);
}
return t(...e);
};
const e=XMLHttpRequest.prototype.open,
i=XMLHttpRequest.prototype.send;
if(((XMLHttpRequest.prototype.open=function (t, i, ...n){
return (this._url=i), e.call(this, t, i, ...n);
}),
(XMLHttpRequest.prototype.send=function (...t){
if((this._url&&this._url.includes("/wp-json/wc/store/"),
this._url &&
this._url.includes("/wp-json/wc/store/v1/cart/select-shipping-rate"
))
){
if(t[0]&&window.GLSPickupManager)
try {
const e=JSON.parse(t[0]);
if(e.rate_id){
const t =
window.GLSPickupManager.extractCarrierIdFromMethodId(e.rate_id
);
t &&
((window.GLSPickupManager.carrier_id=t),
(window.carrier_id=t),
window.GLSPickupManager.mapinterface &&
window.GLSPickupManager.mapinterface.setCarrierId &&
window.GLSPickupManager.mapinterface.setCarrierId(t));
}} catch (t){}
const e=this.onload;
this.onload=function (t){
this.status >=200 &&
this.status < 300 &&
window.GLSPickupManager &&
(window.GLSPickupManager.removeAllPickupButtons(),
setTimeout(
()=> window.GLSPickupManager.checkShippingRates(),
200
)),
e&&e.call(this, t);
};}
return i.call(this, ...t);
}),
window.jQuery)
){
const t=jQuery.ajax;
jQuery.ajax=function (e){
if((e.url&&e.url.includes("/wp-json/wc/store/"),
e.url &&
e.url.includes("/wp-json/wc/store/v1/cart/select-shipping-rate"
))
){
if(e.data&&window.GLSPickupManager)
try {
let t=e.data;
if(("string"==typeof t&&(t=JSON.parse(t)), t.rate_id)
){
const e =
window.GLSPickupManager.extractCarrierIdFromMethodId(t.rate_id
);
e &&
((window.GLSPickupManager.carrier_id=e),
(window.carrier_id=e),
window.GLSPickupManager.mapinterface &&
window.GLSPickupManager.mapinterface.setCarrierId &&
window.GLSPickupManager.mapinterface.setCarrierId(e));
}} catch (t){}
const t=e.success;
e.success=function (e, i, n){
window.GLSPickupManager &&
(window.GLSPickupManager.removeAllPickupButtons(),
setTimeout(
()=> window.GLSPickupManager.checkShippingRates(),
200
)),
t&&t.call(this, e, i, n);
};
const i=e.error;
e.error=function (t, e, n){
i&&i.call(this, t, e, n);
};}
return t.call(this, e);
};}}
extractCarrierIdFromMethodId(t){
const e=t.match(/shipping_GLS_(\d+)/);
if(e&&e[1]){
return parseInt(e[1]);
}
return null;
}
waitForBlockCheckoutElements(){
let t = !1,
e = !1;
const i=setInterval(()=> {
jQuery(".wc-block-components-shipping-rates-control__package").is(":visible"
) &&
!t &&
((t = !0), clearInterval(i), this.setupBlockShippingHandlers());
}, 500),
n=setInterval(()=> {
jQuery(".wc-block-components-checkout-place-order-button").is(":visible"
) &&
!e &&
((e = !0),
clearInterval(n),
this.setupBlockPlaceOrderHandler());
}, 500);
}
setupBlockShippingHandlers(){
this.extractAddressData(!0),
(window.selectedText=this.getSelectedShippingText()),
this.extractInitialCarrierId(),
this.getFormChange(),
this.getOnClick();
}
extractInitialCarrierId(){
if(window.wp&&window.wp.data)
try {
const t=window.wp.data.select("wc/store/cart").getCartData();
if(t&&t.shippingRates&&t.shippingRates[0]){
const e=t.shippingRates[0].shipping_rates.find((t)=> !0===t.selected
);
if(e&&e.rate_id){
const t=this.extractCarrierIdFromMethodId(e.rate_id);
t &&
((this.carrier_id=t),
(window.carrier_id=t),
this.mapinterface &&
this.mapinterface.setCarrierId &&
this.mapinterface.setCarrierId(this.carrier_id));
}}
} catch (t){}}
extractAddressData(t = !0){
let e,
i,
n,
o,
s,
r="";
if(t){
(e =
jQuery("#shipping-address_1").val() ||
jQuery("#billing-address_1").val() ||
""),
(i =
jQuery("#shipping-address_2").val() ||
jQuery("#billing-address_2").val() ||
""),
(n =
jQuery("#shipping-city").val() ||
jQuery("#billing-city").val() ||
""),
(o =
jQuery("#shipping-postcode").val() ||
jQuery("#billing-postcode").val() ||
""),
(s =
jQuery("#shipping-state").val() ||
jQuery("#billing-state").val() ||
"");
const t=[
"#components-form-token-input-0",
'input[aria-label*="Country/Region"]',
"#shipping-country option:selected",
"#billing-country option:selected",
];
for (const e of t){
const t=jQuery(e);
if(t.length){
r=e.includes("option:selected") ? t.text():t.val();
break;
}}
}else{
const t=jQuery("#ship-to-different-address input").is(":checked")
? "shipping"
: "billing";
(e=jQuery(`#${t}_address_1`).val()||""),
(i=jQuery(`#${t}_address_2`).val()||""),
(n=jQuery(`#${t}_city`).val()||""),
(o=jQuery(`#${t}_postcode`).val()||""),
(s=jQuery(`#${t}_state`).val()||""),
(r=jQuery(`#${t}_country option:selected`).text()||"");
}
(this.options.address={
Lat: "",
Long: "",
Streetname1: e,
Streetname2: i,
HouseNumber: "",
NumberExtension: "",
PostalCode: o,
s_postcode: o,
City: n,
Country: r,
State: s,
}),
(window.GLS_shipping_address={
Address: this.options.address,
...(t
? {}
: {
post_data: jQuery("form.checkout").serialize(),
CarrierId: this.carrier_id||0,
}),
});
}
setupBlockPlaceOrderHandler(){
jQuery(".wc-block-components-checkout-place-order-button").on("click",
(t)=> {
let e=jQuery("#shipping_pickup_id").val();
if(this.isPickupRequired&&(!e||""===e))
return t.preventDefault(), this.showPickupMandatoryModal(), !1;
}
);
}
initializeClassicCheckout(){
jQuery(document).ready(()=> {
const t=setInterval(()=> {
jQuery("form.checkout, .woocommerce-checkout").length > 0 &&
(clearInterval(t), this.setupClassicCheckoutHandlers());
}, 500);
});
}
async setupClassicCheckoutHandlers(){
jQuery('form[name="checkout"]').on("change", ()=> {
this.handleClassicShippingChange();
});
}
async handleClassicShippingChange(){
this.extractClassicAddressData();
}
extractClassicAddressData(){
this.extractAddressData(!1);
}
getClassicSelectedShippingMethod(){
let t=jQuery('#shipping_method input[type="radio"]:checked')
.siblings("label")
.text()
.split(":")[0]
.trim();
if(!t){
const e=document.querySelector("#shipping_method");
if(e){
e.querySelectorAll("li").forEach((e)=> {
const i=e.querySelector("label");
if(i){
const e=i.textContent.trim();
t=e.split(":")[0].trim();
}});
}}
return t;
}
createModal(t){
const e=jQuery("<div>", {
id: t.id,
css: {
display: "block",
position: "fixed",
"z-index": "9999",
left: "0",
top: "0",
width: "100%",
height: "100%",
overflow: "auto",
"background-color": "rgba(0,0,0,0.4)",
},
}),
i=jQuery("<div>", {
css: {
"background-color": "#fefefe",
margin: "15% auto",
padding: "20px",
border: "1px solid #888",
width: "80%",
"max-width": "500px",
"border-radius": "5px",
"text-align": "center",
},
}),
n=jQuery("<span>", {
text: "×",
css: {
color: "#aaa",
float: "right",
"font-size": "28px",
"font-weight": "bold",
cursor: "pointer",
},
}),
o=jQuery("<p>", {
text: t.message,
css: { "font-size": "16px", margin: "20px 0", color: "#333" },
});
i.append(n),
i.append(o),
t.buttons &&
t.buttons.forEach((t)=> {
const e=jQuery("<button>", t.props);
i.append(e), t.handler&&e.on("click", t.handler);
}),
e.append(i),
jQuery("body").append(e);
const s=()=> e.remove();
return (
n.on("click", s),
jQuery(window).on("click", (t)=> {
jQuery(t.target).is(e)&&s();
}),
{ modal: e, closeModal: s }
);
}
showPickupMandatoryModal(){
const { closeModal: t }=this.createModal({
id: "pickupMandatoryModal",
message: GLS_mandatory_point,
buttons: [
{
props: {
text: GLS_choose_pickup_location||"Choose Pickup Location",
class: "button alt GLS-pick-location",
},
handler: (e)=> {
t(), e.preventDefault(), this.handlePickupButtonClick();
},
},
{
props: {
text: "OK",
css: {
"background-color": "#666",
color: "white",
border: "none",
padding: "6px 10px",
"border-radius": "4px",
cursor: "pointer",
"margin-left": "10px",
},
},
handler: t,
},
],
});
}
checkShippingRates(){
if(this.isBlockCheckout()){
const t=this.getSelectedShippingText();
t&&((window.selectedText=t), this.extractAddressData(!0));
}}
getOnClick(){
jQuery("#sw-query-btn").on("click", ()=> {
this.geocodeQuery(!0);
}),
jQuery('form[name="checkout"]').on("change", ()=> {
this.getFormShippingData();
});
}
getFormShippingData(){
this.extractClassicAddressData();
}
getGLSId(t){
var e=t.match(/([\d]+)_pickup/);
if(null!=e) return e[1];
for (let e=0; e < GLS_carriers.length; ++e)
if(GLS_carriers[e].ClassName===t)
return "object"==typeof GLS_carriers[e].Id
? GLS_carriers[e].Id[0]
: GLS_carriers[e].Id;
return 0;
}
init(){
this.options.address&&this.setAddress(this.options.address),
this.loadScripts(),
!this.options.address &&
localStorage.getItem("GLSAddress") &&
this.setAddress(JSON.parse(localStorage.getItem("GLSAddress"))),
this.initPickupButtons();
}
initPickupButtons(){
this.setupPickupEventListeners(),
setTimeout(()=> this.checkShippingRatesForPickup(), 1e3);
}
setupPickupEventListeners(){
window.wp &&
window.wp.data &&
window.wp.data.subscribe(()=> {
this.checkShippingRatesForPickup();
});
const t=window.fetch,
e=this;
(window.fetch=async (...i)=> {
const [n, o]=i;
if("string"==typeof n &&
n.includes("/wp-json/wc/store/v1/cart/select-shipping-rate")
)
try {
const n=await t(...i);
return (
n.ok &&
(e.removeAllPickupButtons(),
e.clearPickupPointData(),
setTimeout(()=> e.checkShippingRatesForPickup(), 200)),
n
);
} catch (e){
return t(...i);
}
return t(...i);
}),
document.addEventListener("change", (t)=> {
t.target.matches('input[name*="shipping"]') &&
(this.removeAllPickupButtons(),
this.clearPickupPointData(),
setTimeout(()=> this.checkShippingRatesForPickup(), 100));
}),
document.addEventListener("updated_checkout", ()=> {
this.removeAllPickupButtons(),
this.clearPickupPointData(),
setTimeout(()=> this.checkShippingRatesForPickup(), 200);
});
}
showToast(t, e=4e3){
jQuery(".GLS-toast").remove();
const i=jQuery("<div>", {
html: t,
class: "GLS-toast",
css: {
position: "fixed",
bottom: "40px",
right: "40px",
background: "#111",
color: "#fff",
padding: "14px 20px",
"border-radius": "6px",
"font-size": "15px",
"box-shadow": "0 3px 10px rgba(0,0,0,0.3)",
"z-index": "99999",
opacity: "0",
transition: "opacity 0.3s ease",
},
});
jQuery("body").append(i),
setTimeout(()=> i.css("opacity", "1"), 50),
setTimeout(()=> i.fadeOut(400, ()=> i.remove()), e);
}
checkShippingRatesForPickup(){
if(window.wp&&window.wp.data)
try {
jQuery(
".wc-block-components-checkout-place-order-button, #place_order"
);
const t=window.wp.data.select("wc/store/cart").getCartData();
if(!t||!t.shippingRates||!t.shippingRates[0]) return;
const e=t.shippingRates[0].shipping_rates.find((t)=> !0===t.selected
);
if(!e) return;
this.currentSelectedRate=e;
const i=e.meta_data?.find((t)=> "pickup_mandatory"===t.key),
n=i ? i.value:"0",
o=jQuery("#shipping_pickup_id").val(),
s=localStorage.getItem("GLSPointId"),
r=o||s,
a=this.extractCarrierIdFromMethodId(e.rate_id);
"1"===n
? ((this.isPickupRequired = !0),
r&&""!==r
? ((this.isPickupRequired = !1),
this.enableButton(),
jQuery("#pickup-required-notice").remove(),
(this.hasShownToastForCarrier = !1),
(this.lastMandatoryCarrierId=null))
: (this.disableButton(),
jQuery("#pickup-required-notice").remove(),
(this.hasShownToastForCarrier &&
this.lastMandatoryCarrierId===a) ||
(this.showToast("<strong>Pickup required:</strong> Please select a pickup location to complete checkout."
),
(this.hasShownToastForCarrier = !0),
(this.lastMandatoryCarrierId=a))))
: "2"===n
? ((this.isPickupRequired = !1),
this.removeAllPickupButtons(),
this.clearPickupPointData(),
this.clearPickupSessionData(),
this.enableButton(),
jQuery("#pickup-required-notice").remove(),
jQuery(".GLS-toast").remove(),
(this.hasShownToastForCarrier = !1),
(this.lastMandatoryCarrierId=null))
: ((this.isPickupRequired = !1),
this.enableButton(),
jQuery("#pickup-required-notice").remove(),
jQuery(".GLS-toast").remove(),
(this.hasShownToastForCarrier = !1),
(this.lastMandatoryCarrierId=null)),
a &&
((this.carrier_id=a),
(window.carrier_id=a),
this.mapinterface &&
this.mapinterface.setCarrierId &&
this.mapinterface.setCarrierId(this.carrier_id));
const h=this.hasPickupCapability(e);
"2"!==n&&h
? this.addPickupButton(e)
: (this.removeAllPickupButtons(),
r ||
(this.clearPickupPointData(),
this.clearPickupSessionData()));
} catch (t){
console.error("Error checking shipping rates:", t);
}}
selectPoint(t){
this.selectedPoint=t;
[
{ id: "GLSpickup", value: t.PointId },
{ id: "shipping_pickup_id", value: t.PointId },
{
id: "shipping_pickup_label",
value: `${t.Information.Name} ${t.Information.Address}`,
},
{
id: "shipping_carrier_id",
value: this.carrier_id||window.carrier_id||t.Carrier.Id,
},
].forEach((t)=> {
let e=jQuery(`#${t.id}`);
0===e.length &&
((e=jQuery(
`<input type="hidden" id="${t.id}" name="${t.id}" />`
)),
jQuery("form.checkout, .wc-block-checkout").append(e)),
e.val(t.value);
}),
localStorage.setItem("GLSPointId", t.PointId),
localStorage.setItem("GLSPointLabel", t.Information.Name),
jQuery("#GLS-pickup__description").length &&
jQuery("#GLS-pickup__description").show(),
jQuery(".GLS-pickup__description").length &&
jQuery(".GLS-pickup__description")
.show()
.html(t.Information.Name + " " + t.Information.Address);
let e=jQuery("#sw-map-selected-point");
if((1==this.selectedDisplayOption&&(e=jQuery("#sw-list-points")),
void 0!==t.MapFieldsSelect&&t.MapFieldsSelect.length > 0)
){
let i = !0;
if((e.find(".GLS_mapfields" + t.PointId).each((e, n)=> {
jQuery(n).val() ||
(alert(
jQuery(
jQuery(".GLS_mapfieldslabel" + t.PointId).get(e)
).text() +
": " +
this.options.labels.mapfieldmandatory
),
(i = !1));
}),
!i)
)
return !1;
}
const i={
id_carrier: this.carrier_id,
pickup_id: this.selectedPoint.PointId,
pickup_label:
(this.selectedPoint.Information.Name
? this.selectedPoint.Information.Name + "<br/>"
: "") + this.selectedPoint.Information.Address,
action: "GLS_save_pickup",
};
return (
e
.find(".GLS_mapfields" + this.selectedPoint.PointId)
.each(function (t, e){
let n=jQuery(e).attr("data-id"),
o=jQuery(e).val();
i.OptionFields||(i.OptionFields=[]),
i.OptionFields.push({ Id: n, Value: o }),
localStorage.setItem(n + "val", o);
}),
void 0===this.options.ajax_url
? this.options.onPointSelected(t, "")
: this.platform.setPickupPoint(t),
(this.isPickupRequired = !1),
this.enableButton(),
jQuery("#pickup-required-notice").remove(),
this.closeMap(),
jQuery("#myModal").hide(),
jQuery(
"#place_order, .wc-block-components-checkout-place-order-button"
)
.prop("disabled", !1)
.css({
"background-color": "black",
cursor: "pointer",
opacity: "1",
}),
setTimeout(()=> {
jQuery("#shipping_pickup_id").val() &&
(this.enableButton(),
jQuery("#pickup-required-notice").remove());
}, 100),
(this.hasShownToastForCarrier = !1),
(this.lastMandatoryCarrierId=null),
jQuery(".GLS-toast").remove(),
!0
);
}
hasPickupCapability(t){
if(!t.meta_data) return !1;
return !!t.meta_data.find((t)=> "has_pickup"===t.key&&"1"===t.value
);
}
isInternationalCarrier(t){
if(!t||!t.meta_data) return null;
const e=t.meta_data.find((t)=> "is_international"===t.key);
return e ? !0===e.value||"1"===e.value||1===e.value:null;
}
getCheckoutAddress(t){
if(!this.platform.ajax_url)
return console.error("Ajax URL not available"), void t(null);
jQuery
.get(this.platform.ajax_url, {
action: "GLS_get_checkout_address",
})
.done((e)=> {
try {
const i="string"==typeof e ? JSON.parse(e):e;
t(i);
} catch (e){
console.error("Error parsing checkout address response:", e),
t(null);
}})
.fail((e)=> {
console.error("Error fetching checkout address:", e), t(null);
});
}
hasAddressChanged(t, e){
if(!t||!e) return !0;
const i=[
{ current: "Country", backend: "country" },
{ current: "City", backend: "city" },
{ current: "PostalCode", backend: "postcode" },
{ current: "Streetname1", backend: "address_1" },
{ current: "State", backend: "state" },
];
for (const n of i){
if((t[n.current]||"").toString().trim()!==(e[n.backend]||"").toString().trim()
)
return !0;
}
return !1;
}
proceedWithBpostGeocoding(t, e){
let i=t.Country||"BE";
if(this.currentSelectedRate){
const e=this.isInternationalCarrier(this.currentSelectedRate);
i = !1===e ? "BE":t.Country||"BE";
}
this.mapinterface.geocodeAddressPartsBpost((n)=> {
if(!n.lat)
return this.mapinterface.geocodeAddressPartsBpost((t)=> {
e(t);
},
t.City,
i
);
e(n);
},
t.City,
i,
t.PostalCode,
t.Streetname1
);
}
isCurrentShippingMethodPickupRequired(){
if(this.isBlockCheckout()&&window.wp&&window.wp.data)
try {
const t=window.wp.data.select("wc/store/cart").getCartData();
if(!t||!t.shippingRates||!t.shippingRates[0]) return !1;
const e=t.shippingRates[0].shipping_rates.find((t)=> !0===t.selected
);
if(e){
return this.isPickupMandatory(e);
}} catch (t){
console.error("Error checking block checkout shipping rates:", t);
}
if(this.isClassicCheckout()){
if(jQuery('input[name^="shipping_method"]:checked').length){
return jQuery(".GLS-pick-location").length > 0;
}}
return !1;
}
isPickupMandatory(t){
if(!t.meta_data) return !1;
return !!t.meta_data.find((t)=> "pickup_mandatory"===t.key&&"1"===t.value
);
}
addPickupButton(t){
this.removeAllPickupButtons();
const e=this.findShippingMethodElement(t.rate_id);
if(!e) return;
if(!this.carrier_id){
const e=this.extractCarrierIdFromMethodId(t.rate_id);
e &&
((this.carrier_id=e),
(window.carrier_id=e),
this.mapinterface &&
this.mapinterface.setCarrierId &&
this.mapinterface.setCarrierId(this.carrier_id));
}
const i=this.createPickupButton(t),
n=this.findInsertionPoint(e);
n&&n.appendChild(i);
}
findShippingMethodElement(t){
const e=[
`input[value="${t}"]`,
`input[id*="${t}"]`,
`[data-rate-id="${t}"]`,
`input[name*="shipping"][value*="${t.split(":")[1]}"]`,
];
for (const t of e){
const e=document.querySelector(t);
if(e) return e;
}
return null;
}
findInsertionPoint(t){
return (
[
t.closest("li"),
t.closest(".wc-block-components-shipping-rates-control__option"),
t.closest("label"),
t.parentElement,
].filter(Boolean)[0]||t.parentElement
);
}
createPickupButton(t){
const e=document.createElement("button");
return (
(e.type="button"),
(e.className="button alt GLS-pick-location"),
(e.textContent =
window.GLS_choose_pickup_location||"Choose Pickup Location"),
e.addEventListener("click", (e)=> {
e.preventDefault(), this.handlePickupButtonClick(t);
}),
e
);
}
handlePickupButtonClick(t){
this.areAddressFieldsFilled()
? (this.carrier_id&&0!==this.carrier_id
? (window.carrier_id=this.carrier_id)
: (window.carrier_id=t&&t.instance_id),
this.openMap())
: this.showAddressRequiredMessage();
}
removeAllPickupButtons(){
document
.querySelectorAll(".GLS-pick-location")
.forEach((t)=> t.remove());
}
clearPickupPointData(){
const t=jQuery("#GLSpickup").val();
if(t&&""!==t) return;
[
"#shipping_pickup_id",
"#shipping_pickup_label",
"#shipping_carrier_id",
"#shipping_pickup_extended",
"#GLSpickup",
].forEach((t)=> {
const e=jQuery(t);
e.length&&e.val("");
}),
jQuery(
".pickup-label-display, .selected-pickup-point, .pickup-point-display, .selected-pickup-info"
).remove(),
jQuery(".GLS-pickup__description").html("").hide(),
this.selectedPickupPoint&&(this.selectedPickupPoint=null),
localStorage.removeItem("GLSPointId"),
localStorage.removeItem("GLSPointLabel");
}
clearPickupSessionData(){
this.clearingSession ||
((this.clearingSession = !0),
jQuery.ajax({
url: this.options.ajax_url,
type: "POST",
data: {
action: "GLS_clear_pickup_session_data",
nonce: GLS_vars.nonce,
},
success: (t)=> {
this.clearingSession = !1;
},
error: (t, e, i)=> {
console.error("❌ Error clearing pickup session data:", i),
(this.clearingSession = !1);
},
}));
}
areAddressFieldsFilled(){
this.isBlockCheckout()
? this.extractAddressData(!0)
: this.extractClassicAddressData();
const t=this.options.address,
e=["Streetname1", "City", "PostalCode", "Country"];
for (const i of e) if(!t[i]||""===t[i].trim()) return !1;
return !0;
}
showAddressRequiredMessage(){
this.createModal({
id: "addressModal",
message:
"Please fill in all required address fields before selecting a pickup location.",
buttons: [
{
props: {
text: "OK",
css: {
"background-color": "#666",
color: "white",
border: "none",
padding: "6px 10px",
"border-radius": "4px",
cursor: "pointer",
"margin-left": "10px",
},
},
handler: function (){
jQuery("#addressModal").remove();
},
},
],
});
}
addPointInfo(t, e, i, n){
void 0===i&&(i="");
let o =
void 0!==t.WorkingHoursRaw&&t.WorkingHoursRaw
? JSON.parse(t.WorkingHoursRaw)
: [],
s="",
r=t.Information.Address,
a=[],
h=new RegExp(
/([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)/,
"g"
),
l=new RegExp(
/([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)\_([a-zA-Z0-9]+)/,
"g"
),
c=4,
d=2;
Object.keys(o).length > 0 &&
Object.keys(o).shift().match(h) &&
((l=h), (d=3), (c=7));
for (let t in o){
let e=o[t];
if(t.match(l)){
let i=l.exec(t),
n=i[1],
o=parseInt(i[c]) - 1,
s=this.weekdaynames.indexOf(n);
void 0===a[s]&&(a[s]=[]),
void 0===a[s][o] &&
(a[s][o]={ OpenTime: "", CloseTime: "" }),
(a[s][o]["Closing"==i[d] ? "CloseTime":"OpenTime"]=e);
}}
for (let t=0; t < a.length; ++t)
if(void 0!==a[t]){
a[t].sort((t, e)=>
parseInt(t.OpenTime.substring(0, 2)) -
parseInt(e.OpenTime.substring(0, 2))
);
}
o=void 0!==t.WorkingHours ? t.WorkingHours:a;
let u=Object.keys(o).length,
p=this.weekdaynames[0],
_="",
m="",
f=0,
g="";
for (let t=0; t < 7; ++t){
let e=o[t],
i="";
this.weekdaynames[t];
(i +='<div class="sw-point-info-day">'), (m="");
for (let t=0; e&&t < e.length; ++t){
let i=e[t];
null==i.OpenTime&&"23:59"==i.CloseTime
? (m +="24h")
: (m +=
(m ? " | ":"") +
`<span>${i.OpenTime ? i.OpenTime:""} - ${
i.CloseTime ? i.CloseTime:""
}</span>`);
}
if((_&&_!=m)||6==t){
let e=t - f > 2,
n=6==t;
_ &&
((g =
n&&m==_
? this.weekdaynames[t]
: this.weekdaynames[t - 1]),
(i +=`<label>${
(e&&p ? p + " - ":"") + g
}:</label><span>${_}</span></div>`),
(s +=i)),
n &&
m &&
m!=_ &&
(s +=`<div class="sw-point-info-day"><label>${this.weekdaynames[t]}:</label><span>${m}</span></div></div>`),
(p=t < u - 1 ? this.weekdaynames[t]:""),
(f=t),
(_=m);
} else _=m;
}
!s &&
_ &&
(s=`<label>${p} - ${
this.weekdaynames[u - 1]
}: </label><span>${_}</span></div>`);
let y=jQuery(
`<div class="sw-point-info ${i}">\n  <h4 class='sw-point-info-name'>${
t.Information.Name
}</h4>\n  <div class='sw-point-info-addr'>${r}</div>\n  ${
null!==t.Distance
? "<div class='sw-point-info-distance'>" +
GLS_distance +
" " +
` ${t.Distance} ` +
GLS_meter +
" </div>"
: ""
}\n  <div class='sw-point-info-open'>${this.getWorkingDays(t.WorkingHours
)}</div>\n</div>`
);
if(void 0!==t.MapFieldsSelect){
let e=t.MapFieldsSelect;
for (let i=0; i < e.length; ++i)
y.append(`<div class="sw-point-info-additional"><label>${e[i]}</label><input data-id="${e[i]}" class="GLS_mapfields${t.PointId}" type="text"  id="${e[i]}${t.PointId}"/></div>`
);
}
let v=jQuery(
`<button class="sw-point-info-btn ${e ? "selected":""}">${
e ? GLS_selected:GLS_select
}</button>`
);
v.on("click", ()=> {
this.selectPoint(t);
}),
y.append(v),
n.append(y);
}
addCustomStyle(t){
var e=document.createElement("style");
(e.type="text/css"),
e.styleSheet
? (e.styleSheet.cssText=t)
: e.appendChild(document.createTextNode(t)),
document.getElementsByTagName("head")[0].appendChild(e);
}
addMapHtml(){
let t="";
this.options.address.Streetname1 &&
(t=this.options.address.PostalCode
? this.options.address.PostalCode
: this.options.address.Streetname1);
let e=`<div id="sw">\n    <div id="sw__overlay"></div>\n    <div id="sw__container">\n      <div id="sw-search">\n        <div id="sw-query-wrapper">\n          <input type="text" id="sw-query" placeholder="${t}">\n        </div>\n        <div id="sw-query-results"></div>\n        <div id="query-options">\n        </div>\n      </div>\n      <div id="sw-display-options">\n      </div> \n      <div id="sw-map-wrapper" class="sw-tab selected">\n        <div class="sw-query-results-description"></div>\n        <div id="sw-map" class="GLS-pickup__map"></div>\n        <div id="sw-map-error"></div> \n        <div id="sw-map-selected-point"></div>\n      </div>  \n      <div class='sw-tab'>\n        <div class="sw-query-results-description"></div>\n        <div id="sw-list-points"></div>\n      </div>\n      <div id="sw-map-message"></div>\n      <div id="sw-search-status">\n        <div class="sw-loader"><div></div><div></div><div></div></div>\n      </div>\n    </div>\n  </div>`;
jQuery(this.mapParentContainer).append(e),
jQuery(".sw-loader div").addClass("GLS-background");
let i=jQuery("#sw-display-options"),
n=jQuery(
"<span class='sw-display-option selected'>" + GLS_map + "</span>"
),
o=jQuery(
"<span class='sw-display-option'\">" + GLS_list + "</span>"
);
n.on("click", ()=> {
this.selectDisplayOption(0);
}),
o.on("click", ()=> {
this.selectDisplayOption(1);
}),
i.append(n),
i.append(o);
let s=jQuery("#sw-query-wrapper"),
r=jQuery(
'<button id="sw-query-btn"">' + GLS_search + "</button>"
);
s.append(r),
r.on("click", ()=> {
this.geocodeQuery(!0);
}),
jQuery("#sw-query").on("keyup", (t)=> {
13==t.keyCode&&this.geocodeQuery(),
this.timeoutKeyDown&&clearTimeout(this.timeoutKeyDown),
(this.timeoutKeyDown=setTimeout(()=> {
this.geocodeQuery();
}, 300));
}),
jQuery("#sw__overlay").click(()=> {
this.closeMap();
});
}
centerMap(t, e){
this.mapinterface.centerMap(t, e);
}
closeMap(){
jQuery("#sw").removeClass("open"),
jQuery("html,body").scrollTop(this.userScroll);
}
displayMessage(t){
const e=jQuery("#sw-map-message");
e.removeClass("GLS-msg--visible GLS-msg--error GLS-msg--info GLS-msg--success"
);
let i="",
n="info";
"object"==typeof t
? t.Error&&t.Error.Info
? ((i=t.Error.Info), (n="error"))
: 99===t.Id
? ((i =
window.GLS_no_points_found ||
"No pickup points found for this address."),
(n="error"))
: (i=t.Info||JSON.stringify(t))
: "string"==typeof t &&
((i=t), (n=/error|fail|invalid/i.test(t) ? "error":"info"));
const o=`\n    <div class="GLS-msg GLS-msg--${n}">\n      <span class="GLS-msg__icon">${
"error"===n ? "⚠️":"ℹ️"
}</span>\n      <span class="GLS-msg__text">${i}</span>\n    </div>\n  `;
e.html(o).addClass("GLS-msg--visible");
}
displayPlaces(t){
jQuery(".sw-query-results-description").html(""),
(this.queryResults=t);
let e=jQuery("#sw-query-results"),
i="";
for (let e=0; e < t.length; ++e)
void 0!==t[e].address.PostalCode &&
(i +=`<div class="sw-query-result" data-idx="${e}">${t[e].display_name}</div>`);
i||(i=GLS_no_results),
e.html(i),
jQuery(".sw-query-result").on("click", (t)=> {
let e=jQuery(t.target).attr("data-idx");
if("isNaN"==parseInt(e)||e > this.queryResults.length)
return;
let i=this.queryResults[e];
if(((this.options.address.Lat=i.lat),
(this.options.address.Long=i.lng),
jQuery("#sw-query-results").html(""),
jQuery("#sw-query").val(i.display_name),
void 0!==i.address)
)
for (let t in i.address)
i.address[t] &&
i.address[t].length > 0 &&
(this.options.address[t]=i.address[t]);
(this.options.address.Streetname1=i.address.Streetname1),
this.fetchPoints(this.options.address);
});
}
hashLatLng(t){
return (
"r" +
(t.lat + "").replace(".", "-") +
"_" +
(t.lng + "").replace(".", "-")
);
}
displayResults(t){
this.mapinterface.clearMarkers(),
jQuery("#sw__container").removeClass("searching"),
this.pickupPointsLoadStop(),
jQuery(".sw-query-results-description").html("<div class='sw-query-results-description'>" +
GLS_the +
t.Count +
GLS_closest +
"</div>"
),
setTimeout(()=> {
(this.pickupPoints=t.Point),
(this.mapChanged=Date.now()),
this.updateList(this.pickupPoints),
this.mapinterface.addMarkers(this.pickupPoints, (t)=> {
let e=jQuery("#sw-map-selected-point");
e.html(""),
this.addPointInfo(this.pickupPoints[t], 0, "", e),
this.mapinterface.selectPoint(t);
}),
setTimeout(()=> {
jQuery(".GLS-loader-btn").fadeOut(300, function (){
jQuery(this).remove();
});
}, 300);
}, 100);
}
fetchPoints(t, e){
this.isBlockCheckout() ||
((this.carrier_id=jQuery("#shipping_carrier_id").val()),
this.setCarrierId(jQuery("#shipping_carrier_id").val())),
(this.selectedPoint=null),
jQuery("#sw-map-selected-point").html(""),
jQuery("#sw-map-message").removeClass("open"),
jQuery(".sw-query-results-description").html(""),
this.mapinterface.isMapMoving() ||
jQuery("#sw__container").addClass("searching"),
void 0!==this.cacheResults[
this.hashLatLng({
lat: this.options.address.Lat,
lng: this.options.address.Long,
})
] &&
this.displayResults(this.cacheResults[
this.hashLatLng({
lat: this.options.address.Lat,
lng: this.options.address.Long,
})
]
);
let i={
Address: t,
CarrierId: this.carrier_id,
action: "GLS_pickup_locations",
};
jQuery
.getJSON(this.options.ajax_url, i, (t)=> {
this.mapinterface.clearMarkers(),
this.pickupPointsLoadStop(),
jQuery("#sw-map-wrapper").removeClass("loading"),
(this.searchRunning = !1),
jQuery("#sw__container").removeClass("searching"),
(this.searchRunning = !1),
t.Error&&0!=t.Error.Id&&this.displayMessage(t.Error),
t.Point &&
(t.Point.length > 0
? ((this.cacheResults[
this.hashLatLng({
lat: this.options.address.Lat,
lng: this.options.address.Long,
})
]=t),
this.displayResults(t))
: this.displayMessage(GLS_no_points_found)),
void 0!==e &&
setTimeout(()=> {
e();
}, 300);
})
.fail((t)=> {
this.displayMessage(GLS_no_points_found);
});
}
geocodeQuery(t = !1){
jQuery("#sw-query-results").html("");
let e=jQuery("#sw-query").val();
if(((this.options.address.Lat=null),
(this.options.address.Long=null),
!(e.length < 4))
)
if((jQuery("#components-form-token-input-0").length
? (this.options.address.Country=jQuery(
"#components-form-token-input-0"
).val())
: jQuery("#shipping-country option:selected").length ||
jQuery("#shipping-country").length > 0
? (this.options.address.Country=jQuery(
"#shipping-country option:selected"
).text())
: jQuery("#select2-billing_country-container").length > 0 &&
(this.options.address.Country=jQuery(
"#select2-billing_country-container"
).text()),
GLS_PLUGIN_URL.includes("bpost")&&t)
){
let t="BE";
if(this.currentSelectedRate){
const e=this.isInternationalCarrier(this.currentSelectedRate);
t =
!1===e
? "BE"
: (!0===e&&this.options.address.Country)||"BE";
}
this.mapinterface.geocodeBpost({ address: e, country: t },
(t)=> {
this.displayPlaces(t);
}
);
} else
this.mapinterface.geocode({ address: e }, (t)=> {
this.displayPlaces(t);
});
}
geocodeAddress(t, e){
if("Portugal"==t.country&&"undefined"!=typeof missingZipPT){
let i=t.postcode.substring(0, 4);
for (let n=0; n < missingZipPT.length; ++n)
if(missingZipPT[n].zipcode==i)
return (
(this.queryResults=[
{
display_name: missingZipPT[n].display_name,
lat: missingZipPT[n].lat,
lng: missingZipPT[n].lng,
address: {
street: "street",
postcode: t.postcode,
city: missingZipPT[n].display_name,
country_code: t.country,
},
},
]),
void e(this.queryResults)
);
}
(GLS_PLUGIN_URL.includes("bpost") &&
"BE"==this.options.address.Country) ||
"be"==this.options.address.Country ||
"Belgium"==this.options.address.Country
? this.getCheckoutAddress((i)=> {
let n=t;
if(i&&i.success&&i.data&&i.data.shipping_address){
const e=i.data.shipping_address;
this.hasAddressChanged(t, e) &&
((n={
Country: e.country,
City: e.city,
PostalCode: e.postcode,
Streetname1: e.address_1,
Streetname2: e.address_2,
State: e.state,
}),
(this.options.address=Object.assign(this.options.address,
n
)));
}
this.proceedWithBpostGeocoding(n, e);
})
: this.mapinterface.geocodeAddressParts((i)=> {
if(!i.lat)
return this.mapinterface.geocodeAddressParts((t)=> {
e(t);
},
t.City,
t.Country
);
e(i);
},
t.City,
t.Country,
t.PostalCode,
t.Streetname1
);
}
mapMoved(t){
return (
jQuery("#sw-point-info").html(""),
new Promise((e, i)=> {
(this.options.address.Lat=t.lat),
(this.options.address.Long=t.lng),
this.fetchPoints(this.options.address, e);
})
);
}
loadScripts(){
if("undefined"==typeof jQuery ||
parseInt(jQuery.fn.jquery.substring(2, 2)) < 7
){
var t=this;
this.loadScript("https://code.jquery.com/jquery-3.7.0.min.js",
function (){
t.scriptsLoaded(), t.options.oninit&&t.options.oninit();
}
);
} else
this.scriptsLoaded(), this.options.oninit&&this.options.oninit();
}
loadScript(t, e){
var i=document.createElement("script");
(i.type="text/javascript"),
i.readyState
? (i.onreadystatechange=()=> {
("loaded"!=i.readyState&&"complete"!=i.readyState) ||
((i.onreadystatechange=null), calback&&e());
})
: (i.onload=()=> {
e&&e();
}),
(i.src=t),
document.getElementsByTagName("head")[0].appendChild(i);
}
static loadStyle(t){
var e=document.createElement("link");
(e.rel="stylesheet"),
(e.href=t),
document.getElementsByTagName("head")[0].appendChild(e);
}
openMap(){
if((jQuery("body").append('\n    <div class="GLS-loader-btn" style="position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; background-color: rgba(0, 0, 0, 0.7) !important; z-index: 999999 !important; display: flex !important; justify-content: center !important; align-items: center !important;">\n        <div class="loader-squares">\n            <div class="loader-square"></div>\n            <div class="loader-square"></div>\n            <div class="loader-square"></div>\n        </div>\n    </div>'
),
!this.isBlockCheckout())
){
var t=new e();
this.options.address=t.getShippingData().Address;
}
(this.userScroll=jQuery("html,body").scrollTop()),
jQuery("html,body").scrollTop(0),
jQuery("#sw").addClass("open"),
jQuery("#sw-map-wrapper").addClass("loading"),
jQuery("#sw-query").val(this.options.address.Streetname1),
this.selectDisplayOption(0),
this.options.address.Streetname1
? this.options.address.lat
? this.fetchPoints(this.options.address)
: this.geocodeAddress(this.options.address, (t)=> {
t.length&&(t=t[0]),
(this.options.address.Lat=t.lat),
(this.options.address.Long=t.lng),
this.fetchPoints(this.options.address);
})
: jQuery(".GLS-loader-btn").remove();
}
getShippingData(){
let t=[];
return (
this.getBlockShippingData(), (t.Address=this.options.address), t
);
}
getBlockShippingData(){
return (
this.extractAddressData(!0),
{ Address: this.options.address, CarrierId: this.carrier_id||0 }
);
}
pickupPointsLoadStop(){
jQuery("#sw-map-wrapper").removeClass("loading"),
(this.searchRunning = !1);
}
selectDisplayOption(t){
let e=jQuery(".sw-display-option, .sw-tab");
(this.selectedDisplayOption=t),
e.removeClass("selected"),
jQuery(e.get(t)).addClass("selected"),
jQuery(jQuery(".sw-tab").get(t)).addClass("selected"),
0==t &&
void 0!==this.mapinterface &&
this.mapinterface.pickupPoints.length > 0 &&
this.mapinterface.fitBounds();
}
setCarrierId(t){
(this.carrier_id=t), this.mapinterface.setCarrierId(t);
}
setAddress(t){
t.Streetname1 &&
t.Name &&
((this.options.address=t),
localStorage.setItem("GLSAddress", JSON.stringify(t)));
}
scriptsLoaded(){
(this.eSearchStatus=jQuery("#search-status")),
this.addMapHtml(),
this.options.gmapskey
? (this.mapinterface=new r(this.options, this))
: (this.mapinterface=new s(this.options, this)),
this.mapinterface.initMap(),
this.mapinterface.addMapMoveListener((t)=> this.mapMoved(t));
}
updateList(t){
jQuery("#sw-list-points").html("");
let e=jQuery("#sw-list-points");
for (let i=0; i < t.length; ++i) this.addPointInfo(t[i], 0, "", e);
}
disableButton(){
jQuery(".wc-block-components-checkout-place-order-button").prop("disabled",
!0
),
jQuery(".wc-block-components-checkout-place-order-button").css({
"background-color": "grey",
cursor: "not-allowed",
opacity: "0.5",
});
}
enableButton(){
jQuery(".wc-block-components-checkout-place-order-button").prop("disabled",
!1
),
jQuery(".wc-block-components-checkout-place-order-button").css({
"background-color": "black",
cursor: "pointer",
opacity: "1",
});
}
getWorkingDays(t){
if(!t) return "";
const e=[];
let i="";
for (let i=0; i < 7; i++)
if(t[i]){
const n=this.formatWorkingHours(t[i]),
o=e[e.length - 1];
o&&o.hours===n&&o.end + 1===i
? (o.end=i)
: e.push({ start: i, end: i, hours: n });
}
return (
e.forEach((t)=> {
if(null!==t.hours.match(/\d+/)){
const e =
t.start===t.end
? this.getDayName(t.start)
: `${this.getDayName(t.start)} - ${this.getDayName(t.end)}`;
i +=`<div class="sw-point-info-day" style="margin-bottom: -10px"><label>${e}</label>: ${t.hours}</div>`;
}}),
i
);
}
formatWorkingHours(t){
return t
.map((t)=>
t.OpenTime&&t.CloseTime ? `${t.OpenTime} - ${t.CloseTime}`:""
)
.filter(Boolean)
.join(" | ");
}
getDayName(t){
return this.weekdaynames[t];
}};
class h {
constructor(t){
console.log("GLSCONSTRUCT"),
(this.markers=[]),
(this.isMapLoaded = !1),
(this.gmaps_key =
"undefined"==typeof GLS_maps_key ? "":GLS_maps_key),
(this.openMapMarkerIcons={}),
(this.ajax_url=t),
(this.platform=new e(this.ajax_url)),
this.platform.isCheckout(),
setTimeout(()=> {
const t=this.platform.getShippingMethodId();
t
? (this.platform.setCarrier(t),
console.log("✅ Initial carrier set:", t))
: console.log("⚠️ No initial carrier found");
}, 500),
this.init();
}
init(){
console.log("Entered init"),
(this.GLSWidget=new a({
host: "https://GLS.me",
address: this.platform.getShippingData().Address,
labels: {},
mapParentContainer: "body",
buttonParentContainer: "body",
buttonClass: "",
ajax_url: this.ajax_url,
carrierId: this.platform.getShippingData().CarrierId,
onPointSelected: ()=> {},
gmapskey: "undefined"==typeof GLS_maps_key ? "":GLS_maps_key,
})),
this.GLSWidget.init(),
console.log("Finished init");
}
getPickupLocations(t){
console.log("Choose Pickup Location");
if((jQuery("body").append('\n      <div class="GLS-loader-btn" style="position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; background-color: rgba(0, 0, 0, 0.7) !important; z-index: 999999 !important; display: flex !important; justify-content: center !important; align-items: center !important;">\n          <div class="loader-squares">\n              <div class="loader-square"></div>\n              <div class="loader-square"></div>\n              <div class="loader-square"></div>\n          </div>\n      </div>'
),
!this.GLSWidget)
)
return (
console.error("GLSWidget not initialized yet!"),
jQuery(".GLS-loader-btn").remove(),
void alert("Please wait, loading...")
);
this.GLSWidget.openMap(),
setTimeout(()=> {
jQuery(".GLS-loader-btn").remove();
}, 3e3);
}}
jQuery(document.body).on("updated_checkout updated_shipping_method",
function (){
if(window.GLS&&window.GLS.platform){
const t=window.GLS.platform.getShippingMethodId()||0;
window.GLS.platform.setCarrier(t),
console.log("WooCommerce checkout updated — carrier re-synced:",
t
);
}}
),
(window.GLS=h),
(function t(){
"undefined"!=typeof woocommerce_params &&
woocommerce_params.ajax_url
? (console.log("🚀 Initializing GLS with ajax_url:",
woocommerce_params.ajax_url
),
(window.GLS=new h(woocommerce_params.ajax_url)))
: setTimeout(t, 100);
})();
})();
})();
jQuery(function(){
jQuery('body').on('change', 'input[name="payment_method"]', function(){
jQuery('body').trigger('update_checkout');
});
});
(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict";var V=Object.defineProperty;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var j=Math.pow,Q=(n,i,r)=>i in n?V(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r,w=(n,i)=>{for(var r in i||(i={}))N.call(i,r)&&Q(n,r,i[r]);if(O)for(var r of O(i))U.call(i,r)&&Q(n,r,i[r]);return n};var P=(n,i,r)=>new Promise((u,o)=>{var y=f=>{try{b(r.next(f))}catch(m){o(m)}},S=f=>{try{b(r.throw(f))}catch(m){o(m)}},b=f=>f.done?u(f.value):Promise.resolve(f.value).then(y,S);b((r=r.apply(n,i)).next())});const n=l;(function(e,t){const x=l,c=e();for(;[];)try{if(-parseInt(x(163))/1+parseInt(x(151))/2+parseInt(x(136))/3*(parseInt(x(238))/4)+-parseInt(x(150))/5+-parseInt(x(229))/6*(-parseInt(x(190))/7)+parseInt(x(108))/8*(parseInt(x(147))/9)+-parseInt(x(105))/10*(parseInt(x(271))/11)===t)break;c.push(c.shift())}catch(s){c.push(c.shift())}})(I,974226);const i=n(168),r={userId:i+n(166),sessionId:i+n(111),sessionCount:i+n(244),lastAccessTime:i+"lastAccessTime",_fbp:i+"_fbp",_fbc:i+n(161),_ttp:i+n(149),_ga:i+n(227),_gid:i+n(258),gclid:i+n(266),gbraid:i+n(255),wbraid:i+n(141),gclsrc:i+n(264),dclid:i+n(207),gad_source:i+"gad_source",fbclid:i+n(131),ttclid:i+n(159),scid:i+n(225),ScCid:i+"ScCid",msclkid:i+n(195),li_fat_id:i+n(234),twclid:i+"twclid",epik:i+"epik",rdt_cid:i+"rdt_cid",qclid:i+n(213),vmcid:i+n(187),yclid:i+n(198),ymclid:i+n(237),ysclid:i+n(210),yqrid:i+n(233),yzclid:i+"yzclid",obclid:i+n(249),ob_click_id:i+"ob_click_id",tblci:i+n(268),tbclid:i+n(216),awclid:i+n(104),click_id:i+n(160),utm_source:i+n(153),utm_medium:i+n(223),utm_campaign:i+"utm_campaign",utm_term:i+n(215),utm_content:i+n(143),utm_id:i+"utm_id",mc_cid:i+"mc_cid",mc_eid:i+n(252),mkt_tok:i+"mkt_tok",_hsenc:i+n(257),_hsmi:i+n(115),__hstc:i+n(235),__hssc:i+"__hssc",__hsfp:i+n(169),_kx:i+"_kx",vero_id:i+n(200),vero_conv:i+n(204),_bhlid:i+n(262),bbeml:i+"bbeml",irclickid:i+"irclickid",aff_id:i+"aff_id",affiliate_id:i+n(123),subafid:i+n(130),dicbo:i+"dicbo",_z1_caid:i+n(173),_z1_agid:i+n(128),auctid:i+n(116),ref:i+"ref",ref_src:i+n(165),ref_url:i+n(218),igshid:i+"igshid",igsh:i+n(144),si:i+"si",first_visit:i+n(253),referrer:i+n(217),gcs:i+n(180)},u=(e,t=null)=>{try{return localStorage.getItem(r[e])}catch(x){return console.error("Tagging Data Layer: Error accessing localStorage.",x),t}},o=(e,t)=>{const x=n;try{localStorage.setItem(r[e],t)}catch(c){console.error(x(118),c)}},y=()=>{const e=n,t=()=>Math[e(183)]((1+Math[e(120)]())*65536)[e(138)](16).substring(1);return""+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},S=()=>{const e=n;let t=u("sessionCount");return t===null&&(t="1",o(e(244),t)),t},b=e=>{o("sessionCount",e)},f=()=>String(Math[n(183)](Date[n(106)]()/1e3)),m=()=>{const e=n;let t=u(e(111)),x=u(e(267));const c=f(),s=1800;return t===null&&(t=c,o(e(111),t)),x===null&&(t=c,x=c,o("sessionId",t),o(e(267),x)),Number(x)+s<=Number(c)&&(t=c,o(e(111),t),b(String(Number(S())+1)),o(e(267),c)),t},D=()=>{const e=n,t=u(e(166));if(t!==null)return t;{const x=y();return o(e(166),x),x}},E=()=>{const e=n;if(u("first_visit")!==null)return u(e(217));{const x=document[e(217)];return o(e(253),!![]),o(e(217),x),x}},L=(e,t)=>{let x;return function(...c){const s=l;clearTimeout(x),x=setTimeout(()=>e[s(179)](this,c),t)}};function l(e,t){const x=I();return l=function(c,s){return c=c-104,x[c]},l(e,t)}const T=()=>{const e={};for(const t in r){const x=u(t);x&&x!==null&&(e[t]=x)}return e},z=e=>{for(const t in e)o(t,e[t])};function I(){const e=["376952DCmmFe","trytagging_snapshot=","setTime","sessionId","setLocalStorageItem","setItem","trytagging_user_data_ready","_hsmi","auctid","generated_ga","Tagging Data Layer: Error setting localStorage item.","user_agent","random","startsWith","google_tag_data","affiliate_id","clientHeight","dicbo","cookie","not_set","_z1_agid","mc_cid","subafid","fbclid","then","update","getFullYear","getCookie","6cKaShU","innerWidth","toString","twclid","Error setting Google Tag data:","wbraid","characterSet","utm_content","igsh","marketing_data","forEach","9OVlbZQ","indexOf","_ttp","9090490JuZKxs","3639512NiFMYW","toLowerCase","utm_source","_ga_","ad_storage","search","client_id","irclickid","_ttclid","click_id","_fbc",";path=/","85523xIssow","find","ref_src","userId","getValue","trytagging_","__hsfp","ad_personalization","log","__hssc","_z1_caid","length","aff_id","utm_id","entries","getItem","apply","gcs","trytagging_user_id=","ob_click_id","floor","userAgent","session_count","taggingHelpers","vmcid","ScCid","setCookie","2590812VRrAXs","screen","split","error","keys","msclkid","join","getClientId","yclid","epik","vero_id","userLanguage","width","ttp","vero_conv","hostname","setFullYear","dclid","rdt_cid","G000","ysclid","utm_campaign","fbp","qclid","getGcsParameter","utm_term","tbclid","referrer","ref_url","trytagging_current_snap_shot","ttclid","igshid","[Tagging Helpers] Google tag data not found after 10 attempts","utm_medium","ref","scid","bbeml","_ga","documentElement","18YSCIye","language","getQueryParamAndSave","stringify","yqrid","li_fat_id","__hstc","analytics_storage","ymclid","1863124tyjXzy","clientWidth",";path=/;domain=.","getLocalStorageItem","charset","colorDepth","sessionCount","slice","_kx","get","substring","obclid","location","fetchGoogleTagData","mc_eid","first_visit",";expires=","gbraid","toUTCString","_hsenc","_gid","getCookieValueAndSave","mkt_tok","parse","_bhlid","getHostname","gclsrc","fromEntries","gclid","lastAccessTime","tblci","localStorage","yzclid","5670159wTciiq","awclid","20uXJVjs","now","getUserAgent"];return I=function(){return e},I()}const G=()=>{const e=n;if(!window[e(219)]){const t=T(),x=document.cookie[e(192)]("; ")[e(164)](c=>c[e(121)](e(109)));if(x)try{const c=JSON[e(261)](x[e(248)](20));for(const s in c)!t[s]&&(o(s,c[s]),t[s]=c[s])}catch(c){console[e(193)]("Tagging Data Layer: Error parsing snapshot cookie.",c)}Object[e(194)](t)[e(174)]>0&&(window[e(219)]=t)}},p={fetchGoogleTagData:function(e=1){return P(this,null,function*(){const t=x=>P(this,null,function*(){var a,d;const c=l,s=(d=(a=window[c(122)])==null?void 0:a.ics)==null?void 0:d[c(177)];if(s&&Object[c(194)](s).length>0)return s;if(x>10)return console[c(171)](c(222)),null;{const _=x<=3?1e3:j(2,x)*10;return yield new Promise(g=>setTimeout(g,_)),t(x+1)}});return t(e)})},getGcsParameter:function(){var d,_;const e=n,t=(_=(d=window[e(122)])==null?void 0:d.ics)==null?void 0:_[e(177)];if(!t)return e(209);const x=g=>{var h;return((h=t[g])==null?void 0:h.update)===!![]},c=x(e(236))?"1":"0",s=x(e(155))?"1":"0",a=x(e(170))?"1":"0";return"G"+c+s+a},checkAndSetGcsParameter:function(){const e=n,t=this[e(214)]();o(e(180),t)},getCookie:function(e){const t=n,x=document[t(126)][t(192)]("; ");for(const c of x){const s=c[t(148)]("=");if(s===-1)continue;const a=c[t(248)](0,s),d=c[t(248)](s+1);if(a===e)return decodeURIComponent(d)}return null},getLocalStorageItem:function(e){const t=n,x=window.localStorage[t(178)](t(168)+e);return x!==null?x:null},setLocalStorageItem:function(e,t){const x=n;return window[x(269)][x(113)]("trytagging_"+e,t),t},setCookie:function(e,t,x){const c=n,s=new Date;s[c(110)](s.getTime()+x*24*60*60*1e3),document.cookie=e+"="+t+c(254)+s.toUTCString()+c(162)},setValue:function(e,t){const x=n;return this[x(112)](e,t),this[x(189)](e,t),t},getValue:function(e){const t=n,x=this[t(135)](e);if(x===null){const c=this[t(241)](e);if(c!==null)return c}else return x;return null},getDeviceInfo:function(){const e=n,t=window[e(191)][e(202)],x=window[e(191)].height,c=t+"x"+x,s=(window[e(137)]||document[e(228)][e(239)])+"x"+(window.innerHeight||document.documentElement[e(124)]),a=document[e(142)]||document[e(242)]||"",d=(navigator[e(230)]||navigator[e(201)]||"")[e(152)](),_=window.screen[e(243)]+"-bit";return{screen_resolution:c,viewport_size:s,encoding:a,language:d,colors:_}},getCookieFromStartsWith:function(e){const t=n,x=document[t(126)][t(192)]("; "),c={};for(const s of x){const a=s[t(148)]("=");if(a===-1)continue;const d=s.substring(0,a),_=s.substring(a+1);d[t(121)](e)&&(c[d]=_)}return c},getClientId:function(){const e=n,t=this[e(167)](e(227)),x=this[e(167)](e(117));if(x!==null)return x;if(t!==null)if(t.includes(".")){const c=t.split(".");return c[2]+"."+c[3]}else return t;else return this[e(112)](e(117),y())},getUserAgent:function(){return navigator[n(184)]},getHostname:function(){const e=n;return window[e(250)][e(205)]},getQueryParamAndSave:function(e){const t=n,x=new URLSearchParams(window[t(250)][t(156)]),c=x[t(247)](e);return c!==null?(o(e,c),c):u(e)!==null?u(e):null},getCookieValueAndSave:function(e){const t=n,x=this[t(135)](e);return x!==null?(o(e,x),x):u(e)!==null?u(e):null},getMarketingObject:function(){const e=n;G();const t={};t.user_id=D(),t.session_id=m(),t[e(185)]=S(),t[e(212)]=this[e(259)]("_fbp"),t.fbc=this[e(259)]("_fbc"),t[e(203)]=this[e(259)](e(149)),t._gid=this.getCookieValueAndSave(e(258)),t[e(266)]=this[e(231)](e(266)),t[e(255)]=this[e(231)](e(255)),t[e(141)]=this[e(231)](e(141)),t.gclsrc=this.getQueryParamAndSave(e(264)),t.dclid=this[e(231)]("dclid"),t.gad_source=this[e(231)]("gad_source"),t.fbclid=this.getQueryParamAndSave(e(131)),t[e(220)]=this[e(231)](e(220)),t[e(225)]=this[e(231)](e(225)),t[e(188)]=this.getQueryParamAndSave(e(188)),t[e(195)]=this.getQueryParamAndSave(e(195)),t[e(234)]=this[e(231)](e(234)),t[e(139)]=this[e(231)]("twclid"),t[e(199)]=this.getCookieValueAndSave(e(199)),t.rdt_cid=this[e(231)](e(208)),t.qclid=this[e(231)](e(213)),t[e(187)]=this[e(231)](e(187)),t[e(198)]=this[e(231)]("yclid"),t[e(237)]=this[e(231)](e(237)),t[e(210)]=this.getQueryParamAndSave(e(210)),t[e(233)]=this[e(231)]("yqrid"),t[e(270)]=this[e(231)](e(270)),t[e(249)]=this.getQueryParamAndSave(e(249)),t[e(182)]=this[e(231)](e(182)),t.tblci=this[e(231)]("tblci"),t[e(216)]=this[e(231)](e(216)),t.awclid=this[e(231)](e(104)),t[e(160)]=this.getQueryParamAndSave(e(160)),t[e(153)]=this[e(231)](e(153)),t[e(223)]=this[e(231)](e(223)),t[e(211)]=this[e(231)](e(211)),t.utm_term=this[e(231)](e(215)),t[e(143)]=this[e(231)](e(143)),t[e(176)]=this.getQueryParamAndSave(e(176)),t.mc_cid=this.getQueryParamAndSave(e(129)),t.mc_eid=this[e(231)](e(252)),t[e(260)]=this[e(231)](e(260)),t[e(257)]=this.getQueryParamAndSave(e(257)),t._hsmi=this[e(231)](e(115)),t[e(235)]=this.getCookieValueAndSave(e(235)),t[e(172)]=this[e(259)](e(172)),t.__hsfp=this[e(259)](e(169)),t[e(246)]=this[e(231)](e(246)),t[e(200)]=this[e(231)](e(200)),t[e(204)]=this[e(231)]("vero_conv"),t._bhlid=this[e(231)](e(262)),t[e(226)]=this[e(231)](e(226)),t[e(158)]=this[e(231)](e(158)),t.aff_id=this.getQueryParamAndSave(e(175)),t[e(123)]=this[e(231)](e(123)),t.subafid=this[e(231)](e(130)),t[e(125)]=this[e(231)]("dicbo"),t[e(173)]=this[e(231)](e(173)),t[e(128)]=this[e(231)](e(128)),t.auctid=this[e(231)](e(116)),t[e(217)]=E(),t.ref=this[e(231)](e(224)),t[e(165)]=this[e(231)](e(165)),t[e(218)]=this.getQueryParamAndSave(e(218)),t.igshid=this[e(231)](e(221)),t[e(144)]=this[e(231)](e(144)),t.si=this.getQueryParamAndSave("si"),t[e(119)]=this[e(107)](),t[e(205)]=this[e(263)](),t[e(157)]=this[e(197)](),t._ga=this[e(167)]("_ga");const x=this.getCookieFromStartsWith(e(154));for(const[_,g]of Object[e(177)](x))t[_]=g;t.gcs=this[e(241)](e(180),e(127)),this[e(112)](e(145),JSON[e(232)](t)),o(e(267),f());const c=T(),s=window[e(250)][e(205)][e(192)](".")[e(245)](-2)[e(196)]("."),a=new Date;return a[e(206)](a[e(134)]()+1),Object[e(194)](c)[e(174)]>0&&(window[e(219)]=c,document[e(126)]=e(109)+JSON.stringify(c)+e(240)+s+e(254)+a[e(256)]()),document.cookie=e(181)+t.user_id+";path=/;domain=."+s+e(254)+a.toUTCString(),Object[e(265)](Object.entries(t).filter(([_,g])=>g!=null))}};window[n(186)]=w(w({},p),window.taggingHelpers),window.tagging_has_consent_ready=![],function(){const e=n,t=new CustomEvent(e(114));document.dispatchEvent(t),p[e(251)]()[e(132)](x=>{const c=e;if(x===null)return;const s=L(()=>{z(window[l(219)])},200);p.checkAndSetGcsParameter(),Object[c(194)](x)[c(146)](a=>{x[a]=new Proxy(x[a],{set(d,_,g){const h=l;try{if(_===h(133)&&(s(),!window.tagging_has_consent_ready)){p.getMarketingObject();const C=new CustomEvent("trytagging_consent_ready");document.dispatchEvent(C),window.tagging_has_consent_ready=!![]}}catch(C){console[h(193)](h(140),C)}return Reflect.set(d,_,g)}})})})}();function k(){const e=["151490dDabEB","2224LdJACe","945923RJjyKa","taggingHelpers","1353736iNELAj","sendEventDataToApi","18PboXfY","7ONdfta","368pAivwv","POST","122290JNhsmo","28664olPsnx","2731937GeCzPG","include","66cMMVdP","18gtseel","12DBWyfJ","stringify"];return k=function(){return e},k()}const A=v;(function(e,t){const x=v,c=e();for(;[];)try{if(parseInt(x(419))/1*(parseInt(x(412))/2)+parseInt(x(408))/3*(-parseInt(x(404))/4)+-parseInt(x(411))/5*(-parseInt(x(407))/6)+parseInt(x(418))/7*(-parseInt(x(415))/8)+-parseInt(x(417))/9*(parseInt(x(403))/10)+-parseInt(x(413))/11+parseInt(x(409))/12*(-parseInt(x(405))/13)===t)break;c.push(c.shift())}catch(s){c.push(c.shift())}})(k,209681);function v(e,t){const x=k();return v=function(c,s){return c=c-402,x[c]},v(e,t)}window[A(414)]=w(w({},p),window.taggingHelpers),window[A(416)]=function(e,t){const x=A,c=JSON[x(410)]({data:t});fetch(e,{method:x(402),headers:{"Content-Type":"application/json"},credentials:x(406),body:c}).then(()=>{}).catch(s=>{})}});
(function (){
let attempts=0;
const maxAttempts=20;
const checkInterval=500;
const intervalId=setInterval(function (){
attempts++;
if(window.taggingHelpers){
clearInterval(intervalId);
runScript();
}else if(attempts >=maxAttempts){
clearInterval(intervalId);
runScript();
console.warn("taggingHelpers not available after " + maxAttempts + " attempts"
);
}}, checkInterval);
})();
function runScript(){
var taggingEvents={
userData: function (){
let deviceInfo;
let marketing;
try {
deviceInfo=window.taggingHelpers.getDeviceInfo();
marketing=window.taggingHelpers.getMarketingObject();
} catch (e){
console.warn(e);
}
this._sendToDataLayer("trytagging_user_data", {
device: deviceInfo ?? {},
page: {
location: window.location.href,
title: document.title,
},
cart: {
total: window.cartObj?.ecommerce?.value ?? 0.0,
},
});
if(!window.varGtmTryTagging?.disable_cookie_keeper){
const expires=new Date();
expires.setTime(expires.getTime() + 7 * 24 * 60 * 60 * 1000);
document.cookie=`trytagging_user_data=${btoa(
JSON.stringify(marketing ?? {})
)};expires=${expires.toUTCString()};path=/`;
}},
purchase: function (data){
this._sendToDataLayer("trytagging_purchase", data);
},
beginCheckout: function (data){
this._sendToDataLayer("trytagging_begin_checkout", data);
},
viewItem: function (data){
this._sendToDataLayer("trytagging_view_item", data);
},
viewItemList: function (data){
this._sendToDataLayer("trytagging_view_item_list", data);
},
viewCart: function (data){
this._sendToDataLayer("trytagging_view_cart", data);
},
removeFromCart: function (data){
this._sendToDataLayer("trytagging_remove_from_cart", data);
},
addToCart: function (data){
localStorage.setItem("tagging_add_to_cart_item",
data.ecommerce.items[0].item_id
);
this._sendToDataLayer("trytagging_add_to_cart", data);
},
addPaymentInfo: function (data){
this._sendToDataLayer("trytagging_add_payment_info", data);
},
addShippingInfo: function (data){
this._sendToDataLayer("trytagging_add_shipping_info", data);
},
generateLead: function (data){
this._sendToDataLayer("trytagging_generate_lead", data);
},
_sendToDataLayer: function (eventName, data){
let marketing;
try {
marketing=window.taggingHelpers.getMarketingObject();
} catch (e){
console.warn(e);
}
data.event=eventName;
data.marketing=marketing ?? {};
data.event_time=new Date().toISOString();
if(window.dataLayer){
if(data.ecommerce){
window.dataLayer.push({ ecommerce: null });
}
window.dataLayer.push(data);
}else{
console.warn("Datalayer not found...");
console.log(data);
}},
};
function formatPrice(price){
return parseFloat(parseFloat(price).toFixed(2));
}
function handleAddToCart(item, currency){
try {
if(item.item_category){
const categories=item.item_category.split(",");
for (var i=0; i < 5; i++){
if(categories[i]==undefined){
break;
}
if(i==0){
item.item_category=categories[i];
}else{
item["item_category_" + (i + 1)]=categories[i];
}}
}
if(item.quantity){
item.quantity=parseInt(item.quantity);
if(item.quantity < 1){
item.quantity=1;
}}else{
item.quantity=1;
}
if(item.price){
item.price=formatPrice(item.price);
}
localStorage.setItem("tagging_add_to_cart_item", item.item_id);
taggingEvents.addToCart({
ecommerce: {
value: formatPrice(item.price * item.quantity),
currency,
items: [item],
},
});
} catch (e){
console.warn(e);
}}
jQuery(document).ready(function (){
taggingEvents.userData();
if(window.viewItem){
taggingEvents.viewItem({
ecommerce: {
currency: window.viewItem.currency,
value: window.viewItem.value,
items: window.viewItem.items,
},
});
}
if(window.addToCart &&
window.addToCart.ecommerce &&
window.localStorage.getItem("tagging_add_to_cart_item")===null
){
handleAddToCart(
window.addToCart.ecommerce.items[0],
window.addToCart.ecommerce.currency
);
}
jQuery(document).on("click",
"[data-action='click->product#addToCart']",
function (e){
try {
const $button=jQuery(this);
if($button.hasClass("disabled")){
return;
}
const $form=$button.closest("form");
const variationId=$form.find(".variation_id").val();
var viewItemEvent=window.viewItem;
let buttonData;
if(variationId &&
window.viewItemVariants &&
window.viewItemVariants[variationId]
){
const variationData=window.viewItemVariants[variationId];
buttonData={
item_id: variationData.item_id,
item_sku: variationData.item_sku,
item_name: variationData.item_name,
item_category: variationData.item_category,
item_variant: variationData.item_variant||"default",
quantity: jQuery(this).data("quantity")||1,
price: formatPrice(variationData.price),
};
if(variationData.discount){
buttonData.discount=formatPrice(variationData.discount);
}}else{
buttonData={
item_id: viewItemEvent.items[0].item_id,
item_sku: viewItemEvent.items[0].item_sku,
item_name: viewItemEvent.items[0].item_name,
item_category: viewItemEvent.items[0].item_category,
item_variant: "default",
quantity: jQuery(this).data("quantity")||1,
price: formatPrice(viewItemEvent.items[0].price),
};
if(viewItemEvent.items[0].discount){
buttonData.discount=formatPrice(
viewItemEvent.items[0].discount
);
}}
const currency =
window.viewItemList?.currency||window.viewItem?.currency;
handleAddToCart(buttonData, currency);
} catch (e){
console.warn(e);
}}
);
document.addEventListener("click",
function (e){
try {
const button=e.target.closest(".single_add_to_cart_button");
if(!button){
return;
}
if(button.classList.contains("disabled")){
return;
}
var $elForm=jQuery(button).closest("form.cart");
const quantity=$elForm.find("[name=quantity]").val();
const variationId=$elForm.find(".variation_id").val();
const viewItemEvent=window.viewItem;
let item;
if(viewItemEvent){
if(variationId &&
window.viewItemVariants &&
window.viewItemVariants[variationId]
){
const variationData=window.viewItemVariants[variationId];
item={
item_id: variationData.item_id,
item_sku: variationData.item_sku,
item_name: variationData.item_name,
affiliation: variationData.affiliation||"",
discount: formatPrice(variationData.discount ?? 0.0),
item_brand: variationData.item_brand||"",
item_category: variationData.item_category||"",
item_category2: variationData.item_category2||"",
item_category3: variationData.item_category3||"",
item_category4: variationData.item_category4||"",
item_category5: variationData.item_category5||"",
item_list_id: variationData.item_list_id||"",
item_list_name: variationData.item_list_name||"",
item_variant: variationData.item_variant||"default",
location_id: variationData.location_id||"",
price: formatPrice(variationData.price ?? 0.0),
quantity: quantity,
};}else{
item={
item_id: viewItemEvent.items[0].item_id,
item_sku: viewItemEvent.items[0].item_sku,
item_name: viewItemEvent.items[0].item_name,
affiliation: viewItemEvent.items[0].affiliation||"",
discount: formatPrice(viewItemEvent.items[0].discount ?? 0.0),
item_brand: viewItemEvent.items[0].item_brand||"",
item_category: viewItemEvent.items[0].item_category||"",
item_category2: viewItemEvent.items[0].item_category2||"",
item_category3: viewItemEvent.items[0].item_category3||"",
item_category4: viewItemEvent.items[0].item_category4||"",
item_category5: viewItemEvent.items[0].item_category5||"",
item_list_id: viewItemEvent.items[0].item_list_id||"",
item_list_name: viewItemEvent.items[0].item_list_name||"",
item_variant: viewItemEvent.items[0].item_variant||"default",
location_id: viewItemEvent.items[0].location_id||"",
price: formatPrice(viewItemEvent.items[0].price ?? 0.0),
quantity: quantity,
};}}
handleAddToCart(item, viewItemEvent.currency);
} catch (e){
console.warn(e);
}},
true
);
document.addEventListener("click",
function (e){
try {
const button=e.target.closest(".add_to_cart_button");
if(!button){
return;
}
if(button.classList.contains("product_type_variable") ||
button.classList.contains("product_type_grouped") ||
button.classList.contains("single_add_to_cart_button")
){
console.log("Skipping add to cart button");
return;
}
console.log("Adding add to cart button");
const attributes=button.attributes;
const currency =
window.viewItemList?.ecommerce?.currency ||
window.viewItem?.currency;
var item={
item_id: attributes["data-product-id"].value,
item_sku: attributes["data-product-sku"].value,
item_name: attributes["data-product-name"].value,
affiliation: attributes["data-product-affiliation"].value,
discount: formatPrice(attributes["data-product-discount"].value),
item_brand: attributes["data-product-brand"].value,
item_category: attributes["data-product-category"].value,
item_category2: attributes["data-product-category2"].value,
item_category3: attributes["data-product-category3"].value,
item_category4: attributes["data-product-category4"].value,
item_category5: attributes["data-product-category5"].value,
item_list_id: attributes["data-product-list-id"].value,
item_list_name: attributes["data-product-list-name"].value,
item_variant: attributes["data-product-variant"].value,
location_id: attributes["data-product-location-id"].value,
price: formatPrice(attributes["data-product-price"].value),
quantity: attributes["data-product-quantity"].value,
price_excluding_vat: formatPrice(
attributes["data-product-price-excluding-vat"].value
),
};
handleAddToCart(item, currency);
} catch (e){
console.warn(e);
}},
true
);
if(window.viewItemList){
taggingEvents.viewItemList(window.viewItemList);
}
if(window.viewCart){
taggingEvents.viewCart(window.viewCart);
}
if(window.beginCheckout){
taggingEvents.beginCheckout(window.beginCheckout);
}
if(window.purchase){
var transactionId =
window.purchase &&
window.purchase.ecommerce &&
window.purchase.ecommerce.transaction_id;
if(transactionId){
var purchaseKey="tagging_purchase_" + transactionId;
if(!window.localStorage.getItem(purchaseKey)){
taggingEvents.purchase(window.purchase);
window.localStorage.setItem(purchaseKey, "true");
}}
}
window.localStorage.removeItem("tagging_add_to_cart_item");
jQuery(document).on("removed_from_cart",
function (e, fragments, cart_hash, $thisbutton){
var data=$thisbutton.data();
if(data.product_id){
var cart=window.cartObj.ecommerce;
var item=cart.items.find((item)=> {
return item.item_id==data.product_id;
});
if(!item){
return;
}
taggingEvents.removeFromCart({
ecommerce: {
items: [item],
value: item.price * item.quantity,
currency: cart.currency,
},
});
}}
);
function getItemByTableRow(row, rowClass){
const allRows=Array.from(document.querySelectorAll(rowClass ?? ".woocommerce-cart-form__cart-item"
)
);
const rowElement=row[0]||row;
const rowIndex=allRows.indexOf(rowElement);
return window.cartObj.ecommerce.items[rowIndex];
}
document.addEventListener("click", function (e){
try {
if(e.target.classList.contains("wc-block-cart-item__remove-link")){
const $row=jQuery(e.target).closest("tr");
const item=getItemByTableRow($row, ".wc-block-cart-items__row");
if(!item){
return;
}
window.cartObj.ecommerce.items =
window.cartObj.ecommerce.items.filter((cart_item)=> cart_item.item_id!==item.item_id
);
taggingEvents.removeFromCart({
ecommerce: {
items: [item],
value: item.price * item.quantity,
currency: window.cartObj.ecommerce.currency,
},
});
}} catch (e){
console.warn(e);
}});
jQuery(document).on("click",
".woocommerce-cart-form .product-remove > a",
function (e){
var $el=jQuery(e.currentTarget);
var data=$el.data();
if(data.product_id){
var cart=window.cartObj.ecommerce;
var item=cart.items.find((item)=> {
return item.item_id==data.product_id;
});
if(!item){
item=getItemByTableRow(this.closest("tr"));
if(!item){
return;
}}
window.cartObj.ecommerce.items =
window.cartObj.ecommerce.items.filter((cart_item)=> cart_item.item_id!==item.item_id
);
taggingEvents.removeFromCart({
ecommerce: {
items: [item],
value: item.price * item.quantity,
currency: cart.currency,
},
});
}}
);
jQuery(document).on("click", ".remove", function (e){
try {
var $el=jQuery(e.currentTarget);
var data=$el.data();
if(data.product_id){
var cart=window.cartObj.ecommerce;
var item=cart.items.find((item)=> {
return item.item_id==data.product_id;
});
taggingEvents.removeFromCart({
ecommerce: {
items: [item],
value: parseFloat((item.price * item.quantity).toFixed(2)),
currency: cart.currency,
},
});
}} catch (e){
console.warn("Unable to remove item from cart", e);
}});
if(window.removeFromCart){
taggingEvents.removeFromCart({
ecommerce: {
items: window.removeFromCart.items,
value: window.removeFromCart.value,
currency: window.removeFromCart.currency,
},
});
}
jQuery(document).on("wpcf7submit", function (event){
try {
if(event.detail.status!=="mail_sent" &&
event.detail.status!=="mail_failed"
){
return;
}
const formData={};
const inputs=event.detail.inputs;
inputs.forEach((input)=> {
formData[input.name]=input.value;
});
let marketing;
try {
marketing=window.taggingHelpers.getMarketingObject();
} catch (e){
console.warn(e);
}
taggingEvents.generateLead({
form_data: formData,
form_meta: {
form_id: event.detail.id,
form_name: event.detail.name,
form_type: event.detail.type,
},
user_data: marketing ?? {},
});
} catch (e){
console.warn(e);
}});
jQuery(document).on("click", ".gform_button", function (e){
try {
const $form=jQuery(this).closest("form");
const formData={};
formData.form_id=$form.attr("data-formid");
$form.find("input, select, textarea").each(function (){
const $input=jQuery(this);
const name=$input.attr("name");
if(name&&!name.includes("gform_")){
const inputId=$input.attr("id");
const $label=jQuery(`label[for="${inputId}"]`);
const labelText=$label.text().trim();
let value=$input.val();
if($input.attr("type")==="password"){
value="********";
}
if(labelText){
const key=labelText.toLowerCase().replace(/[^a-z0-9]/g, "_");
formData[key]=value;
}else{
const key=name.toLowerCase().replace(/[^a-z0-9]/g, "_");
formData[key]=value;
}}
});
try {
localStorage.setItem("gravityFormData", JSON.stringify(formData));
} catch (error){
console.warn("Failed to save form data to local storage:", error);
}} catch (e){
console.warn(e);
}});
jQuery(document).on("gform_confirmation_loaded", function (e, form_id){
sendGravityFormEventFromStorage();
});
});
function sendGravityFormEventFromStorage(){
try {
const gravityFormData=localStorage.getItem("gravityFormData");
let marketing;
try {
marketing=window.taggingHelpers.getMarketingObject();
} catch (e){
console.warn(e);
}
if(gravityFormData){
taggingEvents.generateLead({
form_data: JSON.parse(gravityFormData),
form_meta: {
form_id: gravityFormData.form_id||"",
form_name: gravityFormData.form_name||"",
form_type: gravityFormData.form_type||"",
},
user_data: marketing ?? {},
});
localStorage.removeItem("gravityFormData");
}} catch (e){
console.warn(e);
}}
if(document.readyState==="loading"){
window.addEventListener("load", ()=> {
if(!document.querySelector(".gform_validation_errors")){
sendGravityFormEventFromStorage();
}});
}else{
if(!document.querySelector(".gform_validation_errors")){
sendGravityFormEventFromStorage();
}}
const CHECKOUT_STEPS={
SHIPPING_METHOD: "shipping_method",
PAYMENT_METHOD: "payment_method",
};
const checkout_form=jQuery(
"form.checkout, form.wc-block-components-form form.wc-block-checkout__form"
);
const fired_checkout_steps=new Set();
const handleCheckoutPlaceOrder=()=> {
if(!fired_checkout_steps.has(CHECKOUT_STEPS.SHIPPING_METHOD)){
handleShippingInfoChanged();
}
if(!fired_checkout_steps.has(CHECKOUT_STEPS.PAYMENT_METHOD)){
handlePaymentMethodChanged();
}};
checkout_form.on("checkout_place_order", ()=> {
handleCheckoutPlaceOrder();
});
function getSelectedInputValue(selector, fallbackSelector){
let element =
document.querySelector(`${selector}:checked`) ||
document.querySelector(fallbackSelector);
if(element){
return element.value;
}
const blocksPaymentInput=document.querySelector('.wc-block-components-radio-control__input[name="radio-control-wc-payment-method-options"]:checked'
);
if(blocksPaymentInput){
return blocksPaymentInput.value;
}
return null;
}
function handleShippingInfoChanged(){
if(fired_checkout_steps.has(CHECKOUT_STEPS.SHIPPING_METHOD) ||
document.readyState!=="complete"
){
return;
}
const shipping_tier =
getSelectedInputValue(
"input[name^=shipping_method]",
"input[name^=shipping_method]"
)||"(shipping tier not found)";
taggingEvents.addShippingInfo({
ecommerce: {
...window.beginCheckout.ecommerce,
shipping_tier,
},
});
fired_checkout_steps.add(CHECKOUT_STEPS.SHIPPING_METHOD);
}
function handlePaymentMethodChanged(){
if(fired_checkout_steps.has(CHECKOUT_STEPS.PAYMENT_METHOD) ||
document.readyState!=="complete"
){
return;
}
if(!window.varGtmTryTagging?.currency||!window.beginCheckout?.value){
console.warn("Missing required currency or value for payment info tracking"
);
return;
}
const payment_type =
getSelectedInputValue(
".payment_methods input[name=payment_method]",
"input[name=payment_method]"
) ||
jQuery("input[name=payment_method]:checked").val() ||
jQuery("input[name=payment_method]:first").val() ||
"(payment type not found)";
window.addPaymentInfo={
...window.beginCheckout.user_data,
ecommerce: {
...window.beginCheckout.ecommerce,
payment_type,
},
};
taggingEvents.addPaymentInfo(window.addPaymentInfo);
fired_checkout_steps.add(CHECKOUT_STEPS.PAYMENT_METHOD);
}
document.addEventListener("click", (e)=> {
if(e.target.classList.contains("wc-block-components-checkout-place-order-button"
)
){
handlePaymentMethodChanged();
}});
document.addEventListener("change", (e)=> {
const isClassicPaymentInput =
e.target.name==="payment_method" ||
e.target.closest("input[name=payment_method]");
const isBlocksPaymentInput =
e.target.name==="radio-control-wc-payment-method-options";
if(isClassicPaymentInput||isBlocksPaymentInput){
handlePaymentMethodChanged();
}});
function generateUUID(){
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
function (c){
var r=(Math.random() * 16) | 0,
v=c=="x" ? r:(r & 0x3) | 0x8;
return v.toString(16);
}
);
}
function setCookie(name, value, days){
var expires="";
if(days){
var date=new Date();
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
expires="; expires=" + date.toUTCString();
}
document.cookie=name + "=" + (value||"") + expires + "; path=/";
}
if(!window.varGtmTryTagging?.disable_cookie_keeper){
if(document.cookie.indexOf("_taggingmk=")===-1){
var uuid=generateUUID();
setCookie("_taggingmk", uuid, 403);
}}
};
(()=>{"use strict";var e,r,_,t,a,n={},i={};function __webpack_require__(e){var r=i[e];if(void 0!==r)return r.exports;var _=i[e]={exports:{}};return n[e].call(_.exports,_,_.exports,__webpack_require__),_.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=(r,_,t,a)=>{if(!_){var n=1/0;for(b=0;b<e.length;b++){for(var[_,t,a]=e[b],i=!0,c=0;c<_.length;c++)(!1&a||n>=a)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](_[c]))?_.splice(c--,1):(i=!1,a<n&&(n=a));if(i){e.splice(b--,1);var o=t();void 0!==o&&(r=o)}}return r}a=a||0;for(var b=e.length;b>0&&e[b-1][2]>a;b--)e[b]=e[b-1];e[b]=[_,t,a]},_=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var a=Object.create(null);__webpack_require__.r(a);var n={};r=r||[null,_({}),_([]),_(_)];for(var i=2&t&&e;("object"==typeof i||"function"==typeof i)&&!~r.indexOf(i);i=_(i))Object.getOwnPropertyNames(i).forEach(r=>n[r]=()=>e[r]);return n.default=()=>e,__webpack_require__.d(a,n),a},__webpack_require__.d=(e,r)=>{for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((r,_)=>(__webpack_require__.f[_](e,r),r),[])),__webpack_require__.u=e=>786===e?"397f2d183c19202777d6.bundle.min.js":216===e?"lightbox.570c05c5a283cfb6b223.bundle.min.js":30===e?"text-path.a67c1f3a78d208bc7e1b.bundle.min.js":131===e?"accordion.8b0db5058afeb74622f5.bundle.min.js":707===e?"alert.42cc1d522ef5c60bf874.bundle.min.js":457===e?"counter.12335f45aaa79d244f24.bundle.min.js":234===e?"progress.0ea083b809812c0e3aa1.bundle.min.js":575===e?"tabs.18344b05d8d1ea0702bc.bundle.min.js":775===e?"toggle.2a177a3ef4785d3dfbc5.bundle.min.js":180===e?"video.86d44e46e43d0807e708.bundle.min.js":177===e?"image-carousel.6167d20b95b33386757b.bundle.min.js":212===e?"text-editor.45609661e409413f1cef.bundle.min.js":211===e?"wp-audio.c9624cb6e5dc9de86abd.bundle.min.js":215===e?"nested-tabs.a2401356d329f179475e.bundle.min.js":915===e?"nested-accordion.294d40984397351fd0f5.bundle.min.js":1===e?"contact-buttons.e98d0220ce8c38404e7e.bundle.min.js":336===e?"floating-bars.740d06d17cea5cebdb61.bundle.min.js":557===e?"shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js":396===e?"shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js":768===e?"container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js":77===e?"section-frontend-handlers.d85ab872da118940910d.bundle.min.js":220===e?"section-editor-handlers.53ffedef32043348b99b.bundle.min.js":304===e?"nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js":void 0,__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},a="elementorFrontend:",__webpack_require__.l=(e,r,_,n)=>{if(t[e])t[e].push(r);else{var i,c;if(void 0!==_)for(var o=document.getElementsByTagName("script"),b=0;b<o.length;b++){var u=o[b];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+_){i=u;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",a+_),i.src=e),t[e]=[r];var onScriptComplete=(r,_)=>{i.onerror=i.onload=null,clearTimeout(d);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(_)),r)return r(_)},d=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),c&&document.head.appendChild(i)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var r=__webpack_require__.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var _=r.getElementsByTagName("script");if(_.length)for(var t=_.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=_[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={76:0};__webpack_require__.f.j=(r,_)=>{var t=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==t)if(t)_.push(t[2]);else if(76!=r){var a=new Promise((_,a)=>t=e[r]=[_,a]);_.push(t[2]=a);var n=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(n,_=>{if(__webpack_require__.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var a=_&&("load"===_.type?"missing":_.type),n=_&&_.target&&_.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,t[1](i)}},"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=r=>0===e[r];var webpackJsonpCallback=(r,_)=>{var t,a,[n,i,c]=_,o=0;if(n.some(r=>0!==e[r])){for(t in i)__webpack_require__.o(i,t)&&(__webpack_require__.m[t]=i[t]);if(c)var b=c(__webpack_require__)}for(r&&r(_);o<n.length;o++)a=n[o],__webpack_require__.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return __webpack_require__.O(b)},r=self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))})()})();
(self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[]).push([[941],{1:(e,t,r)=>{"use strict";var n=r(5578),i=r(7255),s=r(5755),o=r(1866),a=r(6029),c=r(5022),l=n.Symbol,u=i("wks"),p=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return s(u,e)||(u[e]=a&&s(l,e)?l[e]:p("Symbol."+e)),u[e]}},41:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},169:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1483),o=r(5755),a=r(382),c=r(2048).CONFIGURABLE,l=r(7268),u=r(4483),p=u.enforce,d=u.get,h=String,f=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=a&&!i(function(){return 8!==f(function(){},"length",{value:8}).length}),w=String(String).split("String"),b=e.exports=function(e,t,r){"Symbol("===g(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||c&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&o(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return o(n,"source")||(n.source=v(w,"string"==typeof t?t:"")),e};Function.prototype.toString=b(function toString(){return s(this)&&d(this).source||l(this)},"toString")},274:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},348:(e,t,r)=>{"use strict";var n=r(1807),i=r(1483),s=r(1704),o=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!s(a=n(r,e)))return a;if(i(r=e.valueOf)&&!s(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!s(a=n(r,e)))return a;throw new o("Can't convert object to primitive value")}},382:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},641:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(9655);const Module=function(){const e=jQuery,t=arguments,r=this,n={};let i;this.getItems=function(e,t){if(t){const r=t.split("."),n=r.splice(0,1);if(!r.length)return e[n];if(!e[n])return;return this.getItems(e[n],r.join("."))}return e},this.getSettings=function(e){return this.getItems(i,e)},this.setSettings=function(t,n,s){if(s||(s=i),"object"==typeof t)return e.extend(s,t),r;const o=t.split("."),a=o.splice(0,1);return o.length?(s[a]||(s[a]={}),r.setSettings(o.join("."),n,s[a])):(s[a]=n,r)},this.getErrorMessage=function(e,t){let r;if("forceMethodImplementation"===e)r=`The method '${t}' must to be implemented in the inheritor child.`;else r="An error occurs";return r},this.forceMethodImplementation=function(e){throw new Error(this.getErrorMessage("forceMethodImplementation",e))},this.on=function(t,i){if("object"==typeof t)return e.each(t,function(e){r.on(e,this)}),r;return t.split(" ").forEach(function(e){n[e]||(n[e]=[]),n[e].push(i)}),r},this.off=function(e,t){if(!n[e])return r;if(!t)return delete n[e],r;const i=n[e].indexOf(t);return-1!==i&&(delete n[e][i],n[e]=n[e].filter(e=>e)),r},this.trigger=function(t){const i="on"+t[0].toUpperCase()+t.slice(1),s=Array.prototype.slice.call(arguments,1);r[i]&&r[i].apply(r,s);const o=n[t];return o?(e.each(o,function(e,t){t.apply(r,s)}),r):r},r.__construct.apply(r,t),e.each(r,function(e){const t=r[e];"function"==typeof t&&(r[e]=function(){return t.apply(r,arguments)})}),function(){i=r.getDefaultSettings();const n=t[0];n&&e.extend(!0,i,n)}(),r.trigger("init")};Module.prototype.__construct=function(){},Module.prototype.getDefaultSettings=function(){return{}},Module.prototype.getConstructorID=function(){return this.constructor.name},Module.extend=function(e){const t=jQuery,r=this,child=function(){return r.apply(this,arguments)};return t.extend(child,r),(child.prototype=Object.create(t.extend({},r.prototype,e))).constructor=child,child.__super__=r.prototype,child},e.exports=Module},670:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=function(e,t,r){n?i.f(e,t,s(0,r)):e[t]=r}},751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724),r(4846),r(9655);class InstanceType{static[Symbol.hasInstance](e){let t=super[Symbol.hasInstance](e);if(e&&!e.constructor.getInstanceType)return t;if(e&&(e.instanceTypes||(e.instanceTypes=[]),t||this.getInstanceType()===e.constructor.getInstanceType()&&(t=!0),t)){const t=this.getInstanceType===InstanceType.getInstanceType?"BaseInstanceType":this.getInstanceType();-1===e.instanceTypes.indexOf(t)&&e.instanceTypes.push(t)}return!t&&e&&(t=e.instanceTypes&&Array.isArray(e.instanceTypes)&&-1!==e.instanceTypes.indexOf(this.getInstanceType())),t}static getInstanceType(){elementorModules.ForceMethodImplementation()}constructor(){let e=new.target;const t=[];for(;e.__proto__&&e.__proto__.name;)t.push(e.__proto__),e=e.__proto__;t.reverse().forEach(e=>this instanceof e)}}t.default=InstanceType},1091:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},1265:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641)),s=n(r(2425)),o=n(r(2946)),a=n(r(3980)),c=n(r(2970)),l=n(r(8685)),u=r(9031),p=r(1462);const d={Module:i.default,ViewModule:s.default,ArgsObject:o.default,ForceMethodImplementation:l.default,utils:{Masonry:a.default,Scroll:c.default},importExport:{createGetInitialState:u.createGetInitialState,customizationDialogsRegistry:p.customizationDialogsRegistry}};window.elementorModules?Object.assign(window.elementorModules,d):window.elementorModules=d;t.default=window.elementorModules},1278:(e,t,r)=>{"use strict";var n=r(4762),i=n({}.toString),s=n("".slice);e.exports=function(e){return s(i(e),8,-1)}},1409:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1423:(e,t,r)=>{"use strict";var n=r(1409),i=r(1483),s=r(4815),o=r(5022),a=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&s(t.prototype,a(e))}},1462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customizationDialogsRegistry=void 0;var n=r(7958);t.customizationDialogsRegistry=new n.BaseRegistry},1483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},1506:(e,t,r)=>{"use strict";var n=r(2914),i=r(1807),s=r(2293),o=r(8761),a=r(5299),c=r(6960),l=r(4815),u=r(4887),p=r(6665),d=r(6721),h=TypeError,Result=function(e,t){this.stopped=e,this.result=t},f=Result.prototype;e.exports=function(e,t,r){var g,m,v,y,w,b,S,x=r&&r.that,E=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),O=n(t,x),stop=function(e){return g&&d(g,"normal"),new Result(!0,e)},callFn=function(e){return E?(s(e),C?O(e[0],e[1],stop):O(e[0],e[1])):C?O(e,stop):O(e)};if(I)g=e.iterator;else if(_)g=e;else{if(!(m=p(e)))throw new h(o(e)+" is not iterable");if(a(m)){for(v=0,y=c(e);y>v;v++)if((w=callFn(e[v]))&&l(f,w))return w;return new Result(!1)}g=u(e,m)}for(b=I?e.next:g.next;!(S=i(b,g)).done;){try{w=callFn(S.value)}catch(e){d(g,"throw",e)}if("object"==typeof w&&w&&l(f,w))return w}return new Result(!1)}},1507:e=>{"use strict";e.exports={}},1703:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},1704:(e,t,r)=>{"use strict";var n=r(1483);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},1799:(e,t,r)=>{"use strict";var n=r(382),i=r(8473),s=r(3145);e.exports=!n&&!i(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},1807:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},1831:(e,t,r)=>{"use strict";var n=r(9557),i=r(5578),s=r(2095),o="__core-js_shared__",a=e.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},1851:(e,t,r)=>{"use strict";var n,i,s,o=r(8473),a=r(1483),c=r(1704),l=r(5290),u=r(3181),p=r(7914),d=r(1),h=r(9557),f=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(i=u(u(s)))!==Object.prototype&&(n=i):g=!0),!c(n)||o(function(){var e={};return n[f].call(e)!==e})?n={}:h&&(n=l(n)),a(n[f])||p(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},1866:(e,t,r)=>{"use strict";var n=r(4762),i=0,s=Math.random(),o=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+s,36)}},1975:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(9557),p=r(6721),d=r(7486),h=r(5267),f=!u&&!d("filter",function(){}),g=!u&&!f&&h("filter",TypeError),m=u||f||g,v=c(function(){for(var e,t,r=this.iterator,n=this.predicate,s=this.next;;){if(e=o(i(s,r)),this.done=!!e.done)return;if(t=e.value,l(r,n,[t,this.counter++],!0))return t}});n({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function filter(e){o(this);try{s(e)}catch(e){p(this,"throw",e)}return g?i(g,this,e):new v(a(this),{predicate:e})}})},1983:(e,t,r)=>{"use strict";var n=r(6721);e.exports=function(e,t,r){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{r=n(e[i].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},2048:(e,t,r)=>{"use strict";var n=r(382),i=r(5755),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,"name"),c=a&&"something"===function something(){}.name,l=a&&(!n||n&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},2095:(e,t,r)=>{"use strict";var n=r(5578),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},2121:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1278),o=Object,a=n("".split);e.exports=i(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?a(e,""):o(e)}:o},2278:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,i)}},2293:(e,t,r)=>{"use strict";var n=r(1704),i=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not an object")}},2313:(e,t,r)=>{"use strict";var n=r(7914);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},2347:(e,t,r)=>{"use strict";var n=r(3312),i=Object;e.exports=function(e){return i(n(e))}},2355:(e,t,r)=>{"use strict";var n=r(1807),i=r(1704),s=r(1423),o=r(2564),a=r(348),c=r(1),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var r,c=o(e,u);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!i(r)||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2425:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641));t.default=i.default.extend({elements:null,getDefaultElements:()=>({}),bindEvents(){},onInit(){this.initElements(),this.bindEvents()},initElements(){this.elements=this.getDefaultElements()}})},2564:(e,t,r)=>{"use strict";var n=r(8120),i=r(5983);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},2811:(e,t,r)=>{"use strict";var n=r(1409);e.exports=n("document","documentElement")},2890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);class _default extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{elements:".elementor-element",nestedDocumentElements:".elementor .elementor-element"},classes:{editMode:"elementor-edit-mode"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$elements:this.$element.find(e.elements).not(this.$element.find(e.nestedDocumentElements))}}getDocumentSettings(e){let t;if(this.isEdit){t={};const e=elementor.settings.page.model;jQuery.each(e.getActiveControls(),r=>{t[r]=e.attributes[r]})}else t=this.$element.data("elementor-settings")||{};return this.getItems(t,e)}runElementsHandlers(){this.elements.$elements.each((e,t)=>setTimeout(()=>elementorFrontend.elementsHandler.runReadyTrigger(t)))}onInit(){this.$element=this.getSettings("$element"),super.onInit(),this.isEdit=this.$element.hasClass(this.getSettings("classes.editMode")),this.isEdit?elementor.on("document:loaded",()=>{elementor.settings.page.model.on("change",this.onSettingsChange.bind(this))}):this.runElementsHandlers()}onSettingsChange(){}}t.default=_default},2914:(e,t,r)=>{"use strict";var n=r(3786),i=r(8120),s=r(274),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},2946:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(751)),s=n(r(5213));class ArgsObject extends i.default{static getInstanceType(){return"ArgsObject"}constructor(e){super(),this.args=e}requireArgument(e,t=this.args){if(!Object.prototype.hasOwnProperty.call(t,e))throw Error(`${e} is required.`)}requireArgumentType(e,t,r=this.args){if(this.requireArgument(e,r),typeof r[e]!==t)throw Error(`${e} invalid type: ${t}.`)}requireArgumentInstance(e,t,r=this.args){if(this.requireArgument(e,r),!(r[e]instanceof t||(0,s.default)(r[e],t)))throw Error(`${e} invalid instance.`)}requireArgumentConstructor(e,t,r=this.args){if(this.requireArgument(e,r),r[e].constructor.toString()!==t.prototype.constructor.toString())throw Error(`${e} invalid constructor type.`)}}t.default=ArgsObject},2970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);t.default=class Scroll{static scrollObserver(e){let t=0;const r={root:e.root||null,rootMargin:e.offset||"0px",threshold:((e=0)=>{const t=[];if(e>0&&e<=100){const r=100/e;for(let e=0;e<=100;e+=r)t.push(e/100)}else t.push(0);return t})(e.sensitivity)};return new IntersectionObserver(function handleIntersect(r){const n=r[0].boundingClientRect.y,i=r[0].isIntersecting,s=n<t?"down":"up",o=Math.abs(parseFloat((100*r[0].intersectionRatio).toFixed(2)));e.callback({sensitivity:e.sensitivity,isInViewport:i,scrollPercentage:o,intersectionScrollDirection:s}),t=n},r)}static getElementViewportPercentage(e,t={}){const r=e[0].getBoundingClientRect(),n=t.start||0,i=t.end||0,s=window.innerHeight*n/100,o=window.innerHeight*i/100,a=r.top-window.innerHeight,c=0-a+s,l=r.top+s+e.height()-a+o,u=Math.max(0,Math.min(c/l,1));return parseFloat((100*u).toFixed(2))}static getPageScrollPercentage(e={},t){const r=e.start||0,n=e.end||0,i=t||document.documentElement.scrollHeight-document.documentElement.clientHeight,s=i*r/100,o=i+s+i*n/100;return(document.documentElement.scrollTop+document.body.scrollTop+s)/o*100}}},3005:(e,t,r)=>{"use strict";var n=r(1703);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3145:(e,t,r)=>{"use strict";var n=r(5578),i=r(1704),s=n.document,o=i(s)&&i(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},3181:(e,t,r)=>{"use strict";var n=r(5755),i=r(1483),s=r(2347),o=r(5409),a=r(9441),c=o("IE_PROTO"),l=Object,u=l.prototype;e.exports=a?l.getPrototypeOf:function(e){var t=s(e);if(n(t,c))return t[c];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof l?u:null}},3242:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{find:function find(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;return s(t,function(t,n){if(e(t,r++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},3312:(e,t,r)=>{"use strict";var n=r(5983),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},3392:(e,t,r)=>{"use strict";var n=r(3005),i=Math.max,s=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):s(r,t)}},3617:(e,t,r)=>{"use strict";var n=r(8612),i=r(5578),s=r(6021),o=r(2293),a=r(1483),c=r(3181),l=r(3864),u=r(670),p=r(8473),d=r(5755),h=r(1),f=r(1851).IteratorPrototype,g=r(382),m=r(9557),v="constructor",y="Iterator",w=h("toStringTag"),b=TypeError,S=i[y],x=m||!a(S)||S.prototype!==f||!p(function(){S({})}),E=function Iterator(){if(s(this,f),c(this)===f)throw new b("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){g?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===f)throw new b("You can't redefine this property");d(this,e)?this[e]=t:u(this,e,t)}}):f[e]=t};d(f,w)||defineIteratorPrototypeAccessor(w,y),!x&&d(f,v)&&f[v]!==Object||defineIteratorPrototypeAccessor(v,E),E.prototype=f,n({global:!0,constructor:!0,forced:x},{Iterator:E})},3658:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741);e.exports=Object.keys||function keys(e){return n(e,i)}},3786:(e,t,r)=>{"use strict";var n=r(1278),i=r(4762);e.exports=function(e){if("Function"===n(e))return i(e)}},3815:(e,t,r)=>{"use strict";var n=r(2355),i=r(1423);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},3864:(e,t,r)=>{"use strict";var n=r(169),i=r(5835);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},3896:(e,t,r)=>{"use strict";var n=r(382),i=r(8473);e.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3980:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);var i=n(r(2425));t.default=i.default.extend({getDefaultSettings:()=>({container:null,items:null,columnsCount:3,verticalSpaceBetween:30}),getDefaultElements(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run(){var e=[],t=this.elements.$container.position().top,r=this.getSettings(),n=r.columnsCount;t+=parseInt(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(i){var s=Math.floor(i/n),o=jQuery(this),a=o[0].getBoundingClientRect().height+r.verticalSpaceBetween;if(s){var c=o.position(),l=i%n,u=c.top-t-e[l];u-=parseInt(o.css("margin-top"),10),u*=-1,o.css("margin-top",u+"px"),e[l]+=a}else e.push(a)})}})},3991:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(6721),p=r(7486),d=r(5267),h=r(9557),f=!h&&!p("map",function(){}),g=!h&&!f&&d("map",TypeError),m=h||f||g,v=c(function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:m},{map:function map(e){o(this);try{s(e)}catch(e){u(this,"throw",e)}return g?i(g,this,e):new v(a(this),{mapper:e})}})},4338:(e,t,r)=>{"use strict";var n={};n[r(1)("toStringTag")]="z",e.exports="[object z]"===String(n)},4347:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},4364:(e,t,r)=>{"use strict";r(3991)},4483:(e,t,r)=>{"use strict";var n,i,s,o=r(4644),a=r(5578),c=r(1704),l=r(9037),u=r(5755),p=r(1831),d=r(5409),h=r(1507),f="Object already initialized",g=a.TypeError,m=a.WeakMap;if(o||p.state){var v=p.state||(p.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(f);return t.facade=e,v.set(e,t),t},i=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");h[y]=!0,n=function(e,t){if(u(e,y))throw new g(f);return t.facade=e,l(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},s=function(e){return u(e,y)}}e.exports={set:n,get:i,has:s,enforce:function(e){return s(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},4644:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483),s=n.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},4741:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4762:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);e.exports=n?o:function(e){return function(){return s.apply(e,arguments)}}},4815:(e,t,r)=>{"use strict";var n=r(4762);e.exports=n({}.isPrototypeOf)},4846:(e,t,r)=>{"use strict";r(3617)},4887:(e,t,r)=>{"use strict";var n=r(1807),i=r(8120),s=r(2293),o=r(8761),a=r(6665),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return s(n(r,e));throw new c(o(e)+" is not iterable")}},4914:(e,t,r)=>{"use strict";var n=r(1278);e.exports=Array.isArray||function isArray(e){return"Array"===n(e)}},4946:(e,t,r)=>{"use strict";var n=r(6784),i=n(r(1265)),s=n(r(2890)),o=n(r(7955)),a=n(r(8140)),c=n(r(7224)),l=n(r(5633)),u=n(r(9603));i.default.frontend={Document:s.default,tools:{StretchElement:o.default},handlers:{Base:c.default,StretchedElement:a.default,SwiperBase:l.default,CarouselBase:u.default}}},4961:(e,t,r)=>{"use strict";var n=r(382),i=r(1807),s=r(7611),o=r(7738),a=r(5599),c=r(3815),l=r(5755),u=r(1799),p=Object.getOwnPropertyDescriptor;t.f=n?p:function getOwnPropertyDescriptor(e,t){if(e=a(e),t=c(t),u)try{return p(e,t)}catch(e){}if(l(e,t))return o(!i(s.f,e,t),e[t])}},5022:(e,t,r)=>{"use strict";var n=r(6029);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5213:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=(e,t)=>{t=Array.isArray(t)?t:[t];for(const r of t)if(e.constructor.name===r.prototype[Symbol.toStringTag])return!0;return!1}},5247:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5267:(e,t,r)=>{"use strict";var n=r(5578);e.exports=function(e,t){var r=n.Iterator,i=r&&r.prototype,s=i&&i[e],o=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return s}},5290:(e,t,r)=>{"use strict";var n,i=r(2293),s=r(5799),o=r(4741),a=r(1507),c=r(2811),l=r(3145),u=r(5409),p="prototype",d="script",h=u("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+d+">"+e+"</"+d+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):(t=l("iframe"),r="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F):NullProtoObjectViaActiveX(n);for(var i=o.length;i--;)delete NullProtoObject[p][o[i]];return NullProtoObject()};a[h]=!0,e.exports=Object.create||function create(e,t){var r;return null!==e?(EmptyConstructor[p]=i(e),r=new EmptyConstructor,EmptyConstructor[p]=null,r[h]=e):r=NullProtoObject(),void 0===t?r:s.f(r,t)}},5299:(e,t,r)=>{"use strict";var n=r(1),i=r(6775),s=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[s]===e)}},5409:(e,t,r)=>{"use strict";var n=r(7255),i=r(1866),s=n("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},5578:function(e,t,r){"use strict";var check=function(e){return e&&e.Math===Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r.g&&r.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5599:(e,t,r)=>{"use strict";var n=r(2121),i=r(3312);e.exports=function(e){return n(i(e))}},5633:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(7224));class SwiperHandlerBase extends i.default{getInitialSlide(){const e=this.getEditSettings();return e.activeItemIndex?e.activeItemIndex-1:0}getSlidesCount(){return this.elements.$slides.length}togglePauseOnHover(e){e?this.elements.$swiperContainer.on({mouseenter:()=>{this.swiper.autoplay.stop()},mouseleave:()=>{this.swiper.autoplay.start()}}):this.elements.$swiperContainer.off("mouseenter mouseleave")}handleKenBurns(){const e=this.getSettings();this.$activeImageBg&&this.$activeImageBg.removeClass(e.classes.kenBurnsActive),this.activeItemIndex=this.swiper?this.swiper.activeIndex:this.getInitialSlide(),this.swiper?this.$activeImageBg=jQuery(this.swiper.slides[this.activeItemIndex]).children("."+e.classes.slideBackground):this.$activeImageBg=jQuery(this.elements.$slides[0]).children("."+e.classes.slideBackground),this.$activeImageBg.addClass(e.classes.kenBurnsActive)}}t.default=SwiperHandlerBase},5724:(e,t,r)=>{"use strict";var n=r(8612),i=r(2347),s=r(6960),o=r(9273),a=r(1091);n({target:"Array",proto:!0,arity:1,forced:r(8473)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function push(e){var t=i(this),r=s(t),n=arguments.length;a(r+n);for(var c=0;c<n;c++)t[r]=arguments[c],r++;return o(t,r),r}})},5755:(e,t,r)=>{"use strict";var n=r(4762),i=r(2347),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return s(i(e),t)}},5799:(e,t,r)=>{"use strict";var n=r(382),i=r(3896),s=r(5835),o=r(2293),a=r(5599),c=r(3658);t.f=n&&!i?Object.defineProperties:function defineProperties(e,t){o(e);for(var r,n=a(t),i=c(t),l=i.length,u=0;l>u;)s.f(e,r=i[u++],n[r]);return e}},5835:(e,t,r)=>{"use strict";var n=r(382),i=r(1799),s=r(3896),o=r(2293),a=r(3815),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",h="writable";t.f=n?s?function defineProperty(e,t,r){if(o(e),t=a(t),o(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var n=u(e,t);n&&n[h]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:p in r?r[p]:n[p],writable:!1})}return l(e,t,r)}:l:function defineProperty(e,t,r){if(o(e),t=a(t),o(r),i)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},5983:e=>{"use strict";e.exports=function(e){return null==e}},6021:(e,t,r)=>{"use strict";var n=r(4815),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},6029:(e,t,r)=>{"use strict";var n=r(6477),i=r(8473),s=r(5578).String;e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},6145:(e,t,r)=>{"use strict";var n=r(4338),i=r(1483),s=r(1278),o=r(1)("toStringTag"),a=Object,c="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),o))?r:c?s(t):"Object"===(n=s(t))&&i(t.callee)?"Arguments":n}},6211:(e,t,r)=>{"use strict";r(3242)},6477:(e,t,r)=>{"use strict";var n,i,s=r(5578),o=r(9461),a=s.process,c=s.Deno,l=a&&a.versions||c&&c.version,u=l&&l.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},6651:(e,t,r)=>{"use strict";var n=r(5599),i=r(3392),s=r(6960),createMethod=function(e){return function(t,r,o){var a=n(t),c=s(a);if(0===c)return!e&&-1;var l,u=i(o,c);if(e&&r!=r){for(;c>u;)if((l=a[u++])!=l)return!0}else for(;c>u;u++)if((e||u in a)&&a[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},6665:(e,t,r)=>{"use strict";var n=r(6145),i=r(2564),s=r(5983),o=r(6775),a=r(1)("iterator");e.exports=function(e){if(!s(e))return i(e,a)||i(e,"@@iterator")||o[n(e)]}},6721:(e,t,r)=>{"use strict";var n=r(1807),i=r(2293),s=r(2564);e.exports=function(e,t,r){var o,a;i(e);try{if(!(o=s(e,"return"))){if("throw"===t)throw r;return r}o=n(o,e)}catch(e){a=!0,o=e}if("throw"===t)throw r;if(a)throw o;return i(o),r}},6726:(e,t,r)=>{"use strict";var n=r(5755),i=r(9497),s=r(4961),o=r(5835);e.exports=function(e,t,r){for(var a=i(t),c=o.f,l=s.f,u=0;u<a.length;u++){var p=a[u];n(e,p)||r&&n(r,p)||c(e,p,l(t,p))}}},6742:(e,t,r)=>{"use strict";var n=r(4762),i=r(5755),s=r(5599),o=r(6651).indexOf,a=r(1507),c=n([].push);e.exports=function(e,t){var r,n=s(e),l=0,u=[];for(r in n)!i(a,r)&&i(n,r)&&c(u,r);for(;t.length>l;)i(n,r=t[l++])&&(~o(u,r)||c(u,r));return u}},6775:e=>{"use strict";e.exports={}},6784:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6960:(e,t,r)=>{"use strict";var n=r(8324);e.exports=function(e){return n(e.length)}},7224:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(6211),r(9655),e.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(e){this.isActive(e)&&(this.$element=e.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(e){var t=this.$element;return t.find(e).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(t)})},getUniqueHandlerID(e,t){return e||(e=this.getModelCID()),t||(t=this.$element),e+t.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var e=this;if(e.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(t){t.cid===e.getModelCID()&&e.onDestroy()}}],e.onElementChange){const t=e.getWidgetType()||e.getElementType();let r="change";"global"!==t&&(r+=":"+t),e.editorListeners.push({event:r,to:elementor.channels.editor,callback(t,r){e.getUniqueHandlerID(r.model.cid,r.$el)===e.getUniqueHandlerID()&&e.onElementChange(t.model.get("name"),t,r)}})}e.onEditSettingsChange&&e.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(t,r){if(r.model.cid!==e.getModelCID())return;const n=Object.keys(t.changed)[0];e.onEditSettingsChange(n,t.changed[n])}}),["page"].forEach(function(t){var r="on"+t[0].toUpperCase()+t.slice(1)+"SettingsChange";e[r]&&e.editorListeners.push({event:"change",to:elementor.settings[t].model,callback(t){e[r](t.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.addListenerOnce(e,t.event,t.callback,t.to)})},removeEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.removeListeners(e,t.event,null,t.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const e=this.$element.data("widget_type");if(e)return e.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(e){let t={};const r=this.getModelCID();if(this.isEdit&&r){const e=elementorFrontend.config.elements.data[r],n=e.attributes;let i=n.widgetType||n.elType;n.isInner&&(i="inner-"+i);let s=elementorFrontend.config.elements.keys[i];s||(s=elementorFrontend.config.elements.keys[i]=[],jQuery.each(e.controls,(e,t)=>{(t.frontend_available||t.editor_available)&&s.push(e)})),jQuery.each(e.getActiveControls(),function(e){if(-1!==s.indexOf(e)){let r=n[e];r.toJSON&&(r=r.toJSON()),t[e]=r}})}else t=this.$element.data("settings")||{};return this.getItems(t,e)},getEditSettings(e){var t={};return this.isEdit&&(t=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(t,e)},getCurrentDeviceSetting(e){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),e)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},7255:(e,t,r)=>{"use strict";var n=r(1831);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},7268:(e,t,r)=>{"use strict";var n=r(4762),i=r(1483),s=r(1831),o=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return o(e)}),e.exports=s.inspectSource},7458:(e,t,r)=>{"use strict";r(1975)},7486:e=>{"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},7611:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r},7738:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7914:(e,t,r)=>{"use strict";var n=r(1483),i=r(5835),s=r(169),o=r(2095);e.exports=function(e,t,r,a){a||(a={});var c=a.enumerable,l=void 0!==a.name?a.name:t;if(n(r)&&s(r,l,a),a.global)c?e[t]=r:o(t,r);else{try{a.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},7955:e=>{"use strict";e.exports=elementorModules.ViewModule.extend({getDefaultSettings:()=>({element:null,direction:elementorFrontend.config.is_rtl?"right":"left",selectors:{container:window},considerScrollbar:!1,cssOutput:"inline"}),getDefaultElements(){return{$element:jQuery(this.getSettings("element"))}},stretch(){const e=this.getSettings();let t;try{t=jQuery(e.selectors.container)}catch(e){}t&&t.length||(t=jQuery(this.getDefaultSettings().selectors.container)),this.reset();var r=this.elements.$element,n=t.innerWidth(),i=r.offset().left,s="fixed"===r.css("position"),o=s?0:i,a=window===t[0];if(!a){var c=t.offset().left;s&&(o=c),i>c&&(o=i-c)}if(e.considerScrollbar&&a){o-=window.innerWidth-n}s||(elementorFrontend.config.is_rtl&&(o=n-(r.outerWidth()+o)),o=-o),e.margin&&(o+=e.margin);var l={};let u=n;e.margin&&(u-=2*e.margin),l.width=u+"px",l[e.direction]=o+"px","variables"!==e.cssOutput?r.css(l):this.applyCssVariables(r,l)},reset(){const e={},t=this.getSettings(),r=this.elements.$element;"variables"!==t.cssOutput?(e.width="",e[t.direction]="",r.css(e)):this.resetCssVariables(r)},applyCssVariables(e,t){e.css("--stretch-width",t.width),t.left?e.css("--stretch-left",t.left):e.css("--stretch-right",t.right)},resetCssVariables(e){e.css({"--stretch-width":"","--stretch-left":"","--stretch-right":""})}})},7958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRegistry=void 0,r(4846),r(7458),r(9655),r(4364);t.BaseRegistry=class BaseRegistry{constructor(){this.sections=new Map}register(e){if(!e.key||!e.title)throw new Error("Template type must have key and title");const t=this.get(e.key)||this.formatSection(e);if(e.children)if(t.children){const r=new Map(t.children.map(e=>[e.key,e]));e.children.forEach(e=>{const t=this.formatSection(e);r.set(e.key,t)}),t.children=Array.from(r.values())}else t.children=e.children.map(e=>this.formatSection(e));this.sections.set(e.key,t)}formatSection({children:e,...t}){return{key:t.key,title:t.title,description:t.description||"",useParentDefault:!1!==t.useParentDefault,getInitialState:t.getInitialState||null,component:t.component||null,order:t.order||10,isAvailable:t.isAvailable||(()=>!0),...t}}getAll(){return Array.from(this.sections.values()).filter(e=>e.isAvailable()).map(e=>e.children?{...e,children:[...e.children].sort((e,t)=>e.order-t.order)}:e).sort((e,t)=>e.order-t.order)}get(e){return this.sections.get(e)}}},8120:(e,t,r)=>{"use strict";var n=r(1483),i=r(8761),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not a function")}},8140:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);var i=n(r(7224));class StretchedElement extends i.default{getStretchedClass(){return"e-stretched"}getStretchSettingName(){return"stretch_element"}getStretchActiveValue(){return"yes"}bindEvents(){const e=this.getUniqueHandlerID();elementorFrontend.addListenerOnce(e,"resize",this.stretch),elementorFrontend.addListenerOnce(e,"sticky:stick",this.stretch,this.$element),elementorFrontend.addListenerOnce(e,"sticky:unstick",this.stretch,this.$element),elementorFrontend.isEditMode()&&(this.onKitChangeStretchContainerChange=this.onKitChangeStretchContainerChange.bind(this),elementor.channels.editor.on("kit:change:stretchContainer",this.onKitChangeStretchContainerChange))}unbindEvents(){elementorFrontend.removeListeners(this.getUniqueHandlerID(),"resize",this.stretch),elementorFrontend.isEditMode()&&elementor.channels.editor.off("kit:change:stretchContainer",this.onKitChangeStretchContainerChange)}isActive(e){return elementorFrontend.isEditMode()||e.$element.hasClass(this.getStretchedClass())}getStretchElementForConfig(e=null){return e?this.$element.find(e):this.$element}getStretchElementConfig(){return{element:this.getStretchElementForConfig(),selectors:{container:this.getStretchContainer()},considerScrollbar:elementorFrontend.isEditMode()&&elementorFrontend.config.is_rtl}}initStretch(){this.stretch=this.stretch.bind(this),this.stretchElement=new elementorModules.frontend.tools.StretchElement(this.getStretchElementConfig())}getStretchContainer(){return elementorFrontend.getKitSettings("stretched_section_container")||window}isStretchSettingEnabled(){return this.getElementSettings(this.getStretchSettingName())===this.getStretchActiveValue()}stretch(){this.isStretchSettingEnabled()&&this.stretchElement.stretch()}onInit(...e){this.isActive(this.getSettings())&&(this.initStretch(),super.onInit(...e),this.stretch())}onElementChange(e){this.getStretchSettingName()===e&&(this.isStretchSettingEnabled()?this.stretch():this.stretchElement.reset())}onKitChangeStretchContainerChange(){this.stretchElement.setSettings("selectors.container",this.getStretchContainer()),this.stretch()}}t.default=StretchedElement},8324:(e,t,r)=>{"use strict";var n=r(3005),i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},8473:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8612:(e,t,r)=>{"use strict";var n=r(5578),i=r(4961).f,s=r(9037),o=r(7914),a=r(2095),c=r(6726),l=r(8730);e.exports=function(e,t){var r,u,p,d,h,f=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[f]||a(f,{}):n[f]&&n[f].prototype)for(u in t){if(d=t[u],p=e.dontCallGetSet?(h=i(r,u))&&h.value:r[u],!l(g?u:f+(m?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(e.sham||p&&p.sham)&&s(d,"sham",!0),o(r,u,d,e)}}},8660:(e,t,r)=>{"use strict";var n=r(1807),i=r(5290),s=r(9037),o=r(2313),a=r(1),c=r(4483),l=r(2564),u=r(1851).IteratorPrototype,p=r(5247),d=r(6721),h=r(1983),f=a("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",v="normal",y="throw",w=c.set,createIteratorProxyPrototype=function(e){var t=c.getterFor(e?m:g);return o(i(u),{next:function next(){var r=t(this);if(e)return r.nextHandler();if(r.done)return p(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:p(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),i=r.iterator;if(r.done=!0,e){var s=l(i,"return");return s?n(s,i):p(void 0,!0)}if(r.inner)try{d(r.inner.iterator,v)}catch(e){return d(i,y,e)}if(r.openIters)try{h(r.openIters,v)}catch(e){return d(i,y,e)}return i&&d(i,v),p(void 0,!0)}})},b=createIteratorProxyPrototype(!0),S=createIteratorProxyPrototype(!1);s(S,f,"Iterator Helper"),e.exports=function(e,t,r){var n=function Iterator(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=t?m:g,i.returnHandlerResult=!!r,i.nextHandler=e,i.counter=0,i.done=!1,w(this,i)};return n.prototype=t?b:S,n}},8685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ForceMethodImplementation=void 0;class ForceMethodImplementation extends Error{constructor(e={},t={}){super(`${e.isStatic?"static ":""}${e.fullName}() should be implemented, please provide '${e.functionName||e.fullName}' functionality.`,t),Object.keys(t).length&&console.error(t),Error.captureStackTrace(this,ForceMethodImplementation)}}t.ForceMethodImplementation=ForceMethodImplementation;t.default=e=>{const t=Error().stack.split("\n")[2].trim(),r=t.startsWith("at new")?"constructor":t.split(" ")[1],n={};if(n.functionName=r,n.fullName=r,n.functionName.includes(".")){const e=n.functionName.split(".");n.className=e[0],n.functionName=e[1]}else n.isStatic=!0;throw new ForceMethodImplementation(n,e)}},8730:(e,t,r)=>{"use strict";var n=r(8473),i=r(1483),s=/#|\.prototype\./,isForced=function(e,t){var r=a[o(e)];return r===l||r!==c&&(i(t)?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=isForced.data={},c=isForced.NATIVE="N",l=isForced.POLYFILL="P";e.exports=isForced},8761:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},8901:(e,t,r)=>{"use strict";var n=r(2293),i=r(6721);e.exports=function(e,t,r,s){try{return s?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},9031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGetInitialState=function createGetInitialState(e,t={}){return(r,n)=>{let i=n;if(r.hasOwnProperty("uploadedData")){i=!1;const t=r.uploadedData.manifest.templates,n=elementorAppConfig?.["import-export-customization"]?.exportGroups||{};for(const r in t){if(n[t[r].doc_type]===e){i=!0;break}}}return{enabled:i,...t}}}},9037:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=n?function(e,t,r){return i.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},9273:(e,t,r)=>{"use strict";var n=r(382),i=r(4914),s=TypeError,o=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!o(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9441:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})},9461:(e,t,r)=>{"use strict";var n=r(5578).navigator,i=n&&n.userAgent;e.exports=i?String(i):""},9497:(e,t,r)=>{"use strict";var n=r(1409),i=r(4762),s=r(2278),o=r(4347),a=r(2293),c=i([].concat);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=s.f(a(e)),r=o.f;return r?c(t,r(e)):t}},9557:e=>{"use strict";e.exports=!1},9603:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211),r(9655);var i=n(r(5633));class CarouselHandlerBase extends i.default{getDefaultSettings(){return{selectors:{carousel:".swiper",swiperWrapper:".swiper-wrapper",slideContent:".swiper-slide",swiperArrow:".elementor-swiper-button",paginationWrapper:".swiper-pagination",paginationBullet:".swiper-pagination-bullet",paginationBulletWrapper:".swiper-pagination-bullets"}}}getDefaultElements(){const e=this.getSettings("selectors"),t={$swiperContainer:this.$element.find(e.carousel),$swiperWrapper:this.$element.find(e.swiperWrapper),$swiperArrows:this.$element.find(e.swiperArrow),$paginationWrapper:this.$element.find(e.paginationWrapper),$paginationBullets:this.$element.find(e.paginationBullet),$paginationBulletWrapper:this.$element.find(e.paginationBulletWrapper)};return t.$slides=t.$swiperContainer.find(e.slideContent),t}getSwiperSettings(){const e=this.getElementSettings(),t=+e.slides_to_show||3,r=1===t,n=elementorFrontend.config.responsive.activeBreakpoints,i={mobile:1,tablet:r?1:2},s={slidesPerView:t,loop:"yes"===e.infinite,speed:e.speed,handleElementorBreakpoints:!0,breakpoints:{}};let o=t;Object.keys(n).reverse().forEach(t=>{const r=i[t]?i[t]:o;s.breakpoints[n[t].value]={slidesPerView:+e["slides_to_show_"+t]||r,slidesPerGroup:+e["slides_to_scroll_"+t]||1},e.image_spacing_custom&&(s.breakpoints[n[t].value].spaceBetween=this.getSpaceBetween(t)),o=+e["slides_to_show_"+t]||r}),"yes"===e.autoplay&&(s.autoplay={delay:e.autoplay_speed,disableOnInteraction:"yes"===e.pause_on_interaction}),r?(s.effect=e.effect,"fade"===e.effect&&(s.fadeEffect={crossFade:!0})):s.slidesPerGroup=+e.slides_to_scroll||1,e.image_spacing_custom&&(s.spaceBetween=this.getSpaceBetween());const a="arrows"===e.navigation||"both"===e.navigation,c="dots"===e.navigation||"both"===e.navigation||e.pagination;return a&&(s.navigation={prevEl:".elementor-swiper-button-prev",nextEl:".elementor-swiper-button-next"}),c&&(s.pagination={el:`.elementor-element-${this.getID()} .swiper-pagination`,type:e.pagination?e.pagination:"bullets",clickable:!0,renderBullet:(e,t)=>`<span class="${t}" role="button" tabindex="0" data-bullet-index="${e}" aria-label="${elementorFrontend.config.i18n.a11yCarouselPaginationBulletMessage} ${e+1}"></span>`}),"yes"===e.lazyload&&(s.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),s.a11y={enabled:!0,prevSlideMessage:elementorFrontend.config.i18n.a11yCarouselPrevSlideMessage,nextSlideMessage:elementorFrontend.config.i18n.a11yCarouselNextSlideMessage,firstSlideMessage:elementorFrontend.config.i18n.a11yCarouselFirstSlideMessage,lastSlideMessage:elementorFrontend.config.i18n.a11yCarouselLastSlideMessage},s.on={slideChange:()=>{this.a11ySetPaginationTabindex(),this.handleElementHandlers(),this.a11ySetSlideAriaHidden()},init:()=>{this.a11ySetPaginationTabindex(),this.a11ySetSlideAriaHidden("initialisation")}},this.applyOffsetSettings(e,s,t),s}getOffsetWidth(){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"offset_width","size",e)||0}applyOffsetSettings(e,t,r){const n=e.offset_sides;if(!(elementorFrontend.isEditMode()&&"NestedCarousel"===this.constructor.name)&&n&&"none"!==n)switch(n){case"right":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-right");break;case"left":this.addClassToSwiperContainer("offset-left");break;case"both":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-both")}}forceSliderToShowNextSlideWhenOnLast(e,t){e.slidesPerView=t+.001}addClassToSwiperContainer(e){this.getDefaultElements().$swiperContainer[0].classList.add(e)}async onInit(...e){if(super.onInit(...e),!this.elements.$swiperContainer.length||2>this.elements.$slides.length)return;await this.initSwiper();"yes"===this.getElementSettings().pause_on_hover&&this.togglePauseOnHover(!0)}async initSwiper(){const e=elementorFrontend.utils.swiper;this.swiper=await new e(this.elements.$swiperContainer,this.getSwiperSettings()),this.elements.$swiperContainer.data("swiper",this.swiper)}bindEvents(){this.elements.$swiperArrows.on("keydown",this.onDirectionArrowKeydown.bind(this)),this.elements.$paginationWrapper.on("keydown",".swiper-pagination-bullet",this.onDirectionArrowKeydown.bind(this)),this.elements.$swiperContainer.on("keydown",".swiper-slide",this.onDirectionArrowKeydown.bind(this)),this.$element.find(":focusable").on("focus",this.onFocusDisableAutoplay.bind(this)),elementorFrontend.elements.$window.on("resize",this.getSwiperSettings.bind(this))}unbindEvents(){this.elements.$swiperArrows.off(),this.elements.$paginationWrapper.off(),this.elements.$swiperContainer.off(),this.$element.find(":focusable").off(),elementorFrontend.elements.$window.off("resize")}onDirectionArrowKeydown(e){const t=elementorFrontend.config.is_rtl,r=e.originalEvent.code,n=t?"ArrowLeft":"ArrowRight";if(!(-1!==["ArrowLeft","ArrowRight"].indexOf(r)))return!0;(t?"ArrowRight":"ArrowLeft")===r?this.swiper.slidePrev():n===r&&this.swiper.slideNext()}onFocusDisableAutoplay(){this.swiper.autoplay.stop()}updateSwiperOption(e){const t=this.getElementSettings()[e],r=this.swiper.params;switch(e){case"autoplay_speed":r.autoplay.delay=t;break;case"speed":r.speed=t}this.swiper.update()}getChangeableProperties(){return{pause_on_hover:"pauseOnHover",autoplay_speed:"delay",speed:"speed",arrows_position:"arrows_position"}}onElementChange(e){if(0===e.indexOf("image_spacing_custom"))return void this.updateSpaceBetween(e);if(this.getChangeableProperties()[e])if("pause_on_hover"===e){const e=this.getElementSettings("pause_on_hover");this.togglePauseOnHover("yes"===e)}else this.updateSwiperOption(e)}onEditSettingsChange(e){"activeItemIndex"===e&&this.swiper.slideToLoop(this.getEditSettings("activeItemIndex")-1)}getSpaceBetween(e=null){const t=elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"image_spacing_custom","size",e);return Number(t)||0}updateSpaceBetween(e){const t=e.match("image_spacing_custom_(.*)"),r=t?t[1]:"desktop",n=this.getSpaceBetween(r);"desktop"!==r&&(this.swiper.params.breakpoints[elementorFrontend.config.responsive.activeBreakpoints[r].value].spaceBetween=n),this.swiper.params.spaceBetween=n,this.swiper.update()}getPaginationBullets(e="array"){const t=this.$element.find(this.getSettings("selectors").paginationBullet);return"array"===e?Array.from(t):t}a11ySetPaginationTabindex(){const e=this.swiper?.params?.pagination.bulletClass,t=this.swiper?.params?.pagination.bulletActiveClass;this.getPaginationBullets().forEach(e=>{e.classList?.contains(t)||e.removeAttribute("tabindex")});const r="ArrowLeft"===event?.code||"ArrowRight"===event?.code;event?.target?.classList?.contains(e)&&r&&this.$element.find(`.${t}`).trigger("focus")}getSwiperWrapperTranformXValue(){let e=this.elements.$swiperWrapper[0]?.style.transform;return e=e.replace("translate3d(",""),e=e.split(","),e=parseInt(e[0].replace("px","")),e||0}a11ySetSlideAriaHidden(e=""){if("number"!=typeof("initialisation"===e?0:this.swiper?.activeIndex))return;const t=this.getSwiperWrapperTranformXValue(),r=this.elements.$swiperWrapper[0].clientWidth;this.elements.$swiperContainer.find(this.getSettings("selectors").slideContent).each((e,n)=>{0<=n.offsetLeft+t&&r>n.offsetLeft+t?(n.removeAttribute("aria-hidden"),n.removeAttribute("inert")):(n.setAttribute("aria-hidden",!0),n.setAttribute("inert",""))})}handleElementHandlers(){}}t.default=CarouselHandlerBase},9655:(e,t,r)=>{"use strict";r(9930)},9930:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function forEach(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;s(t,function(t){e(t,r++)},{IS_RECORD:!0})}})}},e=>{var t;t=4946,e(e.s=t)}]);