!function(){"use strict";var Trigger=function(){function e(e,t){this.referencedTags=[],this.theTrigger={},this.id=e.id,this.triggerKey=e.triggerKey,this.triggerKey in t&&(this.theTrigger=new t[this.triggerKey])}return e.prototype.getId=function(){return this.id},e.prototype.addReferencedTag=function(e){this.referencedTags.push(e)},e.prototype.getReferencedTags=function(){return this.referencedTags},e.prototype.setUp=function(){if(this.theTrigger&&this.theTrigger.setUp){var e=this;this.theTrigger.setUp(function(t){if("event"in t&&e.meetsConditions())for(var n=0,o=e.getReferencedTags();n * Version: 1.0.1 * LastModified: Dec 25 1999 */ var e=32768,t=0,n=1,o=2,i=6,r=!0,c=32768,a=64,d=8192,s=2*e,u=3,l=258,m=16,p=8192,_=13;p>c&&alert("error: zip_INBUFSIZ is too small"),e<<1>1<m-1&&alert("error: zip_HASH_BITS is too large"),(_<8||258!=l)&&alert("error: Code too clever");var h,w,g,f,y,v,b,j,k,C,x,I,V,P,S,T,D,A,E,B,F,O,z,R,U,q,L,M,$,N,X,K,H,Y,J,W,Z,G,Q,ee,te,ne,oe,ie,re,ce,ae,de,se,ue,le,me,pe,_e,he,we,ge=p,fe=1<<_,ye=fe-1,ve=e-1,be=0,je=4096,ke=l+u+1,Ce=e-ke,xe=1,Ie=15,Ve=7,Pe=29,Se=256,Te=256,De=Se+1+Pe,Ae=30,Ee=19,Be=16,Fe=17,Oe=18,ze=2*De+1,Re=parseInt((_+u-1)/u),Ue=null,qe=function(){this.fc=0,this.dl=0},Le=function(){this.dyn_tree=null,this.static_tree=null,this.extra_bits=null,this.extra_base=0,this.elems=0,this.max_length=0,this.max_code=0},Me=function(e,t,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=o},$e=function(){this.next=null,this.len=0,this.ptr=new Array(d),this.off=0},Ne=new Array(0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0),Xe=new Array(0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13),Ke=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7),He=new Array(16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15),Ye=new Array(new Me(0,0,0,0),new Me(4,4,8,4),new Me(4,5,16,8),new Me(4,6,32,32),new Me(4,4,16,16),new Me(8,16,32,32),new Me(8,16,128,128),new Me(8,32,128,256),new Me(32,128,258,1024),new Me(32,258,258,4096)),Je=function(e){var t;if(e?e<1?e=1:e>9&&(e=9):e=i,L=e,f=!1,z=!1,null==Ue){for(h=w=g=null,Ue=new Array(d),j=new Array(s),k=new Array(ge),C=new Array(c+a),x=new Array(1<>>8):(et(255&e),et(e>>>8))},nt=function(){S=(S<>7)])},rt=function(e,t,n){return e[t].fcCe?F-Ce:be,d=F+l,s=j[i+c-1],u=j[i+c];B>=M&&(o>>=2);do{if(j[(t=e)+c]==u&&j[t+c-1]==s&&j[t]==j[i]&&j[++t]==j[i+1]){i+=2,t++;do{}while(j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&j[++i]==j[++t]&&ic){if(O=e,c=n,r){if(n>=l)break}else if(n>=$)break;s=j[i+c-1],u=j[i+c]}}}while((e=x[e&ve])>a&&0!=--o);return c},st=function(){var t,n,o=s-R-F;if(-1==o)o--;else if(F>=e+Ce){for(t=0;t=e?n-e:be);for(t=0;t=e?n-e:be;o+=e}z||((t=ct(j,F+R,o))<=0?z=!0:R+=t)},ut=function(){for(;0!=R&&null==w;){var e;if(nt(),T!=be&&F-T<=Ce&&(E=dt(T))>R&&(E=R),E>=u)if(e=It(F-O,E-u),R-=E,E<=q){E--;do{F++,nt()}while(0!=--E);F++}else F+=E,E=0,S=((S=255&j[F])<R&&(E=R),E==u&&F-O>je&&E--),B>=u&&E<=B){var e;e=It(F-1-D,B-u),R-=B-1,B-=2;do{F++,nt()}while(0!=--B);A=0,E=u-1,F++,e&&(xt(0),P=F)}else 0!=A?(It(0,255&j[F-1])&&(xt(0),P=F),F++,R--):(A=1,F++,R--);for(;Rw.len&&(i=w.len),r=0;ry-v&&(i=y-v),r=0;r>=7;ol&&(i=l,p++),a[n].dl=i,n>u||(G[i]++,r=0,n>=s&&(r=d[n-s]),c=a[n].fc,pe+=c*(i+r),null!=m&&(_e+=c*(m[n].dl+r)));if(0!=p){do{for(i=l-1;0==G[i];)i--;G[i]--,G[i+1]+=2,G[l]--,p-=2}while(p>0);for(i=l;0!=i;i--)for(n=G[i];0!=n;)(o=Q[--t])>u||(a[o].dl!=i&&(pe+=(i-a[o].dl)*a[o].fc,a[o].fc=i),n--)}},yt=function(e,t){var n,o,i=new Array(Ie+1),r=0;for(n=1;n<=Ie;n++)r=r+G[n-1]<<1,i[n]=r;for(o=0;o<=t;o++){var c=e[o].dl;0!=c&&(e[o].fc=Tt(i[c]++,c))}},vt=function(e){var t,n,o=e.dyn_tree,i=e.static_tree,r=e.elems,c=-1,a=r;for(ee=0,te=ze,t=0;t>1;t>=1;t--)gt(o,t);do{t=Q[xe],Q[xe]=Q[ee--],gt(o,xe),n=Q[xe],Q[--te]=t,Q[--te]=n,o[a].fc=o[t].fc+o[n].fc,ne[t]>ne[n]+1?ne[a]=ne[t]:ne[a]=ne[n]+1,o[t].dl=o[n].dl=a,Q[xe]=a++,gt(o,xe)}while(ee>=2);Q[--te]=Q[xe],ft(e),yt(o,c)},bt=function(e,t){var n,o,i=-1,r=e[0].dl,c=0,a=7,d=4;for(0==r&&(a=138,d=3),e[t+1].dl=65535,n=0;n<=t;n++)o=r,r=e[n+1].dl,++c=3&&0==Y[He[e]].dl;e--);return pe+=3*(e+1)+5+5+4,e},Ct=function(e,t,n){var o;for(St(e-257,5),St(t-1,5),St(n-4,4),o=0;o>3)<=(i=pe+3+7>>3)&&(i=r),a+4<=i&&P>=0)for(St((t<<1)+e,3),Dt(),tt(a),tt(~a),d=0;d2&&0==(4095&de)){var n,o=8*de,i=F-P;for(n=0;n>=3,se>=1}while(cPt-t?(tt(I|=e<>Pt-V,V+=t-Pt):(I|=e<>=1,n<<=1}while(--t>0);return n>>1},Dt=function(){V>8?tt(I):V>0&&et(I),I=0,V=0},At=function(){if(0!=y){var e,t;for(e=Ze(),null==w?w=g=e:g=g.next=e,e.len=y-v,t=0;t0;){var a=new Array(n);for(o=0;o256?e[256]:this.BMAX,_=e,h=0,l=t;do{k[_[h]]++,h++}while(--l>0);if(k[0]==t)return this.root=null,this.m=0,void(this.status=0);for(m=1;m<=this.BMAX&&0==k[m];m++);for(p=m,rl&&(r=l),y=1<0;)T[f++]=m+=_[h++];_=e,h=0,l=0;do{0!=(m=_[h++])&&(V[T[m]++]=l)}while(++l0;){for(;p>g+C[1+u];){if(g+=C[1+u],u++,v=(v=s-g)>r?r:v,(d=1<<(m=p-g))>c+1)for(d-=c+1,f=p;++ma&&g0&&(T[u]=l,x.b=C[u],x.e=16+m,x.t=w,m=(l&(1<>g-C[u],I[u-1][m].e=x.e,I[u-1][m].b=x.b,I[u-1][m].n=x.n,I[u-1][m].t=x.t)}for(x.b=p-g,h>=t?x.e=99:_[h]>g;m>=1)l^=m;for(l^=m;(l&(1<>=e,c-=e},F=function(n,o,i){var r,c,d;if(0==i)return 0;for(d=0;;){for(A(p),r=(c=l.list[E(p)]).e;r>16;){if(99==r)return-1;B(c.b),A(r-=16),r=(c=c.t[E(r)]).e}if(B(c.b),16!=r){if(15==r)break;for(A(r),s=c.n+E(r),B(r),A(_),r=(c=m.list[E(_)]).e;r>16;){if(99==r)return-1;B(c.b),A(r-=16),r=(c=c.t[E(r)]).e}for(B(c.b),A(r),u=t-c.n-E(r),B(r);s>0&&d0&&d1)return b=null,alert("HufBuild error: "+a.status),-1;n=a.root,i=a.m}return l=b,m=n,p=o,_=i,F(e,t,r)},R=function(e,t,n){var o,i,r,c,a,d,s,u,h,w=new Array(316);for(o=0;o286||u>30)return-1;for(i=0;ic)return-1;for(;i-- >0;)w[o++]=r}else if(17==i){if(A(3),i=3+E(3),B(3),o+i>c)return-1;for(;i-- >0;)w[o++]=0;r=0}else{if(A(7),i=11+E(7),B(7),o+i>c)return-1;for(;i-- >0;)w[o++]=0;r=0}if(h=new T(w,s,257,k,C,p=y),0==p&&(h.status=1),0!=h.status)return h.status,-1;for(l=h.root,p=h.m,o=0;o257?-1:(h.status,0!=h.status?-1:F(e,t,n))},U=function(){null==e&&(e=new Array(2*g)),t=0,r=0,c=0,a=-1,d=!1,s=u=0,l=null},q=function(n,o,i){var r,c;for(r=0;r0){if(a!=f)for(;s>0&&r0&&r0;){var r=new Array(t);for(n=0;n=0)return!0;break;case"not_include":if(o.indexOf(i)<0)return!0;break;case"start_with":if(0===o.indexOf(i))return!0;break;case"not_start_with":if(0!==o.indexOf(i))return!0;break;case"end_with":if(new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"not_end_with":if(!new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"regex":if(new RegExp(n).test(e))return!0}return!1}function encodeCondValue(e){try{return encodeURIComponent(decodeURIComponent(e))}catch(t){return e}}function findHtmlChild(e,t){return e?e.querySelectorAll(t.element)[t.nth-1]:null}function extractAttributeValue(e,t){return e.getAttribute(t.key)}function extractString(e,t){switch(t.extract_type||t.type){case"left":var n=t.extract_length||t.length;return e.slice(0,1*n);case"mid":var o=t.extract_start||t.start,i=t.extract_end||t.end;return e.substring(1*o-1,1*i);case"right":n=t.extract_length||t.length;return e.slice(-1*n);default:return e}}function encodeCookieValue(e){var t=encodeURIComponent(e);if(window.BdashRawDeflate&&window.BdashRawDeflate.deflate&&"function"==typeof window.BdashRawDeflate.deflate){var n=window.BdashRawDeflate.deflate(t);if(window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate)window.BdashRawDeflate.inflate(n)!==t&&(n=window.BdashRawDeflate.deflate(t,3));t=DEFLATED_PREFIX+n}return t=window.btoa(t)}function decodeCookieValue(e){try{var t=!1;0===e.indexOf("@")&&(t=!0,e=e.slice(1));var n,o=window.atob(e);return 0===o.indexOf(DEFLATED_PREFIX)&&(t=!0,o=o.slice(DEFLATED_PREFIX.length)),t&&window.BdashRawDeflate&&window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate&&(n=window.BdashRawDeflate.inflate(o)),decodeURIComponent(n||o)}catch(i){return e}}function shouldFetchCustomColumnOnPageview(e){var t=e.fetch_conditions;return!t||t.pageview.enabled}function shouldFetchCustomColumnOnClick(e,t){var n=e.fetch_conditions;if(!n)return!0;if(!n.click.enabled)return!1;if("all"===n.click.condition.target)return!0;var o=n.click.condition.element_conditions,i=t&&t.target;if(!i)return!1;for(var r=i.parentElement,c=0;cs.test(e[i.type]))}if(r.length){var u=r[i.nth?i.nth-1:0];if(i.child&&i.child.enabled&&(u=findHtmlChild(u,i.child)),u){if(i.attribute&&i.attribute.enabled)return extractAttributeValue(u,i.attribute)||"";var l=u.outerHTML,m=l.indexOf(">")+1,p=l.lastIndexOf("<");return extractString(l=l.substring(m,p),e.extract)}}}}function extractFromJs(e){return window[e.conditions[0].name]||""}function extractByCustomScript(conditions){var customValue="";return eval(conditions.custom_script),customValue}function extractFromSourceCode(e){switch(e.source_type){case"html":return extractFromHtml(e);case"javascript":return extractFromJs(e);case"others":return extractByCustomScript(e)}return""}function extractFromUrl(e){var t=e.urls&&e.urls[0]||{},n=t.matching,o=self.getCurrentPageUrl();if("regex"===n){var i=new RegExp(t.name),r=o.match(i);return r&&r[0]||""}return"extract"===n?extractString(o,t):""}function extractFromCookie(e){for(var t=e.name,n=e.values||[],o=self.getCookieValues(t),i=0;i=0},this.restoreCookieValue=function(e,t){return self.isEncodingCookie(e)?decodeCookieValue(t):t},this.getCookieValues=function(e){for(var t=[],n=document.cookie.split(";"),o=new RegExp("^\\s*"+e+"=\\s*(.*)\\s*$"),i=0;i0){for(var o=[],i=location.hostname.split("."),r=0;!t&&r=0||t.match(/\t|\n/))&&(t='"'+t+'"'),t}}var util=new BdashTagUtil;if(util){if(!util.isTargetDomain||"function"!=typeof util.isTargetDomain||util.isTargetDomain()){var toString64=function(e){for(var t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-",n="";e>0;)n=t.charAt(e%64)+n,e=Math.floor(e/64);return n},makeRandomNumber=function(e){return Math.round(Math.random()*e)},getIdFromLinker=function(){var e=function(e){var t=5,n=1*e,o=util.getUnixtimeSec();return n>o||o>=n+t},t=util.getCurrentPageUrl().match(/[?&#]_bdsid=([^&#]*)/),n="";if(t&&t[1]&&-1=0;r--){var c=i.slice(r).join("."),a=util.generateCookieStoreValue(e,c);if(util.setCookie(t,a,n,c,o))return window.BdashTagManager.Tracker.cookieDomain=c,!0}return window.BdashTagManager.Tracker.cookieDomain="failed",!1},createSessionId=function(e){return[e,(new Date).getTime()].join(".")},setSessionIdCookie=function(e){for(var t="_bdsid",n=18e5,o="/",i=location.hostname.split("."),r=i.length-1;r>=0;r--){var c=i.slice(r).join("."),a=util.generateCookieStoreValue(e,c);if(util.setCookie(t,a,n,c,o))return!0}return!1},setNewVisitorCookie=function(e,t){for(var n="_bdnvf",o="/",i=location.hostname.split("."),r=i.length-1;r>=0;r--){var c=i.slice(r).join("."),a=util.generateCookieStoreValue(e,c);if(util.setCookie(n,a,t,c,o))return!0}return!1},publishOrKeepVisitorIdAndSessionId=function(){var e=util.extractValueFromCookie("_bdck"),t=util.extractValueFromCookie("_bdsid"),n=getIdFromLinker();if(n){var o=n.split(".");t=n,e=[o[0],o[1]].join("."),"0"===getRepeaterFlagFromLinker()&&setNewVisitorCookie("",-1)}removeLinkerFromUrl(),e||(e=createVisitorId(),t=null),t||(t=createSessionId(e),window.BdashTagManager.Tracker.newSessionFlag="1"),setVisitorIdCookie(e),window.BdashTagManager.Tracker.vid=e,setSessionIdCookie(t),window.BdashTagManager.Tracker.sid=t;var i=util.extractValueFromCookie("_bdnvf");setNewVisitorCookie(i||t,63072e6),(i=util.extractValueFromCookie("_bdnvf"))===t&&(window.BdashTagManager.Tracker.repeaterFlag="0")};window.bdashFlags||(window.bdashFlags={}),window.BdashTagManager.Tracker={},publishOrKeepVisitorIdAndSessionId()}}else console.warn("BdashTagUtil is not found.")}()}}}(),templates.CmsEmbeddedVisitorTag=function(){return function(){this.fire=function(){!function(){function BdashTagUtil(){function matched(e,t,n){var o=encodeCondValue(e),i=encodeCondValue(n);switch(t){case"match":if(o===i)return!0;break;case"not_match":if(o!==i)return!0;break;case"include":if(o.indexOf(i)>=0)return!0;break;case"not_include":if(o.indexOf(i)<0)return!0;break;case"start_with":if(0===o.indexOf(i))return!0;break;case"not_start_with":if(0!==o.indexOf(i))return!0;break;case"end_with":if(new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"not_end_with":if(!new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"regex":if(new RegExp(n).test(e))return!0}return!1}function encodeCondValue(e){try{return encodeURIComponent(decodeURIComponent(e))}catch(t){return e}}function findHtmlChild(e,t){return e?e.querySelectorAll(t.element)[t.nth-1]:null}function extractAttributeValue(e,t){return e.getAttribute(t.key)}function extractString(e,t){switch(t.extract_type||t.type){case"left":var n=t.extract_length||t.length;return e.slice(0,1*n);case"mid":var o=t.extract_start||t.start,i=t.extract_end||t.end;return e.substring(1*o-1,1*i);case"right":n=t.extract_length||t.length;return e.slice(-1*n);default:return e}}function encodeCookieValue(e){var t=encodeURIComponent(e);if(window.BdashRawDeflate&&window.BdashRawDeflate.deflate&&"function"==typeof window.BdashRawDeflate.deflate){var n=window.BdashRawDeflate.deflate(t);if(window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate)window.BdashRawDeflate.inflate(n)!==t&&(n=window.BdashRawDeflate.deflate(t,3));t=DEFLATED_PREFIX+n}return t=window.btoa(t)}function decodeCookieValue(e){try{var t=!1;0===e.indexOf("@")&&(t=!0,e=e.slice(1));var n,o=window.atob(e);return 0===o.indexOf(DEFLATED_PREFIX)&&(t=!0,o=o.slice(DEFLATED_PREFIX.length)),t&&window.BdashRawDeflate&&window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate&&(n=window.BdashRawDeflate.inflate(o)),decodeURIComponent(n||o)}catch(i){return e}}function shouldFetchCustomColumnOnPageview(e){var t=e.fetch_conditions;return!t||t.pageview.enabled}function shouldFetchCustomColumnOnClick(e,t){var n=e.fetch_conditions;if(!n)return!0;if(!n.click.enabled)return!1;if("all"===n.click.condition.target)return!0;var o=n.click.condition.element_conditions,i=t&&t.target;if(!i)return!1;for(var r=i.parentElement,c=0;cs.test(e[i.type]))}if(r.length){var u=r[i.nth?i.nth-1:0];if(i.child&&i.child.enabled&&(u=findHtmlChild(u,i.child)),u){if(i.attribute&&i.attribute.enabled)return extractAttributeValue(u,i.attribute)||"";var l=u.outerHTML,m=l.indexOf(">")+1,p=l.lastIndexOf("<");return extractString(l=l.substring(m,p),e.extract)}}}}function extractFromJs(e){return window[e.conditions[0].name]||""}function extractByCustomScript(conditions){var customValue="";return eval(conditions.custom_script),customValue}function extractFromSourceCode(e){switch(e.source_type){case"html":return extractFromHtml(e);case"javascript":return extractFromJs(e);case"others":return extractByCustomScript(e)}return""}function extractFromUrl(e){var t=e.urls&&e.urls[0]||{},n=t.matching,o=self.getCurrentPageUrl();if("regex"===n){var i=new RegExp(t.name),r=o.match(i);return r&&r[0]||""}return"extract"===n?extractString(o,t):""}function extractFromCookie(e){for(var t=e.name,n=e.values||[],o=self.getCookieValues(t),i=0;i=0},this.restoreCookieValue=function(e,t){return self.isEncodingCookie(e)?decodeCookieValue(t):t},this.getCookieValues=function(e){for(var t=[],n=document.cookie.split(";"),o=new RegExp("^\\s*"+e+"=\\s*(.*)\\s*$"),i=0;i0){for(var o=[],i=location.hostname.split("."),r=0;!t&&r=0||t.match(/\t|\n/))&&(t='"'+t+'"'),t}}var util=new BdashTagUtil;if(util){var OPTIN_KEY="_bd4_optin_tracking_BD-E4X2CU";window.BdashTagManager.optinTracking=function(e){var t="/",n=location.hostname.split("."),o=63072e6;e&&(o=e);for(var i=n.length-1;i>=0;i--){var r,c=n.slice(i).join(".");if(util.setCookie(OPTIN_KEY,(new Date).getTime(),o,c,t))return window.BdashTagManager.Optin.tracking=!!util.getCookieValue(OPTIN_KEY),"function"==typeof Event?r=new Event("optin"):(r=document.createEvent("Event")).initEvent("optin",!0,!0),dispatchEvent(r),!0}},window.BdashTagManager.optoutTracking=function(){for(var e="/",t=location.hostname.split("."),n=t.length-1;n>=0;n--){var o=t.slice(n).join(".");window.BdashTagManager.Optin.tracking=!1,util.setCookie(OPTIN_KEY,"",-1,o,e)}var i=new Event("optout");return"function"==typeof Event?i=new Event("optout"):(i=document.createEvent("Event")).initEvent("optout",!0,!0),dispatchEvent(i),!0},window.BdashTagManager.Optin===undefined&&(window.BdashTagManager.Optin={}),window.BdashTagManager.Optin.tracking=!!util.getCookieValue(OPTIN_KEY),window.BdashTagManager.OptinMode=!1;var passVisitorIdToCmsEmbedded=function(){var e=util.extractValueFromCookie("_bdck");passValueToCmsEmbedded(e)},clearVisitorIdToCmsEmbedded=function(){passValueToCmsEmbedded("")},passValueToCmsEmbedded=function(e){var t=0,n={},o=setInterval(function(){searchAndPostValueToCmsEmbedded(e,n),++t>=10&&clearInterval(o)},1e3)},searchAndPostValueToCmsEmbedded=function(e,t){for(var n=document.querySelectorAll('[id^="bdash_embed_form_container_prd_1038_"]'),o=0;o=0)return!0;break;case"not_include":if(o.indexOf(i)<0)return!0;break;case"start_with":if(0===o.indexOf(i))return!0;break;case"not_start_with":if(0!==o.indexOf(i))return!0;break;case"end_with":if(new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"not_end_with":if(!new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"regex":if(new RegExp(n).test(e))return!0}return!1}function encodeCondValue(e){try{return encodeURIComponent(decodeURIComponent(e))}catch(t){return e}}function findHtmlChild(e,t){return e?e.querySelectorAll(t.element)[t.nth-1]:null}function extractAttributeValue(e,t){return e.getAttribute(t.key)}function extractString(e,t){switch(t.extract_type||t.type){case"left":var n=t.extract_length||t.length;return e.slice(0,1*n);case"mid":var o=t.extract_start||t.start,i=t.extract_end||t.end;return e.substring(1*o-1,1*i);case"right":n=t.extract_length||t.length;return e.slice(-1*n);default:return e}}function encodeCookieValue(e){var t=encodeURIComponent(e);if(window.BdashRawDeflate&&window.BdashRawDeflate.deflate&&"function"==typeof window.BdashRawDeflate.deflate){var n=window.BdashRawDeflate.deflate(t);if(window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate)window.BdashRawDeflate.inflate(n)!==t&&(n=window.BdashRawDeflate.deflate(t,3));t=DEFLATED_PREFIX+n}return t=window.btoa(t)}function decodeCookieValue(e){try{var t=!1;0===e.indexOf("@")&&(t=!0,e=e.slice(1));var n,o=window.atob(e);return 0===o.indexOf(DEFLATED_PREFIX)&&(t=!0,o=o.slice(DEFLATED_PREFIX.length)), t&&window.BdashRawDeflate&&window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate&&(n=window.BdashRawDeflate.inflate(o)),decodeURIComponent(n||o)}catch(i){return e}}function shouldFetchCustomColumnOnPageview(e){var t=e.fetch_conditions;return!t||t.pageview.enabled}function shouldFetchCustomColumnOnClick(e,t){var n=e.fetch_conditions;if(!n)return!0;if(!n.click.enabled)return!1;if("all"===n.click.condition.target)return!0;var o=n.click.condition.element_conditions,i=t&&t.target;if(!i)return!1;for(var r=i.parentElement,c=0;cs.test(e[i.type]))}if(r.length){var u=r[i.nth?i.nth-1:0];if(i.child&&i.child.enabled&&(u=findHtmlChild(u,i.child)),u){if(i.attribute&&i.attribute.enabled)return extractAttributeValue(u,i.attribute)||"";var l=u.outerHTML,m=l.indexOf(">")+1,p=l.lastIndexOf("<");return extractString(l=l.substring(m,p),e.extract)}}}}function extractFromJs(e){return window[e.conditions[0].name]||""}function extractByCustomScript(conditions){var customValue="";return eval(conditions.custom_script),customValue}function extractFromSourceCode(e){switch(e.source_type){case"html":return extractFromHtml(e);case"javascript":return extractFromJs(e);case"others":return extractByCustomScript(e)}return""}function extractFromUrl(e){var t=e.urls&&e.urls[0]||{},n=t.matching,o=self.getCurrentPageUrl();if("regex"===n){var i=new RegExp(t.name),r=o.match(i);return r&&r[0]||""}return"extract"===n?extractString(o,t):""}function extractFromCookie(e){for(var t=e.name,n=e.values||[],o=self.getCookieValues(t),i=0;i=0},this.restoreCookieValue=function(e,t){return self.isEncodingCookie(e)?decodeCookieValue(t):t},this.getCookieValues=function(e){for(var t=[],n=document.cookie.split(";"),o=new RegExp("^\\s*"+e+"=\\s*(.*)\\s*$"),i=0;i0){for(var o=[],i=location.hostname.split("."),r=0;!t&&r=0||t.match(/\t|\n/))&&(t='"'+t+'"'),t}}function setCustomColumnValues(e,t){for(var n=util.getCustomColumnValues(e,t),o=0;o=0;i--){var r,c=n.slice(i).join(".");if(util.setCookie(OPTIN_KEY,(new Date).getTime(),o,c,t))return window.BdashTagManager.Optin.tracking=!!util.getCookieValue(OPTIN_KEY),"function"==typeof Event?r=new Event("optin"):(r=document.createEvent("Event")).initEvent("optin",!0,!0),dispatchEvent(r),!0}},window.BdashTagManager.optoutTracking=function(){for(var e="/",t=location.hostname.split("."),n=t.length-1;n>=0;n--){var o=t.slice(n).join(".");window.BdashTagManager.Optin.tracking=!1,util.setCookie(OPTIN_KEY,"",-1,o,e)}var i=new Event("optout");return"function"==typeof Event?i=new Event("optout"):(i=document.createEvent("Event")).initEvent("optout",!0,!0),dispatchEvent(i),!0},window.BdashTagManager.Optin===undefined&&(window.BdashTagManager.Optin={}),window.BdashTagManager.Optin.tracking=!!util.getCookieValue(OPTIN_KEY),window.BdashTagManager.OptinMode=!1,util.isTargetDomain&&"function"==typeof util.isTargetDomain&&!util.isTargetDomain()||(!function(e,t,n,o){if(!e.bdash4){e.bdash4=function(){e.bdash4.queue.push(arguments)},e.bdash4.queue=[],e.bdash4.load=new Date;var i=t.createElement(n);i.type="text/javascript",i.async=!0,i.src=o;var r=t.getElementsByTagName(n)[0];r.parentNode.insertBefore(i,r)}}(window,document,"script","//cdn.activity.smart-bdash.com/tracking-script/bdash_log.js"),bdash4("create",{id:"BD-E4X2CU"}),setCustomColumnValues("pageview"),bdash4("addCallback",{type:"click",callback:function(e){setCustomColumnValues("click",e)}}),bdash4("send",{type:"pageview"}))}else console.warn("BdashTagUtil is not found.")}()}}}(),templates.SetCurrentPageTag=function(){return function(){this.fire=function(){!function(){function BdashTagUtil(){function matched(e,t,n){var o=encodeCondValue(e),i=encodeCondValue(n);switch(t){case"match":if(o===i)return!0;break;case"not_match":if(o!==i)return!0;break;case"include":if(o.indexOf(i)>=0)return!0;break;case"not_include":if(o.indexOf(i)<0)return!0;break;case"start_with":if(0===o.indexOf(i))return!0;break;case"not_start_with":if(0!==o.indexOf(i))return!0;break;case"end_with":if(new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"not_end_with":if(!new RegExp(i.replace(/[$()*+.[\]{}\\|^\\/,?]/g,"\\$&")+"$").test(o))return!0;break;case"regex":if(new RegExp(n).test(e))return!0}return!1}function encodeCondValue(e){try{return encodeURIComponent(decodeURIComponent(e))}catch(t){return e}}function findHtmlChild(e,t){return e?e.querySelectorAll(t.element)[t.nth-1]:null}function extractAttributeValue(e,t){return e.getAttribute(t.key)}function extractString(e,t){switch(t.extract_type||t.type){case"left":var n=t.extract_length||t.length;return e.slice(0,1*n);case"mid":var o=t.extract_start||t.start,i=t.extract_end||t.end;return e.substring(1*o-1,1*i);case"right":n=t.extract_length||t.length;return e.slice(-1*n);default:return e}}function encodeCookieValue(e){var t=encodeURIComponent(e);if(window.BdashRawDeflate&&window.BdashRawDeflate.deflate&&"function"==typeof window.BdashRawDeflate.deflate){var n=window.BdashRawDeflate.deflate(t);if(window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate)window.BdashRawDeflate.inflate(n)!==t&&(n=window.BdashRawDeflate.deflate(t,3));t=DEFLATED_PREFIX+n}return t=window.btoa(t)}function decodeCookieValue(e){try{var t=!1;0===e.indexOf("@")&&(t=!0,e=e.slice(1));var n,o=window.atob(e);return 0===o.indexOf(DEFLATED_PREFIX)&&(t=!0,o=o.slice(DEFLATED_PREFIX.length)),t&&window.BdashRawDeflate&&window.BdashRawDeflate.inflate&&"function"==typeof window.BdashRawDeflate.inflate&&(n=window.BdashRawDeflate.inflate(o)),decodeURIComponent(n||o)}catch(i){return e}}function shouldFetchCustomColumnOnPageview(e){var t=e.fetch_conditions;return!t||t.pageview.enabled}function shouldFetchCustomColumnOnClick(e,t){var n=e.fetch_conditions;if(!n)return!0;if(!n.click.enabled)return!1;if("all"===n.click.condition.target)return!0;var o=n.click.condition.element_conditions,i=t&&t.target;if(!i)return!1;for(var r=i.parentElement,c=0;cs.test(e[i.type]))}if(r.length){var u=r[i.nth?i.nth-1:0];if(i.child&&i.child.enabled&&(u=findHtmlChild(u,i.child)),u){if(i.attribute&&i.attribute.enabled)return extractAttributeValue(u,i.attribute)||"";var l=u.outerHTML,m=l.indexOf(">")+1,p=l.lastIndexOf("<");return extractString(l=l.substring(m,p),e.extract)}}}}function extractFromJs(e){return window[e.conditions[0].name]||""}function extractByCustomScript(conditions){var customValue="";return eval(conditions.custom_script),customValue}function extractFromSourceCode(e){switch(e.source_type){case"html":return extractFromHtml(e);case"javascript":return extractFromJs(e);case"others":return extractByCustomScript(e)}return""}function extractFromUrl(e){var t=e.urls&&e.urls[0]||{},n=t.matching,o=self.getCurrentPageUrl();if("regex"===n){var i=new RegExp(t.name),r=o.match(i);return r&&r[0]||""}return"extract"===n?extractString(o,t):""}function extractFromCookie(e){for(var t=e.name,n=e.values||[],o=self.getCookieValues(t),i=0;i=0},this.restoreCookieValue=function(e,t){return self.isEncodingCookie(e)?decodeCookieValue(t):t},this.getCookieValues=function(e){for(var t=[],n=document.cookie.split(";"),o=new RegExp("^\\s*"+e+"=\\s*(.*)\\s*$"),i=0;i0){for(var o=[],i=location.hostname.split("."),r=0;!t&&r=0||t.match(/\t|\n/))&&(t='"'+t+'"'),t}}var util=new BdashTagUtil;util?window.addEventListener("load",function(){for(var e=util.getCurrentPageUrl(),t="_bd_prev_page_ex",n=18e5,o="/",i=location.hostname.split("."),r=i.length-1;r>=0;r--){var c=i.slice(r).join("."),a=util.generateCookieStoreValue(e,c);if(util.setCookie(t,a,n,c,o))return!0}return!1}):console.warn("BdashTagUtil is not found.")}()}}}(),templates.PageViewTrigger=function(){this.setUp=function(e){e({event:"btm.PageView"})}},window.BdashTagManager.addContainer({id:"container_id",triggerConfigs:[{id:1,triggerKey:"PageViewTrigger"}],tagConfigs:[{id:2,fireTriggerIds:[1],tagKey:"UtilTag"},{id:3,fireTriggerIds:[1],tagKey:"VisitorSessionTag"},{id:4,fireTriggerIds:[1],tagKey:"CmsEmbeddedVisitorTag"},{id:5,fireTriggerIds:[1],tagKey:"AccessLogTag"},{id:6,fireTriggerIds:[1],tagKey:"SetCurrentPageTag"}]},templates)}();