Files
XiangYue/js/mapping-mode-2.js
风之暇想 5e3de2f23c v1.4.0.0
2025-08-15 19:25:35 +08:00

4 lines
5.5 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const CharSets2={"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":["🥍","🩹","🍜","🚍","🧚","🥌","🎠","⛸️","😉","😺"],"8":["🤥","🚽","🍏","🚁","💻","🦆","🐡","👹","🚜","🚸"],"9":["🎬","🔬","🧞","🥏","♟️","💛","🍓","🤕","⌛️","🥮"],"+":["🚆","⚰️","🤯","💜","🎮","🧹","🔆","🧼","🐻","🦍"],"/":["🧫","🍝","🆘","🔼","🚫","❓","💰","🧭","😵","🍭"],"=":["👮","😀","🍑","🔱","😬","🐘","🥙","😋","😶","🍧"]};const MAP=new Map();for(const[b64,arr]of Object.entries(CharSets2)){const code=b64.charCodeAt(0);for(const em of arr)MAP.set(em.codePointAt(0),code);}
const mappingMode2={Base64ToEmoji(b64){const out=[];for(const ch of b64){const pool=CharSets2[ch];out.push(pool[Math.random()*10|0]);}
return out.join('');},emojiToBase64(str){const out=[];for(const ch of str){const cp=ch.codePointAt(0);const val=MAP.get(cp);if(val){out.push(String.fromCharCode(val));}}
return out.join('');},getEmojiLength:em=>{let count=0;for(const _ of em)count++;return count;}};