nostr-tools 2.23.7 → 2.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/lib/cjs/abstract-pool.js +128 -4
  2. package/lib/cjs/abstract-pool.js.map +4 -4
  3. package/lib/cjs/abstract-relay.js +29 -4
  4. package/lib/cjs/abstract-relay.js.map +2 -2
  5. package/lib/cjs/filter.js.map +1 -1
  6. package/lib/cjs/index.js +393 -70
  7. package/lib/cjs/index.js.map +4 -4
  8. package/lib/cjs/kinds.js +196 -4
  9. package/lib/cjs/kinds.js.map +2 -2
  10. package/lib/cjs/nip10.js +5 -4
  11. package/lib/cjs/nip10.js.map +2 -2
  12. package/lib/cjs/nip17.js.map +2 -2
  13. package/lib/cjs/nip18.js.map +2 -2
  14. package/lib/cjs/nip22.js +11 -5
  15. package/lib/cjs/nip22.js.map +2 -2
  16. package/lib/cjs/nip25.js.map +1 -1
  17. package/lib/cjs/nip28.js.map +2 -2
  18. package/lib/cjs/nip42.js.map +2 -2
  19. package/lib/cjs/nip45.js +183 -0
  20. package/lib/cjs/nip45.js.map +7 -0
  21. package/lib/cjs/nip46.js +135 -6
  22. package/lib/cjs/nip46.js.map +4 -4
  23. package/lib/cjs/nip47.js.map +2 -2
  24. package/lib/cjs/nip57.js.map +1 -1
  25. package/lib/cjs/nip58.js.map +2 -2
  26. package/lib/cjs/nip59.js.map +2 -2
  27. package/lib/cjs/nip75.js.map +2 -2
  28. package/lib/cjs/nip94.js.map +2 -2
  29. package/lib/cjs/nip98.js.map +2 -2
  30. package/lib/cjs/nip99.js.map +2 -2
  31. package/lib/cjs/nipb0.js +1064 -0
  32. package/lib/cjs/nipb0.js.map +7 -0
  33. package/lib/cjs/pool.js +128 -4
  34. package/lib/cjs/pool.js.map +4 -4
  35. package/lib/cjs/relay.js +29 -4
  36. package/lib/cjs/relay.js.map +2 -2
  37. package/lib/esm/abstract-pool.js +128 -4
  38. package/lib/esm/abstract-pool.js.map +4 -4
  39. package/lib/esm/abstract-relay.js +29 -4
  40. package/lib/esm/abstract-relay.js.map +2 -2
  41. package/lib/esm/filter.js.map +1 -1
  42. package/lib/esm/index.js +369 -46
  43. package/lib/esm/index.js.map +4 -4
  44. package/lib/esm/kinds.js +196 -4
  45. package/lib/esm/kinds.js.map +2 -2
  46. package/lib/esm/nip10.js +5 -4
  47. package/lib/esm/nip10.js.map +2 -2
  48. package/lib/esm/nip17.js.map +2 -2
  49. package/lib/esm/nip18.js.map +2 -2
  50. package/lib/esm/nip22.js +11 -5
  51. package/lib/esm/nip22.js.map +2 -2
  52. package/lib/esm/nip25.js.map +1 -1
  53. package/lib/esm/nip28.js.map +2 -2
  54. package/lib/esm/nip42.js.map +2 -2
  55. package/lib/esm/nip45.js +162 -0
  56. package/lib/esm/nip45.js.map +7 -0
  57. package/lib/esm/nip46.js +135 -6
  58. package/lib/esm/nip46.js.map +4 -4
  59. package/lib/esm/nip47.js.map +2 -2
  60. package/lib/esm/nip57.js.map +1 -1
  61. package/lib/esm/nip58.js.map +2 -2
  62. package/lib/esm/nip59.js.map +2 -2
  63. package/lib/esm/nip75.js.map +2 -2
  64. package/lib/esm/nip94.js.map +2 -2
  65. package/lib/esm/nip98.js.map +2 -2
  66. package/lib/esm/nip99.js.map +2 -2
  67. package/lib/esm/nipb0.js +1049 -0
  68. package/lib/esm/nipb0.js.map +7 -0
  69. package/lib/esm/pool.js +128 -4
  70. package/lib/esm/pool.js.map +4 -4
  71. package/lib/esm/relay.js +29 -4
  72. package/lib/esm/relay.js.map +2 -2
  73. package/lib/nostr.bundle.js +342 -21
  74. package/lib/nostr.bundle.js.map +4 -4
  75. package/lib/types/abstract-pool.d.ts +9 -0
  76. package/lib/types/abstract-relay.d.ts +10 -1
  77. package/lib/types/kinds.d.ts +200 -8
  78. package/lib/types/nip45.d.ts +13 -0
  79. package/lib/types/nip45.test.d.ts +1 -0
  80. package/lib/types/nip46.d.ts +7 -5
  81. package/lib/types/nipb0.d.ts +129 -0
  82. package/package.json +13 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../nip99.ts", "../../kinds.ts"],
