var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o=(m="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=m.asyncIterator||"@@asyncIterator",a=m.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(e){c=function(t,r,e){return t[r]=e}}function u(t,e,n,o){var i,a,c,u;e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),o=new j(o||[]);return e._invoke=(i=t,a=n,c=o,u=l,function(t,e){if(u===s)throw new Error("Generator is already running");if(u===p){if("throw"===t)throw e;return k()}for(c.method=t,c.arg=e;;){var n=c.delegate;if(n&&(n=function t(e,n){var o=e.iterator[n.method];if(o===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=r,t(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}return"throw"===(o=h(o,e.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,y):(o=o.arg)?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}(n,c),n)){if(n===y)continue;return n}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===l)throw u=p,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(u=s,"normal"===(n=h(i,a,c)).type){if(u=c.done?p:f,n.arg!==y)return{value:n.arg,done:c.done}}else"throw"===n.type&&(u=p,c.method="throw",c.arg=n.arg)}}),e}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",s="executing",p="completed",y={};function g(){}function d(){}function v(){}var m,w,L=((w=(w=(c(m={},o,(function(){return this})),Object.getPrototypeOf))&&w(w(O([]))))&&w!==e&&n.call(w,o)&&(m=w),v.prototype=g.prototype=Object.create(m));function x(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){var e;this._invoke=function(o,i){function a(){return new r((function(e,a){!function e(o,i,a,c){var u;if("throw"!==(o=h(t[o],t,i)).type)return(i=(u=o.arg).value)&&"object"==typeof i&&n.call(i,"__await")?r.resolve(i.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(i).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,c)}));c(o.arg)}(o,i,e,a)}))}return e=e?e.then(a,a):a()}}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e,i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(i=function o(){for(;++e<t.length;)if(n.call(t,e))return o.value=t[e],o.done=!1,o;return o.value=r,o.done=!0,o}).next=i}return{next:k}}function k(){return{value:r,done:!0}}return c(L,"constructor",d.prototype=v),c(v,"constructor",d),d.displayName=c(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){return!!(t="function"==typeof t&&t.constructor)&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,a,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},x(b.prototype),c(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new b(u(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(L),c(L,a,"Generator"),c(L,o,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r,e=[];for(r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var e,n,o=this.tryEntries[r];if(o.tryLoc===t)return"throw"===(e=o.completion).type&&(n=e.arg,_(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime=r")(runtime)};
!function(t){"use strict";var n,r,e;r={},(e=function(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,e),o.l=!0,o.exports}).m=n=[function(t,n,r){r(1),r(67),r(68),r(72),t.exports=r(79)},function(n,r,e){var o=e(2),i=e(36),u=e(57),c=e(56);e=e(62);o({target:"Array",proto:!0},{at:function(n){var r=i(this),e=u(r);return(n=0<=(n=c(n))?n:e+n)<0||e<=n?t:r[n]}}),e("at")},function(n,r,e){var o=e(3),i=e(4).f,u=e(40),c=e(43),f=e(34),a=e(50),p=e(61);n.exports=function(n,r){var e,s,l,y=n.target,v=n.global,d=n.stat,b=v?o:d?o[y]||f(y,{}):(o[y]||{}).prototype;if(b)for(e in r){if(s=r[e],l=n.noTargetGet?(l=i(b,e))&&l.value:b[e],!p(v?e:y+(d?".":"#")+e,n.forced)&&l!==t){if(typeof s==typeof l)continue;a(s,l)}(n.sham||l&&l.sham)&&u(s,"sham",!0),c(b,e,s,n)}}},function(t,n){function r(t){return t&&t.Math==Math&&t}t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(t,n,r){var e=r(5),o=r(7),i=r(8),u=r(9),c=r(10),f=r(15),a=r(35),p=r(38),s=Object.getOwnPropertyDescriptor;n.f=e?s:function(t,n){if(t=c(t),n=f(n),p)try{return s(t,n)}catch(t){}if(a(t,n))return u(!o(i.f,t,n),t[n])}},function(t,n,r){r=r(6),t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,n,r){var e={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!e.call({1:2},1);n.f=i?function(t){return!!(t=o(this,t))&&t.enumerable}:e},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(11),o=r(14);t.exports=function(t){return e(o(t))}},function(t,n,r){var e=r(3),o=r(12),i=r(6),u=r(13),c=e.Object,f=o("".split);t.exports=i((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?f(t,""):c(t)}:c},function(t,n){var r=Function.prototype,e=r.bind,o=r.call,i=e&&e.bind(o);t.exports=e?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,n,r){var e=(r=r(12))({}.toString),o=r("".slice);t.exports=function(t){return o(e(t),8,-1)}},function(n,r,e){var o=e(3).TypeError;n.exports=function(n){if(n==t)throw o("Can't call method on "+n);return n}},function(t,n,r){var e=r(16),o=r(19);t.exports=function(t){return t=e(t,"string"),o(t)?t:t+""}},function(n,r,e){var o=e(3),i=e(7),u=e(17),c=e(19),f=e(26),a=e(29),p=(e=e(30),o.TypeError),s=e("toPrimitive");n.exports=function(n,r){if(!u(n)||c(n))return n;var e=f(n,s);if(e){if(e=i(e,n,r=r===t?"default":r),!u(e)||c(e))return e;throw p("Can't convert object to primitive value")}return a(n,r=r===t?"number":r)}},function(t,n,r){var e=r(18);t.exports=function(t){return"object"==typeof t?null!==t:e(t)}},function(t,n){t.exports=function(t){return"function"==typeof t}},function(t,n,r){var e=r(3),o=r(20),i=r(18),u=r(21),c=(r=r(22),e.Object);t.exports=r?function(t){return"symbol"==typeof t}:function(t){var n=o("Symbol");return i(n)&&u(n.prototype,c(t))}},function(n,r,e){var o=e(3),i=e(18);n.exports=function(n,r){return arguments.length<2?(e=o[n],i(e)?e:t):o[n]&&o[n][r];var e}},function(t,n,r){r=r(12),t.exports=r({}.isPrototypeOf)},function(t,n,r){r=r(23),t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,r){var e=r(24);r=r(6);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},function(t,n,r){var e,o,i=r(3),u=r(25);r=i.process,i=i.Deno;!(o=(i=(i=r&&r.versions||i&&i.version)&&i.v8)?0<(e=i.split("."))[0]&&e[0]<4?1:+(e[0]+e[1]):o)&&u&&(!(e=u.match(/Edge\/(\d+)/))||74<=e[1])&&(e=u.match(/Chrome\/(\d+)/))&&(o=+e[1]),t.exports=o},function(t,n,r){r=r(20),t.exports=r("navigator","userAgent")||""},function(n,r,e){var o=e(27);n.exports=function(n,r){return null==(r=n[r])?t:o(r)}},function(t,n,r){var e=r(3),o=r(18),i=r(28),u=e.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},function(t,n,r){var e=r(3).String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,n,r){var e=r(3),o=r(7),i=r(18),u=r(17),c=e.TypeError;t.exports=function(t,n){var r,e;if("string"===n&&i(r=t.toString)&&!u(e=o(r,t)))return e;if(i(r=t.valueOf)&&!u(e=o(r,t)))return e;if("string"!==n&&i(r=t.toString)&&!u(e=o(r,t)))return e;throw c("Can't convert object to primitive value")}},function(t,n,r){var e=r(3),o=r(31),i=r(35),u=r(37),c=r(23),f=r(22),a=o("wks"),p=e.Symbol,s=p&&p.for,l=f?p:p&&p.withoutSetter||u;t.exports=function(t){var n;return i(a,t)&&(c||"string"==typeof a[t])||(n="Symbol."+t,c&&i(p,t)?a[t]=p[t]:a[t]=(f&&s?s:l)(n)),a[t]}},function(n,r,e){var o=e(32),i=e(33);(n.exports=function(n,r){return i[n]||(i[n]=r!==t?r:{})})("versions",[]).push({version:"3.19.1",mode:o?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!1},function(t,n,r){var e=r(3),o=r(34);r=e[r="__core-js_shared__"]||o(r,{});t.exports=r},function(t,n,r){var e=r(3),o=Object.defineProperty;t.exports=function(t,n){try{o(e,t,{value:n,configurable:!0,writable:!0})}catch(r){e[t]=n}return n}},function(t,n,r){var e=r(12),o=r(36),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,n){return i(o(t),n)}},function(t,n,r){var e=r(3),o=r(14),i=e.Object;t.exports=function(t){return i(o(t))}},function(n,r,e){e=e(12);var o=0,i=Math.random(),u=e(1..toString);n.exports=function(n){return"Symbol("+(n===t?"":n)+")_"+u(++o+i,36)}},function(t,n,r){var e=r(5),o=r(6),i=r(39);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,r){var e=r(3),o=(r=r(17),e.document),i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(5),o=r(41),i=r(9);t.exports=e?function(t,n,r){return o.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(3),o=r(5),i=r(38),u=r(42),c=r(15),f=e.TypeError,a=Object.defineProperty;n.f=o?a:function(t,n,r){if(u(t),n=c(n),u(r),i)try{return a(t,n,r)}catch(t){}if("get"in r||"set"in r)throw f("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(3),o=r(17),i=e.String,u=e.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},function(n,r,e){var o=e(3),i=e(18),u=e(35),c=e(40),f=e(34),a=e(44),p=e(45),s=e(49).CONFIGURABLE,l=p.get,y=p.enforce,v=String(String).split("String");(n.exports=function(n,r,e,a){var p=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet,b=a&&a.name!==t?a.name:r;i(e)&&("Symbol("===String(b).slice(0,7)&&(b="["+String(b).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!u(e,"name")||s&&e.name!==b)&&c(e,"name",b),(a=y(e)).source||(a.source=v.join("string"==typeof b?b:""))),n!==o?(p?!d&&n[r]&&(l=!0):delete n[r],l?n[r]=e:c(n,r,e)):l?n[r]=e:f(r,e)})(Function.prototype,"toString",(function(){return i(this)&&l(this).source||a(this)}))},function(t,n,r){var e=r(12),o=r(18),i=(r=r(33),e(Function.toString));o(r.inspectSource)||(r.inspectSource=function(t){return i(t)}),t.exports=r.inspectSource},function(t,n,r){var e,o,i,u,c,f,a,p,s=r(46),l=r(3),y=r(12),v=r(17),d=r(40),b=r(35),g=r(33),m=r(47),h=(r=r(48),"Object already initialized"),x=l.TypeError;l=l.WeakMap;a=s||g.state?(e=g.state||(g.state=new l),o=y(e.get),i=y(e.has),u=y(e.set),c=function(t,n){if(i(e,t))throw new x(h);return n.facade=t,u(e,t,n),n},f=function(t){return o(e,t)||{}},function(t){return i(e,t)}):(r[p=m("state")]=!0,c=function(t,n){if(b(t,p))throw new x(h);return n.facade=t,d(t,p,n),n},f=function(t){return b(t,p)?t[p]:{}},function(t){return b(t,p)}),t.exports={set:c,get:f,has:a,enforce:function(t){return a(t)?f(t):c(t,{})},getterFor:function(t){return function(n){var r;if(!v(n)||(r=f(n)).type!==t)throw x("Incompatible receiver, "+t+" required");return r}}}},function(t,n,r){var e=r(3),o=r(18);r=r(44),e=e.WeakMap;t.exports=o(e)&&/native code/.test(r(e))},function(t,n,r){var e=r(31),o=r(37),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){t.exports={}},function(t,n,r){var e=r(5),o=r(35),i=Function.prototype,u=e&&Object.getOwnPropertyDescriptor;o=(r=o(i,"name"))&&"something"===function(){}.name,i=r&&(!e||e&&u(i,"name").configurable);t.exports={EXISTS:r,PROPER:o,CONFIGURABLE:i}},function(t,n,r){var e=r(35),o=r(51),i=r(4),u=r(41);t.exports=function(t,n){for(var r=o(n),c=u.f,f=i.f,a=0;a<r.length;a++){var p=r[a];e(t,p)||c(t,p,f(n,p))}}},function(t,n,r){var e=r(20),o=r(12),i=r(52),u=r(60),c=r(42),f=o([].concat);t.exports=e("Reflect","ownKeys")||function(t){var n=i.f(c(t)),r=u.f;return r?f(n,r(t)):n}},function(t,n,r){var e=r(53),o=r(59).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},function(t,n,r){var e=r(12),o=r(35),i=r(10),u=r(54).indexOf,c=r(48),f=e([].push);t.exports=function(t,n){var r,e=i(t),a=0,p=[];for(r in e)!o(c,r)&&o(e,r)&&f(p,r);for(;n.length>a;)o(e,r=n[a++])&&(~u(p,r)||f(p,r));return p}},function(t,n,r){var e=r(10),o=r(55),i=r(57);r=function(t){return function(n,r,u){var c,f=e(n),a=i(f),p=o(u,a);if(t&&r!=r){for(;p<a;)if((c=f[p++])!=c)return!0}else for(;p<a;p++)if((t||p in f)&&f[p]===r)return t||p||0;return!t&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},function(t,n,r){var e=r(56),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=e(t))<0?o(t+n,0):i(t,n)}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return(t=+t)!=t||0==t?0:(0<t?e:r)(t)}},function(t,n,r){var e=r(58);t.exports=function(t){return e(t.length)}},function(t,n,r){var e=r(56),o=Math.min;t.exports=function(t){return 0<t?o(e(t),9007199254740991):0}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(6),o=r(18),i=/#|\.prototype\./,u=(r=function(t,n){return(t=c[u(t)])==a||t!=f&&(o(n)?e(n):!!n)},r.normalize=function(t){return String(t).replace(i,".").toLowerCase()}),c=r.data={},f=r.NATIVE="N",a=r.POLYFILL="P";t.exports=r},function(n,r,e){var o=e(30),i=e(63),u=(e=e(41),o("unscopables")),c=Array.prototype;c[u]==t&&e.f(c,u,{configurable:!0,value:i(null)}),n.exports=function(t){c[u][t]=!0}},function(n,r,e){function o(){}function i(t){return"<script>"+t+"</"+v+">"}var u,c=e(42),f=e(64),a=e(59),p=e(48),s=e(66),l=e(39),y=(e=e(47),"prototype"),v="script",d=e("IE_PROTO"),b=function(){try{u=new ActiveXObject("htmlfile")}catch(t){}var t;b="undefined"==typeof document||document.domain&&u?function(t){t.write(i("")),t.close();var n=t.parentWindow.Object;return t=null,n}(u):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(i("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete b[y][a[n]];return b()};p[d]=!0,n.exports=Object.create||function(n,r){var e;return null!==n?(o[y]=c(n),e=new o,o[y]=null,e[d]=n):e=b(),r===t?e:f(e,r)}},function(t,n,r){var e=r(5),o=r(41),i=r(42),u=r(10),c=r(65);t.exports=e?Object.defineProperties:function(t,n){i(t);for(var r,e=u(n),f=c(n),a=f.length,p=0;p<a;)o.f(t,r=f[p++],e[r]);return t}},function(t,n,r){var e=r(53),o=r(59);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){r=r(20),t.exports=r("document","documentElement")},function(t,n,r){r(2)({target:"Object",stat:!0},{hasOwn:r(35)})},function(n,r,e){var o=e(2),i=e(12),u=e(14),c=e(56),f=e(69),a=(e=e(6),i("".charAt));o({target:"String",proto:!0,forced:e((function(){return"\ud842"!=="𠮷".at(0)}))},{at:function(n){var r=f(u(this)),e=r.length;return(n=0<=(n=c(n))?n:e+n)<0||e<=n?t:a(r,n)}})},function(t,n,r){var e=r(3),o=r(70),i=e.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(n,r,e){var o=e(3),i=e(71),u=e(18),c=e(13),f=e(30)("toStringTag"),a=o.Object,p="Arguments"==c(function(){return arguments}());n.exports=i?c:function(n){var r;return n===t?"Undefined":null===n?"Null":"string"==typeof(n=function(t,n){try{return t[n]}catch(t){}}(r=a(n),f))?n:p?c(r):"Object"==(n=c(r))&&u(r.callee)?"Arguments":n}},function(t,n,r){var e={};e[r(30)("toStringTag")]="z",t.exports="[object z]"===String(e)},function(n,r,e){var o=e(73),i=e(57),u=e(56),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("at",(function(n){var r=c(this),e=i(r);return(n=0<=(n=u(n))?n:e+n)<0||e<=n?t:r[n]}))},function(n,r,e){function o(t){return!!l(t)&&(t=v(t),y(M,t)||y(C,t))}var i,u,c,f=e(74),a=e(5),p=e(3),s=e(18),l=e(17),y=e(35),v=e(70),d=e(28),b=e(40),g=e(43),m=e(41).f,h=e(21),x=e(75),O=e(77),S=e(30),j=e(37),w=(P=p.Int8Array)&&P.prototype,A=(e=(e=p.Uint8ClampedArray)&&e.prototype,P&&x(P)),T=w&&x(w),P=Object.prototype,_=p.TypeError,E=(S=S("toStringTag"),j("TYPED_ARRAY_TAG")),I=j("TYPED_ARRAY_CONSTRUCTOR"),R=f&&!!O&&"Opera"!==v(p.opera),M=(f=!1,{Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8}),C={BigInt64Array:8,BigUint64Array:8};for(i in M)(c=(u=p[i])&&u.prototype)?b(c,I,u):R=!1;for(i in C)(c=(u=p[i])&&u.prototype)&&b(c,I,u);if((!R||!s(A)||A===Function.prototype)&&(A=function(){throw _("Incorrect invocation")},R))for(i in M)p[i]&&O(p[i],A);if((!R||!T||T===P)&&(T=A.prototype,R))for(i in M)p[i]&&O(p[i].prototype,T);if(R&&x(e)!==T&&O(e,T),a&&!y(T,S))for(i in f=!0,m(T,S,{get:function(){return l(this)?this[E]:t}}),M)p[i]&&b(p[i],E,i);n.exports={NATIVE_ARRAY_BUFFER_VIEWS:R,TYPED_ARRAY_CONSTRUCTOR:I,TYPED_ARRAY_TAG:f&&E,aTypedArray:function(t){if(o(t))return t;throw _("Target is not a typed array")},aTypedArrayConstructor:function(t){if(s(t)&&(!O||h(A,t)))return t;throw _(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,n,r){if(a){if(r)for(var e in M)if((e=p[e])&&y(e.prototype,t))try{delete e.prototype[t]}catch(t){}T[t]&&!r||g(T,t,!r&&R&&w[t]||n)}},exportTypedArrayStaticMethod:function(t,n,r){var e,o;if(a){if(O){if(r)for(e in M)if((o=p[e])&&y(o,t))try{delete o[t]}catch(t){}if(A[t]&&!r)return;try{return g(A,t,!r&&R&&A[t]||n)}catch(t){}}for(e in M)!(o=p[e])||o[t]&&!r||g(o,t,n)}},isView:function(t){return!!l(t)&&("DataView"===(t=v(t))||y(M,t)||y(C,t))},isTypedArray:o,TypedArray:A,TypedArrayPrototype:T}},function(t,n){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,n,r){var e=r(3),o=r(35),i=r(18),u=r(36),c=r(47),f=(r=r(76),c("IE_PROTO")),a=e.Object,p=a.prototype;t.exports=r?a.getPrototypeOf:function(t){var n=u(t);return o(n,f)?n[f]:(t=n.constructor,i(t)&&n instanceof t?t.prototype:n instanceof a?p:null)}},function(t,n,r){r=r(6),t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(n,r,e){var o=e(12),i=e(42),u=e(78);n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,r={};try{(t=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),n=r instanceof Array}catch(r){}return function(r,e){return i(r),u(e),n?t(r,e):r.__proto__=e,r}}():t)},function(t,n,r){var e=r(3),o=r(18),i=e.String,u=e.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw u("Can't set "+i(t)+" as a prototype")}},function(t,n,r){var e=r(2),o=r(3);r=r(80);e({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:r.set,clearImmediate:r.clear})},function(n,r,e){var o,i,u=e(3),c=e(81),f=e(82),a=e(18),p=e(35),s=e(6),l=e(66),y=e(83),v=e(39),d=e(84),b=e(85),g=u.setImmediate,m=u.clearImmediate,h=u.process,x=u.Dispatch,O=u.Function,S=u.MessageChannel,j=u.String,w=0,A={},T="onreadystatechange";try{o=u.location}catch(n){}function P(t){var n;p(A,t)&&(n=A[t],delete A[t],n())}function _(t){return function(){P(t)}}function E(t){P(t.data)}e=function(t){u.postMessage(j(t),o.protocol+"//"+o.host)},g&&m||(g=function(n){var r=y(arguments,1);return A[++w]=function(){c(a(n)?n:O(n),t,r)},i(w),w},m=function(t){delete A[t]},b?i=function(t){h.nextTick(_(t))}:x&&x.now?i=function(t){x.now(_(t))}:S&&!d?(S=(d=new S).port2,d.port1.onmessage=E,i=f(S.postMessage,S)):u.addEventListener&&a(u.postMessage)&&!u.importScripts&&o&&"file:"!==o.protocol&&!s(e)?(i=e,u.addEventListener("message",E,!1)):i=T in v("script")?function(t){l.appendChild(v("script"))[T]=function(){l.removeChild(this),P(t)}}:function(t){setTimeout(_(t),0)}),n.exports={set:g,clear:m}},function(t,n){var r=Function.prototype,e=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(e):function(){return i.apply(e,arguments)})},function(n,r,e){var o=e(12),i=e(27),u=o(o.bind);n.exports=function(n,r){return i(n),r===t?n:u?u(n,r):function(){return n.apply(r,arguments)}}},function(t,n,r){r=r(12),t.exports=r([].slice)},function(t,n,r){r=r(25),t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,n,r){var e=r(13);r=r(3);t.exports="process"==e(r.process)}],e.c=r,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}();
!function(){"use strict";const e=e=>Math.abs(parseInt(e,10)),t=(e,t)=>{const r=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["payment_required","payment-required"]]);r.has(t)&&(t=r.get(t)),Array.from(r.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const n=e.getAttribute("data-status");return e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),n&&n!==t&&e.classList.remove(n),t},r=(e,t,r)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:r});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=e=>{const{root:t,namespace:r="contact-form-7/v1"}=wpcf7.api;return a.reduceRight(((e,t)=>r=>t(r,e)),(e=>{let n,a,{url:c,path:s,endpoint:o,headers:i,body:l,data:p,...d}=e;"string"==typeof o&&(n=r.replace(/^\/|\/$/g,""),a=o.replace(/^\//,""),s=a?n+"/"+a:n),"string"==typeof s&&(-1!==t.indexOf("?")&&(s=s.replace("?","&")),s=s.replace(/^\//,""),c=t+s),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const u={code:"fetch_error",message:"You are probably offline."},f={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||s||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw f}));throw f}))),(()=>{throw u}))}))(e)},a=[];function c(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(wpcf7.blocked)return s(e),void t(e,"submitting");const c=new FormData(e);a.submitter&&a.submitter.name&&c.append(a.submitter.name,a.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],r=e[1];return!t.match(/^_/)&&{name:t,value:r}})).filter((e=>!1!==e)),formData:c},i=t=>{const r=document.createElement("li");r.setAttribute("id",t.error_id),t.idref?r.insertAdjacentHTML("beforeend",`<a href="#${t.idref}">${t.message}</a>`):r.insertAdjacentText("beforeend",t.message),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(r)},l=t=>{const r=e.querySelector(t.into),n=r.querySelector(".wpcf7-form-control");n.classList.add("wpcf7-not-valid"),n.setAttribute("aria-describedby",t.error_id);const a=document.createElement("span");a.setAttribute("class","wpcf7-not-valid-tip"),a.setAttribute("aria-hidden","true"),a.insertAdjacentText("beforeend",t.message),r.appendChild(a),r.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),n.closest(".use-floating-validation-tip")&&(n.addEventListener("focus",(e=>{a.setAttribute("style","display: none")})),a.addEventListener("mouseover",(e=>{a.setAttribute("style","display: none")})))};n({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((n=>{const a=t(e,n.status);return o.status=n.status,o.apiResponse=n,["invalid","unaccepted","spam","aborted"].includes(a)?r(e,a,o):["sent","failed"].includes(a)&&r(e,`mail${a}`,o),r(e,"submit",o),n})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&(t.invalid_fields.forEach(i),t.invalid_fields.forEach(l)),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}n.use=e=>{a.unshift(e)},n.use(((e,n)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:n,detail:a}=e.wpcf7;s(n),r(n,"beforesubmit",a),t(n,"submitting")}return n(e)}));const s=e=>{e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.wpcf7.parent.querySelector(".screen-reader-response ul").innerText="",e.querySelectorAll(".wpcf7-not-valid-tip").forEach((e=>{e.remove()})),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid")})),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function o(e){const a=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(a,(e=>{const t=e[0],r=e[1];return!t.match(/^_/)&&{name:t,value:r}})).filter((e=>!1!==e)),formData:a};n({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((n=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,t(e,"mail_sent")):t(e,"init"),c.apiResponse=n,r(e,"reset",c)})).catch((e=>console.error(e)))}n.use(((e,r)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:r,detail:n}=e.wpcf7;s(r),t(r,"resetting")}return r(e)}));const i=(e,t)=>{for(const r in t){const n=t[r];e.querySelectorAll(`input[name="${r}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${r}`).forEach((e=>{e.setAttribute("src",n)}));const a=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);a&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${r}"]`).forEach((e=>{e.value=a[1]}))}},l=(e,t)=>{for(const r in t){const n=t[r][0],a=t[r][1];e.querySelectorAll(`.wpcf7-form-control-wrap.${r}`).forEach((e=>{e.querySelector(`input[name="${r}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${r}"]`).value=a}))}};function p(t){const r=new FormData(t);t.wpcf7={id:e(r.get("_wpcf7")),status:t.getAttribute("data-status"),pluginVersion:r.get("_wpcf7_version"),locale:r.get("_wpcf7_locale"),unitTag:r.get("_wpcf7_unit_tag"),containerPost:e(r.get("_wpcf7_container_post")),parent:t.closest(".wpcf7")},t.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const r=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${r}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(t),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const r=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');r.disabled=!n.checked,e.addEventListener("change",(e=>{r.disabled=!n.checked,e.target===n&&n.checked&&r.focus()}))}))})(t),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let r=e.value.trim();r&&!r.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==r.indexOf(".")&&(r=r.replace(/^\/+/,""),r="http://"+r),e.value=r}))}))})(t),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const r=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&r.checked||!e.classList.contains("invert")&&!r.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(t),(t=>{const r=(t,r)=>{const n=e(t.getAttribute("data-starting-value")),a=e(t.getAttribute("data-maximum-value")),c=e(t.getAttribute("data-minimum-value")),s=t.classList.contains("down")?n-r.value.length:r.value.length;t.setAttribute("data-current-value",s),t.innerText=s,a&&a<r.value.length?t.classList.add("too-long"):t.classList.remove("too-long"),c&&r.value.length<c?t.classList.add("too-short"):t.classList.remove("too-short")},n=e=>{e={init:!1,...e},t.querySelectorAll(".wpcf7-character-count").forEach((n=>{const a=n.getAttribute("data-target-name"),c=t.querySelector(`[name="${a}"]`);c&&(c.value=c.defaultValue,r(n,c),e.init&&c.addEventListener("keyup",(e=>{r(n,c)})))}))};n({init:!0}),t.addEventListener("wpcf7reset",(e=>{n()}))})(t),window.addEventListener("load",(e=>{wpcf7.cached&&t.reset()})),t.addEventListener("reset",(e=>{wpcf7.reset(t)})),t.addEventListener("submit",(e=>{const r=e.submitter;wpcf7.submit(t,{submitter:r}),e.preventDefault()})),t.addEventListener("wpcf7submit",(e=>{e.detail.apiResponse.captcha&&i(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&l(t,e.detail.apiResponse.quiz)})),t.addEventListener("wpcf7reset",(e=>{e.detail.apiResponse.captcha&&i(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&l(t,e.detail.apiResponse.quiz)}))}document.addEventListener("DOMContentLoaded",(e=>{var t;if("undefined"==typeof wpcf7)return void console.error("wpcf7 is not defined.");if(void 0===wpcf7.api)return void console.error("wpcf7.api is not defined.");if("function"!=typeof window.fetch)return void console.error("Your browser doesn't support window.fetch().");if("function"!=typeof window.FormData)return void console.error("Your browser doesn't support window.FormData().");const r=document.querySelectorAll(".wpcf7 > form");"function"==typeof r.forEach?(wpcf7={init:p,submit:c,reset:o,...null!==(t=wpcf7)&&void 0!==t?t:{}},r.forEach((e=>wpcf7.init(e)))):console.error("Your browser doesn't support NodeList.forEach().")}))}();
var wpcf7_redirect;
(function ($){
function Wpcf7_redirect(){
this.init=function (){
this.wpcf7_redirect_mailsent_handler();
};
this.wpcf7_redirect_mailsent_handler=function (){
document.addEventListener('wpcf7mailsent', function (event){
$(document.body).trigger('wpcf7r-mailsent', [event]);
if(typeof event.detail.apiResponse!='undefined'&&event.detail.apiResponse){
var apiResponse=event.detail.apiResponse;
var actionDelay=0;
if(typeof apiResponse.api_url_request!='undefined'&&apiResponse.api_url_request){
wpcf7_redirect.handle_api_action(apiResponse.api_url_request);
}
if(typeof apiResponse.api_json_xml_request!='undefined'&&apiResponse.api_json_xml_request){
wpcf7_redirect.handle_api_action(apiResponse.api_json_xml_request);
}
if(typeof apiResponse.FireScript!='undefined'&&apiResponse.FireScript){
actionDelay=typeof apiResponse.FireScript.delay_redirect!='undefined' ? apiResponse.FireScript.delay_redirect:actionDelay;
window.setTimeout(function (){
wpcf7_redirect.handle_javascript_action(apiResponse.FireScript);
}, actionDelay);
}
if(typeof apiResponse.popup!='undefined'&&apiResponse.popup){
wpcf7_redirect.handle_popups(apiResponse.popup);
}
if(typeof apiResponse.redirect_to_paypal!='undefined'&&apiResponse.redirect_to_paypal){
actionDelay=typeof apiResponse.redirect_to_paypal.delay_redirect!='undefined' ? apiResponse.redirect_to_paypal.delay_redirect:actionDelay;
window.setTimeout(function (){
wpcf7_redirect.handle_redirect_action(apiResponse.redirect_to_paypal);
}, actionDelay);
}
if(typeof apiResponse.redirect!='undefined'&&apiResponse.redirect){
actionDelay=typeof apiResponse.redirect.delay_redirect!='undefined' ? apiResponse.redirect.delay_redirect:actionDelay;
window.setTimeout(function (){
wpcf7_redirect.handle_redirect_action(apiResponse.redirect);
}, actionDelay);
}}
}, false);
document.addEventListener('wpcf7invalid', function (event){
$(document.body).trigger('wpcf7r-invalid', [event]);
if(typeof event.detail.apiResponse!='undefined'&&event.detail.apiResponse){
response=event.detail.apiResponse;
if(response.invalidFields){
wpcf7_redirect.ninja_multistep_mov_to_invalid_tab(event, response);
}}
});
};
this.handle_popups=function (popups){
$(document.body).trigger('wpcf7r-before-open-popup', [event]);
$.each(popups, function (k, popup){
var $new_elem=$(popup['popup-template']);
$(document.body).append($new_elem);
$(document.body).addClass(popup['template-name']);
window.setTimeout(function (){
$(document.body).addClass('modal-popup-open');
$new_elem.addClass('is-open');
}, 1000);
$new_elem.find('.close-button').on('click', function (){
$new_elem.removeClass('is-open').addClass('fade');
$(document.body).removeClass('modal-popup-open');
window.setTimeout(function (){
$('.wpcf7r-modal').remove();
$(document.body).trigger('wpcf7r-popup-removed', [$new_elem]);
}, 4000);
});
$(document.body).trigger('wpcf7r-popup-appended', [$new_elem]);
});
}
this.handle_api_action=function (send_to_api_result, request){
$.each(send_to_api_result, function (k, v){
if(!v.result_javascript){
return;
}
response=typeof v.api_response!='undefined' ? v.api_response:'';
request=typeof v.request!='undefined' ? v.request:'';
eval(v.result_javascript);
});
};
this.ninja_multistep_mov_to_invalid_tab=function (event, response){
if($('.fieldset-cf7mls-wrapper').length){
var form=$(event.target);
var first_invalid_field=response.invalidFields[0];
var parent_step=$(first_invalid_field.into).parents('fieldset');
form.find('.fieldset-cf7mls').removeClass('cf7mls_current_fs');
parent_step.addClass('cf7mls_current_fs').removeClass('cf7mls_back_fs');
if(form.find('.cf7mls_progress_bar').length){
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(previous_fs)).addClass("current");
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(current_fs)).removeClass("active current");
}}
}
this.handle_redirect_action=function (redirect){
$(document.body).trigger('wpcf7r-handle_redirect_action', [redirect]);
$.each(redirect, function (k, v){
var delay=typeof v.delay!='undefined'&&v.delay ? v.delay:'';
delay=delay * 1000;
window.setTimeout(function (v){
var redirect_url=typeof v.redirect_url!='undefined'&&v.redirect_url ? v.redirect_url:'';
var type=typeof v.type!='undefined'&&v.type ? v.type:'';
if(typeof v.form!='undefined'&&v.form){
$('body').append(v.form);
$('#cf7r-result-form').submit();
}else{
if(redirect_url&&type=='redirect'){
window.location=redirect_url;
}else if(redirect_url&&type=='new_tab'){
window.open(redirect_url);
}}
}, delay, v);
});
};
this.handle_javascript_action=function (scripts){
$(document.body).trigger('wpcf7r-handle_javascript_action', [scripts]);
$.each(scripts, function (k, script){
eval(script);
});
};
this.htmlspecialchars_decode=function (string){
var map={
'&amp;': '&',
'&#038;': "&",
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#039;': "'",
'&#8217;': "’",
'&#8216;': "‘",
'&#8211;': "–",
'&#8212;': "—",
'&#8230;': "…",
'&#8221;': '”'
};
return string.replace(/\&[\w\d\#]{2,5}\;/g, function (m){ return map[m]; });
};
this.init();
}
wpcf7_redirect=new Wpcf7_redirect();
})(jQuery);
(()=>{var e={575:e=>{e.exports=function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},913:e=>{function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},318:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0}},t={};function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,__webpack_require__),o.exports}(()=>{"use strict";var e=__webpack_require__(318),t=e(__webpack_require__(575)),n=e(__webpack_require__(913)),r=function(){function elementorHelloThemeHandler(){(0,t.default)(this,elementorHelloThemeHandler),this.initSettings(),this.initElements(),this.bindEvents()}return(0,n.default)(elementorHelloThemeHandler,[{key:"initSettings",value:function initSettings(){this.settings={selectors:{header:"header.site-header",footer:"footer.site-footer",menuToggle:".site-header .site-navigation-toggle",menuToggleHolder:".site-header .site-navigation-toggle-holder",dropdownMenu:".site-header .site-navigation-dropdown"}}}},{key:"initElements",value:function initElements(){this.elements={$window:jQuery(window),$document:jQuery(document),$header:jQuery(this.settings.selectors.header),$footer:jQuery(this.settings.selectors.footer),$menuToggle:jQuery(this.settings.selectors.menuToggle),$menuToggleHolder:jQuery(this.settings.selectors.menuToggleHolder),$dropdownMenu:jQuery(this.settings.selectors.dropdownMenu)}}},{key:"bindEvents",value:function bindEvents(){var e=this;this.elements.$menuToggle.on("click",(function(){return e.handleMenuToggle()})),this.elements.$dropdownMenu.on("click",".menu-item-has-children > a",this.handleMenuChildren)}},{key:"closeMenuItems",value:function closeMenuItems(){var e=this;this.elements.$menuToggleHolder.removeClass("elementor-active"),this.elements.$window.off("resize",(function(){return e.closeMenuItems()}))}},{key:"handleMenuToggle",value:function handleMenuToggle(){var e=this,t=!this.elements.$menuToggleHolder.hasClass("elementor-active");this.elements.$menuToggle.attr("aria-expanded",t),this.elements.$dropdownMenu.attr("aria-hidden",!t),this.elements.$menuToggleHolder.toggleClass("elementor-active",t),this.elements.$dropdownMenu.find(".elementor-active").removeClass("elementor-active"),t?this.elements.$window.on("resize",(function(){return e.closeMenuItems()})):this.elements.$window.off("resize",(function(){return e.closeMenuItems()}))}},{key:"handleMenuChildren",value:function handleMenuChildren(e){var t=jQuery(e.currentTarget).parent("li");t.hasClass("elementor-active")?t.removeClass("elementor-active"):t.addClass("elementor-active")}}]),elementorHelloThemeHandler}();jQuery((function(){new r}))})()})();
!function(e){"use strict";const s="morphext",i={animation:"bounce",speed:2e3,autoInit:!0,phrases:[],animateCssVersion:"4.1.1",autoAttachAnimateCss:!0};function n(t){this.element=e(t),this._settings=e.extend({},i,JSON.parse(this.element.attr("data-morphext-options"))),this._defaults=i,this._init()}n.prototype={_init:function(){var t;this.element.addClass("morphext"),this._settings.autoAttachAnimateCss&&(t=`https://cdnjs.cloudflare.com/ajax/libs/animate.css/${this._settings.animateCssVersion}/animate.min.css`,e(`link[href='${t}']`).length||e(`<link href="${t}" rel="stylesheet">`).appendTo("head")),this._index=0,this.animate(),this.start()},animate:function(){this._index=this._index%this._settings.phrases.length;const t=document.createElement("span");t.classList.add("morphext__animated","animate__animated",`animate__${this._settings.animation}`),e(t).text(this._settings.phrases[this._index]),this.element.html(e(t).prop("outerHTML")),this._index+=1},start:function(){var t=this;this._interval=setInterval(function(){t.animate()},this._settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},e.fn[s]=function(t){return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new n(this))})}}(jQuery);
jQuery(document).ready(function($){
var x='';
var adminBarHeight=0;
if($("#wpadminbar").length!=0){
adminBarHeight=$('#wpadminbar').height();
}
jQuery('.welcomebar-hidden-sliding-text').each(function(){
var sliding_text_width=jQuery(this).outerWidth();
var sliding_text_height=jQuery(this).outerHeight();
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
jQuery(this).parent().css('min-width', sliding_text_width + 'px');
}
jQuery(this).parent().css('min-height', sliding_text_height + 'px');
});
jQuery('.mysticky-welcomebar-fixed').each(function(){
var welcomebar_widget=jQuery(this).data('welcomebar-widget');
if(jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position')=='top'){
jQuery('.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('top', '-' + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight() + 'px');
}else{
jQuery('.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom', '-' + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight() + 'px');
}
var welcombar_aftersubmission=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('aftersubmission');
if(welcombar_aftersubmission=='dont_show_welcomebar'){
var welcomebar_storage=localStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else if(welcombar_aftersubmission=='show_welcomebar_next_visit'){
var welcomebar_storage=sessionStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else{
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
var welcomebar_storage=null;
}
var is_close_trigger=localStorage.getItem("is_close_trigger_" + welcomebar_widget);
var is_button_trigger=localStorage.getItem("is_button_trigger_" + welcomebar_widget);
if(jQuery(this).data("isenablecoupon")==1&&welcomebar_storage!==null&&jQuery(this).data("btn-click-action")=='show_coupon'&&is_close_trigger==null&&is_button_trigger=='yes'){
welcomebar_storage=null;
jQuery(this).find(".mysticky-welcomebar-content").hide();
jQuery(this).find(".mysticky-welcomebar-btn").hide();
jQuery(this).find(".mysticky-couponbar-content").show();
jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget + " .count-down-timer-box").hide();
if(jQuery(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").length > 0){
jQuery(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").hide();
}}
if(welcomebar_storage===null){
var after_trigger=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('after-triger');
if(after_trigger=='after_a_few_seconds'){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-desktop')){
if($(window).width() > 1024){
var trigger_sec=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec') * 1000;
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
var divi_topbar_height=$('.et_fixed_nav #top-header').outerHeight();
var divi_total_height=welcombar_height + divi_topbar_height;
setTimeout(function(){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget + ' .mysticky-welcomebar-animation-text').morphext();
$('html,body').addClass('mysticky-welcomebar-apper');
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var welcomebar_widget_index=$(this).data('welcomebar-widget');
var welcomebar_widget_ready=$(this).data('welcomebar-widget');
var welcombar_position_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).data('position');
var welcombar_height_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(welcombar_position_ready=='top'){
var new_welcombar_position=adminBarHeight + welcomebar_widget_index + new_welcombar_height_top;
if(index!=0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
var new_welcombar_position=adminBarHeight + 0 + new_welcombar_height_top;
}
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('top', new_welcombar_position);
$('.et_fixed_nav #top-header').css('top', new_welcombar_position + 'px');
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
var new_welcomebar_height=adminBarHeight + welcombar_height_ready + new_welcombar_margin_top;
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('#mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top=new_welcombar_margin_top + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
var new_welcomebar_height=welcombar_height_ready + new_welcombar_padding_bottom;
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}}
});
if(welcombar_position=='top'){
$('#mysticky_divi_style').remove();
$('head').append('<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
$('#mysticky_divi_style').remove();
$('.et_fixed_nav #top-header').css('top', '');
}}, trigger_sec);
}}
}
if($(window).width() <=1024){
if(after_trigger=='after_a_few_seconds'){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
var trigger_sec=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec') * 1000;
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
setTimeout(function(){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget + ' .mysticky-welcomebar-animation-text').morphext();
$('html,body').addClass('mysticky-welcomebar-apper');
$('#mysticky_divi_style').remove();
$('.et_fixed_nav #top-header').css('top', '');
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var welcomebar_widget_ready=$(this).data('welcomebar-widget');
var welcombar_position_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).data('position');
var welcombar_height_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(welcombar_position_ready=='top'){
if(index==0){
var new_welcombar_position=0 + adminBarHeight + new_welcombar_height_top;
var new_welcomebar_height=welcombar_height_ready + adminBarHeight + new_welcombar_margin_top;
}else{
var new_welcombar_position=0 + new_welcombar_height_top;
var new_welcomebar_height=welcombar_height_ready + new_welcombar_margin_top + adminBarHeight;
}
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('top', new_welcombar_position);
$('.et_fixed_nav #top-header').css('top', new_welcombar_position + 'px');
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' +(new_welcomebar_height) + 'px !important');
$('#mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top=new_welcombar_margin_top + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
var new_welcomebar_height=welcombar_height_ready + new_welcombar_padding_bottom;
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}}
});
if(welcombar_position=='top'){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('head').append('<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
$('.et_fixed_nav #top-header').css('top', '');
}}, trigger_sec);
}}
}
mystickyelements_present(welcomebar_widget);
}
jQuery('.count-down-timer-box').each(function(){
var timerBgColor=$(this).data('timerbgcolor');
var timerTxtColor=$(this).data('timertxtcolor');
var welcomebarTextColor=$(this).data('welcombar-textcolor');
var divId="#"+$(this).attr('id');
var expiredDate='';
var expiredTime='';
var timer_from=$(this).data('timerfrom');
var timezone='';
var data_endTime='';
if(timer_from=='timer_apperance'){
expiredDate=$(this).data('enddate');
expiredTime=$(this).data('endtime');
expiredDate=new Date(expiredDate + ' ' + expiredTime);
data_endTime=$(this).data('endtime');
timezone=$(this).data('timezone');
}else{
expiredDate=new Date();
var expirHour=$(this).data('hour');
var expirMinute=$(this).data('minute');
var expirSecond=$(this).data('second');
var expire_time=readMyStickyMenuCookie('welcombar-countdowntime-'+ welcomebar_widget);
if(expire_time!=null){
expiredDate=new Date(expire_time);
}else{
createMyStickyMenuCookie('welcombar-countdowntime-'+ welcomebar_widget, expiredDate, 1);
}
expirHour=parseInt(expirHour) + parseInt(expiredDate.getHours());
expirMinute=parseInt(expirMinute) + parseInt(expiredDate.getMinutes());
expirSecond=parseInt(expirSecond) + parseInt(expiredDate.getSeconds() + 2);
var trigger_sec=($(".mysticky-welcomebar-widget-"+welcomebar_widget).data("triger-sec")!=''&&$(".mysticky-welcomebar-widget-"+welcomebar_widget).data("after-triger")=='after_a_few_seconds') ? $(".mysticky-welcomebar-widget-"+welcomebar_widget).data("triger-sec"):'3';
expirSecond=expirSecond + parseInt(trigger_sec);
expiredDate.setHours(parseInt(expirHour));
expiredDate.setMinutes(parseInt(expirMinute));
expiredDate.setSeconds(parseInt(expirSecond));
}
var num=/^[-+]?[0-9]+\.[0-9]+$/;
var plus_number=/^[-+]?[0-9]+$/;
timezone=timezone.toString().replace("-", "");
if(expiredDate=='Invalid Date'){
jQuery(window).trigger('resize');
jQuery(divId).html("");
return;
}
var checkTimerSet=setInterval(function(){
if(jQuery(divId + " .counter-main-block").length > 0){
jQuery(window).trigger('resize');
clearInterval(checkTimerSet);
}},1000);
var timer=setInterval(function(){
var position=0;
if($('.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-position-top')){
position=parseInt($('.mysticky-welcomebar-widget-' + welcomebar_widget).css('top'));
}
if($('.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-position-bottom')){
position=parseInt($('.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom'));
}
if(position >=0){
var nowDate=new Date();
if(timer_from=='timer_apperance'){
if(num.test(timezone)==true||plus_number.test(timezone)==true){
nowDate=getCurrentDateTimeGMT(timezone)
}else{
nowDate=new Date(nowDate.toLocaleString('en-US', {timeZone: timezone}));
}}
var hourss=Math.abs(expiredDate.getTime() - nowDate.getTime()) / 3600000;
var diffrenceDate=expiredDate - nowDate;
var diffrenceDate=expiredDate - nowDate;
if(diffrenceDate < 0){
jQuery(window).trigger('resize');
jQuery(divId).html("");
clearInterval(timer);
return;
}
var days=Math.floor(diffrenceDate / (1000*60*60*24));
var hours=Math.floor((diffrenceDate % (1000*60*60*24))/ (1000*60*60));
var minute=Math.floor((diffrenceDate %(1000*60*60)) / (1000*60));
var seconds=Math.floor((diffrenceDate %(1000*60)) / 1000);
if(Math.floor(hourss)==24){
hours=Math.floor(hourss);
days=0;
}
days=(days > 9) ? days:'0' + days;
hours=(hours > 9) ? hours:'0' + hours;
minute=(minute > 9) ? minute:'0' + minute;
seconds=(seconds > 9) ? seconds:'0' + seconds;
if(timer_from=='timer_apperance'){
if(days==0&&hours==0&&minute==0&&seconds==0){
jQuery(rightDivId).html("");
}else{
jQuery(divId).html("<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(days/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(days%10) + "</span></div><label>"+welcomebar_frontjs.days+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'> <span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(hours/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'> <span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(hours%10) + "</span></div><label>"+welcomebar_frontjs.hours+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(minute/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(minute%10) + "</span></div> <label>"+welcomebar_frontjs.minutes+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds%10) + "</span></div><label>"+welcomebar_frontjs.seconds+"</label></div>");
}}else{
if(hours > 0){
jQuery(divId).html("<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(hours/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(hours%10) + "</span></div> <label>"+welcomebar_frontjs.hours+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(minute/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(minute%10) + "</span></div> <label>"+welcomebar_frontjs.minutes+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds%10) + "</span></div><label>"+welcomebar_frontjs.seconds+"</label></div>");
}else{
jQuery(divId).html("<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" + parseInt(minute/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(minute%10) + "</span></div> <label>"+welcomebar_frontjs.minutes+"</label></div>:<div class='counter-main-block'><div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds/10) + "</span></div> <div class='counter-timer' style='color:"+timerTxtColor+";'><span style='background-color:"+timerBgColor+";color:"+timerTxtColor+"'>" +  parseInt(seconds%10) + "</span></div><label>"+welcomebar_frontjs.seconds+"</label></div>");
}}
jQuery(divId + " span").css('color',timerTxtColor);
jQuery(divId).css('color',welcomebarTextColor);
}},1000);
});
});
function createMyStickyMenuCookie(name, value, days){
if(days){
var expiry=new Date();
expiry.setTime(expiry.getTime()+(days*24*60*60*1000));
var expires="; expires=" + expiry.toGMTString();
}else{
var expires="";
}
document.cookie=escape(name) + "=" + escape(value) + expires + "; path=/";
}
function readMyStickyMenuCookie(name){
var nameEQ=escape(name) + "=";
var ca=document.cookie.split(';');
for (var i=0; i < ca.length; i++){
var c=ca[i];
while (c.charAt(0)==' ')
c=c.substring(1, c.length);
if(c.indexOf(nameEQ)==0)
return unescape(c.substring(nameEQ.length, c.length));
}
return null;
}
function getCurrentDateTimeGMT(timezone){
var localDate=new Date();
var localTime=localDate.getTime();
var localOffset=localDate.getTimezoneOffset() * 60000;
var utc=localTime + localOffset;
var offset=timezone;
var utc_offset=utc + (3600000 * offset);
localDate=new Date(utc_offset);
return localDate;
}
$(window).resize(function(){
jQuery('.welcomebar-hidden-sliding-text').each(function(){
var sliding_text_width=jQuery(this).outerWidth();
var sliding_text_height=jQuery(this).outerHeight();
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
jQuery(this).parent().css('min-width', sliding_text_width + 'px');
}
jQuery(this).parent().css('min-height', sliding_text_height + 'px');
});
var adminBarHeight=new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
if($("#wpadminbar").length!=0){
adminBarHeight=$('#wpadminbar').height();
}
$('.mysticky-welcomebar-fixed').each(function(){
var welcomebar_widget=$(this).data('welcomebar-widget');
var welcombar_aftersubmission=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('aftersubmission');
if(welcombar_aftersubmission=='dont_show_welcomebar'){
var welcomebar_storage=localStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else if(welcombar_aftersubmission=='show_welcomebar_next_visit'){
var welcomebar_storage=sessionStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else{
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
var welcomebar_storage=null;
}
if(welcomebar_storage===null){
var after_trigger=jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('after-triger');
if(after_trigger=='after_a_few_seconds'){
var trigger_sec=jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec') * 1000;
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
var divi_topbar_height=$('.et_fixed_nav #top-header').outerHeight();
var divi_total_height=welcombar_height + divi_topbar_height;
if($(window).width() <=1024){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
setTimeout(function(){
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
jQuery('#mysticky_divi_style').remove();
jQuery('.et_fixed_nav #top-header').css('top', '');
if(! $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-notapper')){
jQuery('html,body').addClass('mysticky-welcomebar-apper');
}else{
jQuery('html,body').removeClass('mysticky-welcomebar-apper');
}
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var welcomebar_widget_ready=$(this).data('welcomebar-widget');
var welcombar_position_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).data('position');
var welcombar_height_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(welcombar_position_ready=='top'){
if(index==0){
if($(window).width() <=600){
if($(window).scrollTop() > 0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
var new_welcombar_position=adminBarHeight + 0 + new_welcombar_height_top;
}}else{
var new_welcombar_position=adminBarHeight + 0 + new_welcombar_height_top;
}
var new_welcomebar_height=welcombar_height_ready + adminBarHeight + new_welcombar_margin_top;
new_welcombar_margin_top=new_welcombar_margin_top + adminBarHeight + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_top;
var new_welcomebar_height=welcombar_height_ready  + new_welcombar_margin_top;
new_welcombar_margin_top=new_welcombar_margin_top +  $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('top', new_welcombar_position);
jQuery('.et_fixed_nav #top-header').css('top', new_welcombar_position + 'px');
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('#mysticky-nav').css('top', new_welcomebar_height + 'px');
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
var new_welcomebar_height=welcombar_height_ready + new_welcombar_padding_bottom;
jQuery('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}}
});
if(welcombar_position=='top'){
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
jQuery('head').append('<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}else{
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
jQuery('.et_fixed_nav #top-header').css('top', '');
}}, 0);
}}else{
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-desktop')){
setTimeout(function(){
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
if(! $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-notapper')){
jQuery('html,body').addClass('mysticky-welcomebar-apper');
}else{
jQuery('html,body').removeClass('mysticky-welcomebar-apper');
}
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var welcomebar_widget_ready=$(this).data('welcomebar-widget');
var welcombar_position_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).data('position');
var welcombar_height_ready=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(welcombar_position_ready=='top'){
if(index==0){
var new_welcombar_position=adminBarHeight + 0 + new_welcombar_height_top;
var new_welcomebar_height=welcombar_height_ready + adminBarHeight + new_welcombar_margin_top;
}else{
var new_welcombar_position=0 + new_welcombar_height_top;
var new_welcomebar_height=welcombar_height_ready  + new_welcombar_margin_top;
}
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('top', new_welcombar_position);
jQuery('.et_fixed_nav #top-header').css('top', new_welcombar_position + 'px');
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
jQuery('.mysticky-welcomebar-apper.et_fixed_nav #top-header').css('top', new_welcomebar_height + 'px');
jQuery('head').append('<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + new_welcomebar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
var new_welcomebar_height=adminBarHeight + welcombar_height_ready + new_welcombar_margin_top;
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('#mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top=new_welcombar_margin_top + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
var new_welcomebar_height=welcombar_height_ready + new_welcombar_padding_bottom;
jQuery('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget_ready).outerHeight();
}}
});
if(welcombar_position=='top'){
jQuery('#mysticky_divi_style').remove();
jQuery('head').append('<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}else{
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
jQuery('#mysticky_divi_style').remove();
jQuery('.et_fixed_nav #top-header').css('top', '');
}}, 0);
}}
}else{
if($(window).width() <=600){
var new_welcombar_height_top=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var new_welcomebar_widget=$(this).data('welcomebar-widget');
var test_welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).data('position');
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(test_welcombar_position=='top'){
if($(window).scrollTop() > 0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
if(index==0){
var new_welcombar_position=0 + adminBarHeight + new_welcombar_height_top;
}else{
var new_welcombar_position=0  + new_welcombar_height_top;
}}
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('top', new_welcombar_position);
}}
});
}}
mystickyelements_present(welcomebar_widget);
}});
});
$(window).on('scroll', function(){
if($("#wpadminbar").length!=0){
adminBarHeight=$('#wpadminbar').height();
}
$('.mysticky-welcomebar-fixed').each(function(){
var welcomebar_widget=$(this).data('welcomebar-widget');
var welcombar_aftersubmission=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('aftersubmission');
var after_trigger=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('after-triger');
if(welcombar_aftersubmission=='dont_show_welcomebar'){
var welcomebar_storage=localStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else if(welcombar_aftersubmission=='show_welcomebar_next_visit'){
var welcomebar_storage=sessionStorage.getItem("welcomebar_close_" + welcomebar_widget);
}else{
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
var welcomebar_storage=null;
}
if(welcomebar_storage===null){
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
var divi_topbar_height=$('.et_fixed_nav #top-header').outerHeight();
var divi_total_height=welcombar_height + divi_topbar_height;
if(after_trigger==='after_scroll'){
var scroll=100 * $(window).scrollTop() / ($(document).height() - $(window).height());
var after_scroll_val=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec');
if(scroll > after_scroll_val){
if(! $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-notapper')){
$('html,body').addClass('mysticky-welcomebar-apper');
}else{
$('html,body').removeClass('mysticky-welcomebar-apper');
}
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-desktop')){
if($(window).width() > 1024){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-notpresent')){
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var new_welcomebar_widget=$(this).data('welcomebar-widget');
var test_welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).data('position');
var welcombar_height_scroll=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(test_welcombar_position=='top'){
new_welcombar_margin_top=new_welcombar_margin_top + adminBarHeight + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
if($(window).scrollTop()==0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
if(index!=0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
var new_welcombar_position=adminBarHeight + 0 + new_welcombar_height_top;
}}
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('top', new_welcombar_position);
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
var new_welcomebar_height=new_welcombar_margin_top;
jQuery('.mysticky-welcomebar-apper.et_fixed_nav #top-header').css('top', new_welcomebar_height + 'px');
jQuery('head').append('<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + new_welcomebar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('.mysticky-welcomebar-apper #mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top=new_welcombar_margin_top + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
var new_welcomebar_height=welcombar_height_scroll + new_welcombar_padding_bottom;
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}}
});
}
if(welcombar_position=='top'){
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
jQuery('#mysticky_divi_style').remove();
}else{
jQuery('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
jQuery('#mysticky_divi_style').remove();
jQuery('.et_fixed_nav #top-header').css('top', '');
}}
}
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
if($(window).width() <=1024){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-animation');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('entry-effect');
$('#mysticky_divi_style').remove();
$('.et_fixed_nav #top-header').css('top', '');
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-notpresent')){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).removeClass('mysticky-welcomebar-notpresent');
var new_welcombar_height_top=new_welcombar_height_bottom=new_welcombar_margin_top=new_welcombar_padding_bottom=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(){
var new_welcomebar_widget=$(this).data('welcomebar-widget');
var test_welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).data('position');
var welcombar_height_scroll=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(test_welcombar_position=='top'){
if(new_welcomebar_widget==0){
if($(window).width() <=600){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
var new_welcombar_position=0 + new_welcombar_height_top + adminBarHeight;
}
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
var new_welcomebar_height=welcombar_height_scroll + new_welcombar_margin_top + adminBarHeight;
}else{
var new_welcombar_position=0  + new_welcombar_height_top;
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
var new_welcomebar_height=welcombar_height_scroll + new_welcombar_margin_top;
}
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('top', new_welcombar_position);
jQuery('.mysticky-welcomebar-apper.et_fixed_nav #top-header').css('top', new_welcomebar_height + 'px');
jQuery('head').append('<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + new_welcomebar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>');
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('.mysticky-welcomebar-apper #mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top=new_welcombar_margin_top + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}else{
var new_welcombar_position=0 + new_welcombar_height_bottom;
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('bottom', new_welcombar_position);
new_welcombar_height_bottom=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
var new_welcomebar_height=welcombar_height_scroll + new_welcombar_padding_bottom;
jQuery('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom=new_welcombar_padding_bottom + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}}
});
}
if(welcombar_position=='top'){
jQuery('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}else{
jQuery('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('opacity', '1');
}}
}}else if($(window).scrollTop()==0){
if($(window).width() <=600){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-notpresent');
var new_welcombar_height_top=0;
$('.mysticky-welcomebar-fixed').each(function(index){
var new_welcomebar_widget=$(this).data('welcomebar-widget');
var test_welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).data('position');
if(test_welcombar_position=='top'){
if(index==0){
var new_welcombar_position=0 + adminBarHeight + new_welcombar_height_top;
}else{
var new_welcombar_position=0  + new_welcombar_height_top;
}
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('top', new_welcombar_position);
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}});
}}
}}else{
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
if($(window).width() <=600){
var new_welcombar_height_top=0;
$('.mysticky-welcomebar-fixed').not(".mysticky-welcomebar-notpresent").each(function(index){
var new_welcomebar_widget=$(this).data('welcomebar-widget');
var test_welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).data('position');
if(! $(this).hasClass('mysticky-welcomebar-notpresent')&&! $(this).hasClass('mysticky-welcomebar-notapper')){
if(test_welcombar_position=='top'){
if($(window).scrollTop() > 0){
var new_welcombar_position=0 + new_welcombar_height_top;
}else{
if(index==0){
var new_welcombar_position=0 + adminBarHeight + new_welcombar_height_top;
}else{
var new_welcombar_position=0  + new_welcombar_height_top;
}}
$('.mysticky-welcomebar-apper .mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).css('top', new_welcombar_position);
new_welcombar_height_top=new_welcombar_position + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + new_welcomebar_widget).outerHeight();
}}
});
}}
}
mystickyelements_present(welcomebar_widget);
}});
});
$('.mysticky-welcomebar-close, .mysticky-welcomebar-btn a').on('click', function(e){
if($(this).attr('href')==''){
e.preventDefault();
}
var new_welcombar_margin_top_close=new_welcombar_height_top_close=0;
var new_welcombar_padding_bottom_close=new_welcombar_height_bottom_close=0;
var welcomebar_widget=$(this).data('welcomebar-widget');
var welcombar_rediect=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('rediect');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
var welcombar_aftersubmission=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('aftersubmission');
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-notapper');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-notpresent');
if($('.mysticky-welcomebar-notapper').length==$('.mysticky-welcomebar-fixed').length){
$('html,body').removeClass('mysticky-welcomebar-apper');
}
if(jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").length > 0&&!$(this).hasClass("mysticky-welcomebar-close")){
var flag=true;
if(jQuery('#contact-lead-name-'+welcomebar_widget).val()!=''&&(jQuery('#contact-lead-phone-'+welcomebar_widget).val()!=''||jQuery('#contact-lead-email-'+welcomebar_widget).val()!='')){
if(jQuery('#contact-lead-email-'+welcomebar_widget).css("display")!='none'&&IsEmail(jQuery('#contact-lead-email-'+welcomebar_widget).val())!=true){
if($(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").length){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").remove();
}
$('<div class="input-error"><span>Please, enter valid email</span></div>').insertAfter(jQuery('#contact-lead-email-'+welcomebar_widget));
flag=false;
}
if(jQuery('#contact-lead-phone-'+welcomebar_widget).css("display")!='none'&&validatePhone(jQuery('#contact-lead-phone-'+welcomebar_widget).val())!=true){
if($(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").length){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").remove();
}
$('<div class="input-error"><span>Please, enter valid phone</span></div>').insertAfter(jQuery('#contact-lead-phone-'+welcomebar_widget));
flag=false;
}
if(flag==true){
var data=[];
data["contact_name"]=jQuery('#contact-lead-name-'+welcomebar_widget).val();
data["contact_email"]=jQuery('#contact-lead-email-'+welcomebar_widget).val();
data["contact_phone"]=jQuery('#contact-lead-phone-'+welcomebar_widget).val();
data["contact_page_link"]=jQuery('#contact-lead-pagelink-'+welcomebar_widget).val();
if(welcombar_rediect=='thankyou_screen'){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").hide();
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-content p").hide();
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-content .mysticky-welcomebar-thankyou-content p").show();
}
jQuery.ajax({
url: welcomebar_frontjs.ajaxurl,
type:'post',
data: 'contact_name='+data["contact_name"]+'&contact_email='+data["contact_email"]+'&contact_phone='+data["contact_phone"]+'&action=stickymenu_contact_lead_form&widget_id=' + welcomebar_widget  + '&page_link='+ data["contact_page_link"] +'&save_form_lead=1&wpnonce=' + welcomebar_frontjs.ajax_nonce,
success: function(data){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");
},
});
}else{
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
return false;
}}else{
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
if($(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").length){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .input-error").remove();
}
if(jQuery('#contact-lead-name-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-name-'+welcomebar_widget).val()==''&&jQuery('#contact-lead-email-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-email-'+welcomebar_widget).val()==''){
$('<div class="input-error"><span>Please enter your name and email</span></div>').insertAfter(jQuery('#contact-lead-name-'+welcomebar_widget));
flag=false;
}else if(jQuery('#contact-lead-name-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-name-'+welcomebar_widget).val()==''&&jQuery('#contact-lead-phone-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-phone-'+welcomebar_widget).val()==''){
$('<div class="input-error"><span>Please enter your name and phone</span></div>').insertAfter(jQuery('#contact-lead-name-'+welcomebar_widget));
flag=false;
}else if(jQuery('#contact-lead-name-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-name-'+welcomebar_widget).val()==''){
$('<div class="input-error"><span>Please enter your name</span></div>').insertAfter(jQuery('#contact-lead-name-'+welcomebar_widget));
flag=false;
}else if(jQuery('#contact-lead-email-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-email-'+welcomebar_widget).val()==''){
$('<div class="input-error"><span>Please, enter your email</span></div>').insertAfter(jQuery('#contact-lead-email-'+welcomebar_widget));
flag=false;
}else if(jQuery('#contact-lead-phone-'+welcomebar_widget).css("display")!='none'&&jQuery('#contact-lead-phone-'+welcomebar_widget).val()==''){
$('<div class="input-error"><span>Please, enter your phone</span></div>').insertAfter(jQuery('#contact-lead-phone-'+welcomebar_widget));
flag=false;
}
if(flag==false){
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
}else{
$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");
}
return false;
}}else{
if($(this).hasClass("mysticky-welcomebar-close")){
localStorage.setItem('is_close_trigger_' + welcomebar_widget, 'yes');
}}
if(welcombar_rediect!='thankyou_screen'||$(this).attr('class')=='mysticky-welcomebar-close'){
if(welcombar_aftersubmission!='show_welcomebar_every_page'){
if(welcombar_aftersubmission=='dont_show_welcomebar'){
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
localStorage.setItem('welcomebar_close_' + welcomebar_widget, 'close');
}else if(welcombar_aftersubmission=='show_welcomebar_next_visit'){
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
sessionStorage.setItem('welcomebar_close_' + welcomebar_widget, 'close');
}}
if(jQuery(this).data("isenable-coupon")==1){
jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget).find(".mysticky-welcomebar-btn").hide();
jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget).find(".mysticky-welcomebar-content").hide();
jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget).find(".mysticky-couponbar-content").show();
$(".mysticky-welcomebar-widget-"+welcomebar_widget + " .count-down-timer-box").hide();
if(jQuery(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").length > 0){
jQuery(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").hide();
}
localStorage.setItem('is_button_trigger_' + welcomebar_widget, 'yes');
return;
}
var is_autometically_close_after_click=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data("automatically-enabled");
var after_click_close_sec=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data("automatically-triggersec");
console.log(is_autometically_close_after_click + "=="+ after_click_close_sec);
if(is_autometically_close_after_click==''){
after_click_close_sec=0;
}
setTimeout(function(){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).slideUp('slow');
if(welcombar_position=='top'){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('top', '-' + welcombar_height + 'px');
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom', '-' + welcombar_height + 'px');
$('.mysticky_bottom_style').remove();
}
var welcomebar__height=parseFloat($('.mysticky-welcomebar-fixed.mysticky-welcomebar-position-top.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight());
var html_margin_top=jQuery("html").css("margin-top");
html_margin_top=html_margin_top.replace("px",'');
jQuery("html").css("margin-top", (parseInt(html_margin_top) - welcomebar__height) + "px");
if($('#mysticky-nav').length > 0){
$('#mysticky-nav').css('top', (parseInt(html_margin_top) - welcomebar__height) + "px");
}
jQuery('#mysticky_divi_style').remove();
jQuery('.et_fixed_nav #top-header').css('top', '');
jQuery('html').css('padding-bottom', '');
var mystickyelements_show=$('.mystickyelements-fixed').length;
if(mystickyelements_show&&$(window).width() <=1024&&$('.mystickyelements-fixed').hasClass('mystickyelements-position-mobile-top')&&welcombar_position=='top'){
var mystickyelements_height=adminBarHeight + $('.mystickyelements-fixed').height();
$('.mystickyelements-fixed').css('top', '');
$('html').attr('style', 'margin-top: ' + mystickyelements_height + 'px !important');
}
jQuery(window).trigger('resize');
},(parseInt(after_click_close_sec) * 1000));
}else{
var welcomebarHeight=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-'+ welcomebar_widget).css("height");
if($(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+ welcomebar_widget+" .count-down-timer-box").length > 0&&$(".count-down-timer-box").css("display")!='none'){
jQuery(".count-down-timer-box").hide();
}
$(".mysticky-welcomebar-fixed.mysticky-welcomebar-widget-"+ welcomebar_widget + " .mysticky-welcomebar-content p").first().hide();
if(jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").length <=0&&!$(this).hasClass('mysticky-welcomebar-close')){
var thankyou_content_height=jQuery('.mysticky-welcomebar-thankyou-content').height();
if(thankyou_content_height > 60){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css({ 'min-height': thankyou_content_height + 'px', 'height':'auto' });
}
$('.mysticky-welcomebar-widget-'+ welcomebar_widget +' .mysticky-welcomebar-thankyou-content').show();
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget- .mysticky-welcomebar-content > p').hide();
$('.mysticky-welcomebar-widget-'+ welcomebar_widget +' .mysticky-welcomebar-btn').hide();
}else if(jQuery(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-lead-content").length&&$(this).parent().hasClass("mysticky-welcomebar-btn")){
var thankyou_content_height=jQuery('.mysticky-welcomebar-thankyou-content').height();
if(thankyou_content_height > 60){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css({ 'min-height': thankyou_content_height + 'px', 'height':'auto' });
}
$('.mysticky-welcomebar-widget-'+ welcomebar_widget +' .mysticky-welcomebar-thankyou-content').show();
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget- .mysticky-welcomebar-content > p').hide();
$('.mysticky-welcomebar-widget-'+ welcomebar_widget +' .mysticky-welcomebar-btn').hide();
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).slideUp('slow');
if(welcombar_position=='top'){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('top', '-' + welcombar_height + 'px');
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom', '-' + welcombar_height + 'px');
$('.mysticky_bottom_style').remove();
}
/*
var welcomebar__height=parseInt($('.mysticky-welcomebar-fixed.mysticky-welcomebar-position-top.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight());
var html_margin_top=jQuery("html").css("margin-top");
html_margin_top=html_margin_top.replace("px",'');
jQuery("html").css("margin-top",""+(parseInt(html_margin_top) - welcomebar__height)+"px")
*/
}
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-'+ welcomebar_widget).css("height",welcomebarHeight);
if(welcombar_position==='top'){
setTimeout(hideBarAnimation, 1000,welcomebar_widget,welcombar_position,welcombar_height);
}
localStorage.setItem('welcomebar_close_' + welcomebar_widget, 'close');
jQuery(window).trigger('resize');
}});
function hideBarAnimation(welcomebar_widget,welcombar_position,welcombar_height){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).slideUp('slow');
if(welcombar_position=='top'){
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('top', '-' + welcombar_height + 'px');
}else{
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom', '-' + welcombar_height + 'px');
}
var html_margin_top=jQuery("html").css("margin-top");
html_margin_top=html_margin_top.replace("px",'');
jQuery("html").css("margin-top", (parseInt(html_margin_top) - parseInt(welcombar_height)) + "px")
if($('#mysticky-nav').length > 0){
$('#mysticky-nav').css('top', (parseInt(html_margin_top) - parseInt(welcombar_height)) + "px")
}
jQuery(window).trigger('resize');
}
$('.coupon-cpy-tooltip').on("click",function(){
var idd=$(this).attr('id');
$('#'+idd + ' .tooltiptext').css({"visibility":"visible","opacity":"1"});
setTimeout(function(){$('#'+idd +' .tooltiptext').css({"visibility":"hidden","opacity":"0"});}, 3000);
var copyText=$("#"+idd+" a");
copyText.select();
navigator.clipboard.writeText(copyText.text().trim());
});
function mystickyelements_present(welcomebar_widget){
var after_trigger=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('after-triger');
var mystickyelements_show=$('.mystickyelements-fixed').length;
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
if(mystickyelements_show){
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
var mystickyelements_height=$('.mystickyelements-fixed').height();
var mystickyelements_total_height=adminBarHeight + welcombar_height + mystickyelements_height;
if($(window).width() <=1024&&$('.mystickyelements-fixed').hasClass('mystickyelements-position-mobile-top')){
if(after_trigger=='after_a_few_seconds'){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
var trigger_sec=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec') * 1000;
setTimeout(function(){
if(welcombar_position=='top'){
if(jQuery(window).width() <=600&&jQuery(window).scrollTop()!=0&&welcombar_position=='top'){
welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight() - adminBarHeight;
mystickyelements_total_height=(welcombar_height + mystickyelements_height) - adminBarHeight;
$('.mystickyelements-fixed').css('top', welcombar_height);
$('html').attr('style', 'margin-top: ' + mystickyelements_total_height + 'px !important');
}else{
$('.mystickyelements-fixed').css('top', welcombar_height);
$('html').attr('style', 'margin-top: ' + mystickyelements_total_height + 'px !important');
}}else{
$('.mystickyelements-fixed').css('top', '');
if(! jQuery('style').hasClass('mysticky_bottom_style')){
jQuery('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + welcombar_height + 'px}</style>');
}}
}, trigger_sec);
}}else if(after_trigger==='after_scroll'){
var scroll=100 * $(window).scrollTop() / ($(document).height() - $(window).height());
var after_scroll_val=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('triger-sec');
if(scroll > after_scroll_val){
if($('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).hasClass('mysticky-welcomebar-display-mobile')){
if(welcombar_position=='top'){
$('.mystickyelements-fixed').css('top', welcombar_height);
$('html').attr('style', 'margin-top: ' + mystickyelements_total_height + 'px !important');
}else{
$('.mystickyelements-fixed').css('top', '');
if(! $('style').hasClass('mysticky_bottom_style')){
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + welcombar_height + 'px}</style>');
}}
}}
}}
}}
function mysticky_welcombar_automatically_close(welcomebar_widget){
var welcombar_automatically_enabled=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('automatically-enabled');
var automatically_triggersec=jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('automatically-triggersec') * 1000;
var welcombar_aftersubmission=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('aftersubmission');
var welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).outerHeight();
if(welcombar_automatically_enabled==1){
setTimeout(function(){
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-notapper');
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).addClass('mysticky-welcomebar-notpresent');
if(jQuery('.mysticky-welcomebar-notapper').length==jQuery('.mysticky-welcomebar-fixed').length){
jQuery('html,body').removeClass('mysticky-welcomebar-apper');
}
if(welcombar_aftersubmission!='show_welcomebar_every_page'){
if(welcombar_aftersubmission=='dont_show_welcomebar'){
sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
localStorage.setItem('welcomebar_close_' + welcomebar_widget, 'close');
}else if(welcombar_aftersubmission=='show_welcomebar_next_visit'){
localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
sessionStorage.setItem('welcomebar_close_' + welcomebar_widget, 'close');
}}
var welcombar_position=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).data('position');
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).slideUp('slow');
if(welcombar_position=='top'){
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('top', '-' + welcombar_height + 'px');
}else{
jQuery('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + welcomebar_widget).css('bottom', '-' + welcombar_height + 'px');
}
var new_welcombar_margin_top_close=new_welcombar_height_top_close=0;
var new_welcombar_padding_bottom_close=new_welcombar_height_bottom_close=0;
$('.mysticky-welcomebar-fixed').each(function(){
var common_welcombar_position=$(this).data('position');
var common_welcomebar_widget=$(this).data('welcomebar-widget');
if(common_welcombar_position=='top'){
if(! $(this).hasClass('mysticky-welcomebar-notapper')&&! $(this).hasClass('mysticky-welcomebar-notpresent')){
var common_welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight();
var new_welcomebar_height=common_welcombar_height + new_welcombar_margin_top_close;
var new_welcombar_position=0 + new_welcombar_height_top_close;
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).css('top', new_welcombar_position);
new_welcombar_height_top_close=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight() - new_welcombar_position;
$('html.mysticky-welcomebar-apper').attr('style', 'margin-top: ' + new_welcomebar_height + 'px !important');
$('#mysticky-nav').css('top', new_welcomebar_height + 'px');
new_welcombar_margin_top_close=new_welcombar_margin_top_close + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight();
}else{
var welcomebar_fixed_length=$('.mysticky-welcomebar-fixed').length;
var welcomebar_notapper_length=$('.mysticky-welcomebar-notapper').length;
var welcomebar_notapper_top_length=$('.mysticky-welcomebar-position-top.mysticky-welcomebar-notapper').length;
var welcomebar_notpresent_top_length=$('.mysticky-welcomebar-position-top.mysticky-welcomebar-notpresent').length;
var welcomebar_top_length=$('.mysticky-welcomebar-position-top').length;
if(welcomebar_notapper_length==welcomebar_fixed_length||welcomebar_top_length==welcomebar_notapper_top_length||welcomebar_top_length==welcomebar_notpresent_top_length){
$('html').css('margin-top', '');
$('#mysticky-nav').css('top', '0px');
}}
}else{
if(! $(this).hasClass('mysticky-welcomebar-notapper')&&! $(this).hasClass('mysticky-welcomebar-notpresent')){
var common_welcombar_height=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight();
var new_welcomebar_height=common_welcombar_height + new_welcombar_padding_bottom_close;
var new_welcombar_position=0 + new_welcombar_height_bottom_close;
$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).css('bottom', new_welcombar_position);
new_welcombar_height_bottom_close=$('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight() - new_welcombar_position;
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: ' + new_welcomebar_height + 'px}</style>');
new_welcombar_padding_bottom_close=new_welcombar_padding_bottom_close + $('.mysticky-welcomebar-fixed.mysticky-welcomebar-widget-' + common_welcomebar_widget).outerHeight();
}else{
var welcomebar_fixed_length=$('.mysticky-welcomebar-fixed').length;
var welcomebar_notapper_length=$('.mysticky-welcomebar-notapper').length;
var welcomebar_notapper_bottom_length=$('.mysticky-welcomebar-position-bottom.mysticky-welcomebar-notapper').length;
var welcomebar_notpresent_bottom_length=$('.mysticky-welcomebar-position-bottom.mysticky-welcomebar-notpresent').length;
var welcomebar_bottom_length=$('.mysticky-welcomebar-position-bottom').length;
if(welcomebar_notapper_length==welcomebar_fixed_length||welcomebar_bottom_length==welcomebar_notapper_bottom_length||welcomebar_bottom_length==welcomebar_notpresent_bottom_length){
$('head').append('<style class="mysticky_bottom_style" type="text/css">html.mysticky-welcomebar-apper {padding-bottom: 0px}</style>');
}}
}});
jQuery('#mysticky_divi_style').remove();
jQuery('.et_fixed_nav #top-header').css('top', '');
var mystickyelements_show=$('.mystickyelements-fixed').length;
if(mystickyelements_show&&$(window).width() <=1024&&$('.mystickyelements-fixed').hasClass('mystickyelements-position-mobile-top')&&welcombar_position=='top'){
var mystickyelements_height=$('.mystickyelements-fixed').height();
$('.mystickyelements-fixed').css('top', '');
$('html').attr('style', 'margin-top: ' + mystickyelements_height + 'px !important');
}}, automatically_triggersec);
}}
});
jQuery(".mysticky-welcomebar-fixed").on("animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
function(){
jQuery(this).removeClass("animation-start");
}
);
jQuery(document).ready(function(){
var container=jQuery(".mysticky-welcomebar-fixed");
var refreshId=setInterval(function(){
container.addClass("animation-start");
}, 3500);
});
function IsEmail(email){
var regex =
/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(!regex.test(email)){
return false;
}else{
return true;
}}
function validatePhone(txtPhone){
var a=txtPhone;
var filter=/^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/;
if(filter.test(a)){
return true;
}else{
return false;
}};
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).unbind(e),mouseDetectionEnabled=!1);else{var i=!0,s=null;$(document).bind(getEventsNS([["mousemove",function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};return $.each(t,function(t,s){i[s[0].split(" ").join(e+" ")+e]=s[1]}),i}var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],i)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],i)),i+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],i)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],i)),this.opts.subIndicators&&(this.$subArrow=$("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1;if(s&&!s.is(":visible")){if(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&i)return this.itemActivate(e),this.menuHide(s),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),S=this.getViewportWidth(),b=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+S&&(e=g?f+S-r-y+e:w-r),g||(b>h&&I+h>v+b?i+=v+b-h-I:(h>=b||v>I)&&(i+=v-I)),g&&(I+h>v+b+.49||v>I)||!g&&h>b+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var C=".smartmenus_scroll";t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).bind(getEventsNS([["mouseover",function(e){x.menuScrollOver(t,e)}],["mouseout",function(e){x.menuScrollOut(t,e)}],["mousewheel DOMMouseScroll",function(e){x.menuScrollMousewheel(t,e)}]],C)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()&&t.css({"touch-action":"none","-ms-touch-action":"none"}).bind(getEventsNS([[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(e){x.menuScrollTouch(t,e)}]],C))}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m}),this.menuIframeShim(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").css({zIndex:t.css("z-index"),width:r,height:h,marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.add(t.dataSM("ie-shim")).css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y<o.upEnd)&&a.eq(o.up?1:0).show(),o.y==n)mouse&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!e){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.2);var h=this;this.scrollTimeout=requestAnimationFrame(function(){h.menuScroll(t)})}},menuScrollMousewheel:function(t,e){if(this.getClosestMenu(e.target)==t[0]){e=e.originalEvent;var i=(e.wheelDelta||-e.detail)>0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0).stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a");if((this.opts.keepHighlighted||this.isCollapsible())&&e.addClass("highlighted"),this.isCollapsible())t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var i=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),i>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").insertBefore(t)}var s=function(){t.css("overflow","")};this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,s):t.show(this.opts.collapsibleShowDuration,s):this.opts.showFunction?this.opts.showFunction.call(this,t,s):t.show(this.opts.showDuration,s),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0).stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e}),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:t,top:e}).insertBefore(this.$root);var i=this,s=function(){i.$root.css("overflow","")};this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}var dataOpts=this.data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}return this.each(function(){new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0},$});