(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?<name>[a-z][-a-z0-9_:]*)(?<array>(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5<t.length&&t.length<16))))throw new o(this)},c=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?<toplevel>[a-z]+)\/(?<sub>[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length<parseInt(this.threshold))throw new o(this)},v=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(parseInt(this.threshold)<e.length)throw new o(this)},g=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&i<parseInt(this.threshold))throw new o(this)},x=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)<i)throw new o(this)},b=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)<parseFloat(this.threshold)))))throw new o(this)},y=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)<parseFloat(t)))))throw new o(this)},A=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&t<this.threshold))))throw new o(this)},z=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold<t))))throw new o(this)},$=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),i<parseInt(this.threshold))throw new o(this)},j=function(t){const e=t.getAll(this.field);let i=0;if(e.forEach((t=>{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)<i)throw new o(this)},I=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0<s))return!0;if(!e.every((t=>{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})();
(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||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 u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where(input, textarea, select):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</a>`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.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"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.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],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).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((t=>{s(e,t.field,t.message)})),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)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=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(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.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 a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(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 a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})();
var thirstyFunctions;jQuery(document).ready((function(t){thirstyFunctions={recordLinkStatEvents:function(){"yes"==thirsty_global_vars.enable_record_stats&&t("body").on("click","a",thirstyFunctions.recordLinkStat)},recordLinkStat:function(r){var a,e,i,o=t(this),n=o.attr("href"),s=o.data("linkid"),l=o[0].innerText,c=n?n.split("?")[1]:"";l||(l=o.text()),(thirstyFunctions.isThirstyLink(n)||s)&&(o.data("thirstypay")||(o.data("clicked")?r.preventDefault():(o.data("clicked",!0),!l&&o.find("img").length&&(l=(a=o.find("img").prop("src").split("/"))[a.length-1]),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(r.preventDefault(),"_blank"!=o.prop("target")||thirstyFunctions.disableNewWindow()?window.MonsterInsightsObject&&setTimeout((function(){"function"==typeof window.onbeforeunload&&(i=window.onbeforeunload)}),50):e=window.open("","_blank")),t.post(thirsty_global_vars.ajax_url,{action:"ta_click_data_redirect",href:n,page:window.location.href,link_id:s,keyword:l,qs:c},(function(t){o.data("clicked",!1),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(e?e.location.href=t||n:("function"==typeof i&&null===window.onbeforeunload&&(window.onbeforeunload=i),window.location.href=t||n))})).fail((function(){o.data("clicked",!1),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(e?e.location.href=n:("function"==typeof i&&null===window.onbeforeunload&&(window.onbeforeunload=i),window.location.href=n))})))))},disableNewWindow:function(){var t=["FBAN","MessengerForiOS","FBAV","Instagram","Pinterest","Twitter","Electron","Steam"];for(var r in t)if(navigator.userAgent.indexOf(t[r])>=0)return!0;return!1},isThirstyLink:function(a){if(a){var e,i,o=(a=a.replace("http:","{protocol}").replace("https:","{protocol}")).replace(thirsty_global_vars.home_url,"").replace("{protocol}","");return e=(o=0==o.indexOf("/")?o.replace("/",""):o).substr(0,o.indexOf("/")),i=a.replace("/"+e+"/","/"+thirsty_global_vars.link_prefix+"/").replace("{protocol}",window.location.protocol),!!(e&&t.inArray(e,r)>-1)&&i}},linkFixer:function(){if("yes"===thirsty_global_vars.link_fixer_enabled){var r,a,e,i,o,n=t("body a"),s=[];for(o=0;o<n.length;o++)r=t(n[o]).attr("href"),a=t(n[o]).attr("class"),e=t(n[o]).data("shortcode"),i=t(n[o]).has("img").length,(r=thirstyFunctions.isThirstyLink(r))&&!e&&s.push({key:o,class:a,href:r,is_image:i}),t(n[o]).removeAttr("data-shortcode");s.length<1||t.post(thirsty_global_vars.ajax_url,{action:"ta_link_fixer",hrefs:s,post_id:thirsty_global_vars.post_id},(function(r){if("success"==r.status)for(var a in r.data)if("object"==typeof r.data[a]){var e,i=r.data[a].key,o=t(n[i]).prop("href"),s=o?o.split("?")[1]:"",l=r.data[a].href,c=r.data[a].title,d=r.data[a].class,p=r.data[a].thirstypay;s&&r.data[a].pass_qs&&(e=l.indexOf("?")<0?"?":"&",l=l+e+s),l=l.replace("http:",window.location.protocol).replace("https:",window.location.protocol),c?t(n[i]).prop("title",c):t(n[i]).removeAttr("title"),"yes"==thirsty_global_vars.disable_thirstylink_class&&(d=d.replace("thirstylinkimg","").replace("thirstylink","").trim()),d?t(n[i]).prop("class",d):t(n[i]).removeAttr("class"),t(n[i]).prop("href",l).prop("rel",r.data[a].rel).prop("target",r.data[a].target).attr("data-linkid",r.data[a].link_id),p&&t(n[i]).attr("data-thirstypay",!0),"yes"===thirsty_global_vars.enable_js_redirect&&t(n[i]).attr("data-nojs",r.data[a].nojs)}}),"json")}}};var r=t.map(thirsty_global_vars.link_prefixes,(function(t,r){return[t]}));thirstyFunctions.recordLinkStatEvents(),thirstyFunctions.linkFixer()}));
(function (){
'use strict';
var COOKIE_NAME='wc_facebook_signals_state';
var STATE_ACTIVE='active';
var STATE_HELD='held';
function setCookie(name, value, days){
var d=new Date();
d.setTime(d.getTime() + days * 86400000);
document.cookie =
name +
'=' +
encodeURIComponent(value) +
';expires=' +
d.toUTCString() +
';path=/;SameSite=Lax';
}
function getCookie(name){
var match=document.cookie.match(new RegExp('(?:^|;\\s*)' + name + '=([^;]*)')
);
return match ? decodeURIComponent(match[ 1 ]):null;
}
function updateState(state){
setCookie(COOKIE_NAME, state, 365);
var params=wc_facebook_signals_params;
return new Promise(function(resolve, reject){
var xhr=new XMLHttpRequest();
xhr.open('POST', params.ajax_url, true);
xhr.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded; charset=UTF-8'
);
xhr.onload=function (){
if(xhr.status >=200&&xhr.status < 300){
try {
var data=JSON.parse(xhr.responseText);
resolve(data);
} catch(e){
reject(e);
}}else{
reject(new Error('AJAX failed: ' + xhr.status) );
}};
xhr.onerror=function (){
reject(new Error('Network error') );
};
xhr.send('action=' +
encodeURIComponent(params.action) +
'&security=' +
encodeURIComponent(params.nonce) +
'&state=' +
encodeURIComponent(state)
);
});
}
function hold(){
return updateState(STATE_HELD);
}
function release(){
return updateState(STATE_ACTIVE).then(function(data){
if(window.FacebookSignals &&
window.FacebookSignals._held
){
return window.FacebookSignals.release().then(function (){
return data;
},
function (){
return data;
}
);
}
return data;
});
}
function getState(){
var val=getCookie(COOKIE_NAME);
if(val===null){
return null;
}
return val===STATE_ACTIVE ? STATE_ACTIVE:STATE_HELD;
}
window.fbwcsignal=window.fbwcsignal||{};
window.fbwcsignal.hold=hold;
window.fbwcsignal.release=release;
window.fbwcsignal.getState=getState;
})();
(function ($){
Business_front={
init: function (){
let forBlockElementor=window.location.search;
var getFilterUrl=[];
if(forBlockElementor){
forBlockElementor=forBlockElementor.replace("?", "");
forBlockElementor=forBlockElementor.split("&");
forBlockElementor.forEach(function (value){
let valueSplited=value.split("=");
if(valueSplited[0]) getFilterUrl.push(valueSplited[0]);
if(valueSplited[0]) getFilterUrl.push(valueSplited[1]);
});
}
var is_customizerOpen=false;
if(typeof wp!=="undefined"){
is_customizerOpen=typeof wp.customize!=="undefined" ? true:false;
}
if(!is_customizerOpen&&!getFilterUrl.includes("elementor-preview")){
Business_front._show_popup();
}
Business_front._commonScript();
Business_front._bind();
},
_show_popup: function (){
let getPopup=$(".wppb-popup-open.popup.active")[0];
if(getPopup){
getPopup=$(getPopup);
getPopup.hide();
let getHTml=getPopup.html();
let setting_=getPopup.find('input[name="popup-setting-front"]');
setting_=JSON.parse(setting_.val());
let getOutSideColor =
"outside-color" in setting_ ? setting_["outside-color"]:"#535353f2";
let getEffect="effect" in setting_ ? setting_["effect"]:1;
let popupOpenTime =
"popup-delay-open" in setting_ ? setting_["popup-delay-open"]:4;
popupOpenTime=popupOpenTime * 1000;
let popupAutoClose =
"popup-delay-close" in setting_
? parseInt(setting_["popup-delay-close"])
: 0;
let effectClass="wppb-effect-one";
let renderTohtml =
'<div id="wppbPopupShow" class="wppb-popup-main-wrap ' +
effectClass +
'"><div>';
renderTohtml +=getHTml;
renderTohtml +="</div></div>";
function addActivePopup(){
$("body").append(renderTohtml);
let wppbPopupShow=$("#wppbPopupShow");
wppbPopupShow.find(".successmsg").hide();
wppbPopupShow.find(".spinner, #loading_image").hide();
wppbPopupShow.find("form.lead-form-front").show();
let checkCookie=getPopup.attr("data-wppb-frequency");
Business_front.setPopupCookie(getPopup);
let getContentHeight=wppbPopupShow.find(".wppb-popup-custom-content"
);
let windowHeight=window.innerHeight - 150;
if(getContentHeight.outerHeight() > windowHeight){
getContentHeight.css({
height: windowHeight + "px",
"overflow-y": "scroll",
});
}else if(getContentHeight.innerHeight() <
getContentHeight.children().outerHeight()
){
getContentHeight.css({ "overflow-y": "scroll" });
}
Business_front._setStyleColor(wppbPopupShow,
getOutSideColor,
"background-color"
);
wppbPopupShow.addClass("wppb_popup_active");
$("body").addClass("wppbPopupActive");
getPopup.remove();
if(popupAutoClose > 0){
popupAutoClose=popupAutoClose * 1000;
setTimeout(function (){
Business_front._popupAutoClose(wppbPopupShow);
}, popupAutoClose);
}}
setTimeout(addActivePopup, popupOpenTime);
}},
_validJsonStr: function (str){
try {
JSON.parse(str);
} catch (e){
return false;
}
return true;
},
_inlineCssSeparate: function (inline_css){
let saparateStyle=[];
inline_css.split(";").forEach((value_, index_)=> {
if(value_.search(":") > -1){
let getCss=value_.split(":");
saparateStyle[getCss[0].trim()]=getCss[1].trim();
}});
return saparateStyle;
},
_setStyleColor: function (element, element_value, styleProperty){
let getElemStyle=element.attr("style");
if(getElemStyle){
let saparateStyle=Business_front._inlineCssSeparate(getElemStyle);
if(styleProperty in saparateStyle) delete saparateStyle[styleProperty];
saparateStyle[styleProperty]=element_value;
let newStyle="";
for (let key in saparateStyle){
newStyle +=key + ":" + saparateStyle[key] + ";";
}
element.attr("style", newStyle);
}else{
element.attr("style", styleProperty + ":" + element_value);
}},
_commonScript: function (){
$(document).mouseup(function (e){
var businessPopupDemo=$("#wppbPopupShow .wppb-popup-custom-wrapper");
let setting_=businessPopupDemo.find('input[name="popup-setting-front"]'
);
setting_=Business_front._validJsonStr(setting_.val())
? JSON.parse(setting_.val())
: {};
let getCloseParam =
"close-type" in setting_ ? setting_["close-type"]:3;
if(getCloseParam==2||getCloseParam==3){
if(!businessPopupDemo.is(e.target) &&
businessPopupDemo.has(e.target).length===0
){
$("#wppbPopupShow.wppb_popup_active").removeClass("wppb_popup_active"
);
$("#wppbPopupShow").addClass("wppb_popup_shut");
$("body").removeClass("wppbPopupActive");
var remove_modal=function (){
$("#wppbPopupShow").remove();
if($(".wppb-popup-open.active").length){
Business_front._show_popup();
}};
setTimeout(remove_modal, 500);
}}
});
},
_popupAutoClose: function (element_){
element_.removeClass("wppb_popup_active");
element_.addClass("wppb_popup_shut");
$("body").removeClass("wppbPopupActive");
var remove_modal=function (){
element_.remove();
if($(".wppb-popup-open.active").length){
Business_front._show_popup();
}};
setTimeout(remove_modal, 500);
},
_closeFunctionByIcon: function (e){
e.preventDefault();
let button=$(this);
button
.closest("#wppbPopupShow.wppb_popup_active")
.removeClass("wppb_popup_active");
$("#wppbPopupShow").addClass("wppb_popup_shut");
$("body").removeClass("wppbPopupActive");
var remove_modal=function (){
$("#wppbPopupShow").remove();
if($(".wppb-popup-open.active").length){
Business_front._show_popup();
}};
setTimeout(remove_modal, 500);
},
_responsive: function (){
let getPopup=$(".wppb-popup-main-wrap.inline_");
$.each(getPopup, (index, value)=> {
let popup=$(value);
let getCss=popup.find(".wppb-popup-css-one-no_res").val();
let popupWidth=Business_front._findWidth(popup);
if(popupWidth.scale!=0){
getCss=Business_front._responsive_one(getCss, popupWidth.scale);
let addClass =
popupWidth.scale==1
? "wppb-res-one"
: popupWidth.scale==2
? "wppb-res-one"
: "wppb-res-three";
popup.addClass(addClass);
}
popup
.find(".wppb-popup-style-internal-stylesheet > style")
.text(getCss);
popup.find(".wppb-popup-custom-wrapper").css("width", popupWidth.width);
});
},
_findWidth: function (popup){
let getPopupWidth=popup
.find(".wppb-popup-css-one-no_res")
.attr("data-wrapper");
let findIndexWidth=getPopupWidth.indexOf("width");
let findIndexPx=getPopupWidth.indexOf("px", findIndexWidth);
getPopupWidth=parseInt(
getPopupWidth.slice(findIndexWidth + 6, findIndexPx)
);
let popupParentWidth=parseInt(popup.parent().css("width"));
let width =
getPopupWidth > popupParentWidth ? popupParentWidth:getPopupWidth;
let getPErcent, scale;
if(getPopupWidth > popupParentWidth){
getPErcent=(100 * popupParentWidth) / getPopupWidth - 100;
getPErcent=Math.round(getPErcent);
getPErcent=getPErcent - 2 * getPErcent;
scale =
getPErcent < 45 ? 3:getPErcent < 60 ? 2:getPErcent < 85 ? 1:0;
}else{
scale=0;
}
return { width: width, scale: scale };},
_responsive_one: function (cssStr, scale){
let css=cssStr.split("}");
let returnCss="";
let withoutPx="";
css.forEach((value)=> {
if(value&&value.indexOf("px") > 0){
let id_css_Prop=value.split("{");
if(Business_front._responsive_two(id_css_Prop, scale)){
returnCss +=
id_css_Prop[0] +
"{" +
Business_front._responsive_two(id_css_Prop, scale) +
"}";
}}else{
returnCss +=value + "}";
}});
return returnCss;
},
_responsive_two: function (id_css_Prop, scale){
let cssProp=id_css_Prop[1].split(";");
let returnWprop="";
cssProp.forEach((value)=> {
if(value.indexOf("px") > 0){
let cssPropValue=value.split(":");
let propertyType=cssPropValue[0].trim();
if(Business_front._responsive_three(cssPropValue, propertyType, scale)
){
returnWprop +=
propertyType +
":" +
Business_front._responsive_three(cssPropValue,
propertyType,
scale
) +
";";
}}else{
returnWprop +=value + ";";
}});
return returnWprop;
},
_responsive_three: function (cssPropValue, arg, scale){
let get_px_arr=[];
let css_con=false;
let cssParameter=cssPropValue[1].split("px");
cssParameter.forEach((value)=> {
value=parseInt(value.trim());
if(value&&(value > 0||value <=-1)){
get_px_arr.push(value);
}});
css_con=cssPropValue[1];
if(get_px_arr.length){
get_px_arr.sort(function (a, b){
return b - a;
});
get_px_arr.forEach((value)=> {
let percent=scale==2 ? 60:scale==3 ? 50:70;
let param=arg=="border-radius" ? value:(value / 100) * percent;
param=Number(param).toFixed(2);
if(arg=="font-size"&&param < 10){
param=10.0;
}
let replaceG=new RegExp(value, "g");
css_con=css_con.replace(replaceG, param);
});
}
return css_con;
},
setPopupCookie: function (element){
let frequency=element.attr("data-wppb-frequency");
let day=element.attr("data-wppb-fr-d")
? element.attr("data-wppb-fr-d")
: false;
let hour=element.attr("data-wppb-fr-h")
? element.attr("data-wppb-fr-h")
: false;
let bid=element.attr("data-wppb-bid");
if(bid&&frequency){
let calculation;
let cookieName="wppb-fr-" + bid;
if(day&&hour){
calculation=24 * parseInt(day) * (1000 * 60 * 60 * parseInt(hour));
}else if(hour){
calculation=1000 * 60 * parseInt(hour);
}else if(frequency=="one-time"){
calculation=24 * 30 * (1000 * 60 * 60);
}else if(frequency=="every-page"){
document.cookie =
cookieName + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
}
if(calculation){
let date=new Date();
date.setTime(date.getTime() + calculation);
let expires="expires=" + date.toUTCString();
document.cookie =
cookieName + "=" + frequency + ";" + expires + ";path=/";
}}
},
_bind: function (){
Business_front._responsive();
$(document).on("click",
".wppb-popup-close-btn",
Business_front._closeFunctionByIcon
);
},
};
const getStylesAttr=$("[wppb-add-style]");
if(getStylesAttr.length){
$.each(getStylesAttr, function (){
const element=$(this);
const getStyleAttr=element.attr("wppb-add-style");
if(""!==getStyleAttr){
element.attr("style", getStyleAttr);
}
element.removeAttr("wppb-add-style");
});
}
Business_front.init();
})(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
(function ($){
$.fn.bigStoreResponsiveMenu=function (options){
var defaults={
resizeWidth: '',
animationSpeed: 'fast',
accoridonExpAll: false
};
var options=$.extend(defaults, options),
opt=options,
$resizeWidth=opt.resizeWidth,
$animationSpeed=opt.animationSpeed,
$expandAll=opt.accoridonExpAll,
$aceMenu=$(this),
$menuStyle=$(this).attr('data-menu-style');
$aceMenu.find('ul').addClass("sub-menu");
$aceMenu.find('ul.social-icon').removeClass("sub-menu");
$aceMenu.find('ul').siblings('a').append('<span class="arrow"></span>');
if($menuStyle=='accordion'){$(this).addClass('collapse');}
if($(window).innerWidth()<=$resizeWidth){
menuCollapse();
}
$(window).resize(function(){
menuCollapse();
$('body').removeClass('mobile-menu-active');
$('body').removeClass('sticky-mobile-menu-active');
});
$('#menu-btn,#mob-menu-btn,#menu-btn-abv,#menu-btn-btm,#menu-btn-stk').click(function(e){
e.stopPropagation();
});
$('body').click(function(evt){
if(evt.target.class==".sider")
return;
if($(evt.target).closest('.sider').length)
return;
$('body').removeClass('mobile-menu-active');
$('body').removeClass('sticky-mobile-menu-active');
});
function menuCollapse(){
var w=$(window).innerWidth();
if(w <=$resizeWidth){
$aceMenu.find('li.menu-active').removeClass('menu-active');
$aceMenu.find('ul.slide').removeClass('slide').removeAttr('style');
$aceMenu.addClass('collapse hide-menu');
$('.main-header .menu-toggle,.sticky-header .menu-toggle,.below-header .menu-toggle').show();
$('.big-store-menu a,.menu-close-btn,.arrow').attr('tabindex',-1);
}else{
$aceMenu.attr('data-menu-style', $menuStyle);
$aceMenu.removeClass('collapse hide-menu').removeAttr('style');
$('.main-header .menu-toggle,.sticky-header .menu-toggle,.below-header .menu-toggle').hide();
if($aceMenu.attr('data-menu-style')=='accordion'){
$aceMenu.addClass('collapse');
return;
}
$aceMenu.find('li.menu-active').removeClass('menu-active');
$aceMenu.find('ul.slide').removeClass('slide').removeAttr('style');
}}
return this.each(function (){
$aceMenu.on('mouseover', '> li a', function (){
if($aceMenu.hasClass('collapse')===true){
return false;
}
$(this).off('click', '> li a');
$(this).parent('li').siblings().children('.sub-menu').stop(true, true).removeClass('slide').removeAttr('style').stop();
$(this).parent().addClass('menu-active').children('.sub-menu').addClass('slide');
return;
});
$aceMenu.on('focus', '> li a', function (){
if($aceMenu.hasClass('collapse')===true){
return false;
}
$(this).off('click', '> li a');
$(this).parent('li').siblings().children('.sub-menu').stop(true, true).removeClass('slide').removeAttr('style').stop();
$(this).parent().addClass('menu-active').children('.sub-menu').addClass('slide');
return;
});
$aceMenu.on('mouseleave', 'li', function (){
if($aceMenu.hasClass('collapse')===true){
return false;
}
$(this).off('click', '> li a');
$(this).removeClass('menu-active');
$(this).children('ul.sub-menu').stop(true, true).removeClass('slide').removeAttr('style');
return;
});
$aceMenu.on('click', 'li span.arrow', function (e){
e.preventDefault();
if($aceMenu.hasClass('collapse')==false){
}
$(this).off('mouseover', '> li a');
if($(this).parent().parent().hasClass('menu-active')){
$(this).parent().parent().children('.sub-menu').slideUp().removeClass('slide');
$(this).parent().parent().removeClass('menu-active');
}else{
if($expandAll==true){
$(this).parent().parent().addClass('menu-active').children('.sub-menu').slideDown($animationSpeed).addClass('slide');
return;
}}
});
$aceMenu.on('keypress', 'li span.arrow', function (e){
var w=$(window).innerWidth();
if(w <=$resizeWidth){
e.preventDefault();
if($aceMenu.hasClass('collapse')==false){
}
$(this).off('mouseover', '> li a');
if($(this).parent().parent().hasClass('menu-active')){
$(this).parent().parent().children('.sub-menu').slideUp().removeClass('slide');
$(this).parent().parent().removeClass('menu-active');
}else{
if($expandAll==true){
$(this).parent().parent().addClass('menu-active').children('.sub-menu').slideDown($animationSpeed).addClass('slide');
return;
}}
}});
});
}})(jQuery);
;(function($, window, document, undefined){
function Owl(element, options){
this.settings=null;
this.options=$.extend({}, Owl.Defaults, options);
this.$element=$(element);
this._handlers={};
this._plugins={};
this._supress={};
this._current=null;
this._speed=null;
this._coordinates=[];
this._breakpoint=null;
this._width=null;
this._items=[];
this._clones=[];
this._mergers=[];
this._widths=[];
this._invalidated={};
this._pipe=[];
this._drag={
time: null,
target: null,
pointer: null,
stage: {
start: null,
current: null
},
direction: null
};
this._states={
current: {},
tags: {
'initializing': [ 'busy' ],
'animating': [ 'busy' ],
'dragging': [ 'interacting' ]
}};
$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){
this._handlers[handler]=$.proxy(this[handler], this);
}, this));
$.each(Owl.Plugins, $.proxy(function(key, plugin){
this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
= new plugin(this);
}, this));
$.each(Owl.Workers, $.proxy(function(priority, worker){
this._pipe.push({
'filter': worker.filter,
'run': $.proxy(worker.run, this)
});
}, this));
this.setup();
this.initialize();
}
Owl.Defaults={
items: 3,
loop: false,
center: false,
rewind: false,
checkVisibility: true,
mouseDrag: true,
touchDrag: true,
pullDrag: true,
freeDrag: false,
margin: 0,
stagePadding: 0,
merge: false,
mergeFit: true,
autoWidth: false,
startPosition: 0,
rtl: false,
smartSpeed: 250,
fluidSpeed: false,
dragEndSpeed: false,
responsive: {},
responsiveRefreshRate: 200,
responsiveBaseElement: window,
fallbackEasing: 'swing',
slideTransition: '',
info: false,
nestedItemSelector: false,
itemElement: 'div',
stageElement: 'div',
refreshClass: 'owl-refresh',
loadedClass: 'owl-loaded',
loadingClass: 'owl-loading',
rtlClass: 'owl-rtl',
responsiveClass: 'owl-responsive',
dragClass: 'owl-drag',
itemClass: 'owl-item',
stageClass: 'owl-stage',
stageOuterClass: 'owl-stage-outer',
grabClass: 'owl-grab'
};
Owl.Width={
Default: 'default',
Inner: 'inner',
Outer: 'outer'
};
Owl.Type={
Event: 'event',
State: 'state'
};
Owl.Plugins={};
Owl.Workers=[ {
filter: [ 'width', 'settings' ],
run: function(){
this._width=this.$element.width();
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
cache.current=this._items&&this._items[this.relative(this._current)];
}}, {
filter: [ 'items', 'settings' ],
run: function(){
this.$stage.children('.cloned').remove();
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var margin=this.settings.margin||'',
grid = !this.settings.autoWidth,
rtl=this.settings.rtl,
css={
'width': 'auto',
'margin-left': rtl ? margin:'',
'margin-right': rtl ? '':margin
};
!grid&&this.$stage.children().css(css);
cache.css=css;
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin,
merge=null,
iterator=this._items.length,
grid = !this.settings.autoWidth,
widths=[];
cache.items={
merge: false,
width: width
};
while (iterator--){
merge=this._mergers[iterator];
merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge;
cache.items.merge=merge > 1||cache.items.merge;
widths[iterator] = !grid ? this._items[iterator].width():width * merge;
}
this._widths=widths;
}}, {
filter: [ 'items', 'settings' ],
run: function(){
var clones=[],
items=this._items,
settings=this.settings,
view=Math.max(settings.items * 2, 4),
size=Math.ceil(items.length / 2) * 2,
repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0,
append='',
prepend='';
repeat /=2;
while (repeat > 0){
clones.push(this.normalize(clones.length / 2, true));
append=append + items[clones[clones.length - 1]][0].outerHTML;
clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
prepend=items[clones[clones.length - 1]][0].outerHTML + prepend;
repeat -=1;
}
this._clones=clones;
$(append).addClass('cloned').appendTo(this.$stage);
$(prepend).addClass('cloned').prependTo(this.$stage);
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(){
var rtl=this.settings.rtl ? 1:-1,
size=this._clones.length + this._items.length,
iterator=-1,
previous=0,
current=0,
coordinates=[];
while (++iterator < size){
previous=coordinates[iterator - 1]||0;
current=this._widths[this.relative(iterator)] + this.settings.margin;
coordinates.push(previous + current * rtl);
}
this._coordinates=coordinates;
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(){
var padding=this.settings.stagePadding,
coordinates=this._coordinates,
css={
'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
'padding-left': padding||'',
'padding-right': padding||''
};
this.$stage.css(css);
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var iterator=this._coordinates.length,
grid = !this.settings.autoWidth,
items=this.$stage.children();
if(grid&&cache.items.merge){
while (iterator--){
cache.css.width=this._widths[this.relative(iterator)];
items.eq(iterator).css(cache.css);
}}else if(grid){
cache.css.width=cache.items.width;
items.css(cache.css);
}}
}, {
filter: [ 'items' ],
run: function(){
this._coordinates.length < 1&&this.$stage.removeAttr('style');
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
cache.current=cache.current ? this.$stage.children().index(cache.current):0;
cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
this.reset(cache.current);
}}, {
filter: [ 'position' ],
run: function(){
this.animate(this.coordinates(this._current));
}}, {
filter: [ 'width', 'position', 'items', 'settings' ],
run: function(){
var rtl=this.settings.rtl ? 1:-1,
padding=this.settings.stagePadding * 2,
begin=this.coordinates(this.current()) + padding,
end=begin + this.width() * rtl,
inner, outer, matches=[], i, n;
for (i=0, n=this._coordinates.length; i < n; i++){
inner=this._coordinates[i - 1]||0;
outer=Math.abs(this._coordinates[i]) + padding * rtl;
if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end)))
|| (this.op(outer, '<', begin)&&this.op(outer, '>', end))){
matches.push(i);
}}
this.$stage.children('.active').removeClass('active');
this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
this.$stage.children('.center').removeClass('center');
if(this.settings.center){
this.$stage.children().eq(this.current()).addClass('center');
}}
} ];
Owl.prototype.initializeStage=function(){
this.$stage=this.$element.find('.' + this.settings.stageClass);
if(this.$stage.length){
return;
}
this.$element.addClass(this.options.loadingClass);
this.$stage=$('<' + this.settings.stageElement + '>', {
"class": this.settings.stageClass
}).wrap($('<div/>', {
"class": this.settings.stageOuterClass
}));
this.$element.append(this.$stage.parent());
};
Owl.prototype.initializeItems=function(){
var $items=this.$element.find('.owl-item');
if($items.length){
this._items=$items.get().map(function(item){
return $(item);
});
this._mergers=this._items.map(function(){
return 1;
});
this.refresh();
return;
}
this.replace(this.$element.children().not(this.$stage.parent()));
if(this.isVisible()){
this.refresh();
}else{
this.invalidate('width');
}
this.$element
.removeClass(this.options.loadingClass)
.addClass(this.options.loadedClass);
};
Owl.prototype.initialize=function(){
this.enter('initializing');
this.trigger('initialize');
this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
if(this.settings.autoWidth&&!this.is('pre-loading')){
var imgs, nestedSelector, width;
imgs=this.$element.find('img');
nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined;
width=this.$element.children(nestedSelector).width();
if(imgs.length&&width <=0){
this.preloadAutoWidthImages(imgs);
}}
this.initializeStage();
this.initializeItems();
this.registerEventHandlers();
this.leave('initializing');
this.trigger('initialized');
};
Owl.prototype.isVisible=function(){
return this.settings.checkVisibility
? this.$element.is(':visible')
: true;
};
Owl.prototype.setup=function(){
var viewport=this.viewport(),
overwrites=this.options.responsive,
match=-1,
settings=null;
if(!overwrites){
settings=$.extend({}, this.options);
}else{
$.each(overwrites, function(breakpoint){
if(breakpoint <=viewport&&breakpoint > match){
match=Number(breakpoint);
}});
settings=$.extend({}, this.options, overwrites[match]);
if(typeof settings.stagePadding==='function'){
settings.stagePadding=settings.stagePadding();
}
delete settings.responsive;
if(settings.responsiveClass){
this.$element.attr('class',
this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
);
}}
this.trigger('change', { property: { name: 'settings', value: settings }});
this._breakpoint=match;
this.settings=settings;
this.invalidate('settings');
this.trigger('changed', { property: { name: 'settings', value: this.settings }});
};
Owl.prototype.optionsLogic=function(){
if(this.settings.autoWidth){
this.settings.stagePadding=false;
this.settings.merge=false;
}};
Owl.prototype.prepare=function(item){
var event=this.trigger('prepare', { content: item });
if(!event.data){
event.data=$('<' + this.settings.itemElement + '/>')
.addClass(this.options.itemClass).append(item)
}
this.trigger('prepared', { content: event.data });
return event.data;
};
Owl.prototype.update=function(){
var i=0,
n=this._pipe.length,
filter=$.proxy(function(p){ return this[p] }, this._invalidated),
cache={};
while (i < n){
if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){
this._pipe[i].run(cache);
}
i++;
}
this._invalidated={};
!this.is('valid')&&this.enter('valid');
};
Owl.prototype.width=function(dimension){
dimension=dimension||Owl.Width.Default;
switch (dimension){
case Owl.Width.Inner:
case Owl.Width.Outer:
return this._width;
default:
return this._width - this.settings.stagePadding * 2 + this.settings.margin;
}};
Owl.prototype.refresh=function(){
this.enter('refreshing');
this.trigger('refresh');
this.setup();
this.optionsLogic();
this.$element.addClass(this.options.refreshClass);
this.update();
this.$element.removeClass(this.options.refreshClass);
this.leave('refreshing');
this.trigger('refreshed');
};
Owl.prototype.onThrottledResize=function(){
window.clearTimeout(this.resizeTimer);
this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
};
Owl.prototype.onResize=function(){
if(!this._items.length){
return false;
}
if(this._width===this.$element.width()){
return false;
}
if(!this.isVisible()){
return false;
}
this.enter('resizing');
if(this.trigger('resize').isDefaultPrevented()){
this.leave('resizing');
return false;
}
this.invalidate('width');
this.refresh();
this.leave('resizing');
this.trigger('resized');
};
Owl.prototype.registerEventHandlers=function(){
if($.support.transition){
this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
}
if(this.settings.responsive!==false){
this.on(window, 'resize', this._handlers.onThrottledResize);
}
if(this.settings.mouseDrag){
this.$element.addClass(this.options.dragClass);
this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false });
}
if(this.settings.touchDrag){
this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
}};
Owl.prototype.onDragStart=function(event){
var stage=null;
if(event.which===3){
return;
}
if($.support.transform){
stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
stage={
x: stage[stage.length===16 ? 12:4],
y: stage[stage.length===16 ? 13:5]
};}else{
stage=this.$stage.position();
stage={
x: this.settings.rtl ?
stage.left + this.$stage.width() - this.width() + this.settings.margin :
stage.left,
y: stage.top
};}
if(this.is('animating')){
$.support.transform ? this.animate(stage.x):this.$stage.stop()
this.invalidate('position');
}
this.$element.toggleClass(this.options.grabClass, event.type==='mousedown');
this.speed(0);
this._drag.time=new Date().getTime();
this._drag.target=$(event.target);
this._drag.stage.start=stage;
this._drag.stage.current=stage;
this._drag.pointer=this.pointer(event);
$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){
var delta=this.difference(this._drag.pointer, this.pointer(event));
$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){
return;
}
event.preventDefault();
this.enter('dragging');
this.trigger('drag');
}, this));
};
Owl.prototype.onDragMove=function(event){
var minimum=null,
maximum=null,
pull=null,
delta=this.difference(this._drag.pointer, this.pointer(event)),
stage=this.difference(this._drag.stage.start, delta);
if(!this.is('dragging')){
return;
}
event.preventDefault();
if(this.settings.loop){
minimum=this.coordinates(this.minimum());
maximum=this.coordinates(this.maximum() + 1) - minimum;
stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
}else{
minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum());
maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum());
pull=this.settings.pullDrag ? -1 * delta.x / 5:0;
stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
}
this._drag.stage.current=stage;
this.animate(stage.x);
};
Owl.prototype.onDragEnd=function(event){
var delta=this.difference(this._drag.pointer, this.pointer(event)),
stage=this._drag.stage.current,
direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right';
$(document).off('.owl.core');
this.$element.removeClass(this.options.grabClass);
if(delta.x!==0&&this.is('dragging')||!this.is('valid')){
this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);
this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction));
this.invalidate('position');
this.update();
this._drag.direction=direction;
if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){
this._drag.target.one('click.owl.core', function(){ return false; });
}}
if(!this.is('dragging')){
return;
}
this.leave('dragging');
this.trigger('dragged');
};
Owl.prototype.closest=function(coordinate, direction){
var position=-1,
pull=30,
width=this.width(),
coordinates=this.coordinates();
if(!this.settings.freeDrag){
$.each(coordinates, $.proxy(function(index, value){
if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){
position=index;
}else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){
position=index + 1;
}else if(this.op(coordinate, '<', value)
&& this.op(coordinate, '>', coordinates[index + 1]!==undefined ? coordinates[index + 1]:value - width)){
position=direction==='left' ? index + 1:index;
}
return position===-1;
}, this));
}
if(!this.settings.loop){
if(this.op(coordinate, '>', coordinates[this.minimum()])){
position=coordinate=this.minimum();
}else if(this.op(coordinate, '<', coordinates[this.maximum()])){
position=coordinate=this.maximum();
}}
return position;
};
Owl.prototype.animate=function(coordinate){
var animate=this.speed() > 0;
this.is('animating')&&this.onTransitionEnd();
if(animate){
this.enter('animating');
this.trigger('translate');
}
if($.support.transform3d&&$.support.transition){
this.$stage.css({
transform: 'translate3d(' + coordinate + 'px,0px,0px)',
transition: (this.speed() / 1000) + 's' + (
this.settings.slideTransition ? ' ' + this.settings.slideTransition:''
)
});
}else if(animate){
this.$stage.animate({
left: coordinate + 'px'
}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
}else{
this.$stage.css({
left: coordinate + 'px'
});
}};
Owl.prototype.is=function(state){
return this._states.current[state]&&this._states.current[state] > 0;
};
Owl.prototype.current=function(position){
if(position===undefined){
return this._current;
}
if(this._items.length===0){
return undefined;
}
position=this.normalize(position);
if(this._current!==position){
var event=this.trigger('change', { property: { name: 'position', value: position }});
if(event.data!==undefined){
position=this.normalize(event.data);
}
this._current=position;
this.invalidate('position');
this.trigger('changed', { property: { name: 'position', value: this._current }});
}
return this._current;
};
Owl.prototype.invalidate=function(part){
if($.type(part)==='string'){
this._invalidated[part]=true;
this.is('valid')&&this.leave('valid');
}
return $.map(this._invalidated, function(v, i){ return i });
};
Owl.prototype.reset=function(position){
position=this.normalize(position);
if(position===undefined){
return;
}
this._speed=0;
this._current=position;
this.suppress([ 'translate', 'translated' ]);
this.animate(this.coordinates(position));
this.release([ 'translate', 'translated' ]);
};
Owl.prototype.normalize=function(position, relative){
var n=this._items.length,
m=relative ? 0:this._clones.length;
if(!this.isNumeric(position)||n < 1){
position=undefined;
}else if(position < 0||position >=n + m){
position=((position - m / 2) % n + n) % n + m / 2;
}
return position;
};
Owl.prototype.relative=function(position){
position -=this._clones.length / 2;
return this.normalize(position, true);
};
Owl.prototype.maximum=function(relative){
var settings=this.settings,
maximum=this._coordinates.length,
iterator,
reciprocalItemsWidth,
elementWidth;
if(settings.loop){
maximum=this._clones.length / 2 + this._items.length - 1;
}else if(settings.autoWidth||settings.merge){
iterator=this._items.length;
if(iterator){
reciprocalItemsWidth=this._items[--iterator].width();
elementWidth=this.$element.width();
while (iterator--){
reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin;
if(reciprocalItemsWidth > elementWidth){
break;
}}
}
maximum=iterator + 1;
}else if(settings.center){
maximum=this._items.length - 1;
}else{
maximum=this._items.length - settings.items;
}
if(relative){
maximum -=this._clones.length / 2;
}
return Math.max(maximum, 0);
};
Owl.prototype.minimum=function(relative){
return relative ? 0:this._clones.length / 2;
};
Owl.prototype.items=function(position){
if(position===undefined){
return this._items.slice();
}
position=this.normalize(position, true);
return this._items[position];
};
Owl.prototype.mergers=function(position){
if(position===undefined){
return this._mergers.slice();
}
position=this.normalize(position, true);
return this._mergers[position];
};
Owl.prototype.clones=function(position){
var odd=this._clones.length / 2,
even=odd + this._items.length,
map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 };
if(position===undefined){
return $.map(this._clones, function(v, i){ return map(i) });
}
return $.map(this._clones, function(v, i){ return v===position ? map(i):null });
};
Owl.prototype.speed=function(speed){
if(speed!==undefined){
this._speed=speed;
}
return this._speed;
};
Owl.prototype.coordinates=function(position){
var multiplier=1,
newPosition=position - 1,
coordinate;
if(position===undefined){
return $.map(this._coordinates, $.proxy(function(coordinate, index){
return this.coordinates(index);
}, this));
}
if(this.settings.center){
if(this.settings.rtl){
multiplier=-1;
newPosition=position + 1;
}
coordinate=this._coordinates[position];
coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier;
}else{
coordinate=this._coordinates[newPosition]||0;
}
coordinate=Math.ceil(coordinate);
return coordinate;
};
Owl.prototype.duration=function(from, to, factor){
if(factor===0){
return 0;
}
return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed));
};
Owl.prototype.to=function(position, speed){
var current=this.current(),
revert=null,
distance=position - this.relative(current),
direction=(distance > 0) - (distance < 0),
items=this._items.length,
minimum=this.minimum(),
maximum=this.maximum();
if(this.settings.loop){
if(!this.settings.rewind&&Math.abs(distance) > items / 2){
distance +=direction * -1 * items;
}
position=current + distance;
revert=((position - minimum) % items + items) % items + minimum;
if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){
current=revert - distance;
position=revert;
this.reset(current);
}}else if(this.settings.rewind){
maximum +=1;
position=(position % maximum + maximum) % maximum;
}else{
position=Math.max(minimum, Math.min(maximum, position));
}
this.speed(this.duration(current, position, speed));
this.current(position);
if(this.isVisible()){
this.update();
}};
Owl.prototype.next=function(speed){
speed=speed||false;
this.to(this.relative(this.current()) + 1, speed);
};
Owl.prototype.prev=function(speed){
speed=speed||false;
this.to(this.relative(this.current()) - 1, speed);
};
Owl.prototype.onTransitionEnd=function(event){
if(event!==undefined){
event.stopPropagation();
if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){
return false;
}}
this.leave('animating');
this.trigger('translated');
};
Owl.prototype.viewport=function(){
var width;
if(this.options.responsiveBaseElement!==window){
width=$(this.options.responsiveBaseElement).width();
}else if(window.innerWidth){
width=window.innerWidth;
}else if(document.documentElement&&document.documentElement.clientWidth){
width=document.documentElement.clientWidth;
}else{
console.warn('Can not detect viewport width.');
}
return width;
};
Owl.prototype.replace=function(content){
this.$stage.empty();
this._items=[];
if(content){
content=(content instanceof jQuery) ? content:$(content);
}
if(this.settings.nestedItemSelector){
content=content.find('.' + this.settings.nestedItemSelector);
}
content.filter(function(){
return this.nodeType===1;
}).each($.proxy(function(index, item){
item=this.prepare(item);
this.$stage.append(item);
this._items.push(item);
this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}, this));
this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0);
this.invalidate('items');
};
Owl.prototype.add=function(content, position){
var current=this.relative(this._current);
position=position===undefined ? this._items.length:this.normalize(position, true);
content=content instanceof jQuery ? content:$(content);
this.trigger('add', { content: content, position: position });
content=this.prepare(content);
if(this._items.length===0||position===this._items.length){
this._items.length===0&&this.$stage.append(content);
this._items.length!==0&&this._items[position - 1].after(content);
this._items.push(content);
this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}else{
this._items[position].before(content);
this._items.splice(position, 0, content);
this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}
this._items[current]&&this.reset(this._items[current].index());
this.invalidate('items');
this.trigger('added', { content: content, position: position });
};
Owl.prototype.remove=function(position){
position=this.normalize(position, true);
if(position===undefined){
return;
}
this.trigger('remove', { content: this._items[position], position: position });
this._items[position].remove();
this._items.splice(position, 1);
this._mergers.splice(position, 1);
this.invalidate('items');
this.trigger('removed', { content: null, position: position });
};
Owl.prototype.preloadAutoWidthImages=function(images){
images.each($.proxy(function(i, element){
this.enter('pre-loading');
element=$(element);
$(new Image()).one('load', $.proxy(function(e){
element.attr('src', e.target.src);
element.css('opacity', 1);
this.leave('pre-loading');
!this.is('pre-loading')&&!this.is('initializing')&&this.refresh();
}, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina'));
}, this));
};
Owl.prototype.destroy=function(){
this.$element.off('.owl.core');
this.$stage.off('.owl.core');
$(document).off('.owl.core');
if(this.settings.responsive!==false){
window.clearTimeout(this.resizeTimer);
this.off(window, 'resize', this._handlers.onThrottledResize);
}
for (var i in this._plugins){
this._plugins[i].destroy();
}
this.$stage.children('.cloned').remove();
this.$stage.unwrap();
this.$stage.children().contents().unwrap();
this.$stage.children().unwrap();
this.$stage.remove();
this.$element
.removeClass(this.options.refreshClass)
.removeClass(this.options.loadingClass)
.removeClass(this.options.loadedClass)
.removeClass(this.options.rtlClass)
.removeClass(this.options.dragClass)
.removeClass(this.options.grabClass)
.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
.removeData('owl.carousel');
};
Owl.prototype.op=function(a, o, b){
var rtl=this.settings.rtl;
switch (o){
case '<':
return rtl ? a > b:a < b;
case '>':
return rtl ? a < b:a > b;
case '>=':
return rtl ? a <=b:a >=b;
case '<=':
return rtl ? a >=b:a <=b;
default:
break;
}};
Owl.prototype.on=function(element, event, listener, capture){
if(element.addEventListener){
element.addEventListener(event, listener, capture);
}else if(element.attachEvent){
element.attachEvent('on' + event, listener);
}};
Owl.prototype.off=function(element, event, listener, capture){
if(element.removeEventListener){
element.removeEventListener(event, listener, capture);
}else if(element.detachEvent){
element.detachEvent('on' + event, listener);
}};
Owl.prototype.trigger=function(name, data, namespace, state, enter){
var status={
item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v })
.join('-').toLowerCase()
), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(),
$.extend({ relatedTarget: this }, status, data)
);
if(!this._supress[name]){
$.each(this._plugins, function(name, plugin){
if(plugin.onTrigger){
plugin.onTrigger(event);
}});
this.register({ type: Owl.Type.Event, name: name });
this.$element.trigger(event);
if(this.settings&&typeof this.settings[handler]==='function'){
this.settings[handler].call(this, event);
}}
return event;
};
Owl.prototype.enter=function(name){
$.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){
if(this._states.current[name]===undefined){
this._states.current[name]=0;
}
this._states.current[name]++;
}, this));
};
Owl.prototype.leave=function(name){
$.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){
this._states.current[name]--;
}, this));
};
Owl.prototype.register=function(object){
if(object.type===Owl.Type.Event){
if(!$.event.special[object.name]){
$.event.special[object.name]={};}
if(!$.event.special[object.name].owl){
var _default=$.event.special[object.name]._default;
$.event.special[object.name]._default=function(e){
if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){
return _default.apply(this, arguments);
}
return e.namespace&&e.namespace.indexOf('owl') > -1;
};
$.event.special[object.name].owl=true;
}}else if(object.type===Owl.Type.State){
if(!this._states.tags[object.name]){
this._states.tags[object.name]=object.tags;
}else{
this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags);
}
this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){
return $.inArray(tag, this._states.tags[object.name])===i;
}, this));
}};
Owl.prototype.suppress=function(events){
$.each(events, $.proxy(function(index, event){
this._supress[event]=true;
}, this));
};
Owl.prototype.release=function(events){
$.each(events, $.proxy(function(index, event){
delete this._supress[event];
}, this));
};
Owl.prototype.pointer=function(event){
var result={ x: null, y: null };
event=event.originalEvent||event||window.event;
event=event.touches&&event.touches.length ?
event.touches[0]:event.changedTouches&&event.changedTouches.length ?
event.changedTouches[0]:event;
if(event.pageX){
result.x=event.pageX;
result.y=event.pageY;
}else{
result.x=event.clientX;
result.y=event.clientY;
}
return result;
};
Owl.prototype.isNumeric=function(number){
return !isNaN(parseFloat(number));
};
Owl.prototype.difference=function(first, second){
return {
x: first.x - second.x,
y: first.y - second.y
};};
$.fn.owlCarousel=function(option){
var args=Array.prototype.slice.call(arguments, 1);
return this.each(function(){
var $this=$(this),
data=$this.data('owl.carousel');
if(!data){
data=new Owl(this, typeof option=='object'&&option);
$this.data('owl.carousel', data);
$.each([
'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
], function(i, event){
data.register({ type: Owl.Type.Event, name: event });
data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){
if(e.namespace&&e.relatedTarget!==this){
this.suppress([ event ]);
data[event].apply(this, [].slice.call(arguments, 1));
this.release([ event ]);
}}, data));
});
}
if(typeof option=='string'&&option.charAt(0)!=='_'){
data[option].apply(data, args);
}});
};
$.fn.owlCarousel.Constructor=Owl;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var AutoRefresh=function(carousel){
this._core=carousel;
this._interval=null;
this._visible=null;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoRefresh){
this.watch();
}}, this)
};
this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options);
this._core.$element.on(this._handlers);
};
AutoRefresh.Defaults={
autoRefresh: true,
autoRefreshInterval: 500
};
AutoRefresh.prototype.watch=function(){
if(this._interval){
return;
}
this._visible=this._core.isVisible();
this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
};
AutoRefresh.prototype.refresh=function(){
if(this._core.isVisible()===this._visible){
return;
}
this._visible = !this._visible;
this._core.$element.toggleClass('owl-hidden', !this._visible);
this._visible&&(this._core.invalidate('width')&&this._core.refresh());
};
AutoRefresh.prototype.destroy=function(){
var handler, property;
window.clearInterval(this._interval);
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Lazy=function(carousel){
this._core=carousel;
this._loaded=[];
this._handlers={
'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){
if(!e.namespace){
return;
}
if(!this._core.settings||!this._core.settings.lazyLoad){
return;
}
if((e.property&&e.property.name=='position')||e.type=='initialized'){
var settings=this._core.settings,
n=(settings.center&&Math.ceil(settings.items / 2)||settings.items),
i=((settings.center&&n * -1)||0),
position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i,
clones=this._core.clones().length,
load=$.proxy(function(i, v){ this.load(v) }, this);
if(settings.lazyLoadEager > 0){
n +=settings.lazyLoadEager;
if(settings.loop){
position -=settings.lazyLoadEager;
n++;
}}
while (i++ < n){
this.load(clones / 2 + this._core.relative(position));
clones&&$.each(this._core.clones(this._core.relative(position)), load);
position++;
}}
}, this)
};
this._core.options=$.extend({}, Lazy.Defaults, this._core.options);
this._core.$element.on(this._handlers);
};
Lazy.Defaults={
lazyLoad: false,
lazyLoadEager: 0
};
Lazy.prototype.load=function(position){
var $item=this._core.$stage.children().eq(position),
$elements=$item&&$item.find('.owl-lazy');
if(!$elements||$.inArray($item.get(0), this._loaded) > -1){
return;
}
$elements.each($.proxy(function(index, element){
var $element=$(element), image,
url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset');
this._core.trigger('load', { element: $element, url: url }, 'lazy');
if($element.is('img')){
$element.one('load.owl.lazy', $.proxy(function(){
$element.css('opacity', 1);
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this)).attr('src', url);
}else if($element.is('source')){
$element.one('load.owl.lazy', $.proxy(function(){
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this)).attr('srcset', url);
}else{
image=new Image();
image.onload=$.proxy(function(){
$element.css({
'background-image': 'url("' + url + '")',
'opacity': '1'
});
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this);
image.src=url;
}}, this));
this._loaded.push($item.get(0));
};
Lazy.prototype.destroy=function(){
var handler, property;
for (handler in this.handlers){
this._core.$element.off(handler, this.handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var AutoHeight=function(carousel){
this._core=carousel;
this._previousHeight=null;
this._handlers={
'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight){
this.update();
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){
this.update();
}}, this),
'loaded.owl.lazy': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight
&& e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){
this.update();
}}, this)
};
this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options);
this._core.$element.on(this._handlers);
this._intervalId=null;
var refThis=this;
$(window).on('load', function(){
if(refThis._core.settings.autoHeight){
refThis.update();
}});
$(window).resize(function(){
if(refThis._core.settings.autoHeight){
if(refThis._intervalId!=null){
clearTimeout(refThis._intervalId);
}
refThis._intervalId=setTimeout(function(){
refThis.update();
}, 250);
}});
};
AutoHeight.Defaults={
autoHeight: false,
autoHeightClass: 'owl-height'
};
AutoHeight.prototype.update=function(){
var start=this._core._current,
end=start + this._core.settings.items,
lazyLoadEnabled=this._core.settings.lazyLoad,
visible=this._core.$stage.children().toArray().slice(start, end),
heights=[],
maxheight=0;
$.each(visible, function(index, item){
heights.push($(item).height());
});
maxheight=Math.max.apply(null, heights);
if(maxheight <=1&&lazyLoadEnabled&&this._previousHeight){
maxheight=this._previousHeight;
}
this._previousHeight=maxheight;
this._core.$stage.parent()
.height(maxheight)
.addClass(this._core.settings.autoHeightClass);
};
AutoHeight.prototype.destroy=function(){
var handler, property;
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!=='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Video=function(carousel){
this._core=carousel;
this._videos={};
this._playing=null;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace){
this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
}}, this),
'resize.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){
e.preventDefault();
}}, this),
'refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.is('resizing')){
this._core.$stage.find('.cloned .owl-video-frame').remove();
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='position'&&this._playing){
this.stop();
}}, this),
'prepared.owl.carousel': $.proxy(function(e){
if(!e.namespace){
return;
}
var $element=$(e.content).find('.owl-video');
if($element.length){
$element.css('display', 'none');
this.fetch($element, $(e.content));
}}, this)
};
this._core.options=$.extend({}, Video.Defaults, this._core.options);
this._core.$element.on(this._handlers);
this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){
this.play(e);
}, this));
};
Video.Defaults={
video: false,
videoHeight: false,
videoWidth: false
};
Video.prototype.fetch=function(target, item){
var type=(function(){
if(target.attr('data-vimeo-id')){
return 'vimeo';
}else if(target.attr('data-vzaar-id')){
return 'vzaar'
}else{
return 'youtube';
}})(),
id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'),
width=target.attr('data-width')||this._core.settings.videoWidth,
height=target.attr('data-height')||this._core.settings.videoHeight,
url=target.attr('href');
if(url){
id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
if(id[3].indexOf('youtu') > -1){
type='youtube';
}else if(id[3].indexOf('vimeo') > -1){
type='vimeo';
}else if(id[3].indexOf('vzaar') > -1){
type='vzaar';
}else{
throw new Error('Video URL not supported.');
}
id=id[6];
}else{
throw new Error('Missing video URL.');
}
this._videos[url]={
type: type,
id: id,
width: width,
height: height
};
item.attr('data-video', url);
this.thumbnail(target, this._videos[url]);
};
Video.prototype.thumbnail=function(target, video){
var tnLink,
icon,
path,
dimensions=video.width&&video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;':'',
customTn=target.find('img'),
srcType='src',
lazyClass='',
settings=this._core.settings,
create=function(path){
icon='<div class="owl-video-play-icon"></div>';
if(settings.lazyLoad){
tnLink=$('<div/>',{
"class": 'owl-video-tn ' + lazyClass,
"srcType": path
});
}else{
tnLink=$('<div/>', {
"class": "owl-video-tn",
"style": 'opacity:1;background-image:url(' + path + ')'
});
}
target.after(tnLink);
target.after(icon);
};
target.wrap($('<div/>', {
"class": "owl-video-wrapper",
"style": dimensions
}));
if(this._core.settings.lazyLoad){
srcType='data-src';
lazyClass='owl-lazy';
}
if(customTn.length){
create(customTn.attr(srcType));
customTn.remove();
return false;
}
if(video.type==='youtube'){
path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
create(path);
}else if(video.type==='vimeo'){
$.ajax({
type: 'GET',
url: '//vimeo.com/api/v2/video/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data){
path=data[0].thumbnail_large;
create(path);
}});
}else if(video.type==='vzaar'){
$.ajax({
type: 'GET',
url: '//vzaar.com/api/videos/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data){
path=data.framegrab_url;
create(path);
}});
}};
Video.prototype.stop=function(){
this._core.trigger('stop', null, 'video');
this._playing.find('.owl-video-frame').remove();
this._playing.removeClass('owl-video-playing');
this._playing=null;
this._core.leave('playing');
this._core.trigger('stopped', null, 'video');
};
Video.prototype.play=function(event){
var target=$(event.target),
item=target.closest('.' + this._core.settings.itemClass),
video=this._videos[item.attr('data-video')],
width=video.width||'100%',
height=video.height||this._core.$stage.height(),
html,
iframe;
if(this._playing){
return;
}
this._core.enter('playing');
this._core.trigger('play', null, 'video');
item=this._core.items(this._core.relative(item.index()));
this._core.reset(item.index());
html=$('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>');
html.attr('height', height);
html.attr('width', width);
if(video.type==='youtube'){
html.attr('src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id);
}else if(video.type==='vimeo'){
html.attr('src', '//player.vimeo.com/video/' + video.id + '?autoplay=1');
}else if(video.type==='vzaar'){
html.attr('src', '//view.vzaar.com/' + video.id + '/player?autoplay=true');
}
iframe=$(html).wrap('<div class="owl-video-frame" />').insertAfter(item.find('.owl-video'));
this._playing=item.addClass('owl-video-playing');
};
Video.prototype.isInFullScreen=function(){
var element=document.fullscreenElement||document.mozFullScreenElement ||
document.webkitFullscreenElement;
return element&&$(element).parent().hasClass('owl-video-frame');
};
Video.prototype.destroy=function(){
var handler, property;
this._core.$element.off('click.owl.video');
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Video=Video;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Animate=function(scope){
this.core=scope;
this.core.options=$.extend({}, Animate.Defaults, this.core.options);
this.swapping=true;
this.previous=undefined;
this.next=undefined;
this.handlers={
'change.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name=='position'){
this.previous=this.core.current();
this.next=e.property.value;
}}, this),
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){
if(e.namespace){
this.swapping=e.type=='translated';
}}, this),
'translate.owl.carousel': $.proxy(function(e){
if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){
this.swap();
}}, this)
};
this.core.$element.on(this.handlers);
};
Animate.Defaults={
animateOut: false,
animateIn: false
};
Animate.prototype.swap=function(){
if(this.core.settings.items!==1){
return;
}
if(!$.support.animation||!$.support.transition){
return;
}
this.core.speed(0);
var left,
clear=$.proxy(this.clear, this),
previous=this.core.$stage.children().eq(this.previous),
next=this.core.$stage.children().eq(this.next),
incoming=this.core.settings.animateIn,
outgoing=this.core.settings.animateOut;
if(this.core.current()===this.previous){
return;
}
if(outgoing){
left=this.core.coordinates(this.previous) - this.core.coordinates(this.next);
previous.one($.support.animation.end, clear)
.css({ 'left': left + 'px' })
.addClass('animated owl-animated-out')
.addClass(outgoing);
}
if(incoming){
next.one($.support.animation.end, clear)
.addClass('animated owl-animated-in')
.addClass(incoming);
}};
Animate.prototype.clear=function(e){
$(e.target).css({ 'left': '' })
.removeClass('animated owl-animated-out owl-animated-in')
.removeClass(this.core.settings.animateIn)
.removeClass(this.core.settings.animateOut);
this.core.onTransitionEnd();
};
Animate.prototype.destroy=function(){
var handler, property;
for (handler in this.handlers){
this.core.$element.off(handler, this.handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Animate=Animate;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Autoplay=function(carousel){
this._core=carousel;
this._call=null;
this._time=0;
this._timeout=0;
this._paused=true;
this._handlers={
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='settings'){
if(this._core.settings.autoplay){
this.play();
}else{
this.stop();
}}else if(e.namespace&&e.property.name==='position'&&this._paused){
this._time=0;
}}, this),
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoplay){
this.play();
}}, this),
'play.owl.autoplay': $.proxy(function(e, t, s){
if(e.namespace){
this.play(t, s);
}}, this),
'stop.owl.autoplay': $.proxy(function(e){
if(e.namespace){
this.stop();
}}, this),
'mouseover.owl.autoplay': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.pause();
}}, this),
'mouseleave.owl.autoplay': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.play();
}}, this),
'touchstart.owl.core': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.pause();
}}, this),
'touchend.owl.core': $.proxy(function(){
if(this._core.settings.autoplayHoverPause){
this.play();
}}, this)
};
this._core.$element.on(this._handlers);
this._core.options=$.extend({}, Autoplay.Defaults, this._core.options);
};
Autoplay.Defaults={
autoplay: false,
autoplayTimeout: 5000,
autoplayHoverPause: false,
autoplaySpeed: false
};
Autoplay.prototype._next=function(speed){
this._call=window.setTimeout($.proxy(this._next, this, speed),
this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
);
if(this._core.is('interacting')||document.hidden){
return;
}
this._core.next(speed||this._core.settings.autoplaySpeed);
}
Autoplay.prototype.read=function(){
return new Date().getTime() - this._time;
};
Autoplay.prototype.play=function(timeout, speed){
var elapsed;
if(!this._core.is('rotating')){
this._core.enter('rotating');
}
timeout=timeout||this._core.settings.autoplayTimeout;
elapsed=Math.min(this._time % (this._timeout||timeout), timeout);
if(this._paused){
this._time=this.read();
this._paused=false;
}else{
window.clearTimeout(this._call);
}
this._time +=this.read() % timeout - elapsed;
this._timeout=timeout;
this._call=window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
};
Autoplay.prototype.stop=function(){
if(this._core.is('rotating')){
this._time=0;
this._paused=true;
window.clearTimeout(this._call);
this._core.leave('rotating');
}};
Autoplay.prototype.pause=function(){
if(this._core.is('rotating')&&!this._paused){
this._time=this.read();
this._paused=true;
window.clearTimeout(this._call);
}};
Autoplay.prototype.destroy=function(){
var handler, property;
this.stop();
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
'use strict';
var Navigation=function(carousel){
this._core=carousel;
this._initialized=false;
this._pages=[];
this._controls={};
this._templates=[];
this.$element=this._core.$element;
this._overrides={
next: this._core.next,
prev: this._core.prev,
to: this._core.to
};
this._handlers={
'prepared.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.push('<div class="' + this._core.settings.dotClass + '">' +
$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>');
}}, this),
'added.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.splice(e.position, 0, this._templates.pop());
}}, this),
'remove.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.splice(e.position, 1);
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name=='position'){
this.draw();
}}, this),
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&!this._initialized){
this._core.trigger('initialize', null, 'navigation');
this.initialize();
this.update();
this.draw();
this._initialized=true;
this._core.trigger('initialized', null, 'navigation');
}}, this),
'refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._initialized){
this._core.trigger('refresh', null, 'navigation');
this.update();
this.draw();
this._core.trigger('refreshed', null, 'navigation');
}}, this)
};
this._core.options=$.extend({}, Navigation.Defaults, this._core.options);
this.$element.on(this._handlers);
};
Navigation.Defaults={
nav: false,
navText: [
'<span aria-label="' + 'Previous' + '">&#x2039;</span>',
'<span aria-label="' + 'Next' + '">&#x203a;</span>'
],
navSpeed: false,
navElement: 'button type="button" role="presentation"',
navContainer: false,
navContainerClass: 'owl-nav',
navClass: [
'owl-prev',
'owl-next'
],
slideBy: 1,
dotClass: 'owl-dot',
dotsClass: 'owl-dots',
dots: true,
dotsEach: false,
dotsData: false,
dotsSpeed: false,
dotsContainer: false
};
Navigation.prototype.initialize=function(){
var override,
settings=this._core.settings;
this._controls.$relative=(settings.navContainer ? $(settings.navContainer)
: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
this._controls.$previous=$('<' + settings.navElement + '>')
.addClass(settings.navClass[0])
.html(settings.navText[0])
.prependTo(this._controls.$relative)
.on('click', $.proxy(function(e){
this.prev(settings.navSpeed);
}, this));
this._controls.$next=$('<' + settings.navElement + '>')
.addClass(settings.navClass[1])
.html(settings.navText[1])
.appendTo(this._controls.$relative)
.on('click', $.proxy(function(e){
this.next(settings.navSpeed);
}, this));
if(!settings.dotsData){
this._templates=[ $('<button role="button">')
.addClass(settings.dotClass)
.append($('<span>'))
.prop('outerHTML') ];
}
this._controls.$absolute=(settings.dotsContainer ? $(settings.dotsContainer)
: $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
this._controls.$absolute.on('click', 'button', $.proxy(function(e){
var index=$(e.target).parent().is(this._controls.$absolute)
? $(e.target).index():$(e.target).parent().index();
e.preventDefault();
this.to(index, settings.dotsSpeed);
}, this));
/*$el.on('focusin', function(){
$(document).off(".carousel");
$(document).on('keydown.carousel', function(e){
if(e.keyCode==37){
$el.trigger('prev.owl')
}
if(e.keyCode==39){
$el.trigger('next.owl')
}});
});*/
for (override in this._overrides){
this._core[override]=$.proxy(this[override], this);
}};
Navigation.prototype.destroy=function(){
var handler, control, property, override, settings;
settings=this._core.settings;
for (handler in this._handlers){
this.$element.off(handler, this._handlers[handler]);
}
for (control in this._controls){
if(control==='$relative'&&settings.navContainer){
this._controls[control].html('');
}else{
this._controls[control].remove();
}}
for (override in this.overides){
this._core[override]=this._overrides[override];
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
Navigation.prototype.update=function(){
var i, j, k,
lower=this._core.clones().length / 2,
upper=lower + this._core.items().length,
maximum=this._core.maximum(true),
settings=this._core.settings,
size=settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items;
if(settings.slideBy!=='page'){
settings.slideBy=Math.min(settings.slideBy, settings.items);
}
if(settings.dots||settings.slideBy=='page'){
this._pages=[];
for (i=lower, j=0, k=0; i < upper; i++){
if(j >=size||j===0){
this._pages.push({
start: Math.min(maximum, i - lower),
end: i - lower + size - 1
});
if(Math.min(maximum, i - lower)===maximum){
break;
}
j=0, ++k;
}
j +=this._core.mergers(this._core.relative(i));
}}
};
Navigation.prototype.draw=function(){
var difference,
settings=this._core.settings,
disabled=this._core.items().length <=settings.items,
index=this._core.relative(this._core.current()),
loop=settings.loop||settings.rewind;
this._controls.$relative.toggleClass('disabled', !settings.nav||disabled);
if(settings.nav){
this._controls.$previous.toggleClass('disabled', !loop&&index <=this._core.minimum(true));
this._controls.$next.toggleClass('disabled', !loop&&index >=this._core.maximum(true));
}
this._controls.$absolute.toggleClass('disabled', !settings.dots||disabled);
if(settings.dots){
difference=this._pages.length - this._controls.$absolute.children().length;
if(settings.dotsData&&difference!==0){
this._controls.$absolute.html(this._templates.join(''));
}else if(difference > 0){
this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
}else if(difference < 0){
this._controls.$absolute.children().slice(difference).remove();
}
this._controls.$absolute.find('.active').removeClass('active');
this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
}};
Navigation.prototype.onTrigger=function(event){
var settings=this._core.settings;
event.page={
index: $.inArray(this.current(), this._pages),
count: this._pages.length,
size: settings&&(settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items)
};};
Navigation.prototype.current=function(){
var current=this._core.relative(this._core.current());
return $.grep(this._pages, $.proxy(function(page, index){
return page.start <=current&&page.end >=current;
}, this)).pop();
};
Navigation.prototype.getPosition=function(successor){
var position, length,
settings=this._core.settings;
if(settings.slideBy=='page'){
position=$.inArray(this.current(), this._pages);
length=this._pages.length;
successor ? ++position:--position;
position=this._pages[((position % length) + length) % length].start;
}else{
position=this._core.relative(this._core.current());
length=this._core.items().length;
successor ? position +=settings.slideBy:position -=settings.slideBy;
}
return position;
};
Navigation.prototype.next=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
};
Navigation.prototype.prev=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
};
Navigation.prototype.to=function(position, speed, standard){
var length;
if(!standard&&this._pages.length){
length=this._pages.length;
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
}else{
$.proxy(this._overrides.to, this._core)(position, speed);
}};
$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
'use strict';
var Hash=function(carousel){
this._core=carousel;
this._hashes={};
this.$element=this._core.$element;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.startPosition==='URLHash'){
$(window).trigger('hashchange.owl.navigation');
}}, this),
'prepared.owl.carousel': $.proxy(function(e){
if(e.namespace){
var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');
if(!hash){
return;
}
this._hashes[hash]=e.content;
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='position'){
var current=this._core.items(this._core.relative(this._core.current())),
hash=$.map(this._hashes, function(item, hash){
return item===current ? hash:null;
}).join();
if(!hash||window.location.hash.slice(1)===hash){
return;
}
window.location.hash=hash;
}}, this)
};
this._core.options=$.extend({}, Hash.Defaults, this._core.options);
this.$element.on(this._handlers);
$(window).on('hashchange.owl.navigation', $.proxy(function(e){
var hash=window.location.hash.substring(1),
items=this._core.$stage.children(),
position=this._hashes[hash]&&items.index(this._hashes[hash]);
if(position===undefined||position===this._core.current()){
return;
}
this._core.to(this._core.relative(position), false, true);
}, this));
};
Hash.Defaults={
URLhashListener: false
};
Hash.prototype.destroy=function(){
var handler, property;
$(window).off('hashchange.owl.navigation');
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var style=$('<support>').get(0).style,
prefixes='Webkit Moz O ms'.split(' '),
events={
transition: {
end: {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
}},
animation: {
end: {
WebkitAnimation: 'webkitAnimationEnd',
MozAnimation: 'animationend',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
}}
},
tests={
csstransforms: function(){
return !!test('transform');
},
csstransforms3d: function(){
return !!test('perspective');
},
csstransitions: function(){
return !!test('transition');
},
cssanimations: function(){
return !!test('animation');
}};
function test(property, prefixed){
var result=false,
upper=property.charAt(0).toUpperCase() + property.slice(1);
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property){
if(style[property]!==undefined){
result=prefixed ? property:true;
return false;
}});
return result;
}
function prefixed(property){
return test(property, true);
}
if(tests.csstransitions()){
$.support.transition=new String(prefixed('transition'))
$.support.transition.end=events.transition.end[ $.support.transition ];
}
if(tests.cssanimations()){
$.support.animation=new String(prefixed('animation'))
$.support.animation.end=events.animation.end[ $.support.animation ];
}
if(tests.csstransforms()){
$.support.transform=new String(prefixed('transform'));
$.support.transform3d=tests.csstransforms3d();
}})(window.Zepto||window.jQuery, window, document);
;(function ($, window, document, undefined){
Owl2row=function (scope){
this.owl=scope;
this.owl.options=$.extend({}, Owl2row.Defaults, this.owl.options);
this.handlers={
'initialize.owl.carousel': $.proxy(function (e){
if(this.owl.settings.owl2row){
this.build2row(this);
}}, this)
};
this.owl.$element.on(this.handlers);
};
Owl2row.Defaults={
owl2row: false,
owl2rowTarget: 'item',
owl2rowContainer: 'owl2row-item',
owl2rowDirection: 'utd'
};
Owl2row.prototype.build2row=function(thisScope){
var carousel=$(thisScope.owl.$element);
var carouselItems=carousel.find('.' + thisScope.owl.options.owl2rowTarget);
var aEvenElements=[];
var aOddElements=[];
$.each(carouselItems, function (index, item){
if(index % 2===0){
aEvenElements.push(item);
}else{
aOddElements.push(item);
}});
carousel.empty();
switch (thisScope.owl.options.owl2rowDirection){
case 'ltr':
thisScope.leftToright(thisScope, carousel, carouselItems);
break;
default :
thisScope.upTodown(thisScope, aEvenElements, aOddElements, carousel);
}};
Owl2row.prototype.leftToright=function(thisScope, carousel, carouselItems){
var o2wContainerClass=thisScope.owl.options.owl2rowContainer;
var owlMargin=thisScope.owl.options.margin;
var carouselItemsLength=carouselItems.length;
var firsArr=[];
var secondArr=[];
if(carouselItemsLength %2===1){
carouselItemsLength=((carouselItemsLength - 1)/2) + 1;
}else{
carouselItemsLength=carouselItemsLength/2;
}
$.each(carouselItems, function (index, item){
if(index < carouselItemsLength){
firsArr.push(item);
}else{
secondArr.push(item);
}});
$.each(firsArr, function (index, item){
var rowContainer=$('<div class="' + o2wContainerClass + '"/>');
var firstRowElement=firsArr[index];
firstRowElement.style.marginBottom=owlMargin + 'px';
rowContainer
.append(firstRowElement)
.append(secondArr[index]);
carousel.append(rowContainer);
});
};
Owl2row.prototype.upTodown=function(thisScope, aEvenElements, aOddElements, carousel){
var o2wContainerClass=thisScope.owl.options.owl2rowContainer;
var owlMargin=thisScope.owl.options.margin;
$.each(aEvenElements, function (index, item){
var rowContainer=$('<div class="' + o2wContainerClass + '"/>');
var evenElement=aEvenElements[index];
evenElement.style.marginBottom=owlMargin + 'px';
rowContainer
.append(evenElement)
.append(aOddElements[index]);
carousel.append(rowContainer);
});
};
Owl2row.prototype.destroy=function(){
var handler, property;
for (handler in this.handlers){
this.owl.dom.$el.off(handler, this.handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!=='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins['owl2row']=Owl2row;
})(window.Zepto||window.jQuery, window,  document);
(function ($){
$.fn.ThunkCatMenu=function (options){
var defaults={
resizeWidth: '',
animationSpeed: 'fast',
accoridonExpAll: false
};
var options=$.extend(defaults, options),
opt=options,
$resizeWidth=opt.resizeWidth,
$animationSpeed=opt.animationSpeed,
$expandAll=opt.accoridonExpAll,
$aceMenu=$(this),
$menuStyle=$(this).attr('data-menu-style');
$aceMenu.find('ul').addClass("sub-menu");
$aceMenu.find('ul').siblings('a').append('<span class="arrow"></span>');
if($menuStyle=='accordion'){$(this).addClass('collapse');
}
if($(window).innerWidth()<=$resizeWidth){
menuCollapse();
}
function menuCollapse(){
var w=$(window).innerWidth();
if(w <=$resizeWidth){
if($aceMenu.attr('data-menu-style')=='vertical'){
$aceMenu.attr("data-menu-style","accordion");
$aceMenu.addClass('collapse');
return;
}}else{
$aceMenu.attr("data-menu-style","vertical");
}
$aceMenu.attr('data-menu-style', $menuStyle);
$aceMenu.removeClass('collapse hide-menu').removeAttr('style');
$('.menu-toggle').hide();
if($aceMenu.attr('data-menu-style')=='accordion'){
$aceMenu.addClass('collapse');
return;
}
$aceMenu.find('li.menu-active').removeClass('menu-active');
$aceMenu.find('ul.slide').removeClass('slide').removeAttr('style');
}
return this.each(function (){
$aceMenu.on('mouseover', '> li a', function (){
if($aceMenu.hasClass('collapse')===true){
return false;
}
$(this).off('click', '> li a');
$(this).parent('li').siblings().children('.sub-menu').stop(true, true).removeClass('slide').removeAttr('style').stop();
$(this).parent().addClass('menu-active').children('.sub-menu').slideDown($animationSpeed).addClass('slide');
return;
});
$aceMenu.on('mouseleave', 'li', function (){
if($aceMenu.hasClass('collapse')===true){
return false;
}
$(this).off('click', '> li a');
$(this).removeClass('menu-active');
$(this).children('ul.sub-menu').stop(true, true).slideUp($animationSpeed).removeClass('slide').removeAttr('style');
return;
});
$aceMenu.on('click', 'li span.arrow', function (e){
e.preventDefault();
if($aceMenu.hasClass('collapse')==false){
}
$(this).off('mouseover', '> li a');
if($(this).parent().parent().hasClass('menu-active')){
$(this).parent().parent().children('.sub-menu').slideUp().removeClass('slide');
$(this).parent().parent().removeClass('menu-active');
}else{
if($expandAll==true){
$(this).parent().parent().addClass('menu-active').children('.sub-menu').slideDown($animationSpeed).addClass('slide');
return;
}}
});
$aceMenu.on('keypress', 'li span.arrow', function (e){
var w=$(window).innerWidth();
if(w <=$resizeWidth){
e.preventDefault();
if($aceMenu.hasClass('collapse')==false){
}
$(this).off('mouseover', '> li a');
if($(this).parent().parent().hasClass('menu-active')){
$(this).parent().parent().children('.sub-menu').slideUp().removeClass('slide');
$(this).parent().parent().removeClass('menu-active');
}else{
if($expandAll==true){
$(this).parent().parent().addClass('menu-active').children('.sub-menu').slideDown($animationSpeed).addClass('slide');
return;
}}
}});
});
}})(jQuery);
(function ($){
var wpmlRtl=$('html').attr('dir');
var BigStoreLib={
init: function (){
this.bindEvents();
},
bindEvents: function (){
var $this=this;
$this.sticky_header();
$this.sticky_sidebar_hide_toggle();
$this.sticky_product_search();
$this.pre_loader();
$this.CatMenu();
$this.DefaultMenu();
$this.MainMenu();
$this.StickMenu();
$this.AboveMenu();
$this.MobileMenuFunction();
$this.mobile_menu_with_woocat();
$this.Top2Slider();
$this.TopMultiSlide();
$this.TopFullSlide();
if(big_store.big_store_move_to_top_optn){
$this.MoveToTop();
}
if($('.header__cat__item.dropdown').length!==0){
$this.cat_toggle();
}
$this.MobilenavBar();
},
sticky_sidebar_hide_toggle: function (){
if($('#sidebar-primary.bigstr-sticky-sidebar').length!==0){
var lastScrollTop=0;
$(window).on('scroll', function(){
st=$(this).scrollTop();
if(st < lastScrollTop){
$('.product-cat-list').hide();
}
lastScrollTop=st;
});
}},
sticky_header: function (){
if(big_store.big_store_sticky_header_effect=='scrldwmn'){
var position=jQuery(window).scrollTop();
var $headerBar=jQuery('header').height();
jQuery(window).scroll(function(){
var scroll=jQuery(window).scrollTop();
if(scroll > position||scroll < $headerBar){
jQuery(".sticky-header").removeClass("stick");
$(".search-wrapper").removeClass("open");
}else{
jQuery(".sticky-header").addClass("stick");
}
position=scroll;
});
}else{
jQuery(document).on("scroll", function(){
var $headerBar=jQuery('header').height();
if(jQuery(document).scrollTop() > $headerBar){
jQuery(".sticky-header").addClass("stick");
}else{
$(".search-wrapper").removeClass("open");
jQuery(".sticky-header").removeClass("stick");
}});
}},
sticky_product_search: function (){
$('.prd-search').on('click', function (e){
e.preventDefault();
$(".search-wrapper").addClass("open");
});
$('.search-close-btn').on('click', function (e){
e.preventDefault();
$(".search-wrapper").removeClass("open");
});
},
cat_toggle:function (){
$('.header__cat__item.dropdown').on('click', function (e){
e.preventDefault();
$(this).toggleClass('open');
});
},
pre_loader:function (){
if(!$('body').hasClass('elementor-editor-active')){
$(window).on('load', function(){
setTimeout(removeLoader);
});
function removeLoader(){
$(".big_store_overlayloader").fadeOut(700, function(){
$(".big-store-pre-loader img").hide();
});
}}
},
CatMenu:function (){
$(".cat-toggle").click(function(){
$(".product-cat-list").slideToggle();
$(".toggle-icon", this).toggleClass("icon-circle-arrow-down");
});
$("#mobile-nav-tab-category .mobile").ThunkCatMenu({
resizeWidth:'1024',
animationSpeed:'fast',
accoridonExpAll:true
});
$(".product-cat-list").ThunkCatMenu({
resizeWidth:'767',
animationSpeed:'fast',
accoridonExpAll:true
});
$(".thunk-product-cat-list.slider").ThunkCatMenu({
resizeWidth:'767',
animationSpeed:'fast',
accoridonExpAll:true
});
},
DefaultMenu: function(){
$("#menu-all-pages.big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
$(".menu ul.big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
$("#mobile-nav-tab-menu #menu-all-pages.big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
$("#mobile-nav-tab-menu .menu ul.big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
},
MainMenu:function(){
$("#big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
$("#mobile-nav-tab-menu #big-store-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
},
StickMenu:function(){
$("#big-store-stick-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
},
AboveMenu:function(){
$("#open-above-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
$("#mobile-nav-tab-menu #open-above-menu").bigStoreResponsiveMenu({
resizeWidth:'1024',
animationSpeed:'medium',
accoridonExpAll:true
});
},
MobileMenuFunction:function(){
var menuclose=big_store.mobile_menuclose;
$('body').find('.sider').prepend('<div class="menu-close"><a href="#" class="menu-close-btn">'+menuclose+'</a></div>');
$('.menu-close-btn').removeAttr("href");
$('.menu-close-btn,.big-store-menu li a span.big-store-menu-link').click(function(){
$('body').removeClass('mobile-menu-active');
$('body').removeClass('sticky-mobile-menu-active');
});
$('.menu-close-btn,.big-store-menu li a span.big-store-menu-link').keypress(function(){
$('body').removeClass('mobile-menu-active');
$('body').removeClass('sticky-mobile-menu-active');
});
document.addEventListener('keydown', function(event){
if(event.keyCode===27){
event.preventDefault();
document.querySelectorAll('.mobile-menu-active').forEach(function(element){
jQuery('body').removeClass('mobile-menu-active');
}.bind(this) );
}}.bind(this) );
$('#menu-btn-abv').click(function (e){
e.preventDefault();
$('body').addClass('mobile-above-menu-active');
$('#open-above-menu').removeClass('hide-menu');
$('.sider.above').removeClass('big-store-menu-hide');
$('.sider.main').addClass('big-store-menu-hide');
bigstoremenu.modalMenu.init();
});
$('#menu-btn,#mob-menu-btn').click(function (e){
e.preventDefault();
$('body').addClass('mobile-menu-active');
$('#big-store-menu').removeClass('hide-menu');
$('.sider.above').addClass('big-store-menu-hide');
$('.sider.main').removeClass('big-store-menu-hide');
bigstoremenu.modalMenu.init();
});
$('#menu-btn-stk').click(function (e){
e.preventDefault();
$('body').addClass('sticky-mobile-menu-active');
$('.sider.main').addClass('big-store-menu-hide');
bigstoremenu.modalMenu.init();
});
$('#menu-btn,#mob-menu-btn').click(function (e){
e.preventDefault();
$('body').addClass('mobile-menu-active');
$('#menu-all-pages').removeClass('hide-menu');
bigstoremenu.modalMenu.init();
});
},
mobile_menu_with_woocat: function (){
$(document).ready(function(){
$('.mobile-nav-tabs li a').click(function(){
$('.panel').hide();
$('.mobile-nav-tabs li a.active').removeClass('active');
$(this).addClass('active');
var panel=$(this).attr('href');
$(panel).fadeIn(1000);
return false;
});
$('.mobile-nav-tabs li:first a').click();
});
},
Top2Slider:function(){
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
var owl=$('.thunk-top2-slide');
owl.owlCarousel({
rtl:bgstr_rtl,
items:1,
nav: true,
navText: ["<i class='brand-nav fa fa-angle-left'></i>",
"<i class='brand-nav fa fa-angle-right'></i>"],
loop:true,
dots: false,
smartSpeed:500,
autoHeight: false,
margin:0,
autoplay:big_store.big_store_top_slider_optn,
autoplayTimeout: parseInt(big_store.big_store_slider_speed),
autoplayHoverPause: true,
});
function setAnimation(_elem, _InOut){
var animationEndEvent='webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
_elem.each(function (){
var $elem=$(this);
var $animationType='animated ' + $elem.data('animation-' + _InOut);
$elem.addClass($animationType).one(animationEndEvent, function (){
$elem.removeClass($animationType);
});
});
}
owl.on('change.owl.carousel', function(event){
var $currentItem=$('.owl-item', owl).eq(event.item.index);
var $elemsToanim=$currentItem.find("[data-animation-out]");
setAnimation ($elemsToanim, 'out');
});
var round=0;
owl.on('changed.owl.carousel', function(event){
var $currentItem=$('.owl-item', owl).eq(event.item.index);
var $elemsToanim=$currentItem.find("[data-animation-in]");
setAnimation ($elemsToanim, 'in');
})
owl.on('translated.owl.carousel', function(event){
if(event.item.index==(event.page.count - 1)){
if(round < 1){
round++
}else{
owl.trigger('stop.owl.autoplay');
var owlData=owl.data('owl.carousel');
owlData.settings.autoplay=false;
owlData.options.autoplay=false;
owl.trigger('refresh.owl.carousel');
}}
});
},
TopMultiSlide:function(){
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
if(big_store.big_store_top_slider_optn==true){
var sld_atply_p=true;
}else{
var sld_atply_p=false;
}
var owl=$('.thunk-slider-multi-slide');
owl.owlCarousel({
rtl:bgstr_rtl,
items:4,
nav: false,
loop:sld_atply_p,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin:15,
autoplay:sld_atply_p,
autoplayHoverPause: true,
autoplayTimeout: 3000,
responsive:{
0:{
items:2,
margin:7.5,
},
768:{
items:2,
},
900:{
items:3,
},
1025:{
items:4,
}}
});
},
TopFullSlide:function(){
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
if(big_store.big_store_top_slider_optn==true){
var sld_atply_p=true;
}else{
var sld_atply_p=false;
}
var owl=$('.thunk-slider-full-slide');
owl.owlCarousel({
rtl:bgstr_rtl,
items:1,
nav: false,
loop:sld_atply_p,
dots: true,
smartSpeed: 1800,
autoHeight: false,
margin:0,
autoplay:sld_atply_p,
autoplayHoverPause: true,
autoplayTimeout: 3000,
responsive:{
0:{
items:1,
},
768:{
items:1,
},
900:{
items:1,
},
1025:{
items:1,
}}
});
},
MoveToTop:function(){
jQuery("body").prepend("<a id='move-to-top' class='animate' href='#'><i class='fa fa-angle-up'></i></a>");
var scrollDes='html,body';
if(navigator.userAgent.match(/opera/i)){
scrollDes='html';
}
jQuery(window).scroll(function (){
if(jQuery(this).scrollTop() > 160){
jQuery('#move-to-top').addClass('filling').removeClass('hiding');
}else{
jQuery('#move-to-top').removeClass('filling').addClass('hiding');
}});
jQuery('#move-to-top').click(function(){
jQuery("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
},
MobilenavBar:function(){
jQuery(window).scroll(function (){
if(jQuery(this).scrollTop() > 160){
jQuery('#bigstore-mobile-bar').addClass('active').removeClass('hiding');
if($(window).scrollTop() + window.innerHeight >=document.body.scrollHeight){
jQuery('#bigstore-mobile-bar').removeClass('active');
}
$('window').on('touchmove', function(event){
event.preventDefault();
if($(window).scrollTop() + window.innerHeight >=document.body.scrollHeight){
jQuery('#bigstore-mobile-bar').removeClass('active');
}});
}else{
jQuery('#bigstore-mobile-bar').removeClass('active').addClass('hiding');
}});
},
}
var bigstoremenu=bigstoremenu||{};
bigstoremenu.modalMenu={
init: function(){
this.keepFocusInModal();
},
keepFocusInModal: function(){
var _doc=document;
_doc.addEventListener('keydown', function(event){
var toggleTarget, modal, selectors, elements, menuType, bottomMenu, activeEl, lastEl, firstEl, tabKey, shiftKey,
toggleTarget='.mobile-nav-bar.sider';
if(jQuery('.mobile-menu-active').length!=''){
selectors='a,.arrow';
modal=_doc.querySelector(toggleTarget);
elements=modal.querySelectorAll(selectors);
elements=Array.prototype.slice.call(elements);
if('.mobile-nav-bar.sider'===toggleTarget){
menuType=window.matchMedia('(min-width: 1024px)').matches;
menuType=menuType ? '.expanded-menu':'.mobile-nav-tab-menu .big-store-menu';
elements=elements.filter(function(element){
return null!==element.closest(menuType)&&null!==element.offsetParent;
});
elements.unshift(_doc.querySelector('.mobile-nav-bar .menu-close-btn') );
$('.mobile-nav-tab-menu .big-store-menu a,.mobile-nav-bar .menu-close-btn,.mobile-nav-bar .arrow').attr('tabindex',0);
}
lastEl=elements[ elements.length - 1 ];
firstEl=elements[0];
activeEl=_doc.activeElement;
tabKey=event.keyCode===9;
shiftKey=event.shiftKey;
if(! shiftKey&&tabKey&&lastEl===activeEl){
event.preventDefault();
firstEl.focus();
}
if(shiftKey&&tabKey&&firstEl===activeEl){
event.preventDefault();
lastEl.focus();
}}
});
}};
BigStoreLib.init();
$(".menu-close-btn").click(function(){
$('.menu-toggle .menu-btn').focus().select();
$('.big-store-menu a,.menu-close,.arrow').attr('tabindex',-1);
});
$(".menu-close-btn").keypress(function(){
$('.menu-toggle .menu-btn').focus().select();
$('.big-store-menu a,.menu-close,.arrow').attr('tabindex',-1);
});
})(jQuery);
(function ($){
var wpmlRtl=$('html').attr('dir');
var BigStoreWooLib={
init: function (){
this.bindEvents();
},
bindEvents: function (){
var $this=this;
$this.tooltip_option();
$this.listGridView();
$this.OffCanvas();
$this.cartDropdown();
$this.AddtoCartQuanty();
$this.AutoCompleteSearch();
$this.CategoryTabFilter();
$this.ProductSlide();
$this.ProductListSlide();
$this.CategorySlider();
$this.ProductImageTabFilter();
$this.cartopen();
$this.woccomerce_tab();
$this.product_descr_excerpt();
$this.tooltip();
},
tooltip_option: function (){
if(big_store.header_tt_enable){
setTimeout(()=> {
if($(".cart-contents").length&&big_store.tt_add_to_cart){
$(".header-support-icon .cart-contents i").attr("th-tooltip",
big_store.tt_add_to_cart
);
}}, 1000);
if($(".account").length&&big_store.tt_account){
$(".header-support-icon .account").attr("th-tooltip",
big_store.tt_account
);
}
if($(".whishlist").length&&big_store.tt_wishlist){
$(".header-support-icon .whishlist").attr("th-tooltip",
big_store.tt_wishlist
);
}}
if(big_store.page_tt_enable){
if($(".add_to_cart_button").length&&big_store.tt_add_to_cart){
$(".add_to_cart_button").attr("th-tooltip", big_store.tt_add_to_cart);
}
if($(".opn-quick-view-text").length&&big_store.tt_quickview){
$(".opn-quick-view-text").attr("th-tooltip", big_store.tt_quickview);
}
if($(".compare").length&&big_store.tt_compare){
$(".compare").attr("th-tooltip", big_store.tt_compare);
}
if($(".add_to_wishlist").length&&big_store.tt_wishlist){
$(".add_to_wishlist").attr("th-tooltip", big_store.tt_wishlist);
}}
},
tooltip: function (){
setTimeout(()=> {
let initTooltip=$("[th-tooltip]");
if(initTooltip.length){
let tooltipHtml='<div class="tooltip-show-with-title">';
tooltipHtml +='<span class="th-ttt"></span>';
tooltipHtml +=
'<svg class="pointer_" viewBox="0 0 1280 70" preserveAspectRatio="none">';
tooltipHtml +='<polygon points="1280,70 0,70 640,0 "></polygon>';
tooltipHtml +="</svg>";
tooltipHtml +="</div>";
let keepToolTip=$(".tooltip-show-with-title");
if(keepToolTip.length==0){
$("body").append(tooltipHtml);
}
$(document).on({
mouseenter: function (){
let element=$(this);
let element_=element[0].getBoundingClientRect();
let tooltip_=$(".tooltip-show-with-title");
if(tooltip_.length){
let title_=element.attr("th-tooltip");
if(title_&&title_!=""){
tooltip_.find(".th-ttt").text(title_);
let getScrollTop=$(window).scrollTop();
let tooltip=tooltip_[0].getBoundingClientRect();
let TopMargin=element_.top - (tooltip.height + 12);
TopMargin=getScrollTop + TopMargin;
let getTTwidth=tooltip.width / 2;
let elementWidth=element_.width / 2;
let leftMargin =
element_.left - (getTTwidth - elementWidth);
tooltip_.addClass("active");
tooltip_.css({ top: TopMargin, left: leftMargin });
}}
},
mouseleave: function (){
let element_=$(this);
let tooltip=$(".tooltip-show-with-title");
tooltip.removeClass("active");
},
},
"[th-tooltip]"
);
}}, 1000);
},
woccomerce_tab: function (){
$(document).ready(function (){
if($(".description_tab").hasClass("active")){
$(".woocommerce-Tabs-panel.woocommerce-Tabs-panel--description").css("display",
"block"
);
}});
},
listGridView: function (){
var wrapper=$(".thunk-list-grid-switcher");
var class_name="";
wrapper.find("a").on("click", function (e){
e.preventDefault();
var type=$(this).attr("data-type");
switch (type){
case "list":
class_name="thunk-list-view";
break;
case "grid":
class_name="thunk-grid-view";
break;
default:
class_name="thunk-grid-view";
break;
}
if(class_name!=""){
$(this)
.closest("#shop-product-wrap")
.attr("class", "")
.addClass(class_name);
$(this)
.closest(".thunk-list-grid-switcher")
.find("a")
.removeClass("selected");
$(this).addClass("selected");
}});
},
OffCanvas: function (){
var off_canvas_wrapper=$(".big-store-off-canvas-sidebar-wrapper");
var opn_shop_offcanvas_filter_close=function (){
$("html").css({
overflow: "",
"margin-right": "",
});
$("html").removeClass("big-store-enabled-overlay");
};
var trigger_class="off-canvas-button";
if("undefined"!=typeof BigStore_Off_Canvas &&
""!=BigStore_Off_Canvas.off_canvas_trigger_class
){
trigger_class=BigStore_Off_Canvas.off_canvas_trigger_class;
}
$(document).on("click", "." + trigger_class, function (e){
e.preventDefault();
var innerWidth=$("html").innerWidth();
$("html").css("overflow", "hidden");
var hiddenInnerWidth=$("html").innerWidth();
$("html").css("margin-right", hiddenInnerWidth - innerWidth);
$("html").addClass("big-store-enabled-overlay");
});
off_canvas_wrapper.on("click", function (e){
if(e.target===this){
opn_shop_offcanvas_filter_close();
}});
off_canvas_wrapper.find(".menu-close").on("click", function (e){
opn_shop_offcanvas_filter_close();
});
},
cartDropdown: function (){
if(typeof wc_add_to_cart_params==="undefined"){
return false;
}
$(document).on("click", ".ajax_add_to_cart", function (e){
e.preventDefault();
var data1={
action: "big_store_product_count_update",
};
$.post(woocommerce_params.ajax_url,
data1,
function (response_data){
$("a.cart-content").html(response_data);
$(".return.wc-backward").remove();
$("body").toggleClass("cart-pan-active");
$(".cart-overlay").toggleClass("open");
}
);
});
$(document).on("click", "a.remove", function (e){
e.preventDefault();
var $thisbutton=$(this);
if($thisbutton.is(".remove")){
if(!$thisbutton.attr("data-product_id")){
return true;
}}
$product_id=$thisbutton.attr("data-product_id");
var data={
product_id: $product_id,
action: "big_store_product_remove",
nonce:bigstore.bignonce
};
$.post(woocommerce_params.ajax_url,
data,
function (response){
$(".open-quickcart-dropdown").html(response);
var data={
action: "big_store_product_count_update",
nonce:bigstore.bignonce
};
$.post(woocommerce_params.ajax_url,
data,
function (response_data){
$("a.cart-content").html(response_data);
}
);
}
);
return false;
});
},
AddtoCartQuanty: function (){
$("form.cart").on("click", "button.plus, button.minus", function (){
var qty=$(this).siblings(".quantity").find(".qty");
var val=parseFloat(qty.val()) ? parseFloat(qty.val()):"0";
var max=parseFloat(qty.attr("max"));
var min=parseFloat(qty.attr("min"));
var step=parseFloat(qty.attr("step"));
if($(this).is(".plus")){
if(max&&max <=val){
qty.val(max);
}else{
qty.val(val + step);
}}else{
if(min&&min >=val){
qty.val(min);
}else if(val > 1){
qty.val(val - step);
}}
});
},
AutoCompleteSearch: function (){
$(document).on("click",
".thmk-woocommerce-search-wrap .thmk-woocommerce-search-wrap-submit button",
autoCompleteSubmit
);
function autoCompleteSubmit(){
let button_=$(this);
let getUrl=button_.attr("data-url");
let mainWrap=button_.closest(".thmk-woocommerce-search-wrap");
let text_=mainWrap.find('input[name="product-search-text"]').val();
let category=mainWrap.find('select[name="product_cat"]').val();
let title_=text_&&text_!=="" ? text_:"";
let cate_=category&&category!=="" ? category:"";
if(getUrl){
let urlText =
getUrl + `?s=${title_}&product_cat=${cate_}&post_type=product`;
window.location.href=urlText;
}}
$(document).on("click",
'.thmk-woocommerce-search-wrap input[name="product-search-text"]',
function (){
const searchBoxTxt=$(this);
const mainWrap=searchBoxTxt.closest(".thmk-woocommerce-search-wrap"
);
const resultWrap=mainWrap.find(".thmk-woocommerce-search-result");
const getLiresult=resultWrap.find("li");
let searchVal=searchBoxTxt.val();
if(!mainWrap.hasClass("loading") &&
searchVal &&
searchVal.length >=2 &&
getLiresult.length > 0
){
resultWrap.show();
}else{
resultWrap.hide();
}}
);
var searchTimeout=null;
$(document).on("keyup",
'.thmk-woocommerce-search-wrap input[name="product-search-text"]',
autoComplete
);
function autoComplete(e){
const searchBoxTxt=$(this);
const mainWrap=searchBoxTxt.closest(".thmk-woocommerce-search-wrap");
const resultWrap=mainWrap.find(".thmk-woocommerce-search-result");
const resultWrapUl=resultWrap.find("ul");
const submitButton=mainWrap.find(".thmk-woocommerce-search-wrap-submit button"
);
let searchVal=searchBoxTxt.val();
if(searchVal&&searchVal.length >=2){
mainWrap.addClass("loading");
jQuery(document).mouseup(function (e){
if(!mainWrap.is(e.target)&&mainWrap.has(e.target).length===0){
resultWrap.hide();
}});
let select_=mainWrap.find(".thmk-woocommerce-select");
let cat_=select_.length&&select_.val() ? select_.val():"";
let dataToAjx={
action: "big_store_search_site",
match: searchVal,
cat: cat_,
nonce:bigstore.bignonce
};
clearTimeout(searchTimeout);
searchTimeout=setTimeout(()=> {
$.ajax({
type: "POST",
dataType: "json",
url: bigstore.ajaxUrl,
data: dataToAjx,
success: function (response){
resultWrap.show();
if(response.data.length > 0){
let productLists="";
let viewMoreLink="";
let dataList=response.data;
let getUrl=submitButton.attr("data-url");
if(dataList.length > 5){
dataList=dataList.slice(0, 5);
let urlText =
getUrl +
`?s=${searchVal}&product_cat=${cat_}&post_type=product`;
viewMoreLink +=
'<li class="view-all-search"><a href="' + urlText + '">';
viewMoreLink +="View all results";
viewMoreLink +="</a></li>";
}
$.each(dataList, (index_, val_)=> {
productLists +='<li><a href="' + val_.link + '">';
productLists +=
'<div class="srch-prd-img"><img src="' +
val_.imglink +
'"></div>';
productLists +='<div class="srch-prd-content">';
productLists +=
'<span class="title">' + val_.label + "</span>";
productLists +='<span class="price">';
productLists +=val_.price;
productLists +="</span>";
productLists +="</div>";
productLists +="</a></li>";
});
productLists +=viewMoreLink;
resultWrapUl.html(productLists);
mainWrap.removeClass("loading");
}else{
let htmlBlank='<li class="no-result">No Result Found</li>';
resultWrapUl.html(htmlBlank);
mainWrap.removeClass("loading");
}},
});
}, 50);
}else{
resultWrap.hide();
}}
},
cartopen: function (){
$(document).on("click", "a.cart-contents", function (e){
e.preventDefault();
$("body").toggleClass("cart-pan-active");
$(".cart-overlay").toggleClass("open");
});
$(".cart-close-btn").click(function (e){
$("body").removeClass("cart-pan-active");
$(".cart-overlay").removeClass("open");
});
$("body").click(function (evt){
if(evt.target.class==".open-cart") return;
if($(evt.target).closest(".open-cart").length) return;
$("body").removeClass("cart-pan-active");
$(".cart-overlay").removeClass("open");
});
},
CategoryTabFilter: function (){
if(bigstore.big_store_single_row_slide_cat==true){
var sliderow=false;
}else{
var sliderow=true;
}
if(bigstore.big_store_cat_slider_optn==true){
var cat_atply=true;
}else{
var cat_atply=false;
}
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
var owl=$(".thunk-product-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 5,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
900: {
items: 4,
},
1025: {
items: 5,
},
},
});
$(".thunk-product-tab-section #thunk-cat-tab li a:first").addClass("active"
);
$(document).on("click",
".thunk-product-tab-section #thunk-cat-tab li a",
function (e){
$(".thunk-product-tab-section #thunk-cat-tab .tab-content").append('<div class="thunk-loadContainer"> <div class="loader"></div></div>'
);
$(".thunk-product-tab-section .thunk-loadContainer").css("display",
"block"
);
$(
".thunk-product-tab-section #thunk-cat-tab li a.active"
).removeClass("active");
$(this).addClass("active");
var data_term_id=$(this).attr("data-filter");
$.ajax({
type: "POST",
url: bigstore.ajaxUrl,
data: {
action: "big_store_cat_filter_ajax",
data_cat_slug: data_term_id,
nonce:bigstore.bignonce
},
dataType: "html",
}).done(function (response){
if(response){
$(".thunk-product-tab-section #thunk-cat-tab .tab-content").html('<div class="thunk-slide thunk-product-cat-slide owl-carousel"></div> <div class="thunk-loadContainer"> <div class="loader"></div></div>'
);
$(".thunk-slide.thunk-product-cat-slide.owl-carousel").append(response
);
var owl=$(".thunk-product-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 5,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
900: {
items: 4,
},
1025: {
items: 5,
},
},
});
$(".thunk-product-tab-section .thunk-loadContainer").css("display",
"none"
);
$("li.thvs_loop-available-attributes__value").hover(function (){
var src=$(this).attr("data-o-src");
var id=$(this).attr("data-product-id");
$("li.thvs_loop-available-attributes__value")
.closest(".post-" + id)
.find("img.attachment-woocommerce_thumbnail")
.attr("srcset", src);
});
}});
e.preventDefault();
}
);
},
ProductSlide: function (){
if(bigstore.big_store_single_row_prdct_slide==true){
var sliderow_p=false;
}else{
var sliderow_p=true;
}
if(bigstore.big_store_product_slider_optn==true){
var cat_atply_p=true;
}else{
var cat_atply_p=false;
}
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
var owl=$(".thunk-product-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 5,
nav: true,
owl2row: sliderow_p,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply_p,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 20,
autoplay: cat_atply_p,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
900: {
items: 4,
},
1025: {
items: 5,
},
},
});
},
ProductListSlide: function (){
if(bigstore.big_store_single_row_prdct_list==true){
var sliderow_l=false;
}else{
var sliderow_l=true;
}
if(bigstore.big_store_product_list_slide_optn==true){
var cat_atply_l=true;
}else{
var cat_atply_l=false;
}
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
var owl=$(".thunk-product-list");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 3,
nav: true,
owl2row: sliderow_l,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply_l,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply_l,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
900: {
items: 4,
},
1025: {
items: 4,
},
},
});
},
CategorySlider: function (){
if(bigstore.big_store_category_slider_optn==true){
var cat_atply_c=true;
}else{
var cat_atply_c=false;
}
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
var column_no=parseInt(bigstore.big_store_cat_item_no);
var owl=$(".thunk-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 10,
nav: true,
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply_c,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply_c,
autoplayHoverPause: true,
responsive: {
0: {
items: 3,
margin: 7.5,
},
768: {
items: 5,
},
900: {
items: 7,
},
1025: {
items: column_no,
},
},
});
},
ProductImageTabFilter: function (){
if(bigstore.big_store_product_img_sec_single_row_slide==true){
var sliderow=false;
}else{
var sliderow=true;
}
if(bigstore.big_store_product_img_sec_slider_optn==true){
var cat_atply=true;
}else{
var cat_atply=false;
}
if(big_store.big_store_rtl==true||wpmlRtl=='rtl'){
var bgstr_rtl=true;
}else{
var bgstr_rtl=false;
}
if(bigstore.big_store_product_img_sec_adimg==""){
var owl=$(".thunk-product-image-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 5,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
990: {
items: 4,
},
1025: {
items: 5,
},
},
});
}else{
var owl=$(".thunk-product-image-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 4,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
990: {
items: 4,
},
1025: {
items: 4,
},
},
});
}
$(".thunk-product-image-tab-section #thunk-cat-tab li a:first").addClass("active"
);
$(document).on("click",
".thunk-product-image-tab-section #thunk-cat-tab li a",
function (e){
$(
".thunk-product-image-tab-section #thunk-cat-tab .tab-content"
).append('<div class="thunk-loadContainer"> <div class="loader"></div></div>'
);
$(".thunk-product-image-tab-section .thunk-loadContainer").css("display",
"block"
);
$(
".thunk-product-image-tab-section #thunk-cat-tab li a.active"
).removeClass("active");
$(this).addClass("active");
var data_term_id=$(this).attr("data-filter");
$.ajax({
type: "POST",
url: bigstore.ajaxUrl,
data: {
action: "big_store_cat_filter_ajax",
data_cat_slug: data_term_id,
nonce:bigstore.bignonce
},
dataType: "html",
}).done(function (response){
if(response){
$(
".thunk-product-image-tab-section #thunk-cat-tab .tab-content"
).html('<div class="thunk-slide thunk-product-image-cat-slide owl-carousel"></div> <div class="thunk-loadContainer"> <div class="loader"></div></div>'
);
$(
".thunk-slide.thunk-product-image-cat-slide.owl-carousel"
).append(response);
if(bigstore.big_store_product_img_sec_adimg==""){
var owl=$(".thunk-product-image-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 5,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
990: {
items: 4,
},
1025: {
items: 5,
},
},
});
}else{
var owl=$(".thunk-product-image-cat-slide");
owl.owlCarousel({
rtl: bgstr_rtl,
items: 4,
nav: true,
owl2row: sliderow,
owl2rowDirection: "ltr",
owl2rowTarget: "thunk-woo-product-list",
navText: [
"<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>",
],
loop: cat_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay: cat_atply,
autoplayHoverPause: true,
responsive: {
0: {
items: 2,
margin: 7.5,
},
768: {
items: 3,
},
990: {
items: 4,
},
1025: {
items: 4,
},
},
});
}
$(".thunk-product-image-tab-section .thunk-loadContainer").css("display",
"none"
);
}});
e.preventDefault();
}
);
},
product_descr_excerpt: function (){
$(".os-product-excerpt *").each(function (){
var truncated=$(this).text().substr(0, 160);
$(this).text(truncated + (truncated.length < 160 ? "":" .."));
$(".os-product-excerpt *").not(":first-child").hide();
});
},
};
BigStoreWooLib.init();
})(jQuery);
jQuery(document).ready(function($){
"use strict";
if(typeof bigstoreqv==='undefined'){
return;
}
var alm_qv_loader_url=bigstoreqv.qv_loader,
alm_quick_view_bg=$(document).find('.alm-quick-view-bg'),
alm_qv_modal=$(document).find('#alm-quick-view-modal'),
alm_qv_content=alm_qv_modal.find('#alm-quick-view-content'),
alm_qv_close_btn=alm_qv_modal.find('#alm-quick-view-close'),
alm_qv_wrapper=alm_qv_modal.find('.alm-content-main-wrapper'),
alm_qv_wrapper_w=alm_qv_wrapper.width(),
alm_qv_wrapper_h=alm_qv_wrapper.height();
var	alm_qv_center_modal=function(){
alm_qv_wrapper.css({
'width':'',
'height':''
});
alm_qv_wrapper_w=alm_qv_wrapper.width(),
alm_qv_wrapper_h=alm_qv_wrapper.height();
var window_w=$(window).width(),
window_h=$(window).height(),
width=(( window_w - 60) > alm_qv_wrapper_w) ? alm_qv_wrapper_w:(window_w - 60),
height=(( window_h - 120) > alm_qv_wrapper_h) ? alm_qv_wrapper_h:(window_h - 120);
alm_qv_wrapper.css({
'left':((window_w/2) -(width/2)),
'top':((window_h/2) -(height/2)),
'width':width + 'px',
'height':height + 'px'
});
};
var alm_update_summary_height=function(){
var quick_view=$(document).find('#alm-quick-view-content'),
img_height=quick_view.find('.product .alm-qv-image-slider').first().height(),
summary=quick_view.find('.product .summary.entry-summary'),
content=summary.css('content');
if('undefined'!=typeof content&&544==content.replace(/[^0-9]/g, '')&&0!=img_height&&null!==img_height){
summary.css('height', img_height);
}else{
summary.css('height', '');
}};
var alm_qv_btn=function(){
$(document).off('click','.opn-quick-view-text').on('click', '.opn-quick-view-text', function(e){
e.preventDefault();
var $this=$(this),
wrap=$this.closest('li.product');
var product_id=$this.data('product_id');
if(! alm_qv_modal.hasClass('loading') ){
alm_qv_modal.addClass('loading');
}
if(! alm_quick_view_bg.hasClass('alm-quick-view-bg-ready') ){
alm_quick_view_bg.addClass('alm-quick-view-bg-ready');
}
$(document).trigger('alm_quick_view_loading');
alm_qv_ajax_call($this, product_id);
});
};
var alm_qv_ajax_call=function(t, product_id){
$.ajax({
url:bigstoreqv.ajaxurl,
data: {
action: 'alm_load_product_quick_view',
product_id: product_id,
nonce:bigstoreqv.qvnonce
},
dataType: 'html',
type: 'POST',
success: function (data){
alm_qv_content.html(data);
alm_qv_content_height();
jQuery(document).ready(function($){
$('form.cart').on('click', 'button.plus, button.minus', function(){
var qty=$(this).closest('form.cart').find('.qty');
var val=parseFloat(qty.val());
var max=parseFloat(qty.attr('max'));
var min=parseFloat(qty.attr('min'));
var step=parseFloat(qty.attr('step'));
if($(this).is('.plus') ){
if(max&&(max <=val) ){
qty.val(max);
}else{
qty.val(val + step);
}}else{
if(min&&(min >=val) ){
qty.val(min);
}else if(val > 1){
qty.val(val - step);
}}
});
});
}});
};
var alm_qv_content_height=function(){
var form_variation=alm_qv_content.find('.variations_form');
form_variation.trigger('check_variations');
form_variation.trigger('reset_image');
if(!alm_qv_modal.hasClass('open')){
alm_qv_modal.removeClass('loading').addClass('open');
var modal_height=alm_qv_modal.find('#alm-quick-view-content').outerHeight();
var window_height=$(window).height();
var scrollbar_width=alm_get_scrollbar_width();
var $html=$('html');
if(modal_height > window_height){
$html.css('margin-right', scrollbar_width);
}else{
$html.css('margin-right', '');
}
$html.addClass('alm-quick-view-is-open');
}
var var_form=alm_qv_modal.find('.variations_form');
if(var_form.length > 0){
var_form.wc_variation_form();
var_form.find('select').change();
}
var image_slider_wrap=alm_qv_modal.find('.alm-qv-image-slider');
if(image_slider_wrap.find('li').length > 1){
image_slider_wrap.flexslider({
animation: "slide"
});
}
setTimeout(function(){
alm_update_summary_height();
}, 100);
$(document).trigger('alm_quick_view_loader_stop');
};
var alm_qv_close_modal=function(){
$('.alm-content-main-wrapper').on('click', function(e){
if(this===e.target){
alm_qv_close();
}});
$(document).keyup(function(e){
if(e.keyCode===27){
alm_qv_close();
}});
alm_qv_close_btn.on('click', function(e){
e.preventDefault();
alm_qv_close();
});
var alm_qv_close=function(){
alm_quick_view_bg.removeClass('alm-quick-view-bg-ready');
alm_qv_modal.removeClass('open').removeClass('loading');
$('html').removeClass('alm-quick-view-is-open');
$('html').css('margin-right', '');
setTimeout(function (){
alm_qv_content.html('');
},1000);
}};
var alm_get_scrollbar_width=function (){
var div=$('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');
$('body').append(div);
var w1=$('div', div).innerWidth();
div.css('overflow-y', 'scroll');
var w2=$('div', div).innerWidth();
$(div).remove();
return (w1 - w2);
}
window.addEventListener("resize", function(event){
alm_update_summary_height();
});
alm_qv_btn();
alm_qv_close_modal();
alm_update_summary_height();
});
jQuery(document).ready(function($){
if(jQuery('#loadMore').length!=''){
var that=jQuery('#loadMore');
var page=that.data('page');
var count=2;
var ppp=that.data('ppp');
var total=that.data('total');
var ajaxurl=that.data('url');
jQuery(window).scroll(function(){
if(jQuery(window).scrollTop()==jQuery(document).height() - jQuery(window).height()){
if(count > total){
return false;
}else{
loadScrolling(count,ppp,ajaxurl);
}
count++;
}});
function loadScrolling(page,ppp,ajaxurl){
jQuery('.inifiniteLoader').show('fast');
jQuery.ajax({
url: ajaxurl,
type: 'POST',
data: {
offset:(page * ppp),
paged: page,
ppp: ppp,
action:'big_store_ajax_script_load_more'
},
}).success(function(response){
if(response){
page++;
jQuery(".primary-content-wrap #main").append(response);
if(page==total){
jQuery('.inifiniteLoader').hide('1000');
jQuery('.scroll-error').append('<div id="no-more" class="text-center"><p>No more posts to load</p></div>');
}}
jQuery('.inifiniteLoader').hide('1000');
});
return false;
}}
});
jQuery(document).ready(function($){
$(document).on('click', '#load-more-posts', function(e){
$('.inifiniteLoader').show('fast');
$('.load-more-posts-button').hide();
var previouspaged=$(this).attr('data-paged');
var currentpaged=parseInt(previouspaged)+ 1;
jQuery.ajax({
type: 'post',
url: loadmore.wp_ajax_url,
data: {
action:'big_store_load_more_posts',
paged: currentpaged,
context: $(this).attr('data-context'),
query: load_more_data.query,
nonce: $('#load-more-posts-nonce').val(),
},
dataType: 'html'
})
.done(function(response){
if(response){
$('.primary-content-wrap #main').append(response);
if(currentpaged==parseInt($('#load-more-posts').attr('data-max-pages') )){
$('#load-more-posts').hide();
$('#load-more-posts-error').css('display','block');
}else{
$('#load-more-posts').attr('data-paged', currentpaged);
$('.load-more-posts-button').show();
}}else{
$('#load-more-posts').hide();
$('#load-more-posts-error').css('display','block');
}
$('.inifiniteLoader').hide('1000');
});
e.preventDefault();
});
});
(function ($){
var BigStoreWooLib={
init: function (){
this.bindEvents();
},
bindEvents: function (){
var $this=this;
$this.BrandSlider();
$this.FeaturedProductSlider();
$this.CategoryTabListFilter();
},
BrandSlider:function(){
if(bigstore.big_store_brand_slider_optn==true){
var brd_atply=true;
}else{
var brd_atply=false;
}
if(bigstore.big_store_rtl==true){
var opnrtl=true;
}else{
var opnrtl=false;
};
var owl=$('.thunk-brand');
owl.owlCarousel({
rtl:opnrtl,
items:5,
nav: true,
navText: ["<i class='brand-nav fa fa-angle-left'></i>",
"<i class='brand-nav fa fa-angle-right'></i>"],
loop:brd_atply,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin:25,
autoplay:brd_atply,
autoplayHoverPause: true,
autoplayTimeout: parseInt(bigstore.big_store_brand_slider_speed),
responsive:{
0:{
items:3,
margin:7.5,
},
600:{
items:4,
},
1024:{
items:4,
},
1025:{
items:7,
}}
});
},
FeaturedProductSlider:function(){
$('#thunk-feature-product-tab li a:first').addClass('active');
$(document).on('click', '#thunk-feature-product-tab li a', function(e){
$('#thunk-feature-product-tab .tab-content').append('<div class="thunk-loadContainer"><div class="loader"></div></div>');
$(".thunk-feature-product-section .thunk-loadContainer").css("display", "block");
$('#thunk-feature-product-tab li a.active').removeClass("active");
$(this).addClass('active');
var data_term_id=$(this).attr('data-filter');
$.ajax({
type: 'POST',
url: bigstore.ajaxUrl,
data: {
action :'big_store_big_product_cat_filter_default_ajax_loop1',
'data_cat_slug':data_term_id,
},
dataType: 'html'
}).done(function(response){
if(response){
$('#thunk-feature-product-tab .tab-content .thunk-product-col1').html('<div class="thunk-product-col1-wrap"></div>');
$(".thunk-product-col1-wrap").append(response);
$('li.thvs_loop-available-attributes__value').hover(function (){
var src=$(this).attr('data-o-src');
var id=$(this).attr('data-product-id');
$(this).closest('.product.post-'+ id).find('img.attachment-woocommerce_thumbnail').attr("srcset", src);
});
}
$(".thunk-feature-product-section .thunk-loadContainer").css("display", "none");
});
$.ajax({
type: 'POST',
url: bigstore.ajaxUrl,
data:{
action :'big_store_cat_filter_featured_big_prd_ajax',
'data_cat_slug':data_term_id,
},
dataType: 'html'
}).done(function(response){
if(response){
$('#thunk-feature-product-tab .tab-content .thunk-product-col2').html('<div class="thunk-product-col2-wrap"></div> ');
$(".thunk-product-col2-wrap").append(response);
$('li.thvs_loop-available-attributes__value').hover(function (){
var src=$(this).attr('data-o-src');
var id=$(this).attr('data-product-id');
$(this).closest('.product.post-'+ id).find('img.attachment-woocommerce_thumbnail').attr("srcset", src);
});
}});
$.ajax({
type: 'POST',
url: bigstore.ajaxUrl,
data:{
action :'big_store_big_product_cat_filter_default_ajax_loop3',
'data_cat_slug':data_term_id,
},
dataType: 'html'
}).done(function(response){
if(response){
$('#thunk-feature-product-tab .tab-content .thunk-product-col3').html('<div class="thunk-product-col3-wrap"></div> ');
$(".thunk-product-col3-wrap").append(response);
$('li.thvs_loop-available-attributes__value').hover(function (){
var src=$(this).attr('data-o-src');
var id=$(this).attr('data-product-id');
$(this).closest('.product.post-'+ id).find('img.attachment-woocommerce_thumbnail').attr("srcset", src);
});
}});
e.preventDefault();
});
},
CategoryTabListFilter:function(){
if(bigstore.big_store_single_row_slide_cat_tb_lst==true){
var sliderow_lst=false;
}else{
var sliderow_lst=true;
}
if(bigstore.big_store_cat_tb_lst_slider_optn==true){
var cat_atply_lst=true;
}else{
var cat_atply_lst=false;
}
if(bigstore.big_store_rtl==true){
var opnrtl=true;
}else{
var opnrtl=false;
};
var owl=$('.thunk-product-tab-cat-slide');
owl.owlCarousel({
rtl:opnrtl,
items:3,
nav: true,
owl2row:sliderow_lst,
owl2rowDirection: 'ltr',
owl2rowTarget: 'thunk-woo-product-list',
navText: ["<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>"],
loop:cat_atply_lst,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay:cat_atply_lst,
autoplayHoverPause: true,
autoplayTimeout: parseInt(bigstore.big_store_cat_tb_lst_slider_speed),
responsive:{
0:{
items:2,
margin:7.5,
},
768:{
items:2,
},
900:{
items:3,
},
1025:{
items:4,
}}
});
$('#thunk-cat-list-tab li a:first').addClass('active');
$(document).on('click', '#thunk-cat-list-tab li a', function(e){
$('#thunk-cat-list-tab .tab-content').append('<div class="thunk-loadContainer"> <div class="loader"></div></div>');
$(".thunk-product-tab-list-section .thunk-loadContainer").css("display", "block");
$('#thunk-cat-list-tab li a.active').removeClass("active");
$(this).addClass('active');
var data_term_id=$(this).attr('data-filter');
$.ajax({
type: 'POST',
url: bigstore.ajaxUrl,
data: {
action :'big_store_cat_list_filter_ajax',
'data_cat_slug':data_term_id,
},
dataType: 'html'
}).done(function(response){
if(response){
$('#thunk-cat-list-tab .tab-content').html('<div class="thunk-slide thunk-product-tab-cat-slide owl-carousel"></div><div class="thunk-loadContainer"> <div class="loader"></div></div>');
$(".thunk-slide.thunk-product-tab-cat-slide.owl-carousel").append(response);
var owl=$('.thunk-product-tab-cat-slide');
owl.owlCarousel({
rtl:opnrtl,
items:3,
nav: true,
owl2row:sliderow_lst,
owl2rowDirection: 'ltr',
owl2rowTarget: 'thunk-woo-product-list',
navText: ["<i class='slick-nav fa fa-angle-left'></i>",
"<i class='slick-nav fa fa-angle-right'></i>"],
loop:cat_atply_lst,
dots: false,
smartSpeed: 1800,
autoHeight: false,
margin: 15,
autoplay:cat_atply_lst,
autoplayHoverPause: true,
autoplayTimeout: parseInt(bigstore.big_store_cat_tb_lst_slider_speed),
responsive:{
0:{
items:2,
margin:7.5,
},
768:{
items:2,
},
900:{
items:3,
},
1025:{
items:4,
}}
});
}
$(".thunk-product-tab-list-section .thunk-loadContainer").css("display", "none");
$('li.thvs_loop-available-attributes__value').hover(function (){
var src=$(this).attr('data-o-src');
var id=$(this).attr('data-product-id');
$(this).closest('.product.post-'+ id).find('img.attachment-woocommerce_thumbnail').attr("srcset", src);
});
});
e.preventDefault();
});
},
}
BigStoreWooLib.init();
})(jQuery);
(function ($){
var total=parseInt(bigstorepagi.shop_infinite_total)||'',
count=parseInt(bigstorepagi.shop_infinite_count)||'',
ajax_url=bigstorepagi.ajax_url||'',
shop_infinite_nonce=bigstorepagi.shop_infinite_nonce||'',
pagination=bigstorepagi.big_store_pagination||'',
masonryEnabled=false,
loadStatus=true,
infinite_event=bigstorepagi.shop_infinite_scroll_event||'',
loader=jQuery('.opn-shop-pagination-infinite .inifiniteLoader');
if(typeof pagination!=''||pagination=='scroll'){
if(typeof infinite_event!=''){
switch(infinite_event){
case 'click':
$('.opn-shop-load-more').click(function(event){
event.preventDefault();
if(count!='undefined'&&count!=''&&total!='undefined'&&total!=''){
if(count > total)
return false;
NextloadArticles(count);
count++;
}});
break;
case 'scroll':
$('.opn-shop-load-more').hide();
if($('#shop-product-wrap').find('li.product:last').length > 0){
var windowHeight50=jQuery(window).outerHeight() / 1.25;
$(window).scroll(function (){
if(( $(window).scrollTop() + windowHeight50) >=($('#shop-product-wrap').find('li.product:last').offset().top) ){
if(count > total){
return false;
}else{
if(loadStatus==true){
NextloadArticles(count);
count++;
loadStatus=false;
}}
}});
}
break;
}}
function NextloadArticles(pageNumber){
$('.opn-shop-load-more').removeClass('.active').hide();
loader.show();
var data={
action :'big_store_pagination_infinite',
page_no:pageNumber,
nonce: shop_infinite_nonce,
query_vars: bigstorepagi.query_vars,
opnaira_infinite:'big_store_pagination_ajax',
}
$.post(ajax_url, data, function(data){
var boxes=$(data);
loader.hide();
$('.opn-shop-load-more').addClass('active').show();
$('#shop-product-wrap > .products').append(boxes);
var msg=bigstorepagi.shop_no_more_post_message||'';
if(count > total){
$('.opn-shop-pagination-infinite').html('<span class="opn-shop-load-more no-more active" style="display: inline-block;">' + msg + "</span>");
}
loadStatus=true;
});
}}
})(jQuery);
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
(function(){
'use strict';
if(typeof wc_facebook_pixel_data==='undefined'){
return;
}
var data=wc_facebook_pixel_data;
var firedEvents={};
function buildEventData(event){
return {
method: event.method||'track',
name: event.name,
params: event.params||{},
eventId: event.eventId||null
};}
function shouldSkipEvent(eventId){
return eventId&&firedEvents[eventId];
}
function markEventFired(eventId){
if(eventId){
firedEvents[eventId]=true;
}}
function logWarning(message, data){
if(typeof console!=='undefined'&&console.warn){
console.warn('[FB Pixel]', message, data);
}}
function fireEvent(event){
var eventData=buildEventData(event);
if(shouldSkipEvent(eventData.eventId)){
return;
}
if(typeof fbq!=='function'){
logWarning('fbq not available, skipping event:', eventData.name);
return;
}
try {
var params=eventData.params;
if(eventData.eventId){
fbq(eventData.method, eventData.name, params, {eventID: eventData.eventId});
}else{
fbq(eventData.method, eventData.name, params);
}
markEventFired(eventData.eventId);
} catch (e){
logWarning('Event error: ' + eventData.name, e);
}}
function fireQueuedEvents(){
var events=data.eventQueue;
if(!events||!Array.isArray(events)){
return;
}
for (var i=0; i < events.length; i++){
try {
fireEvent(events[i]);
} catch (e){
logWarning('fireQueuedEvents loop error:', e);
}}
data.eventQueue=[];
}
function processStoreApiEvent(eventData){
if(!eventData||!eventData.event){
return;
}
var params=eventData.params||{};
var event={
method: 'track',
name: eventData.event,
params: params,
eventId: params.event_id||null
};
fireEvent(event);
}
function setupFetchInterceptor(){
var originalFetch=window.fetch;
if(!originalFetch){
return;
}
window.fetch=function(){
var args=arguments;
var url=args[0];
var isAddToCartRequest=typeof url==='string' &&
(url.indexOf('/wc/store/v1/cart/add-item')!==-1 ||
url.indexOf('/wc/store/cart/add-item')!==-1);
return originalFetch.apply(this, args).then(function(response){
if(isAddToCartRequest&&response.ok){
response.clone().json().then(function(responseData){
if(responseData&&responseData.extensions&&responseData.extensions['facebook-for-woocommerce']){
processStoreApiEvent(responseData.extensions['facebook-for-woocommerce']);
}}).catch(function(e){
logWarning('Store API JSON parse error:', e);
});
}
return response;
});
};}
function init(){
setupFetchInterceptor();
if(typeof fbq==='function'){
fireQueuedEvents();
return;
}
var _fbq=window.fbq;
Object.defineProperty(window, 'fbq', {
configurable: true,
enumerable: true,
get: function(){ return _fbq; },
set: function(value){
_fbq=value;
if(typeof value==='function'){
Object.defineProperty(window, 'fbq', {
configurable: true,
enumerable: true,
writable: true,
value: value
});
setTimeout(fireQueuedEvents, 0);
}}
});
}
if(document.readyState==='complete'){
init();
}else{
window.addEventListener('load', init);
}})();