-
Notifications
You must be signed in to change notification settings - Fork 4
/
myheatmap.html
20 lines (19 loc) · 281 KB
/
myheatmap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript;base64,KGZ1bmN0aW9uKCkgewogIC8vIElmIHdpbmRvdy5IVE1MV2lkZ2V0cyBpcyBhbHJlYWR5IGRlZmluZWQsIHRoZW4gdXNlIGl0OyBvdGhlcndpc2UgY3JlYXRlIGEKICAvLyBuZXcgb2JqZWN0LiBUaGlzIGFsbG93cyBwcmVjZWRpbmcgY29kZSB0byBzZXQgb3B0aW9ucyB0aGF0IGFmZmVjdCB0aGUKICAvLyBpbml0aWFsaXphdGlvbiBwcm9jZXNzICh0aG91Z2ggbm9uZSBjdXJyZW50bHkgZXhpc3QpLgogIHdpbmRvdy5IVE1MV2lkZ2V0cyA9IHdpbmRvdy5IVE1MV2lkZ2V0cyB8fCB7fTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gYSB2aWV3ZXIgcGFuZS4gSWYgbm90LCB3ZSdyZSBpbiBhIHdlYiBicm93c2VyLgogIHZhciB2aWV3ZXJNb2RlID0gd2luZG93LkhUTUxXaWRnZXRzLnZpZXdlck1vZGUgPQogICAgICAvXGJ2aWV3ZXJfcGFuZT0xXGIvLnRlc3Qod2luZG93LmxvY2F0aW9uKTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gU2hpbnkgbW9kZS4gSWYgbm90LCBpdCdzIGEgc3RhdGljIGRvY3VtZW50LgogIC8vIE5vdGUgdGhhdCBzdGF0aWMgd2lkZ2V0cyBjYW4gYXBwZWFyIGluIGJvdGggU2hpbnkgYW5kIHN0YXRpYyBtb2RlcywgYnV0CiAgLy8gb2J2aW91c2x5LCBTaGlueSB3aWRnZXRzIGNhbiBvbmx5IGFwcGVhciBpbiBTaGlueSBhcHBzL2RvY3VtZW50cy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HZhciBzaXppbmdFbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoInNjcmlwdFtkYXRhLWZvcj0nIiArIGVsLmlkICsgIiddW3R5cGU9J2FwcGxpY2F0aW9uL2h0bWx3aWRnZXQtc2l6aW5nJ10iKTsKICAgIGlmICghc2l6aW5nRWwpCiAgICAgIHJldHVybiBudWxsOwogICAgdmFyIHNwID0gSlNPTi5wYXJzZShzaXppbmdFbC50ZXh0Q29udGVudCB8fCBzaXppbmdFbC50ZXh0IHx8ICJ7fSIpOwogICAgaWYgKHZpZXdlck1vZGUpIHsKICAgICAgcmV0dXJuIHNwLnZpZXdlcjsKICAgIH0gZWxzZSB7CiAgICAgIHJldHVybiBzcC5icm93c2VyOwogICAgfQogIH0KCiAgZnVuY3Rpb24gaW5pdFNpemluZyhlbCkgewogICAgdmFyIHNpemluZyA9IHNpemluZ1BvbGljeShlbCk7CiAgICBpZiAoIXNpemluZykKICAgICAgcmV0dXJuOwoKICAgIHZhciBjZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaHRtbHdpZGdldF9jb250YWluZXIiKTsKICAgIGlmICghY2VsKQogICAgICByZXR1cm47CgogICAgaWYgKHR5cGVvZihzaXppbmcucGFkZGluZykgIT09ICJ1bmRlZmluZWQiKSB7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUubWFyZ2luID0gIjAiOwogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLnBhZGRpbmcgPSBwYWRkaW5nVG9Dc3ModW5wYWNrUGFkZGluZyhzaXppbmcucGFkZGluZykpOwogICAgfQoKICAgIGlmIChzaXppbmcuZmlsbCkgewogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLm92ZXJmbG93ID0gImhpZGRlbiI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUuaGVpZ2h0ID0gIjEwMCUiOwogICAgICBkb2N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gICAgICAgIC8vIHVubmVjZXNzYXJ5IHNjcm9sbGJhcnMgdG8gYXBwZWFyIGFuZCBtYWtpbmcgaXQgaW1wb3NzaWJsZSBmb3IKICAgICAgICAgICAgLy8gdGhlIGVsZW1lbnQgdG8gc2hyaW5rOyBzbyB1c2UgbWF4LXdpZHRoIGluc3RlYWQKICAgICAgICAgICAgLmNzcygibWF4V2lkdGgiLCBlbC5vZmZzZXRXaWR0aCkKICAgICAgICAgICAgLmNzcygiaGVpZ2h0IiwgZWwub2Zmc2V0SGVpZ2h0KTsKICAgICAgICAgIGVycm9yRGl2LnRleHQoZXJyLm1lc3NhZ2UpOwogICAgICAgICAgJGVsLmFmdGVyKGVycm9yRGl2KTsKCiAgICAgICAgICAvLyBSZWFsbHkgZHVtYiB3YXkgdG8ga2VlcCB0aGUgc2l6ZS9wb3NpdGlvbiBvZiB0aGUgZXJyb3IgaW4gc3luYyB3aXRoCiAgICAgICAgICAvLyB0aGUgcGFyZW50IGVsZW1lbnQgYXMgdGhlIHdpbmRvdyBpcyByZXNpemVkIG9yIHdoYXRldmVyLgogICAgICAgICAgdmFyIGludElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmICghZXJyb3JEaXZbMF0ucGFyZW50RWxlbWVudCkgewogICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50SWQpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvckRpdgogICAgICAgICAgICAgIC5jc3MoInRvcCIsIGVsLm9mZnNldFRvcCkKICAgICAgICAgICAgICAuY3NzKCJsZWZ0IiwgZWwub2Zmc2V0TGVmdCkKICAgICAgICAgICAgICAuY3NzKCJtYXhXaWR0aCIsIGVsLm9mZnNldFdpZHRoKQogICAgICAgICAgICAgIC5jc3MoImhlaWdodCIsIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICB9LCA1MDApOwogICAgICAgIH0KICAgICAgfQogICAgf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ICAgICAgcmV0dXJuIGR5bmFtaWNSZXN1bHRzOwogICAgICAgIH07CiAgICAgIH0pOwoKICAgICAgb3ZlcnJpZGVNZXRob2Qoc2hpbnlCaW5kaW5nLCAicmVuZGVyVmFsdWUiLCBmdW5jdGlvbihzdXBlcmZ1bmMpIHsKICAgICAgICByZXR1cm4gZnVuY3Rpb24oZWwsIGRhdGEpIHsKICAgICAgICAgIC8vIFJlc29sdmUgc3RyaW5ncyBtYXJrZWQgYXMgamF2YXNjcmlwdCBsaXRlcmFscyB0byBvYmplY3RzCiAgICAgICAgICBpZiAoIShkYXRhLmV2YWxzIGluc3RhbmNlb2YgQXJyYXkpKSBkYXRhLmV2YWxzID0gW2RhdGEuZXZhbHNdOwogICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGRhdGEuZXZhbHMgJiYgaSA8IGRhdGEuZXZhbHMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgd2luZG93LkhUTUxXaWRnZXRzLmV2YWx1YXRlU3RyaW5nTWVtYmVyKGRhdGEueCwgZGF0YS5ldmFsc1tpXSk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIXRoaXMucmVuZGVyT25OdWxsVmFsdWUpIHsKICAgICAgICAgICAgaWYgKGRhdGEueCA9PT0gbnVsbCkgewogICAgICAgICAgICAgIGVsLnN0eWxlLnZpc2liaWxpdHkgPSAiaGlkZGVuIjsKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgZWwuc3R5bGUudmlzaWJpbGl0eSA9ICJpbmhlcml0IjsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKCFlbGVtZW50RGF0YShlbCwgImluaXRpYWxpemVkIikpIHsKICAgICAgICAgICAgaW5pdFNpemluZyhlbCk7CgogICAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRpYWxpemVkIiwgdHJ1ZSk7CiAgICAgICAgICAgIGlmICh0aGlzLl9odG1sd2lkZ2V0c19pbml0aWFsaXplKSB7CiAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHRoaXMuX2h0bWx3aWRnZXRzX2luaXRpYWxpemUoZWwsIGVsLm9mZnNldFdpZHRoLAogICAgICAgICAgICAgICAgZWwub2Zmc2V0SGVpZ2h0KTsKICAgICAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRfcmVzdWx0IiwgcmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgU2hpbnkucmVuZGVyRGVwZW5kZW5jaWVzKGRhdGEuZGVwcyk7CiAgICAgICAgICBzdXBlcmZ1bmMoZWwsIGRhdGEueCwgZWxlbWVudERhdGEoZWwsICJpbml0X3Jlc3VsdCIpKTsKICAgICAgICB9OwogICAgICB9KTsKCiAgICAgIG92ZXJyaWRlTWV0aG9kKHNoaW55QmluZGluZywgInJlc2l6ZSIsIGZ1bmN0aW9uKHN1cGVyZnVuYykgewogICAgICAgIHJldHVybiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCkgewogICAgICAgICAgLy8gU2hpbnkgY2FuIGNhbGwgcmVzaXplIGJlZm9yZSBpbml0aWFsaXplL3JlbmRlclZhbHVlIGhhdmUgYmVlbgogICAgICAgICAgLy8gY2FsbGVkLCB3aGljaCBkb2Vzbid0IG1ha2Ugc2Vuc2UgZm9yIHdpZGdldHMuCiAgICAgICAgICBpZiAoZWxlbWVudERhdGEoZWwsICJpbml0aWFsaXplZCIpKSB7CiAgICAgICAgICAgIHN1cGVyZnVuYyhlbCwgd2lkdGgsIGhlaWdodCwgZWxlbWVudERhdGEoZWwsICJpbml0X3Jlc3VsdCIpKTsKICAgICAgICAgIH0KICAgICAgICB9OwogICAgICB9KTsKCiAgICAgIFNoaW55Lm91dHB1dEJpbmRpbmdzLnJlZ2lzdGVyKHNoaW55QmluZGluZywgc2hpbnlCaW5kaW5nLm5hbWUpOwogICAgfQogIH07CgogIHZhciBzY2hlZHVsZVN0YXRpY1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mQiOwoKICAgICAgICB2YXIgaW5pdFJlc3VsdDsKICAgICAgICBpZiAoYmluZGluZy5pbml0aWFsaXplKSB7CiAgICAgICAgICBpbml0UmVzdWx0ID0gYmluZGluZy5pbml0aWFsaXplKGVsLAogICAgICAgICAgICBzaXplT2JqID8gc2l6ZU9iai5nZXRXaWR0aCgpIDogZWwub2Zmc2V0V2lkdGgsCiAgICAgICAgICAgIHNpemVPYmogPyBzaXplT2JqLmdldEhlaWdodCgpIDogZWwub2Zmc2V0SGVpZ2h0CiAgICAgICAgICApOwogICAgICAgIH0KCiAgICAgICAgaWYgKGJpbmRpbmcucmVzaXplKSB7CiAgICAgICAgICB2YXIgbGFzdFNpemUgPSB7fTsKICAgICAgICAgIHZhciByZXNpemVIYW5kbGVyID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICB2YXIgc2l6ZSA9IHsKICAgICAgICAgICAgICB3OiBzaXplT2JqID8gc2l6ZU9iai5nZXRXaWR0aCgpIDogZWwub2Zmc2V0V2lkdGgsCiAgICAgICAgICAgICAgaDogc2l6ZU9iaiA/IHNpemVPYmouZ2V0SGVpZ2h0KCkgOiBlbC5vZmZzZXRIZWlnaHQKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHNpemUudyA9PT0gMCAmJiBzaXplLmggPT09IDApCiAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICBpZiAoc2l6ZS53ID09PSBsYXN0U2l6ZS53ICYmIHNpemUuaCA9PT0gbGFzdFNpemUuaCkKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGxhc3RTaXplID0gc2l6ZTsKICAgICAgICAgICAgYmluZGluZy5yZXNpemUoZWwsIHNpemUudywgc2l6ZS5oLCBpbml0UmVzdWx0KTsKICAgICAgICAgIH07CgogICAgICAgICAgb24od2luZG93LCAicmVzaXplIiwgcmVzaXplSGFuZGxlcik7CgogICAgICAgICAgLy8gVGhpcyBpcyBuZWVkZWQgZm9yIGNhc2VzIHdoZXJlI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gPSBwYXJ0c1tpXTsKICAgICAgLy8gcGFydCBtYXkgYmUgYSBjaGFyYWN0ZXIgb3IgJ251bWVyaWMnIG1lbWJlciBuYW1lCiAgICAgIGlmIChvICE9PSBudWxsICYmIHR5cGVvZiBvID09PSAib2JqZWN0IiAmJiBwYXJ0IGluIG8pIHsKICAgICAgICBpZiAoaSA9PSAobCAtIDEpKSB7IC8vIGlmIHdlIGFyZSBhdCB0aGUgZW5kIG9mIHRoZSBsaW5lIHRoZW4gZXZhbHVsYXRlCiAgICAgICAgICBpZiAodHlwZW9mIG9bcGFydF0gPT09ICJzdHJpbmciKQogICAgICAgICAgICBvW3BhcnRdID0gZXZhbCgiKCIgKyBvW3BhcnRdICsgIikiKTsKICAgICAgICB9IGVsc2UgeyAvLyBvdGhlcndpc2UgY29udGludWUgdG8gbmV4dCBlbWJlZGRlZCBvYmplY3QKICAgICAgICAgIG8gPSBvW3BhcnRdOwogICAgICAgIH0KICAgICAgfQogICAgfQogIH07Cn0pKCk7Cgo="></script>
<script src="data:application/x-javascript;base64,IWZ1bmN0aW9uKCl7ZnVuY3Rpb24gbihuLHQpe3JldHVybiB0Pm4/LTE6bj50PzE6bj49dD8wOjAvMH1mdW5jdGlvbiB0KG4pe3JldHVybiBudWxsPT09bj8wLzA6K259ZnVuY3Rpb24gZShuKXtyZXR1cm4haXNOYU4obil9ZnVuY3Rpb24gcihuKXtyZXR1cm57bGVmdDpmdW5jdGlvbih0LGUscix1KXtmb3IoYXJndW1lbnRzLmxlbmd0aDwzJiYocj0wKSxhcmd1bWVudHMubGVuZ3RoPDQmJih1PXQubGVuZ3RoKTt1PnI7KXt2YXIgaT1yK3U+Pj4xO24odFtpXSxlKTwwP3I9aSsxOnU9aX1yZXR1cm4gcn0scmlnaHQ6ZnVuY3Rpb24odCxlLHIsdSl7Zm9yKGFyZ3VtZW50cy5sZW5ndGg8MyYmKHI9MCksYXJndW1lbnRzLmxlbmd0aDw0JiYodT10Lmxlbmd0aCk7dT5yOyl7d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ZiksZz0oYypjLWkqaStJYSpmKS8oMippKllhKmgpLHA9KGMqYy1pKmktSWEqZikvKDIqYypZYSpoKSx2PU1hdGgubG9nKE1hdGguc3FydChnKmcrMSktZyksZD1NYXRoLmxvZyhNYXRoLnNxcnQocCpwKzEpLXApLG09ZC12LHk9KG18fE1hdGgubG9nKGMvaSkpL09hO3JldHVybiBlLmR1cmF0aW9uPTFlMyp5LGV9LHRhLmJlaGF2aW9yLnpvb209ZnVuY3Rpb24oKXtmdW5jdGlvbiBuKG4pe24ub24oeixzKS5vbihYYSsiLnpvb20iLGgpLm9uKCJkYmxjbGljay56b29tIixnKS5vbihULGYpfWZ1bmN0aW9uIHQobil7cmV0dXJuWyhuWzBdLWsueCkvay5rLChuWzFdLWsueSkvay5rXX1mdW5jdGlvbiBlKG4pe3JldHVybltuWzBdKmsuaytrLngsblsxXSprLmsray55XX1mdW5jdGlvbiByKG4pe2suaz1NYXRoLm1heChBWzBdLE1hdGgubWluKEFbMV0sbikpfWZ1bmN0aW9uIHUobix0KXt0PWUodCksay54Kz1uWzBdLXRbMF0say55Kz1uWzFdLXRbMV19ZnVuY3Rpb24gaSh0LGUsaSxvKXt0Ll9fY2hhcnRfXz17eDprLngseTprLnksazprLmt9LHIoTWF0aC5wb3coMixvKSksdSh2PWUsaSksdD10YS5zZWxlY3QodCksTj4wJiYodD10LnRyYW5zaXRpb24oKS5kdXJhdGlvbihOKSksdC5jYWxsKG4uZXZlbnQpfWZ1bmN0aW9uIG8oKXt4JiZ4LmRvbWFpbihNLnJhbmdlKCkubWFwKGZ1bmN0aW9uKG4pe3JldHVybihuLWsueCkvay5rfSkubWFwKE0uaW52ZXJ0KSksUyYmUy5kb21haW4oXy5yYW5nZSgpLm1hcChmdW5jdGlvbihuKXtyZXR1cm4obi1rLnkpL2sua30pLm1hcChfLmludmVydCkpfWZ1bmN0aW9uIGEobil7QysrfHxuKHt0eXBlOiJ6b29tc3RhcnQifSl9ZnVuY3Rpb24gYyhuKXtvKCksbih7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ZD9kZWZpbmUodGEpOiJvYmplY3QiPT10eXBlb2YgbW9kdWxlJiZtb2R1bGUuZXhwb3J0cyYmKG1vZHVsZS5leHBvcnRzPXRhKSx0aGlzLmQzPXRhfSgpOw=="></script>
<link href="data:text/css;charset=utf-8,body%2Etheme%2Ddark%20%7B%0Abackground%2Dcolor%3A%20%23333%20%21important%3B%0A%7D%0A%2Elink%20%7B%0Afill%3A%20none%3B%0A%7D%0A%2Etheme%2Ddark%20%2Elink%20%7B%0A%7D%0A%2Ed3heatmap%20%7B%0Aposition%3A%20relative%3B%0Awidth%3A%20820px%3B%0Aheight%3A%20700px%3B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2Ed3heatmap%20%2Edomain%20%7B%0Afill%3A%20none%3B%0Astroke%3A%20none%3B%0A%7D%0A%2Ed3heatmap%20%2Eaxis%20%7B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2Ed3heatmap%20%2Eaxis%20line%20%7B%0Afill%3A%20none%3B%0Astroke%3A%20%23AAA%3B%0Astroke%2Dwidth%3A%201px%3B%0Ashape%2Drendering%3A%20crispEdges%3B%0A%7D%0A%2Ed3heatmap%20%2Eaxis%20text%2C%20%2Ed3heatmap%2Dtip%20%7B%0Afont%2Dsize%3A%2015px%3B%0Afont%2Dfamily%3A%20Ubuntu%20Sans%2C%20Segoe%20UI%2C%20Lucida%20Grande%2C%20sans%2Dserif%3B%0A%7D%0A%2Ed3heatmap%20%2Eaxis%20rect%20%7B%0Acursor%3A%20pointer%3B%0A%7D%0A%2Einner%20%7B%0Aposition%3A%20relative%3B%0A%7D%0A%2Einfo%20%7B%0Aposition%3A%20absolute%3B%0Aleft%3A%2020px%3B%0Atop%3A%2090px%3B%0Awidth%3A%20160px%3B%0Aheight%3A%20140px%3B%0Atext%2Dalign%3A%20right%3B%0Afont%2Dsize%3A%2040px%3B%0Apadding%2Dtop%3A%20118px%3B%0A%7D%0A%2Ed3heatmap%20text%20%7B%0Acursor%3A%20default%3B%0A%7D%0A%2Ed3heatmap%20%2Ebrush%20%2Eextent%7B%0Afill%2Dopacity%3A%200%2E15%3B%0Astroke%2Dwidth%3A%201px%3B%0A%7D%0A%2EcolDend%20%7B%0Aposition%3A%20absolute%3B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2ErowDend%20%7B%0Aposition%3A%20absolute%3B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2Ecolormap%20%7B%0Aposition%3A%20absolute%3B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2Etheme%2Ddark%20text%20%7B%0Afill%3A%20%23E2E2E2%3B%0A%7D%0A%2Ehighlighting%20%2Ecolormap%20%2Edatapt%20%7B%0Aopacity%3A%200%2E2%3B%0A%7D%0A%2Ehighlighting%20%2Ecolormap%20%2Edatapt%2Ehighlight%20%7B%0Aopacity%3A%201%3B%0A%7D%0A%2Ehighlighting%20%2Eaxis%20g%2Etick%2Efaded%20%7B%0Aopacity%3A%200%2E4%20%21important%3B%0A%7D%0A%2Ed3heatmap%2Dtip%20%7B%0Afont%2Dsize%3A%2013px%3B%0Acolor%3A%20white%3B%0Abackground%2Dcolor%3A%20%23444%3B%0Apadding%3A%206px%2012px%3B%0Abox%2Dshadow%3A%203px%203px%205px%200px%20rgba%280%2C%200%2C%200%2C%200%2E22%29%3B%0A%7D%0A%2Etheme%2Ddark%20%2Ed3heatmap%2Dtip%20%7B%0Abackground%2Dcolor%3A%20white%3B%0Acolor%3A%20%23444%3B%0A%7D%0A%2Ed3heatmap%2Dtip%20table%20%7B%0Aborder%2Dcollapse%3A%20separate%3B%0Aborder%2Dspacing%3A%202px%3B%0A%7D%0A%2Ed3heatmap%2Dtip%20th%2C%20%2Ed3heatmap%2Dtip%20td%20%7B%0Apadding%3A%200%201px%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/x-javascript;base64,ZnVuY3Rpb24gaGVhdG1hcChzZWxlY3RvciwgZGF0YSwgb3B0aW9ucykgewoKICAvLyA9PT09IEJFR0lOIEhFTFBFUlMgPT09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gPSAwOyBpIDwgd2lkdGhzLmxlbmd0aDsgaSsrKSB7CiAgICAgIGlmICh3aWR0aHNbaV0gPT09ICIqIikgewogICAgICAgIGlmIChmaWxsQ29sSW5kZXggIT09IG51bGwpIHsKICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiT25seSBvbmUgY29sdW1uIGNhbiBiZSBkZXNpZ25hdGVkIGFzIGZpbGwiKTsKICAgICAgICB9CiAgICAgICAgZmlsbENvbEluZGV4ID0gaTsKICAgICAgfSBlbHNlIHsKICAgICAgICB1c2VkV2lkdGggKz0gd2lkdGhzW2ldOwogICAgICB9CiAgICB9CiAgICBpZiAoZmlsbENvbEluZGV4ICE9PSBudWxsKSB7CiAgICAgIHdpZHRoc1tmaWxsQ29sSW5kZXhdID0gdG90YWxXaWR0aCAtIHVzZWRXaWR0aDsKICAgIH0gZWxzZSB7CiAgICAgIGlmICh0eXBlb2YodG90YWxXaWR0aCkgPT09ICJudW1iZXIiICYmIHRvdGFsV2lkdGggIT09IHVzZWRXaWR0aCkgewogICAgICAgIHRocm93IG5ldyBFcnJvcigiQ29sdW1uIHdpZHRocyBkb24ndCBhZGQgdXAgdG8gdG90YWwgd2lkdGgiKTsKICAgICAgfQogICAgfQogICAgZm9yIChpID0gMDsgaSA8IGhlaWdodHMubGVuZ3RoOyBpKyspIHsKICAgICAgaWYgKGhlaWdodHNbaV0gPT09ICIqIikgewogICAgICAgIGlmIChmaWxsUm93SW5kZXggIT09IG51bGwpIHsKICAgICAgICAgIHRocm93IG5ldyBFcnJvcigiT25seSBvbmUgcm93IGNhbiBiZSBkZXNpZ25hdGVkIGFzIGZpbGwiKTsKICAgICAgICB9CiAgICAgICAgZmlsbFJvd0luZGV4ID0gaTsKICAgICAgfSBlbHNlIHsKICAgICAgICB1c2VkSGVpZ2h0ICs9IGhlaWdodHNbaV07CiAgICAgIH0KICAgIH0KICAgIGlmIChmaWxsUm93SW5kZXggIT09IG51bGwpIHsKICAgICAgaGVpZ2h0c1tmaWxsUm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KICAgICAgICAgICAgIjx0cj48dGggYWxpZ249XCJyaWdodFwiPlZhbHVlPC90aD48dGQ+IiArIGh0bWxFc2NhcGUoZC5sYWJlbCkgKyAiPC90ZD48L3RyPiIgKwogICAgICAgICAgICAiPC90YWJsZT4iOwogICAgICAgIH0pCiAgICAgICAgLmRpcmVjdGlvbigic2UiKQogICAgICAgIC5zdHlsZSgicG9zaXRpb24iLCAiZml4ZWQiKTsKICAgIAogICAgdmFyIGJydXNoID0gZDMuc3ZnLmJydXNoKCkKICAgICAgICAueCh4KQogICAgICAgIC55KHkpCiAgICAgICAgLmNsYW1wKFt0cnVlLCB0cnVlXSkKICAgICAgICAub24oJ2JydXNoJywgZnVuY3Rpb24oKSB7CiAgICAgICAgICB2YXIgZXh0ZW50ID0gYnJ1c2guZXh0ZW50KCk7CiAgICAgICAgICBleHRlbnRbMF1bMF0gPSBNYXRoLnJvdW5kKGV4dGVudFswXVswXSk7CiAgICAgICAgICBleHRlbnRbMF1bMV0gPSBNYXRoLnJvdW5kKGV4dGVudFswXVsxXSk7CiAgICAgICAgICBleHRlbnRbMV1bMF0gPSBNYXRoLnJvdW5kKGV4dGVudFsxXVswXSk7CiAgICAgICAgICBleHRlbnRbMV1bMV0gPSBNYXRoLnJvdW5kKGV4dGVudFsxXVsxXSk7CiAgICAgICAgICBkMy5zZWxlY3QodGhpcykuY2FsbChicnVzaC5leHRlbnQoZXh0ZW50KSk7CiAgICAgICAgfSkKICAgICAgICAub24oJ2JydXNoZW5kJywgZnVuY3Rpb24oKSB7CgogICAgICAgICAgaWYgKGJydXNoLmVtcHR5KCkpIHsKICAgICAgICAgICAgY29udHJvbGxlci50cmFuc2Zvcm0oewogICAgICAgICAgICAgIHNjYWxlOiBbMSwxXSwKICAgICAgICAgICAgICB0cmFuc2xhdGU6IFswLDBdLAogICAgICAgICAgICAgIGV4dGVudDogW1swLDBdLFtjb2xzLHJvd3NdXQogICAgICAgICAgICB9KTsKICAgICAgICAgIH0gZWxzZSB7CiAg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CiAgICAgICAgICBpZiAodHlwZW9mKG9mZnNldFgpID09PSAidW5kZWZpbmVkIikgewogICAgICAgICAgICAvLyBGaXJlZm94IDM4IGFuZCBlYXJsaWVyCiAgICAgICAgICAgIHZhciB0YXJnZXQgPSBlLnRhcmdldCB8fCBlLnNyY0VsZW1lbnQ7CiAgICAgICAgICAgIHZhciByZWN0ID0gdGFyZ2V0LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgICAgICBvZmZzZXRYID0gZS5jbGllbnRYIC0gcmVjdC5sZWZ0LAogICAgICAgICAgICBvZmZzZXRZID0gZS5jbGllbnRZIC0gcmVjdC50b3A7CiAgICAgICAgICB9CiAgICAgICAgICAKICAgICAgICAgIHZhciBjb2wgPSBNYXRoLmZsb29yKHguaW52ZXJ0KG9mZnNldFgpKTsKICAgICAgICAgIHZhciByb3cgPSBNYXRoLmZsb29yKHkuaW52ZXJ0KG9mZnNldFkpKTsKICAgICAgICAgIHZhciBsYWJlbCA9IG1lcmdlZFtyb3cqY29scyArIGNvbF0ubGFiZWw7CiAgICAgICAgICB0aXAuc2hvdyh7Y29sOiBjb2wsIHJvdzogcm93LCBsYWJlbDogbGFiZWx9KS5zdHlsZSh7CiAgICAgICAgICAgIHRvcDogZDMuZXZlbnQuY2xpZW50WSArIDE1ICsgInB4IiwKICAgICAgICAgICAgbGVmdDogZDMuZXZlbnQuY2xpZW50WCArIDE1ICsgInB4IiwKICAgICAgICAgICAgb3BhY2l0eTogMC45CiAgICAgICAgICB9KTsKICAgICAgICAgIGNvbnRyb2xsZXIuZGF0YXBvaW50X2hvdmVyKHtjb2w6Y29sLCByb3c6cm93LCBsYWJlbDpsYWJlbH0pOwogICAgICAgIH0pCiAgICAgICAgLm9uKCJtb3VzZWxlYXZlIiwgZnVuY3Rpb24oKSB7CiAgICAgICAgICB0aXAuaGlkZSgpLnN0eWxlKCJkaXNwbGF5IiwgIm5vbmUiKTsKICAgICAgICAgIGNvbnRyb2xsZXIuZGF0YXB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gICAuYXR0cigiZmlsbCIsICJ0cmFuc3BhcmVudCIpCiAgICAgICAgICAub24oImNsaWNrIiwgZnVuY3Rpb24oZCwgaSkgewogICAgICAgICAgICB2YXIgZGltID0gcm90YXRlZCA/ICd4JyA6ICd5JzsKICAgICAgICAgICAgdmFyIGhsID0gY29udHJvbGxlci5oaWdobGlnaHQoKSB8fCB7eDpudWxsLCB5Om51bGx9OwogICAgICAgICAgICBpZiAoaGxbZGltXSA9PSBpKSB7CiAgICAgICAgICAgICAgLy8gSWYgY2xpY2tlZCBhbHJlYWR5LWhpZ2hsaWdodGVkIHJvdy9jb2wsIHRoZW4gdW5oaWdobGlnaHQKICAgICAgICAgICAgICBobFtkaW1dID0gbnVsbDsKICAgICAgICAgICAgICBjb250cm9sbGVyLmhpZ2hsaWdodChobCk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgaGxbZGltXSA9IGk7CiAgICAgICAgICAgICAgY29udHJvbGxlci5oaWdobGlnaHQoaGwpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGQzLmV2ZW50LnN0b3BQcm9wYWdhdGlvbigpOwogICAgICAgICAgfSk7CiAgICBmdW5jdGlvbiBsYXlvdXRNb3VzZVRhcmdldHMoc2VsZWN0aW9uKSB7CiAgICAgIHNlbGVjdGlvbgogICAgICAgICAgLmF0dHIoInRyYW5zZm9ybSIsIGZ1bmN0aW9uKGQsIGkpIHsKICAgICAgICAgICAgdmFyIHggPSByb3RhdGVkID8gc2NhbGUoZCkgKyBzY2FsZS5yYW5nZUJhbmQoKS8yIDogMDsKICAgICAgICAgICAgdmFyIHkgPSByb3RhdGVkID8gcGFkZGluZyArIDYgOiBzY2FsZShkKTsKICAgICAgICAgICAgcmV0dXJuICJ0cmFuc2xhdGUoIiArIHggKyAiLCIgKyB5ICsgIikiOwogICAgICAgICAgfSkKICAgICAgICAuc2VsZWN0QWxsKCJyZWN0IikKICAgICAgICAgIC5hdHRyKCJoZWlnaHQiLCBzY2FsZS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lvbihkLCBpKSB7CiAgICAgICAgICB2YXIgcGF0dGVybjsKICAgICAgICAgIHN3aXRjaCAoZC5lZGdlUGFyLmx0eSkgewogICAgICAgICAgICBjYXNlIDY6CiAgICAgICAgICAgICAgcGF0dGVybiA9IFszLDMsNSwzXTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA1OgogICAgICAgICAgICAgIHBhdHRlcm4gPSBbMTUsNV07CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNDoKICAgICAgICAgICAgICBwYXR0ZXJuID0gWzIsNCw0LDRdOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDM6CiAgICAgICAgICAgICAgcGF0dGVybiA9IFsyLDRdOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDI6CiAgICAgICAgICAgICAgcGF0dGVybiA9IFs0LDRdOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDE6CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgcGF0dGVybiA9IFtdOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwYXR0ZXJuLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIHBhdHRlcm5baV0gPSBwYXR0ZXJuW2ldICogKGQuZWRnZVBhci5sd2QgfHwgMSk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcGF0dGVybi5qb2luKCIsIik7CiAgICAgICAgfSk7CgogICAgZnVuY3Rpb24gZHJhdyhzZWxlY3Rpb24pIHsKICAgICAgZnVuY3Rpb24gZWxib3coZCwgaSkgewogICAgICAgIHJldHVybiB4KGQuc291cmNlLnkpICsgIiwiICsgeShkLnNvdXJjZS54KSArICIgIiArCiAgICAgICAgICAgIHgoZC5zb3VyY2UueSkgKyAiLCIgKyB5KGQudGFyZ2V0LngpICsg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50ZXIoZSkgewogICAgY29udHJvbGxlci5oaWdobGlnaHQobnVsbCwgK2QzLnNlbGVjdCh0aGlzKS5hdHRyKCJpbmRleCIpKTsKICB9CiAgZnVuY3Rpb24gb25fcm93X2xhYmVsX21vdXNlbGVhdmUoZSkgewogICAgY29udHJvbGxlci5oaWdobGlnaHQobnVsbCwgbnVsbCk7CiAgfQoKICByZXR1cm4gewogICAgb246IGZ1bmN0aW9uKHR5cGUsIGxpc3RlbmVyKSB7CiAgICAgIGRpc3BhdGNoZXIub24odHlwZSwgbGlzdGVuZXIpOwogICAgICByZXR1cm4gdGhpczsKICAgIH0KICB9Owp9Cg=="></script>
<script src="data:application/x-javascript;base64,Ly8gZDMudGlwCi8vIENvcHlyaWdodCAoYykgMjAxMyBKdXN0aW4gUGFsbWVyCi8vCi8vIFRvb2x0aXBzIGZvciBkMy5qcyBTVkcgdmlzdWFsaXphdGlvbnMKCihmdW5jdGlvbiAocm9vdCwgZmFjdG9yeSkgewogIGlmICh0eXBlb2YgZGVmaW5lID09PSAnZnVuY3Rpb24nICYmIGRlZmluZS5hbWQpIHsKICAgIC8vIEFNRC4gUmVnaXN0ZXIgYXMgYW4gYW5vbnltb3VzIG1vZHVsZSB3aXRoIGQzIGFzIGEgZGVwZW5kZW5jeS4KICAgIGRlZmluZShbJ2QzJ10sIGZhY3RvcnkpCiAgfSBlbHNlIGlmICh0eXBlb2YgbW9kdWxlID09PSAnb2JqZWN0JyAmJiBtb2R1bGUuZXhwb3J0cykgewogICAgLy8gQ29tbW9uSlMKICAgIG1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24oZDMpIHsKICAgICAgZDMudGlwID0gZmFjdG9yeShkMykKICAgICAgcmV0dXJuIGQzLnRpcAogICAgfQogIH0gZWxzZSB7CiAgICAvLyBCcm93c2VyIGdsb2JhbC4KICAgIHJvb3QuZDMudGlwID0gZmFjdG9yeShyb290LmQzKQogIH0KfSh0aGlzLCBmdW5jdGlvbiAoZDMpIHsKCiAgLy8gU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Z0OiBiYm94Lm4ueCAtIG5vZGUub2Zmc2V0V2lkdGggLyAyCiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXJlY3Rpb25fcygpIHsKICAgICAgdmFyIGJib3ggPSBnZXRTY3JlZW5CQm94KCkKICAgICAgcmV0dXJuIHsKICAgICAgICB0b3A6ICBiYm94LnMueSwKICAgICAgICBsZWZ0OiBiYm94LnMueCAtIG5vZGUub2Zmc2V0V2lkdGggLyAyCiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXJlY3Rpb25fZSgpIHsKICAgICAgdmFyIGJib3ggPSBnZXRTY3JlZW5CQm94KCkKICAgICAgcmV0dXJuIHsKICAgICAgICB0b3A6ICBiYm94LmUueSAtIG5vZGUub2Zmc2V0SGVpZ2h0IC8gMiwKICAgICAgICBsZWZ0OiBiYm94LmUueAogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZGlyZWN0aW9uX3coKSB7CiAgICAgIHZhciBiYm94ID0gZ2V0U2NyZWVuQkJveCgpCiAgICAgIHJldHVybiB7CiAgICAgICAgdG9wOiAgYmJveC53LnkgLSBub2RlLm9mZnNldEhlaWdodCAvIDIsCiAgICAgICAgbGVmdDogYmJveC53LnggLSBub2RlLm9mZnNldFdpZHRoCiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXJlY3Rpb25fbncoKSB7CiAgICAgIHZhciBiYm94ID0gZ2V0U2NyZWVuQkJveCgpCiAgICAgIHJldHVybiB7CiAgICAgICAgdG9wOiAgYmJveC5udy55IC0gbm9kZS5vZmZzZXRIZWlnaHQsCiAgICAgICAgbGVmdDogYmJveC5udy54IC0gbm9kZS5vZmZzZXRXaWR0aAogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZGlyZWN0aW9uX25lKCkgewogICAgICB2YXIgYmJveCA9IGdldFNjcmVlbkJCb3goKQogICAgICByZXR1cm4gewogICAgICAgIHRvcDogIGJib3gubmUueSAtIG5vZGUub2Zmc2V0SGVpZ2h0LAogICAgICAgIGxlZnQ6IGJib3gubmUueAogICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZGlyZWN0aW9uX3N3KCkgewogICAgICB2YXIgYmJveCA9IGdldFNjcmVlbkJCb3goKQogICAgICByZXR1cm4gewogICAgICAgIHRvcDogIGJib3guc3cueSwKICAgICAgICBsZWZ0OiBiYm94LnN3LnggLSBub2RlLm9mZnNldFdpZHRoCiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBkaXJlY3Rpb25fc2UoKSB7CiAgICAgIHZhciBiYm94ID0gZ2V0U2NyZWVuQkJveCgpCiAgICAgIHJldHVybiB7CiAgICAgICAgdG9wOiAgYmJveC5zZS55LAogICAgICAgIGxlZnQ6IGJib3guZS54CiAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBpbml0Tm9kZSgpIHsKICAgICAgdmFyIG5vZGUgPSBkMy5zZWxlY3QoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2JykpCiAgICAgIG5vZGUuc3R5bGUoewogICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLAogICAgICAgIHRvcDogMCwKICAgICAgICBvcGFjaXR5OiAwLAogICAgICAgICdwb2ludGVyLWV2ZW50cyc6ICdub25lJywKICAgICAgICAnYm94LXNpemluZyc6ICdib3JkZXItYm94JwogICAgICB9KQoKICAgICAgcmV0dXJuIG5vZGUubm9kZSgpCiAgICB9CgogICAgZnVuY3Rpb24gZ2V0U1ZHTm9kZShlbCkgewogICAgICBlbCA9IGVsLm5vZGUoKQogICAgICBpZihlbC50YWdOYW1lLnRvTG93ZXJDYXNlKCkgPT09ICdzdmcnKQogICAgICAgIHJldHVybiBlbAoKICAgICAgcmV0dXJuIGVsLm93bmVyU1ZHRWxlbWVudAogICAgfQoKICAgIC8vIFByaXZhdGUgLSBnZXRzIHRoZSBzY3JlZW4gY29vcmRpbmF0ZXMgb2YgYSBzaGFwZQogICAgLy8KICAgIC8vIEdpdmVuIGEgc2hhcGUgb24gdGhlIHNjcmVlbiwgd2lsbCByZXR1cm4gYW4gU1ZHUG9pbnQgZm9yIHRoZSBkaXJlY3Rpb25zCiAgICAvLyBuKG5vcnRoKSwgcyhzb3V0aCksIGUoZWFzdCksIHcod2VzdCksIG5lKG5vcnRoZWFzdCksIHNlKHNvdXRoZWFzdCksIG53KG5vcnRod2VzdCksCiAgICAvLyBzdyhzb3V0aHdlc3QpLgogICAgLy8KICAgIC8vICAgICstKy0rCiAgICAvLyAgICB8ICAgfAogICAgLy8gICAgKyAgICsKICAgIC8vICAgIHwgICB8CiAgICAvLyAgICArLSstKwogICAgLy8KICAgIC8vIFJldHVybnMgYW4gT2JqZWN0IHtuLCBzLCBlLCB3LCBudywgc3csIG5lLCBzZX0KICAgIGZ1bmN0aW9uIGdldFNjcmVlbkJCb3goKSB7CiAgICAgIHZhciB0YXJnZXRlbCAgID0gdGFyZ2V0IHx8IGQzLmV2ZW50LnRhcmdldCwKICAgICAgICAgIGJib3ggICAgICAgPSB7fSwKICAgICAgICAgIG1hdHJpeCAgICAgPSB0YXJnZXRlbC5nZXRTY3JlZW5DVE0oKSwKICAgICAgICAgIHRiYm94ICAgICAgPSB0YXJnZXRlbC5nZXRCQm94KCksCiAgICAgICAgICB3aWR0aCAgICAgID0gdGJib3gud2lkdGgsCiAgICAgICAgICBoZWlnaHQgICAgID0gdGJib3guaGVpZ2h0LAogICAgICAgICAgeCAgICAgICAgICA9IHRiYm94LngsCiAgICAgICAgICB5ICAgICAgICAgID0gdGJib3gueQoKICAgICAgcG9pbnQueCA9IHgKICAgICAgcG9pbnQueSA9IHkKICAgICAgYmJveC5udyA9IHBvaW50Lm1hdHJpeFRyYW5zZm9ybShtYXRyaXgpCiAgICAgIHBvaW50LnggKz0gd2lkdGgKICAgICAgYmJveC5uZSA9IHBvaW50Lm1hdHJpeFRyYW5zZm9ybShtYXRyaXgpCiAgICAgIHBvaW50LnkgKz0gaGVpZ2h0CiAgICAgIGJib3guc2UgPSBwb2ludC5tYXRyaXhUcmFuc2Zvcm0obWF0cml4KQogICAgICBwb2ludC54IC09IHdpZHRoCiAgICAgIGJib3guc3cgPSBwb2ludC5tYXRyaXhUcmFuc2Zvcm0obWF0cml4KQogICAgICBwb2ludC55IC09IGhlaWdodCAvIDIKICAgICAgYmJveC53ICA9IHBvaW50Lm1hdHJpeFRyYW5zZm9ybShtYXRyaXgpCiAgICAgIHBvaW50LnggKz0gd2lkdGgKICAgICAgYmJveC5lID0gcG9pbnQubWF0cml4VHJhbnNmb3JtKG1hdHJpeCkKICAgICAgcG9pbnQueCAtPSB3aWR0aCAvIDIKICAgICAgcG9pbnQueSAtPSBoZWlnaHQgLyAyCiAgICAgIGJib3gubiA9IHBvaW50Lm1hdHJpeFRyYW5zZm9ybShtYXRyaXgpCiAgICAgIHBvaW50LnkgKz0gaGVpZ2h0CiAgICAgIGJib3gucyA9IHBvaW50Lm1hdHJpeFRyYW5zZm9ybShtYXRyaXgpCgogICAgICByZXR1cm4gYmJveAogICAgfQoKICAgIHJldHVybiB0aXAKICB9OwoKfSkpOwo="></script>
<script src="data:application/x-javascript;base64,SFRNTFdpZGdldHMud2lkZ2V0KHsKCiAgbmFtZTogJ2QzaGVhdG1hcCcsCgogIHR5cGU6ICdvdXRwdXQnLAoKICBpbml0aWFsaXplOiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCkgewoKICAgIHJldHVybiB7CiAgICAgIGxhc3RUaGVtZTogbnVsbCwKICAgICAgbGFzdFZhbHVlOiBudWxsCiAgICB9OwoKICB9LAogIAogIHJlbmRlclZhbHVlOiBmdW5jdGlvbihlbCwgeCwgaW5zdGFuY2UpIHsKICAgIHRoaXMuZG9SZW5kZXJWYWx1ZShlbCwgeCwgaW5zdGFuY2UpOwogIH0sCgogIC8vIE5lZWQgZGVkaWNhdGVkIGhlbHBlciBmdW5jdGlvbiB0aGF0IGNhbiBiZSBjYWxsZWQgYnkgYm90aCByZW5kZXJWYWx1ZQogIC8vIGFu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ggPSBpbWdEYXRhQ2FudmFzLmdldENvbnRleHQoIjJkIik7CiAgICAgIGltZ0RhdGFDdHguZHJhd0ltYWdlKGltZywgMCwgMCk7CgogICAgICAvLyBTYXZlIHRoZSBpbWFnZSBkYXRhLgogICAgICBpbWdEYXRhID0gaW1nRGF0YUN0eC5nZXRJbWFnZURhdGEoMCwgMCwgdywgaCkuZGF0YTsKCiAgICAgIC8vIERvbmUgd2l0aCB0aGUgY2FudmFzLCByZW1vdmUgaXQgZnJvbSB0aGUgcGFnZSBzbyBpdCBjYW4gYmUgZ2MnZC4KICAgICAgZG9jdW1lbnQuYm9keS5yZW1vdmVDaGlsZChpbWdEYXRhQ2FudmFzKTsKICAgICAgCiAgICAgIGNhbGxiYWNrKGltZ0RhdGEsIHcsIGgpOwogICAgfTsKICAgIGltZy5zcmMgPSB1cmk7CiAgfQoKfSk7Cg=="></script>
</head>
<body style="background-color:white;">
<div id="htmlwidget_container">
<div id="htmlwidget-7114" style="width:960px;height:500px;" class="d3heatmap"></div>
</div>
<script type="application/json" data-for="htmlwidget-7114">{"x":{"rows":{"members":32,"height":425.344651694364,"edgePar":{"col":""},"children":[{"members":23,"height":261.849881468371,"edgePar":{"col":""},"children":[{"members":16,"height":141.704447795403,"edgePar":{"col":""},"children":[{"members":12,"height":113.302300506212,"edgePar":{"col":""},"children":[{"members":11,"height":74.3824295717746,"edgePar":{"col":""},"children":[{"members":6,"height":50.1094029998363,"edgePar":{"col":""},"children":[{"members":5,"height":33.180384265406,"edgePar":{"col":""},"children":[{"members":4,"height":20.6939435584424,"edgePar":{"col":""},"children":[{"members":3,"height":13.1357108677072,"edgePar":{"col":""},"children":[{"members":2,"height":8.65359029536296,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Toyota Corona","edgePar":{"col":""}},{"members":1,"height":0,"label":"Porsche 914-2","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Datsun 710","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Volvo 142E","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Merc 230","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Lotus Europa","edgePar":{"col":""}}]},{"members":5,"height":64.889871320569,"edgePar":{"col":""},"children":[{"members":4,"height":15.6724726830197,"edgePar":{"col":""},"children":[{"members":2,"height":1.52315462117278,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Merc 280","edgePar":{"col":""}},{"members":1,"height":0,"label":"Merc 280C","edgePar":{"col":""}}]},{"members":2,"height":0.61532511731604,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Mazda RX4 Wag","edgePar":{"col":""}},{"members":1,"height":0,"label":"Mazda RX4","edgePar":{"col":""}}]}]},{"members":1,"height":0,"label":"Merc 240D","edgePar":{"col":""}}]}]},{"members":1,"height":0,"label":"Ferrari Dino","edgePar":{"col":""}}]},{"members":4,"height":14.7807070196253,"edgePar":{"col":""},"children":[{"members":3,"height":10.3922856003865,"edgePar":{"col":""},"children":[{"members":2,"height":5.14734154685698,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Fiat 128","edgePar":{"col":""}},{"members":1,"height":0,"label":"Fiat X1-9","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Toyota Corolla","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Honda Civic","edgePar":{"col":""}}]}]},{"members":7,"height":103.431069316719,"edgePar":{"col":""},"children":[{"members":5,"height":51.8242520447715,"edgePar":{"col":""},"children":[{"members":3,"height":2.13834047803431,"edgePar":{"col":""},"children":[{"members":2,"height":0.982649479723062,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Merc 450SL","edgePar":{"col":""}},{"members":1,"height":0,"label":"Merc 450SE","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Merc 450SLC","edgePar":{"col":""}}]},{"members":2,"height":14.0154994559595,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Dodge Challenger","edgePar":{"col":""}},{"members":1,"height":0,"label":"AMC Javelin","edgePar":{"col":""}}]}]},{"members":2,"height":33.5508692137775,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Hornet 4 Drive","edgePar":{"col":""}},{"members":1,"height":0,"label":"Valiant","edgePar":{"col":""}}]}]}]},{"members":9,"height":214.936685793747,"edgePar":{"col":""},"children":[{"members":8,"height":134.811946429091,"edgePar":{"col":""},"children":[{"members":5,"height":101.738968566622,"edgePar":{"col":""},"children":[{"members":3,"height":21.2655989805131,"edgePar":{"col":""},"children":[{"members":2,"height":10.0761202851097,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Duster 360","edgePar":{"col":""}},{"members":1,"height":0,"label":"Camaro Z28","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Ford Pantera L","edgePar":{"col":""}}]},{"members":2,"height":40.005247468301,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Pontiac Firebird","edgePar":{"col":""}},{"members":1,"height":0,"label":"Hornet Sportabout","edgePar":{"col":""}}]}]},{"members":3,"height":40.8399635773589,"edgePar":{"col":""},"children":[{"members":2,"height":15.6224446230416,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"Cadillac Fleetwood","edgePar":{"col":""}},{"members":1,"height":0,"label":"Lincoln Continental","edgePar":{"col":""}}]},{"members":1,"height":0,"label":"Chrysler Imperial","edgePar":{"col":""}}]}]},{"members":1,"height":0,"label":"Maserati Bora","edgePar":{"col":""}}]}]},"cols":{"members":11,"height":1475.10429122825,"edgePar":{"col":""},"children":[{"members":9,"height":115.849514457334,"edgePar":{"col":""},"children":[{"members":7,"height":34.7850542618522,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"cyl","edgePar":{"col":""}},{"members":6,"height":18.9208879284245,"edgePar":{"col":""},"children":[{"members":2,"height":3.60555127546399,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"am","edgePar":{"col":""}},{"members":1,"height":0,"label":"vs","edgePar":{"col":""}}]},{"members":4,"height":10.6897474245185,"edgePar":{"col":""},"children":[{"members":2,"height":8.59634050046879,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"carb","edgePar":{"col":""}},{"members":1,"height":0,"label":"wt","edgePar":{"col":""}}]},{"members":2,"height":2.98172768709686,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"drat","edgePar":{"col":""}},{"members":1,"height":0,"label":"gear","edgePar":{"col":""}}]}]}]}]},{"members":2,"height":33.2610913831762,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"qsec","edgePar":{"col":""}},{"members":1,"height":0,"label":"mpg","edgePar":{"col":""}}]}]},{"members":2,"height":656.640441946732,"edgePar":{"col":""},"children":[{"members":1,"height":0,"label":"hp","edgePar":{"col":""}},{"members":1,"height":0,"label":"disp","edgePar":{"col":""}}]}]},"matrix":{"data":["4","0","1","1","2.465","3.7","3","20.01","21.5","97","120.1","4","1","0","2","2.14","4.43","5","16.7","26","91","120.3","4","1","1","1","2.32","3.85","4","18.61","22.8","93","108","4","1","1","2","2.78","4.11","4","18.6","21.4","109","121","4","0","1","2","3.15","3.92","4","22.9","22.8","95","140.8","4","1","1","2","1.513","3.77","5","16.9","30.4","113","95.1","6","0","1","4","3.44","3.92","4","18.3","19.2","123","167.6","6","0","1","4","3.44","3.92","4","18.9","17.8","123","167.6","6","1","0","4","2.875","3.9","4","17.02","21","110","160","6","1","0","4","2.62","3.9","4","16.46","21","110","160","4","0","1","2","3.19","3.69","4","20","24.4","62","146.7","6","1","0","6","2.77","3.62","5","15.5","19.7","175","145","4","1","1","1","2.2","4.08","4","19.47","32.4","66","78.7","4","1","1","1","1.935","4.08","4","18.9","27.3","66","79","4","1","1","1","1.835","4.22","4","19.9","33.9","65","71.1","4","1","1","2","1.615","4.93","4","18.52","30.4","52","75.7","8","0","0","3","3.73","3.07","3","17.6","17.3","180","275.8","8","0","0","3","4.07","3.07","3","17.4","16.4","180","275.8","8","0","0","3","3.78","3.07","3","18","15.2","180","275.8","8","0","0","2","3.52","2.76","3","16.87","15.5","150","318","8","0","0","2","3.435","3.15","3","17.3","15.2","150","304","6","0","1","1","3.215","3.08","3","19.44","21.4","110","258","6","0","1","1","3.46","2.76","3","20.22","18.1","105","225","8","0","0","4","3.57","3.21","3","15.84","14.3","245","360","8","0","0","4","3.84","3.73","3","15.41","13.3","245","350","8","1","0","4","3.17","4.22","5","14.5","15.8","264","351","8","0","0","2","3.845","3.08","3","17.05","19.2","175","400","8","0","0","2","3.44","3.15","3","17.02","18.7","175","360","8","0","0","4","5.25","2.93","3","17.98","10.4","205","472","8","0","0","4","5.424","3","3","17.82","10.4","215","460","8","0","0","4","5.345","3.23","3","17.42","14.7","230","440","8","1","0","8","3.57","3.54","5","14.6","15","335","301"],"dim":[32,11],"rows":["Toyota Corona","Porsche 914-2","Datsun 710","Volvo 142E","Merc 230","Lotus Europa","Merc 280","Merc 280C","Mazda RX4 Wag","Mazda RX4","Merc 240D","Ferrari Dino","Fiat 128","Fiat X1-9","Toyota Corolla","Honda Civic","Merc 450SL","Merc 450SE","Merc 450SLC","Dodge Challenger","AMC Javelin","Hornet 4 Drive","Valiant","Duster 360","Camaro Z28","Ford Pantera L","Pontiac Firebird","Hornet Sportabout","Cadillac Fleetwood","Lincoln Continental","Chrysler Imperial","Maserati Bora"],"cols":["cyl","am","vs","carb","wt","drat","gear","qsec","mpg","hp","disp"]},"image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAALCAYAAAAeEY8BAAAEFElEQVQ4jXXTf0zUdRzH8efne9+7487jjuNAjB8K/uCAGkNl5RBrLiVLaqX/WGvLPzKbM/uxippZlrPF1lois6lzjen6MbRyOibiciVITiBKxR3k8fOEAzm444K7477fT380r1j2/2Pvvfd6vd9CO7NNityFNCXvYH3PXsjKJLrsccy/1nMm9TXWLfJj6W1ATIXRbw/TUPQxlaFaWJCFvHGdQ9bXGQ9G2FPYyGXjVsoCBxGx2YQ1GRTW9+xFpDgYvf8VDCIOgETB5f0Sobe8LWVgIoErzKdAUWnVNpPvDANgVQMk+ZsR/mH028PcXbjCfArScxmMrM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ME5f5AAAAAElFTkSuQmCC","theme":null,"options":{"xaxis_height":80,"yaxis_width":120,"xaxis_font_size":null,"yaxis_font_size":null,"brush_color":"#0000FF","show_grid":true,"anim_duration":500}},"evals":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-7114">{"viewer":{"width":450,"height":350,"padding":15,"fill":true},"browser":{"width":960,"height":500,"padding":40,"fill":true}}</script>
</body>
</html>