/** * @version v6.18.0 * @copyright Copyright 2016 Krux Digital, Inc. All Rights Reserved. */ !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var r,i,o,s;null==(i=null!=window.Krux?window.Krux:window.Krux=function(){window.Krux.q.push(arguments)}).q&&(i.q=[]),r=window.Krux,o=n(2),s=/kxdebug=?(trace|debug|info|warn|error|silent)?/.exec(window.document.cookie),s?s[1]?o.setDefaultLevel(s[1]):o.setDefaultLevel("debug"):o.setDefaultLevel("silent"),r.commit&&!r.ns||(null==r.commit&&(r.commit=1),t.exports=window.Krux=function(t,e){var i,o,s;if(null==e.params&&(e.params={}),o=e.params.control_tag_namespace,window.Krux=r,i=n(3).init(o,function(){return n(58).call}))switch(!1){case"proxy"!==(null!=(s=r.q[0])?s[0]:void 0):r.q.shift(),n(31).server(e);break;case"marketer"!==e.params.client_type:n(68).init(i,e);break;default:n(93).init(i,e)}})},function(t,e,n){var r,i;!function(o,s){"use strict";r=s,i="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return typeof console!==a&&(void 0!==console[t]?e(console,t):void 0!==console.log?e(console,"log"):s)}function e(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function n(t,e,n){return function(){typeof console!==a&&(r.call(this,e,n),this[t].apply(this,arguments))}}function r(t,e){for(var n=0;n=0&&e<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(c=e,n!==!1&&o(e),r.call(l,e,t),typeof console===a&&e=0&&o0?0:a-1;return arguments.length<3&&(i=n[s?s[u]:u],u+=t),e(n,r,i,s,u,a)}}function o(t){return function(e,n,r){n=E(n,r);for(var i=N(e),o=t>0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(d.call(r,s,a),x.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=A};x.each=x.forEach=function(t,e,n){e=k(e,n);var r,i;if(R(t))for(r=0,i=t.length;r=0},x.invoke=function(t,e){var n=d.call(arguments,2),r=x.isFunction(e);return x.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=R(t)?t:x.values(t);for(var a=0,u=t.length;ao&&(o=r)}else e=E(e,n),x.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},x.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=R(t)?t:x.values(t);for(var a=0,u=t.length;ar||void 0===n)return 1;if(ne?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(u,l)),o}},x.debounce=function(t,e,n){var r,i,o,s,a,u=function(){var c=x.now()-s;c=0?r=setTimeout(u,e-c):(r=null,n||(a=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=x.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(a=t.apply(o,i),o=i=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},x.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},x.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},x.once=x.partial(x.before,2);var P=!{toString:null}.propertyIsEnumerable("toString"),D=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(v)return v(t);var e=[];for(var n in t)x.has(t,n)&&e.push(n);return P&&a(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var n in t)e.push(n);return P&&a(t,e),e},x.values=function(t){for(var e=x.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},U=x.invert(B),j=function(t){var e=function(e){return t[e]},n="(?:"+x.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};x.escape=j(B),x.unescape=j(U),x.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),x.isFunction(r)?r.call(t):r};var F=0;x.uniqueId=function(t){var e=++F+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+K[t]};x.template=function(t,e,n){!e&&n&&(e=n),e=x.defaults({},e,x.templateSettings);var r=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,a){return o+=t.slice(i,a).replace(z,H),i=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,x)},u=e.variable||"obj";return a.source="function("+u+"){\n"+o+"}",a},x.chain=function(t){var e=x(t);return e._chain=!0,e};var Y=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var n=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),Y(this,n.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];x.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Y(this,n)}}),x.each(["concat","join","slice"],function(t){var e=l[t];x.prototype[t]=function(){return Y(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return x}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(this)},function(t,e,n){t.exports=function(t){switch(t){case"data":return n(6);case"dom":return n(10);case"events":return n(7);case"feature":return n(13);case"http":return n(14);case"json":return n(9);case"ns":return n(3);case"pixel":return n(24);case"routes":return n(58);case"scrape":return n(57);case"segments":return n(29);case"sha1":return n(40);case"sizzle":return n(10);case"sniff":return n(12);case"store":return n(18);case"tag":return n(60);case"test":return n(28);case"underscore":return n(4);case"util":return n(8);default:return}}},function(t,e,n){var r,i,o,s,a,u,c,l={}.hasOwnProperty;r=n(4),i=n(7),c=n(8),e.root=a={},o=function(t){return/_/.test(t)?t:"_"+t},e.get=function(t,e){var n;return null!=(n=a[o(t)])?n:e},e.set=function(t,n){var o,s,a;return r.isString(t)?(s=u(t,n),i.fire("data:change",{key:t,value:s}),s):function(){var n;n=[];for(o in t)l.call(t,o)&&(a=t[o],n.push(e.set(o,a)));return n}()},e.setSilently=u=function(t,e){return a[o(t)]=e},e.remove=function(t){delete a[t]},e.append=function(t,n){var i,s,a;return r.isString(t)?(t=o(t),s=null!=e.get(t)?e.get(t):[],r.isArray(s)||(s=[s]),s.push(n),e.set(t,r.uniq(s))):function(){var n;n=[];for(i in t)l.call(t,i)&&(a=t[i],n.push(e.append(i,a)));return n}()},e.raw=function(){return a},e.namespace=s=function(t,n){var r,o,s,u;return s=t+"_",u=new RegExp(s+"(.+)"),r=c.attributes({get:function(t){return e.get(s+t)},set:function(t,n){return e.set(s+t,n)},all:function(){var t,e,n,r;n={};for(t in a)l.call(a,t)&&(r=a[t],e=t.match(u),null!=e&&(n[e[1]]=r));return n},values:n}),o=void 0,r.change=function(t){o||(o=[],i.on("data:change",function(e){var n,r;if(u.test(e.key))for(n=0,r=o.length;no;r=0<=o?++i:--i)n=t.charCodeAt(r),e+=function(){switch(!1){case!(n<256):return 1;case!(n<65536):return 2;case!(n<16777216):return 3;default:return 4}}();return 2*e},e.rate=function(t){return Math.random()<=t},e.cleanEmail=function(t){return null==t&&(t=""),t.toLowerCase().replace(/\s+/g,"").replace(/\+[^@]+@gmail/,"@gmail").replace(/\+[^@]+@googlemail/,"@googlemail")},e.numberToRangeBucket=function(t,e,n,r){var i,o;return null==n&&(n=0),null==r&&(r=1/0),tr?r+"+":(i=e*Math.ceil(t/e),o=i-e,o+"-"+i)},e.collapse=function(t,e,n){var i;return null==e&&(e="."),null==n&&(n=10),i=function(t,o,s,a){var u,c;switch(null==s&&(s={}),null==a&&(a=n),!1){case!(a<0):break;case!!r.isObject(t):s[o]=t;break;default:for(u in t)c=t[u],null!=c&&i(c,""+(null!=o?o+e:"")+u,s,a-1)}return s},r.isObject(t)?i(t):{}}},function(t,e){e.stringify=function(t,e){return null==e&&(e=""),null!=t?window.JSON.stringify(t):e},e.parse=function(t,e){return null==e&&(e={}),null!=t&&""!==t?window.JSON.parse(t):e}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,E,S,T,O,A,N,R,I,C,M,P,D,L,B,U,j,F,q={}.hasOwnProperty,K=function(t,e){return function(){return t.apply(e,arguments)}},z=[].slice;for(a=n(4),d=n(7),k=n(11),S=n(9),M=n(12),U=n(8),D=[k,M],o="ready",i="load",r=window.document.documentElement.attachEvent?"attachEvent":"addEventListener",x=0,O=D.length;x"),e;if(e(">"),"string"==typeof o)e(o);else for(c=0,l=o.length;c"),e},h=function(t,e,n){var r;return null==e&&(e={}),null==n&&(n=[]),r="string"!=typeof t?t:{tagName:t,attributes:e,children:n},F(r).data()},b=function(t){var e;return e=window.document.createElement("div"),e.innerHTML=t,e.childNodes},w=function(t){return b(t)[0]},e.byId=function(t){return(null!=t?t.nodeType:void 0)?t:window.document.getElementById(t)},e.head=y=function(t){return null==t&&(t=window.document),t.head||t.getElementsByTagName("head")[0]},e.document=function(t){return t.document||t.ownerDocument||t},e.window=function(t){var n,r;return n=e.document(t),null!=(r=n.parentWindow)?r:n.defaultView},e.create=e.createElement=function(){var t;return t=1<=arguments.length?z.call(arguments,0):[],w(h.apply(null,t))},e.remove=R=function(t){t.parentNode.removeChild(t)},e.isNode=function(t){return!!t.nodeType},e.before=f=function(t,e){t.parentNode.insertBefore(e,t)},e.append=c=function(t,e){t.appendChild(e)},e.after=function(t,e){var n;return n=t.nextSibling,n?f(n,e):c(t.parentNode,e)},e.prepend=function(t,e){var n;return n=t.firstChild,n?f(n,e):c(t,e)},e.insert=function(t,n,r){return 3===arguments.length?e[t](n,r):(r=t,f(window.document.getElementsByTagName("script")[0],r))},e.replace=function(t,e){return f(t,e),R(t)},e.scriptEval=function(t){var e;e=window.document.createElement("script"),e.text=t,y(window.document).appendChild(e)},e.winEval=function(t,e){var n;return t.kxeval||(n="(function(){,\n var win = this;,\n win.kxeval = win.execScript ? ,\n function(expr){return win.execScript(expr);} :,\n function(expr){return win.eval(expr);};,\n})();",t.execScript?t.execScript(n):t.eval(n)),t.kxeval(e)},e.childElements=function(t){var e,n,r,i,o;for(n=[],o=t.childNodes,r=0,i=o.length;r-1||M.ie&&M.version<8||M.ff&&M.version<4||!window.document.readyState||function(){var t;try{return null==(null!=(t=window.JSON)&&"function"==typeof t.parse?t.parse("true"):void 0)}catch(t){return!0}}()||null==window.document.querySelectorAll},e.init=a.once(function(){var t;if(/^(complete|loaded)$/.test(window.document.readyState))g(i)();else{if(M.ie){u(window,i,g(o)),t=!1;try{t=null==window.frameElement}catch(t){}window.document.documentElement.doScroll&&t&&p()}for(N in C)q.call(C,N)&&(L=C[N],u(L.target,L.nativeName,g(N)))}window.setTimeout(function(){return g(i)({timedout:!0})},6e3)})},function(t,e,n){var r,i,o,s;i=n(4),s=n(10),o={target:null,targetAction:"append",html:"",attr:{}},e.IFrame=r=function(){function t(t){this.options=i.extend({},o,t||{}),this.node=s.createElement("iframe",this.options.attr),"function"==typeof this.options.onload&&s.onload(this.node,this.options.onload),this.insert(),this.options.attr.src&&!this.options.html||this.html(this.options.html||"")}return t.prototype.insert=function(){var t,e,n;e=this.options,t=e.targetAction,n=e.target||window.document.body,s.insert(t,n,this.node)},t.prototype.html=function(t){var e;e=this.doc(),t.match(/^/)||(t=""+t+""),e.open(),e.write(t),e.close()},t.prototype.win=i.memoize(function(t){return t.contentWindow}),t.prototype.doc=i.memoize(function(e){try{return t.window(e).document}catch(t){}}),t}()},function(t,e,n){var r,i,o,s,a;o=n(4),a=n(8),i="0",r={CHROME:"Chrome",EDGE:"Edge",FIREFOX:"Firefox",IE:"IE",OPERA:"Opera",OTHER:"Other",PHANTOM:"Phantom",SAFARI:"Safari"},s=function(t,e){var n,s,u,c,l,f,h,p,d,g;return null==t&&(t=null!=(d=window.navigator)?d.userAgent:void 0),null==e&&(e=window.navigator),f=function(e){var n;switch(null==e&&(e=t),n=o.partial(a.matchAll,e),!1){case!n("Edge"):return r.EDGE;case!(n("Chrome","OPR")||n("Presto")):return r.OPERA;case!(n("Chrome")||n("CriOS")):return r.CHROME;case!(n("Trident","Windows")||n("MSIE")):return r.IE;case!n("PhantomJS"):return r.PHANTOM;case!((n("Safari","like Gecko")||n("iPhone")||n("iPad"))&&!n("Linux")&&n("KHTML")):return r.SAFARI;case!n("Gecko","Firefox"):return r.FIREFOX;default:return r.OTHER}},p=function(e,n){var o;switch(null==n&&(n=t),o=function(t){var e;return null!=(e=n.match(t))?e[1]:void 0},!1){case e!==r.EDGE:return o(/Edge\/(\d+)/i);case e!==r.SAFARI:return o(/Version\/(\d+)/i);case e!==r.CHROME:return o(/(?:Chrome|CriOS)\/(\d+)/i);case e!==r.IE:return o(/(?:MSIE\s|rv:)(\d+)/i);case e!==r.FIREFOX:return o(/Firefox\/(\d+)/);case e!==r.OPERA:return o(/(?:OPR|Version)\/(\d+)/);case e!==r.PHANTOM:return o(/(?:PhantomJS)\/(\d+)/);default:return i}},h=function(){var t,n,r,i,o;for(i=["language","systemLanguage","browserLanguage","userLanguage"],t=0,r=i.length;t0?t+"?"+e.join("&"):t},f=i.compose(function(t){return t.length>e.maxUrlLength},m),a=function(t,e){return[r+"="+e].concat(t)},s=function(t){return t+"&pageview=false"},o=function(t){return n(17).init().get("params.first_party_uid",!1)&&!l.hasThirdPartyCookies()&&(null==t.data&&(t.data={}),t.data._kuid=u.get("user")),t},e.srcs=_=function(t){var e,n,r,o,s,u,c,l,h,d,g,_,v;if(t=i.clone(t),_=t.url=t.url||"no_url",h=y.v4(),g=i.partial(m,_),n=i.partial(f,_),c=function(){var e,n;e=t.data,n=[];for(o in e)w.call(e,o)&&(v=e[o],null!=v&&""!==v&&n.push(p(o,v)));return n}(),t.noClip)return[g(c)];for(e=function(t,r){var i;for(r=r||[],i=[],t=a(t,h);n(t)&&t.length;)i.push(t.pop());return r.push(t),i.length>0&&t.length>0?e(i,r):(1===r.length&&r[0].shift(),r)},l=e(c),d=[],r=0,s=l.length;r1&&c.fire("http:error",{code:"overflow",message:"Too many params for a single URL (max = "+e.maxUrlLength+").\nUsing first URL chunk; use http#srcs instead to handle long URLs"}),i.head(n)},e.willClip=function(t){var n;return n=e.src(i.extend({noClip:!0},t)),n.length>e.maxUrlLength&&n.length-e.maxUrlLength},e.pixel=function(t){var n,r,i,a,u;try{for(a=_(o(t)),n=r=0,i=a.length;r0?s(u):u);c.fire("http:pixel",t)}catch(t){}},e.createImage=function(t){return(new Image).src=t},e.ping=function(t){var n,r,i,s;try{r=o(t),i=function(){var t,e;t=r.data,e=[];for(n in t)w.call(t,n)&&(s=t[n],null!=s&&""!==s&&e.push(p(n,s)));return e}(),e.createImage(m(r.url,i))}catch(t){}},e.jsonp=function(t){return n(23).call(o(t))},e.clearRequestList=function(){return n(23).clear()}},function(t,e,n){function r(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[r+i++]=c[t])});i<16;)e[r+i++]=0;return e}function i(t,e){var n=e||0,r=u;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function o(t,e,n){var r=e&&n||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:p,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:g+1,c=a-d+(u-g)/1e4;if(c<0&&void 0===t.clockseq&&(s=s+1&16383),(c<0||a>d)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=a,g=u,p=s,a+=122192928e5;var l=(1e4*(268435455&a)+u)%4294967296;o[r++]=l>>>24&255,o[r++]=l>>>16&255,o[r++]=l>>>8&255,o[r++]=255&l;var f=a/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var _=t.node||h,m=0;m<6;m++)o[r+m]=_[m];return e?e:i(o)}function s(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var s=0;s<16;s++)e[r+s]=o[s];return e||i(o)}for(var a=n(16),u=[],c={},l=0;l<256;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=a(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],p=16383&(f[6]<<8|f[7]),d=0,g=0,_=s;_.v1=o,_.v4=s,_.parse=r,_.unparse=i,t.exports=_},function(t,e){(function(e){var n;if(e.crypto&&crypto.getRandomValues){var r=new Uint8Array(16);n=function(){return crypto.getRandomValues(r),r}}if(!n){var i=new Array(16);n=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}t.exports=n}).call(e,function(){return this}())},function(t,e,n){var r,i,o,s,a,u,c,l=function(t,e){return function(){return t.apply(e,arguments)}},f=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty,p=[].slice;o=n(4),a=n(9),u=n(18),i=n(22),c=n(8),r=function(t){function e(){this._pointerPair=l(this._pointerPair,this),this._makeWatchers=l(this._makeWatchers,this),this.toString=l(this.toString,this),this.toJSON=l(this.toJSON,this),this.destroy=l(this.destroy,this),this.persist=l(this.persist,this),this.has=l(this.has,this),this.remove=l(this.remove,this),this.set=l(this.set,this),this.get=l(this.get,this),e.__super__.constructor.apply(this,arguments),this._handles=[],this._persisted=[],this._defaults={confid:"no-confid"}}return f(e,t),e.prototype.get=function(t,e){var n,r;if(n=this._pointerPair(t),r=o.isString(n[1])?c.deref(n[0],n[1]):n[0],o.isString(r)){if(/^\d{1,12}$/.test(r))return Number(r);if(/^(true|false)$/.test(r))return"true"===r}return null!=r?r:e},e.prototype.set=function(t,e){var n,r;return r=this._pointerPair(t),o.isString(r[1])?(n=c.deref(r[0],r[1]),r[0][r[1]]=e,this._fire("set",t,n,e)):i.prototype.set.apply(this,arguments),this},e.prototype.remove=function(t){var e,n;return n=this._pointerPair(t),o.isString(n[1])?(e=c.deref(n[0],n[1]),delete n[0][n[1]],this._fire("remove",t,e,void 0)):i.prototype.remove.apply(this,arguments),this},e.prototype.has=function(t){return e.__super__.has.call(this,t)||null!=this.get(t)},e.prototype.persist=function(){var t,e,n,r,i,s;return e=1<=arguments.length?p.call(arguments,0):[],e=o.difference(e,this._persisted),n=function(t){return function(e){t.has(e,!0)&&u.set(e,t.get(e))}}(this),e=function(){var i,s,a;for(a=[],i=0,s=e.length;i0&&!this._has(t)&&(o=t.split("."),s=o[0],e=!0),a=i.prototype.get.call(this,s),e&&(r=o.slice(1,o.length-1).join("."),r&&(a=c.deref(a,r)),n=o.pop()),[a,n]},e}(i),s=void 0,e.Config=r,e.init=function(t){return!t&&s||(s=new r(t)),s},e.get=function(t,n){return e.init().get(t,n)},e.set=function(t,n){return e.init().set(t,n)},e.remove=function(t){return e.init().remove(t)},e.has=function(t){return e.init().has(t)}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,E,S,T,O=[].slice;i=n(4),l=n(7),h=n(13),_=n(9),w=n(3),k=n(19),E=n(8),S=n(20),v=function(){try{return window.localStorage}catch(t){return c=t,null}}(),T=["set","get","remove","count","namespace"],f=T.concat(["clear","count","forEach"]),e.whitelist=S.init(S.ALL),e.allowAll=i.bind(e.whitelist.allowAll,e.whitelist),e.allowNone=i.bind(e.whitelist.allowNone,e.whitelist),e.allowOnly=i.bind(e.whitelist.allowOnly,e.whitelist),e.SECONDS=k.SECONDS,e.MINUTES=k.MINUTES,e.HOURS=k.HOURS,e.DAYS=k.DAYS,e.READY_EVENT=r="store:ready",x=function(t){return new Date(i.now()+1e3*t)},o=function(t){return e.prefix&&0!==t.indexOf(e.prefix)&&(t=e.prefix+t),t},b=function(t){return e.prefix?t.replace(new RegExp("^"+e.prefix),""):t},u={domain:function(t){return"; domain="+t}},d=function(t){return e.whitelist.has(b(t))||e.whitelist.has(t)},e.cookie=a={_COOKIE_START:"(?:^|\\s|;)",set:function(t,e,n,r){return d(t)?a._set.apply(a,arguments):""},get:function(t,e){var n,r,i;return null==e&&(e=""),i=""+a._COOKIE_START+t+"=([^;]*)",n=null!=(r=window.document.cookie)?r.match(i):void 0,null!=n?window.decodeURIComponent(n[1]):e},count:function(t,e,n){return null==e&&(e=1),null==n&&(n=k.endOfDay()),a.set(t,Number(a.get(t,0))+e,n)},remove:function(t,e){null==e&&(e={}),a._set(t,0,-1,e)},namespace:function(t){var e,n;return e={},n=new RegExp(""+a._COOKIE_START+t+"([^=]*)=([^;]*)","g"),window.document.cookie.replace(n,function(t,n){e[decodeURIComponent(t)]=decodeURIComponent(n)}),e},forEach:function(t){return null==t&&(t=function(t,e){}),m.until(function(e,n){return t(e,n),!1})},until:function(t){var n,r,i,o,s,a,u;for(null==t&&(t=E.yes),s=window.document.cookie.split(/\s*;\s*/),n=0,i=s.length;n',window.document.write(t),this},t.prototype.send=function(){return this.time={start:new Date},this.inline?this.sendInline():e.createScript(this.src),this},t.clear=function(){return t.all=[]},t}(),e.call=function(t){return new r(t).send()},e.clear=r.clear},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,E,S={}.hasOwnProperty;i=n(4),a=n(17),c=n(10),u=n(6),l=n(7),f=n(13),g=n(14),_=n(2),m=n(25),b=n(12),x=n(18),E=n(28),r=window.Krux,e.sendImpl=y=function(t){var e,n,r,i,o;n={};for(e in t)S.call(t,e)&&(o=t[e],(o=h(e,o))&&(n[e]=o));i=u.get("config_param_control_tag_pixel_throttle"),r=100*Math.random(),i&&i0))return m.fetch()},500))},e.stringifyValue=k=function(t){var e;return null==t&&(t=""),i.isArray(t)?function(){var n,r,i;for(i=[],n=0,r=t.length;n3e4?-1:n},i.extend(R,{t_navigation_type:O.type,t_dns:p("domainLookup"),t_tcp:p("connect"),t_http_request:p("request"),t_http_response:p("response"),t_content_ready:p("navigationStart","domInteractive"),t_window_load:p("navigationStart","loadEventStart"),t_redirect:p("redirect")})),F=n(57),H=l.happened("user_data_response"),A=n(3),v=A.isDefault?r:r[A.name]||{},i.extend(R,{interchange_ran:v.hasOwnProperty("user"),store_user:v.user,store_segs:v.segments,dart_user:F.dart("u"),dart_segs:F.dart("ksgmnt")||F.dart("ksg"),userdata_was_requested:!!l.happened("user_data_request"),userdata_did_respond:!!H,store_user_after:x.get("user"),store_segs_after:x.get("segs")}),T=window.location.href.split("#")[0],h=F.link_rel("canonical")||F.opengraph("url")||T,T!==h&&(R._kurl_=h),H&&i.extend(R,{userdata_user:[H.kuid,H.kuid_long],userdata_segs:[].concat(function(){var t,e;t=H.segments,e=[];for(c in t)S.call(t,c)&&($=t[c],e.push($));return e}())}),N=x.get("org_user_id"),null!=N&&""!==N?(_.info("Found org_user_id existy. Adding '_kuid="+N+"' to pixel."),i.extend(R,{_kuid:N})):a.get("params.target_fingerprint",!1)&&!f.hasThirdPartyCookies()&&(_.info("Found target_fingerprint param truthy and no third party cookies. Adding _kuid="+u.get("fp_id")),i.extend(R,{_kuid:u.get("fp_id")})),a.get("params.no_pii",!1)?(_.info("Found no_pii param truthy. Adding browser_bucket="+b.browser+", browser_version="+b.version),i.extend(R,{browser_bucket:b.browser,browser_version:b.version})):a.get("params.fingerprint",!1)&&(g=u.get("fp"),m=u.get("fp_id"),_.info("Found fingerprint param truthy. Adding kfuid="+m+", kxfp="+g),i.extend(R,{kfuid:m,kxfp:g})),D={user:"_kua_",page:"_kpa_"};for(z in D){I=D[z],L=u[z+"_attr"]();for(k in L)Y=L[k],R[I+k]=Y}try{j=window.sessionStorage}catch(t){d=t,j=null}if(j)try{R.sview=j.krux_views=+(j.krux_views||0)+1}catch(t){}for(B=u.get("tags"),y=w=0,E=B.length;w=10)&&(t=O.deref("doNotTrack"),null==t&&(t=O.deref("navigator.doNotTrack")),/(?:yes|1)/i.test(t))},e.isOptOut=_=function(){return Boolean(y||c.get("dnt",!1)||S()||g())},e.storeKuid=E=function(t){var e,n;null==t&&(t=l.get("user")||("function"==typeof k.get?k.get("kuid"):void 0)),n="function"==typeof k.get?k.get("org_user_id"):void 0,y||null==t&&!n||(l.set("user",n||t),e=function(){switch(!1){case""===n:return n;case!c.get("params.dfp_premium",!1):return a.fromShort(t).toLongId();default:return t}}(),"function"==typeof k.set&&k.set("user",e,s),"function"==typeof k.set&&k.set("kuid",t,s),x.timeDeltaOnce("set_kuid"),f.fire(i.USER_UPDATE,{kuid:e,short:t,long:a.fromShort(t).toLongId()}))},e.handler=function(t){var e;f.fire(i.RESPONSE,t),e=t._kuid_||t.kuid,t.optout||/^(?:OPTOUT|DNT)$/i.test(t._kuid_||"")?v():null!=t&&null==(null!=t?t.optout:void 0)&&null==e||v(!1),E(e)},e.handleOptOut=function(t,e){var n,r,o;return null==e&&(e=u.noop),null==t?_():t===_()?void e(null,m()):(r=function(){f.off(i.CHANGE,o),f.off(i.ERROR,n)},o=function(t){return e(null,t),r()},n=function(t){return e(new Error(t.message),t),r()},f.on(i.CHANGE,o),f.on(i.ERROR,n),void v(t))},e.init=function(){var t;f.onOnce("dom:load",function(){return p(e.handler)}),t=function(){g()?v(!0,!0):_()&&v(),f.off(k.READY_EVENT,t)},f.onOnce(k.READY_EVENT,t)}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w;i=n(4),s=n(17),a=n(6),c=n(7),f=n(14),d=n(2),_=n(12),o=n(8).collapse,r="[stats]",u={count:{},time:{}},e.get=l=function(t,e){return u[t][e]},e.set=g=function(t,e,n){u[t][e]=n},e.time=m=function(t,e){d.debug(r,"timing:",t,"at value",e),g("time",t,e)},e.timeOnce=w=i.memoize(m),e.timeDelta=v=function(t,e){var n,o,s;return null==e&&(e=i.now()),n=null!=(o=window.performance)&&null!=(s=o.timing)?s.navigationStart:void 0,null!=n?m(t,e-n):void d.warn(r,"skipping timeDelta for",t,"; no navigationStart available")},e.timeDeltaOnce=y=i.memoize(v),e.inc=h=function(t){var e;e=l("count",t)||0,g("count",t,e+1)},e.incPath=p=function(t){var e;e=t.split("."),i.times(e.length,function(t){h(i.first(e,t+1).join("."))})},e.init=i.once(function(){ var t,e,n,r,i,l,d,g,m;if(d=s.get("params.controltag_performance_stats_export",!1),g=0,t="."+_.bucket,e="."+a.get("config_param_control_tag_version"),m=e+t,p("views"+m),n=null!=(i=window.performance)&&null!=(l=i.timing)?l.navigationStart:void 0,null!=n&&w("nav_start",Math.floor(n)),y("start",a.get("started")),c.onOnce("tag:started",function(){return y("tags_first")}),c.onOnce("dom:ready",function(){return y("dom_ready")}),c.onOnce("dom:load",function(){return y("dom_load")}),c.on("social",function(t){h(t.provider+"."+t.action)}),c.on("tag:done",function(){p("tags_delivered"+m)}),r=0,c.on("error",function(){var t;try{if(r>10)return;r++,p("js_errors"+m)}catch(e){return void(t=e)}}),g=".alpha"===e||d?1:".beta"===e||".steady"===e||".stable"===e?.01:.001,Math.random()>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},n.prototype.init_by_array=function(t,e){var n,r,i;for(this.init_seed(19650218),n=1,r=0,i=this.N>e?this.N:e;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+t[r]+r,this.mt[n]>>>=0,n++,r++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),r>=e&&(r=0)}for(i=this.N-1;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648},n.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n>>1^e[1&t];for(;n>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(67108864*t+e)*(1/9007199254740992)},t.exports=n},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=e.Codec=function(){function t(e){n(this,t),this.charMap=e,this.indexMap={};for(var r=this.charMap.length,i=0;i0;){var r=t%e;t=Math.floor(t/e),n.push(this.charMap[r])}return n.reverse().join("")},t.prototype.decode=function(t){for(var e=t.length,n=0,r=0;rh&&(h=a,_=y);e.failureGroup=_.code+(_.data?":"+_.data:""),e.phase=s.happened("dom:load")?"after_load":s.happened("dom:ready")?"after_ready_before_load":"before_ready"}s.fire("test:all_done",{status:w})},e.init=r.once(function(){s.on("pixel",c),s.on("dom:beforeunload",c),s.on("dom:unload",c)})},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,E,S,T,O,A,N,R,I,C,M,P,D,L,B,U,j,F,q,K,z,H,Y,$,W={}.hasOwnProperty,V=[].slice,G=[].indexOf||function(t){for(var e=0,n=this.length;es[e]):return-1;default:return 1}}),q.timeDeltaOnce("proxy_segments"),U(a),e.set("segs",E.stringify(s))})})},F=function(t){return null==t&&(t=r),t===r?"segs":"segs_"+t},e.bucket=f=function(t){var e;return null==t&&(t=r),e=K.get(F(t)),e?e.split(","):[]},e.rete=L=l.once(function(){var t,e,n,r,i;for(t=new c,r=_.get("config_segments",[]),e=0,n=r.length;e=0)return r.push(n)});else for(e=0,s=t.length;e0&&o>0&&n.length>o&&(t=function(){var t,e,r;for(r=[],t=0,e=s.length;t=0&&r.push(a);return r}().slice(0,o),_.set("user_segments",t),K.set("segs",t.join(","),i)))},e.handleUserDataResponse=b=function(t){var e,n,r,s,a,u;if(s=t.segments,r=t.kuid,a=t.technographics,R.storeKuid(r),null!=s)if(l.isArray(s))K.set(F(),s.join(","),i);else if(l.isObject(s))for(e in s)u=s[e],K.set(F(e),u.join(","),i);null!=a&&(K.set("tech",$.paramString(a),o),C()),p.get("params.fingerprint")&&(n=null!=t.kfuid?t.kfuid:_.get("fp"),K.set("fp_id",n,R.USER_ID_TTL),_.set("fp_id",n)),h(),m.fire("user_data_response",t)},e.readTechFromStore=C=function(){var t,e,n,r;if(n=K.get("tech")){if(1!==_.get("pixel_data__knopii")){e=$.parseKeyValues(n);for(t in e)r=e[t],_.set("user_attr_kx_tech_"+t,r)}return!0}return!1},e.fetch=y=function(){m.fireOnce("user_data_request"),x.jsonp(w)},e.init=l.once(function(){var t,n,i,o,s,a;if(d(),null!=A&&_.set("user_segments",A.split(",")),e.allRealtime=l.pluck(_.get("config_segments"),"id"),a=K.get("org_user_id"),a&&(w.data._kuid=a),n=p.get("buckets"),(null!=n?n.length:void 0)>0&&(G.call(n,r)<0&&n.push(r),w.data.buckets=n.join(",")),p.get("params.fingerprint",!1)&&(o=_.get("fp"),w.data.kxfp=o,s=_.get("fp_id"),(null!=s?s.length:void 0)!==(null!=o?o.length:void 0)&&(w.data.kfuid=s)),C()||(w.data.technographics=1),!_.get("segWait")){switch(_.set("segWait",1,5*Y.MINUTES),p.get("params.user_data_timing")){case"asap":y();break;case"ready":m.onOnce("dom:ready",y);break;default:m.onOnce("dom:load",y)}m.fire("user_data_fetch_scheduled")}return K.get("segs"),p.get("params.store_realtime_segments",!1)&&(z(),m.on("tag:done",z),m.onOnce("pixel",z),m.onOnce("dom:beforeunload",z)),h(),t=K.get("allsegs")?K.get("allsegs").split(","):[],_.set("all_user_segments",t),p.get("params.optimize_realtime_segments",!1)?(m.on("data:change",function(t){var e,n,r;if(e=t.key,r=t.value,n=L().results(),L().set("$"+e,r),l.difference(L().results(),n).length>0)return h()}),_.user_attr.change(h),_.page_attr.change(h)):(i=l.throttle(h,100),_.user_attr.change(i),_.page_attr.change(i)),_.namespace("event").change(h),H.module("segments",function(t){m.happened("user_data_fetch_scheduled")&&t("user_data_response",m.happened("user_data_response"))})})},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k;for(r=n(4),s=n(6),k=n(8),a={},u={},e.isIdDelivered=d=function(t){var e;return(null!=(e=r.find(s.get("tags",[]),function(e){return e.id===t}))?e.delivered:void 0)===!0},e.getDelimiter=h=function(t){return s.get(t+"DELIM")},e.setDelimiter=b=function(t,e){h(t)!==e&&s.setSilently(t+"DELIM",e)},e.get=f=function(t,e){var n,i;return i=s.get(t),e&&b(t,e),e=h(t),r.isArray(i)?i:e?i?null!=(n="function"==typeof i.split?i.split(e):void 0)?n:[i]:[]:i},e.parse=y=function(t){var e,n,i,o,s,a,u,c,l,h;switch(!1){case!!r.isString(t):return t;case!(s=t.match(/^\$([^:]+)(?::(.*))?$/)):return f(s[1],s[2]);case!(s=t.match(/^\[\s*((?:"|').*(?:"|'))\s*]$/)):for(u=s[1].replace(/(?:^\s*["'])|(?:["']\s*$)/g,"").split(/(?:['"]\s*,\s*['"])/),l=[],e=0,i=u.length;e":return function(t,e){return t>e};case"<=":return function(t,e){return t<=e};case">=":return function(t,e){return t>=e};case"==":return function(t,e){return t===e};case"!=":return function(t,e){return t!==e};default:return function(){return!1}}},w=["<",">","<=",">=","==","!="],p=0,g=w.length;p=c;a=0<=c?++u:--u)(o[a]!==window||e.self)&&l(o[a],t,e.domain)},e.listen=function(t,e){var n;return n=r.defaults(e||{},{origin:i,strict:!0,win:window}),o.on(n.win,"message",function(e){var i;n.strict&&0!==String(e.origin||"").indexOf(n.origin)||t.call(this,{data:function(){if(!r.isString(e.data)||!a(e.data))return e.data;try{return u.parse(e.data)}catch(t){return i=t,c.error("Got error while parsing message",i)}}(),event:e})})},e.init=function(t){i=t}},function(t,e,n){var r,i,o,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}};o=n(4),s=n(2),a=n(25),u=n(15),i=n(37).OPTOUT,t.exports=r=function(){function t(t,e){this.uid=t,this.broker=e,this._handleSuccess=c(this._handleSuccess,this),this._publish=c(this._publish,this),this.remove=c(this.remove,this),this.count=c(this.count,this),this.clear=c(this.clear,this),this.set=c(this.set,this),this.get=c(this.get,this),this.stop=c(this.stop,this),this.run=c(this.run,this),this.inFlight={}}var e;return e="[proxy/client] ",t.prototype.run=function(){return this.broker.run(),this.handle=this.broker.subscribe(this.uid,this._handleSuccess),this.handle=this.broker.subscribe("id",this._handleId),this},t.prototype.stop=function(){var t;return null!=(t=this.handle)&&t.remove(),this},t.prototype.get=function(t,e){return this._publish({action:"get",key:t},e)},t.prototype.set=function(t,e,n){return this._publish({action:"set",key:t,value:e},n)},t.prototype.clear=function(t){return this._publish({action:"clear"},t)},t.prototype.count=function(t,e,n){return this._publish({action:"count",key:t,delta:e},n)},t.prototype.remove=function(t,e){return this._publish({action:"remove",key:t},e)},t.prototype._publish=function(t,e){var n;return null==e&&(e=o.noop),n=u(),t.uid=n,this.broker.publish(this.uid,t),this.inFlight[n]=e,this},t.prototype._handleId=function(t,n){var r,o;return r=n.current,o=n.previous,r===i?(s.info(e,"Found "+i+" signal; opting user out."),a.optOut()):o===i&&null!=r?(s.info(e,"Found transition from "+i+" signal to "+r+"; opting user back in."),a.optOut(!1),a.storeKuid(r)):o!==r?(s.info(e,"Found KUID change from "+o+" to "+r+"; updating LS."),a.storeKuid(r)):void 0},t.prototype._handleSuccess=function(t,e){var n,r;r=e.uid,"function"==typeof(n=this.inFlight)[r]&&n[r](t,e),delete this.inFlight[r]},t}()},function(t,e,n){var r,i,o,s,a=function(t,e){return function(){return t.apply(e,arguments)}};o=n(2),s=n(19),i=n(27),t.exports=r=function(){function t(t,e,n){this.cookieStore=t,this.primaryStore=e,this.watchers=null!=n?n:[],this._poll=a(this._poll,this),this._stop=a(this._stop,this),this.watch=a(this.watch,this),this.run=a(this.run,this),this.put=a(this.put,this),this.optout=a(this.optout,this),this.isOptOut=a(this.isOptOut,this),this.get=a(this.get,this)}var e,n,r,u,c,l;return e={domain:".krxd.net"},n=1e3,r="[proxy/id] ",u="_kuid_",c="OPTOUT",l=6*s.MONTHS,t.prototype.get=function(){return this.cookieStore.get(u)},t.prototype.isOptOut=function(){return this.get()===c},t.prototype.optout=function(){return o.info(r,"Opting user out"),this.cookieStore.set(u,c,l,e),this.primaryStore.forEach(function(t){return function(e,n){return t.primaryStore.remove(n)}}(this))},t.prototype.put=function(){return this.cookieStore.set(u,this.cookieStore.get(u,(new i).toShortId()),l,e),this.get()},t.prototype.run=function(){return this._stop(),this._poll(),this},t.prototype.watch=function(t){return this.watchers.push(t)},t.prototype._stop=function(){return this.handle&&clearInterval(this._handle),this.handle=null},t.prototype._poll=function(){var t;return t=this.get(),this._handle=window.setInterval(function(e){return function(){var n,i,s,a,u;if(n=e.put(),n!==t){for(o.info(r,"Transitioning ID from "+t+" to "+n),n===c&&e.optout(),a=e.watchers,i=0,s=a.length;ie},t.prototype._trim=function(){try{this.isOverSize()&&(i.info("[proxy/cookie-cutter] Found "+this.store.size()+" bytes of cookies, trimming."),this.store.until(function(t){return function(e,r){return!(r in n)&&(t.store.remove(r,{domain:".krxd.net"}),!t.isOverSize())}}(this)))}catch(t){}},t}()},function(t,e,n){var r,i,o,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}};o=n(10),s=n(9),a=n(40),u=n(19),i=n(4),t.exports=r=function(){function t(t,e,n,r){this.key=t,this.store=e,this.cookies=null!=r&&r,this._read=c(this._read,this),this._persist=c(this._persist,this),this._listen=c(this._listen,this),this.set=c(this.set,this),this.remove=c(this.remove,this),this.count=c(this.count,this),this.clear=c(this.clear,this),this.get=c(this.get,this),this.run=c(this.run,this),this.cache={},this.checksum="",this.ttl=function(){return(n.get("params.realtime_segments_90d_ttl",!1)?90:3)*u.DAYS}}return t.prototype.run=function(){var t;return this.cache=null!=(t=this._read())?t:{},this.store.until(),this.cookies||o.on(window,"storage",this._listen),this},t.prototype.get=function(t){var e;return null!=(e=this.cache[t])?e:""},t.prototype.clear=function(){return this.cache={},this._persist()},t.prototype.count=function(t,e){var n;return null==e&&(e=1),n=Number(this.get(t)),(null==n||i.isNaN(n))&&(n=0),this.set(t,n+e),this.get(t)},t.prototype.remove=function(t){return delete this.cache[t],this._persist()},t.prototype.set=function(t,e){return this.cache[t]=String(e),this._persist()},t.prototype._listen=function(t){var e;e=t.key,e===this.key&&this.checksum!==a.hash(this.store.get(this.key))&&(this.cache=this._read())},t.prototype._persist=function(){return this.store.set(this.key,s.stringify(this.cache),this.ttl()),this},t.prototype._read=function(){var t;return t=this.store.get(this.key),this.checksum=a.hash(t),s.parse(t)},t}()},function(t,e,n){var r;r=n(41),e.hash=function(t,e){return null==e&&(e="utf-8"),r("sha1").update(t,e).digest("hex")}},function(t,e,n){var e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};e.sha=n(42),e.sha1=n(49),e.sha224=n(50),e.sha256=n(51),e.sha384=n(52),e.sha512=n(53)},function(t,e,n){(function(e){function r(){this.init(),this._w=l,u.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var a=n(47),u=n(48),c=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);a(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,a=0|this._c,u=0|this._d,l=0|this._e,f=0;f<16;++f)e[f]=t.readInt32BE(4*f);for(;f<80;++f)e[f]=e[f-3]^e[f-8]^e[f-14]^e[f-16];for(var h=0;h<80;++h){var p=~~(h/20),d=i(n)+s(p,r,a,u)+l+e[h]+c[p]|0;l=u,u=a,a=o(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){(function(t,r){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,n){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function _(e){return+e!=e&&(e=0),t.alloc(+e)}function m(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Y(e).length; case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return Y(e).length;n=(""+n).toLowerCase(),i=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return N(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function w(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:b(e,n,r,i,o);if("number"==typeof n)return n=255&n,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):b(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var f=!0,h=0;hi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,l,f;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(e,n,r,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function U(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,i){return i||j(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,i){return i||j(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function K(t){if(t=z(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function V(t){return J.toByteArray(K(t))}function G(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t){return t!==t}var J=n(44),X=n(45),Z=n(46);e.Buffer=t,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return c(null,t,e,n)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,s=Math.min(r,i);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,r,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),l=e.slice(n,r),f=0;fi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,t,e,n);case"utf8":case"utf-8":return k(this,t,e,n);case"ascii":return E(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e=0|e,n=0|n,!r){var i=Math.pow(2,8*n)-1;L(this,t,e,n,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):U(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):U(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):U(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):U(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--o)e[o+n]=this[o+r];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=n;s0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new c(3*a/4-o),r=o>0?a-4:a;var l=0;for(e=0,n=0;e>16&255,s[l++]=i>>8&255,s[l++]=255&i;return 2===o?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,s[l++]=255&i):1===o&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,s[l++]=i>>8&255,s[l++]=255&i),s}function i(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}function o(t,e,n){for(var r,o=[],s=e;sl?l:c+u));return 1===r?(e=t[n-1],i+=a[e>>2],i+=a[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=a[e>>10],i+=a[e>>4&63],i+=a[e<<2&63],i+="="),s.push(i),s.join("")}e.toByteArray=r,e.fromByteArray=s;var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(e){function n(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}n.prototype.update=function(t,n){"string"==typeof t&&(n=n||"utf8",t=new e(t,n));for(var r=this._len+=t.length,i=this._s||0,o=0,s=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(e,n(43).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=f,c.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var u=n(47),c=n(48),l=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);u(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,u=0|this._c,c=0|this._d,f=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=i(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),g=o(n)+a(d,r,u,c)+f+e[p]+l[d]|0;f=c,c=u,u=s(r),r=n,n=g}this._a=n+this._a|0,this._b=r+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=f+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,64,56)}var i=n(47),o=n(51),s=n(48),a=new Array(64);i(r,o),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var t=new e(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=p,f.call(this,64,56)}function i(t,e,n){return n^t&(e^n)}function o(t,e,n){return t&e|n&(t|e)}function s(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function u(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function c(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var l=n(47),f=n(48),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);l(r,f),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,l=0|this._c,f=0|this._d,p=0|this._e,d=0|this._f,g=0|this._g,_=0|this._h,m=0;m<16;++m)e[m]=t.readInt32BE(4*m);for(;m<64;++m)e[m]=c(e[m-2])+e[m-7]+u(e[m-15])+e[m-16]|0;for(var v=0;v<64;++v){var y=_+a(p)+i(p,d,g)+h[v]+e[v]|0,w=s(n)+o(n,r,l)|0;_=g,g=d,d=p,p=f+y|0,f=l,l=r,r=n,n=y+w|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=l+this._c|0,this._d=f+this._d|0,this._e=p+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=_+this._h|0},r.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,128,112)}var i=n(47),o=n(53),s=n(48),a=new Array(160);i(r,o),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),n},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=_,d.call(this,128,112)}function i(t,e,n){return n^t&(e^n)}function o(t,e,n){return t&e|n&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function l(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function f(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function h(t,e){return t>>>0>>0?1:0}var p=n(47),d=n(48),g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_=new Array(160);p(r,d),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,p=0|this._ch,d=0|this._dh,_=0|this._eh,m=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,b=0|this._bl,x=0|this._cl,k=0|this._dl,E=0|this._el,S=0|this._fl,T=0|this._gl,O=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var N=e[A-30],R=e[A-30+1],I=u(N,R),C=c(R,N);N=e[A-4],R=e[A-4+1];var M=l(N,R),P=f(R,N),D=e[A-14],L=e[A-14+1],B=e[A-32],U=e[A-32+1],j=C+L|0,F=I+D+h(j,C)|0;j=j+P|0,F=F+M+h(j,P)|0,j=j+U|0,F=F+B+h(j,U)|0,e[A]=F,e[A+1]=j}for(var q=0;q<160;q+=2){F=e[q],j=e[q+1];var K=o(n,r,p),z=o(w,b,x),H=s(n,w),Y=s(w,n),$=a(_,E),W=a(E,_),V=g[q],G=g[q+1],Q=i(_,m,v),J=i(E,S,T),X=O+W|0,Z=y+$+h(X,O)|0;X=X+J|0,Z=Z+Q+h(X,J)|0,X=X+G|0,Z=Z+V+h(X,G)|0,X=X+j|0,Z=Z+F+h(X,j)|0;var tt=Y+z|0,et=H+K+h(tt,Y)|0;y=v,O=T,v=m,T=S,m=_,S=E,E=k+X|0,_=d+Z+h(E,k)|0,d=p,k=x,p=r,x=b,r=n,b=w,w=X+tt|0,n=Z+et+h(w,X)|0}this._al=this._al+w|0,this._bl=this._bl+b|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+S|0,this._gl=this._gl+T|0,this._hl=this._hl+O|0,this._ah=this._ah+n+h(this._al,w)|0,this._bh=this._bh+r+h(this._bl,b)|0,this._ch=this._ch+p+h(this._cl,x)|0,this._dh=this._dh+d+h(this._dl,k)|0,this._eh=this._eh+_+h(this._el,E)|0,this._fh=this._fh+m+h(this._fl,S)|0,this._gh=this._gh+v+h(this._gl,T)|0,this._hh=this._hh+y+h(this._hl,O)|0},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),n},t.exports=r}).call(e,n(43).Buffer)},function(t,e,n){var r,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s=[].indexOf||function(t){for(var e=0,n=this.length;e=0&&(o=this[r](n),i={uid:a},null!=o&&(i.value=o),this.broker.publish(t,i))},t}()},function(t,e){var n,r=function(t,e){return function(){return t.apply(e,arguments)}},i=[].slice;t.exports=n=function(){function t(){this.toArray=r(this.toArray,this),this.clear=r(this.clear,this),this.listen=r(this.listen,this),this.push=r(this.push,this),this._happened=[],this._listeners=[]}return t.prototype.push=function(){var t,e,n,r,o,s,a,u,c;for(n=1<=arguments.length?i.call(arguments,0):[],(u=this._happened).push.apply(u,n),r=0,s=n.length;r=0)return!0;return!1},e.isMatch=function(t){return"intersects"===t},e}(r),w=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(){return!e.__super__._assert.apply(this,arguments)},e.isMatch=function(t){return"notIntersects"===t},e}(p),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.isMatch=function(t){return"contains"===t},e}(p),v=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(){return!e.__super__._assert.apply(this,arguments)},e.isMatch=function(t){return"notContains"===t},e}(a),T=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(t,e){var n,r,i,o;for(o=this.operands,n=0,r=o.length;ne},e.isMatch=function(t){return">"===t},e}(s),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t<=e},e.isMatch=function(t){return"<="===t},e}(s),f=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t>=e},e.isMatch=function(t){return">="===t},e}(s),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t===e},e.isMatch=function(t){return"=="===t||"equals"===t},e}(s),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t!==e},e.isMatch=function(t){return"!="===t||"notEquals"===t},e}(s),o=function(t){function e(){var t,e,n,r,i,o;for(e=arguments[0],i=2<=arguments.length?B.call(arguments,1):[],this.id=e,this.operands=i,this.productions=[],o=this.operands,t=0,n=o.length;t0))return!1;for(n=0,r=e.length;n0;){i=h.shift();for(a in i)if(S.call(i,a))if(_=i[a],E.isPrimitive(_))c(a,_);else if(r.isArray(_))for(s=0,u=_.length;s0))return[];switch(!1){case"text"!==a&&"value"!==a:e=h[a],s=function(){var t,n,r;for(r=[],t=0,n=s.length;t1?n.apply(n,r.tail(e)):n:r.isFunction(t)?t.call(null,h):(i=s(t))?i[1].apply(null,e):void c.push(r.toArray(e))},e.understands=function(t){return!!s(t)},e.replay=f=function(){var t,e,n,i;for(i=r.clone(c),c.length=0,e=0,n=i.length;er):return 1;default:return 0}}),n=o.create(),g=function(t){var e;return e=t[0],"afterTag"===e||"beforeTag"===e},p=function(t){return function(e){var r,i;switch(r=e[0],i=e[1],r){case"afterTag":return n.add([i,t]);case"beforeTag":return n.add([t,i])}}},u=0,l=t.length;u'),r.leaveOpen||u.close(),r.onIframe&&r.onIframe(a),a.contentWindow.Krux=window.Krux,N(t,a.contentWindow.document.body,e,n)):e(),a},nativeIframe:function(t,e,n,r){return r.leaveOpen=!0,d.iframeCommon(t,e,n,r)},iframe:function(t,e,n,r){return d.iframeCommon(t,e,n,r)}},e.templateData=E=function(){var t;return{id:null!=(t=o.get("currentTag"))?t.id:void 0,pubid:o.get("pubid"),site:o.get("site"),geo:h.stringify(c.get()),now:new Date}},e.runTemplate=w=function(t){var e,n,r;t=t.replace(/\{\{\s*([^}]+)\s*}}/g,"{{$1}}"),n=E();for(e in n)r=n[e],t=t.replace("{{"+e+"}}",r);return t},e.meetsCriteria=function(t){var e,n,r,i;if(t.once_per_page&&m.has(t))return t.metCriteria=!1;if(null==t.criteria)return t.metCriteria=!0;o.set("now",new Date),t.freq_cap&&o.set("tag_deliveries_today",+b.get("tag"+t.id+".day",0)),i={currentTag:t,frequency:+b.get("visits"),geolocation:c.get("country"),throttle:t.random,url:document.location.href};for(e in i)r=i[e],o.setSilently(e,r);p.trace("Considering tag",t.id,t.criteria),n=t.metCriteria=u.evaluate(t.criteria);for(e in i)o.remove(e);return n},g=0,m=_.self._oneTimeTags=_.self._oneTimeTags||f.create(function(t){return t.id}),e.deliver=function(t,e){var n,i,o,s,u,c,l;if(null==e&&(e={}),p.trace("Delivering",t.id,t),u=t.once_per_page,u&&m.has(t))return m.get(t).id;O(t),t.id=t.id||g++,t.time={mode:"async",start:T()},null==t.method&&(t.method=r.isFunction(t.content)?"apply":"document"),t.delivered=!0,o=function(){t.time.end=T(),t.time.duration=t.time.end-t.time.start},s=function(e){t.error=e&&e.message&&e||{message:"unknown error"},a.fire("tag:fail",{id:t.id,alias:t.name,error:t.error.message})},a.fire("tag:started",{id:t.id,alias:t.name}),n=function(){o(),t.freq_cap&&b.count("tag"+t.id+".day"),a.fire("tag:done",{id:t.id,alias:t.name})},c=window.Krux;try{_.isDefault||(window.Krux=_.self),l=d[t.method](t,n,s,e),u&&m.put({id:t.id})}catch(e){i=e,p.error("Unable to deliver tag w/ ID: "+t.id),s(i)}finally{window.Krux=c}return l},e.claimOneTimers=function(t){var e,n,i,o;null!=t&&(i=function(){var e,n,r;for(r=[],e=0,n=t.length;e=l.lastStart,u.name),l.lastStart=s)})})},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y={}.hasOwnProperty;o=n(4),s=n(17),a=n(6),c=n(7),f=n(9),d=n(25),g=n(18),_=n(19),v=n(8),i=24*_.HOURS,h=function(t){return String(t).toLowerCase()},p=function(t){var e,n,r;for(e in t)y.call(t,e)&&(r=t[e],n=h(e),n!==e&&(delete t[e],t[n]=r));return t},u=function(t){var e,n,r,i;for(i=["country","region","city","dma"],e=0,r=i.length;e0&&this._writeStaticTokens(i),n&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,p&&(e.proxyInnerHTML=this.proxyRoot.innerHTML),this._walkChunk(),p&&(e.actualInnerHTML=this.root.innerHTML),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,n=[],r=[],i=[],o=t.length,s=0;s)/," "+d+"id="+c+" $1")),a.attrs.id!==_&&a.attrs.id!==g&&i.push("atomicTag"===a.type?"":"<"+a.tagName+" "+d+"proxyof="+c+(a.unary?" />":">"))}}else r.push(u),i.push("endTag"===a.type?u:"")}return{tokens:t,raw:n.join(""),actual:r.join(""),proxy:i.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];h.existy(t=e.shift());){var n=1===t.nodeType,r=n&&s(t,"proxyof");if(!r){n&&(this.actuals[s(t,"id")]=t,a(t,"id"));var i=t.parentNode&&s(t.parentNode,"proxyof");i&&this.actuals[i].appendChild(t)}e.unshift.apply(e,h.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,n=this.parser.clear();n&&this.writeQueue.unshift(n),t.src=t.attrs.src||t.attrs.SRC,t=this.options.beforeWriteToken(t),t&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,g),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),h.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('');var n=this.doc.getElementById(e);n&&n.parentNode.replaceChild(t,n)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({message:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var n=this._buildScript(t),r=this._shouldRelease(n),i=this.options.afterAsync;t.src&&(n.src=t.src,this._scriptLoadHandler(n,r?i:function(){e(),i()}));try{this._insertCursor(n,_),n.src&&!r||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return h.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function n(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){n(),e()}function i(t){n(),o(t),e()}var o=this.options.error;u(t,{onload:function(){return r()},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&r(); },onerror:function(){return i({message:"remote script failed "+t.src})}})},t.prototype._shouldRelease=function(t){var e=/^script$/i.test(t.nodeName);return!e||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=m},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(1),o=r(i);t.exports=o.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var s=n(2),a=i(s),u=n(3),c=i(u),l=n(6),f=r(l),h=n(5),p={comment:/^");if(e>=0)return new c.CommentToken(t.substr(4,e-1),e+3)}function i(t){var e=t.indexOf("<");return new c.CharsToken(e>=0?e:t.length)}function o(t){var e=t.indexOf(">");if(e!==-1){var n=t.match(l.startTag);if(n){var r=function(){var t={},e={},r=n[2];return n[2].replace(l.attr,function(n,i){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",e[arguments[5]]=!0):t[i]=arguments[2]||arguments[3]||arguments[4]||l.fillAttr.test(i)&&i||"":t[i]="",r=r.replace(n,"")}),{v:new c.StartTagToken(n[1],n[0].length,t,e,(!!n[3]),r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===("undefined"==typeof r?"undefined":u(r)))return r.v}}}function s(t){var e=o(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("","i"))){var r=n.match(new RegExp("([\\s\\S]*?)","i"));if(r)return new c.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function a(t){var e=t.match(l.endTag);if(e)return new c.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.comment=r,e.chars=i,e.startTag=o,e.atomicTag=s,e.endTag=a;var c=n(4),l={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var i=n(5),o=(e.Token=function t(e,n){r(this,t),this.type=e,this.length=n,this.text=""},e.CommentToken=function(){function t(e,n){r(this,t),this.type="comment",this.length=n||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"