D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
hjken
Full window
Github gist
Interactive Education Table
Built with
blockbuilder.org
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <script src="data:application/x-javascript;base64,KGZ1bmN0aW9uKCkgewogIC8vIElmIHdpbmRvdy5IVE1MV2lkZ2V0cyBpcyBhbHJlYWR5IGRlZmluZWQsIHRoZW4gdXNlIGl0OyBvdGhlcndpc2UgY3JlYXRlIGEKICAvLyBuZXcgb2JqZWN0LiBUaGlzIGFsbG93cyBwcmVjZWRpbmcgY29kZSB0byBzZXQgb3B0aW9ucyB0aGF0IGFmZmVjdCB0aGUKICAvLyBpbml0aWFsaXphdGlvbiBwcm9jZXNzICh0aG91Z2ggbm9uZSBjdXJyZW50bHkgZXhpc3QpLgogIHdpbmRvdy5IVE1MV2lkZ2V0cyA9IHdpbmRvdy5IVE1MV2lkZ2V0cyB8fCB7fTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gYSB2aWV3ZXIgcGFuZS4gSWYgbm90LCB3ZSdyZSBpbiBhIHdlYiBicm93c2VyLgogIHZhciB2aWV3ZXJNb2RlID0gd2luZG93LkhUTUxXaWRnZXRzLnZpZXdlck1vZGUgPQogICAgICAvXGJ2aWV3ZXJfcGFuZT0xXGIvLnRlc3Qod2luZG93LmxvY2F0aW9uKTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gU2hpbnkgbW9kZS4gSWYgbm90LCBpdCdzIGEgc3RhdGljIGRvY3VtZW50LgogIC8vIE5vdGUgdGhhdCBzdGF0aWMgd2lkZ2V0cyBjYW4gYXBwZWFyIGluIGJvdGggU2hpbnkgYW5kIHN0YXRpYyBtb2RlcywgYnV0CiAgLy8gb2J2aW91c2x5LCBTaGlueSB3aWRnZXRzIGNhbiBvbmx5IGFwcGVhciBpbiBTaGlueSBhcHBzL2RvY3VtZW50cy4KICB2YXIgc2hpbnlNb2RlID0gd2luZG93LkhUTUxXaWR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1bmN0aW9uIikgewogICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJUYXNrIG11c3QgYmUgYSBmdW5jdGlvbiEgU291cmNlOlxuIiArIHRhc2spOwogICAgICAgIH0KICAgICAgICB0YXNrRnVuYy5hcHBseSh0YXJnZXQsIHRoZXNlQXJncyk7CiAgICAgIH0pOwogICAgfQogIH0KCiAgZnVuY3Rpb24gaW5pdFNpemluZyhlbCkgewogICAgdmFyIHNpemluZyA9IHNpemluZ1BvbGljeShlbCk7CiAgICBpZiAoIXNpemluZykKICAgICAgcmV0dXJuOwoKICAgIHZhciBjZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaHRtbHdpZGdldF9jb250YWluZXIiKTsKICAgIGlmICghY2VsKQogICAgICByZXR1cm47CgogICAgaWYgKHR5cGVvZihzaXppbmcucGFkZGluZykgIT09ICJ1bmRlZmluZWQiKSB7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUubWFyZ2luID0gIjAiOwogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLnBhZGRpbmcgPSBwYWRkaW5nVG9Dc3ModW5wYWNrUGFkZGluZyhzaXppbmcucGFkZGluZykpOwogICAgfQoKICAgIGlmIChzaXppbmcuZmlsbCkgewogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLm92ZXJmbG93ID0gImhpZGRlbiI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUuaGVpZ2h0ID0gIjEwMCUiOwogICAgICBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zdHlsZS5oZWlnaHQgPSAiMTAwJSI7CiAgICAgIGlmIChjZWwpIHsKICAgICAgICBjZWwuc3R5bGUucG9zaXRpb24gPSAiYWJzb2x1dGUiOwogICAgICAgIHZhci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LCBlbC5vZmZzZXRXaWR0aCkKICAgICAgICAgICAgLmNzcygiaGVpZ2h0IiwgZWwub2Zmc2V0SGVpZ2h0KTsKICAgICAgICAgIGVycm9yRGl2LnRleHQoZXJyLm1lc3NhZ2UpOwogICAgICAgICAgJGVsLmFmdGVyKGVycm9yRGl2KTsKCiAgICAgICAgICAvLyBSZWFsbHkgZHVtYiB3YXkgdG8ga2VlcCB0aGUgc2l6ZS9wb3NpdGlvbiBvZiB0aGUgZXJyb3IgaW4gc3luYyB3aXRoCiAgICAgICAgICAvLyB0aGUgcGFyZW50IGVsZW1lbnQgYXMgdGhlIHdpbmRvdyBpcyByZXNpemVkIG9yIHdoYXRldmVyLgogICAgICAgICAgdmFyIGludElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmICghZXJyb3JEaXZbMF0ucGFyZW50RWxlbWVudCkgewogICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50SWQpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvckRpdgogICAgICAgICAgICAgIC5jc3MoInRvcCIsIGVsLm9mZnNldFRvcCkKICAgICAgICAgICAgICAuY3NzKCJsZWZ0IiwgZWwub2Zmc2V0TGVmdCkKICAgICAgICAgICAgICAuY3NzKCJtYXhXaWR0aCIsIGVsLm9mZnNldFdpZHRoKQogICAgICAgICAgICAgIC5jc3MoImhlaWdodCIsIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICB9LCA1MDApOwogICAgICAgIH0KICAgICAgfQogICAgfSwKICAgIGNsZWFyRXJyb3I6IGZ1bmN0aW9uKGVsKSB7CiAgICAgIHZhciAkZWwgPSAkKGVsKTsKICAgICAgdmFyIGRpc3BsYXkgPSAkZWwuZGF0YSgicmVzdG9yZS1kaXNwbGF5LW1vZGUiKTsKICAgICAgJGVsLmRhdGEoInJlc3RvcmUtZGlzcGxheS1tb2RlIiwgbnVsbCk7CgogICAg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khUTUxXaWRnZXRzLmV2YWx1YXRlU3RyaW5nTWVtYmVyKGRhdGEueCwgZGF0YS5ldmFsc1tpXSk7CiAgICAgICAgfQogICAgICAgIGlmICghYmluZGluZ0RlZi5yZW5kZXJPbk51bGxWYWx1ZSkgewogICAgICAgICAgaWYgKGRhdGEueCA9PT0gbnVsbCkgewogICAgICAgICAgICBlbC5zdHlsZS52aXNpYmlsaXR5ID0gImhpZGRlbiI7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGVsLnN0eWxlLnZpc2liaWxpdHkgPSAiaW5oZXJpdCI7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICghZWxlbWVudERhdGEoZWwsICJpbml0aWFsaXplZCIpKSB7CiAgICAgICAgICBpbml0U2l6aW5nKGVsKTsKCiAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRpYWxpemVkIiwgdHJ1ZSk7CiAgICAgICAgICBpZiAoYmluZGluZ0RlZi5pbml0aWFsaXplKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBiaW5kaW5nRGVmLmluaXRpYWxpemUoZWwsIGVsLm9mZnNldFdpZHRoLAogICAgICAgICAgICAgIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICAgIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiLCByZXN1bHQpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBTaGlueS5yZW5kZXJEZXBlbmRlbmNpZXMoZGF0YS5kZXBzKTsKICAgICAgICBiaW5kaW5nRGVmLnJlbmRlclZhbHVlKGVsLCBkYXRhLngsIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiKSk7CiAgICAgICAgZXZhbEFuZFJ1bihkYXRhLmpzSG9va3MucmVuZGVyLCBlbGVtZW50RGF0YShlbCwgImluaXRfcmVzdWx0IiksIFtlbCwgZGF0YS54XSk7CiAgICAgIH07CgogICAgICAvLyB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H0KCiAgICAgICAgaWYgKGJpbmRpbmcucmVzaXplKSB7CiAgICAgICAgICB2YXIgbGFzdFNpemUgPSB7fTsKICAgICAgICAgIHZhciByZXNpemVIYW5kbGVyID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICB2YXIgc2l6ZSA9IHsKICAgICAgICAgICAgICB3OiBzaXplT2JqID8gc2l6ZU9iai5nZXRXaWR0aCgpIDogZWwub2Zmc2V0V2lkdGgsCiAgICAgICAgICAgICAgaDogc2l6ZU9iaiA/IHNpemVPYmouZ2V0SGVpZ2h0KCkgOiBlbC5vZmZzZXRIZWlnaHQKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHNpemUudyA9PT0gMCAmJiBzaXplLmggPT09IDApCiAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICBpZiAoc2l6ZS53ID09PSBsYXN0U2l6ZS53ICYmIHNpemUuaCA9PT0gbGFzdFNpemUuaCkKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGxhc3RTaXplID0gc2l6ZTsKICAgICAgICAgICAgYmluZGluZy5yZXNpemUoZWwsIHNpemUudywgc2l6ZS5oLCBpbml0UmVzdWx0KTsKICAgICAgICAgIH07CgogICAgICAgICAgb24od2luZG93LCAicmVzaXplIiwgcmVzaXplSGFuZGxlcik7CgogICAgICAgICAgLy8gVGhpcyBpcyBuZWVkZWQgZm9yIGNhc2VzIHdoZXJlIHdlJ3JlIHJ1bm5pbmcgaW4gYSBTaGlueQogICAgICAgICAgLy8gYXBwLCBidXQgdGhlIHdpZGdldCBpdHNlbGYgaXMgbm90IGEgU2hpbnkgb3V0cHV0LCBidXQKICAgICAgICAgIC8vIHJhdGhlciBhIHNpbXBsZSBzdGF0aWMgd2lkZ2V0LiBPbmUgZXhhbXBsZSBvZiB0aGlzIGlzCiAgICAgICAgICAvLyBhbiBybWFya2Rvd24gZG9jdW1lbnQgdGhhdCBoYXMgcnVudGltZTpzaGlueSBhbmQgd2lkZ2V0CiAgIC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Z2h0KTsKICAgICAgfSwKICAgICAgcmVuZGVyVmFsdWU6IGZ1bmN0aW9uKGVsLCB4LCBpbnN0YW5jZSkgewogICAgICAgIHJldHVybiBpbnN0YW5jZS5yZW5kZXJWYWx1ZSh4KTsKICAgICAgfSwKICAgICAgcmVzaXplOiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCwgaW5zdGFuY2UpIHsKICAgICAgICByZXR1cm4gaW5zdGFuY2UucmVzaXplKHdpZHRoLCBoZWlnaHQpOwogICAgICB9CiAgICB9OwoKICAgIGlmIChkZWZuLmZpbmQpCiAgICAgIHJlc3VsdC5maW5kID0gZGVmbi5maW5kOwogICAgaWYgKGRlZm4ucmVuZGVyRXJyb3IpCiAgICAgIHJlc3VsdC5yZW5kZXJFcnJvciA9IGRlZm4ucmVuZGVyRXJyb3I7CiAgICBpZiAoZGVmbi5jbGVhckVycm9yKQogICAgICByZXN1bHQuY2xlYXJFcnJvciA9IGRlZm4uY2xlYXJFcnJvcjsKCiAgICByZXR1cm4gcmVzdWx0OwogIH0KfSkoKTsKCg=="></script> <script src="data:application/x-javascript;base64,LyohIGpRdWVyeSB2MS4xMi40IHwgKGMpIGpRdWVyeSBGb3VuZGF0aW9uIHwganF1ZXJ5Lm9yZy9saWNlbnNlICovCiFmdW5jdGlvbihhLGIpeyJvYmplY3QiPT10eXBlb2YgbW9kdWxlJiYib2JqZWN0Ij09dHlwZW9mIG1vZHVsZS5leHBvcnRzP21vZHVsZS5leHBvcnRzPWEuZG9jdW1lbnQ/YihhLCEwKTpmdW5jdGlvbihhKXtpZighYS5kb2N1bWVudCl0aHJvdyBuZXcgRXJyb3IoImpRdWVyeSByZXF1aXJlcyBhIHdpbmRvdyB3aXRoIGEgZG9jdW1lbnQiKTtyZXR1cm4gYihhKX06YihhKX0oInVuZGVmaW5lZCIhPXR5cGVvZiB3aW5kb3c/d2luZG93OnRoaXMsZnVuY3Rpb24oYSxiKXt2YXIgYz1bXSxkPWEuZG9jdW1lbnQs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sb3cnLCBlLnR5cGUgPT09ICdzaG93JyA/ICcnIDogY3NzT3ZlcmZsb3cpOwogICAgICAgICAgfSk7CiAgICAgICAgICAkeC5jc3MoJ3otaW5kZXgnLCAyNSk7CiAgICAgICAgfQoKICAgICAgICBpZiAoaW5BcnJheSh0eXBlLCBbJ2ZhY3RvcicsICdsb2dpY2FsJ10pKSB7CiAgICAgICAgICAkaW5wdXQub24oewogICAgICAgICAgICBjbGljazogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgJGlucHV0LnBhcmVudCgpLmhpZGUoKTsgJHguc2hvdygpLnRyaWdnZXIoJ3Nob3cnKTsgZmlsdGVyWzBdLnNlbGVjdGl6ZS5mb2N1cygpOwogICAgICAgICAgICB9LAogICAgICAgICAgICBpbnB1dDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgaWYgKCRpbnB1dC52YWwoKSA9PT0gJycpIGZpbHRlclswXS5zZWxlY3RpemUuc2V0VmFsdWUoW10pOwogICAgICAgICAgICB9CiAgICAgICAgICB9KTsKICAgICAgICAgIHZhciAkaW5wdXQyID0gJHguY2hpbGRyZW4oJ3NlbGVjdCcpOwogICAgICAgICAgZmlsdGVyID0gJGlucHV0Mi5zZWxlY3RpemUoewogICAgICAgICAgICBvcHRpb25zOiAkaW5wdXQyLmRhdGEoJ29wdGlvbnMnKS5tYXAoZnVuY3Rpb24odiwgaSkgewogICAgICAgICAgICAgIHJldHVybiAoe3RleHQ6IHYsIHZhbHVlOiB2fSk7CiAgICAgICAgICAgIH0pLAogICAgICAgICAgICBwbHVnaW5zOiBbJ3JlbW92ZV9idXR0b24nXSwKICAgICAgICAgICAgaGlkZVNlbGVjdGVkOiB0cnVlLAogICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IG51bGwpIHZhbHVlID0gW107IC8vIGNvbXBhdGliaWxpdHkgd2l0aCBqUXVlcnkgMy4wCiAgICAgICAgIC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YmFja2dyb3VuZC1jb2xvcic6ICcjZmZmJywKICAgICAgICAgICAgJ2JvcmRlcic6ICcxcHggI2RkZCBzb2xpZCcsCiAgICAgICAgICAgICdib3JkZXItcmFkaXVzJzogJzRweCcsCiAgICAgICAgICAgICdwYWRkaW5nJzogJzIwcHggMjBweCAxMHB4IDIwcHgnCiAgICAgICAgICB9KTsKICAgICAgICAgIHZhciAkc3BhbnMgPSAkeDAuY2hpbGRyZW4oJ3NwYW4nKS5jc3MoewogICAgICAgICAgICAnbWFyZ2luLXRvcCc6ICcxMHB4JywKICAgICAgICAgICAgJ3doaXRlLXNwYWNlJzogJ25vd3JhcCcKICAgICAgICAgIH0pOwogICAgICAgICAgdmFyICRzcGFuMSA9ICRzcGFucy5maXJzdCgpLCAkc3BhbjIgPSAkc3BhbnMubGFzdCgpOwogICAgICAgICAgdmFyIHIxID0gKyR4LmRhdGEoJ21pbicpLCByMiA9ICskeC5kYXRhKCdtYXgnKTsKICAgICAgICAgIC8vIHdoZW4gdGhlIG51bWJlcnMgYXJlIHRvbyBzbWFsbCBvciBoYXZlIG1hbnkgZGVjaW1hbCBwbGFjZXMsIHRoZQogICAgICAgICAgLy8gc2xpZGVyIG1heSBoYXZlIG51bWVyaWMgcHJlY2lzaW9uIHByb2JsZW1zICgjMTUwKQogICAgICAgICAgdmFyIHNjYWxlID0gTWF0aC5wb3coMTAsIE1hdGgubWF4KDAsICskeC5kYXRhKCdzY2FsZScpIHx8IDApKTsKICAgICAgICAgIHIxID0gTWF0aC5yb3VuZChyMSAqIHNjYWxlKTsgcjIgPSBNYXRoLnJvdW5kKHIyICogc2NhbGUpOwogICAgICAgICAgdmFyIHNjYWxlQmFjayA9IGZ1bmN0aW9uKHgsIHNjYWxlKSB7CiAgICAgICAgICAgIGlmIChzY2FsZSA9PT0gMSkgcmV0dXJuIHg7CiAgICAgICAgICAgIHZhciBkID0gTWF0aC5yb3VuZChNYXRoLmxvZyhzY2FsZSkgLyBNYXRoLmxvZygxMCkpOwogICAgICAgICAgICAvLyB0byBhdm9pZCBwcm9ibGVtcyBsaWtlIDMuNDIzLzEwMCAtPiAwLjAzNDIzMDAwMDAwMDAwMDAwMwogICAgICAgICAgICByZXR1cm4gKHggLyBzY2FsZSkudG9GaXhlZChkKTsKICAgICAgICAgIH07CiAgICAgICAgICAkaW5wdXQub24oewogICAgICAgICAgICBmb2N1czogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgJHgwLnNob3coKS50cmlnZ2VyKCdzaG93Jyk7CiAgICAgICAgICAgICAgLy8gZmlyc3QsIG1ha2Ugc3VyZSB0aGUgc2xpZGVyIGRpdiBsZWF2ZXMgYXQgbGVhc3QgMjBweCBiZXR3ZWVuCiAgICAgICAgICAgICAgLy8gdGhlIHR3byAoc2xpZGVyIHZhbHVlKSBzcGFuJ3MKICAgICAgICAgICAgICAkeDAud2lkdGgoTWF0aC5tYXgoMTYwLCAkc3BhbjEub3V0ZXJXaWR0aCgpICsgJHNwYW4yLm91dGVyV2lkdGgoKSArIDIwKSk7CiAgICAgICAgICAgICAgLy8gdGhlbiwgaWYgdGhlIGlucHV0IGlzIHJlYWxseSB3aWRlLCBtYWtlIHRoZSBzbGlkZXIgdGhlIHNhbWUKICAgICAgICAgICAgICAvLyB3aWR0aCBhcyB0aGUgaW5wdXQKICAgICAgICAgICAgICBpZiAoJHgwLm91dGVyV2lkdGgoKSA8ICRpbnB1dC5vdXRlcldpZHRoKCkpIHsKICAgICAgICAgICAgICAgICR4MC5vdXRlcldpZHRoKCRpbnB1dC5vdXRlcldpZHRoKCkpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAvLyBtYWtlIHN1cmUgdGhlIHNsaWRlciBkaXYgZG9lcyBub3QgcmVhY2ggYmV5b25kIHRoZSByaWdodCBtYXJnaW4KICAgICAgICAgICAgICBpZiAoJCh3aW5kb3cpLndpZHRoKCkgPCAkeDAub2Zmc2V0KCkubGVmdCArICR4MC53aWR0aCgpKSB7CiAgICAgICAgICAgICAgICAkeDAub2Zmc2V0KHsKICAgICAgICAgICAgICAgICAgJ2xlZnQnOiAkaW5wdXQub2Zmc2V0KCkubGVmdCArICRpbnB1dC5vdXRlcldpZHRoKCkgLSAkeDAub3V0ZXJXaWR0aCgpCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGJsdXI6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICR4MC5oaWRlKCkudHJpZ2dlcignaGlkZScpOwogICAgICAgICAgICB9LAogICAgICAgICAgICBpbnB1dDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgaWYgKCRpbnB1dC52YWwoKSA9PT0gJycpIGZpbHRlci52YWwoW3IxLCByMl0pOwogICAgICAgICAgICB9LAogICAgICAgICAgICBjaGFuZ2U6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhciB2ID0gJGlucHV0LnZhbCgpLnJlcGxhY2UoL1xzL2csICcnKTsKICAgICAgICAgICAgICBpZiAodiA9PT0gJycpIHJldHVybjsKICAgICAgICAgICAgICB2ID0gdi5zcGxpdCgnLi4uJyk7CiAgICAgICAgICAgICAgaWYgKHYubGVuZ3RoICE9PSAyKSB7CiAgICAgICAgICAgICAgICAkaW5wdXQucGFyZW50KCkuYWRkQ2xhc3MoJ2hhcy1lcnJvcicpOwogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAodlswXSA9PT0gJycpIHZbMF0gPSByMTsKICAgICAgICAgICAgICBpZiAodlsxXSA9PT0gJycpIHZbMV0gPSByMjsKICAgICAgICAgICAgICAkaW5wdXQucGFyZW50KCkucmVtb3ZlQ2xhc3MoJ2hhcy1lcnJvcicpOwogICAgICAgICAgICAgIC8vIHRyZWF0IGRhdGUgYXMgVVRDIHRpbWUgYXQgbWlkbmlnaHQKICAgICAgICAgICAgICB2YXIgc3RyVGltZSA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICAgICAgICAgIHZhciBzID0gdHlwZSA9PT0gJ2RhdGUnID8gJ1QwMDowMDowMFonIDogJyc7CiAgICAgICAgICAgICAgICB2YXIgdCA9IG5ldyBEYXRlKHggKyBzKS5nZXRUaW1lKCk7CiAgICAgICAgICAgICAgICAvLyBhZGQgMTAgbWludXRlcyB0byBkYXRlIHNpbmNlIGl0IGRvZXMgbm90IGh1cnQgdGhlIGRhdGUsIGFuZAogICAgICAgICAgICAgICAgLy8gaXQgaGVscHMgYXZvaWQgdGhlIHRyaWNreSBmbG9hdGluZyBwb2ludCBhcml0aG1ldGljIHByb2JsZW1zLAogICAgICAgICAgICAgICAgLy8gZS5nLiBzb21ldGltZXMgdGhlIGRhdGUgbWF5IGJlIGEgZmV3IG1pbGxpc2Vjb25kcyBlYXJsaWVyCiAgICAgICAgICAgICAgICAvLyB0aGFuIHRoZSBtaWRuaWdodCBkdWUgdG8gcHJlY2lzaW9uIHByb2JsZW1zIGluIG5vVWlTbGlkZXIKICAgICAgICAgICAgICAgIHJldHVybiB0eXBlID09PSAnZGF0ZScgPyB0ICsgMzYwMDAwMCA6IHQ7CiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICBpZiAoaW5BcnJheSh0eXBlLCBbJ2RhdGUnLCAndGltZSddKSkgewogICAgICAgICAgICAgICAgdlswXSA9IHN0clRpbWUodlswXSk7CiAgICAgICAgICAgICAgICB2WzFdID0gc3RyVGltZSh2WzFdKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKHZbMF0gIT0gcjEpIHZbMF0gKj0gc2NhbGU7CiAgICAgICAgICAgICAgaWYgKHZbMV0gIT0gcjIpIHZbMV0gKj0gc2NhbGU7CiAgICAgICAgICAgICAgZmlsdGVyLnZhbCh2KTsKICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgICB2YXIgZm9ybWF0RGF0ZSA9IGZ1bmN0aW9uKGQpIHsKICAgICAgICAgICAgZCA9IHNjYWxlQmFjayhkLCBzY2FsZSk7CiAgICAgICAgICAgIGlmICh0eXBlID09PSAnbnVtYmVyJykgcmV0dXJuIGQ7CiAgICAgICAgICAgIGlmICh0eXBlID09PSAnaW50ZWdlcicpIHJldHVybiBwYXJzZUludChkKTsKICAgICAgICAgICAgdmFyIHggPSBuZXcgRGF0ZSgrZCk7CiAgICAgICAgICAgIGlmICh0eXBlID09PSAnZGF0ZScpIHsKICAgICAgICAgICAgICB2YXIgcGFkMCA9IGZ1bmN0aW9uKHgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAoJzAnICsgeCkuc3Vic3RyKC0yLCAyKTsKICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgIHJldHVybiB4LmdldFVUQ0Z1bGxZZWFyKCkgKyAnLScgKyBwYWQwKDEgKyB4LmdldFVUQ01vbnRoKCkpCiAgICAgICAgICAgICAgICAgICAgICArICctJyArIHBhZDAoeC5nZXRVVENEYXRlKCkpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHJldHVybiB4LnRvSVNPU3RyaW5nKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH07CiAgICAgICAgICB2YXIgb3B0cyA9IHR5cGUgPT09ICdkYXRlJyA/IHsgc3RlcDogNjAgKiA2MCAqIDEwMDAgfSA6CiAgICAgICAgICAgICAgICAgICAgIHR5cGUgPT09ICdpbnRlZ2VyJyA/IHsgc3RlcDogMSB9IDoge307CiAgICAgICAgICBmaWx0ZXIgPSAkeC5ub1VpU2xpZGVyKCQuZXh0ZW5kKHsKICAgICAgICAgICAgc3RhcnQ6IFtyMSwgcjJdLAogICAgICAgICAgICByYW5nZToge21pbjogcjEsIG1heDogcjJ9LAogICAgICAgICAgICBjb25uZWN0OiB0cnVlCiAgICAgICAgICB9LCBvcHRzKSk7CiAgICAgICAgICBpZiAoc2NhbGUgPiAxKSAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHZhciB0MSA9IHIxLCB0MiA9IHIyOwogICAgICAgICAgICB2YXIgdmFsID0gZmlsdGVyLnZhbCgpOwogICAgICAgICAgICB3aGlsZSAodmFsWzBdID4gcjEgfHwgdmFsWzFdIDwgcjIpIHsKICAgICAgICAgICAgICBpZiAodmFsWzBdID4gcjEpIHsKICAgICAgICAgICAgICAgIHQxIC09IHZhbFswXSAtIHIxOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAodmFsWzFdIDwgcjIpIHsKICAgICAgICAgICAgICAgIHQyICs9IHIyIC0gdmFsWzFdOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBmaWx0ZXIgPSAkeC5ub1VpU2xpZGVyKCQuZXh0ZW5kKHsKICAgICAgICAgICAgICAgIHN0YXJ0OiBbdDEsIHQyXSwKICAgICAgICAgICAgICAgIHJhbmdlOiB7bWluOiB0MSwgbWF4OiB0Mn0sCiAgICAgICAgICAgICAgICBjb25uZWN0OiB0cnVlCiAgICAgICAgICAgICAgfSwgb3B0cyksIHRydWUpOwogICAgICAgICAgICAgIHZhbCA9IGZpbHRlci52YWwoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByMSAgPSB0MTsgcjIgPSB0MjsKICAgICAgICAgIH0pKCk7CiAgICAgICAgICAkc3BhbjEudGV4dChmb3JtYXREYXRlKHIxKSk7ICRzcGFuMi50ZXh0KGZvcm1hdERhdGUocjIpKTsKICAgICAgICAgIHZhciB1cGRhdGVTbGlkZXIgPSBmdW5jdGlvbihlKSB7CiAgICAgICAgICAgIHZhciB2YWwgPSBmaWx0ZXIudmFsKCk7CiAgICAgICAgICAgIC8vIHR1cm4gb2ZmIGZpbHRlciBpZiBpbiBmdWxsIHJhbmdlCiAgICAgICAgICAgICR0ZC5kYXRhKCdmaWx0ZXInLCB2YWxbMF0gPiByMSB8fCB2YWxbMV0gPCByMik7CiAgICAgICAgICAgIHZhciB2MSA9IGZvcm1hdERhdGUodmFsWzBdKSwgdjIgPSBmb3JtYXREYXRlKHZhbFsxXSksIGl2YWw7CiAgICAgICAgICAgIGlmICgkdGQuZGF0YSgnZmlsdGVyJykpIHsKICAgICAgICAgICAgICBpdmFsID0gdjEgKyAnIC4uLiAnICsgdjI7CiAgICAgICAgICAgICAgJGlucHV0LmF0dHIoJ3RpdGxlJywgaXZhbCkudmFsKGl2YWwpLnRyaWdnZXIoJ2lucHV0Jyk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgJGlucHV0LmF0dHIoJ3RpdGxlJywgJycpLnZhbCgnJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJHNwYW4xLnRleHQodjEpOyAkc3BhbjIudGV4dCh2Mik7CiAgICAgICAgICAgIGlmIChlLnR5cGUgPT09ICdzbGlkZScpIHJldHVybjsgIC8vIG5vIHNlYXJjaGluZyB3aGVuIHNsaWRpbmcgb25seQogICAgICAgICAgICBpZiAoc2VydmVyKSB7CiAgICAgICAgICAgICAgdGFibGUuY29sdW1uKGkpLnNlYXJjaCgkdGQuZGF0YSgnZmlsdGVyJykgPyBpdmFsIDogJycpLmRyYXcoKTsKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGFibGUuZHJhdygpOwogICAgICAgICAgfTsKICAgICAgICAgIGZpbHRlci5vbih7CiAgICAgICAgICAgIHNldDogdXBkYXRlU2xpZGVyLAogICAgICAgICAgICBzbGlkZTogdXBkYXRlU2xpZGVyCiAgICAgICAgICB9KTsKICAgICAgICB9CgogICAgICAgIC8vIHNlcnZlci1zaWRlIHByb2Nlc3Npbmcgd2lsbCBiZSBoYW5kbGVkIGJ5IFIgKG9yIHdoYXRldmVyIHNlcnZlcgogICAgICAgIC8vIGxhbmd1YWdlIHlvdSB1c2UpOyB0aGUgZm9sbG93aW5nIGNvZGUgaXMgb25seSBuZWVkZWQgZm9yIGNsaWVudC1zaWRlCiAgICAgICAgLy8gcHJvY2Vzc2luZwogICAgICAgIGlmIChzZXJ2ZXIpIHsKICAgICAgICAgIC8vIGlmIGEgc2VhcmNoIHN0cmluZyBoYXMg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yID09PSAndW5kZWZpbmVkJyB8fCAhJHRkLmRhdGEoJ2ZpbHRlcicpKSByZXR1cm4gdHJ1ZTsKCiAgICAgICAgICB2YXIgciA9IGZpbHRlci52YWwoKSwgdiwgcjAsIHIxOwogICAgICAgICAgaWYgKHR5cGUgPT09ICdudW1iZXInIHx8IHR5cGUgPT09ICdpbnRlZ2VyJykgewogICAgICAgICAgICB2ID0gcGFyc2VGbG9hdChkYXRhW2ldKTsKICAgICAgICAgICAgLy8gaG93IHRvIGhhbmRsZSBOYU4/IGN1cnJlbnRseSBleGNsdWRlIHRoZXNlIHJvd3MKICAgICAgICAgICAgaWYgKGlzTmFOKHYpKSByZXR1cm4oZmFsc2UpOwogICAgICAgICAgICByMCA9IHBhcnNlRmxvYXQoc2NhbGVCYWNrKHJbMF0sIHNjYWxlKSkKICAgICAgICAgICAgcjEgPSBwYXJzZUZsb2F0KHNjYWxlQmFjayhyWzFdLCBzY2FsZSkpOwogICAgICAgICAgICBpZiAodiA+PSByMCAmJiB2IDw9IHIxKSByZXR1cm4gdHJ1ZTsKICAgICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ2RhdGUnIHx8IHR5cGUgPT09ICd0aW1lJykgewogICAgICAgICAgICB2ID0gbmV3IERhdGUoZGF0YVtpXSk7CiAgICAgICAgICAgIHIwID0gbmV3IERhdGUoclswXSAvIHNjYWxlKTsgcjEgPSBuZXcgRGF0ZShyWzFdIC8gc2NhbGUpOwogICAgICAgICAgICBpZiAodiA+PSByMCAmJiB2IDw9IHIxKSByZXR1cm4gdHJ1ZTsKICAgICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ2ZhY3RvcicpIHsKICAgICAgICAgICAgaWYgKHIubGVuZ3RoID09PSAwIHx8IGluQXJyYXkoZGF0YVtpXSwgcikpIHJldHVybiB0cnVlOwogICAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSAnbG9naWNhbCcpIHsKICAgICAgICAgICAgaWYgKHIubGVuZ3RoID09PSAwKSByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgaWYgKGluQXJyYXkoZGF0YVtpXSA9PT0gJycgPyAnbmEnIDogZGF0YVtpXSwgcikpIHJldHVybiB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH07CgogICAgICAgICQuZm4uZGF0YVRhYmxlLmV4dC5zZWFyY2gucHVzaChjdXN0b21GaWx0ZXIpOwoKICAgICAgICAvLyBzZWFyY2ggZm9yIHRoZSBwcmVzZXQgc2VhcmNoIHN0cmluZ3MgaWYgaXQgaXMgbm9uLWVtcHR5CiAgICAgICAgaWYgKHNlYXJjaENvbCkgewogICAgICAgICAgaWYgKGluQXJyYXkodHlwZSwgWydmYWN0b3InLCAnbG9naWNhbCddKSkgewogICAgICAgICAgICBmaWx0ZXJbMF0uc2VsZWN0aXplLnNldFZhbHVlKEpTT04ucGFyc2Uoc2VhcmNoQ29sKSk7CiAgICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09ICdjaGFyYWN0ZXInKSB7CiAgICAgICAgICAgICRpbnB1dC50cmlnZ2VyKCdpbnB1dCcpOwogICAgICAgICAgfSBlbHNlIGlmIChpbkFycmF5KHR5cGUsIFsnbnVtYmVyJywgJ2ludGVnZXInLCAnZGF0ZScsICd0aW1lJ10pKSB7CiAgICAgICAgICAgICRpbnB1dC50cmlnZ2VyKCdjaGFuZ2UnKTsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICB9KTsKCiAgICB9CgogICAgLy8gaGlnaGxpZ2h0IHNlYXJjaCBrZXl3b3JkcwogICAgdmFyIGhpZ2hsaWdodCA9IGZ1bmN0aW9uKCkgewogICAgICB2YXIgYm9keSA9ICQodGFibGUudGFibGUoKS5ib2R5KCkpOwogICAgICAvLyByZW1vdmluZyB0aGUgb2xkIGhpZ2hsaWdodGluZyBmaXJzdAogICAgICBib2R5LnVuaGlnaGxpZ2h0KCk7CgogICAgICAvLyBkb24ndCBoaWdobGlnaHQg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FyIG1ldGhvZHMgPSB0YWJsZS5zaGlueU1ldGhvZHMsIGNhbGwgPSBkYXRhLmNhbGw7CiAgICBpZiAobWV0aG9kc1tjYWxsLm1ldGhvZF0pIHsKICAgICAgbWV0aG9kc1tjYWxsLm1ldGhvZF0uYXBwbHkodGFibGUsIGNhbGwuYXJncyk7CiAgICB9IGVsc2UgewogICAgICBjb25zb2xlLmxvZygiVW5rbm93biBtZXRob2QgIiArIGNhbGwubWV0aG9kKTsKICAgIH0KICB9KTsKCn0pKCk7Cg=="></script> <link href="data:text/css;charset=utf-8,table%2EdataTable%7Bwidth%3A100%25%3Bmargin%3A0%20auto%3Bclear%3Aboth%3Bborder%2Dcollapse%3Aseparate%3Bborder%2Dspacing%3A0%7Dtable%2EdataTable%20thead%20th%2Ctable%2EdataTable%20tfoot%20th%7Bfont%2Dweight%3Abold%7Dtable%2EdataTable%20thead%20th%2Ctable%2EdataTable%20thead%20td%7Bpadding%3A10px%2018px%3Bborder%2Dbottom%3A1px%20solid%20%23111%7Dtable%2EdataTable%20thead%20th%3Aactive%2Ctable%2EdataTable%20thead%20td%3Aactive%7Boutline%3Anone%7Dtable%2EdataTable%20tfoot%20th%2Ctable%2EdataTable%20tfoot%20td%7Bpadding%3A10px%2018px%206px%2018px%3Bborder%2Dtop%3A1px%20solid%20%23111%7Dtable%2EdataTable%20thead%20%2Esorting%2Ctable%2EdataTable%20thead%20%2Esorting%5Fasc%2Ctable%2EdataTable%20thead%20%2Esorting%5Fdesc%7Bcursor%3Apointer%3B%2Acursor%3Ahand%7Dtable%2EdataTable%20thead%20%2Esorting%2Ctable%2EdataTable%20thead%20%2Esorting%5Fasc%2Ctable%2EdataTable%20thead%20%2Esorting%5Fdesc%2Ctable%2EdataTable%20thead%20%2Esorting%5Fasc%5Fdisabled%2Ctable%2EdataTable%20thead%20%2Esorting%5Fdesc%5Fdisabled%7Bbackground%2Drepeat%3Ano%2Drepeat%3Bbackground%2Dposition%3Acenter%20right%7Dtable%2EdataTable%20thead%20%2Esorting%7Bbackground%2Dimage%3Aurl%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL%2BTq%2FQCM1oNiJidwox0355mXnG%2FDrEtIQ6azioNZQxI0ykPhTQIwhCR%2BBmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P%2BGtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC%29%7Dtable%2EdataTable%20thead%20%2Esorting%5Fasc%7Bbackground%2Dimage%3Aurl%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS%2FgDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM%2BwTENuQahAvEO9DMwiGdwAxOymGJQLxTyD%2BjgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg%3D%3D%29%7Dtable%2EdataTable%20thead%20%2Esorting%5Fdesc%7Bbackground%2Dimage%3Aurl%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA%2FBOIv2PBIPFEUgxjB%2BIdQPwfC94HxLykus4GiD%2BhGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL%2BAuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII%3D%29%7Dtable%2EdataTable%20thead%20%2Esorting%5Fasc%5Fdisabled%7Bbackground%2Dimage%3Aurl%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7%2Fy6k01Ikdadx3f%2B37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq%2B3THBpci3jv7oIpAcMcdduzKEu%2F8vPMdDn%2FeiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg%3D%3D%29%7Dtable%2EdataTable%20thead%20%2Esorting%5Fdesc%5Fdisabled%7Bbackground%2Dimage%3Aurl%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4%2FHknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO%2Bcxuo6PEdLUIeyb7z604pYf%2By3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII%3D%29%7Dtable%2EdataTable%20tbody%20tr%7Bbackground%2Dcolor%3A%23ffffff%7Dtable%2EdataTable%20tbody%20tr%2Eselected%7Bbackground%2Dcolor%3A%23B0BED9%7Dtable%2EdataTable%20tbody%20th%2Ctable%2EdataTable%20tbody%20td%7Bpadding%3A8px%2010px%7Dtable%2EdataTable%2Erow%2Dborder%20tbody%20th%2Ctable%2EdataTable%2Erow%2Dborder%20tbody%20td%2Ctable%2EdataTable%2Edisplay%20tbody%20th%2Ctable%2EdataTable%2Edisplay%20tbody%20td%7Bborder%2Dtop%3A1px%20solid%20%23ddd%7Dtable%2EdataTable%2Erow%2Dborder%20tbody%20tr%3Afirst%2Dchild%20th%2Ctable%2EdataTable%2Erow%2Dborder%20tbody%20tr%3Afirst%2Dchild%20td%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3Afirst%2Dchild%20th%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3Afirst%2Dchild%20td%7Bborder%2Dtop%3Anone%7Dtable%2EdataTable%2Ecell%2Dborder%20tbody%20th%2Ctable%2EdataTable%2Ecell%2Dborder%20tbody%20td%7Bborder%2Dtop%3A1px%20solid%20%23ddd%3Bborder%2Dright%3A1px%20solid%20%23ddd%7Dtable%2EdataTable%2Ecell%2Dborder%20tbody%20tr%20th%3Afirst%2Dchild%2Ctable%2EdataTable%2Ecell%2Dborder%20tbody%20tr%20td%3Afirst%2Dchild%7Bborder%2Dleft%3A1px%20solid%20%23ddd%7Dtable%2EdataTable%2Ecell%2Dborder%20tbody%20tr%3Afirst%2Dchild%20th%2Ctable%2EdataTable%2Ecell%2Dborder%20tbody%20tr%3Afirst%2Dchild%20td%7Bborder%2Dtop%3Anone%7Dtable%2EdataTable%2Estripe%20tbody%20tr%2Eodd%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%7Bbackground%2Dcolor%3A%23f9f9f9%7Dtable%2EdataTable%2Estripe%20tbody%20tr%2Eodd%2Eselected%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%2Eselected%7Bbackground%2Dcolor%3A%23acbad4%7Dtable%2EdataTable%2Ehover%20tbody%20tr%3Ahover%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%7Bbackground%2Dcolor%3A%23f6f6f6%7Dtable%2EdataTable%2Ehover%20tbody%20tr%3Ahover%2Eselected%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%2Eselected%7Bbackground%2Dcolor%3A%23aab7d1%7Dtable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%3E%2Esorting%5F3%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3E%2Esorting%5F1%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3E%2Esorting%5F2%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23fafafa%7Dtable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%2Eselected%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%2Eselected%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%20tbody%20tr%2Eselected%3E%2Esorting%5F3%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%2Eselected%3E%2Esorting%5F1%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%2Eselected%3E%2Esorting%5F2%2Ctable%2EdataTable%2Edisplay%20tbody%20tr%2Eselected%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23acbad5%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23f1f1f1%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23f3f3f3%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%3E%2Esorting%5F3%7Bbackground%2Dcolor%3Awhitesmoke%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23a6b4cd%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23a8b5cf%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eodd%2Eselected%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23a9b7d1%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23fafafa%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23fcfcfc%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23fefefe%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23acbad5%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23aebcd6%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Estripe%20tbody%20tr%2Eeven%2Eselected%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23afbdd8%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23eaeaea%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23ececec%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23efefef%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F1%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F1%7Bbackground%2Dcolor%3A%23a2aec7%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F2%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F2%7Bbackground%2Dcolor%3A%23a3b0c9%7Dtable%2EdataTable%2Edisplay%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F3%2Ctable%2EdataTable%2Eorder%2Dcolumn%2Ehover%20tbody%20tr%3Ahover%2Eselected%3E%2Esorting%5F3%7Bbackground%2Dcolor%3A%23a5b2cb%7Dtable%2EdataTable%2Eno%2Dfooter%7Bborder%2Dbottom%3A1px%20solid%20%23111%7Dtable%2EdataTable%2Enowrap%20th%2Ctable%2EdataTable%2Enowrap%20td%7Bwhite%2Dspace%3Anowrap%7Dtable%2EdataTable%2Ecompact%20thead%20th%2Ctable%2EdataTable%2Ecompact%20thead%20td%7Bpadding%3A4px%2017px%204px%204px%7Dtable%2EdataTable%2Ecompact%20tfoot%20th%2Ctable%2EdataTable%2Ecompact%20tfoot%20td%7Bpadding%3A4px%7Dtable%2EdataTable%2Ecompact%20tbody%20th%2Ctable%2EdataTable%2Ecompact%20tbody%20td%7Bpadding%3A4px%7Dtable%2EdataTable%20th%2Edt%2Dleft%2Ctable%2EdataTable%20td%2Edt%2Dleft%7Btext%2Dalign%3Aleft%7Dtable%2EdataTable%20th%2Edt%2Dcenter%2Ctable%2EdataTable%20td%2Edt%2Dcenter%2Ctable%2EdataTable%20td%2EdataTables%5Fempty%7Btext%2Dalign%3Acenter%7Dtable%2EdataTable%20th%2Edt%2Dright%2Ctable%2EdataTable%20td%2Edt%2Dright%7Btext%2Dalign%3Aright%7Dtable%2EdataTable%20th%2Edt%2Djustify%2Ctable%2EdataTable%20td%2Edt%2Djustify%7Btext%2Dalign%3Ajustify%7Dtable%2EdataTable%20th%2Edt%2Dnowrap%2Ctable%2EdataTable%20td%2Edt%2Dnowrap%7Bwhite%2Dspace%3Anowrap%7Dtable%2EdataTable%20thead%20th%2Edt%2Dhead%2Dleft%2Ctable%2EdataTable%20thead%20td%2Edt%2Dhead%2Dleft%2Ctable%2EdataTable%20tfoot%20th%2Edt%2Dhead%2Dleft%2Ctable%2EdataTable%20tfoot%20td%2Edt%2Dhead%2Dleft%7Btext%2Dalign%3Aleft%7Dtable%2EdataTable%20thead%20th%2Edt%2Dhead%2Dcenter%2Ctable%2EdataTable%20thead%20td%2Edt%2Dhead%2Dcenter%2Ctable%2EdataTable%20tfoot%20th%2Edt%2Dhead%2Dcenter%2Ctable%2EdataTable%20tfoot%20td%2Edt%2Dhead%2Dcenter%7Btext%2Dalign%3Acenter%7Dtable%2EdataTable%20thead%20th%2Edt%2Dhead%2Dright%2Ctable%2EdataTable%20thead%20td%2Edt%2Dhead%2Dright%2Ctable%2EdataTable%20tfoot%20th%2Edt%2Dhead%2Dright%2Ctable%2EdataTable%20tfoot%20td%2Edt%2Dhead%2Dright%7Btext%2Dalign%3Aright%7Dtable%2EdataTable%20thead%20th%2Edt%2Dhead%2Djustify%2Ctable%2EdataTable%20thead%20td%2Edt%2Dhead%2Djustify%2Ctable%2EdataTable%20tfoot%20th%2Edt%2Dhead%2Djustify%2Ctable%2EdataTable%20tfoot%20td%2Edt%2Dhead%2Djustify%7Btext%2Dalign%3Ajustify%7Dtable%2EdataTable%20thead%20th%2Edt%2Dhead%2Dnowrap%2Ctable%2EdataTable%20thead%20td%2Edt%2Dhead%2Dnowrap%2Ctable%2EdataTable%20tfoot%20th%2Edt%2Dhead%2Dnowrap%2Ctable%2EdataTable%20tfoot%20td%2Edt%2Dhead%2Dnowrap%7Bwhite%2Dspace%3Anowrap%7Dtable%2EdataTable%20tbody%20th%2Edt%2Dbody%2Dleft%2Ctable%2EdataTable%20tbody%20td%2Edt%2Dbody%2Dleft%7Btext%2Dalign%3Aleft%7Dtable%2EdataTable%20tbody%20th%2Edt%2Dbody%2Dcenter%2Ctable%2EdataTable%20tbody%20td%2Edt%2Dbody%2Dcenter%7Btext%2Dalign%3Acenter%7Dtable%2EdataTable%20tbody%20th%2Edt%2Dbody%2Dright%2Ctable%2EdataTable%20tbody%20td%2Edt%2Dbody%2Dright%7Btext%2Dalign%3Aright%7Dtable%2EdataTable%20tbody%20th%2Edt%2Dbody%2Djustify%2Ctable%2EdataTable%20tbody%20td%2Edt%2Dbody%2Djustify%7Btext%2Dalign%3Ajustify%7Dtable%2EdataTable%20tbody%20th%2Edt%2Dbody%2Dnowrap%2Ctable%2EdataTable%20tbody%20td%2Edt%2Dbody%2Dnowrap%7Bwhite%2Dspace%3Anowrap%7Dtable%2EdataTable%2Ctable%2EdataTable%20th%2Ctable%2EdataTable%20td%7B%2Dwebkit%2Dbox%2Dsizing%3Acontent%2Dbox%3Bbox%2Dsizing%3Acontent%2Dbox%7D%2EdataTables%5Fwrapper%7Bposition%3Arelative%3Bclear%3Aboth%3B%2Azoom%3A1%3Bzoom%3A1%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Flength%7Bfloat%3Aleft%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Ffilter%7Bfloat%3Aright%3Btext%2Dalign%3Aright%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Ffilter%20input%7Bmargin%2Dleft%3A0%2E5em%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Finfo%7Bclear%3Aboth%3Bfloat%3Aleft%3Bpadding%2Dtop%3A0%2E755em%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%7Bfloat%3Aright%3Btext%2Dalign%3Aright%3Bpadding%2Dtop%3A0%2E25em%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%7Bbox%2Dsizing%3Aborder%2Dbox%3Bdisplay%3Ainline%2Dblock%3Bmin%2Dwidth%3A1%2E5em%3Bpadding%3A0%2E5em%201em%3Bmargin%2Dleft%3A2px%3Btext%2Dalign%3Acenter%3Btext%2Ddecoration%3Anone%20%21important%3Bcursor%3Apointer%3B%2Acursor%3Ahand%3Bcolor%3A%23333%20%21important%3Bborder%3A1px%20solid%20transparent%3Bborder%2Dradius%3A2px%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%2Ecurrent%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%2Ecurrent%3Ahover%7Bcolor%3A%23333%20%21important%3Bborder%3A1px%20solid%20%23979797%3Bbackground%2Dcolor%3Awhite%3Bbackground%3A%2Dwebkit%2Dgradient%28linear%2C%20left%20top%2C%20left%20bottom%2C%20color%2Dstop%280%25%2C%20%23fff%29%2C%20color%2Dstop%28100%25%2C%20%23dcdcdc%29%29%3Bbackground%3A%2Dwebkit%2Dlinear%2Dgradient%28top%2C%20%23fff%200%25%2C%20%23dcdcdc%20100%25%29%3Bbackground%3A%2Dmoz%2Dlinear%2Dgradient%28top%2C%20%23fff%200%25%2C%20%23dcdcdc%20100%25%29%3Bbackground%3A%2Dms%2Dlinear%2Dgradient%28top%2C%20%23fff%200%25%2C%20%23dcdcdc%20100%25%29%3Bbackground%3A%2Do%2Dlinear%2Dgradient%28top%2C%20%23fff%200%25%2C%20%23dcdcdc%20100%25%29%3Bbackground%3Alinear%2Dgradient%28to%20bottom%2C%20%23fff%200%25%2C%20%23dcdcdc%20100%25%29%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%2Edisabled%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%2Edisabled%3Ahover%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%2Edisabled%3Aactive%7Bcursor%3Adefault%3Bcolor%3A%23666%20%21important%3Bborder%3A1px%20solid%20transparent%3Bbackground%3Atransparent%3Bbox%2Dshadow%3Anone%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%3Ahover%7Bcolor%3Awhite%20%21important%3Bborder%3A1px%20solid%20%23111%3Bbackground%2Dcolor%3A%23585858%3Bbackground%3A%2Dwebkit%2Dgradient%28linear%2C%20left%20top%2C%20left%20bottom%2C%20color%2Dstop%280%25%2C%20%23585858%29%2C%20color%2Dstop%28100%25%2C%20%23111%29%29%3Bbackground%3A%2Dwebkit%2Dlinear%2Dgradient%28top%2C%20%23585858%200%25%2C%20%23111%20100%25%29%3Bbackground%3A%2Dmoz%2Dlinear%2Dgradient%28top%2C%20%23585858%200%25%2C%20%23111%20100%25%29%3Bbackground%3A%2Dms%2Dlinear%2Dgradient%28top%2C%20%23585858%200%25%2C%20%23111%20100%25%29%3Bbackground%3A%2Do%2Dlinear%2Dgradient%28top%2C%20%23585858%200%25%2C%20%23111%20100%25%29%3Bbackground%3Alinear%2Dgradient%28to%20bottom%2C%20%23585858%200%25%2C%20%23111%20100%25%29%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Epaginate%5Fbutton%3Aactive%7Boutline%3Anone%3Bbackground%2Dcolor%3A%232b2b2b%3Bbackground%3A%2Dwebkit%2Dgradient%28linear%2C%20left%20top%2C%20left%20bottom%2C%20color%2Dstop%280%25%2C%20%232b2b2b%29%2C%20color%2Dstop%28100%25%2C%20%230c0c0c%29%29%3Bbackground%3A%2Dwebkit%2Dlinear%2Dgradient%28top%2C%20%232b2b2b%200%25%2C%20%230c0c0c%20100%25%29%3Bbackground%3A%2Dmoz%2Dlinear%2Dgradient%28top%2C%20%232b2b2b%200%25%2C%20%230c0c0c%20100%25%29%3Bbackground%3A%2Dms%2Dlinear%2Dgradient%28top%2C%20%232b2b2b%200%25%2C%20%230c0c0c%20100%25%29%3Bbackground%3A%2Do%2Dlinear%2Dgradient%28top%2C%20%232b2b2b%200%25%2C%20%230c0c0c%20100%25%29%3Bbackground%3Alinear%2Dgradient%28to%20bottom%2C%20%232b2b2b%200%25%2C%20%230c0c0c%20100%25%29%3Bbox%2Dshadow%3Ainset%200%200%203px%20%23111%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%20%2Eellipsis%7Bpadding%3A0%201em%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fprocessing%7Bposition%3Aabsolute%3Btop%3A50%25%3Bleft%3A50%25%3Bwidth%3A100%25%3Bheight%3A40px%3Bmargin%2Dleft%3A%2D50%25%3Bmargin%2Dtop%3A%2D25px%3Bpadding%2Dtop%3A20px%3Btext%2Dalign%3Acenter%3Bfont%2Dsize%3A1%2E2em%3Bbackground%2Dcolor%3Awhite%3Bbackground%3A%2Dwebkit%2Dgradient%28linear%2C%20left%20top%2C%20right%20top%2C%20color%2Dstop%280%25%2C%20rgba%28255%2C255%2C255%2C0%29%29%2C%20color%2Dstop%2825%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%29%2C%20color%2Dstop%2875%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%29%2C%20color%2Dstop%28100%25%2C%20rgba%28255%2C255%2C255%2C0%29%29%29%3Bbackground%3A%2Dwebkit%2Dlinear%2Dgradient%28left%2C%20rgba%28255%2C255%2C255%2C0%29%200%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2025%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2075%25%2C%20rgba%28255%2C255%2C255%2C0%29%20100%25%29%3Bbackground%3A%2Dmoz%2Dlinear%2Dgradient%28left%2C%20rgba%28255%2C255%2C255%2C0%29%200%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2025%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2075%25%2C%20rgba%28255%2C255%2C255%2C0%29%20100%25%29%3Bbackground%3A%2Dms%2Dlinear%2Dgradient%28left%2C%20rgba%28255%2C255%2C255%2C0%29%200%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2025%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2075%25%2C%20rgba%28255%2C255%2C255%2C0%29%20100%25%29%3Bbackground%3A%2Do%2Dlinear%2Dgradient%28left%2C%20rgba%28255%2C255%2C255%2C0%29%200%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2025%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2075%25%2C%20rgba%28255%2C255%2C255%2C0%29%20100%25%29%3Bbackground%3Alinear%2Dgradient%28to%20right%2C%20rgba%28255%2C255%2C255%2C0%29%200%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2025%25%2C%20rgba%28255%2C255%2C255%2C0%2E9%29%2075%25%2C%20rgba%28255%2C255%2C255%2C0%29%20100%25%29%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Flength%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Ffilter%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Finfo%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fprocessing%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%7Bcolor%3A%23333%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%7Bclear%3Aboth%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%20div%2EdataTables%5FscrollBody%7B%2Amargin%2Dtop%3A%2D1px%3B%2Dwebkit%2Doverflow%2Dscrolling%3Atouch%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%20div%2EdataTables%5FscrollBody%20th%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%20div%2EdataTables%5FscrollBody%20td%7Bvertical%2Dalign%3Amiddle%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%20div%2EdataTables%5FscrollBody%20th%3Ediv%2EdataTables%5Fsizing%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fscroll%20div%2EdataTables%5FscrollBody%20td%3Ediv%2EdataTables%5Fsizing%7Bheight%3A0%3Boverflow%3Ahidden%3Bmargin%3A0%20%21important%3Bpadding%3A0%20%21important%7D%2EdataTables%5Fwrapper%2Eno%2Dfooter%20%2EdataTables%5FscrollBody%7Bborder%2Dbottom%3A1px%20solid%20%23111%7D%2EdataTables%5Fwrapper%2Eno%2Dfooter%20div%2EdataTables%5FscrollHead%20table%2C%2EdataTables%5Fwrapper%2Eno%2Dfooter%20div%2EdataTables%5FscrollBody%20table%7Bborder%2Dbottom%3Anone%7D%2EdataTables%5Fwrapper%3Aafter%7Bvisibility%3Ahidden%3Bdisplay%3Ablock%3Bcontent%3A%22%22%3Bclear%3Aboth%3Bheight%3A0%7D%40media%20screen%20and%20%28max%2Dwidth%3A%20767px%29%7B%2EdataTables%5Fwrapper%20%2EdataTables%5Finfo%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%7Bfloat%3Anone%3Btext%2Dalign%3Acenter%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Fpaginate%7Bmargin%2Dtop%3A0%2E5em%7D%7D%40media%20screen%20and%20%28max%2Dwidth%3A%20640px%29%7B%2EdataTables%5Fwrapper%20%2EdataTables%5Flength%2C%2EdataTables%5Fwrapper%20%2EdataTables%5Ffilter%7Bfloat%3Anone%3Btext%2Dalign%3Acenter%7D%2EdataTables%5Fwrapper%20%2EdataTables%5Ffilter%7Bmargin%2Dtop%3A0%2E5em%7D%7D%0A" rel="stylesheet" /> <link href="data:text/css;charset=utf-8,%0Atable%2EdataTable%20tr%2Eselected%20td%2C%20table%2EdataTable%20td%2Eselected%20%7B%0Abackground%2Dcolor%3A%20%23b0bed9%20%21important%3B%0A%7D%0A%0A%2EdataTables%5FscrollBody%20%2EdataTables%5Fsizing%20%7B%0Avisibility%3A%20hidden%3B%0A%7D%0A" rel="stylesheet" /> <script src="data:application/x-javascript;base64,LyohCiBEYXRhVGFibGVzIDEuMTAuMTIKIMKpMjAwOC0yMDE1IFNwcnlNZWRpYSBMdGQgLSBkYXRhdGFibGVzLm5ldC9saWNlbnNlCiovCihmdW5jdGlvbihoKXsiZnVuY3Rpb24iPT09dHlwZW9mIGRlZmluZSYmZGVmaW5lLmFtZD9kZWZpbmUoWyJqcXVlcnkiXSxmdW5jdGlvbihEKXtyZXR1cm4gaChELHdpbmRvdyxkb2N1bWVudCl9KToib2JqZWN0Ij09PXR5cGVvZiBleHBvcnRzP21vZHVsZS5leHBvcnRzPWZ1bmN0aW9uKEQsSSl7RHx8KEQ9d2luZG93KTtJfHwoST0idW5kZWZpbmVkIiE9PXR5cGVvZiB3aW5kb3c/cmVxdWlyZSgianF1ZXJ5Iik6cmVxdWlyZSgianF1ZXJ5IikoRCkpO3JldHVybiBoKEksRCxELmRvY3VtZW50KX06aChqUXVlcnksd2luZG93LGRvY3VtZW50KX0pKGZ1bmN0aW9uKGgsRCxJLGspe2Z1bmN0aW9uIFgoYSl7dmFyIGIsYyxkPXt9O2guZWFjaChhLGZ1bmN0aW9uKGUpe2lmKChiPWUubWF0Y2goL14oW15BLVpdKz8pKFtBLVpdKS8pKSYmLTEhPT0iYSBhYSBhaSBhbyBhcyBiIGZuIGkgbSBvIHMgIi5pbmRleE9mKGJbMV0rIiAiKSljPWUucmVwbGFjZShiWzBdLGJbMl0udG9Mb3dlckNhc2UoKSksCmRbY109ZSwibyI9PT1iWzFdJiZYKGFbZV0pfSk7YS5faHVuZ2FyaWFuTWFwPWR9ZnVuY3Rpb24gSy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Expc3RlbmVyOlZhLF9mblNvcnRBdHRhY2hMaXN0ZW5lcjpNYSxfZm5Tb3J0aW5nQ2xhc3Nlczp2YSxfZm5Tb3J0RGF0YTpJYixfZm5TYXZlU3RhdGU6d2EsX2ZuTG9hZFN0YXRlOktiLF9mblNldHRpbmdzRnJvbU5vZGU6eGEsX2ZuTG9nOkwsX2ZuTWFwOkUsX2ZuQmluZEFjdGlvbjpXYSxfZm5DYWxsYmFja1JlZzp6LApfZm5DYWxsYmFja0ZpcmU6dSxfZm5MZW5ndGhPdmVyZmxvdzpTYSxfZm5SZW5kZXJlcjpOYSxfZm5EYXRhU291cmNlOnksX2ZuUm93QXR0cmlidXRlczpMYSxfZm5DYWxjdWxhdGVFbmQ6ZnVuY3Rpb24oKXt9fSk7aC5mbi5kYXRhVGFibGU9bTttLiQ9aDtoLmZuLmRhdGFUYWJsZVNldHRpbmdzPW0uc2V0dGluZ3M7aC5mbi5kYXRhVGFibGVFeHQ9bS5leHQ7aC5mbi5EYXRhVGFibGU9ZnVuY3Rpb24oYSl7cmV0dXJuIGgodGhpcykuZGF0YVRhYmxlKGEpLmFwaSgpfTtoLmVhY2gobSxmdW5jdGlvbihhLGIpe2guZm4uRGF0YVRhYmxlW2FdPWJ9KTtyZXR1cm4gaC5mbi5kYXRhVGFibGV9KTsK"></script> </head> <body style="background-color:white;"> <div id="htmlwidget_container"> <div id="htmlwidget-54bdf8d10639b4fd961c" class="datatables html-widget" style="width:960px;height:500px;"> </div> </div> <script type="application/json" data-for="htmlwidget-54bdf8d10639b4fd961c">{"x":{"filter":"none","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"],["Ashland Community and Technical College\t","Big Sandy Community and Technical College\t","Bluegrass Community and Technical College\t","Elizabethtown Community and Technical College\t","Gateway Community and Technical College","Hazard Community and Technical College\t","Henderson Community College\t","Hopkinsville Community College\t","Jefferson Community and Technical College","Madisonville Community College\t","Maysville Community and Technical College\t","Owensboro Community and Technical College\t","Somerset Community College\t","Southcentral Kentucky Community and Technical College\t","Southeast Kentucky Community and Technical College\t","West Kentucky Community and Technical College\t"],[2,5,93,64,32,5,2,6,122,8,8,30,22,28,3,6],[1,3,40,41,17,1,1,4,85,6,5,16,16,20,1,4],[50,60,43.01,64.06,53.12,20,50,66.67,69.67,75,62.5,53.33,72.73,71.43,33.33,66.67]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>College<\/th>\n <th>Number of companies<\/th>\n <th>Number of companies offering college tuition benefits<\/th>\n <th>Percent of companies offering college tuition benefits (%)<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"columnDefs":[{"className":"dt-right","targets":[2,3,4]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false},"selection":{"mode":"multiple","selected":null,"target":"row"}},"evals":[],"jsHooks":[]}</script> <script type="application/htmlwidget-sizing" data-for="htmlwidget-54bdf8d10639b4fd961c">{"viewer":{"width":450,"height":350,"padding":15,"fill":true},"browser":{"width":960,"height":500,"padding":40,"fill":false}}</script> </body> </html>