-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle-min.js
1 lines (1 loc) · 13.6 KB
/
bundle-min.js
1
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){var n=e[i][1][r];return o(n||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){const poem=require("./index.js").onlyText;document.querySelector(".poem").innerHTML=poem().join("<br>")},{"./index.js":2}],2:[function(require,module,exports){const luni=require("lunicode");var As=["scarlet","electrical","evil","good","alien","strange","sacrilegious","drifting","false","static","neon"];var Ns=["clouds","sheep","aliens","alien","creature","robot","synth","replicator","robocop","robots","cocksuckers","metropolis"];var VPs=["we are all going to","are we all going to","everyone must","please let us","can we","must we","can I","must I"];var Vs=["die","sleep","cry","show mercy","fall","succumb to misery","punctuate","get shot"];function random(array){return array[Math.floor(Math.random()*array.length)]}function mirror(text){return luni.tools.flip.encode(text)}function tiny(text){return luni.tools.tiny.encode(text)}function squares(text){return luni.tools.roundsquares.encode(text)}function bubbles(text){return luni.tools.bubbles.encode(text.split("").join(" "))}luni.tools.creepify.options.maxHeight=1;luni.tools.creepify.options.randomization=20;luni.tools.creepify.options.middle=false;function creepyTop(text){luni.tools.creepify.options.bottom=false;luni.tools.creepify.options.top=true;return text.split("").map((function(a){if(a===" ")return a;return luni.tools.creepify.encode(a)})).join("")}function creepyBottom(text){luni.tools.creepify.options.bottom=true;luni.tools.creepify.options.top=false;return text.split("").map((function(a){if(a===" ")return a;return luni.tools.creepify.encode(a)})).join("")}function onlyText(){const line1=random(As)+" "+random(As)+" "+random(Ns);const line2=random(As)+" "+random(Ns);const line3=random(As)+" "+random(Ns);const line4=random(VPs)+" "+random(Vs);return[line1,line2,line3,line4]}function generate(){let[line1,line2,line3,line4]=onlyText();if(Math.random()>.95){line1=mirror(line1);line2=mirror(line2);line3=mirror(line3);line4=mirror(line4)}else if(Math.random()>.97){line1=bubbles(line1);line2=bubbles(line2);line3=bubbles(line3);line4=bubbles(line4)}else if(Math.random()>.5){line1=tiny(line1);line2=tiny(line2);line3=tiny(line3);line4=tiny(line4)}const longest=Math.max(line1.length,Math.max(line2.length,Math.max(line3.length,line4.length)));line1=line1.padStart(longest," ");line2=line2.padStart(longest," ");line3=line3.padStart(longest);line4=line4.padStart(longest);line1=creepyTop(line1);line2=creepyTop(line2);line3=creepyBottom(line3);line4=creepyBottom(line4);return[line1,line2,line3,line4]}module.exports={poem:generate,onlyText:onlyText}},{lunicode:3}],3:[function(require,module,exports){module.exports=new Lunicode;function Lunicode(){this.tools={flip:{init:function(){for(i in this.map){this.map[this.map[i]]=i}},encode:function(text){var ret=[],ch;for(var i=0,len=text.length;i<len;i++){ch=text.charAt(i);if(i>0&&(ch=="̤"||ch=="̗"||ch=="̖"||ch=="̮")){ch=this.map[text.charAt(i-1)+ch];ret.pop()}else{ch=this.map[ch];if(typeof ch=="undefined"){ch=text.charAt(i)}}ret.push(ch)}return ret.reverse().join("")},decode:function(text){var ret=[],ch;for(var i=0,len=text.length;i<len;i++){ch=text.charAt(i);if(i>0&&(ch=="̤"||ch=="̗"||ch=="̖"||ch=="̮")){ch=this.map[text.charAt(i-1)+ch];ret.pop()}else{ch=this.map[ch];if(typeof ch=="undefined"){ch=text.charAt(i)}}ret.push(ch)}return ret.reverse().join("")},map:{a:"ɐ",b:"q",c:"ɔ",d:"p",e:"ǝ",f:"ɟ",g:"ɓ",h:"ɥ",i:"ı",j:"ɾ",k:"ʞ",l:"l",m:"ɯ",n:"u",r:"ɹ",t:"ʇ",v:"ʌ",w:"ʍ",y:"ʎ",A:"∀",B:"ᙠ",C:"Ɔ",D:"ᗡ",E:"Ǝ",F:"Ⅎ",G:"⅁",J:"ſ",K:"⋊",L:"˥",M:"W",P:"Ԁ",Q:"Ό",R:"ᴚ",T:"⊥",U:"∩",V:"Λ",Y:"⅄",1:"⇂",2:"ᄅ",3:"Ɛ",4:"ㄣ",5:"ގ",6:"9",7:"ㄥ","&":"⅋",".":"˙",'"':"„",";":"؛","[":"]","(":")","{":"}","?":"¿","!":"¡","'":",","<":">","‾":"_","¯":"_","‿":"⁀","⁅":"⁆","∴":"∵","\r":"\n","ß":"ᙠ","̈":"̤","ä":"ɐ"+"̤","ö":"o"+"̤","ü":"n"+"̤","Ä":"∀"+"̤","Ö":"O"+"̤","Ü":"∩"+"̤","´":" ̗","é":"ǝ"+"̗","á":"ɐ"+"̗","ó":"o"+"̗","ú":"n"+"̗","É":"Ǝ"+"̗","Á":"∀"+"̗","Ó":"O"+"̗","Ú":"∩"+"̗","`":" ̖","è":"ǝ"+"̖","à":"ɐ"+"̖","ò":"o"+"̖","ù":"n"+"̖","È":"Ǝ"+"̖","À":"∀"+"̖","Ò":"O"+"̖","Ù":"∩"+"̖","^":" ̮","ê":"ǝ"+"̮","â":"ɐ"+"̮","ô":"o"+"̮","û":"n"+"̮","Ê":"Ǝ"+"̮","Â":"∀"+"̮","Ô":"O"+"̮","Û":"∩"+"̮"}},mirror:{init:function(){for(i in this.map){this.map[this.map[i]]=i}},encode:function(text){var ret=[],ch,newLines=[];for(var i=0,len=text.length;i<len;i++){ch=text.charAt(i);if(i>0&&(ch=="̈"||ch=="̀"||ch=="́"||ch=="̂")){ch=this.map[text.charAt(i-1)+ch];ret.pop()}else{ch=this.map[ch];if(typeof ch=="undefined"){ch=text.charAt(i)}}if(ch=="\n"){newLines.push(ret.reverse().join(""));ret=[]}else{ret.push(ch)}}newLines.push(ret.reverse().join(""));return newLines.join("\n")},decode:function(text){var ret=[],ch,newLines=[];for(var i=0,len=text.length;i<len;i++){ch=text.charAt(i);if(i>0&&(ch=="̈"||ch=="̀"||ch=="́"||ch=="̂")){ch=this.map[text.charAt(i-1)+ch];ret.pop()}else{ch=this.map[ch];if(typeof ch=="undefined"){ch=text.charAt(i)}}if(ch=="\n"){newLines.push(ret.reverse().join(""));ret=[]}else{ret.push(ch)}}newLines.push(ret.reverse().join(""));return newLines.join("\n")},map:{a:"ɒ",b:"d",c:"ɔ",e:"ɘ",f:"Ꮈ",g:"ǫ",h:"ʜ",j:"ꞁ",k:"ʞ",l:"|",n:"ᴎ",p:"q",r:"ɿ",s:"ꙅ",t:"ƚ",y:"ʏ",z:"ƹ",B:"ᙠ",C:"Ɔ",D:"ᗡ",E:"Ǝ",F:"ꟻ",G:"Ꭾ",J:"Ⴑ",K:"⋊",L:"⅃",N:"Ͷ",P:"ꟼ",Q:"Ọ",R:"Я",S:"Ꙅ",Z:"Ƹ",1:"",2:"",3:"",4:"",5:"",6:"",7:"","&":"",";":"","[":"]","(":")","{":"}","?":"⸮","<":">","ä":"ɒ"+"̈","ß":"ᙠ","´":"`","é":"ɘ"+"̀","á":"ɒ"+"̀","ó":"ò","ú":"ù","É":"Ǝ"+"̀","Á":"À","Ó":"Ò","Ú":"Ù","`":"´","è":"ɘ"+"́","à":"ɒ"+"́","È":"Ǝ"+"́","ê":"ɘ"+"̂","â":"ɒ"+"̂","Ê":"Ǝ"+"̂","Ø":"ᴓ","ø":"ᴓ"}},creepify:{init:function(){for(var i=768;i<=789;i++){this.diacriticsTop.push(String.fromCharCode(i))}for(var i=790;i<=819;i++){if(i!=794&&i!=795){this.diacriticsBottom.push(String.fromCharCode(i))}}this.diacriticsTop.push(String.fromCharCode(794));this.diacriticsTop.push(String.fromCharCode(795));for(var i=820;i<=824;i++){this.diacriticsMiddle.push(String.fromCharCode(i))}for(var i=825;i<=828;i++){this.diacriticsBottom.push(String.fromCharCode(i))}for(var i=829;i<=836;i++){this.diacriticsTop.push(String.fromCharCode(i))}this.diacriticsTop.push(String.fromCharCode(836));this.diacriticsBottom.push(String.fromCharCode(837));this.diacriticsTop.push(String.fromCharCode(838));this.diacriticsBottom.push(String.fromCharCode(839));this.diacriticsBottom.push(String.fromCharCode(840));this.diacriticsBottom.push(String.fromCharCode(841));this.diacriticsTop.push(String.fromCharCode(842));this.diacriticsTop.push(String.fromCharCode(843));this.diacriticsTop.push(String.fromCharCode(844));this.diacriticsBottom.push(String.fromCharCode(845));this.diacriticsBottom.push(String.fromCharCode(846));this.diacriticsTop.push(String.fromCharCode(848));this.diacriticsTop.push(String.fromCharCode(849));this.diacriticsTop.push(String.fromCharCode(850));this.diacriticsBottom.push(String.fromCharCode(851));this.diacriticsBottom.push(String.fromCharCode(852));this.diacriticsBottom.push(String.fromCharCode(853));this.diacriticsBottom.push(String.fromCharCode(854));this.diacriticsTop.push(String.fromCharCode(855));this.diacriticsTop.push(String.fromCharCode(856));this.diacriticsBottom.push(String.fromCharCode(857));this.diacriticsBottom.push(String.fromCharCode(858));this.diacriticsTop.push(String.fromCharCode(859));this.diacriticsBottom.push(String.fromCharCode(860));this.diacriticsTop.push(String.fromCharCode(861));this.diacriticsTop.push(String.fromCharCode(861));this.diacriticsBottom.push(String.fromCharCode(863));this.diacriticsTop.push(String.fromCharCode(864));this.diacriticsTop.push(String.fromCharCode(865))},encode:function(text){var newText="",newChar;for(i in text){newChar=text[i];if(this.options.middle){newChar+=this.diacriticsMiddle[Math.floor(Math.random()*this.diacriticsMiddle.length)]}if(this.options.top){var diacriticsTopLength=this.diacriticsTop.length-1;for(var count=0,len=this.options.maxHeight-Math.random()*(this.options.randomization/100*this.options.maxHeight);count<len;count++){newChar+=this.diacriticsTop[Math.floor(Math.random()*diacriticsTopLength)]}}if(this.options.bottom){var diacriticsBottomLength=this.diacriticsBottom.length-1;for(var count=0,len=this.options.maxHeight-Math.random()*(this.options.randomization/100*this.options.maxHeight);count<len;count++){newChar+=this.diacriticsBottom[Math.floor(Math.random()*diacriticsBottomLength)]}}newText+=newChar}return newText},decode:function(text){var newText="",charCode;for(i in text){charCode=text[i].charCodeAt(0);if(charCode<768||charCode>865){newText+=text[i]}}return newText},diacriticsTop:[],diacriticsMiddle:[],diacriticsBottom:[],options:{top:true,middle:true,bottom:true,maxHeight:15,randomization:100}},bubbles:{init:function(){for(var i=49;i<=57;i++){this.map[String.fromCharCode(i)]=String.fromCharCode(i+9263)}this.map["0"]="⓪";for(var i=65;i<=90;i++){this.map[String.fromCharCode(i)]=String.fromCharCode(i+9333)}for(var i=97;i<=122;i++){this.map[String.fromCharCode(i)]=String.fromCharCode(i+9327)}for(i in this.map){this.mapInverse[this.map[i]]=i}},encode:function(text){var ret="",ch,first=true;for(i in text){ch=this.map[text[i]];if(typeof ch=="undefined"){if(text[i].charCodeAt(0)>=33){ch=text[i]+String.fromCharCode(8413);if(!first){ch=String.fromCharCode(8239)+String.fromCharCode(160)+String.fromCharCode(160)+String.fromCharCode(8239)+ch}}else{ch=text[i]}}ret+=ch;first=ch=="\n"}return ret},decode:function(text){var ret="",ch,newRet="";for(i in text){ch=this.mapInverse[text[i]];ret+=typeof ch=="undefined"?text[i]:ch}for(i in ret){ch=ret[i].charCodeAt(0);if(ch!=160&&ch!=8239&&ch!=8413){newRet+=ret[i]}}return newRet},map:{},mapInverse:{}},squares:{init:function(){},encode:function(text){var ret="",ch,first=true;for(i in text){if(text[i].charCodeAt(0)>=33){ch=text[i]+String.fromCharCode(8414);if(!first){ch=String.fromCharCode(8239)+String.fromCharCode(160)+String.fromCharCode(160)+String.fromCharCode(8239)+ch}}else{ch=text[i]}ret+=ch;first=ch=="\n"}return ret},decode:function(text){var ret="",ch;for(i in text){ch=text[i].charCodeAt(0);if(ch!=160&&ch!=8239&&ch!=8414){ret+=text[i]}}return ret}},roundsquares:{init:function(){},encode:function(text){var ret="",ch,first=true;for(i in text){if(text[i].charCodeAt(0)>=33){ch=text[i]+String.fromCharCode(8419);if(!first){ch=String.fromCharCode(160)+String.fromCharCode(160)+String.fromCharCode(160)+ch}}else{ch=text[i]}ret+=ch;first=ch=="\n"}return ret},decode:function(text){var ret="",ch;for(i in text){ch=text[i].charCodeAt(0);if(ch!=160&&ch!=8239&&ch!=8419){ret+=text[i]}}return ret}},bent:{init:function(){for(i in this.map){this.map[this.map[i]]=i}},encode:function(text){var ret="",ch;for(var i=0,len=text.length;i<len;i++){ch=this.map[text.charAt(i)];if(typeof ch=="undefined"){ch=text.charAt(i)}ret+=ch}return ret},decode:function(text){var ret="",ch;for(var i=0,len=text.length;i<len;i++){ch=this.map[text.charAt(i)];if(typeof ch=="undefined"){ch=text.charAt(i)}ret+=ch}return ret},map:{a:"ą",b:"ҍ",c:"ç",d:"ժ",e:"ҽ",f:"ƒ",g:"ց",h:"հ",i:"ì",j:"ʝ",k:"ҟ",l:"Ӏ",m:"ʍ",n:"ղ",o:"օ",p:"ք",q:"զ",r:"ɾ",s:"ʂ",t:"է",u:"մ",v:"ѵ",w:"ա",x:"×",y:"վ",z:"Հ",A:"Ⱥ",B:"β",C:"↻",D:"Ꭰ",E:"Ɛ",F:"Ƒ",G:"Ɠ",H:"Ƕ",I:"į",J:"ل",K:"Ҡ",L:"Ꝉ",M:"Ɱ",N:"ហ",O:"ට",P:"φ",Q:"Ҩ",R:"འ",S:"Ϛ",T:"Ͳ",U:"Ա",V:"Ỽ",W:"చ",X:"ჯ",Y:"Ӌ",Z:"ɀ",0:"⊘",1:"������",2:"ϩ",3:"Ӡ",4:"५",5:"Ƽ",6:"Ϭ",7:"7",8:"������",9:"९","&":"⅋","(":"{",")":"}","{":"(","}":")","ä":"ą"+"̈","ö":"օ"+"̈","ü":"մ"+"̈","Ä":"Ⱥ"+"̈","Ö":"ට"+"̈","Ü":"Ա"+"̈","é":"ҽ"+"́","á":"ą"+"́","ó":"օ"+"́","ú":"մ"+"́","É":"Ɛ"+"́","Á":"Ⱥ"+"́","Ó":"ට"+"́","Ú":"Ա"+"́","è":"ҽ"+"̀","à":"ą"+"̀","ò":"օ"+"̀","ù":"մ"+"̀","È":"Ɛ"+"̀","À":"Ⱥ"+"̀","Ò":"ට"+"̀","Ù":"Ա"+"̀","ê":"ҽ"+"̂","â":"ą"+"̂","ô":"օ"+"̂","û":"մ"+"̂","Ê":"Ɛ"+"̂","Â":"Ⱥ"+"̂","Ô":"ට"+"̂","Û":"Ա"+"̂"}},tiny:{init:function(){for(i in this.map){this.map[this.map[i]]=i}},encode:function(text){var ret="",ch;text=text.toUpperCase();for(var i=0,len=text.length;i<len;i++){ch=this.map[text.charAt(i)];if(typeof ch=="undefined"){ch=text.charAt(i)}ret+=ch}return ret},decode:function(text){var ret="",ch;for(var i=0,len=text.length;i<len;i++){ch=this.map[text.charAt(i)];if(typeof ch=="undefined"){ch=text.charAt(i)}ret+=ch}return ret},map:{A:"ᴀ",B:"ʙ",C:"ᴄ",D:"ᴅ",E:"ᴇ",F:"ꜰ",G:"ɢ",H:"ʜ",I:"ɪ",J:"ᴊ",K:"ᴋ",L:"ʟ",M:"ᴍ",N:"ɴ",O:"ᴏ",P:"ᴘ",Q:"Q",R:"ʀ",S:"ꜱ",T:"ᴛ",U:"ᴜ",V:"ᴠ",W:"ᴡ",X:"x",Y:"ʏ",Z:"ᴢ"}}};for(i in this.tools){this.tools[i].init()}this.getHTML=function(text){var html="",ch,lastSpaceWasNonBreaking=true,highSurrogate=0,codepoint=0;for(var i=0,len=text.length;i<len;i++){ch=text.charCodeAt(i);if(ch==10||ch==13){html+="<br>\n";lastSpaceWasNonBreaking=true}else if(ch==32){if(lastSpaceWasNonBreaking){html+=" ";lastSpaceWasNonBreaking=false}else{html+=" ";lastSpaceWasNonBreaking=true}}else{if(ch>=55296&&ch<=56319){highSurrogate=ch;codepoint=0}else if(highSurrogate>0){if(ch>=56320&&ch<=57343){codepoint=(highSurrogate-55296)*1024+(ch-56320)+65536}highSurrogate=0}else{codepoint=ch}if(codepoint!=0){html+="&#x"+codepoint.toString(16)+";";lastSpaceWasNonBreaking=true}}}return html}}},{}]},{},[1]);