(function(){function l(a){var b="";switch(a.source){case "url":b=""+window.location;break;case "title":b=document.title;break;case "html":b=(b=document.querySelector(a.selector))?b.textContent:"";break;case "attribute":b=(b=document.querySelector(a.selector))&&b.hasAttribute(a.attribute)?b.getAttribute(a.attribute):"";break;case "script":if("segment-decrement"==a.purpose){var d=document.createElement("script");d.innerHTML=a.selector;document.head.appendChild(d)}else b=eval(a.selector)}a.match&&(b=
(!1===a.case?new RegExp(a.match,"i"):new RegExp(a.match)).test(b)?b:"");a.search&&a.replace&&(b=b.replace(!1===a.case?new RegExp(a.search,"i"):new RegExp(a.search),a.replace));return b}function m(a,b){if(!b){if(a.click){b=document.querySelectorAll(a.click);if(!b||0===b.length)return;for(var d=0;d<b.length;d++)b[d].addEventListener("click",function(){m(a,l(a));n()},!1);return}b=l(a);if(!b)return}switch(a.purpose){case "data":g||(g={});g[a.attribute]=b;break;case "product-id":f.id=b;break;case "product-meta":f.meta||
(f.meta={});f.meta[a.attribute]=b;break;case "segment-decrement":c[a.segment]?--c[a.segment]:c[a.segment]=-1;break;default:c[a.segment]?++c[a.segment]:c[a.segment]=1}}function p(a){var b=[];if(!a)return null;for(var d in a)a.hasOwnProperty(d)&&b.push(encodeURIComponent(d+"\x3d"+a[d]));return b.join(";")}function k(a){for(var b=new Image(1,1),d=[e.config.dmp],c=0;c<a.length;c++)d.push(a[c]);b.onload=function(){};b.src=d.join("/")+"?rnd\x3d"+(Math.random()+Date.now())}function n(){if(c!=={})for(var a in c)if(c.hasOwnProperty(a)){var b=
"";0===c[a]?b="--":0>c[a]&&(b="-");k(["seg",b+a])}f.id&&(a=["prod",e.config.id,f.id],f.meta&&a.push(p(f.meta)),k(a));g&&k(["data",e.config.id,p(g)]);h&&1<h.length&&k(["match",h[0],h[1]])}var e={config:{"u":"2367cdfd-b79d-4574-b9d9-3499f686640c","rules":[{"id":19,"tracker_id":23,"position":1,"purpose":"product-id","segment_id":null,"segment":null,"click":null,"source":"url","selector":"","attribute":null,"match":"[^\\?]*\\/([0-9]+)(\\?.*)?$","search":"[^\\?]*\\/([0-9]+)(\\?.*)?$","replace":"$1","created_at":"2018-01-29 09:35:40","updated_at":"2018-01-29 09:35:40"}],"id":"47","dmp":"https://dmp.cabla.to"}},c={},f={id:null},h=null,g=null;(function(){function a(){window.__cbuid=e.config.u;for(var a=!0;a;)if(a=(window.cablato_data||[]).shift(1)){a=Array.prototype.slice.call(a);switch(a.shift(1)){case "advertiser":if(0>=a.length)break;e.config.id=a.shift(1);break;case "dmp":if(0>=a.length)break;
e.config.dmp=a.shift(1);break;case "rule":if(0>=a.length)break;0===e.config.rules.length&&e.config.rules.push(a.shift(1));break;case "rules":for(a=0;a<e.config.rules.length;a++)m(e.config.rules[a]);break;case "match":if(1>=a.length)break;h=[a.shift(1),a.shift(1)];break;case "product":if(0>=a.length)break;f.id=a.shift(1);0<a.length&&(f.meta=a.shift(1));break;case "push":if(0>=a.length)break;g=a.shift(1);break;case "conversion":0>=a.length||(a.shift(1),0<a.length&&a.shift(1),0<a.length&&a.shift(1))}a=
!0}else n(),a=!1}if("complete"===document.readyState)a();else var b=setInterval(function(){"complete"===document.readyState&&(clearInterval(b),a())},100)})();"19"===e.config.id&&("undefined"===typeof utag_data&&(utag_data={}),utag_data.cablatoID=e.config.u)})();
