(()=>{"use strict";var e,t,s,n,r,o,i,c;!function(e){e.PING="ping",e.GET_TC_DATA="getTCData",e.GET_IN_APP_TC_DATA="getInAppTCData",e.GET_VENDOR_LIST="getVendorList",e.ADD_EVENT_LISTENER="addEventListener",e.REMOVE_EVENT_LISTENER="removeEventListener"}(e||(e={})),function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(t||(t={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(s||(s={})),function(e){e.TC_LOADED="tcloaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(n||(n={}));class a{listenerId;callback;next;param;success=!0;constructor(e,t,s,n){Object.assign(this,{callback:e,listenerId:s,param:t,next:n});try{this.respond()}catch(e){this.invokeCallback(null)}}invokeCallback(e){const t=null!==e;"function"==typeof this.next?this.callback(this.next,e,t):this.callback(e,t)}}class l extends a{respond(){this.throwIfParamInvalid(),this.invokeCallback(new m(this.param,this.listenerId))}throwIfParamInvalid(){if(!(void 0===this.param||Array.isArray(this.param)&&this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class p{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new l(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class d{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new p;static cmpStatus=t.LOADING;static disabled=!1;static displayStatus=s.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=t.LOADING,this.disabled=!1,this.displayStatus=s.HIDDEN,this.eventQueue.clear()}}class u{cmpId=d.cmpId;cmpVersion=d.cmpVersion;gdprApplies=d.gdprApplies;tcfPolicyVersion=d.tcfPolicyVersion}class h extends u{cmpStatus=t.ERROR}class m extends u{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=d.eventStatus,this.cmpStatus=d.cmpStatus,this.listenerId=t,d.gdprApplies){const t=d.tcModel;this.tcString=d.tcString,this.isServiceSpecific=t.isServiceSpecific,this.useNonStandardTexts=t.useNonStandardTexts,this.purposeOneTreatment=t.purposeOneTreatment,this.publisherCC=t.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(t.vendorsAllowed,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(t.purposeConsents),legitimateInterests:this.createVectorField(t.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(t.vendorConsents,e),legitimateInterests:this.createVectorField(t.vendorLegitimateInterests,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.specialFeatureOptins=this.createVectorField(t.specialFeatureOptins),this.publisher={consents:this.createVectorField(t.publisherConsents),legitimateInterests:this.createVectorField(t.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(t.publisherCustomConsents),legitimateInterests:this.createVectorField(t.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(t.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let n=1;n<=s;n++){const s=n.toString();e.getRestrictions(n).forEach(e=>{const n=e.purposeId.toString();t[n]||(t[n]={}),t[n][s]=e.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((t,s)=>(t[String(s)]=e.has(Number(s)),t),{}):[...e].reduce((e,t)=>(e[t[0].toString(10)]=t[1],e),{})}}class g extends m{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((e,t)=>e+(t[1]?"1":"0"),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(e=>{t[e.purposeId.toString()]="_".repeat(s)});for(let n=0;n<s;n++){const s=n+1;e.getRestrictions(s).forEach(e=>{const s=e.restrictionType.toString(),r=e.purposeId.toString(),o=t[r].substr(0,n),i=t[r].substr(n+1);t[r]=o+s+i})}}return t}}class f extends u{cmpLoaded=!0;cmpStatus=d.cmpStatus;displayStatus=d.displayStatus;apiVersion=String(d.apiVersion);gvlVersion;constructor(){super(),d.tcModel&&d.tcModel.vendorListVersion&&(this.gvlVersion=+d.tcModel.vendorListVersion)}}class v extends a{respond(){this.invokeCallback(new f)}}class _ extends l{respond(){this.throwIfParamInvalid(),this.invokeCallback(new g(this.param))}}class y extends Error{constructor(e){super(e),this.name="DecodingError"}}class S extends Error{constructor(e){super(e),this.name="EncodingError"}}class I extends Error{constructor(e){super(e),this.name="GVLError"}}class C extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class E{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new S("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let t=0;t<e.length;t+=this.BASIS)s+=this.DICT[parseInt(e.substr(t,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new y("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const n=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-n.length)+n}return t}}class b{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IS","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return b.langSet.has(e)}parseLanguage(e){const t=(e=e.toUpperCase()).split("-")[0];if(e.length>=2&&2==t.length){if(b.langSet.has(e))return e;if(b.langSet.has(t))return t;const s=t+"-"+t;if(b.langSet.has(s))return s;for(const s of b.langSet)if(-1!==s.indexOf(e)||-1!==s.indexOf(t))return s}throw new Error(`unsupported language ${e}`)}forEach(e){b.langSet.forEach(e)}get size(){return b.langSet.size}}class L{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class A{clone(){const e=new this.constructor;return Object.keys(this).forEach(t=>{const s=this.deepClone(this[t]);void 0!==s&&(e[t]=s)}),e}deepClone(e){const t=typeof e;if("number"===t||"string"===t||"boolean"===t)return e;if(null!==e&&"object"===t){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){const t=[];for(const s of e)t.push(this.deepClone(s));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const s in e)e.hasOwnProperty(s)&&(t[s]=this.deepClone(e[s]));return t}}}}!function(e){e[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"}(r||(r={}));class w extends A{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),void 0!==e&&(this.purposeId=e),void 0!==t&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new w;if(2!==t.length)throw new C("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${w.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===r.NOT_ALLOWED||this.restrictionType===r.REQUIRE_CONSENT||this.restrictionType===r.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class z extends A{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let n=!0;if(this.gvl?.vendors){const o=this.gvl.vendors[s];if(o)if(e===r.NOT_ALLOWED)n=o.legIntPurposes.includes(t)||o.purposes.includes(t);else if(o.flexiblePurposes.length)switch(e){case r.REQUIRE_CONSENT:n=o.flexiblePurposes.includes(t)&&o.legIntPurposes.includes(t);break;case r.REQUIRE_LI:n=o.flexiblePurposes.includes(t)&&o.purposes.includes(t)}else n=!1;else n=!1}return n}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,n=t[t.length-1],r=[...Array(n).keys()].map(e=>e+1);if(this.has(s))for(let e=1;e<=n;e++)this.map.get(s).add(e);else this.map.set(s,new Set(r)),this.bitLength=0}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const e=new Set;this.map.forEach(t=>{t.forEach(t=>{e.add(t)})}),t=Array.from(e)}return t.sort((e,t)=>e-t)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(e=>{e.purposeId===t&&(void 0===s||s>e.restrictionType)&&(s=e.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const n=this.getRestrictions(e);for(let e=0;e<n.length&&!s;e++)s=t.isSameAs(n[e]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,n)=>{e?s.has(e)&&t.push(w.unHash(n)):t.push(w.unHash(n))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(w.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,n=this.map.get(s);n&&(n.delete(e),0==n.size&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((e,t)=>{const s=w.unHash(t);Array.from(e).forEach(t=>{this.isOkToHave(s.restrictionType,s.purposeId,t)||e.delete(t)})}))}get gvl(){return this.gvl_}isEmpty(){return 0===this.map.size}get numRestrictions(){return this.map.size}}!function(e){e.COOKIE="cookie",e.WEB="web",e.APP="app"}(o||(o={})),function(e){e.CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"}(i||(i={}));class T{static ID_TO_KEY=[i.CORE,i.VENDORS_DISCLOSED,i.VENDORS_ALLOWED,i.PUBLISHER_TC];static KEY_TO_ID={[i.CORE]:0,[i.VENDORS_DISCLOSED]:1,[i.VENDORS_ALLOWED]:2,[i.PUBLISHER_TC]:3}}class V extends A{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(e=>this.unset(e)):"object"==typeof e?this.unset(Object.keys(e).map(e=>Number(e))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(e=>{this.maxId_=Math.max(this.maxId,e)})))}isIntMap(e){let t="object"==typeof e;return t=t&&Object.keys(e).every(t=>{let s=Number.isInteger(parseInt(t,10));return s=s&&this.isValidNumber(e[t].id),s=s&&void 0!==e[t].name,s}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(e=>this.set(e));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(e=>Number(e)));else{if(!this.isValidNumber(e))throw new C("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}empty(){this.set_=new Set,this.maxId_=0}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class O{static[L.cmpId]=12;static[L.cmpVersion]=12;static[L.consentLanguage]=12;static[L.consentScreen]=6;static[L.created]=36;static[L.isServiceSpecific]=1;static[L.lastUpdated]=36;static[L.policyVersion]=6;static[L.publisherCountryCode]=12;static[L.publisherLegitimateInterests]=24;static[L.publisherConsents]=24;static[L.purposeConsents]=24;static[L.purposeLegitimateInterests]=24;static[L.purposeOneTreatment]=1;static[L.specialFeatureOptins]=12;static[L.useNonStandardTexts]=1;static[L.vendorListVersion]=12;static[L.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class P{static encode(e,t){let s;if("string"==typeof e&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new S(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");return parseInt(e,2)}}class k{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");const s=new Date;return s.setTime(100*P.decode(e,t)),s}}class R{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class D{static encode(e,t){let s="";for(let n=1;n<=t;n++)s+=R.encode(e.has(n));return s}static decode(e,t){if(e.length!==t)throw new y("bitfield encoding length mismatch");const s=new V;for(let n=1;n<=t;n++)R.decode(e[n-1])&&s.set(n);return s.bitLength=e.length,s}}class N{static encode(e,t){const s=(e=e.toUpperCase()).charCodeAt(0)-65,n=e.charCodeAt(1)-65;if(s<0||s>25||n<0||n>25)throw new S(`invalid language code: ${e}`);if(t%2==1)throw new S(`numBits must be even, ${t} is not valid`);return t/=2,P.encode(s,t)+P.encode(n,t)}static decode(e,t){let s;if(t!==e.length||e.length%2)throw new y("invalid bit length for language");{const t=65,n=e.length/2,r=P.decode(e.slice(0,n),n)+t,o=P.decode(e.slice(n),n)+t;s=String.fromCharCode(r)+String.fromCharCode(o)}return s}}class F{static encode(e){let t=P.encode(e.numRestrictions,O.numRestrictions);if(!e.isEmpty()){const s=(t,s)=>{for(let n=t+1;n<=s;n++)if(e.gvl.vendorIds.has(n))return n;return t};e.getRestrictions().forEach(n=>{t+=P.encode(n.purposeId,O.purposeId),t+=P.encode(n.restrictionType,O.restrictionType);const r=e.getVendors(n),o=r.length;let i=0,c=0,a="";for(let e=0;e<o;e++){const t=r[e];if(0===c&&(i++,c=t),e===o-1||r[e+1]>s(t,r[o-1])){const e=!(t===c);a+=R.encode(e),a+=P.encode(c,O.vendorId),e&&(a+=P.encode(t,O.vendorId)),c=0}}t+=P.encode(i,O.numEntries),t+=a})}return t}static decode(e){let t=0;const s=new z,n=P.decode(e.substr(t,O.numRestrictions),O.numRestrictions);t+=O.numRestrictions;for(let r=0;r<n;r++){const n=P.decode(e.substr(t,O.purposeId),O.purposeId);t+=O.purposeId;const r=P.decode(e.substr(t,O.restrictionType),O.restrictionType);t+=O.restrictionType;const o=new w(n,r),i=P.decode(e.substr(t,O.numEntries),O.numEntries);t+=O.numEntries;for(let n=0;n<i;n++){const n=R.decode(e.substr(t,O.anyBoolean));t+=O.anyBoolean;const r=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n){const n=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n<r)throw new y(`Invalid RangeEntry: endVendorId ${n} is less than ${r}`);for(let e=r;e<=n;e++)s.add(e,o)}else s.add(r,o)}}return s.bitLength=t,s}}!function(e){e[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"}(c||(c={}));class x{static encode(e){const t=[];let s,n=[],r=P.encode(e.maxId,O.maxId),o="";const i=O.maxId+O.encodingType,a=i+e.maxId,l=2*O.vendorId+O.singleOrRange+O.numEntries;let p=i+O.numEntries;return e.forEach((r,i)=>{o+=R.encode(r),s=e.maxId>l&&p<a,s&&r&&(e.has(i+1)?0===n.length&&(n.push(i),p+=O.singleOrRange,p+=O.vendorId):(n.push(i),p+=O.vendorId,t.push(n),n=[]))}),s?(r+=String(c.RANGE),r+=this.buildRangeEncoding(t)):(r+=String(c.FIELD),r+=o),r}static decode(e,t){let s,n=0;const r=P.decode(e.substr(n,O.maxId),O.maxId);n+=O.maxId;const o=P.decode(e.charAt(n),O.encodingType);if(n+=O.encodingType,o===c.RANGE){if(s=new V,1===t){if("1"===e.substr(n,1))throw new y("Unable to decode default consent=1");n++}const r=P.decode(e.substr(n,O.numEntries),O.numEntries);n+=O.numEntries;for(let t=0;t<r;t++){const t=R.decode(e.charAt(n));n+=O.singleOrRange;const r=P.decode(e.substr(n,O.vendorId),O.vendorId);if(n+=O.vendorId,t){const t=P.decode(e.substr(n,O.vendorId),O.vendorId);n+=O.vendorId;for(let e=r;e<=t;e++)s.set(e)}else s.set(r)}}else{const t=e.substr(n,r);n+=r,s=D.decode(t,r)}return s.bitLength=n,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,O.numEntries);return e.forEach(e=>{const t=1===e.length;s+=R.encode(!t),s+=P.encode(e[0],O.vendorId),t||(s+=P.encode(e[1],O.vendorId))}),s}}function U(){return{[L.version]:P,[L.created]:k,[L.lastUpdated]:k,[L.cmpId]:P,[L.cmpVersion]:P,[L.consentScreen]:P,[L.consentLanguage]:N,[L.vendorListVersion]:P,[L.policyVersion]:P,[L.isServiceSpecific]:R,[L.useNonStandardTexts]:R,[L.specialFeatureOptins]:D,[L.purposeConsents]:D,[L.purposeLegitimateInterests]:D,[L.purposeOneTreatment]:R,[L.publisherCountryCode]:N,[L.vendorConsents]:x,[L.vendorLegitimateInterests]:x,[L.publisherRestrictions]:F,segmentType:P,[L.vendorsDisclosed]:x,[L.vendorsAllowed]:x,[L.publisherConsents]:D,[L.publisherLegitimateInterests]:D,[L.numCustomPurposes]:P,[L.publisherCustomConsents]:D,[L.publisherCustomLegitimateInterests]:D}}class M{1={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.purposeConsents,L.vendorConsents]};2={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.policyVersion,L.isServiceSpecific,L.useNonStandardTexts,L.specialFeatureOptins,L.purposeConsents,L.purposeLegitimateInterests,L.purposeOneTreatment,L.publisherCountryCode,L.vendorConsents,L.vendorLegitimateInterests,L.publisherRestrictions],[i.PUBLISHER_TC]:[L.publisherConsents,L.publisherLegitimateInterests,L.numCustomPurposes,L.publisherCustomConsents,L.publisherCustomLegitimateInterests],[i.VENDORS_ALLOWED]:[L.vendorsAllowed],[i.VENDORS_DISCLOSED]:[L.vendorsDisclosed]}}class H{1=[i.CORE];2=[i.CORE];constructor(e,t){if(2===e.version)if(e.isServiceSpecific)this[2].push(i.PUBLISHER_TC),this[2].push(i.VENDORS_DISCLOSED);else{const s=!(!t||!t.isForVendors);s&&!0!==e[L.supportOOB]||this[2].push(i.VENDORS_DISCLOSED),s&&(e[L.supportOOB]&&e[L.vendorsAllowed].size>0&&this[2].push(i.VENDORS_ALLOWED),this[2].push(i.PUBLISHER_TC))}}}class q{static fieldSequence=new M;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch(s){throw new S(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==i.CORE&&(n=P.encode(T.KEY_TO_ID[t],O.segmentType));const r=U();return s.forEach(s=>{const o=e[s],i=r[s];let c=O[s];void 0===c&&this.isPublisherCustom(s)&&(c=Number(e[L.numCustomPurposes]));try{n+=i.encode(o,c)}catch(e){throw new S(`Error encoding ${t}->${s}: ${e.message}`)}}),E.encode(n)}static decode(e,t,s){const n=E.decode(e);let r=0;s===i.CORE&&(t.version=P.decode(n.substr(r,O[L.version]),O[L.version])),s!==i.CORE&&(r+=O.segmentType);const o=this.fieldSequence[String(t.version)][s],c=U();return o.forEach(e=>{const s=c[e];let o=O[e];if(void 0===o&&this.isPublisherCustom(e)&&(o=Number(t[L.numCustomPurposes])),0!==o){const i=n.substr(r,o);if(t[e]=s===x?s.decode(i,t.version):s.decode(i,o),Number.isInteger(o))r+=o;else{if(!Number.isInteger(t[e].bitLength))throw new y(e);r+=t[e].bitLength}}}),t}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}class G{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((s,n)=>{s.forEach((o,i)=>{if(o){const o=t.vendors[i];if(!o||o.deletedDate)s.unset(i);else if(0===o[n].length)if("legIntPurposes"===n&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if("legIntPurposes"===n&&o.purposes.length>0&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)s.unset(i);else{const t=e.publisherRestrictions.getRestrictions(i);let o=!1;for(let e=0,s=t.length;e<s&&!o;e++)o=t[e].restrictionType===r.REQUIRE_CONSENT&&"purposes"===n||t[e].restrictionType===r.REQUIRE_LI&&"legIntPurposes"===n;o||s.unset(i)}else s.unset(i)}})}),e}];static process(e,t){const s=e.gvl;if(!s)throw new S("Unable to encode TCModel without a GVL");if(!s.isReady)throw new S("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const n=e.version-1;if(!this.processor[n])throw new S(`Invalid version: ${e.version}`);return this.processor[n](e,s)}}class B{static absCall(e,t,s,n){return new Promise((r,o)=>{const i=new XMLHttpRequest;i.withCredentials=s,i.addEventListener("load",()=>{if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){let e=i.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}r(e)}else o(new Error(`HTTP Status: ${i.status} response type: ${i.responseType}`))}),i.addEventListener("error",()=>{o(new Error("error"))}),i.addEventListener("abort",()=>{o(new Error("aborted"))}),null===t?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=n,i.ontimeout=()=>{o(new Error("Timeout "+n+"ms "+e))},i.send(t)})}static post(e,t,s=!1,n=0){return this.absCall(e,JSON.stringify(t),s,n)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class j extends A{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new b;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new I("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&"/"!==e[e.length-1]&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=j.baseUrl,n=t?.language;if(n)try{n=j.consentLanguages.parseLanguage(n)}catch(e){throw new I("Error during parsing the language: "+e.message)}if(this.lang_=n||j.DEFAULT_LANGUAGE,this.cacheLang_=n||j.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new I("must specify GVL.baseUrl before loading GVL json");if(e>0){const t=e;j.CACHE.has(t)?(this.populate(j.CACHE.get(t)),this.readyPromise=Promise.resolve()):(s+=j.versionedFilename.replace("[VERSION]",String(t)),this.readyPromise=this.fetchJson(s))}else j.CACHE.has(j.LATEST_CACHE_KEY)?(this.populate(j.CACHE.get(j.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+j.latestFilename))}}static emptyLanguageCache(e){let t=!1;return null==e&&j.LANGUAGE_CACHE.size>0?(j.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(j.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(j.CACHE.delete(e),t=!0):void 0===e&&(j.CACHE=new Map,t=!0),t}cacheLanguage(){j.LANGUAGE_CACHE.has(this.cacheLang_)||j.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await B.fetch(e))}catch(e){throw new I(e.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=j.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=j.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=j.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=j.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=j.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=j.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{..."number"==typeof e.stdRetention?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(e=>({langId:e.langId,privacy:e.privacy,...e.legIntClaim?{legIntClaim:e.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},..."number"==typeof e.cookieMaxAgeSeconds||null===e.cookieMaxAgeSeconds?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...void 0!==e.usesCookies?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...void 0!==e.cookieRefresh?{cookieRefresh:e.cookieRefresh}:{},...void 0!==e.usesNonCookieAccess?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=j.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=j.consentLanguages.parseLanguage(e)}catch(e){throw new I("Error during parsing the language: "+e.message)}const s=e.toUpperCase();if((t.toLowerCase()!==j.DEFAULT_LANGUAGE.toLowerCase()||j.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,j.LANGUAGE_CACHE.has(s)){const e=j.LANGUAGE_CACHE.get(s);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const e=j.baseUrl+j.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(e),this.cacheLang_=s,this.cacheLanguage()}catch(e){throw new I("unable to load language: "+e.message)}}}get language(){return this.lang_}isVendorList(e){return void 0!==e&&void 0!==e.vendors}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&j.CACHE.set(j.LATEST_CACHE_KEY,this.getJson()),j.CACHE.has(this.vendorListVersion)||j.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(e=>{this.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(e=>{this.bySpecialPurposeVendorMap[e]=new Set}),Object.keys(this.features).forEach(e=>{this.byFeatureVendorMap[e]=new Set}),Object.keys(this.specialFeatures).forEach(e=>{this.bySpecialFeatureVendorMap[e]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(e=>+e)),this.vendorIds=new Set(e),this.vendors_=e.reduce((e,t)=>{const s=this.vendors_[String(t)];return s&&void 0===s.deletedDate&&(s.purposes.forEach(e=>{this.byPurposeVendorMap[String(e)].consent.add(t)}),s.specialPurposes.forEach(e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)}),s.legIntPurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)}),s.features.forEach(e=>{this.byFeatureVendorMap[String(e)].add(t)}),s.specialFeatures.forEach(e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)}),e[t]=s),e},{})}getFilteredVendors(e,t,s,n){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const i={};return o="purpose"===e&&s?this["by"+r+"VendorMap"][String(t)][s]:this["by"+(n?"Special":"")+r+"VendorMap"][String(t)],o.forEach(e=>{i[String(e)]=this.vendors[String(e)]}),i}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new j(this.getJson());return this.lang_!==j.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class Q extends A{static consentLanguages=j.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=5;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new V;purposeConsents=new V;purposeLegitimateInterests=new V;publisherConsents=new V;publisherLegitimateInterests=new V;publisherCustomConsents=new V;publisherCustomLegitimateInterests=new V;customPurposes;vendorConsents=new V;vendorLegitimateInterests=new V;vendorsDisclosed=new V;vendorsAllowed=new V;publisherRestrictions=new z;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){j.isInstanceOf(e)||(e=new j(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new C("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("consentScreen",e);this.consentScreen_=e}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(!/^([A-z]){2}$/.test(e))throw new C("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=0|Number(e))<0)throw new C("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new C("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){const t=Object.keys(this.customPurposes).sort((e,t)=>Number(e)-Number(t));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new C("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class ${static encode(e,t){let s,n="";return e=G.process(e,t),s=Array.isArray(t?.segments)?t.segments:new H(e,t)[""+e.version],s.forEach((t,r)=>{let o="";r<s.length-1&&(o="."),n+=q.encode(e,t)+o}),n}static decode(e,t){const s=e.split("."),n=s.length;t||(t=new Q);for(let e=0;e<n;e++){const n=s[e],r=E.decode(n.charAt(0)).substr(0,O.segmentType),o=T.ID_TO_KEY[P.decode(r,O.segmentType).toString()];q.decode(n,t,o)}return t}}class W extends a{respond(){const e=d.tcModel,t=e.vendorListVersion;let s;void 0===this.param&&(this.param=t),s=this.param===t&&e.gvl?e.gvl:new j(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Y extends l{respond(){this.listenerId=d.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class K extends a{respond(){this.invokeCallback(d.eventQueue.remove(this.param))}}class J{static[e.PING]=v;static[e.GET_TC_DATA]=l;static[e.GET_IN_APP_TC_DATA]=_;static[e.GET_VENDOR_LIST]=W;static[e.ADD_EVENT_LISTENER]=Y;static[e.REMOVE_EVENT_LISTENER]=K}class Z{static set_=new Set([0,2,void 0,null]);static has(e){return"string"==typeof e&&(e=Number(e)),this.set_.has(e)}}const X="__tcfapi";class ee{callQueue;customCommands;constructor(t){if(t){let s=e.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed: Use ${e.GET_TC_DATA} instead`);if(s=e.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);t?.[e.GET_TC_DATA]&&(t[e.ADD_EVENT_LISTENER]=t[e.GET_TC_DATA],t[e.REMOVE_EVENT_LISTENER]=t[e.GET_TC_DATA]),this.customCommands=t}try{this.callQueue=window[X]()||[]}catch(e){this.callQueue=[]}finally{window[X]=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(t,s,n,...r){if("string"!=typeof t)n(null,!1);else if(Z.has(s)){if("function"!=typeof n)throw new Error("invalid callback function");d.disabled?n(new h,!1):this.isCustomCommand (t)||this.isBuiltInCommand (t)?this.isCustomCommand (t)&&!this.isBuiltInCommand (t)?this.customCommands[t](n,...r):t===e.PING?this.isCustomCommand (t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):void 0===d.tcModel?this.callQueue.push([t,s,n,...r]):this.isCustomCommand (t)&&this.isBuiltInCommand (t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):n(null,!1)}else n(null,!1)}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(e=>{window[X](...e)})}isCustomCommand (e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand (e){return void 0!==J[e]}}class te{callResponder;isServiceSpecific;numUpdates=0;constructor(e,t,s=!1,n){this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),d.cmpId=e,d.cmpVersion=t,d.tcfPolicyVersion=5,this.isServiceSpecific=!!s,this.callResponder=new ee(n)}throwIfInvalidInt(e,t,s){if(!("number"==typeof e&&Number.isInteger(e)&&e>=s))throw new Error(`Invalid ${t}: ${e}`)}update(e,r=!1){if(d.disabled)throw new Error("CmpApi Disabled");d.cmpStatus=t.LOADED,r?(d.displayStatus=s.VISIBLE,d.eventStatus=n.CMP_UI_SHOWN):void 0===d.tcModel?(d.displayStatus=s.DISABLED,d.eventStatus=n.TC_LOADED):(d.displayStatus=s.HIDDEN,d.eventStatus=n.USER_ACTION_COMPLETE),d.gdprApplies=null!==e,d.gdprApplies?(""===e?(d.tcModel=new Q,d.tcModel.cmpId=d.cmpId,d.tcModel.cmpVersion=d.cmpVersion):d.tcModel=$.decode(e),d.tcModel.isServiceSpecific=this.isServiceSpecific,d.tcfPolicyVersion=Number(d.tcModel.policyVersion),d.tcString=e):d.tcModel=null,0===this.numUpdates?this.callResponder.purgeQueuedCalls():d.eventQueue.exec(),this.numUpdates++}disable(){d.disabled=!0,d.cmpStatus=t.ERROR}}const se=1===cmplz_tcf.isServiceSpecific,ne=["sq","ar","eu","bg","bs","ca","cs","cy","da","de","el","es","et","fi","fr","gl","he","hi","hr","hu","id","is","it","ja","ka","ko","lt","lv","mk","ms","mt","nl","no","pl","pt-br","pt-pt","ro","ru","sk","sl","sr-cyrl","sr-latn","sv","sw","th","tl","tr","uk","vi","zh","zh-hant"],re={"nb-no":"no","pt-br":"pt-br","pt-pt":"pt-pt",pt:"pt-pt","zh-hant":"zh-hant","zh-tw":"zh-hant","zh-hk":"zh-hant","sr-cyrl":"sr-cyrl","sr-latn":"sr-latn",sr:"sr-cyrl"},oe=ne.length,ie=document.documentElement.lang.length?document.documentElement.lang.toLowerCase():"en";let ce,ae="en";if(void 0!==re[ie])ae=re[ie];else for(let e=0;e<oe;e++){const t=ne[e];if(-1===t.indexOf("-")&&0===ie.indexOf(t)){ae=t;break}}let le=[],pe=[];const de=cmplz_tcf.ac_mode,ue=null!==document.getElementById("cmplz-tcf-us-vendor-container"),he=cmplz_tcf.cmp_url+"cmp/vendorlist/additional-consent-providers.csv";let me,ge,fe,ve,_e,ye=cmplz_tcf.cmp_url+"cmp/vendorlist/purposes-"+ae+".json";function Se(e){if("undefined"==typeof document)return"";const t="undefined"!=typeof complianz?complianz.prefix:"cmplz_",s=("; "+document.cookie).split("; "+t+e+"=");return 2===s.length?s.pop().split(";").shift():""}function Ie(e,t,s){document.addEventListener(e,e=>{e.target.closest(t)&&s(e)})}function Ce(e){return null===e.offsetParent}ne.includes(ae)||(ae="en",ye=cmplz_tcf.cmp_url+"cmp/vendorlist/vendor-list.json");const Ee=new Promise(function(e){me=e}),be=new Promise(function(e){ge=e}),Le=new Promise(function(e){fe=e}),Ae=new Promise(function(e){ve=e}),we=new Promise(function(e){_e=e}),ze=de?fetch(he).then(e=>e.text()).then(e=>{const t=e.split("\n");t.shift(),pe=t.map(e=>{if(0===e.length)return null;const[t,s,n,r]=function(e){const t=/"(.*?)"|([^,]+)/g,s=[];let n;for(;null!==(n=t.exec(e));)s.push(n[1]||n[2]);return s}(e);return{id:parseInt(t),name:s,policyUrl:n,domains:r,consent:0}}),pe=pe.filter(e=>null!==e)}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading AC vendors:",e)}):Promise.resolve(),Te=fetch(ye,{method:"GET"}).then(e=>e.json()).then(e=>{ce=e}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading purposes:",e)});Promise.all([ze,Te]).then(()=>{fe()}),document.addEventListener("wp_consent_type_defined",function(){me()}),document.addEventListener("cmplz_cookie_warning_loaded",function(){complianz.disable_cookiebanner||ve()}),document.addEventListener("cmplz_revoke",function(e){const t=e.detail;_e(t)}),Ee.then(()=>{}),Le.then(()=>{const e=S(),t=window.localStorage.getItem("cmplz_ac_string");j.baseUrl=cmplz_tcf.cmp_url+"cmp/vendorlist",le=ce.dataCategories;const s=new j(ce);let n=null;s.changeLanguage(ae).then(()=>s.readyPromise).then(()=>{n=s.clone()});let r=new Q(s);r.publisherCountryCode=cmplz_tcf.publisherCountryCode,r.cmpId=332,r.cmpVersion=1,r.isServiceSpecific=se,r.policyVersion=5,r.UseNonStandardStacks=0,r.useNonStandardStacks=!1,r.useNonStandardTexts=!1,r.purposeOneTreatment=!1;const o=new te(332,1,se,{getTCData:(e,s,n)=>{s&&"object"==typeof s&&(t&&(s.addtlConsent=t,s.enableAdvertiserConsentMode=!(0===pe.length||void 0===pe[0].consent)),r.vendorsDisclosed&&(s.vendorsDisclosed={},Array.from(r.vendorsDisclosed).forEach(e=>{const t=parseInt(e,10);isNaN(t)||(s.vendorsDisclosed[t]=!0)})),s.policyVersion=r.policyVersion||5,s.useNonStandardStacks=r.useNonStandardStacks||!1,s.useNonStandardTexts=r.useNonStandardTexts||!1,s.purposeOneTreatment=r.purposeOneTreatment||!1),e(s,n)}});function i(){d(),function(){r.setAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id)}}(),r.setAllPurposeLegitimateInterests();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_legitimate_interest",cmplz_tcf.purposes[e]);r.setAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.set(cmplz_tcf.specialFeatures[e]),m("specialfeature",cmplz_tcf.specialFeatures[e]);r.setAllPurposeConsents();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_consent",cmplz_tcf.purposes[e]);r.setAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.checked=!0}),I(r,_()),cmplz_set_cookie("banner-status","dismissed")}function c(e){p(),r.unsetAllPurposeLegitimateInterests(),function(){r.unsetAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),r.unsetAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.unset(cmplz_tcf.specialFeatures[e]),g("specialfeature",cmplz_tcf.specialFeatures[e]);for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),g("purpose_consent",cmplz_tcf.purposes[e]);r.unsetAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.disabled||(e.checked=!1)}),I(r,_()),e&&location.reload()}r.gvl.readyPromise.then(()=>{const s=function(e){let t=Object.values(e).map(e=>e.id),s=y("purposes",e,cmplz_tcf.purposes);t=t.filter(e=>s.includes(e)),s=y("specialPurposes",e,cmplz_tcf.specialPurposes),t=t.filter(e=>s.includes(e)),s=y("features",e,cmplz_tcf.features),t=t.filter(e=>s.includes(e)),s=y("specialFeatures",e,cmplz_tcf.specialFeatures),t=t.filter(e=>s.includes(e));const n=Object.keys(cmplz_tcf.excludedVendors).map(function(e){return cmplz_tcf.excludedVendors[e]});return t=t.filter(e=>!n.includes(e)),t}(r.gvl.getJson().vendors);if(r.gvl.narrowVendorsTo(s),e&&"string"==typeof e&&e.length>0)try{r=$.decode(e,r),r.vendorsDisclosed||(r.vendorsDisclosed=new Set,cmplz_tcf.debug&&console.log("TCF v2.2: Upgraded v2.0 TC String, initialized disclosed vendors")),void 0===r.useNonStandardStacks&&(r.useNonStandardStacks=!1),void 0===r.useNonStandardTexts&&(r.useNonStandardTexts=!1),void 0===r.purposeOneTreatment&&(r.purposeOneTreatment=!1),I(r,_()),pe=a(t,pe)}catch(e){cmplz_tcf.debug&&(console.error("TCF: Error decoding TC String:",e),console.log("TCF: Clearing invalid TC String, user will need to re-consent")),localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent")}else cmplz_tcf.debug&&console.log("TCF: No stored consent found, waiting for user choice");ge()}),Promise.all([Ee,be]).then(()=>{if(function(e){const t=document.getElementById("cmplz-tcf-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML,n=w(ce.purposes,cmplz_tcf.purposes),o=w(ce.specialPurposes,cmplz_tcf.specialPurposes),a=w(ce.features,cmplz_tcf.features),p=w(ce.specialFeatures,cmplz_tcf.specialFeatures);v("purpose_consent",n,"statistics"),v("purpose_consent",n,"marketing"),v("purpose_legitimate_interest",n,"statistics"),v("purpose_legitimate_interest",n,"marketing"),v("feature",a,!1),v("specialpurpose",o,!1),v("specialfeature",p,!1),0===p.length&&(document.getElementById("cmplz-tcf-specialfeatures-wrapper").style.display="none");for(const o in e)if(e.hasOwnProperty(o)){let i=s;const c=e[o];r.vendorsDisclosed&&r.vendorsDisclosed.set(c.id);const a=c.purposes.concat(c.legIntPurposes);let l="";for(const e in a)if(a.hasOwnProperty(e)){const t=a[e];let s=!1;for(const e in n)if(n.hasOwnProperty(e)&&n[e].id===t){s=n[e].name;const r=c.dataRetention&&c.dataRetention.hasOwnProperty("stdRetention")?c.dataRetention.stdRetention:null;let o=c.dataRetention&&c.dataRetention.hasOwnProperty(t)?c.dataRetention[t]:r;void 0===o&&(o=cmplz_tcf.undeclared_string),l+='<div class="cmplz-tcf-purpose"><a href="https://cookiedatabase.org/tcf/'+s.replace(/ /g,"-").replace(/\//g,"-").toLowerCase()+'" target="_blank" rel="noopener noreferrer nofollow">'+s+"</a>| "+cmplz_tcf.retention_string+": "+o+"</div>"}}const p=A(c,le),d=Math.round(c.cookieMaxAgeSeconds/86400);cmplz_tcf.debug&&console.log(c),i=i.replace(/{cookie_retention_seconds}/g,c.cookieMaxAgeSeconds),i=i.replace(/{cookie_retention_days}/g,d),i=i.replace(/{vendor_name}/g,c.name),i=i.replace(/{vendor_categories}/g,p),i=i.replace(/{vendor_id}/g,c.id),i=i.replace(/{purposes}/g,l);let u=!1,h=!1;c.urls.hasOwnProperty(0)&&(u=c.urls[0].privacy,h=c.urls[0].legIntClaim,u&&(i=i.replace(/{privacy_policy}/g,u)),h&&(i=i.replace(/{legitimate_interest}/g,h)));const m=L(c,n);i=i.replace(/{data_retention}/g,m);const g=document.createElement("div");g.innerHTML=i;const f=g.firstChild;f.querySelector(".cmplz-tcf-vendor-input").checked=r.vendorConsents.has(c.id)||r.vendorLegitimateInterests.has(c.id),f.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-consent-input").checked=r.vendorConsents.has(c.id),f.querySelector(".cmplz-tcf-consent-input").setAttribute("data-vendor_id",c.id),0!==c.legIntPurposes.length&&(f.querySelector(".cmplz_tcf_legitimate_interest_checkbox").style.display="block",f.querySelector(".cmplz-tcf-legitimate-interest-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-legitimate-interest-input").checked=r.vendorLegitimateInterests.has(c.id)),h||(f.querySelector(".cmplz-tcf-legint-link").style.display="none",f.querySelector(".cmplz-tcf-legint-link").classList.add("not-available")),c.usesNonCookieAccess?g.querySelector(".non-cookie-storage-active").style.display="block":g.querySelector(".non-cookie-storage-inactive").style.display="block",c.cookieRefresh?g.querySelector(".non-cookie-refresh-active").style.display="block":g.querySelector(".non-cookie-refresh-inactive").style.display="block",c.cookieMaxAgeSeconds<=0?g.querySelector(".session-storage").style.display="block":c.cookieMaxAgeSeconds<=86400?g.querySelector(".retention_seconds").style.display="block":g.querySelector(".retention_days").style.display="block";const v=document.createDocumentFragment();f.classList.add("cmplz-vendortype-tcf"),v.appendChild(f),t.appendChild(f)}for(const e in pe)if(pe.hasOwnProperty(e)){let n=s;const o=pe[e];r.vendorsDisclosed&&r.vendorsDisclosed.set(o.id),n=n.replace(/{vendor_name}/g,o.name),n=n.replace(/{vendor_id}/g,o.id),n=n.replace(/{privacy_policy}/g,o.policyUrl),n=n.replace(/{vendor_categories}/g,cmplz_tcf.undeclared_string);const i='<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.ac_vendor_retention_string+"</div>";n=n.replace(/{data_retention}/g,i);const c=document.createElement("div");c.innerHTML=n;const a=c.firstChild;a.querySelector(".cmplz-tcf-vendor-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-ac_vendor_id",o.id),a.querySelector(".cmplz-tcf-consent-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-consent-input").setAttribute("data-ac_vendor_id",o.id);const l=document.createDocumentFragment();a.classList.add("cmplz-vendortype-ac"),l.appendChild(a),t.appendChild(a)}function d(e){const t=e.querySelector(".cmplz-tcf-consent-input"),s=e.querySelector(".cmplz-tcf-legitimate-interest-input"),n=e.querySelector(".cmplz_tcf_legitimate_interest_checkbox"),r=e.querySelector(".cmplz-tcf-vendor-input"),o=!!t&&t.checked,i=!(!n||Ce(n)||!s)&&s.checked;r.checked=o||i}Ie("click",".cmplz-tcf-legitimate-interest-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");t.checked?r.vendorLegitimateInterests.set(s):r.vendorLegitimateInterests.unset(s),d(n),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Ie("click",".cmplz-tcf-consent-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");s&&(t.checked?r.vendorConsents.set(s):r.vendorConsents.unset(s),d(n));const o=parseInt(t.getAttribute("data-ac_vendor_id"));o&&(t.checked?(u(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!0):(l(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Ie("click",".cmplz-tcf-vendor-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=parseInt(t.getAttribute("data-ac_vendor_id")),o=t.closest(".cmplz-tcf-vendor-container");s?t.checked?(r.vendorConsents.set(s),r.vendorLegitimateInterests.set(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!0,o.querySelector(".cmplz-tcf-consent-input").checked=!0):(r.vendorConsents.unset(s),r.vendorLegitimateInterests.unset(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!1,o.querySelector(".cmplz-tcf-consent-input").checked=!1):n&&(t.checked?(u(n),o.querySelector(".cmplz-tcf-consent-input").checked=!0):(l(n),o.querySelector(".cmplz-tcf-consent-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Ie("click",".cmplz-tcf-toggle-info",function(e){const t=e.target;e.preventDefault(),Ce()?t.style.display="block":t.style.display="none"}),Ie("click",".cmplz-tcf-toggle-vendor",function(e){const t=e.target;e.preventDefault();const s=t.closest(".cmplz-tcf-vendor-container").querySelector(".cmplz-tcf-info");Ce(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")}),Ie("click","#cmplz-tcf-selectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.set(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!0}document.querySelectorAll("[data-vendor_id]").forEach(e=>{e.checked=!0}),i()}),Ie("click","#cmplz-tcf-deselectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.unset(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!1}c(!0)});const h=new CustomEvent("cmplz_vendor_container_loaded",{detail:complianz.region});document.dispatchEvent(h)}(r.gvl.vendors),"optin"===complianz.consenttype){cmplz_tcf.debug&&console.log(r);const e=new Date;Date.parse(r.created)<e.getTime()-31536e6?I(null,_()):I(r,_())}else cmplz_tcf.debug&&console.log("not an optin tcf region"),I(null,!1)}),Promise.all([Ae,be,Le]).then(()=>{!function(){if(!b(complianz.region))return;if("optin"===complianz.consenttype){const e=E("marketing",!1),t=E("statistics",!1),s=w(w(ce.purposes,cmplz_tcf.purposes),e),n=w(w(ce.purposes,cmplz_tcf.purposes),t),r=w(ce.features,cmplz_tcf.features),o=w(ce.specialPurposes,cmplz_tcf.specialPurposes),i=w(ce.specialFeatures,cmplz_tcf.specialFeatures);0===r.length&&(document.querySelector(".cmplz-tcf .cmplz-features").style.display="none"),0===o.length&&(document.querySelector(".cmplz-tcf .cmplz-specialpurposes").style.display="none"),0===i.length&&(document.querySelector(".cmplz-tcf .cmplz-specialfeatures").style.display="none"),0===n.length&&(document.querySelector(".cmplz-tcf .cmplz-statistics").style.display="none"),document.querySelector(".cmplz-tcf .cmplz-statistics .cmplz-description").innerHTML=z(n),document.querySelector(".cmplz-tcf .cmplz-marketing .cmplz-description").innerHTML=z(s),document.querySelector(".cmplz-tcf .cmplz-features .cmplz-description").innerHTML=z(r),document.querySelector(".cmplz-tcf .cmplz-specialfeatures .cmplz-title").innerHTML=z(i),document.querySelector(".cmplz-tcf .cmplz-specialpurposes .cmplz-title").innerHTML=z(o)}const e=document.querySelectorAll(".cmplz-manage-vendors.tcf");if(e){let t="optin"===complianz.consenttype?r.gvl.vendorIds.size:"";de&&"optin"===complianz.consenttype&&(t+=pe.length),e.forEach(e=>{e.innerHTML=e.innerHTML.replace("{vendor_count}",t)})}const t=document.getElementById("cmplz-tcf-wrapper"),s=document.getElementById("cmplz-tcf-wrapper-nojavascript");t&&(t.style.display="block",s.style.display="none")}()}),we.then(e=>{b(complianz.region)&&c(e)}),document.addEventListener("cmplz_fire_categories",function(e){"optin"===complianz.consenttype&&cmplz_in_array("marketing",e.detail.categories)&&i()});const a=(e,t)=>{const s=h(e);t.forEach(e=>{s.includes(e.id)&&(e.consent=1)});const n=new Set(Object.values(r.gvl.vendors).map(e=>e.name));return t.filter(e=>!n.has(e.name))},l=e=>{pe.forEach(t=>{parseInt(t.id)===e&&(t.consent=0)})},p=()=>{pe.forEach(e=>{e.consent=0})},d=()=>{pe.forEach(e=>{e.consent=1})},u=e=>{pe.forEach(t=>{parseInt(t.id)===e&&(t.consent=1)})},h=e=>e&&0!==e.length?e.split("~")[1].split(".").map(e=>parseInt(e)):[];function m(e,t){if("purpose_consent"===e){r.purposeConsents.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("specialfeature"===e){r.specialFeatureOptins.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].specialFeatures.includes(t)&&!s.specialFeatures.includes(t)&&r.gvl.vendors[s.id].specialFeatures.push(t)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].features.includes(t)&&!s.features.includes(t)&&r.gvl.vendors[s.id].features.push(t)}}function g(e,t){if("purpose_consent"===e){r.purposeConsents.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.purposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].purposes.splice(n,1)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.legIntPurposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].legIntPurposes.splice(n,1)}}if("specialfeature"===e){r.specialFeatureOptins.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.specialFeatures.indexOf(t);n>-1&&r.gvl.vendors[s.id].specialFeatures.splice(n,1)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.features.indexOf(t);n>-1&&r.gvl.vendors[s.id].features.splice(n,1)}}function f(e,t,s,n,o){const{name:i,description:c,id:a,illustrations:l}=t,p=l&&l.hasOwnProperty(0)?l[0]:"",d=function(e,t,s){const n=[];for(const e in t)for(const r in s)if(t[e].purposes.includes(s[""+r])){n.push(t[e].id);break}return n}(0,r.gvl.vendors,[a]).length,u=c.split("*").join(", "),h=document.getElementById("cmplz-tcf-type-template").innerHTML.replace(/{type_name}/g,i).replace(/{type_count}/g,d).replace(/{type_description}/g,u).replace(/{type_id}/g,a).replace(/{type_example}/g,p).replace(/{type}/g,e),m=document.createElement("div");m.innerHTML=h;const g=m.firstChild,f=g.querySelector(`.cmplz-tcf-${e}-input`);f.checked=n,f.disabled=o,f.setAttribute(`data-${e}_id`,a),s.appendChild(g)}function v(e,t,s){let n,o=e;!1!==s&&(o=s+"-"+o,n=E(s,!1));const i=document.getElementById("cmplz-tcf-"+o+"s-container");if(null!==i){i.innerHTML="";for(const o in t)if(t.hasOwnProperty(o)){const c=t[o];if(!s||n.includes(c.id)){let t=!1,s=!1;"purpose_consent"===e&&(t=r.purposeConsents.has(c.id)),"purpose_legitimate_interest"===e&&(t=r.purposeLegitimateInterests.has(c.id)),"specialfeature"===e&&(t=r.specialFeatureOptins.has(c.id)),"feature"!==e&&"specialpurpose"!==e||(t=s=!0),f(e,c,i,t,s)}}Ie("click",".cmplz-tcf-"+e+"-input",function(t){const s=t.target,n=parseInt(s.getAttribute("data-"+e+"_id")),o=s.checked;document.querySelectorAll("[data-"+e+'_id="'+n+'"]').forEach(e=>{e.checked=o}),"purpose_consent"===e&&r.purposeConsents[o?"set":"unset"](n),"purpose_legitimate_interest"===e&&r.purposeLegitimateInterests[o?"set":"unset"](n),"specialfeature"===e&&r.specialFeatureOptins[o?"set":"unset"](n),o?m(e,n):g(e,n),function(){for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id),0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Ie("click",".cmplz-tcf-toggle",function(e){const t=e.target;e.preventDefault();const s=t.closest("label").querySelector(".cmplz-tcf-type-description");Ce(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")})}}function _(){let e=!0;"dismissed"===Se("banner-status")&&(e=!1);const t=null!==document.getElementById("cmplz-tcf-vendor-container");return e||t}function y(e,t,s){const n=[];for(const r of Object.values(t)){const t=r[e];Object.values(t).every(e=>s.includes(e))&&n.push(r.id)}return n}function S(){const e=Se("policy_id");return(!e||"undefined"!=typeof complianz&&complianz.current_policy_id!==e)&&localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent"),window.localStorage.getItem("cmplz_tcf_consent")}function I(e,t){!function(){if(0===pe.length||void 0===pe[0].consent)return;let e="1~";const t=pe.filter(e=>1===e.consent);0!==t.length?(e+=t.map(e=>e.id).join("."),window.localStorage.setItem("cmplz_ac_string",e)):localStorage.cmplz_ac_string&&localStorage.removeItem("cmplz_ac_string")}();let s=null;e&&(e.created=C(e.lastUpdated),e.lastUpdated=C(e.lastUpdated),e.vendorsDisclosed||(e.vendorsDisclosed=new Set),void 0===e.useNonStandardStacks&&(e.useNonStandardStacks=!1),void 0===e.useNonStandardTexts&&(e.useNonStandardTexts=!1),void 0===e.purposeOneTreatment&&(e.purposeOneTreatment=!1),s=$.encode(e)),o.update(s,t),window.localStorage.setItem("cmplz_tcf_consent",s)}function C(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function E(e,t){return"functional"===e||"preferences"===e?[]:"marketing"===e?t?[1,2,3,4,5,6,7,8,9,10,11]:[1,2,3,4,5,6,10,11]:"statistics"===e?[1,7,8,9]:[]}function b(e){return!!cmplz_in_array(e,complianz.tcf_regions)}function L(e,t){if(!e.dataRetention)return'<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.undeclared_string+"</div>";const s=e.dataRetention.stdRetention||cmplz_tcf.undeclared_string;let n='<div class="cmplz-data-retention">';if(n+="<strong>"+cmplz_tcf.retention_string+":</strong> ",s===cmplz_tcf.undeclared_string?n+=s:n+=s+" "+cmplz_tcf.days_string,e.dataRetention.purposes&&Object.keys(e.dataRetention.purposes).length>0){n+="<br><strong>"+cmplz_tcf.purpose_retention_string+":</strong>",n+='<ul class="cmplz-retention-list">';for(const[s,r]of Object.entries(e.dataRetention.purposes)){const e=t.find(e=>e.id===parseInt(s));e&&(n+="<li>"+e.name+": "+r+" "+cmplz_tcf.days_string+"</li>")}n+="</ul>"}return n+="</div>",n}function A(e,t){if(!e.dataDeclaration||0===e.dataDeclaration.length)return cmplz_tcf.undeclared_string;const s=[];for(const n in e.dataDeclaration)if(e.dataDeclaration.hasOwnProperty(n)){const r=e.dataDeclaration[n];for(const e in t)if(t.hasOwnProperty(e)&&t[e].id===r){s.push(t[e].name);break}}return s.length>0?s.join(", "):cmplz_tcf.undeclared_string}function w(e,t){const s=[];for(const n in e)(t.includes(""+e[n].id)||t.includes(e[n].id))&&s.push(e[n]);return s}function z(e){let t="";const s=e.length-1;for(const n in e)e.hasOwnProperty(n)&&(t+=e[n].name,t+=n<s?", ":".");return t}Ie("click",".cmplz-manage-consent",function(){const e=S();o.update(e,!0)})});let Ve;const Oe=new Promise(function(e){Ve=e}),Pe=cmplz_tcf.cmp_url+"cmp/vendorlist/lspa.json";let ke;Ee.then(()=>{"optout"===complianz.consenttype||ue?(fetch(Pe,{method:"GET"}).then(e=>e.json()).then(function(e){ke=e,Ve()}),cmplz_tcf.ccpa_applies?(cmplz_set_cookie("usprivacy","1YN"+cmplz_tcf.lspact,!1),document.addEventListener("cmplz_fire_categories",function(e){let t="1YY"+cmplz_tcf.lspact;cmplz_in_array("marketing",e.detail.categories)&&(t="1YN"+cmplz_tcf.lspact),cmplz_set_cookie("usprivacy",t,!1)})):cmplz_set_cookie("usprivacy","1---"+cmplz_tcf.lspact,!1),Oe.then(()=>{const e=ke.signatories,t=document.getElementById("cmplz-tcf-us-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML;for(const n in e)if(e.hasOwnProperty(n)){let r=s;const o=e[n];r=r.replace(/{vendor_name}/g,o.signatoryLegalName);let i=!0;-1===o.optoutUrl.indexOf("http")?(i=!1,r=r.replace(/{optout_string}/g,o.optoutUrl)):r=r.replace(/{optout_url}/g,o.optoutUrl);const c=document.createElement("div");c.innerHTML=r;const a=c.firstChild;i?(a.querySelector(".cmplz-tcf-optout-string").style.display="none",a.querySelector(".cmplz-tcf-optout-url").style.display="block"):(a.querySelector(".cmplz-tcf-optout-string").style.display="block",a.querySelector(".cmplz-tcf-optout-url").style.display="none"),document.createDocumentFragment().appendChild(a),t.appendChild(a)}document.querySelector("#cmplz-tcf-wrapper").style.display="block",document.querySelector("#cmplz-tcf-wrapper-nojavascript").style.display="none"})):cmplz_tcf.debug&&console.log("not an optout tcf region or page")}),document.addEventListener("cmplz_dnsmpi_submit",function(){cmplz_tcf.debug&&console.log("fire data deletion request for TCF"),__uspapi("performDeletion",1)})})();
let vh=window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
jQuery(document).ready(function ($){
$(function (){
if($(this).scrollTop() >=100){
$('.site-header').addClass('sticky');
}else{
$('.site-header').removeClass('sticky');
}
$(document).scroll(function (){
if($(this).scrollTop() >=50){
$('.site-header').addClass('sticky');
}else{
$('.site-header').removeClass('sticky');
}});
});
function isInViewport(node){
const rect=node.getBoundingClientRect();
return ((rect.height > 0||rect.width > 0)&&rect.bottom >=0&&rect.right >=0&&rect.top <=(window.innerHeight||document.documentElement.clientHeight)&&rect.left <=(window.innerWidth||document.documentElement.clientWidth));
}
$('.scroll-effect').each(function (){
const visible=isInViewport(this);
if(visible){
$(this).addClass('appeared');
}});
$(window).scroll(function (){
$('.scroll-effect').each(function (){
const visible=isInViewport(this);
if(visible){
$(this).addClass('appeared');
}});
$('.js-counter span').each(function (){
const visible=isInViewport(this);
if(visible){
if(!$(this).hasClass('animated')){
$(this).addClass('animated');
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 3000, easing: 'swing', step: function (now){
$(this).text(Math.ceil(now));
}});
}}
});
});
$(window).click(function (){
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
$('body').removeClass('modal-active');
});
$('.header-item-trigger').click(function (event){
event.stopPropagation();
if($(this).hasClass('active')){
$('.header-item-trigger').removeClass('active');
$('.header-item-trigger').next('.header-item-content').removeClass('active');
}else{
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
$(this).addClass('active');
$(this).next('.header-item-content').addClass('active');
}});
$('.header-item-content').click(function (event){
event.stopPropagation();
});
$('.widget-title').click(function (event){
$(this).stop().toggleClass('active');
});
$('.header-item-close').click(function (event){
$('.header-item-trigger').removeClass('active');
$('.header-item-content').removeClass('active');
});
if($('.baobaby-size-chart').length){
$('.baobaby-size-chart-trigger, .baobaby-size-chart-close').on('click', function (){
$('.baobaby-size-chart-modal').stop().toggleClass('active');
});
}
if($('.home-slider').length){
$('.home-slider').owlCarousel({
loop: true, nav: true, dots: true, items: 1, lazyLoad: true, lazyLoadEager: 1,
});
}
if($('.layered-filter-trigger').length){
$('.layered-filter-trigger, .layered-filter-close').click(function (){
$('.layered-filter-content').stop().toggleClass('active');
});
}
$(document).keydown(function (event){
if(event.which===27){
$(".baobaby-size-chart-modal").stop().removeClass('active');
}});
$('.page-location-nav-item').click(function (){
let trigger=$(this).data('trigger');
$('.page-location-nav').removeClass('active');
$('.page-location-stores').each(function (){
let store=$(this);
store.removeClass('active');
if(store.attr('data-city')===trigger){
store.addClass('active');
}});
});
$('.page-location-back').click(function (){
$('.page-location-nav').addClass('active');
$('.page-location-stores').each(function (){
let store=$(this);
store.removeClass('active');
});
});
$('.coupon-label').click(function (){
$(this).stop().toggleClass('active');
});
$("body.single form.cart .quantity input").before('<span class="decrease-qty" type="button">-</span>');
$("body.single form.cart .quantity input").after('<span class="increase-qty" type="button">+</span>');
if($('.woocommerce-cart').length){
$('.shop_table .cart_item').each(function (){
$(this).find('.quantity input').before('<span class="decrease-qty" type="button">-</span>');
$(this).find('.quantity input').after('<span class="increase-qty" type="button">+</span>');
});
$(document.body).on('updated_wc_div', function (){
$('.shop_table .cart_item').each(function (){
$(this).find('.quantity input').before('<span class="decrease-qty" type="button">-</span>');
$(this).find('.quantity input').after('<span class="increase-qty" type="button">+</span>');
});
$('.decrease-qty').on('click', function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').on('click', function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
});
}
jQuery(document).ready(function ($){
$('.comment-form-rating .stars a').click(function (){
let currentClass=$(this).attr('class');
$(this).closest('span').removeAttr('class').addClass(currentClass);
});
function updateReviewCount(){
var reviewCount=$('#tab-reviews .commentlist').children().length;
$('.reviews_tab a').text('Recenzije (' + reviewCount + ')');
}
updateReviewCount();
$(document.body).on('added_to_cart removed_from_cart updated_wc_div', function(){
updateReviewCount();
});
});
$('ul li.menu-item-has-children').each(function (){
$(this).find('> a').eq(0).after('<div class="sub-menu-trigger"></div>');
});
$('.sub-menu-trigger').on('click', function (event){
$(this).stop().toggleClass('active').prev('a').stop().toggleClass('active');
});
$('.decrease-qty').on('click', function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').on('click', function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
function decreaseQty(e){
let qtyVal=parseInt(e.next('.input-text.qty').val());
if(qtyVal > 1){
e.next('.input-text.qty').val(qtyVal - 1).attr('value', qtyVal - 1);
e.closest('.product-add-to-cart-wrapper').find('.add_to_cart_button').attr('data-quantity', qtyVal - 1);
e.closest('.product-add-to-cart-wrapper').siblings('.gtm4wp_productdata').attr('data-gtm4wp_quantity', qtyVal - 1);
}else{
}}
function increaseQty(e){
let qtyVal=parseInt(e.prev('.input-text.qty').val());
if(qtyVal < 1000){
e.prev('.input-text.qty').val(qtyVal + 1).attr('value', qtyVal + 1);
e.closest('.product-add-to-cart-wrapper').find('.add_to_cart_button').attr('data-quantity', qtyVal + 1);
e.closest('.product-add-to-cart-wrapper').siblings('.gtm4wp_productdata').attr('data-gtm4wp_quantity', qtyVal + 1);
}else{
}}
$(document.body).on('click input', 'input.qty', function (){
$(this).parent().parent().find('a.ajax_add_to_cart').attr('data-quantity', $(this).val());
$(".added_to_cart").remove();
}).on('click', '.add_to_cart_button', function (){
let button=$(this);
setTimeout(function (){
button.removeClass('added');
}, 2000);
setTimeout(function (){
button.parent().find('.quantity > input.qty').val(1).attr('value', 1);
button.attr('data-quantity', '1');
}, 2000);
});
$(document.body).on('updated_cart_totals', function (){
$('.decrease-qty').click(function (){
decreaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.increase-qty').click(function (){
increaseQty($(this));
$('.woocommerce-cart-form :input[name="update_cart"]').prop('disabled', false).attr('aria-disabled', false);
});
$('.coupon-label').click(function (){
$(this).stop().toggleClass('active');
});
});
$('.home-benefits-carousel').owlCarousel({
loop: true,
margin: 16,
responsiveClass: true,
lazyLoad: true,
lazyLoadEager: 1,
navText: false,
nav: true,
dots: false,
responsive: {
0: {
items: 1, nav: true
}, 480: {
items: 2, nav: false
}, 768: {
items: 3, nav: true, loop: false
}}
});
function initOwlCarousel(){
if($(window).width() >=720){
let featuredHomeCarousel=$('.featured-products-list .products');
featuredHomeCarousel.owlCarousel({
margin: 32, nav: true, dots: false, items: 4,
}).addClass('owl-carousel');
}else{
let owl=$('.featured-products-list .products').data('owl.carousel');
$('.featured-products-list .products').removeClass('owl-carousel')
if(owl) owl.destroy();
}}
initOwlCarousel();
$(window).resize(function (){
initOwlCarousel();
});
$('.blog-news-carousel').owlCarousel({
loop: true,
responsiveClass: true,
lazyLoad: true,
lazyLoadEager: 1,
nav: true,
dots: false,
margin: 32,
responsive: {
0: {
items: 1, margin: 24, nav: true
}, 480: {
items: 2, margin: 24, nav: false
}, 768: {
items: 3, margin: 24, nav: true, loop: false
}, 1080: {
margin: 32
}}
});
function callbackOwl(){
$('.owl-prev').attr('title', 'Previous slide');
$('.owl-next').attr('title', 'Next slide');
}
callbackOwl();
$('.owl-carousel').each(function (){
$(this).find('.owl-dot').each(function (index){
$(this).attr('aria-label', index + 1);
});
$(this).find('.owl-nav button').each(function (index){
$(this).attr('aria-label', index + 1);
});
});
});
jQuery(document).ready(function ($){
var variation_id=null;
var attribute=null;
$('.swatch').click(function (){
variation_id=$(this).data('variation-id');
attribute=$(this).data('attribute');
$('.swatch.active').removeClass('active');
$(this).addClass('active');
$(this).closest('.product').find('.ajax_add_to_cart').removeClass('disabled').prop('disabled', false);
});
});
jQuery(document).ajaxComplete(function (event, xhr, settings){
if(settings.type==="POST"&&settings.url.includes('wc-ajax=update_order_review')){
jQuery('.woocommerce-shipping-totals td').attr('colspan', 2);
}});
!function (a, b, c, d){
function e(b, c){
this.settings=null, this.options=a.extend({}, e.Defaults, c), this.$element=a(b), 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"]}}, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c){
this._handlers[c]=a.proxy(this[c], this)
}, this)), a.each(e.Plugins, a.proxy(function (a, b){
this._plugins[a.charAt(0).toLowerCase() + a.slice(1)]=new b(this)
}, this)), a.each(e.Workers, a.proxy(function (b, c){
this._pipe.push({filter: c.filter, run: a.proxy(c.run, this)})
}, this)), this.setup(), this.initialize()
}
e.Defaults={
items: 3,
loop: !1,
center: !1,
rewind: !1,
checkVisibility: !0,
mouseDrag: !0,
touchDrag: !0,
pullDrag: !0,
freeDrag: !1,
margin: 0,
stagePadding: 0,
merge: !1,
mergeFit: !0,
autoWidth: !1,
startPosition: 0,
rtl: !1,
smartSpeed: 250,
fluidSpeed: !1,
dragEndSpeed: !1,
responsive: {},
responsiveRefreshRate: 200,
responsiveBaseElement: b,
fallbackEasing: "swing",
slideTransition: "",
info: !1,
nestedItemSelector: !1,
itemElement: "div",
stageElement: "div",
refreshClass: "owl-refresh",
loadedClass: "owl-loaded",
loadingClass: "owl-loading",
rtlClass: "owl-rtl",
responsiveClass: "owl-responsive",
dragClass: "owl-drag",
itemClass: "owl-item",
stageClass: "owl-stage",
stageOuterClass: "owl-stage-outer",
grabClass: "owl-grab"
}, e.Width={Default: "default", Inner: "inner", Outer: "outer"}, e.Type={
Event: "event",
State: "state"
}, e.Plugins={}, e.Workers=[{
filter: ["width", "settings"], run: function (){
this._width=this.$element.width()
}}, {
filter: ["width", "items", "settings"], run: function (a){
a.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 (a){
var b=this.settings.margin||"", c = !this.settings.autoWidth, d=this.settings.rtl,
e={width: "auto", "margin-left": d ? b:"", "margin-right": d ? "":b};
!c&&this.$stage.children().css(e), a.css=e
}}, {
filter: ["width", "items", "settings"], run: function (a){
var b=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, c=null,
d=this._items.length, e = !this.settings.autoWidth, f=[];
for (a.items={
merge: !1,
width: b
}; d--;) c=this._mergers[d], c=this.settings.mergeFit&&Math.min(c, this.settings.items)||c, a.items.merge=c > 1||a.items.merge, f[d]=e ? b * c:this._items[d].width();
this._widths=f
}}, {
filter: ["items", "settings"], run: function (){
var b=[], c=this._items, d=this.settings, e=Math.max(2 * d.items, 4),
f=2 * Math.ceil(c.length / 2), g=d.loop&&c.length ? d.rewind ? e:Math.max(e, f):0, h="",
i="";
for (g /=2; g > 0;) b.push(this.normalize(b.length / 2, !0)), h +=c[b[b.length - 1]][0].outerHTML, b.push(this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i=c[b[b.length - 1]][0].outerHTML + i, g -=1;
this._clones=b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(this.$stage)
}}, {
filter: ["width", "items", "settings"], run: function (){
for (var a=this.settings.rtl ? 1:-1, b=this._clones.length + this._items.length, c=-1, d=0, e=0, f=[]; ++c < b;) d=f[c - 1]||0, e=this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a);
this._coordinates=f
}}, {
filter: ["width", "items", "settings"], run: function (){
var a=this.settings.stagePadding, b=this._coordinates, c={
width: Math.ceil(Math.abs(b[b.length - 1])) + 2 * a,
"padding-left": a||"",
"padding-right": a||""
};
this.$stage.css(c)
}}, {
filter: ["width", "items", "settings"], run: function (a){
var b=this._coordinates.length, c = !this.settings.autoWidth, d=this.$stage.children();
if(c&&a.items.merge) for (; b--;) a.css.width=this._widths[this.relative(b)], d.eq(b).css(a.css); else c&&(a.css.width=a.items.width, d.css(a.css))
}}, {
filter: ["items"], run: function (){
this._coordinates.length < 1&&this.$stage.removeAttr("style")
}}, {
filter: ["width", "items", "settings"], run: function (a){
a.current=a.current ? this.$stage.children().index(a.current):0, a.current=Math.max(this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current)
}}, {
filter: ["position"], run: function (){
this.animate(this.coordinates(this._current))
}}, {
filter: ["width", "position", "items", "settings"], run: function (){
var a, b, c, d, e=this.settings.rtl ? 1:-1, f=2 * this.settings.stagePadding,
g=this.coordinates(this.current()) + f, h=g + this.width() * e, i=[];
for (c=0, d=this._coordinates.length; c < d; c++) a=this._coordinates[c - 1]||0, b=Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g)&&this.op(a, ">", h)||this.op(b, "<", g)&&this.op(b, ">", h))&&i.push(c);
this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass("center"), this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")
}}], e.prototype.initializeStage=function (){
this.$stage=this.$element.find("." + this.settings.stageClass), this.$stage.length||(this.$element.addClass(this.options.loadingClass), this.$stage=a("<" + this.settings.stageElement + ">", {class: this.settings.stageClass}).wrap(a("<div/>", {class: this.settings.stageOuterClass})), this.$element.append(this.$stage.parent()))
}, e.prototype.initializeItems=function (){
var b=this.$element.find(".owl-item");
if(b.length) return this._items=b.get().map(function (b){
return a(b)
}), this._mergers=this._items.map(function (){
return 1
}), void this.refresh();
this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh():this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)
}, e.prototype.initialize=function (){
if(this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth&&!this.is("pre-loading")){
var a, b, c;
a=this.$element.find("img"), b=this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector:d, c=this.$element.children(b).width(), a.length&&c <=0&&this.preloadAutoWidthImages(a)
}
this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized")
}, e.prototype.isVisible=function (){
return !this.settings.checkVisibility||this.$element.is(":visible")
}, e.prototype.setup=function (){
var b=this.viewport(), c=this.options.responsive, d=-1, e=null;
c ? (a.each(c, function (a){
a <=b&&a > d&&(d=Number(a))
}), e=a.extend({}, this.options, c[d]), "function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()), delete e.responsive, e.responsiveClass&&this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + d))):e=a.extend({}, this.options), this.trigger("change", {
property: {
name: "settings",
value: e
}}), this._breakpoint=d, this.settings=e, this.invalidate("settings"), this.trigger("changed", {
property: {
name: "settings",
value: this.settings
}})
}, e.prototype.optionsLogic=function (){
this.settings.autoWidth&&(this.settings.stagePadding = !1, this.settings.merge = !1)
}, e.prototype.prepare=function (b){
var c=this.trigger("prepare", {content: b});
return c.data||(c.data=a("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(b)), this.trigger("prepared", {content: c.data}), c.data
}, e.prototype.update=function (){
for (var b=0, c=this._pipe.length, d=a.proxy(function (a){
return this[a]
}, this._invalidated), e={}; b < c;) (this._invalidated.all||a.grep(this._pipe[b].filter, d).length > 0)&&this._pipe[b].run(e), b++;
this._invalidated={}, !this.is("valid")&&this.enter("valid")
}, e.prototype.width=function (a){
switch (a=a||e.Width.Default){
case e.Width.Inner:
case e.Width.Outer:
return this._width;
default:
return this._width - 2 * this.settings.stagePadding + this.settings.margin
}}, e.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")
}, e.prototype.onThrottledResize=function (){
b.clearTimeout(this.resizeTimer), this.resizeTimer=b.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate)
}, e.prototype.onResize=function (){
return !!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1):(this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized")))))
}, e.prototype.registerEventHandlers=function (){
a.support.transition&&this.$stage.on(a.support.transition.end + ".owl.core", a.proxy(this.onTransitionEnd, this)), !1!==this.settings.responsive&&this.on(b, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function (){
return !1
})), this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this)))
}, e.prototype.onDragStart=function (b){
var d=null;
3!==b.which&&(a.support.transform ? (d=this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), d={
x: d[16===d.length ? 12:4],
y: d[16===d.length ? 13:5]
}):(d=this.$stage.position(), d={
x: this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin:d.left,
y: d.top
}), this.is("animating")&&(a.support.transform ? this.animate(d.x):this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown"===b.type), this.speed(0), this._drag.time=(new Date).getTime(), this._drag.target=a(b.target), this._drag.stage.start=d, this._drag.stage.current=d, this._drag.pointer=this.pointer(b), a(c).on("mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one("mousemove.owl.core touchmove.owl.core", a.proxy(function (b){
var d=this.difference(this._drag.pointer, this.pointer(b));
a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) < Math.abs(d.y)&&this.is("valid")||(b.preventDefault(), this.enter("dragging"), this.trigger("drag"))
}, this)))
}, e.prototype.onDragMove=function (a){
var b=null, c=null, d=null, e=this.difference(this._drag.pointer, this.pointer(a)),
f=this.difference(this._drag.stage.start, e);
this.is("dragging")&&(a.preventDefault(), this.settings.loop ? (b=this.coordinates(this.minimum()), c=this.coordinates(this.maximum() + 1) - b, f.x=((f.x - b) % c + c) % c + b):(b=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()), c=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()), d=this.settings.pullDrag ? -1 * e.x / 5:0, f.x=Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current=f, this.animate(f.x))
}, e.prototype.onDragEnd=function (b){
var d=this.difference(this._drag.pointer, this.pointer(b)), e=this._drag.stage.current,
f=d.x > 0 ^ this.settings.rtl ? "left":"right";
a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed), this.current(this.closest(e.x, 0!==d.x ? f:this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction=f, (Math.abs(d.x) > 3||(new Date).getTime() - this._drag.time > 300)&&this._drag.target.one("click.owl.core", function (){
return !1
})), this.is("dragging")&&(this.leave("dragging"), this.trigger("dragged"))
}, e.prototype.closest=function (b, c){
var e=-1, f=30, g=this.width(), h=this.coordinates();
return this.settings.freeDrag||a.each(h, a.proxy(function (a, i){
return "left"===c&&b > i - f&&b < i + f ? e=a:"right"===c&&b > i - g - f&&b < i - g + f ? e=a + 1:this.op(b, "<", i)&&this.op(b, ">", h[a + 1]!==d ? h[a + 1]:i - g)&&(e="left"===c ? a + 1:a), -1===e
}, this)), this.settings.loop||(this.op(b, ">", h[this.minimum()]) ? e=b = this.minimum():this.op(b, "<", h[this.maximum()])&&(e=b = this.maximum())), e
}, e.prototype.animate=function (b){
var c=this.speed() > 0;
this.is("animating")&&this.onTransitionEnd(), c&&(this.enter("animating"), this.trigger("translate")), a.support.transform3d&&a.support.transition ? this.$stage.css({
transform: "translate3d(" + b + "px,0px,0px)",
transition: this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " " + this.settings.slideTransition:"")
}):c ? this.$stage.animate({left: b + "px"}, this.speed(), this.settings.fallbackEasing, a.proxy(this.onTransitionEnd, this)):this.$stage.css({left: b + "px"})
}, e.prototype.is=function (a){
return this._states.current[a]&&this._states.current[a] > 0
}, e.prototype.current=function (a){
if(a===d) return this._current;
if(0===this._items.length) return d;
if(a=this.normalize(a), this._current!==a){
var b=this.trigger("change", {property: {name: "position", value: a}});
b.data!==d&&(a=this.normalize(b.data)), this._current=a, this.invalidate("position"), this.trigger("changed", {
property: {
name: "position",
value: this._current
}})
}
return this._current
}, e.prototype.invalidate=function (b){
return "string"===a.type(b)&&(this._invalidated[b] = !0, this.is("valid")&&this.leave("valid")), a.map(this._invalidated, function (a, b){
return b
})
}, e.prototype.reset=function (a){
(a=this.normalize(a))!==d&&(this._speed=0, this._current=a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"]))
}, e.prototype.normalize=function (a, b){
var c=this._items.length, e=b ? 0:this._clones.length;
return !this.isNumeric(a)||c < 1 ? a=d:(a < 0||a >=c + e)&&(a=((a - e / 2) % c + c) % c + e / 2), a
}, e.prototype.relative=function (a){
return a -=this._clones.length / 2, this.normalize(a, !0)
}, e.prototype.maximum=function (a){
var b, c, d, e=this.settings, f=this._coordinates.length;
if(e.loop) f=this._clones.length / 2 + this._items.length - 1; else if(e.autoWidth||e.merge){
if(b=this._items.length) for (c=this._items[--b].width(), d=this.$element.width(); b--&&!((c +=this._items[b].width() + this.settings.margin) > d);) ;
f=b + 1
} else f=e.center ? this._items.length - 1:this._items.length - e.items;
return a&&(f -=this._clones.length / 2), Math.max(f, 0)
}, e.prototype.minimum=function (a){
return a ? 0:this._clones.length / 2
}, e.prototype.items=function (a){
return a===d ? this._items.slice():(a=this.normalize(a, !0), this._items[a])
}, e.prototype.mergers=function (a){
return a===d ? this._mergers.slice():(a=this.normalize(a, !0), this._mergers[a])
}, e.prototype.clones=function (b){
var c=this._clones.length / 2, e=c + this._items.length, f=function (a){
return a % 2==0 ? e + a / 2:c - (a + 1) / 2
};
return b===d ? a.map(this._clones, function (a, b){
return f(b)
}):a.map(this._clones, function (a, c){
return a===b ? f(c):null
})
}, e.prototype.speed=function (a){
return a!==d&&(this._speed=a), this._speed
}, e.prototype.coordinates=function (b){
var c, e=1, f=b - 1;
return b===d ? a.map(this._coordinates, a.proxy(function (a, b){
return this.coordinates(b)
}, this)):(this.settings.center ? (this.settings.rtl&&(e=-1, f=b + 1), c=this._coordinates[b], c +=(this.width() - c + (this._coordinates[f]||0)) / 2 * e):c=this._coordinates[f]||0, c=Math.ceil(c))
}, e.prototype.duration=function (a, b, c){
return 0===c ? 0:Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c||this.settings.smartSpeed)
}, e.prototype.to=function (a, b){
var c=this.current(), d=null, e=a - this.relative(c), f=(e > 0) - (e < 0), g=this._items.length,
h=this.minimum(), i=this.maximum();
this.settings.loop ? (!this.settings.rewind&&Math.abs(e) > g / 2&&(e +=-1 * f * g), a=c + e, (d=((a - h) % g + g) % g + h)!==a&&d - e <=i&&d - e > 0&&(c=d - e, a=d, this.reset(c))):this.settings.rewind ? (i +=1, a=(a % i + i) % i):a=Math.max(h, Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible()&&this.update()
}, e.prototype.next=function (a){
a=a||!1, this.to(this.relative(this.current()) + 1, a)
}, e.prototype.prev=function (a){
a=a||!1, this.to(this.relative(this.current()) - 1, a)
}, e.prototype.onTransitionEnd=function (a){
if(a!==d&&(a.stopPropagation(), (a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))) return !1;
this.leave("animating"), this.trigger("translated")
}, e.prototype.viewport=function (){
var d;
return this.options.responsiveBaseElement!==b ? d=a(this.options.responsiveBaseElement).width():b.innerWidth ? d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth ? d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."), d
}, e.prototype.replace=function (b){
this.$stage.empty(), this._items=[], b&&(b=b instanceof jQuery ? b:a(b)), this.settings.nestedItemSelector&&(b=b.find("." + this.settings.nestedItemSelector)), b.filter(function (){
return 1===this.nodeType
}).each(a.proxy(function (a, b){
b=this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)
}, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0), this.invalidate("items")
}, e.prototype.add=function (b, c){
var e=this.relative(this._current);
c=c===d ? this._items.length:this.normalize(c, !0), b=b instanceof jQuery ? b:a(b), this.trigger("add", {
content: b,
position: c
}), b=this.prepare(b), 0===this._items.length||c===this._items.length ? (0===this._items.length&&this.$stage.append(b), 0!==this._items.length&&this._items[c - 1].after(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)), this._items[e]&&this.reset(this._items[e].index()), this.invalidate("items"), this.trigger("added", {
content: b,
position: c
})
}, e.prototype.remove=function (a){
(a=this.normalize(a, !0))!==d&&(this.trigger("remove", {
content: this._items[a],
position: a
}), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", {
content: null,
position: a
}))
}, e.prototype.preloadAutoWidthImages=function (b){
b.each(a.proxy(function (b, c){
this.enter("pre-loading"), c=a(c), a(new Image).one("load", a.proxy(function (a){
c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading")&&!this.is("initializing")&&this.refresh()
}, this)).attr("src", c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))
}, this))
}, e.prototype.destroy=function (){
this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize));
for (var d in this._plugins) this._plugins[d].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")
}, e.prototype.op=function (a, b, c){
var d=this.settings.rtl;
switch (b){
case"<":
return d ? a > c:a < c;
case">":
return d ? a < c:a > c;
case">=":
return d ? a <=c:a >=c;
case"<=":
return d ? a >=c:a <=c
}}, e.prototype.on=function (a, b, c, d){
a.addEventListener ? a.addEventListener(b, c, d):a.attachEvent&&a.attachEvent("on" + b, c)
}, e.prototype.off=function (a, b, c, d){
a.removeEventListener ? a.removeEventListener(b, c, d):a.detachEvent&&a.detachEvent("on" + b, c)
}, e.prototype.trigger=function (b, c, d, f, g){
var h={item: {count: this._items.length, index: this.current()}},
i=a.camelCase(a.grep(["on", b, d], function (a){
return a
}).join("-").toLowerCase()),
j=a.Event([b, "owl", d||"carousel"].join(".").toLowerCase(), a.extend({relatedTarget: this}, h, c));
return this._supress[b]||(a.each(this._plugins, function (a, b){
b.onTrigger&&b.onTrigger(j)
}), this.register({
type: e.Type.Event,
name: b
}), this.$element.trigger(j), this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this, j)), j
}, e.prototype.enter=function (b){
a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){
this._states.current[b]===d&&(this._states.current[b]=0), this._states.current[b]++
}, this))
}, e.prototype.leave=function (b){
a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){
this._states.current[b]--
}, this))
}, e.prototype.register=function (b){
if(b.type===e.Type.Event){
if(a.event.special[b.name]||(a.event.special[b.name]={}), !a.event.special[b.name].owl){
var c=a.event.special[b.name]._default;
a.event.special[b.name]._default=function (a){
return !c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl") ? a.namespace&&a.namespace.indexOf("owl") > -1:c.apply(this, arguments)
}, a.event.special[b.name].owl = !0
}} else b.type===e.Type.State&&(this._states.tags[b.name] ? this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags, this._states.tags[b.name]=a.grep(this._states.tags[b.name], a.proxy(function (c, d){
return a.inArray(c, this._states.tags[b.name])===d
}, this)))
}, e.prototype.suppress=function (b){
a.each(b, a.proxy(function (a, b){
this._supress[b] = !0
}, this))
}, e.prototype.release=function (b){
a.each(b, a.proxy(function (a, b){
delete this._supress[b]
}, this))
}, e.prototype.pointer=function (a){
var c={x: null, y: null};
return a=a.originalEvent||a || b.event, a=a.touches&&a.touches.length ? a.touches[0]:a.changedTouches&&a.changedTouches.length ? a.changedTouches[0]:a, a.pageX ? (c.x=a.pageX, c.y=a.pageY):(c.x=a.clientX, c.y=a.clientY), c
}, e.prototype.isNumeric=function (a){
return !isNaN(parseFloat(a))
}, e.prototype.difference=function (a, b){
return {x: a.x - b.x, y: a.y - b.y}}, a.fn.owlCarousel=function (b){
var c=Array.prototype.slice.call(arguments, 1);
return this.each(function (){
var d=a(this), f=d.data("owl.carousel");
f||(f=new e(this, "object"==typeof b&&b), d.data("owl.carousel", f), a.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c){
f.register({
type: e.Type.Event,
name: c
}), f.$element.on(c + ".owl.carousel.core", a.proxy(function (a){
a.namespace&&a.relatedTarget!==this&&(this.suppress([c]), f[c].apply(this, [].slice.call(arguments, 1)), this.release([c]))
}, f))
})), "string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f, c)
})
}, a.fn.owlCarousel.Constructor=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._interval=null, this._visible=null, this._handlers={
"initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoRefresh&&this.watch()
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
};
e.Defaults={autoRefresh: !0, autoRefreshInterval: 500}, e.prototype.watch=function (){
this._interval||(this._visible=this._core.isVisible(), this._interval=b.setInterval(a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval))
}, e.prototype.refresh=function (){
this._core.isVisible()!==this._visible&&(this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible&&this._core.invalidate("width")&&this._core.refresh())
}, e.prototype.destroy=function (){
var a, c;
b.clearInterval(this._interval);
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (c in Object.getOwnPropertyNames(this)) "function"!=typeof this[c]&&(this[c]=null)
}, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._loaded=[], this._handlers={
"initialized.owl.carousel change.owl.carousel resized.owl.carousel": a.proxy(function (b){
if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){
var c=this._core.settings, e=c.center&&Math.ceil(c.items / 2)||c.items,
f=c.center&&-1 * e||0,
g=(b.property&&b.property.value!==d ? b.property.value:this._core.current()) + f,
h=this._core.clones().length, i=a.proxy(function (a, b){
this.load(b)
}, this);
for (c.lazyLoadEager > 0&&(e +=c.lazyLoadEager, c.loop&&(g -=c.lazyLoadEager, e++)); f++ < e;) this.load(h / 2 + this._core.relative(g)), h&&a.each(this._core.clones(this._core.relative(g)), i), g++
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
};
e.Defaults={lazyLoad: !1, lazyLoadEager: 0}, e.prototype.load=function (c){
var d=this._core.$stage.children().eq(c), e=d&&d.find(".owl-lazy");
!e||a.inArray(d.get(0), this._loaded) > -1||(e.each(a.proxy(function (c, d){
var e, f=a(d),
g=b.devicePixelRatio > 1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");
this._core.trigger("load", {
element: f,
url: g
}, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function (){
f.css("opacity", 1), this._core.trigger("loaded", {element: f, url: g}, "lazy")
}, this)).attr("src", g):f.is("source") ? f.one("load.owl.lazy", a.proxy(function (){
this._core.trigger("loaded", {element: f, url: g}, "lazy")
}, this)).attr("srcset", g):(e=new Image, e.onload=a.proxy(function (){
f.css({"background-image": 'url("' + g + '")', opacity: "1"}), this._core.trigger("loaded", {
element: f,
url: g
}, "lazy")
}, this), e.src=g)
}, this)), this._loaded.push(d.get(0)))
}, e.prototype.destroy=function (){
var a, b;
for (a in this.handlers) this._core.$element.off(a, this.handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Lazy=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (c){
this._core=c, this._previousHeight=null, this._handlers={
"initialized.owl.carousel refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&this.update()
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()
}, this), "loaded.owl.lazy": a.proxy(function (a){
a.namespace&&this._core.settings.autoHeight&&a.element.closest("." + this._core.settings.itemClass).index()===this._core.current()&&this.update()
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._intervalId=null;
var d=this;
a(b).on("load", function (){
d._core.settings.autoHeight&&d.update()
}), a(b).resize(function (){
d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId), d._intervalId=setTimeout(function (){
d.update()
}, 250))
})
};
e.Defaults={autoHeight: !1, autoHeightClass: "owl-height"}, e.prototype.update=function (){
var b=this._core._current, c=b + this._core.settings.items, d=this._core.settings.lazyLoad,
e=this._core.$stage.children().toArray().slice(b, c), f=[], g=0;
a.each(e, function (b, c){
f.push(a(c).height())
}), g=Math.max.apply(null, f), g <=1&&d && this._previousHeight&&(g=this._previousHeight), this._previousHeight=g, this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)
}, e.prototype.destroy=function (){
var a, b;
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._videos={}, this._playing=null, this._handlers={
"initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.register({type: "state", name: "playing", tags: ["interacting"]})
}, this), "resize.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()
}, this), "refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&"position"===a.property.name&&this._playing&&this.stop()
}, this), "prepared.owl.carousel": a.proxy(function (b){
if(b.namespace){
var c=a(b.content).find(".owl-video");
c.length&&(c.css("display", "none"), this.fetch(c, a(b.content)))
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function (a){
this.play(a)
}, this))
};
e.Defaults={video: !1, videoHeight: !1, videoWidth: !1}, e.prototype.fetch=function (a, b){
var c=function (){
return a.attr("data-vimeo-id") ? "vimeo":a.attr("data-vzaar-id") ? "vzaar":"youtube"
}(), d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),
e=a.attr("data-width")||this._core.settings.videoWidth,
f=a.attr("data-height")||this._core.settings.videoHeight, g=a.attr("href");
if(!g) throw new Error("Missing video URL.");
if(d=g.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+)?/), d[3].indexOf("youtu") > -1) c="youtube"; else if(d[3].indexOf("vimeo") > -1) c="vimeo"; else {
if(!(d[3].indexOf("vzaar") > -1)) throw new Error("Video URL not supported.");
c="vzaar"
}
d=d[6], this._videos[g]={
type: c,
id: d,
width: e,
height: f
}, b.attr("data-video", g), this.thumbnail(a, this._videos[g])
}, e.prototype.thumbnail=function (b, c){
var d, e, f, g=c.width&&c.height ? "width:" + c.width + "px;height:" + c.height + "px;":"",
h=b.find("img"), i="src", j="", k=this._core.settings, l=function (c){
e='<div class="owl-video-play-icon"></div>', d=k.lazyLoad ? a("<div/>", {
class: "owl-video-tn " + j,
srcType: c
}):a("<div/>", {
class: "owl-video-tn",
style: "opacity:1;background-image:url(" + c + ")"
}), b.after(d), b.after(e)
};
if(b.wrap(a("<div/>", {
class: "owl-video-wrapper",
style: g
})), this._core.settings.lazyLoad&&(i="data-src", j="owl-lazy"), h.length) return l(h.attr(i)), h.remove(), !1;
"youtube"===c.type ? (f="//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)):"vimeo"===c.type ? a.ajax({
type: "GET",
url: "//vimeo.com/api/v2/video/" + c.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function (a){
f=a[0].thumbnail_large, l(f)
}}):"vzaar"===c.type&&a.ajax({
type: "GET",
url: "//vzaar.com/api/videos/" + c.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function (a){
f=a.framegrab_url, l(f)
}})
}, e.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")
}, e.prototype.play=function (b){
var c, d=a(b.target), e=d.closest("." + this._core.settings.itemClass),
f=this._videos[e.attr("data-video")], g=f.width||"100%", h=f.height||this._core.$stage.height();
this._playing||(this._core.enter("playing"), this._core.trigger("play", null, "video"), e=this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr("height", h), c.attr("width", g), "youtube"===f.type ? c.attr("src", "//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id):"vimeo"===f.type ? c.attr("src", "//player.vimeo.com/video/" + f.id + "?autoplay=1"):"vzaar"===f.type&&c.attr("src", "//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing=e.addClass("owl-video-playing"))
}, e.prototype.isInFullScreen=function (){
var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;
return b&&a(b).parent().hasClass("owl-video-frame")
}, e.prototype.destroy=function (){
var a, b;
this._core.$element.off("click.owl.video");
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Video=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this.core=b, this.core.options=a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous=d, this.next=d, this.handlers={
"change.owl.carousel": a.proxy(function (a){
a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(), this.next=a.property.value)
}, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function (a){
a.namespace&&(this.swapping="translated"==a.type)
}, this), "translate.owl.carousel": a.proxy(function (a){
a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()
}, this)
}, this.core.$element.on(this.handlers)
};
e.Defaults={
animateOut: !1,
animateIn: !1
}, e.prototype.swap=function (){
if(1===this.core.settings.items&&a.support.animation&&a.support.transition){
this.core.speed(0);
var b, c=a.proxy(this.clear, this), d=this.core.$stage.children().eq(this.previous),
e=this.core.$stage.children().eq(this.next), f=this.core.settings.animateIn,
g=this.core.settings.animateOut;
this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.one(a.support.animation.end, c).css({left: b + "px"}).addClass("animated owl-animated-out").addClass(g)), f&&e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f))
}}, e.prototype.clear=function (b){
a(b.target).css({left: ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd()
}, e.prototype.destroy=function (){
var a, b;
for (a in this.handlers) this.core.$element.off(a, this.handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Animate=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
var e=function (b){
this._core=b, this._call=null, this._time=0, this._timeout=0, this._paused = !0, this._handlers={
"changed.owl.carousel": a.proxy(function (a){
a.namespace&&"settings"===a.property.name ? this._core.settings.autoplay ? this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)
}, this), "initialized.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.autoplay&&this.play()
}, this), "play.owl.autoplay": a.proxy(function (a, b, c){
a.namespace&&this.play(b, c)
}, this), "stop.owl.autoplay": a.proxy(function (a){
a.namespace&&this.stop()
}, this), "mouseover.owl.autoplay": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()
}, this), "mouseleave.owl.autoplay": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()
}, this), "touchstart.owl.core": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()
}, this), "touchend.owl.core": a.proxy(function (){
this._core.settings.autoplayHoverPause&&this.play()
}, this)
}, this._core.$element.on(this._handlers), this._core.options=a.extend({}, e.Defaults, this._core.options)
};
e.Defaults={
autoplay: !1,
autoplayTimeout: 5e3,
autoplayHoverPause: !1,
autoplaySpeed: !1
}, e.prototype._next=function (d){
this._call=b.setTimeout(a.proxy(this._next, this, d), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)
}, e.prototype.read=function (){
return (new Date).getTime() - this._time
}, e.prototype.play=function (c, d){
var e;
this._core.is("rotating")||this._core.enter("rotating"), c=c||this._core.settings.autoplayTimeout, e=Math.min(this._time % (this._timeout||c), c), this._paused ? (this._time=this.read(), this._paused = !1):b.clearTimeout(this._call), this._time +=this.read() % c - e, this._timeout=c, this._call=b.setTimeout(a.proxy(this._next, this, d), c - e)
}, e.prototype.stop=function (){
this._core.is("rotating")&&(this._time=0, this._paused = !0, b.clearTimeout(this._call), this._core.leave("rotating"))
}, e.prototype.pause=function (){
this._core.is("rotating")&&!this._paused&&(this._time=this.read(), this._paused = !0, b.clearTimeout(this._call))
}, e.prototype.destroy=function (){
var a, b;
this.stop();
for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
for (b in Object.getOwnPropertyNames(this)) "function"!=typeof this[b]&&(this[b]=null)
}, a.fn.owlCarousel.Constructor.Plugins.autoplay=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
"use strict";
var e=function (b){
this._core=b, this._initialized = !1, this._pages=[], this._controls={}, this._templates=[], this.$element=this._core.$element, this._overrides={
next: this._core.next,
prev: this._core.prev,
to: this._core.to
}, this._handlers={
"prepared.owl.carousel": a.proxy(function (b){
b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>")
}, this), "added.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 0, this._templates.pop())
}, this), "remove.owl.carousel": a.proxy(function (a){
a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 1)
}, this), "changed.owl.carousel": a.proxy(function (a){
a.namespace&&"position"==a.property.name&&this.draw()
}, this), "initialized.owl.carousel": a.proxy(function (a){
a.namespace&&!this._initialized&&(this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation"))
}, this), "refreshed.owl.carousel": a.proxy(function (a){
a.namespace&&this._initialized&&(this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation"))
}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers)
};
e.Defaults={
nav: !1,
navText: ['<span aria-label="Previous">&#x2039;</span>', '<span aria-label="Next">&#x203a;</span>'],
navSpeed: !1,
navElement: 'button type="button" role="presentation"',
navContainer: !1,
navContainerClass: "owl-nav",
navClass: ["owl-prev", "owl-next"],
slideBy: 1,
dotClass: "owl-dot",
dotsClass: "owl-dots",
dots: !0,
dotsEach: !1,
dotsData: !1,
dotsSpeed: !1,
dotsContainer: !1
}, e.prototype.initialize=function (){
var b, c=this._core.settings;
this._controls.$relative=(c.navContainer ? a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous=a("<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a.proxy(function (a){
this.prev(c.navSpeed)
}, this)), this._controls.$next=a("<" + c.navElement + ">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a){
this.next(c.navSpeed)
}, this)), c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]), this._controls.$absolute=(c.dotsContainer ? a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b){
var d=a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index():a(b.target).parent().index();
b.preventDefault(), this.to(d, c.dotsSpeed)
}, this));
for (b in this._overrides) this._core[b]=a.proxy(this[b], this)
}, e.prototype.destroy=function (){
var a, b, c, d, e;
e=this._core.settings;
for (a in this._handlers) this.$element.off(a, this._handlers[a]);
for (b in this._controls) "$relative"===b&&e.navContainer ? this._controls[b].html(""):this._controls[b].remove();
for (d in this.overides) this._core[d]=this._overrides[d];
for (c in Object.getOwnPropertyNames(this)) "function"!=typeof this[c]&&(this[c]=null)
}, e.prototype.update=function (){
var a, b, c, d=this._core.clones().length / 2, e=d + this._core.items().length, f=this._core.maximum(!0),
g=this._core.settings, h=g.center||g.autoWidth||g.dotsData ? 1:g.dotsEach||g.items;
if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy, g.items)), g.dots||"page"==g.slideBy) for (this._pages=[], a=d, b=0, c=0; a < e; a++){
if(b >=h||0===b){
if(this._pages.push({start: Math.min(f, a - d), end: a - d + h - 1}), Math.min(f, a - d)===f) break;
b=0, ++c
}
b +=this._core.mergers(this._core.relative(a))
}}, e.prototype.draw=function (){
var b, c=this._core.settings, d=this._core.items().length <=c.items,
e=this._core.relative(this._core.current()), f=c.loop||c.rewind;
this._controls.$relative.toggleClass("disabled", !c.nav||d), c.nav&&(this._controls.$previous.toggleClass("disabled", !f&&e <=this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !f&&e >=this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots||d), c.dots&&(b=this._pages.length - this._controls.$absolute.children().length, c.dotsData&&0!==b ? this._controls.$absolute.html(this._templates.join("")):b > 0 ? this._controls.$absolute.append(new Array(b + 1).join(this._templates[0])):b < 0&&this._controls.$absolute.children().slice(b).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass("active"))
}, e.prototype.onTrigger=function (b){
var c=this._core.settings;
b.page={
index: a.inArray(this.current(), this._pages),
count: this._pages.length,
size: c&&(c.center||c.autoWidth||c.dotsData ? 1:c.dotsEach||c.items)
}}, e.prototype.current=function (){
var b=this._core.relative(this._core.current());
return a.grep(this._pages, a.proxy(function (a, c){
return a.start <=b&&a.end >=b
}, this)).pop()
}, e.prototype.getPosition=function (b){
var c, d, e=this._core.settings;
return "page"==e.slideBy ? (c=a.inArray(this.current(), this._pages), d=this._pages.length, b ? ++c:--c, c=this._pages[(c % d + d) % d].start):(c=this._core.relative(this._core.current()), d=this._core.items().length, b ? c +=e.slideBy:c -=e.slideBy), c
}, e.prototype.next=function (b){
a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b)
}, e.prototype.prev=function (b){
a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b)
}, e.prototype.to=function (b, c, d){
var e;
!d&&this._pages.length ? (e=this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)):a.proxy(this._overrides.to, this._core)(b, c)
}, a.fn.owlCarousel.Constructor.Plugins.Navigation=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
"use strict";
var e=function (c){
this._core=c, this._hashes={}, this.$element=this._core.$element, this._handlers={
"initialized.owl.carousel": a.proxy(function (c){
c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")
}, this), "prepared.owl.carousel": a.proxy(function (b){
if(b.namespace){
var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");
if(!c) return;
this._hashes[c]=b.content
}}, this), "changed.owl.carousel": a.proxy(function (c){
if(c.namespace&&"position"===c.property.name){
var d=this._core.items(this._core.relative(this._core.current())),
e=a.map(this._hashes, function (a, b){
return a===d ? b:null
}).join();
if(!e||b.location.hash.slice(1)===e) return;
b.location.hash=e
}}, this)
}, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function (a){
var c=b.location.hash.substring(1), e=this._core.$stage.children(),
f=this._hashes[c]&&e.index(this._hashes[c]);
f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f), !1, !0)
}, this))
};
e.Defaults={URLhashListener: !1}, e.prototype.destroy=function (){
var c, d;
a(b).off("hashchange.owl.navigation");
for (c in this._handlers) this._core.$element.off(c, this._handlers[c]);
for (d in Object.getOwnPropertyNames(this)) "function"!=typeof this[d]&&(this[d]=null)
}, a.fn.owlCarousel.Constructor.Plugins.Hash=e
}(window.Zepto||window.jQuery, window, document), function (a, b, c, d){
function e(b, c){
var e = !1, f=b.charAt(0).toUpperCase() + b.slice(1);
return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b){
if(g[b]!==d) return e = !c||b, !1
}), e
}
function f(a){
return e(a, !0)
}
var g=a("<support>").get(0).style, h="Webkit Moz O ms".split(" "), i={
transition: {
end: {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd",
transition: "transitionend"
}},
animation: {
end: {
WebkitAnimation: "webkitAnimationEnd",
MozAnimation: "animationend",
OAnimation: "oAnimationEnd",
animation: "animationend"
}}
}, j={
csstransforms: function (){
return !!e("transform")
}, csstransforms3d: function (){
return !!e("perspective")
}, csstransitions: function (){
return !!e("transition")
}, cssanimations: function (){
return !!e("animation")
}};
j.csstransitions()&&(a.support.transition=new String(f("transition")), a.support.transition.end=i.transition.end[a.support.transition]), j.cssanimations()&&(a.support.animation=new String(f("animation")), a.support.animation.end=i.animation.end[a.support.animation]), j.csstransforms()&&(a.support.transform=new String(f("transform")), a.support.transform3d=j.csstransforms3d())
}(window.Zepto||window.jQuery, window, document);