(function w(c,a,k){function l(m,x){if(!a[m]){if(!c[m]){var g="function"==typeof require&&require;if(!x&&g)return g(m,!0);if(t)return t(m,!0);g=Error("Cannot find module '"+m+"'");throw g.code="MODULE_NOT_FOUND",g;}g=a[m]={a:{}};c[m][0].call(g.a,function(a){var g=c[m][1][a];return l(g?g:a)},g,g.a,w,c,a,k)}return a[m].a}for(var t="function"==typeof require&&require,s=0;s<k.length;s++)l(k[s]);return l})({1:[function(b){var c=b("../../src/"),a=b("./on-submit"),k=b("./on-change");document.addEventListener("DOMContentLoaded",
function(){c({b:[".demo"],d:"30px",offset:"35px",e:"transparent"});document.addEventListener("submit",a,!1);document.addEventListener("change",k,!1)})},{"../../src/":6,"./on-change":2,"./on-submit":3}],2:[function(b,c){var a=b("animated-scrollto");c.a=function(c){var b=document.getElementById("output");if(-1!==c.target.className.indexOf("state")||!0===c.target.checked)a(document.body,c.target.offsetTop,300),window.setTimeout(function(){if(b.checked){var a=document.querySelectorAll("textarea")[0];
a.focus();a.select()}},300)}},{"animated-scrollto":4}],3:[function(b,c){var a=document.querySelectorAll(".js_generator_template")[0].innerText,k=document.querySelectorAll(".js_generator")[0].querySelectorAll("input, select"),l=document.querySelectorAll(".js_output")[0],t=document.getElementById("output"),s=b("../../src/defaults");c.a=function(c){if(-1!==c.target.className.indexOf("js_generator")){c.preventDefault();var b={};Array.prototype.forEach.call(k,function(a){b[a.name]=a.value});b.b=b.b.split(",").filter(function(a){return a}).map(function(a){return a.trim()});
var g={};Object.keys(b).forEach(function(a){b[a]!==s[a]&&(g[a]=b[a])});l.innerText='<script type="text/javascript">'+a+"window.dotHIVify("+JSON.stringify(g)+");\x3c/script>";t.checked=!0;l.focus();l.select()}}},{"../../src/defaults":5}],4:[function(b,c){(function(a){function b(a,c,m,k){function g(){if(h){l(g);var b=+new Date,d;d=b-u;d/=m/2;1>d?d=n/2*d*d+r:(d--,d=-n/2*(d*(d-2)-1)+r);d=Math.floor(d);e?e===a.scrollTop?(e=d,a.scrollTop=d):h=!1:(e=d,a.scrollTop=d);b>u+m&&(a.scrollTop=c,h=!1,k&&k())}}var r=
a.scrollTop,n=c-r,u=+new Date,h=!0,e=null;l(g)}var l=function(){return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||function(c){a.setTimeout(c,1E3/60)}}();"undefined"!==typeof c&&"undefined"!==typeof c.a?c.a=b:a.c=b})(window)},{}],5:[function(b,c){c.a={replaced:".",prefix:"dothiv",queries:["p"],diameter:"4px",offset:"16px",dotBackground:"#ff0000",popoverBackground:"#ffffff",popoverColor:"#000000",popoverFontSize:"14px",headline:"A dot making all the difference.",
headlineColor:"#e00073",headlineFontweight:"bold",text:"For every single click on a .hiv site we donate to the fight against AIDS.",buttonText:"Help now",buttonHref:"https://click4life.hiv/en/",buttonTarget:"_blank",buttonBackground:"#e00073",buttonHoverBackground:"#ff47a5",buttonColor:"#ffffff"}},{}],6:[function(b,c){function a(a){var c={},b;for(b in k)k.hasOwnProperty(b)&&(c[b]="undefined"!==typeof a[b]?a[b]:k[b]);var r=c.prefix;a=document.querySelectorAll(c.queries.join(", "));b=t(c);var n=l(c),
u=r+"-state",h=document.createElement("input");h.type="radio";h.name=r;h.className=u;h.id=r+"-state-revert";var e=document.createElement("style");e.type="text/css";var p=document.createDocumentFragment(),d=document.createElement("div");d.innerHTML=b;p.appendChild(d);b=d.firstChild;e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n));document.head.appendChild(e);document.body.appendChild(h);for(n=0;n<a.length;n+=1)for(h=s(a[n]),e=0;e<h.length;e+=1){for(var p=[],f=h[e].nodeValue.split(c.replaced),
d=[],v=[],q=0;q<f.length;q+=1){var y=f[q+1]?f[q+1][0]:!0;d.push((f[q-1]?f[q-1][f[q-1].length-1]:"").match(/[a-z]/i));v.push(null!==y);p.push(document.createTextNode(f[q]))}for(f=0;f<p.length;f+=1)h[e].parentNode.insertBefore(p[f],h[e]),p[f].nodeValue&&d[f]&&v[f]?h[e].parentNode.insertBefore(b.cloneNode(!0),p[f]):d[f]&&(p[f].nodeValue="."+p[f].nodeValue);h[e].parentNode.removeChild(h[e])}document.addEventListener("change",function(a){if(!(1024>window.innerWidth)&&a.target.classList.contains(u)){var c=
a.target.parentNode,b=c.querySelectorAll("."+r+"-replacement-aside")[0].getBoundingClientRect(),d=b.width/2,e=c.getBoundingClientRect();if(a.target.checked){a=[];b.height>e.top&&a.push("down");d>e.left?a.push("right"):d>window.innerWidth-e.left&&a.push("left");b=c.className;for(d=0;d<a.length;d+=1)-1===b.indexOf(a[d])&&(b+=" "+a[d]);c.className=b}else window.setTimeout(function(){c.className=e.className.replace(/down|right|left/ig,"")},300)}},!1)}var k=b("./defaults"),l=b("./templates/styles.dot"),
t=b("./templates/dot.dot"),s=b("./utils/children-text-nodes");window.dotHIVify=a;c.a=a},{"./defaults":5,"./templates/dot.dot":7,"./templates/styles.dot":8,"./utils/children-text-nodes":9}],7:[function(b,c){c.a=function(a){return'<label class="'+a.prefix+'-replacement-wrapper"><input class="'+a.prefix+'-state" type="radio" name="'+a.prefix+'" /><label class="'+a.prefix+'-state-revert-trigger" for="'+a.prefix+'-state-revert"></label><aside class="'+a.prefix+'-replacement-aside"><div><strong class="'+
a.prefix+'-h">'+a.headline+"</strong>"+a.text+'</div><a class="'+a.prefix+'-cta" href="'+a.buttonHref+'" target="'+a.buttonTarget+'">'+a.buttonText+"</a></aside></label>'"}},{}],8:[function(b,c){c.a=function(a){return"@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:300);."+a.prefix+"-replacement-wrapper{position: relative;display: inline-block;height: "+a.diameter+";width: "+a.diameter+";margin: 1px 0 0 1px;vertical-align: baseline;background: "+a.dotBackground+";border-radius: 50%;cursor: pointer;}."+
a.prefix+"-replacement-wrapper::before{content: '';position: absolute;width: 30px;height: 30px;top: -15px;left: -15px;}."+a.prefix+"-state{position: fixed;top: 0;left: -100000px;}."+a.prefix+"-state-revert{display: none;}."+a.prefix+"-replacement-aside{z-index: 100001;box-sizing: border-box;position: absolute;left: -1000px;left: -200vw;bottom: "+a.offset+";width: 260px;margin-left: -130px;margin-bottom: -25px;padding: 10px;opacity: 0;background: "+a.popoverBackground+";border: 1px solid #ddd;box-shadow: 0 0 10px rgba(0,0,0,.15);text-align: left;font-size: "+
a.popoverFontSize+";font-family: 'Source Sans Pro', sans-serif;color: "+a.popoverColor+";-webkit-transition: opacity .3s ease-in-out, margin .3s, left 0s .3s; -moz-transition: opacity .3s ease-in-out, margin .3s, left 0s .3s; -ms-transition: opacity .3s ease-in-out, margin .3s, left 0s .3s; transition: opacity .3s ease-in-out, margin .3s, left 0s .3s;}."+a.prefix+"-replacement-aside p,."+a.prefix+"-replacement-aside h{line-height: 1.5em;}."+a.prefix+"-replacement-aside a{line-height: 1.25em;}."+a.prefix+
"-h{display: block;color: "+a.headlineColor+";font-weight: "+a.headlineFontweight+";margin: .25em 0 .5em 0;}."+a.prefix+"-state:checked + ."+a.prefix+"-state-revert-trigger{position: fixed;z-index: 100000;top: 0;right: 0;bottom: 0;left: 0;}."+a.prefix+"-state:checked ~ ."+a.prefix+"-replacement-aside{left: 50%;opacity: 1;margin-bottom: 0;-webkit-transition: opacity .3s ease-in-out, margin .3s; -moz-transition: opacity .3s ease-in-out, margin .3s; -ms-transition: opacity .3s ease-in-out, margin .3s; transition: opacity .3s ease-in-out, margin .3s;}a."+
a.prefix+"-cta{box-sizing: border-box;display: inline-block;width: 100%;margin-top: 10px;padding: 3px 5px;text-align: center;text-decoration: none!important;font-weight: bold;color: "+a.buttonColor+"!important;background: "+a.buttonBackground+";cursor: pointer;-webkit-transition: all .3s ease-in-out; -moz-transition: all .3s ease-in-out; -ms-transition: all .3s ease-in-out; transition: all .3s ease-in-out;}."+a.prefix+"-replacement-aside::after{content: '';position: absolute;bottom: -7px;left: 50%;margin-left: -10px;width: 0;height: 0;border-style: solid;border-width: 7.5px 10px 0 10px;border-color: "+
a.popoverBackground+" transparent transparent transparent;}."+a.prefix+"-replacement-aside::before{content: '';position: absolute;bottom: -8px;left: 50%;margin-left: -10px;width: 0;height: 0;border-style: solid;border-width: 7.5px 10px 0 10px;border-color: #ddd transparent transparent transparent;}.down > ."+a.prefix+"-replacement-aside{top: 100%;bottom: auto;margin-top: "+a.offset+";}.down > ."+a.prefix+"-replacement-aside::after{top: -7px;bottom: auto;border-width: 0 10px 7.5px 10px;border-color: transparent transparent "+
a.popoverBackground+" transparent;}.down > ."+a.prefix+"-replacement-aside::before{top: -8px;bottom: auto;border-width: 0 10px 7.5px 10px;border-color: transparent transparent #ddd transparent;}.left > ."+a.prefix+"-replacement-aside{margin-left: -260px;}.left > ."+a.prefix+"-replacement-aside::after,.left > ."+a.prefix+"-replacement-aside::before{left: 100%;margin-left: -25px;}.right > ."+a.prefix+"-replacement-aside{margin-left: 0;}.right > ."+a.prefix+"-replacement-aside::after,.right > ."+a.prefix+
"-replacement-aside::before{left: auto;right: 100%;margin-right: -25px;}a."+a.prefix+"-cta{color: #fff;}a."+a.prefix+"-cta:hover{background: "+a.buttonHoverBackground+";}@media only screen and (max-device-width: 1024px) {."+a.prefix+"-replacement-aside{position: fixed;right: 0;bottom: 0;left: 0;margin: 0;width: 100%;opacity: 1;padding: 25px 15px;-webkit-transform: translateY(100%); -moz-transform: translateY(100%); -ms-transform: translateY(100%); transform: translateY(100%);-webkit-transition: -webkit-transform .3s ease-in-out; -moz-transition: -moz-transform .3s ease-in-out; -ms-transition: -ms-transform .3s ease-in-out; transition: transform .3s ease-in-out;}."+
a.prefix+"-state:checked ~ ."+a.prefix+"-replacement-aside{left: 0;-webkit-transform: none; -moz-transform: none; -ms-transform: none; transform: none;-webkit-transition: -webkit-transform .3s ease-in-out; -moz-transition: -moz-transform .3s ease-in-out; -ms-transition: -ms-transform .3s ease-in-out; transition: transform .3s ease-in-out;}."+a.prefix+"-cta{margin-top: 20px;}}"}},{}],9:[function(b,c){c.a=function(a){var b=[];for(a=a.firstChild;a;a=a.nextSibling)3===a.nodeType&&b.push(a);return b}},
{}]},{},[1]);
