Changes to autogif.togger.com

Breck Yunits
Breck Yunits
1 month ago
live-status-UCgiZJmuxlXqhvBl415tOaCA.json
Changed around line 0
- {"timestamp":1734019530228,"data":{"isLive":true,"videoId":"eYgWEEkodKs","title":"sunlight.","thumbnailUrl":"https://i.ytimg.com/vi/eYgWEEkodKs/default_live.jpg","channelTitle":"OK Banger","startTime":"2024-12-11T18:13:54Z"}}
live-status-UChEEElYETR8gpc_RL0GGJng.json
Changed around line 0
- {"timestamp":1733497630268,"data":{"isLive":false,"videoId":"TPkN94OgAog"}}
live-status-UChIv2ovrTHbZDDIaLFR9P-Q.json
Changed around line 0
- {"timestamp":1733415329102,"data":{"isLive":true,"videoId":"BKMJKqQgR48","title":"Smooth Jazz Music | Morning Seaside Cafe Ambience - Jazz Instrumental Music for Stress Relief","thumbnailUrl":"https://i.ytimg.com/vi/BKMJKqQgR48/default_live.jpg","channelTitle":"Relaxing Jazz Coffee","startTime":"2024-03-28T09:41:42Z"}}
Breck Yunits
Breck Yunits
1 month ago
.gitignore
Changed around line 11: package-lock.json
+ .*
+ *.json
Breck Yunits
Breck Yunits
1 month ago
gifs/eYgWEEkodKs.gif
live-status-UCgiZJmuxlXqhvBl415tOaCA.json
Changed around line 1
- {"timestamp":1733415200046,"data":{"isLive":false}}
+ {"timestamp":1734019530228,"data":{"isLive":true,"videoId":"eYgWEEkodKs","title":"sunlight.","thumbnailUrl":"https://i.ytimg.com/vi/eYgWEEkodKs/default_live.jpg","channelTitle":"OK Banger","startTime":"2024-12-11T18:13:54Z"}}
Breck Yunits
Breck Yunits
1 month ago
gifs/eYgWEEkodKs.gif
Breck Yunits
Breck Yunits
1 month ago
gifs/NwL9rCugShI.gif
Breck Yunits
Breck Yunits
1 month ago
index.scroll
Changed around line 14: br 3
- compose img
- printColumn img
+ orderBy -lastModified
+ compose img
+ printColumn img
Breck Yunits
Breck Yunits
1 month ago
gifs/IN-KZ2DPRkM.gif
Breck Yunits
Breck Yunits
1 month ago
frame.scroll
Changed around line 0
- buildTxt
- Below is the source code for WarpCast frames v2.
-
- toStamp ../frames-v2-demo
-
- I want a demo that is MUCH simpler.
-
- No react or next.js.
-
- Plain HTML, css, and Javascript.
-
- Please make that.
-
-
Breck Yunits
Breck Yunits
1 month ago
check.mjs
Changed around line 1
- import { AutoGifCLI } from "./autogif.mjs"
+ import { AutoGifCLI } from "./cli.mjs"
gifs/0FBiyFpV__g.gif
gifs/BKMJKqQgR48.gif
gifs/HhTFLQ-FdVA.gif
index.scroll
Changed around line 13: br 3
-
landing.css
Changed around line 16: input {
+ min-width: 300px;
Changed around line 29: button {
+ min-width: 100px;
live-status-UChEEElYETR8gpc_RL0GGJng.json
Changed around line 1
+ {"timestamp":1733497630268,"data":{"isLive":false,"videoId":"TPkN94OgAog"}}
Breck Yunits
Breck Yunits
1 month ago
check.mjs
Changed around line 1
+ import { AutoGifCLI } from "./autogif.mjs"
+
+ try {
+ const post = JSON.parse(process.env.REQUEST_BODY)
+ const cli = new AutoGifCLI()
+ await cli.checkCommand(process.cwd(), [post.url])
+ } catch (error) {
+ console.error("Error:", error.message)
+ process.exit(1)
+ }
cli.mjs
Changed around line 226: class AutoGifCLI extends SimpleCLI {
- const cli = new AutoGifCLI()
- cli.executeUsersInstructionsFromShell()
+ if (import.meta.url === `file://${process.argv[1]}`) {
+ const cli = new AutoGifCLI()
+ cli.executeUsersInstructionsFromShell()
+ }
index.scroll
Changed around line 4: metaTags
- # OkBanger AutoGif
+ center
+ # OkBanger AutoGif
+ br 3
+
+
+
+
landing.css
Changed around line 9: body {
+ input {
+ padding: 12px 16px;
+ border: 2px solid #e0e0e0;
+ border-radius: 8px;
+ font-size: 16px;
+ transition: border-color 0.3s ease;
+ outline: none;
+ }
+
+ button {
+ padding: 12px 24px;
+ background: #4a90e2;
+ color: white;
+ border: none;
+ border-radius: 8px;
+ font-size: 16px;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ margin-left: 10px;
+ }
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 82: class AutoGifCLI extends SimpleCLI {
+ let videoId = ""
- const videoId = urlParams.get("v")
+ videoId = urlParams.get("v")
Changed around line 138: class AutoGifCLI extends SimpleCLI {
- result = { isLive: false }
+ result = { isLive: false, videoId }
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 61: class AutoGifCLI extends SimpleCLI {
- if (status.isLive) {
- const videoUrl = `https://youtube.com/watch?v=${status.videoId}`
- this.log(`Channel is live! Downloading snippet from ${videoUrl}`)
+ if (status.isLive) this.log(`Channel is live!`)
+ else this.log("Channel is not live")
- const downloadResult = await downloadYouTube(videoUrl, 15)
- if (!downloadResult.success) {
- throw new Error(`Failed to download: ${downloadResult.error}`)
- }
+ const videoUrl = `https://youtube.com/watch?v=${status.videoId}`
- this.log("Download complete, converting to GIF...")
- const outputPath = path.join(
- process.cwd(),
- `live-${status.videoId}.gif`,
- )
- await this.createGifFromYouTube(videoUrl, outputPath)
- this.log(`GIF created at: ${outputPath}`)
- } else {
- this.log("Channel is not live")
+ const downloadResult = await downloadYouTube(videoUrl, 15)
+ if (!downloadResult.success) {
+ throw new Error(`Failed to download: ${downloadResult.error}`)
+
+ this.log("Download complete, converting to GIF...")
+ const outputPath = path.join(
+ process.cwd(),
+ `live-${status.videoId}.gif`,
+ )
+ await this.createGifFromYouTube(videoUrl, outputPath)
+ this.log(`GIF created at: ${outputPath}`)
live-status-UCgiZJmuxlXqhvBl415tOaCA.json
Changed around line 1
+ {"timestamp":1733415200046,"data":{"isLive":false}}
live-status-UChIv2ovrTHbZDDIaLFR9P-Q.json
Changed around line 1
+ {"timestamp":1733415329102,"data":{"isLive":true,"videoId":"BKMJKqQgR48","title":"Smooth Jazz Music | Morning Seaside Cafe Ambience - Jazz Instrumental Music for Stress Relief","thumbnailUrl":"https://i.ytimg.com/vi/BKMJKqQgR48/default_live.jpg","channelTitle":"Relaxing Jazz Coffee","startTime":"2024-03-28T09:41:42Z"}}
ffff:66.74.144.229
ffff:66.74.144.229
1 month ago
updated index.scroll
index.scroll
Changed around line 6: landing.css
-
ffff:66.74.144.229
ffff:66.74.144.229
1 month ago
updated index.scroll
index.scroll
Changed around line 6: landing.css
- br 3
-
ffff:66.74.144.229
ffff:66.74.144.229
1 month ago
updated todo.scroll
todo.scroll
Changed around line 1
+
+ in 4 hours, can you build a frame that will
+ [x] visit me and cameron's ok banger stream (a youtube URL). 10 minutes.
+ [x] at specific times (when we are livestreaming). 10 minutes.
+ [x] make an animated gif of us chatting. 20 minutes.
+ [] cast that for me under my account. 3.5 hours and counting :(
ffff:66.74.144.229
ffff:66.74.144.229
1 month ago
updated index.scroll
index.scroll
Changed around line 8: container 600px
- in 4 hours, can you build a frame that will
- [x] visit me and cameron's ok banger stream (a youtube URL). 10 minutes.
- [x] at specific times (when we are livestreaming). 10 minutes.
- [x] make an animated gif of us chatting. 20 minutes.
- [] cast that for me under my account. 3.5 hours and counting :(
ffff:66.74.144.229
ffff:66.74.144.229
1 month ago
created todo.scroll
todo.scroll
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 158: class AutoGifCLI extends SimpleCLI {
- await this.createGifFromVideo(cwd, videos[0])
+ if (videos?.length > 0) {
+ await this.createGifFromVideo(cwd, videos[0])
+ return
+ }
+
+ const downloadsDir = await ensureDir("downloads")
+ const gifsDir = await ensureDir("gifs")
+
+ const downloads = await fs.readdir(downloadsDir)
+ const gifs = await fs.readdir(gifsDir)
+
+ for (const file of downloads) {
+ const baseName = path.parse(file).name
+ const gifExists = gifs.some((gif) => gif.startsWith(baseName))
+
+ if (!gifExists) {
+ this.log(`Creating GIF for ${file}...`)
+ await this.createGifFromVideo(cwd, file)
+ }
+ }
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 19: const downloadYouTube = async (url, seconds = 15) => {
- const { stdout, stderr } = await execAsync(
- `yt-dlp "${url}" --download-sections "*00:00:00-00:00:${seconds}" -o "${path.join(downloadsDir, videoId)}.%(ext)s"`,
- )
+ const output = path.join(downloadsDir, videoId) + ".mp4"
+ console.log(`Running:`)
+ const command = `yt-dlp -f mp4 "${url}" --download-sections "*00:00:00-00:00:${seconds}" -o "${output}"`
+ console.log(command)
+ const { stdout, stderr } = await execAsync(command)
+ console.log(stdout)
Changed around line 52: class AutoGifCLI extends SimpleCLI {
- async checkCommand(
- channelId = "UCgiZJmuxlXqhvBl415tOaCA",
- apiKey = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA",
- ) {
- const status = await this.isLive(channelId, apiKey)
+ async checkCommand(cwd, channelIds) {
+ const channelId = channelIds[0]
+ this.log(`Seeing if ${channelId} is live...`)
+ const status = await this.isLive(
+ channelId,
+ "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA",
+ )
+
+ const videoUrl = `https://youtube.com/watch?v=${status.videoId}`
+ this.log(`Channel is live! Downloading snippet from ${videoUrl}`)
+
+ const downloadResult = await downloadYouTube(videoUrl, 15)
+ if (!downloadResult.success) {
+ throw new Error(`Failed to download: ${downloadResult.error}`)
+ }
+
+ this.log("Download complete, converting to GIF...")
- await this.createGifFromYouTube(
- `https://youtube.com/watch?v=${status.videoId}`,
- outputPath,
- )
+ await this.createGifFromYouTube(videoUrl, outputPath)
+ this.log(`GIF created at: ${outputPath}`)
+ } else {
+ this.log("Channel is not live")
- async isLive(channelId, apiKey) {
- const cacheFile = path.join(__dirname, `live-status-${channelId}.json`)
+ async isLive(channelIdOrUrl, apiKey) {
+ let channelId = channelIdOrUrl
- try {
- try {
- const cachedData = await fs.readFile(cacheFile, "utf-8")
- const { data, timestamp } = JSON.parse(cachedData)
- if (Date.now() - timestamp < 60000) return data
- } catch (err) {}
-
- const params = new URLSearchParams({
- part: "snippet",
- channelId,
- type: "video",
- eventType: "live",
- key: apiKey,
- })
-
- const response = await fetch(`${this.endpoint}?${params}`)
- const data = await response.json()
+ // Extract channel ID from URL if needed
+ if (channelIdOrUrl.includes("youtube.com")) {
+ const urlParams = new URLSearchParams(channelIdOrUrl.split("?")[1])
+ const videoId = urlParams.get("v")
+ if (!videoId) throw new Error("Invalid YouTube URL")
- if (!response.ok) {
- throw new Error(
- `API error: ${data.error?.message || "Unknown error"}`,
- )
+ // Get channel ID from video
+ const response = await fetch(
+ `https://www.googleapis.com/youtube/v3/videos?part=snippet&id=${videoId}&key=${apiKey}`,
+ )
+ const data = await response.json()
+ if (!response.ok || !data.items?.[0]) {
+ throw new Error("Could not fetch video details")
+ channelId = data.items[0].snippet.channelId
+ }
- let result
- if (data.items && data.items.length > 0) {
- const stream = data.items[0]
- result = {
- isLive: true,
- videoId: stream.id.videoId,
- title: stream.snippet.title,
- thumbnailUrl: stream.snippet.thumbnails.default.url,
- channelTitle: stream.snippet.channelTitle,
- startTime: stream.snippet.publishedAt,
- }
- } else {
- result = { isLive: false }
- }
+ const cacheFile = path.join(__dirname, `live-status-${channelId}.json`)
+
+ try {
+ const cachedData = await fs.readFile(cacheFile, "utf-8")
+ const { data, timestamp } = JSON.parse(cachedData)
+ if (Date.now() - timestamp < 60000) return data
+ } catch (err) {}
+
+ const params = new URLSearchParams({
+ part: "snippet",
+ channelId,
+ type: "video",
+ eventType: "live",
+ key: apiKey,
+ })
+
+ const response = await fetch(`${this.endpoint}?${params}`)
+ const data = await response.json()
- await fs.writeFile(
- cacheFile,
- JSON.stringify({
- timestamp: Date.now(),
- data: result,
- }),
+ if (!response.ok) {
+ throw new Error(
+ `API error: ${data.error?.message || "Unknown error"}`,
- return result
- } catch (error) {
- throw new Error(`Failed to check live status: ${error.message}`)
+
+ let result
+ if (data.items && data.items.length > 0) {
+ const stream = data.items[0]
+ result = {
+ isLive: true,
+ videoId: stream.id.videoId,
+ title: stream.snippet.title,
+ thumbnailUrl: stream.snippet.thumbnails.default.url,
+ channelTitle: stream.snippet.channelTitle,
+ startTime: stream.snippet.publishedAt,
+ }
+ } else {
+ result = { isLive: false }
+ }
+
+ await fs.writeFile(
+ cacheFile,
+ JSON.stringify({
+ timestamp: Date.now(),
+ data: result,
+ }),
+ )
+ return result
- console.log(`Downloading ${url}`)
Changed around line 176: class AutoGifCLI extends SimpleCLI {
+ const downloadsDir = await ensureDir("downloads")
+ inputPath = path.join(downloadsDir, inputPath)
+ inputPath = inputPath
index.scroll
Changed around line 16: in 4 hours, can you build a frame that will
- okbanger.gif
- caption A test gif generated from a youtube video.
+ disk gifs
+ compose img
+ printColumn img
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 132: class AutoGifCLI extends SimpleCLI {
+ async castCommand(cwd) {
+ console.log("Coming soon")
+ }
+
Breck Yunits
Breck Yunits
1 month ago
.gitignore
Changed around line 8
- *.mp4
+ *.mp4
+ gifs/
+ downloads/
cli.mjs
Changed around line 17: const __dirname = dirname(__filename)
+ const downloadsDir = await ensureDir("downloads")
- `yt-dlp "${url}" --download-sections "*00:00:00-00:00:${seconds}" -o "${videoId}.%(ext)s"`,
+ `yt-dlp "${url}" --download-sections "*00:00:00-00:00:${seconds}" -o "${path.join(downloadsDir, videoId)}.%(ext)s"`,
Changed around line 29: const downloadYouTube = async (url, seconds = 15) => {
+ const ensureDir = async (dirName) => {
+ const dir = path.join(process.cwd(), dirName)
+ try {
+ await fs.access(dir)
+ } catch {
+ await fs.mkdir(dir)
+ }
+ return dir
+ }
+
Changed around line 144: class AutoGifCLI extends SimpleCLI {
+ const gifsDir = await ensureDir("gifs")
- outputPath = path.join(inputPathObj.dir, `${inputPathObj.name}.gif`)
+ outputPath = path.join(gifsDir, `${inputPathObj.name}.gif`)
Breck Yunits
Breck Yunits
1 month ago
azure.gif
cli.mjs
Changed around line 111: class AutoGifCLI extends SimpleCLI {
- async downloadCommand(youtubeUrl) {
- await downloadYouTube(youtubeUrl)
+ async downloadCommand(cwd, youtubeUrls) {
+ const url = youtubeUrls[0]
+ console.log(`Downloading ${url}`)
+ await downloadYouTube(url)
simpleCLI.mjs
Changed around line 18: class SimpleCLI {
+ const cwd = process.cwd()
- const cwd = process.cwd()
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 1
- import ytdl from "ytdl-core"
+ import { exec } from "child_process"
+ import { promisify } from "util"
+ const execAsync = promisify(exec)
- const downloadYouTube = async (url) => {
- const tempDir = path.join(process.cwd(), "temp")
- const videoPath = path.join(tempDir, `${Date.now()}.mp4`)
-
+ const downloadYouTube = async (url, seconds = 15) => {
- // Create temp directory if it doesn't exist
- await fs.mkdir(tempDir, { recursive: true })
-
- // Download video
- const videoStream = ytdl(url, { quality: "highest" })
- const fileStream = fs.createWriteStream(videoPath)
- await new Promise((resolve, reject) => {
- videoStream.pipe(fileStream)
- fileStream.on("finish", resolve)
- fileStream.on("error", reject)
- })
- return true
+ const videoId = url.split("v=")[1]?.split("&")[0]
+ const { stdout, stderr } = await execAsync(
+ `yt-dlp "${url}" --download-sections "*00:00:00-00:00:${seconds}" -o "${videoId}.%(ext)s"`,
+ )
+ if (stderr) throw new Error(`Download failed: ${stderr}`)
+ return { success: true, message: stdout }
- console.error("Conversion error:", error)
- return false
+ return { success: false, error: error.message }
Breck Yunits
Breck Yunits
1 month ago
okbanger.gif
Breck Yunits
Breck Yunits
1 month ago
done
cli.mjs
Changed around line 123: class AutoGifCLI extends SimpleCLI {
- async gifCommand(inputPath) {
- await this.createGifFromVideo(inputPath)
+ async gifCommand(cwd, videos) {
+ await this.createGifFromVideo(cwd, videos[0])
+ cwd,
okbanger.gif
simpleCLI.mjs
Changed around line 1
- import parseArgs from 'minimist';
- import path from 'path';
- import fs from 'fs';
- import { fileURLToPath } from 'url';
+ import parseArgs from "minimist"
+ import path from "path"
+ import fs from "fs"
+ import { fileURLToPath } from "url"
- if (process.platform === "win32") return false;
- if (process.stdin.isTTY === true) return false;
- return fs.fstatSync(0).isFIFO();
- };
+ if (process.platform === "win32") return false
+ if (process.stdin.isTTY === true) return false
+ return fs.fstatSync(0).isFIFO()
+ }
- CommandFnDecoratorSuffix = "Command";
- verbose = true;
+ CommandFnDecoratorSuffix = "Command"
+ verbose = true
- executeUsersInstructionsFromShell(args = parseArgs(process.argv.slice(2))._, userIsPipingInput = isUserPipingInput()) {
- const command = args[0];
- const commandName = `${command}${this.CommandFnDecoratorSuffix}`;
-
- if (this[commandName]) return userIsPipingInput ? this._runCommandOnPipedStdIn(commandName) : this[commandName](process.cwd());
- else if (command) this.log(`No command '${command}'. Running help command.`);
- else this.log(`No command provided. Running help command.`);
-
- return this.helpCommand();
+ async executeUsersInstructionsFromShell(
+ args = parseArgs(process.argv.slice(2))._,
+ userIsPipingInput = isUserPipingInput(),
+ ) {
+ const command = args[0]
+ const commandName = `${command}${this.CommandFnDecoratorSuffix}`
+ const cwd = process.cwd()
+ if (this[commandName])
+ return userIsPipingInput
+ ? this._runCommandOnPipedStdIn(commandName)
+ : this[commandName](cwd, args.slice(1))
+ else if (command) this.log(`No command '${command}'. Running help command.`)
+ else this.log(`No command provided. Running help command.`)
+ return this.helpCommand()
- this.log(`Running ${commandName} on piped input`);
- let pipedData = "";
-
- process.stdin.on("readable", function() {
- pipedData += this.read();
- });
+ this.log(`Running ${commandName} on piped input`)
+ let pipedData = ""
+
+ process.stdin.on("readable", function () {
+ pipedData += this.read()
+ })
- .map(line => line.trim())
- .filter(line => fs.existsSync(line));
+ .map((line) => line.trim())
+ .filter((line) => fs.existsSync(line))
- await this[commandName](line);
+ await this[commandName](line)
-
+
- this[commandName](process.cwd());
+ this[commandName](process.cwd())
- });
+ })
- this.verbose = false;
- return this;
+ this.verbose = false
+ return this
- if (this.verbose) console.log(message);
- return message;
+ if (this.verbose) console.log(message)
+ return message
- .filter(atom => atom.endsWith(this.CommandFnDecoratorSuffix))
- .sort();
+ .filter((atom) => atom.endsWith(this.CommandFnDecoratorSuffix))
+ .sort()
- return path.isAbsolute(folder) ? path.normalize(folder) : path.resolve(path.join(process.cwd(), folder));
+ return path.isAbsolute(folder)
+ ? path.normalize(folder)
+ : path.resolve(path.join(process.cwd(), folder))
- this.log(this.welcomeMessage);
- return this.log(`\nAvailable commands:\n\n${this._allCommands.map(comm => `🖌️ ` + comm.replace(this.CommandFnDecoratorSuffix, "")).join("\n")}\n`);
+ this.log(this.welcomeMessage)
+ return this.log(
+ `\nAvailable commands:\n\n${this._allCommands.map((comm) => `🖌️ ` + comm.replace(this.CommandFnDecoratorSuffix, "")).join("\n")}\n`,
+ )
- export { SimpleCLI };
+ export { SimpleCLI }
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated index.scroll
index.scroll
Changed around line 16: in 4 hours, can you build a frame that will
- azure.gif
+ okbanger.gif
root
root
1 month ago
Added okbanger.gif
okbanger.gif
Breck Yunits
Breck Yunits
1 month ago
cli.mjs
Changed around line 1
+ #! /usr/bin/env node
+ import { SimpleCLI } from "./simpleCLI.mjs"
+ import ffmpeg from "fluent-ffmpeg"
+ import ytdl from "ytdl-core"
+ import { unlink, createWriteStream } from "fs"
+ import fs from "fs/promises"
+ import path from "path"
+ import { fileURLToPath } from "url"
+ import { dirname } from "path"
+ import { createRequire } from "module"
+
+ const require = createRequire(import.meta.url)
+ const __filename = fileURLToPath(import.meta.url)
+ const __dirname = dirname(__filename)
+
+ const downloadYouTube = async (url) => {
+ const tempDir = path.join(process.cwd(), "temp")
+ const videoPath = path.join(tempDir, `${Date.now()}.mp4`)
+
+ try {
+ // Create temp directory if it doesn't exist
+ await fs.mkdir(tempDir, { recursive: true })
+
+ // Download video
+ const videoStream = ytdl(url, { quality: "highest" })
+ const fileStream = fs.createWriteStream(videoPath)
+ await new Promise((resolve, reject) => {
+ videoStream.pipe(fileStream)
+ fileStream.on("finish", resolve)
+ fileStream.on("error", reject)
+ })
+ return true
+ } catch (error) {
+ console.error("Conversion error:", error)
+ return false
+ }
+ }
+
+ class AutoGifCLI extends SimpleCLI {
+ config = {
+ duration: 5,
+ fps: 10,
+ width: 480,
+ }
+
+ welcomeMessage = "🎥 AutoGif CLI - Create GIFs from videos and YouTube"
+ endpoint = "https://www.googleapis.com/youtube/v3/search"
+
+ async checkCommand(
+ channelId = "UCgiZJmuxlXqhvBl415tOaCA",
+ apiKey = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA",
+ ) {
+ const status = await this.isLive(channelId, apiKey)
+ this.log(JSON.stringify(status, null, 2))
+ if (status.isLive) {
+ const outputPath = path.join(
+ process.cwd(),
+ `live-${status.videoId}.gif`,
+ )
+ await this.createGifFromYouTube(
+ `https://youtube.com/watch?v=${status.videoId}`,
+ outputPath,
+ )
+ }
+ }
+
+ async isLive(channelId, apiKey) {
+ const cacheFile = path.join(__dirname, `live-status-${channelId}.json`)
+
+ try {
+ try {
+ const cachedData = await fs.readFile(cacheFile, "utf-8")
+ const { data, timestamp } = JSON.parse(cachedData)
+ if (Date.now() - timestamp < 60000) return data
+ } catch (err) {}
+
+ const params = new URLSearchParams({
+ part: "snippet",
+ channelId,
+ type: "video",
+ eventType: "live",
+ key: apiKey,
+ })
+
+ const response = await fetch(`${this.endpoint}?${params}`)
+ const data = await response.json()
+
+ if (!response.ok) {
+ throw new Error(
+ `API error: ${data.error?.message || "Unknown error"}`,
+ )
+ }
+
+ let result
+ if (data.items && data.items.length > 0) {
+ const stream = data.items[0]
+ result = {
+ isLive: true,
+ videoId: stream.id.videoId,
+ title: stream.snippet.title,
+ thumbnailUrl: stream.snippet.thumbnails.default.url,
+ channelTitle: stream.snippet.channelTitle,
+ startTime: stream.snippet.publishedAt,
+ }
+ } else {
+ result = { isLive: false }
+ }
+
+ await fs.writeFile(
+ cacheFile,
+ JSON.stringify({
+ timestamp: Date.now(),
+ data: result,
+ }),
+ )
+ return result
+ } catch (error) {
+ throw new Error(`Failed to check live status: ${error.message}`)
+ }
+ }
+
+ async downloadCommand(youtubeUrl) {
+ await downloadYouTube(youtubeUrl)
+ }
+
+ async gifCommand(inputPath) {
+ await this.createGifFromVideo(inputPath)
+ }
+
+ async createGifFromVideo(
+ inputPath,
+ outputPath = null,
+ {
+ fps = this.config.fps,
+ width = this.config.width,
+ startTime = 0,
+ duration = this.config.duration,
+ } = {},
+ ) {
+ if (!outputPath) {
+ const inputPathObj = path.parse(inputPath)
+ outputPath = path.join(inputPathObj.dir, `${inputPathObj.name}.gif`)
+ }
+
+ this.log("Converting to GIF...")
+ return new Promise((resolve, reject) => {
+ let command = ffmpeg(inputPath)
+ .fps(fps)
+ .size(`${width}x?`)
+ .noAudio()
+ .format("gif")
+
+ if (startTime > 0) command = command.seek(startTime)
+ if (duration) command = command.duration(duration)
+
+ command
+ .output(outputPath)
+ .on("end", () => {
+ this.log("GIF created successfully!")
+ resolve(outputPath)
+ })
+ .on("error", reject)
+ .run()
+ })
+ }
+ }
+
+ const cli = new AutoGifCLI()
+ cli.executeUsersInstructionsFromShell()
+
+ export { AutoGifCLI }
download.mjs
Changed around line 0
- import express from 'express';
- import ytdl from 'ytdl-core';
- import fs from 'fs/promises';
- import path from 'path';
- import { createGifFromVideo } from './gifConverter.js';
-
- const router = express.Router();
-
- router.post('/api/convert', async (req, res) => {
- const { url, options } = req.body;
- const tempDir = path.join(process.cwd(), 'temp');
- const videoPath = path.join(tempDir, `${Date.now()}.mp4`);
-
- try {
- // Create temp directory if it doesn't exist
- await fs.mkdir(tempDir, { recursive: true });
-
- // Download video
- const videoStream = ytdl(url, { quality: 'highest' });
- const fileStream = fs.createWriteStream(videoPath);
- await new Promise((resolve, reject) => {
- videoStream.pipe(fileStream);
- fileStream.on('finish', resolve);
- fileStream.on('error', reject);
- });
-
- // Convert to GIF
- const gifPath = await createGifFromVideo(videoPath, null, options);
-
- // Send GIF file
- const gifBuffer = await fs.readFile(gifPath);
- res.type('gif').send(gifBuffer);
-
- // Cleanup
- await Promise.all([
- fs.unlink(videoPath),
- fs.unlink(gifPath)
- ]);
- } catch (error) {
- console.error('Conversion error:', error);
- res.status(500).json({ error: 'Conversion failed' });
- }
- });
-
- export default router;
gifMaker.mjs
Changed around line 0
- import ffmpeg from "fluent-ffmpeg"
- import path from "path"
-
- export async function createGifFromVideo(
- inputPath,
- outputPath = null,
- {
- fps = 10,
- width = 480,
- startTime = 0, // Start time in seconds
- duration = null, // Duration in seconds (null means entire video)
- } = {},
- ) {
- // If no output path provided, create one based on input filename
- if (!outputPath) {
- const inputPathObj = path.parse(inputPath)
- outputPath = path.join(inputPathObj.dir, `${inputPathObj.name}.gif`)
- }
-
- console.log("Converting to GIF...")
- return new Promise((resolve, reject) => {
- let command = ffmpeg(inputPath)
- .fps(fps)
- .size(`${width}x?`)
- .noAudio()
- .format("gif")
-
- // Add start time if specified
- if (startTime > 0) {
- command = command.seek(startTime)
- }
-
- // Add duration if specified
- if (duration !== null) {
- command = command.duration(duration)
- }
-
- command
- .output(outputPath)
- .on("end", () => {
- console.log("GIF created successfully!")
- resolve(outputPath) // Return the output path
- })
- .on("error", (err) => {
- console.error("Error creating GIF:", err)
- reject(err)
- })
- .run()
- })
- }
-
- // With all options
- createGifFromVideo("azure.mp4", null, {
- fps: 10,
- width: 320,
- startTime: 30, // Start 10 seconds into the video
- duration: 10, // Create a 5-second GIF
- })
isLive.mjs
Changed around line 0
- import fs from "fs/promises"
- import path from "path"
- import { fileURLToPath } from "url"
- import { dirname } from "path"
- import { createRequire } from "module"
- const require = createRequire(import.meta.url)
- const __filename = fileURLToPath(import.meta.url)
- const __dirname = dirname(__filename)
- const endpoint = "https://www.googleapis.com/youtube/v3/search"
-
- async function isLive(channelId, API_KEY) {
- const cacheFile = path.join(__dirname, `live-status-${channelId}.json`)
-
- try {
- // Try to read from cache first
- try {
- const cachedData = await fs.readFile(cacheFile, 'utf-8')
- const { data, timestamp } = JSON.parse(cachedData)
-
- // Cache is valid for 1 minute
- if (Date.now() - timestamp < 60000) {
- return data
- }
- } catch (err) {
- // Cache miss or invalid cache, continue to fetch
- }
-
- // Fetch new data
- const params = new URLSearchParams({
- part: 'snippet',
- channelId,
- type: 'video',
- eventType: 'live',
- key: API_KEY
- })
-
- const response = await fetch(`${endpoint}?${params}`)
- const data = await response.json()
-
- if (!response.ok) {
- throw new Error(`API error: ${data.error?.message || 'Unknown error'}`)
- }
-
- let result
- if (data.items && data.items.length > 0) {
- const stream = data.items[0]
- result = {
- isLive: true,
- videoId: stream.id.videoId,
- title: stream.snippet.title,
- thumbnailUrl: stream.snippet.thumbnails.default.url,
- channelTitle: stream.snippet.channelTitle,
- startTime: stream.snippet.publishedAt
- }
- } else {
- result = {
- isLive: false
- }
- }
-
- // Save to cache
- await fs.writeFile(cacheFile, JSON.stringify({
- timestamp: Date.now(),
- data: result
- }))
-
- return result
- } catch (error) {
- throw new Error(`Failed to check live status: ${error.message}`)
- }
- }
-
- const main = async () => {
- const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
- const API_KEY = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA"
- const status = await isLive(CHANNEL_ID, API_KEY)
- console.log(status)
- }
-
- main()
package.json
Changed around line 10
+ "minimist": "^1.2.8",
sdk.js
Changed around line 0
- "use strict";
- var frame = (() => {
- var rr = Object.create;
- var $e = Object.defineProperty;
- var nr = Object.getOwnPropertyDescriptor;
- var sr = Object.getOwnPropertyNames;
- var ar = Object.getPrototypeOf,
- ir = Object.prototype.hasOwnProperty;
- var or = (t, e) => () => (
- e || t((e = { exports: {} }).exports, e), e.exports
- ),
- at = (t, e) => {
- for (var r in e) $e(t, r, { get: e[r], enumerable: !0 });
- },
- yt = (t, e, r, n) => {
- if ((e && typeof e == "object") || typeof e == "function")
- for (let s of sr(e))
- !ir.call(t, s) &&
- s !== r &&
- $e(t, s, {
- get: () => e[s],
- enumerable: !(n = nr(e, s)) || n.enumerable,
- });
- return t;
- };
- var cr = (t, e, r) => (
- (r = t != null ? rr(ar(t)) : {}),
- yt(
- e || !t || !t.__esModule
- ? $e(r, "default", { value: t, enumerable: !0 })
- : r,
- t,
- )
- ),
- ur = (t) => yt($e({}, "__esModule", { value: !0 }), t);
- var bt = or((Bn, it) => {
- "use strict";
- var dr = Object.prototype.hasOwnProperty,
- O = "~";
- function ye() {}
- Object.create &&
- ((ye.prototype = Object.create(null)), new ye().__proto__ || (O = !1));
- function lr(t, e, r) {
- (this.fn = t), (this.context = e), (this.once = r || !1);
- }
- function gt(t, e, r, n, s) {
- if (typeof r != "function")
- throw new TypeError("The listener must be a function");
- var a = new lr(r, n || t, s),
- i = O ? O + e : e;
- return (
- t._events[i]
- ? t._events[i].fn
- ? (t._events[i] = [t._events[i], a])
- : t._events[i].push(a)
- : ((t._events[i] = a), t._eventsCount++),
- t
- );
- }
- function Ve(t, e) {
- --t._eventsCount === 0 ? (t._events = new ye()) : delete t._events[e];
- }
- function k() {
- (this._events = new ye()), (this._eventsCount = 0);
- }
- k.prototype.eventNames = function () {
- var e = [],
- r,
- n;
- if (this._eventsCount === 0) return e;
- for (n in (r = this._events)) dr.call(r, n) && e.push(O ? n.slice(1) : n);
- return Object.getOwnPropertySymbols
- ? e.concat(Object.getOwnPropertySymbols(r))
- : e;
- };
- k.prototype.listeners = function (e) {
- var r = O ? O + e : e,
- n = this._events[r];
- if (!n) return [];
- if (n.fn) return [n.fn];
- for (var s = 0, a = n.length, i = new Array(a); s < a; s++)
- i[s] = n[s].fn;
- return i;
- };
- k.prototype.listenerCount = function (e) {
- var r = O ? O + e : e,
- n = this._events[r];
- return n ? (n.fn ? 1 : n.length) : 0;
- };
- k.prototype.emit = function (e, r, n, s, a, i) {
- var o = O ? O + e : e;
- if (!this._events[o]) return !1;
- var c = this._events[o],
- u = arguments.length,
- f,
- y;
- if (c.fn) {
- switch ((c.once && this.removeListener(e, c.fn, void 0, !0), u)) {
- case 1:
- return c.fn.call(c.context), !0;
- case 2:
- return c.fn.call(c.context, r), !0;
- case 3:
- return c.fn.call(c.context, r, n), !0;
- case 4:
- return c.fn.call(c.context, r, n, s), !0;
- case 5:
- return c.fn.call(c.context, r, n, s, a), !0;
- case 6:
- return c.fn.call(c.context, r, n, s, a, i), !0;
- }
- for (y = 1, f = new Array(u - 1); y < u; y++) f[y - 1] = arguments[y];
- c.fn.apply(c.context, f);
- } else {
- var w = c.length,
- E;
- for (y = 0; y < w; y++)
- switch (
- (c[y].once && this.removeListener(e, c[y].fn, void 0, !0), u)
- ) {
- case 1:
- c[y].fn.call(c[y].context);
- break;
- case 2:
- c[y].fn.call(c[y].context, r);
- break;
- case 3:
- c[y].fn.call(c[y].context, r, n);
- break;
- case 4:
- c[y].fn.call(c[y].context, r, n, s);
- break;
- default:
- if (!f)
- for (E = 1, f = new Array(u - 1); E < u; E++)
- f[E - 1] = arguments[E];
- c[y].fn.apply(c[y].context, f);
- }
- }
- return !0;
- };
- k.prototype.on = function (e, r, n) {
- return gt(this, e, r, n, !1);
- };
- k.prototype.once = function (e, r, n) {
- return gt(this, e, r, n, !0);
- };
- k.prototype.removeListener = function (e, r, n, s) {
- var a = O ? O + e : e;
- if (!this._events[a]) return this;
- if (!r) return Ve(this, a), this;
- var i = this._events[a];
- if (i.fn)
- i.fn === r && (!s || i.once) && (!n || i.context === n) && Ve(this, a);
- else {
- for (var o = 0, c = [], u = i.length; o < u; o++)
- (i[o].fn !== r || (s && !i[o].once) || (n && i[o].context !== n)) &&
- c.push(i[o]);
- c.length ? (this._events[a] = c.length === 1 ? c[0] : c) : Ve(this, a);
- }
- return this;
- };
- k.prototype.removeAllListeners = function (e) {
- var r;
- return (
- e
- ? ((r = O ? O + e : e), this._events[r] && Ve(this, r))
- : ((this._events = new ye()), (this._eventsCount = 0)),
- this
- );
- };
- k.prototype.off = k.prototype.removeListener;
- k.prototype.addListener = k.prototype.on;
- k.prefixed = O;
- k.EventEmitter = k;
- typeof it < "u" && (it.exports = k);
- });
- var Dn = {};
- at(Dn, {
- createEmitter: () => $t,
- default: () => Vn,
- eventFrameAddedPayloadSchema: () => Xt,
- eventFrameRemovedPayloadSchema: () => Qt,
- eventHeaderSchema: () => Zn,
- eventNotificationsEnabledPayloadSchema: () => er,
- eventPayloadSchema: () => In,
- eventSchema: () => Mn,
- notificationDetailsSchema: () => vt,
- notificationsDisabledPayloadSchema: () => tr,
- sdk: () => dt,
- sendNotificationRequestSchema: () => Ln,
- sendNotificationResponseSchema: () => $n,
- });
- var ge = cr(bt(), 1);
- var xt = Symbol("Comlink.proxy"),
- fr = Symbol("Comlink.endpoint"),
- pr = Symbol("Comlink.releaseProxy"),
- ot = Symbol("Comlink.finalizer"),
- ze = Symbol("Comlink.thrown"),
- wt = (t) => (typeof t == "object" && t !== null) || typeof t == "function",
- hr = {
- canHandle: (t) => wt(t) && t[xt],
- serialize(t) {
- let { port1: e, port2: r } = new MessageChannel();
- return Tt(t, e), [r, [r]];
- },
- deserialize(t) {
- return t.start(), ut(t);
- },
- },
- mr = {
- canHandle: (t) => wt(t) && ze in t,
- serialize({ value: t }) {
- let e;
- return (
- t instanceof Error
- ? (e = {
- isError: !0,
- value: { message: t.message, name: t.name, stack: t.stack },
- })
- : (e = { isError: !1, value: t }),
- [e, []]
- );
- },
- deserialize(t) {
- throw t.isError
- ? Object.assign(new Error(t.value.message), t.value)
- : t.value;
- },
- },
- kt = new Map([
- ["proxy", hr],
- ["throw", mr],
- ]);
- function vr(t, e) {
- for (let r of t)
- if (e === r || r === "*" || (r instanceof RegExp && r.test(e))) return !0;
- return !1;
- }
- function Tt(t, e = globalThis, r = ["*"]) {
- e.addEventListener("message", function n(s) {
- if (!s || !s.data) return;
- if (!vr(r, s.origin)) {
- console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
- return;
- }
- let { id: a, type: i, path: o } = Object.assign({ path: [] }, s.data),
- c = (s.data.argumentList || []).map(H),
- u;
- try {
- let f = o.slice(0, -1).reduce((w, E) => w[E], t),
- y = o.reduce((w, E) => w[E], t);
- switch (i) {
- case "GET":
- u = y;
- break;
- case "SET":
- (f[o.slice(-1)[0]] = H(s.data.value)), (u = !0);
- break;
- case "APPLY":
- u = y.apply(f, c);
- break;
- case "CONSTRUCT":
- {
- let w = new y(...c);
- u = wr(w);
- }
- break;
- case "ENDPOINT":
- {
- let { port1: w, port2: E } = new MessageChannel();
- Tt(t, E), (u = xr(w, [w]));
- }
- break;
- case "RELEASE":
- u = void 0;
- break;
- default:
- return;
- }
- } catch (f) {
- u = { value: f, [ze]: 0 };
- }
- Promise.resolve(u)
- .catch((f) => ({ value: f, [ze]: 0 }))
- .then((f) => {
- let [y, w] = qe(f);
- e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w),
- i === "RELEASE" &&
- (e.removeEventListener("message", n),
- Et(e),
- ot in t && typeof t[ot] == "function" && t[ot]());
- })
- .catch((f) => {
- let [y, w] = qe({
- value: new TypeError("Unserializable return value"),
- [ze]: 0,
- });
- e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w);
- });
- }),
- e.start && e.start();
- }
- function yr(t) {
- return t.constructor.name === "MessagePort";
- }
- function Et(t) {
- yr(t) && t.close();
- }
- function ut(t, e) {
- let r = new Map();
- return (
- t.addEventListener("message", function (s) {
- let { data: a } = s;
- if (!a || !a.id) return;
- let i = r.get(a.id);
- if (i)
- try {
- i(a);
- } finally {
- r.delete(a.id);
- }
- }),
- ct(t, r, [], e)
- );
- }
- function De(t) {
- if (t) throw new Error("Proxy has been released and is not useable");
- }
- function Ot(t) {
- return ce(t, new Map(), { type: "RELEASE" }).then(() => {
- Et(t);
- });
- }
- var Be = new WeakMap(),
- Ue =
- "FinalizationRegistry" in globalThis &&
- new FinalizationRegistry((t) => {
- let e = (Be.get(t) || 0) - 1;
- Be.set(t, e), e === 0 && Ot(t);
- });
- function gr(t, e) {
- let r = (Be.get(e) || 0) + 1;
- Be.set(e, r), Ue && Ue.register(t, e, t);
- }
- function br(t) {
- Ue && Ue.unregister(t);
- }
- function ct(t, e, r = [], n = function () {}) {
- let s = !1,
- a = new Proxy(n, {
- get(i, o) {
- if ((De(s), o === pr))
- return () => {
- br(a), Ot(t), e.clear(), (s = !0);
- };
- if (o === "then") {
- if (r.length === 0) return { then: () => a };
- let c = ce(t, e, {
- type: "GET",
- path: r.map((u) => u.toString()),
- }).then(H);
- return c.then.bind(c);
- }
- return ct(t, e, [...r, o]);
- },
- set(i, o, c) {
- De(s);
- let [u, f] = qe(c);
- return ce(
- t,
- e,
- { type: "SET", path: [...r, o].map((y) => y.toString()), value: u },
- f,
- ).then(H);
- },
- apply(i, o, c) {
- De(s);
- let u = r[r.length - 1];
- if (u === fr) return ce(t, e, { type: "ENDPOINT" }).then(H);
- if (u === "bind") return ct(t, e, r.slice(0, -1));
- let [f, y] = _t(c);
- return ce(
- t,
- e,
- {
- type: "APPLY",
- path: r.map((w) => w.toString()),
- argumentList: f,
- },
- y,
- ).then(H);
- },
- construct(i, o) {
- De(s);
- let [c, u] = _t(o);
- return ce(
- t,
- e,
- {
- type: "CONSTRUCT",
- path: r.map((f) => f.toString()),
- argumentList: c,
- },
- u,
- ).then(H);
- },
- });
- return gr(a, t), a;
- }
- function _r(t) {
- return Array.prototype.concat.apply([], t);
- }
- function _t(t) {
- let e = t.map(qe);
- return [e.map((r) => r[0]), _r(e.map((r) => r[1]))];
- }
- var jt = new WeakMap();
- function xr(t, e) {
- return jt.set(t, e), t;
- }
- function wr(t) {
- return Object.assign(t, { [xt]: !0 });
- }
- function Rt(t, e = globalThis, r = "*") {
- return {
- postMessage: (n, s) => t.postMessage(n, r, s),
- addEventListener: e.addEventListener.bind(e),
- removeEventListener: e.removeEventListener.bind(e),
- };
- }
- function qe(t) {
- for (let [e, r] of kt)
- if (r.canHandle(t)) {
- let [n, s] = r.serialize(t);
- return [{ type: "HANDLER", name: e, value: n }, s];
- }
- return [{ type: "RAW", value: t }, jt.get(t) || []];
- }
- function H(t) {
- switch (t.type) {
- case "HANDLER":
- return kt.get(t.name).deserialize(t.value);
- case "RAW":
- return t.value;
- }
- }
- function ce(t, e, r, n) {
- return new Promise((s) => {
- let a = kr();
- e.set(a, s),
- t.start && t.start(),
- t.postMessage(Object.assign({ id: a }, r), n);
- });
- }
- function kr() {
- return new Array(4)
- .fill(0)
- .map(() =>
- Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16),
- )
- .join("-");
- }
- var Tr = {
- postMessage() {},
- addEventListener: () => {},
- removeEventListener: () => {},
- },
- Er = {
- postMessage: (t) => {
- console.debug("[webview:req]", t),
- window.ReactNativeWebView.postMessage(JSON.stringify(t));
- },
- addEventListener: (t, e, ...r) => {
- document.addEventListener("FarcasterFrameCallback", e, ...r);
- },
- removeEventListener: (t, e) => {
- document.removeEventListener("FarcasterFrameCallback", e);
- },
- },
- St =
- typeof window > "u"
- ? Tr
- : window?.ReactNativeWebView
- ? Er
- : Rt(window?.parent ?? window);
- var S = ut(St);
- var Pt = "0.1.1";
- function Ct() {
- return Pt;
- }
- var We = class t extends Error {
- constructor(e, r = {}) {
- let n = (() => {
- if (r.cause instanceof t) {
- if (r.cause.details) return r.cause.details;
- if (r.cause.shortMessage) return r.cause.shortMessage;
- }
- return r.cause?.message ? r.cause.message : r.details;
- })(),
- s = (r.cause instanceof t && r.cause.docsPath) || r.docsPath,
- i = `https://oxlib.sh${s ?? ""}`,
- o = [
- e || "An error occurred.",
- ...(r.metaMessages ? ["", ...r.metaMessages] : []),
- ...(n || s
- ? ["", n ? `Details: ${n}` : void 0, s ? `See: ${i}` : void 0]
- : []),
- ].filter((c) => typeof c == "string").join(`
- `);
- super(o, r.cause ? { cause: r.cause } : void 0),
- Object.defineProperty(this, "details", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "docs", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "docsPath", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "shortMessage", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "cause", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "BaseError",
- }),
- Object.defineProperty(this, "version", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: `ox@${Ct()}`,
- }),
- (this.cause = r.cause),
- (this.details = n),
- (this.docs = i),
- (this.docsPath = s),
- (this.shortMessage = e);
- }
- walk(e) {
- return Nt(this, e);
- }
- };
- function Nt(t, e) {
- return e?.(t)
- ? t
- : t && typeof t == "object" && "cause" in t && t.cause
- ? Nt(t.cause, e)
- : e
- ? null
- : t;
- }
- var Ce = {};
- at(Ce, {
- ChainDisconnectedError: () => Ge,
- DisconnectedError: () => Ye,
- IsUndefinedError: () => Ke,
- ProviderRpcError: () => z,
- UnauthorizedError: () => Fe,
- UnsupportedMethodError: () => Je,
- UserRejectedRequestError: () => He,
- createEmitter: () => Or,
- from: () => jr,
- });
- function Mt(t, e = {}) {
- let { raw: r = !1 } = e,
- n = t;
- if (r) return t;
- if (n.error) {
- let { code: s } = n.error,
- a =
- s === Se.code
- ? Se
- : s === be.code
- ? be
- : s === Re.code
- ? Re
- : s === Oe.code
- ? Oe
- : s === Te.code
- ? Te
- : s === je.code
- ? je
- : s === ke.code
- ? ke
- : s === Pe.code
- ? Pe
- : s === _e.code
- ? _e
- : s === xe.code
- ? xe
- : s === we.code
- ? we
- : s === Ee.code
- ? Ee
- : j;
- throw new a(n.error);
- }
- return n.result;
- }
- var j = class extends Error {
- constructor(e) {
- let { code: r, message: n, data: s } = e;
- super(n),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.BaseError",
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "data", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- (this.code = r),
- (this.data = s);
- }
- },
- be = class t extends j {
- constructor(e = {}) {
- super({
- message: "Missing or invalid parameters.",
- ...e,
- code: t.code,
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32e3,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.InvalidInputError",
- });
- }
- };
- Object.defineProperty(be, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32e3,
- });
- var _e = class t extends j {
- constructor(e = {}) {
- super({ message: "Requested resource not found.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32001,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.ResourceNotFoundError",
- });
- }
- };
- Object.defineProperty(_e, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32001,
- });
- var xe = class t extends j {
- constructor(e = {}) {
- super({
- message: "Requested resource not available.",
- ...e,
- code: t.code,
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32002,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.ResourceUnavailableError",
- });
- }
- };
- Object.defineProperty(xe, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32002,
- });
- var we = class t extends j {
- constructor(e = {}) {
- super({ message: "Transaction creation failed.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32003,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.TransactionRejectedError",
- });
- }
- };
- Object.defineProperty(we, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32003,
- });
- var ke = class t extends j {
- constructor(e = {}) {
- super({ message: "Method is not implemented.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32004,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.MethodNotSupportedError",
- });
- }
- };
- Object.defineProperty(ke, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32004,
- });
- var Te = class t extends j {
- constructor(e = {}) {
- super({ message: "Rate limit exceeded.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32005,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.LimitExceededError",
- });
- }
- };
- Object.defineProperty(Te, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32005,
- });
- var Ee = class t extends j {
- constructor(e = {}) {
- super({ message: "JSON-RPC version not supported.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32006,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.VersionNotSupportedError",
- });
- }
- };
- Object.defineProperty(Ee, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32006,
- });
- var Oe = class t extends j {
- constructor(e = {}) {
- super({
- message: "Input is not a valid JSON-RPC request.",
- ...e,
- code: t.code,
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32600,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.InvalidRequestError",
- });
- }
- };
- Object.defineProperty(Oe, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32600,
- });
- var je = class t extends j {
- constructor(e = {}) {
- super({ message: "Method does not exist.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32601,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.MethodNotFoundError",
- });
- }
- };
- Object.defineProperty(je, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32601,
- });
- var Re = class t extends j {
- constructor(e = {}) {
- super({ message: "Invalid method parameters.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32602,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.InvalidParamsError",
- });
- }
- };
- Object.defineProperty(Re, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32602,
- });
- var Se = class t extends j {
- constructor(e = {}) {
- super({ message: "Internal JSON-RPC error.", ...e, code: t.code }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32603,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.InternalErrorError",
- });
- }
- };
- Object.defineProperty(Se, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32603,
- });
- var Pe = class t extends j {
- constructor(e = {}) {
- super({
- message: "Failed to parse JSON-RPC response.",
- ...e,
- code: t.code,
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32700,
- }),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "RpcResponse.ParseError",
- });
- }
- };
- Object.defineProperty(Pe, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: -32700,
- });
- var z = class extends Error {
- constructor(e, r) {
- super(r),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "ProviderRpcError",
- }),
- Object.defineProperty(this, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- Object.defineProperty(this, "details", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: void 0,
- }),
- (this.code = e),
- (this.details = r);
- }
- },
- He = class extends z {
- constructor({ message: e = "The user rejected the request." } = {}) {
- super(4001, e),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.UserRejectedRequestError",
- });
- }
- };
- Object.defineProperty(He, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: 4001,
- });
- var Fe = class extends z {
- constructor({
- message:
- e = "The requested method and/or account has not been authorized by the user.",
- } = {}) {
- super(4100, e),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.UnauthorizedError",
- });
- }
- };
- Object.defineProperty(Fe, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: 4100,
- });
- var Je = class extends z {
- constructor({
- message: e = "The provider does not support the requested method.",
- } = {}) {
- super(4200, e),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.UnsupportedMethodError",
- });
- }
- };
- Object.defineProperty(Je, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: 4200,
- });
- var Ye = class extends z {
- constructor({
- message: e = "The provider is disconnected from all chains.",
- } = {}) {
- super(4900, e),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.DisconnectedError",
- });
- }
- };
- Object.defineProperty(Ye, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: 4900,
- });
- var Ge = class extends z {
- constructor({
- message: e = "The provider is not connected to the requested chain.",
- } = {}) {
- super(4901, e),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.ChainDisconnectedError",
- });
- }
- };
- Object.defineProperty(Ge, "code", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: 4901,
- });
- function Or() {
- let t = new ge.default();
- return {
- get eventNames() {
- return t.eventNames.bind(t);
- },
- get listenerCount() {
- return t.listenerCount.bind(t);
- },
- get listeners() {
- return t.listeners.bind(t);
- },
- addListener: t.addListener.bind(t),
- emit: t.emit.bind(t),
- off: t.off.bind(t),
- on: t.on.bind(t),
- once: t.once.bind(t),
- removeAllListeners: t.removeAllListeners.bind(t),
- removeListener: t.removeListener.bind(t),
- };
- }
- function jr(t, e = {}) {
- let { includeEvents: r = !0 } = e;
- if (!t) throw new Ke();
- return {
- ...(r
- ? { on: t.on?.bind(t), removeListener: t.removeListener?.bind(t) }
- : {}),
- async request(n) {
- let s = await t.request(n);
- return s && typeof s == "object" && "jsonrpc" in s ? Mt(s) : s;
- },
- };
- }
- var Ke = class extends We {
- constructor() {
- super("`provider` is undefined."),
- Object.defineProperty(this, "name", {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: "Provider.IsUndefinedError",
- });
- }
- };
- var Xe = {};
- at(Xe, { createStore: () => Rr, from: () => It });
- function Rr(t = {}) {
- let e = t.id ?? 0;
- return {
- prepare(r) {
- return It({ id: e++, ...r });
- },
- get id() {
- return e;
- },
- };
- }
- function It(t) {
- return { ...t, jsonrpc: "2.0" };
- }
- var Sr = Ce.createEmitter(),
- Pr = Xe.createStore(),
- Lt = Ce.from({
- ...Sr,
- async request(t) {
- return await S.ethProviderRequest(Pr.prepare(t));
- },
- });
- typeof document < "u" &&
- document.addEventListener("FarcasterFrameEvent", (t) => {
- t instanceof MessageEvent;
- });
- function $t() {
- let t = new ge.default();
- return {
- get eventNames() {
- return t.eventNames.bind(t);
- },
- get listenerCount() {
- return t.listenerCount.bind(t);
- },
- get listeners() {
- return t.listeners.bind(t);
- },
- addListener: t.addListener.bind(t),
- emit: t.emit.bind(t),
- off: t.off.bind(t),
- on: t.on.bind(t),
- once: t.once.bind(t),
- removeAllListeners: t.removeAllListeners.bind(t),
- removeListener: t.removeListener.bind(t),
- };
- }
- var Vt = $t(),
- dt = {
- ...Vt,
- context: S.context,
- actions: {
- setPrimaryButton: S.setPrimaryButton.bind(S),
- ready: S.ready.bind(S),
- close: S.close.bind(S),
- openUrl: S.openUrl.bind(S),
- addFrame: S.addFrame.bind(S),
- },
- wallet: { ethProvider: Lt },
- };
- typeof document < "u" &&
- document.addEventListener("FarcasterFrameEvent", (t) => {
- t instanceof MessageEvent &&
- t.data.type === "primaryButtonClicked" &&
- Vt.emit("primaryButtonClicked");
- });
- var x;
- (function (t) {
- t.assertEqual = (s) => s;
- function e(s) {}
- t.assertIs = e;
- function r(s) {
- throw new Error();
- }
- (t.assertNever = r),
- (t.arrayToEnum = (s) => {
- let a = {};
- for (let i of s) a[i] = i;
- return a;
- }),
- (t.getValidEnumValues = (s) => {
- let a = t.objectKeys(s).filter((o) => typeof s[s[o]] != "number"),
- i = {};
- for (let o of a) i[o] = s[o];
- return t.objectValues(i);
- }),
- (t.objectValues = (s) =>
- t.objectKeys(s).map(function (a) {
- return s[a];
- })),
- (t.objectKeys =
- typeof Object.keys == "function"
- ? (s) => Object.keys(s)
- : (s) => {
- let a = [];
- for (let i in s)
- Object.prototype.hasOwnProperty.call(s, i) && a.push(i);
- return a;
- }),
- (t.find = (s, a) => {
- for (let i of s) if (a(i)) return i;
- }),
- (t.isInteger =
- typeof Number.isInteger == "function"
- ? (s) => Number.isInteger(s)
- : (s) => typeof s == "number" && isFinite(s) && Math.floor(s) === s);
- function n(s, a = " | ") {
- return s.map((i) => (typeof i == "string" ? `'${i}'` : i)).join(a);
- }
- (t.joinValues = n),
- (t.jsonStringifyReplacer = (s, a) =>
- typeof a == "bigint" ? a.toString() : a);
- })(x || (x = {}));
- var ft;
- (function (t) {
- t.mergeShapes = (e, r) => ({ ...e, ...r });
- })(ft || (ft = {}));
- var p = x.arrayToEnum([
- "string",
- "nan",
- "number",
- "integer",
- "float",
- "boolean",
- "date",
- "bigint",
- "symbol",
- "function",
- "undefined",
- "null",
- "array",
- "object",
- "unknown",
- "promise",
- "void",
- "never",
- "map",
- "set",
- ]),
- B = (t) => {
- switch (typeof t) {
- case "undefined":
- return p.undefined;
- case "string":
- return p.string;
- case "number":
- return isNaN(t) ? p.nan : p.number;
- case "boolean":
- return p.boolean;
- case "function":
- return p.function;
- case "bigint":
- return p.bigint;
- case "symbol":
- return p.symbol;
- case "object":
- return Array.isArray(t)
- ? p.array
- : t === null
- ? p.null
- : t.then &&
- typeof t.then == "function" &&
- t.catch &&
- typeof t.catch == "function"
- ? p.promise
- : typeof Map < "u" && t instanceof Map
- ? p.map
- : typeof Set < "u" && t instanceof Set
- ? p.set
- : typeof Date < "u" && t instanceof Date
- ? p.date
- : p.object;
- default:
- return p.unknown;
- }
- },
- d = x.arrayToEnum([
- "invalid_type",
- "invalid_literal",
- "custom",
- "invalid_union",
- "invalid_union_discriminator",
- "invalid_enum_value",
- "unrecognized_keys",
- "invalid_arguments",
- "invalid_return_type",
- "invalid_date",
- "invalid_string",
- "too_small",
- "too_big",
- "invalid_intersection_types",
- "not_multiple_of",
- "not_finite",
- ]),
- Cr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"),
- C = class t extends Error {
- constructor(e) {
- super(),
- (this.issues = []),
- (this.addIssue = (n) => {
- this.issues = [...this.issues, n];
- }),
- (this.addIssues = (n = []) => {
- this.issues = [...this.issues, ...n];
- });
- let r = new.target.prototype;
- Object.setPrototypeOf
- ? Object.setPrototypeOf(this, r)
- : (this.__proto__ = r),
- (this.name = "ZodError"),
- (this.issues = e);
- }
- get errors() {
- return this.issues;
- }
- format(e) {
- let r =
- e ||
- function (a) {
- return a.message;
- },
- n = { _errors: [] },
- s = (a) => {
- for (let i of a.issues)
- if (i.code === "invalid_union") i.unionErrors.map(s);
- else if (i.code === "invalid_return_type") s(i.returnTypeError);
- else if (i.code === "invalid_arguments") s(i.argumentsError);
- else if (i.path.length === 0) n._errors.push(r(i));
- else {
- let o = n,
- c = 0;
- for (; c < i.path.length; ) {
- let u = i.path[c];
- c === i.path.length - 1
- ? ((o[u] = o[u] || { _errors: [] }),
- o[u]._errors.push(r(i)))
- : (o[u] = o[u] || { _errors: [] }),
- (o = o[u]),
- c++;
- }
- }
- };
- return s(this), n;
- }
- static assert(e) {
- if (!(e instanceof t)) throw new Error(`Not a ZodError: ${e}`);
- }
- toString() {
- return this.message;
- }
- get message() {
- return JSON.stringify(this.issues, x.jsonStringifyReplacer, 2);
- }
- get isEmpty() {
- return this.issues.length === 0;
- }
- flatten(e = (r) => r.message) {
- let r = {},
- n = [];
- for (let s of this.issues)
- s.path.length > 0
- ? ((r[s.path[0]] = r[s.path[0]] || []), r[s.path[0]].push(e(s)))
- : n.push(e(s));
- return { formErrors: n, fieldErrors: r };
- }
- get formErrors() {
- return this.flatten();
- }
- };
- C.create = (t) => new C(t);
- var le = (t, e) => {
- let r;
- switch (t.code) {
- case d.invalid_type:
- t.received === p.undefined
- ? (r = "Required")
- : (r = `Expected ${t.expected}, received ${t.received}`);
- break;
- case d.invalid_literal:
- r = `Invalid literal value, expected ${JSON.stringify(t.expected, x.jsonStringifyReplacer)}`;
- break;
- case d.unrecognized_keys:
- r = `Unrecognized key(s) in object: ${x.joinValues(t.keys, ", ")}`;
- break;
- case d.invalid_union:
- r = "Invalid input";
- break;
- case d.invalid_union_discriminator:
- r = `Invalid discriminator value. Expected ${x.joinValues(t.options)}`;
- break;
- case d.invalid_enum_value:
- r = `Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;
- break;
- case d.invalid_arguments:
- r = "Invalid function arguments";
- break;
- case d.invalid_return_type:
- r = "Invalid function return type";
- break;
- case d.invalid_date:
- r = "Invalid date";
- break;
- case d.invalid_string:
- typeof t.validation == "object"
- ? "includes" in t.validation
- ? ((r = `Invalid input: must include "${t.validation.includes}"`),
- typeof t.validation.position == "number" &&
- (r = `${r} at one or more positions greater than or equal to ${t.validation.position}`))
- : "startsWith" in t.validation
- ? (r = `Invalid input: must start with "${t.validation.startsWith}"`)
- : "endsWith" in t.validation
- ? (r = `Invalid input: must end with "${t.validation.endsWith}"`)
- : x.assertNever(t.validation)
- : t.validation !== "regex"
- ? (r = `Invalid ${t.validation}`)
- : (r = "Invalid");
- break;
- case d.too_small:
- t.type === "array"
- ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)`)
- : t.type === "string"
- ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)`)
- : t.type === "number"
- ? (r = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}`)
- : t.type === "date"
- ? (r = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}`)
- : (r = "Invalid input");
- break;
- case d.too_big:
- t.type === "array"
- ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)`)
- : t.type === "string"
- ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)`)
- : t.type === "number"
- ? (r = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
- : t.type === "bigint"
- ? (r = `BigInt must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
- : t.type === "date"
- ? (r = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t.maximum))}`)
- : (r = "Invalid input");
- break;
- case d.custom:
- r = "Invalid input";
- break;
- case d.invalid_intersection_types:
- r = "Intersection results could not be merged";
- break;
- case d.not_multiple_of:
- r = `Number must be a multiple of ${t.multipleOf}`;
- break;
- case d.not_finite:
- r = "Number must be finite";
- break;
- default:
- (r = e.defaultError), x.assertNever(t);
- }
- return { message: r };
- },
- Bt = le;
- function Nr(t) {
- Bt = t;
- }
- function Qe() {
- return Bt;
- }
- var et = (t) => {
- let { data: e, path: r, errorMaps: n, issueData: s } = t,
- a = [...r, ...(s.path || [])],
- i = { ...s, path: a };
- if (s.message !== void 0) return { ...s, path: a, message: s.message };
- let o = "",
- c = n
- .filter((u) => !!u)
- .slice()
- .reverse();
- for (let u of c) o = u(i, { data: e, defaultError: o }).message;
- return { ...s, path: a, message: o };
- },
- Ar = [];
- function l(t, e) {
- let r = Qe(),
- n = et({
- issueData: e,
- data: t.data,
- path: t.path,
- errorMaps: [
- t.common.contextualErrorMap,
- t.schemaErrorMap,
- r,
- r === le ? void 0 : le,
- ].filter((s) => !!s),
- });
- t.common.issues.push(n);
- }
- var T = class t {
- constructor() {
- this.value = "valid";
- }
- dirty() {
- this.value === "valid" && (this.value = "dirty");
- }
- abort() {
- this.value !== "aborted" && (this.value = "aborted");
- }
- static mergeArray(e, r) {
- let n = [];
- for (let s of r) {
- if (s.status === "aborted") return v;
- s.status === "dirty" && e.dirty(), n.push(s.value);
- }
- return { status: e.value, value: n };
- }
- static async mergeObjectAsync(e, r) {
- let n = [];
- for (let s of r) {
- let a = await s.key,
- i = await s.value;
- n.push({ key: a, value: i });
- }
- return t.mergeObjectSync(e, n);
- }
- static mergeObjectSync(e, r) {
- let n = {};
- for (let s of r) {
- let { key: a, value: i } = s;
- if (a.status === "aborted" || i.status === "aborted") return v;
- a.status === "dirty" && e.dirty(),
- i.status === "dirty" && e.dirty(),
- a.value !== "__proto__" &&
- (typeof i.value < "u" || s.alwaysSet) &&
- (n[a.value] = i.value);
- }
- return { status: e.value, value: n };
- }
- },
- v = Object.freeze({ status: "aborted" }),
- de = (t) => ({ status: "dirty", value: t }),
- R = (t) => ({ status: "valid", value: t }),
- pt = (t) => t.status === "aborted",
- ht = (t) => t.status === "dirty",
- Me = (t) => t.status === "valid",
- Ze = (t) => typeof Promise < "u" && t instanceof Promise;
- function tt(t, e, r, n) {
- if (r === "a" && !n)
- throw new TypeError("Private accessor was defined without a getter");
- if (typeof e == "function" ? t !== e || !n : !e.has(t))
- throw new TypeError(
- "Cannot read private member from an object whose class did not declare it",
- );
- return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
- }
- function Ut(t, e, r, n, s) {
- if (n === "m") throw new TypeError("Private method is not writable");
- if (n === "a" && !s)
- throw new TypeError("Private accessor was defined without a setter");
- if (typeof e == "function" ? t !== e || !s : !e.has(t))
- throw new TypeError(
- "Cannot write private member to an object whose class did not declare it",
- );
- return n === "a" ? s.call(t, r) : s ? (s.value = r) : e.set(t, r), r;
- }
- var h;
- (function (t) {
- (t.errToObj = (e) => (typeof e == "string" ? { message: e } : e || {})),
- (t.toString = (e) => (typeof e == "string" ? e : e?.message));
- })(h || (h = {}));
- var Ne,
- Ae,
- M = class {
- constructor(e, r, n, s) {
- (this._cachedPath = []),
- (this.parent = e),
- (this.data = r),
- (this._path = n),
- (this._key = s);
- }
- get path() {
- return (
- this._cachedPath.length ||
- (this._key instanceof Array
- ? this._cachedPath.push(...this._path, ...this._key)
- : this._cachedPath.push(...this._path, this._key)),
- this._cachedPath
- );
- }
- },
- Dt = (t, e) => {
- if (Me(e)) return { success: !0, data: e.value };
- if (!t.common.issues.length)
- throw new Error("Validation failed but no issues detected.");
- return {
- success: !1,
- get error() {
- if (this._error) return this._error;
- let r = new C(t.common.issues);
- return (this._error = r), this._error;
- },
- };
- };
- function g(t) {
- if (!t) return {};
- let {
- errorMap: e,
- invalid_type_error: r,
- required_error: n,
- description: s,
- } = t;
- if (e && (r || n))
- throw new Error(
- `Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`,
- );
- return e
- ? { errorMap: e, description: s }
- : {
- errorMap: (i, o) => {
- var c, u;
- let { message: f } = t;
- return i.code === "invalid_enum_value"
- ? { message: f ?? o.defaultError }
- : typeof o.data > "u"
- ? {
- message:
- (c = f ?? n) !== null && c !== void 0
- ? c
- : o.defaultError,
- }
- : i.code !== "invalid_type"
- ? { message: o.defaultError }
- : {
- message:
- (u = f ?? r) !== null && u !== void 0
- ? u
- : o.defaultError,
- };
- },
- description: s,
- };
- }
- var b = class {
- constructor(e) {
- (this.spa = this.safeParseAsync),
- (this._def = e),
- (this.parse = this.parse.bind(this)),
- (this.safeParse = this.safeParse.bind(this)),
- (this.parseAsync = this.parseAsync.bind(this)),
- (this.safeParseAsync = this.safeParseAsync.bind(this)),
- (this.spa = this.spa.bind(this)),
- (this.refine = this.refine.bind(this)),
- (this.refinement = this.refinement.bind(this)),
- (this.superRefine = this.superRefine.bind(this)),
- (this.optional = this.optional.bind(this)),
- (this.nullable = this.nullable.bind(this)),
- (this.nullish = this.nullish.bind(this)),
- (this.array = this.array.bind(this)),
- (this.promise = this.promise.bind(this)),
- (this.or = this.or.bind(this)),
- (this.and = this.and.bind(this)),
- (this.transform = this.transform.bind(this)),
- (this.brand = this.brand.bind(this)),
- (this.default = this.default.bind(this)),
- (this.catch = this.catch.bind(this)),
- (this.describe = this.describe.bind(this)),
- (this.pipe = this.pipe.bind(this)),
- (this.readonly = this.readonly.bind(this)),
- (this.isNullable = this.isNullable.bind(this)),
- (this.isOptional = this.isOptional.bind(this));
- }
- get description() {
- return this._def.description;
- }
- _getType(e) {
- return B(e.data);
- }
- _getOrReturnCtx(e, r) {
- return (
- r || {
- common: e.parent.common,
- data: e.data,
- parsedType: B(e.data),
- schemaErrorMap: this._def.errorMap,
- path: e.path,
- parent: e.parent,
- }
- );
- }
- _processInputParams(e) {
- return {
- status: new T(),
- ctx: {
- common: e.parent.common,
- data: e.data,
- parsedType: B(e.data),
- schemaErrorMap: this._def.errorMap,
- path: e.path,
- parent: e.parent,
- },
- };
- }
- _parseSync(e) {
- let r = this._parse(e);
- if (Ze(r)) throw new Error("Synchronous parse encountered promise.");
- return r;
- }
- _parseAsync(e) {
- let r = this._parse(e);
- return Promise.resolve(r);
- }
- parse(e, r) {
- let n = this.safeParse(e, r);
- if (n.success) return n.data;
- throw n.error;
- }
- safeParse(e, r) {
- var n;
- let s = {
- common: {
- issues: [],
- async: (n = r?.async) !== null && n !== void 0 ? n : !1,
- contextualErrorMap: r?.errorMap,
- },
- path: r?.path || [],
- schemaErrorMap: this._def.errorMap,
- parent: null,
- data: e,
- parsedType: B(e),
- },
- a = this._parseSync({ data: e, path: s.path, parent: s });
- return Dt(s, a);
- }
- async parseAsync(e, r) {
- let n = await this.safeParseAsync(e, r);
- if (n.success) return n.data;
- throw n.error;
- }
- async safeParseAsync(e, r) {
- let n = {
- common: { issues: [], contextualErrorMap: r?.errorMap, async: !0 },
- path: r?.path || [],
- schemaErrorMap: this._def.errorMap,
- parent: null,
- data: e,
- parsedType: B(e),
- },
- s = this._parse({ data: e, path: n.path, parent: n }),
- a = await (Ze(s) ? s : Promise.resolve(s));
- return Dt(n, a);
- }
- refine(e, r) {
- let n = (s) =>
- typeof r == "string" || typeof r > "u"
- ? { message: r }
- : typeof r == "function"
- ? r(s)
- : r;
- return this._refinement((s, a) => {
- let i = e(s),
- o = () => a.addIssue({ code: d.custom, ...n(s) });
- return typeof Promise < "u" && i instanceof Promise
- ? i.then((c) => (c ? !0 : (o(), !1)))
- : i
- ? !0
- : (o(), !1);
- });
- }
- refinement(e, r) {
- return this._refinement((n, s) =>
- e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1),
- );
- }
- _refinement(e) {
- return new N({
- schema: this,
- typeName: m.ZodEffects,
- effect: { type: "refinement", refinement: e },
- });
- }
- superRefine(e) {
- return this._refinement(e);
- }
- optional() {
- return A.create(this, this._def);
- }
- nullable() {
- return L.create(this, this._def);
- }
- nullish() {
- return this.nullable().optional();
- }
- array() {
- return D.create(this, this._def);
- }
- promise() {
- return W.create(this, this._def);
- }
- or(e) {
- return Q.create([this, e], this._def);
- }
- and(e) {
- return ee.create(this, e, this._def);
- }
- transform(e) {
- return new N({
- ...g(this._def),
- schema: this,
- typeName: m.ZodEffects,
- effect: { type: "transform", transform: e },
- });
- }
- default(e) {
- let r = typeof e == "function" ? e : () => e;
- return new ae({
- ...g(this._def),
- innerType: this,
- defaultValue: r,
- typeName: m.ZodDefault,
- });
- }
- brand() {
- return new Ie({ typeName: m.ZodBranded, type: this, ...g(this._def) });
- }
- catch(e) {
- let r = typeof e == "function" ? e : () => e;
- return new ie({
- ...g(this._def),
- innerType: this,
- catchValue: r,
- typeName: m.ZodCatch,
- });
- }
- describe(e) {
- let r = this.constructor;
- return new r({ ...this._def, description: e });
- }
- pipe(e) {
- return Le.create(this, e);
- }
- readonly() {
- return oe.create(this);
- }
- isOptional() {
- return this.safeParse(void 0).success;
- }
- isNullable() {
- return this.safeParse(null).success;
- }
- },
- Mr = /^c[^\s-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]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
- qr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
- qt =
- "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
- Wr = new RegExp(`^${qt}$`);
- function Wt(t) {
- let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
- return (
- t.precision
- ? (e = `${e}\\.\\d{${t.precision}}`)
- : t.precision == null && (e = `${e}(\\.\\d+)?`),
- e
- );
- }
- function Hr(t) {
- return new RegExp(`^${Wt(t)}$`);
- }
- function Ht(t) {
- let e = `${qt}T${Wt(t)}`,
- r = [];
- return (
- r.push(t.local ? "Z?" : "Z"),
- t.offset && r.push("([+-]\\d{2}:?\\d{2})"),
- (e = `${e}(${r.join("|")})`),
- new RegExp(`^${e}$`)
- );
- }
- function Fr(t, e) {
- return !!(
- ((e === "v4" || !e) && Br.test(t)) ||
- ((e === "v6" || !e) && Ur.test(t))
- );
- }
- var U = class t extends b {
- _parse(e) {
- if (
- (this._def.coerce && (e.data = String(e.data)),
- this._getType(e) !== p.string)
- ) {
- let a = this._getOrReturnCtx(e);
- return (
- l(a, {
- code: d.invalid_type,
- expected: p.string,
- received: a.parsedType,
- }),
- v
- );
- }
- let n = new T(),
- s;
- for (let a of this._def.checks)
- if (a.kind === "min")
- e.data.length < a.value &&
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.too_small,
- minimum: a.value,
- type: "string",
- inclusive: !0,
- exact: !1,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "max")
- e.data.length > a.value &&
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.too_big,
- maximum: a.value,
- type: "string",
- inclusive: !0,
- exact: !1,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "length") {
- let i = e.data.length > a.value,
- o = e.data.length < a.value;
- (i || o) &&
- ((s = this._getOrReturnCtx(e, s)),
- i
- ? l(s, {
- code: d.too_big,
- maximum: a.value,
- type: "string",
- inclusive: !0,
- exact: !0,
- message: a.message,
- })
- : o &&
- l(s, {
- code: d.too_small,
- minimum: a.value,
- type: "string",
- inclusive: !0,
- exact: !0,
- message: a.message,
- }),
- n.dirty());
- } else if (a.kind === "email")
- Dr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "email",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "emoji")
- lt || (lt = new RegExp(zr, "u")),
- lt.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "emoji",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "uuid")
- Lr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "uuid",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "nanoid")
- $r.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "nanoid",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "cuid")
- Mr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "cuid",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "cuid2")
- Zr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "cuid2",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "ulid")
- Ir.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "ulid",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty());
- else if (a.kind === "url")
- try {
- new URL(e.data);
- } catch {
- (s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "url",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty();
- }
- else
- a.kind === "regex"
- ? ((a.regex.lastIndex = 0),
- a.regex.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "regex",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty()))
- : a.kind === "trim"
- ? (e.data = e.data.trim())
- : a.kind === "includes"
- ? e.data.includes(a.value, a.position) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: { includes: a.value, position: a.position },
- message: a.message,
- }),
- n.dirty())
- : a.kind === "toLowerCase"
- ? (e.data = e.data.toLowerCase())
- : a.kind === "toUpperCase"
- ? (e.data = e.data.toUpperCase())
- : a.kind === "startsWith"
- ? e.data.startsWith(a.value) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: { startsWith: a.value },
- message: a.message,
- }),
- n.dirty())
- : a.kind === "endsWith"
- ? e.data.endsWith(a.value) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: { endsWith: a.value },
- message: a.message,
- }),
- n.dirty())
- : a.kind === "datetime"
- ? Ht(a).test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: "datetime",
- message: a.message,
- }),
- n.dirty())
- : a.kind === "date"
- ? Wr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: "date",
- message: a.message,
- }),
- n.dirty())
- : a.kind === "time"
- ? Hr(a).test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.invalid_string,
- validation: "time",
- message: a.message,
- }),
- n.dirty())
- : a.kind === "duration"
- ? Vr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "duration",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty())
- : a.kind === "ip"
- ? Fr(e.data, a.version) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "ip",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty())
- : a.kind === "base64"
- ? qr.test(e.data) ||
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- validation: "base64",
- code: d.invalid_string,
- message: a.message,
- }),
- n.dirty())
- : x.assertNever(a);
- return { status: n.value, value: e.data };
- }
- _regex(e, r, n) {
- return this.refinement((s) => e.test(s), {
- validation: r,
- code: d.invalid_string,
- ...h.errToObj(n),
- });
- }
- _addCheck(e) {
- return new t({ ...this._def, checks: [...this._def.checks, e] });
- }
- email(e) {
- return this._addCheck({ kind: "email", ...h.errToObj(e) });
- }
- url(e) {
- return this._addCheck({ kind: "url", ...h.errToObj(e) });
- }
- emoji(e) {
- return this._addCheck({ kind: "emoji", ...h.errToObj(e) });
- }
- uuid(e) {
- return this._addCheck({ kind: "uuid", ...h.errToObj(e) });
- }
- nanoid(e) {
- return this._addCheck({ kind: "nanoid", ...h.errToObj(e) });
- }
- cuid(e) {
- return this._addCheck({ kind: "cuid", ...h.errToObj(e) });
- }
- cuid2(e) {
- return this._addCheck({ kind: "cuid2", ...h.errToObj(e) });
- }
- ulid(e) {
- return this._addCheck({ kind: "ulid", ...h.errToObj(e) });
- }
- base64(e) {
- return this._addCheck({ kind: "base64", ...h.errToObj(e) });
- }
- ip(e) {
- return this._addCheck({ kind: "ip", ...h.errToObj(e) });
- }
- datetime(e) {
- var r, n;
- return typeof e == "string"
- ? this._addCheck({
- kind: "datetime",
- precision: null,
- offset: !1,
- local: !1,
- message: e,
- })
- : this._addCheck({
- kind: "datetime",
- precision: typeof e?.precision > "u" ? null : e?.precision,
- offset: (r = e?.offset) !== null && r !== void 0 ? r : !1,
- local: (n = e?.local) !== null && n !== void 0 ? n : !1,
- ...h.errToObj(e?.message),
- });
- }
- date(e) {
- return this._addCheck({ kind: "date", message: e });
- }
- time(e) {
- return typeof e == "string"
- ? this._addCheck({ kind: "time", precision: null, message: e })
- : this._addCheck({
- kind: "time",
- precision: typeof e?.precision > "u" ? null : e?.precision,
- ...h.errToObj(e?.message),
- });
- }
- duration(e) {
- return this._addCheck({ kind: "duration", ...h.errToObj(e) });
- }
- regex(e, r) {
- return this._addCheck({ kind: "regex", regex: e, ...h.errToObj(r) });
- }
- includes(e, r) {
- return this._addCheck({
- kind: "includes",
- value: e,
- position: r?.position,
- ...h.errToObj(r?.message),
- });
- }
- startsWith(e, r) {
- return this._addCheck({ kind: "startsWith", value: e, ...h.errToObj(r) });
- }
- endsWith(e, r) {
- return this._addCheck({ kind: "endsWith", value: e, ...h.errToObj(r) });
- }
- min(e, r) {
- return this._addCheck({ kind: "min", value: e, ...h.errToObj(r) });
- }
- max(e, r) {
- return this._addCheck({ kind: "max", value: e, ...h.errToObj(r) });
- }
- length(e, r) {
- return this._addCheck({ kind: "length", value: e, ...h.errToObj(r) });
- }
- nonempty(e) {
- return this.min(1, h.errToObj(e));
- }
- trim() {
- return new t({
- ...this._def,
- checks: [...this._def.checks, { kind: "trim" }],
- });
- }
- toLowerCase() {
- return new t({
- ...this._def,
- checks: [...this._def.checks, { kind: "toLowerCase" }],
- });
- }
- toUpperCase() {
- return new t({
- ...this._def,
- checks: [...this._def.checks, { kind: "toUpperCase" }],
- });
- }
- get isDatetime() {
- return !!this._def.checks.find((e) => e.kind === "datetime");
- }
- get isDate() {
- return !!this._def.checks.find((e) => e.kind === "date");
- }
- get isTime() {
- return !!this._def.checks.find((e) => e.kind === "time");
- }
- get isDuration() {
- return !!this._def.checks.find((e) => e.kind === "duration");
- }
- get isEmail() {
- return !!this._def.checks.find((e) => e.kind === "email");
- }
- get isURL() {
- return !!this._def.checks.find((e) => e.kind === "url");
- }
- get isEmoji() {
- return !!this._def.checks.find((e) => e.kind === "emoji");
- }
- get isUUID() {
- return !!this._def.checks.find((e) => e.kind === "uuid");
- }
- get isNANOID() {
- return !!this._def.checks.find((e) => e.kind === "nanoid");
- }
- get isCUID() {
- return !!this._def.checks.find((e) => e.kind === "cuid");
- }
- get isCUID2() {
- return !!this._def.checks.find((e) => e.kind === "cuid2");
- }
- get isULID() {
- return !!this._def.checks.find((e) => e.kind === "ulid");
- }
- get isIP() {
- return !!this._def.checks.find((e) => e.kind === "ip");
- }
- get isBase64() {
- return !!this._def.checks.find((e) => e.kind === "base64");
- }
- get minLength() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "min" && (e === null || r.value > e) && (e = r.value);
- return e;
- }
- get maxLength() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "max" && (e === null || r.value < e) && (e = r.value);
- return e;
- }
- };
- U.create = (t) => {
- var e;
- return new U({
- checks: [],
- typeName: m.ZodString,
- coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
- ...g(t),
- });
- };
- function Jr(t, e) {
- let r = (t.toString().split(".")[1] || "").length,
- n = (e.toString().split(".")[1] || "").length,
- s = r > n ? r : n,
- a = parseInt(t.toFixed(s).replace(".", "")),
- i = parseInt(e.toFixed(s).replace(".", ""));
- return (a % i) / Math.pow(10, s);
- }
- var F = class t extends b {
- constructor() {
- super(...arguments),
- (this.min = this.gte),
- (this.max = this.lte),
- (this.step = this.multipleOf);
- }
- _parse(e) {
- if (
- (this._def.coerce && (e.data = Number(e.data)),
- this._getType(e) !== p.number)
- ) {
- let a = this._getOrReturnCtx(e);
- return (
- l(a, {
- code: d.invalid_type,
- expected: p.number,
- received: a.parsedType,
- }),
- v
- );
- }
- let n,
- s = new T();
- for (let a of this._def.checks)
- a.kind === "int"
- ? x.isInteger(e.data) ||
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.invalid_type,
- expected: "integer",
- received: "float",
- message: a.message,
- }),
- s.dirty())
- : a.kind === "min"
- ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.too_small,
- minimum: a.value,
- type: "number",
- inclusive: a.inclusive,
- exact: !1,
- message: a.message,
- }),
- s.dirty())
- : a.kind === "max"
- ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.too_big,
- maximum: a.value,
- type: "number",
- inclusive: a.inclusive,
- exact: !1,
- message: a.message,
- }),
- s.dirty())
- : a.kind === "multipleOf"
- ? Jr(e.data, a.value) !== 0 &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.not_multiple_of,
- multipleOf: a.value,
- message: a.message,
- }),
- s.dirty())
- : a.kind === "finite"
- ? Number.isFinite(e.data) ||
- ((n = this._getOrReturnCtx(e, n)),
- l(n, { code: d.not_finite, message: a.message }),
- s.dirty())
- : x.assertNever(a);
- return { status: s.value, value: e.data };
- }
- gte(e, r) {
- return this.setLimit("min", e, !0, h.toString(r));
- }
- gt(e, r) {
- return this.setLimit("min", e, !1, h.toString(r));
- }
- lte(e, r) {
- return this.setLimit("max", e, !0, h.toString(r));
- }
- lt(e, r) {
- return this.setLimit("max", e, !1, h.toString(r));
- }
- setLimit(e, r, n, s) {
- return new t({
- ...this._def,
- checks: [
- ...this._def.checks,
- { kind: e, value: r, inclusive: n, message: h.toString(s) },
- ],
- });
- }
- _addCheck(e) {
- return new t({ ...this._def, checks: [...this._def.checks, e] });
- }
- int(e) {
- return this._addCheck({ kind: "int", message: h.toString(e) });
- }
- positive(e) {
- return this._addCheck({
- kind: "min",
- value: 0,
- inclusive: !1,
- message: h.toString(e),
- });
- }
- negative(e) {
- return this._addCheck({
- kind: "max",
- value: 0,
- inclusive: !1,
- message: h.toString(e),
- });
- }
- nonpositive(e) {
- return this._addCheck({
- kind: "max",
- value: 0,
- inclusive: !0,
- message: h.toString(e),
- });
- }
- nonnegative(e) {
- return this._addCheck({
- kind: "min",
- value: 0,
- inclusive: !0,
- message: h.toString(e),
- });
- }
- multipleOf(e, r) {
- return this._addCheck({
- kind: "multipleOf",
- value: e,
- message: h.toString(r),
- });
- }
- finite(e) {
- return this._addCheck({ kind: "finite", message: h.toString(e) });
- }
- safe(e) {
- return this._addCheck({
- kind: "min",
- inclusive: !0,
- value: Number.MIN_SAFE_INTEGER,
- message: h.toString(e),
- })._addCheck({
- kind: "max",
- inclusive: !0,
- value: Number.MAX_SAFE_INTEGER,
- message: h.toString(e),
- });
- }
- get minValue() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "min" && (e === null || r.value > e) && (e = r.value);
- return e;
- }
- get maxValue() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "max" && (e === null || r.value < e) && (e = r.value);
- return e;
- }
- get isInt() {
- return !!this._def.checks.find(
- (e) =>
- e.kind === "int" || (e.kind === "multipleOf" && x.isInteger(e.value)),
- );
- }
- get isFinite() {
- let e = null,
- r = null;
- for (let n of this._def.checks) {
- if (n.kind === "finite" || n.kind === "int" || n.kind === "multipleOf")
- return !0;
- n.kind === "min"
- ? (r === null || n.value > r) && (r = n.value)
- : n.kind === "max" && (e === null || n.value < e) && (e = n.value);
- }
- return Number.isFinite(r) && Number.isFinite(e);
- }
- };
- F.create = (t) =>
- new F({
- checks: [],
- typeName: m.ZodNumber,
- coerce: t?.coerce || !1,
- ...g(t),
- });
- var J = class t extends b {
- constructor() {
- super(...arguments), (this.min = this.gte), (this.max = this.lte);
- }
- _parse(e) {
- if (
- (this._def.coerce && (e.data = BigInt(e.data)),
- this._getType(e) !== p.bigint)
- ) {
- let a = this._getOrReturnCtx(e);
- return (
- l(a, {
- code: d.invalid_type,
- expected: p.bigint,
- received: a.parsedType,
- }),
- v
- );
- }
- let n,
- s = new T();
- for (let a of this._def.checks)
- a.kind === "min"
- ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.too_small,
- type: "bigint",
- minimum: a.value,
- inclusive: a.inclusive,
- message: a.message,
- }),
- s.dirty())
- : a.kind === "max"
- ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.too_big,
- type: "bigint",
- maximum: a.value,
- inclusive: a.inclusive,
- message: a.message,
- }),
- s.dirty())
- : a.kind === "multipleOf"
- ? e.data % a.value !== BigInt(0) &&
- ((n = this._getOrReturnCtx(e, n)),
- l(n, {
- code: d.not_multiple_of,
- multipleOf: a.value,
- message: a.message,
- }),
- s.dirty())
- : x.assertNever(a);
- return { status: s.value, value: e.data };
- }
- gte(e, r) {
- return this.setLimit("min", e, !0, h.toString(r));
- }
- gt(e, r) {
- return this.setLimit("min", e, !1, h.toString(r));
- }
- lte(e, r) {
- return this.setLimit("max", e, !0, h.toString(r));
- }
- lt(e, r) {
- return this.setLimit("max", e, !1, h.toString(r));
- }
- setLimit(e, r, n, s) {
- return new t({
- ...this._def,
- checks: [
- ...this._def.checks,
- { kind: e, value: r, inclusive: n, message: h.toString(s) },
- ],
- });
- }
- _addCheck(e) {
- return new t({ ...this._def, checks: [...this._def.checks, e] });
- }
- positive(e) {
- return this._addCheck({
- kind: "min",
- value: BigInt(0),
- inclusive: !1,
- message: h.toString(e),
- });
- }
- negative(e) {
- return this._addCheck({
- kind: "max",
- value: BigInt(0),
- inclusive: !1,
- message: h.toString(e),
- });
- }
- nonpositive(e) {
- return this._addCheck({
- kind: "max",
- value: BigInt(0),
- inclusive: !0,
- message: h.toString(e),
- });
- }
- nonnegative(e) {
- return this._addCheck({
- kind: "min",
- value: BigInt(0),
- inclusive: !0,
- message: h.toString(e),
- });
- }
- multipleOf(e, r) {
- return this._addCheck({
- kind: "multipleOf",
- value: e,
- message: h.toString(r),
- });
- }
- get minValue() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "min" && (e === null || r.value > e) && (e = r.value);
- return e;
- }
- get maxValue() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "max" && (e === null || r.value < e) && (e = r.value);
- return e;
- }
- };
- J.create = (t) => {
- var e;
- return new J({
- checks: [],
- typeName: m.ZodBigInt,
- coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
- ...g(t),
- });
- };
- var Y = class extends b {
- _parse(e) {
- if (
- (this._def.coerce && (e.data = !!e.data),
- this._getType(e) !== p.boolean)
- ) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.boolean,
- received: n.parsedType,
- }),
- v
- );
- }
- return R(e.data);
- }
- };
- Y.create = (t) =>
- new Y({ typeName: m.ZodBoolean, coerce: t?.coerce || !1, ...g(t) });
- var G = class t extends b {
- _parse(e) {
- if (
- (this._def.coerce && (e.data = new Date(e.data)),
- this._getType(e) !== p.date)
- ) {
- let a = this._getOrReturnCtx(e);
- return (
- l(a, {
- code: d.invalid_type,
- expected: p.date,
- received: a.parsedType,
- }),
- v
- );
- }
- if (isNaN(e.data.getTime())) {
- let a = this._getOrReturnCtx(e);
- return l(a, { code: d.invalid_date }), v;
- }
- let n = new T(),
- s;
- for (let a of this._def.checks)
- a.kind === "min"
- ? e.data.getTime() < a.value &&
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.too_small,
- message: a.message,
- inclusive: !0,
- exact: !1,
- minimum: a.value,
- type: "date",
- }),
- n.dirty())
- : a.kind === "max"
- ? e.data.getTime() > a.value &&
- ((s = this._getOrReturnCtx(e, s)),
- l(s, {
- code: d.too_big,
- message: a.message,
- inclusive: !0,
- exact: !1,
- maximum: a.value,
- type: "date",
- }),
- n.dirty())
- : x.assertNever(a);
- return { status: n.value, value: new Date(e.data.getTime()) };
- }
- _addCheck(e) {
- return new t({ ...this._def, checks: [...this._def.checks, e] });
- }
- min(e, r) {
- return this._addCheck({
- kind: "min",
- value: e.getTime(),
- message: h.toString(r),
- });
- }
- max(e, r) {
- return this._addCheck({
- kind: "max",
- value: e.getTime(),
- message: h.toString(r),
- });
- }
- get minDate() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "min" && (e === null || r.value > e) && (e = r.value);
- return e != null ? new Date(e) : null;
- }
- get maxDate() {
- let e = null;
- for (let r of this._def.checks)
- r.kind === "max" && (e === null || r.value < e) && (e = r.value);
- return e != null ? new Date(e) : null;
- }
- };
- G.create = (t) =>
- new G({
- checks: [],
- coerce: t?.coerce || !1,
- typeName: m.ZodDate,
- ...g(t),
- });
- var fe = class extends b {
- _parse(e) {
- if (this._getType(e) !== p.symbol) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.symbol,
- received: n.parsedType,
- }),
- v
- );
- }
- return R(e.data);
- }
- };
- fe.create = (t) => new fe({ typeName: m.ZodSymbol, ...g(t) });
- var K = class extends b {
- _parse(e) {
- if (this._getType(e) !== p.undefined) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.undefined,
- received: n.parsedType,
- }),
- v
- );
- }
- return R(e.data);
- }
- };
- K.create = (t) => new K({ typeName: m.ZodUndefined, ...g(t) });
- var X = class extends b {
- _parse(e) {
- if (this._getType(e) !== p.null) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.null,
- received: n.parsedType,
- }),
- v
- );
- }
- return R(e.data);
- }
- };
- X.create = (t) => new X({ typeName: m.ZodNull, ...g(t) });
- var q = class extends b {
- constructor() {
- super(...arguments), (this._any = !0);
- }
- _parse(e) {
- return R(e.data);
- }
- };
- q.create = (t) => new q({ typeName: m.ZodAny, ...g(t) });
- var V = class extends b {
- constructor() {
- super(...arguments), (this._unknown = !0);
- }
- _parse(e) {
- return R(e.data);
- }
- };
- V.create = (t) => new V({ typeName: m.ZodUnknown, ...g(t) });
- var Z = class extends b {
- _parse(e) {
- let r = this._getOrReturnCtx(e);
- return (
- l(r, {
- code: d.invalid_type,
- expected: p.never,
- received: r.parsedType,
- }),
- v
- );
- }
- };
- Z.create = (t) => new Z({ typeName: m.ZodNever, ...g(t) });
- var pe = class extends b {
- _parse(e) {
- if (this._getType(e) !== p.undefined) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.void,
- received: n.parsedType,
- }),
- v
- );
- }
- return R(e.data);
- }
- };
- pe.create = (t) => new pe({ typeName: m.ZodVoid, ...g(t) });
- var D = class t extends b {
- _parse(e) {
- let { ctx: r, status: n } = this._processInputParams(e),
- s = this._def;
- if (r.parsedType !== p.array)
- return (
- l(r, {
- code: d.invalid_type,
- expected: p.array,
- received: r.parsedType,
- }),
- v
- );
- if (s.exactLength !== null) {
- let i = r.data.length > s.exactLength.value,
- o = r.data.length < s.exactLength.value;
- (i || o) &&
- (l(r, {
- code: i ? d.too_big : d.too_small,
- minimum: o ? s.exactLength.value : void 0,
- maximum: i ? s.exactLength.value : void 0,
- type: "array",
- inclusive: !0,
- exact: !0,
- message: s.exactLength.message,
- }),
- n.dirty());
- }
- if (
- (s.minLength !== null &&
- r.data.length < s.minLength.value &&
- (l(r, {
- code: d.too_small,
- minimum: s.minLength.value,
- type: "array",
- inclusive: !0,
- exact: !1,
- message: s.minLength.message,
- }),
- n.dirty()),
- s.maxLength !== null &&
- r.data.length > s.maxLength.value &&
- (l(r, {
- code: d.too_big,
- maximum: s.maxLength.value,
- type: "array",
- inclusive: !0,
- exact: !1,
- message: s.maxLength.message,
- }),
- n.dirty()),
- r.common.async)
- )
- return Promise.all(
- [...r.data].map((i, o) => s.type._parseAsync(new M(r, i, r.path, o))),
- ).then((i) => T.mergeArray(n, i));
- let a = [...r.data].map((i, o) =>
- s.type._parseSync(new M(r, i, r.path, o)),
- );
- return T.mergeArray(n, a);
- }
- get element() {
- return this._def.type;
- }
- min(e, r) {
- return new t({
- ...this._def,
- minLength: { value: e, message: h.toString(r) },
- });
- }
- max(e, r) {
- return new t({
- ...this._def,
- maxLength: { value: e, message: h.toString(r) },
- });
- }
- length(e, r) {
- return new t({
- ...this._def,
- exactLength: { value: e, message: h.toString(r) },
- });
- }
- nonempty(e) {
- return this.min(1, e);
- }
- };
- D.create = (t, e) =>
- new D({
- type: t,
- minLength: null,
- maxLength: null,
- exactLength: null,
- typeName: m.ZodArray,
- ...g(e),
- });
- function ue(t) {
- if (t instanceof P) {
- let e = {};
- for (let r in t.shape) {
- let n = t.shape[r];
- e[r] = A.create(ue(n));
- }
- return new P({ ...t._def, shape: () => e });
- } else
- return t instanceof D
- ? new D({ ...t._def, type: ue(t.element) })
- : t instanceof A
- ? A.create(ue(t.unwrap()))
- : t instanceof L
- ? L.create(ue(t.unwrap()))
- : t instanceof I
- ? I.create(t.items.map((e) => ue(e)))
- : t;
- }
- var P = class t extends b {
- constructor() {
- super(...arguments),
- (this._cached = null),
- (this.nonstrict = this.passthrough),
- (this.augment = this.extend);
- }
- _getCached() {
- if (this._cached !== null) return this._cached;
- let e = this._def.shape(),
- r = x.objectKeys(e);
- return (this._cached = { shape: e, keys: r });
- }
- _parse(e) {
- if (this._getType(e) !== p.object) {
- let u = this._getOrReturnCtx(e);
- return (
- l(u, {
- code: d.invalid_type,
- expected: p.object,
- received: u.parsedType,
- }),
- v
- );
- }
- let { status: n, ctx: s } = this._processInputParams(e),
- { shape: a, keys: i } = this._getCached(),
- o = [];
- if (
- !(this._def.catchall instanceof Z && this._def.unknownKeys === "strip")
- )
- for (let u in s.data) i.includes(u) || o.push(u);
- let c = [];
- for (let u of i) {
- let f = a[u],
- y = s.data[u];
- c.push({
- key: { status: "valid", value: u },
- value: f._parse(new M(s, y, s.path, u)),
- alwaysSet: u in s.data,
- });
- }
- if (this._def.catchall instanceof Z) {
- let u = this._def.unknownKeys;
- if (u === "passthrough")
- for (let f of o)
- c.push({
- key: { status: "valid", value: f },
- value: { status: "valid", value: s.data[f] },
- });
- else if (u === "strict")
- o.length > 0 &&
- (l(s, { code: d.unrecognized_keys, keys: o }), n.dirty());
- else if (u !== "strip")
- throw new Error(
- "Internal ZodObject error: invalid unknownKeys value.",
- );
- } else {
- let u = this._def.catchall;
- for (let f of o) {
- let y = s.data[f];
- c.push({
- key: { status: "valid", value: f },
- value: u._parse(new M(s, y, s.path, f)),
- alwaysSet: f in s.data,
- });
- }
- }
- return s.common.async
- ? Promise.resolve()
- .then(async () => {
- let u = [];
- for (let f of c) {
- let y = await f.key,
- w = await f.value;
- u.push({ key: y, value: w, alwaysSet: f.alwaysSet });
- }
- return u;
- })
- .then((u) => T.mergeObjectSync(n, u))
- : T.mergeObjectSync(n, c);
- }
- get shape() {
- return this._def.shape();
- }
- strict(e) {
- return (
- h.errToObj,
- new t({
- ...this._def,
- unknownKeys: "strict",
- ...(e !== void 0
- ? {
- errorMap: (r, n) => {
- var s, a, i, o;
- let c =
- (i =
- (a = (s = this._def).errorMap) === null || a === void 0
- ? void 0
- : a.call(s, r, n).message) !== null && i !== void 0
- ? i
- : n.defaultError;
- return r.code === "unrecognized_keys"
- ? {
- message:
- (o = h.errToObj(e).message) !== null && o !== void 0
- ? o
- : c,
- }
- : { message: c };
- },
- }
- : {}),
- })
- );
- }
- strip() {
- return new t({ ...this._def, unknownKeys: "strip" });
- }
- passthrough() {
- return new t({ ...this._def, unknownKeys: "passthrough" });
- }
- extend(e) {
- return new t({
- ...this._def,
- shape: () => ({ ...this._def.shape(), ...e }),
- });
- }
- merge(e) {
- return new t({
- unknownKeys: e._def.unknownKeys,
- catchall: e._def.catchall,
- shape: () => ({ ...this._def.shape(), ...e._def.shape() }),
- typeName: m.ZodObject,
- });
- }
- setKey(e, r) {
- return this.augment({ [e]: r });
- }
- catchall(e) {
- return new t({ ...this._def, catchall: e });
- }
- pick(e) {
- let r = {};
- return (
- x.objectKeys(e).forEach((n) => {
- e[n] && this.shape[n] && (r[n] = this.shape[n]);
- }),
- new t({ ...this._def, shape: () => r })
- );
- }
- omit(e) {
- let r = {};
- return (
- x.objectKeys(this.shape).forEach((n) => {
- e[n] || (r[n] = this.shape[n]);
- }),
- new t({ ...this._def, shape: () => r })
- );
- }
- deepPartial() {
- return ue(this);
- }
- partial(e) {
- let r = {};
- return (
- x.objectKeys(this.shape).forEach((n) => {
- let s = this.shape[n];
- e && !e[n] ? (r[n] = s) : (r[n] = s.optional());
- }),
- new t({ ...this._def, shape: () => r })
- );
- }
- required(e) {
- let r = {};
- return (
- x.objectKeys(this.shape).forEach((n) => {
- if (e && !e[n]) r[n] = this.shape[n];
- else {
- let a = this.shape[n];
- for (; a instanceof A; ) a = a._def.innerType;
- r[n] = a;
- }
- }),
- new t({ ...this._def, shape: () => r })
- );
- }
- keyof() {
- return Ft(x.objectKeys(this.shape));
- }
- };
- P.create = (t, e) =>
- new P({
- shape: () => t,
- unknownKeys: "strip",
- catchall: Z.create(),
- typeName: m.ZodObject,
- ...g(e),
- });
- P.strictCreate = (t, e) =>
- new P({
- shape: () => t,
- unknownKeys: "strict",
- catchall: Z.create(),
- typeName: m.ZodObject,
- ...g(e),
- });
- P.lazycreate = (t, e) =>
- new P({
- shape: t,
- unknownKeys: "strip",
- catchall: Z.create(),
- typeName: m.ZodObject,
- ...g(e),
- });
- var Q = class extends b {
- _parse(e) {
- let { ctx: r } = this._processInputParams(e),
- n = this._def.options;
- function s(a) {
- for (let o of a) if (o.result.status === "valid") return o.result;
- for (let o of a)
- if (o.result.status === "dirty")
- return r.common.issues.push(...o.ctx.common.issues), o.result;
- let i = a.map((o) => new C(o.ctx.common.issues));
- return l(r, { code: d.invalid_union, unionErrors: i }), v;
- }
- if (r.common.async)
- return Promise.all(
- n.map(async (a) => {
- let i = { ...r, common: { ...r.common, issues: [] }, parent: null };
- return {
- result: await a._parseAsync({
- data: r.data,
- path: r.path,
- parent: i,
- }),
- ctx: i,
- };
- }),
- ).then(s);
- {
- let a,
- i = [];
- for (let c of n) {
- let u = { ...r, common: { ...r.common, issues: [] }, parent: null },
- f = c._parseSync({ data: r.data, path: r.path, parent: u });
- if (f.status === "valid") return f;
- f.status === "dirty" && !a && (a = { result: f, ctx: u }),
- u.common.issues.length && i.push(u.common.issues);
- }
- if (a) return r.common.issues.push(...a.ctx.common.issues), a.result;
- let o = i.map((c) => new C(c));
- return l(r, { code: d.invalid_union, unionErrors: o }), v;
- }
- }
- get options() {
- return this._def.options;
- }
- };
- Q.create = (t, e) => new Q({ options: t, typeName: m.ZodUnion, ...g(e) });
- var $ = (t) =>
- t instanceof te
- ? $(t.schema)
- : t instanceof N
- ? $(t.innerType())
- : t instanceof re
- ? [t.value]
- : t instanceof ne
- ? t.options
- : t instanceof se
- ? x.objectValues(t.enum)
- : t instanceof ae
- ? $(t._def.innerType)
- : t instanceof K
- ? [void 0]
- : t instanceof X
- ? [null]
- : t instanceof A
- ? [void 0, ...$(t.unwrap())]
- : t instanceof L
- ? [null, ...$(t.unwrap())]
- : t instanceof Ie || t instanceof oe
- ? $(t.unwrap())
- : t instanceof ie
- ? $(t._def.innerType)
- : [],
- rt = class t extends b {
- _parse(e) {
- let { ctx: r } = this._processInputParams(e);
- if (r.parsedType !== p.object)
- return (
- l(r, {
- code: d.invalid_type,
- expected: p.object,
- received: r.parsedType,
- }),
- v
- );
- let n = this.discriminator,
- s = r.data[n],
- a = this.optionsMap.get(s);
- return a
- ? r.common.async
- ? a._parseAsync({ data: r.data, path: r.path, parent: r })
- : a._parseSync({ data: r.data, path: r.path, parent: r })
- : (l(r, {
- code: d.invalid_union_discriminator,
- options: Array.from(this.optionsMap.keys()),
- path: [n],
- }),
- v);
- }
- get discriminator() {
- return this._def.discriminator;
- }
- get options() {
- return this._def.options;
- }
- get optionsMap() {
- return this._def.optionsMap;
- }
- static create(e, r, n) {
- let s = new Map();
- for (let a of r) {
- let i = $(a.shape[e]);
- if (!i.length)
- throw new Error(
- `A discriminator value for key \`${e}\` could not be extracted from all schema options`,
- );
- for (let o of i) {
- if (s.has(o))
- throw new Error(
- `Discriminator property ${String(e)} has duplicate value ${String(o)}`,
- );
- s.set(o, a);
- }
- }
- return new t({
- typeName: m.ZodDiscriminatedUnion,
- discriminator: e,
- options: r,
- optionsMap: s,
- ...g(n),
- });
- }
- };
- function mt(t, e) {
- let r = B(t),
- n = B(e);
- if (t === e) return { valid: !0, data: t };
- if (r === p.object && n === p.object) {
- let s = x.objectKeys(e),
- a = x.objectKeys(t).filter((o) => s.indexOf(o) !== -1),
- i = { ...t, ...e };
- for (let o of a) {
- let c = mt(t[o], e[o]);
- if (!c.valid) return { valid: !1 };
- i[o] = c.data;
- }
- return { valid: !0, data: i };
- } else if (r === p.array && n === p.array) {
- if (t.length !== e.length) return { valid: !1 };
- let s = [];
- for (let a = 0; a < t.length; a++) {
- let i = t[a],
- o = e[a],
- c = mt(i, o);
- if (!c.valid) return { valid: !1 };
- s.push(c.data);
- }
- return { valid: !0, data: s };
- } else
- return r === p.date && n === p.date && +t == +e
- ? { valid: !0, data: t }
- : { valid: !1 };
- }
- var ee = class extends b {
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e),
- s = (a, i) => {
- if (pt(a) || pt(i)) return v;
- let o = mt(a.value, i.value);
- return o.valid
- ? ((ht(a) || ht(i)) && r.dirty(),
- { status: r.value, value: o.data })
- : (l(n, { code: d.invalid_intersection_types }), v);
- };
- return n.common.async
- ? Promise.all([
- this._def.left._parseAsync({
- data: n.data,
- path: n.path,
- parent: n,
- }),
- this._def.right._parseAsync({
- data: n.data,
- path: n.path,
- parent: n,
- }),
- ]).then(([a, i]) => s(a, i))
- : s(
- this._def.left._parseSync({
- data: n.data,
- path: n.path,
- parent: n,
- }),
- this._def.right._parseSync({
- data: n.data,
- path: n.path,
- parent: n,
- }),
- );
- }
- };
- ee.create = (t, e, r) =>
- new ee({ left: t, right: e, typeName: m.ZodIntersection, ...g(r) });
- var I = class t extends b {
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e);
- if (n.parsedType !== p.array)
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.array,
- received: n.parsedType,
- }),
- v
- );
- if (n.data.length < this._def.items.length)
- return (
- l(n, {
- code: d.too_small,
- minimum: this._def.items.length,
- inclusive: !0,
- exact: !1,
- type: "array",
- }),
- v
- );
- !this._def.rest &&
- n.data.length > this._def.items.length &&
- (l(n, {
- code: d.too_big,
- maximum: this._def.items.length,
- inclusive: !0,
- exact: !1,
- type: "array",
- }),
- r.dirty());
- let a = [...n.data]
- .map((i, o) => {
- let c = this._def.items[o] || this._def.rest;
- return c ? c._parse(new M(n, i, n.path, o)) : null;
- })
- .filter((i) => !!i);
- return n.common.async
- ? Promise.all(a).then((i) => T.mergeArray(r, i))
- : T.mergeArray(r, a);
- }
- get items() {
- return this._def.items;
- }
- rest(e) {
- return new t({ ...this._def, rest: e });
- }
- };
- I.create = (t, e) => {
- if (!Array.isArray(t))
- throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
- return new I({ items: t, typeName: m.ZodTuple, rest: null, ...g(e) });
- };
- var nt = class t extends b {
- get keySchema() {
- return this._def.keyType;
- }
- get valueSchema() {
- return this._def.valueType;
- }
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e);
- if (n.parsedType !== p.object)
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.object,
- received: n.parsedType,
- }),
- v
- );
- let s = [],
- a = this._def.keyType,
- i = this._def.valueType;
- for (let o in n.data)
- s.push({
- key: a._parse(new M(n, o, n.path, o)),
- value: i._parse(new M(n, n.data[o], n.path, o)),
- alwaysSet: o in n.data,
- });
- return n.common.async
- ? T.mergeObjectAsync(r, s)
- : T.mergeObjectSync(r, s);
- }
- get element() {
- return this._def.valueType;
- }
- static create(e, r, n) {
- return r instanceof b
- ? new t({ keyType: e, valueType: r, typeName: m.ZodRecord, ...g(n) })
- : new t({
- keyType: U.create(),
- valueType: e,
- typeName: m.ZodRecord,
- ...g(r),
- });
- }
- },
- he = class extends b {
- get keySchema() {
- return this._def.keyType;
- }
- get valueSchema() {
- return this._def.valueType;
- }
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e);
- if (n.parsedType !== p.map)
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.map,
- received: n.parsedType,
- }),
- v
- );
- let s = this._def.keyType,
- a = this._def.valueType,
- i = [...n.data.entries()].map(([o, c], u) => ({
- key: s._parse(new M(n, o, n.path, [u, "key"])),
- value: a._parse(new M(n, c, n.path, [u, "value"])),
- }));
- if (n.common.async) {
- let o = new Map();
- return Promise.resolve().then(async () => {
- for (let c of i) {
- let u = await c.key,
- f = await c.value;
- if (u.status === "aborted" || f.status === "aborted") return v;
- (u.status === "dirty" || f.status === "dirty") && r.dirty(),
- o.set(u.value, f.value);
- }
- return { status: r.value, value: o };
- });
- } else {
- let o = new Map();
- for (let c of i) {
- let u = c.key,
- f = c.value;
- if (u.status === "aborted" || f.status === "aborted") return v;
- (u.status === "dirty" || f.status === "dirty") && r.dirty(),
- o.set(u.value, f.value);
- }
- return { status: r.value, value: o };
- }
- }
- };
- he.create = (t, e, r) =>
- new he({ valueType: e, keyType: t, typeName: m.ZodMap, ...g(r) });
- var me = class t extends b {
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e);
- if (n.parsedType !== p.set)
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.set,
- received: n.parsedType,
- }),
- v
- );
- let s = this._def;
- s.minSize !== null &&
- n.data.size < s.minSize.value &&
- (l(n, {
- code: d.too_small,
- minimum: s.minSize.value,
- type: "set",
- inclusive: !0,
- exact: !1,
- message: s.minSize.message,
- }),
- r.dirty()),
- s.maxSize !== null &&
- n.data.size > s.maxSize.value &&
- (l(n, {
- code: d.too_big,
- maximum: s.maxSize.value,
- type: "set",
- inclusive: !0,
- exact: !1,
- message: s.maxSize.message,
- }),
- r.dirty());
- let a = this._def.valueType;
- function i(c) {
- let u = new Set();
- for (let f of c) {
- if (f.status === "aborted") return v;
- f.status === "dirty" && r.dirty(), u.add(f.value);
- }
- return { status: r.value, value: u };
- }
- let o = [...n.data.values()].map((c, u) =>
- a._parse(new M(n, c, n.path, u)),
- );
- return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
- }
- min(e, r) {
- return new t({
- ...this._def,
- minSize: { value: e, message: h.toString(r) },
- });
- }
- max(e, r) {
- return new t({
- ...this._def,
- maxSize: { value: e, message: h.toString(r) },
- });
- }
- size(e, r) {
- return this.min(e, r).max(e, r);
- }
- nonempty(e) {
- return this.min(1, e);
- }
- };
- me.create = (t, e) =>
- new me({
- valueType: t,
- minSize: null,
- maxSize: null,
- typeName: m.ZodSet,
- ...g(e),
- });
- var st = class t extends b {
- constructor() {
- super(...arguments), (this.validate = this.implement);
- }
- _parse(e) {
- let { ctx: r } = this._processInputParams(e);
- if (r.parsedType !== p.function)
- return (
- l(r, {
- code: d.invalid_type,
- expected: p.function,
- received: r.parsedType,
- }),
- v
- );
- function n(o, c) {
- return et({
- data: o,
- path: r.path,
- errorMaps: [
- r.common.contextualErrorMap,
- r.schemaErrorMap,
- Qe(),
- le,
- ].filter((u) => !!u),
- issueData: { code: d.invalid_arguments, argumentsError: c },
- });
- }
- function s(o, c) {
- return et({
- data: o,
- path: r.path,
- errorMaps: [
- r.common.contextualErrorMap,
- r.schemaErrorMap,
- Qe(),
- le,
- ].filter((u) => !!u),
- issueData: { code: d.invalid_return_type, returnTypeError: c },
- });
- }
- let a = { errorMap: r.common.contextualErrorMap },
- i = r.data;
- if (this._def.returns instanceof W) {
- let o = this;
- return R(async function (...c) {
- let u = new C([]),
- f = await o._def.args.parseAsync(c, a).catch((E) => {
- throw (u.addIssue(n(c, E)), u);
- }),
- y = await Reflect.apply(i, this, f);
- return await o._def.returns._def.type
- .parseAsync(y, a)
- .catch((E) => {
- throw (u.addIssue(s(y, E)), u);
- });
- });
- } else {
- let o = this;
- return R(function (...c) {
- let u = o._def.args.safeParse(c, a);
- if (!u.success) throw new C([n(c, u.error)]);
- let f = Reflect.apply(i, this, u.data),
- y = o._def.returns.safeParse(f, a);
- if (!y.success) throw new C([s(f, y.error)]);
- return y.data;
- });
- }
- }
- parameters() {
- return this._def.args;
- }
- returnType() {
- return this._def.returns;
- }
- args(...e) {
- return new t({ ...this._def, args: I.create(e).rest(V.create()) });
- }
- returns(e) {
- return new t({ ...this._def, returns: e });
- }
- implement(e) {
- return this.parse(e);
- }
- strictImplement(e) {
- return this.parse(e);
- }
- static create(e, r, n) {
- return new t({
- args: e || I.create([]).rest(V.create()),
- returns: r || V.create(),
- typeName: m.ZodFunction,
- ...g(n),
- });
- }
- },
- te = class extends b {
- get schema() {
- return this._def.getter();
- }
- _parse(e) {
- let { ctx: r } = this._processInputParams(e);
- return this._def
- .getter()
- ._parse({ data: r.data, path: r.path, parent: r });
- }
- };
- te.create = (t, e) => new te({ getter: t, typeName: m.ZodLazy, ...g(e) });
- var re = class extends b {
- _parse(e) {
- if (e.data !== this._def.value) {
- let r = this._getOrReturnCtx(e);
- return (
- l(r, {
- received: r.data,
- code: d.invalid_literal,
- expected: this._def.value,
- }),
- v
- );
- }
- return { status: "valid", value: e.data };
- }
- get value() {
- return this._def.value;
- }
- };
- re.create = (t, e) => new re({ value: t, typeName: m.ZodLiteral, ...g(e) });
- function Ft(t, e) {
- return new ne({ values: t, typeName: m.ZodEnum, ...g(e) });
- }
- var ne = class t extends b {
- constructor() {
- super(...arguments), Ne.set(this, void 0);
- }
- _parse(e) {
- if (typeof e.data != "string") {
- let r = this._getOrReturnCtx(e),
- n = this._def.values;
- return (
- l(r, {
- expected: x.joinValues(n),
- received: r.parsedType,
- code: d.invalid_type,
- }),
- v
- );
- }
- if (
- (tt(this, Ne, "f") || Ut(this, Ne, new Set(this._def.values), "f"),
- !tt(this, Ne, "f").has(e.data))
- ) {
- let r = this._getOrReturnCtx(e),
- n = this._def.values;
- return (
- l(r, { received: r.data, code: d.invalid_enum_value, options: n }), v
- );
- }
- return R(e.data);
- }
- get options() {
- return this._def.values;
- }
- get enum() {
- let e = {};
- for (let r of this._def.values) e[r] = r;
- return e;
- }
- get Values() {
- let e = {};
- for (let r of this._def.values) e[r] = r;
- return e;
- }
- get Enum() {
- let e = {};
- for (let r of this._def.values) e[r] = r;
- return e;
- }
- extract(e, r = this._def) {
- return t.create(e, { ...this._def, ...r });
- }
- exclude(e, r = this._def) {
- return t.create(
- this.options.filter((n) => !e.includes(n)),
- { ...this._def, ...r },
- );
- }
- };
- Ne = new WeakMap();
- ne.create = Ft;
- var se = class extends b {
- constructor() {
- super(...arguments), Ae.set(this, void 0);
- }
- _parse(e) {
- let r = x.getValidEnumValues(this._def.values),
- n = this._getOrReturnCtx(e);
- if (n.parsedType !== p.string && n.parsedType !== p.number) {
- let s = x.objectValues(r);
- return (
- l(n, {
- expected: x.joinValues(s),
- received: n.parsedType,
- code: d.invalid_type,
- }),
- v
- );
- }
- if (
- (tt(this, Ae, "f") ||
- Ut(this, Ae, new Set(x.getValidEnumValues(this._def.values)), "f"),
- !tt(this, Ae, "f").has(e.data))
- ) {
- let s = x.objectValues(r);
- return (
- l(n, { received: n.data, code: d.invalid_enum_value, options: s }), v
- );
- }
- return R(e.data);
- }
- get enum() {
- return this._def.values;
- }
- };
- Ae = new WeakMap();
- se.create = (t, e) =>
- new se({ values: t, typeName: m.ZodNativeEnum, ...g(e) });
- var W = class extends b {
- unwrap() {
- return this._def.type;
- }
- _parse(e) {
- let { ctx: r } = this._processInputParams(e);
- if (r.parsedType !== p.promise && r.common.async === !1)
- return (
- l(r, {
- code: d.invalid_type,
- expected: p.promise,
- received: r.parsedType,
- }),
- v
- );
- let n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
- return R(
- n.then((s) =>
- this._def.type.parseAsync(s, {
- path: r.path,
- errorMap: r.common.contextualErrorMap,
- }),
- ),
- );
- }
- };
- W.create = (t, e) => new W({ type: t, typeName: m.ZodPromise, ...g(e) });
- var N = class extends b {
- innerType() {
- return this._def.schema;
- }
- sourceType() {
- return this._def.schema._def.typeName === m.ZodEffects
- ? this._def.schema.sourceType()
- : this._def.schema;
- }
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e),
- s = this._def.effect || null,
- a = {
- addIssue: (i) => {
- l(n, i), i.fatal ? r.abort() : r.dirty();
- },
- get path() {
- return n.path;
- },
- };
- if (((a.addIssue = a.addIssue.bind(a)), s.type === "preprocess")) {
- let i = s.transform(n.data, a);
- if (n.common.async)
- return Promise.resolve(i).then(async (o) => {
- if (r.value === "aborted") return v;
- let c = await this._def.schema._parseAsync({
- data: o,
- path: n.path,
- parent: n,
- });
- return c.status === "aborted"
- ? v
- : c.status === "dirty" || r.value === "dirty"
- ? de(c.value)
- : c;
- });
- {
- if (r.value === "aborted") return v;
- let o = this._def.schema._parseSync({
- data: i,
- path: n.path,
- parent: n,
- });
- return o.status === "aborted"
- ? v
- : o.status === "dirty" || r.value === "dirty"
- ? de(o.value)
- : o;
- }
- }
- if (s.type === "refinement") {
- let i = (o) => {
- let c = s.refinement(o, a);
- if (n.common.async) return Promise.resolve(c);
- if (c instanceof Promise)
- throw new Error(
- "Async refinement encountered during synchronous parse operation. Use .parseAsync instead.",
- );
- return o;
- };
- if (n.common.async === !1) {
- let o = this._def.schema._parseSync({
- data: n.data,
- path: n.path,
- parent: n,
- });
- return o.status === "aborted"
- ? v
- : (o.status === "dirty" && r.dirty(),
- i(o.value),
- { status: r.value, value: o.value });
- } else
- return this._def.schema
- ._parseAsync({ data: n.data, path: n.path, parent: n })
- .then((o) =>
- o.status === "aborted"
- ? v
- : (o.status === "dirty" && r.dirty(),
- i(o.value).then(() => ({ status: r.value, value: o.value }))),
- );
- }
- if (s.type === "transform")
- if (n.common.async === !1) {
- let i = this._def.schema._parseSync({
- data: n.data,
- path: n.path,
- parent: n,
- });
- if (!Me(i)) return i;
- let o = s.transform(i.value, a);
- if (o instanceof Promise)
- throw new Error(
- "Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.",
- );
- return { status: r.value, value: o };
- } else
- return this._def.schema
- ._parseAsync({ data: n.data, path: n.path, parent: n })
- .then((i) =>
- Me(i)
- ? Promise.resolve(s.transform(i.value, a)).then((o) => ({
- status: r.value,
- value: o,
- }))
- : i,
- );
- x.assertNever(s);
- }
- };
- N.create = (t, e, r) =>
- new N({ schema: t, typeName: m.ZodEffects, effect: e, ...g(r) });
- N.createWithPreprocess = (t, e, r) =>
- new N({
- schema: e,
- effect: { type: "preprocess", transform: t },
- typeName: m.ZodEffects,
- ...g(r),
- });
- var A = class extends b {
- _parse(e) {
- return this._getType(e) === p.undefined
- ? R(void 0)
- : this._def.innerType._parse(e);
- }
- unwrap() {
- return this._def.innerType;
- }
- };
- A.create = (t, e) =>
- new A({ innerType: t, typeName: m.ZodOptional, ...g(e) });
- var L = class extends b {
- _parse(e) {
- return this._getType(e) === p.null
- ? R(null)
- : this._def.innerType._parse(e);
- }
- unwrap() {
- return this._def.innerType;
- }
- };
- L.create = (t, e) =>
- new L({ innerType: t, typeName: m.ZodNullable, ...g(e) });
- var ae = class extends b {
- _parse(e) {
- let { ctx: r } = this._processInputParams(e),
- n = r.data;
- return (
- r.parsedType === p.undefined && (n = this._def.defaultValue()),
- this._def.innerType._parse({ data: n, path: r.path, parent: r })
- );
- }
- removeDefault() {
- return this._def.innerType;
- }
- };
- ae.create = (t, e) =>
- new ae({
- innerType: t,
- typeName: m.ZodDefault,
- defaultValue:
- typeof e.default == "function" ? e.default : () => e.default,
- ...g(e),
- });
- var ie = class extends b {
- _parse(e) {
- let { ctx: r } = this._processInputParams(e),
- n = { ...r, common: { ...r.common, issues: [] } },
- s = this._def.innerType._parse({
- data: n.data,
- path: n.path,
- parent: { ...n },
- });
- return Ze(s)
- ? s.then((a) => ({
- status: "valid",
- value:
- a.status === "valid"
- ? a.value
- : this._def.catchValue({
- get error() {
- return new C(n.common.issues);
- },
- input: n.data,
- }),
- }))
- : {
- status: "valid",
- value:
- s.status === "valid"
- ? s.value
- : this._def.catchValue({
- get error() {
- return new C(n.common.issues);
- },
- input: n.data,
- }),
- };
- }
- removeCatch() {
- return this._def.innerType;
- }
- };
- ie.create = (t, e) =>
- new ie({
- innerType: t,
- typeName: m.ZodCatch,
- catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
- ...g(e),
- });
- var ve = class extends b {
- _parse(e) {
- if (this._getType(e) !== p.nan) {
- let n = this._getOrReturnCtx(e);
- return (
- l(n, {
- code: d.invalid_type,
- expected: p.nan,
- received: n.parsedType,
- }),
- v
- );
- }
- return { status: "valid", value: e.data };
- }
- };
- ve.create = (t) => new ve({ typeName: m.ZodNaN, ...g(t) });
- var Yr = Symbol("zod_brand"),
- Ie = class extends b {
- _parse(e) {
- let { ctx: r } = this._processInputParams(e),
- n = r.data;
- return this._def.type._parse({ data: n, path: r.path, parent: r });
- }
- unwrap() {
- return this._def.type;
- }
- },
- Le = class t extends b {
- _parse(e) {
- let { status: r, ctx: n } = this._processInputParams(e);
- if (n.common.async)
- return (async () => {
- let a = await this._def.in._parseAsync({
- data: n.data,
- path: n.path,
- parent: n,
- });
- return a.status === "aborted"
- ? v
- : a.status === "dirty"
- ? (r.dirty(), de(a.value))
- : this._def.out._parseAsync({
- data: a.value,
- path: n.path,
- parent: n,
- });
- })();
- {
- let s = this._def.in._parseSync({
- data: n.data,
- path: n.path,
- parent: n,
- });
- return s.status === "aborted"
- ? v
- : s.status === "dirty"
- ? (r.dirty(), { status: "dirty", value: s.value })
- : this._def.out._parseSync({
- data: s.value,
- path: n.path,
- parent: n,
- });
- }
- }
- static create(e, r) {
- return new t({ in: e, out: r, typeName: m.ZodPipeline });
- }
- },
- oe = class extends b {
- _parse(e) {
- let r = this._def.innerType._parse(e),
- n = (s) => (Me(s) && (s.value = Object.freeze(s.value)), s);
- return Ze(r) ? r.then((s) => n(s)) : n(r);
- }
- unwrap() {
- return this._def.innerType;
- }
- };
- oe.create = (t, e) =>
- new oe({ innerType: t, typeName: m.ZodReadonly, ...g(e) });
- function Jt(t, e = {}, r) {
- return t
- ? q.create().superRefine((n, s) => {
- var a, i;
- if (!t(n)) {
- let o =
- typeof e == "function"
- ? e(n)
- : typeof e == "string"
- ? { message: e }
- : e,
- c =
- (i = (a = o.fatal) !== null && a !== void 0 ? a : r) !== null &&
- i !== void 0
- ? i
- : !0,
- u = typeof o == "string" ? { message: o } : o;
- s.addIssue({ code: "custom", ...u, fatal: c });
- }
- })
- : q.create();
- }
- var Gr = { object: P.lazycreate },
- m;
- (function (t) {
- (t.ZodString = "ZodString"),
- (t.ZodNumber = "ZodNumber"),
- (t.ZodNaN = "ZodNaN"),
- (t.ZodBigInt = "ZodBigInt"),
- (t.ZodBoolean = "ZodBoolean"),
- (t.ZodDate = "ZodDate"),
- (t.ZodSymbol = "ZodSymbol"),
- (t.ZodUndefined = "ZodUndefined"),
- (t.ZodNull = "ZodNull"),
- (t.ZodAny = "ZodAny"),
- (t.ZodUnknown = "ZodUnknown"),
- (t.ZodNever = "ZodNever"),
- (t.ZodVoid = "ZodVoid"),
- (t.ZodArray = "ZodArray"),
- (t.ZodObject = "ZodObject"),
- (t.ZodUnion = "ZodUnion"),
- (t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion"),
- (t.ZodIntersection = "ZodIntersection"),
- (t.ZodTuple = "ZodTuple"),
- (t.ZodRecord = "ZodRecord"),
- (t.ZodMap = "ZodMap"),
- (t.ZodSet = "ZodSet"),
- (t.ZodFunction = "ZodFunction"),
- (t.ZodLazy = "ZodLazy"),
- (t.ZodLiteral = "ZodLiteral"),
- (t.ZodEnum = "ZodEnum"),
- (t.ZodEffects = "ZodEffects"),
- (t.ZodNativeEnum = "ZodNativeEnum"),
- (t.ZodOptional = "ZodOptional"),
- (t.ZodNullable = "ZodNullable"),
- (t.ZodDefault = "ZodDefault"),
- (t.ZodCatch = "ZodCatch"),
- (t.ZodPromise = "ZodPromise"),
- (t.ZodBranded = "ZodBranded"),
- (t.ZodPipeline = "ZodPipeline"),
- (t.ZodReadonly = "ZodReadonly");
- })(m || (m = {}));
- var Kr = (t, e = { message: `Input not instance of ${t.name}` }) =>
- Jt((r) => r instanceof t, e),
- Yt = U.create,
- Gt = F.create,
- Xr = ve.create,
- Qr = J.create,
- Kt = Y.create,
- en = G.create,
- tn = fe.create,
- rn = K.create,
- nn = X.create,
- sn = q.create,
- an = V.create,
- on = Z.create,
- cn = pe.create,
- un = D.create,
- dn = P.create,
- ln = P.strictCreate,
- fn = Q.create,
- pn = rt.create,
- hn = ee.create,
- mn = I.create,
- vn = nt.create,
- yn = he.create,
- gn = me.create,
- bn = st.create,
- _n = te.create,
- xn = re.create,
- wn = ne.create,
- kn = se.create,
- Tn = W.create,
- zt = N.create,
- En = A.create,
- On = L.create,
- jn = N.createWithPreprocess,
- Rn = Le.create,
- Sn = () => Yt().optional(),
- Pn = () => Gt().optional(),
- Cn = () => Kt().optional(),
- Nn = {
- string: (t) => U.create({ ...t, coerce: !0 }),
- number: (t) => F.create({ ...t, coerce: !0 }),
- boolean: (t) => Y.create({ ...t, coerce: !0 }),
- bigint: (t) => J.create({ ...t, coerce: !0 }),
- date: (t) => G.create({ ...t, coerce: !0 }),
- },
- An = v,
- _ = Object.freeze({
- __proto__: null,
- defaultErrorMap: le,
- setErrorMap: Nr,
- getErrorMap: Qe,
- makeIssue: et,
- EMPTY_PATH: Ar,
- addIssueToContext: l,
- ParseStatus: T,
- INVALID: v,
- DIRTY: de,
- OK: R,
- isAborted: pt,
- isDirty: ht,
- isValid: Me,
- isAsync: Ze,
- get util() {
- return x;
- },
- get objectUtil() {
- return ft;
- },
- ZodParsedType: p,
- getParsedType: B,
- ZodType: b,
- datetimeRegex: Ht,
- ZodString: U,
- ZodNumber: F,
- ZodBigInt: J,
- ZodBoolean: Y,
- ZodDate: G,
- ZodSymbol: fe,
- ZodUndefined: K,
- ZodNull: X,
- ZodAny: q,
- ZodUnknown: V,
- ZodNever: Z,
- ZodVoid: pe,
- ZodArray: D,
- ZodObject: P,
- ZodUnion: Q,
- ZodDiscriminatedUnion: rt,
- ZodIntersection: ee,
- ZodTuple: I,
- ZodRecord: nt,
- ZodMap: he,
- ZodSet: me,
- ZodFunction: st,
- ZodLazy: te,
- ZodLiteral: re,
- ZodEnum: ne,
- ZodNativeEnum: se,
- ZodPromise: W,
- ZodEffects: N,
- ZodTransformer: N,
- ZodOptional: A,
- ZodNullable: L,
- ZodDefault: ae,
- ZodCatch: ie,
- ZodNaN: ve,
- BRAND: Yr,
- ZodBranded: Ie,
- ZodPipeline: Le,
- ZodReadonly: oe,
- custom: Jt,
- Schema: b,
- ZodSchema: b,
- late: Gr,
- get ZodFirstPartyTypeKind() {
- return m;
- },
- coerce: Nn,
- any: sn,
- array: un,
- bigint: Qr,
- boolean: Kt,
- date: en,
- discriminatedUnion: pn,
- effect: zt,
- enum: wn,
- function: bn,
- instanceof: Kr,
- intersection: hn,
- lazy: _n,
- literal: xn,
- map: yn,
- nan: Xr,
- nativeEnum: kn,
- never: on,
- null: nn,
- nullable: On,
- number: Gt,
- object: dn,
- oboolean: Cn,
- onumber: Pn,
- optional: En,
- ostring: Sn,
- pipeline: Rn,
- preprocess: jn,
- promise: Tn,
- record: vn,
- set: gn,
- strictObject: ln,
- string: Yt,
- symbol: tn,
- transformer: zt,
- tuple: mn,
- undefined: rn,
- union: fn,
- unknown: an,
- void: cn,
- NEVER: An,
- ZodIssueCode: d,
- quotelessJson: Cr,
- ZodError: C,
- });
- var vt = _.object({ url: _.string(), token: _.string() }),
- Mn = _.object({
- header: _.string(),
- payload: _.string(),
- signature: _.string(),
- }),
- Zn = _.object({
- fid: _.number(),
- type: _.literal("app_key"),
- key: _.string().startsWith("0x"),
- }),
- Xt = _.object({
- event: _.literal("frame-added"),
- notificationDetails: vt.optional(),
- }),
- Qt = _.object({ event: _.literal("frame-removed") }),
- er = _.object({
- event: _.literal("notifications-enabled"),
- notificationDetails: vt.required(),
- }),
- tr = _.object({ event: _.literal("notifications-disabled") }),
- In = _.discriminatedUnion("event", [Xt, Qt, er, tr]),
- Ln = _.object({
- notificationId: _.string().uuid(),
- title: _.string().max(32),
- body: _.string().max(128),
- targetUrl: _.string().max(256),
- tokens: _.string().array().max(100),
- }),
- $n = _.object({
- result: _.object({
- successfulTokens: _.array(_.string()),
- invalidTokens: _.array(_.string()),
- rateLimitedTokens: _.array(_.string()),
- }),
- });
- var Vn = dt;
- return ur(Dn);
- })();
- /*! Bundled license information:
-
- comlink/dist/esm/comlink.mjs:
- (**
- * @license
- * Copyright 2019 Google LLC
- * SPDX-License-Identifier: Apache-2.0
- *)
- */
- //# sourceMappingURL=index.min.js.map
sdk.scroll
Changed around line 0
- buildTxt
- Below is the source code for farcasters npm package.
-
- I want you to make this into a single client side script called:
-
- farcasterFrames.js
-
- that someone could include on their web page as easily as including jquery
-
- toStamp /Users/breck/nofomo.togger.com/node_modules/@farcaster/
simpleCLI.mjs
Changed around line 1
+ #! /usr/bin/env node
+ import parseArgs from 'minimist';
+ import path from 'path';
+ import fs from 'fs';
+ import { fileURLToPath } from 'url';
+
+ const isUserPipingInput = () => {
+ if (process.platform === "win32") return false;
+ if (process.stdin.isTTY === true) return false;
+ return fs.fstatSync(0).isFIFO();
+ };
+
+ class SimpleCLI {
+ CommandFnDecoratorSuffix = "Command";
+ verbose = true;
+
+ executeUsersInstructionsFromShell(args = parseArgs(process.argv.slice(2))._, userIsPipingInput = isUserPipingInput()) {
+ const command = args[0];
+ const commandName = `${command}${this.CommandFnDecoratorSuffix}`;
+
+ if (this[commandName]) return userIsPipingInput ? this._runCommandOnPipedStdIn(commandName) : this[commandName](process.cwd());
+ else if (command) this.log(`No command '${command}'. Running help command.`);
+ else this.log(`No command provided. Running help command.`);
+
+ return this.helpCommand();
+ }
+
+ _runCommandOnPipedStdIn(commandName) {
+ this.log(`Running ${commandName} on piped input`);
+ let pipedData = "";
+
+ process.stdin.on("readable", function() {
+ pipedData += this.read();
+ });
+
+ process.stdin.on("end", async () => {
+ const folders = pipedData
+ .trim()
+ .split("\n")
+ .map(line => line.trim())
+ .filter(line => fs.existsSync(line));
+
+ for (const line of folders) {
+ await this[commandName](line);
+ }
+
+ if (folders.length === 0) {
+ this[commandName](process.cwd());
+ }
+ });
+ }
+
+ silence() {
+ this.verbose = false;
+ return this;
+ }
+
+ log(message) {
+ if (this.verbose) console.log(message);
+ return message;
+ }
+
+ get _allCommands() {
+ return Object.getOwnPropertyNames(Object.getPrototypeOf(this))
+ .filter(atom => atom.endsWith(this.CommandFnDecoratorSuffix))
+ .sort();
+ }
+
+ resolvePath(folder = "") {
+ return path.isAbsolute(folder) ? path.normalize(folder) : path.resolve(path.join(process.cwd(), folder));
+ }
+
+ helpCommand() {
+ this.log(this.welcomeMessage);
+ return this.log(`\nAvailable commands:\n\n${this._allCommands.map(comm => `🖌️ ` + comm.replace(this.CommandFnDecoratorSuffix, "")).join("\n")}\n`);
+ }
+ }
+
+ export { SimpleCLI };
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated download.mjs
download.mjs
Changed around line 1
+ import express from 'express';
+ import ytdl from 'ytdl-core';
+ import fs from 'fs/promises';
+ import path from 'path';
+ import { createGifFromVideo } from './gifConverter.js';
+
+ const router = express.Router();
+
+ router.post('/api/convert', async (req, res) => {
+ const { url, options } = req.body;
+ const tempDir = path.join(process.cwd(), 'temp');
+ const videoPath = path.join(tempDir, `${Date.now()}.mp4`);
+
+ try {
+ // Create temp directory if it doesn't exist
+ await fs.mkdir(tempDir, { recursive: true });
+
+ // Download video
+ const videoStream = ytdl(url, { quality: 'highest' });
+ const fileStream = fs.createWriteStream(videoPath);
+ await new Promise((resolve, reject) => {
+ videoStream.pipe(fileStream);
+ fileStream.on('finish', resolve);
+ fileStream.on('error', reject);
+ });
+
+ // Convert to GIF
+ const gifPath = await createGifFromVideo(videoPath, null, options);
+
+ // Send GIF file
+ const gifBuffer = await fs.readFile(gifPath);
+ res.type('gif').send(gifBuffer);
+
+ // Cleanup
+ await Promise.all([
+ fs.unlink(videoPath),
+ fs.unlink(gifPath)
+ ]);
+ } catch (error) {
+ console.error('Conversion error:', error);
+ res.status(500).json({ error: 'Conversion failed' });
+ }
+ });
+
+ export default router;
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created download.mjs
download.mjs
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated maker.html
maker.html
Changed around line 1
+
+
+
+
+
+ YouTube to GIF Converter
+
+
+
+
+

YouTube to GIF Converter

+
+
+
+
+ type="text"
+ id="url"
+ required
+ placeholder="https://www.youtube.com/watch?v=..."
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created maker.html
maker.html
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated .well-known/farcaster.json
.well-known/farcaster.json
Changed around line 6
- "name": "Simple Farcaster Frames v2 Demo",
- "iconUrl": "https://jframe.breckyunits.com/splash.png",
- "splashImageUrl": "https://jframe.breckyunits.com/splash.png",
+ "name": "AutoGif",
+ "iconUrl": "https://autogif.togger.com/splash.png",
+ "splashImageUrl": "https://autogif.togger.com/splash.png",
- "homeUrl": "https://jframe.breckyunits.com"
+ "homeUrl": "https://autogif.togger.com"
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated demo.scroll
demo.scroll
Changed around line 5: title AutoGif
-

BangBang

+

AutoGif

ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated demo.scroll
demo.scroll
Changed around line 1
- title BangBang
+ title AutoGif
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- title OkBanger AutoGifCaster
+ title OkBanger AutoGif
- # OkBanger AutoGifCaster
+ # OkBanger AutoGif
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 4: metaTags
- # OkBanger auto-live gif caster
+ # OkBanger AutoGifCaster
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- title OkBanger Autocaster
+ title OkBanger AutoGifCaster
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
+ title OkBanger Autocaster
+ metaTags
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 4: landing.css
+ br 3
+
+ br 3
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
+ container 600px
- container 600px
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- container
+ # OkBanger auto-live gif caster
+
+ container 600px
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
+ container
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated landing.css
landing.css
Changed around line 6
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- azure.gif
- [] cast that for me under my account. 3.5 hours and counting :(
+ [] cast that for me under my account. 3.5 hours and counting :(
+
+
+ azure.gif
+ caption A test gif generated from a youtube video.
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- azure.gif
+ azure.gif
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- theme roboto
-
+ landing.css
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
updated landing.css
landing.css
Changed around line 1
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
+ Ubuntu, Cantarell, sans-serif;
+ }
+ body {
+ min-height: 100vh;
+ background: linear-gradient(45deg, #1a1a2e, #16213e, #1a1a2e);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ color: #fff;
+ }
ffff:65.246.71.95
ffff:65.246.71.95
1 month ago
created landing.css
landing.css
Breck Yunits
Breck Yunits
1 month ago
node_modules/@farcaster/frame-core/dist/index.d.ts
Changed around line 0
- export * from "./types";
node_modules/@farcaster/frame-core/dist/index.js
Changed around line 0
- export * from "./types";
node_modules/@farcaster/frame-core/dist/tsconfig.tsbuildinfo
Changed around line 0
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/abitype/dist/types/register.d.ts","../../../node_modules/abitype/dist/types/types.d.ts","../../../node_modules/abitype/dist/types/abi.d.ts","../../../node_modules/abitype/dist/types/errors.d.ts","../../../node_modules/abitype/dist/types/narrow.d.ts","../../../node_modules/abitype/dist/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/signatures.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/structs.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/signature.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/splitparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/struct.d.ts","../../../node_modules/abitype/dist/types/exports/index.d.ts","../../../node_modules/ox/_types/core/errors.d.ts","../../../node_modules/ox/_types/core/internal/bytes.d.ts","../../../node_modules/ox/_types/core/internal/hex.d.ts","../../../node_modules/ox/_types/core/hex.d.ts","../../../node_modules/ox/_types/core/bytes.d.ts","../../../node_modules/ox/_types/core/hash.d.ts","../../../node_modules/ox/_types/core/internal/types.d.ts","../../../node_modules/ox/_types/core/abiitem.d.ts","../../../node_modules/ox/_types/core/publickey.d.ts","../../../node_modules/ox/_types/core/address.d.ts","../../../node_modules/ox/_types/core/internal/cursor.d.ts","../../../node_modules/ox/_types/core/internal/abiparameters.d.ts","../../../node_modules/ox/_types/core/abiparameters.d.ts","../../../node_modules/ox/_types/core/internal/abiitem.d.ts","../../../node_modules/ox/_types/core/abi.d.ts","../../../node_modules/ox/_types/core/internal/abiconstructor.d.ts","../../../node_modules/ox/_types/core/abiconstructor.d.ts","../../../node_modules/ox/_types/core/internal/abierror.d.ts","../../../node_modules/ox/_types/core/abierror.d.ts","../../../node_modules/ox/_types/core/accesslist.d.ts","../../../node_modules/ox/_types/core/rlp.d.ts","../../../node_modules/ox/_types/core/signature.d.ts","../../../node_modules/ox/_types/core/authorization.d.ts","../../../node_modules/ox/_types/core/transaction.d.ts","../../../node_modules/ox/_types/core/withdrawal.d.ts","../../../node_modules/ox/_types/core/block.d.ts","../../../node_modules/ox/_types/core/filter.d.ts","../../../node_modules/ox/_types/core/internal/abievent.d.ts","../../../node_modules/ox/_types/core/abievent.d.ts","../../../node_modules/ox/_types/core/internal/abifunction.d.ts","../../../node_modules/ox/_types/core/abifunction.d.ts","../../../node_modules/ox/_types/core/accountproof.d.ts","../../../node_modules/ox/_types/core/aesgcm.d.ts","../../../node_modules/ox/_types/core/internal/base58.d.ts","../../../node_modules/ox/_types/core/base58.d.ts","../../../node_modules/ox/_types/core/base64.d.ts","../../../node_modules/ox/_types/core/kzg.d.ts","../../../node_modules/ox/_types/core/blobs.d.ts","../../../node_modules/ox/_types/core/bloom.d.ts","../../../node_modules/ox/_types/core/blspoint.d.ts","../../../node_modules/@noble/curves/abstract/modular.d.ts","../../../node_modules/@noble/curves/abstract/utils.d.ts","../../../node_modules/@noble/curves/abstract/curve.d.ts","../../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../../node_modules/@noble/curves/abstract/weierstrass.d.ts","../../../node_modules/@noble/curves/abstract/tower.d.ts","../../../node_modules/@noble/curves/abstract/bls.d.ts","../../../node_modules/ox/_types/core/bls.d.ts","../../../node_modules/ox/_types/core/internal/lru.d.ts","../../../node_modules/ox/_types/core/caches.d.ts","../../../node_modules/ox/_types/core/contractaddress.d.ts","../../../node_modules/ox/_types/core/internal/ens.d.ts","../../../node_modules/ox/_types/core/ens.d.ts","../../../node_modules/@scure/bip32/lib/index.d.ts","../../../node_modules/ox/_types/core/internal/hdkey.d.ts","../../../node_modules/ox/_types/core/hdkey.d.ts","../../../node_modules/ox/_types/core/fee.d.ts","../../../node_modules/ox/_types/core/json.d.ts","../../../node_modules/ox/_types/core/log.d.ts","../../../node_modules/@scure/bip39/wordlists/czech.d.ts","../../../node_modules/@scure/bip39/wordlists/english.d.ts","../../../node_modules/@scure/bip39/wordlists/french.d.ts","../../../node_modules/@scure/bip39/wordlists/italian.d.ts","../../../node_modules/@scure/bip39/wordlists/japanese.d.ts","../../../node_modules/@scure/bip39/wordlists/korean.d.ts","../../../node_modules/@scure/bip39/wordlists/portuguese.d.ts","../../../node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts","../../../node_modules/@scure/bip39/wordlists/spanish.d.ts","../../../node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts","../../../node_modules/ox/_types/core/internal/mnemonic/wordlists.d.ts","../../../node_modules/ox/_types/core/mnemonic.d.ts","../../../node_modules/ox/_types/core/personalmessage.d.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/ox/_types/core/internal/register.d.ts","../../../node_modules/ox/_types/core/transactionreceipt.d.ts","../../../node_modules/ox/_types/core/transactionrequest.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/eth.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/wallet.d.ts","../../../node_modules/ox/_types/core/rpcschema.d.ts","../../../node_modules/ox/_types/core/internal/rpcschema.d.ts","../../../node_modules/ox/_types/core/provider.d.ts","../../../node_modules/ox/_types/core/rpcrequest.d.ts","../../../node_modules/ox/_types/core/rpcresponse.d.ts","../../../node_modules/ox/_types/core/internal/promise.d.ts","../../../node_modules/ox/_types/core/internal/rpctransport.d.ts","../../../node_modules/ox/_types/core/rpctransport.d.ts","../../../node_modules/ox/_types/core/secp256k1.d.ts","../../../node_modules/ox/_types/core/p256.d.ts","../../../node_modules/ox/_types/core/siwe.d.ts","../../../node_modules/ox/_types/core/solidity.d.ts","../../../node_modules/ox/_types/core/transactionenvelope.d.ts","../../../node_modules/ox/_types/core/transactionenvelopelegacy.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip1559.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip2930.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip4844.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip7702.d.ts","../../../node_modules/ox/_types/core/typeddata.d.ts","../../../node_modules/ox/_types/core/validatordata.d.ts","../../../node_modules/ox/_types/core/value.d.ts","../../../node_modules/ox/_types/core/internal/webauthn.d.ts","../../../node_modules/ox/_types/core/webauthnp256.d.ts","../../../node_modules/ox/_types/core/webcryptop256.d.ts","../../../node_modules/ox/_types/index.d.ts","../../../node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/zod/lib/zoderror.d.ts","../../../node_modules/zod/lib/locales/en.d.ts","../../../node_modules/zod/lib/errors.d.ts","../../../node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/zod/lib/types.d.ts","../../../node_modules/zod/lib/external.d.ts","../../../node_modules/zod/lib/index.d.ts","../../../node_modules/zod/index.d.ts","../src/types.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/node-forge/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileIdsList":[[220,231,273],[231,273],[142,143,145,146,147,231,273],[142,231,273],[142,143,144,231,273],[142,146,231,273],[220,221,222,223,224,231,273],[220,222,231,273],[231,273,286,323],[231,273,325],[231,273,326],[231,273,323],[231,270,273],[231,272,273],[273],[231,273,278,308],[231,273,274,279,285,286,293,305,316],[231,273,274,275,285,293],[226,227,228,231,273],[231,273,276,317],[231,273,277,278,286,294],[231,273,278,305,313],[231,273,279,281,285,293],[231,272,273,280],[231,273,281,282],[231,273,285],[231,273,283,285],[231,272,273,285],[231,273,285,286,287,305,316],[231,273,285,286,287,300,305,308],[231,268,273,321],[231,268,273,281,285,288,293,305,316],[231,273,285,286,288,289,293,305,313,316],[231,273,288,290,305,313,316],[229,230,231,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322],[231,273,285,291],[231,273,292,316,321],[231,273,281,285,293,305],[231,273,294],[231,273,295],[231,272,273,296],[231,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322],[231,273,298],[231,273,299],[231,273,285,300,301],[231,273,300,302,317,319],[231,273,285,305,306,307,308],[231,273,305,307],[231,273,305,306],[231,273,308],[231,273,309],[231,270,273,305],[231,273,285,311,312],[231,273,311,312],[231,273,278,293,305,313],[231,273,314],[231,273,293,315],[231,273,288,299,316],[231,273,278,317],[231,273,305,318],[231,273,292,319],[231,273,320],[231,273,278,285,287,296,305,316,319,321],[231,273,305,322],[231,273,329,330,331],[231,273,334],[79,80,231,273],[80,231,273],[79,81,82,83,84,86,87,88,89,92,93,94,95,96,97,98,99,100,231,273],[82,231,273],[81,82,85,231,273],[81,82,231,273],[81,88,231,273],[81,85,87,231,273],[80,81,85,231,273],[80,81,86,231,273],[80,81,85,90,91,231,273],[80,81,83,85,90,91,231,273],[80,81,231,273],[80,81,85,90,231,273],[79,80,81,85,91,231,273],[79,80,81,231,273],[101,102,115,231,273],[101,102,105,108,109,114,116,117,231,273],[101,102,105,108,109,114,115,116,119,231,273],[101,102,105,106,107,108,109,111,114,115,116,129,231,273],[101,102,105,108,109,113,114,115,116,131,231,273],[101,102,105,107,108,115,116,231,273],[101,102,105,106,113,231,273],[102,105,108,111,231,273],[204,231,273],[101,102,106,107,110,231,273],[102,105,106,231,273],[102,105,107,108,111,122,123,231,273],[102,105,106,135,231,273],[102,105,106,108,112,138,231,273],[102,105,108,111,125,126,231,273],[102,105,106,107,231,273],[102,105,106,108,141,148,231,273],[102,105,106,108,231,273],[102,103,104,105,231,273],[150,231,273],[102,105,106,107,108,111,122,231,273],[102,105,106,107,153,231,273],[105,108,231,273],[102,105,108,111,127,231,273],[102,105,106,110,155,156,231,273],[102,103,104,106,231,273],[108,115,231,273],[101,105,108,115,128,231,273],[101,102,108,109,114,116,231,273],[101,102,105,106,108,111,112,114,231,273],[102,106,231,273],[102,105,154,204,231,273],[102,155,157,231,273],[102,105,231,273],[161,162,163,164,165,166,167,168,169,170,231,273],[102,231,273],[180,231,273],[108,180,231,273],[105,111,125,127,128,133,158,160,176,177,180,231,273],[105,108,111,177,180,231,273],[102,108,180,183,184,187,231,273],[102,110,202,231,273],[102,105,106,157,171,231,273],[102,105,106,110,123,142,143,146,231,273],[102,108,111,174,180,181,231,273],[102,105,106,108,112,231,273],[108,180,181,204,231,273],[108,204,231,273],[108,175,178,179,231,273],[102,108,180,181,184,185,186,231,273],[102,105,106,108,110,111,123,142,143,146,231,273],[102,108,111,231,273],[102,105,108,111,121,123,124,231,273],[102,105,107,108,111,121,122,123,192,231,273],[102,105,107,108,121,122,123,139,192,194,231,273],[102,105,107,108,111,121,122,123,124,192,231,273],[102,105,107,108,111,122,123,192,231,273],[102,105,108,111,160,231,273],[102,105,108,111,121,124,231,273],[101,102,105,106,107,108,111,114,159,231,273],[102,105,106,107,111,231,273],[102,105,106,107,108,110,123,137,189,201,231,273],[102,105,106,108,110,123,231,273],[102,105,106,107,109,110,111,114,116,118,120,121,122,123,124,125,126,127,128,130,132,133,134,136,137,138,139,140,141,149,151,152,154,157,158,159,160,172,173,175,176,177,180,182,183,184,187,188,189,190,191,192,193,194,195,196,197,198,199,200,202,203,231,273],[231,240,244,273,316],[231,240,273,305,316],[231,235,273],[231,237,240,273,313,316],[231,273,293,313],[231,235,273,323],[231,237,240,273,293,316],[231,232,233,236,239,273,285,305,316],[231,240,247,273],[231,232,238,273],[231,240,261,262,273],[231,236,240,273,308,316,323],[231,261,273,323],[231,234,235,273,323],[231,240,273],[231,234,235,236,237,238,239,240,241,242,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,263,264,265,266,267,273],[231,240,255,273],[231,240,247,248,273],[231,238,240,248,249,273],[231,239,273],[231,232,235,240,273],[231,240,244,248,249,273],[231,244,273],[231,238,240,243,273,316],[231,232,237,240,247,273],[231,273,305],[231,235,240,261,273,321,323],[216,231,273],[207,208,231,273],[205,206,207,209,210,214,231,273],[206,207,231,273],[215,231,273],[207,231,273],[205,206,207,210,211,212,213,231,273],[205,206,216,231,273],[218,231,273],[204,217,231,273]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b166e33cf8226ac8781899da244397e77e5b6528271339ce26ece0c2c7242d7f","impliedFormat":1},{"version":"a623d5cf7925e72dbf4602862499564389c7c3dc0ce049733cc0ec756a846667","impliedFormat":1},{"version":"9c1724d9b0cb3d7141dc25a44b0d18cf0b3b20a42e971c6898d4195ec6d4b8dd","impliedFormat":1},{"version":"63634c0855e639ea7f609613d799bbb0dc774ec9f3242bc272c5567dc5ccd485","impliedFormat":1},{"version":"592f06c425ab27b4bafec624ef5b153cbdde9ac58f7113100a2da1c4309d1309","impliedFormat":1},{"version":"19c8ab51b4b07c529d95cd4d5c8d100a68dca247ec83a5097d35106fd8a7acca","impliedFormat":1},{"version":"bec1d0ac62cee9b4d1ea8b64c4798c59c1726668b76d06b68a206e0cb0ac76a6","impliedFormat":1},{"version":"fb4f06b2af9ee4b2d2be8c964b0a8f6dd260be9048488ffcf04eb5c0fcb8bf61","impliedFormat":1},{"version":"f185055f36d76e2df5eeb87ae1148a25a125be2bff2095e1bd39c1c7ce85a640","impliedFormat":1},{"version":"948a56ec8bfbbf20ad2496f49f451cfeb878cfcd6156032c0769b603f3ed8f18","impliedFormat":1},{"version":"979fdebc12d30becce6a15e68d99bc8a2a470a8dcf0898ac9e2d241a7e531940","impliedFormat":1},{"version":"1824ad7d4259910646279d667e517334c0aa24d5c810e8ea6da756fc2e02372f","impliedFormat":1},{"version":"989e9060e220ff86025044ba3c867a83512a655b7cf6253b2bd682192debf390","impliedFormat":1},{"version":"8b1feb568c859feb59236e9723b7a86e2ff8f9a8f2012366ffd1798164dc2798","impliedFormat":1},{"version":"8fab988b0129e674afc0bc0e95329b4052cf027f5d5b5b3e6e92d055b5ba88ef","impliedFormat":1},{"version":"4fe56d524ab24c225668803c1792945053e648b4e8fa4e50fa35594495b56732","impliedFormat":1},{"version":"2652931b8f7dca9a57f21aeb25b5d46851dcf17e4d5ed54b9b57d5d26e647680","impliedFormat":1},{"version":"d364c8df7d52199f5d011b4ded96f36dd114b984f5ee2e50ffe7d30ac1ab4bba","impliedFormat":1},{"version":"408f9eb3c7a3533bf5f07e0cde110a5ee0702864795ee6727792520fe60320b6","impliedFormat":1},{"version":"ba79eb15c36ff23e352ef608ceb7f9f0f278b15ad42512c05eedbe78f228e0e4","impliedFormat":1},{"version":"4cd233c6af471432253a67ae4f3b43c85e58a71418d98c3e162a1dac975c68f6","impliedFormat":1},{"version":"aa77c7d8ddc961e8192bcaa92da140e1205f8aee78bfadead5f52b8844d7d05c","impliedFormat":1},{"version":"37e37d3a525a207efab5458069fd9a27a174d2dc3af729702c81729ca03a349f","impliedFormat":1},{"version":"70997e63b7b3d90188fa2106753d35afd3b43b2bde957c46a5516d89e3ef0c1a","impliedFormat":1},{"version":"7fdaebdb3780d0549a8e0abcb18965e2f62224bdde633aeafb22c64c02fe9e9d","impliedFormat":1},{"version":"24f848479d1fd142d3d7cf034bedca247d1d9b8b31c2632c09695bd6a0441141","impliedFormat":1},{"version":"7e977910c045ec087f435905eb730e9c84e8d6b97f0dd0fe0c022dfed665613a","impliedFormat":1},{"version":"9c4ec2692cdb791823b9407753dec50d69b1b990cf7038cac3fab01e8ed5f709","impliedFormat":1},{"version":"176e7ce333b9988d68cfd5ab6717b20421a03b415af57f2a3bea1aa6b8d634a9","impliedFormat":1},{"version":"301a1ba797c537d2598a557af4862e7823353c80529c9a58bc1a0c08779deb5d","impliedFormat":1},{"version":"4fb2df0b48ac55d960fedfb7e7b917d2d29608d7f351b70b6b3104e2d02d2f11","impliedFormat":1},{"version":"2f37ef3a5d3fb119b390cb48c77352914c814b98948633deac90099faae320a6","impliedFormat":1},{"version":"ca2ce76fd743888d0f0c5be48b1b17a864f5ff2b0d09e954d3690645a794533f","impliedFormat":1},{"version":"728ec07c8a50b9f22da9c9aa8859e29462526fd996ac1d21c6c9a81b78106dd5","impliedFormat":1},{"version":"d4d210575ebc08ed97821b7a107692b91c9590d5328ec3aaac0b75f66a1c9188","impliedFormat":1},{"version":"fcaa6a4283732fcc1b571a326567c10b1ebce2faf1a0645493080ba230e57497","impliedFormat":1},{"version":"be9ef0a0446cf28d529a684e4a7d14101f03e054896704fbdc5470d8fa4de6b4","impliedFormat":1},{"version":"acd32f2f192d93e8161938ebfd74fa063e67a09cbe0156a74ae2e421a1e8f786","impliedFormat":1},{"version":"1eeb9deebe9a0a6cc52a32aa1533a1535ecc1b4e831290c753e72e0394e866a9","impliedFormat":1},{"version":"ae1f27a5966db7640edb4c82974b985acb7b1fa0859bff7cd769629436822d9a","impliedFormat":1},{"version":"a3d0b36bb3185da856cc0a7df02f63008935602ed09f84b0d960c7f9f7f6d63d","impliedFormat":1},{"version":"60319cf75d460432a0769a2f98a9ab6fc3ad39290bf7f1b33b922e832ff5b40e","impliedFormat":1},{"version":"30ceaf6e65817221c5c62cedfc26892a4b79a78c7eb7367bcccc0e217b517bf1","impliedFormat":1},{"version":"a3ea4adb87d130799d26945196bba7e889056c74dac98069d58c015d10f3c053","impliedFormat":1},{"version":"a82f1d66de93c80bca7a744647c748657c050341e53de63fae5aecb72f85f5e6","impliedFormat":1},{"version":"83dc49d957cb3b4af3a45cd7b54958149d21088d49f95e8ba6e3d3fb2b37d880","impliedFormat":1},{"version":"b7825c3d04bfc38caf9cb94341cede132d227654b28e3a603d1576bf199a7e47","impliedFormat":1},{"version":"d4832d1deaacad5d196b2a83239fb94c80f97df889c02a75859b05b460885300","impliedFormat":1},{"version":"888180b3d951298bf85d430543a1fa2fc6264fc847aef5baa821c743b5d84a58","impliedFormat":1},{"version":"4ec19d58993999260e0df245eec5fd6d7dd92978360c4f0706c9260091f55c70","impliedFormat":1},{"version":"0bc4f86d58f4a4b5a9563ba8d2b23a3fac187a6e167772f6689ea807081ed631","impliedFormat":1},{"version":"7a4e38850bfca2b105fd3e5609b68b52271fd7f2cab9f1d4031748e8bfd29633","impliedFormat":1},{"version":"496ee894efcd5de63169a3a4e47d74f16f754eb212b1ef209f9255aaaeef3450","impliedFormat":1},{"version":"246bec681a7465de230b083e0e63633b568a2d79c20fe167d3280e21200b22c8","impliedFormat":1},{"version":"3ee38e0bac65430814b195ed22b5aadfbe4fbd8890c5e5b45a7ba13f05c0ea0d","impliedFormat":1},{"version":"45181e4221f90d98bf2046ba55cdc22411dc64b9a8cc04f1c8702038b7334d01","impliedFormat":1},{"version":"7fe0253ff44f072ea13fa372e2fbd007aa439df9560762950d38b4c203b2c51a","impliedFormat":1},{"version":"bf4ebcedc7324dd0cbe83488830f7966e808fabf4836d516d1b591ea91417c68","impliedFormat":1},{"version":"c53f7caa42ad0bff2b3cad20e4780990aadf647c845cb66cec004062cc4ae549","impliedFormat":1},{"version":"af0dfd141ecb2e24ef9a3028727214a69aa528d0be91e8728a7abd4fd6659b5f","impliedFormat":1},{"version":"786d583f831d03da4aed9f9354fd9c4ef00aa8122564da5e683631423639c258","impliedFormat":1},{"version":"418fdcdefc32953c6c7ea7e9979ce84b87618de9def698e73da2c16697fe023b","impliedFormat":1},{"version":"4d0db315ab6869de22694dc968fe740cfef635a21455a4d2bd33bc95b8eec381","impliedFormat":1},{"version":"987339ae38c9341b0d90da7350e543c0d561d04b540f29a6912d387ffee30123","impliedFormat":1},{"version":"d6add5a006175d8e4ac5067baa29854010ae2be9eec488f3b09f62e48fdcbc73","impliedFormat":1},{"version":"78b320333fa889c9532276db075578cdde53e41d0c5ff1dc901a22e5c9e25bd8","impliedFormat":1},{"version":"44bebcbc4a93fea28f3564a7763dd12f0f3bdec624eb8a63e97afd007d1ff4bd","impliedFormat":1},{"version":"7531f6904a711cd870729de7bd8fb5829088eaf82381e88f81aa4a2c9ec57b75","impliedFormat":1},{"version":"f68260d8d6d27ca979ddc8e3ee70ada9818c77dbe2dc6824ca0b7a041f8e5c79","impliedFormat":1},{"version":"af120f4603c7fb09e9c082dd486388c102a17f434031eb2b68c95a1e8994412a","impliedFormat":1},{"version":"af807f4d873d3c603e802b9b8aef8fdf067a3e61e7dfe33f78a28fe21ca11061","impliedFormat":1},{"version":"08447e8b528a1f8d1162aa044695d460ce5179a78bd174fa0673fa16b06011aa","impliedFormat":1},{"version":"8e532c6486042736463d1116d45b0db814d969ffd2ee822e4e5ce975807c16f0","impliedFormat":1},{"version":"fad47f66fef1ff277730abff9c9330dd70284eb0ced43d6dd6aee15fc5f19a1b","impliedFormat":1},{"version":"7b4b0aaf0978122b44aa6317977be3e2f9d3d261ae4a8d93bfd511a7ddee7dfe","impliedFormat":1},{"version":"cb5def9d6efe73b09a7adce13bbb7fad7ee6df7a59259300de6ca77fe84041fc","impliedFormat":1},{"version":"1ddd1ca692a6c656ade0a85c9a722b3679b3d0bf113b699908e0325cf3537dbe","impliedFormat":1},{"version":"16c6ff8bcfef0ad22abffa3329760bb611c4c4aa098ece0d6bcfd1cd16610997","impliedFormat":1},{"version":"3d15157b6685e63a7e43a39bbc1fbcfdbf1250fa3598af55a2384f6f31260c86","impliedFormat":1},{"version":"58b5bc399cd98b87eff2c80d995d4dd63e69c801ec880b85c7da73ddc561a751","impliedFormat":1},{"version":"401c5b0f01bb0dce7a85899d8665c7d9c0b1637dc642805320d76c1a071135dd","impliedFormat":1},{"version":"af81e13747ef7589a726505dd4c2dcf00bb2b9fd7c3c84d580c1d02dbc3b58a9","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"516c53364c6b242591c65afc8b0f0f0cee74ac8a04f52470a539fcb33da2e318","impliedFormat":1},{"version":"cdf612f32afd760cd4a568e3f0c4646394f18fe2277a5ec1c084f1430776f1e0","impliedFormat":1},{"version":"e8ee036c1281885b9cc58f9d1d47472037d080a45b44a3ecbb8fea445e87415d","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"90887074bbd664eb4726465ccc6740fa8886e525e5c0afcc734e41df41851a60","impliedFormat":1},{"version":"0a3d92e1ed031f67294fc02692352444c0514e371b7093b8d224b6f9ea02d958","impliedFormat":1},{"version":"cc31889ffc5c322ff53137f54f3aa8f74a969cd01adbb296737231f31a870322","impliedFormat":1},{"version":"e20c7790d6923b9663bff5ba3b3bb2769f65df6fdd3294034fd9d289034ebe95","impliedFormat":1},{"version":"3df74fc90d6cf9c51ad6864a7d9e1e6d162a6e158f99ab2b7d878b4646aa343b","impliedFormat":1},{"version":"306712d7dc95ea2006413dec36b165bff346626340d2ba5adc14a3bafdcb57db","impliedFormat":1},{"version":"cca7da500accfa2e8689e453b1d74d05bcbf1dc6ef86f12b8cb1518a880adffa","impliedFormat":1},{"version":"9a3b507c7f949ca6e0988c7a799913d8ad237434b61c5f8ef8651c770e82db8e","impliedFormat":1},{"version":"3470c8f802d69951553de4bf72f42a77b1d273c971dc8462d7ac94b2d5069171","impliedFormat":1},{"version":"778e3be9387041245dc4eddd0efe6a61f0ebe4bed017493a30785abd027b0458","impliedFormat":1},{"version":"312476b9c5aa822a32c969ad650d1b475b631506af9a1448abf2d714997f7510","impliedFormat":1},{"version":"2dc955a0fbc3c0b9a49bcc3ffb9dfb31b3a53af0db862260dd4f824c6b4ff36c","impliedFormat":1},{"version":"0f513df152e8cd877ddc47e1a767f77d2111d7b5dfbc4f68ca355d1dd59c062c","impliedFormat":1},{"version":"947dba9cff98d6eeeb5c1933600a03d2ea16967dc3c4080c15e5d4667990f814","impliedFormat":1},{"version":"396b5bf9e2469a7736cc70f5b0a4340bf5e74ca8337213cbfc1f9c44b0e3799c","impliedFormat":1},{"version":"0c904d0442caed7effc17e2c70c7c96df0b34797e1adb9999ce5e5bbbf7e1471","impliedFormat":1},{"version":"4e42a180e6ad34da29c0f9e0e34dfe728292d4148aeb1a36e3ca8e6551f0fc42","impliedFormat":1},{"version":"8722ec4640f5eb5dcc91be6e59e6148b861e93954a766e05d5d55dd96b29e1c1","impliedFormat":1},{"version":"3118f4f3494834d0a131955088b28cba84639a66e23e6de211bdb75fe518ea90","impliedFormat":1},{"version":"8ec50f5d9824f3692fe32a80fb160d72ea39d94c5aac4f3334f7724ae61de6df","impliedFormat":1},{"version":"dfafee7cd0b796c959cd7f4c6d4ae2f1f89fab40129d993dd564f9ef0bd0068d","impliedFormat":1},{"version":"24056a75e8e602d911cea68b06b5e238604aff92d30ec8a119a2ecf07568d4fb","impliedFormat":1},{"version":"bc5fa245e7a3eb9216ce30106e37294a9691efd85391e3de61478c3ca0da360e","impliedFormat":1},{"version":"4523237b5a992a30850668522bb1719bab8f9e50c00b6428f660ca75a451a7b1","impliedFormat":1},{"version":"f116a1399a2583ff7ce15068f007e5c47d06c9964674bc48ea6e69867d0692a5","impliedFormat":1},{"version":"68cabe63e69d17160c77eeefafd83df10a4c0ec3353b6a91a48a205e9dd505ab","impliedFormat":1},{"version":"400ba51008a98a5afc065b12c3aee8f447a0b66c2a4c1bcc3e5a2f41015ddee7","impliedFormat":1},{"version":"49f735c4888a72b7e70b4a90db308ea672967fc2a1670c5b6b598f6b09403baf","impliedFormat":1},{"version":"5a75e49d8e0a78e2cc02bd13fcab4f26d5d6729912e2096b6fe442b0960c0cf7","impliedFormat":1},{"version":"8dd31c3f136773aac1b62723ada4c7fab649dddbe02274424cdac9b9a76bc22d","impliedFormat":1},{"version":"5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","impliedFormat":1},{"version":"c2869c4f2f79fd2d03278a68ce7c061a5a8f4aed59efb655e25fe502e3e471d5","impliedFormat":1},{"version":"b8fe42dbf4b0efba2eb4dbfb2b95a3712676717ff8469767dc439e75d0c1a3b6","impliedFormat":1},{"version":"8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","impliedFormat":1},{"version":"ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","impliedFormat":1},{"version":"83306c97a4643d78420f082547ea0d488a0d134c922c8e65fc0b4f08ef66d92b","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","impliedFormat":1},{"version":"c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","impliedFormat":1},{"version":"dccd26a5c85325a011aff40f401e0892bd0688d44132ba79e803c67e68fffea5","impliedFormat":1},{"version":"f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","impliedFormat":1},{"version":"b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","impliedFormat":1},{"version":"5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","impliedFormat":1},{"version":"9aa0869b3f0b58d5a2220b1d6111ab3a734e9d0b3bd820a59216357c848f413b","signature":"7e0062d659dfc76e70897c1e8d9f4f461f6ac1158da4714877f166f5bbef6161"},"d51485b82b29d07016e9d3359f271622966aca8edfc59648a1d2369e6404123d",{"version":"03f1d83d61696326ea29c8a1c15cbaccf61e92598d53f2ccae06078531f42448","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"3a9313fe5ace558b8b18e85f931da10b259e738775f411c061e5f15787b138eb","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"e9ad08a376ac84948fcca0013d6f1d4ae4f9522e26b91f87945b97c99d7cc30b","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"04296378d9636f6f9450a6e2b9889ea1d3b72a05b9270cb529ace09f04cda1f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"918d3b03a75858dcd5dbb275f19448b6b9a222aa8fc8471aca38c28a32ecb40f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bd91a2a356600dee28eb0438082d0799a18a974a6537c4410a796bab749813c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"ed6b820c54de95b2510bb673490d61c7f2187f532a339d8d04981645a918961f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"aa17748c522bd586f8712b1a308ea23af59c309b2fd278f6d4f406647c72e659","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1}],"root":[218,219],"options":{"declaration":true,"esModuleInterop":true,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":5},"referencedMap":[[222,1],[220,2],[148,3],[144,4],[145,5],[142,2],[147,6],[143,2],[146,5],[155,2],[161,2],[162,2],[163,2],[164,2],[165,2],[166,2],[167,2],[168,2],[169,2],[170,2],[225,7],[221,1],[223,8],[224,1],[324,9],[325,2],[326,10],[327,11],[328,12],[270,13],[271,13],[272,14],[231,15],[273,16],[274,17],[275,18],[226,2],[229,19],[227,2],[228,2],[276,20],[277,21],[278,22],[279,23],[280,24],[281,25],[282,25],[284,26],[283,27],[285,28],[286,29],[287,30],[269,31],[230,2],[288,32],[289,33],[290,34],[323,35],[291,36],[292,37],[293,38],[294,39],[295,40],[296,41],[297,42],[298,43],[299,44],[300,45],[301,45],[302,46],[303,2],[304,2],[305,47],[307,48],[306,49],[308,50],[309,51],[310,52],[311,53],[312,54],[313,55],[314,56],[315,57],[316,58],[317,59],[318,60],[319,61],[320,62],[321,63],[322,64],[329,2],[330,2],[332,65],[333,2],[334,2],[335,66],[81,67],[82,68],[101,69],[96,70],[97,71],[98,72],[99,70],[100,70],[89,73],[88,74],[86,75],[87,76],[92,77],[93,78],[94,78],[95,78],[85,79],[91,80],[90,81],[83,2],[79,2],[80,2],[84,82],[331,2],[174,2],[116,83],[118,84],[120,85],[130,86],[132,87],[109,88],[114,89],[121,90],[133,91],[111,92],[134,93],[124,94],[136,95],[137,93],[139,96],[127,97],[140,98],[149,99],[141,100],[106,101],[151,102],[152,103],[154,104],[102,2],[158,105],[128,106],[107,93],[157,107],[105,108],[117,109],[119,109],[129,110],[131,109],[115,111],[113,112],[135,93],[103,113],[112,113],[153,114],[156,115],[104,116],[150,2],[171,117],[185,118],[175,119],[181,120],[178,121],[179,122],[186,123],[108,2],[201,124],[159,118],[138,113],[160,90],[172,125],[189,126],[173,98],[182,127],[110,100],[122,128],[183,129],[184,130],[180,131],[187,132],[188,133],[123,100],[190,134],[191,2],[125,135],[192,90],[194,136],[195,136],[196,137],[197,138],[193,139],[176,140],[177,141],[198,142],[199,143],[200,118],[202,144],[203,145],[126,116],[204,146],[77,2],[78,2],[13,2],[14,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[25,2],[26,2],[4,2],[27,2],[31,2],[28,2],[29,2],[30,2],[32,2],[33,2],[34,2],[5,2],[35,2],[36,2],[37,2],[38,2],[6,2],[42,2],[39,2],[40,2],[41,2],[43,2],[7,2],[44,2],[49,2],[50,2],[45,2],[46,2],[47,2],[48,2],[8,2],[54,2],[51,2],[52,2],[53,2],[55,2],[9,2],[56,2],[57,2],[58,2],[60,2],[59,2],[61,2],[62,2],[10,2],[63,2],[64,2],[65,2],[11,2],[66,2],[67,2],[68,2],[69,2],[70,2],[1,2],[71,2],[72,2],[12,2],[75,2],[74,2],[73,2],[76,2],[247,147],[257,148],[246,147],[267,149],[238,150],[237,151],[266,12],[260,152],[265,153],[240,154],[254,155],[239,156],[263,157],[235,158],[234,12],[264,159],[236,160],[241,161],[242,2],[245,161],[232,2],[268,162],[258,163],[249,164],[250,165],[252,166],[248,167],[251,168],[261,12],[243,169],[244,170],[253,171],[233,172],[256,163],[255,161],[259,2],[262,173],[217,174],[209,175],[215,176],[211,2],[212,2],[210,177],[213,174],[205,2],[206,2],[216,178],[208,179],[214,180],[207,181],[219,182],[218,183]],"version":"5.7.2"}
node_modules/@farcaster/frame-core/dist/types.d.ts
Changed around line 0
- import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from "ox";
- import { z } from "zod";
- export type SetPrimaryButton = (options: {
- text: string;
- loading?: boolean;
- disabled?: boolean;
- hidden?: boolean;
- }) => void;
- export type EthProviderRequest = Provider.RequestFn;
- export type AccountLocation = {
- placeId: string;
- /**
- * Human-readable string describing the location
- */
- description: string;
- };
- export type FrameLocationNotificationContext = {
- type: "notification";
- notification: {
- notificationId: string;
- title: string;
- body: string;
- };
- };
- export type FrameLocationContext = FrameLocationNotificationContext;
- export type FrameContext = {
- user: {
- fid: number;
- username?: string;
- displayName?: string;
- /**
- * Profile image URL
- */
- pfpUrl?: string;
- };
- location?: FrameLocationContext;
- };
- export declare const notificationDetailsSchema: z.ZodObject<{
- url: z.ZodString;
- token: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- url: string;
- token: string;
- }, {
- url: string;
- token: string;
- }>;
- export type FrameNotificationDetails = z.infer;
- export type AddFrameResult = {
- added: true;
- notificationDetails?: FrameNotificationDetails;
- } | {
- added: false;
- reason: "invalid-domain-manifest" | "rejected-by-user";
- };
- export type AddFrame = () => Promise;
- export type FrameHost = {
- context: FrameContext;
- close: () => void;
- ready: () => void;
- openUrl: (url: string) => void;
- setPrimaryButton: SetPrimaryButton;
- ethProviderRequest: EthProviderRequest;
- ethProviderRequestV2: RpcTransport;
- addFrame: AddFrame;
- };
- export declare const eventSchema: z.ZodObject<{
- header: z.ZodString;
- payload: z.ZodString;
- signature: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- header: string;
- payload: string;
- signature: string;
- }, {
- header: string;
- payload: string;
- signature: string;
- }>;
- export type EventSchema = z.infer;
- export declare const eventHeaderSchema: z.ZodObject<{
- fid: z.ZodNumber;
- type: z.ZodLiteral<"app_key">;
- key: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- type: "app_key";
- fid: number;
- key: string;
- }, {
- type: "app_key";
- fid: number;
- key: string;
- }>;
- export type EventHeader = z.infer;
- export declare const eventFrameAddedPayloadSchema: z.ZodObject<{
- event: z.ZodLiteral<"frame-added">;
- notificationDetails: z.ZodOptional
- url: z.ZodString;
- token: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- url: string;
- token: string;
- }, {
- url: string;
- token: string;
- }>>;
- }, "strip", z.ZodTypeAny, {
- event: "frame-added";
- notificationDetails?: {
- url: string;
- token: string;
- } | undefined;
- }, {
- event: "frame-added";
- notificationDetails?: {
- url: string;
- token: string;
- } | undefined;
- }>;
- export type EventFrameAddedPayload = z.infer;
- export declare const eventFrameRemovedPayloadSchema: z.ZodObject<{
- event: z.ZodLiteral<"frame-removed">;
- }, "strip", z.ZodTypeAny, {
- event: "frame-removed";
- }, {
- event: "frame-removed";
- }>;
- export type EventFrameRemovedPayload = z.infer;
- export declare const eventNotificationsEnabledPayloadSchema: z.ZodObject<{
- event: z.ZodLiteral<"notifications-enabled">;
- notificationDetails: z.ZodObject<{
- url: z.ZodString;
- token: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- url: string;
- token: string;
- }, {
- url: string;
- token: string;
- }>;
- }, "strip", z.ZodTypeAny, {
- event: "notifications-enabled";
- notificationDetails: {
- url: string;
- token: string;
- };
- }, {
- event: "notifications-enabled";
- notificationDetails: {
- url: string;
- token: string;
- };
- }>;
- export type EventNotificationsEnabledPayload = z.infer;
- export declare const notificationsDisabledPayloadSchema: z.ZodObject<{
- event: z.ZodLiteral<"notifications-disabled">;
- }, "strip", z.ZodTypeAny, {
- event: "notifications-disabled";
- }, {
- event: "notifications-disabled";
- }>;
- export type EventNotificationsDisabledPayload = z.infer;
- export declare const eventPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
- event: z.ZodLiteral<"frame-added">;
- notificationDetails: z.ZodOptional
- url: z.ZodString;
- token: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- url: string;
- token: string;
- }, {
- url: string;
- token: string;
- }>>;
- }, "strip", z.ZodTypeAny, {
- event: "frame-added";
- notificationDetails?: {
- url: string;
- token: string;
- } | undefined;
- }, {
- event: "frame-added";
- notificationDetails?: {
- url: string;
- token: string;
- } | undefined;
- }>, z.ZodObject<{
- event: z.ZodLiteral<"frame-removed">;
- }, "strip", z.ZodTypeAny, {
- event: "frame-removed";
- }, {
- event: "frame-removed";
- }>, z.ZodObject<{
- event: z.ZodLiteral<"notifications-enabled">;
- notificationDetails: z.ZodObject<{
- url: z.ZodString;
- token: z.ZodString;
- }, "strip", z.ZodTypeAny, {
- url: string;
- token: string;
- }, {
- url: string;
- token: string;
- }>;
- }, "strip", z.ZodTypeAny, {
- event: "notifications-enabled";
- notificationDetails: {
- url: string;
- token: string;
- };
- }, {
- event: "notifications-enabled";
- notificationDetails: {
- url: string;
- token: string;
- };
- }>, z.ZodObject<{
- event: z.ZodLiteral<"notifications-disabled">;
- }, "strip", z.ZodTypeAny, {
- event: "notifications-disabled";
- }, {
- event: "notifications-disabled";
- }>]>;
- export type FrameEvent = z.infer;
- export declare const sendNotificationRequestSchema: z.ZodObject<{
- notificationId: z.ZodString;
- title: z.ZodString;
- body: z.ZodString;
- targetUrl: z.ZodString;
- tokens: z.ZodArray;
- }, "strip", z.ZodTypeAny, {
- notificationId: string;
- title: string;
- body: string;
- targetUrl: string;
- tokens: string[];
- }, {
- notificationId: string;
- title: string;
- body: string;
- targetUrl: string;
- tokens: string[];
- }>;
- export type SendNotificationRequest = z.infer;
- export declare const sendNotificationResponseSchema: z.ZodObject<{
- result: z.ZodObject<{
- successfulTokens: z.ZodArray;
- invalidTokens: z.ZodArray;
- rateLimitedTokens: z.ZodArray;
- }, "strip", z.ZodTypeAny, {
- successfulTokens: string[];
- invalidTokens: string[];
- rateLimitedTokens: string[];
- }, {
- successfulTokens: string[];
- invalidTokens: string[];
- rateLimitedTokens: string[];
- }>;
- }, "strip", z.ZodTypeAny, {
- result: {
- successfulTokens: string[];
- invalidTokens: string[];
- rateLimitedTokens: string[];
- };
- }, {
- result: {
- successfulTokens: string[];
- invalidTokens: string[];
- rateLimitedTokens: string[];
- };
- }>;
- export type SendNotificationResponse = z.infer;
- export type RpcTransport = (request: RpcRequest.RpcRequest) => Promise;
- export type ProviderRpcError = {
- code: number;
- details?: string;
- message?: string;
- };
- export type EthProviderWireEvent = {
- event: "accountsChanged";
- params: [readonly Address.Address[]];
- } | {
- event: "chainChanged";
- params: [string];
- } | {
- event: "connect";
- params: [Provider.ConnectInfo];
- } | {
- event: "disconnect";
- params: [ProviderRpcError];
- } | {
- event: "message";
- params: [Provider.Message];
- };
- export type EmitEthProvider = (event: event, params: Extract
- event: event;
- }>['params']) => void;
node_modules/@farcaster/frame-core/dist/types.js
Changed around line 0
- import { z } from "zod";
- export const notificationDetailsSchema = z.object({
- url: z.string(),
- token: z.string(),
- });
- export const eventSchema = z.object({
- header: z.string(),
- payload: z.string(),
- signature: z.string(),
- });
- // JSON Farcaster Signature header after decoding
- export const eventHeaderSchema = z.object({
- fid: z.number(),
- type: z.literal("app_key"),
- key: z.string().startsWith("0x"),
- });
- // Webhook event payload after decoding
- export const eventFrameAddedPayloadSchema = z.object({
- event: z.literal("frame-added"),
- notificationDetails: notificationDetailsSchema.optional(),
- });
- export const eventFrameRemovedPayloadSchema = z.object({
- event: z.literal("frame-removed"),
- });
- export const eventNotificationsEnabledPayloadSchema = z.object({
- event: z.literal("notifications-enabled"),
- notificationDetails: notificationDetailsSchema.required(),
- });
- export const notificationsDisabledPayloadSchema = z.object({
- event: z.literal("notifications-disabled"),
- });
- export const eventPayloadSchema = z.discriminatedUnion("event", [
- eventFrameAddedPayloadSchema,
- eventFrameRemovedPayloadSchema,
- eventNotificationsEnabledPayloadSchema,
- notificationsDisabledPayloadSchema,
- ]);
- // Notifications API request and response formats
- export const sendNotificationRequestSchema = z.object({
- notificationId: z.string().uuid(),
- title: z.string().max(32),
- body: z.string().max(128),
- targetUrl: z.string().max(256),
- tokens: z.string().array().max(100),
- });
- export const sendNotificationResponseSchema = z.object({
- result: z.object({
- successfulTokens: z.array(z.string()),
- invalidTokens: z.array(z.string()),
- rateLimitedTokens: z.array(z.string()),
- }),
- });
node_modules/@farcaster/frame-core/package.json
Changed around line 0
- {
- "name": "@farcaster/frame-core",
- "version": "0.0.7",
- "main": "dist/index.js",
- "scripts": {
- "clean": "rm -rf dist",
- "prebuild": "npm run clean",
- "build": "tsc",
- "typecheck": "tsc --noEmit"
- },
- "files": [
- "dist",
- "src"
- ],
- "devDependencies": {
- "@farcaster/tsconfig": "*",
- "typescript": "^5.6.3"
- },
- "dependencies": {
- "ox": "^0.4.0",
- "zod": "^3.23.8"
- },
- "publishConfig": {
- "access": "public"
- }
- }
node_modules/@farcaster/frame-core/src/index.ts
Changed around line 0
- export * from "./types";
node_modules/@farcaster/frame-core/src/types.ts
Changed around line 0
- import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from "ox";
- import { z } from "zod";
-
- export type SetPrimaryButton = (options: {
- text: string;
- loading?: boolean;
- disabled?: boolean;
- hidden?: boolean;
- }) => void;
-
- export type EthProviderRequest = Provider.RequestFn;
-
- export type AccountLocation = {
- placeId: string;
- /**
- * Human-readable string describing the location
- */
- description: string;
- };
-
- export type FrameLocationNotificationContext = {
- type: "notification";
- notification: {
- notificationId: string;
- title: string;
- body: string;
- };
- };
-
- export type FrameLocationContext = FrameLocationNotificationContext;
-
- export type FrameContext = {
- user: {
- fid: number;
- username?: string;
- displayName?: string;
- /**
- * Profile image URL
- */
- pfpUrl?: string;
- };
- location?: FrameLocationContext;
- };
-
- export const notificationDetailsSchema = z.object({
- url: z.string(),
- token: z.string(),
- });
- export type FrameNotificationDetails = z.infer<
- typeof notificationDetailsSchema
- >;
-
- export type AddFrameResult =
- | {
- added: true;
- notificationDetails?: FrameNotificationDetails;
- }
- | {
- added: false;
- reason: "invalid-domain-manifest" | "rejected-by-user";
- };
-
- export type AddFrame = () => Promise;
-
- export type FrameHost = {
- context: FrameContext;
- close: () => void;
- ready: () => void;
- openUrl: (url: string) => void;
- setPrimaryButton: SetPrimaryButton;
- ethProviderRequest: EthProviderRequest;
- ethProviderRequestV2: RpcTransport;
- addFrame: AddFrame;
- };
-
- export const eventSchema = z.object({
- header: z.string(),
- payload: z.string(),
- signature: z.string(),
- });
- export type EventSchema = z.infer;
-
- // JSON Farcaster Signature header after decoding
-
- export const eventHeaderSchema = z.object({
- fid: z.number(),
- type: z.literal("app_key"),
- key: z.string().startsWith("0x"),
- });
- export type EventHeader = z.infer;
-
- // Webhook event payload after decoding
-
- export const eventFrameAddedPayloadSchema = z.object({
- event: z.literal("frame-added"),
- notificationDetails: notificationDetailsSchema.optional(),
- });
- export type EventFrameAddedPayload = z.infer<
- typeof eventFrameAddedPayloadSchema
- >;
-
- export const eventFrameRemovedPayloadSchema = z.object({
- event: z.literal("frame-removed"),
- });
- export type EventFrameRemovedPayload = z.infer<
- typeof eventFrameRemovedPayloadSchema
- >;
-
- export const eventNotificationsEnabledPayloadSchema = z.object({
- event: z.literal("notifications-enabled"),
- notificationDetails: notificationDetailsSchema.required(),
- });
- export type EventNotificationsEnabledPayload = z.infer<
- typeof eventNotificationsEnabledPayloadSchema
- >;
-
- export const notificationsDisabledPayloadSchema = z.object({
- event: z.literal("notifications-disabled"),
- });
- export type EventNotificationsDisabledPayload = z.infer<
- typeof notificationsDisabledPayloadSchema
- >;
-
- export const eventPayloadSchema = z.discriminatedUnion("event", [
- eventFrameAddedPayloadSchema,
- eventFrameRemovedPayloadSchema,
- eventNotificationsEnabledPayloadSchema,
- notificationsDisabledPayloadSchema,
- ]);
- export type FrameEvent = z.infer;
-
- // Notifications API request and response formats
-
- export const sendNotificationRequestSchema = z.object({
- notificationId: z.string().uuid(),
- title: z.string().max(32),
- body: z.string().max(128),
- targetUrl: z.string().max(256),
- tokens: z.string().array().max(100),
- });
- export type SendNotificationRequest = z.infer<
- typeof sendNotificationRequestSchema
- >;
-
- export const sendNotificationResponseSchema = z.object({
- result: z.object({
- successfulTokens: z.array(z.string()),
- invalidTokens: z.array(z.string()),
- rateLimitedTokens: z.array(z.string()),
- }),
- });
- export type SendNotificationResponse = z.infer<
- typeof sendNotificationResponseSchema
- >;
-
- export type RpcTransport = (
- request: RpcRequest.RpcRequest
- ) => Promise;
-
- export type ProviderRpcError = {
- code: number;
- details?: string;
- message?: string;
- }
-
- export type EthProviderWireEvent = {
- event: "accountsChanged",
- params: [readonly Address.Address[]]
- } | {
- event: "chainChanged",
- params: [string]
- } | {
- event: "connect",
- params: [Provider.ConnectInfo]
- } | {
- event: "disconnect",
- params: [ProviderRpcError]
- } | {
- event: "message",
- params: [Provider.Message]
- };
-
- export type EmitEthProvider = <
- event extends EthProviderWireEvent['event']
- >(
- event: event,
- params: Extract['params']
- ) => void;
node_modules/@farcaster/frame-sdk/README.md
Changed around line 0
- # Frame SDK
-
- Not yet stable. [Learn more](https://github.com/farcasterxyz/frames/wiki/frames-v2-developer-playground-preview).
-
- ## Install
-
- Install using your favorite manager:
-
- ```
- npm install @farcaster/frame-sdk
- ```
-
- Or include via a CDN and access via `frame`:
-
- ```
-
-
- ```
-
node_modules/@farcaster/frame-sdk/dist/endpoint.d.ts
Changed around line 0
- import { type Endpoint } from "comlink";
- export declare const endpoint: Endpoint;
node_modules/@farcaster/frame-sdk/dist/endpoint.js
Changed around line 0
- import { windowEndpoint } from "comlink";
- const mockEndpoint = {
- postMessage() {
- // noop
- },
- addEventListener: () => {
- // noop
- },
- removeEventListener: () => {
- // noop
- },
- };
- const webViewEndpoint = {
- postMessage: (data) => {
- console.debug("[webview:req]", data);
- window.ReactNativeWebView.postMessage(JSON.stringify(data));
- },
- addEventListener: (_, listener, ...args) => {
- document.addEventListener("FarcasterFrameCallback", listener, ...args);
- },
- removeEventListener: (_, listener) => {
- document.removeEventListener("FarcasterFrameCallback", listener);
- },
- };
- export const endpoint = (() => {
- var _a;
- // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint
- if (typeof window === 'undefined')
- return mockEndpoint;
- return (window === null || window === void 0 ? void 0 : window.ReactNativeWebView)
- ? webViewEndpoint
- : windowEndpoint((_a = window === null || window === void 0 ? void 0 : window.parent) !== null && _a !== void 0 ? _a : window);
- })();
node_modules/@farcaster/frame-sdk/dist/frameHost.d.ts
Changed around line 0
- import { FrameHost } from "@farcaster/frame-core";
- export declare const frameHost: import("comlink").Remote;
node_modules/@farcaster/frame-sdk/dist/frameHost.js
Changed around line 0
- import { wrap } from "comlink";
- import { endpoint } from "./endpoint";
- export const frameHost = wrap(endpoint);
node_modules/@farcaster/frame-sdk/dist/index.d.ts
Changed around line 0
- import { sdk } from "./sdk";
- export * from "./sdk";
- export * from "@farcaster/frame-core";
- export default sdk;
node_modules/@farcaster/frame-sdk/dist/index.js
Changed around line 0
- import { sdk } from "./sdk";
- export * from "./sdk";
- export * from "@farcaster/frame-core";
- export default sdk;
node_modules/@farcaster/frame-sdk/dist/index.min.js
Changed around line 0
- "use strict";var frame=(()=>{var nr=Object.create;var Ve=Object.defineProperty;var sr=Object.getOwnPropertyDescriptor;var ar=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var cr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),De=(t,e)=>{for(var r in e)Ve(t,r,{get:e[r],enumerable:!0})},bt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ar(e))!or.call(t,s)&&s!==r&&Ve(t,s,{get:()=>e[s],enumerable:!(n=sr(e,s))||n.enumerable});return t};var ur=(t,e,r)=>(r=t!=null?nr(ir(t)):{},bt(e||!t||!t.__esModule?Ve(r,"default",{value:t,enumerable:!0}):r,t)),dr=t=>bt(Ve({},"__esModule",{value:!0}),t);var xt=cr((qn,ot)=>{"use strict";var lr=Object.prototype.hasOwnProperty,j="~";function Ce(){}Object.create&&(Ce.prototype=Object.create(null),new Ce().__proto__||(j=!1));function fr(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function _t(t,e,r,n,s){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new fr(r,n||t,s),i=j?j+e:e;return t._events[i]?t._events[i].fn?t._events[i]=[t._events[i],a]:t._events[i].push(a):(t._events[i]=a,t._eventsCount++),t}function ze(t,e){--t._eventsCount===0?t._events=new Ce:delete t._events[e]}function k(){this._events=new Ce,this._eventsCount=0}k.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)lr.call(r,n)&&e.push(j?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};k.prototype.listeners=function(e){var r=j?j+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,a=n.length,i=new Array(a);sVt,default:()=>zn,eventFrameAddedPayloadSchema:()=>Qt,eventFrameRemovedPayloadSchema:()=>er,eventHeaderSchema:()=>Ln,eventNotificationsEnabledPayloadSchema:()=>tr,eventPayloadSchema:()=>$n,eventSchema:()=>Zn,notificationDetailsSchema:()=>gt,notificationsDisabledPayloadSchema:()=>rr,sdk:()=>ft,sendNotificationRequestSchema:()=>Vn,sendNotificationResponseSchema:()=>Dn});var Ne=ur(xt(),1);var kt=Symbol("Comlink.proxy"),pr=Symbol("Comlink.endpoint"),hr=Symbol("Comlink.releaseProxy"),ct=Symbol("Comlink.finalizer"),Be=Symbol("Comlink.thrown"),Et=t=>typeof t=="object"&&t!==null||typeof t=="function",mr={canHandle:t=>Et(t)&&t[kt],serialize(t){let{port1:e,port2:r}=new MessageChannel;return Ot(t,e),[r,[r]]},deserialize(t){return t.start(),dt(t)}},vr={canHandle:t=>Et(t)&&Be in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},Tt=new Map([["proxy",mr],["throw",vr]]);function yr(t,e){for(let r of t)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function Ot(t,e=globalThis,r=["*"]){e.addEventListener("message",function n(s){if(!s||!s.data)return;if(!yr(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}let{id:a,type:i,path:o}=Object.assign({path:[]},s.data),c=(s.data.argumentList||[]).map(F),u;try{let f=o.slice(0,-1).reduce((w,O)=>w[O],t),y=o.reduce((w,O)=>w[O],t);switch(i){case"GET":u=y;break;case"SET":f[o.slice(-1)[0]]=F(s.data.value),u=!0;break;case"APPLY":u=y.apply(f,c);break;case"CONSTRUCT":{let w=new y(...c);u=kr(w)}break;case"ENDPOINT":{let{port1:w,port2:O}=new MessageChannel;Ot(t,O),u=wr(w,[w])}break;case"RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[Be]:0}}Promise.resolve(u).catch(f=>({value:f,[Be]:0})).then(f=>{let[y,w]=He(f);e.postMessage(Object.assign(Object.assign({},y),{id:a}),w),i==="RELEASE"&&(e.removeEventListener("message",n),jt(e),ct in t&&typeof t[ct]=="function"&&t[ct]())}).catch(f=>{let[y,w]=He({value:new TypeError("Unserializable return value"),[Be]:0});e.postMessage(Object.assign(Object.assign({},y),{id:a}),w)})}),e.start&&e.start()}function gr(t){return t.constructor.name==="MessagePort"}function jt(t){gr(t)&&t.close()}function dt(t,e){let r=new Map;return t.addEventListener("message",function(s){let{data:a}=s;if(!a||!a.id)return;let i=r.get(a.id);if(i)try{i(a)}finally{r.delete(a.id)}}),ut(t,r,[],e)}function Ue(t){if(t)throw new Error("Proxy has been released and is not useable")}function Pt(t){return de(t,new Map,{type:"RELEASE"}).then(()=>{jt(t)})}var qe=new WeakMap,We="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{let e=(qe.get(t)||0)-1;qe.set(t,e),e===0&&Pt(t)});function br(t,e){let r=(qe.get(e)||0)+1;qe.set(e,r),We&&We.register(t,e,t)}function _r(t){We&&We.unregister(t)}function ut(t,e,r=[],n=function(){}){let s=!1,a=new Proxy(n,{get(i,o){if(Ue(s),o===hr)return()=>{_r(a),Pt(t),e.clear(),s=!0};if(o==="then"){if(r.length===0)return{then:()=>a};let c=de(t,e,{type:"GET",path:r.map(u=>u.toString())}).then(F);return c.then.bind(c)}return ut(t,e,[...r,o])},set(i,o,c){Ue(s);let[u,f]=He(c);return de(t,e,{type:"SET",path:[...r,o].map(y=>y.toString()),value:u},f).then(F)},apply(i,o,c){Ue(s);let u=r[r.length-1];if(u===pr)return de(t,e,{type:"ENDPOINT"}).then(F);if(u==="bind")return ut(t,e,r.slice(0,-1));let[f,y]=wt(c);return de(t,e,{type:"APPLY",path:r.map(w=>w.toString()),argumentList:f},y).then(F)},construct(i,o){Ue(s);let[c,u]=wt(o);return de(t,e,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(F)}});return br(a,t),a}function xr(t){return Array.prototype.concat.apply([],t)}function wt(t){let e=t.map(He);return[e.map(r=>r[0]),xr(e.map(r=>r[1]))]}var Rt=new WeakMap;function wr(t,e){return Rt.set(t,e),t}function kr(t){return Object.assign(t,{[kt]:!0})}function St(t,e=globalThis,r="*"){return{postMessage:(n,s)=>t.postMessage(n,r,s),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}function He(t){for(let[e,r]of Tt)if(r.canHandle(t)){let[n,s]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},s]}return[{type:"RAW",value:t},Rt.get(t)||[]]}function F(t){switch(t.type){case"HANDLER":return Tt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function de(t,e,r,n){return new Promise(s=>{let a=Er();e.set(a,s),t.start&&t.start(),t.postMessage(Object.assign({id:a},r),n)})}function Er(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Tr={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},Or={postMessage:t=>{console.debug("[webview:req]",t),window.ReactNativeWebView.postMessage(JSON.stringify(t))},addEventListener:(t,e,...r)=>{document.addEventListener("FarcasterFrameCallback",e,...r)},removeEventListener:(t,e)=>{document.removeEventListener("FarcasterFrameCallback",e)}},Ct=typeof window>"u"?Tr:window?.ReactNativeWebView?Or:St(window?.parent??window);var P=dt(Ct);var Nt="0.1.1";function At(){return Nt}var Fe=class t extends Error{constructor(e,r={}){let n=(()=>{if(r.cause instanceof t){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),s=r.cause instanceof t&&r.cause.docsPath||r.docsPath,i=`https://oxlib.sh${s??""}`,o=[e||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||s?["",n?`Details: ${n}`:void 0,s?`See: ${i}`:void 0]:[]].filter(c=>typeof c=="string").join(`
- `);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${At()}`}),this.cause=r.cause,this.details=n,this.docs=i,this.docsPath=s,this.shortMessage=e}walk(e){return Mt(this,e)}};function Mt(t,e){return e?.(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?Mt(t.cause,e):e?null:t}var A={};De(A,{ChainDisconnectedError:()=>Xe,DisconnectedError:()=>Ke,IsUndefinedError:()=>Qe,ProviderRpcError:()=>U,UnauthorizedError:()=>Ge,UnsupportedMethodError:()=>Ye,UserRejectedRequestError:()=>Je,createEmitter:()=>Pr,from:()=>Rr});var J={};De(J,{BaseError:()=>E,InternalError:()=>xe,InvalidInputError:()=>le,InvalidParamsError:()=>_e,InvalidRequestError:()=>ge,LimitExceededError:()=>ve,MethodNotFoundError:()=>be,MethodNotSupportedError:()=>me,ParseError:()=>we,ResourceNotFoundError:()=>fe,ResourceUnavailableError:()=>pe,TransactionRejectedError:()=>he,VersionNotSupportedError:()=>ye,from:()=>jr,parse:()=>lt});function jr(t,e={}){let{request:r}=e;return{...t,id:t.id??r?.id,jsonrpc:t.jsonrpc??r.jsonrpc}}function lt(t,e={}){let{raw:r=!1}=e,n=t;if(r)return t;if(n.error){let{code:s}=n.error,a=s===xe.code?xe:s===le.code?le:s===_e.code?_e:s===ge.code?ge:s===ve.code?ve:s===be.code?be:s===me.code?me:s===we.code?we:s===fe.code?fe:s===pe.code?pe:s===he.code?he:s===ye.code?ye:E;throw new a(n.error)}return n.result}var E=class extends Error{constructor(e){let{code:r,message:n,data:s}=e;super(n),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r,this.data=s}},le=class t extends E{constructor(e={}){super({message:"Missing or invalid parameters.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidInputError"})}};Object.defineProperty(le,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});var fe=class t extends E{constructor(e={}){super({message:"Requested resource not found.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceNotFoundError"})}};Object.defineProperty(fe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});var pe=class t extends E{constructor(e={}){super({message:"Requested resource not available.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceUnavailableError"})}};Object.defineProperty(pe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});var he=class t extends E{constructor(e={}){super({message:"Transaction creation failed.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.TransactionRejectedError"})}};Object.defineProperty(he,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});var me=class t extends E{constructor(e={}){super({message:"Method is not implemented.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotSupportedError"})}};Object.defineProperty(me,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});var ve=class t extends E{constructor(e={}){super({message:"Rate limit exceeded.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.LimitExceededError"})}};Object.defineProperty(ve,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});var ye=class t extends E{constructor(e={}){super({message:"JSON-RPC version not supported.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.VersionNotSupportedError"})}};Object.defineProperty(ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});var ge=class t extends E{constructor(e={}){super({message:"Input is not a valid JSON-RPC request.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidRequestError"})}};Object.defineProperty(ge,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});var be=class t extends E{constructor(e={}){super({message:"Method does not exist.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotFoundError"})}};Object.defineProperty(be,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});var _e=class t extends E{constructor(e={}){super({message:"Invalid method parameters.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidParamsError"})}};Object.defineProperty(_e,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});var xe=class t extends E{constructor(e={}){super({message:"Internal JSON-RPC error.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InternalErrorError"})}};Object.defineProperty(xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});var we=class t extends E{constructor(e={}){super({message:"Failed to parse JSON-RPC response.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ParseError"})}};Object.defineProperty(we,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});var U=class extends Error{constructor(e,r){super(r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=r}},Je=class extends U{constructor({message:e="The user rejected the request."}={}){super(4001,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UserRejectedRequestError"})}};Object.defineProperty(Je,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});var Ge=class extends U{constructor({message:e="The requested method and/or account has not been authorized by the user."}={}){super(4100,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnauthorizedError"})}};Object.defineProperty(Ge,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});var Ye=class extends U{constructor({message:e="The provider does not support the requested method."}={}){super(4200,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnsupportedMethodError"})}};Object.defineProperty(Ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});var Ke=class extends U{constructor({message:e="The provider is disconnected from all chains."}={}){super(4900,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.DisconnectedError"})}};Object.defineProperty(Ke,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});var Xe=class extends U{constructor({message:e="The provider is not connected to the requested chain."}={}){super(4901,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.ChainDisconnectedError"})}};Object.defineProperty(Xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});function Pr(){let t=new Ne.default;return{get eventNames(){return t.eventNames.bind(t)},get listenerCount(){return t.listenerCount.bind(t)},get listeners(){return t.listeners.bind(t)},addListener:t.addListener.bind(t),emit:t.emit.bind(t),off:t.off.bind(t),on:t.on.bind(t),once:t.once.bind(t),removeAllListeners:t.removeAllListeners.bind(t),removeListener:t.removeListener.bind(t)}}function Rr(t,e={}){let{includeEvents:r=!0}=e;if(!t)throw new Qe;return{...r?{on:t.on?.bind(t),removeListener:t.removeListener?.bind(t)}:{},async request(n){let s=await t.request(n);return s&&typeof s=="object"&&"jsonrpc"in s?lt(s):s}}}var Qe=class extends Fe{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.IsUndefinedError"})}};var et={};De(et,{createStore:()=>Sr,from:()=>Zt});function Sr(t={}){let e=t.id??0;return{prepare(r){return Zt({id:e++,...r})},get id(){return e}}}function Zt(t){return{...t,jsonrpc:"2.0"}}var Lt=A.createEmitter(),Cr=et.createStore();function Nr({code:t,details:e}){switch(t){case 4001:return new A.UserRejectedRequestError;case 4100:return new A.UnauthorizedError;case 4200:return new A.UnsupportedMethodError;case 4900:return new A.DisconnectedError;case 4901:return new A.ChainDisconnectedError;default:return new A.ProviderRpcError(t,e??"Unknown provider RPC error")}}var $t=A.from({...Lt,async request(t){let e=Cr.prepare(t);try{let r=await P.ethProviderRequestV2(e).then(n=>J.parse(n,{request:e,raw:!0}));if(r.error)throw Nr(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await P.ethProviderRequest(e);throw r instanceof A.ProviderRpcError||r instanceof J.BaseError?r:new J.InternalError({message:r instanceof Error?r.message:void 0})}}});typeof document<"u"&&document.addEventListener("FarcasterFrameEthProviderEvent",t=>{if(t instanceof MessageEvent){let e=t.data;Lt.emit(e.event,...e.params)}});function Vt(){let t=new Ne.default;return{get eventNames(){return t.eventNames.bind(t)},get listenerCount(){return t.listenerCount.bind(t)},get listeners(){return t.listeners.bind(t)},addListener:t.addListener.bind(t),emit:t.emit.bind(t),off:t.off.bind(t),on:t.on.bind(t),once:t.once.bind(t),removeAllListeners:t.removeAllListeners.bind(t),removeListener:t.removeListener.bind(t)}}var Dt=Vt(),ft={...Dt,context:P.context,actions:{setPrimaryButton:P.setPrimaryButton.bind(P),ready:P.ready.bind(P),close:P.close.bind(P),openUrl:P.openUrl.bind(P),addFrame:P.addFrame.bind(P)},wallet:{ethProvider:$t}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",t=>{t instanceof MessageEvent&&t.data.type==="primaryButtonClicked"&&Dt.emit("primaryButtonClicked")});var x;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let a={};for(let i of s)a[i]=i;return a},t.getValidEnumValues=s=>{let a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(let o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let a=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(let i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var ht;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ht||(ht={}));var p=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=t=>{switch(typeof t){case"undefined":return p.undefined;case"string":return p.string;case"number":return isNaN(t)?p.nan:p.number;case"boolean":return p.boolean;case"function":return p.function;case"bigint":return p.bigint;case"symbol":return p.symbol;case"object":return Array.isArray(t)?p.array:t===null?p.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?p.promise:typeof Map<"u"&&t instanceof Map?p.map:typeof Set<"u"&&t instanceof Set?p.set:typeof Date<"u"&&t instanceof Date?p.date:p.object;default:return p.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ar=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),C=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,c=0;for(;cr.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};C.create=t=>new C(t);var Te=(t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===p.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}},Bt=Te;function Mr(t){Bt=t}function tt(){return Bt}var rt=t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)o=u(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},Ir=[];function l(t,e){let r=tt(),n=rt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Te?void 0:Te].filter(s=>!!s)});t.common.issues.push(n)}var T=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return v;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let a=await s.key,i=await s.value;n.push({key:a,value:i})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return v;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}},v=Object.freeze({status:"aborted"}),Ee=t=>({status:"dirty",value:t}),R=t=>({status:"valid",value:t}),mt=t=>t.status==="aborted",vt=t=>t.status==="dirty",Ie=t=>t.status==="valid",Ze=t=>typeof Promise<"u"&&t instanceof Promise;function nt(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function qt(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}var h;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var Ae,Me,I=class{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},zt=(t,e)=>{if(Ie(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new C(t.common.issues);return this._error=r,this._error}}};function g(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var c,u;let{message:f}=t;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:(c=f??n)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:o.defaultError}},description:s}}var b=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ze(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},a=this._parseSync({data:e,path:s.path,parent:s});return zt(s,a)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(Ze(s)?s:Promise.resolve(s));return zt(n,a)}refine(e,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{let i=e(s),o=()=>a.addIssue({code:d.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new N({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return M.create(this,this._def)}nullable(){return $.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this,this._def)}promise(){return H.create(this,this._def)}or(e){return te.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new N({...g(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new oe({...g(this._def),innerType:this,defaultValue:r,typeName:m.ZodDefault})}brand(){return new Le({typeName:m.ZodBranded,type:this,...g(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ce({...g(this._def),innerType:this,catchValue:r,typeName:m.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return ue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Zr=/^c[^\s-]{8,}$/i,Lr=/^[0-9a-z]+$/,$r=/^[0-9A-HJKMNP-TV-Z]{26}$/,Vr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Dr=/^[a-z0-9_-]{21}$/i,zr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ur=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Br="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pt,qr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Wr=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Hr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Fr=new RegExp(`^${Wt}$`);function Ht(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Jr(t){return new RegExp(`^${Ht(t)}$`)}function Ft(t){let e=`${Wt}T${Ht(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Gr(t,e){return!!((e==="v4"||!e)&&qr.test(t)||(e==="v6"||!e)&&Wr.test(t))}var q=class t extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.string,received:a.parsedType}),v}let n=new T,s;for(let a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.lengthe.test(s),{validation:r,code:d.invalid_string,...h.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...h.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...h.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...h.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...h.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...h.errToObj(r)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value{var e;return new q({checks:[],typeName:m.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...g(t)})};function Yr(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}var G=class t extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.number,received:a.parsedType}),v}let n,s=new T;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Yr(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_finite,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,h.toString(r))}gt(e,r){return this.setLimit("min",e,!1,h.toString(r))}lte(e,r){return this.setLimit("max",e,!0,h.toString(r))}lt(e,r){return this.setLimit("max",e,!1,h.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.valuenew G({checks:[],typeName:m.ZodNumber,coerce:t?.coerce||!1,...g(t)});var Y=class t extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==p.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.bigint,received:a.parsedType}),v}let n,s=new T;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,h.toString(r))}gt(e,r){return this.setLimit("min",e,!1,h.toString(r))}lte(e,r){return this.setLimit("max",e,!0,h.toString(r))}lt(e,r){return this.setLimit("max",e,!1,h.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value{var e;return new Y({checks:[],typeName:m.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...g(t)})};var K=class extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.boolean,received:n.parsedType}),v}return R(e.data)}};K.create=t=>new K({typeName:m.ZodBoolean,coerce:t?.coerce||!1,...g(t)});var X=class t extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.date,received:a.parsedType}),v}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),v}let n=new T,s;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew X({checks:[],coerce:t?.coerce||!1,typeName:m.ZodDate,...g(t)});var Oe=class extends b{_parse(e){if(this._getType(e)!==p.symbol){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.symbol,received:n.parsedType}),v}return R(e.data)}};Oe.create=t=>new Oe({typeName:m.ZodSymbol,...g(t)});var Q=class extends b{_parse(e){if(this._getType(e)!==p.undefined){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.undefined,received:n.parsedType}),v}return R(e.data)}};Q.create=t=>new Q({typeName:m.ZodUndefined,...g(t)});var ee=class extends b{_parse(e){if(this._getType(e)!==p.null){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.null,received:n.parsedType}),v}return R(e.data)}};ee.create=t=>new ee({typeName:m.ZodNull,...g(t)});var W=class extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}};W.create=t=>new W({typeName:m.ZodAny,...g(t)});var D=class extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}};D.create=t=>new D({typeName:m.ZodUnknown,...g(t)});var Z=class extends b{_parse(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:p.never,received:r.parsedType}),v}};Z.create=t=>new Z({typeName:m.ZodNever,...g(t)});var je=class extends b{_parse(e){if(this._getType(e)!==p.undefined){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.void,received:n.parsedType}),v}return R(e.data)}};je.create=t=>new je({typeName:m.ZodVoid,...g(t)});var z=class t extends b{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==p.array)return l(r,{code:d.invalid_type,expected:p.array,received:r.parsedType}),v;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,o=r.data.lengths.maxLength.value&&(l(r,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new I(r,i,r.path,o)))).then(i=>T.mergeArray(n,i));let a=[...r.data].map((i,o)=>s.type._parseSync(new I(r,i,r.path,o)));return T.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:h.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:h.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:h.toString(r)}})}nonempty(e){return this.min(1,e)}};z.create=(t,e)=>new z({type:t,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...g(e)});function ke(t){if(t instanceof S){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=M.create(ke(n))}return new S({...t._def,shape:()=>e})}else return t instanceof z?new z({...t._def,type:ke(t.element)}):t instanceof M?M.create(ke(t.unwrap())):t instanceof $?$.create(ke(t.unwrap())):t instanceof L?L.create(t.items.map(e=>ke(e))):t}var S=class t extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==p.object){let u=this._getOrReturnCtx(e);return l(u,{code:d.invalid_type,expected:p.object,received:u.parsedType}),v}let{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Z&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||o.push(u);let c=[];for(let u of i){let f=a[u],y=s.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new I(s,y,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Z){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of o)c.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(u==="strict")o.length>0&&(l(s,{code:d.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let f of o){let y=s.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new I(s,y,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let y=await f.key,w=await f.value;u.push({key:y,value:w,alwaysSet:f.alwaysSet})}return u}).then(u=>T.mergeObjectSync(n,u)):T.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,a,i,o;let c=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return ke(this)}partial(e){let r={};return x.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof M;)a=a._def.innerType;r[n]=a}}),new t({...this._def,shape:()=>r})}keyof(){return Jt(x.objectKeys(this.shape))}};S.create=(t,e)=>new S({shape:()=>t,unknownKeys:"strip",catchall:Z.create(),typeName:m.ZodObject,...g(e)});S.strictCreate=(t,e)=>new S({shape:()=>t,unknownKeys:"strict",catchall:Z.create(),typeName:m.ZodObject,...g(e)});S.lazycreate=(t,e)=>new S({shape:t,unknownKeys:"strip",catchall:Z.create(),typeName:m.ZodObject,...g(e)});var te=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new C(o.ctx.common.issues));return l(r,{code:d.invalid_union,unionErrors:i}),v}if(r.common.async)return Promise.all(n.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(c=>new C(c));return l(r,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}};te.create=(t,e)=>new te({options:t,typeName:m.ZodUnion,...g(e)});var V=t=>t instanceof ne?V(t.schema):t instanceof N?V(t.innerType()):t instanceof se?[t.value]:t instanceof ae?t.options:t instanceof ie?x.objectValues(t.enum):t instanceof oe?V(t._def.innerType):t instanceof Q?[void 0]:t instanceof ee?[null]:t instanceof M?[void 0,...V(t.unwrap())]:t instanceof $?[null,...V(t.unwrap())]:t instanceof Le||t instanceof ue?V(t.unwrap()):t instanceof ce?V(t._def.innerType):[],st=class t extends b{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.object)return l(r,{code:d.invalid_type,expected:p.object,received:r.parsedType}),v;let n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(l(r,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let a of r){let i=V(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new t({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...g(n)})}};function yt(t,e){let r=B(t),n=B(e);if(t===e)return{valid:!0,data:t};if(r===p.object&&n===p.object){let s=x.objectKeys(e),a=x.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(let o of a){let c=yt(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===p.array&&n===p.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let a=0;a{if(mt(a)||mt(i))return v;let o=yt(a.value,i.value);return o.valid?((vt(a)||vt(i))&&r.dirty(),{status:r.value,value:o.data}):(l(n,{code:d.invalid_intersection_types}),v)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};re.create=(t,e,r)=>new re({left:t,right:e,typeName:m.ZodIntersection,...g(r)});var L=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.array)return l(n,{code:d.invalid_type,expected:p.array,received:n.parsedType}),v;if(n.data.lengththis._def.items.length&&(l(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((i,o)=>{let c=this._def.items[o]||this._def.rest;return c?c._parse(new I(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>T.mergeArray(r,i)):T.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};L.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:t,typeName:m.ZodTuple,rest:null,...g(e)})};var at=class t extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.object)return l(n,{code:d.invalid_type,expected:p.object,received:n.parsedType}),v;let s=[],a=this._def.keyType,i=this._def.valueType;for(let o in n.data)s.push({key:a._parse(new I(n,o,n.path,o)),value:i._parse(new I(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?T.mergeObjectAsync(r,s):T.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof b?new t({keyType:e,valueType:r,typeName:m.ZodRecord,...g(n)}):new t({keyType:q.create(),valueType:e,typeName:m.ZodRecord,...g(r)})}},Pe=class extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.map)return l(n,{code:d.invalid_type,expected:p.map,received:n.parsedType}),v;let s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,c],u)=>({key:s._parse(new I(n,o,n.path,[u,"key"])),value:a._parse(new I(n,c,n.path,[u,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return v;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(u.value,f.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let c of i){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return v;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(u.value,f.value)}return{status:r.value,value:o}}}};Pe.create=(t,e,r)=>new Pe({valueType:e,keyType:t,typeName:m.ZodMap,...g(r)});var Re=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.set)return l(n,{code:d.invalid_type,expected:p.set,received:n.parsedType}),v;let s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(l(n,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let a=this._def.valueType;function i(c){let u=new Set;for(let f of c){if(f.status==="aborted")return v;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}let o=[...n.data.values()].map((c,u)=>a._parse(new I(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:h.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:h.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Re.create=(t,e)=>new Re({valueType:t,minSize:null,maxSize:null,typeName:m.ZodSet,...g(e)});var it=class t extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.function)return l(r,{code:d.invalid_type,expected:p.function,received:r.parsedType}),v;function n(o,c){return rt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,tt(),Te].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:c}})}function s(o,c){return rt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,tt(),Te].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof H){let o=this;return R(async function(...c){let u=new C([]),f=await o._def.args.parseAsync(c,a).catch(O=>{throw u.addIssue(n(c,O)),u}),y=await Reflect.apply(i,this,f);return await o._def.returns._def.type.parseAsync(y,a).catch(O=>{throw u.addIssue(s(y,O)),u})})}else{let o=this;return R(function(...c){let u=o._def.args.safeParse(c,a);if(!u.success)throw new C([n(c,u.error)]);let f=Reflect.apply(i,this,u.data),y=o._def.returns.safeParse(f,a);if(!y.success)throw new C([s(f,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:L.create(e).rest(D.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||L.create([]).rest(D.create()),returns:r||D.create(),typeName:m.ZodFunction,...g(n)})}},ne=class extends b{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ne.create=(t,e)=>new ne({getter:t,typeName:m.ZodLazy,...g(e)});var se=class extends b{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return l(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}};se.create=(t,e)=>new se({value:t,typeName:m.ZodLiteral,...g(e)});function Jt(t,e){return new ae({values:t,typeName:m.ZodEnum,...g(e)})}var ae=class t extends b{constructor(){super(...arguments),Ae.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{expected:x.joinValues(n),received:r.parsedType,code:d.invalid_type}),v}if(nt(this,Ae,"f")||qt(this,Ae,new Set(this._def.values),"f"),!nt(this,Ae,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{received:r.data,code:d.invalid_enum_value,options:n}),v}return R(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Ae=new WeakMap;ae.create=Jt;var ie=class extends b{constructor(){super(...arguments),Me.set(this,void 0)}_parse(e){let r=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==p.string&&n.parsedType!==p.number){let s=x.objectValues(r);return l(n,{expected:x.joinValues(s),received:n.parsedType,code:d.invalid_type}),v}if(nt(this,Me,"f")||qt(this,Me,new Set(x.getValidEnumValues(this._def.values)),"f"),!nt(this,Me,"f").has(e.data)){let s=x.objectValues(r);return l(n,{received:n.data,code:d.invalid_enum_value,options:s}),v}return R(e.data)}get enum(){return this._def.values}};Me=new WeakMap;ie.create=(t,e)=>new ie({values:t,typeName:m.ZodNativeEnum,...g(e)});var H=class extends b{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.promise&&r.common.async===!1)return l(r,{code:d.invalid_type,expected:p.promise,received:r.parsedType}),v;let n=r.parsedType===p.promise?r.data:Promise.resolve(r.data);return R(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};H.create=(t,e)=>new H({type:t,typeName:m.ZodPromise,...g(e)});var N=class extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{l(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){let i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return v;let c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?v:c.status==="dirty"||r.value==="dirty"?Ee(c.value):c});{if(r.value==="aborted")return v;let o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?v:o.status==="dirty"||r.value==="dirty"?Ee(o.value):o}}if(s.type==="refinement"){let i=o=>{let c=s.refinement(o,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?v:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ie(i))return i;let o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ie(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):i);x.assertNever(s)}};N.create=(t,e,r)=>new N({schema:t,typeName:m.ZodEffects,effect:e,...g(r)});N.createWithPreprocess=(t,e,r)=>new N({schema:e,effect:{type:"preprocess",transform:t},typeName:m.ZodEffects,...g(r)});var M=class extends b{_parse(e){return this._getType(e)===p.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M.create=(t,e)=>new M({innerType:t,typeName:m.ZodOptional,...g(e)});var $=class extends b{_parse(e){return this._getType(e)===p.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$.create=(t,e)=>new $({innerType:t,typeName:m.ZodNullable,...g(e)});var oe=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===p.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oe.create=(t,e)=>new oe({innerType:t,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});var ce=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ze(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ce.create=(t,e)=>new ce({innerType:t,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});var Se=class extends b{_parse(e){if(this._getType(e)!==p.nan){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.nan,received:n.parsedType}),v}return{status:"valid",value:e.data}}};Se.create=t=>new Se({typeName:m.ZodNaN,...g(t)});var Kr=Symbol("zod_brand"),Le=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},$e=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?v:a.status==="dirty"?(r.dirty(),Ee(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?v:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:m.ZodPipeline})}},ue=class extends b{_parse(e){let r=this._def.innerType._parse(e),n=s=>(Ie(s)&&(s.value=Object.freeze(s.value)),s);return Ze(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};ue.create=(t,e)=>new ue({innerType:t,typeName:m.ZodReadonly,...g(e)});function Gt(t,e={},r){return t?W.create().superRefine((n,s)=>{var a,i;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,u=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...u,fatal:c})}}):W.create()}var Xr={object:S.lazycreate},m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));var Qr=(t,e={message:`Input not instance of ${t.name}`})=>Gt(r=>r instanceof t,e),Yt=q.create,Kt=G.create,en=Se.create,tn=Y.create,Xt=K.create,rn=X.create,nn=Oe.create,sn=Q.create,an=ee.create,on=W.create,cn=D.create,un=Z.create,dn=je.create,ln=z.create,fn=S.create,pn=S.strictCreate,hn=te.create,mn=st.create,vn=re.create,yn=L.create,gn=at.create,bn=Pe.create,_n=Re.create,xn=it.create,wn=ne.create,kn=se.create,En=ae.create,Tn=ie.create,On=H.create,Ut=N.create,jn=M.create,Pn=$.create,Rn=N.createWithPreprocess,Sn=$e.create,Cn=()=>Yt().optional(),Nn=()=>Kt().optional(),An=()=>Xt().optional(),Mn={string:t=>q.create({...t,coerce:!0}),number:t=>G.create({...t,coerce:!0}),boolean:t=>K.create({...t,coerce:!0}),bigint:t=>Y.create({...t,coerce:!0}),date:t=>X.create({...t,coerce:!0})},In=v,_=Object.freeze({__proto__:null,defaultErrorMap:Te,setErrorMap:Mr,getErrorMap:tt,makeIssue:rt,EMPTY_PATH:Ir,addIssueToContext:l,ParseStatus:T,INVALID:v,DIRTY:Ee,OK:R,isAborted:mt,isDirty:vt,isValid:Ie,isAsync:Ze,get util(){return x},get objectUtil(){return ht},ZodParsedType:p,getParsedType:B,ZodType:b,datetimeRegex:Ft,ZodString:q,ZodNumber:G,ZodBigInt:Y,ZodBoolean:K,ZodDate:X,ZodSymbol:Oe,ZodUndefined:Q,ZodNull:ee,ZodAny:W,ZodUnknown:D,ZodNever:Z,ZodVoid:je,ZodArray:z,ZodObject:S,ZodUnion:te,ZodDiscriminatedUnion:st,ZodIntersection:re,ZodTuple:L,ZodRecord:at,ZodMap:Pe,ZodSet:Re,ZodFunction:it,ZodLazy:ne,ZodLiteral:se,ZodEnum:ae,ZodNativeEnum:ie,ZodPromise:H,ZodEffects:N,ZodTransformer:N,ZodOptional:M,ZodNullable:$,ZodDefault:oe,ZodCatch:ce,ZodNaN:Se,BRAND:Kr,ZodBranded:Le,ZodPipeline:$e,ZodReadonly:ue,custom:Gt,Schema:b,ZodSchema:b,late:Xr,get ZodFirstPartyTypeKind(){return m},coerce:Mn,any:on,array:ln,bigint:tn,boolean:Xt,date:rn,discriminatedUnion:mn,effect:Ut,enum:En,function:xn,instanceof:Qr,intersection:vn,lazy:wn,literal:kn,map:bn,nan:en,nativeEnum:Tn,never:un,null:an,nullable:Pn,number:Kt,object:fn,oboolean:An,onumber:Nn,optional:jn,ostring:Cn,pipeline:Sn,preprocess:Rn,promise:On,record:gn,set:_n,strictObject:pn,string:Yt,symbol:nn,transformer:Ut,tuple:yn,undefined:sn,union:hn,unknown:cn,void:dn,NEVER:In,ZodIssueCode:d,quotelessJson:Ar,ZodError:C});var gt=_.object({url:_.string(),token:_.string()}),Zn=_.object({header:_.string(),payload:_.string(),signature:_.string()}),Ln=_.object({fid:_.number(),type:_.literal("app_key"),key:_.string().startsWith("0x")}),Qt=_.object({event:_.literal("frame-added"),notificationDetails:gt.optional()}),er=_.object({event:_.literal("frame-removed")}),tr=_.object({event:_.literal("notifications-enabled"),notificationDetails:gt.required()}),rr=_.object({event:_.literal("notifications-disabled")}),$n=_.discriminatedUnion("event",[Qt,er,tr,rr]),Vn=_.object({notificationId:_.string().uuid(),title:_.string().max(32),body:_.string().max(128),targetUrl:_.string().max(256),tokens:_.string().array().max(100)}),Dn=_.object({result:_.object({successfulTokens:_.array(_.string()),invalidTokens:_.array(_.string()),rateLimitedTokens:_.array(_.string())})});var zn=ft;return dr(Un);})();
- /*! Bundled license information:
-
- comlink/dist/esm/comlink.mjs:
- (**
- * @license
- * Copyright 2019 Google LLC
- * SPDX-License-Identifier: Apache-2.0
- *)
- */
- //# sourceMappingURL=index.min.js.map
node_modules/@farcaster/frame-sdk/dist/index.min.js.map
Changed around line 0
- {
- "version": 3,
- "sources": ["../../../node_modules/eventemitter3/index.js", "../src/index.ts", "../../../node_modules/eventemitter3/index.mjs", "../../../node_modules/comlink/src/comlink.ts", "../src/endpoint.ts", "../src/frameHost.ts", "../../../node_modules/ox/core/version.ts", "../../../node_modules/ox/core/internal/errors.ts", "../../../node_modules/ox/core/Errors.ts", "../../../node_modules/ox/core/Provider.ts", "../../../node_modules/ox/core/RpcResponse.ts", "../../../node_modules/ox/core/RpcRequest.ts", "../src/provider.ts", "../src/sdk.ts", "../../../node_modules/zod/lib/index.mjs", "../../frame-core/dist/types.js"],
- "sourcesContent": ["'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n", "import { sdk } from \"./sdk\";\n\nexport * from \"./sdk\";\nexport * from \"@farcaster/frame-core\";\n\nexport default sdk;\n", "import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n Endpoint,\n EventSource,\n Message,\n MessageType,\n PostMessageWithOrigin,\n WireValue,\n WireValueType,\n} from \"./protocol\";\nexport type { Endpoint };\n\nexport const proxyMarker = Symbol(\"Comlink.proxy\");\nexport const createEndpoint = Symbol(\"Comlink.endpoint\");\nexport const releaseProxy = Symbol(\"Comlink.releaseProxy\");\nexport const finalizer = Symbol(\"Comlink.finalizer\");\n\nconst throwMarker = Symbol(\"Comlink.thrown\");\n\n/**\n * Interface of values that were marked to be proxied with `comlink.proxy()`.\n * Can also be implemented by classes.\n */\nexport interface ProxyMarked {\n [proxyMarker]: true;\n}\n\n/**\n * Takes a type and wraps it in a Promise, if it not already is one.\n * This is to avoid `Promise>`.\n *\n * This is the inverse of `Unpromisify`.\n */\ntype Promisify = T extends Promise ? T : Promise;\n/**\n * Takes a type that may be Promise and unwraps the Promise type.\n * If `P` is not a Promise, it returns `P`.\n *\n * This is the inverse of `Promisify`.\n */\ntype Unpromisify

= P extends Promise ? T : P;\n\n/**\n * Takes the raw type of a remote property and returns the type that is visible to the local thread on the proxy.\n *\n * Note: This needs to be its own type alias, otherwise it will not distribute over unions.\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types\n */\ntype RemoteProperty =\n // If the value is a method, comlink will proxy it automatically.\n // Objects are only proxied if they are marked to be proxied.\n // Otherwise, the property is converted to a Promise that resolves the cloned value.\n T extends Function | ProxyMarked ? Remote : Promisify;\n\n/**\n * Takes the raw type of a property as a remote thread would see it through a proxy (e.g. when passed in as a function\n * argument) and returns the type that the local thread has to supply.\n *\n * This is the inverse of `RemoteProperty`.\n *\n * Note: This needs to be its own type alias, otherwise it will not distribute over unions. See\n * https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types\n */\ntype LocalProperty = T extends Function | ProxyMarked\n ? Local\n : Unpromisify;\n\n/**\n * Proxies `T` if it is a `ProxyMarked`, clones it otherwise (as handled by structured cloning and transfer handlers).\n */\nexport type ProxyOrClone = T extends ProxyMarked ? Remote : T;\n/**\n * Inverse of `ProxyOrClone`.\n */\nexport type UnproxyOrClone = T extends RemoteObject\n ? Local\n : T;\n\n/**\n * Takes the raw type of a remote object in the other thread and returns the type as it is visible to the local thread\n * when proxied with `Comlink.proxy()`.\n *\n * This does not handle call signatures, which is handled by the more general `Remote` type.\n *\n * @template T The raw type of a remote object as seen in the other thread.\n */\nexport type RemoteObject = { [P in keyof T]: RemoteProperty };\n/**\n * Takes the type of an object as a remote thread would see it through a proxy (e.g. when passed in as a function\n * argument) and returns the type that the local thread has to supply.\n *\n * This does not handle call signatures, which is handled by the more general `Local` type.\n *\n * This is the inverse of `RemoteObject`.\n *\n * @template T The type of a proxied object.\n */\nexport type LocalObject = { [P in keyof T]: LocalProperty };\n\n/**\n * Additional special comlink methods available on each proxy returned by `Comlink.wrap()`.\n */\nexport interface ProxyMethods {\n [createEndpoint]: () => Promise;\n [releaseProxy]: () => void;\n}\n\n/**\n * Takes the raw type of a remote object, function or class in the other thread and returns the type as it is visible to\n * the local thread from the proxy return value of `Comlink.wrap()` or `Comlink.proxy()`.\n */\nexport type Remote =\n // Handle properties\n RemoteObject &\n // Handle call signature (if present)\n (T extends (...args: infer TArguments) => infer TReturn\n ? (\n ...args: { [I in keyof TArguments]: UnproxyOrClone }\n ) => Promisify>>\n : unknown) &\n // Handle construct signature (if present)\n // The return of construct signatures is always proxied (whether marked or not)\n (T extends { new (...args: infer TArguments): infer TInstance }\n ? {\n new (\n ...args: {\n [I in keyof TArguments]: UnproxyOrClone;\n }\n ): Promisify>;\n }\n : unknown) &\n // Include additional special comlink methods available on the proxy.\n ProxyMethods;\n\n/**\n * Expresses that a type can be either a sync or async.\n */\ntype MaybePromise = Promise | T;\n\n/**\n * Takes the raw type of a remote object, function or class as a remote thread would see it through a proxy (e.g. when\n * passed in as a function argument) and returns the type the local thread has to supply.\n *\n * This is the inverse of `Remote`. It takes a `Remote` and returns its original input `T`.\n */\nexport type Local =\n // Omit the special proxy methods (they don't need to be supplied, comlink adds them)\n Omit, keyof ProxyMethods> &\n // Handle call signatures (if present)\n (T extends (...args: infer TArguments) => infer TReturn\n ? (\n ...args: { [I in keyof TArguments]: ProxyOrClone }\n ) => // The raw function could either be sync or async, but is always proxied automatically\n MaybePromise>>\n : unknown) &\n // Handle construct signature (if present)\n // The return of construct signatures is always proxied (whether marked or not)\n (T extends { new (...args: infer TArguments): infer TInstance }\n ? {\n new (\n ...args: {\n [I in keyof TArguments]: ProxyOrClone;\n }\n ): // The raw constructor could either be sync or async, but is always proxied automatically\n MaybePromise>>;\n }\n : unknown);\n\nconst isObject = (val: unknown): val is object =>\n (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n\n/**\n * Customizes the serialization of certain values as determined by `canHandle()`.\n *\n * @template T The input type being handled by this transfer handler.\n * @template S The serialized type sent over the wire.\n */\nexport interface TransferHandler {\n /**\n * Gets called for every value to determine whether this transfer handler\n * should serialize the value, which includes checking that it is of the right\n * type (but can perform checks beyond that as well).\n */\n canHandle(value: unknown): value is T;\n\n /**\n * Gets called with the value if `canHandle()` returned `true` to produce a\n * value that can be sent in a message, consisting of structured-cloneable\n * values and/or transferrable objects.\n */\n serialize(value: T): [S, Transferable[]];\n\n /**\n * Gets called to deserialize an incoming value that was serialized in the\n * other thread with this transfer handler (known through the name it was\n * registered under).\n */\n deserialize(value: S): T;\n}\n\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler: TransferHandler = {\n canHandle: (val): val is ProxyMarked =>\n isObject(val) && (val as ProxyMarked)[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n\ninterface ThrownValue {\n [throwMarker]: unknown; // just needs to be present\n value: unknown;\n}\ntype SerializedThrownValue =\n | { isError: true; value: Error }\n | { isError: false; value: unknown };\ntype PendingListenersMap = Map<\n string,\n (value: WireValue | PromiseLike) => void\n>;\n\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler: TransferHandler<\n ThrownValue,\n SerializedThrownValue\n> = {\n canHandle: (value): value is ThrownValue =>\n isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized: SerializedThrownValue;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n } else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(\n new Error(serialized.value.message),\n serialized.value\n );\n }\n throw serialized.value;\n },\n};\n\n/**\n * Allows customizing the serialization of certain values.\n */\nexport const transferHandlers = new Map<\n string,\n TransferHandler\n>([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\n\nfunction isAllowedOrigin(\n allowedOrigins: (string | RegExp)[],\n origin: string\n): boolean {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\n\nexport function expose(\n obj: any,\n ep: Endpoint = globalThis as any,\n allowedOrigins: (string | RegExp)[] = [\"*\"]\n) {\n ep.addEventListener(\"message\", function callback(ev: MessageEvent) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = {\n path: [] as string[],\n ...(ev.data as Message),\n };\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case MessageType.GET:\n {\n returnValue = rawValue;\n }\n break;\n case MessageType.SET:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case MessageType.APPLY:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case MessageType.CONSTRUCT:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case MessageType.ENDPOINT:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case MessageType.RELEASE:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n } catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage({ ...wireValue, id }, transferables);\n if (type === MessageType.RELEASE) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback as any);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage({ ...wireValue, id }, transferables);\n });\n } as any);\n if (ep.start) {\n ep.start();\n }\n}\n\nfunction isMessagePort(endpoint: Endpoint): endpoint is MessagePort {\n return endpoint.constructor.name === \"MessagePort\";\n}\n\nfunction closeEndPoint(endpoint: Endpoint) {\n if (isMessagePort(endpoint)) endpoint.close();\n}\n\nexport function wrap(ep: Endpoint, target?: any): Remote {\n const pendingListeners : PendingListenersMap = new Map();\n\n ep.addEventListener(\"message\", function handleMessage(ev: Event) {\n const { data } = ev as MessageEvent;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n\n try {\n resolver(data);\n } finally {\n pendingListeners.delete(data.id);\n }\n });\n\n return createProxy(ep, pendingListeners, [], target) as any;\n}\n\nfunction throwIfProxyReleased(isReleased: boolean) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\n\nfunction releaseEndpoint(ep: Endpoint) {\n return requestResponseMessage(ep, new Map(), {\n type: MessageType.RELEASE,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\n\ninterface FinalizationRegistry {\n new (cb: (heldValue: T) => void): FinalizationRegistry;\n register(\n weakItem: object,\n heldValue: T,\n unregisterToken?: object | undefined\n ): void;\n unregister(unregisterToken: object): void;\n}\ndeclare var FinalizationRegistry: FinalizationRegistry;\n\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers =\n \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep: Endpoint) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n\nfunction registerProxy(proxy: object, ep: Endpoint) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\n\nfunction unregisterProxy(proxy: object) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\n\nfunction createProxy(\n ep: Endpoint,\n pendingListeners: PendingListenersMap,\n path: (string | number | symbol)[] = [],\n target: object = function () {}\n): Remote {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: MessageType.GET,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously \u00AF\\_(\u30C4)_/\u00AF\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.SET,\n path: [...path, prop].map((p) => p.toString()),\n value,\n },\n transferables\n ).then(fromWireValue) as any;\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if ((last as any) === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: MessageType.ENDPOINT,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn\u2019t happen.\n if (last === \"bind\") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.APPLY,\n path: path.map((p) => p.toString()),\n argumentList,\n },\n transferables\n ).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.CONSTRUCT,\n path: path.map((p) => p.toString()),\n argumentList,\n },\n transferables\n ).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy as any;\n}\n\nfunction myFlat(arr: (T | T[])[]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\nfunction processArguments(argumentList: any[]): [WireValue[], Transferable[]] {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\n\nconst transferCache = new WeakMap();\nexport function transfer(obj: T, transfers: Transferable[]): T {\n transferCache.set(obj, transfers);\n return obj;\n}\n\nexport function proxy(obj: T): T & ProxyMarked {\n return Object.assign(obj, { [proxyMarker]: true }) as any;\n}\n\nexport function windowEndpoint(\n w: PostMessageWithOrigin,\n context: EventSource = globalThis,\n targetOrigin = \"*\"\n): Endpoint {\n return {\n postMessage: (msg: any, transferables: Transferable[]) =>\n w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\n\nfunction toWireValue(value: any): [WireValue, Transferable[]] {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: WireValueType.HANDLER,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: WireValueType.RAW,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\n\nfunction fromWireValue(value: WireValue): any {\n switch (value.type) {\n case WireValueType.HANDLER:\n return transferHandlers.get(value.name)!.deserialize(value.value);\n case WireValueType.RAW:\n return value.value;\n }\n}\n\nfunction requestResponseMessage(\n ep: Endpoint,\n pendingListeners: PendingListenersMap,\n msg: Message,\n transfers?: Transferable[]\n): Promise {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage({ id, ...msg }, transfers);\n});\n}\n\nfunction generateUUID(): string {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n", "import { type Endpoint, windowEndpoint } from \"comlink\";\n\nconst mockEndpoint: Endpoint = {\n postMessage() {\n // noop\n },\n addEventListener: () => {\n // noop\n },\n removeEventListener: () => {\n // noop\n },\n}\n\nconst webViewEndpoint: Endpoint = {\n postMessage: (data: unknown) => {\n console.debug(\"[webview:req]\", data);\n window.ReactNativeWebView.postMessage(JSON.stringify(data));\n },\n addEventListener: (_, listener, ...args) => {\n document.addEventListener(\"FarcasterFrameCallback\", listener, ...args);\n },\n removeEventListener: (_, listener) => {\n document.removeEventListener(\"FarcasterFrameCallback\", listener);\n },\n};\n\nexport const endpoint = (() => {\n // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint\n if (typeof window === 'undefined') return mockEndpoint\n return window?.ReactNativeWebView\n ? webViewEndpoint\n : windowEndpoint(window?.parent ?? window);\n})()\n", "import { wrap } from \"comlink\";\nimport { endpoint } from \"./endpoint\";\nimport { FrameHost } from \"@farcaster/frame-core\";\n\nexport const frameHost = wrap(endpoint);\n", "/** @internal */\nexport const version = '0.1.1'\n", "import { version } from '../version.js'\n\n/** @internal */\nexport function getUrl(url: string) {\n return url\n}\n\n/** @internal */\nexport function getVersion() {\n return version\n}\n\n/** @internal */\nexport function prettyPrint(args: unknown) {\n if (!args) return ''\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false) return null\n return [key, value]\n })\n .filter(Boolean) as [string, string][]\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0)\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n')\n}\n", "import { getVersion } from './internal/errors.js'\n\nexport type GlobalErrorType = Error & {\n name: name\n}\n\n/**\n * Base error class inherited by all errors thrown by ox.\n *\n * @example\n * ```ts\n * import { Errors } from 'ox'\n * throw new Errors.BaseError('An error occurred')\n * ```\n */\nexport class BaseError<\n cause extends Error | undefined = undefined,\n> extends Error {\n details: string\n docs?: string | undefined\n docsPath?: string | undefined\n shortMessage: string\n\n override cause: cause\n override name = 'BaseError'\n\n version = `ox@${getVersion()}`\n\n constructor(shortMessage: string, options: BaseError.Options = {}) {\n const details = (() => {\n if (options.cause instanceof BaseError) {\n if (options.cause.details) return options.cause.details\n if (options.cause.shortMessage) return options.cause.shortMessage\n }\n if (options.cause?.message) return options.cause.message\n return options.details!\n })()\n const docsPath = (() => {\n if (options.cause instanceof BaseError)\n return options.cause.docsPath || options.docsPath\n return options.docsPath\n })()\n\n const docsBaseUrl = 'https://oxlib.sh'\n const docs = `${docsBaseUrl}${docsPath ?? ''}`\n\n const message = [\n shortMessage || 'An error occurred.',\n ...(options.metaMessages ? ['', ...options.metaMessages] : []),\n ...(details || docsPath\n ? [\n '',\n details ? `Details: ${details}` : undefined,\n docsPath ? `See: ${docs}` : undefined,\n ]\n : []),\n ]\n .filter((x) => typeof x === 'string')\n .join('\\n')\n\n super(message, options.cause ? { cause: options.cause } : undefined)\n\n this.cause = options.cause as any\n this.details = details\n this.docs = docs\n this.docsPath = docsPath\n this.shortMessage = shortMessage\n }\n\n walk(): Error\n walk(fn: (err: unknown) => boolean): Error | null\n walk(fn?: any): any {\n return walk(this, fn)\n }\n}\n\nexport declare namespace BaseError {\n type Options = {\n cause?: cause | undefined\n details?: string | undefined\n docsPath?: string | undefined\n metaMessages?: (string | undefined)[] | undefined\n }\n}\n\n/** @internal */\nfunction walk(\n err: unknown,\n fn?: ((err: unknown) => boolean) | undefined,\n): unknown {\n if (fn?.(err)) return err\n if (err && typeof err === 'object' && 'cause' in err && err.cause)\n return walk(err.cause, fn)\n return fn ? null : err\n}\n", "import { EventEmitter } from 'eventemitter3'\nimport type * as Address from './Address.js'\nimport * as Errors from './Errors.js'\nimport * as RpcResponse from './RpcResponse.js'\nimport type * as RpcSchema from './RpcSchema.js'\nimport type * as RpcSchema_internal from './internal/rpcSchema.js'\nimport type { Compute } from './internal/types.js'\n\n/** Options for a {@link ox#Provider.Provider}. */\nexport type Options = {\n /**\n * Whether to include event functions (`on`, `removeListener`) on the Provider.\n *\n * @default true\n */\n includeEvents?: boolean | undefined\n /**\n * RPC Schema to use for the Provider's `request` function.\n * See {@link ox#RpcSchema.(from:function)} for more.\n *\n * @default `RpcSchema.Generic`\n */\n schema?: RpcSchema.Generic | undefined\n}\n\n/** Root type for an EIP-1193 Provider. */\nexport type Provider<\n options extends Options | undefined = undefined,\n ///\n _schema extends RpcSchema.Generic = options extends {\n schema: infer schema extends RpcSchema.Generic\n }\n ? schema\n : RpcSchema.Default,\n> = Compute<\n {\n request: RequestFn<_schema>\n } & (options extends { includeEvents: true } | undefined\n ? {\n on: EventListenerFn\n removeListener: EventListenerFn\n }\n : {})\n>\n\n/** Type for an EIP-1193 Provider's event emitter. */\nexport type Emitter = Compute>\n\n/** EIP-1193 Provider's `request` function. */\nexport type RequestFn = <\n methodName extends RpcSchema.MethodNameGeneric,\n>(\n parameters: RpcSchema_internal.ExtractRequestOpaque,\n) => Promise>\n\n/** Type for an EIP-1193 Provider's event listener functions (`on`, `removeListener`, etc). */\nexport type EventListenerFn = (\n event: event,\n listener: EventMap[event],\n) => void\n\nexport type ConnectInfo = {\n chainId: string\n}\n\nexport type Message = {\n type: string\n data: unknown\n}\n\nexport class ProviderRpcError extends Error {\n override name = 'ProviderRpcError'\n\n code: number\n details: string\n\n constructor(code: number, message: string) {\n super(message)\n this.code = code\n this.details = message\n }\n}\n\nexport type EventMap = {\n accountsChanged: (accounts: readonly Address.Address[]) => void\n chainChanged: (chainId: string) => void\n connect: (connectInfo: ConnectInfo) => void\n disconnect: (error: ProviderRpcError) => void\n message: (message: Message) => void\n}\n\n/** The user rejected the request. */\nexport class UserRejectedRequestError extends ProviderRpcError {\n static readonly code = 4001\n override readonly name = 'Provider.UserRejectedRequestError'\n\n constructor({\n message = 'The user rejected the request.',\n }: { message?: string | undefined } = {}) {\n super(4001, message)\n }\n}\n\n/** The requested method and/or account has not been authorized by the user. */\nexport class UnauthorizedError extends ProviderRpcError {\n static readonly code = 4100\n override readonly name = 'Provider.UnauthorizedError'\n\n constructor({\n message = 'The requested method and/or account has not been authorized by the user.',\n }: { message?: string | undefined } = {}) {\n super(4100, message)\n }\n}\n\n/** The provider does not support the requested method. */\nexport class UnsupportedMethodError extends ProviderRpcError {\n static readonly code = 4200\n override readonly name = 'Provider.UnsupportedMethodError'\n\n constructor({\n message = 'The provider does not support the requested method.',\n }: { message?: string | undefined } = {}) {\n super(4200, message)\n }\n}\n\n/** The provider is disconnected from all chains. */\nexport class DisconnectedError extends ProviderRpcError {\n static readonly code = 4900\n override readonly name = 'Provider.DisconnectedError'\n\n constructor({\n message = 'The provider is disconnected from all chains.',\n }: { message?: string | undefined } = {}) {\n super(4900, message)\n }\n}\n\n/** The provider is not connected to the requested chain. */\nexport class ChainDisconnectedError extends ProviderRpcError {\n static readonly code = 4901\n override readonly name = 'Provider.ChainDisconnectedError'\n\n constructor({\n message = 'The provider is not connected to the requested chain.',\n }: { message?: string | undefined } = {}) {\n super(4901, message)\n }\n}\n\n/**\n * Creates an EIP-1193 flavored event emitter to be injected onto a Provider.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox' // [!code focus]\n *\n * // 1. Instantiate a Provider Emitter. // [!code focus]\n * const emitter = Provider.createEmitter() // [!code focus]\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * // 2. Pass the Emitter to the Provider. // [!code focus]\n * ...emitter, // [!code focus]\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * // 3. Emit Provider Events. // [!code focus]\n * emitter.emit('accountsChanged', ['0x...']) // [!code focus]\n * ```\n *\n * @returns An event emitter.\n */\nexport function createEmitter(): Emitter {\n const emitter = new EventEmitter()\n\n return {\n get eventNames() {\n return emitter.eventNames.bind(emitter)\n },\n get listenerCount() {\n return emitter.listenerCount.bind(emitter)\n },\n get listeners() {\n return emitter.listeners.bind(emitter)\n },\n addListener: emitter.addListener.bind(emitter),\n emit: emitter.emit.bind(emitter),\n off: emitter.off.bind(emitter),\n on: emitter.on.bind(emitter),\n once: emitter.once.bind(emitter),\n removeAllListeners: emitter.removeAllListeners.bind(emitter),\n removeListener: emitter.removeListener.bind(emitter),\n }\n}\n\nexport declare namespace createEmitter {\n type ErrorType = Errors.GlobalErrorType\n}\n\n/**\n * Instantiates an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) {@link ox#Provider.Provider}\n * from an arbitrary [EIP-1193 Provider](https://eips.ethereum.org/EIPS/eip-1193) interface.\n *\n * @example\n * ### Instantiating with RPC Transport\n *\n * Ox's {@link ox#RpcTransport} is EIP-1193 compliant, and can be used to instantiate an EIP-1193 Provider. This means you can use any HTTP RPC endpoint as an EIP-1193 Provider.\n *\n * ```ts twoslash\n * import { Provider, RpcTransport } from 'ox'\n *\n * const transport = RpcTransport.fromHttp('https://1.rpc.thirdweb.com')\n * const provider = Provider.from(transport)\n * ```\n *\n * @example\n * ### Instantiating with External Providers\n *\n * The example below demonstrates how we can instantiate a typed EIP-1193 Provider from an\n * external EIP-1193 Provider like `window.ethereum`.\n *\n * ```ts twoslash\n * import 'ox/window'\n * import { Provider } from 'ox'\n *\n * const provider = Provider.from(window.ethereum)\n *\n * const blockNumber = await provider.request({ method: 'eth_blockNumber' })\n * ```\n *\n * :::tip\n *\n * There are also libraries that distribute EIP-1193 Provider objects that you can use with `Provider.from`:\n *\n * - [`@walletconnect/ethereum-provider`](https://www.npmjs.com/package/\\@walletconnect/ethereum-provider)\n *\n * - [`@coinbase/wallet-sdk`](https://www.npmjs.com/package/\\@coinbase/wallet-sdk)\n *\n * - [`@metamask/detect-provider`](https://www.npmjs.com/package/\\@metamask/detect-provider)\n *\n * - [`@safe-global/safe-apps-provider`](https://github.com/safe-global/safe-apps-sdk/tree/main/packages/safe-apps-provider)\n *\n * - [`mipd`](https://github.com/wevm/mipd): EIP-6963 Multi Injected Providers\n *\n * :::\n *\n * @example\n * ### Instantiating a Custom Provider\n *\n * The example below demonstrates how we can instantiate a typed EIP-1193 Provider from a\n * HTTP `fetch` JSON-RPC request. You can use this pattern to integrate with any asynchronous JSON-RPC\n * transport, including WebSockets and IPC.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * const blockNumber = await provider.request({ method: 'eth_blockNumber' })\n * ```\n *\n * @example\n * ### Type-safe Custom Schemas\n *\n * It is possible to define your own type-safe schema by using the {@link ox#RpcSchema.(from:function)} type.\n *\n * ```ts twoslash\n * // @noErrors\n * import 'ox/window'\n * import { Provider, RpcSchema } from 'ox'\n *\n * const schema = RpcSchema.from<\n * | RpcSchema.Default\n * | {\n * Request: {\n * method: 'abe_foo',\n * params: [id: number],\n * }\n * ReturnType: string\n * }\n * | {\n * Request: {\n * method: 'abe_bar',\n * params: [id: string],\n * }\n * ReturnType: string\n * }\n * >()\n *\n * const provider = Provider.from(window.ethereum, { schema })\n *\n * const blockNumber = await provider.request({ method: 'e' })\n * // ^|\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * ### Instantiating a Provider with Events\n *\n * The example below demonstrates how to instantiate a Provider with your own EIP-1193 flavored event emitter.\n *\n * This example is useful for Wallets that distribute an EIP-1193 Provider (e.g. webpage injection via `window.ethereum`).\n *\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Instantiate a Provider Emitter.\n * const emitter = Provider.createEmitter() // [!code ++]\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * // 2. Pass the Emitter to the Provider.\n * ...emitter, // [!code ++]\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * // 3. Emit Provider Events.\n * emitter.emit('accountsChanged', ['0x...']) // [!code ++]\n * ```\n *\n * @param provider - The EIP-1193 provider to convert.\n * @returns An typed EIP-1193 Provider.\n */\nexport function from<\n const provider extends Provider | unknown,\n options extends Options | undefined = undefined,\n>(\n provider: provider | Provider<{ schema: RpcSchema.Generic }>,\n options?: options | Options,\n): Provider\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function from(provider: any, options: Options = {}): Provider {\n const { includeEvents = true } = options\n if (!provider) throw new IsUndefinedError()\n return {\n ...(includeEvents\n ? {\n on: provider.on?.bind(provider),\n removeListener: provider.removeListener?.bind(provider),\n }\n : {}),\n async request(args) {\n const result = await provider.request(args)\n if (\n result &&\n typeof result === 'object' &&\n 'jsonrpc' in (result as { jsonrpc?: unknown })\n )\n return RpcResponse.parse(result) as never\n return result\n },\n }\n}\n\nexport declare namespace from {\n type ErrorType = IsUndefinedError | Errors.GlobalErrorType\n}\n\n/** Thrown when the provider is undefined. */\nexport class IsUndefinedError extends Errors.BaseError {\n override readonly name = 'Provider.IsUndefinedError'\n\n constructor() {\n super('`provider` is undefined.')\n }\n}\n", "import type { Errors, RpcRequest } from '../index.js'\nimport type {\n Compute,\n IsNarrowable,\n OneOf,\n UnionPartialBy,\n} from './internal/types.js'\n\n/** A JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object). */\nexport type RpcResponse<\n result = unknown,\n error extends ErrorObject = ErrorObject,\n> = Compute<\n {\n id: number\n jsonrpc: '2.0'\n } & OneOf<{ result: result } | { error: error }>\n>\n\n/** JSON-RPC error object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#error_object). */\nexport type ErrorObject = {\n code: number\n message: string\n data?: unknown | undefined\n}\n\n/**\n * A type-safe interface to instantiate a JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#response_object).\n *\n * @example\n * ### Instantiating a Response Object\n *\n * ```ts twoslash\n * import { RpcResponse } from 'ox'\n *\n * const response = RpcResponse.from({\n * id: 0,\n * jsonrpc: '2.0',\n * result: '0x69420',\n * })\n * ```\n *\n * @example\n * ### Type-safe Instantiation\n *\n * If you have a JSON-RPC request object, you can use it to strongly-type the response. If a `request` is provided,\n * then the `id` and `jsonrpc` properties will be overridden with the values from the request.\n *\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * const request = RpcRequest.from({ id: 0, method: 'eth_blockNumber' })\n *\n * const response = RpcResponse.from(\n * { result: '0x69420' },\n * { request },\n * )\n * ```\n *\n * @param response - Opaque JSON-RPC response object.\n * @param options - Parsing options.\n * @returns Typed JSON-RPC result, or response object (if `raw` is `true`).\n */\nexport function from<\n request extends RpcRequest.RpcRequest | undefined = undefined,\n const response =\n | (request extends RpcRequest.RpcRequest\n ? request['_returnType']\n : RpcResponse)\n | unknown,\n>(\n response: from.Response,\n options?: from.Options,\n): Compute>\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function from(response: RpcResponse, options: any = {}): RpcResponse {\n const { request } = options\n return {\n ...response,\n id: response.id ?? request?.id,\n jsonrpc: response.jsonrpc ?? request.jsonrpc,\n }\n}\n\nexport declare namespace from {\n type Response<\n request extends RpcRequest.RpcRequest | undefined = undefined,\n response = unknown,\n > = response &\n (request extends RpcRequest.RpcRequest\n ? UnionPartialBy, 'id' | 'jsonrpc'>\n : RpcResponse)\n\n type Options<\n request extends RpcRequest.RpcRequest | undefined =\n | RpcRequest.RpcRequest\n | undefined,\n > = {\n request?: request | RpcRequest.RpcRequest | undefined\n }\n\n type ReturnType = IsNarrowable extends true\n ? RpcResponse\n : response & Readonly<{ id: number; jsonrpc: '2.0' }>\n}\n\n/**\n * A type-safe interface to parse a JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#response_object), and extract the result.\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Create a request store.\n * const store = RpcRequest.createStore()\n *\n * // 2. Get a request object.\n * const request = store.prepare({\n * method: 'eth_getBlockByNumber',\n * params: ['0x1', false],\n * })\n *\n * // 3. Send the JSON-RPC request via HTTP.\n * const block = await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(request),\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * method: 'POST',\n * })\n * .then((response) => response.json())\n * // 4. Parse the JSON-RPC response into a type-safe result. // [!code focus]\n * .then((response) => RpcResponse.parse(response, { request })) // [!code focus]\n *\n * block // [!code focus]\n * // ^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * :::tip\n *\n * If you don't need the return type, you can omit the options entirely.\n *\n * ```ts twoslash\n * // @noErrors\n * import { RpcResponse } from 'ox'\n *\n * const block = await fetch('https://1.rpc.thirdweb.com', {})\n * .then((response) => response.json())\n * .then((response) => RpcResponse.parse(response, { request })) // [!code --]\n * .then(RpcResponse.parse) // [!code ++]\n * ```\n * :::\n *\n * @example\n * ### Raw Mode\n *\n * If `raw` is `true`, the response will be returned as an object with `result` and `error` properties instead of returning the `result` directly and throwing errors.\n *\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const request = store.prepare({\n * method: 'eth_blockNumber',\n * })\n *\n * const response = RpcResponse.parse({}, {\n * request,\n * raw: true, // [!code hl]\n * })\n *\n * response.result\n * // ^?\n *\n *\n * response.error\n * // ^?\n *\n *\n * ```\n *\n * @param response - Opaque JSON-RPC response object.\n * @param options - Parsing options.\n * @returns Typed JSON-RPC result, or response object (if `raw` is `true`).\n */\nexport function parse<\n const response extends RpcResponse | unknown,\n returnType,\n raw extends boolean = false,\n>(\n response: response,\n options: parse.Options = {},\n): parse.ReturnType<\n unknown extends response\n ? returnType\n : response extends RpcResponse\n ? response extends { result: infer result }\n ? result\n : never\n : returnType,\n raw\n> {\n const { raw = false } = options\n const response_ = response as RpcResponse\n if (raw) return response as never\n if (response_.error) {\n const { code } = response_.error\n const JsonRpcError = (() => {\n if (code === InternalError.code) return InternalError\n if (code === InvalidInputError.code) return InvalidInputError\n if (code === InvalidParamsError.code) return InvalidParamsError\n if (code === InvalidRequestError.code) return InvalidRequestError\n if (code === LimitExceededError.code) return LimitExceededError\n if (code === MethodNotFoundError.code) return MethodNotFoundError\n if (code === MethodNotSupportedError.code) return MethodNotSupportedError\n if (code === ParseError.code) return ParseError\n if (code === ResourceNotFoundError.code) return ResourceNotFoundError\n if (code === ResourceUnavailableError.code)\n return ResourceUnavailableError\n if (code === TransactionRejectedError.code)\n return TransactionRejectedError\n if (code === VersionNotSupportedError.code)\n return VersionNotSupportedError\n return BaseError\n })()\n throw new JsonRpcError(response_.error)\n }\n return response_.result as never\n}\n\nexport declare namespace parse {\n type Options = {\n /**\n * JSON-RPC Method that was used to make the request. Used for typing the response.\n */\n request?:\n | {\n _returnType: returnType\n }\n | RpcRequest.RpcRequest\n | undefined\n /**\n * Enables raw mode \u2013 responses will return an object with `result` and `error` properties instead of returning the `result` directly and throwing errors.\n *\n * - `true`: a JSON-RPC response object will be returned with `result` and `error` properties.\n * - `false`: the JSON-RPC response object's `result` property will be returned directly, and JSON-RPC Errors will be thrown.\n *\n * @default false\n */\n raw?: raw | boolean | undefined\n }\n\n type ReturnType = Compute<\n raw extends true ? RpcResponse : returnType\n >\n\n type ErrorType =\n | ParseError\n | InvalidInputError\n | ResourceNotFoundError\n | ResourceUnavailableError\n | TransactionRejectedError\n | MethodNotSupportedError\n | LimitExceededError\n | VersionNotSupportedError\n | InvalidRequestError\n | MethodNotFoundError\n | InvalidParamsError\n | InternalError\n | BaseErrorType\n | Errors.GlobalErrorType\n}\n\nexport type BaseErrorType = BaseError & { name: 'BaseError' }\n\n/** Thrown when a JSON-RPC error has occurred. */\nexport class BaseError extends Error {\n override name = 'RpcResponse.BaseError'\n\n readonly code: number\n readonly data?: unknown | undefined\n\n constructor(errorObject: ErrorObject) {\n const { code, message, data } = errorObject\n super(message)\n this.code = code\n this.data = data\n }\n}\n\n/** Thrown when the input to a JSON-RPC method is invalid. */\nexport class InvalidInputError extends BaseError {\n static readonly code = -32000\n override readonly code = -32000\n override readonly name = 'RpcResponse.InvalidInputError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Missing or invalid parameters.',\n ...parameters,\n code: InvalidInputError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC resource is not found. */\nexport class ResourceNotFoundError extends BaseError {\n static readonly code = -32001\n override readonly code = -32001\n override readonly name = 'RpcResponse.ResourceNotFoundError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Requested resource not found.',\n ...parameters,\n code: ResourceNotFoundError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC resource is unavailable. */\nexport class ResourceUnavailableError extends BaseError {\n static readonly code = -32002\n override readonly code = -32002\n override readonly name = 'RpcResponse.ResourceUnavailableError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Requested resource not available.',\n ...parameters,\n code: ResourceUnavailableError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC transaction is rejected. */\nexport class TransactionRejectedError extends BaseError {\n static readonly code = -32003\n override readonly code = -32003\n override readonly name = 'RpcResponse.TransactionRejectedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Transaction creation failed.',\n ...parameters,\n code: TransactionRejectedError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC method is not supported. */\nexport class MethodNotSupportedError extends BaseError {\n static readonly code = -32004\n override readonly code = -32004\n override readonly name = 'RpcResponse.MethodNotSupportedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Method is not implemented.',\n ...parameters,\n code: MethodNotSupportedError.code,\n })\n }\n}\n\n/** Thrown when a rate-limit is exceeded. */\nexport class LimitExceededError extends BaseError {\n static readonly code = -32005\n override readonly code = -32005\n override readonly name = 'RpcResponse.LimitExceededError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Rate limit exceeded.',\n ...parameters,\n code: LimitExceededError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC version is not supported. */\nexport class VersionNotSupportedError extends BaseError {\n static readonly code = -32006\n override readonly code = -32006\n override readonly name = 'RpcResponse.VersionNotSupportedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'JSON-RPC version not supported.',\n ...parameters,\n code: VersionNotSupportedError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC request is invalid. */\nexport class InvalidRequestError extends BaseError {\n static readonly code = -32600\n override readonly code = -32600\n override readonly name = 'RpcResponse.InvalidRequestError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Input is not a valid JSON-RPC request.',\n ...parameters,\n code: InvalidRequestError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC method is not found. */\nexport class MethodNotFoundError extends BaseError {\n static readonly code = -32601\n override readonly code = -32601\n override readonly name = 'RpcResponse.MethodNotFoundError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Method does not exist.',\n ...parameters,\n code: MethodNotFoundError.code,\n })\n }\n}\n\n/** Thrown when the parameters to a JSON-RPC method are invalid. */\nexport class InvalidParamsError extends BaseError {\n static readonly code = -32602\n override readonly code = -32602\n override readonly name = 'RpcResponse.InvalidParamsError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Invalid method parameters.',\n ...parameters,\n code: InvalidParamsError.code,\n })\n }\n}\n\n/** Thrown when an internal JSON-RPC error has occurred. */\nexport class InternalError extends BaseError {\n static readonly code = -32603\n override readonly code = -32603\n override readonly name = 'RpcResponse.InternalErrorError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Internal JSON-RPC error.',\n ...parameters,\n code: InternalError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC response is invalid. */\nexport class ParseError extends BaseError {\n static readonly code = -32700\n override readonly code = -32700\n override readonly name = 'RpcResponse.ParseError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Failed to parse JSON-RPC response.',\n ...parameters,\n code: ParseError.code,\n })\n }\n}\n", "import type { Errors } from '../index.js'\nimport type * as RpcSchema from './RpcSchema.js'\nimport type * as RpcSchema_internal from './internal/rpcSchema.js'\nimport type { Compute } from './internal/types.js'\n\n/** A JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object). */\nexport type RpcRequest =\n Compute<\n schema extends any\n ? schema['Request'] & {\n id: number\n jsonrpc: '2.0'\n /** @deprecated internal */\n _returnType: schema['ReturnType']\n }\n : never\n >\n\n/** JSON-RPC request store type. */\nexport type Store =\n Compute<{\n prepare: (\n parameters: Compute<\n RpcSchema_internal.ExtractRequestOpaque\n >,\n ) => Compute>>\n readonly id: number\n }>\n\n/**\n * Creates a JSON-RPC request store to build requests with an incrementing `id`.\n *\n * Returns a type-safe `prepare` function to build a JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object).\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const request_1 = store.prepare({\n * method: 'eth_blockNumber',\n * })\n * // @log: { id: 0, jsonrpc: '2.0', method: 'eth_blockNumber' }\n *\n * const request_2 = store.prepare({\n * method: 'eth_call',\n * params: [\n * {\n * to: '0x0000000000000000000000000000000000000000',\n * data: '0xdeadbeef',\n * },\n * ],\n * })\n * // @log: { id: 1, jsonrpc: '2.0', method: 'eth_call', params: [{ to: '0x0000000000000000000000000000000000000000', data: '0xdeadbeef' }] }\n * ```\n *\n * @example\n * ### Type-safe Custom Schemas\n *\n * It is possible to define your own type-safe schema by using the {@link ox#RpcSchema.From} type.\n *\n * ```ts twoslash\n * import { RpcSchema, RpcRequest } from 'ox'\n *\n * type Schema = RpcSchema.From<{ // [!code focus]\n * Request: { // [!code focus]\n * method: 'eth_foobar' // [!code focus]\n * params: [number] // [!code focus]\n * } // [!code focus]\n * ReturnType: string // [!code focus]\n * } | { // [!code focus]\n * Request: { // [!code focus]\n * method: 'eth_foobaz' // [!code focus]\n * params: [string] // [!code focus]\n * } // [!code focus]\n * ReturnType: string // [!code focus]\n * }> // [!code focus]\n *\n * const store = RpcRequest.createStore() // [!code focus]\n *\n * const request = store.prepare({\n * method: 'eth_foobar', // [!code focus]\n * // ^?\n * params: [42],\n * })\n * ```\n *\n * @param options - Request store options.\n * @returns The request store\n */\nexport function createStore<\n schema extends RpcSchema.Generic = RpcSchema.Default,\n>(options: createStore.Options = {}): createStore.ReturnType {\n let id = options.id ?? 0\n return {\n prepare(options) {\n return from({\n id: id++,\n ...options,\n } as never) as never\n },\n get id() {\n return id\n },\n }\n}\n\nexport declare namespace createStore {\n type Options = {\n /** The initial request ID. */\n id?: number\n }\n\n type ReturnType =\n Store\n\n type ErrorType = Errors.GlobalErrorType\n}\n\n/**\n * A type-safe interface to build a JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object).\n *\n * :::warning\n *\n * You will likely want to use {@link ox#RpcRequest.(createStore:function)} instead as it will also manage `id`s and uses this function internally.\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Build a request object.\n * const request = RpcRequest.from({ // [!code focus]\n * id: 0, // [!code focus]\n * method: 'eth_estimateGas', // [!code focus]\n * params: [ // [!code focus]\n * { // [!code focus]\n * from: '0xd2135CfB216b74109775236E36d4b433F1DF507B', // [!code focus]\n * to: '0x0D44f617435088c947F00B31160f64b074e412B4', // [!code focus]\n * value: '0x69420', // [!code focus]\n * }, // [!code focus]\n * ], // [!code focus]\n * }) // [!code focus]\n *\n * // 2. Send the JSON-RPC request via HTTP.\n * const gas = await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(request),\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * method: 'POST',\n * })\n * .then((response) => response.json())\n * // 3. Parse the JSON-RPC response into a type-safe result.\n * .then((response) => RpcResponse.parse(response, { request }))\n * ```\n *\n * @param options - JSON-RPC request options.\n * @returns The fully-formed JSON-RPC request object.\n */\nexport function from(\n options: from.Options,\n): from.ReturnType {\n return {\n ...options,\n jsonrpc: '2.0',\n } as never\n}\n\nexport declare namespace from {\n type Options = Compute<\n RpcSchema_internal.ExtractRequestOpaque & {\n id: number\n }\n >\n\n type ReturnType = Compute<\n RpcRequest>\n >\n\n type ErrorType = Errors.GlobalErrorType\n}\n", "import { Provider, RpcRequest, RpcResponse } from \"ox\";\nimport { frameHost } from \"./frameHost\";\nimport { EthProviderWireEvent } from \"@farcaster/frame-core\";\n\nconst emitter = Provider.createEmitter();\nconst store = RpcRequest.createStore();\n\ntype GenericProviderRpcError = {\n code: number;\n details?: string;\n}\n\nexport function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError {\n switch (code) {\n case 4001:\n return new Provider.UserRejectedRequestError();\n case 4100:\n return new Provider.UnauthorizedError();\n case 4200:\n return new Provider.UnsupportedMethodError();\n case 4900:\n return new Provider.DisconnectedError();\n case 4901:\n return new Provider.ChainDisconnectedError();\n default:\n return new Provider.ProviderRpcError(code, details ?? 'Unknown provider RPC error');\n }\n}\n\nexport const provider: Provider.Provider = Provider.from({\n ...emitter,\n async request(args) {\n // @ts-expect-error\n const request = store.prepare(args);\n\n try {\n const response = await frameHost.ethProviderRequestV2(\n request\n ).then((res) => RpcResponse.parse(res, { request, raw: true }));\n\n\n if (response.error) {\n throw toProviderRpcError(response.error)\n }\n\n return response.result;\n } catch (e) {\n // ethProviderRequestV2 not supported, fall back to v1\n if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {\n return await frameHost.ethProviderRequest(request);\n }\n\n if (\n e instanceof Provider.ProviderRpcError ||\n e instanceof RpcResponse.BaseError\n ) {\n throw e;\n }\n\n\n throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined })\n }\n }\n});\n\n// Required to pass SSR\nif (typeof document !== 'undefined') {\n document.addEventListener(\"FarcasterFrameEthProviderEvent\", (event) => {\n if (event instanceof MessageEvent) {\n const ethProviderEvent = event.data as EthProviderWireEvent;\n // @ts-expect-error \n emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);\n }\n });\n}\n", "import { EventEmitter } from \"eventemitter3\";\nimport { FrameSDK, Emitter, EventMap } from \"./types\";\nimport { frameHost } from \"./frameHost\";\nimport { provider } from \"./provider\";\n\nexport function createEmitter(): Emitter {\n const emitter = new EventEmitter();\n\n return {\n get eventNames() {\n return emitter.eventNames.bind(emitter);\n },\n get listenerCount() {\n return emitter.listenerCount.bind(emitter);\n },\n get listeners() {\n return emitter.listeners.bind(emitter);\n },\n addListener: emitter.addListener.bind(emitter),\n emit: emitter.emit.bind(emitter),\n off: emitter.off.bind(emitter),\n on: emitter.on.bind(emitter),\n once: emitter.once.bind(emitter),\n removeAllListeners: emitter.removeAllListeners.bind(emitter),\n removeListener: emitter.removeListener.bind(emitter),\n };\n}\n\nconst emitter = createEmitter();\n\nexport const sdk: FrameSDK = {\n ...emitter,\n context: frameHost.context,\n actions: {\n setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),\n ready: frameHost.ready.bind(frameHost),\n close: frameHost.close.bind(frameHost),\n openUrl: frameHost.openUrl.bind(frameHost),\n addFrame: frameHost.addFrame.bind(frameHost),\n },\n wallet: {\n ethProvider: provider,\n }\n};\n\n// Required to pass SSR\nif (typeof document !== 'undefined')\n document.addEventListener(\"FarcasterFrameEvent\", (event) => {\n if (event instanceof MessageEvent) {\n if (event.data.type === \"primaryButtonClicked\") {\n emitter.emit(\"primaryButtonClicked\");\n }\n }\n });\n", "var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n overrideMap,\n overrideMap === errorMap ? undefined : errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n var _a, _b;\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n if (args.precision) {\n regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n regex = `${regex}(\\\\.\\\\d+)?`;\n }\n return regex;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a, _b;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError(akeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError(akeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodEnum_cache.set(this, void 0);\n }\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodNativeEnum_cache.set(this, void 0);\n }\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result)\n ? result.then((data) => freeze(data))\n : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nfunction custom(check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n}\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n datetimeRegex: datetimeRegex,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, datetimeRegex, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n", "import { z } from \"zod\";\nexport const notificationDetailsSchema = z.object({\n url: z.string(),\n token: z.string(),\n});\nexport const eventSchema = z.object({\n header: z.string(),\n payload: z.string(),\n signature: z.string(),\n});\n// JSON Farcaster Signature header after decoding\nexport const eventHeaderSchema = z.object({\n fid: z.number(),\n type: z.literal(\"app_key\"),\n key: z.string().startsWith(\"0x\"),\n});\n// Webhook event payload after decoding\nexport const eventFrameAddedPayloadSchema = z.object({\n event: z.literal(\"frame-added\"),\n notificationDetails: notificationDetailsSchema.optional(),\n});\nexport const eventFrameRemovedPayloadSchema = z.object({\n event: z.literal(\"frame-removed\"),\n});\nexport const eventNotificationsEnabledPayloadSchema = z.object({\n event: z.literal(\"notifications-enabled\"),\n notificationDetails: notificationDetailsSchema.required(),\n});\nexport const notificationsDisabledPayloadSchema = z.object({\n event: z.literal(\"notifications-disabled\"),\n});\nexport const eventPayloadSchema = z.discriminatedUnion(\"event\", [\n eventFrameAddedPayloadSchema,\n eventFrameRemovedPayloadSchema,\n eventNotificationsEnabledPayloadSchema,\n notificationsDisabledPayloadSchema,\n]);\n// Notifications API request and response formats\nexport const sendNotificationRequestSchema = z.object({\n notificationId: z.string().uuid(),\n title: z.string().max(32),\n body: z.string().max(128),\n targetUrl: z.string().max(256),\n tokens: z.string().array().max(100),\n});\nexport const sendNotificationResponseSchema = z.object({\n result: z.object({\n successfulTokens: z.array(z.string()),\n invalidTokens: z.array(z.string()),\n rateLimitedTokens: z.array(z.string()),\n }),\n});\n"],

- "mappings": "0pBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,cAEA,IAAIC,GAA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AQ,wBAAwB,CAC7C,CAAC,EACYO,GAAqBP,EAAE,mBAAmB,QAAS,CAC5DG,GACAC,GACAC,GACAC,EACJ,CAAC,EAEYE,GAAgCR,EAAE,OAAO,CAClD,eAAgBA,EAAE,OAAO,EAAE,KAAK,EAChC,MAAOA,EAAE,OAAO,EAAE,IAAI,EAAE,EACxB,KAAMA,EAAE,OAAO,EAAE,IAAI,GAAG,EACxB,UAAWA,EAAE,OAAO,EAAE,IAAI,GAAG,EAC7B,OAAQA,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,CACtC,CAAC,EACYS,GAAiCT,EAAE,OAAO,CACnD,OAAQA,EAAE,OAAO,CACb,iBAAkBA,EAAE,MAAMA,EAAE,OAAO,CAAC,EACpC,cAAeA,EAAE,MAAMA,EAAE,OAAO,CAAC,EACjC,kBAAmBA,EAAE,MAAMA,EAAE,OAAO,CAAC,CACzC,CAAC,CACL,CAAC,Ed9CD,IAAOU,GAAQC",
- "names": ["require_eventemitter3", "__commonJSMin", "exports", "module", "has", "prefix", "Events", "EE", "fn", "context", "once", "addListener", "emitter", "event", "listener", "evt", "clearEvent", "EventEmitter", "names", "events", "name", "handlers", "i", "l", "ee", "listeners", "a1", "a2", "a3", "a4", "a5", "len", "args", "length", "j", "src_exports", "__export", "createEmitter", "src_default", "eventFrameAddedPayloadSchema", "eventFrameRemovedPayloadSchema", "eventHeaderSchema", "eventNotificationsEnabledPayloadSchema", "eventPayloadSchema", "eventSchema", "notificationDetailsSchema", "notificationsDisabledPayloadSchema", "sdk", "sendNotificationRequestSchema", "sendNotificationResponseSchema", "import_index", "proxyMarker", "createEndpoint", "releaseProxy", "finalizer", "throwMarker", "isObject", "val", "proxyTransferHandler", "obj", "port1", "port2", "expose", "port", "wrap", "throwTransferHandler", "value", "serialized", "transferHandlers", "isAllowedOrigin", "allowedOrigins", "origin", "allowedOrigin", "ep", "callback", "ev", "id", "type", "path", "argumentList", "fromWireValue", "returnValue", "parent", "prop", "rawValue", "proxy", "transfer", "wireValue", "transferables", "toWireValue", "closeEndPoint", "error", "isMessagePort", "endpoint", "target", "pendingListeners", "data", "resolver", "createProxy", "throwIfProxyReleased", "isReleased", "releaseEndpoint", "requestResponseMessage", "proxyCounter", "proxyFinalizers", "newCount", "registerProxy", "unregisterProxy", "isProxyReleased", "_target", "r", "p", "_thisArg", "rawArgumentList", "last", "processArguments", "myFlat", "arr", "processed", "v", "transferCache", "transfers", "windowEndpoint", "w", "context", "targetOrigin", "msg", "name", "handler", "serializedValue", "resolve", "generateUUID", "mockEndpoint", "webViewEndpoint", "data", "_", "listener", "args", "endpoint", "windowEndpoint", "frameHost", "wrap", "endpoint", "version", "getVersion", "version", "BaseError", "_BaseError", "shortMessage", "options", "details", "docsPath", "docs", "message", "x", "getVersion", "fn", "walk", "err", "Provider_exports", "__export", "ChainDisconnectedError", "DisconnectedError", "IsUndefinedError", "ProviderRpcError", "UnauthorizedError", "UnsupportedMethodError", "UserRejectedRequestError", "createEmitter", "from", "RpcResponse_exports", "__export", "BaseError", "InternalError", "InvalidInputError", "InvalidParamsError", "InvalidRequestError", "LimitExceededError", "MethodNotFoundError", "MethodNotSupportedError", "ParseError", "ResourceNotFoundError", "ResourceUnavailableError", "TransactionRejectedError", "VersionNotSupportedError", "from", "parse", "response", "options", "request", "raw", "response_", "code", "JsonRpcError", "errorObject", "message", "data", "_InvalidInputError", "parameters", "_ResourceNotFoundError", "_ResourceUnavailableError", "_TransactionRejectedError", "_MethodNotSupportedError", "_LimitExceededError", "_VersionNotSupportedError", "_InvalidRequestError", "_MethodNotFoundError", "_InvalidParamsError", "_InternalError", "_ParseError", "ProviderRpcError", "code", "message", "UserRejectedRequestError", "UnauthorizedError", "UnsupportedMethodError", "DisconnectedError", "ChainDisconnectedError", "createEmitter", "emitter", "EventEmitter", "from", "provider", "options", "includeEvents", "IsUndefinedError", "args", "result", "parse", "BaseError", "RpcRequest_exports", "__export", "createStore", "from", "options", "id", "emitter", "Provider_exports", "store", "RpcRequest_exports", "toProviderRpcError", "code", "details", "provider", "args", "request", "response", "frameHost", "res", "RpcResponse_exports", "e", "event", "ethProviderEvent", "createEmitter", "emitter", "EventEmitter", "sdk", "frameHost", "provider", "event", "util", "val", "assertIs", "_arg", "assertNever", "_x", "items", "obj", "item", "validKeys", "k", "filtered", "e", "object", "keys", "key", "arr", "checker", "joinValues", "array", "separator", "_", "value", "objectUtil", "first", "second", "ZodParsedType", "getParsedType", "data", "ZodIssueCode", "quotelessJson", "ZodError", "_ZodError", "issues", "sub", "subs", "actualProto", "_mapper", "mapper", "issue", "fieldErrors", "processError", "error", "curr", "i", "el", "formErrors", "errorMap", "_ctx", "message", "overrideErrorMap", "setErrorMap", "map", "getErrorMap", "makeIssue", "params", "path", "errorMaps", "issueData", "fullPath", "fullIssue", "errorMessage", "maps", "m", "EMPTY_PATH", "addIssueToContext", "ctx", "overrideMap", "x", "ParseStatus", "_ParseStatus", "status", "results", "arrayValue", "INVALID", "pairs", "syncPairs", "pair", "finalObject", "DIRTY", "OK", "isAborted", "isDirty", "isValid", "isAsync", "__classPrivateFieldGet", "receiver", "state", "kind", "f", "__classPrivateFieldSet", "errorUtil", "message", "_ZodEnum_cache", "_ZodNativeEnum_cache", "ParseInputLazyPath", "parent", "value", "path", "key", "handleResult", "ctx", "result", "isValid", "error", "ZodError", "processCreateParams", "params", "errorMap", "invalid_type_error", "required_error", "description", "iss", "_a", "_b", "ZodType", "def", "input", "getParsedType", "ParseStatus", "isAsync", "data", "maybeAsyncResult", "check", "getIssueProperties", "val", "setError", "ZodIssueCode", "refinementData", "refinement", "ZodEffects", "ZodFirstPartyTypeKind", "ZodOptional", "ZodNullable", "ZodArray", "ZodPromise", "option", "ZodUnion", "incoming", "ZodIntersection", "transform", "defaultValueFunc", "ZodDefault", "ZodBranded", "catchValueFunc", "ZodCatch", "This", "target", "ZodPipeline", "ZodReadonly", "cuidRegex", "cuid2Regex", "ulidRegex", "uuidRegex", "nanoidRegex", "durationRegex", "emailRegex", "_emojiRegex", "emojiRegex", "ipv4Regex", "ipv6Regex", "base64Regex", "dateRegexSource", "dateRegex", "timeRegexSource", "args", "regex", "timeRegex", "datetimeRegex", "opts", "isValidIP", "ip", "version", "ZodString", "_ZodString", "ZodParsedType", "addIssueToContext", "INVALID", "status", "tooBig", "tooSmall", "util", "validation", "options", "minLength", "maxLength", "len", "ch", "min", "max", "floatSafeRemainder", "step", "valDecCount", "stepDecCount", "decCount", "valInt", "stepInt", "ZodNumber", "_ZodNumber", "kind", "inclusive", "ZodBigInt", "_ZodBigInt", "ZodBoolean", "OK", "ZodDate", "_ZodDate", "minDate", "maxDate", "ZodSymbol", "ZodUndefined", "ZodNull", "ZodAny", "ZodUnknown", "ZodNever", "ZodVoid", "_ZodArray", "item", "i", "schema", "deepPartialify", "ZodObject", "newShape", "fieldSchema", "ZodTuple", "_ZodObject", "shape", "keys", "shapeKeys", "extraKeys", "pairs", "keyValidator", "unknownKeys", "catchall", "syncPairs", "pair", "issue", "_c", "_d", "defaultError", "augmentation", "merging", "index", "mask", "newField", "createZodEnum", "handleResults", "results", "unionErrors", "childCtx", "dirty", "issues", "types", "getDiscriminator", "type", "ZodLazy", "ZodLiteral", "ZodEnum", "ZodNativeEnum", "ZodDiscriminatedUnion", "_ZodDiscriminatedUnion", "discriminator", "discriminatorValue", "optionsMap", "discriminatorValues", "mergeValues", "a", "b", "aType", "bType", "bKeys", "sharedKeys", "newObj", "sharedValue", "newArray", "itemA", "itemB", "handleParsed", "parsedLeft", "parsedRight", "isAborted", "merged", "isDirty", "left", "right", "_ZodTuple", "items", "itemIndex", "x", "rest", "schemas", "ZodRecord", "_ZodRecord", "keyType", "valueType", "first", "second", "third", "ZodMap", "finalMap", "ZodSet", "_ZodSet", "finalizeSet", "elements", "parsedSet", "element", "minSize", "maxSize", "size", "ZodFunction", "_ZodFunction", "makeArgsIssue", "makeIssue", "getErrorMap", "makeReturnsIssue", "returns", "fn", "me", "parsedArgs", "e", "parsedReturns", "returnType", "func", "getter", "values", "_ZodEnum", "expectedValues", "__classPrivateFieldGet", "__classPrivateFieldSet", "enumValues", "newDef", "opt", "nativeEnumValues", "promisified", "effect", "checkCtx", "arg", "processed", "DIRTY", "executeRefinement", "acc", "inner", "base", "preprocess", "newCtx", "ZodNaN", "BRAND", "_ZodPipeline", "inResult", "freeze", "custom", "fatal", "p", "_fatal", "p2", "late", "instanceOfType", "cls", "stringType", "numberType", "nanType", "bigIntType", "booleanType", "dateType", "symbolType", "undefinedType", "nullType", "anyType", "unknownType", "neverType", "voidType", "arrayType", "objectType", "strictObjectType", "unionType", "discriminatedUnionType", "intersectionType", "tupleType", "recordType", "mapType", "setType", "functionType", "lazyType", "literalType", "enumType", "nativeEnumType", "promiseType", "effectsType", "optionalType", "nullableType", "preprocessType", "pipelineType", "ostring", "onumber", "oboolean", "coerce", "NEVER", "z", "setErrorMap", "EMPTY_PATH", "objectUtil", "quotelessJson", "notificationDetailsSchema", "z", "eventSchema", "eventHeaderSchema", "eventFrameAddedPayloadSchema", "eventFrameRemovedPayloadSchema", "eventNotificationsEnabledPayloadSchema", "notificationsDisabledPayloadSchema", "eventPayloadSchema", "sendNotificationRequestSchema", "sendNotificationResponseSchema", "src_default", "sdk"]
- }
node_modules/@farcaster/frame-sdk/dist/provider.d.ts
Changed around line 0
- import { Provider } from "ox";
- type GenericProviderRpcError = {
- code: number;
- details?: string;
- };
- export declare function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError;
- export declare const provider: Provider.Provider;
- export {};
node_modules/@farcaster/frame-sdk/dist/provider.js
Changed around line 0
- import { Provider, RpcRequest, RpcResponse } from "ox";
- import { frameHost } from "./frameHost";
- const emitter = Provider.createEmitter();
- const store = RpcRequest.createStore();
- export function toProviderRpcError({ code, details }) {
- switch (code) {
- case 4001:
- return new Provider.UserRejectedRequestError();
- case 4100:
- return new Provider.UnauthorizedError();
- case 4200:
- return new Provider.UnsupportedMethodError();
- case 4900:
- return new Provider.DisconnectedError();
- case 4901:
- return new Provider.ChainDisconnectedError();
- default:
- return new Provider.ProviderRpcError(code, details !== null && details !== void 0 ? details : 'Unknown provider RPC error');
- }
- }
- export const provider = Provider.from({
- ...emitter,
- async request(args) {
- // @ts-expect-error
- const request = store.prepare(args);
- try {
- const response = await frameHost.ethProviderRequestV2(request).then((res) => RpcResponse.parse(res, { request, raw: true }));
- if (response.error) {
- throw toProviderRpcError(response.error);
- }
- return response.result;
- }
- catch (e) {
- // ethProviderRequestV2 not supported, fall back to v1
- if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {
- return await frameHost.ethProviderRequest(request);
- }
- if (e instanceof Provider.ProviderRpcError ||
- e instanceof RpcResponse.BaseError) {
- throw e;
- }
- throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined });
- }
- }
- });
- // Required to pass SSR
- if (typeof document !== 'undefined') {
- document.addEventListener("FarcasterFrameEthProviderEvent", (event) => {
- if (event instanceof MessageEvent) {
- const ethProviderEvent = event.data;
- // @ts-expect-error
- emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);
- }
- });
- }
node_modules/@farcaster/frame-sdk/dist/sdk.d.ts
Changed around line 0
- import { FrameSDK, Emitter } from "./types";
- export declare function createEmitter(): Emitter;
- export declare const sdk: FrameSDK;
node_modules/@farcaster/frame-sdk/dist/sdk.js
Changed around line 0
- import { EventEmitter } from "eventemitter3";
- import { frameHost } from "./frameHost";
- import { provider } from "./provider";
- export function createEmitter() {
- const emitter = new EventEmitter();
- return {
- get eventNames() {
- return emitter.eventNames.bind(emitter);
- },
- get listenerCount() {
- return emitter.listenerCount.bind(emitter);
- },
- get listeners() {
- return emitter.listeners.bind(emitter);
- },
- addListener: emitter.addListener.bind(emitter),
- emit: emitter.emit.bind(emitter),
- off: emitter.off.bind(emitter),
- on: emitter.on.bind(emitter),
- once: emitter.once.bind(emitter),
- removeAllListeners: emitter.removeAllListeners.bind(emitter),
- removeListener: emitter.removeListener.bind(emitter),
- };
- }
- const emitter = createEmitter();
- export const sdk = {
- ...emitter,
- context: frameHost.context,
- actions: {
- setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),
- ready: frameHost.ready.bind(frameHost),
- close: frameHost.close.bind(frameHost),
- openUrl: frameHost.openUrl.bind(frameHost),
- addFrame: frameHost.addFrame.bind(frameHost),
- },
- wallet: {
- ethProvider: provider,
- }
- };
- // Required to pass SSR
- if (typeof document !== 'undefined')
- document.addEventListener("FarcasterFrameEvent", (event) => {
- if (event instanceof MessageEvent) {
- if (event.data.type === "primaryButtonClicked") {
- emitter.emit("primaryButtonClicked");
- }
- }
- });
node_modules/@farcaster/frame-sdk/dist/tsconfig.tsbuildinfo
Changed around line 0
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/comlink/dist/umd/protocol.d.ts","../../../node_modules/comlink/dist/umd/comlink.d.ts","../src/endpoint.ts","../../../node_modules/abitype/dist/types/register.d.ts","../../../node_modules/abitype/dist/types/types.d.ts","../../../node_modules/abitype/dist/types/abi.d.ts","../../../node_modules/abitype/dist/types/errors.d.ts","../../../node_modules/abitype/dist/types/narrow.d.ts","../../../node_modules/abitype/dist/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/signatures.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/structs.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/signature.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/splitparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/struct.d.ts","../../../node_modules/abitype/dist/types/exports/index.d.ts","../../../node_modules/ox/_types/core/errors.d.ts","../../../node_modules/ox/_types/core/internal/bytes.d.ts","../../../node_modules/ox/_types/core/internal/hex.d.ts","../../../node_modules/ox/_types/core/hex.d.ts","../../../node_modules/ox/_types/core/bytes.d.ts","../../../node_modules/ox/_types/core/hash.d.ts","../../../node_modules/ox/_types/core/internal/types.d.ts","../../../node_modules/ox/_types/core/abiitem.d.ts","../../../node_modules/ox/_types/core/publickey.d.ts","../../../node_modules/ox/_types/core/address.d.ts","../../../node_modules/ox/_types/core/internal/cursor.d.ts","../../../node_modules/ox/_types/core/internal/abiparameters.d.ts","../../../node_modules/ox/_types/core/abiparameters.d.ts","../../../node_modules/ox/_types/core/internal/abiitem.d.ts","../../../node_modules/ox/_types/core/abi.d.ts","../../../node_modules/ox/_types/core/internal/abiconstructor.d.ts","../../../node_modules/ox/_types/core/abiconstructor.d.ts","../../../node_modules/ox/_types/core/internal/abierror.d.ts","../../../node_modules/ox/_types/core/abierror.d.ts","../../../node_modules/ox/_types/core/accesslist.d.ts","../../../node_modules/ox/_types/core/rlp.d.ts","../../../node_modules/ox/_types/core/signature.d.ts","../../../node_modules/ox/_types/core/authorization.d.ts","../../../node_modules/ox/_types/core/transaction.d.ts","../../../node_modules/ox/_types/core/withdrawal.d.ts","../../../node_modules/ox/_types/core/block.d.ts","../../../node_modules/ox/_types/core/filter.d.ts","../../../node_modules/ox/_types/core/internal/abievent.d.ts","../../../node_modules/ox/_types/core/abievent.d.ts","../../../node_modules/ox/_types/core/internal/abifunction.d.ts","../../../node_modules/ox/_types/core/abifunction.d.ts","../../../node_modules/ox/_types/core/accountproof.d.ts","../../../node_modules/ox/_types/core/aesgcm.d.ts","../../../node_modules/ox/_types/core/internal/base58.d.ts","../../../node_modules/ox/_types/core/base58.d.ts","../../../node_modules/ox/_types/core/base64.d.ts","../../../node_modules/ox/_types/core/kzg.d.ts","../../../node_modules/ox/_types/core/blobs.d.ts","../../../node_modules/ox/_types/core/bloom.d.ts","../../../node_modules/ox/_types/core/blspoint.d.ts","../../../node_modules/@noble/curves/abstract/modular.d.ts","../../../node_modules/@noble/curves/abstract/utils.d.ts","../../../node_modules/@noble/curves/abstract/curve.d.ts","../../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../../node_modules/@noble/curves/abstract/weierstrass.d.ts","../../../node_modules/@noble/curves/abstract/tower.d.ts","../../../node_modules/@noble/curves/abstract/bls.d.ts","../../../node_modules/ox/_types/core/bls.d.ts","../../../node_modules/ox/_types/core/internal/lru.d.ts","../../../node_modules/ox/_types/core/caches.d.ts","../../../node_modules/ox/_types/core/contractaddress.d.ts","../../../node_modules/ox/_types/core/internal/ens.d.ts","../../../node_modules/ox/_types/core/ens.d.ts","../../../node_modules/@scure/bip32/lib/index.d.ts","../../../node_modules/ox/_types/core/internal/hdkey.d.ts","../../../node_modules/ox/_types/core/hdkey.d.ts","../../../node_modules/ox/_types/core/fee.d.ts","../../../node_modules/ox/_types/core/json.d.ts","../../../node_modules/ox/_types/core/log.d.ts","../../../node_modules/@scure/bip39/wordlists/czech.d.ts","../../../node_modules/@scure/bip39/wordlists/english.d.ts","../../../node_modules/@scure/bip39/wordlists/french.d.ts","../../../node_modules/@scure/bip39/wordlists/italian.d.ts","../../../node_modules/@scure/bip39/wordlists/japanese.d.ts","../../../node_modules/@scure/bip39/wordlists/korean.d.ts","../../../node_modules/@scure/bip39/wordlists/portuguese.d.ts","../../../node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts","../../../node_modules/@scure/bip39/wordlists/spanish.d.ts","../../../node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts","../../../node_modules/ox/_types/core/internal/mnemonic/wordlists.d.ts","../../../node_modules/ox/_types/core/mnemonic.d.ts","../../../node_modules/ox/_types/core/personalmessage.d.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/ox/_types/core/internal/register.d.ts","../../../node_modules/ox/_types/core/transactionreceipt.d.ts","../../../node_modules/ox/_types/core/transactionrequest.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/eth.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/wallet.d.ts","../../../node_modules/ox/_types/core/rpcschema.d.ts","../../../node_modules/ox/_types/core/internal/rpcschema.d.ts","../../../node_modules/ox/_types/core/provider.d.ts","../../../node_modules/ox/_types/core/rpcrequest.d.ts","../../../node_modules/ox/_types/core/rpcresponse.d.ts","../../../node_modules/ox/_types/core/internal/promise.d.ts","../../../node_modules/ox/_types/core/internal/rpctransport.d.ts","../../../node_modules/ox/_types/core/rpctransport.d.ts","../../../node_modules/ox/_types/core/secp256k1.d.ts","../../../node_modules/ox/_types/core/p256.d.ts","../../../node_modules/ox/_types/core/siwe.d.ts","../../../node_modules/ox/_types/core/solidity.d.ts","../../../node_modules/ox/_types/core/transactionenvelope.d.ts","../../../node_modules/ox/_types/core/transactionenvelopelegacy.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip1559.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip2930.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip4844.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip7702.d.ts","../../../node_modules/ox/_types/core/typeddata.d.ts","../../../node_modules/ox/_types/core/validatordata.d.ts","../../../node_modules/ox/_types/core/value.d.ts","../../../node_modules/ox/_types/core/internal/webauthn.d.ts","../../../node_modules/ox/_types/core/webauthnp256.d.ts","../../../node_modules/ox/_types/core/webcryptop256.d.ts","../../../node_modules/ox/_types/index.d.ts","../../../node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/zod/lib/zoderror.d.ts","../../../node_modules/zod/lib/locales/en.d.ts","../../../node_modules/zod/lib/errors.d.ts","../../../node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/zod/lib/types.d.ts","../../../node_modules/zod/lib/external.d.ts","../../../node_modules/zod/lib/index.d.ts","../../../node_modules/zod/index.d.ts","../../frame-core/dist/types.d.ts","../../frame-core/dist/index.d.ts","../src/framehost.ts","../src/types.ts","../src/provider.ts","../src/sdk.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/node-forge/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileIdsList":[[228,239,281],[239,281],[145,146,148,149,150,239,281],[145,239,281],[145,146,147,239,281],[145,149,239,281],[228,229,230,231,232,239,281],[228,230,239,281],[239,281,294,331],[239,281,333],[239,281,334],[239,281,331],[239,278,281],[239,280,281],[281],[239,281,286,316],[239,281,282,287,293,294,301,313,324],[239,281,282,283,293,301],[234,235,236,239,281],[239,281,284,325],[239,281,285,286,294,302],[239,281,286,313,321],[239,281,287,289,293,301],[239,280,281,288],[239,281,289,290],[239,281,293],[239,281,291,293],[239,280,281,293],[239,281,293,294,295,313,324],[239,281,293,294,295,308,313,316],[239,276,281,329],[239,276,281,289,293,296,301,313,324],[239,281,293,294,296,297,301,313,321,324],[239,281,296,298,313,321,324],[237,238,239,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330],[239,281,293,299],[239,281,300,324,329],[239,281,289,293,301,313],[239,281,302],[239,281,303],[239,280,281,304],[239,278,279,280,281,282,283,284,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330],[239,281,306],[239,281,307],[239,281,293,308,309],[239,281,308,310,325,327],[239,281,293,313,314,315,316],[239,281,313,315],[239,281,313,314],[239,281,316],[239,281,317],[239,278,281,313],[239,281,293,319,320],[239,281,319,320],[239,281,286,301,313,321],[239,281,322],[239,281,301,323],[239,281,296,307,324],[239,281,286,325],[239,281,313,326],[239,281,300,327],[239,281,328],[239,281,286,293,295,304,313,324,327,329],[239,281,313,330],[239,281,337,338,339],[239,281,342],[82,83,239,281],[83,239,281],[82,84,85,86,87,89,90,91,92,95,96,97,98,99,100,101,102,103,239,281],[85,239,281],[84,85,88,239,281],[84,85,239,281],[84,91,239,281],[84,88,90,239,281],[83,84,88,239,281],[83,84,89,239,281],[83,84,88,93,94,239,281],[83,84,86,88,93,94,239,281],[83,84,239,281],[83,84,88,93,239,281],[82,83,84,88,94,239,281],[82,83,84,239,281],[79,239,281],[104,105,118,239,281],[104,105,108,111,112,117,119,120,239,281],[104,105,108,111,112,117,118,119,122,239,281],[104,105,108,109,110,111,112,114,117,118,119,132,239,281],[104,105,108,111,112,116,117,118,119,134,239,281],[104,105,108,110,111,118,119,239,281],[104,105,108,109,116,239,281],[105,108,111,114,239,281],[207,239,281],[104,105,109,110,113,239,281],[105,108,109,239,281],[105,108,110,111,114,125,126,239,281],[105,108,109,138,239,281],[105,108,109,111,115,141,239,281],[105,108,111,114,128,129,239,281],[105,108,109,110,239,281],[105,108,109,111,144,151,239,281],[105,108,109,111,239,281],[105,106,107,108,239,281],[153,239,281],[105,108,109,110,111,114,125,239,281],[105,108,109,110,156,239,281],[108,111,239,281],[105,108,111,114,130,239,281],[105,108,109,113,158,159,239,281],[105,106,107,109,239,281],[111,118,239,281],[104,108,111,118,131,239,281],[104,105,111,112,117,119,239,281],[104,105,108,109,111,114,115,117,239,281],[105,109,239,281],[105,108,157,207,239,281],[105,158,160,239,281],[105,108,239,281],[164,165,166,167,168,169,170,171,172,173,239,281],[105,239,281],[183,239,281],[111,183,239,281],[108,114,128,130,131,136,161,163,179,180,183,239,281],[108,111,114,180,183,239,281],[105,111,183,186,187,190,239,281],[105,113,205,239,281],[105,108,109,160,174,239,281],[105,108,109,113,126,145,146,149,239,281],[105,111,114,177,183,184,239,281],[105,108,109,111,115,239,281],[111,183,184,207,239,281],[111,207,239,281],[111,178,181,182,239,281],[105,111,183,184,187,188,189,239,281],[105,108,109,111,113,114,126,145,146,149,239,281],[105,111,114,239,281],[105,108,111,114,124,126,127,239,281],[105,108,110,111,114,124,125,126,195,239,281],[105,108,110,111,124,125,126,142,195,197,239,281],[105,108,110,111,114,124,125,126,127,195,239,281],[105,108,110,111,114,125,126,195,239,281],[105,108,111,114,163,239,281],[105,108,111,114,124,127,239,281],[104,105,108,109,110,111,114,117,162,239,281],[105,108,109,110,114,239,281],[105,108,109,110,111,113,126,140,192,204,239,281],[105,108,109,111,113,126,239,281],[105,108,109,110,112,113,114,117,119,121,123,124,125,126,127,128,129,130,131,133,135,136,137,139,140,141,142,143,144,152,154,155,157,160,161,162,163,175,176,178,179,180,183,185,186,187,190,191,192,193,194,195,196,197,198,199,200,201,202,203,205,206,239,281],[239,248,252,281,324],[239,248,281,313,324],[239,243,281],[239,245,248,281,321,324],[239,281,301,321],[239,243,281,331],[239,245,248,281,301,324],[239,240,241,244,247,281,293,313,324],[239,248,255,281],[239,240,246,281],[239,248,269,270,281],[239,244,248,281,316,324,331],[239,269,281,331],[239,242,243,281,331],[239,248,281],[239,242,243,244,245,246,247,248,249,250,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,270,271,272,273,274,275,281],[239,248,263,281],[239,248,255,256,281],[239,246,248,256,257,281],[239,247,281],[239,240,243,248,281],[239,248,252,256,257,281],[239,252,281],[239,246,248,251,281,324],[239,240,245,248,255,281],[239,281,313],[239,243,248,269,281,329,331],[219,239,281],[210,211,239,281],[208,209,210,212,213,217,239,281],[209,210,239,281],[218,239,281],[210,239,281],[208,209,210,213,214,215,216,239,281],[208,209,219,239,281],[221,239,281],[207,220,239,281],[80,239,281],[80,81,222,239,281],[222,226,239,281],[207,222,223,239,281],[177,223,224,225,239,281],[177,207,222,239,281]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a456eb21680eca96d5e836e2a5cc74730a2c0e03f18eb17a7f652b30c993e4","impliedFormat":1},{"version":"9426d1cc15328fcbb59adb88880ccfd79f2bc959334d485273da743aac083eaa","impliedFormat":1},{"version":"e91d2943ca5922809af0c9bcb01d6861ef48c6b3602569183bb35306cf5c7298","signature":"62cc0a18c32b585fb6ac0c9d6296f44c774c283183de18c0c083ab504ba6a417"},{"version":"b166e33cf8226ac8781899da244397e77e5b6528271339ce26ece0c2c7242d7f","impliedFormat":1},{"version":"a623d5cf7925e72dbf4602862499564389c7c3dc0ce049733cc0ec756a846667","impliedFormat":1},{"version":"9c1724d9b0cb3d7141dc25a44b0d18cf0b3b20a42e971c6898d4195ec6d4b8dd","impliedFormat":1},{"version":"63634c0855e639ea7f609613d799bbb0dc774ec9f3242bc272c5567dc5ccd485","impliedFormat":1},{"version":"592f06c425ab27b4bafec624ef5b153cbdde9ac58f7113100a2da1c4309d1309","impliedFormat":1},{"version":"19c8ab51b4b07c529d95cd4d5c8d100a68dca247ec83a5097d35106fd8a7acca","impliedFormat":1},{"version":"bec1d0ac62cee9b4d1ea8b64c4798c59c1726668b76d06b68a206e0cb0ac76a6","impliedFormat":1},{"version":"fb4f06b2af9ee4b2d2be8c964b0a8f6dd260be9048488ffcf04eb5c0fcb8bf61","impliedFormat":1},{"version":"f185055f36d76e2df5eeb87ae1148a25a125be2bff2095e1bd39c1c7ce85a640","impliedFormat":1},{"version":"948a56ec8bfbbf20ad2496f49f451cfeb878cfcd6156032c0769b603f3ed8f18","impliedFormat":1},{"version":"979fdebc12d30becce6a15e68d99bc8a2a470a8dcf0898ac9e2d241a7e531940","impliedFormat":1},{"version":"1824ad7d4259910646279d667e517334c0aa24d5c810e8ea6da756fc2e02372f","impliedFormat":1},{"version":"989e9060e220ff86025044ba3c867a83512a655b7cf6253b2bd682192debf390","impliedFormat":1},{"version":"8b1feb568c859feb59236e9723b7a86e2ff8f9a8f2012366ffd1798164dc2798","impliedFormat":1},{"version":"8fab988b0129e674afc0bc0e95329b4052cf027f5d5b5b3e6e92d055b5ba88ef","impliedFormat":1},{"version":"4fe56d524ab24c225668803c1792945053e648b4e8fa4e50fa35594495b56732","impliedFormat":1},{"version":"2652931b8f7dca9a57f21aeb25b5d46851dcf17e4d5ed54b9b57d5d26e647680","impliedFormat":1},{"version":"d364c8df7d52199f5d011b4ded96f36dd114b984f5ee2e50ffe7d30ac1ab4bba","impliedFormat":1},{"version":"408f9eb3c7a3533bf5f07e0cde110a5ee0702864795ee6727792520fe60320b6","impliedFormat":1},{"version":"ba79eb15c36ff23e352ef608ceb7f9f0f278b15ad42512c05eedbe78f228e0e4","impliedFormat":1},{"version":"4cd233c6af471432253a67ae4f3b43c85e58a71418d98c3e162a1dac975c68f6","impliedFormat":1},{"version":"aa77c7d8ddc961e8192bcaa92da140e1205f8aee78bfadead5f52b8844d7d05c","impliedFormat":1},{"version":"37e37d3a525a207efab5458069fd9a27a174d2dc3af729702c81729ca03a349f","impliedFormat":1},{"version":"70997e63b7b3d90188fa2106753d35afd3b43b2bde957c46a5516d89e3ef0c1a","impliedFormat":1},{"version":"7fdaebdb3780d0549a8e0abcb18965e2f62224bdde633aeafb22c64c02fe9e9d","impliedFormat":1},{"version":"24f848479d1fd142d3d7cf034bedca247d1d9b8b31c2632c09695bd6a0441141","impliedFormat":1},{"version":"7e977910c045ec087f435905eb730e9c84e8d6b97f0dd0fe0c022dfed665613a","impliedFormat":1},{"version":"9c4ec2692cdb791823b9407753dec50d69b1b990cf7038cac3fab01e8ed5f709","impliedFormat":1},{"version":"176e7ce333b9988d68cfd5ab6717b20421a03b415af57f2a3bea1aa6b8d634a9","impliedFormat":1},{"version":"301a1ba797c537d2598a557af4862e7823353c80529c9a58bc1a0c08779deb5d","impliedFormat":1},{"version":"4fb2df0b48ac55d960fedfb7e7b917d2d29608d7f351b70b6b3104e2d02d2f11","impliedFormat":1},{"version":"2f37ef3a5d3fb119b390cb48c77352914c814b98948633deac90099faae320a6","impliedFormat":1},{"version":"ca2ce76fd743888d0f0c5be48b1b17a864f5ff2b0d09e954d3690645a794533f","impliedFormat":1},{"version":"728ec07c8a50b9f22da9c9aa8859e29462526fd996ac1d21c6c9a81b78106dd5","impliedFormat":1},{"version":"d4d210575ebc08ed97821b7a107692b91c9590d5328ec3aaac0b75f66a1c9188","impliedFormat":1},{"version":"fcaa6a4283732fcc1b571a326567c10b1ebce2faf1a0645493080ba230e57497","impliedFormat":1},{"version":"be9ef0a0446cf28d529a684e4a7d14101f03e054896704fbdc5470d8fa4de6b4","impliedFormat":1},{"version":"acd32f2f192d93e8161938ebfd74fa063e67a09cbe0156a74ae2e421a1e8f786","impliedFormat":1},{"version":"1eeb9deebe9a0a6cc52a32aa1533a1535ecc1b4e831290c753e72e0394e866a9","impliedFormat":1},{"version":"ae1f27a5966db7640edb4c82974b985acb7b1fa0859bff7cd769629436822d9a","impliedFormat":1},{"version":"a3d0b36bb3185da856cc0a7df02f63008935602ed09f84b0d960c7f9f7f6d63d","impliedFormat":1},{"version":"60319cf75d460432a0769a2f98a9ab6fc3ad39290bf7f1b33b922e832ff5b40e","impliedFormat":1},{"version":"30ceaf6e65817221c5c62cedfc26892a4b79a78c7eb7367bcccc0e217b517bf1","impliedFormat":1},{"version":"a3ea4adb87d130799d26945196bba7e889056c74dac98069d58c015d10f3c053","impliedFormat":1},{"version":"a82f1d66de93c80bca7a744647c748657c050341e53de63fae5aecb72f85f5e6","impliedFormat":1},{"version":"83dc49d957cb3b4af3a45cd7b54958149d21088d49f95e8ba6e3d3fb2b37d880","impliedFormat":1},{"version":"b7825c3d04bfc38caf9cb94341cede132d227654b28e3a603d1576bf199a7e47","impliedFormat":1},{"version":"d4832d1deaacad5d196b2a83239fb94c80f97df889c02a75859b05b460885300","impliedFormat":1},{"version":"888180b3d951298bf85d430543a1fa2fc6264fc847aef5baa821c743b5d84a58","impliedFormat":1},{"version":"4ec19d58993999260e0df245eec5fd6d7dd92978360c4f0706c9260091f55c70","impliedFormat":1},{"version":"0bc4f86d58f4a4b5a9563ba8d2b23a3fac187a6e167772f6689ea807081ed631","impliedFormat":1},{"version":"7a4e38850bfca2b105fd3e5609b68b52271fd7f2cab9f1d4031748e8bfd29633","impliedFormat":1},{"version":"496ee894efcd5de63169a3a4e47d74f16f754eb212b1ef209f9255aaaeef3450","impliedFormat":1},{"version":"246bec681a7465de230b083e0e63633b568a2d79c20fe167d3280e21200b22c8","impliedFormat":1},{"version":"3ee38e0bac65430814b195ed22b5aadfbe4fbd8890c5e5b45a7ba13f05c0ea0d","impliedFormat":1},{"version":"45181e4221f90d98bf2046ba55cdc22411dc64b9a8cc04f1c8702038b7334d01","impliedFormat":1},{"version":"7fe0253ff44f072ea13fa372e2fbd007aa439df9560762950d38b4c203b2c51a","impliedFormat":1},{"version":"bf4ebcedc7324dd0cbe83488830f7966e808fabf4836d516d1b591ea91417c68","impliedFormat":1},{"version":"c53f7caa42ad0bff2b3cad20e4780990aadf647c845cb66cec004062cc4ae549","impliedFormat":1},{"version":"af0dfd141ecb2e24ef9a3028727214a69aa528d0be91e8728a7abd4fd6659b5f","impliedFormat":1},{"version":"786d583f831d03da4aed9f9354fd9c4ef00aa8122564da5e683631423639c258","impliedFormat":1},{"version":"418fdcdefc32953c6c7ea7e9979ce84b87618de9def698e73da2c16697fe023b","impliedFormat":1},{"version":"4d0db315ab6869de22694dc968fe740cfef635a21455a4d2bd33bc95b8eec381","impliedFormat":1},{"version":"987339ae38c9341b0d90da7350e543c0d561d04b540f29a6912d387ffee30123","impliedFormat":1},{"version":"d6add5a006175d8e4ac5067baa29854010ae2be9eec488f3b09f62e48fdcbc73","impliedFormat":1},{"version":"78b320333fa889c9532276db075578cdde53e41d0c5ff1dc901a22e5c9e25bd8","impliedFormat":1},{"version":"44bebcbc4a93fea28f3564a7763dd12f0f3bdec624eb8a63e97afd007d1ff4bd","impliedFormat":1},{"version":"7531f6904a711cd870729de7bd8fb5829088eaf82381e88f81aa4a2c9ec57b75","impliedFormat":1},{"version":"f68260d8d6d27ca979ddc8e3ee70ada9818c77dbe2dc6824ca0b7a041f8e5c79","impliedFormat":1},{"version":"af120f4603c7fb09e9c082dd486388c102a17f434031eb2b68c95a1e8994412a","impliedFormat":1},{"version":"af807f4d873d3c603e802b9b8aef8fdf067a3e61e7dfe33f78a28fe21ca11061","impliedFormat":1},{"version":"08447e8b528a1f8d1162aa044695d460ce5179a78bd174fa0673fa16b06011aa","impliedFormat":1},{"version":"8e532c6486042736463d1116d45b0db814d969ffd2ee822e4e5ce975807c16f0","impliedFormat":1},{"version":"fad47f66fef1ff277730abff9c9330dd70284eb0ced43d6dd6aee15fc5f19a1b","impliedFormat":1},{"version":"7b4b0aaf0978122b44aa6317977be3e2f9d3d261ae4a8d93bfd511a7ddee7dfe","impliedFormat":1},{"version":"cb5def9d6efe73b09a7adce13bbb7fad7ee6df7a59259300de6ca77fe84041fc","impliedFormat":1},{"version":"1ddd1ca692a6c656ade0a85c9a722b3679b3d0bf113b699908e0325cf3537dbe","impliedFormat":1},{"version":"16c6ff8bcfef0ad22abffa3329760bb611c4c4aa098ece0d6bcfd1cd16610997","impliedFormat":1},{"version":"3d15157b6685e63a7e43a39bbc1fbcfdbf1250fa3598af55a2384f6f31260c86","impliedFormat":1},{"version":"58b5bc399cd98b87eff2c80d995d4dd63e69c801ec880b85c7da73ddc561a751","impliedFormat":1},{"version":"401c5b0f01bb0dce7a85899d8665c7d9c0b1637dc642805320d76c1a071135dd","impliedFormat":1},{"version":"af81e13747ef7589a726505dd4c2dcf00bb2b9fd7c3c84d580c1d02dbc3b58a9","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"516c53364c6b242591c65afc8b0f0f0cee74ac8a04f52470a539fcb33da2e318","impliedFormat":1},{"version":"cdf612f32afd760cd4a568e3f0c4646394f18fe2277a5ec1c084f1430776f1e0","impliedFormat":1},{"version":"e8ee036c1281885b9cc58f9d1d47472037d080a45b44a3ecbb8fea445e87415d","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"90887074bbd664eb4726465ccc6740fa8886e525e5c0afcc734e41df41851a60","impliedFormat":1},{"version":"0a3d92e1ed031f67294fc02692352444c0514e371b7093b8d224b6f9ea02d958","impliedFormat":1},{"version":"cc31889ffc5c322ff53137f54f3aa8f74a969cd01adbb296737231f31a870322","impliedFormat":1},{"version":"e20c7790d6923b9663bff5ba3b3bb2769f65df6fdd3294034fd9d289034ebe95","impliedFormat":1},{"version":"3df74fc90d6cf9c51ad6864a7d9e1e6d162a6e158f99ab2b7d878b4646aa343b","impliedFormat":1},{"version":"306712d7dc95ea2006413dec36b165bff346626340d2ba5adc14a3bafdcb57db","impliedFormat":1},{"version":"cca7da500accfa2e8689e453b1d74d05bcbf1dc6ef86f12b8cb1518a880adffa","impliedFormat":1},{"version":"9a3b507c7f949ca6e0988c7a799913d8ad237434b61c5f8ef8651c770e82db8e","impliedFormat":1},{"version":"3470c8f802d69951553de4bf72f42a77b1d273c971dc8462d7ac94b2d5069171","impliedFormat":1},{"version":"778e3be9387041245dc4eddd0efe6a61f0ebe4bed017493a30785abd027b0458","impliedFormat":1},{"version":"312476b9c5aa822a32c969ad650d1b475b631506af9a1448abf2d714997f7510","impliedFormat":1},{"version":"2dc955a0fbc3c0b9a49bcc3ffb9dfb31b3a53af0db862260dd4f824c6b4ff36c","impliedFormat":1},{"version":"0f513df152e8cd877ddc47e1a767f77d2111d7b5dfbc4f68ca355d1dd59c062c","impliedFormat":1},{"version":"947dba9cff98d6eeeb5c1933600a03d2ea16967dc3c4080c15e5d4667990f814","impliedFormat":1},{"version":"396b5bf9e2469a7736cc70f5b0a4340bf5e74ca8337213cbfc1f9c44b0e3799c","impliedFormat":1},{"version":"0c904d0442caed7effc17e2c70c7c96df0b34797e1adb9999ce5e5bbbf7e1471","impliedFormat":1},{"version":"4e42a180e6ad34da29c0f9e0e34dfe728292d4148aeb1a36e3ca8e6551f0fc42","impliedFormat":1},{"version":"8722ec4640f5eb5dcc91be6e59e6148b861e93954a766e05d5d55dd96b29e1c1","impliedFormat":1},{"version":"3118f4f3494834d0a131955088b28cba84639a66e23e6de211bdb75fe518ea90","impliedFormat":1},{"version":"8ec50f5d9824f3692fe32a80fb160d72ea39d94c5aac4f3334f7724ae61de6df","impliedFormat":1},{"version":"dfafee7cd0b796c959cd7f4c6d4ae2f1f89fab40129d993dd564f9ef0bd0068d","impliedFormat":1},{"version":"24056a75e8e602d911cea68b06b5e238604aff92d30ec8a119a2ecf07568d4fb","impliedFormat":1},{"version":"bc5fa245e7a3eb9216ce30106e37294a9691efd85391e3de61478c3ca0da360e","impliedFormat":1},{"version":"4523237b5a992a30850668522bb1719bab8f9e50c00b6428f660ca75a451a7b1","impliedFormat":1},{"version":"f116a1399a2583ff7ce15068f007e5c47d06c9964674bc48ea6e69867d0692a5","impliedFormat":1},{"version":"68cabe63e69d17160c77eeefafd83df10a4c0ec3353b6a91a48a205e9dd505ab","impliedFormat":1},{"version":"400ba51008a98a5afc065b12c3aee8f447a0b66c2a4c1bcc3e5a2f41015ddee7","impliedFormat":1},{"version":"49f735c4888a72b7e70b4a90db308ea672967fc2a1670c5b6b598f6b09403baf","impliedFormat":1},{"version":"5a75e49d8e0a78e2cc02bd13fcab4f26d5d6729912e2096b6fe442b0960c0cf7","impliedFormat":1},{"version":"8dd31c3f136773aac1b62723ada4c7fab649dddbe02274424cdac9b9a76bc22d","impliedFormat":1},{"version":"5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","impliedFormat":1},{"version":"c2869c4f2f79fd2d03278a68ce7c061a5a8f4aed59efb655e25fe502e3e471d5","impliedFormat":1},{"version":"b8fe42dbf4b0efba2eb4dbfb2b95a3712676717ff8469767dc439e75d0c1a3b6","impliedFormat":1},{"version":"8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","impliedFormat":1},{"version":"ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","impliedFormat":1},{"version":"83306c97a4643d78420f082547ea0d488a0d134c922c8e65fc0b4f08ef66d92b","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","impliedFormat":1},{"version":"c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","impliedFormat":1},{"version":"dccd26a5c85325a011aff40f401e0892bd0688d44132ba79e803c67e68fffea5","impliedFormat":1},{"version":"f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","impliedFormat":1},{"version":"b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","impliedFormat":1},{"version":"5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","impliedFormat":1},"7e0062d659dfc76e70897c1e8d9f4f461f6ac1158da4714877f166f5bbef6161","d51485b82b29d07016e9d3359f271622966aca8edfc59648a1d2369e6404123d",{"version":"ea189f99da1173c9a5c4f53bb598257c9cf0bb7c8e51abd0b1fd86d170191527","signature":"9dc518192b9e952cb2e21631e089eb2d0ff8fdf7101f0a1c0218e6d451e3a2c3"},{"version":"a57320c62fd0f3372f648b6dba66c61cd67c6870aa33efcc79fb0831b19686b7","signature":"4c284b28c519f7647c58d778cef1d2c8fb0a0c8a4bc6c28581096d4af66c2265","affectsGlobalScope":true},{"version":"d311f33b46c26308da967ae247feafe4806b28c497df78ff9c4372680ef99441","signature":"a378394f1ba82996c3837f14e341d1b93feeb2b6ed22d71b9763edd0f800ab14"},{"version":"dbe4b140ae2ef010df85e50995f2536a5f4fda2e48155f64834dcde2243873c9","signature":"d9e8fac6e9abbf7825ff0926e9794c3ce7934c1c30d2182216853774d37409ca"},{"version":"956e56ae640664e6a03d0e1169ae98e720f474575aa92af6b6cd2365ee038d3d","signature":"01b41ff7ac9f160cc2fd00e1cc45568eda4a87060b3dd60d5fe58279565bcf94"},{"version":"03f1d83d61696326ea29c8a1c15cbaccf61e92598d53f2ccae06078531f42448","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"3a9313fe5ace558b8b18e85f931da10b259e738775f411c061e5f15787b138eb","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"e9ad08a376ac84948fcca0013d6f1d4ae4f9522e26b91f87945b97c99d7cc30b","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"04296378d9636f6f9450a6e2b9889ea1d3b72a05b9270cb529ace09f04cda1f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"918d3b03a75858dcd5dbb275f19448b6b9a222aa8fc8471aca38c28a32ecb40f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bd91a2a356600dee28eb0438082d0799a18a974a6537c4410a796bab749813c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"ed6b820c54de95b2510bb673490d61c7f2187f532a339d8d04981645a918961f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"aa17748c522bd586f8712b1a308ea23af59c309b2fd278f6d4f406647c72e659","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1}],"root":[81,[223,227]],"options":{"declaration":true,"esModuleInterop":true,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":5},"referencedMap":[[230,1],[228,2],[151,3],[147,4],[148,5],[145,2],[150,6],[146,2],[149,5],[158,2],[164,2],[165,2],[166,2],[167,2],[168,2],[169,2],[170,2],[171,2],[172,2],[173,2],[233,7],[229,1],[231,8],[232,1],[332,9],[333,2],[334,10],[335,11],[336,12],[278,13],[279,13],[280,14],[239,15],[281,16],[282,17],[283,18],[234,2],[237,19],[235,2],[236,2],[284,20],[285,21],[286,22],[287,23],[288,24],[289,25],[290,25],[292,26],[291,27],[293,28],[294,29],[295,30],[277,31],[238,2],[296,32],[297,33],[298,34],[331,35],[299,36],[300,37],[301,38],[302,39],[303,40],[304,41],[305,42],[306,43],[307,44],[308,45],[309,45],[310,46],[311,2],[312,2],[313,47],[315,48],[314,49],[316,50],[317,51],[318,52],[319,53],[320,54],[321,55],[322,56],[323,57],[324,58],[325,59],[326,60],[327,61],[328,62],[329,63],[330,64],[337,2],[338,2],[340,65],[341,2],[342,2],[343,66],[84,67],[85,68],[104,69],[99,70],[100,71],[101,72],[102,70],[103,70],[92,73],[91,74],[89,75],[90,76],[95,77],[96,78],[97,78],[98,78],[88,79],[94,80],[93,81],[86,2],[82,2],[83,2],[87,82],[80,83],[79,2],[339,2],[177,2],[119,84],[121,85],[123,86],[133,87],[135,88],[112,89],[117,90],[124,91],[136,92],[114,93],[137,94],[127,95],[139,96],[140,94],[142,97],[130,98],[143,99],[152,100],[144,101],[109,102],[154,103],[155,104],[157,105],[105,2],[161,106],[131,107],[110,94],[160,108],[108,109],[120,110],[122,110],[132,111],[134,110],[118,112],[116,113],[138,94],[106,114],[115,114],[156,115],[159,116],[107,117],[153,2],[174,118],[188,119],[178,120],[184,121],[181,122],[182,123],[189,124],[111,2],[204,125],[162,119],[141,114],[163,91],[175,126],[192,127],[176,99],[185,128],[113,101],[125,129],[186,130],[187,131],[183,132],[190,133],[191,134],[126,101],[193,135],[194,2],[128,136],[195,91],[197,137],[198,137],[199,138],[200,139],[196,140],[179,141],[180,142],[201,143],[202,144],[203,119],[205,145],[206,146],[129,117],[207,147],[77,2],[78,2],[13,2],[14,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[25,2],[26,2],[4,2],[27,2],[31,2],[28,2],[29,2],[30,2],[32,2],[33,2],[34,2],[5,2],[35,2],[36,2],[37,2],[38,2],[6,2],[42,2],[39,2],[40,2],[41,2],[43,2],[7,2],[44,2],[49,2],[50,2],[45,2],[46,2],[47,2],[48,2],[8,2],[54,2],[51,2],[52,2],[53,2],[55,2],[9,2],[56,2],[57,2],[58,2],[60,2],[59,2],[61,2],[62,2],[10,2],[63,2],[64,2],[65,2],[11,2],[66,2],[67,2],[68,2],[69,2],[70,2],[1,2],[71,2],[72,2],[12,2],[75,2],[74,2],[73,2],[76,2],[255,148],[265,149],[254,148],[275,150],[246,151],[245,152],[274,12],[268,153],[273,154],[248,155],[262,156],[247,157],[271,158],[243,159],[242,12],[272,160],[244,161],[249,162],[250,2],[253,162],[240,2],[276,163],[266,164],[257,165],[258,166],[260,167],[256,168],[259,169],[269,12],[251,170],[252,171],[261,172],[241,173],[264,164],[263,162],[267,2],[270,174],[220,175],[212,176],[218,177],[214,2],[215,2],[213,178],[216,175],[208,2],[209,2],[219,179],[211,180],[217,181],[210,182],[222,183],[221,184],[81,185],[223,186],[227,187],[225,188],[226,189],[224,190]],"version":"5.7.2"}
node_modules/@farcaster/frame-sdk/dist/types.d.ts
Changed around line 0
- import type { EventEmitter } from "eventemitter3";
- import type { Provider } from "ox";
- import type { FrameContext, AddFrame } from "@farcaster/frame-core";
- declare global {
- interface Window {
- ReactNativeWebView: {
- postMessage: (message: string) => void;
- };
- }
- }
- /** Combines members of an intersection into a readable type. */
- export type Compute = {
- [key in keyof type]: type[key];
- } & unknown;
- export type EventMap = {
- primaryButtonClicked: () => void;
- };
- export type Emitter = Compute>;
- export type SetPrimaryButton = (options: {
- text: string;
- loading?: boolean;
- disabled?: boolean;
- hidden?: boolean;
- }) => Promise;
- export type FrameSDK = {
- context: Promise;
- actions: {
- ready: () => Promise;
- openUrl: (url: string) => Promise;
- close: () => Promise;
- setPrimaryButton: SetPrimaryButton;
- addFrame: AddFrame;
- };
- wallet: {
- ethProvider: Provider.Provider;
- };
- } & Emitter;
node_modules/@farcaster/frame-sdk/dist/types.js
Changed around line 0
- export {};
node_modules/@farcaster/frame-sdk/package.json
Changed around line 0
- {
- "name": "@farcaster/frame-sdk",
- "version": "0.0.8",
- "main": "dist/index.js",
- "scripts": {
- "clean": "rm -rf dist",
- "prebuild": "npm run clean",
- "build": "yarn build:cjs && yarn build:umd",
- "build:cjs": "tsc",
- "build:umd": "node scripts/build.js",
- "typecheck": "tsc --noEmit"
- },
- "files": [
- "dist",
- "src"
- ],
- "devDependencies": {
- "@farcaster/tsconfig": "*",
- "esbuild": "^0.24.0",
- "typescript": "^5.6.3"
- },
- "dependencies": {
- "@farcaster/frame-core": "^0.0.7",
- "comlink": "^4.4.2",
- "eventemitter3": "^5.0.1",
- "ox": "^0.4.0"
- }
- }
node_modules/@farcaster/frame-sdk/src/endpoint.ts
Changed around line 0
- import { type Endpoint, windowEndpoint } from "comlink";
-
- const mockEndpoint: Endpoint = {
- postMessage() {
- // noop
- },
- addEventListener: () => {
- // noop
- },
- removeEventListener: () => {
- // noop
- },
- }
-
- const webViewEndpoint: Endpoint = {
- postMessage: (data: unknown) => {
- console.debug("[webview:req]", data);
- window.ReactNativeWebView.postMessage(JSON.stringify(data));
- },
- addEventListener: (_, listener, ...args) => {
- document.addEventListener("FarcasterFrameCallback", listener, ...args);
- },
- removeEventListener: (_, listener) => {
- document.removeEventListener("FarcasterFrameCallback", listener);
- },
- };
-
- export const endpoint = (() => {
- // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint
- if (typeof window === 'undefined') return mockEndpoint
- return window?.ReactNativeWebView
- ? webViewEndpoint
- : windowEndpoint(window?.parent ?? window);
- })()
node_modules/@farcaster/frame-sdk/src/frameHost.ts
Changed around line 0
- import { wrap } from "comlink";
- import { endpoint } from "./endpoint";
- import { FrameHost } from "@farcaster/frame-core";
-
- export const frameHost = wrap(endpoint);
node_modules/@farcaster/frame-sdk/src/index.ts
Changed around line 0
- import { sdk } from "./sdk";
-
- export * from "./sdk";
- export * from "@farcaster/frame-core";
-
- export default sdk;
node_modules/@farcaster/frame-sdk/src/provider.ts
Changed around line 0
- import { Provider, RpcRequest, RpcResponse } from "ox";
- import { frameHost } from "./frameHost";
- import { EthProviderWireEvent } from "@farcaster/frame-core";
-
- const emitter = Provider.createEmitter();
- const store = RpcRequest.createStore();
-
- type GenericProviderRpcError = {
- code: number;
- details?: string;
- }
-
- export function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError {
- switch (code) {
- case 4001:
- return new Provider.UserRejectedRequestError();
- case 4100:
- return new Provider.UnauthorizedError();
- case 4200:
- return new Provider.UnsupportedMethodError();
- case 4900:
- return new Provider.DisconnectedError();
- case 4901:
- return new Provider.ChainDisconnectedError();
- default:
- return new Provider.ProviderRpcError(code, details ?? 'Unknown provider RPC error');
- }
- }
-
- export const provider: Provider.Provider = Provider.from({
- ...emitter,
- async request(args) {
- // @ts-expect-error
- const request = store.prepare(args);
-
- try {
- const response = await frameHost.ethProviderRequestV2(
- request
- ).then((res) => RpcResponse.parse(res, { request, raw: true }));
-
-
- if (response.error) {
- throw toProviderRpcError(response.error)
- }
-
- return response.result;
- } catch (e) {
- // ethProviderRequestV2 not supported, fall back to v1
- if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {
- return await frameHost.ethProviderRequest(request);
- }
-
- if (
- e instanceof Provider.ProviderRpcError ||
- e instanceof RpcResponse.BaseError
- ) {
- throw e;
- }
-
-
- throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined })
- }
- }
- });
-
- // Required to pass SSR
- if (typeof document !== 'undefined') {
- document.addEventListener("FarcasterFrameEthProviderEvent", (event) => {
- if (event instanceof MessageEvent) {
- const ethProviderEvent = event.data as EthProviderWireEvent;
- // @ts-expect-error
- emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);
- }
- });
- }
node_modules/@farcaster/frame-sdk/src/sdk.ts
Changed around line 0
- import { EventEmitter } from "eventemitter3";
- import { FrameSDK, Emitter, EventMap } from "./types";
- import { frameHost } from "./frameHost";
- import { provider } from "./provider";
-
- export function createEmitter(): Emitter {
- const emitter = new EventEmitter();
-
- return {
- get eventNames() {
- return emitter.eventNames.bind(emitter);
- },
- get listenerCount() {
- return emitter.listenerCount.bind(emitter);
- },
- get listeners() {
- return emitter.listeners.bind(emitter);
- },
- addListener: emitter.addListener.bind(emitter),
- emit: emitter.emit.bind(emitter),
- off: emitter.off.bind(emitter),
- on: emitter.on.bind(emitter),
- once: emitter.once.bind(emitter),
- removeAllListeners: emitter.removeAllListeners.bind(emitter),
- removeListener: emitter.removeListener.bind(emitter),
- };
- }
-
- const emitter = createEmitter();
-
- export const sdk: FrameSDK = {
- ...emitter,
- context: frameHost.context,
- actions: {
- setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),
- ready: frameHost.ready.bind(frameHost),
- close: frameHost.close.bind(frameHost),
- openUrl: frameHost.openUrl.bind(frameHost),
- addFrame: frameHost.addFrame.bind(frameHost),
- },
- wallet: {
- ethProvider: provider,
- }
- };
-
- // Required to pass SSR
- if (typeof document !== 'undefined')
- document.addEventListener("FarcasterFrameEvent", (event) => {
- if (event instanceof MessageEvent) {
- if (event.data.type === "primaryButtonClicked") {
- emitter.emit("primaryButtonClicked");
- }
- }
- });
node_modules/@farcaster/frame-sdk/src/types.ts
Changed around line 0
- import type { EventEmitter } from "eventemitter3";
- import type { Provider } from "ox";
- import type { FrameContext, AddFrame } from "@farcaster/frame-core";
-
- declare global {
- interface Window {
- // Exposed by react-native-webview
- ReactNativeWebView: {
- postMessage: (message: string) => void;
- };
- }
- }
-
- /** Combines members of an intersection into a readable type. */
- // https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=v01xkqU3KO0Mg
- export type Compute = { [key in keyof type]: type[key] } & unknown;
-
- export type EventMap = {
- primaryButtonClicked: () => void;
- };
-
- export type Emitter = Compute>;
-
- export type SetPrimaryButton = (options: {
- text: string;
- loading?: boolean;
- disabled?: boolean;
- hidden?: boolean;
- }) => Promise;
-
- export type FrameSDK = {
- context: Promise;
- actions: {
- ready: () => Promise;
- openUrl: (url: string) => Promise;
- close: () => Promise;
- setPrimaryButton: SetPrimaryButton;
- addFrame: AddFrame
- };
- wallet: {
- ethProvider: Provider.Provider
- };
- } & Emitter;
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated index.scroll
index.scroll
Changed around line 7: in 4 hours, can you build a frame that will
- [] cast that for me under my account while we are live. 3.5 hours and counting :(
+ [] cast that for me under my account. 3.5 hours and counting :(
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated index.scroll
index.scroll
Changed around line 4: theme roboto
- [x] visit me and cameron's ok banger stream (a youtube URL)
- [x] at specific times (when we are livestreaming)
- [x] make an animated gif of us chatting
- [] cast that for me under my account while we are live
+ [x] visit me and cameron's ok banger stream (a youtube URL). 10 minutes.
+ [x] at specific times (when we are livestreaming). 10 minutes.
+ [x] make an animated gif of us chatting. 20 minutes.
+ [] cast that for me under my account while we are live. 3.5 hours and counting :(
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated index.scroll
index.scroll
Changed around line 4: theme roboto
- - visit me and cameron's ok banger stream (a youtube URL)
- - at specific times (when we are livestreaming)
- - make an animated gif of us chatting
- - cast that for me under my account while we are live
+ [x] visit me and cameron's ok banger stream (a youtube URL)
+ [x] at specific times (when we are livestreaming)
+ [x] make an animated gif of us chatting
+ [] cast that for me under my account while we are live
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- azure.gif
+ azure.gif
+
+ in 4 hours, can you build a frame that will
+ - visit me and cameron's ok banger stream (a youtube URL)
+ - at specific times (when we are livestreaming)
+ - make an animated gif of us chatting
+ - cast that for me under my account while we are live
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated jframe.parsers
jframe.parsers
Changed around line 3: jframeMetaTagsParser
- const jframe = ``
+ const jframe = ``
Breck Yunits
Breck Yunits
1 month ago
style.css
Changed around line 1
+ body {
+ font-family:
+ system-ui,
+ -apple-system,
+ sans-serif;
+ max-width: 600px;
+ margin: 0 auto;
+ padding: 20px;
+ background: #f5f5f5;
+ }
+ .container {
+ background: white;
+ padding: 20px;
+ border-radius: 12px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ }
+ button {
+ background: #0070f3;
+ color: white;
+ border: none;
+ padding: 10px 20px;
+ border-radius: 6px;
+ cursor: pointer;
+ margin: 5px;
+ }
+ button:hover {
+ background: #0051b3;
+ }
+ button:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+ }
+ .status {
+ margin: 20px 0;
+ padding: 10px;
+ border-radius: 6px;
+ background: #e2e8f0;
+ }
+ pre {
+ background: #f8f9fa;
+ padding: 10px;
+ border-radius: 6px;
+ overflow-x: auto;
+ }
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated demo.scroll
demo.scroll
Changed around line 16: jframeMetaTags
- Test Primary Button
+ Go Live
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated demo.scroll
demo.scroll
Changed around line 1
- title Simple Farcaster Frames v2 Demo
+ title BangBang
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated demo.scroll
demo.scroll
Changed around line 5: title Simple Farcaster Frames v2 Demo
-

Farcaster Frames v2 Demo

+

BangBang

Breck Yunits
Breck Yunits
1 month ago
.well-known/farcaster.json
Changed around line 1
+ {
+ "accountAssociation": {
+ "header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0",
+ "payload": "eyJkb21haW4iOiJmcmFtZXMtdjItc3dhcC1kZW1vLnZlcmNlbC5hcHAifQ",
+ "signature": "MHgxMzE0NDBjODMyMWRkM2UzNmQ3OWFiNDYxYmNiZThiOTM0NGNkOGZkNmVhMmVlNmY3YTY4NWJiNjMzMTYyNGNjNTczNjUyNTlhNzE5MTJkZDM4NWVmZmM5MWMwZmY1ZWVlMzYwNGUzYWNiZTI3MTQzYzIwYTRjMDBlNjgwZjBmNzFj"
+ },
+ "frame": {
+ "version": "0.0.0",
+ "name": "Simple Farcaster Frames v2 Demo",
+ "iconUrl": "https://jframe.breckyunits.com/splash.png",
+ "splashImageUrl": "https://jframe.breckyunits.com/splash.png",
+ "splashBackgroundColor": "purple",
+ "homeUrl": "https://jframe.breckyunits.com"
+ }
+ }
demo.scroll
Changed around line 1
+ buildHtml
+ style.css
+ jframe.parsers
+ title Simple Farcaster Frames v2 Demo
+ jframeMetaTags
+
+
+

Farcaster Frames v2 Demo

+
Waiting for frame to load...
+
+
+ Show Context
+
+
+
+ Close Frame
+
+
+ Test Primary Button
+
+
+
+
+
+ jframe.js
+ app.js
jframe.js
Changed around line 1
- (function(global) {
- const frame = {
- _emitter: createEventEmitter(),
- _endpoint: createEndpoint(),
- _store: createRequestStore(),
-
- // Public API
- init() {
- if (typeof document !== 'undefined') {
- this._setupEventListeners();
+ "use strict";
+ var jframe = (() => {
+ var rr = Object.create;
+ var $e = Object.defineProperty;
+ var nr = Object.getOwnPropertyDescriptor;
+ var sr = Object.getOwnPropertyNames;
+ var ar = Object.getPrototypeOf,
+ ir = Object.prototype.hasOwnProperty;
+ var or = (t, e) => () => (
+ e || t((e = { exports: {} }).exports, e), e.exports
+ ),
+ at = (t, e) => {
+ for (var r in e) $e(t, r, { get: e[r], enumerable: !0 });
+ },
+ yt = (t, e, r, n) => {
+ if ((e && typeof e == "object") || typeof e == "function")
+ for (let s of sr(e))
+ !ir.call(t, s) &&
+ s !== r &&
+ $e(t, s, {
+ get: () => e[s],
+ enumerable: !(n = nr(e, s)) || n.enumerable,
+ });
+ return t;
+ };
+ var cr = (t, e, r) => (
+ (r = t != null ? rr(ar(t)) : {}),
+ yt(
+ e || !t || !t.__esModule
+ ? $e(r, "default", { value: t, enumerable: !0 })
+ : r,
+ t,
+ )
+ ),
+ ur = (t) => yt($e({}, "__esModule", { value: !0 }), t);
+ var bt = or((Bn, it) => {
+ "use strict";
+ var dr = Object.prototype.hasOwnProperty,
+ O = "~";
+ function ye() {}
+ Object.create &&
+ ((ye.prototype = Object.create(null)), new ye().__proto__ || (O = !1));
+ function lr(t, e, r) {
+ (this.fn = t), (this.context = e), (this.once = r || !1);
+ }
+ function gt(t, e, r, n, s) {
+ if (typeof r != "function")
+ throw new TypeError("The listener must be a function");
+ var a = new lr(r, n || t, s),
+ i = O ? O + e : e;
+ return (
+ t._events[i]
+ ? t._events[i].fn
+ ? (t._events[i] = [t._events[i], a])
+ : t._events[i].push(a)
+ : ((t._events[i] = a), t._eventsCount++),
+ t
+ );
+ }
+ function Ve(t, e) {
+ --t._eventsCount === 0 ? (t._events = new ye()) : delete t._events[e];
+ }
+ function k() {
+ (this._events = new ye()), (this._eventsCount = 0);
+ }
+ k.prototype.eventNames = function () {
+ var e = [],
+ r,
+ n;
+ if (this._eventsCount === 0) return e;
+ for (n in (r = this._events)) dr.call(r, n) && e.push(O ? n.slice(1) : n);
+ return Object.getOwnPropertySymbols
+ ? e.concat(Object.getOwnPropertySymbols(r))
+ : e;
+ };
+ k.prototype.listeners = function (e) {
+ var r = O ? O + e : e,
+ n = this._events[r];
+ if (!n) return [];
+ if (n.fn) return [n.fn];
+ for (var s = 0, a = n.length, i = new Array(a); s < a; s++)
+ i[s] = n[s].fn;
+ return i;
+ };
+ k.prototype.listenerCount = function (e) {
+ var r = O ? O + e : e,
+ n = this._events[r];
+ return n ? (n.fn ? 1 : n.length) : 0;
+ };
+ k.prototype.emit = function (e, r, n, s, a, i) {
+ var o = O ? O + e : e;
+ if (!this._events[o]) return !1;
+ var c = this._events[o],
+ u = arguments.length,
+ f,
+ y;
+ if (c.fn) {
+ switch ((c.once && this.removeListener(e, c.fn, void 0, !0), u)) {
+ case 1:
+ return c.fn.call(c.context), !0;
+ case 2:
+ return c.fn.call(c.context, r), !0;
+ case 3:
+ return c.fn.call(c.context, r, n), !0;
+ case 4:
+ return c.fn.call(c.context, r, n, s), !0;
+ case 5:
+ return c.fn.call(c.context, r, n, s, a), !0;
+ case 6:
+ return c.fn.call(c.context, r, n, s, a, i), !0;
+ }
+ for (y = 1, f = new Array(u - 1); y < u; y++) f[y - 1] = arguments[y];
+ c.fn.apply(c.context, f);
+ } else {
+ var w = c.length,
+ E;
+ for (y = 0; y < w; y++)
+ switch (
+ (c[y].once && this.removeListener(e, c[y].fn, void 0, !0), u)
+ ) {
+ case 1:
+ c[y].fn.call(c[y].context);
+ break;
+ case 2:
+ c[y].fn.call(c[y].context, r);
+ break;
+ case 3:
+ c[y].fn.call(c[y].context, r, n);
+ break;
+ case 4:
+ c[y].fn.call(c[y].context, r, n, s);
+ break;
+ default:
+ if (!f)
+ for (E = 1, f = new Array(u - 1); E < u; E++)
+ f[E - 1] = arguments[E];
+ c[y].fn.apply(c[y].context, f);
+ }
+ }
+ return !0;
+ };
+ k.prototype.on = function (e, r, n) {
+ return gt(this, e, r, n, !1);
+ };
+ k.prototype.once = function (e, r, n) {
+ return gt(this, e, r, n, !0);
+ };
+ k.prototype.removeListener = function (e, r, n, s) {
+ var a = O ? O + e : e;
+ if (!this._events[a]) return this;
+ if (!r) return Ve(this, a), this;
+ var i = this._events[a];
+ if (i.fn)
+ i.fn === r && (!s || i.once) && (!n || i.context === n) && Ve(this, a);
+ else {
+ for (var o = 0, c = [], u = i.length; o < u; o++)
+ (i[o].fn !== r || (s && !i[o].once) || (n && i[o].context !== n)) &&
+ c.push(i[o]);
+ c.length ? (this._events[a] = c.length === 1 ? c[0] : c) : Ve(this, a);
- },
-
- // Frame context and actions
- context: null, // Will be populated by host
-
- actions: {
- setPrimaryButton(options) {
- return frame._sendHostMessage('setPrimaryButton', options);
+ };
+ k.prototype.removeAllListeners = function (e) {
+ var r;
+ return (
+ e
+ ? ((r = O ? O + e : e), this._events[r] && Ve(this, r))
+ : ((this._events = new ye()), (this._eventsCount = 0)),
+ this
+ );
+ };
+ k.prototype.off = k.prototype.removeListener;
+ k.prototype.addListener = k.prototype.on;
+ k.prefixed = O;
+ k.EventEmitter = k;
+ typeof it < "u" && (it.exports = k);
+ });
+ var Dn = {};
+ at(Dn, {
+ createEmitter: () => $t,
+ default: () => Vn,
+ eventFrameAddedPayloadSchema: () => Xt,
+ eventFrameRemovedPayloadSchema: () => Qt,
+ eventHeaderSchema: () => Zn,
+ eventNotificationsEnabledPayloadSchema: () => er,
+ eventPayloadSchema: () => In,
+ eventSchema: () => Mn,
+ notificationDetailsSchema: () => vt,
+ notificationsDisabledPayloadSchema: () => tr,
+ sdk: () => dt,
+ sendNotificationRequestSchema: () => Ln,
+ sendNotificationResponseSchema: () => $n,
+ });
+ var ge = cr(bt(), 1);
+ var xt = Symbol("Comlink.proxy"),
+ fr = Symbol("Comlink.endpoint"),
+ pr = Symbol("Comlink.releaseProxy"),
+ ot = Symbol("Comlink.finalizer"),
+ ze = Symbol("Comlink.thrown"),
+ wt = (t) => (typeof t == "object" && t !== null) || typeof t == "function",
+ hr = {
+ canHandle: (t) => wt(t) && t[xt],
+ serialize(t) {
+ let { port1: e, port2: r } = new MessageChannel();
+ return Tt(t, e), [r, [r]];
-
- ready() {
- return frame._sendHostMessage('ready');
+ deserialize(t) {
+ return t.start(), ut(t);
-
- close() {
- return frame._sendHostMessage('close');
+ },
+ mr = {
+ canHandle: (t) => wt(t) && ze in t,
+ serialize({ value: t }) {
+ let e;
+ return (
+ t instanceof Error
+ ? (e = {
+ isError: !0,
+ value: { message: t.message, name: t.name, stack: t.stack },
+ })
+ : (e = { isError: !1, value: t }),
+ [e, []]
+ );
-
- openUrl(url) {
- return frame._sendHostMessage('openUrl', url);
+ deserialize(t) {
+ throw t.isError
+ ? Object.assign(new Error(t.value.message), t.value)
+ : t.value;
-
- addFrame(options) {
- return frame._sendHostMessage('addFrame', options);
- }
- },
-
- // Event handling
- on(event, callback) {
- this._emitter.on(event, callback);
- },
-
- off(event, callback) {
- this._emitter.off(event, callback);
- },
-
- once(event, callback) {
- this._emitter.once(event, callback);
-
- // Ethereum provider
- wallet: {
- ethProvider: {
- async request(args) {
- try {
- const request = frame._store.prepare(args);
- const response = await frame._sendHostMessage('ethProviderRequestV2', request);
-
- if (response.error) {
- throw frame._createProviderError(response.error);
+ kt = new Map([
+ ["proxy", hr],
+ ["throw", mr],
+ ]);
+ function vr(t, e) {
+ for (let r of t)
+ if (e === r || r === "*" || (r instanceof RegExp && r.test(e))) return !0;
+ return !1;
+ }
+ function Tt(t, e = globalThis, r = ["*"]) {
+ e.addEventListener("message", function n(s) {
+ if (!s || !s.data) return;
+ if (!vr(r, s.origin)) {
+ console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
+ return;
+ }
+ let { id: a, type: i, path: o } = Object.assign({ path: [] }, s.data),
+ c = (s.data.argumentList || []).map(H),
+ u;
+ try {
+ let f = o.slice(0, -1).reduce((w, E) => w[E], t),
+ y = o.reduce((w, E) => w[E], t);
+ switch (i) {
+ case "GET":
+ u = y;
+ break;
+ case "SET":
+ (f[o.slice(-1)[0]] = H(s.data.value)), (u = !0);
+ break;
+ case "APPLY":
+ u = y.apply(f, c);
+ break;
+ case "CONSTRUCT":
+ {
+ let w = new y(...c);
+ u = wr(w);
-
- return response.result;
- } catch (err) {
- if (err instanceof Error && err.message.match(/cannot read property 'apply'/i)) {
- return frame._sendHostMessage('ethProviderRequest', args);
+ break;
+ case "ENDPOINT":
+ {
+ let { port1: w, port2: E } = new MessageChannel();
+ Tt(t, E), (u = xr(w, [w]));
- throw err;
- }
+ break;
+ case "RELEASE":
+ u = void 0;
+ break;
+ default:
+ return;
+ } catch (f) {
+ u = { value: f, [ze]: 0 };
- },
-
- // Internal methods
- _setupEventListeners() {
- document.addEventListener("FarcasterFrameEvent", (event) => {
- if (event instanceof MessageEvent && event.data.type === "primaryButtonClicked") {
- this._emitter.emit("primaryButtonClicked");
- }
+ Promise.resolve(u)
+ .catch((f) => ({ value: f, [ze]: 0 }))
+ .then((f) => {
+ let [y, w] = qe(f);
+ e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w),
+ i === "RELEASE" &&
+ (e.removeEventListener("message", n),
+ Et(e),
+ ot in t && typeof t[ot] == "function" && t[ot]());
+ })
+ .catch((f) => {
+ let [y, w] = qe({
+ value: new TypeError("Unserializable return value"),
+ [ze]: 0,
+ });
+ e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w);
+ });
+ }),
+ e.start && e.start();
+ }
+ function yr(t) {
+ return t.constructor.name === "MessagePort";
+ }
+ function Et(t) {
+ yr(t) && t.close();
+ }
+ function ut(t, e) {
+ let r = new Map();
+ return (
+ t.addEventListener("message", function (s) {
+ let { data: a } = s;
+ if (!a || !a.id) return;
+ let i = r.get(a.id);
+ if (i)
+ try {
+ i(a);
+ } finally {
+ r.delete(a.id);
+ }
+ }),
+ ct(t, r, [], e)
+ );
+ }
+ function De(t) {
+ if (t) throw new Error("Proxy has been released and is not useable");
+ }
+ function Ot(t) {
+ return ce(t, new Map(), { type: "RELEASE" }).then(() => {
+ Et(t);
+ });
+ }
+ var Be = new WeakMap(),
+ Ue =
+ "FinalizationRegistry" in globalThis &&
+ new FinalizationRegistry((t) => {
+ let e = (Be.get(t) || 0) - 1;
+ Be.set(t, e), e === 0 && Ot(t);
-
- document.addEventListener("FarcasterFrameEthProviderEvent", (event) => {
- if (event instanceof MessageEvent) {
- const { event: evName, params } = event.data;
- this._emitter.emit(evName, ...params);
- }
+ function gr(t, e) {
+ let r = (Be.get(e) || 0) + 1;
+ Be.set(e, r), Ue && Ue.register(t, e, t);
+ }
+ function br(t) {
+ Ue && Ue.unregister(t);
+ }
+ function ct(t, e, r = [], n = function () {}) {
+ let s = !1,
+ a = new Proxy(n, {
+ get(i, o) {
+ if ((De(s), o === pr))
+ return () => {
+ br(a), Ot(t), e.clear(), (s = !0);
+ };
+ if (o === "then") {
+ if (r.length === 0) return { then: () => a };
+ let c = ce(t, e, {
+ type: "GET",
+ path: r.map((u) => u.toString()),
+ }).then(H);
+ return c.then.bind(c);
+ }
+ return ct(t, e, [...r, o]);
+ },
+ set(i, o, c) {
+ De(s);
+ let [u, f] = qe(c);
+ return ce(
+ t,
+ e,
+ { type: "SET", path: [...r, o].map((y) => y.toString()), value: u },
+ f,
+ ).then(H);
+ },
+ apply(i, o, c) {
+ De(s);
+ let u = r[r.length - 1];
+ if (u === fr) return ce(t, e, { type: "ENDPOINT" }).then(H);
+ if (u === "bind") return ct(t, e, r.slice(0, -1));
+ let [f, y] = _t(c);
+ return ce(
+ t,
+ e,
+ {
+ type: "APPLY",
+ path: r.map((w) => w.toString()),
+ argumentList: f,
+ },
+ y,
+ ).then(H);
+ },
+ construct(i, o) {
+ De(s);
+ let [c, u] = _t(o);
+ return ce(
+ t,
+ e,
+ {
+ type: "CONSTRUCT",
+ path: r.map((f) => f.toString()),
+ argumentList: c,
+ },
+ u,
+ ).then(H);
+ },
+ return gr(a, t), a;
+ }
+ function _r(t) {
+ return Array.prototype.concat.apply([], t);
+ }
+ function _t(t) {
+ let e = t.map(qe);
+ return [e.map((r) => r[0]), _r(e.map((r) => r[1]))];
+ }
+ var jt = new WeakMap();
+ function xr(t, e) {
+ return jt.set(t, e), t;
+ }
+ function wr(t) {
+ return Object.assign(t, { [xt]: !0 });
+ }
+ function Rt(t, e = globalThis, r = "*") {
+ return {
+ postMessage: (n, s) => t.postMessage(n, r, s),
+ addEventListener: e.addEventListener.bind(e),
+ removeEventListener: e.removeEventListener.bind(e),
+ };
+ }
+ function qe(t) {
+ for (let [e, r] of kt)
+ if (r.canHandle(t)) {
+ let [n, s] = r.serialize(t);
+ return [{ type: "HANDLER", name: e, value: n }, s];
+ }
+ return [{ type: "RAW", value: t }, jt.get(t) || []];
+ }
+ function H(t) {
+ switch (t.type) {
+ case "HANDLER":
+ return kt.get(t.name).deserialize(t.value);
+ case "RAW":
+ return t.value;
+ }
+ }
+ function ce(t, e, r, n) {
+ return new Promise((s) => {
+ let a = kr();
+ e.set(a, s),
+ t.start && t.start(),
+ t.postMessage(Object.assign({ id: a }, r), n);
+ });
+ }
+ function kr() {
+ return new Array(4)
+ .fill(0)
+ .map(() =>
+ Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16),
+ )
+ .join("-");
+ }
+ var Tr = {
+ postMessage() {},
+ addEventListener: () => {},
+ removeEventListener: () => {},
-
- _sendHostMessage(method, ...args) {
- return new Promise((resolve, reject) => {
- try {
- const messageId = this._store.getId();
- const message = { id: messageId, method, args };
-
- const handler = (event) => {
- if (event.data?.id === messageId) {
- document.removeEventListener('FarcasterFrameCallback', handler);
- if (event.data.error) {
- reject(event.data.error);
- } else {
- resolve(event.data.result);
- }
- }
- };
-
- document.addEventListener('FarcasterFrameCallback', handler);
-
- if (window?.ReactNativeWebView) {
- window.ReactNativeWebView.postMessage(JSON.stringify(message));
- } else if (window.parent !== window) {
- window.parent.postMessage(message, '*');
- } else {
- reject(new Error('No valid frame host found'));
+ Er = {
+ postMessage: (t) => {
+ console.debug("[webview:req]", t),
+ window.ReactNativeWebView.postMessage(JSON.stringify(t));
+ },
+ addEventListener: (t, e, ...r) => {
+ document.addEventListener("FarcasterFrameCallback", e, ...r);
+ },
+ removeEventListener: (t, e) => {
+ document.removeEventListener("FarcasterFrameCallback", e);
+ },
+ },
+ St =
+ typeof window > "u"
+ ? Tr
+ : window?.ReactNativeWebView
+ ? Er
+ : Rt(window?.parent ?? window);
+ var S = ut(St);
+ var Pt = "0.1.1";
+ function Ct() {
+ return Pt;
+ }
+ var We = class t extends Error {
+ constructor(e, r = {}) {
+ let n = (() => {
+ if (r.cause instanceof t) {
+ if (r.cause.details) return r.cause.details;
+ if (r.cause.shortMessage) return r.cause.shortMessage;
- } catch (err) {
- reject(err);
- }
- });
+ return r.cause?.message ? r.cause.message : r.details;
+ })(),
+ s = (r.cause instanceof t && r.cause.docsPath) || r.docsPath,
+ i = `https://oxlib.sh${s ?? ""}`,
+ o = [
+ e || "An error occurred.",
+ ...(r.metaMessages ? ["", ...r.metaMessages] : []),
+ ...(n || s
+ ? ["", n ? `Details: ${n}` : void 0, s ? `See: ${i}` : void 0]
+ : []),
+ ].filter((c) => typeof c == "string").join(`
+ `);
+ super(o, r.cause ? { cause: r.cause } : void 0),
+ Object.defineProperty(this, "details", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "docs", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "docsPath", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "shortMessage", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "cause", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "BaseError",
+ }),
+ Object.defineProperty(this, "version", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: `ox@${Ct()}`,
+ }),
+ (this.cause = r.cause),
+ (this.details = n),
+ (this.docs = i),
+ (this.docsPath = s),
+ (this.shortMessage = e);
+ }
+ walk(e) {
+ return Nt(this, e);
+ }
+ };
+ function Nt(t, e) {
+ return e?.(t)
+ ? t
+ : t && typeof t == "object" && "cause" in t && t.cause
+ ? Nt(t.cause, e)
+ : e
+ ? null
+ : t;
+ }
+ var Ce = {};
+ at(Ce, {
+ ChainDisconnectedError: () => Ge,
+ DisconnectedError: () => Ye,
+ IsUndefinedError: () => Ke,
+ ProviderRpcError: () => z,
+ UnauthorizedError: () => Fe,
+ UnsupportedMethodError: () => Je,
+ UserRejectedRequestError: () => He,
+ createEmitter: () => Or,
+ from: () => jr,
+ });
+ function Mt(t, e = {}) {
+ let { raw: r = !1 } = e,
+ n = t;
+ if (r) return t;
+ if (n.error) {
+ let { code: s } = n.error,
+ a =
+ s === Se.code
+ ? Se
+ : s === be.code
+ ? be
+ : s === Re.code
+ ? Re
+ : s === Oe.code
+ ? Oe
+ : s === Te.code
+ ? Te
+ : s === je.code
+ ? je
+ : s === ke.code
+ ? ke
+ : s === Pe.code
+ ? Pe
+ : s === _e.code
+ ? _e
+ : s === xe.code
+ ? xe
+ : s === we.code
+ ? we
+ : s === Ee.code
+ ? Ee
+ : j;
+ throw new a(n.error);
+ }
+ return n.result;
+ }
+ var j = class extends Error {
+ constructor(e) {
+ let { code: r, message: n, data: s } = e;
+ super(n),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.BaseError",
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "data", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ (this.code = r),
+ (this.data = s);
+ }
-
- _createProviderError({ code, details }) {
- const errors = {
- 4001: () => new Error('User rejected request'),
- 4100: () => new Error('Unauthorized'),
- 4200: () => new Error('Unsupported method'),
- 4900: () => new Error('Provider disconnected'),
- 4901: () => new Error('Chain disconnected'),
- default: () => new Error(details || 'Unknown provider error')
- };
- return (errors[code] || errors.default)();
+ be = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Missing or invalid parameters.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32e3,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidInputError",
+ });
+ }
+ };
+ Object.defineProperty(be, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32e3,
+ });
+ var _e = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Requested resource not found.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32001,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ResourceNotFoundError",
+ });
-
- // Utility functions
- function createEventEmitter() {
- const listeners = new Map();
-
+ Object.defineProperty(_e, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32001,
+ });
+ var xe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Requested resource not available.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32002,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ResourceUnavailableError",
+ });
+ }
+ };
+ Object.defineProperty(xe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32002,
+ });
+ var we = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Transaction creation failed.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32003,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.TransactionRejectedError",
+ });
+ }
+ };
+ Object.defineProperty(we, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32003,
+ });
+ var ke = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Method is not implemented.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32004,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.MethodNotSupportedError",
+ });
+ }
+ };
+ Object.defineProperty(ke, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32004,
+ });
+ var Te = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Rate limit exceeded.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32005,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.LimitExceededError",
+ });
+ }
+ };
+ Object.defineProperty(Te, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32005,
+ });
+ var Ee = class t extends j {
+ constructor(e = {}) {
+ super({ message: "JSON-RPC version not supported.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32006,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.VersionNotSupportedError",
+ });
+ }
+ };
+ Object.defineProperty(Ee, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32006,
+ });
+ var Oe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Input is not a valid JSON-RPC request.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32600,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidRequestError",
+ });
+ }
+ };
+ Object.defineProperty(Oe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32600,
+ });
+ var je = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Method does not exist.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32601,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.MethodNotFoundError",
+ });
+ }
+ };
+ Object.defineProperty(je, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32601,
+ });
+ var Re = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Invalid method parameters.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32602,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidParamsError",
+ });
+ }
+ };
+ Object.defineProperty(Re, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32602,
+ });
+ var Se = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Internal JSON-RPC error.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32603,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InternalErrorError",
+ });
+ }
+ };
+ Object.defineProperty(Se, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32603,
+ });
+ var Pe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Failed to parse JSON-RPC response.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32700,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ParseError",
+ });
+ }
+ };
+ Object.defineProperty(Pe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32700,
+ });
+ var z = class extends Error {
+ constructor(e, r) {
+ super(r),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "ProviderRpcError",
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "details", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ (this.code = e),
+ (this.details = r);
+ }
+ },
+ He = class extends z {
+ constructor({ message: e = "The user rejected the request." } = {}) {
+ super(4001, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UserRejectedRequestError",
+ });
+ }
+ };
+ Object.defineProperty(He, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4001,
+ });
+ var Fe = class extends z {
+ constructor({
+ message:
+ e = "The requested method and/or account has not been authorized by the user.",
+ } = {}) {
+ super(4100, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UnauthorizedError",
+ });
+ }
+ };
+ Object.defineProperty(Fe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4100,
+ });
+ var Je = class extends z {
+ constructor({
+ message: e = "The provider does not support the requested method.",
+ } = {}) {
+ super(4200, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UnsupportedMethodError",
+ });
+ }
+ };
+ Object.defineProperty(Je, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4200,
+ });
+ var Ye = class extends z {
+ constructor({
+ message: e = "The provider is disconnected from all chains.",
+ } = {}) {
+ super(4900, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.DisconnectedError",
+ });
+ }
+ };
+ Object.defineProperty(Ye, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4900,
+ });
+ var Ge = class extends z {
+ constructor({
+ message: e = "The provider is not connected to the requested chain.",
+ } = {}) {
+ super(4901, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.ChainDisconnectedError",
+ });
+ }
+ };
+ Object.defineProperty(Ge, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4901,
+ });
+ function Or() {
+ let t = new ge.default();
- on(event, callback) {
- if (!listeners.has(event)) {
- listeners.set(event, new Set());
- }
- listeners.get(event).add(callback);
+ get eventNames() {
+ return t.eventNames.bind(t);
-
- off(event, callback) {
- if (listeners.has(event)) {
- listeners.get(event).delete(callback);
- }
+ get listenerCount() {
+ return t.listenerCount.bind(t);
-
- once(event, callback) {
- const wrapper = (...args) => {
- callback(...args);
- this.off(event, wrapper);
- };
- this.on(event, wrapper);
+ get listeners() {
+ return t.listeners.bind(t);
-
- emit(event, ...args) {
- if (listeners.has(event)) {
- listeners.get(event).forEach(callback => {
- try {
- callback(...args);
- } catch (err) {
- console.error('Error in event listener:', err);
- }
+ addListener: t.addListener.bind(t),
+ emit: t.emit.bind(t),
+ off: t.off.bind(t),
+ on: t.on.bind(t),
+ once: t.once.bind(t),
+ removeAllListeners: t.removeAllListeners.bind(t),
+ removeListener: t.removeListener.bind(t),
+ };
+ }
+ function jr(t, e = {}) {
+ let { includeEvents: r = !0 } = e;
+ if (!t) throw new Ke();
+ return {
+ ...(r
+ ? { on: t.on?.bind(t), removeListener: t.removeListener?.bind(t) }
+ : {}),
+ async request(n) {
+ let s = await t.request(n);
+ return s && typeof s == "object" && "jsonrpc" in s ? Mt(s) : s;
+ },
+ };
+ }
+ var Ke = class extends We {
+ constructor() {
+ super("`provider` is undefined."),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.IsUndefinedError",
+ });
+ }
+ };
+ var Xe = {};
+ at(Xe, { createStore: () => Rr, from: () => It });
+ function Rr(t = {}) {
+ let e = t.id ?? 0;
+ return {
+ prepare(r) {
+ return It({ id: e++, ...r });
+ },
+ get id() {
+ return e;
+ },
+ };
+ }
+ function It(t) {
+ return { ...t, jsonrpc: "2.0" };
+ }
+ var Sr = Ce.createEmitter(),
+ Pr = Xe.createStore(),
+ Lt = Ce.from({
+ ...Sr,
+ async request(t) {
+ return await S.ethProviderRequest(Pr.prepare(t));
+ },
+ });
+ typeof document < "u" &&
+ document.addEventListener("FarcasterFrameEvent", (t) => {
+ t instanceof MessageEvent;
+ });
+ function $t() {
+ let t = new ge.default();
+ return {
+ get eventNames() {
+ return t.eventNames.bind(t);
+ },
+ get listenerCount() {
+ return t.listenerCount.bind(t);
+ },
+ get listeners() {
+ return t.listeners.bind(t);
+ },
+ addListener: t.addListener.bind(t),
+ emit: t.emit.bind(t),
+ off: t.off.bind(t),
+ on: t.on.bind(t),
+ once: t.once.bind(t),
+ removeAllListeners: t.removeAllListeners.bind(t),
+ removeListener: t.removeListener.bind(t),
+ };
+ }
+ var Vt = $t(),
+ dt = {
+ ...Vt,
+ context: S.context,
+ actions: {
+ setPrimaryButton: S.setPrimaryButton.bind(S),
+ ready: S.ready.bind(S),
+ close: S.close.bind(S),
+ openUrl: S.openUrl.bind(S),
+ addFrame: S.addFrame.bind(S),
+ },
+ wallet: { ethProvider: Lt },
+ };
+ typeof document < "u" &&
+ document.addEventListener("FarcasterFrameEvent", (t) => {
+ t instanceof MessageEvent &&
+ t.data.type === "primaryButtonClicked" &&
+ Vt.emit("primaryButtonClicked");
+ });
+ var x;
+ (function (t) {
+ t.assertEqual = (s) => s;
+ function e(s) {}
+ t.assertIs = e;
+ function r(s) {
+ throw new Error();
+ }
+ (t.assertNever = r),
+ (t.arrayToEnum = (s) => {
+ let a = {};
+ for (let i of s) a[i] = i;
+ return a;
+ }),
+ (t.getValidEnumValues = (s) => {
+ let a = t.objectKeys(s).filter((o) => typeof s[s[o]] != "number"),
+ i = {};
+ for (let o of a) i[o] = s[o];
+ return t.objectValues(i);
+ }),
+ (t.objectValues = (s) =>
+ t.objectKeys(s).map(function (a) {
+ return s[a];
+ })),
+ (t.objectKeys =
+ typeof Object.keys == "function"
+ ? (s) => Object.keys(s)
+ : (s) => {
+ let a = [];
+ for (let i in s)
+ Object.prototype.hasOwnProperty.call(s, i) && a.push(i);
+ return a;
+ }),
+ (t.find = (s, a) => {
+ for (let i of s) if (a(i)) return i;
+ }),
+ (t.isInteger =
+ typeof Number.isInteger == "function"
+ ? (s) => Number.isInteger(s)
+ : (s) => typeof s == "number" && isFinite(s) && Math.floor(s) === s);
+ function n(s, a = " | ") {
+ return s.map((i) => (typeof i == "string" ? `'${i}'` : i)).join(a);
+ }
+ (t.joinValues = n),
+ (t.jsonStringifyReplacer = (s, a) =>
+ typeof a == "bigint" ? a.toString() : a);
+ })(x || (x = {}));
+ var ft;
+ (function (t) {
+ t.mergeShapes = (e, r) => ({ ...e, ...r });
+ })(ft || (ft = {}));
+ var p = x.arrayToEnum([
+ "string",
+ "nan",
+ "number",
+ "integer",
+ "float",
+ "boolean",
+ "date",
+ "bigint",
+ "symbol",
+ "function",
+ "undefined",
+ "null",
+ "array",
+ "object",
+ "unknown",
+ "promise",
+ "void",
+ "never",
+ "map",
+ "set",
+ ]),
+ B = (t) => {
+ switch (typeof t) {
+ case "undefined":
+ return p.undefined;
+ case "string":
+ return p.string;
+ case "number":
+ return isNaN(t) ? p.nan : p.number;
+ case "boolean":
+ return p.boolean;
+ case "function":
+ return p.function;
+ case "bigint":
+ return p.bigint;
+ case "symbol":
+ return p.symbol;
+ case "object":
+ return Array.isArray(t)
+ ? p.array
+ : t === null
+ ? p.null
+ : t.then &&
+ typeof t.then == "function" &&
+ t.catch &&
+ typeof t.catch == "function"
+ ? p.promise
+ : typeof Map < "u" && t instanceof Map
+ ? p.map
+ : typeof Set < "u" && t instanceof Set
+ ? p.set
+ : typeof Date < "u" && t instanceof Date
+ ? p.date
+ : p.object;
+ default:
+ return p.unknown;
+ }
+ },
+ d = x.arrayToEnum([
+ "invalid_type",
+ "invalid_literal",
+ "custom",
+ "invalid_union",
+ "invalid_union_discriminator",
+ "invalid_enum_value",
+ "unrecognized_keys",
+ "invalid_arguments",
+ "invalid_return_type",
+ "invalid_date",
+ "invalid_string",
+ "too_small",
+ "too_big",
+ "invalid_intersection_types",
+ "not_multiple_of",
+ "not_finite",
+ ]),
+ Cr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"),
+ C = class t extends Error {
+ constructor(e) {
+ super(),
+ (this.issues = []),
+ (this.addIssue = (n) => {
+ this.issues = [...this.issues, n];
+ }),
+ (this.addIssues = (n = []) => {
+ this.issues = [...this.issues, ...n];
- }
+ let r = new.target.prototype;
+ Object.setPrototypeOf
+ ? Object.setPrototypeOf(this, r)
+ : (this.__proto__ = r),
+ (this.name = "ZodError"),
+ (this.issues = e);
+ }
+ get errors() {
+ return this.issues;
+ }
+ format(e) {
+ let r =
+ e ||
+ function (a) {
+ return a.message;
+ },
+ n = { _errors: [] },
+ s = (a) => {
+ for (let i of a.issues)
+ if (i.code === "invalid_union") i.unionErrors.map(s);
+ else if (i.code === "invalid_return_type") s(i.returnTypeError);
+ else if (i.code === "invalid_arguments") s(i.argumentsError);
+ else if (i.path.length === 0) n._errors.push(r(i));
+ else {
+ let o = n,
+ c = 0;
+ for (; c < i.path.length; ) {
+ let u = i.path[c];
+ c === i.path.length - 1
+ ? ((o[u] = o[u] || { _errors: [] }),
+ o[u]._errors.push(r(i)))
+ : (o[u] = o[u] || { _errors: [] }),
+ (o = o[u]),
+ c++;
+ }
+ }
+ };
+ return s(this), n;
+ }
+ static assert(e) {
+ if (!(e instanceof t)) throw new Error(`Not a ZodError: ${e}`);
+ }
+ toString() {
+ return this.message;
+ }
+ get message() {
+ return JSON.stringify(this.issues, x.jsonStringifyReplacer, 2);
+ }
+ get isEmpty() {
+ return this.issues.length === 0;
+ }
+ flatten(e = (r) => r.message) {
+ let r = {},
+ n = [];
+ for (let s of this.issues)
+ s.path.length > 0
+ ? ((r[s.path[0]] = r[s.path[0]] || []), r[s.path[0]].push(e(s)))
+ : n.push(e(s));
+ return { formErrors: n, fieldErrors: r };
+ }
+ get formErrors() {
+ return this.flatten();
+ C.create = (t) => new C(t);
+ var le = (t, e) => {
+ let r;
+ switch (t.code) {
+ case d.invalid_type:
+ t.received === p.undefined
+ ? (r = "Required")
+ : (r = `Expected ${t.expected}, received ${t.received}`);
+ break;
+ case d.invalid_literal:
+ r = `Invalid literal value, expected ${JSON.stringify(t.expected, x.jsonStringifyReplacer)}`;
+ break;
+ case d.unrecognized_keys:
+ r = `Unrecognized key(s) in object: ${x.joinValues(t.keys, ", ")}`;
+ break;
+ case d.invalid_union:
+ r = "Invalid input";
+ break;
+ case d.invalid_union_discriminator:
+ r = `Invalid discriminator value. Expected ${x.joinValues(t.options)}`;
+ break;
+ case d.invalid_enum_value:
+ r = `Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;
+ break;
+ case d.invalid_arguments:
+ r = "Invalid function arguments";
+ break;
+ case d.invalid_return_type:
+ r = "Invalid function return type";
+ break;
+ case d.invalid_date:
+ r = "Invalid date";
+ break;
+ case d.invalid_string:
+ typeof t.validation == "object"
+ ? "includes" in t.validation
+ ? ((r = `Invalid input: must include "${t.validation.includes}"`),
+ typeof t.validation.position == "number" &&
+ (r = `${r} at one or more positions greater than or equal to ${t.validation.position}`))
+ : "startsWith" in t.validation
+ ? (r = `Invalid input: must start with "${t.validation.startsWith}"`)
+ : "endsWith" in t.validation
+ ? (r = `Invalid input: must end with "${t.validation.endsWith}"`)
+ : x.assertNever(t.validation)
+ : t.validation !== "regex"
+ ? (r = `Invalid ${t.validation}`)
+ : (r = "Invalid");
+ break;
+ case d.too_small:
+ t.type === "array"
+ ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)`)
+ : t.type === "string"
+ ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)`)
+ : t.type === "number"
+ ? (r = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}`)
+ : t.type === "date"
+ ? (r = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}`)
+ : (r = "Invalid input");
+ break;
+ case d.too_big:
+ t.type === "array"
+ ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)`)
+ : t.type === "string"
+ ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)`)
+ : t.type === "number"
+ ? (r = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
+ : t.type === "bigint"
+ ? (r = `BigInt must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
+ : t.type === "date"
+ ? (r = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t.maximum))}`)
+ : (r = "Invalid input");
+ break;
+ case d.custom:
+ r = "Invalid input";
+ break;
+ case d.invalid_intersection_types:
+ r = "Intersection results could not be merged";
+ break;
+ case d.not_multiple_of:
+ r = `Number must be a multiple of ${t.multipleOf}`;
+ break;
+ case d.not_finite:
+ r = "Number must be finite";
+ break;
+ default:
+ (r = e.defaultError), x.assertNever(t);
+ }
+ return { message: r };
+ },
+ Bt = le;
+ function Nr(t) {
+ Bt = t;
-
- function createEndpoint() {
- if (typeof window === 'undefined') {
- return {
- postMessage() {},
- addEventListener() {},
- removeEventListener() {}
- };
- }
-
- if (window?.ReactNativeWebView) {
+ function Qe() {
+ return Bt;
+ }
+ var et = (t) => {
+ let { data: e, path: r, errorMaps: n, issueData: s } = t,
+ a = [...r, ...(s.path || [])],
+ i = { ...s, path: a };
+ if (s.message !== void 0) return { ...s, path: a, message: s.message };
+ let o = "",
+ c = n
+ .filter((u) => !!u)
+ .slice()
+ .reverse();
+ for (let u of c) o = u(i, { data: e, defaultError: o }).message;
+ return { ...s, path: a, message: o };
+ },
+ Ar = [];
+ function l(t, e) {
+ let r = Qe(),
+ n = et({
+ issueData: e,
+ data: t.data,
+ path: t.path,
+ errorMaps: [
+ t.common.contextualErrorMap,
+ t.schemaErrorMap,
+ r,
+ r === le ? void 0 : le,
+ ].filter((s) => !!s),
+ });
+ t.common.issues.push(n);
+ }
+ var T = class t {
+ constructor() {
+ this.value = "valid";
+ }
+ dirty() {
+ this.value === "valid" && (this.value = "dirty");
+ }
+ abort() {
+ this.value !== "aborted" && (this.value = "aborted");
+ }
+ static mergeArray(e, r) {
+ let n = [];
+ for (let s of r) {
+ if (s.status === "aborted") return v;
+ s.status === "dirty" && e.dirty(), n.push(s.value);
+ }
+ return { status: e.value, value: n };
+ }
+ static async mergeObjectAsync(e, r) {
+ let n = [];
+ for (let s of r) {
+ let a = await s.key,
+ i = await s.value;
+ n.push({ key: a, value: i });
+ }
+ return t.mergeObjectSync(e, n);
+ }
+ static mergeObjectSync(e, r) {
+ let n = {};
+ for (let s of r) {
+ let { key: a, value: i } = s;
+ if (a.status === "aborted" || i.status === "aborted") return v;
+ a.status === "dirty" && e.dirty(),
+ i.status === "dirty" && e.dirty(),
+ a.value !== "__proto__" &&
+ (typeof i.value < "u" || s.alwaysSet) &&
+ (n[a.value] = i.value);
+ }
+ return { status: e.value, value: n };
+ }
+ },
+ v = Object.freeze({ status: "aborted" }),
+ de = (t) => ({ status: "dirty", value: t }),
+ R = (t) => ({ status: "valid", value: t }),
+ pt = (t) => t.status === "aborted",
+ ht = (t) => t.status === "dirty",
+ Me = (t) => t.status === "valid",
+ Ze = (t) => typeof Promise < "u" && t instanceof Promise;
+ function tt(t, e, r, n) {
+ if (r === "a" && !n)
+ throw new TypeError("Private accessor was defined without a getter");
+ if (typeof e == "function" ? t !== e || !n : !e.has(t))
+ throw new TypeError(
+ "Cannot read private member from an object whose class did not declare it",
+ );
+ return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
+ }
+ function Ut(t, e, r, n, s) {
+ if (n === "m") throw new TypeError("Private method is not writable");
+ if (n === "a" && !s)
+ throw new TypeError("Private accessor was defined without a setter");
+ if (typeof e == "function" ? t !== e || !s : !e.has(t))
+ throw new TypeError(
+ "Cannot write private member to an object whose class did not declare it",
+ );
+ return n === "a" ? s.call(t, r) : s ? (s.value = r) : e.set(t, r), r;
+ }
+ var h;
+ (function (t) {
+ (t.errToObj = (e) => (typeof e == "string" ? { message: e } : e || {})),
+ (t.toString = (e) => (typeof e == "string" ? e : e?.message));
+ })(h || (h = {}));
+ var Ne,
+ Ae,
+ M = class {
+ constructor(e, r, n, s) {
+ (this._cachedPath = []),
+ (this.parent = e),
+ (this.data = r),
+ (this._path = n),
+ (this._key = s);
+ }
+ get path() {
+ return (
+ this._cachedPath.length ||
+ (this._key instanceof Array
+ ? this._cachedPath.push(...this._path, ...this._key)
+ : this._cachedPath.push(...this._path, this._key)),
+ this._cachedPath
+ );
+ }
+ },
+ Dt = (t, e) => {
+ if (Me(e)) return { success: !0, data: e.value };
+ if (!t.common.issues.length)
+ throw new Error("Validation failed but no issues detected.");
- postMessage: (data) => {
- window.ReactNativeWebView.postMessage(JSON.stringify(data));
- },
- addEventListener: (_, listener, ...args) => {
- document.addEventListener("FarcasterFrameCallback", listener, ...args);
+ success: !1,
+ get error() {
+ if (this._error) return this._error;
+ let r = new C(t.common.issues);
+ return (this._error = r), this._error;
- removeEventListener: (_, listener) => {
- document.removeEventListener("FarcasterFrameCallback", listener);
- }
- }
-
- return {
- postMessage: (data) => window.parent.postMessage(data, '*'),
- addEventListener: (_, listener) => window.addEventListener('message', listener),
- removeEventListener: (_, listener) => window.removeEventListener('message', listener)
+ function g(t) {
+ if (!t) return {};
+ let {
+ errorMap: e,
+ invalid_type_error: r,
+ required_error: n,
+ description: s,
+ } = t;
+ if (e && (r || n))
+ throw new Error(
+ `Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`,
+ );
+ return e
+ ? { errorMap: e, description: s }
+ : {
+ errorMap: (i, o) => {
+ var c, u;
+ let { message: f } = t;
+ return i.code === "invalid_enum_value"
+ ? { message: f ?? o.defaultError }
+ : typeof o.data > "u"
+ ? {
+ message:
+ (c = f ?? n) !== null && c !== void 0
+ ? c
+ : o.defaultError,
+ }
+ : i.code !== "invalid_type"
+ ? { message: o.defaultError }
+ : {
+ message:
+ (u = f ?? r) !== null && u !== void 0
+ ? u
+ : o.defaultError,
+ };
+ },
+ description: s,
+ };
-
- function createRequestStore() {
- let nextId = 1;
-
- return {
- prepare(request) {
+ var b = class {
+ constructor(e) {
+ (this.spa = this.safeParseAsync),
+ (this._def = e),
+ (this.parse = this.parse.bind(this)),
+ (this.safeParse = this.safeParse.bind(this)),
+ (this.parseAsync = this.parseAsync.bind(this)),
+ (this.safeParseAsync = this.safeParseAsync.bind(this)),
+ (this.spa = this.spa.bind(this)),
+ (this.refine = this.refine.bind(this)),
+ (this.refinement = this.refinement.bind(this)),
+ (this.superRefine = this.superRefine.bind(this)),
+ (this.optional = this.optional.bind(this)),
+ (this.nullable = this.nullable.bind(this)),
+ (this.nullish = this.nullish.bind(this)),
+ (this.array = this.array.bind(this)),
+ (this.promise = this.promise.bind(this)),
+ (this.or = this.or.bind(this)),
+ (this.and = this.and.bind(this)),
+ (this.transform = this.transform.bind(this)),
+ (this.brand = this.brand.bind(this)),
+ (this.default = this.default.bind(this)),
+ (this.catch = this.catch.bind(this)),
+ (this.describe = this.describe.bind(this)),
+ (this.pipe = this.pipe.bind(this)),
+ (this.readonly = this.readonly.bind(this)),
+ (this.isNullable = this.isNullable.bind(this)),
+ (this.isOptional = this.isOptional.bind(this));
+ }
+ get description() {
+ return this._def.description;
+ }
+ _getType(e) {
+ return B(e.data);
+ }
+ _getOrReturnCtx(e, r) {
+ return (
+ r || {
+ common: e.parent.common,
+ data: e.data,
+ parsedType: B(e.data),
+ schemaErrorMap: this._def.errorMap,
+ path: e.path,
+ parent: e.parent,
+ }
+ );
+ }
+ _processInputParams(e) {
- jsonrpc: '2.0',
- id: nextId++,
- ...request
+ status: new T(),
+ ctx: {
+ common: e.parent.common,
+ data: e.data,
+ parsedType: B(e.data),
+ schemaErrorMap: this._def.errorMap,
+ path: e.path,
+ parent: e.parent,
+ },
- },
- getId() {
- return nextId++;
- };
+ _parseSync(e) {
+ let r = this._parse(e);
+ if (Ze(r)) throw new Error("Synchronous parse encountered promise.");
+ return r;
+ }
+ _parseAsync(e) {
+ let r = this._parse(e);
+ return Promise.resolve(r);
+ }
+ parse(e, r) {
+ let n = this.safeParse(e, r);
+ if (n.success) return n.data;
+ throw n.error;
+ }
+ safeParse(e, r) {
+ var n;
+ let s = {
+ common: {
+ issues: [],
+ async: (n = r?.async) !== null && n !== void 0 ? n : !1,
+ contextualErrorMap: r?.errorMap,
+ },
+ path: r?.path || [],
+ schemaErrorMap: this._def.errorMap,
+ parent: null,
+ data: e,
+ parsedType: B(e),
+ },
+ a = this._parseSync({ data: e, path: s.path, parent: s });
+ return Dt(s, a);
+ }
+ async parseAsync(e, r) {
+ let n = await this.safeParseAsync(e, r);
+ if (n.success) return n.data;
+ throw n.error;
+ }
+ async safeParseAsync(e, r) {
+ let n = {
+ common: { issues: [], contextualErrorMap: r?.errorMap, async: !0 },
+ path: r?.path || [],
+ schemaErrorMap: this._def.errorMap,
+ parent: null,
+ data: e,
+ parsedType: B(e),
+ },
+ s = this._parse({ data: e, path: n.path, parent: n }),
+ a = await (Ze(s) ? s : Promise.resolve(s));
+ return Dt(n, a);
+ }
+ refine(e, r) {
+ let n = (s) =>
+ typeof r == "string" || typeof r > "u"
+ ? { message: r }
+ : typeof r == "function"
+ ? r(s)
+ : r;
+ return this._refinement((s, a) => {
+ let i = e(s),
+ o = () => a.addIssue({ code: d.custom, ...n(s) });
+ return typeof Promise < "u" && i instanceof Promise
+ ? i.then((c) => (c ? !0 : (o(), !1)))
+ : i
+ ? !0
+ : (o(), !1);
+ });
+ }
+ refinement(e, r) {
+ return this._refinement((n, s) =>
+ e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1),
+ );
+ }
+ _refinement(e) {
+ return new N({
+ schema: this,
+ typeName: m.ZodEffects,
+ effect: { type: "refinement", refinement: e },
+ });
+ }
+ superRefine(e) {
+ return this._refinement(e);
+ }
+ optional() {
+ return A.create(this, this._def);
+ }
+ nullable() {
+ return L.create(this, this._def);
+ }
+ nullish() {
+ return this.nullable().optional();
+ }
+ array() {
+ return D.create(this, this._def);
+ }
+ promise() {
+ return W.create(this, this._def);
+ }
+ or(e) {
+ return Q.create([this, e], this._def);
+ }
+ and(e) {
+ return ee.create(this, e, this._def);
+ }
+ transform(e) {
+ return new N({
+ ...g(this._def),
+ schema: this,
+ typeName: m.ZodEffects,
+ effect: { type: "transform", transform: e },
+ });
+ }
+ default(e) {
+ let r = typeof e == "function" ? e : () => e;
+ return new ae({
+ ...g(this._def),
+ innerType: this,
+ defaultValue: r,
+ typeName: m.ZodDefault,
+ });
+ }
+ brand() {
+ return new Ie({ typeName: m.ZodBranded, type: this, ...g(this._def) });
+ }
+ catch(e) {
+ let r = typeof e == "function" ? e : () => e;
+ return new ie({
+ ...g(this._def),
+ innerType: this,
+ catchValue: r,
+ typeName: m.ZodCatch,
+ });
+ }
+ describe(e) {
+ let r = this.constructor;
+ return new r({ ...this._def, description: e });
+ }
+ pipe(e) {
+ return Le.create(this, e);
+ }
+ readonly() {
+ return oe.create(this);
+ }
+ isOptional() {
+ return this.safeParse(void 0).success;
+ }
+ isNullable() {
+ return this.safeParse(null).success;
+ }
+ },
+ Mr = /^c[^\s-]{8,}$/i,
+ Zr = /^[0-9a-z]+$/,
+ Ir = /^[0-9A-HJKMNP-TV-Z]{26}$/,
+ Lr =
+ /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,
+ $r = /^[a-z0-9_-]{21}$/i,
+ Vr =
+ /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,
+ Dr =
+ /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
+ zr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
+ lt,
+ Br =
+ /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
+ Ur =
+ /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
+ qr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
+ qt =
+ "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
+ Wr = new RegExp(`^${qt}$`);
+ function Wt(t) {
+ let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
+ return (
+ t.precision
+ ? (e = `${e}\\.\\d{${t.precision}}`)
+ : t.precision == null && (e = `${e}(\\.\\d+)?`),
+ e
+ );
+ function Hr(t) {
+ return new RegExp(`^${Wt(t)}$`);
+ }
+ function Ht(t) {
+ let e = `${qt}T${Wt(t)}`,
+ r = [];
+ return (
+ r.push(t.local ? "Z?" : "Z"),
+ t.offset && r.push("([+-]\\d{2}:?\\d{2})"),
+ (e = `${e}(${r.join("|")})`),
+ new RegExp(`^${e}$`)
+ );
+ }
+ function Fr(t, e) {
+ return !!(
+ ((e === "v4" || !e) && Br.test(t)) ||
+ ((e === "v6" || !e) && Ur.test(t))
+ );
+ }
+ var U = class t extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = String(e.data)),
+ this._getType(e) !== p.string)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.string,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n = new T(),
+ s;
+ for (let a of this._def.checks)
+ if (a.kind === "min")
+ e.data.length < a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !1,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "max")
+ e.data.length > a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !1,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "length") {
+ let i = e.data.length > a.value,
+ o = e.data.length < a.value;
+ (i || o) &&
+ ((s = this._getOrReturnCtx(e, s)),
+ i
+ ? l(s, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !0,
+ message: a.message,
+ })
+ : o &&
+ l(s, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !0,
+ message: a.message,
+ }),
+ n.dirty());
+ } else if (a.kind === "email")
+ Dr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "email",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "emoji")
+ lt || (lt = new RegExp(zr, "u")),
+ lt.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "emoji",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "uuid")
+ Lr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "uuid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "nanoid")
+ $r.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "nanoid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "cuid")
+ Mr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "cuid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "cuid2")
+ Zr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "cuid2",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "ulid")
+ Ir.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "ulid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "url")
+ try {
+ new URL(e.data);
+ } catch {
+ (s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "url",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty();
+ }
+ else
+ a.kind === "regex"
+ ? ((a.regex.lastIndex = 0),
+ a.regex.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "regex",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty()))
+ : a.kind === "trim"
+ ? (e.data = e.data.trim())
+ : a.kind === "includes"
+ ? e.data.includes(a.value, a.position) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { includes: a.value, position: a.position },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "toLowerCase"
+ ? (e.data = e.data.toLowerCase())
+ : a.kind === "toUpperCase"
+ ? (e.data = e.data.toUpperCase())
+ : a.kind === "startsWith"
+ ? e.data.startsWith(a.value) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { startsWith: a.value },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "endsWith"
+ ? e.data.endsWith(a.value) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { endsWith: a.value },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "datetime"
+ ? Ht(a).test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "datetime",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "date"
+ ? Wr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "date",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "time"
+ ? Hr(a).test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "time",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "duration"
+ ? Vr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "duration",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "ip"
+ ? Fr(e.data, a.version) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "ip",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "base64"
+ ? qr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "base64",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : x.assertNever(a);
+ return { status: n.value, value: e.data };
+ }
+ _regex(e, r, n) {
+ return this.refinement((s) => e.test(s), {
+ validation: r,
+ code: d.invalid_string,
+ ...h.errToObj(n),
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ email(e) {
+ return this._addCheck({ kind: "email", ...h.errToObj(e) });
+ }
+ url(e) {
+ return this._addCheck({ kind: "url", ...h.errToObj(e) });
+ }
+ emoji(e) {
+ return this._addCheck({ kind: "emoji", ...h.errToObj(e) });
+ }
+ uuid(e) {
+ return this._addCheck({ kind: "uuid", ...h.errToObj(e) });
+ }
+ nanoid(e) {
+ return this._addCheck({ kind: "nanoid", ...h.errToObj(e) });
+ }
+ cuid(e) {
+ return this._addCheck({ kind: "cuid", ...h.errToObj(e) });
+ }
+ cuid2(e) {
+ return this._addCheck({ kind: "cuid2", ...h.errToObj(e) });
+ }
+ ulid(e) {
+ return this._addCheck({ kind: "ulid", ...h.errToObj(e) });
+ }
+ base64(e) {
+ return this._addCheck({ kind: "base64", ...h.errToObj(e) });
+ }
+ ip(e) {
+ return this._addCheck({ kind: "ip", ...h.errToObj(e) });
+ }
+ datetime(e) {
+ var r, n;
+ return typeof e == "string"
+ ? this._addCheck({
+ kind: "datetime",
+ precision: null,
+ offset: !1,
+ local: !1,
+ message: e,
+ })
+ : this._addCheck({
+ kind: "datetime",
+ precision: typeof e?.precision > "u" ? null : e?.precision,
+ offset: (r = e?.offset) !== null && r !== void 0 ? r : !1,
+ local: (n = e?.local) !== null && n !== void 0 ? n : !1,
+ ...h.errToObj(e?.message),
+ });
+ }
+ date(e) {
+ return this._addCheck({ kind: "date", message: e });
+ }
+ time(e) {
+ return typeof e == "string"
+ ? this._addCheck({ kind: "time", precision: null, message: e })
+ : this._addCheck({
+ kind: "time",
+ precision: typeof e?.precision > "u" ? null : e?.precision,
+ ...h.errToObj(e?.message),
+ });
+ }
+ duration(e) {
+ return this._addCheck({ kind: "duration", ...h.errToObj(e) });
+ }
+ regex(e, r) {
+ return this._addCheck({ kind: "regex", regex: e, ...h.errToObj(r) });
+ }
+ includes(e, r) {
+ return this._addCheck({
+ kind: "includes",
+ value: e,
+ position: r?.position,
+ ...h.errToObj(r?.message),
+ });
+ }
+ startsWith(e, r) {
+ return this._addCheck({ kind: "startsWith", value: e, ...h.errToObj(r) });
+ }
+ endsWith(e, r) {
+ return this._addCheck({ kind: "endsWith", value: e, ...h.errToObj(r) });
+ }
+ min(e, r) {
+ return this._addCheck({ kind: "min", value: e, ...h.errToObj(r) });
+ }
+ max(e, r) {
+ return this._addCheck({ kind: "max", value: e, ...h.errToObj(r) });
+ }
+ length(e, r) {
+ return this._addCheck({ kind: "length", value: e, ...h.errToObj(r) });
+ }
+ nonempty(e) {
+ return this.min(1, h.errToObj(e));
+ }
+ trim() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "trim" }],
+ });
+ }
+ toLowerCase() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "toLowerCase" }],
+ });
+ }
+ toUpperCase() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "toUpperCase" }],
+ });
+ }
+ get isDatetime() {
+ return !!this._def.checks.find((e) => e.kind === "datetime");
+ }
+ get isDate() {
+ return !!this._def.checks.find((e) => e.kind === "date");
+ }
+ get isTime() {
+ return !!this._def.checks.find((e) => e.kind === "time");
+ }
+ get isDuration() {
+ return !!this._def.checks.find((e) => e.kind === "duration");
+ }
+ get isEmail() {
+ return !!this._def.checks.find((e) => e.kind === "email");
+ }
+ get isURL() {
+ return !!this._def.checks.find((e) => e.kind === "url");
+ }
+ get isEmoji() {
+ return !!this._def.checks.find((e) => e.kind === "emoji");
+ }
+ get isUUID() {
+ return !!this._def.checks.find((e) => e.kind === "uuid");
+ }
+ get isNANOID() {
+ return !!this._def.checks.find((e) => e.kind === "nanoid");
+ }
+ get isCUID() {
+ return !!this._def.checks.find((e) => e.kind === "cuid");
+ }
+ get isCUID2() {
+ return !!this._def.checks.find((e) => e.kind === "cuid2");
+ }
+ get isULID() {
+ return !!this._def.checks.find((e) => e.kind === "ulid");
+ }
+ get isIP() {
+ return !!this._def.checks.find((e) => e.kind === "ip");
+ }
+ get isBase64() {
+ return !!this._def.checks.find((e) => e.kind === "base64");
+ }
+ get minLength() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxLength() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ };
+ U.create = (t) => {
+ var e;
+ return new U({
+ checks: [],
+ typeName: m.ZodString,
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
+ ...g(t),
+ });
+ };
+ function Jr(t, e) {
+ let r = (t.toString().split(".")[1] || "").length,
+ n = (e.toString().split(".")[1] || "").length,
+ s = r > n ? r : n,
+ a = parseInt(t.toFixed(s).replace(".", "")),
+ i = parseInt(e.toFixed(s).replace(".", ""));
+ return (a % i) / Math.pow(10, s);
+ }
+ var F = class t extends b {
+ constructor() {
+ super(...arguments),
+ (this.min = this.gte),
+ (this.max = this.lte),
+ (this.step = this.multipleOf);
+ }
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = Number(e.data)),
+ this._getType(e) !== p.number)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.number,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n,
+ s = new T();
+ for (let a of this._def.checks)
+ a.kind === "int"
+ ? x.isInteger(e.data) ||
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.invalid_type,
+ expected: "integer",
+ received: "float",
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "min"
+ ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "number",
+ inclusive: a.inclusive,
+ exact: !1,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "max"
+ ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "number",
+ inclusive: a.inclusive,
+ exact: !1,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "multipleOf"
+ ? Jr(e.data, a.value) !== 0 &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.not_multiple_of,
+ multipleOf: a.value,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "finite"
+ ? Number.isFinite(e.data) ||
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, { code: d.not_finite, message: a.message }),
+ s.dirty())
+ : x.assertNever(a);
+ return { status: s.value, value: e.data };
+ }
+ gte(e, r) {
+ return this.setLimit("min", e, !0, h.toString(r));
+ }
+ gt(e, r) {
+ return this.setLimit("min", e, !1, h.toString(r));
+ }
+ lte(e, r) {
+ return this.setLimit("max", e, !0, h.toString(r));
+ }
+ lt(e, r) {
+ return this.setLimit("max", e, !1, h.toString(r));
+ }
+ setLimit(e, r, n, s) {
+ return new t({
+ ...this._def,
+ checks: [
+ ...this._def.checks,
+ { kind: e, value: r, inclusive: n, message: h.toString(s) },
+ ],
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ int(e) {
+ return this._addCheck({ kind: "int", message: h.toString(e) });
+ }
+ positive(e) {
+ return this._addCheck({
+ kind: "min",
+ value: 0,
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ negative(e) {
+ return this._addCheck({
+ kind: "max",
+ value: 0,
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ nonpositive(e) {
+ return this._addCheck({
+ kind: "max",
+ value: 0,
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ nonnegative(e) {
+ return this._addCheck({
+ kind: "min",
+ value: 0,
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ multipleOf(e, r) {
+ return this._addCheck({
+ kind: "multipleOf",
+ value: e,
+ message: h.toString(r),
+ });
+ }
+ finite(e) {
+ return this._addCheck({ kind: "finite", message: h.toString(e) });
+ }
+ safe(e) {
+ return this._addCheck({
+ kind: "min",
+ inclusive: !0,
+ value: Number.MIN_SAFE_INTEGER,
+ message: h.toString(e),
+ })._addCheck({
+ kind: "max",
+ inclusive: !0,
+ value: Number.MAX_SAFE_INTEGER,
+ message: h.toString(e),
+ });
+ }
+ get minValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ get isInt() {
+ return !!this._def.checks.find(
+ (e) =>
+ e.kind === "int" || (e.kind === "multipleOf" && x.isInteger(e.value)),
+ );
+ }
+ get isFinite() {
+ let e = null,
+ r = null;
+ for (let n of this._def.checks) {
+ if (n.kind === "finite" || n.kind === "int" || n.kind === "multipleOf")
+ return !0;
+ n.kind === "min"
+ ? (r === null || n.value > r) && (r = n.value)
+ : n.kind === "max" && (e === null || n.value < e) && (e = n.value);
+ }
+ return Number.isFinite(r) && Number.isFinite(e);
+ }
+ };
+ F.create = (t) =>
+ new F({
+ checks: [],
+ typeName: m.ZodNumber,
+ coerce: t?.coerce || !1,
+ ...g(t),
+ });
+ var J = class t extends b {
+ constructor() {
+ super(...arguments), (this.min = this.gte), (this.max = this.lte);
+ }
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = BigInt(e.data)),
+ this._getType(e) !== p.bigint)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.bigint,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n,
+ s = new T();
+ for (let a of this._def.checks)
+ a.kind === "min"
+ ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_small,
+ type: "bigint",
+ minimum: a.value,
+ inclusive: a.inclusive,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "max"
+ ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_big,
+ type: "bigint",
+ maximum: a.value,
+ inclusive: a.inclusive,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "multipleOf"
+ ? e.data % a.value !== BigInt(0) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.not_multiple_of,
+ multipleOf: a.value,
+ message: a.message,
+ }),
+ s.dirty())
+ : x.assertNever(a);
+ return { status: s.value, value: e.data };
+ }
+ gte(e, r) {
+ return this.setLimit("min", e, !0, h.toString(r));
+ }
+ gt(e, r) {
+ return this.setLimit("min", e, !1, h.toString(r));
+ }
+ lte(e, r) {
+ return this.setLimit("max", e, !0, h.toString(r));
+ }
+ lt(e, r) {
+ return this.setLimit("max", e, !1, h.toString(r));
+ }
+ setLimit(e, r, n, s) {
+ return new t({
+ ...this._def,
+ checks: [
+ ...this._def.checks,
+ { kind: e, value: r, inclusive: n, message: h.toString(s) },
+ ],
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ positive(e) {
+ return this._addCheck({
+ kind: "min",
+ value: BigInt(0),
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ negative(e) {
+ return this._addCheck({
+ kind: "max",
+ value: BigInt(0),
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ nonpositive(e) {
+ return this._addCheck({
+ kind: "max",
+ value: BigInt(0),
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ nonnegative(e) {
+ return this._addCheck({
+ kind: "min",
+ value: BigInt(0),
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ multipleOf(e, r) {
+ return this._addCheck({
+ kind: "multipleOf",
+ value: e,
+ message: h.toString(r),
+ });
+ }
+ get minValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ };
+ J.create = (t) => {
+ var e;
+ return new J({
+ checks: [],
+ typeName: m.ZodBigInt,
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
+ ...g(t),
+ });
+ };
+ var Y = class extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = !!e.data),
+ this._getType(e) !== p.boolean)
+ ) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.boolean,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ Y.create = (t) =>
+ new Y({ typeName: m.ZodBoolean, coerce: t?.coerce || !1, ...g(t) });
+ var G = class t extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = new Date(e.data)),
+ this._getType(e) !== p.date)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.date,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ if (isNaN(e.data.getTime())) {
+ let a = this._getOrReturnCtx(e);
+ return l(a, { code: d.invalid_date }), v;
+ }
+ let n = new T(),
+ s;
+ for (let a of this._def.checks)
+ a.kind === "min"
+ ? e.data.getTime() < a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_small,
+ message: a.message,
+ inclusive: !0,
+ exact: !1,
+ minimum: a.value,
+ type: "date",
+ }),
+ n.dirty())
+ : a.kind === "max"
+ ? e.data.getTime() > a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_big,
+ message: a.message,
+ inclusive: !0,
+ exact: !1,
+ maximum: a.value,
+ type: "date",
+ }),
+ n.dirty())
+ : x.assertNever(a);
+ return { status: n.value, value: new Date(e.data.getTime()) };
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ min(e, r) {
+ return this._addCheck({
+ kind: "min",
+ value: e.getTime(),
+ message: h.toString(r),
+ });
+ }
+ max(e, r) {
+ return this._addCheck({
+ kind: "max",
+ value: e.getTime(),
+ message: h.toString(r),
+ });
+ }
+ get minDate() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e != null ? new Date(e) : null;
+ }
+ get maxDate() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e != null ? new Date(e) : null;
+ }
+ };
+ G.create = (t) =>
+ new G({
+ checks: [],
+ coerce: t?.coerce || !1,
+ typeName: m.ZodDate,
+ ...g(t),
+ });
+ var fe = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.symbol) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.symbol,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ fe.create = (t) => new fe({ typeName: m.ZodSymbol, ...g(t) });
+ var K = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.undefined) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.undefined,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ K.create = (t) => new K({ typeName: m.ZodUndefined, ...g(t) });
+ var X = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.null) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.null,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ X.create = (t) => new X({ typeName: m.ZodNull, ...g(t) });
+ var q = class extends b {
+ constructor() {
+ super(...arguments), (this._any = !0);
+ }
+ _parse(e) {
+ return R(e.data);
+ }
+ };
+ q.create = (t) => new q({ typeName: m.ZodAny, ...g(t) });
+ var V = class extends b {
+ constructor() {
+ super(...arguments), (this._unknown = !0);
+ }
+ _parse(e) {
+ return R(e.data);
+ }
+ };
+ V.create = (t) => new V({ typeName: m.ZodUnknown, ...g(t) });
+ var Z = class extends b {
+ _parse(e) {
+ let r = this._getOrReturnCtx(e);
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.never,
+ received: r.parsedType,
+ }),
+ v
+ );
+ }
+ };
+ Z.create = (t) => new Z({ typeName: m.ZodNever, ...g(t) });
+ var pe = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.undefined) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.void,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ pe.create = (t) => new pe({ typeName: m.ZodVoid, ...g(t) });
+ var D = class t extends b {
+ _parse(e) {
+ let { ctx: r, status: n } = this._processInputParams(e),
+ s = this._def;
+ if (r.parsedType !== p.array)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.array,
+ received: r.parsedType,
+ }),
+ v
+ );
+ if (s.exactLength !== null) {
+ let i = r.data.length > s.exactLength.value,
+ o = r.data.length < s.exactLength.value;
+ (i || o) &&
+ (l(r, {
+ code: i ? d.too_big : d.too_small,
+ minimum: o ? s.exactLength.value : void 0,
+ maximum: i ? s.exactLength.value : void 0,
+ type: "array",
+ inclusive: !0,
+ exact: !0,
+ message: s.exactLength.message,
+ }),
+ n.dirty());
+ }
+ if (
+ (s.minLength !== null &&
+ r.data.length < s.minLength.value &&
+ (l(r, {
+ code: d.too_small,
+ minimum: s.minLength.value,
+ type: "array",
+ inclusive: !0,
+ exact: !1,
+ message: s.minLength.message,
+ }),
+ n.dirty()),
+ s.maxLength !== null &&
+ r.data.length > s.maxLength.value &&
+ (l(r, {
+ code: d.too_big,
+ maximum: s.maxLength.value,
+ type: "array",
+ inclusive: !0,
+ exact: !1,
+ message: s.maxLength.message,
+ }),
+ n.dirty()),
+ r.common.async)
+ )
+ return Promise.all(
+ [...r.data].map((i, o) => s.type._parseAsync(new M(r, i, r.path, o))),
+ ).then((i) => T.mergeArray(n, i));
+ let a = [...r.data].map((i, o) =>
+ s.type._parseSync(new M(r, i, r.path, o)),
+ );
+ return T.mergeArray(n, a);
+ }
+ get element() {
+ return this._def.type;
+ }
+ min(e, r) {
+ return new t({
+ ...this._def,
+ minLength: { value: e, message: h.toString(r) },
+ });
+ }
+ max(e, r) {
+ return new t({
+ ...this._def,
+ maxLength: { value: e, message: h.toString(r) },
+ });
+ }
+ length(e, r) {
+ return new t({
+ ...this._def,
+ exactLength: { value: e, message: h.toString(r) },
+ });
+ }
+ nonempty(e) {
+ return this.min(1, e);
+ }
+ };
+ D.create = (t, e) =>
+ new D({
+ type: t,
+ minLength: null,
+ maxLength: null,
+ exactLength: null,
+ typeName: m.ZodArray,
+ ...g(e),
+ });
+ function ue(t) {
+ if (t instanceof P) {
+ let e = {};
+ for (let r in t.shape) {
+ let n = t.shape[r];
+ e[r] = A.create(ue(n));
+ }
+ return new P({ ...t._def, shape: () => e });
+ } else
+ return t instanceof D
+ ? new D({ ...t._def, type: ue(t.element) })
+ : t instanceof A
+ ? A.create(ue(t.unwrap()))
+ : t instanceof L
+ ? L.create(ue(t.unwrap()))
+ : t instanceof I
+ ? I.create(t.items.map((e) => ue(e)))
+ : t;
+ }
+ var P = class t extends b {
+ constructor() {
+ super(...arguments),
+ (this._cached = null),
+ (this.nonstrict = this.passthrough),
+ (this.augment = this.extend);
+ }
+ _getCached() {
+ if (this._cached !== null) return this._cached;
+ let e = this._def.shape(),
+ r = x.objectKeys(e);
+ return (this._cached = { shape: e, keys: r });
+ }
+ _parse(e) {
+ if (this._getType(e) !== p.object) {
+ let u = this._getOrReturnCtx(e);
+ return (
+ l(u, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: u.parsedType,
+ }),
+ v
+ );
+ }
+ let { status: n, ctx: s } = this._processInputParams(e),
+ { shape: a, keys: i } = this._getCached(),
+ o = [];
+ if (
+ !(this._def.catchall instanceof Z && this._def.unknownKeys === "strip")
+ )
+ for (let u in s.data) i.includes(u) || o.push(u);
+ let c = [];
+ for (let u of i) {
+ let f = a[u],
+ y = s.data[u];
+ c.push({
+ key: { status: "valid", value: u },
+ value: f._parse(new M(s, y, s.path, u)),
+ alwaysSet: u in s.data,
+ });
+ }
+ if (this._def.catchall instanceof Z) {
+ let u = this._def.unknownKeys;
+ if (u === "passthrough")
+ for (let f of o)
+ c.push({
+ key: { status: "valid", value: f },
+ value: { status: "valid", value: s.data[f] },
+ });
+ else if (u === "strict")
+ o.length > 0 &&
+ (l(s, { code: d.unrecognized_keys, keys: o }), n.dirty());
+ else if (u !== "strip")
+ throw new Error(
+ "Internal ZodObject error: invalid unknownKeys value.",
+ );
+ } else {
+ let u = this._def.catchall;
+ for (let f of o) {
+ let y = s.data[f];
+ c.push({
+ key: { status: "valid", value: f },
+ value: u._parse(new M(s, y, s.path, f)),
+ alwaysSet: f in s.data,
+ });
+ }
+ }
+ return s.common.async
+ ? Promise.resolve()
+ .then(async () => {
+ let u = [];
+ for (let f of c) {
+ let y = await f.key,
+ w = await f.value;
+ u.push({ key: y, value: w, alwaysSet: f.alwaysSet });
+ }
+ return u;
+ })
+ .then((u) => T.mergeObjectSync(n, u))
+ : T.mergeObjectSync(n, c);
+ }
+ get shape() {
+ return this._def.shape();
+ }
+ strict(e) {
+ return (
+ h.errToObj,
+ new t({
+ ...this._def,
+ unknownKeys: "strict",
+ ...(e !== void 0
+ ? {
+ errorMap: (r, n) => {
+ var s, a, i, o;
+ let c =
+ (i =
+ (a = (s = this._def).errorMap) === null || a === void 0
+ ? void 0
+ : a.call(s, r, n).message) !== null && i !== void 0
+ ? i
+ : n.defaultError;
+ return r.code === "unrecognized_keys"
+ ? {
+ message:
+ (o = h.errToObj(e).message) !== null && o !== void 0
+ ? o
+ : c,
+ }
+ : { message: c };
+ },
+ }
+ : {}),
+ })
+ );
+ }
+ strip() {
+ return new t({ ...this._def, unknownKeys: "strip" });
+ }
+ passthrough() {
+ return new t({ ...this._def, unknownKeys: "passthrough" });
+ }
+ extend(e) {
+ return new t({
+ ...this._def,
+ shape: () => ({ ...this._def.shape(), ...e }),
+ });
+ }
+ merge(e) {
+ return new t({
+ unknownKeys: e._def.unknownKeys,
+ catchall: e._def.catchall,
+ shape: () => ({ ...this._def.shape(), ...e._def.shape() }),
+ typeName: m.ZodObject,
+ });
+ }
+ setKey(e, r) {
+ return this.augment({ [e]: r });
+ }
+ catchall(e) {
+ return new t({ ...this._def, catchall: e });
+ }
+ pick(e) {
+ let r = {};
+ return (
+ x.objectKeys(e).forEach((n) => {
+ e[n] && this.shape[n] && (r[n] = this.shape[n]);
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ omit(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ e[n] || (r[n] = this.shape[n]);
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ deepPartial() {
+ return ue(this);
+ }
+ partial(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ let s = this.shape[n];
+ e && !e[n] ? (r[n] = s) : (r[n] = s.optional());
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ required(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ if (e && !e[n]) r[n] = this.shape[n];
+ else {
+ let a = this.shape[n];
+ for (; a instanceof A; ) a = a._def.innerType;
+ r[n] = a;
+ }
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ keyof() {
+ return Ft(x.objectKeys(this.shape));
+ }
+ };
+ P.create = (t, e) =>
+ new P({
+ shape: () => t,
+ unknownKeys: "strip",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ P.strictCreate = (t, e) =>
+ new P({
+ shape: () => t,
+ unknownKeys: "strict",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ P.lazycreate = (t, e) =>
+ new P({
+ shape: t,
+ unknownKeys: "strip",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ var Q = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = this._def.options;
+ function s(a) {
+ for (let o of a) if (o.result.status === "valid") return o.result;
+ for (let o of a)
+ if (o.result.status === "dirty")
+ return r.common.issues.push(...o.ctx.common.issues), o.result;
+ let i = a.map((o) => new C(o.ctx.common.issues));
+ return l(r, { code: d.invalid_union, unionErrors: i }), v;
+ }
+ if (r.common.async)
+ return Promise.all(
+ n.map(async (a) => {
+ let i = { ...r, common: { ...r.common, issues: [] }, parent: null };
+ return {
+ result: await a._parseAsync({
+ data: r.data,
+ path: r.path,
+ parent: i,
+ }),
+ ctx: i,
+ };
+ }),
+ ).then(s);
+ {
+ let a,
+ i = [];
+ for (let c of n) {
+ let u = { ...r, common: { ...r.common, issues: [] }, parent: null },
+ f = c._parseSync({ data: r.data, path: r.path, parent: u });
+ if (f.status === "valid") return f;
+ f.status === "dirty" && !a && (a = { result: f, ctx: u }),
+ u.common.issues.length && i.push(u.common.issues);
+ }
+ if (a) return r.common.issues.push(...a.ctx.common.issues), a.result;
+ let o = i.map((c) => new C(c));
+ return l(r, { code: d.invalid_union, unionErrors: o }), v;
+ }
+ }
+ get options() {
+ return this._def.options;
+ }
+ };
+ Q.create = (t, e) => new Q({ options: t, typeName: m.ZodUnion, ...g(e) });
+ var $ = (t) =>
+ t instanceof te
+ ? $(t.schema)
+ : t instanceof N
+ ? $(t.innerType())
+ : t instanceof re
+ ? [t.value]
+ : t instanceof ne
+ ? t.options
+ : t instanceof se
+ ? x.objectValues(t.enum)
+ : t instanceof ae
+ ? $(t._def.innerType)
+ : t instanceof K
+ ? [void 0]
+ : t instanceof X
+ ? [null]
+ : t instanceof A
+ ? [void 0, ...$(t.unwrap())]
+ : t instanceof L
+ ? [null, ...$(t.unwrap())]
+ : t instanceof Ie || t instanceof oe
+ ? $(t.unwrap())
+ : t instanceof ie
+ ? $(t._def.innerType)
+ : [],
+ rt = class t extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.object)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: r.parsedType,
+ }),
+ v
+ );
+ let n = this.discriminator,
+ s = r.data[n],
+ a = this.optionsMap.get(s);
+ return a
+ ? r.common.async
+ ? a._parseAsync({ data: r.data, path: r.path, parent: r })
+ : a._parseSync({ data: r.data, path: r.path, parent: r })
+ : (l(r, {
+ code: d.invalid_union_discriminator,
+ options: Array.from(this.optionsMap.keys()),
+ path: [n],
+ }),
+ v);
+ }
+ get discriminator() {
+ return this._def.discriminator;
+ }
+ get options() {
+ return this._def.options;
+ }
+ get optionsMap() {
+ return this._def.optionsMap;
+ }
+ static create(e, r, n) {
+ let s = new Map();
+ for (let a of r) {
+ let i = $(a.shape[e]);
+ if (!i.length)
+ throw new Error(
+ `A discriminator value for key \`${e}\` could not be extracted from all schema options`,
+ );
+ for (let o of i) {
+ if (s.has(o))
+ throw new Error(
+ `Discriminator property ${String(e)} has duplicate value ${String(o)}`,
+ );
+ s.set(o, a);
+ }
+ }
+ return new t({
+ typeName: m.ZodDiscriminatedUnion,
+ discriminator: e,
+ options: r,
+ optionsMap: s,
+ ...g(n),
+ });
+ }
+ };
+ function mt(t, e) {
+ let r = B(t),
+ n = B(e);
+ if (t === e) return { valid: !0, data: t };
+ if (r === p.object && n === p.object) {
+ let s = x.objectKeys(e),
+ a = x.objectKeys(t).filter((o) => s.indexOf(o) !== -1),
+ i = { ...t, ...e };
+ for (let o of a) {
+ let c = mt(t[o], e[o]);
+ if (!c.valid) return { valid: !1 };
+ i[o] = c.data;
+ }
+ return { valid: !0, data: i };
+ } else if (r === p.array && n === p.array) {
+ if (t.length !== e.length) return { valid: !1 };
+ let s = [];
+ for (let a = 0; a < t.length; a++) {
+ let i = t[a],
+ o = e[a],
+ c = mt(i, o);
+ if (!c.valid) return { valid: !1 };
+ s.push(c.data);
+ }
+ return { valid: !0, data: s };
+ } else
+ return r === p.date && n === p.date && +t == +e
+ ? { valid: !0, data: t }
+ : { valid: !1 };
+ }
+ var ee = class extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e),
+ s = (a, i) => {
+ if (pt(a) || pt(i)) return v;
+ let o = mt(a.value, i.value);
+ return o.valid
+ ? ((ht(a) || ht(i)) && r.dirty(),
+ { status: r.value, value: o.data })
+ : (l(n, { code: d.invalid_intersection_types }), v);
+ };
+ return n.common.async
+ ? Promise.all([
+ this._def.left._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ this._def.right._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ ]).then(([a, i]) => s(a, i))
+ : s(
+ this._def.left._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ this._def.right._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ );
+ }
+ };
+ ee.create = (t, e, r) =>
+ new ee({ left: t, right: e, typeName: m.ZodIntersection, ...g(r) });
+ var I = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.array)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.array,
+ received: n.parsedType,
+ }),
+ v
+ );
+ if (n.data.length < this._def.items.length)
+ return (
+ l(n, {
+ code: d.too_small,
+ minimum: this._def.items.length,
+ inclusive: !0,
+ exact: !1,
+ type: "array",
+ }),
+ v
+ );
+ !this._def.rest &&
+ n.data.length > this._def.items.length &&
+ (l(n, {
+ code: d.too_big,
+ maximum: this._def.items.length,
+ inclusive: !0,
+ exact: !1,
+ type: "array",
+ }),
+ r.dirty());
+ let a = [...n.data]
+ .map((i, o) => {
+ let c = this._def.items[o] || this._def.rest;
+ return c ? c._parse(new M(n, i, n.path, o)) : null;
+ })
+ .filter((i) => !!i);
+ return n.common.async
+ ? Promise.all(a).then((i) => T.mergeArray(r, i))
+ : T.mergeArray(r, a);
+ }
+ get items() {
+ return this._def.items;
+ }
+ rest(e) {
+ return new t({ ...this._def, rest: e });
+ }
+ };
+ I.create = (t, e) => {
+ if (!Array.isArray(t))
+ throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
+ return new I({ items: t, typeName: m.ZodTuple, rest: null, ...g(e) });
+ };
+ var nt = class t extends b {
+ get keySchema() {
+ return this._def.keyType;
+ }
+ get valueSchema() {
+ return this._def.valueType;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.object)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = [],
+ a = this._def.keyType,
+ i = this._def.valueType;
+ for (let o in n.data)
+ s.push({
+ key: a._parse(new M(n, o, n.path, o)),
+ value: i._parse(new M(n, n.data[o], n.path, o)),
+ alwaysSet: o in n.data,
+ });
+ return n.common.async
+ ? T.mergeObjectAsync(r, s)
+ : T.mergeObjectSync(r, s);
+ }
+ get element() {
+ return this._def.valueType;
+ }
+ static create(e, r, n) {
+ return r instanceof b
+ ? new t({ keyType: e, valueType: r, typeName: m.ZodRecord, ...g(n) })
+ : new t({
+ keyType: U.create(),
+ valueType: e,
+ typeName: m.ZodRecord,
+ ...g(r),
+ });
+ }
+ },
+ he = class extends b {
+ get keySchema() {
+ return this._def.keyType;
+ }
+ get valueSchema() {
+ return this._def.valueType;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.map)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.map,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = this._def.keyType,
+ a = this._def.valueType,
+ i = [...n.data.entries()].map(([o, c], u) => ({
+ key: s._parse(new M(n, o, n.path, [u, "key"])),
+ value: a._parse(new M(n, c, n.path, [u, "value"])),
+ }));
+ if (n.common.async) {
+ let o = new Map();
+ return Promise.resolve().then(async () => {
+ for (let c of i) {
+ let u = await c.key,
+ f = await c.value;
+ if (u.status === "aborted" || f.status === "aborted") return v;
+ (u.status === "dirty" || f.status === "dirty") && r.dirty(),
+ o.set(u.value, f.value);
+ }
+ return { status: r.value, value: o };
+ });
+ } else {
+ let o = new Map();
+ for (let c of i) {
+ let u = c.key,
+ f = c.value;
+ if (u.status === "aborted" || f.status === "aborted") return v;
+ (u.status === "dirty" || f.status === "dirty") && r.dirty(),
+ o.set(u.value, f.value);
+ }
+ return { status: r.value, value: o };
+ }
+ }
+ };
+ he.create = (t, e, r) =>
+ new he({ valueType: e, keyType: t, typeName: m.ZodMap, ...g(r) });
+ var me = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.set)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.set,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = this._def;
+ s.minSize !== null &&
+ n.data.size < s.minSize.value &&
+ (l(n, {
+ code: d.too_small,
+ minimum: s.minSize.value,
+ type: "set",
+ inclusive: !0,
+ exact: !1,
+ message: s.minSize.message,
+ }),
+ r.dirty()),
+ s.maxSize !== null &&
+ n.data.size > s.maxSize.value &&
+ (l(n, {
+ code: d.too_big,
+ maximum: s.maxSize.value,
+ type: "set",
+ inclusive: !0,
+ exact: !1,
+ message: s.maxSize.message,
+ }),
+ r.dirty());
+ let a = this._def.valueType;
+ function i(c) {
+ let u = new Set();
+ for (let f of c) {
+ if (f.status === "aborted") return v;
+ f.status === "dirty" && r.dirty(), u.add(f.value);
+ }
+ return { status: r.value, value: u };
+ }
+ let o = [...n.data.values()].map((c, u) =>
+ a._parse(new M(n, c, n.path, u)),
+ );
+ return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
+ }
+ min(e, r) {
+ return new t({
+ ...this._def,
+ minSize: { value: e, message: h.toString(r) },
+ });
+ }
+ max(e, r) {
+ return new t({
+ ...this._def,
+ maxSize: { value: e, message: h.toString(r) },
+ });
+ }
+ size(e, r) {
+ return this.min(e, r).max(e, r);
+ }
+ nonempty(e) {
+ return this.min(1, e);
+ }
+ };
+ me.create = (t, e) =>
+ new me({
+ valueType: t,
+ minSize: null,
+ maxSize: null,
+ typeName: m.ZodSet,
+ ...g(e),
+ });
+ var st = class t extends b {
+ constructor() {
+ super(...arguments), (this.validate = this.implement);
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.function)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.function,
+ received: r.parsedType,
+ }),
+ v
+ );
+ function n(o, c) {
+ return et({
+ data: o,
+ path: r.path,
+ errorMaps: [
+ r.common.contextualErrorMap,
+ r.schemaErrorMap,
+ Qe(),
+ le,
+ ].filter((u) => !!u),
+ issueData: { code: d.invalid_arguments, argumentsError: c },
+ });
+ }
+ function s(o, c) {
+ return et({
+ data: o,
+ path: r.path,
+ errorMaps: [
+ r.common.contextualErrorMap,
+ r.schemaErrorMap,
+ Qe(),
+ le,
+ ].filter((u) => !!u),
+ issueData: { code: d.invalid_return_type, returnTypeError: c },
+ });
+ }
+ let a = { errorMap: r.common.contextualErrorMap },
+ i = r.data;
+ if (this._def.returns instanceof W) {
+ let o = this;
+ return R(async function (...c) {
+ let u = new C([]),
+ f = await o._def.args.parseAsync(c, a).catch((E) => {
+ throw (u.addIssue(n(c, E)), u);
+ }),
+ y = await Reflect.apply(i, this, f);
+ return await o._def.returns._def.type
+ .parseAsync(y, a)
+ .catch((E) => {
+ throw (u.addIssue(s(y, E)), u);
+ });
+ });
+ } else {
+ let o = this;
+ return R(function (...c) {
+ let u = o._def.args.safeParse(c, a);
+ if (!u.success) throw new C([n(c, u.error)]);
+ let f = Reflect.apply(i, this, u.data),
+ y = o._def.returns.safeParse(f, a);
+ if (!y.success) throw new C([s(f, y.error)]);
+ return y.data;
+ });
+ }
+ }
+ parameters() {
+ return this._def.args;
+ }
+ returnType() {
+ return this._def.returns;
+ }
+ args(...e) {
+ return new t({ ...this._def, args: I.create(e).rest(V.create()) });
+ }
+ returns(e) {
+ return new t({ ...this._def, returns: e });
+ }
+ implement(e) {
+ return this.parse(e);
+ }
+ strictImplement(e) {
+ return this.parse(e);
+ }
+ static create(e, r, n) {
+ return new t({
+ args: e || I.create([]).rest(V.create()),
+ returns: r || V.create(),
+ typeName: m.ZodFunction,
+ ...g(n),
+ });
+ }
+ },
+ te = class extends b {
+ get schema() {
+ return this._def.getter();
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ return this._def
+ .getter()
+ ._parse({ data: r.data, path: r.path, parent: r });
+ }
+ };
+ te.create = (t, e) => new te({ getter: t, typeName: m.ZodLazy, ...g(e) });
+ var re = class extends b {
+ _parse(e) {
+ if (e.data !== this._def.value) {
+ let r = this._getOrReturnCtx(e);
+ return (
+ l(r, {
+ received: r.data,
+ code: d.invalid_literal,
+ expected: this._def.value,
+ }),
+ v
+ );
+ }
+ return { status: "valid", value: e.data };
+ }
+ get value() {
+ return this._def.value;
+ }
+ };
+ re.create = (t, e) => new re({ value: t, typeName: m.ZodLiteral, ...g(e) });
+ function Ft(t, e) {
+ return new ne({ values: t, typeName: m.ZodEnum, ...g(e) });
+ }
+ var ne = class t extends b {
+ constructor() {
+ super(...arguments), Ne.set(this, void 0);
+ }
+ _parse(e) {
+ if (typeof e.data != "string") {
+ let r = this._getOrReturnCtx(e),
+ n = this._def.values;
+ return (
+ l(r, {
+ expected: x.joinValues(n),
+ received: r.parsedType,
+ code: d.invalid_type,
+ }),
+ v
+ );
+ }
+ if (
+ (tt(this, Ne, "f") || Ut(this, Ne, new Set(this._def.values), "f"),
+ !tt(this, Ne, "f").has(e.data))
+ ) {
+ let r = this._getOrReturnCtx(e),
+ n = this._def.values;
+ return (
+ l(r, { received: r.data, code: d.invalid_enum_value, options: n }), v
+ );
+ }
+ return R(e.data);
+ }
+ get options() {
+ return this._def.values;
+ }
+ get enum() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ get Values() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ get Enum() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ extract(e, r = this._def) {
+ return t.create(e, { ...this._def, ...r });
+ }
+ exclude(e, r = this._def) {
+ return t.create(
+ this.options.filter((n) => !e.includes(n)),
+ { ...this._def, ...r },
+ );
+ }
+ };
+ Ne = new WeakMap();
+ ne.create = Ft;
+ var se = class extends b {
+ constructor() {
+ super(...arguments), Ae.set(this, void 0);
+ }
+ _parse(e) {
+ let r = x.getValidEnumValues(this._def.values),
+ n = this._getOrReturnCtx(e);
+ if (n.parsedType !== p.string && n.parsedType !== p.number) {
+ let s = x.objectValues(r);
+ return (
+ l(n, {
+ expected: x.joinValues(s),
+ received: n.parsedType,
+ code: d.invalid_type,
+ }),
+ v
+ );
+ }
+ if (
+ (tt(this, Ae, "f") ||
+ Ut(this, Ae, new Set(x.getValidEnumValues(this._def.values)), "f"),
+ !tt(this, Ae, "f").has(e.data))
+ ) {
+ let s = x.objectValues(r);
+ return (
+ l(n, { received: n.data, code: d.invalid_enum_value, options: s }), v
+ );
+ }
+ return R(e.data);
+ }
+ get enum() {
+ return this._def.values;
+ }
+ };
+ Ae = new WeakMap();
+ se.create = (t, e) =>
+ new se({ values: t, typeName: m.ZodNativeEnum, ...g(e) });
+ var W = class extends b {
+ unwrap() {
+ return this._def.type;
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.promise && r.common.async === !1)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.promise,
+ received: r.parsedType,
+ }),
+ v
+ );
+ let n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
+ return R(
+ n.then((s) =>
+ this._def.type.parseAsync(s, {
+ path: r.path,
+ errorMap: r.common.contextualErrorMap,
+ }),
+ ),
+ );
+ }
+ };
+ W.create = (t, e) => new W({ type: t, typeName: m.ZodPromise, ...g(e) });
+ var N = class extends b {
+ innerType() {
+ return this._def.schema;
+ }
+ sourceType() {
+ return this._def.schema._def.typeName === m.ZodEffects
+ ? this._def.schema.sourceType()
+ : this._def.schema;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e),
+ s = this._def.effect || null,
+ a = {
+ addIssue: (i) => {
+ l(n, i), i.fatal ? r.abort() : r.dirty();
+ },
+ get path() {
+ return n.path;
+ },
+ };
+ if (((a.addIssue = a.addIssue.bind(a)), s.type === "preprocess")) {
+ let i = s.transform(n.data, a);
+ if (n.common.async)
+ return Promise.resolve(i).then(async (o) => {
+ if (r.value === "aborted") return v;
+ let c = await this._def.schema._parseAsync({
+ data: o,
+ path: n.path,
+ parent: n,
+ });
+ return c.status === "aborted"
+ ? v
+ : c.status === "dirty" || r.value === "dirty"
+ ? de(c.value)
+ : c;
+ });
+ {
+ if (r.value === "aborted") return v;
+ let o = this._def.schema._parseSync({
+ data: i,
+ path: n.path,
+ parent: n,
+ });
+ return o.status === "aborted"
+ ? v
+ : o.status === "dirty" || r.value === "dirty"
+ ? de(o.value)
+ : o;
+ }
+ }
+ if (s.type === "refinement") {
+ let i = (o) => {
+ let c = s.refinement(o, a);
+ if (n.common.async) return Promise.resolve(c);
+ if (c instanceof Promise)
+ throw new Error(
+ "Async refinement encountered during synchronous parse operation. Use .parseAsync instead.",
+ );
+ return o;
+ };
+ if (n.common.async === !1) {
+ let o = this._def.schema._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return o.status === "aborted"
+ ? v
+ : (o.status === "dirty" && r.dirty(),
+ i(o.value),
+ { status: r.value, value: o.value });
+ } else
+ return this._def.schema
+ ._parseAsync({ data: n.data, path: n.path, parent: n })
+ .then((o) =>
+ o.status === "aborted"
+ ? v
+ : (o.status === "dirty" && r.dirty(),
+ i(o.value).then(() => ({ status: r.value, value: o.value }))),
+ );
+ }
+ if (s.type === "transform")
+ if (n.common.async === !1) {
+ let i = this._def.schema._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ if (!Me(i)) return i;
+ let o = s.transform(i.value, a);
+ if (o instanceof Promise)
+ throw new Error(
+ "Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.",
+ );
+ return { status: r.value, value: o };
+ } else
+ return this._def.schema
+ ._parseAsync({ data: n.data, path: n.path, parent: n })
+ .then((i) =>
+ Me(i)
+ ? Promise.resolve(s.transform(i.value, a)).then((o) => ({
+ status: r.value,
+ value: o,
+ }))
+ : i,
+ );
+ x.assertNever(s);
+ }
+ };
+ N.create = (t, e, r) =>
+ new N({ schema: t, typeName: m.ZodEffects, effect: e, ...g(r) });
+ N.createWithPreprocess = (t, e, r) =>
+ new N({
+ schema: e,
+ effect: { type: "preprocess", transform: t },
+ typeName: m.ZodEffects,
+ ...g(r),
+ });
+ var A = class extends b {
+ _parse(e) {
+ return this._getType(e) === p.undefined
+ ? R(void 0)
+ : this._def.innerType._parse(e);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ A.create = (t, e) =>
+ new A({ innerType: t, typeName: m.ZodOptional, ...g(e) });
+ var L = class extends b {
+ _parse(e) {
+ return this._getType(e) === p.null
+ ? R(null)
+ : this._def.innerType._parse(e);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ L.create = (t, e) =>
+ new L({ innerType: t, typeName: m.ZodNullable, ...g(e) });
+ var ae = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = r.data;
+ return (
+ r.parsedType === p.undefined && (n = this._def.defaultValue()),
+ this._def.innerType._parse({ data: n, path: r.path, parent: r })
+ );
+ }
+ removeDefault() {
+ return this._def.innerType;
+ }
+ };
+ ae.create = (t, e) =>
+ new ae({
+ innerType: t,
+ typeName: m.ZodDefault,
+ defaultValue:
+ typeof e.default == "function" ? e.default : () => e.default,
+ ...g(e),
+ });
+ var ie = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = { ...r, common: { ...r.common, issues: [] } },
+ s = this._def.innerType._parse({
+ data: n.data,
+ path: n.path,
+ parent: { ...n },
+ });
+ return Ze(s)
+ ? s.then((a) => ({
+ status: "valid",
+ value:
+ a.status === "valid"
+ ? a.value
+ : this._def.catchValue({
+ get error() {
+ return new C(n.common.issues);
+ },
+ input: n.data,
+ }),
+ }))
+ : {
+ status: "valid",
+ value:
+ s.status === "valid"
+ ? s.value
+ : this._def.catchValue({
+ get error() {
+ return new C(n.common.issues);
+ },
+ input: n.data,
+ }),
+ };
+ }
+ removeCatch() {
+ return this._def.innerType;
+ }
+ };
+ ie.create = (t, e) =>
+ new ie({
+ innerType: t,
+ typeName: m.ZodCatch,
+ catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
+ ...g(e),
+ });
+ var ve = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.nan) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.nan,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return { status: "valid", value: e.data };
+ }
+ };
+ ve.create = (t) => new ve({ typeName: m.ZodNaN, ...g(t) });
+ var Yr = Symbol("zod_brand"),
+ Ie = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = r.data;
+ return this._def.type._parse({ data: n, path: r.path, parent: r });
+ }
+ unwrap() {
+ return this._def.type;
+ }
+ },
+ Le = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.common.async)
+ return (async () => {
+ let a = await this._def.in._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return a.status === "aborted"
+ ? v
+ : a.status === "dirty"
+ ? (r.dirty(), de(a.value))
+ : this._def.out._parseAsync({
+ data: a.value,
+ path: n.path,
+ parent: n,
+ });
+ })();
+ {
+ let s = this._def.in._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return s.status === "aborted"
+ ? v
+ : s.status === "dirty"
+ ? (r.dirty(), { status: "dirty", value: s.value })
+ : this._def.out._parseSync({
+ data: s.value,
+ path: n.path,
+ parent: n,
+ });
+ }
+ }
+ static create(e, r) {
+ return new t({ in: e, out: r, typeName: m.ZodPipeline });
+ }
+ },
+ oe = class extends b {
+ _parse(e) {
+ let r = this._def.innerType._parse(e),
+ n = (s) => (Me(s) && (s.value = Object.freeze(s.value)), s);
+ return Ze(r) ? r.then((s) => n(s)) : n(r);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ oe.create = (t, e) =>
+ new oe({ innerType: t, typeName: m.ZodReadonly, ...g(e) });
+ function Jt(t, e = {}, r) {
+ return t
+ ? q.create().superRefine((n, s) => {
+ var a, i;
+ if (!t(n)) {
+ let o =
+ typeof e == "function"
+ ? e(n)
+ : typeof e == "string"
+ ? { message: e }
+ : e,
+ c =
+ (i = (a = o.fatal) !== null && a !== void 0 ? a : r) !== null &&
+ i !== void 0
+ ? i
+ : !0,
+ u = typeof o == "string" ? { message: o } : o;
+ s.addIssue({ code: "custom", ...u, fatal: c });
+ }
+ })
+ : q.create();
+ }
+ var Gr = { object: P.lazycreate },
+ m;
+ (function (t) {
+ (t.ZodString = "ZodString"),
+ (t.ZodNumber = "ZodNumber"),
+ (t.ZodNaN = "ZodNaN"),
+ (t.ZodBigInt = "ZodBigInt"),
+ (t.ZodBoolean = "ZodBoolean"),
+ (t.ZodDate = "ZodDate"),
+ (t.ZodSymbol = "ZodSymbol"),
+ (t.ZodUndefined = "ZodUndefined"),
+ (t.ZodNull = "ZodNull"),
+ (t.ZodAny = "ZodAny"),
+ (t.ZodUnknown = "ZodUnknown"),
+ (t.ZodNever = "ZodNever"),
+ (t.ZodVoid = "ZodVoid"),
+ (t.ZodArray = "ZodArray"),
+ (t.ZodObject = "ZodObject"),
+ (t.ZodUnion = "ZodUnion"),
+ (t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion"),
+ (t.ZodIntersection = "ZodIntersection"),
+ (t.ZodTuple = "ZodTuple"),
+ (t.ZodRecord = "ZodRecord"),
+ (t.ZodMap = "ZodMap"),
+ (t.ZodSet = "ZodSet"),
+ (t.ZodFunction = "ZodFunction"),
+ (t.ZodLazy = "ZodLazy"),
+ (t.ZodLiteral = "ZodLiteral"),
+ (t.ZodEnum = "ZodEnum"),
+ (t.ZodEffects = "ZodEffects"),
+ (t.ZodNativeEnum = "ZodNativeEnum"),
+ (t.ZodOptional = "ZodOptional"),
+ (t.ZodNullable = "ZodNullable"),
+ (t.ZodDefault = "ZodDefault"),
+ (t.ZodCatch = "ZodCatch"),
+ (t.ZodPromise = "ZodPromise"),
+ (t.ZodBranded = "ZodBranded"),
+ (t.ZodPipeline = "ZodPipeline"),
+ (t.ZodReadonly = "ZodReadonly");
+ })(m || (m = {}));
+ var Kr = (t, e = { message: `Input not instance of ${t.name}` }) =>
+ Jt((r) => r instanceof t, e),
+ Yt = U.create,
+ Gt = F.create,
+ Xr = ve.create,
+ Qr = J.create,
+ Kt = Y.create,
+ en = G.create,
+ tn = fe.create,
+ rn = K.create,
+ nn = X.create,
+ sn = q.create,
+ an = V.create,
+ on = Z.create,
+ cn = pe.create,
+ un = D.create,
+ dn = P.create,
+ ln = P.strictCreate,
+ fn = Q.create,
+ pn = rt.create,
+ hn = ee.create,
+ mn = I.create,
+ vn = nt.create,
+ yn = he.create,
+ gn = me.create,
+ bn = st.create,
+ _n = te.create,
+ xn = re.create,
+ wn = ne.create,
+ kn = se.create,
+ Tn = W.create,
+ zt = N.create,
+ En = A.create,
+ On = L.create,
+ jn = N.createWithPreprocess,
+ Rn = Le.create,
+ Sn = () => Yt().optional(),
+ Pn = () => Gt().optional(),
+ Cn = () => Kt().optional(),
+ Nn = {
+ string: (t) => U.create({ ...t, coerce: !0 }),
+ number: (t) => F.create({ ...t, coerce: !0 }),
+ boolean: (t) => Y.create({ ...t, coerce: !0 }),
+ bigint: (t) => J.create({ ...t, coerce: !0 }),
+ date: (t) => G.create({ ...t, coerce: !0 }),
+ },
+ An = v,
+ _ = Object.freeze({
+ __proto__: null,
+ defaultErrorMap: le,
+ setErrorMap: Nr,
+ getErrorMap: Qe,
+ makeIssue: et,
+ EMPTY_PATH: Ar,
+ addIssueToContext: l,
+ ParseStatus: T,
+ INVALID: v,
+ DIRTY: de,
+ OK: R,
+ isAborted: pt,
+ isDirty: ht,
+ isValid: Me,
+ isAsync: Ze,
+ get util() {
+ return x;
+ },
+ get objectUtil() {
+ return ft;
+ },
+ ZodParsedType: p,
+ getParsedType: B,
+ ZodType: b,
+ datetimeRegex: Ht,
+ ZodString: U,
+ ZodNumber: F,
+ ZodBigInt: J,
+ ZodBoolean: Y,
+ ZodDate: G,
+ ZodSymbol: fe,
+ ZodUndefined: K,
+ ZodNull: X,
+ ZodAny: q,
+ ZodUnknown: V,
+ ZodNever: Z,
+ ZodVoid: pe,
+ ZodArray: D,
+ ZodObject: P,
+ ZodUnion: Q,
+ ZodDiscriminatedUnion: rt,
+ ZodIntersection: ee,
+ ZodTuple: I,
+ ZodRecord: nt,
+ ZodMap: he,
+ ZodSet: me,
+ ZodFunction: st,
+ ZodLazy: te,
+ ZodLiteral: re,
+ ZodEnum: ne,
+ ZodNativeEnum: se,
+ ZodPromise: W,
+ ZodEffects: N,
+ ZodTransformer: N,
+ ZodOptional: A,
+ ZodNullable: L,
+ ZodDefault: ae,
+ ZodCatch: ie,
+ ZodNaN: ve,
+ BRAND: Yr,
+ ZodBranded: Ie,
+ ZodPipeline: Le,
+ ZodReadonly: oe,
+ custom: Jt,
+ Schema: b,
+ ZodSchema: b,
+ late: Gr,
+ get ZodFirstPartyTypeKind() {
+ return m;
+ },
+ coerce: Nn,
+ any: sn,
+ array: un,
+ bigint: Qr,
+ boolean: Kt,
+ date: en,
+ discriminatedUnion: pn,
+ effect: zt,
+ enum: wn,
+ function: bn,
+ instanceof: Kr,
+ intersection: hn,
+ lazy: _n,
+ literal: xn,
+ map: yn,
+ nan: Xr,
+ nativeEnum: kn,
+ never: on,
+ null: nn,
+ nullable: On,
+ number: Gt,
+ object: dn,
+ oboolean: Cn,
+ onumber: Pn,
+ optional: En,
+ ostring: Sn,
+ pipeline: Rn,
+ preprocess: jn,
+ promise: Tn,
+ record: vn,
+ set: gn,
+ strictObject: ln,
+ string: Yt,
+ symbol: tn,
+ transformer: zt,
+ tuple: mn,
+ undefined: rn,
+ union: fn,
+ unknown: an,
+ void: cn,
+ NEVER: An,
+ ZodIssueCode: d,
+ quotelessJson: Cr,
+ ZodError: C,
+ });
+ var vt = _.object({ url: _.string(), token: _.string() }),
+ Mn = _.object({
+ header: _.string(),
+ payload: _.string(),
+ signature: _.string(),
+ }),
+ Zn = _.object({
+ fid: _.number(),
+ type: _.literal("app_key"),
+ key: _.string().startsWith("0x"),
+ }),
+ Xt = _.object({
+ event: _.literal("frame-added"),
+ notificationDetails: vt.optional(),
+ }),
+ Qt = _.object({ event: _.literal("frame-removed") }),
+ er = _.object({
+ event: _.literal("notifications-enabled"),
+ notificationDetails: vt.required(),
+ }),
+ tr = _.object({ event: _.literal("notifications-disabled") }),
+ In = _.discriminatedUnion("event", [Xt, Qt, er, tr]),
+ Ln = _.object({
+ notificationId: _.string().uuid(),
+ title: _.string().max(32),
+ body: _.string().max(128),
+ targetUrl: _.string().max(256),
+ tokens: _.string().array().max(100),
+ }),
+ $n = _.object({
+ result: _.object({
+ successfulTokens: _.array(_.string()),
+ invalidTokens: _.array(_.string()),
+ rateLimitedTokens: _.array(_.string()),
+ }),
+ });
+ var Vn = dt;
+ return ur(Dn);
+ })();
+ /*! Bundled license information:
- // Export to global scope
- global.frame = frame.init();
-
- })(typeof window !== 'undefined' ? window : global);
+ comlink/dist/esm/comlink.mjs:
+ (**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *)
+ */
+ //# sourceMappingURL=index.min.js.map
jframe.parsers
Changed around line 1
+ jframeMetaTagsParser
+ cueFromId
+ extends metaTagsParser
+ javascript
+ buildHtml() {
+ const jframe = ``
+ return super.buildHtml().replace("", jframe + "")
+ }
splash.png
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated boom.scroll
boom.scroll
Changed around line 1
+ buildHtml
+
+ sdk.js
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created boom.scroll
boom.scroll
root
root
1 month ago
Deleted boom.html
boom.html
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated boom.html
boom.html
Changed around line 0
-
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated sdk.js
sdk.js
Changed around line 1
+ "use strict";
+ var frame = (() => {
+ var rr = Object.create;
+ var $e = Object.defineProperty;
+ var nr = Object.getOwnPropertyDescriptor;
+ var sr = Object.getOwnPropertyNames;
+ var ar = Object.getPrototypeOf,
+ ir = Object.prototype.hasOwnProperty;
+ var or = (t, e) => () => (
+ e || t((e = { exports: {} }).exports, e), e.exports
+ ),
+ at = (t, e) => {
+ for (var r in e) $e(t, r, { get: e[r], enumerable: !0 });
+ },
+ yt = (t, e, r, n) => {
+ if ((e && typeof e == "object") || typeof e == "function")
+ for (let s of sr(e))
+ !ir.call(t, s) &&
+ s !== r &&
+ $e(t, s, {
+ get: () => e[s],
+ enumerable: !(n = nr(e, s)) || n.enumerable,
+ });
+ return t;
+ };
+ var cr = (t, e, r) => (
+ (r = t != null ? rr(ar(t)) : {}),
+ yt(
+ e || !t || !t.__esModule
+ ? $e(r, "default", { value: t, enumerable: !0 })
+ : r,
+ t,
+ )
+ ),
+ ur = (t) => yt($e({}, "__esModule", { value: !0 }), t);
+ var bt = or((Bn, it) => {
+ "use strict";
+ var dr = Object.prototype.hasOwnProperty,
+ O = "~";
+ function ye() {}
+ Object.create &&
+ ((ye.prototype = Object.create(null)), new ye().__proto__ || (O = !1));
+ function lr(t, e, r) {
+ (this.fn = t), (this.context = e), (this.once = r || !1);
+ }
+ function gt(t, e, r, n, s) {
+ if (typeof r != "function")
+ throw new TypeError("The listener must be a function");
+ var a = new lr(r, n || t, s),
+ i = O ? O + e : e;
+ return (
+ t._events[i]
+ ? t._events[i].fn
+ ? (t._events[i] = [t._events[i], a])
+ : t._events[i].push(a)
+ : ((t._events[i] = a), t._eventsCount++),
+ t
+ );
+ }
+ function Ve(t, e) {
+ --t._eventsCount === 0 ? (t._events = new ye()) : delete t._events[e];
+ }
+ function k() {
+ (this._events = new ye()), (this._eventsCount = 0);
+ }
+ k.prototype.eventNames = function () {
+ var e = [],
+ r,
+ n;
+ if (this._eventsCount === 0) return e;
+ for (n in (r = this._events)) dr.call(r, n) && e.push(O ? n.slice(1) : n);
+ return Object.getOwnPropertySymbols
+ ? e.concat(Object.getOwnPropertySymbols(r))
+ : e;
+ };
+ k.prototype.listeners = function (e) {
+ var r = O ? O + e : e,
+ n = this._events[r];
+ if (!n) return [];
+ if (n.fn) return [n.fn];
+ for (var s = 0, a = n.length, i = new Array(a); s < a; s++)
+ i[s] = n[s].fn;
+ return i;
+ };
+ k.prototype.listenerCount = function (e) {
+ var r = O ? O + e : e,
+ n = this._events[r];
+ return n ? (n.fn ? 1 : n.length) : 0;
+ };
+ k.prototype.emit = function (e, r, n, s, a, i) {
+ var o = O ? O + e : e;
+ if (!this._events[o]) return !1;
+ var c = this._events[o],
+ u = arguments.length,
+ f,
+ y;
+ if (c.fn) {
+ switch ((c.once && this.removeListener(e, c.fn, void 0, !0), u)) {
+ case 1:
+ return c.fn.call(c.context), !0;
+ case 2:
+ return c.fn.call(c.context, r), !0;
+ case 3:
+ return c.fn.call(c.context, r, n), !0;
+ case 4:
+ return c.fn.call(c.context, r, n, s), !0;
+ case 5:
+ return c.fn.call(c.context, r, n, s, a), !0;
+ case 6:
+ return c.fn.call(c.context, r, n, s, a, i), !0;
+ }
+ for (y = 1, f = new Array(u - 1); y < u; y++) f[y - 1] = arguments[y];
+ c.fn.apply(c.context, f);
+ } else {
+ var w = c.length,
+ E;
+ for (y = 0; y < w; y++)
+ switch (
+ (c[y].once && this.removeListener(e, c[y].fn, void 0, !0), u)
+ ) {
+ case 1:
+ c[y].fn.call(c[y].context);
+ break;
+ case 2:
+ c[y].fn.call(c[y].context, r);
+ break;
+ case 3:
+ c[y].fn.call(c[y].context, r, n);
+ break;
+ case 4:
+ c[y].fn.call(c[y].context, r, n, s);
+ break;
+ default:
+ if (!f)
+ for (E = 1, f = new Array(u - 1); E < u; E++)
+ f[E - 1] = arguments[E];
+ c[y].fn.apply(c[y].context, f);
+ }
+ }
+ return !0;
+ };
+ k.prototype.on = function (e, r, n) {
+ return gt(this, e, r, n, !1);
+ };
+ k.prototype.once = function (e, r, n) {
+ return gt(this, e, r, n, !0);
+ };
+ k.prototype.removeListener = function (e, r, n, s) {
+ var a = O ? O + e : e;
+ if (!this._events[a]) return this;
+ if (!r) return Ve(this, a), this;
+ var i = this._events[a];
+ if (i.fn)
+ i.fn === r && (!s || i.once) && (!n || i.context === n) && Ve(this, a);
+ else {
+ for (var o = 0, c = [], u = i.length; o < u; o++)
+ (i[o].fn !== r || (s && !i[o].once) || (n && i[o].context !== n)) &&
+ c.push(i[o]);
+ c.length ? (this._events[a] = c.length === 1 ? c[0] : c) : Ve(this, a);
+ }
+ return this;
+ };
+ k.prototype.removeAllListeners = function (e) {
+ var r;
+ return (
+ e
+ ? ((r = O ? O + e : e), this._events[r] && Ve(this, r))
+ : ((this._events = new ye()), (this._eventsCount = 0)),
+ this
+ );
+ };
+ k.prototype.off = k.prototype.removeListener;
+ k.prototype.addListener = k.prototype.on;
+ k.prefixed = O;
+ k.EventEmitter = k;
+ typeof it < "u" && (it.exports = k);
+ });
+ var Dn = {};
+ at(Dn, {
+ createEmitter: () => $t,
+ default: () => Vn,
+ eventFrameAddedPayloadSchema: () => Xt,
+ eventFrameRemovedPayloadSchema: () => Qt,
+ eventHeaderSchema: () => Zn,
+ eventNotificationsEnabledPayloadSchema: () => er,
+ eventPayloadSchema: () => In,
+ eventSchema: () => Mn,
+ notificationDetailsSchema: () => vt,
+ notificationsDisabledPayloadSchema: () => tr,
+ sdk: () => dt,
+ sendNotificationRequestSchema: () => Ln,
+ sendNotificationResponseSchema: () => $n,
+ });
+ var ge = cr(bt(), 1);
+ var xt = Symbol("Comlink.proxy"),
+ fr = Symbol("Comlink.endpoint"),
+ pr = Symbol("Comlink.releaseProxy"),
+ ot = Symbol("Comlink.finalizer"),
+ ze = Symbol("Comlink.thrown"),
+ wt = (t) => (typeof t == "object" && t !== null) || typeof t == "function",
+ hr = {
+ canHandle: (t) => wt(t) && t[xt],
+ serialize(t) {
+ let { port1: e, port2: r } = new MessageChannel();
+ return Tt(t, e), [r, [r]];
+ },
+ deserialize(t) {
+ return t.start(), ut(t);
+ },
+ },
+ mr = {
+ canHandle: (t) => wt(t) && ze in t,
+ serialize({ value: t }) {
+ let e;
+ return (
+ t instanceof Error
+ ? (e = {
+ isError: !0,
+ value: { message: t.message, name: t.name, stack: t.stack },
+ })
+ : (e = { isError: !1, value: t }),
+ [e, []]
+ );
+ },
+ deserialize(t) {
+ throw t.isError
+ ? Object.assign(new Error(t.value.message), t.value)
+ : t.value;
+ },
+ },
+ kt = new Map([
+ ["proxy", hr],
+ ["throw", mr],
+ ]);
+ function vr(t, e) {
+ for (let r of t)
+ if (e === r || r === "*" || (r instanceof RegExp && r.test(e))) return !0;
+ return !1;
+ }
+ function Tt(t, e = globalThis, r = ["*"]) {
+ e.addEventListener("message", function n(s) {
+ if (!s || !s.data) return;
+ if (!vr(r, s.origin)) {
+ console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
+ return;
+ }
+ let { id: a, type: i, path: o } = Object.assign({ path: [] }, s.data),
+ c = (s.data.argumentList || []).map(H),
+ u;
+ try {
+ let f = o.slice(0, -1).reduce((w, E) => w[E], t),
+ y = o.reduce((w, E) => w[E], t);
+ switch (i) {
+ case "GET":
+ u = y;
+ break;
+ case "SET":
+ (f[o.slice(-1)[0]] = H(s.data.value)), (u = !0);
+ break;
+ case "APPLY":
+ u = y.apply(f, c);
+ break;
+ case "CONSTRUCT":
+ {
+ let w = new y(...c);
+ u = wr(w);
+ }
+ break;
+ case "ENDPOINT":
+ {
+ let { port1: w, port2: E } = new MessageChannel();
+ Tt(t, E), (u = xr(w, [w]));
+ }
+ break;
+ case "RELEASE":
+ u = void 0;
+ break;
+ default:
+ return;
+ }
+ } catch (f) {
+ u = { value: f, [ze]: 0 };
+ }
+ Promise.resolve(u)
+ .catch((f) => ({ value: f, [ze]: 0 }))
+ .then((f) => {
+ let [y, w] = qe(f);
+ e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w),
+ i === "RELEASE" &&
+ (e.removeEventListener("message", n),
+ Et(e),
+ ot in t && typeof t[ot] == "function" && t[ot]());
+ })
+ .catch((f) => {
+ let [y, w] = qe({
+ value: new TypeError("Unserializable return value"),
+ [ze]: 0,
+ });
+ e.postMessage(Object.assign(Object.assign({}, y), { id: a }), w);
+ });
+ }),
+ e.start && e.start();
+ }
+ function yr(t) {
+ return t.constructor.name === "MessagePort";
+ }
+ function Et(t) {
+ yr(t) && t.close();
+ }
+ function ut(t, e) {
+ let r = new Map();
+ return (
+ t.addEventListener("message", function (s) {
+ let { data: a } = s;
+ if (!a || !a.id) return;
+ let i = r.get(a.id);
+ if (i)
+ try {
+ i(a);
+ } finally {
+ r.delete(a.id);
+ }
+ }),
+ ct(t, r, [], e)
+ );
+ }
+ function De(t) {
+ if (t) throw new Error("Proxy has been released and is not useable");
+ }
+ function Ot(t) {
+ return ce(t, new Map(), { type: "RELEASE" }).then(() => {
+ Et(t);
+ });
+ }
+ var Be = new WeakMap(),
+ Ue =
+ "FinalizationRegistry" in globalThis &&
+ new FinalizationRegistry((t) => {
+ let e = (Be.get(t) || 0) - 1;
+ Be.set(t, e), e === 0 && Ot(t);
+ });
+ function gr(t, e) {
+ let r = (Be.get(e) || 0) + 1;
+ Be.set(e, r), Ue && Ue.register(t, e, t);
+ }
+ function br(t) {
+ Ue && Ue.unregister(t);
+ }
+ function ct(t, e, r = [], n = function () {}) {
+ let s = !1,
+ a = new Proxy(n, {
+ get(i, o) {
+ if ((De(s), o === pr))
+ return () => {
+ br(a), Ot(t), e.clear(), (s = !0);
+ };
+ if (o === "then") {
+ if (r.length === 0) return { then: () => a };
+ let c = ce(t, e, {
+ type: "GET",
+ path: r.map((u) => u.toString()),
+ }).then(H);
+ return c.then.bind(c);
+ }
+ return ct(t, e, [...r, o]);
+ },
+ set(i, o, c) {
+ De(s);
+ let [u, f] = qe(c);
+ return ce(
+ t,
+ e,
+ { type: "SET", path: [...r, o].map((y) => y.toString()), value: u },
+ f,
+ ).then(H);
+ },
+ apply(i, o, c) {
+ De(s);
+ let u = r[r.length - 1];
+ if (u === fr) return ce(t, e, { type: "ENDPOINT" }).then(H);
+ if (u === "bind") return ct(t, e, r.slice(0, -1));
+ let [f, y] = _t(c);
+ return ce(
+ t,
+ e,
+ {
+ type: "APPLY",
+ path: r.map((w) => w.toString()),
+ argumentList: f,
+ },
+ y,
+ ).then(H);
+ },
+ construct(i, o) {
+ De(s);
+ let [c, u] = _t(o);
+ return ce(
+ t,
+ e,
+ {
+ type: "CONSTRUCT",
+ path: r.map((f) => f.toString()),
+ argumentList: c,
+ },
+ u,
+ ).then(H);
+ },
+ });
+ return gr(a, t), a;
+ }
+ function _r(t) {
+ return Array.prototype.concat.apply([], t);
+ }
+ function _t(t) {
+ let e = t.map(qe);
+ return [e.map((r) => r[0]), _r(e.map((r) => r[1]))];
+ }
+ var jt = new WeakMap();
+ function xr(t, e) {
+ return jt.set(t, e), t;
+ }
+ function wr(t) {
+ return Object.assign(t, { [xt]: !0 });
+ }
+ function Rt(t, e = globalThis, r = "*") {
+ return {
+ postMessage: (n, s) => t.postMessage(n, r, s),
+ addEventListener: e.addEventListener.bind(e),
+ removeEventListener: e.removeEventListener.bind(e),
+ };
+ }
+ function qe(t) {
+ for (let [e, r] of kt)
+ if (r.canHandle(t)) {
+ let [n, s] = r.serialize(t);
+ return [{ type: "HANDLER", name: e, value: n }, s];
+ }
+ return [{ type: "RAW", value: t }, jt.get(t) || []];
+ }
+ function H(t) {
+ switch (t.type) {
+ case "HANDLER":
+ return kt.get(t.name).deserialize(t.value);
+ case "RAW":
+ return t.value;
+ }
+ }
+ function ce(t, e, r, n) {
+ return new Promise((s) => {
+ let a = kr();
+ e.set(a, s),
+ t.start && t.start(),
+ t.postMessage(Object.assign({ id: a }, r), n);
+ });
+ }
+ function kr() {
+ return new Array(4)
+ .fill(0)
+ .map(() =>
+ Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16),
+ )
+ .join("-");
+ }
+ var Tr = {
+ postMessage() {},
+ addEventListener: () => {},
+ removeEventListener: () => {},
+ },
+ Er = {
+ postMessage: (t) => {
+ console.debug("[webview:req]", t),
+ window.ReactNativeWebView.postMessage(JSON.stringify(t));
+ },
+ addEventListener: (t, e, ...r) => {
+ document.addEventListener("FarcasterFrameCallback", e, ...r);
+ },
+ removeEventListener: (t, e) => {
+ document.removeEventListener("FarcasterFrameCallback", e);
+ },
+ },
+ St =
+ typeof window > "u"
+ ? Tr
+ : window?.ReactNativeWebView
+ ? Er
+ : Rt(window?.parent ?? window);
+ var S = ut(St);
+ var Pt = "0.1.1";
+ function Ct() {
+ return Pt;
+ }
+ var We = class t extends Error {
+ constructor(e, r = {}) {
+ let n = (() => {
+ if (r.cause instanceof t) {
+ if (r.cause.details) return r.cause.details;
+ if (r.cause.shortMessage) return r.cause.shortMessage;
+ }
+ return r.cause?.message ? r.cause.message : r.details;
+ })(),
+ s = (r.cause instanceof t && r.cause.docsPath) || r.docsPath,
+ i = `https://oxlib.sh${s ?? ""}`,
+ o = [
+ e || "An error occurred.",
+ ...(r.metaMessages ? ["", ...r.metaMessages] : []),
+ ...(n || s
+ ? ["", n ? `Details: ${n}` : void 0, s ? `See: ${i}` : void 0]
+ : []),
+ ].filter((c) => typeof c == "string").join(`
+ `);
+ super(o, r.cause ? { cause: r.cause } : void 0),
+ Object.defineProperty(this, "details", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "docs", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "docsPath", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "shortMessage", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "cause", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "BaseError",
+ }),
+ Object.defineProperty(this, "version", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: `ox@${Ct()}`,
+ }),
+ (this.cause = r.cause),
+ (this.details = n),
+ (this.docs = i),
+ (this.docsPath = s),
+ (this.shortMessage = e);
+ }
+ walk(e) {
+ return Nt(this, e);
+ }
+ };
+ function Nt(t, e) {
+ return e?.(t)
+ ? t
+ : t && typeof t == "object" && "cause" in t && t.cause
+ ? Nt(t.cause, e)
+ : e
+ ? null
+ : t;
+ }
+ var Ce = {};
+ at(Ce, {
+ ChainDisconnectedError: () => Ge,
+ DisconnectedError: () => Ye,
+ IsUndefinedError: () => Ke,
+ ProviderRpcError: () => z,
+ UnauthorizedError: () => Fe,
+ UnsupportedMethodError: () => Je,
+ UserRejectedRequestError: () => He,
+ createEmitter: () => Or,
+ from: () => jr,
+ });
+ function Mt(t, e = {}) {
+ let { raw: r = !1 } = e,
+ n = t;
+ if (r) return t;
+ if (n.error) {
+ let { code: s } = n.error,
+ a =
+ s === Se.code
+ ? Se
+ : s === be.code
+ ? be
+ : s === Re.code
+ ? Re
+ : s === Oe.code
+ ? Oe
+ : s === Te.code
+ ? Te
+ : s === je.code
+ ? je
+ : s === ke.code
+ ? ke
+ : s === Pe.code
+ ? Pe
+ : s === _e.code
+ ? _e
+ : s === xe.code
+ ? xe
+ : s === we.code
+ ? we
+ : s === Ee.code
+ ? Ee
+ : j;
+ throw new a(n.error);
+ }
+ return n.result;
+ }
+ var j = class extends Error {
+ constructor(e) {
+ let { code: r, message: n, data: s } = e;
+ super(n),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.BaseError",
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "data", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ (this.code = r),
+ (this.data = s);
+ }
+ },
+ be = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Missing or invalid parameters.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32e3,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidInputError",
+ });
+ }
+ };
+ Object.defineProperty(be, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32e3,
+ });
+ var _e = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Requested resource not found.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32001,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ResourceNotFoundError",
+ });
+ }
+ };
+ Object.defineProperty(_e, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32001,
+ });
+ var xe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Requested resource not available.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32002,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ResourceUnavailableError",
+ });
+ }
+ };
+ Object.defineProperty(xe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32002,
+ });
+ var we = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Transaction creation failed.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32003,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.TransactionRejectedError",
+ });
+ }
+ };
+ Object.defineProperty(we, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32003,
+ });
+ var ke = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Method is not implemented.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32004,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.MethodNotSupportedError",
+ });
+ }
+ };
+ Object.defineProperty(ke, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32004,
+ });
+ var Te = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Rate limit exceeded.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32005,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.LimitExceededError",
+ });
+ }
+ };
+ Object.defineProperty(Te, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32005,
+ });
+ var Ee = class t extends j {
+ constructor(e = {}) {
+ super({ message: "JSON-RPC version not supported.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32006,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.VersionNotSupportedError",
+ });
+ }
+ };
+ Object.defineProperty(Ee, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32006,
+ });
+ var Oe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Input is not a valid JSON-RPC request.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32600,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidRequestError",
+ });
+ }
+ };
+ Object.defineProperty(Oe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32600,
+ });
+ var je = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Method does not exist.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32601,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.MethodNotFoundError",
+ });
+ }
+ };
+ Object.defineProperty(je, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32601,
+ });
+ var Re = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Invalid method parameters.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32602,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InvalidParamsError",
+ });
+ }
+ };
+ Object.defineProperty(Re, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32602,
+ });
+ var Se = class t extends j {
+ constructor(e = {}) {
+ super({ message: "Internal JSON-RPC error.", ...e, code: t.code }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32603,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.InternalErrorError",
+ });
+ }
+ };
+ Object.defineProperty(Se, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32603,
+ });
+ var Pe = class t extends j {
+ constructor(e = {}) {
+ super({
+ message: "Failed to parse JSON-RPC response.",
+ ...e,
+ code: t.code,
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32700,
+ }),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "RpcResponse.ParseError",
+ });
+ }
+ };
+ Object.defineProperty(Pe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: -32700,
+ });
+ var z = class extends Error {
+ constructor(e, r) {
+ super(r),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "ProviderRpcError",
+ }),
+ Object.defineProperty(this, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ Object.defineProperty(this, "details", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: void 0,
+ }),
+ (this.code = e),
+ (this.details = r);
+ }
+ },
+ He = class extends z {
+ constructor({ message: e = "The user rejected the request." } = {}) {
+ super(4001, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UserRejectedRequestError",
+ });
+ }
+ };
+ Object.defineProperty(He, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4001,
+ });
+ var Fe = class extends z {
+ constructor({
+ message:
+ e = "The requested method and/or account has not been authorized by the user.",
+ } = {}) {
+ super(4100, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UnauthorizedError",
+ });
+ }
+ };
+ Object.defineProperty(Fe, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4100,
+ });
+ var Je = class extends z {
+ constructor({
+ message: e = "The provider does not support the requested method.",
+ } = {}) {
+ super(4200, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.UnsupportedMethodError",
+ });
+ }
+ };
+ Object.defineProperty(Je, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4200,
+ });
+ var Ye = class extends z {
+ constructor({
+ message: e = "The provider is disconnected from all chains.",
+ } = {}) {
+ super(4900, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.DisconnectedError",
+ });
+ }
+ };
+ Object.defineProperty(Ye, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4900,
+ });
+ var Ge = class extends z {
+ constructor({
+ message: e = "The provider is not connected to the requested chain.",
+ } = {}) {
+ super(4901, e),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.ChainDisconnectedError",
+ });
+ }
+ };
+ Object.defineProperty(Ge, "code", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: 4901,
+ });
+ function Or() {
+ let t = new ge.default();
+ return {
+ get eventNames() {
+ return t.eventNames.bind(t);
+ },
+ get listenerCount() {
+ return t.listenerCount.bind(t);
+ },
+ get listeners() {
+ return t.listeners.bind(t);
+ },
+ addListener: t.addListener.bind(t),
+ emit: t.emit.bind(t),
+ off: t.off.bind(t),
+ on: t.on.bind(t),
+ once: t.once.bind(t),
+ removeAllListeners: t.removeAllListeners.bind(t),
+ removeListener: t.removeListener.bind(t),
+ };
+ }
+ function jr(t, e = {}) {
+ let { includeEvents: r = !0 } = e;
+ if (!t) throw new Ke();
+ return {
+ ...(r
+ ? { on: t.on?.bind(t), removeListener: t.removeListener?.bind(t) }
+ : {}),
+ async request(n) {
+ let s = await t.request(n);
+ return s && typeof s == "object" && "jsonrpc" in s ? Mt(s) : s;
+ },
+ };
+ }
+ var Ke = class extends We {
+ constructor() {
+ super("`provider` is undefined."),
+ Object.defineProperty(this, "name", {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: "Provider.IsUndefinedError",
+ });
+ }
+ };
+ var Xe = {};
+ at(Xe, { createStore: () => Rr, from: () => It });
+ function Rr(t = {}) {
+ let e = t.id ?? 0;
+ return {
+ prepare(r) {
+ return It({ id: e++, ...r });
+ },
+ get id() {
+ return e;
+ },
+ };
+ }
+ function It(t) {
+ return { ...t, jsonrpc: "2.0" };
+ }
+ var Sr = Ce.createEmitter(),
+ Pr = Xe.createStore(),
+ Lt = Ce.from({
+ ...Sr,
+ async request(t) {
+ return await S.ethProviderRequest(Pr.prepare(t));
+ },
+ });
+ typeof document < "u" &&
+ document.addEventListener("FarcasterFrameEvent", (t) => {
+ t instanceof MessageEvent;
+ });
+ function $t() {
+ let t = new ge.default();
+ return {
+ get eventNames() {
+ return t.eventNames.bind(t);
+ },
+ get listenerCount() {
+ return t.listenerCount.bind(t);
+ },
+ get listeners() {
+ return t.listeners.bind(t);
+ },
+ addListener: t.addListener.bind(t),
+ emit: t.emit.bind(t),
+ off: t.off.bind(t),
+ on: t.on.bind(t),
+ once: t.once.bind(t),
+ removeAllListeners: t.removeAllListeners.bind(t),
+ removeListener: t.removeListener.bind(t),
+ };
+ }
+ var Vt = $t(),
+ dt = {
+ ...Vt,
+ context: S.context,
+ actions: {
+ setPrimaryButton: S.setPrimaryButton.bind(S),
+ ready: S.ready.bind(S),
+ close: S.close.bind(S),
+ openUrl: S.openUrl.bind(S),
+ addFrame: S.addFrame.bind(S),
+ },
+ wallet: { ethProvider: Lt },
+ };
+ typeof document < "u" &&
+ document.addEventListener("FarcasterFrameEvent", (t) => {
+ t instanceof MessageEvent &&
+ t.data.type === "primaryButtonClicked" &&
+ Vt.emit("primaryButtonClicked");
+ });
+ var x;
+ (function (t) {
+ t.assertEqual = (s) => s;
+ function e(s) {}
+ t.assertIs = e;
+ function r(s) {
+ throw new Error();
+ }
+ (t.assertNever = r),
+ (t.arrayToEnum = (s) => {
+ let a = {};
+ for (let i of s) a[i] = i;
+ return a;
+ }),
+ (t.getValidEnumValues = (s) => {
+ let a = t.objectKeys(s).filter((o) => typeof s[s[o]] != "number"),
+ i = {};
+ for (let o of a) i[o] = s[o];
+ return t.objectValues(i);
+ }),
+ (t.objectValues = (s) =>
+ t.objectKeys(s).map(function (a) {
+ return s[a];
+ })),
+ (t.objectKeys =
+ typeof Object.keys == "function"
+ ? (s) => Object.keys(s)
+ : (s) => {
+ let a = [];
+ for (let i in s)
+ Object.prototype.hasOwnProperty.call(s, i) && a.push(i);
+ return a;
+ }),
+ (t.find = (s, a) => {
+ for (let i of s) if (a(i)) return i;
+ }),
+ (t.isInteger =
+ typeof Number.isInteger == "function"
+ ? (s) => Number.isInteger(s)
+ : (s) => typeof s == "number" && isFinite(s) && Math.floor(s) === s);
+ function n(s, a = " | ") {
+ return s.map((i) => (typeof i == "string" ? `'${i}'` : i)).join(a);
+ }
+ (t.joinValues = n),
+ (t.jsonStringifyReplacer = (s, a) =>
+ typeof a == "bigint" ? a.toString() : a);
+ })(x || (x = {}));
+ var ft;
+ (function (t) {
+ t.mergeShapes = (e, r) => ({ ...e, ...r });
+ })(ft || (ft = {}));
+ var p = x.arrayToEnum([
+ "string",
+ "nan",
+ "number",
+ "integer",
+ "float",
+ "boolean",
+ "date",
+ "bigint",
+ "symbol",
+ "function",
+ "undefined",
+ "null",
+ "array",
+ "object",
+ "unknown",
+ "promise",
+ "void",
+ "never",
+ "map",
+ "set",
+ ]),
+ B = (t) => {
+ switch (typeof t) {
+ case "undefined":
+ return p.undefined;
+ case "string":
+ return p.string;
+ case "number":
+ return isNaN(t) ? p.nan : p.number;
+ case "boolean":
+ return p.boolean;
+ case "function":
+ return p.function;
+ case "bigint":
+ return p.bigint;
+ case "symbol":
+ return p.symbol;
+ case "object":
+ return Array.isArray(t)
+ ? p.array
+ : t === null
+ ? p.null
+ : t.then &&
+ typeof t.then == "function" &&
+ t.catch &&
+ typeof t.catch == "function"
+ ? p.promise
+ : typeof Map < "u" && t instanceof Map
+ ? p.map
+ : typeof Set < "u" && t instanceof Set
+ ? p.set
+ : typeof Date < "u" && t instanceof Date
+ ? p.date
+ : p.object;
+ default:
+ return p.unknown;
+ }
+ },
+ d = x.arrayToEnum([
+ "invalid_type",
+ "invalid_literal",
+ "custom",
+ "invalid_union",
+ "invalid_union_discriminator",
+ "invalid_enum_value",
+ "unrecognized_keys",
+ "invalid_arguments",
+ "invalid_return_type",
+ "invalid_date",
+ "invalid_string",
+ "too_small",
+ "too_big",
+ "invalid_intersection_types",
+ "not_multiple_of",
+ "not_finite",
+ ]),
+ Cr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"),
+ C = class t extends Error {
+ constructor(e) {
+ super(),
+ (this.issues = []),
+ (this.addIssue = (n) => {
+ this.issues = [...this.issues, n];
+ }),
+ (this.addIssues = (n = []) => {
+ this.issues = [...this.issues, ...n];
+ });
+ let r = new.target.prototype;
+ Object.setPrototypeOf
+ ? Object.setPrototypeOf(this, r)
+ : (this.__proto__ = r),
+ (this.name = "ZodError"),
+ (this.issues = e);
+ }
+ get errors() {
+ return this.issues;
+ }
+ format(e) {
+ let r =
+ e ||
+ function (a) {
+ return a.message;
+ },
+ n = { _errors: [] },
+ s = (a) => {
+ for (let i of a.issues)
+ if (i.code === "invalid_union") i.unionErrors.map(s);
+ else if (i.code === "invalid_return_type") s(i.returnTypeError);
+ else if (i.code === "invalid_arguments") s(i.argumentsError);
+ else if (i.path.length === 0) n._errors.push(r(i));
+ else {
+ let o = n,
+ c = 0;
+ for (; c < i.path.length; ) {
+ let u = i.path[c];
+ c === i.path.length - 1
+ ? ((o[u] = o[u] || { _errors: [] }),
+ o[u]._errors.push(r(i)))
+ : (o[u] = o[u] || { _errors: [] }),
+ (o = o[u]),
+ c++;
+ }
+ }
+ };
+ return s(this), n;
+ }
+ static assert(e) {
+ if (!(e instanceof t)) throw new Error(`Not a ZodError: ${e}`);
+ }
+ toString() {
+ return this.message;
+ }
+ get message() {
+ return JSON.stringify(this.issues, x.jsonStringifyReplacer, 2);
+ }
+ get isEmpty() {
+ return this.issues.length === 0;
+ }
+ flatten(e = (r) => r.message) {
+ let r = {},
+ n = [];
+ for (let s of this.issues)
+ s.path.length > 0
+ ? ((r[s.path[0]] = r[s.path[0]] || []), r[s.path[0]].push(e(s)))
+ : n.push(e(s));
+ return { formErrors: n, fieldErrors: r };
+ }
+ get formErrors() {
+ return this.flatten();
+ }
+ };
+ C.create = (t) => new C(t);
+ var le = (t, e) => {
+ let r;
+ switch (t.code) {
+ case d.invalid_type:
+ t.received === p.undefined
+ ? (r = "Required")
+ : (r = `Expected ${t.expected}, received ${t.received}`);
+ break;
+ case d.invalid_literal:
+ r = `Invalid literal value, expected ${JSON.stringify(t.expected, x.jsonStringifyReplacer)}`;
+ break;
+ case d.unrecognized_keys:
+ r = `Unrecognized key(s) in object: ${x.joinValues(t.keys, ", ")}`;
+ break;
+ case d.invalid_union:
+ r = "Invalid input";
+ break;
+ case d.invalid_union_discriminator:
+ r = `Invalid discriminator value. Expected ${x.joinValues(t.options)}`;
+ break;
+ case d.invalid_enum_value:
+ r = `Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;
+ break;
+ case d.invalid_arguments:
+ r = "Invalid function arguments";
+ break;
+ case d.invalid_return_type:
+ r = "Invalid function return type";
+ break;
+ case d.invalid_date:
+ r = "Invalid date";
+ break;
+ case d.invalid_string:
+ typeof t.validation == "object"
+ ? "includes" in t.validation
+ ? ((r = `Invalid input: must include "${t.validation.includes}"`),
+ typeof t.validation.position == "number" &&
+ (r = `${r} at one or more positions greater than or equal to ${t.validation.position}`))
+ : "startsWith" in t.validation
+ ? (r = `Invalid input: must start with "${t.validation.startsWith}"`)
+ : "endsWith" in t.validation
+ ? (r = `Invalid input: must end with "${t.validation.endsWith}"`)
+ : x.assertNever(t.validation)
+ : t.validation !== "regex"
+ ? (r = `Invalid ${t.validation}`)
+ : (r = "Invalid");
+ break;
+ case d.too_small:
+ t.type === "array"
+ ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)`)
+ : t.type === "string"
+ ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)`)
+ : t.type === "number"
+ ? (r = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}`)
+ : t.type === "date"
+ ? (r = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}`)
+ : (r = "Invalid input");
+ break;
+ case d.too_big:
+ t.type === "array"
+ ? (r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)`)
+ : t.type === "string"
+ ? (r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)`)
+ : t.type === "number"
+ ? (r = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
+ : t.type === "bigint"
+ ? (r = `BigInt must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}`)
+ : t.type === "date"
+ ? (r = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t.maximum))}`)
+ : (r = "Invalid input");
+ break;
+ case d.custom:
+ r = "Invalid input";
+ break;
+ case d.invalid_intersection_types:
+ r = "Intersection results could not be merged";
+ break;
+ case d.not_multiple_of:
+ r = `Number must be a multiple of ${t.multipleOf}`;
+ break;
+ case d.not_finite:
+ r = "Number must be finite";
+ break;
+ default:
+ (r = e.defaultError), x.assertNever(t);
+ }
+ return { message: r };
+ },
+ Bt = le;
+ function Nr(t) {
+ Bt = t;
+ }
+ function Qe() {
+ return Bt;
+ }
+ var et = (t) => {
+ let { data: e, path: r, errorMaps: n, issueData: s } = t,
+ a = [...r, ...(s.path || [])],
+ i = { ...s, path: a };
+ if (s.message !== void 0) return { ...s, path: a, message: s.message };
+ let o = "",
+ c = n
+ .filter((u) => !!u)
+ .slice()
+ .reverse();
+ for (let u of c) o = u(i, { data: e, defaultError: o }).message;
+ return { ...s, path: a, message: o };
+ },
+ Ar = [];
+ function l(t, e) {
+ let r = Qe(),
+ n = et({
+ issueData: e,
+ data: t.data,
+ path: t.path,
+ errorMaps: [
+ t.common.contextualErrorMap,
+ t.schemaErrorMap,
+ r,
+ r === le ? void 0 : le,
+ ].filter((s) => !!s),
+ });
+ t.common.issues.push(n);
+ }
+ var T = class t {
+ constructor() {
+ this.value = "valid";
+ }
+ dirty() {
+ this.value === "valid" && (this.value = "dirty");
+ }
+ abort() {
+ this.value !== "aborted" && (this.value = "aborted");
+ }
+ static mergeArray(e, r) {
+ let n = [];
+ for (let s of r) {
+ if (s.status === "aborted") return v;
+ s.status === "dirty" && e.dirty(), n.push(s.value);
+ }
+ return { status: e.value, value: n };
+ }
+ static async mergeObjectAsync(e, r) {
+ let n = [];
+ for (let s of r) {
+ let a = await s.key,
+ i = await s.value;
+ n.push({ key: a, value: i });
+ }
+ return t.mergeObjectSync(e, n);
+ }
+ static mergeObjectSync(e, r) {
+ let n = {};
+ for (let s of r) {
+ let { key: a, value: i } = s;
+ if (a.status === "aborted" || i.status === "aborted") return v;
+ a.status === "dirty" && e.dirty(),
+ i.status === "dirty" && e.dirty(),
+ a.value !== "__proto__" &&
+ (typeof i.value < "u" || s.alwaysSet) &&
+ (n[a.value] = i.value);
+ }
+ return { status: e.value, value: n };
+ }
+ },
+ v = Object.freeze({ status: "aborted" }),
+ de = (t) => ({ status: "dirty", value: t }),
+ R = (t) => ({ status: "valid", value: t }),
+ pt = (t) => t.status === "aborted",
+ ht = (t) => t.status === "dirty",
+ Me = (t) => t.status === "valid",
+ Ze = (t) => typeof Promise < "u" && t instanceof Promise;
+ function tt(t, e, r, n) {
+ if (r === "a" && !n)
+ throw new TypeError("Private accessor was defined without a getter");
+ if (typeof e == "function" ? t !== e || !n : !e.has(t))
+ throw new TypeError(
+ "Cannot read private member from an object whose class did not declare it",
+ );
+ return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
+ }
+ function Ut(t, e, r, n, s) {
+ if (n === "m") throw new TypeError("Private method is not writable");
+ if (n === "a" && !s)
+ throw new TypeError("Private accessor was defined without a setter");
+ if (typeof e == "function" ? t !== e || !s : !e.has(t))
+ throw new TypeError(
+ "Cannot write private member to an object whose class did not declare it",
+ );
+ return n === "a" ? s.call(t, r) : s ? (s.value = r) : e.set(t, r), r;
+ }
+ var h;
+ (function (t) {
+ (t.errToObj = (e) => (typeof e == "string" ? { message: e } : e || {})),
+ (t.toString = (e) => (typeof e == "string" ? e : e?.message));
+ })(h || (h = {}));
+ var Ne,
+ Ae,
+ M = class {
+ constructor(e, r, n, s) {
+ (this._cachedPath = []),
+ (this.parent = e),
+ (this.data = r),
+ (this._path = n),
+ (this._key = s);
+ }
+ get path() {
+ return (
+ this._cachedPath.length ||
+ (this._key instanceof Array
+ ? this._cachedPath.push(...this._path, ...this._key)
+ : this._cachedPath.push(...this._path, this._key)),
+ this._cachedPath
+ );
+ }
+ },
+ Dt = (t, e) => {
+ if (Me(e)) return { success: !0, data: e.value };
+ if (!t.common.issues.length)
+ throw new Error("Validation failed but no issues detected.");
+ return {
+ success: !1,
+ get error() {
+ if (this._error) return this._error;
+ let r = new C(t.common.issues);
+ return (this._error = r), this._error;
+ },
+ };
+ };
+ function g(t) {
+ if (!t) return {};
+ let {
+ errorMap: e,
+ invalid_type_error: r,
+ required_error: n,
+ description: s,
+ } = t;
+ if (e && (r || n))
+ throw new Error(
+ `Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`,
+ );
+ return e
+ ? { errorMap: e, description: s }
+ : {
+ errorMap: (i, o) => {
+ var c, u;
+ let { message: f } = t;
+ return i.code === "invalid_enum_value"
+ ? { message: f ?? o.defaultError }
+ : typeof o.data > "u"
+ ? {
+ message:
+ (c = f ?? n) !== null && c !== void 0
+ ? c
+ : o.defaultError,
+ }
+ : i.code !== "invalid_type"
+ ? { message: o.defaultError }
+ : {
+ message:
+ (u = f ?? r) !== null && u !== void 0
+ ? u
+ : o.defaultError,
+ };
+ },
+ description: s,
+ };
+ }
+ var b = class {
+ constructor(e) {
+ (this.spa = this.safeParseAsync),
+ (this._def = e),
+ (this.parse = this.parse.bind(this)),
+ (this.safeParse = this.safeParse.bind(this)),
+ (this.parseAsync = this.parseAsync.bind(this)),
+ (this.safeParseAsync = this.safeParseAsync.bind(this)),
+ (this.spa = this.spa.bind(this)),
+ (this.refine = this.refine.bind(this)),
+ (this.refinement = this.refinement.bind(this)),
+ (this.superRefine = this.superRefine.bind(this)),
+ (this.optional = this.optional.bind(this)),
+ (this.nullable = this.nullable.bind(this)),
+ (this.nullish = this.nullish.bind(this)),
+ (this.array = this.array.bind(this)),
+ (this.promise = this.promise.bind(this)),
+ (this.or = this.or.bind(this)),
+ (this.and = this.and.bind(this)),
+ (this.transform = this.transform.bind(this)),
+ (this.brand = this.brand.bind(this)),
+ (this.default = this.default.bind(this)),
+ (this.catch = this.catch.bind(this)),
+ (this.describe = this.describe.bind(this)),
+ (this.pipe = this.pipe.bind(this)),
+ (this.readonly = this.readonly.bind(this)),
+ (this.isNullable = this.isNullable.bind(this)),
+ (this.isOptional = this.isOptional.bind(this));
+ }
+ get description() {
+ return this._def.description;
+ }
+ _getType(e) {
+ return B(e.data);
+ }
+ _getOrReturnCtx(e, r) {
+ return (
+ r || {
+ common: e.parent.common,
+ data: e.data,
+ parsedType: B(e.data),
+ schemaErrorMap: this._def.errorMap,
+ path: e.path,
+ parent: e.parent,
+ }
+ );
+ }
+ _processInputParams(e) {
+ return {
+ status: new T(),
+ ctx: {
+ common: e.parent.common,
+ data: e.data,
+ parsedType: B(e.data),
+ schemaErrorMap: this._def.errorMap,
+ path: e.path,
+ parent: e.parent,
+ },
+ };
+ }
+ _parseSync(e) {
+ let r = this._parse(e);
+ if (Ze(r)) throw new Error("Synchronous parse encountered promise.");
+ return r;
+ }
+ _parseAsync(e) {
+ let r = this._parse(e);
+ return Promise.resolve(r);
+ }
+ parse(e, r) {
+ let n = this.safeParse(e, r);
+ if (n.success) return n.data;
+ throw n.error;
+ }
+ safeParse(e, r) {
+ var n;
+ let s = {
+ common: {
+ issues: [],
+ async: (n = r?.async) !== null && n !== void 0 ? n : !1,
+ contextualErrorMap: r?.errorMap,
+ },
+ path: r?.path || [],
+ schemaErrorMap: this._def.errorMap,
+ parent: null,
+ data: e,
+ parsedType: B(e),
+ },
+ a = this._parseSync({ data: e, path: s.path, parent: s });
+ return Dt(s, a);
+ }
+ async parseAsync(e, r) {
+ let n = await this.safeParseAsync(e, r);
+ if (n.success) return n.data;
+ throw n.error;
+ }
+ async safeParseAsync(e, r) {
+ let n = {
+ common: { issues: [], contextualErrorMap: r?.errorMap, async: !0 },
+ path: r?.path || [],
+ schemaErrorMap: this._def.errorMap,
+ parent: null,
+ data: e,
+ parsedType: B(e),
+ },
+ s = this._parse({ data: e, path: n.path, parent: n }),
+ a = await (Ze(s) ? s : Promise.resolve(s));
+ return Dt(n, a);
+ }
+ refine(e, r) {
+ let n = (s) =>
+ typeof r == "string" || typeof r > "u"
+ ? { message: r }
+ : typeof r == "function"
+ ? r(s)
+ : r;
+ return this._refinement((s, a) => {
+ let i = e(s),
+ o = () => a.addIssue({ code: d.custom, ...n(s) });
+ return typeof Promise < "u" && i instanceof Promise
+ ? i.then((c) => (c ? !0 : (o(), !1)))
+ : i
+ ? !0
+ : (o(), !1);
+ });
+ }
+ refinement(e, r) {
+ return this._refinement((n, s) =>
+ e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1),
+ );
+ }
+ _refinement(e) {
+ return new N({
+ schema: this,
+ typeName: m.ZodEffects,
+ effect: { type: "refinement", refinement: e },
+ });
+ }
+ superRefine(e) {
+ return this._refinement(e);
+ }
+ optional() {
+ return A.create(this, this._def);
+ }
+ nullable() {
+ return L.create(this, this._def);
+ }
+ nullish() {
+ return this.nullable().optional();
+ }
+ array() {
+ return D.create(this, this._def);
+ }
+ promise() {
+ return W.create(this, this._def);
+ }
+ or(e) {
+ return Q.create([this, e], this._def);
+ }
+ and(e) {
+ return ee.create(this, e, this._def);
+ }
+ transform(e) {
+ return new N({
+ ...g(this._def),
+ schema: this,
+ typeName: m.ZodEffects,
+ effect: { type: "transform", transform: e },
+ });
+ }
+ default(e) {
+ let r = typeof e == "function" ? e : () => e;
+ return new ae({
+ ...g(this._def),
+ innerType: this,
+ defaultValue: r,
+ typeName: m.ZodDefault,
+ });
+ }
+ brand() {
+ return new Ie({ typeName: m.ZodBranded, type: this, ...g(this._def) });
+ }
+ catch(e) {
+ let r = typeof e == "function" ? e : () => e;
+ return new ie({
+ ...g(this._def),
+ innerType: this,
+ catchValue: r,
+ typeName: m.ZodCatch,
+ });
+ }
+ describe(e) {
+ let r = this.constructor;
+ return new r({ ...this._def, description: e });
+ }
+ pipe(e) {
+ return Le.create(this, e);
+ }
+ readonly() {
+ return oe.create(this);
+ }
+ isOptional() {
+ return this.safeParse(void 0).success;
+ }
+ isNullable() {
+ return this.safeParse(null).success;
+ }
+ },
+ Mr = /^c[^\s-]{8,}$/i,
+ Zr = /^[0-9a-z]+$/,
+ Ir = /^[0-9A-HJKMNP-TV-Z]{26}$/,
+ Lr =
+ /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,
+ $r = /^[a-z0-9_-]{21}$/i,
+ Vr =
+ /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,
+ Dr =
+ /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
+ zr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
+ lt,
+ Br =
+ /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
+ Ur =
+ /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
+ qr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
+ qt =
+ "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
+ Wr = new RegExp(`^${qt}$`);
+ function Wt(t) {
+ let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
+ return (
+ t.precision
+ ? (e = `${e}\\.\\d{${t.precision}}`)
+ : t.precision == null && (e = `${e}(\\.\\d+)?`),
+ e
+ );
+ }
+ function Hr(t) {
+ return new RegExp(`^${Wt(t)}$`);
+ }
+ function Ht(t) {
+ let e = `${qt}T${Wt(t)}`,
+ r = [];
+ return (
+ r.push(t.local ? "Z?" : "Z"),
+ t.offset && r.push("([+-]\\d{2}:?\\d{2})"),
+ (e = `${e}(${r.join("|")})`),
+ new RegExp(`^${e}$`)
+ );
+ }
+ function Fr(t, e) {
+ return !!(
+ ((e === "v4" || !e) && Br.test(t)) ||
+ ((e === "v6" || !e) && Ur.test(t))
+ );
+ }
+ var U = class t extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = String(e.data)),
+ this._getType(e) !== p.string)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.string,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n = new T(),
+ s;
+ for (let a of this._def.checks)
+ if (a.kind === "min")
+ e.data.length < a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !1,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "max")
+ e.data.length > a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !1,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "length") {
+ let i = e.data.length > a.value,
+ o = e.data.length < a.value;
+ (i || o) &&
+ ((s = this._getOrReturnCtx(e, s)),
+ i
+ ? l(s, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !0,
+ message: a.message,
+ })
+ : o &&
+ l(s, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "string",
+ inclusive: !0,
+ exact: !0,
+ message: a.message,
+ }),
+ n.dirty());
+ } else if (a.kind === "email")
+ Dr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "email",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "emoji")
+ lt || (lt = new RegExp(zr, "u")),
+ lt.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "emoji",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "uuid")
+ Lr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "uuid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "nanoid")
+ $r.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "nanoid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "cuid")
+ Mr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "cuid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "cuid2")
+ Zr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "cuid2",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "ulid")
+ Ir.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "ulid",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty());
+ else if (a.kind === "url")
+ try {
+ new URL(e.data);
+ } catch {
+ (s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "url",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty();
+ }
+ else
+ a.kind === "regex"
+ ? ((a.regex.lastIndex = 0),
+ a.regex.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "regex",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty()))
+ : a.kind === "trim"
+ ? (e.data = e.data.trim())
+ : a.kind === "includes"
+ ? e.data.includes(a.value, a.position) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { includes: a.value, position: a.position },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "toLowerCase"
+ ? (e.data = e.data.toLowerCase())
+ : a.kind === "toUpperCase"
+ ? (e.data = e.data.toUpperCase())
+ : a.kind === "startsWith"
+ ? e.data.startsWith(a.value) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { startsWith: a.value },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "endsWith"
+ ? e.data.endsWith(a.value) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: { endsWith: a.value },
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "datetime"
+ ? Ht(a).test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "datetime",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "date"
+ ? Wr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "date",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "time"
+ ? Hr(a).test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.invalid_string,
+ validation: "time",
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "duration"
+ ? Vr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "duration",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "ip"
+ ? Fr(e.data, a.version) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "ip",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : a.kind === "base64"
+ ? qr.test(e.data) ||
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ validation: "base64",
+ code: d.invalid_string,
+ message: a.message,
+ }),
+ n.dirty())
+ : x.assertNever(a);
+ return { status: n.value, value: e.data };
+ }
+ _regex(e, r, n) {
+ return this.refinement((s) => e.test(s), {
+ validation: r,
+ code: d.invalid_string,
+ ...h.errToObj(n),
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ email(e) {
+ return this._addCheck({ kind: "email", ...h.errToObj(e) });
+ }
+ url(e) {
+ return this._addCheck({ kind: "url", ...h.errToObj(e) });
+ }
+ emoji(e) {
+ return this._addCheck({ kind: "emoji", ...h.errToObj(e) });
+ }
+ uuid(e) {
+ return this._addCheck({ kind: "uuid", ...h.errToObj(e) });
+ }
+ nanoid(e) {
+ return this._addCheck({ kind: "nanoid", ...h.errToObj(e) });
+ }
+ cuid(e) {
+ return this._addCheck({ kind: "cuid", ...h.errToObj(e) });
+ }
+ cuid2(e) {
+ return this._addCheck({ kind: "cuid2", ...h.errToObj(e) });
+ }
+ ulid(e) {
+ return this._addCheck({ kind: "ulid", ...h.errToObj(e) });
+ }
+ base64(e) {
+ return this._addCheck({ kind: "base64", ...h.errToObj(e) });
+ }
+ ip(e) {
+ return this._addCheck({ kind: "ip", ...h.errToObj(e) });
+ }
+ datetime(e) {
+ var r, n;
+ return typeof e == "string"
+ ? this._addCheck({
+ kind: "datetime",
+ precision: null,
+ offset: !1,
+ local: !1,
+ message: e,
+ })
+ : this._addCheck({
+ kind: "datetime",
+ precision: typeof e?.precision > "u" ? null : e?.precision,
+ offset: (r = e?.offset) !== null && r !== void 0 ? r : !1,
+ local: (n = e?.local) !== null && n !== void 0 ? n : !1,
+ ...h.errToObj(e?.message),
+ });
+ }
+ date(e) {
+ return this._addCheck({ kind: "date", message: e });
+ }
+ time(e) {
+ return typeof e == "string"
+ ? this._addCheck({ kind: "time", precision: null, message: e })
+ : this._addCheck({
+ kind: "time",
+ precision: typeof e?.precision > "u" ? null : e?.precision,
+ ...h.errToObj(e?.message),
+ });
+ }
+ duration(e) {
+ return this._addCheck({ kind: "duration", ...h.errToObj(e) });
+ }
+ regex(e, r) {
+ return this._addCheck({ kind: "regex", regex: e, ...h.errToObj(r) });
+ }
+ includes(e, r) {
+ return this._addCheck({
+ kind: "includes",
+ value: e,
+ position: r?.position,
+ ...h.errToObj(r?.message),
+ });
+ }
+ startsWith(e, r) {
+ return this._addCheck({ kind: "startsWith", value: e, ...h.errToObj(r) });
+ }
+ endsWith(e, r) {
+ return this._addCheck({ kind: "endsWith", value: e, ...h.errToObj(r) });
+ }
+ min(e, r) {
+ return this._addCheck({ kind: "min", value: e, ...h.errToObj(r) });
+ }
+ max(e, r) {
+ return this._addCheck({ kind: "max", value: e, ...h.errToObj(r) });
+ }
+ length(e, r) {
+ return this._addCheck({ kind: "length", value: e, ...h.errToObj(r) });
+ }
+ nonempty(e) {
+ return this.min(1, h.errToObj(e));
+ }
+ trim() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "trim" }],
+ });
+ }
+ toLowerCase() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "toLowerCase" }],
+ });
+ }
+ toUpperCase() {
+ return new t({
+ ...this._def,
+ checks: [...this._def.checks, { kind: "toUpperCase" }],
+ });
+ }
+ get isDatetime() {
+ return !!this._def.checks.find((e) => e.kind === "datetime");
+ }
+ get isDate() {
+ return !!this._def.checks.find((e) => e.kind === "date");
+ }
+ get isTime() {
+ return !!this._def.checks.find((e) => e.kind === "time");
+ }
+ get isDuration() {
+ return !!this._def.checks.find((e) => e.kind === "duration");
+ }
+ get isEmail() {
+ return !!this._def.checks.find((e) => e.kind === "email");
+ }
+ get isURL() {
+ return !!this._def.checks.find((e) => e.kind === "url");
+ }
+ get isEmoji() {
+ return !!this._def.checks.find((e) => e.kind === "emoji");
+ }
+ get isUUID() {
+ return !!this._def.checks.find((e) => e.kind === "uuid");
+ }
+ get isNANOID() {
+ return !!this._def.checks.find((e) => e.kind === "nanoid");
+ }
+ get isCUID() {
+ return !!this._def.checks.find((e) => e.kind === "cuid");
+ }
+ get isCUID2() {
+ return !!this._def.checks.find((e) => e.kind === "cuid2");
+ }
+ get isULID() {
+ return !!this._def.checks.find((e) => e.kind === "ulid");
+ }
+ get isIP() {
+ return !!this._def.checks.find((e) => e.kind === "ip");
+ }
+ get isBase64() {
+ return !!this._def.checks.find((e) => e.kind === "base64");
+ }
+ get minLength() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxLength() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ };
+ U.create = (t) => {
+ var e;
+ return new U({
+ checks: [],
+ typeName: m.ZodString,
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
+ ...g(t),
+ });
+ };
+ function Jr(t, e) {
+ let r = (t.toString().split(".")[1] || "").length,
+ n = (e.toString().split(".")[1] || "").length,
+ s = r > n ? r : n,
+ a = parseInt(t.toFixed(s).replace(".", "")),
+ i = parseInt(e.toFixed(s).replace(".", ""));
+ return (a % i) / Math.pow(10, s);
+ }
+ var F = class t extends b {
+ constructor() {
+ super(...arguments),
+ (this.min = this.gte),
+ (this.max = this.lte),
+ (this.step = this.multipleOf);
+ }
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = Number(e.data)),
+ this._getType(e) !== p.number)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.number,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n,
+ s = new T();
+ for (let a of this._def.checks)
+ a.kind === "int"
+ ? x.isInteger(e.data) ||
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.invalid_type,
+ expected: "integer",
+ received: "float",
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "min"
+ ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_small,
+ minimum: a.value,
+ type: "number",
+ inclusive: a.inclusive,
+ exact: !1,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "max"
+ ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_big,
+ maximum: a.value,
+ type: "number",
+ inclusive: a.inclusive,
+ exact: !1,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "multipleOf"
+ ? Jr(e.data, a.value) !== 0 &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.not_multiple_of,
+ multipleOf: a.value,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "finite"
+ ? Number.isFinite(e.data) ||
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, { code: d.not_finite, message: a.message }),
+ s.dirty())
+ : x.assertNever(a);
+ return { status: s.value, value: e.data };
+ }
+ gte(e, r) {
+ return this.setLimit("min", e, !0, h.toString(r));
+ }
+ gt(e, r) {
+ return this.setLimit("min", e, !1, h.toString(r));
+ }
+ lte(e, r) {
+ return this.setLimit("max", e, !0, h.toString(r));
+ }
+ lt(e, r) {
+ return this.setLimit("max", e, !1, h.toString(r));
+ }
+ setLimit(e, r, n, s) {
+ return new t({
+ ...this._def,
+ checks: [
+ ...this._def.checks,
+ { kind: e, value: r, inclusive: n, message: h.toString(s) },
+ ],
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ int(e) {
+ return this._addCheck({ kind: "int", message: h.toString(e) });
+ }
+ positive(e) {
+ return this._addCheck({
+ kind: "min",
+ value: 0,
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ negative(e) {
+ return this._addCheck({
+ kind: "max",
+ value: 0,
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ nonpositive(e) {
+ return this._addCheck({
+ kind: "max",
+ value: 0,
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ nonnegative(e) {
+ return this._addCheck({
+ kind: "min",
+ value: 0,
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ multipleOf(e, r) {
+ return this._addCheck({
+ kind: "multipleOf",
+ value: e,
+ message: h.toString(r),
+ });
+ }
+ finite(e) {
+ return this._addCheck({ kind: "finite", message: h.toString(e) });
+ }
+ safe(e) {
+ return this._addCheck({
+ kind: "min",
+ inclusive: !0,
+ value: Number.MIN_SAFE_INTEGER,
+ message: h.toString(e),
+ })._addCheck({
+ kind: "max",
+ inclusive: !0,
+ value: Number.MAX_SAFE_INTEGER,
+ message: h.toString(e),
+ });
+ }
+ get minValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ get isInt() {
+ return !!this._def.checks.find(
+ (e) =>
+ e.kind === "int" || (e.kind === "multipleOf" && x.isInteger(e.value)),
+ );
+ }
+ get isFinite() {
+ let e = null,
+ r = null;
+ for (let n of this._def.checks) {
+ if (n.kind === "finite" || n.kind === "int" || n.kind === "multipleOf")
+ return !0;
+ n.kind === "min"
+ ? (r === null || n.value > r) && (r = n.value)
+ : n.kind === "max" && (e === null || n.value < e) && (e = n.value);
+ }
+ return Number.isFinite(r) && Number.isFinite(e);
+ }
+ };
+ F.create = (t) =>
+ new F({
+ checks: [],
+ typeName: m.ZodNumber,
+ coerce: t?.coerce || !1,
+ ...g(t),
+ });
+ var J = class t extends b {
+ constructor() {
+ super(...arguments), (this.min = this.gte), (this.max = this.lte);
+ }
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = BigInt(e.data)),
+ this._getType(e) !== p.bigint)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.bigint,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ let n,
+ s = new T();
+ for (let a of this._def.checks)
+ a.kind === "min"
+ ? (a.inclusive ? e.data < a.value : e.data <= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_small,
+ type: "bigint",
+ minimum: a.value,
+ inclusive: a.inclusive,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "max"
+ ? (a.inclusive ? e.data > a.value : e.data >= a.value) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.too_big,
+ type: "bigint",
+ maximum: a.value,
+ inclusive: a.inclusive,
+ message: a.message,
+ }),
+ s.dirty())
+ : a.kind === "multipleOf"
+ ? e.data % a.value !== BigInt(0) &&
+ ((n = this._getOrReturnCtx(e, n)),
+ l(n, {
+ code: d.not_multiple_of,
+ multipleOf: a.value,
+ message: a.message,
+ }),
+ s.dirty())
+ : x.assertNever(a);
+ return { status: s.value, value: e.data };
+ }
+ gte(e, r) {
+ return this.setLimit("min", e, !0, h.toString(r));
+ }
+ gt(e, r) {
+ return this.setLimit("min", e, !1, h.toString(r));
+ }
+ lte(e, r) {
+ return this.setLimit("max", e, !0, h.toString(r));
+ }
+ lt(e, r) {
+ return this.setLimit("max", e, !1, h.toString(r));
+ }
+ setLimit(e, r, n, s) {
+ return new t({
+ ...this._def,
+ checks: [
+ ...this._def.checks,
+ { kind: e, value: r, inclusive: n, message: h.toString(s) },
+ ],
+ });
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ positive(e) {
+ return this._addCheck({
+ kind: "min",
+ value: BigInt(0),
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ negative(e) {
+ return this._addCheck({
+ kind: "max",
+ value: BigInt(0),
+ inclusive: !1,
+ message: h.toString(e),
+ });
+ }
+ nonpositive(e) {
+ return this._addCheck({
+ kind: "max",
+ value: BigInt(0),
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ nonnegative(e) {
+ return this._addCheck({
+ kind: "min",
+ value: BigInt(0),
+ inclusive: !0,
+ message: h.toString(e),
+ });
+ }
+ multipleOf(e, r) {
+ return this._addCheck({
+ kind: "multipleOf",
+ value: e,
+ message: h.toString(r),
+ });
+ }
+ get minValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e;
+ }
+ get maxValue() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e;
+ }
+ };
+ J.create = (t) => {
+ var e;
+ return new J({
+ checks: [],
+ typeName: m.ZodBigInt,
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
+ ...g(t),
+ });
+ };
+ var Y = class extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = !!e.data),
+ this._getType(e) !== p.boolean)
+ ) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.boolean,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ Y.create = (t) =>
+ new Y({ typeName: m.ZodBoolean, coerce: t?.coerce || !1, ...g(t) });
+ var G = class t extends b {
+ _parse(e) {
+ if (
+ (this._def.coerce && (e.data = new Date(e.data)),
+ this._getType(e) !== p.date)
+ ) {
+ let a = this._getOrReturnCtx(e);
+ return (
+ l(a, {
+ code: d.invalid_type,
+ expected: p.date,
+ received: a.parsedType,
+ }),
+ v
+ );
+ }
+ if (isNaN(e.data.getTime())) {
+ let a = this._getOrReturnCtx(e);
+ return l(a, { code: d.invalid_date }), v;
+ }
+ let n = new T(),
+ s;
+ for (let a of this._def.checks)
+ a.kind === "min"
+ ? e.data.getTime() < a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_small,
+ message: a.message,
+ inclusive: !0,
+ exact: !1,
+ minimum: a.value,
+ type: "date",
+ }),
+ n.dirty())
+ : a.kind === "max"
+ ? e.data.getTime() > a.value &&
+ ((s = this._getOrReturnCtx(e, s)),
+ l(s, {
+ code: d.too_big,
+ message: a.message,
+ inclusive: !0,
+ exact: !1,
+ maximum: a.value,
+ type: "date",
+ }),
+ n.dirty())
+ : x.assertNever(a);
+ return { status: n.value, value: new Date(e.data.getTime()) };
+ }
+ _addCheck(e) {
+ return new t({ ...this._def, checks: [...this._def.checks, e] });
+ }
+ min(e, r) {
+ return this._addCheck({
+ kind: "min",
+ value: e.getTime(),
+ message: h.toString(r),
+ });
+ }
+ max(e, r) {
+ return this._addCheck({
+ kind: "max",
+ value: e.getTime(),
+ message: h.toString(r),
+ });
+ }
+ get minDate() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "min" && (e === null || r.value > e) && (e = r.value);
+ return e != null ? new Date(e) : null;
+ }
+ get maxDate() {
+ let e = null;
+ for (let r of this._def.checks)
+ r.kind === "max" && (e === null || r.value < e) && (e = r.value);
+ return e != null ? new Date(e) : null;
+ }
+ };
+ G.create = (t) =>
+ new G({
+ checks: [],
+ coerce: t?.coerce || !1,
+ typeName: m.ZodDate,
+ ...g(t),
+ });
+ var fe = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.symbol) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.symbol,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ fe.create = (t) => new fe({ typeName: m.ZodSymbol, ...g(t) });
+ var K = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.undefined) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.undefined,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ K.create = (t) => new K({ typeName: m.ZodUndefined, ...g(t) });
+ var X = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.null) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.null,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ X.create = (t) => new X({ typeName: m.ZodNull, ...g(t) });
+ var q = class extends b {
+ constructor() {
+ super(...arguments), (this._any = !0);
+ }
+ _parse(e) {
+ return R(e.data);
+ }
+ };
+ q.create = (t) => new q({ typeName: m.ZodAny, ...g(t) });
+ var V = class extends b {
+ constructor() {
+ super(...arguments), (this._unknown = !0);
+ }
+ _parse(e) {
+ return R(e.data);
+ }
+ };
+ V.create = (t) => new V({ typeName: m.ZodUnknown, ...g(t) });
+ var Z = class extends b {
+ _parse(e) {
+ let r = this._getOrReturnCtx(e);
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.never,
+ received: r.parsedType,
+ }),
+ v
+ );
+ }
+ };
+ Z.create = (t) => new Z({ typeName: m.ZodNever, ...g(t) });
+ var pe = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.undefined) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.void,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return R(e.data);
+ }
+ };
+ pe.create = (t) => new pe({ typeName: m.ZodVoid, ...g(t) });
+ var D = class t extends b {
+ _parse(e) {
+ let { ctx: r, status: n } = this._processInputParams(e),
+ s = this._def;
+ if (r.parsedType !== p.array)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.array,
+ received: r.parsedType,
+ }),
+ v
+ );
+ if (s.exactLength !== null) {
+ let i = r.data.length > s.exactLength.value,
+ o = r.data.length < s.exactLength.value;
+ (i || o) &&
+ (l(r, {
+ code: i ? d.too_big : d.too_small,
+ minimum: o ? s.exactLength.value : void 0,
+ maximum: i ? s.exactLength.value : void 0,
+ type: "array",
+ inclusive: !0,
+ exact: !0,
+ message: s.exactLength.message,
+ }),
+ n.dirty());
+ }
+ if (
+ (s.minLength !== null &&
+ r.data.length < s.minLength.value &&
+ (l(r, {
+ code: d.too_small,
+ minimum: s.minLength.value,
+ type: "array",
+ inclusive: !0,
+ exact: !1,
+ message: s.minLength.message,
+ }),
+ n.dirty()),
+ s.maxLength !== null &&
+ r.data.length > s.maxLength.value &&
+ (l(r, {
+ code: d.too_big,
+ maximum: s.maxLength.value,
+ type: "array",
+ inclusive: !0,
+ exact: !1,
+ message: s.maxLength.message,
+ }),
+ n.dirty()),
+ r.common.async)
+ )
+ return Promise.all(
+ [...r.data].map((i, o) => s.type._parseAsync(new M(r, i, r.path, o))),
+ ).then((i) => T.mergeArray(n, i));
+ let a = [...r.data].map((i, o) =>
+ s.type._parseSync(new M(r, i, r.path, o)),
+ );
+ return T.mergeArray(n, a);
+ }
+ get element() {
+ return this._def.type;
+ }
+ min(e, r) {
+ return new t({
+ ...this._def,
+ minLength: { value: e, message: h.toString(r) },
+ });
+ }
+ max(e, r) {
+ return new t({
+ ...this._def,
+ maxLength: { value: e, message: h.toString(r) },
+ });
+ }
+ length(e, r) {
+ return new t({
+ ...this._def,
+ exactLength: { value: e, message: h.toString(r) },
+ });
+ }
+ nonempty(e) {
+ return this.min(1, e);
+ }
+ };
+ D.create = (t, e) =>
+ new D({
+ type: t,
+ minLength: null,
+ maxLength: null,
+ exactLength: null,
+ typeName: m.ZodArray,
+ ...g(e),
+ });
+ function ue(t) {
+ if (t instanceof P) {
+ let e = {};
+ for (let r in t.shape) {
+ let n = t.shape[r];
+ e[r] = A.create(ue(n));
+ }
+ return new P({ ...t._def, shape: () => e });
+ } else
+ return t instanceof D
+ ? new D({ ...t._def, type: ue(t.element) })
+ : t instanceof A
+ ? A.create(ue(t.unwrap()))
+ : t instanceof L
+ ? L.create(ue(t.unwrap()))
+ : t instanceof I
+ ? I.create(t.items.map((e) => ue(e)))
+ : t;
+ }
+ var P = class t extends b {
+ constructor() {
+ super(...arguments),
+ (this._cached = null),
+ (this.nonstrict = this.passthrough),
+ (this.augment = this.extend);
+ }
+ _getCached() {
+ if (this._cached !== null) return this._cached;
+ let e = this._def.shape(),
+ r = x.objectKeys(e);
+ return (this._cached = { shape: e, keys: r });
+ }
+ _parse(e) {
+ if (this._getType(e) !== p.object) {
+ let u = this._getOrReturnCtx(e);
+ return (
+ l(u, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: u.parsedType,
+ }),
+ v
+ );
+ }
+ let { status: n, ctx: s } = this._processInputParams(e),
+ { shape: a, keys: i } = this._getCached(),
+ o = [];
+ if (
+ !(this._def.catchall instanceof Z && this._def.unknownKeys === "strip")
+ )
+ for (let u in s.data) i.includes(u) || o.push(u);
+ let c = [];
+ for (let u of i) {
+ let f = a[u],
+ y = s.data[u];
+ c.push({
+ key: { status: "valid", value: u },
+ value: f._parse(new M(s, y, s.path, u)),
+ alwaysSet: u in s.data,
+ });
+ }
+ if (this._def.catchall instanceof Z) {
+ let u = this._def.unknownKeys;
+ if (u === "passthrough")
+ for (let f of o)
+ c.push({
+ key: { status: "valid", value: f },
+ value: { status: "valid", value: s.data[f] },
+ });
+ else if (u === "strict")
+ o.length > 0 &&
+ (l(s, { code: d.unrecognized_keys, keys: o }), n.dirty());
+ else if (u !== "strip")
+ throw new Error(
+ "Internal ZodObject error: invalid unknownKeys value.",
+ );
+ } else {
+ let u = this._def.catchall;
+ for (let f of o) {
+ let y = s.data[f];
+ c.push({
+ key: { status: "valid", value: f },
+ value: u._parse(new M(s, y, s.path, f)),
+ alwaysSet: f in s.data,
+ });
+ }
+ }
+ return s.common.async
+ ? Promise.resolve()
+ .then(async () => {
+ let u = [];
+ for (let f of c) {
+ let y = await f.key,
+ w = await f.value;
+ u.push({ key: y, value: w, alwaysSet: f.alwaysSet });
+ }
+ return u;
+ })
+ .then((u) => T.mergeObjectSync(n, u))
+ : T.mergeObjectSync(n, c);
+ }
+ get shape() {
+ return this._def.shape();
+ }
+ strict(e) {
+ return (
+ h.errToObj,
+ new t({
+ ...this._def,
+ unknownKeys: "strict",
+ ...(e !== void 0
+ ? {
+ errorMap: (r, n) => {
+ var s, a, i, o;
+ let c =
+ (i =
+ (a = (s = this._def).errorMap) === null || a === void 0
+ ? void 0
+ : a.call(s, r, n).message) !== null && i !== void 0
+ ? i
+ : n.defaultError;
+ return r.code === "unrecognized_keys"
+ ? {
+ message:
+ (o = h.errToObj(e).message) !== null && o !== void 0
+ ? o
+ : c,
+ }
+ : { message: c };
+ },
+ }
+ : {}),
+ })
+ );
+ }
+ strip() {
+ return new t({ ...this._def, unknownKeys: "strip" });
+ }
+ passthrough() {
+ return new t({ ...this._def, unknownKeys: "passthrough" });
+ }
+ extend(e) {
+ return new t({
+ ...this._def,
+ shape: () => ({ ...this._def.shape(), ...e }),
+ });
+ }
+ merge(e) {
+ return new t({
+ unknownKeys: e._def.unknownKeys,
+ catchall: e._def.catchall,
+ shape: () => ({ ...this._def.shape(), ...e._def.shape() }),
+ typeName: m.ZodObject,
+ });
+ }
+ setKey(e, r) {
+ return this.augment({ [e]: r });
+ }
+ catchall(e) {
+ return new t({ ...this._def, catchall: e });
+ }
+ pick(e) {
+ let r = {};
+ return (
+ x.objectKeys(e).forEach((n) => {
+ e[n] && this.shape[n] && (r[n] = this.shape[n]);
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ omit(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ e[n] || (r[n] = this.shape[n]);
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ deepPartial() {
+ return ue(this);
+ }
+ partial(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ let s = this.shape[n];
+ e && !e[n] ? (r[n] = s) : (r[n] = s.optional());
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ required(e) {
+ let r = {};
+ return (
+ x.objectKeys(this.shape).forEach((n) => {
+ if (e && !e[n]) r[n] = this.shape[n];
+ else {
+ let a = this.shape[n];
+ for (; a instanceof A; ) a = a._def.innerType;
+ r[n] = a;
+ }
+ }),
+ new t({ ...this._def, shape: () => r })
+ );
+ }
+ keyof() {
+ return Ft(x.objectKeys(this.shape));
+ }
+ };
+ P.create = (t, e) =>
+ new P({
+ shape: () => t,
+ unknownKeys: "strip",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ P.strictCreate = (t, e) =>
+ new P({
+ shape: () => t,
+ unknownKeys: "strict",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ P.lazycreate = (t, e) =>
+ new P({
+ shape: t,
+ unknownKeys: "strip",
+ catchall: Z.create(),
+ typeName: m.ZodObject,
+ ...g(e),
+ });
+ var Q = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = this._def.options;
+ function s(a) {
+ for (let o of a) if (o.result.status === "valid") return o.result;
+ for (let o of a)
+ if (o.result.status === "dirty")
+ return r.common.issues.push(...o.ctx.common.issues), o.result;
+ let i = a.map((o) => new C(o.ctx.common.issues));
+ return l(r, { code: d.invalid_union, unionErrors: i }), v;
+ }
+ if (r.common.async)
+ return Promise.all(
+ n.map(async (a) => {
+ let i = { ...r, common: { ...r.common, issues: [] }, parent: null };
+ return {
+ result: await a._parseAsync({
+ data: r.data,
+ path: r.path,
+ parent: i,
+ }),
+ ctx: i,
+ };
+ }),
+ ).then(s);
+ {
+ let a,
+ i = [];
+ for (let c of n) {
+ let u = { ...r, common: { ...r.common, issues: [] }, parent: null },
+ f = c._parseSync({ data: r.data, path: r.path, parent: u });
+ if (f.status === "valid") return f;
+ f.status === "dirty" && !a && (a = { result: f, ctx: u }),
+ u.common.issues.length && i.push(u.common.issues);
+ }
+ if (a) return r.common.issues.push(...a.ctx.common.issues), a.result;
+ let o = i.map((c) => new C(c));
+ return l(r, { code: d.invalid_union, unionErrors: o }), v;
+ }
+ }
+ get options() {
+ return this._def.options;
+ }
+ };
+ Q.create = (t, e) => new Q({ options: t, typeName: m.ZodUnion, ...g(e) });
+ var $ = (t) =>
+ t instanceof te
+ ? $(t.schema)
+ : t instanceof N
+ ? $(t.innerType())
+ : t instanceof re
+ ? [t.value]
+ : t instanceof ne
+ ? t.options
+ : t instanceof se
+ ? x.objectValues(t.enum)
+ : t instanceof ae
+ ? $(t._def.innerType)
+ : t instanceof K
+ ? [void 0]
+ : t instanceof X
+ ? [null]
+ : t instanceof A
+ ? [void 0, ...$(t.unwrap())]
+ : t instanceof L
+ ? [null, ...$(t.unwrap())]
+ : t instanceof Ie || t instanceof oe
+ ? $(t.unwrap())
+ : t instanceof ie
+ ? $(t._def.innerType)
+ : [],
+ rt = class t extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.object)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: r.parsedType,
+ }),
+ v
+ );
+ let n = this.discriminator,
+ s = r.data[n],
+ a = this.optionsMap.get(s);
+ return a
+ ? r.common.async
+ ? a._parseAsync({ data: r.data, path: r.path, parent: r })
+ : a._parseSync({ data: r.data, path: r.path, parent: r })
+ : (l(r, {
+ code: d.invalid_union_discriminator,
+ options: Array.from(this.optionsMap.keys()),
+ path: [n],
+ }),
+ v);
+ }
+ get discriminator() {
+ return this._def.discriminator;
+ }
+ get options() {
+ return this._def.options;
+ }
+ get optionsMap() {
+ return this._def.optionsMap;
+ }
+ static create(e, r, n) {
+ let s = new Map();
+ for (let a of r) {
+ let i = $(a.shape[e]);
+ if (!i.length)
+ throw new Error(
+ `A discriminator value for key \`${e}\` could not be extracted from all schema options`,
+ );
+ for (let o of i) {
+ if (s.has(o))
+ throw new Error(
+ `Discriminator property ${String(e)} has duplicate value ${String(o)}`,
+ );
+ s.set(o, a);
+ }
+ }
+ return new t({
+ typeName: m.ZodDiscriminatedUnion,
+ discriminator: e,
+ options: r,
+ optionsMap: s,
+ ...g(n),
+ });
+ }
+ };
+ function mt(t, e) {
+ let r = B(t),
+ n = B(e);
+ if (t === e) return { valid: !0, data: t };
+ if (r === p.object && n === p.object) {
+ let s = x.objectKeys(e),
+ a = x.objectKeys(t).filter((o) => s.indexOf(o) !== -1),
+ i = { ...t, ...e };
+ for (let o of a) {
+ let c = mt(t[o], e[o]);
+ if (!c.valid) return { valid: !1 };
+ i[o] = c.data;
+ }
+ return { valid: !0, data: i };
+ } else if (r === p.array && n === p.array) {
+ if (t.length !== e.length) return { valid: !1 };
+ let s = [];
+ for (let a = 0; a < t.length; a++) {
+ let i = t[a],
+ o = e[a],
+ c = mt(i, o);
+ if (!c.valid) return { valid: !1 };
+ s.push(c.data);
+ }
+ return { valid: !0, data: s };
+ } else
+ return r === p.date && n === p.date && +t == +e
+ ? { valid: !0, data: t }
+ : { valid: !1 };
+ }
+ var ee = class extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e),
+ s = (a, i) => {
+ if (pt(a) || pt(i)) return v;
+ let o = mt(a.value, i.value);
+ return o.valid
+ ? ((ht(a) || ht(i)) && r.dirty(),
+ { status: r.value, value: o.data })
+ : (l(n, { code: d.invalid_intersection_types }), v);
+ };
+ return n.common.async
+ ? Promise.all([
+ this._def.left._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ this._def.right._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ ]).then(([a, i]) => s(a, i))
+ : s(
+ this._def.left._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ this._def.right._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ }),
+ );
+ }
+ };
+ ee.create = (t, e, r) =>
+ new ee({ left: t, right: e, typeName: m.ZodIntersection, ...g(r) });
+ var I = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.array)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.array,
+ received: n.parsedType,
+ }),
+ v
+ );
+ if (n.data.length < this._def.items.length)
+ return (
+ l(n, {
+ code: d.too_small,
+ minimum: this._def.items.length,
+ inclusive: !0,
+ exact: !1,
+ type: "array",
+ }),
+ v
+ );
+ !this._def.rest &&
+ n.data.length > this._def.items.length &&
+ (l(n, {
+ code: d.too_big,
+ maximum: this._def.items.length,
+ inclusive: !0,
+ exact: !1,
+ type: "array",
+ }),
+ r.dirty());
+ let a = [...n.data]
+ .map((i, o) => {
+ let c = this._def.items[o] || this._def.rest;
+ return c ? c._parse(new M(n, i, n.path, o)) : null;
+ })
+ .filter((i) => !!i);
+ return n.common.async
+ ? Promise.all(a).then((i) => T.mergeArray(r, i))
+ : T.mergeArray(r, a);
+ }
+ get items() {
+ return this._def.items;
+ }
+ rest(e) {
+ return new t({ ...this._def, rest: e });
+ }
+ };
+ I.create = (t, e) => {
+ if (!Array.isArray(t))
+ throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
+ return new I({ items: t, typeName: m.ZodTuple, rest: null, ...g(e) });
+ };
+ var nt = class t extends b {
+ get keySchema() {
+ return this._def.keyType;
+ }
+ get valueSchema() {
+ return this._def.valueType;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.object)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.object,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = [],
+ a = this._def.keyType,
+ i = this._def.valueType;
+ for (let o in n.data)
+ s.push({
+ key: a._parse(new M(n, o, n.path, o)),
+ value: i._parse(new M(n, n.data[o], n.path, o)),
+ alwaysSet: o in n.data,
+ });
+ return n.common.async
+ ? T.mergeObjectAsync(r, s)
+ : T.mergeObjectSync(r, s);
+ }
+ get element() {
+ return this._def.valueType;
+ }
+ static create(e, r, n) {
+ return r instanceof b
+ ? new t({ keyType: e, valueType: r, typeName: m.ZodRecord, ...g(n) })
+ : new t({
+ keyType: U.create(),
+ valueType: e,
+ typeName: m.ZodRecord,
+ ...g(r),
+ });
+ }
+ },
+ he = class extends b {
+ get keySchema() {
+ return this._def.keyType;
+ }
+ get valueSchema() {
+ return this._def.valueType;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.map)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.map,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = this._def.keyType,
+ a = this._def.valueType,
+ i = [...n.data.entries()].map(([o, c], u) => ({
+ key: s._parse(new M(n, o, n.path, [u, "key"])),
+ value: a._parse(new M(n, c, n.path, [u, "value"])),
+ }));
+ if (n.common.async) {
+ let o = new Map();
+ return Promise.resolve().then(async () => {
+ for (let c of i) {
+ let u = await c.key,
+ f = await c.value;
+ if (u.status === "aborted" || f.status === "aborted") return v;
+ (u.status === "dirty" || f.status === "dirty") && r.dirty(),
+ o.set(u.value, f.value);
+ }
+ return { status: r.value, value: o };
+ });
+ } else {
+ let o = new Map();
+ for (let c of i) {
+ let u = c.key,
+ f = c.value;
+ if (u.status === "aborted" || f.status === "aborted") return v;
+ (u.status === "dirty" || f.status === "dirty") && r.dirty(),
+ o.set(u.value, f.value);
+ }
+ return { status: r.value, value: o };
+ }
+ }
+ };
+ he.create = (t, e, r) =>
+ new he({ valueType: e, keyType: t, typeName: m.ZodMap, ...g(r) });
+ var me = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.parsedType !== p.set)
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.set,
+ received: n.parsedType,
+ }),
+ v
+ );
+ let s = this._def;
+ s.minSize !== null &&
+ n.data.size < s.minSize.value &&
+ (l(n, {
+ code: d.too_small,
+ minimum: s.minSize.value,
+ type: "set",
+ inclusive: !0,
+ exact: !1,
+ message: s.minSize.message,
+ }),
+ r.dirty()),
+ s.maxSize !== null &&
+ n.data.size > s.maxSize.value &&
+ (l(n, {
+ code: d.too_big,
+ maximum: s.maxSize.value,
+ type: "set",
+ inclusive: !0,
+ exact: !1,
+ message: s.maxSize.message,
+ }),
+ r.dirty());
+ let a = this._def.valueType;
+ function i(c) {
+ let u = new Set();
+ for (let f of c) {
+ if (f.status === "aborted") return v;
+ f.status === "dirty" && r.dirty(), u.add(f.value);
+ }
+ return { status: r.value, value: u };
+ }
+ let o = [...n.data.values()].map((c, u) =>
+ a._parse(new M(n, c, n.path, u)),
+ );
+ return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
+ }
+ min(e, r) {
+ return new t({
+ ...this._def,
+ minSize: { value: e, message: h.toString(r) },
+ });
+ }
+ max(e, r) {
+ return new t({
+ ...this._def,
+ maxSize: { value: e, message: h.toString(r) },
+ });
+ }
+ size(e, r) {
+ return this.min(e, r).max(e, r);
+ }
+ nonempty(e) {
+ return this.min(1, e);
+ }
+ };
+ me.create = (t, e) =>
+ new me({
+ valueType: t,
+ minSize: null,
+ maxSize: null,
+ typeName: m.ZodSet,
+ ...g(e),
+ });
+ var st = class t extends b {
+ constructor() {
+ super(...arguments), (this.validate = this.implement);
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.function)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.function,
+ received: r.parsedType,
+ }),
+ v
+ );
+ function n(o, c) {
+ return et({
+ data: o,
+ path: r.path,
+ errorMaps: [
+ r.common.contextualErrorMap,
+ r.schemaErrorMap,
+ Qe(),
+ le,
+ ].filter((u) => !!u),
+ issueData: { code: d.invalid_arguments, argumentsError: c },
+ });
+ }
+ function s(o, c) {
+ return et({
+ data: o,
+ path: r.path,
+ errorMaps: [
+ r.common.contextualErrorMap,
+ r.schemaErrorMap,
+ Qe(),
+ le,
+ ].filter((u) => !!u),
+ issueData: { code: d.invalid_return_type, returnTypeError: c },
+ });
+ }
+ let a = { errorMap: r.common.contextualErrorMap },
+ i = r.data;
+ if (this._def.returns instanceof W) {
+ let o = this;
+ return R(async function (...c) {
+ let u = new C([]),
+ f = await o._def.args.parseAsync(c, a).catch((E) => {
+ throw (u.addIssue(n(c, E)), u);
+ }),
+ y = await Reflect.apply(i, this, f);
+ return await o._def.returns._def.type
+ .parseAsync(y, a)
+ .catch((E) => {
+ throw (u.addIssue(s(y, E)), u);
+ });
+ });
+ } else {
+ let o = this;
+ return R(function (...c) {
+ let u = o._def.args.safeParse(c, a);
+ if (!u.success) throw new C([n(c, u.error)]);
+ let f = Reflect.apply(i, this, u.data),
+ y = o._def.returns.safeParse(f, a);
+ if (!y.success) throw new C([s(f, y.error)]);
+ return y.data;
+ });
+ }
+ }
+ parameters() {
+ return this._def.args;
+ }
+ returnType() {
+ return this._def.returns;
+ }
+ args(...e) {
+ return new t({ ...this._def, args: I.create(e).rest(V.create()) });
+ }
+ returns(e) {
+ return new t({ ...this._def, returns: e });
+ }
+ implement(e) {
+ return this.parse(e);
+ }
+ strictImplement(e) {
+ return this.parse(e);
+ }
+ static create(e, r, n) {
+ return new t({
+ args: e || I.create([]).rest(V.create()),
+ returns: r || V.create(),
+ typeName: m.ZodFunction,
+ ...g(n),
+ });
+ }
+ },
+ te = class extends b {
+ get schema() {
+ return this._def.getter();
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ return this._def
+ .getter()
+ ._parse({ data: r.data, path: r.path, parent: r });
+ }
+ };
+ te.create = (t, e) => new te({ getter: t, typeName: m.ZodLazy, ...g(e) });
+ var re = class extends b {
+ _parse(e) {
+ if (e.data !== this._def.value) {
+ let r = this._getOrReturnCtx(e);
+ return (
+ l(r, {
+ received: r.data,
+ code: d.invalid_literal,
+ expected: this._def.value,
+ }),
+ v
+ );
+ }
+ return { status: "valid", value: e.data };
+ }
+ get value() {
+ return this._def.value;
+ }
+ };
+ re.create = (t, e) => new re({ value: t, typeName: m.ZodLiteral, ...g(e) });
+ function Ft(t, e) {
+ return new ne({ values: t, typeName: m.ZodEnum, ...g(e) });
+ }
+ var ne = class t extends b {
+ constructor() {
+ super(...arguments), Ne.set(this, void 0);
+ }
+ _parse(e) {
+ if (typeof e.data != "string") {
+ let r = this._getOrReturnCtx(e),
+ n = this._def.values;
+ return (
+ l(r, {
+ expected: x.joinValues(n),
+ received: r.parsedType,
+ code: d.invalid_type,
+ }),
+ v
+ );
+ }
+ if (
+ (tt(this, Ne, "f") || Ut(this, Ne, new Set(this._def.values), "f"),
+ !tt(this, Ne, "f").has(e.data))
+ ) {
+ let r = this._getOrReturnCtx(e),
+ n = this._def.values;
+ return (
+ l(r, { received: r.data, code: d.invalid_enum_value, options: n }), v
+ );
+ }
+ return R(e.data);
+ }
+ get options() {
+ return this._def.values;
+ }
+ get enum() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ get Values() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ get Enum() {
+ let e = {};
+ for (let r of this._def.values) e[r] = r;
+ return e;
+ }
+ extract(e, r = this._def) {
+ return t.create(e, { ...this._def, ...r });
+ }
+ exclude(e, r = this._def) {
+ return t.create(
+ this.options.filter((n) => !e.includes(n)),
+ { ...this._def, ...r },
+ );
+ }
+ };
+ Ne = new WeakMap();
+ ne.create = Ft;
+ var se = class extends b {
+ constructor() {
+ super(...arguments), Ae.set(this, void 0);
+ }
+ _parse(e) {
+ let r = x.getValidEnumValues(this._def.values),
+ n = this._getOrReturnCtx(e);
+ if (n.parsedType !== p.string && n.parsedType !== p.number) {
+ let s = x.objectValues(r);
+ return (
+ l(n, {
+ expected: x.joinValues(s),
+ received: n.parsedType,
+ code: d.invalid_type,
+ }),
+ v
+ );
+ }
+ if (
+ (tt(this, Ae, "f") ||
+ Ut(this, Ae, new Set(x.getValidEnumValues(this._def.values)), "f"),
+ !tt(this, Ae, "f").has(e.data))
+ ) {
+ let s = x.objectValues(r);
+ return (
+ l(n, { received: n.data, code: d.invalid_enum_value, options: s }), v
+ );
+ }
+ return R(e.data);
+ }
+ get enum() {
+ return this._def.values;
+ }
+ };
+ Ae = new WeakMap();
+ se.create = (t, e) =>
+ new se({ values: t, typeName: m.ZodNativeEnum, ...g(e) });
+ var W = class extends b {
+ unwrap() {
+ return this._def.type;
+ }
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e);
+ if (r.parsedType !== p.promise && r.common.async === !1)
+ return (
+ l(r, {
+ code: d.invalid_type,
+ expected: p.promise,
+ received: r.parsedType,
+ }),
+ v
+ );
+ let n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
+ return R(
+ n.then((s) =>
+ this._def.type.parseAsync(s, {
+ path: r.path,
+ errorMap: r.common.contextualErrorMap,
+ }),
+ ),
+ );
+ }
+ };
+ W.create = (t, e) => new W({ type: t, typeName: m.ZodPromise, ...g(e) });
+ var N = class extends b {
+ innerType() {
+ return this._def.schema;
+ }
+ sourceType() {
+ return this._def.schema._def.typeName === m.ZodEffects
+ ? this._def.schema.sourceType()
+ : this._def.schema;
+ }
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e),
+ s = this._def.effect || null,
+ a = {
+ addIssue: (i) => {
+ l(n, i), i.fatal ? r.abort() : r.dirty();
+ },
+ get path() {
+ return n.path;
+ },
+ };
+ if (((a.addIssue = a.addIssue.bind(a)), s.type === "preprocess")) {
+ let i = s.transform(n.data, a);
+ if (n.common.async)
+ return Promise.resolve(i).then(async (o) => {
+ if (r.value === "aborted") return v;
+ let c = await this._def.schema._parseAsync({
+ data: o,
+ path: n.path,
+ parent: n,
+ });
+ return c.status === "aborted"
+ ? v
+ : c.status === "dirty" || r.value === "dirty"
+ ? de(c.value)
+ : c;
+ });
+ {
+ if (r.value === "aborted") return v;
+ let o = this._def.schema._parseSync({
+ data: i,
+ path: n.path,
+ parent: n,
+ });
+ return o.status === "aborted"
+ ? v
+ : o.status === "dirty" || r.value === "dirty"
+ ? de(o.value)
+ : o;
+ }
+ }
+ if (s.type === "refinement") {
+ let i = (o) => {
+ let c = s.refinement(o, a);
+ if (n.common.async) return Promise.resolve(c);
+ if (c instanceof Promise)
+ throw new Error(
+ "Async refinement encountered during synchronous parse operation. Use .parseAsync instead.",
+ );
+ return o;
+ };
+ if (n.common.async === !1) {
+ let o = this._def.schema._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return o.status === "aborted"
+ ? v
+ : (o.status === "dirty" && r.dirty(),
+ i(o.value),
+ { status: r.value, value: o.value });
+ } else
+ return this._def.schema
+ ._parseAsync({ data: n.data, path: n.path, parent: n })
+ .then((o) =>
+ o.status === "aborted"
+ ? v
+ : (o.status === "dirty" && r.dirty(),
+ i(o.value).then(() => ({ status: r.value, value: o.value }))),
+ );
+ }
+ if (s.type === "transform")
+ if (n.common.async === !1) {
+ let i = this._def.schema._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ if (!Me(i)) return i;
+ let o = s.transform(i.value, a);
+ if (o instanceof Promise)
+ throw new Error(
+ "Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.",
+ );
+ return { status: r.value, value: o };
+ } else
+ return this._def.schema
+ ._parseAsync({ data: n.data, path: n.path, parent: n })
+ .then((i) =>
+ Me(i)
+ ? Promise.resolve(s.transform(i.value, a)).then((o) => ({
+ status: r.value,
+ value: o,
+ }))
+ : i,
+ );
+ x.assertNever(s);
+ }
+ };
+ N.create = (t, e, r) =>
+ new N({ schema: t, typeName: m.ZodEffects, effect: e, ...g(r) });
+ N.createWithPreprocess = (t, e, r) =>
+ new N({
+ schema: e,
+ effect: { type: "preprocess", transform: t },
+ typeName: m.ZodEffects,
+ ...g(r),
+ });
+ var A = class extends b {
+ _parse(e) {
+ return this._getType(e) === p.undefined
+ ? R(void 0)
+ : this._def.innerType._parse(e);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ A.create = (t, e) =>
+ new A({ innerType: t, typeName: m.ZodOptional, ...g(e) });
+ var L = class extends b {
+ _parse(e) {
+ return this._getType(e) === p.null
+ ? R(null)
+ : this._def.innerType._parse(e);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ L.create = (t, e) =>
+ new L({ innerType: t, typeName: m.ZodNullable, ...g(e) });
+ var ae = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = r.data;
+ return (
+ r.parsedType === p.undefined && (n = this._def.defaultValue()),
+ this._def.innerType._parse({ data: n, path: r.path, parent: r })
+ );
+ }
+ removeDefault() {
+ return this._def.innerType;
+ }
+ };
+ ae.create = (t, e) =>
+ new ae({
+ innerType: t,
+ typeName: m.ZodDefault,
+ defaultValue:
+ typeof e.default == "function" ? e.default : () => e.default,
+ ...g(e),
+ });
+ var ie = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = { ...r, common: { ...r.common, issues: [] } },
+ s = this._def.innerType._parse({
+ data: n.data,
+ path: n.path,
+ parent: { ...n },
+ });
+ return Ze(s)
+ ? s.then((a) => ({
+ status: "valid",
+ value:
+ a.status === "valid"
+ ? a.value
+ : this._def.catchValue({
+ get error() {
+ return new C(n.common.issues);
+ },
+ input: n.data,
+ }),
+ }))
+ : {
+ status: "valid",
+ value:
+ s.status === "valid"
+ ? s.value
+ : this._def.catchValue({
+ get error() {
+ return new C(n.common.issues);
+ },
+ input: n.data,
+ }),
+ };
+ }
+ removeCatch() {
+ return this._def.innerType;
+ }
+ };
+ ie.create = (t, e) =>
+ new ie({
+ innerType: t,
+ typeName: m.ZodCatch,
+ catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
+ ...g(e),
+ });
+ var ve = class extends b {
+ _parse(e) {
+ if (this._getType(e) !== p.nan) {
+ let n = this._getOrReturnCtx(e);
+ return (
+ l(n, {
+ code: d.invalid_type,
+ expected: p.nan,
+ received: n.parsedType,
+ }),
+ v
+ );
+ }
+ return { status: "valid", value: e.data };
+ }
+ };
+ ve.create = (t) => new ve({ typeName: m.ZodNaN, ...g(t) });
+ var Yr = Symbol("zod_brand"),
+ Ie = class extends b {
+ _parse(e) {
+ let { ctx: r } = this._processInputParams(e),
+ n = r.data;
+ return this._def.type._parse({ data: n, path: r.path, parent: r });
+ }
+ unwrap() {
+ return this._def.type;
+ }
+ },
+ Le = class t extends b {
+ _parse(e) {
+ let { status: r, ctx: n } = this._processInputParams(e);
+ if (n.common.async)
+ return (async () => {
+ let a = await this._def.in._parseAsync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return a.status === "aborted"
+ ? v
+ : a.status === "dirty"
+ ? (r.dirty(), de(a.value))
+ : this._def.out._parseAsync({
+ data: a.value,
+ path: n.path,
+ parent: n,
+ });
+ })();
+ {
+ let s = this._def.in._parseSync({
+ data: n.data,
+ path: n.path,
+ parent: n,
+ });
+ return s.status === "aborted"
+ ? v
+ : s.status === "dirty"
+ ? (r.dirty(), { status: "dirty", value: s.value })
+ : this._def.out._parseSync({
+ data: s.value,
+ path: n.path,
+ parent: n,
+ });
+ }
+ }
+ static create(e, r) {
+ return new t({ in: e, out: r, typeName: m.ZodPipeline });
+ }
+ },
+ oe = class extends b {
+ _parse(e) {
+ let r = this._def.innerType._parse(e),
+ n = (s) => (Me(s) && (s.value = Object.freeze(s.value)), s);
+ return Ze(r) ? r.then((s) => n(s)) : n(r);
+ }
+ unwrap() {
+ return this._def.innerType;
+ }
+ };
+ oe.create = (t, e) =>
+ new oe({ innerType: t, typeName: m.ZodReadonly, ...g(e) });
+ function Jt(t, e = {}, r) {
+ return t
+ ? q.create().superRefine((n, s) => {
+ var a, i;
+ if (!t(n)) {
+ let o =
+ typeof e == "function"
+ ? e(n)
+ : typeof e == "string"
+ ? { message: e }
+ : e,
+ c =
+ (i = (a = o.fatal) !== null && a !== void 0 ? a : r) !== null &&
+ i !== void 0
+ ? i
+ : !0,
+ u = typeof o == "string" ? { message: o } : o;
+ s.addIssue({ code: "custom", ...u, fatal: c });
+ }
+ })
+ : q.create();
+ }
+ var Gr = { object: P.lazycreate },
+ m;
+ (function (t) {
+ (t.ZodString = "ZodString"),
+ (t.ZodNumber = "ZodNumber"),
+ (t.ZodNaN = "ZodNaN"),
+ (t.ZodBigInt = "ZodBigInt"),
+ (t.ZodBoolean = "ZodBoolean"),
+ (t.ZodDate = "ZodDate"),
+ (t.ZodSymbol = "ZodSymbol"),
+ (t.ZodUndefined = "ZodUndefined"),
+ (t.ZodNull = "ZodNull"),
+ (t.ZodAny = "ZodAny"),
+ (t.ZodUnknown = "ZodUnknown"),
+ (t.ZodNever = "ZodNever"),
+ (t.ZodVoid = "ZodVoid"),
+ (t.ZodArray = "ZodArray"),
+ (t.ZodObject = "ZodObject"),
+ (t.ZodUnion = "ZodUnion"),
+ (t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion"),
+ (t.ZodIntersection = "ZodIntersection"),
+ (t.ZodTuple = "ZodTuple"),
+ (t.ZodRecord = "ZodRecord"),
+ (t.ZodMap = "ZodMap"),
+ (t.ZodSet = "ZodSet"),
+ (t.ZodFunction = "ZodFunction"),
+ (t.ZodLazy = "ZodLazy"),
+ (t.ZodLiteral = "ZodLiteral"),
+ (t.ZodEnum = "ZodEnum"),
+ (t.ZodEffects = "ZodEffects"),
+ (t.ZodNativeEnum = "ZodNativeEnum"),
+ (t.ZodOptional = "ZodOptional"),
+ (t.ZodNullable = "ZodNullable"),
+ (t.ZodDefault = "ZodDefault"),
+ (t.ZodCatch = "ZodCatch"),
+ (t.ZodPromise = "ZodPromise"),
+ (t.ZodBranded = "ZodBranded"),
+ (t.ZodPipeline = "ZodPipeline"),
+ (t.ZodReadonly = "ZodReadonly");
+ })(m || (m = {}));
+ var Kr = (t, e = { message: `Input not instance of ${t.name}` }) =>
+ Jt((r) => r instanceof t, e),
+ Yt = U.create,
+ Gt = F.create,
+ Xr = ve.create,
+ Qr = J.create,
+ Kt = Y.create,
+ en = G.create,
+ tn = fe.create,
+ rn = K.create,
+ nn = X.create,
+ sn = q.create,
+ an = V.create,
+ on = Z.create,
+ cn = pe.create,
+ un = D.create,
+ dn = P.create,
+ ln = P.strictCreate,
+ fn = Q.create,
+ pn = rt.create,
+ hn = ee.create,
+ mn = I.create,
+ vn = nt.create,
+ yn = he.create,
+ gn = me.create,
+ bn = st.create,
+ _n = te.create,
+ xn = re.create,
+ wn = ne.create,
+ kn = se.create,
+ Tn = W.create,
+ zt = N.create,
+ En = A.create,
+ On = L.create,
+ jn = N.createWithPreprocess,
+ Rn = Le.create,
+ Sn = () => Yt().optional(),
+ Pn = () => Gt().optional(),
+ Cn = () => Kt().optional(),
+ Nn = {
+ string: (t) => U.create({ ...t, coerce: !0 }),
+ number: (t) => F.create({ ...t, coerce: !0 }),
+ boolean: (t) => Y.create({ ...t, coerce: !0 }),
+ bigint: (t) => J.create({ ...t, coerce: !0 }),
+ date: (t) => G.create({ ...t, coerce: !0 }),
+ },
+ An = v,
+ _ = Object.freeze({
+ __proto__: null,
+ defaultErrorMap: le,
+ setErrorMap: Nr,
+ getErrorMap: Qe,
+ makeIssue: et,
+ EMPTY_PATH: Ar,
+ addIssueToContext: l,
+ ParseStatus: T,
+ INVALID: v,
+ DIRTY: de,
+ OK: R,
+ isAborted: pt,
+ isDirty: ht,
+ isValid: Me,
+ isAsync: Ze,
+ get util() {
+ return x;
+ },
+ get objectUtil() {
+ return ft;
+ },
+ ZodParsedType: p,
+ getParsedType: B,
+ ZodType: b,
+ datetimeRegex: Ht,
+ ZodString: U,
+ ZodNumber: F,
+ ZodBigInt: J,
+ ZodBoolean: Y,
+ ZodDate: G,
+ ZodSymbol: fe,
+ ZodUndefined: K,
+ ZodNull: X,
+ ZodAny: q,
+ ZodUnknown: V,
+ ZodNever: Z,
+ ZodVoid: pe,
+ ZodArray: D,
+ ZodObject: P,
+ ZodUnion: Q,
+ ZodDiscriminatedUnion: rt,
+ ZodIntersection: ee,
+ ZodTuple: I,
+ ZodRecord: nt,
+ ZodMap: he,
+ ZodSet: me,
+ ZodFunction: st,
+ ZodLazy: te,
+ ZodLiteral: re,
+ ZodEnum: ne,
+ ZodNativeEnum: se,
+ ZodPromise: W,
+ ZodEffects: N,
+ ZodTransformer: N,
+ ZodOptional: A,
+ ZodNullable: L,
+ ZodDefault: ae,
+ ZodCatch: ie,
+ ZodNaN: ve,
+ BRAND: Yr,
+ ZodBranded: Ie,
+ ZodPipeline: Le,
+ ZodReadonly: oe,
+ custom: Jt,
+ Schema: b,
+ ZodSchema: b,
+ late: Gr,
+ get ZodFirstPartyTypeKind() {
+ return m;
+ },
+ coerce: Nn,
+ any: sn,
+ array: un,
+ bigint: Qr,
+ boolean: Kt,
+ date: en,
+ discriminatedUnion: pn,
+ effect: zt,
+ enum: wn,
+ function: bn,
+ instanceof: Kr,
+ intersection: hn,
+ lazy: _n,
+ literal: xn,
+ map: yn,
+ nan: Xr,
+ nativeEnum: kn,
+ never: on,
+ null: nn,
+ nullable: On,
+ number: Gt,
+ object: dn,
+ oboolean: Cn,
+ onumber: Pn,
+ optional: En,
+ ostring: Sn,
+ pipeline: Rn,
+ preprocess: jn,
+ promise: Tn,
+ record: vn,
+ set: gn,
+ strictObject: ln,
+ string: Yt,
+ symbol: tn,
+ transformer: zt,
+ tuple: mn,
+ undefined: rn,
+ union: fn,
+ unknown: an,
+ void: cn,
+ NEVER: An,
+ ZodIssueCode: d,
+ quotelessJson: Cr,
+ ZodError: C,
+ });
+ var vt = _.object({ url: _.string(), token: _.string() }),
+ Mn = _.object({
+ header: _.string(),
+ payload: _.string(),
+ signature: _.string(),
+ }),
+ Zn = _.object({
+ fid: _.number(),
+ type: _.literal("app_key"),
+ key: _.string().startsWith("0x"),
+ }),
+ Xt = _.object({
+ event: _.literal("frame-added"),
+ notificationDetails: vt.optional(),
+ }),
+ Qt = _.object({ event: _.literal("frame-removed") }),
+ er = _.object({
+ event: _.literal("notifications-enabled"),
+ notificationDetails: vt.required(),
+ }),
+ tr = _.object({ event: _.literal("notifications-disabled") }),
+ In = _.discriminatedUnion("event", [Xt, Qt, er, tr]),
+ Ln = _.object({
+ notificationId: _.string().uuid(),
+ title: _.string().max(32),
+ body: _.string().max(128),
+ targetUrl: _.string().max(256),
+ tokens: _.string().array().max(100),
+ }),
+ $n = _.object({
+ result: _.object({
+ successfulTokens: _.array(_.string()),
+ invalidTokens: _.array(_.string()),
+ rateLimitedTokens: _.array(_.string()),
+ }),
+ });
+ var Vn = dt;
+ return ur(Dn);
+ })();
+ /*! Bundled license information:
+
+ comlink/dist/esm/comlink.mjs:
+ (**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *)
+ */
+ //# sourceMappingURL=index.min.js.map
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created sdk.js
sdk.js
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated boom.html
boom.html
Changed around line 1
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created boom.html
boom.html
Breck Yunits
Breck Yunits
1 month ago
frame.html
Changed around line 30
+ button:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+ }
Changed around line 56
-
-
-
+
+
+
+
-
- // Initialize status tracking
+
Changed around line 52
-
-
-
+
+
+
-
Changed around line 60
-
-
-
-
+
+
+
-
-
-
+
node_modules/@farcaster/frame-core/dist/index.d.ts
Changed around line 1
+ export * from "./types";
node_modules/@farcaster/frame-core/dist/index.js
Changed around line 1
+ export * from "./types";
node_modules/@farcaster/frame-core/dist/tsconfig.tsbuildinfo
Changed around line 1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/abitype/dist/types/register.d.ts","../../../node_modules/abitype/dist/types/types.d.ts","../../../node_modules/abitype/dist/types/abi.d.ts","../../../node_modules/abitype/dist/types/errors.d.ts","../../../node_modules/abitype/dist/types/narrow.d.ts","../../../node_modules/abitype/dist/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/signatures.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/structs.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/signature.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/splitparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/struct.d.ts","../../../node_modules/abitype/dist/types/exports/index.d.ts","../../../node_modules/ox/_types/core/errors.d.ts","../../../node_modules/ox/_types/core/internal/bytes.d.ts","../../../node_modules/ox/_types/core/internal/hex.d.ts","../../../node_modules/ox/_types/core/hex.d.ts","../../../node_modules/ox/_types/core/bytes.d.ts","../../../node_modules/ox/_types/core/hash.d.ts","../../../node_modules/ox/_types/core/internal/types.d.ts","../../../node_modules/ox/_types/core/abiitem.d.ts","../../../node_modules/ox/_types/core/publickey.d.ts","../../../node_modules/ox/_types/core/address.d.ts","../../../node_modules/ox/_types/core/internal/cursor.d.ts","../../../node_modules/ox/_types/core/internal/abiparameters.d.ts","../../../node_modules/ox/_types/core/abiparameters.d.ts","../../../node_modules/ox/_types/core/internal/abiitem.d.ts","../../../node_modules/ox/_types/core/abi.d.ts","../../../node_modules/ox/_types/core/internal/abiconstructor.d.ts","../../../node_modules/ox/_types/core/abiconstructor.d.ts","../../../node_modules/ox/_types/core/internal/abierror.d.ts","../../../node_modules/ox/_types/core/abierror.d.ts","../../../node_modules/ox/_types/core/accesslist.d.ts","../../../node_modules/ox/_types/core/rlp.d.ts","../../../node_modules/ox/_types/core/signature.d.ts","../../../node_modules/ox/_types/core/authorization.d.ts","../../../node_modules/ox/_types/core/transaction.d.ts","../../../node_modules/ox/_types/core/withdrawal.d.ts","../../../node_modules/ox/_types/core/block.d.ts","../../../node_modules/ox/_types/core/filter.d.ts","../../../node_modules/ox/_types/core/internal/abievent.d.ts","../../../node_modules/ox/_types/core/abievent.d.ts","../../../node_modules/ox/_types/core/internal/abifunction.d.ts","../../../node_modules/ox/_types/core/abifunction.d.ts","../../../node_modules/ox/_types/core/accountproof.d.ts","../../../node_modules/ox/_types/core/aesgcm.d.ts","../../../node_modules/ox/_types/core/internal/base58.d.ts","../../../node_modules/ox/_types/core/base58.d.ts","../../../node_modules/ox/_types/core/base64.d.ts","../../../node_modules/ox/_types/core/kzg.d.ts","../../../node_modules/ox/_types/core/blobs.d.ts","../../../node_modules/ox/_types/core/bloom.d.ts","../../../node_modules/ox/_types/core/blspoint.d.ts","../../../node_modules/@noble/curves/abstract/modular.d.ts","../../../node_modules/@noble/curves/abstract/utils.d.ts","../../../node_modules/@noble/curves/abstract/curve.d.ts","../../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../../node_modules/@noble/curves/abstract/weierstrass.d.ts","../../../node_modules/@noble/curves/abstract/tower.d.ts","../../../node_modules/@noble/curves/abstract/bls.d.ts","../../../node_modules/ox/_types/core/bls.d.ts","../../../node_modules/ox/_types/core/internal/lru.d.ts","../../../node_modules/ox/_types/core/caches.d.ts","../../../node_modules/ox/_types/core/contractaddress.d.ts","../../../node_modules/ox/_types/core/internal/ens.d.ts","../../../node_modules/ox/_types/core/ens.d.ts","../../../node_modules/@scure/bip32/lib/index.d.ts","../../../node_modules/ox/_types/core/internal/hdkey.d.ts","../../../node_modules/ox/_types/core/hdkey.d.ts","../../../node_modules/ox/_types/core/fee.d.ts","../../../node_modules/ox/_types/core/json.d.ts","../../../node_modules/ox/_types/core/log.d.ts","../../../node_modules/@scure/bip39/wordlists/czech.d.ts","../../../node_modules/@scure/bip39/wordlists/english.d.ts","../../../node_modules/@scure/bip39/wordlists/french.d.ts","../../../node_modules/@scure/bip39/wordlists/italian.d.ts","../../../node_modules/@scure/bip39/wordlists/japanese.d.ts","../../../node_modules/@scure/bip39/wordlists/korean.d.ts","../../../node_modules/@scure/bip39/wordlists/portuguese.d.ts","../../../node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts","../../../node_modules/@scure/bip39/wordlists/spanish.d.ts","../../../node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts","../../../node_modules/ox/_types/core/internal/mnemonic/wordlists.d.ts","../../../node_modules/ox/_types/core/mnemonic.d.ts","../../../node_modules/ox/_types/core/personalmessage.d.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/ox/_types/core/internal/register.d.ts","../../../node_modules/ox/_types/core/transactionreceipt.d.ts","../../../node_modules/ox/_types/core/transactionrequest.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/eth.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/wallet.d.ts","../../../node_modules/ox/_types/core/rpcschema.d.ts","../../../node_modules/ox/_types/core/internal/rpcschema.d.ts","../../../node_modules/ox/_types/core/provider.d.ts","../../../node_modules/ox/_types/core/rpcrequest.d.ts","../../../node_modules/ox/_types/core/rpcresponse.d.ts","../../../node_modules/ox/_types/core/internal/promise.d.ts","../../../node_modules/ox/_types/core/internal/rpctransport.d.ts","../../../node_modules/ox/_types/core/rpctransport.d.ts","../../../node_modules/ox/_types/core/secp256k1.d.ts","../../../node_modules/ox/_types/core/p256.d.ts","../../../node_modules/ox/_types/core/siwe.d.ts","../../../node_modules/ox/_types/core/solidity.d.ts","../../../node_modules/ox/_types/core/transactionenvelope.d.ts","../../../node_modules/ox/_types/core/transactionenvelopelegacy.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip1559.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip2930.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip4844.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip7702.d.ts","../../../node_modules/ox/_types/core/typeddata.d.ts","../../../node_modules/ox/_types/core/validatordata.d.ts","../../../node_modules/ox/_types/core/value.d.ts","../../../node_modules/ox/_types/core/internal/webauthn.d.ts","../../../node_modules/ox/_types/core/webauthnp256.d.ts","../../../node_modules/ox/_types/core/webcryptop256.d.ts","../../../node_modules/ox/_types/index.d.ts","../../../node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/zod/lib/zoderror.d.ts","../../../node_modules/zod/lib/locales/en.d.ts","../../../node_modules/zod/lib/errors.d.ts","../../../node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/zod/lib/types.d.ts","../../../node_modules/zod/lib/external.d.ts","../../../node_modules/zod/lib/index.d.ts","../../../node_modules/zod/index.d.ts","../src/types.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/node-forge/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileIdsList":[[220,231,273],[231,273],[142,143,145,146,147,231,273],[142,231,273],[142,143,144,231,273],[142,146,231,273],[220,221,222,223,224,231,273],[220,222,231,273],[231,273,286,323],[231,273,325],[231,273,326],[231,273,323],[231,270,273],[231,272,273],[273],[231,273,278,308],[231,273,274,279,285,286,293,305,316],[231,273,274,275,285,293],[226,227,228,231,273],[231,273,276,317],[231,273,277,278,286,294],[231,273,278,305,313],[231,273,279,281,285,293],[231,272,273,280],[231,273,281,282],[231,273,285],[231,273,283,285],[231,272,273,285],[231,273,285,286,287,305,316],[231,273,285,286,287,300,305,308],[231,268,273,321],[231,268,273,281,285,288,293,305,316],[231,273,285,286,288,289,293,305,313,316],[231,273,288,290,305,313,316],[229,230,231,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322],[231,273,285,291],[231,273,292,316,321],[231,273,281,285,293,305],[231,273,294],[231,273,295],[231,272,273,296],[231,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322],[231,273,298],[231,273,299],[231,273,285,300,301],[231,273,300,302,317,319],[231,273,285,305,306,307,308],[231,273,305,307],[231,273,305,306],[231,273,308],[231,273,309],[231,270,273,305],[231,273,285,311,312],[231,273,311,312],[231,273,278,293,305,313],[231,273,314],[231,273,293,315],[231,273,288,299,316],[231,273,278,317],[231,273,305,318],[231,273,292,319],[231,273,320],[231,273,278,285,287,296,305,316,319,321],[231,273,305,322],[231,273,329,330,331],[231,273,334],[79,80,231,273],[80,231,273],[79,81,82,83,84,86,87,88,89,92,93,94,95,96,97,98,99,100,231,273],[82,231,273],[81,82,85,231,273],[81,82,231,273],[81,88,231,273],[81,85,87,231,273],[80,81,85,231,273],[80,81,86,231,273],[80,81,85,90,91,231,273],[80,81,83,85,90,91,231,273],[80,81,231,273],[80,81,85,90,231,273],[79,80,81,85,91,231,273],[79,80,81,231,273],[101,102,115,231,273],[101,102,105,108,109,114,116,117,231,273],[101,102,105,108,109,114,115,116,119,231,273],[101,102,105,106,107,108,109,111,114,115,116,129,231,273],[101,102,105,108,109,113,114,115,116,131,231,273],[101,102,105,107,108,115,116,231,273],[101,102,105,106,113,231,273],[102,105,108,111,231,273],[204,231,273],[101,102,106,107,110,231,273],[102,105,106,231,273],[102,105,107,108,111,122,123,231,273],[102,105,106,135,231,273],[102,105,106,108,112,138,231,273],[102,105,108,111,125,126,231,273],[102,105,106,107,231,273],[102,105,106,108,141,148,231,273],[102,105,106,108,231,273],[102,103,104,105,231,273],[150,231,273],[102,105,106,107,108,111,122,231,273],[102,105,106,107,153,231,273],[105,108,231,273],[102,105,108,111,127,231,273],[102,105,106,110,155,156,231,273],[102,103,104,106,231,273],[108,115,231,273],[101,105,108,115,128,231,273],[101,102,108,109,114,116,231,273],[101,102,105,106,108,111,112,114,231,273],[102,106,231,273],[102,105,154,204,231,273],[102,155,157,231,273],[102,105,231,273],[161,162,163,164,165,166,167,168,169,170,231,273],[102,231,273],[180,231,273],[108,180,231,273],[105,111,125,127,128,133,158,160,176,177,180,231,273],[105,108,111,177,180,231,273],[102,108,180,183,184,187,231,273],[102,110,202,231,273],[102,105,106,157,171,231,273],[102,105,106,110,123,142,143,146,231,273],[102,108,111,174,180,181,231,273],[102,105,106,108,112,231,273],[108,180,181,204,231,273],[108,204,231,273],[108,175,178,179,231,273],[102,108,180,181,184,185,186,231,273],[102,105,106,108,110,111,123,142,143,146,231,273],[102,108,111,231,273],[102,105,108,111,121,123,124,231,273],[102,105,107,108,111,121,122,123,192,231,273],[102,105,107,108,121,122,123,139,192,194,231,273],[102,105,107,108,111,121,122,123,124,192,231,273],[102,105,107,108,111,122,123,192,231,273],[102,105,108,111,160,231,273],[102,105,108,111,121,124,231,273],[101,102,105,106,107,108,111,114,159,231,273],[102,105,106,107,111,231,273],[102,105,106,107,108,110,123,137,189,201,231,273],[102,105,106,108,110,123,231,273],[102,105,106,107,109,110,111,114,116,118,120,121,122,123,124,125,126,127,128,130,132,133,134,136,137,138,139,140,141,149,151,152,154,157,158,159,160,172,173,175,176,177,180,182,183,184,187,188,189,190,191,192,193,194,195,196,197,198,199,200,202,203,231,273],[231,240,244,273,316],[231,240,273,305,316],[231,235,273],[231,237,240,273,313,316],[231,273,293,313],[231,235,273,323],[231,237,240,273,293,316],[231,232,233,236,239,273,285,305,316],[231,240,247,273],[231,232,238,273],[231,240,261,262,273],[231,236,240,273,308,316,323],[231,261,273,323],[231,234,235,273,323],[231,240,273],[231,234,235,236,237,238,239,240,241,242,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,263,264,265,266,267,273],[231,240,255,273],[231,240,247,248,273],[231,238,240,248,249,273],[231,239,273],[231,232,235,240,273],[231,240,244,248,249,273],[231,244,273],[231,238,240,243,273,316],[231,232,237,240,247,273],[231,273,305],[231,235,240,261,273,321,323],[216,231,273],[207,208,231,273],[205,206,207,209,210,214,231,273],[206,207,231,273],[215,231,273],[207,231,273],[205,206,207,210,211,212,213,231,273],[205,206,216,231,273],[218,231,273],[204,217,231,273]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b166e33cf8226ac8781899da244397e77e5b6528271339ce26ece0c2c7242d7f","impliedFormat":1},{"version":"a623d5cf7925e72dbf4602862499564389c7c3dc0ce049733cc0ec756a846667","impliedFormat":1},{"version":"9c1724d9b0cb3d7141dc25a44b0d18cf0b3b20a42e971c6898d4195ec6d4b8dd","impliedFormat":1},{"version":"63634c0855e639ea7f609613d799bbb0dc774ec9f3242bc272c5567dc5ccd485","impliedFormat":1},{"version":"592f06c425ab27b4bafec624ef5b153cbdde9ac58f7113100a2da1c4309d1309","impliedFormat":1},{"version":"19c8ab51b4b07c529d95cd4d5c8d100a68dca247ec83a5097d35106fd8a7acca","impliedFormat":1},{"version":"bec1d0ac62cee9b4d1ea8b64c4798c59c1726668b76d06b68a206e0cb0ac76a6","impliedFormat":1},{"version":"fb4f06b2af9ee4b2d2be8c964b0a8f6dd260be9048488ffcf04eb5c0fcb8bf61","impliedFormat":1},{"version":"f185055f36d76e2df5eeb87ae1148a25a125be2bff2095e1bd39c1c7ce85a640","impliedFormat":1},{"version":"948a56ec8bfbbf20ad2496f49f451cfeb878cfcd6156032c0769b603f3ed8f18","impliedFormat":1},{"version":"979fdebc12d30becce6a15e68d99bc8a2a470a8dcf0898ac9e2d241a7e531940","impliedFormat":1},{"version":"1824ad7d4259910646279d667e517334c0aa24d5c810e8ea6da756fc2e02372f","impliedFormat":1},{"version":"989e9060e220ff86025044ba3c867a83512a655b7cf6253b2bd682192debf390","impliedFormat":1},{"version":"8b1feb568c859feb59236e9723b7a86e2ff8f9a8f2012366ffd1798164dc2798","impliedFormat":1},{"version":"8fab988b0129e674afc0bc0e95329b4052cf027f5d5b5b3e6e92d055b5ba88ef","impliedFormat":1},{"version":"4fe56d524ab24c225668803c1792945053e648b4e8fa4e50fa35594495b56732","impliedFormat":1},{"version":"2652931b8f7dca9a57f21aeb25b5d46851dcf17e4d5ed54b9b57d5d26e647680","impliedFormat":1},{"version":"d364c8df7d52199f5d011b4ded96f36dd114b984f5ee2e50ffe7d30ac1ab4bba","impliedFormat":1},{"version":"408f9eb3c7a3533bf5f07e0cde110a5ee0702864795ee6727792520fe60320b6","impliedFormat":1},{"version":"ba79eb15c36ff23e352ef608ceb7f9f0f278b15ad42512c05eedbe78f228e0e4","impliedFormat":1},{"version":"4cd233c6af471432253a67ae4f3b43c85e58a71418d98c3e162a1dac975c68f6","impliedFormat":1},{"version":"aa77c7d8ddc961e8192bcaa92da140e1205f8aee78bfadead5f52b8844d7d05c","impliedFormat":1},{"version":"37e37d3a525a207efab5458069fd9a27a174d2dc3af729702c81729ca03a349f","impliedFormat":1},{"version":"70997e63b7b3d90188fa2106753d35afd3b43b2bde957c46a5516d89e3ef0c1a","impliedFormat":1},{"version":"7fdaebdb3780d0549a8e0abcb18965e2f62224bdde633aeafb22c64c02fe9e9d","impliedFormat":1},{"version":"24f848479d1fd142d3d7cf034bedca247d1d9b8b31c2632c09695bd6a0441141","impliedFormat":1},{"version":"7e977910c045ec087f435905eb730e9c84e8d6b97f0dd0fe0c022dfed665613a","impliedFormat":1},{"version":"9c4ec2692cdb791823b9407753dec50d69b1b990cf7038cac3fab01e8ed5f709","impliedFormat":1},{"version":"176e7ce333b9988d68cfd5ab6717b20421a03b415af57f2a3bea1aa6b8d634a9","impliedFormat":1},{"version":"301a1ba797c537d2598a557af4862e7823353c80529c9a58bc1a0c08779deb5d","impliedFormat":1},{"version":"4fb2df0b48ac55d960fedfb7e7b917d2d29608d7f351b70b6b3104e2d02d2f11","impliedFormat":1},{"version":"2f37ef3a5d3fb119b390cb48c77352914c814b98948633deac90099faae320a6","impliedFormat":1},{"version":"ca2ce76fd743888d0f0c5be48b1b17a864f5ff2b0d09e954d3690645a794533f","impliedFormat":1},{"version":"728ec07c8a50b9f22da9c9aa8859e29462526fd996ac1d21c6c9a81b78106dd5","impliedFormat":1},{"version":"d4d210575ebc08ed97821b7a107692b91c9590d5328ec3aaac0b75f66a1c9188","impliedFormat":1},{"version":"fcaa6a4283732fcc1b571a326567c10b1ebce2faf1a0645493080ba230e57497","impliedFormat":1},{"version":"be9ef0a0446cf28d529a684e4a7d14101f03e054896704fbdc5470d8fa4de6b4","impliedFormat":1},{"version":"acd32f2f192d93e8161938ebfd74fa063e67a09cbe0156a74ae2e421a1e8f786","impliedFormat":1},{"version":"1eeb9deebe9a0a6cc52a32aa1533a1535ecc1b4e831290c753e72e0394e866a9","impliedFormat":1},{"version":"ae1f27a5966db7640edb4c82974b985acb7b1fa0859bff7cd769629436822d9a","impliedFormat":1},{"version":"a3d0b36bb3185da856cc0a7df02f63008935602ed09f84b0d960c7f9f7f6d63d","impliedFormat":1},{"version":"60319cf75d460432a0769a2f98a9ab6fc3ad39290bf7f1b33b922e832ff5b40e","impliedFormat":1},{"version":"30ceaf6e65817221c5c62cedfc26892a4b79a78c7eb7367bcccc0e217b517bf1","impliedFormat":1},{"version":"a3ea4adb87d130799d26945196bba7e889056c74dac98069d58c015d10f3c053","impliedFormat":1},{"version":"a82f1d66de93c80bca7a744647c748657c050341e53de63fae5aecb72f85f5e6","impliedFormat":1},{"version":"83dc49d957cb3b4af3a45cd7b54958149d21088d49f95e8ba6e3d3fb2b37d880","impliedFormat":1},{"version":"b7825c3d04bfc38caf9cb94341cede132d227654b28e3a603d1576bf199a7e47","impliedFormat":1},{"version":"d4832d1deaacad5d196b2a83239fb94c80f97df889c02a75859b05b460885300","impliedFormat":1},{"version":"888180b3d951298bf85d430543a1fa2fc6264fc847aef5baa821c743b5d84a58","impliedFormat":1},{"version":"4ec19d58993999260e0df245eec5fd6d7dd92978360c4f0706c9260091f55c70","impliedFormat":1},{"version":"0bc4f86d58f4a4b5a9563ba8d2b23a3fac187a6e167772f6689ea807081ed631","impliedFormat":1},{"version":"7a4e38850bfca2b105fd3e5609b68b52271fd7f2cab9f1d4031748e8bfd29633","impliedFormat":1},{"version":"496ee894efcd5de63169a3a4e47d74f16f754eb212b1ef209f9255aaaeef3450","impliedFormat":1},{"version":"246bec681a7465de230b083e0e63633b568a2d79c20fe167d3280e21200b22c8","impliedFormat":1},{"version":"3ee38e0bac65430814b195ed22b5aadfbe4fbd8890c5e5b45a7ba13f05c0ea0d","impliedFormat":1},{"version":"45181e4221f90d98bf2046ba55cdc22411dc64b9a8cc04f1c8702038b7334d01","impliedFormat":1},{"version":"7fe0253ff44f072ea13fa372e2fbd007aa439df9560762950d38b4c203b2c51a","impliedFormat":1},{"version":"bf4ebcedc7324dd0cbe83488830f7966e808fabf4836d516d1b591ea91417c68","impliedFormat":1},{"version":"c53f7caa42ad0bff2b3cad20e4780990aadf647c845cb66cec004062cc4ae549","impliedFormat":1},{"version":"af0dfd141ecb2e24ef9a3028727214a69aa528d0be91e8728a7abd4fd6659b5f","impliedFormat":1},{"version":"786d583f831d03da4aed9f9354fd9c4ef00aa8122564da5e683631423639c258","impliedFormat":1},{"version":"418fdcdefc32953c6c7ea7e9979ce84b87618de9def698e73da2c16697fe023b","impliedFormat":1},{"version":"4d0db315ab6869de22694dc968fe740cfef635a21455a4d2bd33bc95b8eec381","impliedFormat":1},{"version":"987339ae38c9341b0d90da7350e543c0d561d04b540f29a6912d387ffee30123","impliedFormat":1},{"version":"d6add5a006175d8e4ac5067baa29854010ae2be9eec488f3b09f62e48fdcbc73","impliedFormat":1},{"version":"78b320333fa889c9532276db075578cdde53e41d0c5ff1dc901a22e5c9e25bd8","impliedFormat":1},{"version":"44bebcbc4a93fea28f3564a7763dd12f0f3bdec624eb8a63e97afd007d1ff4bd","impliedFormat":1},{"version":"7531f6904a711cd870729de7bd8fb5829088eaf82381e88f81aa4a2c9ec57b75","impliedFormat":1},{"version":"f68260d8d6d27ca979ddc8e3ee70ada9818c77dbe2dc6824ca0b7a041f8e5c79","impliedFormat":1},{"version":"af120f4603c7fb09e9c082dd486388c102a17f434031eb2b68c95a1e8994412a","impliedFormat":1},{"version":"af807f4d873d3c603e802b9b8aef8fdf067a3e61e7dfe33f78a28fe21ca11061","impliedFormat":1},{"version":"08447e8b528a1f8d1162aa044695d460ce5179a78bd174fa0673fa16b06011aa","impliedFormat":1},{"version":"8e532c6486042736463d1116d45b0db814d969ffd2ee822e4e5ce975807c16f0","impliedFormat":1},{"version":"fad47f66fef1ff277730abff9c9330dd70284eb0ced43d6dd6aee15fc5f19a1b","impliedFormat":1},{"version":"7b4b0aaf0978122b44aa6317977be3e2f9d3d261ae4a8d93bfd511a7ddee7dfe","impliedFormat":1},{"version":"cb5def9d6efe73b09a7adce13bbb7fad7ee6df7a59259300de6ca77fe84041fc","impliedFormat":1},{"version":"1ddd1ca692a6c656ade0a85c9a722b3679b3d0bf113b699908e0325cf3537dbe","impliedFormat":1},{"version":"16c6ff8bcfef0ad22abffa3329760bb611c4c4aa098ece0d6bcfd1cd16610997","impliedFormat":1},{"version":"3d15157b6685e63a7e43a39bbc1fbcfdbf1250fa3598af55a2384f6f31260c86","impliedFormat":1},{"version":"58b5bc399cd98b87eff2c80d995d4dd63e69c801ec880b85c7da73ddc561a751","impliedFormat":1},{"version":"401c5b0f01bb0dce7a85899d8665c7d9c0b1637dc642805320d76c1a071135dd","impliedFormat":1},{"version":"af81e13747ef7589a726505dd4c2dcf00bb2b9fd7c3c84d580c1d02dbc3b58a9","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"516c53364c6b242591c65afc8b0f0f0cee74ac8a04f52470a539fcb33da2e318","impliedFormat":1},{"version":"cdf612f32afd760cd4a568e3f0c4646394f18fe2277a5ec1c084f1430776f1e0","impliedFormat":1},{"version":"e8ee036c1281885b9cc58f9d1d47472037d080a45b44a3ecbb8fea445e87415d","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"90887074bbd664eb4726465ccc6740fa8886e525e5c0afcc734e41df41851a60","impliedFormat":1},{"version":"0a3d92e1ed031f67294fc02692352444c0514e371b7093b8d224b6f9ea02d958","impliedFormat":1},{"version":"cc31889ffc5c322ff53137f54f3aa8f74a969cd01adbb296737231f31a870322","impliedFormat":1},{"version":"e20c7790d6923b9663bff5ba3b3bb2769f65df6fdd3294034fd9d289034ebe95","impliedFormat":1},{"version":"3df74fc90d6cf9c51ad6864a7d9e1e6d162a6e158f99ab2b7d878b4646aa343b","impliedFormat":1},{"version":"306712d7dc95ea2006413dec36b165bff346626340d2ba5adc14a3bafdcb57db","impliedFormat":1},{"version":"cca7da500accfa2e8689e453b1d74d05bcbf1dc6ef86f12b8cb1518a880adffa","impliedFormat":1},{"version":"9a3b507c7f949ca6e0988c7a799913d8ad237434b61c5f8ef8651c770e82db8e","impliedFormat":1},{"version":"3470c8f802d69951553de4bf72f42a77b1d273c971dc8462d7ac94b2d5069171","impliedFormat":1},{"version":"778e3be9387041245dc4eddd0efe6a61f0ebe4bed017493a30785abd027b0458","impliedFormat":1},{"version":"312476b9c5aa822a32c969ad650d1b475b631506af9a1448abf2d714997f7510","impliedFormat":1},{"version":"2dc955a0fbc3c0b9a49bcc3ffb9dfb31b3a53af0db862260dd4f824c6b4ff36c","impliedFormat":1},{"version":"0f513df152e8cd877ddc47e1a767f77d2111d7b5dfbc4f68ca355d1dd59c062c","impliedFormat":1},{"version":"947dba9cff98d6eeeb5c1933600a03d2ea16967dc3c4080c15e5d4667990f814","impliedFormat":1},{"version":"396b5bf9e2469a7736cc70f5b0a4340bf5e74ca8337213cbfc1f9c44b0e3799c","impliedFormat":1},{"version":"0c904d0442caed7effc17e2c70c7c96df0b34797e1adb9999ce5e5bbbf7e1471","impliedFormat":1},{"version":"4e42a180e6ad34da29c0f9e0e34dfe728292d4148aeb1a36e3ca8e6551f0fc42","impliedFormat":1},{"version":"8722ec4640f5eb5dcc91be6e59e6148b861e93954a766e05d5d55dd96b29e1c1","impliedFormat":1},{"version":"3118f4f3494834d0a131955088b28cba84639a66e23e6de211bdb75fe518ea90","impliedFormat":1},{"version":"8ec50f5d9824f3692fe32a80fb160d72ea39d94c5aac4f3334f7724ae61de6df","impliedFormat":1},{"version":"dfafee7cd0b796c959cd7f4c6d4ae2f1f89fab40129d993dd564f9ef0bd0068d","impliedFormat":1},{"version":"24056a75e8e602d911cea68b06b5e238604aff92d30ec8a119a2ecf07568d4fb","impliedFormat":1},{"version":"bc5fa245e7a3eb9216ce30106e37294a9691efd85391e3de61478c3ca0da360e","impliedFormat":1},{"version":"4523237b5a992a30850668522bb1719bab8f9e50c00b6428f660ca75a451a7b1","impliedFormat":1},{"version":"f116a1399a2583ff7ce15068f007e5c47d06c9964674bc48ea6e69867d0692a5","impliedFormat":1},{"version":"68cabe63e69d17160c77eeefafd83df10a4c0ec3353b6a91a48a205e9dd505ab","impliedFormat":1},{"version":"400ba51008a98a5afc065b12c3aee8f447a0b66c2a4c1bcc3e5a2f41015ddee7","impliedFormat":1},{"version":"49f735c4888a72b7e70b4a90db308ea672967fc2a1670c5b6b598f6b09403baf","impliedFormat":1},{"version":"5a75e49d8e0a78e2cc02bd13fcab4f26d5d6729912e2096b6fe442b0960c0cf7","impliedFormat":1},{"version":"8dd31c3f136773aac1b62723ada4c7fab649dddbe02274424cdac9b9a76bc22d","impliedFormat":1},{"version":"5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","impliedFormat":1},{"version":"c2869c4f2f79fd2d03278a68ce7c061a5a8f4aed59efb655e25fe502e3e471d5","impliedFormat":1},{"version":"b8fe42dbf4b0efba2eb4dbfb2b95a3712676717ff8469767dc439e75d0c1a3b6","impliedFormat":1},{"version":"8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","impliedFormat":1},{"version":"ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","impliedFormat":1},{"version":"83306c97a4643d78420f082547ea0d488a0d134c922c8e65fc0b4f08ef66d92b","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","impliedFormat":1},{"version":"c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","impliedFormat":1},{"version":"dccd26a5c85325a011aff40f401e0892bd0688d44132ba79e803c67e68fffea5","impliedFormat":1},{"version":"f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","impliedFormat":1},{"version":"b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","impliedFormat":1},{"version":"5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","impliedFormat":1},{"version":"9aa0869b3f0b58d5a2220b1d6111ab3a734e9d0b3bd820a59216357c848f413b","signature":"7e0062d659dfc76e70897c1e8d9f4f461f6ac1158da4714877f166f5bbef6161"},"d51485b82b29d07016e9d3359f271622966aca8edfc59648a1d2369e6404123d",{"version":"03f1d83d61696326ea29c8a1c15cbaccf61e92598d53f2ccae06078531f42448","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"3a9313fe5ace558b8b18e85f931da10b259e738775f411c061e5f15787b138eb","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"e9ad08a376ac84948fcca0013d6f1d4ae4f9522e26b91f87945b97c99d7cc30b","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"04296378d9636f6f9450a6e2b9889ea1d3b72a05b9270cb529ace09f04cda1f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"918d3b03a75858dcd5dbb275f19448b6b9a222aa8fc8471aca38c28a32ecb40f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bd91a2a356600dee28eb0438082d0799a18a974a6537c4410a796bab749813c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"ed6b820c54de95b2510bb673490d61c7f2187f532a339d8d04981645a918961f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"aa17748c522bd586f8712b1a308ea23af59c309b2fd278f6d4f406647c72e659","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1}],"root":[218,219],"options":{"declaration":true,"esModuleInterop":true,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":5},"referencedMap":[[222,1],[220,2],[148,3],[144,4],[145,5],[142,2],[147,6],[143,2],[146,5],[155,2],[161,2],[162,2],[163,2],[164,2],[165,2],[166,2],[167,2],[168,2],[169,2],[170,2],[225,7],[221,1],[223,8],[224,1],[324,9],[325,2],[326,10],[327,11],[328,12],[270,13],[271,13],[272,14],[231,15],[273,16],[274,17],[275,18],[226,2],[229,19],[227,2],[228,2],[276,20],[277,21],[278,22],[279,23],[280,24],[281,25],[282,25],[284,26],[283,27],[285,28],[286,29],[287,30],[269,31],[230,2],[288,32],[289,33],[290,34],[323,35],[291,36],[292,37],[293,38],[294,39],[295,40],[296,41],[297,42],[298,43],[299,44],[300,45],[301,45],[302,46],[303,2],[304,2],[305,47],[307,48],[306,49],[308,50],[309,51],[310,52],[311,53],[312,54],[313,55],[314,56],[315,57],[316,58],[317,59],[318,60],[319,61],[320,62],[321,63],[322,64],[329,2],[330,2],[332,65],[333,2],[334,2],[335,66],[81,67],[82,68],[101,69],[96,70],[97,71],[98,72],[99,70],[100,70],[89,73],[88,74],[86,75],[87,76],[92,77],[93,78],[94,78],[95,78],[85,79],[91,80],[90,81],[83,2],[79,2],[80,2],[84,82],[331,2],[174,2],[116,83],[118,84],[120,85],[130,86],[132,87],[109,88],[114,89],[121,90],[133,91],[111,92],[134,93],[124,94],[136,95],[137,93],[139,96],[127,97],[140,98],[149,99],[141,100],[106,101],[151,102],[152,103],[154,104],[102,2],[158,105],[128,106],[107,93],[157,107],[105,108],[117,109],[119,109],[129,110],[131,109],[115,111],[113,112],[135,93],[103,113],[112,113],[153,114],[156,115],[104,116],[150,2],[171,117],[185,118],[175,119],[181,120],[178,121],[179,122],[186,123],[108,2],[201,124],[159,118],[138,113],[160,90],[172,125],[189,126],[173,98],[182,127],[110,100],[122,128],[183,129],[184,130],[180,131],[187,132],[188,133],[123,100],[190,134],[191,2],[125,135],[192,90],[194,136],[195,136],[196,137],[197,138],[193,139],[176,140],[177,141],[198,142],[199,143],[200,118],[202,144],[203,145],[126,116],[204,146],[77,2],[78,2],[13,2],[14,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[25,2],[26,2],[4,2],[27,2],[31,2],[28,2],[29,2],[30,2],[32,2],[33,2],[34,2],[5,2],[35,2],[36,2],[37,2],[38,2],[6,2],[42,2],[39,2],[40,2],[41,2],[43,2],[7,2],[44,2],[49,2],[50,2],[45,2],[46,2],[47,2],[48,2],[8,2],[54,2],[51,2],[52,2],[53,2],[55,2],[9,2],[56,2],[57,2],[58,2],[60,2],[59,2],[61,2],[62,2],[10,2],[63,2],[64,2],[65,2],[11,2],[66,2],[67,2],[68,2],[69,2],[70,2],[1,2],[71,2],[72,2],[12,2],[75,2],[74,2],[73,2],[76,2],[247,147],[257,148],[246,147],[267,149],[238,150],[237,151],[266,12],[260,152],[265,153],[240,154],[254,155],[239,156],[263,157],[235,158],[234,12],[264,159],[236,160],[241,161],[242,2],[245,161],[232,2],[268,162],[258,163],[249,164],[250,165],[252,166],[248,167],[251,168],[261,12],[243,169],[244,170],[253,171],[233,172],[256,163],[255,161],[259,2],[262,173],[217,174],[209,175],[215,176],[211,2],[212,2],[210,177],[213,174],[205,2],[206,2],[216,178],[208,179],[214,180],[207,181],[219,182],[218,183]],"version":"5.7.2"}
node_modules/@farcaster/frame-core/dist/types.d.ts
Changed around line 1
+ import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from "ox";
+ import { z } from "zod";
+ export type SetPrimaryButton = (options: {
+ text: string;
+ loading?: boolean;
+ disabled?: boolean;
+ hidden?: boolean;
+ }) => void;
+ export type EthProviderRequest = Provider.RequestFn;
+ export type AccountLocation = {
+ placeId: string;
+ /**
+ * Human-readable string describing the location
+ */
+ description: string;
+ };
+ export type FrameLocationNotificationContext = {
+ type: "notification";
+ notification: {
+ notificationId: string;
+ title: string;
+ body: string;
+ };
+ };
+ export type FrameLocationContext = FrameLocationNotificationContext;
+ export type FrameContext = {
+ user: {
+ fid: number;
+ username?: string;
+ displayName?: string;
+ /**
+ * Profile image URL
+ */
+ pfpUrl?: string;
+ };
+ location?: FrameLocationContext;
+ };
+ export declare const notificationDetailsSchema: z.ZodObject<{
+ url: z.ZodString;
+ token: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ token: string;
+ }, {
+ url: string;
+ token: string;
+ }>;
+ export type FrameNotificationDetails = z.infer;
+ export type AddFrameResult = {
+ added: true;
+ notificationDetails?: FrameNotificationDetails;
+ } | {
+ added: false;
+ reason: "invalid-domain-manifest" | "rejected-by-user";
+ };
+ export type AddFrame = () => Promise;
+ export type FrameHost = {
+ context: FrameContext;
+ close: () => void;
+ ready: () => void;
+ openUrl: (url: string) => void;
+ setPrimaryButton: SetPrimaryButton;
+ ethProviderRequest: EthProviderRequest;
+ ethProviderRequestV2: RpcTransport;
+ addFrame: AddFrame;
+ };
+ export declare const eventSchema: z.ZodObject<{
+ header: z.ZodString;
+ payload: z.ZodString;
+ signature: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ header: string;
+ payload: string;
+ signature: string;
+ }, {
+ header: string;
+ payload: string;
+ signature: string;
+ }>;
+ export type EventSchema = z.infer;
+ export declare const eventHeaderSchema: z.ZodObject<{
+ fid: z.ZodNumber;
+ type: z.ZodLiteral<"app_key">;
+ key: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ type: "app_key";
+ fid: number;
+ key: string;
+ }, {
+ type: "app_key";
+ fid: number;
+ key: string;
+ }>;
+ export type EventHeader = z.infer;
+ export declare const eventFrameAddedPayloadSchema: z.ZodObject<{
+ event: z.ZodLiteral<"frame-added">;
+ notificationDetails: z.ZodOptional
+ url: z.ZodString;
+ token: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ token: string;
+ }, {
+ url: string;
+ token: string;
+ }>>;
+ }, "strip", z.ZodTypeAny, {
+ event: "frame-added";
+ notificationDetails?: {
+ url: string;
+ token: string;
+ } | undefined;
+ }, {
+ event: "frame-added";
+ notificationDetails?: {
+ url: string;
+ token: string;
+ } | undefined;
+ }>;
+ export type EventFrameAddedPayload = z.infer;
+ export declare const eventFrameRemovedPayloadSchema: z.ZodObject<{
+ event: z.ZodLiteral<"frame-removed">;
+ }, "strip", z.ZodTypeAny, {
+ event: "frame-removed";
+ }, {
+ event: "frame-removed";
+ }>;
+ export type EventFrameRemovedPayload = z.infer;
+ export declare const eventNotificationsEnabledPayloadSchema: z.ZodObject<{
+ event: z.ZodLiteral<"notifications-enabled">;
+ notificationDetails: z.ZodObject<{
+ url: z.ZodString;
+ token: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ token: string;
+ }, {
+ url: string;
+ token: string;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ event: "notifications-enabled";
+ notificationDetails: {
+ url: string;
+ token: string;
+ };
+ }, {
+ event: "notifications-enabled";
+ notificationDetails: {
+ url: string;
+ token: string;
+ };
+ }>;
+ export type EventNotificationsEnabledPayload = z.infer;
+ export declare const notificationsDisabledPayloadSchema: z.ZodObject<{
+ event: z.ZodLiteral<"notifications-disabled">;
+ }, "strip", z.ZodTypeAny, {
+ event: "notifications-disabled";
+ }, {
+ event: "notifications-disabled";
+ }>;
+ export type EventNotificationsDisabledPayload = z.infer;
+ export declare const eventPayloadSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
+ event: z.ZodLiteral<"frame-added">;
+ notificationDetails: z.ZodOptional
+ url: z.ZodString;
+ token: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ token: string;
+ }, {
+ url: string;
+ token: string;
+ }>>;
+ }, "strip", z.ZodTypeAny, {
+ event: "frame-added";
+ notificationDetails?: {
+ url: string;
+ token: string;
+ } | undefined;
+ }, {
+ event: "frame-added";
+ notificationDetails?: {
+ url: string;
+ token: string;
+ } | undefined;
+ }>, z.ZodObject<{
+ event: z.ZodLiteral<"frame-removed">;
+ }, "strip", z.ZodTypeAny, {
+ event: "frame-removed";
+ }, {
+ event: "frame-removed";
+ }>, z.ZodObject<{
+ event: z.ZodLiteral<"notifications-enabled">;
+ notificationDetails: z.ZodObject<{
+ url: z.ZodString;
+ token: z.ZodString;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ token: string;
+ }, {
+ url: string;
+ token: string;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ event: "notifications-enabled";
+ notificationDetails: {
+ url: string;
+ token: string;
+ };
+ }, {
+ event: "notifications-enabled";
+ notificationDetails: {
+ url: string;
+ token: string;
+ };
+ }>, z.ZodObject<{
+ event: z.ZodLiteral<"notifications-disabled">;
+ }, "strip", z.ZodTypeAny, {
+ event: "notifications-disabled";
+ }, {
+ event: "notifications-disabled";
+ }>]>;
+ export type FrameEvent = z.infer;
+ export declare const sendNotificationRequestSchema: z.ZodObject<{
+ notificationId: z.ZodString;
+ title: z.ZodString;
+ body: z.ZodString;
+ targetUrl: z.ZodString;
+ tokens: z.ZodArray;
+ }, "strip", z.ZodTypeAny, {
+ notificationId: string;
+ title: string;
+ body: string;
+ targetUrl: string;
+ tokens: string[];
+ }, {
+ notificationId: string;
+ title: string;
+ body: string;
+ targetUrl: string;
+ tokens: string[];
+ }>;
+ export type SendNotificationRequest = z.infer;
+ export declare const sendNotificationResponseSchema: z.ZodObject<{
+ result: z.ZodObject<{
+ successfulTokens: z.ZodArray;
+ invalidTokens: z.ZodArray;
+ rateLimitedTokens: z.ZodArray;
+ }, "strip", z.ZodTypeAny, {
+ successfulTokens: string[];
+ invalidTokens: string[];
+ rateLimitedTokens: string[];
+ }, {
+ successfulTokens: string[];
+ invalidTokens: string[];
+ rateLimitedTokens: string[];
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ result: {
+ successfulTokens: string[];
+ invalidTokens: string[];
+ rateLimitedTokens: string[];
+ };
+ }, {
+ result: {
+ successfulTokens: string[];
+ invalidTokens: string[];
+ rateLimitedTokens: string[];
+ };
+ }>;
+ export type SendNotificationResponse = z.infer;
+ export type RpcTransport = (request: RpcRequest.RpcRequest) => Promise;
+ export type ProviderRpcError = {
+ code: number;
+ details?: string;
+ message?: string;
+ };
+ export type EthProviderWireEvent = {
+ event: "accountsChanged";
+ params: [readonly Address.Address[]];
+ } | {
+ event: "chainChanged";
+ params: [string];
+ } | {
+ event: "connect";
+ params: [Provider.ConnectInfo];
+ } | {
+ event: "disconnect";
+ params: [ProviderRpcError];
+ } | {
+ event: "message";
+ params: [Provider.Message];
+ };
+ export type EmitEthProvider = (event: event, params: Extract
+ event: event;
+ }>['params']) => void;
node_modules/@farcaster/frame-core/dist/types.js
Changed around line 1
+ import { z } from "zod";
+ export const notificationDetailsSchema = z.object({
+ url: z.string(),
+ token: z.string(),
+ });
+ export const eventSchema = z.object({
+ header: z.string(),
+ payload: z.string(),
+ signature: z.string(),
+ });
+ // JSON Farcaster Signature header after decoding
+ export const eventHeaderSchema = z.object({
+ fid: z.number(),
+ type: z.literal("app_key"),
+ key: z.string().startsWith("0x"),
+ });
+ // Webhook event payload after decoding
+ export const eventFrameAddedPayloadSchema = z.object({
+ event: z.literal("frame-added"),
+ notificationDetails: notificationDetailsSchema.optional(),
+ });
+ export const eventFrameRemovedPayloadSchema = z.object({
+ event: z.literal("frame-removed"),
+ });
+ export const eventNotificationsEnabledPayloadSchema = z.object({
+ event: z.literal("notifications-enabled"),
+ notificationDetails: notificationDetailsSchema.required(),
+ });
+ export const notificationsDisabledPayloadSchema = z.object({
+ event: z.literal("notifications-disabled"),
+ });
+ export const eventPayloadSchema = z.discriminatedUnion("event", [
+ eventFrameAddedPayloadSchema,
+ eventFrameRemovedPayloadSchema,
+ eventNotificationsEnabledPayloadSchema,
+ notificationsDisabledPayloadSchema,
+ ]);
+ // Notifications API request and response formats
+ export const sendNotificationRequestSchema = z.object({
+ notificationId: z.string().uuid(),
+ title: z.string().max(32),
+ body: z.string().max(128),
+ targetUrl: z.string().max(256),
+ tokens: z.string().array().max(100),
+ });
+ export const sendNotificationResponseSchema = z.object({
+ result: z.object({
+ successfulTokens: z.array(z.string()),
+ invalidTokens: z.array(z.string()),
+ rateLimitedTokens: z.array(z.string()),
+ }),
+ });
node_modules/@farcaster/frame-core/package.json
Changed around line 1
+ {
+ "name": "@farcaster/frame-core",
+ "version": "0.0.7",
+ "main": "dist/index.js",
+ "scripts": {
+ "clean": "rm -rf dist",
+ "prebuild": "npm run clean",
+ "build": "tsc",
+ "typecheck": "tsc --noEmit"
+ },
+ "files": [
+ "dist",
+ "src"
+ ],
+ "devDependencies": {
+ "@farcaster/tsconfig": "*",
+ "typescript": "^5.6.3"
+ },
+ "dependencies": {
+ "ox": "^0.4.0",
+ "zod": "^3.23.8"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+ }
node_modules/@farcaster/frame-core/src/index.ts
Changed around line 1
+ export * from "./types";
node_modules/@farcaster/frame-core/src/types.ts
Changed around line 1
+ import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from "ox";
+ import { z } from "zod";
+
+ export type SetPrimaryButton = (options: {
+ text: string;
+ loading?: boolean;
+ disabled?: boolean;
+ hidden?: boolean;
+ }) => void;
+
+ export type EthProviderRequest = Provider.RequestFn;
+
+ export type AccountLocation = {
+ placeId: string;
+ /**
+ * Human-readable string describing the location
+ */
+ description: string;
+ };
+
+ export type FrameLocationNotificationContext = {
+ type: "notification";
+ notification: {
+ notificationId: string;
+ title: string;
+ body: string;
+ };
+ };
+
+ export type FrameLocationContext = FrameLocationNotificationContext;
+
+ export type FrameContext = {
+ user: {
+ fid: number;
+ username?: string;
+ displayName?: string;
+ /**
+ * Profile image URL
+ */
+ pfpUrl?: string;
+ };
+ location?: FrameLocationContext;
+ };
+
+ export const notificationDetailsSchema = z.object({
+ url: z.string(),
+ token: z.string(),
+ });
+ export type FrameNotificationDetails = z.infer<
+ typeof notificationDetailsSchema
+ >;
+
+ export type AddFrameResult =
+ | {
+ added: true;
+ notificationDetails?: FrameNotificationDetails;
+ }
+ | {
+ added: false;
+ reason: "invalid-domain-manifest" | "rejected-by-user";
+ };
+
+ export type AddFrame = () => Promise;
+
+ export type FrameHost = {
+ context: FrameContext;
+ close: () => void;
+ ready: () => void;
+ openUrl: (url: string) => void;
+ setPrimaryButton: SetPrimaryButton;
+ ethProviderRequest: EthProviderRequest;
+ ethProviderRequestV2: RpcTransport;
+ addFrame: AddFrame;
+ };
+
+ export const eventSchema = z.object({
+ header: z.string(),
+ payload: z.string(),
+ signature: z.string(),
+ });
+ export type EventSchema = z.infer;
+
+ // JSON Farcaster Signature header after decoding
+
+ export const eventHeaderSchema = z.object({
+ fid: z.number(),
+ type: z.literal("app_key"),
+ key: z.string().startsWith("0x"),
+ });
+ export type EventHeader = z.infer;
+
+ // Webhook event payload after decoding
+
+ export const eventFrameAddedPayloadSchema = z.object({
+ event: z.literal("frame-added"),
+ notificationDetails: notificationDetailsSchema.optional(),
+ });
+ export type EventFrameAddedPayload = z.infer<
+ typeof eventFrameAddedPayloadSchema
+ >;
+
+ export const eventFrameRemovedPayloadSchema = z.object({
+ event: z.literal("frame-removed"),
+ });
+ export type EventFrameRemovedPayload = z.infer<
+ typeof eventFrameRemovedPayloadSchema
+ >;
+
+ export const eventNotificationsEnabledPayloadSchema = z.object({
+ event: z.literal("notifications-enabled"),
+ notificationDetails: notificationDetailsSchema.required(),
+ });
+ export type EventNotificationsEnabledPayload = z.infer<
+ typeof eventNotificationsEnabledPayloadSchema
+ >;
+
+ export const notificationsDisabledPayloadSchema = z.object({
+ event: z.literal("notifications-disabled"),
+ });
+ export type EventNotificationsDisabledPayload = z.infer<
+ typeof notificationsDisabledPayloadSchema
+ >;
+
+ export const eventPayloadSchema = z.discriminatedUnion("event", [
+ eventFrameAddedPayloadSchema,
+ eventFrameRemovedPayloadSchema,
+ eventNotificationsEnabledPayloadSchema,
+ notificationsDisabledPayloadSchema,
+ ]);
+ export type FrameEvent = z.infer;
+
+ // Notifications API request and response formats
+
+ export const sendNotificationRequestSchema = z.object({
+ notificationId: z.string().uuid(),
+ title: z.string().max(32),
+ body: z.string().max(128),
+ targetUrl: z.string().max(256),
+ tokens: z.string().array().max(100),
+ });
+ export type SendNotificationRequest = z.infer<
+ typeof sendNotificationRequestSchema
+ >;
+
+ export const sendNotificationResponseSchema = z.object({
+ result: z.object({
+ successfulTokens: z.array(z.string()),
+ invalidTokens: z.array(z.string()),
+ rateLimitedTokens: z.array(z.string()),
+ }),
+ });
+ export type SendNotificationResponse = z.infer<
+ typeof sendNotificationResponseSchema
+ >;
+
+ export type RpcTransport = (
+ request: RpcRequest.RpcRequest
+ ) => Promise;
+
+ export type ProviderRpcError = {
+ code: number;
+ details?: string;
+ message?: string;
+ }
+
+ export type EthProviderWireEvent = {
+ event: "accountsChanged",
+ params: [readonly Address.Address[]]
+ } | {
+ event: "chainChanged",
+ params: [string]
+ } | {
+ event: "connect",
+ params: [Provider.ConnectInfo]
+ } | {
+ event: "disconnect",
+ params: [ProviderRpcError]
+ } | {
+ event: "message",
+ params: [Provider.Message]
+ };
+
+ export type EmitEthProvider = <
+ event extends EthProviderWireEvent['event']
+ >(
+ event: event,
+ params: Extract['params']
+ ) => void;
node_modules/@farcaster/frame-sdk/README.md
Changed around line 1
+ # Frame SDK
+
+ Not yet stable. [Learn more](https://github.com/farcasterxyz/frames/wiki/frames-v2-developer-playground-preview).
+
+ ## Install
+
+ Install using your favorite manager:
+
+ ```
+ npm install @farcaster/frame-sdk
+ ```
+
+ Or include via a CDN and access via `frame`:
+
+ ```
+
+
+ ```
+
node_modules/@farcaster/frame-sdk/dist/endpoint.d.ts
Changed around line 1
+ import { type Endpoint } from "comlink";
+ export declare const endpoint: Endpoint;
node_modules/@farcaster/frame-sdk/dist/endpoint.js
Changed around line 1
+ import { windowEndpoint } from "comlink";
+ const mockEndpoint = {
+ postMessage() {
+ // noop
+ },
+ addEventListener: () => {
+ // noop
+ },
+ removeEventListener: () => {
+ // noop
+ },
+ };
+ const webViewEndpoint = {
+ postMessage: (data) => {
+ console.debug("[webview:req]", data);
+ window.ReactNativeWebView.postMessage(JSON.stringify(data));
+ },
+ addEventListener: (_, listener, ...args) => {
+ document.addEventListener("FarcasterFrameCallback", listener, ...args);
+ },
+ removeEventListener: (_, listener) => {
+ document.removeEventListener("FarcasterFrameCallback", listener);
+ },
+ };
+ export const endpoint = (() => {
+ var _a;
+ // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint
+ if (typeof window === 'undefined')
+ return mockEndpoint;
+ return (window === null || window === void 0 ? void 0 : window.ReactNativeWebView)
+ ? webViewEndpoint
+ : windowEndpoint((_a = window === null || window === void 0 ? void 0 : window.parent) !== null && _a !== void 0 ? _a : window);
+ })();
node_modules/@farcaster/frame-sdk/dist/frameHost.d.ts
Changed around line 1
+ import { FrameHost } from "@farcaster/frame-core";
+ export declare const frameHost: import("comlink").Remote;
node_modules/@farcaster/frame-sdk/dist/frameHost.js
Changed around line 1
+ import { wrap } from "comlink";
+ import { endpoint } from "./endpoint";
+ export const frameHost = wrap(endpoint);
node_modules/@farcaster/frame-sdk/dist/index.d.ts
Changed around line 1
+ import { sdk } from "./sdk";
+ export * from "./sdk";
+ export * from "@farcaster/frame-core";
+ export default sdk;
node_modules/@farcaster/frame-sdk/dist/index.js
Changed around line 1
+ import { sdk } from "./sdk";
+ export * from "./sdk";
+ export * from "@farcaster/frame-core";
+ export default sdk;
node_modules/@farcaster/frame-sdk/dist/index.min.js
Changed around line 1
+ "use strict";var frame=(()=>{var nr=Object.create;var Ve=Object.defineProperty;var sr=Object.getOwnPropertyDescriptor;var ar=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var cr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),De=(t,e)=>{for(var r in e)Ve(t,r,{get:e[r],enumerable:!0})},bt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ar(e))!or.call(t,s)&&s!==r&&Ve(t,s,{get:()=>e[s],enumerable:!(n=sr(e,s))||n.enumerable});return t};var ur=(t,e,r)=>(r=t!=null?nr(ir(t)):{},bt(e||!t||!t.__esModule?Ve(r,"default",{value:t,enumerable:!0}):r,t)),dr=t=>bt(Ve({},"__esModule",{value:!0}),t);var xt=cr((qn,ot)=>{"use strict";var lr=Object.prototype.hasOwnProperty,j="~";function Ce(){}Object.create&&(Ce.prototype=Object.create(null),new Ce().__proto__||(j=!1));function fr(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function _t(t,e,r,n,s){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new fr(r,n||t,s),i=j?j+e:e;return t._events[i]?t._events[i].fn?t._events[i]=[t._events[i],a]:t._events[i].push(a):(t._events[i]=a,t._eventsCount++),t}function ze(t,e){--t._eventsCount===0?t._events=new Ce:delete t._events[e]}function k(){this._events=new Ce,this._eventsCount=0}k.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)lr.call(r,n)&&e.push(j?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};k.prototype.listeners=function(e){var r=j?j+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,a=n.length,i=new Array(a);sVt,default:()=>zn,eventFrameAddedPayloadSchema:()=>Qt,eventFrameRemovedPayloadSchema:()=>er,eventHeaderSchema:()=>Ln,eventNotificationsEnabledPayloadSchema:()=>tr,eventPayloadSchema:()=>$n,eventSchema:()=>Zn,notificationDetailsSchema:()=>gt,notificationsDisabledPayloadSchema:()=>rr,sdk:()=>ft,sendNotificationRequestSchema:()=>Vn,sendNotificationResponseSchema:()=>Dn});var Ne=ur(xt(),1);var kt=Symbol("Comlink.proxy"),pr=Symbol("Comlink.endpoint"),hr=Symbol("Comlink.releaseProxy"),ct=Symbol("Comlink.finalizer"),Be=Symbol("Comlink.thrown"),Et=t=>typeof t=="object"&&t!==null||typeof t=="function",mr={canHandle:t=>Et(t)&&t[kt],serialize(t){let{port1:e,port2:r}=new MessageChannel;return Ot(t,e),[r,[r]]},deserialize(t){return t.start(),dt(t)}},vr={canHandle:t=>Et(t)&&Be in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},Tt=new Map([["proxy",mr],["throw",vr]]);function yr(t,e){for(let r of t)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function Ot(t,e=globalThis,r=["*"]){e.addEventListener("message",function n(s){if(!s||!s.data)return;if(!yr(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}let{id:a,type:i,path:o}=Object.assign({path:[]},s.data),c=(s.data.argumentList||[]).map(F),u;try{let f=o.slice(0,-1).reduce((w,O)=>w[O],t),y=o.reduce((w,O)=>w[O],t);switch(i){case"GET":u=y;break;case"SET":f[o.slice(-1)[0]]=F(s.data.value),u=!0;break;case"APPLY":u=y.apply(f,c);break;case"CONSTRUCT":{let w=new y(...c);u=kr(w)}break;case"ENDPOINT":{let{port1:w,port2:O}=new MessageChannel;Ot(t,O),u=wr(w,[w])}break;case"RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[Be]:0}}Promise.resolve(u).catch(f=>({value:f,[Be]:0})).then(f=>{let[y,w]=He(f);e.postMessage(Object.assign(Object.assign({},y),{id:a}),w),i==="RELEASE"&&(e.removeEventListener("message",n),jt(e),ct in t&&typeof t[ct]=="function"&&t[ct]())}).catch(f=>{let[y,w]=He({value:new TypeError("Unserializable return value"),[Be]:0});e.postMessage(Object.assign(Object.assign({},y),{id:a}),w)})}),e.start&&e.start()}function gr(t){return t.constructor.name==="MessagePort"}function jt(t){gr(t)&&t.close()}function dt(t,e){let r=new Map;return t.addEventListener("message",function(s){let{data:a}=s;if(!a||!a.id)return;let i=r.get(a.id);if(i)try{i(a)}finally{r.delete(a.id)}}),ut(t,r,[],e)}function Ue(t){if(t)throw new Error("Proxy has been released and is not useable")}function Pt(t){return de(t,new Map,{type:"RELEASE"}).then(()=>{jt(t)})}var qe=new WeakMap,We="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{let e=(qe.get(t)||0)-1;qe.set(t,e),e===0&&Pt(t)});function br(t,e){let r=(qe.get(e)||0)+1;qe.set(e,r),We&&We.register(t,e,t)}function _r(t){We&&We.unregister(t)}function ut(t,e,r=[],n=function(){}){let s=!1,a=new Proxy(n,{get(i,o){if(Ue(s),o===hr)return()=>{_r(a),Pt(t),e.clear(),s=!0};if(o==="then"){if(r.length===0)return{then:()=>a};let c=de(t,e,{type:"GET",path:r.map(u=>u.toString())}).then(F);return c.then.bind(c)}return ut(t,e,[...r,o])},set(i,o,c){Ue(s);let[u,f]=He(c);return de(t,e,{type:"SET",path:[...r,o].map(y=>y.toString()),value:u},f).then(F)},apply(i,o,c){Ue(s);let u=r[r.length-1];if(u===pr)return de(t,e,{type:"ENDPOINT"}).then(F);if(u==="bind")return ut(t,e,r.slice(0,-1));let[f,y]=wt(c);return de(t,e,{type:"APPLY",path:r.map(w=>w.toString()),argumentList:f},y).then(F)},construct(i,o){Ue(s);let[c,u]=wt(o);return de(t,e,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(F)}});return br(a,t),a}function xr(t){return Array.prototype.concat.apply([],t)}function wt(t){let e=t.map(He);return[e.map(r=>r[0]),xr(e.map(r=>r[1]))]}var Rt=new WeakMap;function wr(t,e){return Rt.set(t,e),t}function kr(t){return Object.assign(t,{[kt]:!0})}function St(t,e=globalThis,r="*"){return{postMessage:(n,s)=>t.postMessage(n,r,s),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}function He(t){for(let[e,r]of Tt)if(r.canHandle(t)){let[n,s]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},s]}return[{type:"RAW",value:t},Rt.get(t)||[]]}function F(t){switch(t.type){case"HANDLER":return Tt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function de(t,e,r,n){return new Promise(s=>{let a=Er();e.set(a,s),t.start&&t.start(),t.postMessage(Object.assign({id:a},r),n)})}function Er(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Tr={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},Or={postMessage:t=>{console.debug("[webview:req]",t),window.ReactNativeWebView.postMessage(JSON.stringify(t))},addEventListener:(t,e,...r)=>{document.addEventListener("FarcasterFrameCallback",e,...r)},removeEventListener:(t,e)=>{document.removeEventListener("FarcasterFrameCallback",e)}},Ct=typeof window>"u"?Tr:window?.ReactNativeWebView?Or:St(window?.parent??window);var P=dt(Ct);var Nt="0.1.1";function At(){return Nt}var Fe=class t extends Error{constructor(e,r={}){let n=(()=>{if(r.cause instanceof t){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),s=r.cause instanceof t&&r.cause.docsPath||r.docsPath,i=`https://oxlib.sh${s??""}`,o=[e||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||s?["",n?`Details: ${n}`:void 0,s?`See: ${i}`:void 0]:[]].filter(c=>typeof c=="string").join(`
+ `);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${At()}`}),this.cause=r.cause,this.details=n,this.docs=i,this.docsPath=s,this.shortMessage=e}walk(e){return Mt(this,e)}};function Mt(t,e){return e?.(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?Mt(t.cause,e):e?null:t}var A={};De(A,{ChainDisconnectedError:()=>Xe,DisconnectedError:()=>Ke,IsUndefinedError:()=>Qe,ProviderRpcError:()=>U,UnauthorizedError:()=>Ge,UnsupportedMethodError:()=>Ye,UserRejectedRequestError:()=>Je,createEmitter:()=>Pr,from:()=>Rr});var J={};De(J,{BaseError:()=>E,InternalError:()=>xe,InvalidInputError:()=>le,InvalidParamsError:()=>_e,InvalidRequestError:()=>ge,LimitExceededError:()=>ve,MethodNotFoundError:()=>be,MethodNotSupportedError:()=>me,ParseError:()=>we,ResourceNotFoundError:()=>fe,ResourceUnavailableError:()=>pe,TransactionRejectedError:()=>he,VersionNotSupportedError:()=>ye,from:()=>jr,parse:()=>lt});function jr(t,e={}){let{request:r}=e;return{...t,id:t.id??r?.id,jsonrpc:t.jsonrpc??r.jsonrpc}}function lt(t,e={}){let{raw:r=!1}=e,n=t;if(r)return t;if(n.error){let{code:s}=n.error,a=s===xe.code?xe:s===le.code?le:s===_e.code?_e:s===ge.code?ge:s===ve.code?ve:s===be.code?be:s===me.code?me:s===we.code?we:s===fe.code?fe:s===pe.code?pe:s===he.code?he:s===ye.code?ye:E;throw new a(n.error)}return n.result}var E=class extends Error{constructor(e){let{code:r,message:n,data:s}=e;super(n),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r,this.data=s}},le=class t extends E{constructor(e={}){super({message:"Missing or invalid parameters.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidInputError"})}};Object.defineProperty(le,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});var fe=class t extends E{constructor(e={}){super({message:"Requested resource not found.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceNotFoundError"})}};Object.defineProperty(fe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});var pe=class t extends E{constructor(e={}){super({message:"Requested resource not available.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceUnavailableError"})}};Object.defineProperty(pe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});var he=class t extends E{constructor(e={}){super({message:"Transaction creation failed.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.TransactionRejectedError"})}};Object.defineProperty(he,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});var me=class t extends E{constructor(e={}){super({message:"Method is not implemented.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotSupportedError"})}};Object.defineProperty(me,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});var ve=class t extends E{constructor(e={}){super({message:"Rate limit exceeded.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.LimitExceededError"})}};Object.defineProperty(ve,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});var ye=class t extends E{constructor(e={}){super({message:"JSON-RPC version not supported.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.VersionNotSupportedError"})}};Object.defineProperty(ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});var ge=class t extends E{constructor(e={}){super({message:"Input is not a valid JSON-RPC request.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidRequestError"})}};Object.defineProperty(ge,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});var be=class t extends E{constructor(e={}){super({message:"Method does not exist.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotFoundError"})}};Object.defineProperty(be,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});var _e=class t extends E{constructor(e={}){super({message:"Invalid method parameters.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidParamsError"})}};Object.defineProperty(_e,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});var xe=class t extends E{constructor(e={}){super({message:"Internal JSON-RPC error.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InternalErrorError"})}};Object.defineProperty(xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});var we=class t extends E{constructor(e={}){super({message:"Failed to parse JSON-RPC response.",...e,code:t.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ParseError"})}};Object.defineProperty(we,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});var U=class extends Error{constructor(e,r){super(r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=r}},Je=class extends U{constructor({message:e="The user rejected the request."}={}){super(4001,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UserRejectedRequestError"})}};Object.defineProperty(Je,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});var Ge=class extends U{constructor({message:e="The requested method and/or account has not been authorized by the user."}={}){super(4100,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnauthorizedError"})}};Object.defineProperty(Ge,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});var Ye=class extends U{constructor({message:e="The provider does not support the requested method."}={}){super(4200,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnsupportedMethodError"})}};Object.defineProperty(Ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});var Ke=class extends U{constructor({message:e="The provider is disconnected from all chains."}={}){super(4900,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.DisconnectedError"})}};Object.defineProperty(Ke,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});var Xe=class extends U{constructor({message:e="The provider is not connected to the requested chain."}={}){super(4901,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.ChainDisconnectedError"})}};Object.defineProperty(Xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});function Pr(){let t=new Ne.default;return{get eventNames(){return t.eventNames.bind(t)},get listenerCount(){return t.listenerCount.bind(t)},get listeners(){return t.listeners.bind(t)},addListener:t.addListener.bind(t),emit:t.emit.bind(t),off:t.off.bind(t),on:t.on.bind(t),once:t.once.bind(t),removeAllListeners:t.removeAllListeners.bind(t),removeListener:t.removeListener.bind(t)}}function Rr(t,e={}){let{includeEvents:r=!0}=e;if(!t)throw new Qe;return{...r?{on:t.on?.bind(t),removeListener:t.removeListener?.bind(t)}:{},async request(n){let s=await t.request(n);return s&&typeof s=="object"&&"jsonrpc"in s?lt(s):s}}}var Qe=class extends Fe{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.IsUndefinedError"})}};var et={};De(et,{createStore:()=>Sr,from:()=>Zt});function Sr(t={}){let e=t.id??0;return{prepare(r){return Zt({id:e++,...r})},get id(){return e}}}function Zt(t){return{...t,jsonrpc:"2.0"}}var Lt=A.createEmitter(),Cr=et.createStore();function Nr({code:t,details:e}){switch(t){case 4001:return new A.UserRejectedRequestError;case 4100:return new A.UnauthorizedError;case 4200:return new A.UnsupportedMethodError;case 4900:return new A.DisconnectedError;case 4901:return new A.ChainDisconnectedError;default:return new A.ProviderRpcError(t,e??"Unknown provider RPC error")}}var $t=A.from({...Lt,async request(t){let e=Cr.prepare(t);try{let r=await P.ethProviderRequestV2(e).then(n=>J.parse(n,{request:e,raw:!0}));if(r.error)throw Nr(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await P.ethProviderRequest(e);throw r instanceof A.ProviderRpcError||r instanceof J.BaseError?r:new J.InternalError({message:r instanceof Error?r.message:void 0})}}});typeof document<"u"&&document.addEventListener("FarcasterFrameEthProviderEvent",t=>{if(t instanceof MessageEvent){let e=t.data;Lt.emit(e.event,...e.params)}});function Vt(){let t=new Ne.default;return{get eventNames(){return t.eventNames.bind(t)},get listenerCount(){return t.listenerCount.bind(t)},get listeners(){return t.listeners.bind(t)},addListener:t.addListener.bind(t),emit:t.emit.bind(t),off:t.off.bind(t),on:t.on.bind(t),once:t.once.bind(t),removeAllListeners:t.removeAllListeners.bind(t),removeListener:t.removeListener.bind(t)}}var Dt=Vt(),ft={...Dt,context:P.context,actions:{setPrimaryButton:P.setPrimaryButton.bind(P),ready:P.ready.bind(P),close:P.close.bind(P),openUrl:P.openUrl.bind(P),addFrame:P.addFrame.bind(P)},wallet:{ethProvider:$t}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",t=>{t instanceof MessageEvent&&t.data.type==="primaryButtonClicked"&&Dt.emit("primaryButtonClicked")});var x;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let a={};for(let i of s)a[i]=i;return a},t.getValidEnumValues=s=>{let a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(let o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let a=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(let i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var ht;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ht||(ht={}));var p=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=t=>{switch(typeof t){case"undefined":return p.undefined;case"string":return p.string;case"number":return isNaN(t)?p.nan:p.number;case"boolean":return p.boolean;case"function":return p.function;case"bigint":return p.bigint;case"symbol":return p.symbol;case"object":return Array.isArray(t)?p.array:t===null?p.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?p.promise:typeof Map<"u"&&t instanceof Map?p.map:typeof Set<"u"&&t instanceof Set?p.set:typeof Date<"u"&&t instanceof Date?p.date:p.object;default:return p.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ar=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),C=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,c=0;for(;cr.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};C.create=t=>new C(t);var Te=(t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===p.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}},Bt=Te;function Mr(t){Bt=t}function tt(){return Bt}var rt=t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)o=u(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},Ir=[];function l(t,e){let r=tt(),n=rt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Te?void 0:Te].filter(s=>!!s)});t.common.issues.push(n)}var T=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return v;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let a=await s.key,i=await s.value;n.push({key:a,value:i})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return v;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}},v=Object.freeze({status:"aborted"}),Ee=t=>({status:"dirty",value:t}),R=t=>({status:"valid",value:t}),mt=t=>t.status==="aborted",vt=t=>t.status==="dirty",Ie=t=>t.status==="valid",Ze=t=>typeof Promise<"u"&&t instanceof Promise;function nt(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function qt(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}var h;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var Ae,Me,I=class{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},zt=(t,e)=>{if(Ie(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new C(t.common.issues);return this._error=r,this._error}}};function g(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var c,u;let{message:f}=t;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:(c=f??n)!==null&&c!==void 0?c:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:o.defaultError}},description:s}}var b=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ze(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},a=this._parseSync({data:e,path:s.path,parent:s});return zt(s,a)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(Ze(s)?s:Promise.resolve(s));return zt(n,a)}refine(e,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{let i=e(s),o=()=>a.addIssue({code:d.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new N({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return M.create(this,this._def)}nullable(){return $.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this,this._def)}promise(){return H.create(this,this._def)}or(e){return te.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new N({...g(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new oe({...g(this._def),innerType:this,defaultValue:r,typeName:m.ZodDefault})}brand(){return new Le({typeName:m.ZodBranded,type:this,...g(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ce({...g(this._def),innerType:this,catchValue:r,typeName:m.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return ue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Zr=/^c[^\s-]{8,}$/i,Lr=/^[0-9a-z]+$/,$r=/^[0-9A-HJKMNP-TV-Z]{26}$/,Vr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Dr=/^[a-z0-9_-]{21}$/i,zr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ur=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Br="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pt,qr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Wr=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Hr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Fr=new RegExp(`^${Wt}$`);function Ht(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Jr(t){return new RegExp(`^${Ht(t)}$`)}function Ft(t){let e=`${Wt}T${Ht(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Gr(t,e){return!!((e==="v4"||!e)&&qr.test(t)||(e==="v6"||!e)&&Wr.test(t))}var q=class t extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.string,received:a.parsedType}),v}let n=new T,s;for(let a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.lengthe.test(s),{validation:r,code:d.invalid_string,...h.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...h.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...h.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...h.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...h.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...h.errToObj(r)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value{var e;return new q({checks:[],typeName:m.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...g(t)})};function Yr(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}var G=class t extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.number,received:a.parsedType}),v}let n,s=new T;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Yr(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_finite,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,h.toString(r))}gt(e,r){return this.setLimit("min",e,!1,h.toString(r))}lte(e,r){return this.setLimit("max",e,!0,h.toString(r))}lt(e,r){return this.setLimit("max",e,!1,h.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.valuenew G({checks:[],typeName:m.ZodNumber,coerce:t?.coerce||!1,...g(t)});var Y=class t extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==p.bigint){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.bigint,received:a.parsedType}),v}let n,s=new T;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,h.toString(r))}gt(e,r){return this.setLimit("min",e,!1,h.toString(r))}lte(e,r){return this.setLimit("max",e,!0,h.toString(r))}lt(e,r){return this.setLimit("max",e,!1,h.toString(r))}setLimit(e,r,n,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value{var e;return new Y({checks:[],typeName:m.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...g(t)})};var K=class extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.boolean,received:n.parsedType}),v}return R(e.data)}};K.create=t=>new K({typeName:m.ZodBoolean,coerce:t?.coerce||!1,...g(t)});var X=class t extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:p.date,received:a.parsedType}),v}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),v}let n=new T,s;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew X({checks:[],coerce:t?.coerce||!1,typeName:m.ZodDate,...g(t)});var Oe=class extends b{_parse(e){if(this._getType(e)!==p.symbol){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.symbol,received:n.parsedType}),v}return R(e.data)}};Oe.create=t=>new Oe({typeName:m.ZodSymbol,...g(t)});var Q=class extends b{_parse(e){if(this._getType(e)!==p.undefined){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.undefined,received:n.parsedType}),v}return R(e.data)}};Q.create=t=>new Q({typeName:m.ZodUndefined,...g(t)});var ee=class extends b{_parse(e){if(this._getType(e)!==p.null){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.null,received:n.parsedType}),v}return R(e.data)}};ee.create=t=>new ee({typeName:m.ZodNull,...g(t)});var W=class extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}};W.create=t=>new W({typeName:m.ZodAny,...g(t)});var D=class extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}};D.create=t=>new D({typeName:m.ZodUnknown,...g(t)});var Z=class extends b{_parse(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:p.never,received:r.parsedType}),v}};Z.create=t=>new Z({typeName:m.ZodNever,...g(t)});var je=class extends b{_parse(e){if(this._getType(e)!==p.undefined){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.void,received:n.parsedType}),v}return R(e.data)}};je.create=t=>new je({typeName:m.ZodVoid,...g(t)});var z=class t extends b{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==p.array)return l(r,{code:d.invalid_type,expected:p.array,received:r.parsedType}),v;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,o=r.data.lengths.maxLength.value&&(l(r,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new I(r,i,r.path,o)))).then(i=>T.mergeArray(n,i));let a=[...r.data].map((i,o)=>s.type._parseSync(new I(r,i,r.path,o)));return T.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:h.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:h.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:h.toString(r)}})}nonempty(e){return this.min(1,e)}};z.create=(t,e)=>new z({type:t,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...g(e)});function ke(t){if(t instanceof S){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=M.create(ke(n))}return new S({...t._def,shape:()=>e})}else return t instanceof z?new z({...t._def,type:ke(t.element)}):t instanceof M?M.create(ke(t.unwrap())):t instanceof $?$.create(ke(t.unwrap())):t instanceof L?L.create(t.items.map(e=>ke(e))):t}var S=class t extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==p.object){let u=this._getOrReturnCtx(e);return l(u,{code:d.invalid_type,expected:p.object,received:u.parsedType}),v}let{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Z&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||o.push(u);let c=[];for(let u of i){let f=a[u],y=s.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new I(s,y,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Z){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of o)c.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(u==="strict")o.length>0&&(l(s,{code:d.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let f of o){let y=s.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new I(s,y,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let y=await f.key,w=await f.value;u.push({key:y,value:w,alwaysSet:f.alwaysSet})}return u}).then(u=>T.mergeObjectSync(n,u)):T.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,a,i,o;let c=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return ke(this)}partial(e){let r={};return x.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof M;)a=a._def.innerType;r[n]=a}}),new t({...this._def,shape:()=>r})}keyof(){return Jt(x.objectKeys(this.shape))}};S.create=(t,e)=>new S({shape:()=>t,unknownKeys:"strip",catchall:Z.create(),typeName:m.ZodObject,...g(e)});S.strictCreate=(t,e)=>new S({shape:()=>t,unknownKeys:"strict",catchall:Z.create(),typeName:m.ZodObject,...g(e)});S.lazycreate=(t,e)=>new S({shape:t,unknownKeys:"strip",catchall:Z.create(),typeName:m.ZodObject,...g(e)});var te=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new C(o.ctx.common.issues));return l(r,{code:d.invalid_union,unionErrors:i}),v}if(r.common.async)return Promise.all(n.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(c=>new C(c));return l(r,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}};te.create=(t,e)=>new te({options:t,typeName:m.ZodUnion,...g(e)});var V=t=>t instanceof ne?V(t.schema):t instanceof N?V(t.innerType()):t instanceof se?[t.value]:t instanceof ae?t.options:t instanceof ie?x.objectValues(t.enum):t instanceof oe?V(t._def.innerType):t instanceof Q?[void 0]:t instanceof ee?[null]:t instanceof M?[void 0,...V(t.unwrap())]:t instanceof $?[null,...V(t.unwrap())]:t instanceof Le||t instanceof ue?V(t.unwrap()):t instanceof ce?V(t._def.innerType):[],st=class t extends b{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.object)return l(r,{code:d.invalid_type,expected:p.object,received:r.parsedType}),v;let n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(l(r,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let a of r){let i=V(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new t({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...g(n)})}};function yt(t,e){let r=B(t),n=B(e);if(t===e)return{valid:!0,data:t};if(r===p.object&&n===p.object){let s=x.objectKeys(e),a=x.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(let o of a){let c=yt(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===p.array&&n===p.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let a=0;a{if(mt(a)||mt(i))return v;let o=yt(a.value,i.value);return o.valid?((vt(a)||vt(i))&&r.dirty(),{status:r.value,value:o.data}):(l(n,{code:d.invalid_intersection_types}),v)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};re.create=(t,e,r)=>new re({left:t,right:e,typeName:m.ZodIntersection,...g(r)});var L=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.array)return l(n,{code:d.invalid_type,expected:p.array,received:n.parsedType}),v;if(n.data.lengththis._def.items.length&&(l(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((i,o)=>{let c=this._def.items[o]||this._def.rest;return c?c._parse(new I(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>T.mergeArray(r,i)):T.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};L.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:t,typeName:m.ZodTuple,rest:null,...g(e)})};var at=class t extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.object)return l(n,{code:d.invalid_type,expected:p.object,received:n.parsedType}),v;let s=[],a=this._def.keyType,i=this._def.valueType;for(let o in n.data)s.push({key:a._parse(new I(n,o,n.path,o)),value:i._parse(new I(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?T.mergeObjectAsync(r,s):T.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof b?new t({keyType:e,valueType:r,typeName:m.ZodRecord,...g(n)}):new t({keyType:q.create(),valueType:e,typeName:m.ZodRecord,...g(r)})}},Pe=class extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.map)return l(n,{code:d.invalid_type,expected:p.map,received:n.parsedType}),v;let s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,c],u)=>({key:s._parse(new I(n,o,n.path,[u,"key"])),value:a._parse(new I(n,c,n.path,[u,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return v;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(u.value,f.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let c of i){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return v;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(u.value,f.value)}return{status:r.value,value:o}}}};Pe.create=(t,e,r)=>new Pe({valueType:e,keyType:t,typeName:m.ZodMap,...g(r)});var Re=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.set)return l(n,{code:d.invalid_type,expected:p.set,received:n.parsedType}),v;let s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(l(n,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let a=this._def.valueType;function i(c){let u=new Set;for(let f of c){if(f.status==="aborted")return v;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}let o=[...n.data.values()].map((c,u)=>a._parse(new I(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:h.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:h.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Re.create=(t,e)=>new Re({valueType:t,minSize:null,maxSize:null,typeName:m.ZodSet,...g(e)});var it=class t extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.function)return l(r,{code:d.invalid_type,expected:p.function,received:r.parsedType}),v;function n(o,c){return rt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,tt(),Te].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:c}})}function s(o,c){return rt({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,tt(),Te].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof H){let o=this;return R(async function(...c){let u=new C([]),f=await o._def.args.parseAsync(c,a).catch(O=>{throw u.addIssue(n(c,O)),u}),y=await Reflect.apply(i,this,f);return await o._def.returns._def.type.parseAsync(y,a).catch(O=>{throw u.addIssue(s(y,O)),u})})}else{let o=this;return R(function(...c){let u=o._def.args.safeParse(c,a);if(!u.success)throw new C([n(c,u.error)]);let f=Reflect.apply(i,this,u.data),y=o._def.returns.safeParse(f,a);if(!y.success)throw new C([s(f,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:L.create(e).rest(D.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||L.create([]).rest(D.create()),returns:r||D.create(),typeName:m.ZodFunction,...g(n)})}},ne=class extends b{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ne.create=(t,e)=>new ne({getter:t,typeName:m.ZodLazy,...g(e)});var se=class extends b{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return l(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}};se.create=(t,e)=>new se({value:t,typeName:m.ZodLiteral,...g(e)});function Jt(t,e){return new ae({values:t,typeName:m.ZodEnum,...g(e)})}var ae=class t extends b{constructor(){super(...arguments),Ae.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{expected:x.joinValues(n),received:r.parsedType,code:d.invalid_type}),v}if(nt(this,Ae,"f")||qt(this,Ae,new Set(this._def.values),"f"),!nt(this,Ae,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{received:r.data,code:d.invalid_enum_value,options:n}),v}return R(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Ae=new WeakMap;ae.create=Jt;var ie=class extends b{constructor(){super(...arguments),Me.set(this,void 0)}_parse(e){let r=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==p.string&&n.parsedType!==p.number){let s=x.objectValues(r);return l(n,{expected:x.joinValues(s),received:n.parsedType,code:d.invalid_type}),v}if(nt(this,Me,"f")||qt(this,Me,new Set(x.getValidEnumValues(this._def.values)),"f"),!nt(this,Me,"f").has(e.data)){let s=x.objectValues(r);return l(n,{received:n.data,code:d.invalid_enum_value,options:s}),v}return R(e.data)}get enum(){return this._def.values}};Me=new WeakMap;ie.create=(t,e)=>new ie({values:t,typeName:m.ZodNativeEnum,...g(e)});var H=class extends b{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.promise&&r.common.async===!1)return l(r,{code:d.invalid_type,expected:p.promise,received:r.parsedType}),v;let n=r.parsedType===p.promise?r.data:Promise.resolve(r.data);return R(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};H.create=(t,e)=>new H({type:t,typeName:m.ZodPromise,...g(e)});var N=class extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{l(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){let i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return v;let c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?v:c.status==="dirty"||r.value==="dirty"?Ee(c.value):c});{if(r.value==="aborted")return v;let o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?v:o.status==="dirty"||r.value==="dirty"?Ee(o.value):o}}if(s.type==="refinement"){let i=o=>{let c=s.refinement(o,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?v:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ie(i))return i;let o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ie(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):i);x.assertNever(s)}};N.create=(t,e,r)=>new N({schema:t,typeName:m.ZodEffects,effect:e,...g(r)});N.createWithPreprocess=(t,e,r)=>new N({schema:e,effect:{type:"preprocess",transform:t},typeName:m.ZodEffects,...g(r)});var M=class extends b{_parse(e){return this._getType(e)===p.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M.create=(t,e)=>new M({innerType:t,typeName:m.ZodOptional,...g(e)});var $=class extends b{_parse(e){return this._getType(e)===p.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$.create=(t,e)=>new $({innerType:t,typeName:m.ZodNullable,...g(e)});var oe=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===p.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oe.create=(t,e)=>new oe({innerType:t,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});var ce=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ze(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ce.create=(t,e)=>new ce({innerType:t,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});var Se=class extends b{_parse(e){if(this._getType(e)!==p.nan){let n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:p.nan,received:n.parsedType}),v}return{status:"valid",value:e.data}}};Se.create=t=>new Se({typeName:m.ZodNaN,...g(t)});var Kr=Symbol("zod_brand"),Le=class extends b{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},$e=class t extends b{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?v:a.status==="dirty"?(r.dirty(),Ee(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?v:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:m.ZodPipeline})}},ue=class extends b{_parse(e){let r=this._def.innerType._parse(e),n=s=>(Ie(s)&&(s.value=Object.freeze(s.value)),s);return Ze(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};ue.create=(t,e)=>new ue({innerType:t,typeName:m.ZodReadonly,...g(e)});function Gt(t,e={},r){return t?W.create().superRefine((n,s)=>{var a,i;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(a=o.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,u=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...u,fatal:c})}}):W.create()}var Xr={object:S.lazycreate},m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));var Qr=(t,e={message:`Input not instance of ${t.name}`})=>Gt(r=>r instanceof t,e),Yt=q.create,Kt=G.create,en=Se.create,tn=Y.create,Xt=K.create,rn=X.create,nn=Oe.create,sn=Q.create,an=ee.create,on=W.create,cn=D.create,un=Z.create,dn=je.create,ln=z.create,fn=S.create,pn=S.strictCreate,hn=te.create,mn=st.create,vn=re.create,yn=L.create,gn=at.create,bn=Pe.create,_n=Re.create,xn=it.create,wn=ne.create,kn=se.create,En=ae.create,Tn=ie.create,On=H.create,Ut=N.create,jn=M.create,Pn=$.create,Rn=N.createWithPreprocess,Sn=$e.create,Cn=()=>Yt().optional(),Nn=()=>Kt().optional(),An=()=>Xt().optional(),Mn={string:t=>q.create({...t,coerce:!0}),number:t=>G.create({...t,coerce:!0}),boolean:t=>K.create({...t,coerce:!0}),bigint:t=>Y.create({...t,coerce:!0}),date:t=>X.create({...t,coerce:!0})},In=v,_=Object.freeze({__proto__:null,defaultErrorMap:Te,setErrorMap:Mr,getErrorMap:tt,makeIssue:rt,EMPTY_PATH:Ir,addIssueToContext:l,ParseStatus:T,INVALID:v,DIRTY:Ee,OK:R,isAborted:mt,isDirty:vt,isValid:Ie,isAsync:Ze,get util(){return x},get objectUtil(){return ht},ZodParsedType:p,getParsedType:B,ZodType:b,datetimeRegex:Ft,ZodString:q,ZodNumber:G,ZodBigInt:Y,ZodBoolean:K,ZodDate:X,ZodSymbol:Oe,ZodUndefined:Q,ZodNull:ee,ZodAny:W,ZodUnknown:D,ZodNever:Z,ZodVoid:je,ZodArray:z,ZodObject:S,ZodUnion:te,ZodDiscriminatedUnion:st,ZodIntersection:re,ZodTuple:L,ZodRecord:at,ZodMap:Pe,ZodSet:Re,ZodFunction:it,ZodLazy:ne,ZodLiteral:se,ZodEnum:ae,ZodNativeEnum:ie,ZodPromise:H,ZodEffects:N,ZodTransformer:N,ZodOptional:M,ZodNullable:$,ZodDefault:oe,ZodCatch:ce,ZodNaN:Se,BRAND:Kr,ZodBranded:Le,ZodPipeline:$e,ZodReadonly:ue,custom:Gt,Schema:b,ZodSchema:b,late:Xr,get ZodFirstPartyTypeKind(){return m},coerce:Mn,any:on,array:ln,bigint:tn,boolean:Xt,date:rn,discriminatedUnion:mn,effect:Ut,enum:En,function:xn,instanceof:Qr,intersection:vn,lazy:wn,literal:kn,map:bn,nan:en,nativeEnum:Tn,never:un,null:an,nullable:Pn,number:Kt,object:fn,oboolean:An,onumber:Nn,optional:jn,ostring:Cn,pipeline:Sn,preprocess:Rn,promise:On,record:gn,set:_n,strictObject:pn,string:Yt,symbol:nn,transformer:Ut,tuple:yn,undefined:sn,union:hn,unknown:cn,void:dn,NEVER:In,ZodIssueCode:d,quotelessJson:Ar,ZodError:C});var gt=_.object({url:_.string(),token:_.string()}),Zn=_.object({header:_.string(),payload:_.string(),signature:_.string()}),Ln=_.object({fid:_.number(),type:_.literal("app_key"),key:_.string().startsWith("0x")}),Qt=_.object({event:_.literal("frame-added"),notificationDetails:gt.optional()}),er=_.object({event:_.literal("frame-removed")}),tr=_.object({event:_.literal("notifications-enabled"),notificationDetails:gt.required()}),rr=_.object({event:_.literal("notifications-disabled")}),$n=_.discriminatedUnion("event",[Qt,er,tr,rr]),Vn=_.object({notificationId:_.string().uuid(),title:_.string().max(32),body:_.string().max(128),targetUrl:_.string().max(256),tokens:_.string().array().max(100)}),Dn=_.object({result:_.object({successfulTokens:_.array(_.string()),invalidTokens:_.array(_.string()),rateLimitedTokens:_.array(_.string())})});var zn=ft;return dr(Un);})();
+ /*! Bundled license information:
+
+ comlink/dist/esm/comlink.mjs:
+ (**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ *)
+ */
+ //# sourceMappingURL=index.min.js.map
node_modules/@farcaster/frame-sdk/dist/index.min.js.map
Changed around line 1
+ {
+ "version": 3,
+ "sources": ["../../../node_modules/eventemitter3/index.js", "../src/index.ts", "../../../node_modules/eventemitter3/index.mjs", "../../../node_modules/comlink/src/comlink.ts", "../src/endpoint.ts", "../src/frameHost.ts", "../../../node_modules/ox/core/version.ts", "../../../node_modules/ox/core/internal/errors.ts", "../../../node_modules/ox/core/Errors.ts", "../../../node_modules/ox/core/Provider.ts", "../../../node_modules/ox/core/RpcResponse.ts", "../../../node_modules/ox/core/RpcRequest.ts", "../src/provider.ts", "../src/sdk.ts", "../../../node_modules/zod/lib/index.mjs", "../../frame-core/dist/types.js"],
+ "sourcesContent": ["'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n", "import { sdk } from \"./sdk\";\n\nexport * from \"./sdk\";\nexport * from \"@farcaster/frame-core\";\n\nexport default sdk;\n", "import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n Endpoint,\n EventSource,\n Message,\n MessageType,\n PostMessageWithOrigin,\n WireValue,\n WireValueType,\n} from \"./protocol\";\nexport type { Endpoint };\n\nexport const proxyMarker = Symbol(\"Comlink.proxy\");\nexport const createEndpoint = Symbol(\"Comlink.endpoint\");\nexport const releaseProxy = Symbol(\"Comlink.releaseProxy\");\nexport const finalizer = Symbol(\"Comlink.finalizer\");\n\nconst throwMarker = Symbol(\"Comlink.thrown\");\n\n/**\n * Interface of values that were marked to be proxied with `comlink.proxy()`.\n * Can also be implemented by classes.\n */\nexport interface ProxyMarked {\n [proxyMarker]: true;\n}\n\n/**\n * Takes a type and wraps it in a Promise, if it not already is one.\n * This is to avoid `Promise>`.\n *\n * This is the inverse of `Unpromisify`.\n */\ntype Promisify = T extends Promise ? T : Promise;\n/**\n * Takes a type that may be Promise and unwraps the Promise type.\n * If `P` is not a Promise, it returns `P`.\n *\n * This is the inverse of `Promisify`.\n */\ntype Unpromisify

= P extends Promise ? T : P;\n\n/**\n * Takes the raw type of a remote property and returns the type that is visible to the local thread on the proxy.\n *\n * Note: This needs to be its own type alias, otherwise it will not distribute over unions.\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types\n */\ntype RemoteProperty =\n // If the value is a method, comlink will proxy it automatically.\n // Objects are only proxied if they are marked to be proxied.\n // Otherwise, the property is converted to a Promise that resolves the cloned value.\n T extends Function | ProxyMarked ? Remote : Promisify;\n\n/**\n * Takes the raw type of a property as a remote thread would see it through a proxy (e.g. when passed in as a function\n * argument) and returns the type that the local thread has to supply.\n *\n * This is the inverse of `RemoteProperty`.\n *\n * Note: This needs to be its own type alias, otherwise it will not distribute over unions. See\n * https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types\n */\ntype LocalProperty = T extends Function | ProxyMarked\n ? Local\n : Unpromisify;\n\n/**\n * Proxies `T` if it is a `ProxyMarked`, clones it otherwise (as handled by structured cloning and transfer handlers).\n */\nexport type ProxyOrClone = T extends ProxyMarked ? Remote : T;\n/**\n * Inverse of `ProxyOrClone`.\n */\nexport type UnproxyOrClone = T extends RemoteObject\n ? Local\n : T;\n\n/**\n * Takes the raw type of a remote object in the other thread and returns the type as it is visible to the local thread\n * when proxied with `Comlink.proxy()`.\n *\n * This does not handle call signatures, which is handled by the more general `Remote` type.\n *\n * @template T The raw type of a remote object as seen in the other thread.\n */\nexport type RemoteObject = { [P in keyof T]: RemoteProperty };\n/**\n * Takes the type of an object as a remote thread would see it through a proxy (e.g. when passed in as a function\n * argument) and returns the type that the local thread has to supply.\n *\n * This does not handle call signatures, which is handled by the more general `Local` type.\n *\n * This is the inverse of `RemoteObject`.\n *\n * @template T The type of a proxied object.\n */\nexport type LocalObject = { [P in keyof T]: LocalProperty };\n\n/**\n * Additional special comlink methods available on each proxy returned by `Comlink.wrap()`.\n */\nexport interface ProxyMethods {\n [createEndpoint]: () => Promise;\n [releaseProxy]: () => void;\n}\n\n/**\n * Takes the raw type of a remote object, function or class in the other thread and returns the type as it is visible to\n * the local thread from the proxy return value of `Comlink.wrap()` or `Comlink.proxy()`.\n */\nexport type Remote =\n // Handle properties\n RemoteObject &\n // Handle call signature (if present)\n (T extends (...args: infer TArguments) => infer TReturn\n ? (\n ...args: { [I in keyof TArguments]: UnproxyOrClone }\n ) => Promisify>>\n : unknown) &\n // Handle construct signature (if present)\n // The return of construct signatures is always proxied (whether marked or not)\n (T extends { new (...args: infer TArguments): infer TInstance }\n ? {\n new (\n ...args: {\n [I in keyof TArguments]: UnproxyOrClone;\n }\n ): Promisify>;\n }\n : unknown) &\n // Include additional special comlink methods available on the proxy.\n ProxyMethods;\n\n/**\n * Expresses that a type can be either a sync or async.\n */\ntype MaybePromise = Promise | T;\n\n/**\n * Takes the raw type of a remote object, function or class as a remote thread would see it through a proxy (e.g. when\n * passed in as a function argument) and returns the type the local thread has to supply.\n *\n * This is the inverse of `Remote`. It takes a `Remote` and returns its original input `T`.\n */\nexport type Local =\n // Omit the special proxy methods (they don't need to be supplied, comlink adds them)\n Omit, keyof ProxyMethods> &\n // Handle call signatures (if present)\n (T extends (...args: infer TArguments) => infer TReturn\n ? (\n ...args: { [I in keyof TArguments]: ProxyOrClone }\n ) => // The raw function could either be sync or async, but is always proxied automatically\n MaybePromise>>\n : unknown) &\n // Handle construct signature (if present)\n // The return of construct signatures is always proxied (whether marked or not)\n (T extends { new (...args: infer TArguments): infer TInstance }\n ? {\n new (\n ...args: {\n [I in keyof TArguments]: ProxyOrClone;\n }\n ): // The raw constructor could either be sync or async, but is always proxied automatically\n MaybePromise>>;\n }\n : unknown);\n\nconst isObject = (val: unknown): val is object =>\n (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n\n/**\n * Customizes the serialization of certain values as determined by `canHandle()`.\n *\n * @template T The input type being handled by this transfer handler.\n * @template S The serialized type sent over the wire.\n */\nexport interface TransferHandler {\n /**\n * Gets called for every value to determine whether this transfer handler\n * should serialize the value, which includes checking that it is of the right\n * type (but can perform checks beyond that as well).\n */\n canHandle(value: unknown): value is T;\n\n /**\n * Gets called with the value if `canHandle()` returned `true` to produce a\n * value that can be sent in a message, consisting of structured-cloneable\n * values and/or transferrable objects.\n */\n serialize(value: T): [S, Transferable[]];\n\n /**\n * Gets called to deserialize an incoming value that was serialized in the\n * other thread with this transfer handler (known through the name it was\n * registered under).\n */\n deserialize(value: S): T;\n}\n\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler: TransferHandler = {\n canHandle: (val): val is ProxyMarked =>\n isObject(val) && (val as ProxyMarked)[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n\ninterface ThrownValue {\n [throwMarker]: unknown; // just needs to be present\n value: unknown;\n}\ntype SerializedThrownValue =\n | { isError: true; value: Error }\n | { isError: false; value: unknown };\ntype PendingListenersMap = Map<\n string,\n (value: WireValue | PromiseLike) => void\n>;\n\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler: TransferHandler<\n ThrownValue,\n SerializedThrownValue\n> = {\n canHandle: (value): value is ThrownValue =>\n isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized: SerializedThrownValue;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n } else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(\n new Error(serialized.value.message),\n serialized.value\n );\n }\n throw serialized.value;\n },\n};\n\n/**\n * Allows customizing the serialization of certain values.\n */\nexport const transferHandlers = new Map<\n string,\n TransferHandler\n>([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\n\nfunction isAllowedOrigin(\n allowedOrigins: (string | RegExp)[],\n origin: string\n): boolean {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\n\nexport function expose(\n obj: any,\n ep: Endpoint = globalThis as any,\n allowedOrigins: (string | RegExp)[] = [\"*\"]\n) {\n ep.addEventListener(\"message\", function callback(ev: MessageEvent) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = {\n path: [] as string[],\n ...(ev.data as Message),\n };\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case MessageType.GET:\n {\n returnValue = rawValue;\n }\n break;\n case MessageType.SET:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case MessageType.APPLY:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case MessageType.CONSTRUCT:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case MessageType.ENDPOINT:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case MessageType.RELEASE:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n } catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage({ ...wireValue, id }, transferables);\n if (type === MessageType.RELEASE) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback as any);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage({ ...wireValue, id }, transferables);\n });\n } as any);\n if (ep.start) {\n ep.start();\n }\n}\n\nfunction isMessagePort(endpoint: Endpoint): endpoint is MessagePort {\n return endpoint.constructor.name === \"MessagePort\";\n}\n\nfunction closeEndPoint(endpoint: Endpoint) {\n if (isMessagePort(endpoint)) endpoint.close();\n}\n\nexport function wrap(ep: Endpoint, target?: any): Remote {\n const pendingListeners : PendingListenersMap = new Map();\n\n ep.addEventListener(\"message\", function handleMessage(ev: Event) {\n const { data } = ev as MessageEvent;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n\n try {\n resolver(data);\n } finally {\n pendingListeners.delete(data.id);\n }\n });\n\n return createProxy(ep, pendingListeners, [], target) as any;\n}\n\nfunction throwIfProxyReleased(isReleased: boolean) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\n\nfunction releaseEndpoint(ep: Endpoint) {\n return requestResponseMessage(ep, new Map(), {\n type: MessageType.RELEASE,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\n\ninterface FinalizationRegistry {\n new (cb: (heldValue: T) => void): FinalizationRegistry;\n register(\n weakItem: object,\n heldValue: T,\n unregisterToken?: object | undefined\n ): void;\n unregister(unregisterToken: object): void;\n}\ndeclare var FinalizationRegistry: FinalizationRegistry;\n\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers =\n \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep: Endpoint) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n\nfunction registerProxy(proxy: object, ep: Endpoint) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\n\nfunction unregisterProxy(proxy: object) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\n\nfunction createProxy(\n ep: Endpoint,\n pendingListeners: PendingListenersMap,\n path: (string | number | symbol)[] = [],\n target: object = function () {}\n): Remote {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: MessageType.GET,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously \u00AF\\_(\u30C4)_/\u00AF\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.SET,\n path: [...path, prop].map((p) => p.toString()),\n value,\n },\n transferables\n ).then(fromWireValue) as any;\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if ((last as any) === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: MessageType.ENDPOINT,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn\u2019t happen.\n if (last === \"bind\") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.APPLY,\n path: path.map((p) => p.toString()),\n argumentList,\n },\n transferables\n ).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(\n ep,\n pendingListeners,\n {\n type: MessageType.CONSTRUCT,\n path: path.map((p) => p.toString()),\n argumentList,\n },\n transferables\n ).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy as any;\n}\n\nfunction myFlat(arr: (T | T[])[]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\nfunction processArguments(argumentList: any[]): [WireValue[], Transferable[]] {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\n\nconst transferCache = new WeakMap();\nexport function transfer(obj: T, transfers: Transferable[]): T {\n transferCache.set(obj, transfers);\n return obj;\n}\n\nexport function proxy(obj: T): T & ProxyMarked {\n return Object.assign(obj, { [proxyMarker]: true }) as any;\n}\n\nexport function windowEndpoint(\n w: PostMessageWithOrigin,\n context: EventSource = globalThis,\n targetOrigin = \"*\"\n): Endpoint {\n return {\n postMessage: (msg: any, transferables: Transferable[]) =>\n w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\n\nfunction toWireValue(value: any): [WireValue, Transferable[]] {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: WireValueType.HANDLER,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: WireValueType.RAW,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\n\nfunction fromWireValue(value: WireValue): any {\n switch (value.type) {\n case WireValueType.HANDLER:\n return transferHandlers.get(value.name)!.deserialize(value.value);\n case WireValueType.RAW:\n return value.value;\n }\n}\n\nfunction requestResponseMessage(\n ep: Endpoint,\n pendingListeners: PendingListenersMap,\n msg: Message,\n transfers?: Transferable[]\n): Promise {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage({ id, ...msg }, transfers);\n});\n}\n\nfunction generateUUID(): string {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n", "import { type Endpoint, windowEndpoint } from \"comlink\";\n\nconst mockEndpoint: Endpoint = {\n postMessage() {\n // noop\n },\n addEventListener: () => {\n // noop\n },\n removeEventListener: () => {\n // noop\n },\n}\n\nconst webViewEndpoint: Endpoint = {\n postMessage: (data: unknown) => {\n console.debug(\"[webview:req]\", data);\n window.ReactNativeWebView.postMessage(JSON.stringify(data));\n },\n addEventListener: (_, listener, ...args) => {\n document.addEventListener(\"FarcasterFrameCallback\", listener, ...args);\n },\n removeEventListener: (_, listener) => {\n document.removeEventListener(\"FarcasterFrameCallback\", listener);\n },\n};\n\nexport const endpoint = (() => {\n // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint\n if (typeof window === 'undefined') return mockEndpoint\n return window?.ReactNativeWebView\n ? webViewEndpoint\n : windowEndpoint(window?.parent ?? window);\n})()\n", "import { wrap } from \"comlink\";\nimport { endpoint } from \"./endpoint\";\nimport { FrameHost } from \"@farcaster/frame-core\";\n\nexport const frameHost = wrap(endpoint);\n", "/** @internal */\nexport const version = '0.1.1'\n", "import { version } from '../version.js'\n\n/** @internal */\nexport function getUrl(url: string) {\n return url\n}\n\n/** @internal */\nexport function getVersion() {\n return version\n}\n\n/** @internal */\nexport function prettyPrint(args: unknown) {\n if (!args) return ''\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false) return null\n return [key, value]\n })\n .filter(Boolean) as [string, string][]\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0)\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n')\n}\n", "import { getVersion } from './internal/errors.js'\n\nexport type GlobalErrorType = Error & {\n name: name\n}\n\n/**\n * Base error class inherited by all errors thrown by ox.\n *\n * @example\n * ```ts\n * import { Errors } from 'ox'\n * throw new Errors.BaseError('An error occurred')\n * ```\n */\nexport class BaseError<\n cause extends Error | undefined = undefined,\n> extends Error {\n details: string\n docs?: string | undefined\n docsPath?: string | undefined\n shortMessage: string\n\n override cause: cause\n override name = 'BaseError'\n\n version = `ox@${getVersion()}`\n\n constructor(shortMessage: string, options: BaseError.Options = {}) {\n const details = (() => {\n if (options.cause instanceof BaseError) {\n if (options.cause.details) return options.cause.details\n if (options.cause.shortMessage) return options.cause.shortMessage\n }\n if (options.cause?.message) return options.cause.message\n return options.details!\n })()\n const docsPath = (() => {\n if (options.cause instanceof BaseError)\n return options.cause.docsPath || options.docsPath\n return options.docsPath\n })()\n\n const docsBaseUrl = 'https://oxlib.sh'\n const docs = `${docsBaseUrl}${docsPath ?? ''}`\n\n const message = [\n shortMessage || 'An error occurred.',\n ...(options.metaMessages ? ['', ...options.metaMessages] : []),\n ...(details || docsPath\n ? [\n '',\n details ? `Details: ${details}` : undefined,\n docsPath ? `See: ${docs}` : undefined,\n ]\n : []),\n ]\n .filter((x) => typeof x === 'string')\n .join('\\n')\n\n super(message, options.cause ? { cause: options.cause } : undefined)\n\n this.cause = options.cause as any\n this.details = details\n this.docs = docs\n this.docsPath = docsPath\n this.shortMessage = shortMessage\n }\n\n walk(): Error\n walk(fn: (err: unknown) => boolean): Error | null\n walk(fn?: any): any {\n return walk(this, fn)\n }\n}\n\nexport declare namespace BaseError {\n type Options = {\n cause?: cause | undefined\n details?: string | undefined\n docsPath?: string | undefined\n metaMessages?: (string | undefined)[] | undefined\n }\n}\n\n/** @internal */\nfunction walk(\n err: unknown,\n fn?: ((err: unknown) => boolean) | undefined,\n): unknown {\n if (fn?.(err)) return err\n if (err && typeof err === 'object' && 'cause' in err && err.cause)\n return walk(err.cause, fn)\n return fn ? null : err\n}\n", "import { EventEmitter } from 'eventemitter3'\nimport type * as Address from './Address.js'\nimport * as Errors from './Errors.js'\nimport * as RpcResponse from './RpcResponse.js'\nimport type * as RpcSchema from './RpcSchema.js'\nimport type * as RpcSchema_internal from './internal/rpcSchema.js'\nimport type { Compute } from './internal/types.js'\n\n/** Options for a {@link ox#Provider.Provider}. */\nexport type Options = {\n /**\n * Whether to include event functions (`on`, `removeListener`) on the Provider.\n *\n * @default true\n */\n includeEvents?: boolean | undefined\n /**\n * RPC Schema to use for the Provider's `request` function.\n * See {@link ox#RpcSchema.(from:function)} for more.\n *\n * @default `RpcSchema.Generic`\n */\n schema?: RpcSchema.Generic | undefined\n}\n\n/** Root type for an EIP-1193 Provider. */\nexport type Provider<\n options extends Options | undefined = undefined,\n ///\n _schema extends RpcSchema.Generic = options extends {\n schema: infer schema extends RpcSchema.Generic\n }\n ? schema\n : RpcSchema.Default,\n> = Compute<\n {\n request: RequestFn<_schema>\n } & (options extends { includeEvents: true } | undefined\n ? {\n on: EventListenerFn\n removeListener: EventListenerFn\n }\n : {})\n>\n\n/** Type for an EIP-1193 Provider's event emitter. */\nexport type Emitter = Compute>\n\n/** EIP-1193 Provider's `request` function. */\nexport type RequestFn = <\n methodName extends RpcSchema.MethodNameGeneric,\n>(\n parameters: RpcSchema_internal.ExtractRequestOpaque,\n) => Promise>\n\n/** Type for an EIP-1193 Provider's event listener functions (`on`, `removeListener`, etc). */\nexport type EventListenerFn = (\n event: event,\n listener: EventMap[event],\n) => void\n\nexport type ConnectInfo = {\n chainId: string\n}\n\nexport type Message = {\n type: string\n data: unknown\n}\n\nexport class ProviderRpcError extends Error {\n override name = 'ProviderRpcError'\n\n code: number\n details: string\n\n constructor(code: number, message: string) {\n super(message)\n this.code = code\n this.details = message\n }\n}\n\nexport type EventMap = {\n accountsChanged: (accounts: readonly Address.Address[]) => void\n chainChanged: (chainId: string) => void\n connect: (connectInfo: ConnectInfo) => void\n disconnect: (error: ProviderRpcError) => void\n message: (message: Message) => void\n}\n\n/** The user rejected the request. */\nexport class UserRejectedRequestError extends ProviderRpcError {\n static readonly code = 4001\n override readonly name = 'Provider.UserRejectedRequestError'\n\n constructor({\n message = 'The user rejected the request.',\n }: { message?: string | undefined } = {}) {\n super(4001, message)\n }\n}\n\n/** The requested method and/or account has not been authorized by the user. */\nexport class UnauthorizedError extends ProviderRpcError {\n static readonly code = 4100\n override readonly name = 'Provider.UnauthorizedError'\n\n constructor({\n message = 'The requested method and/or account has not been authorized by the user.',\n }: { message?: string | undefined } = {}) {\n super(4100, message)\n }\n}\n\n/** The provider does not support the requested method. */\nexport class UnsupportedMethodError extends ProviderRpcError {\n static readonly code = 4200\n override readonly name = 'Provider.UnsupportedMethodError'\n\n constructor({\n message = 'The provider does not support the requested method.',\n }: { message?: string | undefined } = {}) {\n super(4200, message)\n }\n}\n\n/** The provider is disconnected from all chains. */\nexport class DisconnectedError extends ProviderRpcError {\n static readonly code = 4900\n override readonly name = 'Provider.DisconnectedError'\n\n constructor({\n message = 'The provider is disconnected from all chains.',\n }: { message?: string | undefined } = {}) {\n super(4900, message)\n }\n}\n\n/** The provider is not connected to the requested chain. */\nexport class ChainDisconnectedError extends ProviderRpcError {\n static readonly code = 4901\n override readonly name = 'Provider.ChainDisconnectedError'\n\n constructor({\n message = 'The provider is not connected to the requested chain.',\n }: { message?: string | undefined } = {}) {\n super(4901, message)\n }\n}\n\n/**\n * Creates an EIP-1193 flavored event emitter to be injected onto a Provider.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox' // [!code focus]\n *\n * // 1. Instantiate a Provider Emitter. // [!code focus]\n * const emitter = Provider.createEmitter() // [!code focus]\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * // 2. Pass the Emitter to the Provider. // [!code focus]\n * ...emitter, // [!code focus]\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * // 3. Emit Provider Events. // [!code focus]\n * emitter.emit('accountsChanged', ['0x...']) // [!code focus]\n * ```\n *\n * @returns An event emitter.\n */\nexport function createEmitter(): Emitter {\n const emitter = new EventEmitter()\n\n return {\n get eventNames() {\n return emitter.eventNames.bind(emitter)\n },\n get listenerCount() {\n return emitter.listenerCount.bind(emitter)\n },\n get listeners() {\n return emitter.listeners.bind(emitter)\n },\n addListener: emitter.addListener.bind(emitter),\n emit: emitter.emit.bind(emitter),\n off: emitter.off.bind(emitter),\n on: emitter.on.bind(emitter),\n once: emitter.once.bind(emitter),\n removeAllListeners: emitter.removeAllListeners.bind(emitter),\n removeListener: emitter.removeListener.bind(emitter),\n }\n}\n\nexport declare namespace createEmitter {\n type ErrorType = Errors.GlobalErrorType\n}\n\n/**\n * Instantiates an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) {@link ox#Provider.Provider}\n * from an arbitrary [EIP-1193 Provider](https://eips.ethereum.org/EIPS/eip-1193) interface.\n *\n * @example\n * ### Instantiating with RPC Transport\n *\n * Ox's {@link ox#RpcTransport} is EIP-1193 compliant, and can be used to instantiate an EIP-1193 Provider. This means you can use any HTTP RPC endpoint as an EIP-1193 Provider.\n *\n * ```ts twoslash\n * import { Provider, RpcTransport } from 'ox'\n *\n * const transport = RpcTransport.fromHttp('https://1.rpc.thirdweb.com')\n * const provider = Provider.from(transport)\n * ```\n *\n * @example\n * ### Instantiating with External Providers\n *\n * The example below demonstrates how we can instantiate a typed EIP-1193 Provider from an\n * external EIP-1193 Provider like `window.ethereum`.\n *\n * ```ts twoslash\n * import 'ox/window'\n * import { Provider } from 'ox'\n *\n * const provider = Provider.from(window.ethereum)\n *\n * const blockNumber = await provider.request({ method: 'eth_blockNumber' })\n * ```\n *\n * :::tip\n *\n * There are also libraries that distribute EIP-1193 Provider objects that you can use with `Provider.from`:\n *\n * - [`@walletconnect/ethereum-provider`](https://www.npmjs.com/package/\\@walletconnect/ethereum-provider)\n *\n * - [`@coinbase/wallet-sdk`](https://www.npmjs.com/package/\\@coinbase/wallet-sdk)\n *\n * - [`@metamask/detect-provider`](https://www.npmjs.com/package/\\@metamask/detect-provider)\n *\n * - [`@safe-global/safe-apps-provider`](https://github.com/safe-global/safe-apps-sdk/tree/main/packages/safe-apps-provider)\n *\n * - [`mipd`](https://github.com/wevm/mipd): EIP-6963 Multi Injected Providers\n *\n * :::\n *\n * @example\n * ### Instantiating a Custom Provider\n *\n * The example below demonstrates how we can instantiate a typed EIP-1193 Provider from a\n * HTTP `fetch` JSON-RPC request. You can use this pattern to integrate with any asynchronous JSON-RPC\n * transport, including WebSockets and IPC.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * const blockNumber = await provider.request({ method: 'eth_blockNumber' })\n * ```\n *\n * @example\n * ### Type-safe Custom Schemas\n *\n * It is possible to define your own type-safe schema by using the {@link ox#RpcSchema.(from:function)} type.\n *\n * ```ts twoslash\n * // @noErrors\n * import 'ox/window'\n * import { Provider, RpcSchema } from 'ox'\n *\n * const schema = RpcSchema.from<\n * | RpcSchema.Default\n * | {\n * Request: {\n * method: 'abe_foo',\n * params: [id: number],\n * }\n * ReturnType: string\n * }\n * | {\n * Request: {\n * method: 'abe_bar',\n * params: [id: string],\n * }\n * ReturnType: string\n * }\n * >()\n *\n * const provider = Provider.from(window.ethereum, { schema })\n *\n * const blockNumber = await provider.request({ method: 'e' })\n * // ^|\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * ### Instantiating a Provider with Events\n *\n * The example below demonstrates how to instantiate a Provider with your own EIP-1193 flavored event emitter.\n *\n * This example is useful for Wallets that distribute an EIP-1193 Provider (e.g. webpage injection via `window.ethereum`).\n *\n * ```ts twoslash\n * // @noErrors\n * import { Provider, RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Instantiate a Provider Emitter.\n * const emitter = Provider.createEmitter() // [!code ++]\n *\n * const store = RpcRequest.createStore()\n *\n * const provider = Provider.from({\n * // 2. Pass the Emitter to the Provider.\n * ...emitter, // [!code ++]\n * async request(args) {\n * return await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(store.prepare(args)),\n * method: 'POST',\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * })\n * .then((res) => res.json())\n * .then(RpcResponse.parse)\n * },\n * })\n *\n * // 3. Emit Provider Events.\n * emitter.emit('accountsChanged', ['0x...']) // [!code ++]\n * ```\n *\n * @param provider - The EIP-1193 provider to convert.\n * @returns An typed EIP-1193 Provider.\n */\nexport function from<\n const provider extends Provider | unknown,\n options extends Options | undefined = undefined,\n>(\n provider: provider | Provider<{ schema: RpcSchema.Generic }>,\n options?: options | Options,\n): Provider\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function from(provider: any, options: Options = {}): Provider {\n const { includeEvents = true } = options\n if (!provider) throw new IsUndefinedError()\n return {\n ...(includeEvents\n ? {\n on: provider.on?.bind(provider),\n removeListener: provider.removeListener?.bind(provider),\n }\n : {}),\n async request(args) {\n const result = await provider.request(args)\n if (\n result &&\n typeof result === 'object' &&\n 'jsonrpc' in (result as { jsonrpc?: unknown })\n )\n return RpcResponse.parse(result) as never\n return result\n },\n }\n}\n\nexport declare namespace from {\n type ErrorType = IsUndefinedError | Errors.GlobalErrorType\n}\n\n/** Thrown when the provider is undefined. */\nexport class IsUndefinedError extends Errors.BaseError {\n override readonly name = 'Provider.IsUndefinedError'\n\n constructor() {\n super('`provider` is undefined.')\n }\n}\n", "import type { Errors, RpcRequest } from '../index.js'\nimport type {\n Compute,\n IsNarrowable,\n OneOf,\n UnionPartialBy,\n} from './internal/types.js'\n\n/** A JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object). */\nexport type RpcResponse<\n result = unknown,\n error extends ErrorObject = ErrorObject,\n> = Compute<\n {\n id: number\n jsonrpc: '2.0'\n } & OneOf<{ result: result } | { error: error }>\n>\n\n/** JSON-RPC error object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#error_object). */\nexport type ErrorObject = {\n code: number\n message: string\n data?: unknown | undefined\n}\n\n/**\n * A type-safe interface to instantiate a JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#response_object).\n *\n * @example\n * ### Instantiating a Response Object\n *\n * ```ts twoslash\n * import { RpcResponse } from 'ox'\n *\n * const response = RpcResponse.from({\n * id: 0,\n * jsonrpc: '2.0',\n * result: '0x69420',\n * })\n * ```\n *\n * @example\n * ### Type-safe Instantiation\n *\n * If you have a JSON-RPC request object, you can use it to strongly-type the response. If a `request` is provided,\n * then the `id` and `jsonrpc` properties will be overridden with the values from the request.\n *\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * const request = RpcRequest.from({ id: 0, method: 'eth_blockNumber' })\n *\n * const response = RpcResponse.from(\n * { result: '0x69420' },\n * { request },\n * )\n * ```\n *\n * @param response - Opaque JSON-RPC response object.\n * @param options - Parsing options.\n * @returns Typed JSON-RPC result, or response object (if `raw` is `true`).\n */\nexport function from<\n request extends RpcRequest.RpcRequest | undefined = undefined,\n const response =\n | (request extends RpcRequest.RpcRequest\n ? request['_returnType']\n : RpcResponse)\n | unknown,\n>(\n response: from.Response,\n options?: from.Options,\n): Compute>\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function from(response: RpcResponse, options: any = {}): RpcResponse {\n const { request } = options\n return {\n ...response,\n id: response.id ?? request?.id,\n jsonrpc: response.jsonrpc ?? request.jsonrpc,\n }\n}\n\nexport declare namespace from {\n type Response<\n request extends RpcRequest.RpcRequest | undefined = undefined,\n response = unknown,\n > = response &\n (request extends RpcRequest.RpcRequest\n ? UnionPartialBy, 'id' | 'jsonrpc'>\n : RpcResponse)\n\n type Options<\n request extends RpcRequest.RpcRequest | undefined =\n | RpcRequest.RpcRequest\n | undefined,\n > = {\n request?: request | RpcRequest.RpcRequest | undefined\n }\n\n type ReturnType = IsNarrowable extends true\n ? RpcResponse\n : response & Readonly<{ id: number; jsonrpc: '2.0' }>\n}\n\n/**\n * A type-safe interface to parse a JSON-RPC response object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#response_object), and extract the result.\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Create a request store.\n * const store = RpcRequest.createStore()\n *\n * // 2. Get a request object.\n * const request = store.prepare({\n * method: 'eth_getBlockByNumber',\n * params: ['0x1', false],\n * })\n *\n * // 3. Send the JSON-RPC request via HTTP.\n * const block = await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(request),\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * method: 'POST',\n * })\n * .then((response) => response.json())\n * // 4. Parse the JSON-RPC response into a type-safe result. // [!code focus]\n * .then((response) => RpcResponse.parse(response, { request })) // [!code focus]\n *\n * block // [!code focus]\n * // ^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * :::tip\n *\n * If you don't need the return type, you can omit the options entirely.\n *\n * ```ts twoslash\n * // @noErrors\n * import { RpcResponse } from 'ox'\n *\n * const block = await fetch('https://1.rpc.thirdweb.com', {})\n * .then((response) => response.json())\n * .then((response) => RpcResponse.parse(response, { request })) // [!code --]\n * .then(RpcResponse.parse) // [!code ++]\n * ```\n * :::\n *\n * @example\n * ### Raw Mode\n *\n * If `raw` is `true`, the response will be returned as an object with `result` and `error` properties instead of returning the `result` directly and throwing errors.\n *\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const request = store.prepare({\n * method: 'eth_blockNumber',\n * })\n *\n * const response = RpcResponse.parse({}, {\n * request,\n * raw: true, // [!code hl]\n * })\n *\n * response.result\n * // ^?\n *\n *\n * response.error\n * // ^?\n *\n *\n * ```\n *\n * @param response - Opaque JSON-RPC response object.\n * @param options - Parsing options.\n * @returns Typed JSON-RPC result, or response object (if `raw` is `true`).\n */\nexport function parse<\n const response extends RpcResponse | unknown,\n returnType,\n raw extends boolean = false,\n>(\n response: response,\n options: parse.Options = {},\n): parse.ReturnType<\n unknown extends response\n ? returnType\n : response extends RpcResponse\n ? response extends { result: infer result }\n ? result\n : never\n : returnType,\n raw\n> {\n const { raw = false } = options\n const response_ = response as RpcResponse\n if (raw) return response as never\n if (response_.error) {\n const { code } = response_.error\n const JsonRpcError = (() => {\n if (code === InternalError.code) return InternalError\n if (code === InvalidInputError.code) return InvalidInputError\n if (code === InvalidParamsError.code) return InvalidParamsError\n if (code === InvalidRequestError.code) return InvalidRequestError\n if (code === LimitExceededError.code) return LimitExceededError\n if (code === MethodNotFoundError.code) return MethodNotFoundError\n if (code === MethodNotSupportedError.code) return MethodNotSupportedError\n if (code === ParseError.code) return ParseError\n if (code === ResourceNotFoundError.code) return ResourceNotFoundError\n if (code === ResourceUnavailableError.code)\n return ResourceUnavailableError\n if (code === TransactionRejectedError.code)\n return TransactionRejectedError\n if (code === VersionNotSupportedError.code)\n return VersionNotSupportedError\n return BaseError\n })()\n throw new JsonRpcError(response_.error)\n }\n return response_.result as never\n}\n\nexport declare namespace parse {\n type Options = {\n /**\n * JSON-RPC Method that was used to make the request. Used for typing the response.\n */\n request?:\n | {\n _returnType: returnType\n }\n | RpcRequest.RpcRequest\n | undefined\n /**\n * Enables raw mode \u2013 responses will return an object with `result` and `error` properties instead of returning the `result` directly and throwing errors.\n *\n * - `true`: a JSON-RPC response object will be returned with `result` and `error` properties.\n * - `false`: the JSON-RPC response object's `result` property will be returned directly, and JSON-RPC Errors will be thrown.\n *\n * @default false\n */\n raw?: raw | boolean | undefined\n }\n\n type ReturnType = Compute<\n raw extends true ? RpcResponse : returnType\n >\n\n type ErrorType =\n | ParseError\n | InvalidInputError\n | ResourceNotFoundError\n | ResourceUnavailableError\n | TransactionRejectedError\n | MethodNotSupportedError\n | LimitExceededError\n | VersionNotSupportedError\n | InvalidRequestError\n | MethodNotFoundError\n | InvalidParamsError\n | InternalError\n | BaseErrorType\n | Errors.GlobalErrorType\n}\n\nexport type BaseErrorType = BaseError & { name: 'BaseError' }\n\n/** Thrown when a JSON-RPC error has occurred. */\nexport class BaseError extends Error {\n override name = 'RpcResponse.BaseError'\n\n readonly code: number\n readonly data?: unknown | undefined\n\n constructor(errorObject: ErrorObject) {\n const { code, message, data } = errorObject\n super(message)\n this.code = code\n this.data = data\n }\n}\n\n/** Thrown when the input to a JSON-RPC method is invalid. */\nexport class InvalidInputError extends BaseError {\n static readonly code = -32000\n override readonly code = -32000\n override readonly name = 'RpcResponse.InvalidInputError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Missing or invalid parameters.',\n ...parameters,\n code: InvalidInputError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC resource is not found. */\nexport class ResourceNotFoundError extends BaseError {\n static readonly code = -32001\n override readonly code = -32001\n override readonly name = 'RpcResponse.ResourceNotFoundError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Requested resource not found.',\n ...parameters,\n code: ResourceNotFoundError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC resource is unavailable. */\nexport class ResourceUnavailableError extends BaseError {\n static readonly code = -32002\n override readonly code = -32002\n override readonly name = 'RpcResponse.ResourceUnavailableError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Requested resource not available.',\n ...parameters,\n code: ResourceUnavailableError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC transaction is rejected. */\nexport class TransactionRejectedError extends BaseError {\n static readonly code = -32003\n override readonly code = -32003\n override readonly name = 'RpcResponse.TransactionRejectedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Transaction creation failed.',\n ...parameters,\n code: TransactionRejectedError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC method is not supported. */\nexport class MethodNotSupportedError extends BaseError {\n static readonly code = -32004\n override readonly code = -32004\n override readonly name = 'RpcResponse.MethodNotSupportedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Method is not implemented.',\n ...parameters,\n code: MethodNotSupportedError.code,\n })\n }\n}\n\n/** Thrown when a rate-limit is exceeded. */\nexport class LimitExceededError extends BaseError {\n static readonly code = -32005\n override readonly code = -32005\n override readonly name = 'RpcResponse.LimitExceededError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Rate limit exceeded.',\n ...parameters,\n code: LimitExceededError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC version is not supported. */\nexport class VersionNotSupportedError extends BaseError {\n static readonly code = -32006\n override readonly code = -32006\n override readonly name = 'RpcResponse.VersionNotSupportedError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'JSON-RPC version not supported.',\n ...parameters,\n code: VersionNotSupportedError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC request is invalid. */\nexport class InvalidRequestError extends BaseError {\n static readonly code = -32600\n override readonly code = -32600\n override readonly name = 'RpcResponse.InvalidRequestError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Input is not a valid JSON-RPC request.',\n ...parameters,\n code: InvalidRequestError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC method is not found. */\nexport class MethodNotFoundError extends BaseError {\n static readonly code = -32601\n override readonly code = -32601\n override readonly name = 'RpcResponse.MethodNotFoundError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Method does not exist.',\n ...parameters,\n code: MethodNotFoundError.code,\n })\n }\n}\n\n/** Thrown when the parameters to a JSON-RPC method are invalid. */\nexport class InvalidParamsError extends BaseError {\n static readonly code = -32602\n override readonly code = -32602\n override readonly name = 'RpcResponse.InvalidParamsError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Invalid method parameters.',\n ...parameters,\n code: InvalidParamsError.code,\n })\n }\n}\n\n/** Thrown when an internal JSON-RPC error has occurred. */\nexport class InternalError extends BaseError {\n static readonly code = -32603\n override readonly code = -32603\n override readonly name = 'RpcResponse.InternalErrorError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Internal JSON-RPC error.',\n ...parameters,\n code: InternalError.code,\n })\n }\n}\n\n/** Thrown when a JSON-RPC response is invalid. */\nexport class ParseError extends BaseError {\n static readonly code = -32700\n override readonly code = -32700\n override readonly name = 'RpcResponse.ParseError'\n\n constructor(parameters: Partial> = {}) {\n super({\n message: 'Failed to parse JSON-RPC response.',\n ...parameters,\n code: ParseError.code,\n })\n }\n}\n", "import type { Errors } from '../index.js'\nimport type * as RpcSchema from './RpcSchema.js'\nimport type * as RpcSchema_internal from './internal/rpcSchema.js'\nimport type { Compute } from './internal/types.js'\n\n/** A JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object). */\nexport type RpcRequest =\n Compute<\n schema extends any\n ? schema['Request'] & {\n id: number\n jsonrpc: '2.0'\n /** @deprecated internal */\n _returnType: schema['ReturnType']\n }\n : never\n >\n\n/** JSON-RPC request store type. */\nexport type Store =\n Compute<{\n prepare: (\n parameters: Compute<\n RpcSchema_internal.ExtractRequestOpaque\n >,\n ) => Compute>>\n readonly id: number\n }>\n\n/**\n * Creates a JSON-RPC request store to build requests with an incrementing `id`.\n *\n * Returns a type-safe `prepare` function to build a JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object).\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest } from 'ox'\n *\n * const store = RpcRequest.createStore()\n *\n * const request_1 = store.prepare({\n * method: 'eth_blockNumber',\n * })\n * // @log: { id: 0, jsonrpc: '2.0', method: 'eth_blockNumber' }\n *\n * const request_2 = store.prepare({\n * method: 'eth_call',\n * params: [\n * {\n * to: '0x0000000000000000000000000000000000000000',\n * data: '0xdeadbeef',\n * },\n * ],\n * })\n * // @log: { id: 1, jsonrpc: '2.0', method: 'eth_call', params: [{ to: '0x0000000000000000000000000000000000000000', data: '0xdeadbeef' }] }\n * ```\n *\n * @example\n * ### Type-safe Custom Schemas\n *\n * It is possible to define your own type-safe schema by using the {@link ox#RpcSchema.From} type.\n *\n * ```ts twoslash\n * import { RpcSchema, RpcRequest } from 'ox'\n *\n * type Schema = RpcSchema.From<{ // [!code focus]\n * Request: { // [!code focus]\n * method: 'eth_foobar' // [!code focus]\n * params: [number] // [!code focus]\n * } // [!code focus]\n * ReturnType: string // [!code focus]\n * } | { // [!code focus]\n * Request: { // [!code focus]\n * method: 'eth_foobaz' // [!code focus]\n * params: [string] // [!code focus]\n * } // [!code focus]\n * ReturnType: string // [!code focus]\n * }> // [!code focus]\n *\n * const store = RpcRequest.createStore() // [!code focus]\n *\n * const request = store.prepare({\n * method: 'eth_foobar', // [!code focus]\n * // ^?\n * params: [42],\n * })\n * ```\n *\n * @param options - Request store options.\n * @returns The request store\n */\nexport function createStore<\n schema extends RpcSchema.Generic = RpcSchema.Default,\n>(options: createStore.Options = {}): createStore.ReturnType {\n let id = options.id ?? 0\n return {\n prepare(options) {\n return from({\n id: id++,\n ...options,\n } as never) as never\n },\n get id() {\n return id\n },\n }\n}\n\nexport declare namespace createStore {\n type Options = {\n /** The initial request ID. */\n id?: number\n }\n\n type ReturnType =\n Store\n\n type ErrorType = Errors.GlobalErrorType\n}\n\n/**\n * A type-safe interface to build a JSON-RPC request object as per the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification#request_object).\n *\n * :::warning\n *\n * You will likely want to use {@link ox#RpcRequest.(createStore:function)} instead as it will also manage `id`s and uses this function internally.\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { RpcRequest, RpcResponse } from 'ox'\n *\n * // 1. Build a request object.\n * const request = RpcRequest.from({ // [!code focus]\n * id: 0, // [!code focus]\n * method: 'eth_estimateGas', // [!code focus]\n * params: [ // [!code focus]\n * { // [!code focus]\n * from: '0xd2135CfB216b74109775236E36d4b433F1DF507B', // [!code focus]\n * to: '0x0D44f617435088c947F00B31160f64b074e412B4', // [!code focus]\n * value: '0x69420', // [!code focus]\n * }, // [!code focus]\n * ], // [!code focus]\n * }) // [!code focus]\n *\n * // 2. Send the JSON-RPC request via HTTP.\n * const gas = await fetch('https://1.rpc.thirdweb.com', {\n * body: JSON.stringify(request),\n * headers: {\n * 'Content-Type': 'application/json',\n * },\n * method: 'POST',\n * })\n * .then((response) => response.json())\n * // 3. Parse the JSON-RPC response into a type-safe result.\n * .then((response) => RpcResponse.parse(response, { request }))\n * ```\n *\n * @param options - JSON-RPC request options.\n * @returns The fully-formed JSON-RPC request object.\n */\nexport function from(\n options: from.Options,\n): from.ReturnType {\n return {\n ...options,\n jsonrpc: '2.0',\n } as never\n}\n\nexport declare namespace from {\n type Options = Compute<\n RpcSchema_internal.ExtractRequestOpaque & {\n id: number\n }\n >\n\n type ReturnType = Compute<\n RpcRequest>\n >\n\n type ErrorType = Errors.GlobalErrorType\n}\n", "import { Provider, RpcRequest, RpcResponse } from \"ox\";\nimport { frameHost } from \"./frameHost\";\nimport { EthProviderWireEvent } from \"@farcaster/frame-core\";\n\nconst emitter = Provider.createEmitter();\nconst store = RpcRequest.createStore();\n\ntype GenericProviderRpcError = {\n code: number;\n details?: string;\n}\n\nexport function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError {\n switch (code) {\n case 4001:\n return new Provider.UserRejectedRequestError();\n case 4100:\n return new Provider.UnauthorizedError();\n case 4200:\n return new Provider.UnsupportedMethodError();\n case 4900:\n return new Provider.DisconnectedError();\n case 4901:\n return new Provider.ChainDisconnectedError();\n default:\n return new Provider.ProviderRpcError(code, details ?? 'Unknown provider RPC error');\n }\n}\n\nexport const provider: Provider.Provider = Provider.from({\n ...emitter,\n async request(args) {\n // @ts-expect-error\n const request = store.prepare(args);\n\n try {\n const response = await frameHost.ethProviderRequestV2(\n request\n ).then((res) => RpcResponse.parse(res, { request, raw: true }));\n\n\n if (response.error) {\n throw toProviderRpcError(response.error)\n }\n\n return response.result;\n } catch (e) {\n // ethProviderRequestV2 not supported, fall back to v1\n if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {\n return await frameHost.ethProviderRequest(request);\n }\n\n if (\n e instanceof Provider.ProviderRpcError ||\n e instanceof RpcResponse.BaseError\n ) {\n throw e;\n }\n\n\n throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined })\n }\n }\n});\n\n// Required to pass SSR\nif (typeof document !== 'undefined') {\n document.addEventListener(\"FarcasterFrameEthProviderEvent\", (event) => {\n if (event instanceof MessageEvent) {\n const ethProviderEvent = event.data as EthProviderWireEvent;\n // @ts-expect-error \n emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);\n }\n });\n}\n", "import { EventEmitter } from \"eventemitter3\";\nimport { FrameSDK, Emitter, EventMap } from \"./types\";\nimport { frameHost } from \"./frameHost\";\nimport { provider } from \"./provider\";\n\nexport function createEmitter(): Emitter {\n const emitter = new EventEmitter();\n\n return {\n get eventNames() {\n return emitter.eventNames.bind(emitter);\n },\n get listenerCount() {\n return emitter.listenerCount.bind(emitter);\n },\n get listeners() {\n return emitter.listeners.bind(emitter);\n },\n addListener: emitter.addListener.bind(emitter),\n emit: emitter.emit.bind(emitter),\n off: emitter.off.bind(emitter),\n on: emitter.on.bind(emitter),\n once: emitter.once.bind(emitter),\n removeAllListeners: emitter.removeAllListeners.bind(emitter),\n removeListener: emitter.removeListener.bind(emitter),\n };\n}\n\nconst emitter = createEmitter();\n\nexport const sdk: FrameSDK = {\n ...emitter,\n context: frameHost.context,\n actions: {\n setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),\n ready: frameHost.ready.bind(frameHost),\n close: frameHost.close.bind(frameHost),\n openUrl: frameHost.openUrl.bind(frameHost),\n addFrame: frameHost.addFrame.bind(frameHost),\n },\n wallet: {\n ethProvider: provider,\n }\n};\n\n// Required to pass SSR\nif (typeof document !== 'undefined')\n document.addEventListener(\"FarcasterFrameEvent\", (event) => {\n if (event instanceof MessageEvent) {\n if (event.data.type === \"primaryButtonClicked\") {\n emitter.emit(\"primaryButtonClicked\");\n }\n }\n });\n", "var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n overrideMap,\n overrideMap === errorMap ? undefined : errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n var _a, _b;\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n if (args.precision) {\n regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n regex = `${regex}(\\\\.\\\\d+)?`;\n }\n return regex;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a, _b;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError(akeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError(akeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodEnum_cache.set(this, void 0);\n }\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodNativeEnum_cache.set(this, void 0);\n }\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result)\n ? result.then((data) => freeze(data))\n : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nfunction custom(check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n}\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n datetimeRegex: datetimeRegex,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, datetimeRegex, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n", "import { z } from \"zod\";\nexport const notificationDetailsSchema = z.object({\n url: z.string(),\n token: z.string(),\n});\nexport const eventSchema = z.object({\n header: z.string(),\n payload: z.string(),\n signature: z.string(),\n});\n// JSON Farcaster Signature header after decoding\nexport const eventHeaderSchema = z.object({\n fid: z.number(),\n type: z.literal(\"app_key\"),\n key: z.string().startsWith(\"0x\"),\n});\n// Webhook event payload after decoding\nexport const eventFrameAddedPayloadSchema = z.object({\n event: z.literal(\"frame-added\"),\n notificationDetails: notificationDetailsSchema.optional(),\n});\nexport const eventFrameRemovedPayloadSchema = z.object({\n event: z.literal(\"frame-removed\"),\n});\nexport const eventNotificationsEnabledPayloadSchema = z.object({\n event: z.literal(\"notifications-enabled\"),\n notificationDetails: notificationDetailsSchema.required(),\n});\nexport const notificationsDisabledPayloadSchema = z.object({\n event: z.literal(\"notifications-disabled\"),\n});\nexport const eventPayloadSchema = z.discriminatedUnion(\"event\", [\n eventFrameAddedPayloadSchema,\n eventFrameRemovedPayloadSchema,\n eventNotificationsEnabledPayloadSchema,\n notificationsDisabledPayloadSchema,\n]);\n// Notifications API request and response formats\nexport const sendNotificationRequestSchema = z.object({\n notificationId: z.string().uuid(),\n title: z.string().max(32),\n body: z.string().max(128),\n targetUrl: z.string().max(256),\n tokens: z.string().array().max(100),\n});\nexport const sendNotificationResponseSchema = z.object({\n result: z.object({\n successfulTokens: z.array(z.string()),\n invalidTokens: z.array(z.string()),\n rateLimitedTokens: z.array(z.string()),\n }),\n});\n"],

+ "mappings": "0pBA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CAC5D,CAAC,EACYO,GAAqCN,EAAE,OAAO,CACvD,MAAOA,EAAE,QAAQ,wBAAwB,CAC7C,CAAC,EACYO,GAAqBP,EAAE,mBAAmB,QAAS,CAC5DG,GACAC,GACAC,GACAC,EACJ,CAAC,EAEYE,GAAgCR,EAAE,OAAO,CAClD,eAAgBA,EAAE,OAAO,EAAE,KAAK,EAChC,MAAOA,EAAE,OAAO,EAAE,IAAI,EAAE,EACxB,KAAMA,EAAE,OAAO,EAAE,IAAI,GAAG,EACxB,UAAWA,EAAE,OAAO,EAAE,IAAI,GAAG,EAC7B,OAAQA,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,CACtC,CAAC,EACYS,GAAiCT,EAAE,OAAO,CACnD,OAAQA,EAAE,OAAO,CACb,iBAAkBA,EAAE,MAAMA,EAAE,OAAO,CAAC,EACpC,cAAeA,EAAE,MAAMA,EAAE,OAAO,CAAC,EACjC,kBAAmBA,EAAE,MAAMA,EAAE,OAAO,CAAC,CACzC,CAAC,CACL,CAAC,Ed9CD,IAAOU,GAAQC",
+ "names": ["require_eventemitter3", "__commonJSMin", "exports", "module", "has", "prefix", "Events", "EE", "fn", "context", "once", "addListener", "emitter", "event", "listener", "evt", "clearEvent", "EventEmitter", "names", "events", "name", "handlers", "i", "l", "ee", "listeners", "a1", "a2", "a3", "a4", "a5", "len", "args", "length", "j", "src_exports", "__export", "createEmitter", "src_default", "eventFrameAddedPayloadSchema", "eventFrameRemovedPayloadSchema", "eventHeaderSchema", "eventNotificationsEnabledPayloadSchema", "eventPayloadSchema", "eventSchema", "notificationDetailsSchema", "notificationsDisabledPayloadSchema", "sdk", "sendNotificationRequestSchema", "sendNotificationResponseSchema", "import_index", "proxyMarker", "createEndpoint", "releaseProxy", "finalizer", "throwMarker", "isObject", "val", "proxyTransferHandler", "obj", "port1", "port2", "expose", "port", "wrap", "throwTransferHandler", "value", "serialized", "transferHandlers", "isAllowedOrigin", "allowedOrigins", "origin", "allowedOrigin", "ep", "callback", "ev", "id", "type", "path", "argumentList", "fromWireValue", "returnValue", "parent", "prop", "rawValue", "proxy", "transfer", "wireValue", "transferables", "toWireValue", "closeEndPoint", "error", "isMessagePort", "endpoint", "target", "pendingListeners", "data", "resolver", "createProxy", "throwIfProxyReleased", "isReleased", "releaseEndpoint", "requestResponseMessage", "proxyCounter", "proxyFinalizers", "newCount", "registerProxy", "unregisterProxy", "isProxyReleased", "_target", "r", "p", "_thisArg", "rawArgumentList", "last", "processArguments", "myFlat", "arr", "processed", "v", "transferCache", "transfers", "windowEndpoint", "w", "context", "targetOrigin", "msg", "name", "handler", "serializedValue", "resolve", "generateUUID", "mockEndpoint", "webViewEndpoint", "data", "_", "listener", "args", "endpoint", "windowEndpoint", "frameHost", "wrap", "endpoint", "version", "getVersion", "version", "BaseError", "_BaseError", "shortMessage", "options", "details", "docsPath", "docs", "message", "x", "getVersion", "fn", "walk", "err", "Provider_exports", "__export", "ChainDisconnectedError", "DisconnectedError", "IsUndefinedError", "ProviderRpcError", "UnauthorizedError", "UnsupportedMethodError", "UserRejectedRequestError", "createEmitter", "from", "RpcResponse_exports", "__export", "BaseError", "InternalError", "InvalidInputError", "InvalidParamsError", "InvalidRequestError", "LimitExceededError", "MethodNotFoundError", "MethodNotSupportedError", "ParseError", "ResourceNotFoundError", "ResourceUnavailableError", "TransactionRejectedError", "VersionNotSupportedError", "from", "parse", "response", "options", "request", "raw", "response_", "code", "JsonRpcError", "errorObject", "message", "data", "_InvalidInputError", "parameters", "_ResourceNotFoundError", "_ResourceUnavailableError", "_TransactionRejectedError", "_MethodNotSupportedError", "_LimitExceededError", "_VersionNotSupportedError", "_InvalidRequestError", "_MethodNotFoundError", "_InvalidParamsError", "_InternalError", "_ParseError", "ProviderRpcError", "code", "message", "UserRejectedRequestError", "UnauthorizedError", "UnsupportedMethodError", "DisconnectedError", "ChainDisconnectedError", "createEmitter", "emitter", "EventEmitter", "from", "provider", "options", "includeEvents", "IsUndefinedError", "args", "result", "parse", "BaseError", "RpcRequest_exports", "__export", "createStore", "from", "options", "id", "emitter", "Provider_exports", "store", "RpcRequest_exports", "toProviderRpcError", "code", "details", "provider", "args", "request", "response", "frameHost", "res", "RpcResponse_exports", "e", "event", "ethProviderEvent", "createEmitter", "emitter", "EventEmitter", "sdk", "frameHost", "provider", "event", "util", "val", "assertIs", "_arg", "assertNever", "_x", "items", "obj", "item", "validKeys", "k", "filtered", "e", "object", "keys", "key", "arr", "checker", "joinValues", "array", "separator", "_", "value", "objectUtil", "first", "second", "ZodParsedType", "getParsedType", "data", "ZodIssueCode", "quotelessJson", "ZodError", "_ZodError", "issues", "sub", "subs", "actualProto", "_mapper", "mapper", "issue", "fieldErrors", "processError", "error", "curr", "i", "el", "formErrors", "errorMap", "_ctx", "message", "overrideErrorMap", "setErrorMap", "map", "getErrorMap", "makeIssue", "params", "path", "errorMaps", "issueData", "fullPath", "fullIssue", "errorMessage", "maps", "m", "EMPTY_PATH", "addIssueToContext", "ctx", "overrideMap", "x", "ParseStatus", "_ParseStatus", "status", "results", "arrayValue", "INVALID", "pairs", "syncPairs", "pair", "finalObject", "DIRTY", "OK", "isAborted", "isDirty", "isValid", "isAsync", "__classPrivateFieldGet", "receiver", "state", "kind", "f", "__classPrivateFieldSet", "errorUtil", "message", "_ZodEnum_cache", "_ZodNativeEnum_cache", "ParseInputLazyPath", "parent", "value", "path", "key", "handleResult", "ctx", "result", "isValid", "error", "ZodError", "processCreateParams", "params", "errorMap", "invalid_type_error", "required_error", "description", "iss", "_a", "_b", "ZodType", "def", "input", "getParsedType", "ParseStatus", "isAsync", "data", "maybeAsyncResult", "check", "getIssueProperties", "val", "setError", "ZodIssueCode", "refinementData", "refinement", "ZodEffects", "ZodFirstPartyTypeKind", "ZodOptional", "ZodNullable", "ZodArray", "ZodPromise", "option", "ZodUnion", "incoming", "ZodIntersection", "transform", "defaultValueFunc", "ZodDefault", "ZodBranded", "catchValueFunc", "ZodCatch", "This", "target", "ZodPipeline", "ZodReadonly", "cuidRegex", "cuid2Regex", "ulidRegex", "uuidRegex", "nanoidRegex", "durationRegex", "emailRegex", "_emojiRegex", "emojiRegex", "ipv4Regex", "ipv6Regex", "base64Regex", "dateRegexSource", "dateRegex", "timeRegexSource", "args", "regex", "timeRegex", "datetimeRegex", "opts", "isValidIP", "ip", "version", "ZodString", "_ZodString", "ZodParsedType", "addIssueToContext", "INVALID", "status", "tooBig", "tooSmall", "util", "validation", "options", "minLength", "maxLength", "len", "ch", "min", "max", "floatSafeRemainder", "step", "valDecCount", "stepDecCount", "decCount", "valInt", "stepInt", "ZodNumber", "_ZodNumber", "kind", "inclusive", "ZodBigInt", "_ZodBigInt", "ZodBoolean", "OK", "ZodDate", "_ZodDate", "minDate", "maxDate", "ZodSymbol", "ZodUndefined", "ZodNull", "ZodAny", "ZodUnknown", "ZodNever", "ZodVoid", "_ZodArray", "item", "i", "schema", "deepPartialify", "ZodObject", "newShape", "fieldSchema", "ZodTuple", "_ZodObject", "shape", "keys", "shapeKeys", "extraKeys", "pairs", "keyValidator", "unknownKeys", "catchall", "syncPairs", "pair", "issue", "_c", "_d", "defaultError", "augmentation", "merging", "index", "mask", "newField", "createZodEnum", "handleResults", "results", "unionErrors", "childCtx", "dirty", "issues", "types", "getDiscriminator", "type", "ZodLazy", "ZodLiteral", "ZodEnum", "ZodNativeEnum", "ZodDiscriminatedUnion", "_ZodDiscriminatedUnion", "discriminator", "discriminatorValue", "optionsMap", "discriminatorValues", "mergeValues", "a", "b", "aType", "bType", "bKeys", "sharedKeys", "newObj", "sharedValue", "newArray", "itemA", "itemB", "handleParsed", "parsedLeft", "parsedRight", "isAborted", "merged", "isDirty", "left", "right", "_ZodTuple", "items", "itemIndex", "x", "rest", "schemas", "ZodRecord", "_ZodRecord", "keyType", "valueType", "first", "second", "third", "ZodMap", "finalMap", "ZodSet", "_ZodSet", "finalizeSet", "elements", "parsedSet", "element", "minSize", "maxSize", "size", "ZodFunction", "_ZodFunction", "makeArgsIssue", "makeIssue", "getErrorMap", "makeReturnsIssue", "returns", "fn", "me", "parsedArgs", "e", "parsedReturns", "returnType", "func", "getter", "values", "_ZodEnum", "expectedValues", "__classPrivateFieldGet", "__classPrivateFieldSet", "enumValues", "newDef", "opt", "nativeEnumValues", "promisified", "effect", "checkCtx", "arg", "processed", "DIRTY", "executeRefinement", "acc", "inner", "base", "preprocess", "newCtx", "ZodNaN", "BRAND", "_ZodPipeline", "inResult", "freeze", "custom", "fatal", "p", "_fatal", "p2", "late", "instanceOfType", "cls", "stringType", "numberType", "nanType", "bigIntType", "booleanType", "dateType", "symbolType", "undefinedType", "nullType", "anyType", "unknownType", "neverType", "voidType", "arrayType", "objectType", "strictObjectType", "unionType", "discriminatedUnionType", "intersectionType", "tupleType", "recordType", "mapType", "setType", "functionType", "lazyType", "literalType", "enumType", "nativeEnumType", "promiseType", "effectsType", "optionalType", "nullableType", "preprocessType", "pipelineType", "ostring", "onumber", "oboolean", "coerce", "NEVER", "z", "setErrorMap", "EMPTY_PATH", "objectUtil", "quotelessJson", "notificationDetailsSchema", "z", "eventSchema", "eventHeaderSchema", "eventFrameAddedPayloadSchema", "eventFrameRemovedPayloadSchema", "eventNotificationsEnabledPayloadSchema", "notificationsDisabledPayloadSchema", "eventPayloadSchema", "sendNotificationRequestSchema", "sendNotificationResponseSchema", "src_default", "sdk"]
+ }
node_modules/@farcaster/frame-sdk/dist/provider.d.ts
Changed around line 1
+ import { Provider } from "ox";
+ type GenericProviderRpcError = {
+ code: number;
+ details?: string;
+ };
+ export declare function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError;
+ export declare const provider: Provider.Provider;
+ export {};
node_modules/@farcaster/frame-sdk/dist/provider.js
Changed around line 1
+ import { Provider, RpcRequest, RpcResponse } from "ox";
+ import { frameHost } from "./frameHost";
+ const emitter = Provider.createEmitter();
+ const store = RpcRequest.createStore();
+ export function toProviderRpcError({ code, details }) {
+ switch (code) {
+ case 4001:
+ return new Provider.UserRejectedRequestError();
+ case 4100:
+ return new Provider.UnauthorizedError();
+ case 4200:
+ return new Provider.UnsupportedMethodError();
+ case 4900:
+ return new Provider.DisconnectedError();
+ case 4901:
+ return new Provider.ChainDisconnectedError();
+ default:
+ return new Provider.ProviderRpcError(code, details !== null && details !== void 0 ? details : 'Unknown provider RPC error');
+ }
+ }
+ export const provider = Provider.from({
+ ...emitter,
+ async request(args) {
+ // @ts-expect-error
+ const request = store.prepare(args);
+ try {
+ const response = await frameHost.ethProviderRequestV2(request).then((res) => RpcResponse.parse(res, { request, raw: true }));
+ if (response.error) {
+ throw toProviderRpcError(response.error);
+ }
+ return response.result;
+ }
+ catch (e) {
+ // ethProviderRequestV2 not supported, fall back to v1
+ if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {
+ return await frameHost.ethProviderRequest(request);
+ }
+ if (e instanceof Provider.ProviderRpcError ||
+ e instanceof RpcResponse.BaseError) {
+ throw e;
+ }
+ throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined });
+ }
+ }
+ });
+ // Required to pass SSR
+ if (typeof document !== 'undefined') {
+ document.addEventListener("FarcasterFrameEthProviderEvent", (event) => {
+ if (event instanceof MessageEvent) {
+ const ethProviderEvent = event.data;
+ // @ts-expect-error
+ emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);
+ }
+ });
+ }
node_modules/@farcaster/frame-sdk/dist/sdk.d.ts
Changed around line 1
+ import { FrameSDK, Emitter } from "./types";
+ export declare function createEmitter(): Emitter;
+ export declare const sdk: FrameSDK;
node_modules/@farcaster/frame-sdk/dist/sdk.js
Changed around line 1
+ import { EventEmitter } from "eventemitter3";
+ import { frameHost } from "./frameHost";
+ import { provider } from "./provider";
+ export function createEmitter() {
+ const emitter = new EventEmitter();
+ return {
+ get eventNames() {
+ return emitter.eventNames.bind(emitter);
+ },
+ get listenerCount() {
+ return emitter.listenerCount.bind(emitter);
+ },
+ get listeners() {
+ return emitter.listeners.bind(emitter);
+ },
+ addListener: emitter.addListener.bind(emitter),
+ emit: emitter.emit.bind(emitter),
+ off: emitter.off.bind(emitter),
+ on: emitter.on.bind(emitter),
+ once: emitter.once.bind(emitter),
+ removeAllListeners: emitter.removeAllListeners.bind(emitter),
+ removeListener: emitter.removeListener.bind(emitter),
+ };
+ }
+ const emitter = createEmitter();
+ export const sdk = {
+ ...emitter,
+ context: frameHost.context,
+ actions: {
+ setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),
+ ready: frameHost.ready.bind(frameHost),
+ close: frameHost.close.bind(frameHost),
+ openUrl: frameHost.openUrl.bind(frameHost),
+ addFrame: frameHost.addFrame.bind(frameHost),
+ },
+ wallet: {
+ ethProvider: provider,
+ }
+ };
+ // Required to pass SSR
+ if (typeof document !== 'undefined')
+ document.addEventListener("FarcasterFrameEvent", (event) => {
+ if (event instanceof MessageEvent) {
+ if (event.data.type === "primaryButtonClicked") {
+ emitter.emit("primaryButtonClicked");
+ }
+ }
+ });
node_modules/@farcaster/frame-sdk/dist/tsconfig.tsbuildinfo
Changed around line 1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/comlink/dist/umd/protocol.d.ts","../../../node_modules/comlink/dist/umd/comlink.d.ts","../src/endpoint.ts","../../../node_modules/abitype/dist/types/register.d.ts","../../../node_modules/abitype/dist/types/types.d.ts","../../../node_modules/abitype/dist/types/abi.d.ts","../../../node_modules/abitype/dist/types/errors.d.ts","../../../node_modules/abitype/dist/types/narrow.d.ts","../../../node_modules/abitype/dist/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/signatures.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/formatabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/utils.d.ts","../../../node_modules/abitype/dist/types/human-readable/types/structs.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabi.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/parseabiparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiitem.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/abiparameter.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/signature.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/splitparameters.d.ts","../../../node_modules/abitype/dist/types/human-readable/errors/struct.d.ts","../../../node_modules/abitype/dist/types/exports/index.d.ts","../../../node_modules/ox/_types/core/errors.d.ts","../../../node_modules/ox/_types/core/internal/bytes.d.ts","../../../node_modules/ox/_types/core/internal/hex.d.ts","../../../node_modules/ox/_types/core/hex.d.ts","../../../node_modules/ox/_types/core/bytes.d.ts","../../../node_modules/ox/_types/core/hash.d.ts","../../../node_modules/ox/_types/core/internal/types.d.ts","../../../node_modules/ox/_types/core/abiitem.d.ts","../../../node_modules/ox/_types/core/publickey.d.ts","../../../node_modules/ox/_types/core/address.d.ts","../../../node_modules/ox/_types/core/internal/cursor.d.ts","../../../node_modules/ox/_types/core/internal/abiparameters.d.ts","../../../node_modules/ox/_types/core/abiparameters.d.ts","../../../node_modules/ox/_types/core/internal/abiitem.d.ts","../../../node_modules/ox/_types/core/abi.d.ts","../../../node_modules/ox/_types/core/internal/abiconstructor.d.ts","../../../node_modules/ox/_types/core/abiconstructor.d.ts","../../../node_modules/ox/_types/core/internal/abierror.d.ts","../../../node_modules/ox/_types/core/abierror.d.ts","../../../node_modules/ox/_types/core/accesslist.d.ts","../../../node_modules/ox/_types/core/rlp.d.ts","../../../node_modules/ox/_types/core/signature.d.ts","../../../node_modules/ox/_types/core/authorization.d.ts","../../../node_modules/ox/_types/core/transaction.d.ts","../../../node_modules/ox/_types/core/withdrawal.d.ts","../../../node_modules/ox/_types/core/block.d.ts","../../../node_modules/ox/_types/core/filter.d.ts","../../../node_modules/ox/_types/core/internal/abievent.d.ts","../../../node_modules/ox/_types/core/abievent.d.ts","../../../node_modules/ox/_types/core/internal/abifunction.d.ts","../../../node_modules/ox/_types/core/abifunction.d.ts","../../../node_modules/ox/_types/core/accountproof.d.ts","../../../node_modules/ox/_types/core/aesgcm.d.ts","../../../node_modules/ox/_types/core/internal/base58.d.ts","../../../node_modules/ox/_types/core/base58.d.ts","../../../node_modules/ox/_types/core/base64.d.ts","../../../node_modules/ox/_types/core/kzg.d.ts","../../../node_modules/ox/_types/core/blobs.d.ts","../../../node_modules/ox/_types/core/bloom.d.ts","../../../node_modules/ox/_types/core/blspoint.d.ts","../../../node_modules/@noble/curves/abstract/modular.d.ts","../../../node_modules/@noble/curves/abstract/utils.d.ts","../../../node_modules/@noble/curves/abstract/curve.d.ts","../../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../../node_modules/@noble/curves/abstract/weierstrass.d.ts","../../../node_modules/@noble/curves/abstract/tower.d.ts","../../../node_modules/@noble/curves/abstract/bls.d.ts","../../../node_modules/ox/_types/core/bls.d.ts","../../../node_modules/ox/_types/core/internal/lru.d.ts","../../../node_modules/ox/_types/core/caches.d.ts","../../../node_modules/ox/_types/core/contractaddress.d.ts","../../../node_modules/ox/_types/core/internal/ens.d.ts","../../../node_modules/ox/_types/core/ens.d.ts","../../../node_modules/@scure/bip32/lib/index.d.ts","../../../node_modules/ox/_types/core/internal/hdkey.d.ts","../../../node_modules/ox/_types/core/hdkey.d.ts","../../../node_modules/ox/_types/core/fee.d.ts","../../../node_modules/ox/_types/core/json.d.ts","../../../node_modules/ox/_types/core/log.d.ts","../../../node_modules/@scure/bip39/wordlists/czech.d.ts","../../../node_modules/@scure/bip39/wordlists/english.d.ts","../../../node_modules/@scure/bip39/wordlists/french.d.ts","../../../node_modules/@scure/bip39/wordlists/italian.d.ts","../../../node_modules/@scure/bip39/wordlists/japanese.d.ts","../../../node_modules/@scure/bip39/wordlists/korean.d.ts","../../../node_modules/@scure/bip39/wordlists/portuguese.d.ts","../../../node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts","../../../node_modules/@scure/bip39/wordlists/spanish.d.ts","../../../node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts","../../../node_modules/ox/_types/core/internal/mnemonic/wordlists.d.ts","../../../node_modules/ox/_types/core/mnemonic.d.ts","../../../node_modules/ox/_types/core/personalmessage.d.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/ox/_types/core/internal/register.d.ts","../../../node_modules/ox/_types/core/transactionreceipt.d.ts","../../../node_modules/ox/_types/core/transactionrequest.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/eth.d.ts","../../../node_modules/ox/_types/core/internal/rpcschemas/wallet.d.ts","../../../node_modules/ox/_types/core/rpcschema.d.ts","../../../node_modules/ox/_types/core/internal/rpcschema.d.ts","../../../node_modules/ox/_types/core/provider.d.ts","../../../node_modules/ox/_types/core/rpcrequest.d.ts","../../../node_modules/ox/_types/core/rpcresponse.d.ts","../../../node_modules/ox/_types/core/internal/promise.d.ts","../../../node_modules/ox/_types/core/internal/rpctransport.d.ts","../../../node_modules/ox/_types/core/rpctransport.d.ts","../../../node_modules/ox/_types/core/secp256k1.d.ts","../../../node_modules/ox/_types/core/p256.d.ts","../../../node_modules/ox/_types/core/siwe.d.ts","../../../node_modules/ox/_types/core/solidity.d.ts","../../../node_modules/ox/_types/core/transactionenvelope.d.ts","../../../node_modules/ox/_types/core/transactionenvelopelegacy.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip1559.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip2930.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip4844.d.ts","../../../node_modules/ox/_types/core/transactionenvelopeeip7702.d.ts","../../../node_modules/ox/_types/core/typeddata.d.ts","../../../node_modules/ox/_types/core/validatordata.d.ts","../../../node_modules/ox/_types/core/value.d.ts","../../../node_modules/ox/_types/core/internal/webauthn.d.ts","../../../node_modules/ox/_types/core/webauthnp256.d.ts","../../../node_modules/ox/_types/core/webcryptop256.d.ts","../../../node_modules/ox/_types/index.d.ts","../../../node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/zod/lib/zoderror.d.ts","../../../node_modules/zod/lib/locales/en.d.ts","../../../node_modules/zod/lib/errors.d.ts","../../../node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/zod/lib/types.d.ts","../../../node_modules/zod/lib/external.d.ts","../../../node_modules/zod/lib/index.d.ts","../../../node_modules/zod/index.d.ts","../../frame-core/dist/types.d.ts","../../frame-core/dist/index.d.ts","../src/framehost.ts","../src/types.ts","../src/provider.ts","../src/sdk.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/node-forge/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileIdsList":[[228,239,281],[239,281],[145,146,148,149,150,239,281],[145,239,281],[145,146,147,239,281],[145,149,239,281],[228,229,230,231,232,239,281],[228,230,239,281],[239,281,294,331],[239,281,333],[239,281,334],[239,281,331],[239,278,281],[239,280,281],[281],[239,281,286,316],[239,281,282,287,293,294,301,313,324],[239,281,282,283,293,301],[234,235,236,239,281],[239,281,284,325],[239,281,285,286,294,302],[239,281,286,313,321],[239,281,287,289,293,301],[239,280,281,288],[239,281,289,290],[239,281,293],[239,281,291,293],[239,280,281,293],[239,281,293,294,295,313,324],[239,281,293,294,295,308,313,316],[239,276,281,329],[239,276,281,289,293,296,301,313,324],[239,281,293,294,296,297,301,313,321,324],[239,281,296,298,313,321,324],[237,238,239,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330],[239,281,293,299],[239,281,300,324,329],[239,281,289,293,301,313],[239,281,302],[239,281,303],[239,280,281,304],[239,278,279,280,281,282,283,284,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330],[239,281,306],[239,281,307],[239,281,293,308,309],[239,281,308,310,325,327],[239,281,293,313,314,315,316],[239,281,313,315],[239,281,313,314],[239,281,316],[239,281,317],[239,278,281,313],[239,281,293,319,320],[239,281,319,320],[239,281,286,301,313,321],[239,281,322],[239,281,301,323],[239,281,296,307,324],[239,281,286,325],[239,281,313,326],[239,281,300,327],[239,281,328],[239,281,286,293,295,304,313,324,327,329],[239,281,313,330],[239,281,337,338,339],[239,281,342],[82,83,239,281],[83,239,281],[82,84,85,86,87,89,90,91,92,95,96,97,98,99,100,101,102,103,239,281],[85,239,281],[84,85,88,239,281],[84,85,239,281],[84,91,239,281],[84,88,90,239,281],[83,84,88,239,281],[83,84,89,239,281],[83,84,88,93,94,239,281],[83,84,86,88,93,94,239,281],[83,84,239,281],[83,84,88,93,239,281],[82,83,84,88,94,239,281],[82,83,84,239,281],[79,239,281],[104,105,118,239,281],[104,105,108,111,112,117,119,120,239,281],[104,105,108,111,112,117,118,119,122,239,281],[104,105,108,109,110,111,112,114,117,118,119,132,239,281],[104,105,108,111,112,116,117,118,119,134,239,281],[104,105,108,110,111,118,119,239,281],[104,105,108,109,116,239,281],[105,108,111,114,239,281],[207,239,281],[104,105,109,110,113,239,281],[105,108,109,239,281],[105,108,110,111,114,125,126,239,281],[105,108,109,138,239,281],[105,108,109,111,115,141,239,281],[105,108,111,114,128,129,239,281],[105,108,109,110,239,281],[105,108,109,111,144,151,239,281],[105,108,109,111,239,281],[105,106,107,108,239,281],[153,239,281],[105,108,109,110,111,114,125,239,281],[105,108,109,110,156,239,281],[108,111,239,281],[105,108,111,114,130,239,281],[105,108,109,113,158,159,239,281],[105,106,107,109,239,281],[111,118,239,281],[104,108,111,118,131,239,281],[104,105,111,112,117,119,239,281],[104,105,108,109,111,114,115,117,239,281],[105,109,239,281],[105,108,157,207,239,281],[105,158,160,239,281],[105,108,239,281],[164,165,166,167,168,169,170,171,172,173,239,281],[105,239,281],[183,239,281],[111,183,239,281],[108,114,128,130,131,136,161,163,179,180,183,239,281],[108,111,114,180,183,239,281],[105,111,183,186,187,190,239,281],[105,113,205,239,281],[105,108,109,160,174,239,281],[105,108,109,113,126,145,146,149,239,281],[105,111,114,177,183,184,239,281],[105,108,109,111,115,239,281],[111,183,184,207,239,281],[111,207,239,281],[111,178,181,182,239,281],[105,111,183,184,187,188,189,239,281],[105,108,109,111,113,114,126,145,146,149,239,281],[105,111,114,239,281],[105,108,111,114,124,126,127,239,281],[105,108,110,111,114,124,125,126,195,239,281],[105,108,110,111,124,125,126,142,195,197,239,281],[105,108,110,111,114,124,125,126,127,195,239,281],[105,108,110,111,114,125,126,195,239,281],[105,108,111,114,163,239,281],[105,108,111,114,124,127,239,281],[104,105,108,109,110,111,114,117,162,239,281],[105,108,109,110,114,239,281],[105,108,109,110,111,113,126,140,192,204,239,281],[105,108,109,111,113,126,239,281],[105,108,109,110,112,113,114,117,119,121,123,124,125,126,127,128,129,130,131,133,135,136,137,139,140,141,142,143,144,152,154,155,157,160,161,162,163,175,176,178,179,180,183,185,186,187,190,191,192,193,194,195,196,197,198,199,200,201,202,203,205,206,239,281],[239,248,252,281,324],[239,248,281,313,324],[239,243,281],[239,245,248,281,321,324],[239,281,301,321],[239,243,281,331],[239,245,248,281,301,324],[239,240,241,244,247,281,293,313,324],[239,248,255,281],[239,240,246,281],[239,248,269,270,281],[239,244,248,281,316,324,331],[239,269,281,331],[239,242,243,281,331],[239,248,281],[239,242,243,244,245,246,247,248,249,250,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,270,271,272,273,274,275,281],[239,248,263,281],[239,248,255,256,281],[239,246,248,256,257,281],[239,247,281],[239,240,243,248,281],[239,248,252,256,257,281],[239,252,281],[239,246,248,251,281,324],[239,240,245,248,255,281],[239,281,313],[239,243,248,269,281,329,331],[219,239,281],[210,211,239,281],[208,209,210,212,213,217,239,281],[209,210,239,281],[218,239,281],[210,239,281],[208,209,210,213,214,215,216,239,281],[208,209,219,239,281],[221,239,281],[207,220,239,281],[80,239,281],[80,81,222,239,281],[222,226,239,281],[207,222,223,239,281],[177,223,224,225,239,281],[177,207,222,239,281]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"e12a46ce14b817d4c9e6b2b478956452330bf00c9801b79de46f7a1815b5bd40","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"bab26767638ab3557de12c900f0b91f710c7dc40ee9793d5a27d32c04f0bf646","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a456eb21680eca96d5e836e2a5cc74730a2c0e03f18eb17a7f652b30c993e4","impliedFormat":1},{"version":"9426d1cc15328fcbb59adb88880ccfd79f2bc959334d485273da743aac083eaa","impliedFormat":1},{"version":"e91d2943ca5922809af0c9bcb01d6861ef48c6b3602569183bb35306cf5c7298","signature":"62cc0a18c32b585fb6ac0c9d6296f44c774c283183de18c0c083ab504ba6a417"},{"version":"b166e33cf8226ac8781899da244397e77e5b6528271339ce26ece0c2c7242d7f","impliedFormat":1},{"version":"a623d5cf7925e72dbf4602862499564389c7c3dc0ce049733cc0ec756a846667","impliedFormat":1},{"version":"9c1724d9b0cb3d7141dc25a44b0d18cf0b3b20a42e971c6898d4195ec6d4b8dd","impliedFormat":1},{"version":"63634c0855e639ea7f609613d799bbb0dc774ec9f3242bc272c5567dc5ccd485","impliedFormat":1},{"version":"592f06c425ab27b4bafec624ef5b153cbdde9ac58f7113100a2da1c4309d1309","impliedFormat":1},{"version":"19c8ab51b4b07c529d95cd4d5c8d100a68dca247ec83a5097d35106fd8a7acca","impliedFormat":1},{"version":"bec1d0ac62cee9b4d1ea8b64c4798c59c1726668b76d06b68a206e0cb0ac76a6","impliedFormat":1},{"version":"fb4f06b2af9ee4b2d2be8c964b0a8f6dd260be9048488ffcf04eb5c0fcb8bf61","impliedFormat":1},{"version":"f185055f36d76e2df5eeb87ae1148a25a125be2bff2095e1bd39c1c7ce85a640","impliedFormat":1},{"version":"948a56ec8bfbbf20ad2496f49f451cfeb878cfcd6156032c0769b603f3ed8f18","impliedFormat":1},{"version":"979fdebc12d30becce6a15e68d99bc8a2a470a8dcf0898ac9e2d241a7e531940","impliedFormat":1},{"version":"1824ad7d4259910646279d667e517334c0aa24d5c810e8ea6da756fc2e02372f","impliedFormat":1},{"version":"989e9060e220ff86025044ba3c867a83512a655b7cf6253b2bd682192debf390","impliedFormat":1},{"version":"8b1feb568c859feb59236e9723b7a86e2ff8f9a8f2012366ffd1798164dc2798","impliedFormat":1},{"version":"8fab988b0129e674afc0bc0e95329b4052cf027f5d5b5b3e6e92d055b5ba88ef","impliedFormat":1},{"version":"4fe56d524ab24c225668803c1792945053e648b4e8fa4e50fa35594495b56732","impliedFormat":1},{"version":"2652931b8f7dca9a57f21aeb25b5d46851dcf17e4d5ed54b9b57d5d26e647680","impliedFormat":1},{"version":"d364c8df7d52199f5d011b4ded96f36dd114b984f5ee2e50ffe7d30ac1ab4bba","impliedFormat":1},{"version":"408f9eb3c7a3533bf5f07e0cde110a5ee0702864795ee6727792520fe60320b6","impliedFormat":1},{"version":"ba79eb15c36ff23e352ef608ceb7f9f0f278b15ad42512c05eedbe78f228e0e4","impliedFormat":1},{"version":"4cd233c6af471432253a67ae4f3b43c85e58a71418d98c3e162a1dac975c68f6","impliedFormat":1},{"version":"aa77c7d8ddc961e8192bcaa92da140e1205f8aee78bfadead5f52b8844d7d05c","impliedFormat":1},{"version":"37e37d3a525a207efab5458069fd9a27a174d2dc3af729702c81729ca03a349f","impliedFormat":1},{"version":"70997e63b7b3d90188fa2106753d35afd3b43b2bde957c46a5516d89e3ef0c1a","impliedFormat":1},{"version":"7fdaebdb3780d0549a8e0abcb18965e2f62224bdde633aeafb22c64c02fe9e9d","impliedFormat":1},{"version":"24f848479d1fd142d3d7cf034bedca247d1d9b8b31c2632c09695bd6a0441141","impliedFormat":1},{"version":"7e977910c045ec087f435905eb730e9c84e8d6b97f0dd0fe0c022dfed665613a","impliedFormat":1},{"version":"9c4ec2692cdb791823b9407753dec50d69b1b990cf7038cac3fab01e8ed5f709","impliedFormat":1},{"version":"176e7ce333b9988d68cfd5ab6717b20421a03b415af57f2a3bea1aa6b8d634a9","impliedFormat":1},{"version":"301a1ba797c537d2598a557af4862e7823353c80529c9a58bc1a0c08779deb5d","impliedFormat":1},{"version":"4fb2df0b48ac55d960fedfb7e7b917d2d29608d7f351b70b6b3104e2d02d2f11","impliedFormat":1},{"version":"2f37ef3a5d3fb119b390cb48c77352914c814b98948633deac90099faae320a6","impliedFormat":1},{"version":"ca2ce76fd743888d0f0c5be48b1b17a864f5ff2b0d09e954d3690645a794533f","impliedFormat":1},{"version":"728ec07c8a50b9f22da9c9aa8859e29462526fd996ac1d21c6c9a81b78106dd5","impliedFormat":1},{"version":"d4d210575ebc08ed97821b7a107692b91c9590d5328ec3aaac0b75f66a1c9188","impliedFormat":1},{"version":"fcaa6a4283732fcc1b571a326567c10b1ebce2faf1a0645493080ba230e57497","impliedFormat":1},{"version":"be9ef0a0446cf28d529a684e4a7d14101f03e054896704fbdc5470d8fa4de6b4","impliedFormat":1},{"version":"acd32f2f192d93e8161938ebfd74fa063e67a09cbe0156a74ae2e421a1e8f786","impliedFormat":1},{"version":"1eeb9deebe9a0a6cc52a32aa1533a1535ecc1b4e831290c753e72e0394e866a9","impliedFormat":1},{"version":"ae1f27a5966db7640edb4c82974b985acb7b1fa0859bff7cd769629436822d9a","impliedFormat":1},{"version":"a3d0b36bb3185da856cc0a7df02f63008935602ed09f84b0d960c7f9f7f6d63d","impliedFormat":1},{"version":"60319cf75d460432a0769a2f98a9ab6fc3ad39290bf7f1b33b922e832ff5b40e","impliedFormat":1},{"version":"30ceaf6e65817221c5c62cedfc26892a4b79a78c7eb7367bcccc0e217b517bf1","impliedFormat":1},{"version":"a3ea4adb87d130799d26945196bba7e889056c74dac98069d58c015d10f3c053","impliedFormat":1},{"version":"a82f1d66de93c80bca7a744647c748657c050341e53de63fae5aecb72f85f5e6","impliedFormat":1},{"version":"83dc49d957cb3b4af3a45cd7b54958149d21088d49f95e8ba6e3d3fb2b37d880","impliedFormat":1},{"version":"b7825c3d04bfc38caf9cb94341cede132d227654b28e3a603d1576bf199a7e47","impliedFormat":1},{"version":"d4832d1deaacad5d196b2a83239fb94c80f97df889c02a75859b05b460885300","impliedFormat":1},{"version":"888180b3d951298bf85d430543a1fa2fc6264fc847aef5baa821c743b5d84a58","impliedFormat":1},{"version":"4ec19d58993999260e0df245eec5fd6d7dd92978360c4f0706c9260091f55c70","impliedFormat":1},{"version":"0bc4f86d58f4a4b5a9563ba8d2b23a3fac187a6e167772f6689ea807081ed631","impliedFormat":1},{"version":"7a4e38850bfca2b105fd3e5609b68b52271fd7f2cab9f1d4031748e8bfd29633","impliedFormat":1},{"version":"496ee894efcd5de63169a3a4e47d74f16f754eb212b1ef209f9255aaaeef3450","impliedFormat":1},{"version":"246bec681a7465de230b083e0e63633b568a2d79c20fe167d3280e21200b22c8","impliedFormat":1},{"version":"3ee38e0bac65430814b195ed22b5aadfbe4fbd8890c5e5b45a7ba13f05c0ea0d","impliedFormat":1},{"version":"45181e4221f90d98bf2046ba55cdc22411dc64b9a8cc04f1c8702038b7334d01","impliedFormat":1},{"version":"7fe0253ff44f072ea13fa372e2fbd007aa439df9560762950d38b4c203b2c51a","impliedFormat":1},{"version":"bf4ebcedc7324dd0cbe83488830f7966e808fabf4836d516d1b591ea91417c68","impliedFormat":1},{"version":"c53f7caa42ad0bff2b3cad20e4780990aadf647c845cb66cec004062cc4ae549","impliedFormat":1},{"version":"af0dfd141ecb2e24ef9a3028727214a69aa528d0be91e8728a7abd4fd6659b5f","impliedFormat":1},{"version":"786d583f831d03da4aed9f9354fd9c4ef00aa8122564da5e683631423639c258","impliedFormat":1},{"version":"418fdcdefc32953c6c7ea7e9979ce84b87618de9def698e73da2c16697fe023b","impliedFormat":1},{"version":"4d0db315ab6869de22694dc968fe740cfef635a21455a4d2bd33bc95b8eec381","impliedFormat":1},{"version":"987339ae38c9341b0d90da7350e543c0d561d04b540f29a6912d387ffee30123","impliedFormat":1},{"version":"d6add5a006175d8e4ac5067baa29854010ae2be9eec488f3b09f62e48fdcbc73","impliedFormat":1},{"version":"78b320333fa889c9532276db075578cdde53e41d0c5ff1dc901a22e5c9e25bd8","impliedFormat":1},{"version":"44bebcbc4a93fea28f3564a7763dd12f0f3bdec624eb8a63e97afd007d1ff4bd","impliedFormat":1},{"version":"7531f6904a711cd870729de7bd8fb5829088eaf82381e88f81aa4a2c9ec57b75","impliedFormat":1},{"version":"f68260d8d6d27ca979ddc8e3ee70ada9818c77dbe2dc6824ca0b7a041f8e5c79","impliedFormat":1},{"version":"af120f4603c7fb09e9c082dd486388c102a17f434031eb2b68c95a1e8994412a","impliedFormat":1},{"version":"af807f4d873d3c603e802b9b8aef8fdf067a3e61e7dfe33f78a28fe21ca11061","impliedFormat":1},{"version":"08447e8b528a1f8d1162aa044695d460ce5179a78bd174fa0673fa16b06011aa","impliedFormat":1},{"version":"8e532c6486042736463d1116d45b0db814d969ffd2ee822e4e5ce975807c16f0","impliedFormat":1},{"version":"fad47f66fef1ff277730abff9c9330dd70284eb0ced43d6dd6aee15fc5f19a1b","impliedFormat":1},{"version":"7b4b0aaf0978122b44aa6317977be3e2f9d3d261ae4a8d93bfd511a7ddee7dfe","impliedFormat":1},{"version":"cb5def9d6efe73b09a7adce13bbb7fad7ee6df7a59259300de6ca77fe84041fc","impliedFormat":1},{"version":"1ddd1ca692a6c656ade0a85c9a722b3679b3d0bf113b699908e0325cf3537dbe","impliedFormat":1},{"version":"16c6ff8bcfef0ad22abffa3329760bb611c4c4aa098ece0d6bcfd1cd16610997","impliedFormat":1},{"version":"3d15157b6685e63a7e43a39bbc1fbcfdbf1250fa3598af55a2384f6f31260c86","impliedFormat":1},{"version":"58b5bc399cd98b87eff2c80d995d4dd63e69c801ec880b85c7da73ddc561a751","impliedFormat":1},{"version":"401c5b0f01bb0dce7a85899d8665c7d9c0b1637dc642805320d76c1a071135dd","impliedFormat":1},{"version":"af81e13747ef7589a726505dd4c2dcf00bb2b9fd7c3c84d580c1d02dbc3b58a9","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"6a1197b37f8f406bfb74528ca1fb90659c6d1a251d472b1c65affb5c6a6ba5f8","impliedFormat":1},{"version":"516c53364c6b242591c65afc8b0f0f0cee74ac8a04f52470a539fcb33da2e318","impliedFormat":1},{"version":"cdf612f32afd760cd4a568e3f0c4646394f18fe2277a5ec1c084f1430776f1e0","impliedFormat":1},{"version":"e8ee036c1281885b9cc58f9d1d47472037d080a45b44a3ecbb8fea445e87415d","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"90887074bbd664eb4726465ccc6740fa8886e525e5c0afcc734e41df41851a60","impliedFormat":1},{"version":"0a3d92e1ed031f67294fc02692352444c0514e371b7093b8d224b6f9ea02d958","impliedFormat":1},{"version":"cc31889ffc5c322ff53137f54f3aa8f74a969cd01adbb296737231f31a870322","impliedFormat":1},{"version":"e20c7790d6923b9663bff5ba3b3bb2769f65df6fdd3294034fd9d289034ebe95","impliedFormat":1},{"version":"3df74fc90d6cf9c51ad6864a7d9e1e6d162a6e158f99ab2b7d878b4646aa343b","impliedFormat":1},{"version":"306712d7dc95ea2006413dec36b165bff346626340d2ba5adc14a3bafdcb57db","impliedFormat":1},{"version":"cca7da500accfa2e8689e453b1d74d05bcbf1dc6ef86f12b8cb1518a880adffa","impliedFormat":1},{"version":"9a3b507c7f949ca6e0988c7a799913d8ad237434b61c5f8ef8651c770e82db8e","impliedFormat":1},{"version":"3470c8f802d69951553de4bf72f42a77b1d273c971dc8462d7ac94b2d5069171","impliedFormat":1},{"version":"778e3be9387041245dc4eddd0efe6a61f0ebe4bed017493a30785abd027b0458","impliedFormat":1},{"version":"312476b9c5aa822a32c969ad650d1b475b631506af9a1448abf2d714997f7510","impliedFormat":1},{"version":"2dc955a0fbc3c0b9a49bcc3ffb9dfb31b3a53af0db862260dd4f824c6b4ff36c","impliedFormat":1},{"version":"0f513df152e8cd877ddc47e1a767f77d2111d7b5dfbc4f68ca355d1dd59c062c","impliedFormat":1},{"version":"947dba9cff98d6eeeb5c1933600a03d2ea16967dc3c4080c15e5d4667990f814","impliedFormat":1},{"version":"396b5bf9e2469a7736cc70f5b0a4340bf5e74ca8337213cbfc1f9c44b0e3799c","impliedFormat":1},{"version":"0c904d0442caed7effc17e2c70c7c96df0b34797e1adb9999ce5e5bbbf7e1471","impliedFormat":1},{"version":"4e42a180e6ad34da29c0f9e0e34dfe728292d4148aeb1a36e3ca8e6551f0fc42","impliedFormat":1},{"version":"8722ec4640f5eb5dcc91be6e59e6148b861e93954a766e05d5d55dd96b29e1c1","impliedFormat":1},{"version":"3118f4f3494834d0a131955088b28cba84639a66e23e6de211bdb75fe518ea90","impliedFormat":1},{"version":"8ec50f5d9824f3692fe32a80fb160d72ea39d94c5aac4f3334f7724ae61de6df","impliedFormat":1},{"version":"dfafee7cd0b796c959cd7f4c6d4ae2f1f89fab40129d993dd564f9ef0bd0068d","impliedFormat":1},{"version":"24056a75e8e602d911cea68b06b5e238604aff92d30ec8a119a2ecf07568d4fb","impliedFormat":1},{"version":"bc5fa245e7a3eb9216ce30106e37294a9691efd85391e3de61478c3ca0da360e","impliedFormat":1},{"version":"4523237b5a992a30850668522bb1719bab8f9e50c00b6428f660ca75a451a7b1","impliedFormat":1},{"version":"f116a1399a2583ff7ce15068f007e5c47d06c9964674bc48ea6e69867d0692a5","impliedFormat":1},{"version":"68cabe63e69d17160c77eeefafd83df10a4c0ec3353b6a91a48a205e9dd505ab","impliedFormat":1},{"version":"400ba51008a98a5afc065b12c3aee8f447a0b66c2a4c1bcc3e5a2f41015ddee7","impliedFormat":1},{"version":"49f735c4888a72b7e70b4a90db308ea672967fc2a1670c5b6b598f6b09403baf","impliedFormat":1},{"version":"5a75e49d8e0a78e2cc02bd13fcab4f26d5d6729912e2096b6fe442b0960c0cf7","impliedFormat":1},{"version":"8dd31c3f136773aac1b62723ada4c7fab649dddbe02274424cdac9b9a76bc22d","impliedFormat":1},{"version":"5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","impliedFormat":1},{"version":"c2869c4f2f79fd2d03278a68ce7c061a5a8f4aed59efb655e25fe502e3e471d5","impliedFormat":1},{"version":"b8fe42dbf4b0efba2eb4dbfb2b95a3712676717ff8469767dc439e75d0c1a3b6","impliedFormat":1},{"version":"8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","impliedFormat":1},{"version":"ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","impliedFormat":1},{"version":"83306c97a4643d78420f082547ea0d488a0d134c922c8e65fc0b4f08ef66d92b","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","impliedFormat":1},{"version":"c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","impliedFormat":1},{"version":"dccd26a5c85325a011aff40f401e0892bd0688d44132ba79e803c67e68fffea5","impliedFormat":1},{"version":"f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","impliedFormat":1},{"version":"b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","impliedFormat":1},{"version":"5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","impliedFormat":1},"7e0062d659dfc76e70897c1e8d9f4f461f6ac1158da4714877f166f5bbef6161","d51485b82b29d07016e9d3359f271622966aca8edfc59648a1d2369e6404123d",{"version":"ea189f99da1173c9a5c4f53bb598257c9cf0bb7c8e51abd0b1fd86d170191527","signature":"9dc518192b9e952cb2e21631e089eb2d0ff8fdf7101f0a1c0218e6d451e3a2c3"},{"version":"a57320c62fd0f3372f648b6dba66c61cd67c6870aa33efcc79fb0831b19686b7","signature":"4c284b28c519f7647c58d778cef1d2c8fb0a0c8a4bc6c28581096d4af66c2265","affectsGlobalScope":true},{"version":"d311f33b46c26308da967ae247feafe4806b28c497df78ff9c4372680ef99441","signature":"a378394f1ba82996c3837f14e341d1b93feeb2b6ed22d71b9763edd0f800ab14"},{"version":"dbe4b140ae2ef010df85e50995f2536a5f4fda2e48155f64834dcde2243873c9","signature":"d9e8fac6e9abbf7825ff0926e9794c3ce7934c1c30d2182216853774d37409ca"},{"version":"956e56ae640664e6a03d0e1169ae98e720f474575aa92af6b6cd2365ee038d3d","signature":"01b41ff7ac9f160cc2fd00e1cc45568eda4a87060b3dd60d5fe58279565bcf94"},{"version":"03f1d83d61696326ea29c8a1c15cbaccf61e92598d53f2ccae06078531f42448","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"3a9313fe5ace558b8b18e85f931da10b259e738775f411c061e5f15787b138eb","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a76037255d4e7af8b20d191a4d3ad13236fba352239d3d9d54868a98dbb222f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"e9ad08a376ac84948fcca0013d6f1d4ae4f9522e26b91f87945b97c99d7cc30b","impliedFormat":1},{"version":"f65eecc63138013d13fefea9092e83c3043cb52a5e351d22ea194e81021c1cd5","impliedFormat":1},{"version":"4617299caf33afef24b5e074e6d20ce8f510dd212cebd75884ef27c64457a77b","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"04296378d9636f6f9450a6e2b9889ea1d3b72a05b9270cb529ace09f04cda1f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"918d3b03a75858dcd5dbb275f19448b6b9a222aa8fc8471aca38c28a32ecb40f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bd91a2a356600dee28eb0438082d0799a18a974a6537c4410a796bab749813c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"89332fc3cc945c8df2bc0aead55230430a0dabd3277c39a43315e00330de97a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"ed6b820c54de95b2510bb673490d61c7f2187f532a339d8d04981645a918961f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"aa17748c522bd586f8712b1a308ea23af59c309b2fd278f6d4f406647c72e659","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1}],"root":[81,[223,227]],"options":{"declaration":true,"esModuleInterop":true,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":5},"referencedMap":[[230,1],[228,2],[151,3],[147,4],[148,5],[145,2],[150,6],[146,2],[149,5],[158,2],[164,2],[165,2],[166,2],[167,2],[168,2],[169,2],[170,2],[171,2],[172,2],[173,2],[233,7],[229,1],[231,8],[232,1],[332,9],[333,2],[334,10],[335,11],[336,12],[278,13],[279,13],[280,14],[239,15],[281,16],[282,17],[283,18],[234,2],[237,19],[235,2],[236,2],[284,20],[285,21],[286,22],[287,23],[288,24],[289,25],[290,25],[292,26],[291,27],[293,28],[294,29],[295,30],[277,31],[238,2],[296,32],[297,33],[298,34],[331,35],[299,36],[300,37],[301,38],[302,39],[303,40],[304,41],[305,42],[306,43],[307,44],[308,45],[309,45],[310,46],[311,2],[312,2],[313,47],[315,48],[314,49],[316,50],[317,51],[318,52],[319,53],[320,54],[321,55],[322,56],[323,57],[324,58],[325,59],[326,60],[327,61],[328,62],[329,63],[330,64],[337,2],[338,2],[340,65],[341,2],[342,2],[343,66],[84,67],[85,68],[104,69],[99,70],[100,71],[101,72],[102,70],[103,70],[92,73],[91,74],[89,75],[90,76],[95,77],[96,78],[97,78],[98,78],[88,79],[94,80],[93,81],[86,2],[82,2],[83,2],[87,82],[80,83],[79,2],[339,2],[177,2],[119,84],[121,85],[123,86],[133,87],[135,88],[112,89],[117,90],[124,91],[136,92],[114,93],[137,94],[127,95],[139,96],[140,94],[142,97],[130,98],[143,99],[152,100],[144,101],[109,102],[154,103],[155,104],[157,105],[105,2],[161,106],[131,107],[110,94],[160,108],[108,109],[120,110],[122,110],[132,111],[134,110],[118,112],[116,113],[138,94],[106,114],[115,114],[156,115],[159,116],[107,117],[153,2],[174,118],[188,119],[178,120],[184,121],[181,122],[182,123],[189,124],[111,2],[204,125],[162,119],[141,114],[163,91],[175,126],[192,127],[176,99],[185,128],[113,101],[125,129],[186,130],[187,131],[183,132],[190,133],[191,134],[126,101],[193,135],[194,2],[128,136],[195,91],[197,137],[198,137],[199,138],[200,139],[196,140],[179,141],[180,142],[201,143],[202,144],[203,119],[205,145],[206,146],[129,117],[207,147],[77,2],[78,2],[13,2],[14,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[25,2],[26,2],[4,2],[27,2],[31,2],[28,2],[29,2],[30,2],[32,2],[33,2],[34,2],[5,2],[35,2],[36,2],[37,2],[38,2],[6,2],[42,2],[39,2],[40,2],[41,2],[43,2],[7,2],[44,2],[49,2],[50,2],[45,2],[46,2],[47,2],[48,2],[8,2],[54,2],[51,2],[52,2],[53,2],[55,2],[9,2],[56,2],[57,2],[58,2],[60,2],[59,2],[61,2],[62,2],[10,2],[63,2],[64,2],[65,2],[11,2],[66,2],[67,2],[68,2],[69,2],[70,2],[1,2],[71,2],[72,2],[12,2],[75,2],[74,2],[73,2],[76,2],[255,148],[265,149],[254,148],[275,150],[246,151],[245,152],[274,12],[268,153],[273,154],[248,155],[262,156],[247,157],[271,158],[243,159],[242,12],[272,160],[244,161],[249,162],[250,2],[253,162],[240,2],[276,163],[266,164],[257,165],[258,166],[260,167],[256,168],[259,169],[269,12],[251,170],[252,171],[261,172],[241,173],[264,164],[263,162],[267,2],[270,174],[220,175],[212,176],[218,177],[214,2],[215,2],[213,178],[216,175],[208,2],[209,2],[219,179],[211,180],[217,181],[210,182],[222,183],[221,184],[81,185],[223,186],[227,187],[225,188],[226,189],[224,190]],"version":"5.7.2"}
node_modules/@farcaster/frame-sdk/dist/types.d.ts
Changed around line 1
+ import type { EventEmitter } from "eventemitter3";
+ import type { Provider } from "ox";
+ import type { FrameContext, AddFrame } from "@farcaster/frame-core";
+ declare global {
+ interface Window {
+ ReactNativeWebView: {
+ postMessage: (message: string) => void;
+ };
+ }
+ }
+ /** Combines members of an intersection into a readable type. */
+ export type Compute = {
+ [key in keyof type]: type[key];
+ } & unknown;
+ export type EventMap = {
+ primaryButtonClicked: () => void;
+ };
+ export type Emitter = Compute>;
+ export type SetPrimaryButton = (options: {
+ text: string;
+ loading?: boolean;
+ disabled?: boolean;
+ hidden?: boolean;
+ }) => Promise;
+ export type FrameSDK = {
+ context: Promise;
+ actions: {
+ ready: () => Promise;
+ openUrl: (url: string) => Promise;
+ close: () => Promise;
+ setPrimaryButton: SetPrimaryButton;
+ addFrame: AddFrame;
+ };
+ wallet: {
+ ethProvider: Provider.Provider;
+ };
+ } & Emitter;
node_modules/@farcaster/frame-sdk/dist/types.js
Changed around line 1
+ export {};
node_modules/@farcaster/frame-sdk/package.json
Changed around line 1
+ {
+ "name": "@farcaster/frame-sdk",
+ "version": "0.0.8",
+ "main": "dist/index.js",
+ "scripts": {
+ "clean": "rm -rf dist",
+ "prebuild": "npm run clean",
+ "build": "yarn build:cjs && yarn build:umd",
+ "build:cjs": "tsc",
+ "build:umd": "node scripts/build.js",
+ "typecheck": "tsc --noEmit"
+ },
+ "files": [
+ "dist",
+ "src"
+ ],
+ "devDependencies": {
+ "@farcaster/tsconfig": "*",
+ "esbuild": "^0.24.0",
+ "typescript": "^5.6.3"
+ },
+ "dependencies": {
+ "@farcaster/frame-core": "^0.0.7",
+ "comlink": "^4.4.2",
+ "eventemitter3": "^5.0.1",
+ "ox": "^0.4.0"
+ }
+ }
node_modules/@farcaster/frame-sdk/src/endpoint.ts
Changed around line 1
+ import { type Endpoint, windowEndpoint } from "comlink";
+
+ const mockEndpoint: Endpoint = {
+ postMessage() {
+ // noop
+ },
+ addEventListener: () => {
+ // noop
+ },
+ removeEventListener: () => {
+ // noop
+ },
+ }
+
+ const webViewEndpoint: Endpoint = {
+ postMessage: (data: unknown) => {
+ console.debug("[webview:req]", data);
+ window.ReactNativeWebView.postMessage(JSON.stringify(data));
+ },
+ addEventListener: (_, listener, ...args) => {
+ document.addEventListener("FarcasterFrameCallback", listener, ...args);
+ },
+ removeEventListener: (_, listener) => {
+ document.removeEventListener("FarcasterFrameCallback", listener);
+ },
+ };
+
+ export const endpoint = (() => {
+ // No actions are actually gonna take place during SSR, thus it's safe to return mocked endpoint
+ if (typeof window === 'undefined') return mockEndpoint
+ return window?.ReactNativeWebView
+ ? webViewEndpoint
+ : windowEndpoint(window?.parent ?? window);
+ })()
node_modules/@farcaster/frame-sdk/src/frameHost.ts
Changed around line 1
+ import { wrap } from "comlink";
+ import { endpoint } from "./endpoint";
+ import { FrameHost } from "@farcaster/frame-core";
+
+ export const frameHost = wrap(endpoint);
node_modules/@farcaster/frame-sdk/src/index.ts
Changed around line 1
+ import { sdk } from "./sdk";
+
+ export * from "./sdk";
+ export * from "@farcaster/frame-core";
+
+ export default sdk;
node_modules/@farcaster/frame-sdk/src/provider.ts
Changed around line 1
+ import { Provider, RpcRequest, RpcResponse } from "ox";
+ import { frameHost } from "./frameHost";
+ import { EthProviderWireEvent } from "@farcaster/frame-core";
+
+ const emitter = Provider.createEmitter();
+ const store = RpcRequest.createStore();
+
+ type GenericProviderRpcError = {
+ code: number;
+ details?: string;
+ }
+
+ export function toProviderRpcError({ code, details }: GenericProviderRpcError): Provider.ProviderRpcError {
+ switch (code) {
+ case 4001:
+ return new Provider.UserRejectedRequestError();
+ case 4100:
+ return new Provider.UnauthorizedError();
+ case 4200:
+ return new Provider.UnsupportedMethodError();
+ case 4900:
+ return new Provider.DisconnectedError();
+ case 4901:
+ return new Provider.ChainDisconnectedError();
+ default:
+ return new Provider.ProviderRpcError(code, details ?? 'Unknown provider RPC error');
+ }
+ }
+
+ export const provider: Provider.Provider = Provider.from({
+ ...emitter,
+ async request(args) {
+ // @ts-expect-error
+ const request = store.prepare(args);
+
+ try {
+ const response = await frameHost.ethProviderRequestV2(
+ request
+ ).then((res) => RpcResponse.parse(res, { request, raw: true }));
+
+
+ if (response.error) {
+ throw toProviderRpcError(response.error)
+ }
+
+ return response.result;
+ } catch (e) {
+ // ethProviderRequestV2 not supported, fall back to v1
+ if (e instanceof Error && e.message.match(/cannot read property 'apply'/i)) {
+ return await frameHost.ethProviderRequest(request);
+ }
+
+ if (
+ e instanceof Provider.ProviderRpcError ||
+ e instanceof RpcResponse.BaseError
+ ) {
+ throw e;
+ }
+
+
+ throw new RpcResponse.InternalError({ message: e instanceof Error ? e.message : undefined })
+ }
+ }
+ });
+
+ // Required to pass SSR
+ if (typeof document !== 'undefined') {
+ document.addEventListener("FarcasterFrameEthProviderEvent", (event) => {
+ if (event instanceof MessageEvent) {
+ const ethProviderEvent = event.data as EthProviderWireEvent;
+ // @ts-expect-error
+ emitter.emit(ethProviderEvent.event, ...ethProviderEvent.params);
+ }
+ });
+ }
node_modules/@farcaster/frame-sdk/src/sdk.ts
Changed around line 1
+ import { EventEmitter } from "eventemitter3";
+ import { FrameSDK, Emitter, EventMap } from "./types";
+ import { frameHost } from "./frameHost";
+ import { provider } from "./provider";
+
+ export function createEmitter(): Emitter {
+ const emitter = new EventEmitter();
+
+ return {
+ get eventNames() {
+ return emitter.eventNames.bind(emitter);
+ },
+ get listenerCount() {
+ return emitter.listenerCount.bind(emitter);
+ },
+ get listeners() {
+ return emitter.listeners.bind(emitter);
+ },
+ addListener: emitter.addListener.bind(emitter),
+ emit: emitter.emit.bind(emitter),
+ off: emitter.off.bind(emitter),
+ on: emitter.on.bind(emitter),
+ once: emitter.once.bind(emitter),
+ removeAllListeners: emitter.removeAllListeners.bind(emitter),
+ removeListener: emitter.removeListener.bind(emitter),
+ };
+ }
+
+ const emitter = createEmitter();
+
+ export const sdk: FrameSDK = {
+ ...emitter,
+ context: frameHost.context,
+ actions: {
+ setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),
+ ready: frameHost.ready.bind(frameHost),
+ close: frameHost.close.bind(frameHost),
+ openUrl: frameHost.openUrl.bind(frameHost),
+ addFrame: frameHost.addFrame.bind(frameHost),
+ },
+ wallet: {
+ ethProvider: provider,
+ }
+ };
+
+ // Required to pass SSR
+ if (typeof document !== 'undefined')
+ document.addEventListener("FarcasterFrameEvent", (event) => {
+ if (event instanceof MessageEvent) {
+ if (event.data.type === "primaryButtonClicked") {
+ emitter.emit("primaryButtonClicked");
+ }
+ }
+ });
node_modules/@farcaster/frame-sdk/src/types.ts
Changed around line 1
+ import type { EventEmitter } from "eventemitter3";
+ import type { Provider } from "ox";
+ import type { FrameContext, AddFrame } from "@farcaster/frame-core";
+
+ declare global {
+ interface Window {
+ // Exposed by react-native-webview
+ ReactNativeWebView: {
+ postMessage: (message: string) => void;
+ };
+ }
+ }
+
+ /** Combines members of an intersection into a readable type. */
+ // https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=v01xkqU3KO0Mg
+ export type Compute = { [key in keyof type]: type[key] } & unknown;
+
+ export type EventMap = {
+ primaryButtonClicked: () => void;
+ };
+
+ export type Emitter = Compute>;
+
+ export type SetPrimaryButton = (options: {
+ text: string;
+ loading?: boolean;
+ disabled?: boolean;
+ hidden?: boolean;
+ }) => Promise;
+
+ export type FrameSDK = {
+ context: Promise;
+ actions: {
+ ready: () => Promise;
+ openUrl: (url: string) => Promise;
+ close: () => Promise;
+ setPrimaryButton: SetPrimaryButton;
+ addFrame: AddFrame
+ };
+ wallet: {
+ ethProvider: Provider.Provider
+ };
+ } & Emitter;
package.json
Changed around line 8
+ "@farcaster/frame-sdk": "^0.0.8",
Breck Yunits
Breck Yunits
1 month ago
frame-claude.html
Changed around line 1
+
+
+
+
+
+ GIF Generator Frame
+
+
+
+
+
+

Generate Your Custom GIF

+

Send $1 USDC to create a unique gif

+
+
+
+
+
+
+
frame.html
Changed around line 1
-
+
-
-
-
- GIF Generator Frame
-
+
+
+
+ Simple Farcaster Frames v2 Demo
- body {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
- sans-serif;
- margin: 0;
- padding: 16px;
- max-width: 300px;
- margin: 0 auto;
- }
-
- .container {
- text-align: center;
- }
-
- h1 {
- font-size: 1.5rem;
- margin-bottom: 8px;
- }
-
- .description {
- color: #666;
- font-size: 0.875rem;
- margin-bottom: 20px;
- }
-
- button {
- background: #0066ff;
- color: white;
- border: none;
- padding: 12px 24px;
- border-radius: 8px;
- font-weight: 600;
- cursor: pointer;
- width: 100%;
- transition: background 0.2s;
- }
-
- button:hover {
- background: #0052cc;
- }
-
- button:disabled {
- background: #999;
- cursor: not-allowed;
- }
-
- .status {
- margin-top: 16px;
- font-size: 0.875rem;
- }
-
- .error {
- color: #dc2626;
- }
-
- .success {
- color: #059669;
- }
-
- .loading {
- color: #666;
- }
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ max-width: 600px;
+ margin: 0 auto;
+ padding: 20px;
+ background: #f5f5f5;
+ }
+ .container {
+ background: white;
+ padding: 20px;
+ border-radius: 12px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ }
+ button {
+ background: #0070f3;
+ color: white;
+ border: none;
+ padding: 10px 20px;
+ border-radius: 6px;
+ cursor: pointer;
+ margin: 5px;
+ }
+ button:hover {
+ background: #0051b3;
+ }
+ .status {
+ margin: 20px 0;
+ padding: 10px;
+ border-radius: 6px;
+ background: #e2e8f0;
+ }
+ pre {
+ background: #f8f9fa;
+ padding: 10px;
+ border-radius: 6px;
+ overflow-x: auto;
+ }
-
-
+
+
-

Generate Your Custom GIF

-

Send $1 USDC to create a unique gif

-
-
+

Farcaster Frames v2 Demo

+
+
+ Waiting for frame to load...
+
+
+
+
+
+
+
+
+
+
- // Constants
- const USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; // USDC on Base
- const RECEIVER_ADDRESS = "YOUR_RECEIVING_ADDRESS"; // Replace with your address
- const API_ENDPOINT = "https://your-api.com/generate-gif"; // Replace with your API endpoint
-
- // ABI for USDC transfer
- const USDC_ABI = [
- {
- inputs: [
- { name: "to", type: "address" },
- { name: "amount", type: "uint256" },
- ],
- name: "transfer",
- outputs: [{ name: "", type: "bool" }],
- stateMutability: "nonpayable",
- type: "function",
- },
- ];
-
- // Elements
- const payButton = document.getElementById("payButton");
- const statusDiv = document.getElementById("status");
-
- // Initialize Frame SDK
- let sdk;
- async function initializeSDK() {
- try {
- sdk = await import("@farcaster/frame-sdk");
- await sdk.actions.ready();
- } catch (error) {
- setStatus("Failed to initialize frame", "error");
+ // Initialize status tracking
+ const statusDiv = document.getElementById('status');
+ const contextDiv = document.getElementById('contextData');
+ let isSDKLoaded = false;
+
+ // Wait for SDK to load and call ready()
+ async function init() {
+ try {
+ await sdk.actions.ready();
+ isSDKLoaded = true;
+ statusDiv.innerText = 'Frame is ready!';
+ } catch (error) {
+ statusDiv.innerText = 'Error initializing frame: ' + error.message;
+ }
- }
-
- // Helper to update status
- function setStatus(message, type = "") {
- statusDiv.textContent = message;
- statusDiv.className = "status " + type;
- }
-
- // Initialize Viem client
- const client = viem.createClient({
- chain: viem.base,
- transport: viem.http(),
- });
-
- // Handle payment
- async function handlePayment() {
- try {
- payButton.disabled = true;
- setStatus("Requesting wallet access...", "loading");
-
- // Request wallet connection
- if (!window.ethereum) {
- throw new Error("No wallet found");
- }
-
- // Request account access
- const accounts = await window.ethereum.request({
- method: "eth_requestAccounts",
- });
- const account = accounts[0];
-
- // Create contract instance
- const contract = {
- address: USDC_ADDRESS,
- abi: USDC_ABI,
- };
-
- // Prepare transaction
- setStatus("Preparing transaction...", "loading");
- const amount = viem.parseUnits("1", 6); // USDC has 6 decimals
-
- // Send transaction
- const hash = await window.ethereum.request({
- method: "eth_sendTransaction",
- params: [
- {
- from: account,
- to: USDC_ADDRESS,
- data: viem.encodeFunctionData({
- abi: USDC_ABI,
- functionName: "transfer",
- args: [RECEIVER_ADDRESS, amount],
- }),
- },
- ],
- });
- setStatus("Transaction sent, waiting for confirmation...", "loading");
-
- // Wait for transaction
- const receipt = await client.waitForTransactionReceipt({ hash });
+ // Get and display frame context
+ async function getContext() {
+ if (!isSDKLoaded) {
+ statusDiv.innerText = 'SDK not loaded yet';
+ return;
+ }
- if (receipt.status === "success") {
- setStatus("Payment confirmed! Generating GIF...", "success");
+ try {
+ const context = await sdk.context;
+ contextDiv.innerHTML = `
+

Frame Context:

+
${JSON.stringify(context, null, 2)}
+ `;
+ } catch (error) {
+ statusDiv.innerText = 'Error getting context: ' + error.message;
+ }
+ }
- // Call your API
- const response = await fetch(API_ENDPOINT, {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- txHash: hash,
- userAddress: account,
- }),
- });
+ // Open external URL
+ function openUrl() {
+ if (!isSDKLoaded) {
+ statusDiv.innerText = 'SDK not loaded yet';
+ return;
+ }
- if (!response.ok) {
- throw new Error("Failed to generate GIF");
+ try {
+ sdk.actions.openUrl('https://www.farcaster.xyz');
+ statusDiv.innerText = 'Opening URL...';
+ } catch (error) {
+ statusDiv.innerText = 'Error opening URL: ' + error.message;
+ }
- setStatus("Success! GIF generated and posted!", "success");
+ // Close the frame
+ function closeFrame() {
+ if (!isSDKLoaded) {
+ statusDiv.innerText = 'SDK not loaded yet';
+ return;
+ }
- // Close frame after success
- setTimeout(() => {
- sdk.actions.close();
- }, 2000);
- }
- } catch (error) {
- setStatus(error.message, "error");
- payButton.disabled = false;
+ try {
+ sdk.actions.close();
+ statusDiv.innerText = 'Closing frame...';
+ } catch (error) {
+ statusDiv.innerText = 'Error closing frame: ' + error.message;
+ }
- }
-
- // Event Listeners
- payButton.addEventListener("click", handlePayment);
- // Initialize
- initializeSDK();
+ // Initialize on load
+ init();
-
+
frame.scroll
Changed around line 1
+ buildTxt
+ Below is the source code for WarpCast frames v2.
+
+ toStamp ../frames-v2-demo
+
+ I want a demo that is MUCH simpler.
+
+ No react or next.js.
+
+ Plain HTML, css, and Javascript.
+
+ Please make that.
+
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated frame.html
frame.html
Changed around line 1
+
+
+
+
+
+ GIF Generator Frame
+
+
+
+
+
+

Generate Your Custom GIF

+

Send $1 USDC to create a unique gif

+
+
+
+
+
+
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created frame.html
frame.html
Breck Yunits
Breck Yunits
1 month ago
azure.gif
gifMaker.js
Changed around line 0
- const ffmpeg = require("fluent-ffmpeg")
- const ytdl = require("ytdl-core")
- const fs = require("fs")
- const path = require("path")
-
- // Configuration options
- const config = {
- duration: 5, // Duration of the snippet in seconds
- fps: 10, // Frames per second for the output GIF
- width: 480, // Output width (height will scale proportionally)
- }
-
- async function createGifFromYouTube(youtubeUrl, outputPath) {
- const tempVideoPath = path.join(__dirname, "temp_video.mp4")
- try {
- // Validate YouTube URL
- if (!ytdl.validateURL(youtubeUrl)) {
- throw new Error("Invalid YouTube URL")
- }
-
- console.log("Downloading stream snippet...")
-
- // Download stream segment
- const videoStream = ytdl(youtubeUrl, {
- quality: "lowest", // Lower quality for faster processing
- filter: "videoonly",
- })
-
- // Save stream segment to temporary file
- const writeStream = fs.createWriteStream(tempVideoPath)
- videoStream.pipe(writeStream)
-
- await new Promise((resolve, reject) => {
- writeStream.on("finish", resolve)
- writeStream.on("error", reject)
-
- // Stop downloading after configured duration
- setTimeout(() => {
- videoStream.destroy()
- writeStream.end()
- }, config.duration * 1000)
- })
-
- console.log("Converting to GIF...")
-
- // Convert video to GIF using ffmpeg
- await new Promise((resolve, reject) => {
- ffmpeg(tempVideoPath)
- .fps(config.fps)
- .size(`${config.width}x?`)
- .noAudio()
- .format("gif")
- .output(outputPath)
- .on("end", () => {
- console.log("GIF created successfully!")
- resolve()
- })
- .on("error", (err) => {
- console.error("Error creating GIF:", err)
- reject(err)
- })
- .run()
- })
-
- // Clean up temporary file
- // fs.unlinkSync(tempVideoPath)
- } catch (error) {
- console.error("Error:", error.message)
- // Clean up temporary file if it exists
- // if (fs.existsSync(tempVideoPath)) {
- // fs.unlinkSync(tempVideoPath)
- //}
- throw error
- }
- }
-
- // Example usage
- const youtubeUrl = "https://www.youtube.com/watch?v=u4UZ4UvZXrg"
- const outputPath = path.join(__dirname, "output.gif")
-
- createGifFromYouTube(youtubeUrl, outputPath).catch(console.error)
gifMaker.mjs
Changed around line 1
+ import ffmpeg from "fluent-ffmpeg"
+ import path from "path"
+
+ export async function createGifFromVideo(
+ inputPath,
+ outputPath = null,
+ {
+ fps = 10,
+ width = 480,
+ startTime = 0, // Start time in seconds
+ duration = null, // Duration in seconds (null means entire video)
+ } = {},
+ ) {
+ // If no output path provided, create one based on input filename
+ if (!outputPath) {
+ const inputPathObj = path.parse(inputPath)
+ outputPath = path.join(inputPathObj.dir, `${inputPathObj.name}.gif`)
+ }
+
+ console.log("Converting to GIF...")
+ return new Promise((resolve, reject) => {
+ let command = ffmpeg(inputPath)
+ .fps(fps)
+ .size(`${width}x?`)
+ .noAudio()
+ .format("gif")
+
+ // Add start time if specified
+ if (startTime > 0) {
+ command = command.seek(startTime)
+ }
+
+ // Add duration if specified
+ if (duration !== null) {
+ command = command.duration(duration)
+ }
+
+ command
+ .output(outputPath)
+ .on("end", () => {
+ console.log("GIF created successfully!")
+ resolve(outputPath) // Return the output path
+ })
+ .on("error", (err) => {
+ console.error("Error creating GIF:", err)
+ reject(err)
+ })
+ .run()
+ })
+ }
+
+ // With all options
+ createGifFromVideo("azure.mp4", null, {
+ fps: 10,
+ width: 320,
+ startTime: 30, // Start 10 seconds into the video
+ duration: 10, // Create a 5-second GIF
+ })
1
1
1 month ago
updated index.scroll
index.scroll
Changed around line 1
- Hello World my name is
+ azure.gif
Breck Yunits
Breck Yunits
1 month ago
gifMaker.js
Changed around line 1
+ const ffmpeg = require("fluent-ffmpeg")
+ const ytdl = require("ytdl-core")
+ const fs = require("fs")
+ const path = require("path")
+
+ // Configuration options
+ const config = {
+ duration: 5, // Duration of the snippet in seconds
+ fps: 10, // Frames per second for the output GIF
+ width: 480, // Output width (height will scale proportionally)
+ }
+
+ async function createGifFromYouTube(youtubeUrl, outputPath) {
+ const tempVideoPath = path.join(__dirname, "temp_video.mp4")
+ try {
+ // Validate YouTube URL
+ if (!ytdl.validateURL(youtubeUrl)) {
+ throw new Error("Invalid YouTube URL")
+ }
+
+ console.log("Downloading stream snippet...")
+
+ // Download stream segment
+ const videoStream = ytdl(youtubeUrl, {
+ quality: "lowest", // Lower quality for faster processing
+ filter: "videoonly",
+ })
+
+ // Save stream segment to temporary file
+ const writeStream = fs.createWriteStream(tempVideoPath)
+ videoStream.pipe(writeStream)
+
+ await new Promise((resolve, reject) => {
+ writeStream.on("finish", resolve)
+ writeStream.on("error", reject)
+
+ // Stop downloading after configured duration
+ setTimeout(() => {
+ videoStream.destroy()
+ writeStream.end()
+ }, config.duration * 1000)
+ })
+
+ console.log("Converting to GIF...")
+
+ // Convert video to GIF using ffmpeg
+ await new Promise((resolve, reject) => {
+ ffmpeg(tempVideoPath)
+ .fps(config.fps)
+ .size(`${config.width}x?`)
+ .noAudio()
+ .format("gif")
+ .output(outputPath)
+ .on("end", () => {
+ console.log("GIF created successfully!")
+ resolve()
+ })
+ .on("error", (err) => {
+ console.error("Error creating GIF:", err)
+ reject(err)
+ })
+ .run()
+ })
+
+ // Clean up temporary file
+ // fs.unlinkSync(tempVideoPath)
+ } catch (error) {
+ console.error("Error:", error.message)
+ // Clean up temporary file if it exists
+ // if (fs.existsSync(tempVideoPath)) {
+ // fs.unlinkSync(tempVideoPath)
+ //}
+ throw error
+ }
+ }
+
+ // Example usage
+ const youtubeUrl = "https://www.youtube.com/watch?v=u4UZ4UvZXrg"
+ const outputPath = path.join(__dirname, "output.gif")
+
+ createGifFromYouTube(youtubeUrl, outputPath).catch(console.error)
Breck Yunits
Breck Yunits
1 month ago
.gitignore
Changed around line 5
- requests.scroll
+ requests.scroll
+ node_modules
+ package-lock.json
+ *.mp4
package.json
Changed around line 1
+ {
+ "name": "nofomo.togger.com",
+ "version": "1.0.0",
+ "main": "gifMaker.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Breck and Christin",
+ "description": "",
+ "dependencies": {
+ "fluent-ffmpeg": "^2.1.3",
+ "scrollsdk": "^99.2.0",
+ "ytdl-core": "^4.11.5"
+ }
+ }
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
Renamed claude.html to okbanger.html
okbanger.html
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 183
- setInterval(updateStatus, 20000);
+ setInterval(updateStatus, 10000);
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 81
+ .loading {
+ background: rgba(59, 130, 246, 0.2);
+ color: rgb(59, 130, 246);
+ }
+
+ .loading::before {
+ background: rgb(59, 130, 246);
+ animation: pulse 1s infinite;
+ }
+
+ min-height: 1.2em;
Changed around line 110
+
+ .fade-transition {
+ transition: opacity 0.3s ease;
+ }
+
+ .fade-out {
+ opacity: 0;
+ }
+
+ .fade-in {
+ opacity: 1;
+ }
-
OFF AIR
-
+
+ OFF AIR
+
+
+ let isUpdating = false;
+ if (isUpdating) return;
+ isUpdating = true;
+
+ const indicator = document.getElementById("statusIndicator");
+ const titleElement = document.getElementById("streamTitle");
+
+ // Start loading state with fade transition
+ indicator.className = "status loading fade-transition";
+ indicator.textContent = "UPDATING";
+ titleElement.className = "stream-title fade-transition fade-out";
+
- const response = await fetch(`live-status-${CHANNEL_ID}.json`);
- const { data } = await response.json();
+ // Fetch the data and ensure minimum 1 second loading state
+ const [response] = await Promise.all([
+ fetch(`live-status-${CHANNEL_ID}.json`),
+ new Promise((resolve) => setTimeout(resolve, 1000)),
+ ]);
- const indicator = document.getElementById("statusIndicator");
- const titleElement = document.getElementById("streamTitle");
+ const { data } = await response.json();
- indicator.className = "status live";
+ indicator.className = "status live fade-transition";
+ titleElement.className = "stream-title fade-transition fade-in";
- indicator.className = "status offline";
+ indicator.className = "status offline fade-transition";
+ indicator.className = "status offline fade-transition";
+ indicator.textContent = "ERROR";
+ titleElement.textContent = "";
+ } finally {
+ isUpdating = false;
- // Update every 10 seconds
- setInterval(updateStatus, 10000);
+ // Update every 20 seconds
+ setInterval(updateStatus, 20000);
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 137
- // Update every minute
+ // Update every 10 seconds
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 138
- setInterval(updateStatus, 60000);
+ setInterval(updateStatus, 10000);
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 62
- /* Live state */
Changed around line 72
- /* Offline state */
Changed around line 81
+ .stream-title {
+ color: white;
+ margin-top: 1rem;
+ font-size: 0.9rem;
+ opacity: 0.8;
+ }
+
Changed around line 106
+
- // Function to update the status
- function updateStatus(isLive) {
- const indicator = document.getElementById("statusIndicator");
-
- if (isLive) {
- indicator.className = "status live";
- indicator.textContent = "LIVE";
- } else {
- indicator.className = "status offline";
- indicator.textContent = "OFF AIR";
+ const CHANNEL_ID = "UCgiZJmuxlXqhvBl415tOaCA";
+
+ async function updateStatus() {
+ try {
+ const response = await fetch(`live-status-${CHANNEL_ID}.json`);
+ const { data } = await response.json();
+
+ const indicator = document.getElementById("statusIndicator");
+ const titleElement = document.getElementById("streamTitle");
+
+ if (data.isLive) {
+ indicator.className = "status live";
+ indicator.textContent = "LIVE";
+ titleElement.textContent = data.title;
+ } else {
+ indicator.className = "status offline";
+ indicator.textContent = "OFF AIR";
+ titleElement.textContent = "";
+ }
+ } catch (error) {
+ console.error("Failed to update status:", error);
- // Example usage:
- //updateStatus(true); // For live
- updateStatus(false); // For offline
+ // Update initially
+ updateStatus();
+
+ // Update every minute
+ setInterval(updateStatus, 60000);
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 6: import { createRequire } from "module"
-
+ const cacheFile = path.join(__dirname, `live-status-${channelId}.json`)
+
+ // Try to read from cache first
+ try {
+ const cachedData = await fs.readFile(cacheFile, 'utf-8')
+ const { data, timestamp } = JSON.parse(cachedData)
+
+ // Cache is valid for 1 minute
+ if (Date.now() - timestamp < 60000) {
+ return data
+ }
+ } catch (err) {
+ // Cache miss or invalid cache, continue to fetch
+ }
+
+ // Fetch new data
Changed around line 33: async function isLive(channelId, API_KEY) {
-
+
-
+
+ let result
- return {
+ result = {
Changed around line 52: async function isLive(channelId, API_KEY) {
+ } else {
+ result = {
+ isLive: false
+ }
- return {
- isLive: false
- }
+ // Save to cache
+ await fs.writeFile(cacheFile, JSON.stringify({
+ timestamp: Date.now(),
+ data: result
+ }))
+
+ return result
- const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
- const API_KEY = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA"
- await isLive(CHANNEL_ID, API_KEY)
+ const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
+ const API_KEY = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA"
+ const status = await isLive(CHANNEL_ID, API_KEY)
+ console.log(status)
- // main()
- console.log("not live")
+
+ main()
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 48: async function isLive(channelId, API_KEY) {
- const API_KEY = ""
+ const API_KEY = "AIzaSyCGXWOfyGKo9xkaDZt8DmHYC2j2V1lfvJA"
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 118
- updateStatus(true); // For live
- // updateStatus(false); // For offline
+ //updateStatus(true); // For live
+ updateStatus(false); // For offline
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 118
- // updateStatus(true); // For live
+ updateStatus(true); // For live
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated claude.html
claude.html
Changed around line 1
+
+
+
+
+
+
+
+ OK Banger Show
+
OK BANGER
+
OFF AIR
+
+
+
+
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created claude.html
claude.html
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created isLive.scroll
isLive.scroll
root
root
1 month ago
Added okbanger.jpg
okbanger.jpg
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 52: const main = async () => {
- console.log("hello world")
+ console.log("not live")
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 4: import { fileURLToPath } from "url"
- const { Particle } = require("scrollsdk/products/Particle.js")
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 53: const main = async () => {
-
+ console.log("hello world")
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 47: async function isLive(channelId, API_KEY) {
- export default isLive
+ const main = async () => {
+ const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
+ const API_KEY = ""
+ await isLive(CHANNEL_ID, API_KEY)
+ }
+ // main()
+
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 8: const { Particle } = require("scrollsdk/products/Particle.js")
- const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
+ const endpoint = "https://www.googleapis.com/youtube/v3/search"
- async function checkYouTubeLive() {
+ async function isLive(channelId, API_KEY) {
- const response = await fetch(`https://www.youtube.com/channel/${CHANNEL_ID}/live`)
- const text = await response.text()
-
- const isLive = text.includes('"isLive":true') || text.includes('"status":"LIVE"')
-
- if (isLive) {
- console.log('Stream is LIVE!')
- const streamUrl = `https://www.youtube.com/channel/${CHANNEL_ID}/live`
- console.log(`Stream URL: ${streamUrl}`)
-
- const timestamp = new Date().toISOString()
- await fs.appendFile(
- path.join(__dirname, 'stream-log.txt'),
- `${timestamp}: Stream is live\n`
- )
- } else {
- console.log('Channel is not live right now')
+ const params = new URLSearchParams({
+ part: 'snippet',
+ channelId,
+ type: 'video',
+ eventType: 'live',
+ key: API_KEY
+ })
+
+ const response = await fetch(`${endpoint}?${params}`)
+ const data = await response.json()
+
+ if (!response.ok) {
+ throw new Error(`API error: ${data.error?.message || 'Unknown error'}`)
+ }
+
+ if (data.items && data.items.length > 0) {
+ const stream = data.items[0]
+ return {
+ isLive: true,
+ videoId: stream.id.videoId,
+ title: stream.snippet.title,
+ thumbnailUrl: stream.snippet.thumbnails.default.url,
+ channelTitle: stream.snippet.channelTitle,
+ startTime: stream.snippet.publishedAt
+ }
+ }
+
+ return {
+ isLive: false
- console.error('Error checking livestream:', error)
- const timestamp = new Date().toISOString()
- await fs.appendFile(
- path.join(__dirname, 'error-log.txt'),
- `${timestamp}: Error - ${error.message}\n`
- )
+ throw new Error(`Failed to check live status: ${error.message}`)
- // Run once
- checkYouTubeLive()
+ export default isLive
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
updated isLive.mjs
isLive.mjs
Changed around line 1
+ import fs from "fs/promises"
+ import path from "path"
+ import { fileURLToPath } from "url"
+ import { dirname } from "path"
+ import { createRequire } from "module"
+ const require = createRequire(import.meta.url)
+ const { Particle } = require("scrollsdk/products/Particle.js")
+ const __filename = fileURLToPath(import.meta.url)
+ const __dirname = dirname(__filename)
+
+ const CHANNEL_ID = 'UCgiZJmuxlXqhvBl415tOaCA'
+
+ async function checkYouTubeLive() {
+ try {
+ const response = await fetch(`https://www.youtube.com/channel/${CHANNEL_ID}/live`)
+ const text = await response.text()
+
+ const isLive = text.includes('"isLive":true') || text.includes('"status":"LIVE"')
+
+ if (isLive) {
+ console.log('Stream is LIVE!')
+ const streamUrl = `https://www.youtube.com/channel/${CHANNEL_ID}/live`
+ console.log(`Stream URL: ${streamUrl}`)
+
+ const timestamp = new Date().toISOString()
+ await fs.appendFile(
+ path.join(__dirname, 'stream-log.txt'),
+ `${timestamp}: Stream is live\n`
+ )
+ } else {
+ console.log('Channel is not live right now')
+ }
+ } catch (error) {
+ console.error('Error checking livestream:', error)
+ const timestamp = new Date().toISOString()
+ await fs.appendFile(
+ path.join(__dirname, 'error-log.txt'),
+ `${timestamp}: Error - ${error.message}\n`
+ )
+ }
+ }
+
+ // Run once
+ checkYouTubeLive()
ffff:173.198.69.239
ffff:173.198.69.239
1 month ago
created isLive.mjs
isLive.mjs