4
- "sourcesContent": ["import { Event, EventTemplate } from './core.ts'\nimport { ClassifiedListing, DraftClassifiedListing } from './kinds.ts'\n\n/**\n * Represents the details of a price.\n * @example { amount: '100', currency: 'USD', frequency: 'month' }\n * @example { amount: '100', currency: 'EUR' }\n */\nexport type PriceDetails = {\n /**\n * The amount of the price.\n */\n amount: string\n /**\n * The currency of the price in 3-letter ISO 4217 format.\n * @example 'USD'\n */\n currency: string\n /**\n * The optional frequency of payment.\n * Can be one of: 'hour', 'day', 'week', 'month', 'year', or a custom string.\n */\n frequency?: string\n}\n\n/**\n * Represents a classified listing object.\n */\nexport type ClassifiedListingObject = {\n /**\n * Whether the listing is a draft or not.\n */\n isDraft: boolean\n /**\n * A title of the listing.\n */\n title: string\n /**\n * A short summary or tagline.\n */\n summary: string\n /**\n * A description in Markdown format.\n */\n content: string\n /**\n * Timestamp in unix seconds of when the listing was published.\n */\n publishedAt: string\n /**\n * Location of the listing.\n * @example 'NYC'\n */\n location: string\n /**\n * Price details.\n */\n price: PriceDetails\n /**\n * Images of the listing with optional dimensions.\n */\n images: Array<{\n url: string\n dimensions?: string\n }>\n /**\n * Tags/Hashtags (i.e. categories, keywords, etc.)\n */\n hashtags: string[]\n /**\n * Other standard tags.\n * @example \"g\", a geohash for more precise location\n */\n additionalTags: Record<string, string | string[]>\n}\n\n/**\n * Validates an event to ensure it is a valid classified listing event.\n * @param event - The event to validate.\n * @returns True if the event is valid, false otherwise.\n */\nexport function validateEvent(event: Event): boolean {\n if (![ClassifiedListing, DraftClassifiedListing].includes(event.kind)) return false\n\n const requiredTags = ['d', 'title', 'summary', 'location', 'published_at', 'price']\n const requiredTagCount = requiredTags.length\n const tagCounts: Record<string, number> = {}\n\n if (event.tags.length < requiredTagCount) return false\n\n for (const tag of event.tags) {\n if (tag.length < 2) return false\n\n const [tagName, ...tagValues] = tag\n\n if (tagName == 'published_at') {\n const timestamp = parseInt(tagValues[0])\n if (isNaN(timestamp)) return false\n } else if (tagName == 'price') {\n if (tagValues.length < 2) return false\n\n const price = parseInt(tagValues[0])\n if (isNaN(price) || tagValues[1].length != 3) return false\n } else if ((tagName == 'e' || tagName == 'a') && tag.length != 3) {\n return false\n }\n\n if (requiredTags.includes(tagName)) {\n tagCounts[tagName] = (tagCounts[tagName] || 0) + 1\n }\n }\n\n return Object.values(tagCounts).every(count => count == 1) && Object.keys(tagCounts).length == requiredTagCount\n}\n\n/**\n * Parses an event and returns a classified listing object.\n * @param event - The event to parse.\n * @returns The classified listing object.\n * @throws Error if the event is invalid.\n */\nexport function parseEvent(event: Event): ClassifiedListingObject {\n if (!validateEvent(event)) {\n throw new Error('Invalid event')\n }\n\n const listing: ClassifiedListingObject = {\n isDraft: event.kind === DraftClassifiedListing,\n title: '',\n summary: '',\n content: event.content,\n publishedAt: '',\n location: '',\n price: {\n amount: '',\n currency: '',\n },\n images: [],\n hashtags: [],\n additionalTags: {},\n }\n\n for (let i = 0; i < event.tags.length; i++) {\n const tag = event.tags[i]\n const [tagName, ...tagValues] = tag\n\n if (tagName == 'title') {\n listing.title = tagValues[0]\n } else if (tagName == 'summary') {\n listing.summary = tagValues[0]\n } else if (tagName == 'published_at') {\n listing.publishedAt = tagValues[0]\n } else if (tagName == 'location') {\n listing.location = tagValues[0]\n } else if (tagName == 'price') {\n listing.price.amount = tagValues[0]\n listing.price.currency = tagValues[1]\n\n if (tagValues.length == 3) {\n listing.price.frequency = tagValues[2]\n }\n } else if (tagName == 'image') {\n listing.images.push({\n url: tagValues[0],\n dimensions: tagValues?.[1] ?? undefined,\n })\n } else if (tagName == 't') {\n listing.hashtags.push(tagValues[0])\n } else if (tagName == 'e' || tagName == 'a') {\n listing.additionalTags[tagName] = [...tagValues]\n }\n }\n\n return listing\n}\n\n/**\n * Generates an event template based on a classified listing object.\n *\n * @param listing - The classified listing object.\n * @returns The event template.\n */\nexport function generateEventTemplate(listing: ClassifiedListingObject): EventTemplate {\n const priceTag = ['price', listing.price.amount, listing.price.currency]\n if (listing.price.frequency) priceTag.push(listing.price.frequency)\n\n const tags: string[][] = [\n ['d', listing.title.trim().toLowerCase().replace(/ /g, '-')],\n ['title', listing.title],\n ['published_at', listing.publishedAt],\n ['summary', listing.summary],\n ['location', listing.location],\n priceTag,\n ]\n\n for (let i = 0; i < listing.images.length; i++) {\n const image = listing.images[i]\n const imageTag = ['image', image.url]\n if (image.dimensions) imageTag.push(image.dimensions)\n\n tags.push(imageTag)\n }\n\n for (let i = 0; i < listing.hashtags.length; i++) {\n const t = listing.hashtags[i]\n\n tags.push(['t', t])\n }\n\n for (const [key, value] of Object.entries(listing.additionalTags)) {\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const val = value[i]\n\n tags.push([key, val])\n }\n } else {\n tags.push([key, value])\n }\n }\n\n return {\n kind: listing.isDraft ? DraftClassifiedListing : ClassifiedListing,\n content: listing.content,\n tags,\n created_at: Math.floor(Date.now() / 1000),\n }\n}\n", "import { NostrEvent, validateEvent } from './pure.ts'\n\n/** Events are **regular**, which means they're all expected to be stored by relays. */\nexport function isRegularKind(kind: number): boolean {\n return kind < 10000 && kind !== 0 && kind !== 3\n}\n\n/** Events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event is expected to (SHOULD) be stored by relays, older versions are expected to be discarded. */\nexport function isReplaceableKind(kind: number): boolean {\n return kind === 0 || kind === 3 || (10000 <= kind && kind < 20000)\n}\n\n/** Events are **ephemeral**, which means they are not expected to be stored by relays. */\nexport function isEphemeralKind(kind: number): boolean {\n return 20000 <= kind && kind < 30000\n}\n\n/** Events are **addressable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag, only the latest event is expected to be stored by relays, older versions are expected to be discarded. */\nexport function isAddressableKind(kind: number): boolean {\n return 30000 <= kind && kind < 40000\n}\n\n/** Classification of the event kind. */\nexport type KindClassification = 'regular' | 'replaceable' | 'ephemeral' | 'parameterized' | 'unknown'\n\n/** Determine the classification of this kind of event if known, or `unknown`. */\nexport function classifyKind(kind: number): KindClassification {\n if (isRegularKind(kind)) return 'regular'\n if (isReplaceableKind(kind)) return 'replaceable'\n if (isEphemeralKind(kind)) return 'ephemeral'\n if (isAddressableKind(kind)) return 'parameterized'\n return 'unknown'\n}\n\nexport function isKind<T extends number>(event: unknown, kind: T | Array<T>): event is NostrEvent & { kind: T } {\n const kindAsArray: number[] = kind instanceof Array ? kind : [kind]\n return (validateEvent(event) && kindAsArray.includes(event.kind)) || false\n}\n\nexport const Metadata = 0\nexport type Metadata = typeof Metadata\nexport const ShortTextNote = 1\nexport type ShortTextNote = typeof ShortTextNote\nexport const RecommendRelay = 2\nexport type RecommendRelay = typeof RecommendRelay\nexport const Contacts = 3\nexport type Contacts = typeof Contacts\nexport const EncryptedDirectMessage = 4\nexport type EncryptedDirectMessage = typeof EncryptedDirectMessage\nexport const EventDeletion = 5\nexport type EventDeletion = typeof EventDeletion\nexport const Repost = 6\nexport type Repost = typeof Repost\nexport const Reaction = 7\nexport type Reaction = typeof Reaction\nexport const BadgeAward = 8\nexport type BadgeAward = typeof BadgeAward\nexport const ChatMessage = 9\nexport type ChatMessage = typeof ChatMessage\nexport const ForumThread = 11\nexport type ForumThread = typeof ForumThread\nexport const Seal = 13\nexport type Seal = typeof Seal\nexport const PrivateDirectMessage = 14\nexport type PrivateDirectMessage = typeof PrivateDirectMessage\nexport const FileMessage = 15\nexport type FileMessage = typeof FileMessage\nexport const GenericRepost = 16\nexport type GenericRepost = typeof GenericRepost\nexport const Photo = 20\nexport type Photo = typeof Photo\nexport const NormalVideo = 21\nexport type NormalVideo = typeof NormalVideo\nexport const ShortVideo = 22\nexport type ShortVideo = typeof ShortVideo\nexport const ChannelCreation = 40\nexport type ChannelCreation = typeof ChannelCreation\nexport const ChannelMetadata = 41\nexport type ChannelMetadata = typeof ChannelMetadata\nexport const ChannelMessage = 42\nexport type ChannelMessage = typeof ChannelMessage\nexport const ChannelHideMessage = 43\nexport type ChannelHideMessage = typeof ChannelHideMessage\nexport const ChannelMuteUser = 44\nexport type ChannelMuteUser = typeof ChannelMuteUser\nexport const OpenTimestamps = 1040\nexport type OpenTimestamps = typeof OpenTimestamps\nexport const GiftWrap = 1059\nexport type GiftWrap = typeof GiftWrap\nexport const Poll = 1068\nexport type Poll = typeof Poll\nexport const FileMetadata = 1063\nexport type FileMetadata = typeof FileMetadata\nexport const Comment = 1111\nexport type Comment = typeof Comment\nexport const LiveChatMessage = 1311\nexport type LiveChatMessage = typeof LiveChatMessage\nexport const Voice = 1222\nexport type Voice = typeof Voice\nexport const VoiceComment = 1244\nexport type VoiceComment = typeof VoiceComment\nexport const ProblemTracker = 1971\nexport type ProblemTracker = typeof ProblemTracker\nexport const Report = 1984\nexport type Report = typeof Report\nexport const Reporting = 1984\nexport type Reporting = typeof Reporting\nexport const Label = 1985\nexport type Label = typeof Label\nexport const CommunityPostApproval = 4550\nexport type CommunityPostApproval = typeof CommunityPostApproval\nexport const JobRequest = 5999\nexport type JobRequest = typeof JobRequest\nexport const JobResult = 6999\nexport type JobResult = typeof JobResult\nexport const JobFeedback = 7000\nexport type JobFeedback = typeof JobFeedback\nexport const ZapGoal = 9041\nexport type ZapGoal = typeof ZapGoal\nexport const ZapRequest = 9734\nexport type ZapRequest = typeof ZapRequest\nexport const Zap = 9735\nexport type Zap = typeof Zap\nexport const Highlights = 9802\nexport type Highlights = typeof Highlights\nexport const PollResponse = 1018\nexport type PollResponse = typeof PollResponse\nexport const Mutelist = 10000\nexport type Mutelist = typeof Mutelist\nexport const Pinlist = 10001\nexport type Pinlist = typeof Pinlist\nexport const RelayList = 10002\nexport type RelayList = typeof RelayList\nexport const BookmarkList = 10003\nexport type BookmarkList = typeof BookmarkList\nexport const CommunitiesList = 10004\nexport type CommunitiesList = typeof CommunitiesList\nexport const PublicChatsList = 10005\nexport type PublicChatsList = typeof PublicChatsList\nexport const BlockedRelaysList = 10006\nexport type BlockedRelaysList = typeof BlockedRelaysList\nexport const SearchRelaysList = 10007\nexport type SearchRelaysList = typeof SearchRelaysList\nexport const FavoriteRelays = 10012\nexport type FavoriteRelays = typeof FavoriteRelays\nexport const InterestsList = 10015\nexport type InterestsList = typeof InterestsList\nexport const UserEmojiList = 10030\nexport type UserEmojiList = typeof UserEmojiList\nexport const DirectMessageRelaysList = 10050\nexport type DirectMessageRelaysList = typeof DirectMessageRelaysList\nexport const FileServerPreference = 10096\nexport type FileServerPreference = typeof FileServerPreference\nexport const BlossomServerList = 10063\nexport type BlossomServerList = typeof BlossomServerList\nexport const NWCWalletInfo = 13194\nexport type NWCWalletInfo = typeof NWCWalletInfo\nexport const LightningPubRPC = 21000\nexport type LightningPubRPC = typeof LightningPubRPC\nexport const ClientAuth = 22242\nexport type ClientAuth = typeof ClientAuth\nexport const NWCWalletRequest = 23194\nexport type NWCWalletRequest = typeof NWCWalletRequest\nexport const NWCWalletResponse = 23195\nexport type NWCWalletResponse = typeof NWCWalletResponse\nexport const NostrConnect = 24133\nexport type NostrConnect = typeof NostrConnect\nexport const HTTPAuth = 27235\nexport type HTTPAuth = typeof HTTPAuth\nexport const Followsets = 30000\nexport type Followsets = typeof Followsets\nexport const Genericlists = 30001\nexport type Genericlists = typeof Genericlists\nexport const Relaysets = 30002\nexport type Relaysets = typeof Relaysets\nexport const Bookmarksets = 30003\nexport type Bookmarksets = typeof Bookmarksets\nexport const Curationsets = 30004\nexport type Curationsets = typeof Curationsets\nexport const ProfileBadges = 30008\nexport type ProfileBadges = typeof ProfileBadges\nexport const BadgeDefinition = 30009\nexport type BadgeDefinition = typeof BadgeDefinition\nexport const Interestsets = 30015\nexport type Interestsets = typeof Interestsets\nexport const CreateOrUpdateStall = 30017\nexport type CreateOrUpdateStall = typeof CreateOrUpdateStall\nexport const CreateOrUpdateProduct = 30018\nexport type CreateOrUpdateProduct = typeof CreateOrUpdateProduct\nexport const LongFormArticle = 30023\nexport type LongFormArticle = typeof LongFormArticle\nexport const DraftLong = 30024\nexport type DraftLong = typeof DraftLong\nexport const Emojisets = 30030\nexport type Emojisets = typeof Emojisets\nexport const Application = 30078\nexport type Application = typeof Application\nexport const LiveEvent = 30311\nexport type LiveEvent = typeof LiveEvent\nexport const UserStatuses = 30315\nexport type UserStatuses = typeof UserStatuses\nexport const ClassifiedListing = 30402\nexport type ClassifiedListing = typeof ClassifiedListing\nexport const DraftClassifiedListing = 30403\nexport type DraftClassifiedListing = typeof DraftClassifiedListing\nexport const Date = 31922\nexport type Date = typeof Date\nexport const Time = 31923\nexport type Time = typeof Time\nexport const Calendar = 31924\nexport type Calendar = typeof Calendar\nexport const CalendarEventRSVP = 31925\nexport type CalendarEventRSVP = typeof CalendarEventRSVP\nexport const RelayReview = 31987\nexport type RelayReview = typeof RelayReview\nexport const Handlerrecommendation = 31989\nexport type Handlerrecommendation = typeof Handlerrecommendation\nexport const Handlerinformation = 31990\nexport type Handlerinformation = typeof Handlerinformation\nexport const CommunityDefinition = 34550\nexport type CommunityDefinition = typeof CommunityDefinition\nexport const GroupMetadata = 39000\nexport type GroupMetadata = typeof GroupMetadata\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACyMO,IAAM,oBAAoB;AAE1B,IAAM,yBAAyB;;;AD1H/B,SAAS,cAAc,OAAuB;AACnD,MAAI,CAAC,CAAC,mBAAmB,sBAAsB,EAAE,SAAS,MAAM,IAAI;AAAG,WAAO;AAE9E,QAAM,eAAe,CAAC,KAAK,SAAS,WAAW,YAAY,gBAAgB,OAAO;AAClF,QAAM,mBAAmB,aAAa;AACtC,QAAM,YAAoC,CAAC;AAE3C,MAAI,MAAM,KAAK,SAAS;AAAkB,WAAO;AAEjD,aAAW,OAAO,MAAM,MAAM;AAC5B,QAAI,IAAI,SAAS;AAAG,aAAO;AAE3B,UAAM,CAAC,YAAY,SAAS,IAAI;AAEhC,QAAI,WAAW,gBAAgB;AAC7B,YAA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AAChD,UAAM,IAAI,QAAQ,SAAS;AAE3B,SAAK,KAAK,CAAC,KAAK,CAAC,CAAC;AAAA,EACpB;AAEA,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,cAAc,GAAG;AACjE,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,cAAM,MAAM,MAAM;AAElB,aAAK,KAAK,CAAC,KAAK,GAAG,CAAC;AAAA,MACtB;AAAA,IACF,OAAO;AACL,WAAK,KAAK,CAAC,KAAK,KAAK,CAAC;AAAA,IACxB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM,QAAQ,UAAU,yBAAyB;AAAA,IACjD,SAAS,QAAQ;AAAA,IACjB;AAAA,IACA,YAAY,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;AAAA,EAC1C;AACF;",
4
+ "sourcesContent": ["import { Event, EventTemplate } from './core.ts'\nimport { ClassifiedListing, DraftClassifiedListing } from './kinds.ts'\n\n/**\n * Represents the details of a price.\n * @example { amount: '100', currency: 'USD', frequency: 'month' }\n * @example { amount: '100', currency: 'EUR' }\n */\nexport type PriceDetails = {\n /**\n * The amount of the price.\n */\n amount: string\n /**\n * The currency of the price in 3-letter ISO 4217 format.\n * @example 'USD'\n */\n currency: string\n /**\n * The optional frequency of payment.\n * Can be one of: 'hour', 'day', 'week', 'month', 'year', or a custom string.\n */\n frequency?: string\n}\n\n/**\n * Represents a classified listing object.\n */\nexport type ClassifiedListingObject = {\n /**\n * Whether the listing is a draft or not.\n */\n isDraft: boolean\n /**\n * A title of the listing.\n */\n title: string\n /**\n * A short summary or tagline.\n */\n summary: string\n /**\n * A description in Markdown format.\n */\n content: string\n /**\n * Timestamp in unix seconds of when the listing was published.\n */\n publishedAt: string\n /**\n * Location of the listing.\n * @example 'NYC'\n */\n location: string\n /**\n * Price details.\n */\n price: PriceDetails\n /**\n * Images of the listing with optional dimensions.\n */\n images: Array<{\n url: string\n dimensions?: string\n }>\n /**\n * Tags/Hashtags (i.e. categories, keywords, etc.)\n */\n hashtags: string[]\n /**\n * Other standard tags.\n * @example \"g\", a geohash for more precise location\n */\n additionalTags: Record<string, string | string[]>\n}\n\n/**\n * Validates an event to ensure it is a valid classified listing event.\n * @param event - The event to validate.\n * @returns True if the event is valid, false otherwise.\n */\nexport function validateEvent(event: Event): boolean {\n if (![ClassifiedListing, DraftClassifiedListing].includes(event.kind)) return false\n\n const requiredTags = ['d', 'title', 'summary', 'location', 'published_at', 'price']\n const requiredTagCount = requiredTags.length\n const tagCounts: Record<string, number> = {}\n\n if (event.tags.length < requiredTagCount) return false\n\n for (const tag of event.tags) {\n if (tag.length < 2) return false\n\n const [tagName, ...tagValues] = tag\n\n if (tagName == 'published_at') {\n const timestamp = parseInt(tagValues[0])\n if (isNaN(timestamp)) return false\n } else if (tagName == 'price') {\n if (tagValues.length < 2) return false\n\n const price = parseInt(tagValues[0])\n if (isNaN(price) || tagValues[1].length != 3) return false\n } else if ((tagName == 'e' || tagName == 'a') && tag.length != 3) {\n return false\n }\n\n if (requiredTags.includes(tagName)) {\n tagCounts[tagName] = (tagCounts[tagName] || 0) + 1\n }\n }\n\n return Object.values(tagCounts).every(count => count == 1) && Object.keys(tagCounts).length == requiredTagCount\n}\n\n/**\n * Parses an event and returns a classified listing object.\n * @param event - The event to parse.\n * @returns The classified listing object.\n * @throws Error if the event is invalid.\n */\nexport function parseEvent(event: Event): ClassifiedListingObject {\n if (!validateEvent(event)) {\n throw new Error('Invalid event')\n }\n\n const listing: ClassifiedListingObject = {\n isDraft: event.kind === DraftClassifiedListing,\n title: '',\n summary: '',\n content: event.content,\n publishedAt: '',\n location: '',\n price: {\n amount: '',\n currency: '',\n },\n images: [],\n hashtags: [],\n additionalTags: {},\n }\n\n for (let i = 0; i < event.tags.length; i++) {\n const tag = event.tags[i]\n const [tagName, ...tagValues] = tag\n\n if (tagName == 'title') {\n listing.title = tagValues[0]\n } else if (tagName == 'summary') {\n listing.summary = tagValues[0]\n } else if (tagName == 'published_at') {\n listing.publishedAt = tagValues[0]\n } else if (tagName == 'location') {\n listing.location = tagValues[0]\n } else if (tagName == 'price') {\n listing.price.amount = tagValues[0]\n listing.price.currency = tagValues[1]\n\n if (tagValues.length == 3) {\n listing.price.frequency = tagValues[2]\n }\n } else if (tagName == 'image') {\n listing.images.push({\n url: tagValues[0],\n dimensions: tagValues?.[1] ?? undefined,\n })\n } else if (tagName == 't') {\n listing.hashtags.push(tagValues[0])\n } else if (tagName == 'e' || tagName == 'a') {\n listing.additionalTags[tagName] = [...tagValues]\n }\n }\n\n return listing\n}\n\n/**\n * Generates an event template based on a classified listing object.\n *\n * @param listing - The classified listing object.\n * @returns The event template.\n */\nexport function generateEventTemplate(listing: ClassifiedListingObject): EventTemplate {\n const priceTag = ['price', listing.price.amount, listing.price.currency]\n if (listing.price.frequency) priceTag.push(listing.price.frequency)\n\n const tags: string[][] = [\n ['d', listing.title.trim().toLowerCase().replace(/ /g, '-')],\n ['title', listing.title],\n ['published_at', listing.publishedAt],\n ['summary', listing.summary],\n ['location', listing.location],\n priceTag,\n ]\n\n for (let i = 0; i < listing.images.length; i++) {\n const image = listing.images[i]\n const imageTag = ['image', image.url]\n if (image.dimensions) imageTag.push(image.dimensions)\n\n tags.push(imageTag)\n }\n\n for (let i = 0; i < listing.hashtags.length; i++) {\n const t = listing.hashtags[i]\n\n tags.push(['t', t])\n }\n\n for (const [key, value] of Object.entries(listing.additionalTags)) {\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const val = value[i]\n\n tags.push([key, val])\n }\n } else {\n tags.push([key, value])\n }\n }\n\n return {\n kind: listing.isDraft ? DraftClassifiedListing : ClassifiedListing,\n content: listing.content,\n tags,\n created_at: Math.floor(Date.now() / 1000),\n }\n}\n", "import { NostrEvent, validateEvent } from './pure.ts'\n\n/** Events are **regular**, which means they're all expected to be stored by relays. */\nexport function isRegularKind(kind: number): boolean {\n return kind < 10000 && kind !== 0 && kind !== 3\n}\n\n/** Events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event is expected to (SHOULD) be stored by relays, older versions are expected to be discarded. */\nexport function isReplaceableKind(kind: number): boolean {\n return kind === 0 || kind === 3 || (10000 <= kind && kind < 20000)\n}\n\n/** Events are **ephemeral**, which means they are not expected to be stored by relays. */\nexport function isEphemeralKind(kind: number): boolean {\n return 20000 <= kind && kind < 30000\n}\n\n/** Events are **addressable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag, only the latest event is expected to be stored by relays, older versions are expected to be discarded. */\nexport function isAddressableKind(kind: number): boolean {\n return 30000 <= kind && kind < 40000\n}\n\n/** Classification of the event kind. */\nexport type KindClassification = 'regular' | 'replaceable' | 'ephemeral' | 'parameterized' | 'unknown'\n\n/** Determine the classification of this kind of event if known, or `unknown`. */\nexport function classifyKind(kind: number): KindClassification {\n if (isRegularKind(kind)) return 'regular'\n if (isReplaceableKind(kind)) return 'replaceable'\n if (isEphemeralKind(kind)) return 'ephemeral'\n if (isAddressableKind(kind)) return 'parameterized'\n return 'unknown'\n}\n\nexport function isKind<T extends number>(event: unknown, kind: T | Array<T>): event is NostrEvent & { kind: T } {\n const kindAsArray: number[] = kind instanceof Array ? kind : [kind]\n return (validateEvent(event) && kindAsArray.includes(event.kind)) || false\n}\n\nexport const Metadata = 0\nexport type Metadata = typeof Metadata\nexport const ShortTextNote = 1\nexport type ShortTextNote = typeof ShortTextNote\nexport const RecommendRelay = 2\nexport type RecommendRelay = typeof RecommendRelay\nexport const Contacts = 3\nexport type Contacts = typeof Contacts\nexport const EncryptedDirectMessage = 4\nexport type EncryptedDirectMessage = typeof EncryptedDirectMessage\nexport const EventDeletion = 5\nexport type EventDeletion = typeof EventDeletion\nexport const Repost = 6\nexport type Repost = typeof Repost\nexport const Reaction = 7\nexport type Reaction = typeof Reaction\nexport const BadgeAward = 8\nexport type BadgeAward = typeof BadgeAward\nexport const ChatMessage = 9\nexport type ChatMessage = typeof ChatMessage\nexport const SimpleGroupThreadedReply = 10\nexport type SimpleGroupThreadedReply = typeof SimpleGroupThreadedReply\nexport const ForumThread = 11\nexport type ForumThread = typeof ForumThread\nexport const SimpleGroupReply = 12\nexport type SimpleGroupReply = typeof SimpleGroupReply\nexport const Seal = 13\nexport type Seal = typeof Seal\nexport const PrivateDirectMessage = 14\nexport type PrivateDirectMessage = typeof PrivateDirectMessage\nexport const FileMessage = 15\nexport type FileMessage = typeof FileMessage\nexport const GenericRepost = 16\nexport type GenericRepost = typeof GenericRepost\nexport const ReactionToWebsite = 17\nexport type ReactionToWebsite = typeof ReactionToWebsite\nexport const Photo = 20\nexport type Photo = typeof Photo\nexport const NormalVideo = 21\nexport type NormalVideo = typeof NormalVideo\nexport const ShortVideo = 22\nexport type ShortVideo = typeof ShortVideo\nexport const PublicMessage = 24\nexport type PublicMessage = typeof PublicMessage\nexport const ChannelCreation = 40\nexport type ChannelCreation = typeof ChannelCreation\nexport const ChannelMetadata = 41\nexport type ChannelMetadata = typeof ChannelMetadata\nexport const ChannelMessage = 42\nexport type ChannelMessage = typeof ChannelMessage\nexport const ChannelHideMessage = 43\nexport type ChannelHideMessage = typeof ChannelHideMessage\nexport const ChannelMuteUser = 44\nexport type ChannelMuteUser = typeof ChannelMuteUser\nexport const PodcastEpisode = 54\nexport type PodcastEpisode = typeof PodcastEpisode\nexport const Chess = 64\nexport type Chess = typeof Chess\nexport const MergeRequests = 818\nexport type MergeRequests = typeof MergeRequests\nexport const PollResponse = 1018\nexport type PollResponse = typeof PollResponse\nexport const Bid = 1021\nexport type Bid = typeof Bid\nexport const BidConfirmation = 1022\nexport type BidConfirmation = typeof BidConfirmation\nexport const OpenTimestamps = 1040\nexport type OpenTimestamps = typeof OpenTimestamps\nexport const GiftWrap = 1059\nexport type GiftWrap = typeof GiftWrap\nexport const FileMetadata = 1063\nexport type FileMetadata = typeof FileMetadata\nexport const Poll = 1068\nexport type Poll = typeof Poll\nexport const Comment = 1111\nexport type Comment = typeof Comment\nexport const Voice = 1222\nexport type Voice = typeof Voice\nexport const Scroll = 1227\nexport type Scroll = typeof Scroll\nexport const VoiceComment = 1244\nexport type VoiceComment = typeof VoiceComment\nexport const LiveChatMessage = 1311\nexport type LiveChatMessage = typeof LiveChatMessage\nexport const CodeSnippet = 1337\nexport type CodeSnippet = typeof CodeSnippet\nexport const Patch = 1617\nexport type Patch = typeof Patch\nexport const GitPullRequest = 1618\nexport type GitPullRequest = typeof GitPullRequest\nexport const GitPullRequestUpdate = 1619\nexport type GitPullRequestUpdate = typeof GitPullRequestUpdate\nexport const Issue = 1621\nexport type Issue = typeof Issue\nexport const Reply = 1622\nexport type Reply = typeof Reply\nexport const StatusOpen = 1630\nexport type StatusOpen = typeof StatusOpen\nexport const StatusApplied = 1631\nexport type StatusApplied = typeof StatusApplied\nexport const StatusClosed = 1632\nexport type StatusClosed = typeof StatusClosed\nexport const StatusDraft = 1633\nexport type StatusDraft = typeof StatusDraft\nexport const ProblemTracker = 1971\nexport type ProblemTracker = typeof ProblemTracker\nexport const Report = 1984\nexport type Report = typeof Report\nexport const Reporting = 1984\nexport type Reporting = typeof Reporting\nexport const Label = 1985\nexport type Label = typeof Label\nexport const RelayReviews = 1986\nexport type RelayReviews = typeof RelayReviews\nexport const AIEmbeddings = 1987\nexport type AIEmbeddings = typeof AIEmbeddings\nexport const Torrent = 2003\nexport type Torrent = typeof Torrent\nexport const TorrentComment = 2004\nexport type TorrentComment = typeof TorrentComment\nexport const CoinjoinPool = 2022\nexport type CoinjoinPool = typeof CoinjoinPool\nexport const DecoupledKeyClientAnnouncement = 4454\nexport type DecoupledKeyClientAnnouncement = typeof DecoupledKeyClientAnnouncement\nexport const DecoupledEncryptionKeyDistribution = 4455\nexport type DecoupledEncryptionKeyDistribution = typeof DecoupledEncryptionKeyDistribution\nexport const CommunityPostApproval = 4550\nexport type CommunityPostApproval = typeof CommunityPostApproval\nexport const JobRequest = 5999\nexport type JobRequest = typeof JobRequest\nexport const JobResult = 6999\nexport type JobResult = typeof JobResult\nexport const JobFeedback = 7000\nexport type JobFeedback = typeof JobFeedback\nexport const ReservedCashuWalletTokens = 7374\nexport type ReservedCashuWalletTokens = typeof ReservedCashuWalletTokens\nexport const CashuWalletTokens = 7375\nexport type CashuWalletTokens = typeof CashuWalletTokens\nexport const CashuWalletHistory = 7376\nexport type CashuWalletHistory = typeof CashuWalletHistory\nexport const GeocacheLog = 7516\nexport type GeocacheLog = typeof GeocacheLog\nexport const GeocacheProofOfFind = 7517\nexport type GeocacheProofOfFind = typeof GeocacheProofOfFind\nexport const SimpleGroupPutUser = 9000\nexport type SimpleGroupPutUser = typeof SimpleGroupPutUser\nexport const SimpleGroupRemoveUser = 9001\nexport type SimpleGroupRemoveUser = typeof SimpleGroupRemoveUser\nexport const SimpleGroupEditMetadata = 9002\nexport type SimpleGroupEditMetadata = typeof SimpleGroupEditMetadata\nexport const SimpleGroupDeleteEvent = 9005\nexport type SimpleGroupDeleteEvent = typeof SimpleGroupDeleteEvent\nexport const SimpleGroupCreateGroup = 9007\nexport type SimpleGroupCreateGroup = typeof SimpleGroupCreateGroup\nexport const SimpleGroupDeleteGroup = 9008\nexport type SimpleGroupDeleteGroup = typeof SimpleGroupDeleteGroup\nexport const SimpleGroupCreateInvite = 9009\nexport type SimpleGroupCreateInvite = typeof SimpleGroupCreateInvite\nexport const SimpleGroupJoinRequest = 9021\nexport type SimpleGroupJoinRequest = typeof SimpleGroupJoinRequest\nexport const SimpleGroupLeaveRequest = 9022\nexport type SimpleGroupLeaveRequest = typeof SimpleGroupLeaveRequest\nexport const ZapGoal = 9041\nexport type ZapGoal = typeof ZapGoal\nexport const NutZap = 9321\nexport type NutZap = typeof NutZap\nexport const TidalLogin = 9467\nexport type TidalLogin = typeof TidalLogin\nexport const ZapRequest = 9734\nexport type ZapRequest = typeof ZapRequest\nexport const Zap = 9735\nexport type Zap = typeof Zap\nexport const Highlights = 9802\nexport type Highlights = typeof Highlights\nexport const Mutelist = 10000\nexport type Mutelist = typeof Mutelist\nexport const Pinlist = 10001\nexport type Pinlist = typeof Pinlist\nexport const RelayList = 10002\nexport type RelayList = typeof RelayList\nexport const BookmarkList = 10003\nexport type BookmarkList = typeof BookmarkList\nexport const CommunitiesList = 10004\nexport type CommunitiesList = typeof CommunitiesList\nexport const PublicChatsList = 10005\nexport type PublicChatsList = typeof PublicChatsList\nexport const BlockedRelaysList = 10006\nexport type BlockedRelaysList = typeof BlockedRelaysList\nexport const SearchRelaysList = 10007\nexport type SearchRelaysList = typeof SearchRelaysList\nexport const SimpleGroupList = 10009\nexport type SimpleGroupList = typeof SimpleGroupList\nexport const FavoriteRelays = 10012\nexport type FavoriteRelays = typeof FavoriteRelays\nexport const PrivateEventRelayList = 10013\nexport type PrivateEventRelayList = typeof PrivateEventRelayList\nexport const InterestsList = 10015\nexport type InterestsList = typeof InterestsList\nexport const NutZapInfo = 10019\nexport type NutZapInfo = typeof NutZapInfo\nexport const MediaFollows = 10020\nexport type MediaFollows = typeof MediaFollows\nexport const UserEmojiList = 10030\nexport type UserEmojiList = typeof UserEmojiList\nexport const DecoupledKeyAnnouncement = 10044\nexport type DecoupledKeyAnnouncement = typeof DecoupledKeyAnnouncement\nexport const DirectMessageRelaysList = 10050\nexport type DirectMessageRelaysList = typeof DirectMessageRelaysList\nexport const FavoritePodcasts = 10054\nexport type FavoritePodcasts = typeof FavoritePodcasts\nexport const BlossomServerList = 10063\nexport type BlossomServerList = typeof BlossomServerList\nexport const FileServerPreference = 10096\nexport type FileServerPreference = typeof FileServerPreference\nexport const GoodWikiAuthorList = 10101\nexport type GoodWikiAuthorList = typeof GoodWikiAuthorList\nexport const GoodWikiRelayList = 10102\nexport type GoodWikiRelayList = typeof GoodWikiRelayList\nexport const PodcastMetadata = 10154\nexport type PodcastMetadata = typeof PodcastMetadata\nexport const AuthoredPodcasts = 10164\nexport type AuthoredPodcasts = typeof AuthoredPodcasts\nexport const RelayMonitorAnnouncement = 10166\nexport type RelayMonitorAnnouncement = typeof RelayMonitorAnnouncement\nexport const RoomPresence = 10312\nexport type RoomPresence = typeof RoomPresence\nexport const UserGraspList = 10317\nexport type UserGraspList = typeof UserGraspList\nexport const ProxyAnnouncement = 10377\nexport type ProxyAnnouncement = typeof ProxyAnnouncement\nexport const TransportMethodAnnouncement = 11111\nexport type TransportMethodAnnouncement = typeof TransportMethodAnnouncement\nexport const NWCWalletInfo = 13194\nexport type NWCWalletInfo = typeof NWCWalletInfo\nexport const NsiteRoot = 15128\nexport type NsiteRoot = typeof NsiteRoot\nexport const CashuWalletEvent = 17375\nexport type CashuWalletEvent = typeof CashuWalletEvent\nexport const LightningPubRPC = 21000\nexport type LightningPubRPC = typeof LightningPubRPC\nexport const ClientAuth = 22242\nexport type ClientAuth = typeof ClientAuth\nexport const NWCWalletRequest = 23194\nexport type NWCWalletRequest = typeof NWCWalletRequest\nexport const NWCWalletResponse = 23195\nexport type NWCWalletResponse = typeof NWCWalletResponse\nexport const NostrConnect = 24133\nexport type NostrConnect = typeof NostrConnect\nexport const BlobsAuth = 24242\nexport type BlobsAuth = typeof BlobsAuth\nexport const HTTPAuth = 27235\nexport type HTTPAuth = typeof HTTPAuth\nexport const Followsets = 30000\nexport type Followsets = typeof Followsets\nexport const Genericlists = 30001\nexport type Genericlists = typeof Genericlists\nexport const Relaysets = 30002\nexport type Relaysets = typeof Relaysets\nexport const Bookmarksets = 30003\nexport type Bookmarksets = typeof Bookmarksets\nexport const Curationsets = 30004\nexport type Curationsets = typeof Curationsets\nexport const CuratedVideoSets = 30005\nexport type CuratedVideoSets = typeof CuratedVideoSets\nexport const MuteSets = 30007\nexport type MuteSets = typeof MuteSets\nexport const ProfileBadges = 30008\nexport type ProfileBadges = typeof ProfileBadges\nexport const BadgeDefinition = 30009\nexport type BadgeDefinition = typeof BadgeDefinition\nexport const Interestsets = 30015\nexport type Interestsets = typeof Interestsets\nexport const CreateOrUpdateStall = 30017\nexport type CreateOrUpdateStall = typeof CreateOrUpdateStall\nexport const CreateOrUpdateProduct = 30018\nexport type CreateOrUpdateProduct = typeof CreateOrUpdateProduct\nexport const MarketplaceUI = 30019\nexport type MarketplaceUI = typeof MarketplaceUI\nexport const ProductSoldAsAuction = 30020\nexport type ProductSoldAsAuction = typeof ProductSoldAsAuction\nexport const LongFormArticle = 30023\nexport type LongFormArticle = typeof LongFormArticle\nexport const DraftLong = 30024\nexport type DraftLong = typeof DraftLong\nexport const Emojisets = 30030\nexport type Emojisets = typeof Emojisets\nexport const ModularArticleHeader = 30040\nexport type ModularArticleHeader = typeof ModularArticleHeader\nexport const ModularArticleContent = 30041\nexport type ModularArticleContent = typeof ModularArticleContent\nexport const ReleaseArtifactSets = 30063\nexport type ReleaseArtifactSets = typeof ReleaseArtifactSets\nexport const Application = 30078\nexport type Application = typeof Application\nexport const RelayDiscovery = 30166\nexport type RelayDiscovery = typeof RelayDiscovery\nexport const AppCurationSet = 30267\nexport type AppCurationSet = typeof AppCurationSet\nexport const LiveEvent = 30311\nexport type LiveEvent = typeof LiveEvent\nexport const InteractiveRoom = 30312\nexport type InteractiveRoom = typeof InteractiveRoom\nexport const ConferenceEvent = 30313\nexport type ConferenceEvent = typeof ConferenceEvent\nexport const UserStatuses = 30315\nexport type UserStatuses = typeof UserStatuses\nexport const SlideSet = 30388\nexport type SlideSet = typeof SlideSet\nexport const ClassifiedListing = 30402\nexport type ClassifiedListing = typeof ClassifiedListing\nexport const DraftClassifiedListing = 30403\nexport type DraftClassifiedListing = typeof DraftClassifiedListing\nexport const RepositoryAnnouncement = 30617\nexport type RepositoryAnnouncement = typeof RepositoryAnnouncement\nexport const RepositoryState = 30618\nexport type RepositoryState = typeof RepositoryState\nexport const WikiArticle = 30818\nexport type WikiArticle = typeof WikiArticle\nexport const Redirects = 30819\nexport type Redirects = typeof Redirects\nexport const DraftEvent = 31234\nexport type DraftEvent = typeof DraftEvent\nexport const LinkSet = 31388\nexport type LinkSet = typeof LinkSet\nexport const Feed = 31890\nexport type Feed = typeof Feed\nexport const Date = 31922\nexport type Date = typeof Date\nexport const Time = 31923\nexport type Time = typeof Time\nexport const Calendar = 31924\nexport type Calendar = typeof Calendar\nexport const CalendarEventRSVP = 31925\nexport type CalendarEventRSVP = typeof CalendarEventRSVP\nexport const RelayReview = 31987\nexport type RelayReview = typeof RelayReview\nexport const Handlerrecommendation = 31989\nexport type Handlerrecommendation = typeof Handlerrecommendation\nexport const Handlerinformation = 31990\nexport type Handlerinformation = typeof Handlerinformation\nexport const SoftwareApplication = 32267\nexport type SoftwareApplication = typeof SoftwareApplication\nexport const LegacyNsiteFile = 34128\nexport type LegacyNsiteFile = typeof LegacyNsiteFile\nexport const VideoViewEvent = 34237\nexport type VideoViewEvent = typeof VideoViewEvent\nexport const CommunityDefinition = 34550\nexport type CommunityDefinition = typeof CommunityDefinition\nexport const NsiteNamed = 35128\nexport type NsiteNamed = typeof NsiteNamed\nexport const GeocacheListing = 37515\nexport type GeocacheListing = typeof GeocacheListing\nexport const GeocacheLogEntry = 37516\nexport type GeocacheLogEntry = typeof GeocacheLogEntry\nexport const CashuMintAnnouncement = 38172\nexport type CashuMintAnnouncement = typeof CashuMintAnnouncement\nexport const FedimintAnnouncement = 38173\nexport type FedimintAnnouncement = typeof FedimintAnnouncement\nexport const PeerToPeerOrderEvents = 38383\nexport type PeerToPeerOrderEvents = typeof PeerToPeerOrderEvents\nexport const GroupMetadata = 39000\nexport type GroupMetadata = typeof GroupMetadata\nexport const SimpleGroupAdmins = 39001\nexport type SimpleGroupAdmins = typeof SimpleGroupAdmins\nexport const SimpleGroupMembers = 39002\nexport type SimpleGroupMembers = typeof SimpleGroupMembers\nexport const SimpleGroupRoles = 39003\nexport type SimpleGroupRoles = typeof SimpleGroupRoles\nexport const SimpleGroupLiveKitParticipants = 39004\nexport type SimpleGroupLiveKitParticipants = typeof SimpleGroupLiveKitParticipants\nexport const StarterPacks = 39089\nexport type StarterPacks = typeof StarterPacks\nexport const MediaStarterPacks = 39092\nexport type MediaStarterPacks = typeof MediaStarterPacks\nexport const WebBookmarks = 39701\nexport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