diff --git a/.forgejo/workflows/Linux.yaml b/.forgejo/workflows/Linux.yaml index 1240fb24..5f8f9d24 100644 --- a/.forgejo/workflows/Linux.yaml +++ b/.forgejo/workflows/Linux.yaml @@ -33,7 +33,7 @@ jobs: run: npx cap copy electron - name: Build - run: mkdir -p build && cd build && npx electron-packager ../electron miarven --platform=linux --arch=x64 --icon=../icons/icon.png --overwrite --asar && cp ../icons/icon.png ./miarven-linux-x64/icon.png && cp ../assets/olcxja.miarven.desktop ./miarven-linux-x64/olcxja.miarven.desktop && cp ../assets/install.sh ./miarven-linux-x64/install.sh && chmod +x ./miarven-linux-x64/install.sh + run: mkdir -p build && cd build && npx electron-packager ../electron miarven --platform=linux --arch=x64 --icon=../icons/icon.png --overwrite --asar && cp ../icons/icon.png ./miarven-linux-x64/icon.png && cp ../assets/Miarven.desktop ./miarven-linux-x64/Miarven.desktop - name: Upload Artifact uses: actions/upload-artifact@v3 diff --git a/android/app/src/main/assets/public/blah/en-cat.json b/android/app/src/main/assets/public/blah/en-cat.json deleted file mode 100644 index 75fcf968..00000000 --- a/android/app/src/main/assets/public/blah/en-cat.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "user.not.found": "meowser not found :c", - "dm.already.exists": "direct meowchat already exists :3", - "cant.invite.urself": "you can't invite yourself, silly :3", - "user.already.invited": "you have already invited this user meow", - "user.invited": "user invited successfully :3", - "cant.create.dm.without.invitation": "you can't create a dm without invitation ><", - "dm.begin.notice": "at the beginning of a meowchat, you should always verify that the person you're talking to is the intended recipient", - "failed.accept.dm": "failed to accept direct meowchat", - "dm.accepted": "direct meowchat accepted", - "no.invite.found": "you can't create a dm without invitation *hiss*", - "unknown.error": "unknown error :o", - "forbidden": "you do not have pawmission to perform this action *hiss*", - "dm.key.too.large": "meowchat key too large :o", - "dm.key.not.found": "meowchat key not found :c", - "dm.key.updated": "meowchat key updated successfully :3", - "body.too.large": "request body too large ><", - "invite.revoked": "invite revoked successfully", - "invite.declined": "invite declined successfully", - "account.creation.request.expired": "cat creation request expired. try again", - "invalid.username": "invalid cat name: {0}", - "invalid.password": "invalid meow word: {0}", - "incorrect.captcha": "incorrect captcha. try meowgain", - "username.taken": "this cat name is already taken", - "accounts.slots.full": "you can't create a new cat because all collars are used. try again later", - "registration.disabled": "registration disabled", - "account.created": "cat created successfully", - "password.changed": "meow word changed successfully", - "keys.updated": "nametag updated successfully", - "unknown.request": "unknown request: {0}", - "login.successful": "pawgin successful :3", - "username.length": "cat name must be {0} characters long", - "username.conditions.allowed": "cat name can only include {all}", - "password.not.hashed.properly": "meow word is not hashed properly", - "invalid.username.or.password": "invalid cat name or meow word", - "account.not.exist": "cat with this name doesn't exist", - "invalid.nonce": "invalid nonce. try again", - "username.changed": "cat name changed successfully", - "auth.failed.redirect.to.login": "failed to find owner. redirecting to pawgin...", - "dm.refresh.failed": "failed to refresh direct meowchats", - "chat.add.failed": "failed to add meowchat", - "something.wrong.mayb.pass": "something went wrong... :c (probably wrong meow word)", - "something.wrong": "something went wrong... :c", - "passwords.not.match": "meow word do not match", - "password.cant.empty": "meow word cannot be empty", - "username.cant.empty": "cat name cannot be empty", - "bad.request": "bad request!!!", - - "letters": "letters", - "numbers": "numbers", - "underscores": "underscores", - - "loading.connecting": "connecting...", - "loading.loading": "loading...", - "loading.done": "ready! :3", - - "title.home": "bed", - "title.dms": "direct meowchats", - "title.groups": "clowder", - "title.welcome.splash": "welpaw to Meowven", - "desc.welcome.splash": "first Larpix client", - "title.splash": "splash", - "title.create.dm": "invite to direct meowchat", - "title.create.space": "create house", - "title.create.group": "create clowder", - "title.add.chat": "add meowchat", - "desc.add.chat": "add a private, encrypted meowchat by entering a cat name", - "desc.create.group": "create a private, encrypted clowder", - "placeholder.create.group.input": "my clowder", - "placeholder.create.space.input": "my house", - "title.name": "name", - "desc.create.space": "create a house for your community", - "desc.join.space": "join a community that fits you", - "title.join.space": "join house", - "title.space.id": "house id", - "title.inbox": "inbox", - "title.invites": "invites", - "title.notifications": "notifications", - "title.received": "received", - "title.sent": "sent", - "title.all": "all", - "title.unread": "unread", - - "desc.no.invites": "no invites found :c", - "desc.no.notifications": "no notifications found :c", - "desc.fetching.invites": "fetching invites...", - "desc.fetching.notifications": "fetching notifications...", - "desc.invite.dm.received": "{0} ({1}) invited you to meowchat", - "desc.invite.dm.sent": "you invited {0} ({1}) to meowchat", - "desc.invite.group.received": "{0} ({1}) invited you to a clowder", - "desc.invite.group.sent": "you invited {0} ({1}) to a clowder", - - "action.fetching.invites.sent": "fetching sent invites...", - "action.fetching.invites.recv": "fetching received invites...", - "action.dm.fetch": "fetching direct meowchats...", - "action.auth": "authenticating...", - "action.dm.adding": "adding...", - "action.invite.revoking": "revoking invite...", - "action.invite.accepting": "accepting invite...", - "action.invite.declining": "declining invite...", - - "title.sign.up": "sign up", - "title.sign.in": "sign in", - "title.sign.in.to": "sign in to your larpix instance", - "title.server.host": "server host", - "title.username": "meow name", - "title.password": "meow word", - "title.new.here.?": "new here?", - "title.create.an.account": "create a cat", - "join.larpix": "join Larpix", - "title.create.new.account": "create new larpix cat account", - "notice.use.strong.pass": "remember to use a strong meow word! tt will be used to lock your collar", - "title.confirm.password": "confirm meow word", - "title.already.registered.?": "already a kitty?", - "title.back.to.login": "back to pawgin", - "title.verify": "verify", - "title.captcha.desc": "prove you are a kitty", - "title.captcha.code": "captcha code", - "title.invitation.code": "invitation code", - "title.back.to.register": "back to registration", - "placeholder.username": "cat name", - "placeholder.captcha.code": "captcha code", - "placeholder.message.input": "meow...", - "desc.messages.loading": "loading meows...", - "desc.no.dms": "no direct meowchats :c", - "action.dm.opening": "opening meowchat...", - "dm.open.failed": "failed to open meowchat :c", - "keys.local.server.mismatch": "this device has different nametags than server :c use the device u first logged in on", - "keys.server.decrypt.failed": "wrong password for ur secret nametag bundle :c", - "dm.messages.fetch.failed": "failed to fetch meows :c", - "messages.decrypt.failed": "failed to decrypt meow :c" -} diff --git a/android/app/src/main/assets/public/blah/en-us.json b/android/app/src/main/assets/public/blah/en-us.json index 104354bb..f2d7d853 100644 --- a/android/app/src/main/assets/public/blah/en-us.json +++ b/android/app/src/main/assets/public/blah/en-us.json @@ -1,6 +1,5 @@ { "user.not.found": "User not found", - "dm.already.exists": "Direct message already exists", "cant.invite.urself": "You can't invite yourself", "user.already.invited": "You have already invited this user", "user.invited": "User invited successfully", @@ -10,13 +9,6 @@ "dm.accepted": "DM accepted", "no.invite.found": "You can't create a dm without invitation", "unknown.error": "Unknown error", - "forbidden": "You do not have permission to perform this action", - "dm.key.too.large": "DM key too large", - "dm.key.not.found": "DM key not found", - "dm.key.updated": "DM key updated successfully", - "body.too.large": "Request body too large", - "invite.revoked": "Invite revoked successfully", - "invite.declined": "Invite declined successfully", "account.creation.request.expired": "Account creation request expired. Try again", "invalid.username": "Invalid username: {0}", "invalid.password": "Invalid password: {0}", @@ -27,7 +19,7 @@ "account.created": "Account created successfully", "password.changed": "Password changed successfully", "keys.updated": "Keys updated successfully", - "unknown.request": "Unknown request: {0}", + "unknown.request": "Unknown request: {0}", "login.successful": "Login successful", "username.length": "Username must be {0} characters long", "username.conditions.allowed": "Username can only include {all}", @@ -45,15 +37,15 @@ "password.cant.empty": "Password cannot be empty", "username.cant.empty": "Username cannot be empty", "bad.request": "Bad request", - + "letters": "letters", "numbers": "numbers", "underscores": "underscores", - + "loading.connecting": "Connecting...", "loading.loading": "Loading...", "loading.done": "Ready!", - + "title.home": "Home", "title.dms": "Direct messages", "title.groups": "Groups", @@ -80,23 +72,7 @@ "title.sent": "Sent", "title.all": "All", "title.unread": "Unread", - "desc.no.invites": "No invites found", - "desc.no.notifications": "No notifications found", - "desc.fetching.invites": "Fetching invites...", - "desc.fetching.notifications": "Fetching notifications...", - "desc.invite.dm.received": "{0} ({1}) invited you to chat", - "desc.invite.dm.sent": "You invited {0} ({1}) to chat", - "desc.invite.group.received": "{0} ({1}) invited you to a group", - "desc.invite.group.sent": "You invited {0} ({1}) to a group", - "action.fetching.invites.sent": "Fetching sent invites...", - "action.fetching.invites.recv": "Fetching received invites...", - "action.dm.fetch": "Fetching dms...", - "action.auth": "Authenticating...", - "action.dm.adding": "Adding...", - "action.invite.revoking": "Revoking invite...", - "action.invite.accepting": "Accepting invite...", - "action.invite.declining": "Declining invite...", "title.sign.up": "Sign Up", "title.sign.in": "Sign In", @@ -118,14 +94,9 @@ "title.invitation.code": "Invitation code", "title.back.to.register": "Back to registration", "placeholder.username": "username", + "placeholder.invitation.code": "invitation code", "placeholder.captcha.code": "captcha code", - "placeholder.message.input": "Message...", - "desc.messages.loading": "Fetching messages...", - "desc.no.dms": "No direct messages", - "action.dm.opening": "Opening DM...", - "dm.open.failed": "Failed to open DM", - "keys.local.server.mismatch": "This device has different encryption keys than the server. Use the device where you first logged in, or restore server keys from backup.", - "keys.server.decrypt.failed": "Could not decrypt your account keys with this password.", - "dm.messages.fetch.failed": "Failed to fetch messages", - "messages.decrypt.failed": "Failed to decrypt message" -} + + + "bee.movie.script": "According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Coming! Hang on a second. Hello? Barry? Adam? Can you believe this is happening? I can't. I'll pick you up. Looking sharp. Use the stairs, Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. You got lint on your fuzz. Ow! That's me! Wave to us! We'll be in row 118,000. Bye! Barry, I told you, stop flying in the house! Hey, Adam. Hey, Barry. Is that fuzz gel? A little. Special day, graduation. Never thought I'd make it. Three days grade school, three days high school. Those were awkward. Three days college. I'm glad I took a day and hitchhiked around The Hive. You did come back different. Hi, Barry. Artie, growing a mustache? Looks good. Hear about Frankie? Yeah. You going to the funeral? No, I'm not going. Everybody knows, sting someone, you die. Don't waste it on a squirrel. Such a hothead. I guess he could have just gotten out of the way. I love this incorporating an amusement park into our day. That's why we don't need vacations. Boy, quite a bit of pomp under the circumstances. Well, Adam, today we are men. We are! Bee-men. Amen! Hallelujah! Students, faculty, distinguished bees, please welcome Dean Buzzwell. Welcome, New Hive City graduating class of 9:15. That concludes our ceremonies And begins your career at Honex Industries! Will we pick our job today? I heard it's just orientation. Heads up! Here we go. Keep your hands and antennas inside the tram at all times. Wonder what it'll be like? A little scary. Welcome to Honex, a division of Honesco and a part of the Hexagon Group. This is it! Wow. Wow. We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant Pollen Jocks bring the nectar to The Hive. Our top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey! That girl was hot. She's my cousin! She is? Yes, we're all cousins. Right. You're right. At Honex, we constantly strive to improve every aspect of bee existence. These bees are stress-testing a new helmet technology. What do you think he makes? Not enough. Here we have our latest advancement, the Krelman. What does that do? Catches that little strand of honey that hangs after you pour it. Saves us millions. Can anyone work on the Krelman? Of course. Most bee jobs are small ones. But bees know that every small job, if it's done well, means a lot. But choose carefully because you'll stay in the job you pick for the rest of your life. The same job the rest of your life? I didn't know that. What's the difference? You'll be happy to know that bees, as a species, haven't had one day off in 27 million years. So you'll just work us to death? We'll sure try. Wow! That blew my mind! \"What's the difference?\" How can you say that? One job forever? That's an insane choice to have to make. I'm relieved. Now we only have to make one decision in life. But, Adam, how could they never have told us that? Why would you question anything? We're bees. We're the most perfectly functioning society on Earth. You ever think maybe things work a little too well here? Like what? Give me one example. I don't know. But you know what I'm talking about. Please clear the gate. Royal Nectar Force on approach. Wait a second. Check it out. Hey, those are Pollen Jocks! Wow. I've never seen them this close. They know what it's like outside The Hive. Yeah, but some don't come back. Hey, Jocks! Hi, Jocks! You guys did great! You're monsters! You're sky freaks! I love it! I love it! I wonder where they were. I don't know. Their day's not planned. Outside The Hive, flying who knows where, doing who knows what. You can't just decide to be a Pollen Jock. You have to be bred for that. Right. Look. That's more pollen than you and I will see in a lifetime. It's just a status symbol. Bees make too much of it. Perhaps. Unless you're wearing it and the ladies see you wearing it. Those ladies? Aren't they our cousins too? Distant. Distant. Look at these two. Couple of Hive Harrys. Let's have fun with them. It must be dangerous being a Pollen Jock. Yeah. Once a bear pinned me against a mushroom! He had a paw on my throat, and with the other, he was slapping me! Oh, my! I never thought I'd knock him out. What were you doing during this? Trying to alert the authorities. I can autograph that. A little gusty out there today, wasn't it, comrades? Yeah. Gusty. We're hitting a sunflower patch six miles from here tomorrow. Six miles, huh? Barry! A puddle jump for us, but maybe you're not up for it. Maybe I am. You are not! We're going 0900 at J-Gate. What do you think, buzzy-boy? Are you bee enough? I might be. It all depends on what 0900 means. Hey, Honex! Dad, you surprised me. You decide what you're interested in? Well, there's a lot of choices. But you only get one. Do you ever get bored doing the same job every day? Son, let me tell you about stirring. You grab that stick, and you just move it around, and you stir it around. You get yourself into a rhythm. It's a beautiful thing. You know, Dad, the more I think about it, maybe the honey field just isn't right for me. You were thinking of what, making balloon animals? That's a bad job for a guy with a stinger. Janet, your son's not sure he wants to go into honey! Barry, you are so funny sometimes. I'm not trying to be funny. You're not funny! You're going into honey. Our son, the stirrer! You're gonna be a stirrer? No one's listening to me! Wait till you see the sticks I have. I could say anything right now. I'm gonna get an ant tattoo! Let's open some honey and celebrate! Maybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody \"dawg\"! I'm so proud. We're starting work today! Today's the day. Come on! All the good jobs will be gone. Yeah, right. Pollen counting, stunt bee, pouring, stirrer, front desk, hair removal... Is it still available? Hang on. Two left! One of them's yours! Congratulations! Step to the side. What'd you get? Picking crud out. Stellar! Wow! Couple of newbies? Yes, sir! Our first day! We are ready! Make your choice. You want to go first? No, you go. Oh, my. What's available? Restroom attendant's open, not for the reason you think. Any chance of getting the Krelman? Sure, you're on. I'm sorry, the Krelman just closed out. Wax monkey's always open. The Krelman opened up again. What happened? A bee died. Makes an opening. See? He's dead. Another dead one. Deady. Deadified. Two more dead. Dead from the neck up. Dead from the neck down. That's life! Oh, this is so hard! Heating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler. Barry, what do you think I should... Barry? Barry! All right, we've got the sunflower patch in quadrant nine... What happened to you? Where are you? I'm going out. Out? Out where? Out there. Oh, no! I have to, before I go to work for the rest of my life. You're gonna die! You're crazy! Hello? Another call coming in. If anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today. Hey, guys. Look at that. Isn't that the kid we saw yesterday? Hold it, son, flight deck's restricted. It's OK, Lou. We're gonna take him up. Really? Feeling lucky, are you? Sign here, here. Just initial that. Thank you. OK. You got a rain advisory today, and as you all know, bees cannot fly in rain. So be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats. Also, I got a couple of reports of root beer being poured on us. Murphy's in a home because of it, babbling like a cicada! That's awful. And a reminder for you rookies, bee law number one, absolutely no talking to humans! All right, launch positions! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Black and yellow! Hello! You ready for this, hot shot? Yeah. Yeah, bring it on. Wind, check. Antennae, check. Nectar pack, check. Wings, check. Stinger, check. Scared out of my shorts, check. OK, ladies, let's move it out! Pound those petunias, you striped stem-suckers! All of you, drain those flowers! Wow! I'm out! I can't believe I'm out! So blue. I feel so fast and free! Box kite! Wow! Flowers! This is Blue Leader, We have roses visual. Bring it around 30 degrees and hold. Roses! 30 degrees, roger. Bringing it around. Stand to the side, kid. It's got a bit of a kick. That is one nectar collector! Ever see pollination up close? No, sir. I pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one. See that? It's a little bit of magic. That's amazing. Why do we do that? That's pollen power. More pollen, more flowers, more nectar, more honey for us. Cool. I'm picking up a lot of bright yellow, Could be daisies, Don't we need those? Copy that visual. Wait. One of these flowers seems to be on the move. Say again? You're reporting a moving flower? Affirmative. That was on the line! This is the coolest. What is it? I don't know, but I'm loving this color. It smells good. Not like a flower, but I like it. Yeah, fuzzy. Chemical-y. Careful, guys. It's a little grabby. My sweet lord of bees! Candy-brain, get off there! Problem! Guys! This could be bad. Affirmative. Very close. Gonna hurt. Mama's little boy. You are way out of position, rookie! Coming in at you like a missile! Help me! I don't think these are flowers. Should we tell him? I think he knows. What is this?! Match point! You can start packing up, honey, because you're about to eat it! Yowser! Gross. There's a bee in the car! Do something! I'm driving! Hi, bee. He's back here! He's going to sting me! Nobody move. If you don't move, he won't sting you. Freeze! He blinked! Spray him, Granny! What are you doing?! Wow... the tension level out here is unbelievable. I gotta get home. Can't fly in rain. Can't fly in rain. Can't fly in rain. Mayday! Mayday! Bee going down! Ken, could you close the window please? Ken, could you close the window please? Check out my new resume. I made it into a fold-out brochure. You see? Folds out. Oh, no. More humans. I don't need this. What was that? Maybe this time. This time. This time. This time! This time! This... Drapes! That is diabolical. It's fantastic. It's got all my special skills, even my top-ten favorite movies. What's number one? Star Wars? Nah, I don't go for that... kind of stuff. No wonder we shouldn't talk to them. They're out of their minds. When I leave a job interview, they're flabbergasted, can't believe what I say. There's the sun. Maybe that's a way out. I don't remember the sun having a big 75 on it. I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Wait! Stop! Bee! Stand back. These are winter boots. Wait! Don't kill him! You know I'm allergic to them! This thing could kill me! Why does his life have less value than yours? Why does his life have any less value than mine? Is that your statement? I'm just saying all life has value. You don't know what he's capable of feeling. My brochure! There you go, little guy. I'm not scared of him.It's an allergic thing. Put that on your resume brochure. My whole face could puff up. Make it one of your special skills. Knocking someone out is also a special skill. Right. Bye, Vanessa. Thanks. Vanessa, next week? Yogurt night? Sure, Ken. You know, whatever. You could put carob chips on there. Bye. Supposed to be less calories. Bye. I gotta say something. She saved my life. I gotta say something. All right, here it goes. Nah. What would I say? I could really get in trouble. It's a bee law. You're not supposed to talk to a human. I can't believe I'm doing this. I've got to. Oh, I can't do it. Come on! No. Yes. No. Do it. I can't. How should I start it? \"You like jazz?\" No, that's no good. Here she comes! Speak, you fool! Hi! I'm sorry. You're talking. Yes, I know. You're talking! I'm so sorry. No, it's OK. It's fine. I know I'm dreaming. But I don't recall going to bed. Well, I'm sure this is very disconcerting. This is a bit of a surprise to me. I mean, you're a bee! I am. And I'm not supposed to be doing this, but they were all trying to kill me. And if it wasn't for you... I had to thank you. It's just how I was raised. That was a little weird. I'm talking with a bee. Yeah. I'm talking to a bee. And the bee is talking to me! I just want to say I'm grateful. I'll leave now. Wait! How did you learn to do that? What? The talking thing. Same way you did, I guess. \"Mama, Dada, honey.\" You pick it up. That's very funny. Yeah. Bees are funny. If we didn't laugh, we'd cry with what we have to deal with. Anyway... Can I... get you something? Like what? I don't know. I mean... I don't know. Coffee? I don't want to put you out. It's no trouble. It takes two minutes. It's just coffee. I hate to impose. Don't be ridiculous! Actually, I would love a cup. Hey, you want rum cake? I shouldn't. Have some. No, I can't. Come on! I'm trying to lose a couple micrograms. Where? These stripes don't help. You look great! I don't know if you know anything about fashion. Are you all right? No. He's making the tie in the cab as they're flying up Madison. He finally gets there. He runs up the steps into the church. The wedding is on. And he says, \"Watermelon? I thought you said Guatemalan. Why would I marry a watermelon?\" Is that a bee joke? That's the kind of stuff we do. Yeah, different. So, what are you gonna do, Barry? About work? I don't know. I want to do my part for The Hive, but I can't do it the way they want. I know how you feel. You do? Sure. My parents wanted me to be a lawyer or a doctor, but I wanted to be a florist. Really? My only interest is flowers. Our new queen was just elected with that same campaign slogan. Anyway, if you look... There's my hive right there. See it? You're in Sheep Meadow! Yes! I'm right off the Turtle Pond! No way! I know that area. I lost a toe ring there once. Why do girls put rings on their toes? Why not? It's like putting a hat on your knee. Maybe I'll try that. You all right, ma'am? Oh, yeah. Fine. Just having two cups of coffee! Anyway, this has been great. Thanks for the coffee. Yeah, it's no trouble. Sorry I couldn't finish it. If I did, I'd be up the rest of my life. Are you...? Can I take a piece of this with me? Sure! Here, have a crumb. Thanks! Yeah. All right. Well, then... I guess I'll see you around. Or not. OK, Barry. And thank you so much again... for before. Oh, that? That was nothing. Well, not nothing, but... Anyway... This can't possibly work. He's all set to go. We may as well try it. OK, Dave, pull the chute. Sounds amazing. It was amazing! It was the scariest, happiest moment of my life. Humans! I can't believe you were with humans! Giant, scary humans! What were they like? Huge and crazy. They talk crazy. They eat crazy giant things. They drive crazy. Do they try and kill you, like on TV? Some of them. But some of them don't. How'd you get back? Poodle. You did it, and I'm glad. You saw whatever you wanted to see. You had your \"experience.\" Now you can pick out yourjob and be normal. Well... Well? Well, I met someone. You did? Was she Bee-ish? A wasp?! Your parents will kill you! No, no, no, not a wasp. Spider? I'm not attracted to spiders. I know it's the hottest thing, with the eight legs and all. I can't get by that face. So who is she? She's... human. No, no. That's a bee law. You wouldn't break a bee law. Her name's Vanessa. Oh, boy. She's so nice. And she's a florist! Oh, no! You're dating a human florist! We're not dating. You're flying outside The Hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite! She saved my life! And she understands me. This is over! Eat this. This is not over! What was that? They call it a crumb. It was so stingin' stripey! And that's not what they eat. That's what falls off what they eat! You know what a Cinnabon is? No. It's bread and cinnamon and frosting. They heat it up... Sit down! ...really hot! Listen to me! We are not them! We're us. There's us and there's them! Yes, but who can deny the heart that is yearning? There's no yearning. Stop yearning. Listen to me! You have got to start thinking bee, my friend. Thinking bee! Thinking bee. Thinking bee. Thinking bee! Thinking bee! Thinking bee! Thinking bee! There he is. He's in the pool. You know what your problem is, Barry? I gotta start thinking bee? How much longer will this go on? It's been three days! Why aren't you working? I've got a lot of big life decisions to think about. What life? You have no life! You have no job. You're barely a bee! Would it kill you to make a little honey? Barry, come out. Your father's talking to you. Martin, would you talk to him? Barry, I'm talking to you! You coming? Got everything? All set! Go ahead. I'll catch up. Don't be too long. Watch this! Vanessa! We're still here. I told you not to yell at him. He doesn't respond to yelling! Then why yell at me? Because you don't listen! I'm not listening to this. Sorry, I've gotta go. Where are you going? I'm meeting a friend. A girl? Is this why you can't decide? Bye. I just hope she's Bee-ish. They have a huge parade of flowers every year in Pasadena? To be in the Tournament of Roses, that's every florist's dream! Up on a float, surrounded by flowers, crowds cheering. A tournament. Do the roses compete in athletic events? No. All right, I've got one. How come you don't fly everywhere? It's exhausting. Why don't you run everywhere? It's faster. Yeah, OK, I see, I see. All right, your turn. TiVo. You can just freeze live TV? That's insane! You don't have that? We have Hivo, but it's a disease. It's a horrible, horrible disease. Oh, my. Dumb bees! You must want to sting all those jerks. We try not to sting. It's usually fatal for us. So you have to watch your temper. Very carefully. You kick a wall, take a walk, write an angry letter and throw it out. Work through it like any emotion: Anger, jealousy, lust. Oh, my goodness! Are you OK? Yeah. What is wrong with you?! It's a bug. He's not bothering anybody. Get out of here, you creep! What was that? A Pic 'N' Save circular? Yeah, it was. How did you know? It felt like about 10 pages. Seventy-five is pretty much our limit. You've really got that down to a science. I lost a cousin to Italian Vogue. I'll bet. What in the name of Mighty Hercules is this? How did this get here? cute Bee, Golden Blossom, Ray Liotta Private Select? Is he that actor? I never heard of him. Why is this here? For people. We eat it. You don't have enough food of your own? Well, yes. How do you get it? Bees make it. I know who makes it! And it's hard to make it! There's heating, cooling, stirring. You need a whole Krelman thing! It's organic. It's our-ganic! It's just honey, Barry. Just what?! Bees don't know about this! This is stealing! A lot of stealing! You've taken our homes, schools,hospitals! This is all we have! And it's on sale?! I'm getting to the bottom of this. I'm getting to the bottom of all of this! Hey, Hector. You almost done? Almost. He is here. I sense it. Well, I guess I'll go home now and just leave this nice honey out, with no one around. You're busted, box boy! I knew I heard something. So you can talk! I can talk. And now you'll start talking! Where you getting the sweet stuff? Who's your supplier? I don't understand. I thought we were friends. The last thing we want to do is upset bees! You're too late! It's ours now! You, sir, have crossed the wrong sword! You, sir, will be lunch for my iguana, Ignacio! Where is the honey coming from? Tell me where! Honey Farms! It comes from Honey Farms! Crazy person! What horrible thing has happened here? These faces, they never knew what hit them. And now they're on the road to nowhere! Just keep still. What? You're not dead? Do I look dead? They will wipe anything that moves. Where you headed? To Honey Farms. I am onto something huge here. I'm going to Alaska. Moose blood, crazy stuff. Blows your head off! I'm going to Tacoma. And you? He really is dead. All right. Uh-oh! What is that?! Oh, no! A wiper! Triple blade! Triple blade? Jump on! It's your only chance, bee! Why does everything have to be so doggone clean?! How much do you people need to see?! Open your eyes! Stick your head out the window! From NPR News in Washington, I'm Carl Kasell. But don't kill no more bugs! Bee! Moose blood guy!! You hear something? Like what? Like tiny screaming. Turn off the radio. Whassup, bee boy? Hey, Blood. Just a row of honey jars, as far as the eye could see. Wow! I assume wherever this truck goes is where they're getting it. I mean, that honey's ours. Bees hang tight. We're all jammed in. It's a close community. Not us, man. We on our own. Every mosquito on his own. What if you get in trouble? You a mosquito, you in trouble. Nobody likes us. They just smack. See a mosquito, smack, smack! At least you're out in the world. You must meet girls. Mosquito girls try to trade up, get with a moth, dragonfly. Mosquito girl don't want no mosquito. You got to be kidding me! Mooseblood's about to leave the building! So long, bee! Hey, guys! Mooseblood! I knew I'd catch y'all down here. Did you bring your crazy straw? We throw it in jars, slap a label on it, and it's pretty much pure profit. What is this place? A bee's got a brain the size of a pinhead. They are pinheads! Pinhead. Check out the new smoker. Oh, sweet. That's the one you want. The Thomas 3000! Smoker? Ninety puffs a minute, semi-automatic. Twice the nicotine, all the tar. A couple breaths of this knocks them right out. They make the honey, and we make the money. \"They make the honey, and we make the money\"? Oh, my! What's going on? Are you OK? Yeah. It doesn't last too long. Do you know you're in a fake hive with fake walls? Our queen was moved here. We had no choice. This is your queen? That's a man in women's clothes! That's a drag queen! What is this? Oh, no! There's hundreds of them! Bee honey. Our honey is being brazenly stolen on a massive scale! This is worse than anything bears have done! I intend to do something. Oh, Barry, stop. Who told you humans are taking our honey? That's a rumor. Do these look like rumors? That's a conspiracy theory. These are obviously doctored photos. How did you get mixed up in this? He's been talking to humans. What? Talking to humans?! He has a human girlfriend. And they make out! Make out? Barry! We do not. You wish you could. Whose side are you on? The bees! I dated a cricket once in San Antonio. Those crazy legs kept me up all night. Barry, this is what you want to do with your life? I want to do it for all our lives. Nobody works harder than bees! Dad, I remember you coming home so overworked your hands were still stirring. You couldn't stop. I remember that. What right do they have to our honey? We live on two cups a year. They put it in lip balm for no reason whatsoever! Even if it's true, what can one bee do? Sting them where it really hurts. In the face! The eye! That would hurt. No. Up the nose? That's a killer. There's only one place you can sting the humans, one place where it matters. Hive at Five, The Hive's only full-hour action news source. No more bee beards! With Bob Bumble at the anchor desk. Weather with Storm Stinger. Sports with Buzz Larvi. And Jeanette Chung. Good evening. I'm Bob Bumble. And I'm Jeanette Ohung. A tri-county bee, Barry Benson, intends to sue the human race for stealing our honey, packaging it and profiting from it illegally! Tomorrow night on Bee Larry King, we'll have three former queens here in our studio, discussing their new book, classy Ladies, out this week on Hexagon. Tonight we're talking to Barry Benson. Did you ever think, \"I'm a kid from The Hive. I can't do this\"? Bees have never been afraid to change the world. What about Bee Oolumbus? Bee Gandhi? Bejesus? Where I'm from, we'd never sue humans. We were thinking of stickball or candy stores. How old are you? The bee community is supporting you in this case, which will be the trial of the bee century. You know, they have a Larry King in the human world too. It's a common name. Next week... He looks like you and has a show and suspenders and colored dots... Next week... Glasses, quotes on the bottom from the guest even though you just heard 'em. Bear Week next week! They're scary, hairy and here live. Always leans forward, pointy shoulders, squinty eyes, very Jewish. In tennis, you attack at the point of weakness! It was my grandmother, Ken. She's 81. Honey, her backhand's a joke! I'm not gonna take advantage of that? Quiet, please. Actual work going on here. Is that that same bee? Yes, it is! I'm helping him sue the human race. Hello. Hello, bee. This is Ken. Yeah, I remember you. Timberland, size ten and a half. Vibram sole, I believe. Why does he talk again? Listen, you better go 'cause we're really busy working. But it's our yogurt night! Bye-bye. Why is yogurt night so difficult?! You poor thing. You two have been at this for hours! Yes, and Adam here has been a huge help. Frosting... How many sugars? Just one. I try not to use the competition. So why are you helping me? Bees have good qualities. And it takes my mind off the shop. Instead of flowers, people are giving balloon bouquets now. Those are great, if you're three. And artificial flowers. Oh, those just get me psychotic! Yeah, me too. Bent stingers, pointless pollination. Bees must hate those fake things! Nothing worse than a daffodil that's had work done. Maybe this could make up for it a little bit. This lawsuit's a pretty big deal. I guess. You sure you want to go through with it? Am I sure? When I'm done with the humans, they won't be able to say, \"Honey, I'm home,\" without paying a royalty! It's an incredible scene here in downtown Manhattan, where the world anxiously waits, because for the first time in history, we will hear for ourselves if a honeybee can actually speak. What have we gotten into here, Barry? It's pretty big, isn't it? I can't believe how many humans don't work during the day. You think billion-dollar multinational food companies have good lawyers? Everybody needs to stay behind the barricade. What's the matter? I don't know, I just got a chill. Well, if it isn't the bee team. You boys work on this? All rise! The Honorable Judge Bumbleton presiding. All right. Case number 4475, Superior Court of New York, Barry Bee Benson v. the Honey Industry is now in session. Mr. Montgomery, you're representing the five food companies collectively? A privilege. Mr. Benson... you're representing all the bees of the world? I'm kidding. Yes, Your Honor, we're ready to proceed. Mr. Montgomery, your opening statement, please. Ladies and gentlemen of the jury, my grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we lived in the topsy-turvy world Mr. Benson imagines, just think of what would it mean. I would have to negotiate with the silkworm for the elastic in my britches! Talking bee! How do we know this isn't some sort of holographic motion-picture-capture Hollywood wizardry? They could be using laser beams! Robotics! Ventriloquism! Cloning! For all we know, he could be on steroids! Mr. Benson? Ladies and gentlemen, there's no trickery here. I'm just an ordinary bee. Honey's pretty important to me. It's important to all bees. We invented it! We make it. And we protect it with our lives. Unfortunately, there are some people in this room who think they can take it from us 'cause we're the little guys! I'm hoping that, after this is all over, you'll see how, by taking our honey, you not only take everything we have but everything we are! I wish he'd dress like that all the time. So nice! Call your first witness. So, Mr. Klauss Vanderhayden of Honey Farms, big company you have. I suppose so. I see you also own Honeyburton and Honron! Yes, they provide beekeepers for our farms. Beekeeper. I find that to be a very disturbing term. I don't imagine you employ any bee-free-ers, do you? No. I couldn't hear you. No. No. Because you don't free bees. You keep bees. Not only that, it seems you thought a bear would be an appropriate image for a jar of honey. They're very lovable creatures. Yogi Bear, Fozzie Bear, Build-A-Bear. You mean like this? Bears kill bees! How'd you like his head crashing through your living room?! Biting into your couch! Spitting out your throw pillows! OK, that's enough. Take him away. So, Mr. Sting, thank you for being here. Your name intrigues me. Where have I heard it before? I was with a band called The Police. But you've never been a police officer, have you? No, I haven't. No, you haven't. And so here we have yet another example of bee culture casually stolen by a human for nothing more than a prance-about stage name. Oh, please. Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say... Mr. Gordon M. Sumner! That's not his real name?! You idiots! Mr. Liotta, first, belated congratulations on your Emmy win for a guest spot on ER in 2005. Thank you. Thank you. I see from your resume that you're devilishly handsome with a churning inner turmoil that's ready to blow. I enjoy what I do. Is that a crime? Not yet it isn't. But is this what it's come to for you? Exploiting tiny, helpless bees so you don't have to rehearse your part and learn your lines, sir? Watch it, Benson! I could blow right now! This isn't a goodfella. This is a badfella! Why doesn't someone just step on this creep, and we can all go home?! Order in this court! You're all thinking it! Order! Order, I say! Say it! Mr. Liotta, please sit down! I think it was awfully nice of that bear to pitch in like that. I think the jury's on our side. Are we doing everything right, legally? I'm a florist. Right. Well, here's to a great team. To a great team! Well, hello. Ken! Hello. I didn't think you were coming. No, I was just late I tried to call, but... the battery. I didn't want all this to go to waste, so I called Barry. Luckily, he was free. Oh, that was lucky. There's a little left. I could heat it up. Yeah, heat it up, sure, whatever. So I hear you're quite a tennis player. I'm not much for the game myself. The ball's a little grabby. That's where I usually sit. Right... there. Ken, Barry was looking at your resume, and he agreed with me that eating with chopsticks isn't really a special skill. You think I don't see what you're doing? I know how hard it is to find the right job. We have that in common. Do we? Bees have 100 percent employment, but we do jobs like taking the crud out. That's just what I was thinking about doing. Ken, I let Barry borrow your razor for his fuzz. I hope that was all right. I'm going to drain the old stinger. Yeah, you do that. Look at that. You know, I've just about had it with your little Mind Games. What's that? Italian Vogue. Mamma mia, that's a lot of pages. A lot of ads. Remember what Van said, why is your life more valuable than mine? Funny, I just can't seem to recall that! I think something stinks in here! I love the smell of flowers. How do you like the smell of flames?! Not as much. Water bug! Not taking sides! Ken, I'm wearing a Chapstick hat! This is pathetic! I've got issues! Well, well, well, a royal flush! You're bluffing. Am I? Surf's up, dude! Poo water! That bowl is gnarly. Except for those dirty yellow rings! Kenneth! What are you doing?! You know, I don't even like honey! I don't eat it! We need to talk! He's just a little bee! And he happens to be the nicest bee I've met in a long time! Long time? What are you talking about?! Are there other bugs in your life? No, but there are other things bugging me in life. And you're one of them! Fine! Talking bees, no yogurt night... My nerves are fried from riding on this emotional roller coaster! Goodbye, Ken. And for your information, I prefer sugar-free, artificial sweeteners made by man! I'm sorry about all that. I know it's got an aftertaste! I like it! I always felt there was some kind of barrier between Ken and me. I couldn't overcome it. Oh, well. Are you OK for the trial? I believe Mr. Montgomery is about out of ideas. We would like to call Mr. Barry Benson Bee to the stand. Good idea! You can really see why he's considered one of the best lawyers... Yeah. Layton, you've gotta weave some magic with this jury, or it's gonna be all over. Don't worry. The only thing I have to do to turn this jury around is to remind them of what they don't like about bees. You got the tweezers? Are you allergic? Only to losing, son. Only to losing. Mr. Benson Bee, I'll ask you what I think we'd all like to know. What exactly is your relationship to that woman? We're friends. Good friends? Yes. How good? Do you live together? Wait a minute... Are you her little... bedbug? I've seen a bee documentary or two. From what I understand, doesn't your queen give birth to all the bee children? Yeah, but... So those aren't your real parents! Oh, Barry... Yes, they are! Hold me back! You're an illegitimate bee, aren't you, Benson? He's denouncing bees! Don't y'all date your cousins? Objection! I'm going to pincushion this guy! Adam, don't! It's what he wants! Oh, I'm hit!! Oh, lordy, I am hit! Order! Order! The venom! The venom is coursing through my veins! I have been felled by a winged beast of destruction! You see? You can't treat them like equals! They're striped savages! Stinging's the only thing they know! It's their way! Adam, stay with me. I can't feel my legs. What Angel of Mercy will come forward to suck the poison from my heaving buttocks? I will have order in this court. Order! Order, please! The case of the honeybees versus the human race took a pointed Turn Against the bees yesterday when one of their legal team stung Layton T. Montgomery. Hey, buddy. Hey. Is there much pain? Yeah. I... I blew the whole case, didn't I? It doesn't matter. What matters is you're alive. You could have died. I'd be better off dead. Look at me. They got it from the cafeteria downstairs, in a tuna sandwich. Look, there's a little celery still on it. What was it like to sting someone? I can't explain it. It was all... All adrenaline and then...and then ecstasy! All right. You think it was all a trap? Of course. I'm sorry. I flew us right into this. What were we thinking? Look at us. We're just a couple of bugs in this world. What will the humans do to us if they win? I don't know. I hear they put the roaches in motels. That doesn't sound so bad. Adam, they check in, but they don't check out! Oh, my. Could you get a nurse to close that window? Why? The smoke. Bees don't smoke. Right. Bees don't smoke. Bees don't smoke! But some bees are smoking. That's it! That's our case! It is? It's not over? Get dressed. I've gotta go somewhere. Get back to the court and stall. Stall any way you can. And assuming you've done step correctly, you're ready for the tub. Mr. Flayman. Yes? Yes, Your Honor! Where is the rest of your team? Well, Your Honor, it's interesting. Bees are trained to fly haphazardly, and as a result, we don't make very good time. I actually heard a funny story about... Your Honor, haven't these ridiculous bugs taken up enough of this court's valuable time? How much longer will we allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients, who run legitimate businesses. I move for a complete dismissal of this entire case! Mr. Flayman, I'm afraid I'm going to have to consider Mr. Montgomery's motion. But you can't! We have a terrific case. Where is your proof? Where is the evidence? Show me the smoking gun! Hold it, Your Honor! You want a smoking gun? Here is your smoking gun. What is that? It's a bee smoker! What, this? This harmless little contraption? This couldn't hurt a fly, let alone a bee. Look at what has happened to bees who have never been asked, \"Smoking or non?\" Is this what nature intended for us? To be forcibly addicted to smoke machines and man-made wooden slat work camps? Living out our lives as honey slaves to the white man? What are we gonna do? He's playing the species card. Ladies and gentlemen, please, free these bees! Free the bees! Free the bees! Free the bees! Free the bees! Free the bees! The court finds in favor of the bees! Vanessa, we won! I knew you could do it! High-five! Sorry." +} \ No newline at end of file diff --git a/android/app/src/main/assets/public/crypto-pq.js b/android/app/src/main/assets/public/crypto-pq.js deleted file mode 100644 index 86cd4001..00000000 --- a/android/app/src/main/assets/public/crypto-pq.js +++ /dev/null @@ -1,14 +0,0 @@ -(()=>{var qn=Object.create;var dr=Object.defineProperty;var Zn=Object.getOwnPropertyDescriptor;var Gn=Object.getOwnPropertyNames;var Xn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty;var $n=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var S=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Qn=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gn(t))!Yn.call(e,n)&&n!==r&&dr(e,n,{get:()=>t[n],enumerable:!(o=Zn(t,n))||o.enumerable});return e};var Jn=(e,t,r)=>(r=e!=null?qn(Xn(e)):{},Qn(t||!e||!e.__esModule?dr(r,"default",{value:e,enumerable:!0}):r,e));function we(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function qt(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new RangeError(`${r}expected integer >= 0, got ${e}`)}}function J(e,t,r=""){let o=we(e),n=e?.length,i=t!==void 0;if(!o||i&&n!==t){let s=r&&`"${r}" `,c=i?` of length ${t}`:"",f=o?`length=${n}`:`type=${typeof e}`,a=s+"expected Uint8Array"+c+", got "+f;throw o?new RangeError(a):new TypeError(a)}return e}function _e(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function br(e,t){J(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length='+r)}function Ft(...e){for(let t=0;t=st._0&&e<=st._9)return e-st._0;if(e>=st.A&&e<=st.F)return e-(st.A-10);if(e>=st.a&&e<=st.f)return e-(st.a-10)}function Rt(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(xr)try{return Uint8Array.fromHex(e)}catch(n){throw n instanceof SyntaxError?new RangeError(n.message):n}let t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;ne(i).update(n).digest(),o=e(void 0);return r.outputLen=o.outputLen,r.blockLen=o.blockLen,r.canXOF=o.canXOF,r.create=n=>e(n),Object.assign(r,t),Object.freeze(r)}function mr(e=32){qt(e,"bytesLength");let t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var xr,to,st,wr,Ut=S(()=>{xr=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",to=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));st={_0:48,_9:57,A:65,F:70,a:97,f:102};wr=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})});var Xt,C,_r=S(()=>{Ut();Xt=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,r,o,n){this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=Zt(this.buffer)}update(t){_e(this),J(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;sn-s&&(this.process(o,0),s=0);for(let h=s;hu.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h>gr&Yt)}:{h:Number(e>>gr&Yt)|0,l:Number(e&Yt)|0}}function Er(e,t=!1){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i>>0)+(o>>>0);return{h:e+r+(n/2**32|0)|0,l:n|0}}var Yt,gr,Ee,ve,gt,Et,Pt,Ht,vr,Sr,Br,Ar,Or,Tr,kr=S(()=>{Yt=BigInt(4294967295),gr=BigInt(32);Ee=(e,t,r)=>e>>>r,ve=(e,t,r)=>e<<32-r|t>>>r,gt=(e,t,r)=>e>>>r|t<<32-r,Et=(e,t,r)=>e<<32-r|t>>>r,Pt=(e,t,r)=>e<<64-r|t>>>r-32,Ht=(e,t,r)=>e>>>r-32|t<<64-r;vr=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),Sr=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,Br=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),Ar=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,Or=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),Tr=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0});var Ir,no,oo,ut,lt,Se,Be,Ae,Lr=S(()=>{_r();kr();Ut();Ir=Er(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),no=Ir[0],oo=Ir[1],ut=new Uint32Array(80),lt=new Uint32Array(80),Se=class extends Xt{constructor(t){super(128,t,16,!1)}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:c,Dl:f,Eh:a,El:u,Fh:h,Fl:x,Gh:d,Gl:p,Hh:w,Hl:l}=this;return[t,r,o,n,i,s,c,f,a,u,h,x,d,p,w,l]}set(t,r,o,n,i,s,c,f,a,u,h,x,d,p,w,l){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=c|0,this.Dl=f|0,this.Eh=a|0,this.El=u|0,this.Fh=h|0,this.Fl=x|0,this.Gh=d|0,this.Gl=p|0,this.Hh=w|0,this.Hl=l|0}process(t,r){for(let y=0;y<16;y++,r+=4)ut[y]=t.getUint32(r),lt[y]=t.getUint32(r+=4);for(let y=16;y<80;y++){let B=ut[y-15]|0,E=lt[y-15]|0,L=gt(B,E,1)^gt(B,E,8)^Ee(B,E,7),T=Et(B,E,1)^Et(B,E,8)^ve(B,E,7),A=ut[y-2]|0,v=lt[y-2]|0,U=gt(A,v,19)^Pt(A,v,61)^Ee(A,v,6),H=Et(A,v,19)^Ht(A,v,61)^ve(A,v,6),j=Br(T,H,lt[y-7],lt[y-16]),R=Ar(j,L,U,ut[y-7],ut[y-16]);ut[y]=R|0,lt[y]=j|0}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:c,Cl:f,Dh:a,Dl:u,Eh:h,El:x,Fh:d,Fl:p,Gh:w,Gl:l,Hh:b,Hl:m}=this;for(let y=0;y<80;y++){let B=gt(h,x,14)^gt(h,x,18)^Pt(h,x,41),E=Et(h,x,14)^Et(h,x,18)^Ht(h,x,41),L=h&d^~h&w,T=x&p^~x&l,A=Or(m,E,T,oo[y],lt[y]),v=Tr(A,b,B,L,no[y],ut[y]),U=A|0,H=gt(o,n,28)^Pt(o,n,34)^Pt(o,n,39),j=Et(o,n,28)^Ht(o,n,34)^Ht(o,n,39),R=o&i^o&c^i&c,_=n&s^n&f^s&f;b=w|0,m=l|0,w=d|0,l=p|0,d=h|0,p=x|0,{h,l:x}=et(a|0,u|0,v|0,U|0),a=c|0,u=f|0,c=i|0,f=s|0,i=o|0,s=n|0;let O=vr(U,j,_);o=Sr(O,v,H,R),n=O|0}({h:o,l:n}=et(this.Ah|0,this.Al|0,o|0,n|0)),{h:i,l:s}=et(this.Bh|0,this.Bl|0,i|0,s|0),{h:c,l:f}=et(this.Ch|0,this.Cl|0,c|0,f|0),{h:a,l:u}=et(this.Dh|0,this.Dl|0,a|0,u|0),{h,l:x}=et(this.Eh|0,this.El|0,h|0,x|0),{h:d,l:p}=et(this.Fh|0,this.Fl|0,d|0,p|0),{h:w,l}=et(this.Gh|0,this.Gl|0,w|0,l|0),{h:b,l:m}=et(this.Hh|0,this.Hl|0,b|0,m|0),this.set(o,n,i,s,c,f,a,u,h,x,d,p,w,l,b,m)}roundClean(){Ft(ut,lt)}destroy(){this.destroyed=!0,Ft(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Be=class extends Se{Ah=C[0]|0;Al=C[1]|0;Bh=C[2]|0;Bl=C[3]|0;Ch=C[4]|0;Cl=C[5]|0;Dh=C[6]|0;Dl=C[7]|0;Eh=C[8]|0;El=C[9]|0;Fh=C[10]|0;Fl=C[11]|0;Gh=C[12]|0;Gl=C[13]|0;Hh=C[14]|0;Hl=C[15]|0;constructor(){super(64)}},Ae=yr(()=>new Be,wr(3))});function Qt(e,t=""){if(typeof e!="boolean"){let r=t&&`"${t}" `;throw new TypeError(r+"expected boolean, got type="+typeof e)}return e}function io(e){if(typeof e=="bigint"){if(!$t(e))throw new RangeError("positive bigint expected, got "+e)}else Te(e);return e}function dt(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(r+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){let r=t&&`"${t}" `;throw new RangeError(r+"expected safe integer, got "+e)}}function Rr(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Wt:BigInt("0x"+e)}function Fe(e){return Rr(Gt(e))}function rt(e){return Rr(Gt(pt(J(e)).reverse()))}function Re(e,t){if(qt(t),t===0)throw new RangeError("zero length");e=io(e);let r=e.toString(16);if(r.length>t*2)throw new RangeError("number too large");return Rt(r.padStart(t*2,"0"))}function Jt(e,t){return Re(e,t).reverse()}function Ur(e,t){if(e=V(e),t=V(t),e.length!==t.length)return!1;let r=0;for(let o=0;o{let o=t.charCodeAt(0);if(t.length!==1||o>127)throw new RangeError(`string contains non-ASCII character "${e[r]}" with code ${o} at position ${r}`);return o})}function so(e,t,r){return $t(e)&&$t(t)&&$t(r)&&t<=e&&eWt;e>>=Oe,t+=1);return t}function bt(e,t={},r={}){if(Object.prototype.toString.call(e)!=="[object Object]")throw new TypeError("expected valid options object");function o(i,s,c){if(!c&&s!=="function"&&!Object.hasOwn(e,i))throw new TypeError(`param "${i}" is invalid: expected own property`);let f=e[i];if(c&&f===void 0)return;let a=typeof f;if(a!==s||f===null)throw new TypeError(`param "${i}" is invalid: expected ${s}, got ${a}`)}let n=(i,s)=>Object.entries(i).forEach(([c,f])=>o(c,f,s));n(t,!1),n(r,!0)}var V,Te,ke,ht,Fr,Ie,Le,Wt,Oe,$t,Pr,Pe,vt=S(()=>{Ut();V=(e,t,r)=>J(e,t,r),Te=qt,ke=Gt,ht=(...e)=>ge(...e),Fr=e=>Rt(e),Ie=we,Le=e=>mr(e),Wt=BigInt(0),Oe=BigInt(1);$t=e=>typeof e=="bigint"&&Wt<=e;Pr=e=>(Oe<{throw new Error("not implemented")}});function I(e,t){if(t<=z)throw new Error("mod: expected positive modulus, got "+t);let r=e%t;return r>=z?r:t+r}function X(e,t,r){if(tz;)o*=o,o%=r;return o}function Hr(e,t){if(e===z)throw new Error("invert: expected non-zero number");if(t<=z)throw new Error("invert: expected positive modulus, got "+t);let r=I(e,t),o=t,n=z,i=P,s=P,c=z;for(;r!==z;){let a=o/r,u=o-r*a,h=n-s*a,x=i-c*a;o=r,r=u,n=s,i=c,s=h,c=x}if(o!==P)throw new Error("invert: does not exist");return I(n,t)}function He(e,t,r){let o=e;if(!o.eql(o.sqr(t),r))throw new Error("Cannot find square root")}function Vr(e,t){let r=e,o=(r.ORDER+P)/Nr,n=r.pow(t,o);return He(r,n,t),n}function ao(e,t){let r=e,o=(r.ORDER-Dr)/Kr,n=r.mul(t,St),i=r.pow(n,o),s=r.mul(t,i),c=r.mul(r.mul(s,St),i),f=r.mul(s,r.sub(c,r.ONE));return He(r,f,t),f}function uo(e){let t=ne(e),r=qr(e),o=r(t,t.neg(t.ONE)),n=r(t,o),i=r(t,t.neg(o)),s=(e+co)/Mr;return((c,f)=>{let a=c,u=a.pow(f,s),h=a.mul(u,o),x=a.mul(u,n),d=a.mul(u,i),p=a.eql(a.sqr(h),f),w=a.eql(a.sqr(x),f);u=a.cmov(u,h,p),h=a.cmov(d,x,w);let l=a.eql(a.sqr(h),f),b=a.cmov(u,h,l);return He(a,b,f),b})}function qr(e){if(e1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Vr;let i=n.pow(o,t),s=(t+P)/St;return function(f,a){let u=f;if(u.is0(a))return a;if(jr(u,a)!==1)throw new Error("Cannot find square root");let h=r,x=u.mul(u.ONE,i),d=u.pow(a,t),p=u.pow(a,s);for(;!u.eql(d,u.ONE);){if(u.is0(d))return u.ZERO;let w=1,l=u.sqr(d);for(;!u.eql(l,u.ONE);)if(w++,l=u.sqr(l),w===h)throw new Error("Cannot find square root");let b=P<(o[n]="function",o),t);if(bt(e,r),dt(e.BYTES,"BYTES"),dt(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=P)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function po(e,t,r){let o=e;if(rz;)r&P&&(n=o.mul(n,i)),i=o.sqr(i),r>>=P;return n}function re(e,t,r=!1){let o=e,n=new Array(t.length).fill(r?o.ZERO:void 0),i=t.reduce((c,f,a)=>o.is0(f)?c:(n[a]=c,o.mul(c,f)),o.ONE),s=o.inv(i);return t.reduceRight((c,f,a)=>o.is0(f)?c:(n[a]=o.mul(c,n[a]),o.mul(c,f)),s),n}function jr(e,t){let r=e,o=(r.ORDER-P)/St,n=r.pow(t,o),i=r.eql(n,r.ONE),s=r.eql(n,r.ZERO),c=r.eql(n,r.neg(r.ONE));if(!i&&!s&&!c)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function bo(e,t){if(t!==void 0&&Te(t),e<=z)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);let r=Ue(e);if(t!==void 0&&t= n.length (${t})`);let o=t!==void 0?t:r,n=Math.ceil(o/8);return{nBitLength:o,nByteLength:n}}function ne(e,t={}){return new ee(e,t)}var z,P,St,zr,Nr,Dr,co,Kr,fo,Mr,ct,ho,Cr,ee,oe=S(()=>{vt();z=BigInt(0),P=BigInt(1),St=BigInt(2),zr=BigInt(3),Nr=BigInt(4),Dr=BigInt(5),co=BigInt(7),Kr=BigInt(8),fo=BigInt(9),Mr=BigInt(16);ct=(e,t)=>(I(e,t)&P)===P,ho=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];Cr=new WeakMap,ee=class{ORDER;BITS;BYTES;isLE;ZERO=z;ONE=P;_lengths;_mod;constructor(t,r={}){if(t<=P)throw new Error("invalid field: expected ORDER > 1, got "+t);let o;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(o=r.BITS),typeof r.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:r.sqrt,enumerable:!0}),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=Object.freeze(r.allowedLengths.slice())),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:n,nByteLength:i}=bo(t,o);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=n,this.BYTES=i,Object.freeze(this)}create(t){return I(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return z<=t&&tn)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+t.length);let a=new Uint8Array(n);a.set(t,i?0:a.length-t.length),t=a}if(t.length!==n)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+t.length);let f=i?rt(t):Fe(t);if(c&&(f=I(f,s)),!r&&!this.isValid(f))throw new Error("invalid field element: outside of range 0..ORDER");return f}invertBatch(t){return re(this,t)}cmov(t,r,o){return Qt(o,"condition"),o?r:t}};Object.freeze(ee.prototype)});function Gr(e,t){let r=t.negate();return e?r:t}function ce(e,t){let r=re(e.Fp,t.map(o=>o.Z));return t.map((o,n)=>e.fromAffine(o.toAffine(r[n])))}function Wr(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function je(e,t){Wr(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=Pr(e),s=BigInt(e);return{windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function Xr(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,c=Number(e&n),f=e>>s;c>o&&(c-=i,f+=Ne);let a=t*o,u=a+Math.abs(c)-1,h=c===0,x=c<0,d=t%2!==0;return{nextN:f,offset:u,isZero:h,isNeg:x,isNegF:d,offsetF:a}}function ze(e){return Qr.get(e)||1}function Yr(e){if(e!==ie)throw new Error("invalid wNAF")}function $r(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Zr(t),t}else return ne(e,{isLE:r})}function Jr(e,t,r={},o){if(o===void 0&&(o=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(let f of["p","n","h"]){let a=t[f];if(!(typeof a=="bigint"&&a>ie))throw new Error(`CURVE.${f} must be positive bigint`)}let n=$r(t.p,r.Fp,o),i=$r(t.n,r.Fn,o),c=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(let f of c)if(!n.isValid(t[f]))throw new Error(`CURVE.${f} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:n,Fn:i}}function De(e,t){return function(o){let n=e(o);return{secretKey:n,publicKey:t(n)}}}var ie,Ne,Ce,Qr,se,Ke=S(()=>{vt();oe();ie=BigInt(0),Ne=BigInt(1);Ce=new WeakMap,Qr=new WeakMap;se=class{BASE;ZERO;Fn;bits;constructor(t,r){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,o=this.ZERO){let n=t;for(;r>ie;)r&Ne&&(o=o.add(n)),n=n.double(),r>>=Ne;return o}precomputeWindow(t,r){let{windows:o,windowSize:n}=je(r,this.bits),i=[],s=t,c=s;for(let f=0;fn.create(w),u=r.uvRatio===void 0?(w,l)=>{try{return{isValid:!0,value:n.sqrt(n.div(w,l))}}catch{return{isValid:!1,value:xt}}}:r.uvRatio;if(!yo(n,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function h(w,l,b=!1){let m=b?M:xt;return kt("coordinate "+w,l,m,f),l}function x(w){if(!(w instanceof d))throw new Error("EdwardsPoint expected")}class d{static BASE=new d(s.Gx,s.Gy,M,a(s.Gx*s.Gy));static ZERO=new d(xt,M,M,xt);static Fp=n;static Fn=i;X;Y;Z;T;constructor(l,b,m,y){this.X=h("x",l),this.Y=h("y",b),this.Z=h("z",m,!0),this.T=h("t",y),Object.freeze(this)}static CURVE(){return s}static fromAffine(l){if(l instanceof d)throw new Error("extended point not allowed");let{x:b,y:m}=l||{};return h("x",b),h("y",m),new d(b,m,M,a(b*m))}static fromBytes(l,b=!1){let m=n.BYTES,{a:y,d:B}=s;l=pt(V(l,m,"point")),Qt(b,"zip215");let E=pt(l),L=l[m-1];E[m-1]=L&-129;let T=rt(E),A=b?f:n.ORDER;kt("point.y",T,xt,A);let v=a(T*T),U=a(v-M),H=a(B*v-y),{isValid:j,value:R}=u(U,H);if(!j)throw new Error("bad point: invalid y coordinate");let _=(R&M)===M,O=(L&128)!==0;if(!b&&R===xt&&O)throw new Error("bad point: x=0 and x_0=1");return O!==_&&(R=a(-R)),d.fromAffine({x:R,y:T})}static fromHex(l,b=!1){return d.fromBytes(Fr(l),b)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(l=8,b=!0){return p.createCache(this,l),b||this.multiply(Me),this}assertValidity(){let l=this,{a:b,d:m}=s;if(l.is0())throw new Error("bad point: ZERO");let{X:y,Y:B,Z:E,T:L}=l,T=a(y*y),A=a(B*B),v=a(E*E),U=a(v*v),H=a(T*b),j=a(v*a(H+A)),R=a(U+a(m*a(T*A)));if(j!==R)throw new Error("bad point: equation left != right (1)");let _=a(y*B),O=a(E*L);if(_!==O)throw new Error("bad point: equation left != right (2)")}equals(l){x(l);let{X:b,Y:m,Z:y}=this,{X:B,Y:E,Z:L}=l,T=a(b*L),A=a(B*y),v=a(m*L),U=a(E*y);return T===A&&v===U}is0(){return this.equals(d.ZERO)}negate(){return new d(a(-this.X),this.Y,this.Z,a(-this.T))}double(){let{a:l}=s,{X:b,Y:m,Z:y}=this,B=a(b*b),E=a(m*m),L=a(Me*a(y*y)),T=a(l*B),A=b+m,v=a(a(A*A)-B-E),U=T+E,H=U-L,j=T-E,R=a(v*H),_=a(U*j),O=a(v*j),K=a(H*U);return new d(R,_,K,O)}add(l){x(l);let{a:b,d:m}=s,{X:y,Y:B,Z:E,T:L}=this,{X:T,Y:A,Z:v,T:U}=l,H=a(y*T),j=a(B*A),R=a(L*m*U),_=a(E*v),O=a((y+B)*(T+A)-H-j),K=_-R,_t=_+R,Q=a(j-b*H),tt=a(O*K),ot=a(_t*Q),it=a(O*Q),at=a(K*_t);return new d(tt,ot,at,it)}subtract(l){return x(l),this.add(l.negate())}multiply(l){if(!i.isValidNot0(l))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");let{p:b,f:m}=p.cached(this,l,y=>ce(d,y));return ce(d,[b,m])[0]}multiplyUnsafe(l){if(!i.isValid(l))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return l===xt?d.ZERO:this.is0()||l===M?this:p.unsafe(this,l,b=>ce(d,b))}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return p.unsafe(this,s.n).is0()}toAffine(l){let b=this,m=l,{X:y,Y:B,Z:E}=b,L=b.is0();m==null&&(m=L?xo:n.inv(E));let T=a(y*m),A=a(B*m),v=n.mul(E,m);if(L)return{x:xt,y:M};if(v!==M)throw new Error("invZ was invalid");return{x:T,y:A}}clearCofactor(){return c===M?this:this.multiplyUnsafe(c)}toBytes(){let{x:l,y:b}=this.toAffine(),m=n.toBytes(b);return m[m.length-1]|=l&M?128:0,m}toHex(){return ke(this.toBytes())}toString(){return``}}let p=new se(d,i.BITS);return i.BITS>=8&&d.BASE.precompute(8),Object.freeze(d.prototype),Object.freeze(d),d}var xt,M,Me,xo,fe,en=S(()=>{vt();Ke();xt=BigInt(0),M=BigInt(1),Me=BigInt(2),xo=BigInt(8);fe=class{static BASE;static ZERO;static Fp;static Fn;ep;constructor(t){this.ep=t}static fromBytes(t){Pe()}static fromHex(t){Pe()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(t){return this.ep.toAffine(t)}toHex(){return ke(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(t){return this.assertSame(t),this.init(this.ep.add(t.ep))}subtract(t){return this.assertSame(t),this.init(this.ep.subtract(t.ep))}multiply(t){return this.init(this.ep.multiply(t))}multiplyUnsafe(t){return this.init(this.ep.multiplyUnsafe(t))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(t,r){return this.ep.precompute(t,r),this}}});function jt(e,t){if(dt(e),dt(t),t<0||t>4)throw new Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function mo(e,t){let r=new Uint8Array(e.length);for(let o=0;o255&&(t=o(ht(te("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let c=ht(t,jt(t.length,1)),f=new Uint8Array(i),a=jt(r,2),u=new Array(s),h=o(ht(f,e,a,jt(0,1),c));u[0]=o(ht(h,jt(1,1),c));for(let d=1;d{vt();rn="HashToScalar-"});function _o(e){return bt(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function"}),Object.freeze({...e})}function on(e){let t=_o(e),{P:r,type:o,adjustScalarBytes:n,powPminus2:i,randomBytes:s}=t,c=o==="x25519";if(!c&&o!=="x448")throw new Error("invalid type");let f=s===void 0?Le:s,a=c?255:448,u=c?32:56,h=BigInt(c?9:5),x=BigInt(c?121665:39081),d=c?ae**BigInt(254):ae**BigInt(447),p=c?BigInt(8)*ae**BigInt(251)-It:BigInt(4)*ae**BigInt(445)-It,w=d+p+It,l=_=>I(_,r),b=m(h);function m(_){return Jt(l(_),u)}function y(_){let O=pt(V(_,u,"uCoordinate"));return c&&(O[31]&=127),l(rt(O))}function B(_){return rt(n(pt(V(_,u,"scalar"))))}function E(_,O){let K=U(y(O),B(_));if(K===Ct)throw new Error("invalid private or public key received");return m(K)}function L(_){return E(_,b)}let T=L,A=E;function v(_,O,K){let _t=l(_*(O-K));return O=l(O-_t),K=l(K+_t),{x_2:O,x_3:K}}function U(_,O){kt("u",_,Ct,r),kt("scalar",O,d,w);let K=O,_t=_,Q=It,tt=Ct,ot=_,it=It,at=Ct;for(let be=BigInt(a-1);be>=Ct;be--){let sr=K>>be&It;at^=sr,{x_2:Q,x_3:ot}=v(at,Q,ot),{x_2:tt,x_3:it}=v(at,tt,it),at=sr;let xe=Q+tt,ye=l(xe*xe),me=Q-tt,cr=l(me*me),fr=ye-cr,Mn=ot+it,Vn=ot-it,ar=l(Vn*xe),ur=l(Mn*me),lr=ar+ur,hr=ar-ur;ot=l(lr*lr),it=l(_t*l(hr*hr)),Q=l(ye*cr),tt=l(fr*(ye+l(x*fr)))}({x_2:Q,x_3:ot}=v(at,Q,ot)),{x_2:tt,x_3:it}=v(at,tt,it);let Kn=i(tt);return l(Q*Kn)}let H={secretKey:u,publicKey:u,seed:u},j=_=>(_=_===void 0?f(u):_,V(_,H.seed,"seed"),_),R={randomSecretKey:j};return Object.freeze(H),Object.freeze(R),Object.freeze({keygen:De(j,T),getSharedSecret:A,getPublicKey:T,scalarMult:E,scalarMultBase:L,utils:R,GuBytes:b.slice(),lengths:H})}var Ct,It,ae,sn=S(()=>{vt();Ke();oe();Ct=BigInt(0),It=BigInt(1),ae=BigInt(2)});function un(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=At,c=e*e%i*e%i,f=X(c,cn,i)*c%i,a=X(f,ft,i)*e%i,u=X(a,vo,i)*a%i,h=X(u,t,i)*u%i,x=X(h,r,i)*h%i,d=X(x,o,i)*x%i,p=X(d,n,i)*d%i,w=X(p,n,i)*d%i,l=X(w,t,i)*u%i;return{pow_p_5_8:X(l,cn,i)*e%i,b2:c}}function Bo(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function Ye(e,t){let r=At,o=I(t*t*t,r),n=I(o*o*t,r),i=un(e*n).pow_p_5_8,s=I(e*o*i,r),c=I(t*s*s,r),f=s,a=I(s*qe,r),u=c===e,h=c===I(-e,r),x=c===I(-e*qe,r);return u&&(s=f),(h||x)&&(s=a),ct(s,r)&&(s=I(-s,r)),{isValid:u||h,value:s}}function an(e){let{d:t}=Xe,r=At,o=b=>yt.create(b),n=o(Ze*e*e),i=o((n+ft)*To),s=BigInt(-1),c=o((s-t*n)*o(n+t)),{isValid:f,value:a}=Ye(i,c),u=o(a*e);ct(u,r)||(u=o(-u)),f||(a=u),f||(s=n);let h=o(s*(n-ft)*ko-c),x=a*a,d=o((a+a)*c),p=o(h*Ao),w=o(ft-x),l=o(ft+x);return new Bt(o(d*l),o(w*p),o(p*l),o(d*w))}var go,ft,cn,Eo,vo,So,At,Xe,qe,Bt,yt,ln,hn,Ze,Ao,Oo,To,ko,fn,Io,Ge,mt,Lo,dn=S(()=>{Lr();Ut();en();nn();oe();sn();vt();go=BigInt(0),ft=BigInt(1),cn=BigInt(2),Eo=BigInt(3),vo=BigInt(5),So=BigInt(8),At=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Xe={p:At,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:So,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};qe=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");Bt=tn(Xe,{uvRatio:Ye}),yt=Bt.Fp,ln=Bt.Fn,hn=(()=>{let e=At;return on({P:e,type:"x25519",powPminus2:t=>{let{pow_p_5_8:r,b2:o}=un(t);return I(X(r,Eo,e)*o,e)},adjustScalarBytes:Bo})})(),Ze=qe,Ao=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Oo=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),To=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),ko=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),fn=e=>Ye(ft,e),Io=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ge=e=>yt.create(rt(e)&Io);mt=class e extends fe{static BASE=new e(Bt.BASE);static ZERO=new e(Bt.ZERO);static Fp=yt;static Fn=ln;constructor(t){super(t)}static fromAffine(t){return new e(Bt.fromAffine(t))}assertSame(t){if(!(t instanceof e))throw new Error("RistrettoPoint expected")}init(t){return new e(t)}static fromBytes(t){J(t,32);let{a:r,d:o}=Xe,n=At,i=B=>yt.create(B),s=Ge(t);if(!Ur(yt.toBytes(s),t)||ct(s,n))throw new Error("invalid ristretto255 encoding 1");let c=i(s*s),f=i(ft+r*c),a=i(ft-r*c),u=i(f*f),h=i(a*a),x=i(r*o*u-h),{isValid:d,value:p}=fn(i(x*h)),w=i(p*a),l=i(p*w*x),b=i((s+s)*w);ct(b,n)&&(b=i(-b));let m=i(f*l),y=i(b*m);if(!d||ct(y,n)||m===go)throw new Error("invalid ristretto255 encoding 2");return new e(new Bt(b,m,ft,y))}static fromHex(t){return e.fromBytes(Rt(t))}toBytes(){let{X:t,Y:r,Z:o,T:n}=this.ep,i=At,s=l=>yt.create(l),c=s(s(o+r)*s(o-r)),f=s(t*r),a=s(f*f),{value:u}=fn(s(c*a)),h=s(u*c),x=s(u*f),d=s(h*x*n),p;if(ct(n*d,i)){let l=s(r*Ze),b=s(t*Ze);t=l,r=b,p=s(h*Oo)}else p=x;ct(t*d,i)&&(r=s(-r));let w=s((o-r)*p);return ct(w,i)&&(w=s(-w)),yt.toBytes(w)}equals(t){this.assertSame(t);let{X:r,Y:o}=this.ep,{X:n,Y:i}=t.ep,s=a=>yt.create(a),c=s(r*i)===s(o*n),f=s(o*i)===s(r*n);return c||f}is0(){return this.equals(e.ZERO)}};Object.freeze(mt.BASE);Object.freeze(mt.ZERO);Object.freeze(mt.prototype);Object.freeze(mt);Lo=Object.freeze({Point:mt,hashToCurve(e,t){let r=t?.DST===void 0?"ristretto255_XMD:SHA-512_R255MAP_RO_":t.DST,o=Ve(e,r,64,Ae);return Lo.deriveToCurve(o)},hashToScalar(e,t={DST:rn}){let r=Ve(e,t.DST,64,Ae);return ln.create(rt(r))},deriveToCurve(e){J(e,64);let t=Ge(e.subarray(0,32)),r=an(t),o=Ge(e.subarray(32,64)),n=an(o);return new mt(r.add(n))}})});var q,wt=S(()=>{q=class extends Error{constructor(t){let r;t instanceof Error?r=t.message:typeof t=="string"?r=t:r="",super(r),this.name=this.constructor.name}}});var $e,We,Lt=S(()=>{$e=[2285,2571,2970,1812,1493,1422,287,202,3158,622,1577,182,962,2127,1855,1468,573,2004,264,383,2500,1458,1727,3199,2648,1017,732,608,1787,411,3124,1758,1223,652,2777,1015,2036,1491,3047,1785,516,3321,3009,2663,1711,2167,126,1469,2476,3239,3058,830,107,1908,3082,2378,2931,961,1821,2604,448,2264,677,2054,2226,430,555,843,2078,871,1550,105,422,587,177,3094,3038,2869,1574,1653,3083,778,1159,3182,2552,1483,2727,1119,1739,644,2457,349,418,329,3173,3254,817,1097,603,610,1322,2044,1864,384,2114,3193,1218,1994,2455,220,2142,1670,2144,1799,2051,794,1819,2475,2459,478,3221,3021,996,991,958,1869,1522,1628],We=[1701,1807,1460,2371,2338,2333,308,108,2851,870,854,1510,2535,1278,1530,1185,1659,1187,3109,874,1335,2111,136,1215,2945,1465,1285,2007,2719,2726,2232,2512,75,156,3e3,2911,2980,872,2685,1590,2210,602,1846,777,147,2170,2551,246,1676,1755,460,291,235,3152,2742,2907,3224,1779,2458,1251,2486,2774,2899,1103,1275,2652,1065,2881,725,1508,2368,398,951,247,1421,3222,2499,271,90,853,1860,3203,1162,1618,666,320,8,2813,1544,282,1838,1293,2314,552,2677,2106,1571,205,2918,1542,2721,2597,2312,681,130,1602,1871,829,2946,3065,1325,2756,1861,1474,1202,2367,3147,1752,2707,171,3127,3042,1907,1836,1517,359,758,1441]});function Fo(e,t=!1){return t?{h:Number(e&ue),l:Number(e>>pn&ue)}:{h:Number(e>>pn&ue)|0,l:Number(e&ue)|0}}function bn(e,t=!1){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i{ue=0xffffffffn,pn=32n;N=(e,t,r)=>e<>>32-r,D=(e,t,r)=>t<>>32-r,Y=(e,t,r)=>t<>>64-r,$=(e,t,r)=>e<>>64-r});function Ro(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Qe(e,t=""){if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new Error(`${r}expected integer >0, got ${e}`)}}function le(e,t,r=""){let o=Ro(e),n=e?.length,i=t!==void 0;if(!o||i&&n!==t){let s=r&&`"${r}" `,c=i?` of length ${t}`:"",f=o?`length=${n}`:`type=${typeof e}`;throw new Error(s+"expected Uint8Array"+c+", got "+f)}return e}function Je(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yn(e,t){le(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length='+r)}function mn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function wn(...e){for(let t=0;t>>8&65280|e>>>24&255}function Ho(e){for(let t=0;t{Uo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;tr=Uo?e=>e:Ho});function Zo(e,t=24,r){r||(r=new Uint32Array(10));for(let o=24-t;o<24;o++){for(let f=0;f<10;f++)r[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];{let f=Nt(r[2],r[3],1)^r[8],a=Dt(r[2],r[3],1)^r[9];e[0]^=f,e[1]^=a,e[10]^=f,e[11]^=a,e[20]^=f,e[21]^=a,e[30]^=f,e[31]^=a,e[40]^=f,e[41]^=a}{let f=Nt(r[4],r[5],1)^r[0],a=Dt(r[4],r[5],1)^r[1];e[2]^=f,e[3]^=a,e[12]^=f,e[13]^=a,e[22]^=f,e[23]^=a,e[32]^=f,e[33]^=a,e[42]^=f,e[43]^=a}{let f=Nt(r[6],r[7],1)^r[2],a=Dt(r[6],r[7],1)^r[3];e[4]^=f,e[5]^=a,e[14]^=f,e[15]^=a,e[24]^=f,e[25]^=a,e[34]^=f,e[35]^=a,e[44]^=f,e[45]^=a}{let f=Nt(r[8],r[9],1)^r[4],a=Dt(r[8],r[9],1)^r[5];e[6]^=f,e[7]^=a,e[16]^=f,e[17]^=a,e[26]^=f,e[27]^=a,e[36]^=f,e[37]^=a,e[46]^=f,e[47]^=a}{let f=Nt(r[0],r[1],1)^r[6],a=Dt(r[0],r[1],1)^r[7];e[8]^=f,e[9]^=a,e[18]^=f,e[19]^=a,e[28]^=f,e[29]^=a,e[38]^=f,e[39]^=a,e[48]^=f,e[49]^=a}let n=e[2],i=e[3],s,c;s=N(n,i,1),c=D(n,i,1),n=e[20],i=e[21],e[20]=s,e[21]=c,s=N(n,i,3),c=D(n,i,3),n=e[14],i=e[15],e[14]=s,e[15]=c,s=N(n,i,6),c=D(n,i,6),n=e[22],i=e[23],e[22]=s,e[23]=c,s=N(n,i,10),c=D(n,i,10),n=e[34],i=e[35],e[34]=s,e[35]=c,s=N(n,i,15),c=D(n,i,15),n=e[36],i=e[37],e[36]=s,e[37]=c,s=N(n,i,21),c=D(n,i,21),n=e[6],i=e[7],e[6]=s,e[7]=c,s=N(n,i,28),c=D(n,i,28),n=e[10],i=e[11],e[10]=s,e[11]=c,s=Y(n,i,36),c=$(n,i,36),n=e[32],i=e[33],e[32]=s,e[33]=c,s=Y(n,i,45),c=$(n,i,45),n=e[16],i=e[17],e[16]=s,e[17]=c,s=Y(n,i,55),c=$(n,i,55),n=e[42],i=e[43],e[42]=s,e[43]=c,s=N(n,i,2),c=D(n,i,2),n=e[48],i=e[49],e[48]=s,e[49]=c,s=N(n,i,14),c=D(n,i,14),n=e[8],i=e[9],e[8]=s,e[9]=c,s=N(n,i,27),c=D(n,i,27),n=e[30],i=e[31],e[30]=s,e[31]=c,s=Y(n,i,41),c=$(n,i,41),n=e[46],i=e[47],e[46]=s,e[47]=c,s=Y(n,i,56),c=$(n,i,56),n=e[38],i=e[39],e[38]=s,e[39]=c,s=N(n,i,8),c=D(n,i,8),n=e[26],i=e[27],e[26]=s,e[27]=c,s=N(n,i,25),c=D(n,i,25),n=e[24],i=e[25],e[24]=s,e[25]=c,s=Y(n,i,43),c=$(n,i,43),n=e[4],i=e[5],e[4]=s,e[5]=c,s=Y(n,i,62),c=$(n,i,62),n=e[40],i=e[41],e[40]=s,e[41]=c,s=N(n,i,18),c=D(n,i,18),n=e[28],i=e[29],e[28]=s,e[29]=c,s=Y(n,i,39),c=$(n,i,39),n=e[44],i=e[45],e[44]=s,e[45]=c,s=Y(n,i,61),c=$(n,i,61),n=e[18],i=e[19],e[18]=s,e[19]=c,s=N(n,i,20),c=D(n,i,20),n=e[12],i=e[13],e[12]=s,e[13]=c,s=Y(n,i,44),c=$(n,i,44),e[2]=s,e[3]=c;for(let f=0;f<50;f+=10)r[0]=e[f],r[1]=e[f+1],r[2]=e[f+2],r[3]=e[f+3],r[4]=e[f+4],r[5]=e[f+5],r[6]=e[f+6],r[7]=e[f+7],r[8]=e[f+8],r[9]=e[f+9],e[f+0]^=~r[2]&r[4],e[f+1]^=~r[3]&r[5],e[f+2]^=~r[4]&r[6],e[f+3]^=~r[5]&r[7],e[f+4]^=~r[6]&r[8],e[f+5]^=~r[7]&r[9],e[f+6]^=~r[8]&r[0],e[f+7]^=~r[9]&r[1],e[f+8]^=~r[0]&r[2],e[f+9]^=~r[1]&r[3];e[0]^=Vo[o],e[1]^=qo[o]}}var jo,zt,Co,zo,No,Do,Ko,Mo,gn,En,Vo,qo,Nt,Dt,nt,er=S(()=>{xn();_n();jo=0n,zt=1n,Co=2n,zo=7n,No=256n,Do=0x71n,Ko=[],Mo=[],gn=[];for(let e=0,t=zt,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Ko.push(2*(5*o+r)),Mo.push((e+1)*(e+2)/2%64);let n=jo;for(let i=0;i<7;i++)t=(t<>zo)*Do)%No,t&Co&&(n^=zt<<(zt<r>32?Y(e,t,r):N(e,t,r),Dt=(e,t,r)=>r>32?$(e,t,r):D(e,t,r);nt=class e{constructor(t,r,o,n=!1,i=24){if(Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pos",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"posOut",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"finished",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state32",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"destroyed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_B",{enumerable:!0,configurable:!0,writable:!0,value:new Uint32Array(10)}),Object.defineProperty(this,"blockLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enableXOF",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"rounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,Qe(o,"outputLen"),!(0=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Qe(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(yn(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,wn(this.state)}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||=new e(r,o,n,s,i),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}}});var rr=S(()=>{er()});function Wo(e,t){return new Proxy(e,{get(r,o,n){return o in t?t[o]:e[o]},set(r,o,n){return o in t&&delete t[o],e[o]=n,!0},deleteProperty(r,o){let n=!1;return o in t&&(delete t[o],n=!0),o in e&&(delete e[o],n=!0),n},ownKeys(r){let o=Reflect.ownKeys(e),n=Reflect.ownKeys(t),i=new Set(n);return[...o.filter(s=>!i.has(s)),...n]},defineProperty(r,o,n){return o in t&&delete t[o],Reflect.defineProperty(e,o,n),!0},getOwnPropertyDescriptor(r,o){return o in t?Reflect.getOwnPropertyDescriptor(t,o):Reflect.getOwnPropertyDescriptor(e,o)},has(r,o){return o in t||o in e}})}var $o,Sn,Bn=S(()=>{$o={},Sn=Wo(globalThis,$o)});function Z(e){return e&255}function W(e){return e<<16>>16}function F(e){return e&65535}function An(e,t){if(e.length!=t.length)return 0;let r=0;for(let n=0;n>4,o&=o>>2,o&=o>>1,o&1}function On(e,t){if(e.length!=t.length)return!1;for(let r=0;r>>0}var he=S(()=>{Bn();rr()});function Jo(e){let t=new Uint8Array(32),r,o;for(let n=0;n<256/8;n++)for(let i=0;i<8;i++)o=e[8*n+i]-3329,o+=o>>31&3329,r=((F(o)<<1)+F(3329/2))/F(3329)&1,t[n]|=Z(r<>n&1),t[8*o+n]=r&W(3330/2);return t}function In(e,t,r,o,n){let i=0,s,c;for(let f=0;i>0)|F(r[f+1])<<8)&4095,c=(F(r[f+1]>>4)|F(r[f+2])<<4)&4095,f=f+3,s<3329&&(e[t+i]=s,i=i+1),i>1&1431655765);for(let f=0;f<8;f++)i=W(n>>4*f+0&3),s=W(n>>4*f+r&3),e[8*c+f]=i-s}}function de(e){for(let t=0,r=1,o=128;o>=2;o>>=1)for(let n=0;n<256;n=t+o){let i=$e[r];for(r=r+1,t=n;t>16;return r-o*3329>>16}function Ot(e){for(let t=0;t<256;t++)e[t]=Un(e[t]);return e}function Un(e){let t=ei*e>>24;return t=t*3329,e-t}function ri(e){for(let r=0;r<256;r++){let o=e[r]*1353,n=Math.imul(o,62209)<<16>>16;e[r]=o-n*3329>>16}return e}function pe(e,t){let r=Fn(e[0],t[0]),o;for(let n=1;n{rr();Lt();he();Tt=class{constructor(){Object.defineProperty(this,"_api",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_skSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pkSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_compressedUSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_compressedVSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_poolG",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_poolH",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_poolKdf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_poolXof",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_poolPrf1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_poolPrf2",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bufG",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(64)}),Object.defineProperty(this,"_bufH",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(32)}),Object.defineProperty(this,"_bufKdf",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(32)}),Object.defineProperty(this,"_bufXof",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(672)}),Object.defineProperty(this,"_bufPrf1",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bufPrf2",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nonceBuf",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(1)}),Object.defineProperty(this,"_xofSeed",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(34)}),Object.defineProperty(this,"_kBuf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_matrixA",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noiseVecs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_polyVec",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bufPkCheck",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bufCt",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_initPool(){this._poolG=new nt(72,6,64),this._poolH=new nt(136,6,32),this._poolKdf=new nt(136,31,32,!0),this._poolXof=new nt(168,31,672,!0);let t=this._eta1*256/4;this._poolPrf1=new nt(136,31,t,!0),this._bufPrf1=new Uint8Array(t);let r=this._eta2*256/4;this._poolPrf2=new nt(136,31,r,!0),this._bufPrf2=new Uint8Array(r),this._kBuf=new Uint8Array([this._k]),this._matrixA=new Array(this._k);for(let n=0;n>31&3329,i=o[2*s+1]-3329,i+=i>>31&3329,t[r+3*s+0]=Z(n),t[r+3*s+1]=Z(n>>8)|Z(i<<4),t[r+3*s+2]=Z(i>>4)}_polyFromBytes(t,r,o){for(let n=0;n<256/2;n++)t[2*n]=W((F(r[o+3*n+0])>>0|F(r[o+3*n+1])<<8)&4095),t[2*n+1]=W((F(r[o+3*n+1])>>4|F(r[o+3*n+2])<<4)&4095)}_g(t,r){return this._poolG.reset(),this._poolG.updateUnsafe(t),r!==void 0&&this._poolG.updateUnsafe(r),this._poolG.writeIntoUnsafe(this._bufG),[this._bufG.subarray(0,32),this._bufG.subarray(32,64)]}_h(t){return this._poolH.reset(),this._poolH.updateUnsafe(t).writeIntoUnsafe(this._bufH),this._bufH}_kdf(t,r){return this._poolKdf.reset(),this._poolKdf.updateUnsafe(t),r!==void 0&&this._poolKdf.updateUnsafe(r),this._poolKdf.writeIntoUnsafe(this._bufKdf),this._bufKdf}_xof(t){return this._poolXof.reset(),this._poolXof.updateUnsafe(t).writeIntoUnsafe(this._bufXof),this._bufXof}_prf1(t,r){return this._nonceBuf[0]=r,this._poolPrf1.reset(),this._poolPrf1.updateUnsafe(t).updateUnsafe(this._nonceBuf).writeIntoUnsafe(this._bufPrf1),this._bufPrf1}_prf2(t,r){return this._nonceBuf[0]=r,this._poolPrf2.reset(),this._poolPrf2.updateUnsafe(t).updateUnsafe(this._nonceBuf).writeIntoUnsafe(this._bufPrf2),this._bufPrf2}_generateKeyPairCore(){try{let t=new Uint8Array(64);return this._api.getRandomValues(t),this._deriveKeyPair(t)}finally{this._zeroPool()}}_deriveKeyPairCore(t){try{if(t.byteLength!==64)throw new Error("seed must be 64 bytes in length");return this._deriveKeyPair(t)}finally{this._zeroPool()}}_encapCore(t,r){try{if(t.length!==384*this._k+32)throw new Error("invalid encapsulation key");let o=this._getSeed(r),[n,i]=this._g(o,this._h(t));return this._encap(t,o,i),[this._bufCt.slice(),n.slice()]}finally{this._zeroPool()}}_decapCore(t,r){try{if(t.byteLength!==this._compressedUSize+this._compressedVSize)throw new Error("Invalid ct size");if(r.length!==768*this._k+96)throw new Error("Invalid decapsulation key");let o=r.subarray(0,this._skSize),n=r.subarray(this._skSize,this._skSize+this._pkSize),i=r.subarray(this._skSize+this._pkSize,this._skSize+this._pkSize+32),s=r.subarray(this._skSize+this._pkSize+32,this._skSize+this._pkSize+64),c=this._decap(t,o),[f,a]=this._g(c,i),u=this._kdf(s,t);return this._encap(n,c,a),An(t,this._bufCt)===1?f.slice():u.slice()}finally{this._zeroPool()}}async _setup(){this._api===void 0&&(this._api=await Tn())}_getSeed(t){if(t==null){let r=new Uint8Array(32);return this._api.getRandomValues(r),r}if(t.byteLength!==32)throw new Error("seed must be 32 bytes in length");return t}_deriveKeyPair(t){let r=t.subarray(0,32),o=t.subarray(32,64),[n,i]=this._deriveCpaKeyPair(r),s=this._h(n),c=new Uint8Array(this._skSize+this._pkSize+64);return c.set(i,0),c.set(n,this._skSize),c.set(s,this._skSize+this._pkSize),c.set(o,this._skSize+this._pkSize+32),[n,c]}_deriveCpaKeyPair(t){let[r,o]=this._g(t,this._kBuf),n=this._sampleMatrix(r,!1),i=this._sampleNoise1(o,0,this._k),s=this._sampleNoise1(o,this._k,this._k);for(let u=0;u>0),t[n++]=Z(o[0]>>8|o[1]<<2),t[n++]=Z(o[1]>>6|o[2]<<4),t[n++]=Z(o[2]>>4|o[3]<<6),t[n++]=Z(o[3]>>2)}return t}_compressV(t,r){let o=new Uint8Array(8);for(let n=0,i=0;i<256/8;i++){for(let s=0;s<8;s++)o[s]=Z(((r[8*i+s]<<4)+3329/2)/3329)&15;t[n++]=o[0]|o[1]<<4,t[n++]=o[2]|o[3]<<4,t[n++]=o[4]|o[5]<<4,t[n++]=o[6]|o[7]<<4}return t}_decompressU(t){let r=new Array(this._k);for(let n=0;n>0|F(t[n+1])<<8,o[1]=F(t[n+1])>>2|F(t[n+2])<<6,o[2]=F(t[n+2])>>4|F(t[n+3])<<4,o[3]=F(t[n+3])>>6|F(t[n+4])<<2,n=n+5;for(let c=0;c<4;c++)r[i][4*s+c]=W((o[c]&1023)*3329+512>>10)}return r}_decompressV(t){let r=new Int16Array(256);for(let o=0,n=0;n<256/2;n++,o++)r[2*n+0]=W((t[o]&15)*3329+8>>4),r[2*n+1]=W((t[o]>>4)*3329+8>>4);return r}};ei=((1<<24)+3329/2)/3329});var or=S(()=>{Lt();Mt();he()});var Pn=S(()=>{wt();or()});var Hn=S(()=>{wt();or()});var Vt,jn=S(()=>{Lt();wt();Mt();Vt=class extends Tt{constructor(){super(),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:10}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:2}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:2}),this._skSize=12*this._k*256/8,this._pkSize=this._skSize+32,this._compressedUSize=this._k*this._du*256/8,this._compressedVSize=this._dv*256/8,this._initPool()}async generateKeyPair(){await this._setup();try{return this._generateKeyPairCore()}catch(t){throw new q(t)}}async deriveKeyPair(t){await this._setup();try{return this._deriveKeyPairCore(t)}catch(r){throw new q(r)}}async encap(t,r){await this._setup();try{return this._encapCore(t,r)}catch(o){throw new q(o)}}async decap(t,r){await this._setup();try{return this._decapCore(t,r)}catch(o){throw new q(o)}}}});var Cn=S(()=>{Lt();wt();Mt()});var ir=S(()=>{Lt();Mt();he()});var zn=S(()=>{wt();ir()});var Nn=S(()=>{wt();ir()});var Dn=S(()=>{wt();Pn();Hn();jn();Cn();zn();Nn();er()});var si=Wn(()=>{dn();Dn();window.x25519=hn;window.MlKem768=Vt});si();})(); -/*! Bundled license information: - -@noble/curves/utils.js: -@noble/curves/abstract/modular.js: -@noble/curves/abstract/curve.js: -@noble/curves/abstract/edwards.js: -@noble/curves/abstract/montgomery.js: -@noble/curves/ed25519.js: - (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) - -mlkem/esm/src/sha3/utils.js: - (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) -*/ diff --git a/android/app/src/main/assets/public/index.html b/android/app/src/main/assets/public/index.html index 21ec1198..bacb3e83 100644 --- a/android/app/src/main/assets/public/index.html +++ b/android/app/src/main/assets/public/index.html @@ -6,7 +6,6 @@ Miarven - @@ -86,6 +85,7 @@ async function start() { updateLoadingStatus("loading.loading"); try { + gotoHome(); if (host != null) { await updateProtocolAndUrl(host); @@ -94,21 +94,13 @@ { await updateProtocolAndUrl(window.location.hostname); } - let localIdRes = await fetchAsync(`${url}/nametoid?u=${username}`); - let localId = localIdRes.trim(); - sidebarPfp.src = await getAvatarUrl(localId, `${username}:${host}`); + sidebarPfp.src = await getAvatarUrl(username); - showAction("action.auth", "startauth"); + showAction("Authenticating...", "startauth"); let res = await Auth(username, password); clearAction("startauth"); if (res.startsWith("success:")) { - try { - await ensureUserKeys(); - } catch (e) { - //if fails continue loading encryption may be broken - console.error(e); - } - gotoHome(); + await refreshDms(); } else { showBlahNotification("error:auth.failed.redirect.to.login"); await delay(2000); @@ -124,18 +116,13 @@ } } - async function refreshDms(waittime = 0) { + async function refreshDms() { try { - showAction("action.dm.fetch", "dmrefresh"); - await delay(waittime); - if (window.cachedDms && typeof renderDms === 'function') { - await renderDms(window.cachedDms); - } - let res = await fetchEncrypted("user/dm/list"); - window.cachedDms = res; - if (typeof renderDms === 'function') { - await renderDms(res); - } + + + showAction("Refreshing dms...", "dmrefresh"); + let res = await fetchEncrypted("user/dm/list", ""); + console.log(res); clearAction("dmrefresh"); } catch (e) { @@ -146,17 +133,9 @@ async function addDm() { try { - showAction("action.dm.adding", "dmadd"); - let username = document.getElementById("addchat-username").value; - let idRes = await fetchAsync(`${url}/nametoid?u=${username}`); - if (idRes.startsWith("error") || idRes.trim() === "0" || idRes.trim() === "") { - clearAction("dmadd"); - showBlahNotification("error:user.not.found"); - return; - } - let targetId = idRes.trim(); - let res = await fetchEncrypted("user/dm/invite", targetId); - + showAction("Adding...", "dmadd"); + let res = await fetchEncrypted("user/dm/invite", document.getElementById("addchat-username").value); + console.log(res); clearAction("dmadd"); showBlahNotification(res); } diff --git a/android/app/src/main/assets/public/login/index.html b/android/app/src/main/assets/public/login/index.html index 30a793ea..46dbbaec 100644 --- a/android/app/src/main/assets/public/login/index.html +++ b/android/app/src/main/assets/public/login/index.html @@ -6,7 +6,6 @@ Miarven - Login -