├── google2f742af40be37ae6.html ├── image └── 1.jpg ├── css ├── kedipterminal.css ├── kedipjam.css ├── blur.css ├── bgandterminal.css ├── menu.css └── custom.css ├── js ├── terminal1.js ├── tanggal.js ├── jam.js ├── terminal.js ├── cat.js ├── jquery.countdown.min.js ├── jquery.countdown.js └── garis.js ├── README.md ├── index.php └── DES.php /google2f742af40be37ae6.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google2f742af40be37ae6.html -------------------------------------------------------------------------------- /image/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ridhoreynaldo/Algoritma-Kriptografi-DES/HEAD/image/1.jpg -------------------------------------------------------------------------------- /css/kedipterminal.css: -------------------------------------------------------------------------------- 1 | 2 | .a{ 3 | -webkit-animation: fade-in 0.27s linear infinite alternate; 4 | 5 | color: #00fafe; 6 | } 7 | -------------------------------------------------------------------------------- /js/terminal1.js: -------------------------------------------------------------------------------- 1 | new TypingText(document.getElementById("message"), 50, function(i){ var ar 2 | = new Array(""); return " " + ar[i.length % ar.length]; }); 3 | //Type out examples: 4 | TypingText.runAll(); -------------------------------------------------------------------------------- /js/tanggal.js: -------------------------------------------------------------------------------- 1 | var months = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember']; 2 | var myDays = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum'at', 'Sabtu']; 3 | var date = new Date(); 4 | var day = date.getDate(); 5 | var month = date.getMonth(); 6 | var thisDay = date.getDay(), 7 | thisDay = myDays[thisDay]; 8 | var yy = date.getYear(); 9 | var year = (yy < 1000) ? yy + 1900 : yy; 10 | document.write(thisDay + ', ' + day + ' ' + months[month] + ' ' + year); 11 | -------------------------------------------------------------------------------- /js/jam.js: -------------------------------------------------------------------------------- 1 | function renderTime(){ 2 | var currentTime = new Date(); 3 | var h = currentTime.getHours(); 4 | var m = currentTime.getMinutes(); 5 | var s = currentTime.getSeconds(); 6 | if (h == 0){ 7 | h = 24; 8 | } 9 | if (h < 10){ 10 | h = "0" + h; 11 | } 12 | if (m < 10){ 13 | m = "0" + m; 14 | } 15 | if (s < 10){ 16 | s = "0" + s; 17 | } 18 | var myClock = document.getElementById('clockDisplay'); 19 | myClock.textContent = h + ":" + m + ":" + s + ""; 20 | setTimeout ('renderTime()',1000); 21 | } 22 | renderTime(); 23 | -------------------------------------------------------------------------------- /css/kedipjam.css: -------------------------------------------------------------------------------- 1 | 2 | .anic { 3 | -webkit-animation: fade-in 0.27s linear infinite alternate; 4 | -moz-animation: fade-in 0.27s linear infinite alternate; 5 | animation: fade-in 0.27s linear infinite alternate; 6 | font-family:comic sans ms; 7 | color:00fafe; 8 | } 9 | @-moz-keyframes fade-in { 10 | 0% { 11 | opacity: 0; 12 | } 13 | 65% { 14 | opacity: 1; 15 | } 16 | } 17 | @-webkit-keyframes fade-in { 18 | 0% { 19 | opacity: 0; 20 | } 21 | 65% { 22 | opacity: 1; 23 | } 24 | } 25 | @keyframes fade-in { 26 | 0% { 27 | opacity: 0; 28 | } 29 | 65% { 30 | opacity: 1; 31 | } 32 | } -------------------------------------------------------------------------------- /css/blur.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | height: 100%; 3 | } 4 | 5 | * { 6 | box-sizing: border-box; 7 | } 8 | .bg-image { 9 | background: url(../image/1.jpg); 10 | margin: 0; 11 | padding: 0; 12 | background-size: 100%; 13 | filter: blur(8px); 14 | -webkit-filter: blur(8px); 15 | 16 | height: 100%; 17 | background-position: center; 18 | background-repeat: no-repeat; 19 | background-size: cover; 20 | } 21 | 22 | 23 | /* Position text in the middle of the page/image */ 24 | .bg-text { 25 | position: absolute; 26 | top: 40%; 27 | left: 50%; 28 | transform: translate(-50%, -50%); 29 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Author : Ridho Reynaldo 2 | 3 | Organization : Universitas Islam Negeri Sumatera Utara 4 | 5 | Date : 24 April 2022 6 | 7 | Resource : Github https://github.com/ridhoreynaldo 8 | 9 | Instagram : https://instagram.com/ridho_reynaldo 10 | 11 | Note : Ini Dibuat dengan Algoritma Cryptography DES-ECB(Electronic Codebook) 12 | Menggunakan Fungsi DES Manual Dan Otomatis(openssl). 13 | Silahkan Eksplorasi. 14 | Perhitungan Manual dan BAB IV Silahkan Hubungi Instagram 15 | 16 | Masukkan File apa saja untuk dienkripsi 17 | masukkan kunci ascii/string 8digit 18 | 19 | file di enkripsi cek dengan notepad dan find 8 digit terakhir sebelum tanda :: maka sesuaikan dengan perhitungan manual 20 | -------------------------------------------------------------------------------- /css/bgandterminal.css: -------------------------------------------------------------------------------- 1 | 2 | #wrapper{ 3 | 4 | width: 800px; 5 | 6 | margin: 10px auto; 7 | 8 | text-align: left; 9 | 10 | background: url('') no-repeat center center fixed ; 11 | 12 | } 13 | 14 | #console{ 15 | 16 | height: 400px; 17 | 18 | overflow: auto; 19 | 20 | background-color: #000; 21 | 22 | padding: 15px; 23 | 24 | font-family: monospace; 25 | 26 | font-size: 12px; 27 | 28 | 29 | } 30 | 31 | .box{ 32 | 33 | -moz-box-shadow: 1px 1px 8px #00fafe; 34 | 35 | -webkit-box-shadow: 1px 1px 8px #00fafe; 36 | 37 | box-shadow: 1px 1px 8px #00fafe; 38 | 39 | border: solid 1px black; 40 | 41 | -webkit-border-radius: 8px 8px 0px 0px; 42 | 43 | -moz-border-radius: 8px 8px 0px 0px; 44 | 45 | border-radius: 8px 8px 0px 0px; 46 | 47 | margin: 15px 0px; 48 | 49 | background-color: #00fafe; 50 | 51 | opacity: 0.8; 52 | 53 | } 54 | 55 | .prefix{ 56 | 57 | color: #00fafe; 58 | 59 | } -------------------------------------------------------------------------------- /css/menu.css: -------------------------------------------------------------------------------- 1 | nav { 2 | margin: 10px auto 0; 3 | 4 | position: relative; 5 | width: 210px; 6 | height: 50px; 7 | background-color: #34495e; 8 | border-radius: 8px; 9 | font-size: 0; 10 | } 11 | nav a { 12 | line-height: 50px; 13 | height: 100%; 14 | font-size: 15px; 15 | display: inline-block; 16 | position: relative; 17 | z-index: 1; 18 | text-decoration: none; 19 | text-transform: uppercase; 20 | text-align: center; 21 | color: white; 22 | cursor: pointer; 23 | } 24 | nav .animation { 25 | position: absolute; 26 | height: 100%; 27 | top: 0; 28 | z-index: 0; 29 | transition: all .5s ease 0s; 30 | border-radius: 8px; 31 | } 32 | a:nth-child(1) { 33 | width: 100px; 34 | left: 10; 35 | } 36 | a:nth-child(2) { 37 | width: 110px; 38 | left: 15; 39 | } 40 | nav .start-index, a:nth-child(1):hover~.animation { 41 | width: 135px; 42 | left: 0; 43 | background-color: #17a836; 44 | } 45 | nav .start-about, a:nth-child(2):hover~.animation { 46 | width: 70px; 47 | left: 140px; 48 | background-color: #a11b5a; 49 | } -------------------------------------------------------------------------------- /css/custom.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: url(../img/chess-1.jpg) #132533 no-repeat center center; 3 | -webkit-background-size: cover; 4 | background-size: cover; 5 | height: 100vh; 6 | } 7 | .login-container{ 8 | position: absolute; 9 | top: 50%; 10 | left: 50%; 11 | transform: translate(-50%,-50%); 12 | } 13 | .login-container .login-content{ 14 | background: rgba(0, 0, 0, 0.4); 15 | } 16 | .pos-r{ 17 | position: relative; 18 | } 19 | .login-container .login-header{ 20 | padding: 10px 30px; 21 | } 22 | .login-container, .login-container a,.login-container input{ 23 | color: #ffffff; 24 | } 25 | .login-container .login-title span{ 26 | padding: 10px 20px; 27 | display: inline-block; 28 | margin-bottom: 20px; 29 | text-shadow: -1px 1px 1px rgb(17, 42, 51); 30 | } 31 | .login-container .login-title span strong{ 32 | color: #4bccff; 33 | } 34 | .login-container .login-body{ 35 | padding: 30px 30px; 36 | } 37 | .login-container .login-body input.form-control{ 38 | background: rgba(0, 0, 0, 0.7); 39 | height: 50px; 40 | border-radius: 0; 41 | -webkit-box-shadow: none; 42 | -moz-box-shadow: none; 43 | box-shadow: none; 44 | border: none; 45 | border-left: 3px solid transparent; 46 | font-size: 16px; 47 | -o-transition:all .5s; 48 | -webkit-transition:all .5s; 49 | transition:all .5s; 50 | } 51 | .login-container .login-body input.form-control:focus{ 52 | border-color: #4bccff; 53 | } 54 | .login-container .login-body input.form-control + i{ 55 | position: absolute; 56 | right: 15px; 57 | top: 15px; 58 | font-size: 20px; 59 | color: rgb(24, 80, 103); 60 | -o-transition:all .5s; 61 | -webkit-transition:all .5s; 62 | transition:all .5s; 63 | } 64 | .login-container .login-body input.form-control:focus + i{ 65 | color: #4bccff; 66 | } 67 | .login-container .login-body button { 68 | height: 50px; 69 | -moz-border-radius: 0px; 70 | -webkit-border-radius: 0px; 71 | border-radius: 0px; 72 | font-size: 20px; 73 | } 74 | .login-container .login-footer{ 75 | padding: 20px 0; 76 | } 77 | .template h5 a { 78 | color: #4bccff; 79 | } 80 | 81 | @media only screen and (max-width: 600px), screen and (max-height: 610px) { 82 | 83 | .login-container { 84 | padding: 0px; 85 | } 86 | .login-container .login-title span { 87 | padding: 0px; 88 | margin-bottom: 10px; 89 | } 90 | .login-container .login-content { 91 | background: none; 92 | -moz-box-shadow: none; 93 | -webkit-box-shadow: none; 94 | box-shadow:none; 95 | } 96 | .login-header { 97 | display: none; 98 | } 99 | .login-container .login-body { 100 | padding: 10px 10px; 101 | } 102 | .login-container .login-footer { 103 | padding: 0; 104 | } 105 | } 106 | @media only screen and (max-height: 400px) { 107 | .login-container{ 108 | position: static; 109 | transform:none; 110 | padding: 0; 111 | } 112 | } -------------------------------------------------------------------------------- /js/terminal.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Tested By ./ rr.M30W 4 | 5 | TypingText = function(element, interval, cursor, finishedCallback) { 6 | 7 | if((typeof document.getElementById == "undefined") || (typeof 8 | 9 | 10 | 11 | element.innerHTML == "undefined")) { 12 | 13 | this.running = true; 14 | 15 | return; 16 | 17 | } 18 | 19 | this.element = element; 20 | 21 | this.finishedCallback = (finishedCallback ? finishedCallback : function() { 22 | 23 | 24 | 25 | return; }); 26 | 27 | this.interval = (typeof interval == "undefined" ? 100 : interval); 28 | 29 | this.origText = this.element.innerHTML; 30 | 31 | this.unparsedOrigText = this.origText; 32 | 33 | this.cursor = (cursor ? cursor : ""); 34 | 35 | this.currentText = ""; 36 | 37 | this.currentChar = 0; 38 | 39 | this.element.typingText = this; 40 | 41 | if(this.element.id == "") this.element.id = "typingtext" + 42 | 43 | 44 | 45 | TypingText.currentIndex++; 46 | 47 | TypingText.all.push(this); 48 | 49 | this.running = false; 50 | 51 | this.inTag = false; 52 | 53 | this.tagBuffer = ""; 54 | 55 | this.inHTMLEntity = false; 56 | 57 | this.HTMLEntityBuffer = ""; 58 | 59 | } 60 | 61 | TypingText.all = new Array(); 62 | 63 | TypingText.currentIndex = 0; 64 | 65 | TypingText.runAll = function() { 66 | 67 | for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run(); 68 | 69 | } 70 | 71 | TypingText.prototype.run = function() { 72 | 73 | if(this.running) return; 74 | 75 | if(typeof this.origText == "undefined") { 76 | 77 | setTimeout("document.getElementById('" + this.element.id + 78 | 79 | 80 | 81 | "').typingText.run()", this.interval); 82 | 83 | return; 84 | 85 | } 86 | 87 | if(this.currentText == "") this.element.innerHTML = ""; 88 | 89 | if(this.currentChar < this.origText.length) { 90 | 91 | if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) { 92 | 93 | this.tagBuffer = "<"; 94 | 95 | this.inTag = true; 96 | 97 | this.currentChar++; 98 | 99 | this.run(); 100 | 101 | return; 102 | 103 | } else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) { 104 | 105 | this.tagBuffer += ">"; 106 | 107 | this.inTag = false; 108 | 109 | this.currentText += this.tagBuffer; 110 | 111 | this.currentChar++; 112 | 113 | this.run(); 114 | 115 | return; 116 | 117 | } else if(this.inTag) { 118 | 119 | this.tagBuffer += this.origText.charAt(this.currentChar); 120 | 121 | this.currentChar++; 122 | 123 | this.run(); 124 | 125 | return; 126 | 127 | } else if(this.origText.charAt(this.currentChar) == "&" && ! 128 | 129 | 130 | 131 | this.inHTMLEntity) { 132 | 133 | this.HTMLEntityBuffer = "&"; 134 | 135 | this.inHTMLEntity = true; 136 | 137 | this.currentChar++; 138 | 139 | this.run(); 140 | 141 | return; 142 | 143 | } else if(this.origText.charAt(this.currentChar) == ";" && 144 | 145 | 146 | 147 | this.inHTMLEntity) { 148 | 149 | this.HTMLEntityBuffer += ";"; 150 | 151 | this.inHTMLEntity = false; 152 | 153 | this.currentText += this.HTMLEntityBuffer; 154 | 155 | this.currentChar++; 156 | 157 | this.run(); 158 | 159 | return; 160 | 161 | } else if(this.inHTMLEntity) { 162 | 163 | this.HTMLEntityBuffer += this.origText.charAt(this.currentChar); 164 | 165 | this.currentChar++; 166 | 167 | this.run(); 168 | 169 | return; 170 | 171 | } else { 172 | 173 | this.currentText += this.origText.charAt(this.currentChar); 174 | 175 | } 176 | 177 | this.element.innerHTML = this.currentText; 178 | 179 | this.element.innerHTML += (this.currentChar < this.origText.length - 1 ? 180 | 181 | 182 | 183 | (typeof this.cursor == "function" ? this.cursor(this.currentText) : this.cursor) : 184 | 185 | 186 | 187 | ""); 188 | 189 | this.currentChar++; 190 | 191 | setTimeout("document.getElementById('" + this.element.id + 192 | 193 | 194 | 195 | "').typingText.run()", this.interval); 196 | 197 | } else { 198 | 199 | this.currentText = ""; 200 | 201 | this.currentChar = 0; 202 | 203 | this.running = false; 204 | 205 | this.finishedCallback(); 206 | 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /js/cat.js: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Cryptography File DES-ECB 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 |
38 |
39 |

40 |
Cryptography File(DES)_
41 |

42 |
43 | 44 | Mode ECB(Electronic Codebook)
45 | Rumus Yi = F(PlainTexti, Key)
46 |
47 | 48 |
49 | 50 | 51 |
52 |
53 | Pilih File 54 |
55 | Kunci :
56 |

57 |
58 |
59 |
60 | 61 | 62 | 63 |
64 | 65 | encrypt($plain, $key); //ENKRIPSI IV MENGHASILKAN HEKSA 103 | $ivchiper = hex2bin($res); //MENGUBAH IV KE ASCII/STRING 104 | 105 | echo "=================INPUT=================
"; 106 | echo "Plain ASCII Inisialisasi Pdf = ".$plain."
"; 107 | echo "Plain Heksa Inisialisasi Pdf = ".$heksaplain."
"; 108 | echo "Plain ASCII Kunci = ".$key."
"; 109 | echo "Plain Heksa Kunci = ".$heksakunci."
"; 110 | echo "=======================================

"; 111 | 112 | echo "================OUTPUT===============
"; 113 | echo "Chiper ASCII Inisialisasi Pdf = ".$ivchiper."
"; 114 | asciitobin($ivchiper,$binerchiper,$heksachiper); //MENGUBAH IV CHIPER KE HEKSA 115 | echo "Chiper Heksa Inisialisasi Pdf = ".$heksachiper."
"; 116 | echo "=======================================

"; 117 | 118 | $msg_encrypted = enkripsiDES($pdfobj, $key, $ivchiper); 119 | $file = fopen("./file/$pdfbaru", 'wb'); 120 | fwrite($file, $msg_encrypted); 121 | fclose($file); 122 | echo "=================== Log ===============
"; 123 | $des->showLog(); 124 | } 125 | else{ 126 | echo ''; 129 | } 130 | } 131 | 132 | else if(isset($_POST['dekripsi'])){ 133 | $kunci = $_POST['kunci']; 134 | $pdf = $_FILES['pdf']['name']; //MENGAMBIL NAMA FILE PDF 135 | $tmp = $_FILES['pdf']['tmp_name']; 136 | $ekstensi = explode(".", $pdf); 137 | $ekstensi1 = ".".$ekstensi[1]; //MENGAMBIL EKSTENSI FILE 138 | $pdfbaru = "dekripsi".date('is').$ekstensi1; //RENAME FILE UNTUK MEMPERMUDAH WRITE DATA 139 | $pdfobj = file_get_contents($tmp); //FILE RAW/OBJECT YANG AKAN DI ENKRIP OPENSSL 140 | 141 | if(strlen($kunci) == 8){ 142 | $msg_encrypted = dekripsiDES($pdfobj, $kunci, $iv); 143 | $plain = $iv; 144 | $key = $kunci; //KUNCI ASCII/STRING 145 | asciitobin($plain,$binerplain,$heksaplain); //MENGUBAH IV KE HEKSA 146 | asciitobin($key,$binerkunci,$heksakunci); //MENGUBAH KUNCI KE HEKSA 147 | 148 | $des = new DataEncryptionStandard(); //FUNGSI DES MANUAL 149 | $res = $des->decrypt($plain, $key); //ENKRIPSI IV MENGHASILKAN HEKSA 150 | $ivchiper = hex2bin($res); //MENGUBAH IV KE ASCII/STRING 151 | 152 | echo "=================INPUT=================
"; 153 | echo "Plain ASCII Inisialisasi Pdf = ".$plain."
"; 154 | echo "Plain Heksa Inisialisasi Pdf = ".$heksaplain."
"; 155 | echo "Plain ASCII Kunci = ".$key."
"; 156 | echo "Plain Heksa Kunci = ".$heksakunci."
"; 157 | echo "=======================================

"; 158 | 159 | echo "================OUTPUT===============
"; 160 | echo "Chiper ASCII Inisialisasi Pdf = ".$ivchiper."
"; 161 | asciitobin($ivchiper,$binerchiper,$heksachiper); //MENGUBAH IV CHIPER KE HEKSA 162 | echo "Chiper Heksa Inisialisasi Pdf = ".$heksachiper."
"; 163 | echo "=======================================

"; 164 | 165 | $file = fopen("./file/$pdfbaru", 'wb'); 166 | fwrite($file, $msg_encrypted); 167 | fclose($file); 168 | echo "=================== Log ===============
"; 169 | $des->showLog(); 170 | } 171 | else{ 172 | echo ''; 175 | } 176 | } 177 | ?> 178 |
179 |
180 |
181 |
182 |
183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /js/jquery.countdown.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/) 3 | * Copyright (c) 2016 Edson Hilios 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | * this software and associated documentation files (the "Software"), to deal in 7 | * the Software without restriction, including without limitation the rights to 8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | * the Software, and to permit persons to whom the Software is furnished to do so, 10 | * subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | (function(factory) { 23 | "use strict"; 24 | if (typeof define === "function" && define.amd) { 25 | define([ "jquery" ], factory); 26 | } else { 27 | factory(jQuery); 28 | } 29 | })(function($) { 30 | "use strict"; 31 | var instances = [], matchers = [], defaultOptions = { 32 | precision: 100, 33 | elapse: false, 34 | defer: false 35 | }; 36 | matchers.push(/^[0-9]*$/.source); 37 | matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source); 38 | matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source); 39 | matchers = new RegExp(matchers.join("|")); 40 | function parseDateString(dateString) { 41 | if (dateString instanceof Date) { 42 | return dateString; 43 | } 44 | if (String(dateString).match(matchers)) { 45 | if (String(dateString).match(/^[0-9]*$/)) { 46 | dateString = Number(dateString); 47 | } 48 | if (String(dateString).match(/\-/)) { 49 | dateString = String(dateString).replace(/\-/g, "/"); 50 | } 51 | return new Date(dateString); 52 | } else { 53 | throw new Error("Couldn't cast `" + dateString + "` to a date object."); 54 | } 55 | } 56 | var DIRECTIVE_KEY_MAP = { 57 | Y: "years", 58 | m: "months", 59 | n: "daysToMonth", 60 | d: "daysToWeek", 61 | w: "weeks", 62 | W: "weeksToMonth", 63 | H: "hours", 64 | M: "minutes", 65 | S: "seconds", 66 | D: "totalDays", 67 | I: "totalHours", 68 | N: "totalMinutes", 69 | T: "totalSeconds" 70 | }; 71 | function escapedRegExp(str) { 72 | var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); 73 | return new RegExp(sanitize); 74 | } 75 | function strftime(offsetObject) { 76 | return function(format) { 77 | var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi); 78 | if (directives) { 79 | for (var i = 0, len = directives.length; i < len; ++i) { 80 | var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || "", plural = directive[3] || "", value = null; 81 | directive = directive[2]; 82 | if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) { 83 | value = DIRECTIVE_KEY_MAP[directive]; 84 | value = Number(offsetObject[value]); 85 | } 86 | if (value !== null) { 87 | if (modifier === "!") { 88 | value = pluralize(plural, value); 89 | } 90 | if (modifier === "") { 91 | if (value < 10) { 92 | value = "0" + value.toString(); 93 | } 94 | } 95 | format = format.replace(regexp, value.toString()); 96 | } 97 | } 98 | } 99 | format = format.replace(/%%/, "%"); 100 | return format; 101 | }; 102 | } 103 | function pluralize(format, count) { 104 | var plural = "s", singular = ""; 105 | if (format) { 106 | format = format.replace(/(:|;|\s)/gi, "").split(/\,/); 107 | if (format.length === 1) { 108 | plural = format[0]; 109 | } else { 110 | singular = format[0]; 111 | plural = format[1]; 112 | } 113 | } 114 | if (Math.abs(count) > 1) { 115 | return plural; 116 | } else { 117 | return singular; 118 | } 119 | } 120 | var Countdown = function(el, finalDate, options) { 121 | this.el = el; 122 | this.$el = $(el); 123 | this.interval = null; 124 | this.offset = {}; 125 | this.options = $.extend({}, defaultOptions); 126 | this.instanceNumber = instances.length; 127 | instances.push(this); 128 | this.$el.data("countdown-instance", this.instanceNumber); 129 | if (options) { 130 | if (typeof options === "function") { 131 | this.$el.on("update.countdown", options); 132 | this.$el.on("stoped.countdown", options); 133 | this.$el.on("finish.countdown", options); 134 | } else { 135 | this.options = $.extend({}, defaultOptions, options); 136 | } 137 | } 138 | this.setFinalDate(finalDate); 139 | if (this.options.defer === false) { 140 | this.start(); 141 | } 142 | }; 143 | $.extend(Countdown.prototype, { 144 | start: function() { 145 | if (this.interval !== null) { 146 | clearInterval(this.interval); 147 | } 148 | var self = this; 149 | this.update(); 150 | this.interval = setInterval(function() { 151 | self.update.call(self); 152 | }, this.options.precision); 153 | }, 154 | stop: function() { 155 | clearInterval(this.interval); 156 | this.interval = null; 157 | this.dispatchEvent("stoped"); 158 | }, 159 | toggle: function() { 160 | if (this.interval) { 161 | this.stop(); 162 | } else { 163 | this.start(); 164 | } 165 | }, 166 | pause: function() { 167 | this.stop(); 168 | }, 169 | resume: function() { 170 | this.start(); 171 | }, 172 | remove: function() { 173 | this.stop.call(this); 174 | instances[this.instanceNumber] = null; 175 | delete this.$el.data().countdownInstance; 176 | }, 177 | setFinalDate: function(value) { 178 | this.finalDate = parseDateString(value); 179 | }, 180 | update: function() { 181 | if (this.$el.closest("html").length === 0) { 182 | this.remove(); 183 | return; 184 | } 185 | var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(), newTotalSecsLeft; 186 | newTotalSecsLeft = this.finalDate.getTime() - now.getTime(); 187 | newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3); 188 | newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft); 189 | if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) { 190 | return; 191 | } else { 192 | this.totalSecsLeft = newTotalSecsLeft; 193 | } 194 | this.elapsed = now >= this.finalDate; 195 | this.offset = { 196 | seconds: this.totalSecsLeft % 60, 197 | minutes: Math.floor(this.totalSecsLeft / 60) % 60, 198 | hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24, 199 | days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, 200 | daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, 201 | daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368), 202 | weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7), 203 | weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4, 204 | months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368), 205 | years: Math.abs(this.finalDate.getFullYear() - now.getFullYear()), 206 | totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24), 207 | totalHours: Math.floor(this.totalSecsLeft / 60 / 60), 208 | totalMinutes: Math.floor(this.totalSecsLeft / 60), 209 | totalSeconds: this.totalSecsLeft 210 | }; 211 | if (!this.options.elapse && this.totalSecsLeft === 0) { 212 | this.stop(); 213 | this.dispatchEvent("finish"); 214 | } else { 215 | this.dispatchEvent("update"); 216 | } 217 | }, 218 | dispatchEvent: function(eventName) { 219 | var event = $.Event(eventName + ".countdown"); 220 | event.finalDate = this.finalDate; 221 | event.elapsed = this.elapsed; 222 | event.offset = $.extend({}, this.offset); 223 | event.strftime = strftime(this.offset); 224 | this.$el.trigger(event); 225 | } 226 | }); 227 | $.fn.countdown = function() { 228 | var argumentsArray = Array.prototype.slice.call(arguments, 0); 229 | return this.each(function() { 230 | var instanceNumber = $(this).data("countdown-instance"); 231 | if (instanceNumber !== undefined) { 232 | var instance = instances[instanceNumber], method = argumentsArray[0]; 233 | if (Countdown.prototype.hasOwnProperty(method)) { 234 | instance[method].apply(instance, argumentsArray.slice(1)); 235 | } else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) { 236 | instance.setFinalDate.call(instance, method); 237 | instance.start(); 238 | } else { 239 | $.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method)); 240 | } 241 | } else { 242 | new Countdown(this, argumentsArray[0], argumentsArray[1]); 243 | } 244 | }); 245 | }; 246 | }); -------------------------------------------------------------------------------- /DES.php: -------------------------------------------------------------------------------- 1 | 1, 62 | 2 => 1, 63 | 3 => 2, 64 | 4 => 2, 65 | 5 => 2, 66 | 6 => 2, 67 | 7 => 2, 68 | 8 => 2, 69 | 9 => 1, 70 | 10 => 2, 71 | 11 => 2, 72 | 12 => 2, 73 | 13 => 2, 74 | 14 => 2, 75 | 15 => 2, 76 | 16 => 1); 77 | 78 | private function leftShift($keyPC1) { 79 | return substr($keyPC1, 1, (strlen($keyPC1) - 1)) . substr($keyPC1, 0, 1); 80 | } 81 | 82 | private function permutation($array, $data) { 83 | $rs = ''; 84 | foreach($array as $index) { 85 | $rs .= $data[$index-1]; 86 | } 87 | return $rs; 88 | } 89 | 90 | private function dataXOR($data1, $data2) { 91 | if(strlen($data1) != strlen($data2)) exit('xor err'); 92 | 93 | $rs = ''; 94 | for($i = 0; $i < strlen($data1); $i++) { 95 | if(($data1[$i] == '1' or $data2[$i] == '1') and ($data1[$i] == '0' or $data2[$i] == '0')) $logic = '1'; 96 | else $logic = '0'; 97 | $rs .= $logic; 98 | } 99 | return $rs; 100 | } 101 | 102 | private function sbox($EL) { 103 | $S = array( 104 | array( 105 | array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7), 106 | array(0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8), 107 | array(4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0), 108 | array(15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13), 109 | ), 110 | array( 111 | array(15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10), 112 | array(3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5), 113 | array(0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15), 114 | array(13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9), 115 | ), 116 | array( 117 | array(10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8), 118 | array(13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1), 119 | array(13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7), 120 | array(1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12), 121 | ), 122 | array( 123 | array(7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15), 124 | array(13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9), 125 | array(10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4), 126 | array(3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14), 127 | ), 128 | array( 129 | array(2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9), 130 | array(14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6), 131 | array(4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14), 132 | array(11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3), 133 | ), 134 | array( 135 | array(12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11), 136 | array(10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8), 137 | array(9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6), 138 | array(4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13), 139 | ), 140 | array( 141 | array(4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1), 142 | array(13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6), 143 | array(1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2), 144 | array(6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12), 145 | ), 146 | array( 147 | array(13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7), 148 | array(1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2), 149 | array(7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8), 150 | array(2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11), 151 | ), 152 | ); 153 | 154 | $BI = array(); 155 | $it = 0; 156 | for($i = 0; $i < 8; $i++){ 157 | $row = substr($EL, $it, 6); 158 | 159 | $a = base_convert($row[0].$row[5], 2, 10); 160 | $b = base_convert(substr($row, 1, 4), 2, 10); 161 | 162 | $BICurrent = base_convert($S[$i][$a][$b], 10, 2); 163 | 164 | $BI[$i] = (strlen($BICurrent) < 4)? str_pad($BICurrent, 4, "0", STR_PAD_LEFT) : $BICurrent; 165 | $it += 6; 166 | } 167 | 168 | return implode('', $BI); 169 | } 170 | 171 | private function stringToHexToBin($key) { 172 | $binKey = ''; 173 | for($i = 0; $i < strlen($key); $i++) { 174 | $num = ord($key[$i]); 175 | $bin = base_convert($num, 10, 2); 176 | if(strlen($bin) < 8) $bin = str_pad($bin, 8, "0", STR_PAD_LEFT); 177 | 178 | $binKey .= $bin; 179 | } 180 | return $binKey; 181 | } 182 | 183 | private function stringToHex ($s) { 184 | $r = ""; 185 | $hexes = array ("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"); 186 | for ($i = 0; $i < strlen($s); $i++) { 187 | $r .= ($hexes [(ord($s[$i]) >> 4)] . $hexes [(ord($s[$i]) & 0xf)]); 188 | } 189 | return $r; 190 | } 191 | 192 | private function hexToBin($hex){ 193 | $bin=""; 194 | for ($i = 0; $i < strlen($hex); $i++){ 195 | switch($hex[$i]){ 196 | case "0" : $bin .= "0000"; break; 197 | case "1" : $bin .= "0001"; break; 198 | case "2" : $bin .= "0010"; break; 199 | case "3" : $bin .= "0011"; break; 200 | case "4" : $bin .= "0100"; break; 201 | case "5" : $bin .= "0101"; break; 202 | case "6" : $bin .= "0110"; break; 203 | case "7" : $bin .= "0111"; break; 204 | case "8" : $bin .= "1000"; break; 205 | case "9" : $bin .= "1001"; break; 206 | case "A" : $bin .= "1010"; break; 207 | case "B" : $bin .= "1011"; break; 208 | case "C" : $bin .= "1100"; break; 209 | case "D" : $bin .= "1101"; break; 210 | case "E" : $bin .= "1110"; break; 211 | case "F" : $bin .= "1111"; break; 212 | } 213 | } 214 | return $bin; 215 | } 216 | 217 | private function generateKey($key){ 218 | // Step 1 : Create 16 Subkeys 219 | $this->log['key']['key'] = $key; 220 | $this->log['key']['hexKey'] = $this->stringToHex($key); // string key to hex 221 | $binKey = $this->log['key']['binKey'] = $this->stringToHexToBin($key); // string key to hex then to binary 222 | 223 | $keyPC1 = ''; 224 | foreach($this->PC1 as $index) { 225 | // given K is permuted according to PC-1 226 | $this->log['key']['keyPermutation (K+)'] = $keyPC1 .= $binKey[$index-1]; 227 | } 228 | 229 | // Step 2 : K+ splitting 230 | $C[0] = substr($keyPC1, 0, 28); 231 | $D[0] = substr($keyPC1, 28, 28); 232 | 233 | // step 3 : Creating 16 subkeys using shifting 234 | for($i = 1; $i <= 16; $i++) { 235 | $shiftC = $C[$i-1]; 236 | $shiftD = $D[$i-1]; 237 | 238 | for($shiftIndex = 1; $shiftIndex <= $this->r[$i]; $shiftIndex++) { 239 | $shiftC = $this->leftShift($shiftC); // left shift Cn 240 | $shiftD = $this->leftShift($shiftD); // left shift Dn 241 | } 242 | $C[$i] = $shiftC; 243 | $D[$i] = $shiftD; 244 | } 245 | 246 | // step 4 : PC-2 Permutation 247 | for($i = 1; $i <= 16; $i++) { 248 | $concat = $C[$i] . $D[$i]; 249 | 250 | $this->k[$i] = ''; // Kn (permuted according to the PC-2) 251 | foreach($this->PC2 as $index) { 252 | $this->k[$i] .= $concat[$index-1]; 253 | } 254 | } 255 | 256 | foreach($D as $id => $row) { 257 | $this->log['key']['C-' . $id] = $C[$id]; 258 | $this->log['key']['D-' . $id] = $D[$id]; 259 | if(isset($this->k[$id])) $this->log['key']['K-' . $id] = $this->k[$id]; 260 | } 261 | } 262 | private function generateKeyChiper($key){ 263 | // Step 1 : Create 16 Subkeys 264 | $this->log['key']['key'] = $key; 265 | $this->log['key']['hexKey'] = $this->stringToHex($key); // string key to hex 266 | $binKey = $this->log['key']['binKey'] = $this->stringToHexToBin($key); // string key to hex then to binary 267 | 268 | $keyPC1 = ''; 269 | foreach($this->PC1 as $index) { 270 | // given K is permuted according to PC-1 271 | $this->log['key']['keyPermutation (K+)'] = $keyPC1 .= $binKey[$index-1]; 272 | } 273 | 274 | // Step 2 : K+ splitting 275 | $C[0] = substr($keyPC1, 0, 28); 276 | $D[0] = substr($keyPC1, 28, 28); 277 | 278 | // step 3 : Creating 16 subkeys using shifting 279 | for($i = 1; $i <= 16; $i++) { 280 | $shiftC = $C[$i-1]; 281 | $shiftD = $D[$i-1]; 282 | 283 | for($shiftIndex = 1; $shiftIndex <= $this->r[$i]; $shiftIndex++) { 284 | $shiftC = $this->leftShift($shiftC); // left shift Cn 285 | $shiftD = $this->leftShift($shiftD); // left shift Dn 286 | } 287 | $C[$i] = $shiftC; 288 | $D[$i] = $shiftD; 289 | $CC[$i] = $C[$i]; 290 | $DD[$i] = $D[$i]; 291 | } 292 | for ($j = 16; $j >= 1; $j--){ 293 | $k++; 294 | $C[$j] = $CC[$k]; 295 | $D[$j] = $DD[$k]; 296 | } 297 | // step 4 : PC-2 Permutation 298 | for($i = 1; $i <= 16; $i++) { 299 | $concat = $C[$i] . $D[$i]; 300 | 301 | $this->k[$i] = ''; // Kn (permuted according to the PC-2) 302 | foreach($this->PC2 as $index) { 303 | $this->k[$i] .= $concat[$index-1]; 304 | } 305 | } 306 | 307 | foreach($D as $id => $row) { 308 | $this->log['key']['C-' . $id] = $C[$id]; 309 | $this->log['key']['D-' . $id] = $D[$id]; 310 | if(isset($this->k[$id])) $this->log['key']['K-' . $id] = $this->k[$id]; 311 | } 312 | } 313 | private function encryptMessage($message){ 314 | // Step 1: IP permutation 315 | $this->log['msg']['message'] = $message; 316 | $this->log['msg']['hexMsg'] = $this->stringToHex($message); 317 | $binMsg = $this->log['msg']['binMsg'] = $this->stringToHexToBin($message); 318 | 319 | $sourceIP = ''; 320 | foreach($this->IP as $IPIndex) { 321 | $this->log['msg']['msgIP'] = $sourceIP .= $binMsg[$IPIndex - 1]; 322 | } 323 | 324 | // Step 2 : IP splitting 325 | $L = $R = array(); 326 | $L[0] = $this->log['msg']['L0'] = substr($sourceIP, 0, 32); 327 | $R[0] = $this->log['msg']['R0'] = substr($sourceIP, 32, 32); 328 | 329 | // Step 3 : Iterations 330 | for($i = 1; $i <= 16; $i++) { 331 | // set Ln 332 | $L[$i] = $this->log['msg']['L' . $i] = $R[$i-1]; 333 | 334 | // Step 3.1 : E permutation 335 | $EL = $this->log['msg']['E(R' . ($i - 1) . ')'] = $this->permutation($this->E, $L[$i]); 336 | 337 | // Step 3.2 : XOR with a subkey 338 | $this->log['msg']['K' . $i] = $this->k[$i]; 339 | $this->log['msg']['K' . $i . ' xor E(R' . ($i - 1) . ')'] = $EL = $this->dataXOR($EL, $this->k[$i]); 340 | 341 | // Step 3.3 : S box transformation 342 | $this->log['msg']['S(B1)S(B2)S(B3)S(B4)S(B5)S(B6)S(B7)S(B8) ' . $i] = $s = $this->sbox($EL); 343 | 344 | // Step 3.4 : P permutation 345 | $this->log['msg']['f = P(S(B1)S(B2)S(B3)S(B4)S(B5)S(B6)S(B7)S(B8)) ' . $i] = $f = $this->permutation($this->P, $s); 346 | 347 | // set Rn 348 | $this->log['msg']['R' . $i] = $R[$i] = $this->dataXOR($L[$i-1], $f); 349 | } 350 | 351 | // Step 4 : Reverse Connecting 352 | $this->log['msg']['L16 concat R16'] = $concat = $R[16] . $L[16]; 353 | 354 | // Step 5 : IP-1 permutation 355 | $this->log['msg']['IP-1 permutation'] = $encoded = $this->permutation($this->IP1, $concat); 356 | $this->log['msg']['result'] = $result = ''; 357 | for($start = 0; $start < strlen($encoded); $start += 4) { 358 | $this->log['msg']['result'] = $result .= strtoupper(base_convert(substr($encoded, $start, 4), 2, 16)); 359 | } 360 | 361 | // result with convert into hex 362 | return $result; 363 | } 364 | 365 | public function encrypt($message, $key){ 366 | if(strlen($message) == 8 && strlen($key) == 8) { 367 | $this->generateKey($key); 368 | return $this->encryptMessage($message); 369 | } else { 370 | echo 'Message & Key lenght must be 8 characters.'; 371 | } 372 | } 373 | public function decrypt($message, $key){ 374 | if(strlen($message) == 8 && strlen($key) == 8) { 375 | $this->generateKeyChiper($key); 376 | return $this->encryptMessage($message); 377 | } else { 378 | echo 'Message & Key lenght must be 8 characters.'; 379 | } 380 | } 381 | public function showLog(){ 382 | echo '
';
383 | 		print_r($this->log, false);
384 | 		echo '
'; 385 | } 386 | } -------------------------------------------------------------------------------- /js/garis.js: -------------------------------------------------------------------------------- 1 | 2 | if(els.length>1){noteError({type:'select:too-many:by-attribute',selector:selector});} 3 | return els[0];}})();;(function(){var prevEls={};CloudflareApps.createElement=function(options,prevEl){CloudflareApps.internal.markSelectors();try{if(prevEl&&prevEl.parentNode){var replacedEl;if(prevEl.cfAppsElementId){replacedEl=prevEls[prevEl.cfAppsElementId];} 4 | if(replacedEl){prevEl.parentNode.replaceChild(replacedEl,prevEl);delete prevEls[prevEl.cfAppsElementId];}else{prevEl.parentNode.removeChild(prevEl);}} 5 | var element=document.createElement('cloudflare-app');var container;try{container=CloudflareApps.querySelector(options.selector);}catch(e){} 6 | if(!container){return element;} 7 | if(!container.parentNode&&(options.method=="after"||options.method=="before"||options.method=="replace")){return element;} 8 | if(container==document.body){if(options.method=="after") 9 | options.method="append";else if(options.method=="before") 10 | options.method="prepend";} 11 | switch(options.method){case"prepend":if(container.firstChild){container.insertBefore(element,container.firstChild);break;} 12 | case"append":container.appendChild(element);break;case"after":if(container.nextSibling){container.parentNode.insertBefore(element,container.nextSibling);}else{container.parentNode.appendChild(element);} 13 | break;case"before":container.parentNode.insertBefore(element,container);break;case"replace":try{id=element.cfAppsElementId=Math.random().toString(36);prevEls[id]=container;}catch(e){} 14 | container.parentNode.replaceChild(element,container);} 15 | return element;}catch(e){if(typeof console!=="undefined"&&typeof console.error!=="undefined"){console.error("Error creating Cloudflare Apps element",e);}}}})();;(function(){CloudflareApps.matchPage=function(patterns){if(!patterns||!patterns.length){return true;} 16 | if(window.CloudflareApps&&CloudflareApps.proxy&&CloudflareApps.proxy.originalURL){var url=CloudflareApps.proxy.originalURL.parsed;var loc=url.host+url.path;}else{var loc=document.location.host+document.location.pathname;} 17 | for(var i=0;i=33){last=now();return fn(diff,function(){return requestAnimationFrame(tick);});}else{return setTimeout(tick,33-diff);}};return tick();};result=function(){var args,key,obj;obj=arguments[0],key=arguments[1],args=3<=arguments.length?__slice.call(arguments,2):[];if(typeof obj[key]==='function'){return obj[key].apply(obj,args);}else{return obj[key];}};extend=function(){var key,out,source,sources,val,_i,_len;out=arguments[0],sources=2<=arguments.length?__slice.call(arguments,1):[];for(_i=0,_len=sources.length;_i<_len;_i++){source=sources[_i];if(source){for(key in source){if(!__hasProp.call(source,key))continue;val=source[key];if((out[key]!=null)&&typeof out[key]==='object'&&(val!=null)&&typeof val==='object'){extend(out[key],val);}else{out[key]=val;}}}} 20 | return out;};avgAmplitude=function(arr){var count,sum,v,_i,_len;sum=count=0;for(_i=0,_len=arr.length;_i<_len;_i++){v=arr[_i];sum+=Math.abs(v);count++;} 21 | return sum/count;};getFromDOM=function(key,json){var data,e,el;if(key==null){key='options';} 22 | if(json==null){json=true;} 23 | el=document.querySelector("[data-pace-"+key+"]");if(!el){return;} 24 | data=el.getAttribute("data-pace-"+key);if(!json){return data;} 25 | try{return JSON.parse(data);}catch(_error){e=_error;return typeof console!=="undefined"&&console!==null?console.error("Error parsing inline pace options",e):void 0;}};Evented=(function(){function Evented(){} 26 | Evented.prototype.on=function(event,handler,ctx,once){var _base;if(once==null){once=false;} 27 | if(this.bindings==null){this.bindings={};} 28 | if((_base=this.bindings)[event]==null){_base[event]=[];} 29 | return this.bindings[event].push({handler:handler,ctx:ctx,once:once});};Evented.prototype.once=function(event,handler,ctx){return this.on(event,handler,ctx,true);};Evented.prototype.off=function(event,handler){var i,_ref,_results;if(((_ref=this.bindings)!=null?_ref[event]:void 0)==null){return;} 30 | if(handler==null){return delete this.bindings[event];}else{i=0;_results=[];while(i=100){progressStr='99';}else{progressStr=this.progress<10?"0":"";progressStr+=this.progress|0;} 40 | el.children[0].setAttribute('data-progress',""+progressStr);} 41 | return this.lastRenderedProgress=this.progress;};Bar.prototype.done=function(){return this.progress>=100;};return Bar;})();Events=(function(){function Events(){this.bindings={};} 42 | Events.prototype.trigger=function(name,val){var binding,_j,_len1,_ref2,_results;if(this.bindings[name]!=null){_ref2=this.bindings[name];_results=[];for(_j=0,_len1=_ref2.length;_j<_len1;_j++){binding=_ref2[_j];_results.push(binding.call(this,val));} 43 | return _results;}};Events.prototype.on=function(name,fn){var _base;if((_base=this.bindings)[name]==null){_base[name]=[];} 44 | return this.bindings[name].push(fn);};return Events;})();_XMLHttpRequest=window.XMLHttpRequest;_XDomainRequest=window.XDomainRequest;_WebSocket=window.WebSocket;extendNative=function(to,from){var e,key,val,_results;_results=[];for(key in from.prototype){try{val=from.prototype[key];if((to[key]==null)&&typeof val!=='function'){_results.push(to[key]=val);}else{_results.push(void 0);}}catch(_error){e=_error;}} 45 | return _results;};ignoreStack=[];Pace.ignore=function(){var args,fn,ret;fn=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];ignoreStack.unshift('ignore');ret=fn.apply(null,args);ignoreStack.shift();return ret;};Pace.track=function(){var args,fn,ret;fn=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];ignoreStack.unshift('track');ret=fn.apply(null,args);ignoreStack.shift();return ret;};shouldTrack=function(method){var _ref2;if(method==null){method='GET';} 46 | if(ignoreStack[0]==='track'){return'force';} 47 | if(!ignoreStack.length&&options.ajax){if(method==='socket'&&options.ajax.trackWebSockets){return true;}else if(_ref2=method.toUpperCase(),__indexOf.call(options.ajax.trackMethods,_ref2)>=0){return true;}} 48 | return false;};RequestIntercept=(function(_super){__extends(RequestIntercept,_super);function RequestIntercept(){var monitorXHR,_this=this;RequestIntercept.__super__.constructor.apply(this,arguments);monitorXHR=function(req){var _open;_open=req.open;return req.open=function(type,url,async){if(shouldTrack(type)){_this.trigger('request',{type:type,url:url,request:req});} 49 | return _open.apply(req,arguments);};};window.XMLHttpRequest=function(flags){var req;req=new _XMLHttpRequest(flags);monitorXHR(req);return req;};try{extendNative(window.XMLHttpRequest,_XMLHttpRequest);}catch(_error){} 50 | if(_XDomainRequest!=null){window.XDomainRequest=function(){var req;req=new _XDomainRequest;monitorXHR(req);return req;};try{extendNative(window.XDomainRequest,_XDomainRequest);}catch(_error){}} 51 | if((_WebSocket!=null)&&options.ajax.trackWebSockets){window.WebSocket=function(url,protocols){var req;if(protocols!=null){req=new _WebSocket(url,protocols);}else{req=new _WebSocket(url);} 52 | if(shouldTrack('socket')){_this.trigger('request',{type:'socket',url:url,protocols:protocols,request:req});} 53 | return req;};try{extendNative(window.WebSocket,_WebSocket);}catch(_error){}}} 54 | return RequestIntercept;})(Events);_intercept=null;getIntercept=function(){if(_intercept==null){_intercept=new RequestIntercept;} 55 | return _intercept;};shouldIgnoreURL=function(url){var pattern,_j,_len1,_ref2;_ref2=options.ajax.ignoreURLs;for(_j=0,_len1=_ref2.length;_j<_len1;_j++){pattern=_ref2[_j];if(typeof pattern==='string'){if(url.indexOf(pattern)!==-1){return true;}}else{if(pattern.test(url)){return true;}}} 56 | return false;};getIntercept().on('request',function(_arg){var after,args,request,type,url;type=_arg.type,request=_arg.request,url=_arg.url;if(shouldIgnoreURL(url)){return;} 57 | if(!Pace.running&&(options.restartOnRequestAfter!==false||shouldTrack(type)==='force')){args=arguments;after=options.restartOnRequestAfter||0;if(typeof after==='boolean'){after=0;} 58 | return setTimeout(function(){var stillActive,_j,_len1,_ref2,_ref3,_results;if(type==='socket'){stillActive=request.readyState<2;}else{stillActive=(0<(_ref2=request.readyState)&&_ref2<4);} 59 | if(stillActive){Pace.restart();_ref3=Pace.sources;_results=[];for(_j=0,_len1=_ref3.length;_j<_len1;_j++){source=_ref3[_j];if(source instanceof AjaxMonitor){source.watch.apply(source,args);break;}else{_results.push(void 0);}} 60 | return _results;}},after);}});AjaxMonitor=(function(){function AjaxMonitor(){var _this=this;this.elements=[];getIntercept().on('request',function(){return _this.watch.apply(_this,arguments);});} 61 | AjaxMonitor.prototype.watch=function(_arg){var request,tracker,type,url;type=_arg.type,request=_arg.request,url=_arg.url;if(shouldIgnoreURL(url)){return;} 62 | if(type==='socket'){tracker=new SocketRequestTracker(request);}else{tracker=new XHRRequestTracker(request);} 63 | return this.elements.push(tracker);};return AjaxMonitor;})();XHRRequestTracker=(function(){function XHRRequestTracker(request){var event,size,_j,_len1,_onreadystatechange,_ref2,_this=this;this.progress=0;if(window.ProgressEvent!=null){size=null;request.addEventListener('progress',function(evt){if(evt.lengthComputable){return _this.progress=100*evt.loaded/evt.total;}else{return _this.progress=_this.progress+(100-_this.progress)/2;}},false);_ref2=['load','abort','timeout','error'];for(_j=0,_len1=_ref2.length;_j<_len1;_j++){event=_ref2[_j];request.addEventListener(event,function(){return _this.progress=100;},false);}}else{_onreadystatechange=request.onreadystatechange;request.onreadystatechange=function(){var _ref3;if((_ref3=request.readyState)===0||_ref3===4){_this.progress=100;}else if(request.readyState===3){_this.progress=50;} 64 | return typeof _onreadystatechange==="function"?_onreadystatechange.apply(null,arguments):void 0;};}} 65 | return XHRRequestTracker;})();SocketRequestTracker=(function(){function SocketRequestTracker(request){var event,_j,_len1,_ref2,_this=this;this.progress=0;_ref2=['error','open'];for(_j=0,_len1=_ref2.length;_j<_len1;_j++){event=_ref2[_j];request.addEventListener(event,function(){return _this.progress=100;},false);}} 66 | return SocketRequestTracker;})();ElementMonitor=(function(){function ElementMonitor(options){var selector,_j,_len1,_ref2;if(options==null){options={};} 67 | this.elements=[];if(options.selectors==null){options.selectors=[];} 68 | _ref2=options.selectors;for(_j=0,_len1=_ref2.length;_j<_len1;_j++){selector=_ref2[_j];this.elements.push(new ElementTracker(selector));}} 69 | return ElementMonitor;})();ElementTracker=(function(){function ElementTracker(selector){this.selector=selector;this.progress=0;this.check();} 70 | ElementTracker.prototype.check=function(){var _this=this;if(document.querySelector(this.selector)){return this.done();}else{return setTimeout((function(){return _this.check();}),options.elements.checkInterval);}};ElementTracker.prototype.done=function(){return this.progress=100;};return ElementTracker;})();DocumentMonitor=(function(){DocumentMonitor.prototype.states={loading:0,interactive:50,complete:100};function DocumentMonitor(){var _onreadystatechange,_ref2,_this=this;this.progress=(_ref2=this.states[document.readyState])!=null?_ref2:100;_onreadystatechange=document.onreadystatechange;document.onreadystatechange=function(){if(_this.states[document.readyState]!=null){_this.progress=_this.states[document.readyState];} 71 | return typeof _onreadystatechange==="function"?_onreadystatechange.apply(null,arguments):void 0;};} 72 | return DocumentMonitor;})();EventLagMonitor=(function(){function EventLagMonitor(){var avg,interval,last,points,samples,_this=this;this.progress=0;avg=0;samples=[];points=0;last=now();interval=setInterval(function(){var diff;diff=now()-last-50;last=now();samples.push(diff);if(samples.length>options.eventLag.sampleCount){samples.shift();} 73 | avg=avgAmplitude(samples);if(++points>=options.eventLag.minSamples&&avg=100){this.done=true;} 77 | if(val===this.last){this.sinceLastUpdate+=frameTime;}else{if(this.sinceLastUpdate){this.rate=(val-this.last)/this.sinceLastUpdate;} 78 | this.catchup=(val-this.progress)/options.catchupTime;this.sinceLastUpdate=0;this.last=val;} 79 | if(val>this.progress){this.progress+=this.catchup*frameTime;} 80 | scaling=1-Math.pow(this.progress/100,options.easeFactor);this.progress+=scaling*this.rate*frameTime;this.progress=Math.min(this.lastProgress+options.maxProgressPerFrame,this.progress);this.progress=Math.max(0,this.progress);this.progress=Math.min(100,this.progress);this.lastProgress=this.progress;return this.progress;};return Scaler;})();sources=null;scalers=null;bar=null;uniScaler=null;animation=null;cancelAnimation=null;Pace.running=false;handlePushState=function(){if(options.restartOnPushState){return Pace.restart();}};if(window.history.pushState!=null){_pushState=window.history.pushState;window.history.pushState=function(){handlePushState();return _pushState.apply(window.history,arguments);};} 81 | if(window.history.replaceState!=null){_replaceState=window.history.replaceState;window.history.replaceState=function(){handlePushState();return _replaceState.apply(window.history,arguments);};} 82 | SOURCE_KEYS={ajax:AjaxMonitor,elements:ElementMonitor,document:DocumentMonitor,eventLag:EventLagMonitor};(init=function(){var type,_j,_k,_len1,_len2,_ref2,_ref3,_ref4;Pace.sources=sources=[];_ref2=['ajax','elements','document','eventLag'];for(_j=0,_len1=_ref2.length;_j<_len1;_j++){type=_ref2[_j];if(options[type]!==false){sources.push(new SOURCE_KEYS[type](options[type]));}} 83 | _ref4=(_ref3=options.extraSources)!=null?_ref3:[];for(_k=0,_len2=_ref4.length;_k<_len2;_k++){source=_ref4[_k];sources.push(new source(options));} 84 | Pace.bar=bar=new Bar;scalers=[];return uniScaler=new Scaler;})();Pace.stop=function(){Pace.trigger('stop');Pace.running=false;bar.destroy();cancelAnimation=true;if(animation!=null){if(typeof cancelAnimationFrame==="function"){cancelAnimationFrame(animation);} 85 | animation=null;} 86 | return init();};Pace.restart=function(){Pace.trigger('restart');Pace.stop();return Pace.start();};Pace.go=function(){var start;Pace.running=true;bar.render();start=now();cancelAnimation=false;return animation=runAnimation(function(frameTime,enqueueNextFrame){var avg,count,done,element,elements,i,j,remaining,scaler,scalerList,sum,_j,_k,_len1,_len2,_ref2;remaining=100-bar.progress;count=sum=0;done=true;for(i=_j=0,_len1=sources.length;_j<_len1;i=++_j){source=sources[i];scalerList=scalers[i]!=null?scalers[i]:scalers[i]=[];elements=(_ref2=source.elements)!=null?_ref2:[source];for(j=_k=0,_len2=elements.length;_k<_len2;j=++_k){element=elements[j];scaler=scalerList[j]!=null?scalerList[j]:scalerList[j]=new Scaler(element);done&=scaler.done;if(scaler.done){continue;} 87 | count++;sum+=scaler.tick(frameTime);}} 88 | avg=sum/count;bar.update(uniScaler.tick(frameTime,avg));if(bar.done()||done||cancelAnimation){bar.update(100);Pace.trigger('done');return setTimeout(function(){bar.finish();Pace.running=false;return Pace.trigger('hide');},Math.max(options.ghostTime,Math.max(options.minTime-(now()-start),0)));}else{return enqueueNextFrame();}});};paceHideStyle=null;Pace.start=function(_options){extend(options,_options);if(options.hidePage){if(!paceHideStyle){paceHideStyle=document.createElement('style');document.head.appendChild(paceHideStyle);} 89 | paceHideStyle.innerHTML="body > *:not(.pace), body:before, body:after { -webkit-transition: opacity .4s ease-in-out; -moz-transition: opacity .4s ease-in-out; -o-transition: opacity .4s ease-in-out; -ms-transition: opacity .4s ease-in-out; transition: opacity .4s ease-in-out } body:not(.pace-done) > *:not(.pace), body:not(.pace-done):before, body:not(.pace-done):after { opacity: 0 }";}else{if(paceHideStyle!=null){paceHideStyle.innerHTML='';}} 90 | Pace.running=true;try{bar.render();}catch(_error){NoTargetError=_error;} 91 | if(!document.querySelector('.pace')){return setTimeout(Pace.start,50);}else{Pace.trigger('start');return Pace.go();}};if(typeof define==='function'&&define.amd){define(function(){return Pace;});}else if(typeof exports==='object'){module.exports=Pace;}else{if(options.startOnPageLoad){Pace.start();}}}).call(this);};if(CloudflareApps.matchPage(CloudflareApps.installs['iSZW6n3Vjx_C'].URLPatterns)){(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');};if(CloudflareApps.matchPage(CloudflareApps.installs['iSZW6n3Vjx_C'].URLPatterns)){(function(){var options=CloudflareApps.installs['iSZW6n3Vjx_C'].options 92 | if(!options.id)return 93 | window.ga('create',options.id,'auto') 94 | window.ga('send','pageview') 95 | if(options.social){(function(b){(function(a){"__CF"in b&&"DJS"in b.__CF?b.__CF.DJS.push(a):"addEventListener"in b?b.addEventListener("load",a,!1):b.attachEvent("onload",a)})(function(){"FB"in b&&"Event"in FB&&"subscribe"in FB.Event&&(FB.Event.subscribe("edge.create",function(a){_gaq.push(["_trackSocial","facebook","like",a])}),FB.Event.subscribe("edge.remove",function(a){_gaq.push(["_trackSocial","facebook","unlike",a])}),FB.Event.subscribe("message.send",function(a){_gaq.push(["_trackSocial","facebook","send",a])}));"twttr"in b&&"events"in twttr&&"bind"in twttr.events&&twttr.events.bind("tweet",function(a){if(a){var b;if(a.target&&a.target.nodeName=="IFRAME")a:{if(a=a.target.src){a=a.split("#")[0].match(/[^?=&]+=([^&]*)?/g);b=0;for(var c;c=a[b];++b)if(c.indexOf("url")===0){b=unescape(c.split("=")[1]);break a}}b=void 0}_gaq.push(["_trackSocial","twitter","tweet",b])}})})})(window);}}())};if(CloudflareApps.matchPage(CloudflareApps.installs['vgQQj4xXjc6k'].URLPatterns)){(function(Math){var trimLeft=/^\s+/,trimRight=/\s+$/,tinyCounter=0,mathRound=Math.round,mathMin=Math.min,mathMax=Math.max,mathRandom=Math.random;function tinycolor(color,opts){color=(color)?color:'';opts=opts||{};if(color instanceof tinycolor){return color;} 96 | if(!(this instanceof tinycolor)){return new tinycolor(color,opts);} 97 | var rgb=inputToRGB(color);this._originalInput=color,this._r=rgb.r,this._g=rgb.g,this._b=rgb.b,this._a=rgb.a,this._roundA=mathRound(100*this._a)/100,this._format=opts.format||rgb.format;this._gradientType=opts.gradientType;if(this._r<1){this._r=mathRound(this._r);} 98 | if(this._g<1){this._g=mathRound(this._g);} 99 | if(this._b<1){this._b=mathRound(this._b);} 100 | this._ok=rgb.ok;this._tc_id=tinyCounter++;} 101 | tinycolor.prototype={isDark:function(){return this.getBrightness()<128;},isLight:function(){return!this.isDark();},isValid:function(){return this._ok;},getOriginalInput:function(){return this._originalInput;},getFormat:function(){return this._format;},getAlpha:function(){return this._a;},getBrightness:function(){var rgb=this.toRgb();return(rgb.r*299+rgb.g*587+rgb.b*114)/1000;},getLuminance:function(){var rgb=this.toRgb();var RsRGB,GsRGB,BsRGB,R,G,B;RsRGB=rgb.r/255;GsRGB=rgb.g/255;BsRGB=rgb.b/255;if(RsRGB<=0.03928){R=RsRGB/12.92;}else{R=Math.pow(((RsRGB+0.055)/1.055),2.4);} 102 | if(GsRGB<=0.03928){G=GsRGB/12.92;}else{G=Math.pow(((GsRGB+0.055)/1.055),2.4);} 103 | if(BsRGB<=0.03928){B=BsRGB/12.92;}else{B=Math.pow(((BsRGB+0.055)/1.055),2.4);} 104 | return(0.2126*R)+(0.7152*G)+(0.0722*B);},setAlpha:function(value){this._a=boundAlpha(value);this._roundA=mathRound(100*this._a)/100;return this;},toHsv:function(){var hsv=rgbToHsv(this._r,this._g,this._b);return{h:hsv.h*360,s:hsv.s,v:hsv.v,a:this._a};},toHsvString:function(){var hsv=rgbToHsv(this._r,this._g,this._b);var h=mathRound(hsv.h*360),s=mathRound(hsv.s*100),v=mathRound(hsv.v*100);return(this._a==1)?"hsv("+h+", "+s+"%, "+v+"%)":"hsva("+h+", "+s+"%, "+v+"%, "+this._roundA+")";},toHsl:function(){var hsl=rgbToHsl(this._r,this._g,this._b);return{h:hsl.h*360,s:hsl.s,l:hsl.l,a:this._a};},toHslString:function(){var hsl=rgbToHsl(this._r,this._g,this._b);var h=mathRound(hsl.h*360),s=mathRound(hsl.s*100),l=mathRound(hsl.l*100);return(this._a==1)?"hsl("+h+", "+s+"%, "+l+"%)":"hsla("+h+", "+s+"%, "+l+"%, "+this._roundA+")";},toHex:function(allow3Char){return rgbToHex(this._r,this._g,this._b,allow3Char);},toHexString:function(allow3Char){return'#'+this.toHex(allow3Char);},toHex8:function(){return rgbaToHex(this._r,this._g,this._b,this._a);},toHex8String:function(){return'#'+this.toHex8();},toRgb:function(){return{r:mathRound(this._r),g:mathRound(this._g),b:mathRound(this._b),a:this._a};},toRgbString:function(){return(this._a==1)?"rgb("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+")":"rgba("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+", "+this._roundA+")";},toPercentageRgb:function(){return{r:mathRound(bound01(this._r,255)*100)+"%",g:mathRound(bound01(this._g,255)*100)+"%",b:mathRound(bound01(this._b,255)*100)+"%",a:this._a};},toPercentageRgbString:function(){return(this._a==1)?"rgb("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%)":"rgba("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%, "+this._roundA+")";},toName:function(){if(this._a===0){return"transparent";} 105 | if(this._a<1){return false;} 106 | return hexNames[rgbToHex(this._r,this._g,this._b,true)]||false;},toFilter:function(secondColor){var hex8String='#'+rgbaToHex(this._r,this._g,this._b,this._a);var secondHex8String=hex8String;var gradientType=this._gradientType?"GradientType = 1, ":"";if(secondColor){var s=tinycolor(secondColor);secondHex8String=s.toHex8String();} 107 | return"progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";},toString:function(format){var formatSet=!!format;format=format||this._format;var formattedString=false;var hasAlpha=this._a<1&&this._a>=0;var needsAlphaFormat=!formatSet&&hasAlpha&&(format==="hex"||format==="hex6"||format==="hex3"||format==="name");if(needsAlphaFormat){if(format==="name"&&this._a===0){return this.toName();} 108 | return this.toRgbString();} 109 | if(format==="rgb"){formattedString=this.toRgbString();} 110 | if(format==="prgb"){formattedString=this.toPercentageRgbString();} 111 | if(format==="hex"||format==="hex6"){formattedString=this.toHexString();} 112 | if(format==="hex3"){formattedString=this.toHexString(true);} 113 | if(format==="hex8"){formattedString=this.toHex8String();} 114 | if(format==="name"){formattedString=this.toName();} 115 | if(format==="hsl"){formattedString=this.toHslString();} 116 | if(format==="hsv"){formattedString=this.toHsvString();} 117 | return formattedString||this.toHexString();},clone:function(){return tinycolor(this.toString());},_applyModification:function(fn,args){var color=fn.apply(null,[this].concat([].slice.call(args)));this._r=color._r;this._g=color._g;this._b=color._b;this.setAlpha(color._a);return this;},lighten:function(){return this._applyModification(lighten,arguments);},brighten:function(){return this._applyModification(brighten,arguments);},darken:function(){return this._applyModification(darken,arguments);},desaturate:function(){return this._applyModification(desaturate,arguments);},saturate:function(){return this._applyModification(saturate,arguments);},greyscale:function(){return this._applyModification(greyscale,arguments);},spin:function(){return this._applyModification(spin,arguments);},_applyCombination:function(fn,args){return fn.apply(null,[this].concat([].slice.call(args)));},analogous:function(){return this._applyCombination(analogous,arguments);},complement:function(){return this._applyCombination(complement,arguments);},monochromatic:function(){return this._applyCombination(monochromatic,arguments);},splitcomplement:function(){return this._applyCombination(splitcomplement,arguments);},triad:function(){return this._applyCombination(triad,arguments);},tetrad:function(){return this._applyCombination(tetrad,arguments);}};tinycolor.fromRatio=function(color,opts){if(typeof color=="object"){var newColor={};for(var i in color){if(color.hasOwnProperty(i)){if(i==="a"){newColor[i]=color[i];} 118 | else{newColor[i]=convertToPercentage(color[i]);}}} 119 | color=newColor;} 120 | return tinycolor(color,opts);};function inputToRGB(color){var rgb={r:0,g:0,b:0};var a=1;var s=null;var v=null;var l=null;var ok=false;var format=false;if(typeof color=="string"){color=stringInputToObject(color);} 121 | if(typeof color=="object"){if(isValidCSSUnit(color.r)&&isValidCSSUnit(color.g)&&isValidCSSUnit(color.b)){rgb=rgbToRgb(color.r,color.g,color.b);ok=true;format=String(color.r).substr(-1)==="%"?"prgb":"rgb";} 122 | else if(isValidCSSUnit(color.h)&&isValidCSSUnit(color.s)&&isValidCSSUnit(color.v)){s=convertToPercentage(color.s);v=convertToPercentage(color.v);rgb=hsvToRgb(color.h,s,v);ok=true;format="hsv";} 123 | else if(isValidCSSUnit(color.h)&&isValidCSSUnit(color.s)&&isValidCSSUnit(color.l)){s=convertToPercentage(color.s);l=convertToPercentage(color.l);rgb=hslToRgb(color.h,s,l);ok=true;format="hsl";} 124 | if(color.hasOwnProperty("a")){a=color.a;}} 125 | a=boundAlpha(a);return{ok:ok,format:color.format||format,r:mathMin(255,mathMax(rgb.r,0)),g:mathMin(255,mathMax(rgb.g,0)),b:mathMin(255,mathMax(rgb.b,0)),a:a};} 126 | function rgbToRgb(r,g,b){return{r:bound01(r,255)*255,g:bound01(g,255)*255,b:bound01(b,255)*255};} 127 | function rgbToHsl(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,l=(max+min)/2;if(max==min){h=s=0;} 128 | else{var d=max-min;s=l>0.5?d/(2-max-min):d/(max+min);switch(max){case r:h=(g-b)/d+(g1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p;} 132 | if(s===0){r=g=b=l;} 133 | else{var q=l<0.5?l*(1+s):l+s-l*s;var p=2*l-q;r=hue2rgb(p,q,h+1/3);g=hue2rgb(p,q,h);b=hue2rgb(p,q,h-1/3);} 134 | return{r:r*255,g:g*255,b:b*255};} 135 | function rgbToHsv(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,v=max;var d=max-min;s=max===0?0:d/max;if(max==min){h=0;} 136 | else{switch(max){case r:h=(g-b)/d+(g>1))+720)%360;--results;){hsl.h=(hsl.h+part)%360;ret.push(tinycolor(hsl));} 156 | return ret;} 157 | function monochromatic(color,results){results=results||6;var hsv=tinycolor(color).toHsv();var h=hsv.h,s=hsv.s,v=hsv.v;var ret=[];var modification=1/results;while(results--){ret.push(tinycolor({h:h,s:s,v:v}));v=(v+modification)%1;} 158 | return ret;} 159 | tinycolor.mix=function(color1,color2,amount){amount=(amount===0)?0:(amount||50);var rgb1=tinycolor(color1).toRgb();var rgb2=tinycolor(color2).toRgb();var p=amount/100;var w=p*2-1;var a=rgb2.a-rgb1.a;var w1;if(w*a==-1){w1=w;}else{w1=(w+a)/(1+w*a);} 160 | w1=(w1+1)/2;var w2=1-w1;var rgba={r:rgb2.r*w1+rgb1.r*w2,g:rgb2.g*w1+rgb1.g*w2,b:rgb2.b*w1+rgb1.b*w2,a:rgb2.a*p+rgb1.a*(1-p)};return tinycolor(rgba);};tinycolor.readability=function(color1,color2){var c1=tinycolor(color1);var c2=tinycolor(color2);return(Math.max(c1.getLuminance(),c2.getLuminance())+0.05)/(Math.min(c1.getLuminance(),c2.getLuminance())+0.05);};tinycolor.isReadable=function(color1,color2,wcag2){var readability=tinycolor.readability(color1,color2);var wcag2Parms,out;out=false;wcag2Parms=validateWCAG2Parms(wcag2);switch(wcag2Parms.level+wcag2Parms.size){case"AAsmall":case"AAAlarge":out=readability>=4.5;break;case"AAlarge":out=readability>=3;break;case"AAAsmall":out=readability>=7;break;} 161 | return out;};tinycolor.mostReadable=function(baseColor,colorList,args){var bestColor=null;var bestScore=0;var readability;var includeFallbackColors,level,size;args=args||{};includeFallbackColors=args.includeFallbackColors;level=args.level;size=args.size;for(var i=0;ibestScore){bestScore=readability;bestColor=tinycolor(colorList[i]);}} 162 | if(tinycolor.isReadable(baseColor,bestColor,{"level":level,"size":size})||!includeFallbackColors){return bestColor;} 163 | else{args.includeFallbackColors=false;return tinycolor.mostReadable(baseColor,["#fff","#000"],args);}};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var hexNames=tinycolor.hexNames=flip(names);function flip(o){var flipped={};for(var i in o){if(o.hasOwnProperty(i)){flipped[o[i]]=i;}} 164 | return flipped;} 165 | function boundAlpha(a){a=parseFloat(a);if(isNaN(a)||a<0||a>1){a=1;} 166 | return a;} 167 | function bound01(n,max){if(isOnePointZero(n)){n="100%";} 168 | var processPercent=isPercentage(n);n=mathMin(max,mathMax(0,parseFloat(n)));if(processPercent){n=parseInt(n*max,10)/100;} 169 | if((Math.abs(n-max)<0.000001)){return 1;} 170 | return(n%max)/parseFloat(max);} 171 | function clamp01(val){return mathMin(1,mathMax(0,val));} 172 | function parseIntFromHex(val){return parseInt(val,16);} 173 | function isOnePointZero(n){return typeof n=="string"&&n.indexOf('.')!=-1&&parseFloat(n)===1;} 174 | function isPercentage(n){return typeof n==="string"&&n.indexOf('%')!=-1;} 175 | function pad2(c){return c.length==1?'0'+c:''+c;} 176 | function convertToPercentage(n){if(n<=1){n=(n*100)+"%";} 177 | return n;} 178 | function convertDecimalToHex(d){return Math.round(parseFloat(d)*255).toString(16);} 179 | function convertHexToDecimal(h){return(parseIntFromHex(h)/255);} 180 | var matchers=(function(){var CSS_INTEGER="[-\\+]?\\d+%?";var CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?";var CSS_UNIT="(?:"+CSS_NUMBER+")|(?:"+CSS_INTEGER+")";var PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";var PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";return{CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};})();function isValidCSSUnit(color){return!!matchers.CSS_UNIT.exec(color);} 181 | function stringInputToObject(color){color=color.replace(trimLeft,'').replace(trimRight,'').toLowerCase();var named=false;if(names[color]){color=names[color];named=true;} 182 | else if(color=='transparent'){return{r:0,g:0,b:0,a:0,format:"name"};} 183 | var match;if((match=matchers.rgb.exec(color))){return{r:match[1],g:match[2],b:match[3]};} 184 | if((match=matchers.rgba.exec(color))){return{r:match[1],g:match[2],b:match[3],a:match[4]};} 185 | if((match=matchers.hsl.exec(color))){return{h:match[1],s:match[2],l:match[3]};} 186 | if((match=matchers.hsla.exec(color))){return{h:match[1],s:match[2],l:match[3],a:match[4]};} 187 | if((match=matchers.hsv.exec(color))){return{h:match[1],s:match[2],v:match[3]};} 188 | if((match=matchers.hsva.exec(color))){return{h:match[1],s:match[2],v:match[3],a:match[4]};} 189 | if((match=matchers.hex8.exec(color))){return{a:convertHexToDecimal(match[1]),r:parseIntFromHex(match[2]),g:parseIntFromHex(match[3]),b:parseIntFromHex(match[4]),format:named?"name":"hex8"};} 190 | if((match=matchers.hex6.exec(color))){return{r:parseIntFromHex(match[1]),g:parseIntFromHex(match[2]),b:parseIntFromHex(match[3]),format:named?"name":"hex"};} 191 | if((match=matchers.hex3.exec(color))){return{r:parseIntFromHex(match[1]+''+match[1]),g:parseIntFromHex(match[2]+''+match[2]),b:parseIntFromHex(match[3]+''+match[3]),format:named?"name":"hex"};} 192 | return false;} 193 | function validateWCAG2Parms(parms){var level,size;parms=parms||{"level":"AA","size":"small"};level=(parms.level||"AA").toUpperCase();size=(parms.size||"small").toLowerCase();if(level!=="AA"&&level!=="AAA"){level="AA";} 194 | if(size!=="small"&&size!=="large"){size="small";} 195 | return{"level":level,"size":size};} 196 | if(typeof module!=="undefined"&&module.exports){module.exports=tinycolor;} 197 | else if(typeof define==='function'&&define.amd){define(function(){return tinycolor;});} 198 | else{window.tinycolor=tinycolor;}})(Math);};if(CloudflareApps.matchPage(CloudflareApps.installs['vgQQj4xXjc6k'].URLPatterns)){var pJS=function(tag_id,params){var canvas_el=document.querySelector("#"+tag_id+" > .particles-js-canvas-el") 199 | this.pJS={canvas:{el:canvas_el,w:canvas_el.offsetWidth,h:canvas_el.offsetHeight},particles:{number:{value:400,density:{enable:true,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:false,anim:{enable:false,speed:2,opacity_min:0,sync:false}},size:{value:20,random:false,anim:{enable:false,speed:20,size_min:0,sync:false}},line_linked:{enable:true,distance:100,color:"#fff",opacity:1,width:1},move:{enable:true,speed:2,direction:"none",random:false,straight:false,out_mode:"out",bounce:false,attract:{enable:false,rotateX:3000,rotateY:3000}},array:[]},interactivity:{detect_on:"canvas",events:{onhover:{enable:true,mode:"grab"},onclick:{enable:true,mode:"push"},resize:true},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:0.4},repulse:{distance:200,duration:0.4},push:{particles_nb:4},remove:{particles_nb:2}},mouse:{}},retina_detect:false,fn:{interact:{},modes:{},vendors:{}},tmp:{}} 200 | var pJS=this.pJS 201 | if(params){Object.deepExtend(pJS,params)} 202 | pJS.tmp.obj={size_value:pJS.particles.size.value,size_anim_speed:pJS.particles.size.anim.speed,move_speed:pJS.particles.move.speed,line_linked_distance:pJS.particles.line_linked.distance,line_linked_width:pJS.particles.line_linked.width,mode_grab_distance:pJS.interactivity.modes.grab.distance,mode_bubble_distance:pJS.interactivity.modes.bubble.distance,mode_bubble_size:pJS.interactivity.modes.bubble.size,mode_repulse_distance:pJS.interactivity.modes.repulse.distance} 203 | pJS.fn.retinaInit=function(){if(pJS.retina_detect&&window.devicePixelRatio>1){pJS.canvas.pxratio=window.devicePixelRatio 204 | pJS.tmp.retina=true} 205 | else{pJS.canvas.pxratio=1 206 | pJS.tmp.retina=false} 207 | pJS.canvas.w=pJS.canvas.el.offsetWidth*pJS.canvas.pxratio 208 | pJS.canvas.h=pJS.canvas.el.offsetHeight*pJS.canvas.pxratio 209 | pJS.particles.size.value=pJS.tmp.obj.size_value*pJS.canvas.pxratio 210 | pJS.particles.size.anim.speed=pJS.tmp.obj.size_anim_speed*pJS.canvas.pxratio 211 | pJS.particles.move.speed=pJS.tmp.obj.move_speed*pJS.canvas.pxratio 212 | pJS.particles.line_linked.distance=pJS.tmp.obj.line_linked_distance*pJS.canvas.pxratio 213 | pJS.interactivity.modes.grab.distance=pJS.tmp.obj.mode_grab_distance*pJS.canvas.pxratio 214 | pJS.interactivity.modes.bubble.distance=pJS.tmp.obj.mode_bubble_distance*pJS.canvas.pxratio 215 | pJS.particles.line_linked.width=pJS.tmp.obj.line_linked_width*pJS.canvas.pxratio 216 | pJS.interactivity.modes.bubble.size=pJS.tmp.obj.mode_bubble_size*pJS.canvas.pxratio 217 | pJS.interactivity.modes.repulse.distance=pJS.tmp.obj.mode_repulse_distance*pJS.canvas.pxratio} 218 | pJS.fn.canvasInit=function(){pJS.canvas.ctx=pJS.canvas.el.getContext("2d")} 219 | pJS.fn.canvasSize=function(){pJS.canvas.el.width=pJS.canvas.w 220 | pJS.canvas.el.height=pJS.canvas.h 221 | if(pJS&&pJS.interactivity.events.resize){window.addEventListener("resize",function(){pJS.canvas.w=pJS.canvas.el.offsetWidth 222 | pJS.canvas.h=pJS.canvas.el.offsetHeight 223 | if(pJS.tmp.retina){pJS.canvas.w*=pJS.canvas.pxratio 224 | pJS.canvas.h*=pJS.canvas.pxratio} 225 | pJS.canvas.el.width=pJS.canvas.w 226 | pJS.canvas.el.height=pJS.canvas.h 227 | if(!pJS.particles.move.enable){pJS.fn.particlesEmpty() 228 | pJS.fn.particlesCreate() 229 | pJS.fn.particlesDraw() 230 | pJS.fn.vendors.densityAutoParticles()} 231 | pJS.fn.vendors.densityAutoParticles()})}} 232 | pJS.fn.canvasPaint=function(){pJS.canvas.ctx.fillRect(0,0,pJS.canvas.w,pJS.canvas.h)} 233 | pJS.fn.canvasClear=function(){pJS.canvas.ctx.clearRect(0,0,pJS.canvas.w,pJS.canvas.h)} 234 | pJS.fn.particle=function(color,opacity,position){this.radius=(pJS.particles.size.random?Math.random():1)*pJS.particles.size.value 235 | if(pJS.particles.size.anim.enable){this.size_status=false 236 | this.vs=pJS.particles.size.anim.speed/100 237 | if(!pJS.particles.size.anim.sync){this.vs=this.vs*Math.random()}} 238 | this.x=position?position.x:Math.random()*pJS.canvas.w 239 | this.y=position?position.y:Math.random()*pJS.canvas.h 240 | if(this.x>pJS.canvas.w-this.radius*2)this.x=this.x-this.radius 241 | else if(this.xpJS.canvas.h-this.radius*2)this.y=this.y-this.radius 243 | else if(this.y0){pJS.canvas.ctx.strokeStyle=pJS.particles.shape.stroke.color 312 | pJS.canvas.ctx.lineWidth=pJS.particles.shape.stroke.width 313 | pJS.canvas.ctx.stroke()} 314 | pJS.canvas.ctx.fill()} 315 | pJS.fn.particlesCreate=function(){for(var i=0;i=pJS.particles.opacity.value)p.opacity_status=false 321 | p.opacity+=p.vo}else{if(p.opacity<=pJS.particles.opacity.anim.opacity_min)p.opacity_status=true 322 | p.opacity-=p.vo} 323 | if(p.opacity<0)p.opacity=0} 324 | if(pJS.particles.size.anim.enable){if(p.size_status==true){if(p.radius>=pJS.particles.size.value)p.size_status=false 325 | p.radius+=p.vs}else{if(p.radius<=pJS.particles.size.anim.size_min)p.size_status=true 326 | p.radius-=p.vs} 327 | if(p.radius<0)p.radius=0} 328 | if(pJS.particles.move.out_mode=="bounce"){var new_pos={x_left:p.radius,x_right:pJS.canvas.w,y_top:p.radius,y_bottom:pJS.canvas.h}}else{var new_pos={x_left:-p.radius,x_right:pJS.canvas.w+p.radius,y_top:-p.radius,y_bottom:pJS.canvas.h+p.radius}} 329 | if(p.x-p.radius>pJS.canvas.w){p.x=new_pos.x_left 330 | p.y=Math.random()*pJS.canvas.h} 331 | else if(p.x+p.radius<0){p.x=new_pos.x_right 332 | p.y=Math.random()*pJS.canvas.h} 333 | if(p.y-p.radius>pJS.canvas.h){p.y=new_pos.y_top 334 | p.x=Math.random()*pJS.canvas.w} 335 | else if(p.y+p.radius<0){p.y=new_pos.y_bottom 336 | p.x=Math.random()*pJS.canvas.w} 337 | switch(pJS.particles.move.out_mode){case"bounce":if(p.x+p.radius>pJS.canvas.w)p.vx=-p.vx 338 | else if(p.x-p.radius<0)p.vx=-p.vx 339 | if(p.y+p.radius>pJS.canvas.h)p.vy=-p.vy 340 | else if(p.y-p.radius<0)p.vy=-p.vy 341 | break} 342 | if(isInArray("grab",pJS.interactivity.events.onhover.mode)){pJS.fn.modes.grabParticle(p)} 343 | if(isInArray("bubble",pJS.interactivity.events.onhover.mode)||isInArray("bubble",pJS.interactivity.events.onclick.mode)){pJS.fn.modes.bubbleParticle(p)} 344 | if(isInArray("repulse",pJS.interactivity.events.onhover.mode)||isInArray("repulse",pJS.interactivity.events.onclick.mode)){pJS.fn.modes.repulseParticle(p)} 345 | if(pJS.particles.line_linked.enable||pJS.particles.move.attract.enable){for(var j=i+1;j0){var color_line=pJS.particles.line_linked.color_rgb_line 365 | pJS.canvas.ctx.strokeStyle="rgba("+color_line.r+","+color_line.g+","+color_line.b+","+opacity_line+")" 366 | pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width 367 | pJS.canvas.ctx.beginPath() 368 | pJS.canvas.ctx.moveTo(p1.x,p1.y) 369 | pJS.canvas.ctx.lineTo(p2.x,p2.y) 370 | pJS.canvas.ctx.stroke() 371 | pJS.canvas.ctx.closePath()}}} 372 | pJS.fn.interact.attractParticles=function(p1,p2){var dx=p1.x-p2.x,dy=p1.y-p2.y,dist=Math.sqrt(dx*dx+dy*dy) 373 | if(dist<=pJS.particles.line_linked.distance){var ax=dx/(pJS.particles.move.attract.rotateX*1000),ay=dy/(pJS.particles.move.attract.rotateY*1000) 374 | p1.vx-=ax 375 | p1.vy-=ay 376 | p2.vx+=ax 377 | p2.vy+=ay}} 378 | pJS.fn.interact.bounceParticles=function(p1,p2){var dx=p1.x-p2.x,dy=p1.y-p2.y,dist=Math.sqrt(dx*dx+dy*dy),dist_p=p1.radius+p2.radius 379 | if(dist<=dist_p){p1.vx=-p1.vx 380 | p1.vy=-p1.vy 381 | p2.vx=-p2.vx 382 | p2.vy=-p2.vy}} 383 | pJS.fn.modes.pushParticles=function(nb,pos){pJS.tmp.pushing=true 384 | for(var i=0;i=0&&pJS.interactivity.status=="mousemove"){if(pJS.interactivity.modes.bubble.size!=pJS.particles.size.value){if(pJS.interactivity.modes.bubble.size>pJS.particles.size.value){var size=p.radius+(pJS.interactivity.modes.bubble.size*ratio) 394 | if(size>=0){p.radius_bubble=size}}else{var dif=p.radius-pJS.interactivity.modes.bubble.size,size=p.radius-(dif*ratio) 395 | if(size>0){p.radius_bubble=size}else{p.radius_bubble=0}}} 396 | if(pJS.interactivity.modes.bubble.opacity!=pJS.particles.opacity.value){if(pJS.interactivity.modes.bubble.opacity>pJS.particles.opacity.value){var opacity=pJS.interactivity.modes.bubble.opacity*ratio 397 | if(opacity>p.opacity&&opacity<=pJS.interactivity.modes.bubble.opacity){p.opacity_bubble=opacity}}else{var opacity=p.opacity-(pJS.particles.opacity.value-pJS.interactivity.modes.bubble.opacity)*ratio 398 | if(opacity=pJS.interactivity.modes.bubble.opacity){p.opacity_bubble=opacity}}}}}else{init()} 399 | if(pJS.interactivity.status=="mouseleave"){init()}} 400 | else if(pJS.interactivity.events.onclick.enable&&isInArray("bubble",pJS.interactivity.events.onclick.mode)){if(pJS.tmp.bubble_clicking){var dx_mouse=p.x-pJS.interactivity.mouse.click_pos_x,dy_mouse=p.y-pJS.interactivity.mouse.click_pos_y,dist_mouse=Math.sqrt(dx_mouse*dx_mouse+dy_mouse*dy_mouse),time_spent=(new Date().getTime()-pJS.interactivity.mouse.click_time)/1000 401 | if(time_spent>pJS.interactivity.modes.bubble.duration){pJS.tmp.bubble_duration_end=true} 402 | if(time_spent>pJS.interactivity.modes.bubble.duration*2){pJS.tmp.bubble_clicking=false 403 | pJS.tmp.bubble_duration_end=false}} 404 | function process(bubble_param,particles_param,p_obj_bubble,p_obj,id){if(bubble_param!=particles_param){if(!pJS.tmp.bubble_duration_end){if(dist_mouse<=pJS.interactivity.modes.bubble.distance){if(p_obj_bubble!=undefined)var obj=p_obj_bubble 405 | else var obj=p_obj 406 | if(obj!=bubble_param){var value=p_obj-(time_spent*(p_obj-bubble_param)/pJS.interactivity.modes.bubble.duration) 407 | if(id=="size")p.radius_bubble=value 408 | if(id=="opacity")p.opacity_bubble=value}}else{if(id=="size")p.radius_bubble=undefined 409 | if(id=="opacity")p.opacity_bubble=undefined}}else{if(p_obj_bubble!=undefined){var value_tmp=p_obj-(time_spent*(p_obj-bubble_param)/pJS.interactivity.modes.bubble.duration),dif=bubble_param-value_tmp 410 | value=bubble_param+dif 411 | if(id=="size")p.radius_bubble=value 412 | if(id=="opacity")p.opacity_bubble=value}}}} 413 | if(pJS.tmp.bubble_clicking){process(pJS.interactivity.modes.bubble.size,pJS.particles.size.value,p.radius_bubble,p.radius,"size") 414 | process(pJS.interactivity.modes.bubble.opacity,pJS.particles.opacity.value,p.opacity_bubble,p.opacity,"opacity")}}} 415 | pJS.fn.modes.repulseParticle=function(p){if(pJS.interactivity.events.onhover.enable&&isInArray("repulse",pJS.interactivity.events.onhover.mode)&&pJS.interactivity.status=="mousemove"){var dx_mouse=p.x-pJS.interactivity.mouse.pos_x,dy_mouse=p.y-pJS.interactivity.mouse.pos_y,dist_mouse=Math.sqrt(dx_mouse*dx_mouse+dy_mouse*dy_mouse) 416 | var normVec={x:dx_mouse/dist_mouse,y:dy_mouse/dist_mouse},repulseRadius=pJS.interactivity.modes.repulse.distance,velocity=100,repulseFactor=clamp((1/repulseRadius)*(-1*Math.pow(dist_mouse/repulseRadius,2)+1)*repulseRadius*velocity,0,50) 417 | var pos={x:p.x+normVec.x*repulseFactor,y:p.y+normVec.y*repulseFactor} 418 | if(pJS.particles.move.out_mode=="bounce"){if(pos.x-p.radius>0&&pos.x+p.radius0&&pos.y+p.radiuspJS.canvas.w)p.vx=-p.vx 431 | else if(pos.x-p.radius<0)p.vx=-p.vx 432 | if(pos.y+p.radius>pJS.canvas.h)p.vy=-p.vy 433 | else if(pos.y-p.radius<0)p.vy=-p.vy}} 434 | if(d<=repulseRadius){process()}}else{if(pJS.tmp.repulse_clicking==false){p.vx=p.vx_i 435 | p.vy=p.vy_i}}}} 436 | pJS.fn.modes.grabParticle=function(p){if(pJS.interactivity.events.onhover.enable&&pJS.interactivity.status=="mousemove"){var dx_mouse=p.x-pJS.interactivity.mouse.pos_x,dy_mouse=p.y-pJS.interactivity.mouse.pos_y,dist_mouse=Math.sqrt(dx_mouse*dx_mouse+dy_mouse*dy_mouse) 437 | if(dist_mouse<=pJS.interactivity.modes.grab.distance){var opacity_line=pJS.interactivity.modes.grab.line_linked.opacity-(dist_mouse/(1/pJS.interactivity.modes.grab.line_linked.opacity))/pJS.interactivity.modes.grab.distance 438 | if(opacity_line>0){var color_line=pJS.particles.line_linked.color_rgb_line 439 | pJS.canvas.ctx.strokeStyle="rgba("+color_line.r+","+color_line.g+","+color_line.b+","+opacity_line+")" 440 | pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width 441 | pJS.canvas.ctx.beginPath() 442 | pJS.canvas.ctx.moveTo(p.x,p.y) 443 | pJS.canvas.ctx.lineTo(pJS.interactivity.mouse.pos_x,pJS.interactivity.mouse.pos_y) 444 | pJS.canvas.ctx.stroke() 445 | pJS.canvas.ctx.closePath()}}}} 446 | pJS.fn.vendors.eventsListeners=function(){if(pJS.interactivity.detect_on=="window"){pJS.interactivity.el=window}else{pJS.interactivity.el=pJS.canvas.el} 447 | if(pJS.interactivity.events.onhover.enable||pJS.interactivity.events.onclick.enable){pJS.interactivity.el.addEventListener("mousemove",function(e){if(pJS.interactivity.el==window){var pos_x=e.clientX,pos_y=e.clientY} 448 | else{var pos_x=e.offsetX||e.clientX,pos_y=e.offsetY||e.clientY} 449 | pJS.interactivity.mouse.pos_x=pos_x 450 | pJS.interactivity.mouse.pos_y=pos_y 451 | if(pJS.tmp.retina){pJS.interactivity.mouse.pos_x*=pJS.canvas.pxratio 452 | pJS.interactivity.mouse.pos_y*=pJS.canvas.pxratio} 453 | pJS.interactivity.status="mousemove"}) 454 | pJS.interactivity.el.addEventListener("mouseleave",function(e){pJS.interactivity.mouse.pos_x=null 455 | pJS.interactivity.mouse.pos_y=null 456 | pJS.interactivity.status="mouseleave"})} 457 | if(pJS.interactivity.events.onclick.enable){pJS.interactivity.el.addEventListener("click",function(){pJS.interactivity.mouse.click_pos_x=pJS.interactivity.mouse.pos_x 458 | pJS.interactivity.mouse.click_pos_y=pJS.interactivity.mouse.pos_y 459 | pJS.interactivity.mouse.click_time=new Date().getTime() 460 | if(pJS.interactivity.events.onclick.enable){switch(pJS.interactivity.events.onclick.mode){case"push":if(pJS.particles.move.enable){pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb,pJS.interactivity.mouse)}else{if(pJS.interactivity.modes.push.particles_nb==1){pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb,pJS.interactivity.mouse)} 461 | else if(pJS.interactivity.modes.push.particles_nb>1){pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb)}} 462 | break 463 | case"remove":pJS.fn.modes.removeParticles(pJS.interactivity.modes.remove.particles_nb) 464 | break 465 | case"bubble":pJS.tmp.bubble_clicking=true 466 | break 467 | case"repulse":pJS.tmp.repulse_clicking=true 468 | pJS.tmp.repulse_count=0 469 | pJS.tmp.repulse_finish=false 470 | setTimeout(function(){pJS.tmp.repulse_clicking=false},pJS.interactivity.modes.repulse.duration*1000) 471 | break}}})}} 472 | pJS.fn.vendors.densityAutoParticles=function(){if(pJS.particles.number.density.enable){var area=pJS.canvas.el.width*pJS.canvas.el.height/1000 473 | if(pJS.tmp.retina){area=area/(pJS.canvas.pxratio*2)} 474 | var nb_particles=area*pJS.particles.number.value/pJS.particles.number.density.value_area 475 | var missing_particles=pJS.particles.array.length-nb_particles 476 | if(missing_particles<0)pJS.fn.modes.pushParticles(Math.abs(missing_particles)) 477 | else pJS.fn.modes.removeParticles(missing_particles)}} 478 | pJS.fn.vendors.checkOverlap=function(p1,position){for(var i=0;i=pJS.particles.number.value){pJS.fn.particlesDraw() 521 | if(!pJS.particles.move.enable)cancelRequestAnimFrame(pJS.fn.drawAnimFrame) 522 | else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw)}else{if(!pJS.tmp.img_error)pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw)}}else{if(pJS.tmp.img_obj!=undefined){pJS.fn.particlesDraw() 523 | if(!pJS.particles.move.enable)cancelRequestAnimFrame(pJS.fn.drawAnimFrame) 524 | else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw)}else{if(!pJS.tmp.img_error)pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw)}}}else{pJS.fn.particlesDraw() 525 | if(!pJS.particles.move.enable)cancelRequestAnimFrame(pJS.fn.drawAnimFrame) 526 | else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw)}} 527 | pJS.fn.vendors.checkBeforeDraw=function(){if(pJS.particles.shape.type=="image"){if(pJS.tmp.img_type=="svg"&&pJS.tmp.source_svg==undefined){pJS.tmp.checkAnimFrame=requestAnimFrame(check)}else{cancelRequestAnimFrame(pJS.tmp.checkAnimFrame) 528 | if(!pJS.tmp.img_error){pJS.fn.vendors.init() 529 | pJS.fn.vendors.draw()}}}else{pJS.fn.vendors.init() 530 | pJS.fn.vendors.draw()}} 531 | pJS.fn.vendors.init=function(){pJS.fn.retinaInit() 532 | pJS.fn.canvasInit() 533 | pJS.fn.canvasSize() 534 | pJS.fn.canvasPaint() 535 | pJS.fn.particlesCreate() 536 | pJS.fn.vendors.densityAutoParticles() 537 | pJS.particles.line_linked.color_rgb_line=hexToRgb(pJS.particles.line_linked.color)} 538 | pJS.fn.vendors.start=function(){if(isInArray("image",pJS.particles.shape.type)){pJS.tmp.img_type=pJS.particles.shape.image.src.substr(pJS.particles.shape.image.src.length-3) 539 | pJS.fn.vendors.loadImg(pJS.tmp.img_type)}else{pJS.fn.vendors.checkBeforeDraw()}} 540 | pJS.fn.vendors.eventsListeners() 541 | pJS.fn.vendors.start()} 542 | Object.deepExtend=function(destination,source){for(var property in source){if(source[property]&&source[property].constructor&&source[property].constructor===Object){destination[property]=destination[property]||{} 543 | arguments.callee(destination[property],source[property])}else{destination[property]=source[property]}} 544 | return destination} 545 | window.requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60)}})() 546 | window.cancelRequestAnimFrame=(function(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout})() 547 | function hexToRgb(hex){var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i 548 | hex=hex.replace(shorthandRegex,function(m,r,g,b){return r+r+g+g+b+b}) 549 | var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) 550 | return result?{r:parseInt(result[1],16),g:parseInt(result[2],16),b:parseInt(result[3],16)}:null} 551 | function clamp(number,min,max){return Math.min(Math.max(number,min),max)} 552 | function isInArray(value,array){return array.indexOf(value)>-1} 553 | window.pJSDom=[] 554 | window.particlesJS=function(tag_id,params){if(typeof(tag_id)!="string"){params=tag_id 555 | tag_id="particles-js"} 556 | if(!tag_id){tag_id="particles-js"} 557 | var pJS_tag=document.getElementById(tag_id),pJS_canvas_class="particles-js-canvas-el",exist_canvas=pJS_tag.getElementsByClassName(pJS_canvas_class) 558 | if(exist_canvas.length){while(exist_canvas.length>0){pJS_tag.removeChild(exist_canvas[0])}} 559 | var canvas_el=document.createElement("canvas") 560 | canvas_el.className=pJS_canvas_class 561 | canvas_el.style.width="100%" 562 | canvas_el.style.height="100%" 563 | var canvas=document.getElementById(tag_id).appendChild(canvas_el) 564 | if(canvas!=null){pJSDom.push(new pJS(tag_id,params))}} 565 | window.particlesJS.load=function(tag_id,path_config_json,callback){var xhr=new XMLHttpRequest() 566 | xhr.open("GET",path_config_json) 567 | xhr.onreadystatechange=function(data){if(xhr.readyState==4){if(xhr.status==200){var params=JSON.parse(data.currentTarget.response) 568 | window.particlesJS(tag_id,params) 569 | if(callback)callback()}else{console.log("Error pJS - XMLHttpRequest status: "+xhr.status) 570 | console.log("Error pJS - File config not found")}}} 571 | xhr.send()}};if(CloudflareApps.matchPage(CloudflareApps.installs['vgQQj4xXjc6k'].URLPatterns)){"use strict";(function(){if(!window.addEventListener)return;var _window=window;var tinycolor=_window.tinycolor;var CONTAINER_ID="eager-particles-js";var getComputedStyle=document.defaultView.getComputedStyle.bind(document.defaultView);var options=CloudflareApps.installs['vgQQj4xXjc6k'].options;var element=void 0;function getParticleColor(){var particleColor=void 0;if(options.particleColor){particleColor=tinycolor(options.particleColor);}else{var backgroundColor=options.backgroundColor||getComputedStyle(document.body).backgroundColor;var components=tinycolor(backgroundColor).toHsl();components.l=Math.abs((components.l+0.5)%1)+(1-components.s)*0.1;particleColor=tinycolor(components);} 572 | return{hex:particleColor.toHexString(),rgb:particleColor.toRgb()};} 573 | function getInteractivityEvents(){return{onhover:{enable:options.interaction.onHover!=="none",mode:options.interaction.onHover},onclick:{enable:options.interaction.onClick!=="none",mode:options.interaction.onClick},resize:true};} 574 | function updateElement(){var particleColor=getParticleColor();element=Eager.createElement({selector:"body",method:"prepend"},element);element.id=CONTAINER_ID;if(element.parentNode.tagName!=="BODY"){element.parentNode.setAttribute("data-particle-parent","");} 575 | element.style.backgroundColor=options.backgroundColor;window.particlesJS(CONTAINER_ID,{particles:{number:{value:options.fewerParticles?40:80,density:{enable:true,value_area:800}},color:{value:particleColor.hex},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5}},opacity:{value:0.8,random:true,anim:{enable:true,speed:1,opacity_min:0.1,sync:false}},size:{value:3,random:true,anim:{enable:false,speed:40,size_min:0.1,sync:false}},line_linked:{enable:true,distance:160,color:particleColor.hex,opacity:0.45,width:1},move:{enable:true,speed:6,direction:"none",random:false,straight:false,out_mode:options.behavior.outMode,bounce:false,attract:{enable:false,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"window",events:getInteractivityEvents(),modes:{grab:{distance:200,line_linked:{opacity:0.4}},bubble:{distance:350,size:3.1,duration:2,opacity:0.8,speed:3},repulse:{distance:80,duration:0.3},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:true});} 576 | if(document.readyState==="loading"){window.addEventListener("load",updateElement);}else{updateElement();} 577 | window.CloudflareApps.installs['vgQQj4xXjc6k'].scope={setColors:function setColors(nextOptions){options=nextOptions;if(!window.pJSDom){updateElement();return;} 578 | if(element)element.style.backgroundColor=options.backgroundColor;var _getParticleColor=getParticleColor();var hex=_getParticleColor.hex;var rgb=_getParticleColor.rgb;window.pJSDom.forEach(function(_ref){var particles=_ref.pJS.particles;particles.color.value=hex;particles.color.rgb=rgb;particles.line_linked.color=hex;particles.line_linked.color_rgb_line=rgb;});},setCommon:function setCommon(nextOptions){options=nextOptions;if(!window.pJSDom){updateElement();return;} 579 | window.pJSDom.forEach(function(_ref2){var pJS=_ref2.pJS;pJS.particles.move.out_mode=options.behavior.outMode;pJS.interactivity.events=getInteractivityEvents();});},setResetworthy:function setResetworthy(nextOptions){options=nextOptions;if(window.pJSDom){window.pJSDom.forEach(function($){return $.pJS.fn.vendors.destroypJS();});} 580 | updateElement();}};})();};(function(){try{var link=document.createElement('link');link.rel='stylesheet';link.href='data:text/css;charset=utf-8;base64,LyogVGhpcyBpcyBhIGNvbXBpbGVkIGZpbGUsIHlvdSBzaG91bGQgYmUgZWRpdGluZyB0aGUgZmlsZSBpbiB0aGUgdGVtcGxhdGVzIGRpcmVjdG9yeSAqLwoucGFjZSAucGFjZS1wcm9ncmVzcyB7CiAgYmFja2dyb3VuZDogIzdjNjBlMDsKICBwb3NpdGlvbjogZml4ZWQ7CiAgei1pbmRleDogMjAwMDsKICB0b3A6IDA7CiAgbGVmdDogMDsKICBoZWlnaHQ6IDJweDsKCiAgLXdlYmtpdC10cmFuc2l0aW9uOiB3aWR0aCAxczsKICAtbW96LXRyYW5zaXRpb246IHdpZHRoIDFzOwogIC1vLXRyYW5zaXRpb246IHdpZHRoIDFzOwogIHRyYW5zaXRpb246IHdpZHRoIDFzOwp9CgoucGFjZS1pbmFjdGl2ZSB7CiAgZGlzcGxheTogbm9uZTsKfQojZWFnZXItcGFydGljbGVzLWpzIHsKICBib3R0b206IDA7CiAgZGlzcGxheTogYmxvY2s7CiAgbGVmdDogMDsKICBwb3NpdGlvbjogZml4ZWQ7CiAgcmlnaHQ6IDA7CiAgdG9wOiAwOwogIHotaW5kZXg6IC0xOwp9CgojZWFnZXItcGFydGljbGVzLWpzIC5wYXJ0aWNsZXMtanMtY2FudmFzLWVsIHsKICBkaXNwbGF5OiBibG9jazsKICBoZWlnaHQ6IDEwMCU7CiAgd2lkdGg6IDEwMCU7Cn0=';document.getElementsByTagName('head')[0].appendChild(link);}catch(e){}})(); --------------------------------------------------------------------------------