@chainpatrol/sdk 0.11.0 → 1.1.0

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.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { __spreadValues, __export, __async, __spreadProps, __objRest, __pow } from './chunk-4U7ZT42S.mjs';
1
+ import { __spreadValues, __export, __spreadProps, __async, __objRest, __pow } from './chunk-4U7ZT42S.mjs';
2
2
  import { getDomain, getSubdomain, parse as parse$1 } from 'tldts';
3
3
  import { z } from 'zod';
4
4
 
@@ -556,6 +556,32 @@ z.object({
556
556
  email: z.string().email(),
557
557
  description: z.string().optional().default("")
558
558
  });
559
+ z.object({
560
+ /** Canonicalization algorithm version the client computed its prefixes with. */
561
+ algoVersion: z.number().int().positive(),
562
+ /** 4-byte (8-hex-char) prefixes that hit the client's local index. */
563
+ prefixes: z.array(z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
564
+ }).describe("Blocklist confirm request");
565
+ z.object({
566
+ /** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
567
+ fullHashes: z.record(z.string(), z.array(z.string()))
568
+ }).describe("Blocklist confirm response");
569
+ z.void().describe("Blocklist version request");
570
+ z.object({
571
+ /** Canonicalization algorithm version the artifacts + confirm are built with. */
572
+ algoVersion: z.number().int().positive(),
573
+ snapshot: z.object({
574
+ token: z.string(),
575
+ url: z.string().url(),
576
+ prefixBytes: z.number().int().positive(),
577
+ count: z.number().int().nonnegative()
578
+ }),
579
+ recent: z.object({
580
+ token: z.string(),
581
+ url: z.string().url(),
582
+ windowSeconds: z.number().int().positive()
583
+ })
584
+ }).describe("Blocklist version response");
559
585
 
560
586
  // ../../node_modules/luxon/src/errors.js
561
587
  var LuxonError = class extends Error {
@@ -6977,12 +7003,17 @@ var BrandType = {
6977
7003
  ORGANIZATION: "ORGANIZATION"
6978
7004
  };
6979
7005
  var SubscriptionStatus = {
6980
- TRIAL: "TRIAL",
7006
+ POC: "POC",
6981
7007
  ACTIVE: "ACTIVE",
6982
7008
  PROSPECT: "PROSPECT",
6983
7009
  INTEGRATION: "INTEGRATION",
6984
7010
  INACTIVE: "INACTIVE"
6985
7011
  };
7012
+ var OrganizationPortalVisibility = {
7013
+ PUBLIC: "PUBLIC",
7014
+ PRIVATE: "PRIVATE",
7015
+ DISABLED: "DISABLED"
7016
+ };
6986
7017
  var AssetType = {
6987
7018
  URL: "URL",
6988
7019
  PAGE: "PAGE",
@@ -7073,7 +7104,8 @@ var AssetType = {
7073
7104
  BANDCAMP: "BANDCAMP",
7074
7105
  ARCHIVE_ORG: "ARCHIVE_ORG",
7075
7106
  FIVE_HUNDRED_PX: "FIVE_HUNDRED_PX",
7076
- LUMA: "LUMA"
7107
+ LUMA: "LUMA",
7108
+ SMARTMONEYMATCH: "SMARTMONEYMATCH"
7077
7109
  };
7078
7110
  var LivenessStatus = {
7079
7111
  UNKNOWN: "UNKNOWN",
@@ -7599,14 +7631,6 @@ z.object({
7599
7631
  warnAgeHours: z.number().int().positive().default(24 * 7),
7600
7632
  failAgeHours: z.number().int().positive().default(24 * 14)
7601
7633
  });
7602
- z.object({
7603
- slug: z.string().min(1),
7604
- warnThreshold: z.number().int().nonnegative().default(200)
7605
- });
7606
- z.object({
7607
- slug: z.string().min(1),
7608
- warnAgeHours: z.number().int().nonnegative().default(24 * 30)
7609
- });
7610
7634
  z.object({
7611
7635
  slug: z.string().min(1),
7612
7636
  warnAgeHours: z.number().int().nonnegative().default(24 * 30),
@@ -7842,6 +7866,26 @@ Returns all brands belonging to the organization associated with your API key,
7842
7866
  including sub-brands (\`ORGANIZATION\`) and individual / employee brands
7843
7867
  (\`INDIVIDUAL\`). Soft-deleted brands are excluded.`
7844
7868
  );
7869
+ var brandLegalDocumentSchema = z.object({
7870
+ present: z.boolean().describe("Whether the brand has this document attached"),
7871
+ fileName: z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
7872
+ fileUrl: z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
7873
+ });
7874
+ var brandTrademarkRegistrationSchema = z.object({
7875
+ id: z.number().describe("Trademark registration ID"),
7876
+ brandName: z.string().describe("Trademarked brand name as it appears on the registration"),
7877
+ trademarkOffice: z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
7878
+ registrationNumber: z.string().describe("Registration number assigned by the office"),
7879
+ goodsAndServicesClass: z.string().describe("Nice Classification class(es) the registration covers"),
7880
+ rightsOwnerName: z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
7881
+ registrationPageUrl: z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
7882
+ certificateFileName: z.string().nullable().describe(
7883
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
7884
+ ),
7885
+ certificateFileUrl: z.string().nullable().describe(
7886
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
7887
+ )
7888
+ });
7845
7889
  var brandItemSchema = z.object({
7846
7890
  id: z.number().describe("Brand ID"),
7847
7891
  slug: z.string().describe("Brand slug (stable, URL-safe identifier)"),
@@ -7858,14 +7902,24 @@ var brandItemSchema = z.object({
7858
7902
  excludedTerms: z.array(z.string()).describe("Terms that should be excluded when matching this brand"),
7859
7903
  tickers: z.array(z.string()).describe("Ticker symbols associated with the brand (e.g. `$JUP`)"),
7860
7904
  brandGroupId: z.number().nullable().describe("Group this brand belongs to (only set for `INDIVIDUAL` brands)"),
7861
- createdAt: z.date().describe("When the brand was created")
7905
+ createdAt: z.date().describe("When the brand was created"),
7906
+ useOrganizationDocs: z.boolean().describe(
7907
+ "When true, this brand inherits its Letter of Authorization and Power of Attorney from the organization rather than carrying its own. The `legalDocuments` block below always reflects the brand-level attachments \u2014 read `/user/orgs/{slug}` for the org-level fallbacks."
7908
+ ),
7909
+ legalDocuments: z.object({
7910
+ letterOfAuthorization: brandLegalDocumentSchema,
7911
+ powerOfAttorney: brandLegalDocumentSchema
7912
+ }).describe("Brand-level Letter of Authorization and Power of Attorney attachments"),
7913
+ trademarkRegistrations: z.array(brandTrademarkRegistrationSchema).describe(
7914
+ "Trademark registrations attached to this brand. An empty array means no trademarks are on file for the brand \u2014 use this to identify brands that still need them added."
7915
+ )
7862
7916
  });
7863
7917
  z.object({
7864
7918
  brands: z.array(brandItemSchema).describe("List of brands")
7865
7919
  }).describe("Successful operation");
7866
7920
  var FILTERABLE_SUBSCRIPTION_STATUSES = [
7867
7921
  SubscriptionStatus.PROSPECT,
7868
- SubscriptionStatus.TRIAL,
7922
+ SubscriptionStatus.POC,
7869
7923
  SubscriptionStatus.ACTIVE,
7870
7924
  SubscriptionStatus.INTEGRATION
7871
7925
  ];
@@ -7940,6 +7994,30 @@ var UserOrgIntegrationsSchema = z.object({
7940
7994
  intercom: z.boolean(),
7941
7995
  moderation: z.boolean()
7942
7996
  });
7997
+ var UserOrgLegalDocumentSchema = z.object({
7998
+ present: z.boolean().describe("Whether the organization has this document attached"),
7999
+ fileName: z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
8000
+ fileUrl: z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
8001
+ });
8002
+ var UserOrgLegalDocumentsSchema = z.object({
8003
+ letterOfAuthorization: UserOrgLegalDocumentSchema,
8004
+ powerOfAttorney: UserOrgLegalDocumentSchema
8005
+ });
8006
+ var UserOrgTrademarkRegistrationSchema = z.object({
8007
+ id: z.number().describe("Trademark registration ID"),
8008
+ brandName: z.string().describe("Trademarked brand name as it appears on the registration"),
8009
+ trademarkOffice: z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
8010
+ registrationNumber: z.string().describe("Registration number assigned by the office"),
8011
+ goodsAndServicesClass: z.string().describe("Nice Classification class(es) the registration covers"),
8012
+ rightsOwnerName: z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
8013
+ registrationPageUrl: z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
8014
+ certificateFileName: z.string().nullable().describe(
8015
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
8016
+ ),
8017
+ certificateFileUrl: z.string().nullable().describe(
8018
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
8019
+ )
8020
+ });
7943
8021
  var UserOrgSchema = z.object({
7944
8022
  id: z.number(),
7945
8023
  name: z.string(),
@@ -7947,6 +8025,9 @@ var UserOrgSchema = z.object({
7947
8025
  avatarUrl: z.string().nullable(),
7948
8026
  contactUrl: z.string().nullable(),
7949
8027
  subscriptionStatus: z.nativeEnum(SubscriptionStatus),
8028
+ portalVisibility: z.nativeEnum(OrganizationPortalVisibility).describe(
8029
+ "Visibility of the org's public security portal (chainpatrol.io/<slug>). `PUBLIC` is discoverable; `PRIVATE` renders only the report form (no metrics or listings); `DISABLED` returns a 404."
8030
+ ),
7950
8031
  services: z.object({
7951
8032
  reporting: singleServiceSchema,
7952
8033
  reviewing: singleServiceSchema,
@@ -7957,7 +8038,13 @@ var UserOrgSchema = z.object({
7957
8038
  }),
7958
8039
  integrations: UserOrgIntegrationsSchema,
7959
8040
  obligatoryAdminApproval: UserOrgObligatoryAdminApprovalSchema,
7960
- pendingServiceApprovals: z.array(PendingServiceApprovalSchema)
8041
+ pendingServiceApprovals: z.array(PendingServiceApprovalSchema),
8042
+ legalDocuments: UserOrgLegalDocumentsSchema.describe(
8043
+ "Org-level Letter of Authorization and Power of Attorney attachments"
8044
+ ),
8045
+ trademarkRegistrations: z.array(UserOrgTrademarkRegistrationSchema).describe(
8046
+ "Org-level trademark registrations attached to the organization. An empty array means no trademarks are on file \u2014 use this to identify customers who still need to add them."
8047
+ )
7961
8048
  });
7962
8049
  z.object({
7963
8050
  organizations: z.array(UserOrgSchema)
@@ -8002,7 +8089,7 @@ z.object({
8002
8089
  "Shortcut for 'every org the caller is authorized to read'. Reuses the same filter logic as `/user/orgs`: org-scoped API keys are rejected (they're pinned to one org \u2014 use the default form); user API keys / Bearer sessions resolve to the user's memberships (or every active org for staff). Combine with `subscriptionStatus` and `services` to narrow (e.g. only paying customers with takedowns enabled). The resolved org set is still capped at " + String(ORGANIZATION_METRICS_MAX_SLUGS) + " and a 413 is returned if exceeded. Mutually exclusive with `organizationSlug`, `slugs`, and `brandSlug`."
8003
8090
  ),
8004
8091
  subscriptionStatus: z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
8005
- "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/TRIAL/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8092
+ "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8006
8093
  ),
8007
8094
  services: organizationMetricsServicesFilterSchema.describe(
8008
8095
  "Only meaningful with `allMyOrgs: true`. Same shape as `/user/orgs`'s `services` filter \u2014 every service accepts `{ active }`, and **only `takedowns` additionally accepts `automated`** (the one service where manual-vs-automated changes real platform behavior). E.g. `{ takedowns: { active: true, automated: false } }` for 'orgs with takedowns enabled but automation off'."
@@ -8171,6 +8258,7 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8171
8258
  AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
8172
8259
  AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
8173
8260
  AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
8261
+ AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
8174
8262
  AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
8175
8263
  AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
8176
8264
  AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
@@ -8272,6 +8360,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8272
8360
  ["mails_api" /* MAILS_API */]: "Mails.so API",
8273
8361
  // Phone Number
8274
8362
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
8363
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
8275
8364
  // DailyMotion
8276
8365
  ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
8277
8366
  // Vimeo
@@ -8363,6 +8452,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8363
8452
  ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
8364
8453
  // Phone Number-related sources
8365
8454
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8455
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8366
8456
  // DailyMotion-related sources
8367
8457
  ["dailymotion_api" /* DAILYMOTION_API */]: [
8368
8458
  "dailymotion_video" /* DAILYMOTION_VIDEO */
@@ -10756,124 +10846,34 @@ function slugify(string, options) {
10756
10846
  return string;
10757
10847
  }
10758
10848
 
10759
- // ../../internal/utils/src/punycode.ts
10760
- var maxInt = 2147483647;
10761
- var base = 36;
10762
- var tMin = 1;
10763
- var tMax = 26;
10764
- var skew = 38;
10765
- var damp = 700;
10766
- var initialBias = 72;
10767
- var initialN = 128;
10768
- var delimiter = "-";
10769
- var regexPunycode = /^xn--/;
10770
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
10771
- var errors = {
10772
- overflow: "Overflow: input needs wider integers to process",
10773
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10774
- "invalid-input": "Invalid input"
10775
- };
10776
- var baseMinusTMin = base - tMin;
10777
- var floor = Math.floor;
10778
- function error(type) {
10779
- throw new RangeError(errors[type]);
10780
- }
10781
- function mapDomain(domain, callback) {
10782
- const parts = domain.split("@");
10783
- let result = "";
10784
- if (parts.length > 1) {
10785
- result = parts[0] + "@";
10786
- domain = parts[1];
10787
- }
10788
- domain = domain.replace(regexSeparators, ".");
10789
- const labels = domain.split(".");
10790
- const encoded = labels.map(callback).join(".");
10791
- return result + encoded;
10792
- }
10793
- function basicToDigit(codePoint) {
10794
- if (codePoint >= 48 && codePoint < 58) {
10795
- return 26 + (codePoint - 48);
10796
- }
10797
- if (codePoint >= 65 && codePoint < 91) {
10798
- return codePoint - 65;
10799
- }
10800
- if (codePoint >= 97 && codePoint < 123) {
10801
- return codePoint - 97;
10802
- }
10803
- return base;
10804
- }
10805
- function adapt(delta, numPoints, firstTime) {
10806
- let k4 = 0;
10807
- delta = firstTime ? floor(delta / damp) : delta >> 1;
10808
- delta += floor(delta / numPoints);
10809
- for (
10810
- ;
10811
- /* no initialization */
10812
- delta > baseMinusTMin * tMax >> 1;
10813
- k4 += base
10814
- ) {
10815
- delta = floor(delta / baseMinusTMin);
10816
- }
10817
- return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
10818
- }
10819
- function decode(input) {
10820
- const output = [];
10821
- const inputLength = input.length;
10822
- let i = 0;
10823
- let n2 = initialN;
10824
- let bias2 = initialBias;
10825
- let basic = input.lastIndexOf(delimiter);
10826
- if (basic < 0) {
10827
- basic = 0;
10828
- }
10829
- for (let j = 0; j < basic; ++j) {
10830
- if (input.charCodeAt(j) >= 128) {
10831
- error("not-basic");
10832
- }
10833
- output.push(input.charCodeAt(j));
10834
- }
10835
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10836
- const oldi = i;
10837
- for (let w = 1, k4 = base; ; k4 += base) {
10838
- if (index >= inputLength) {
10839
- error("invalid-input");
10840
- }
10841
- const digit = basicToDigit(input.charCodeAt(index++));
10842
- if (digit >= base) {
10843
- error("invalid-input");
10844
- }
10845
- if (digit > floor((maxInt - i) / w)) {
10846
- error("overflow");
10847
- }
10848
- i += digit * w;
10849
- const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10850
- if (digit < t) {
10851
- break;
10852
- }
10853
- const baseMinusT = base - t;
10854
- if (w > floor(maxInt / baseMinusT)) {
10855
- error("overflow");
10856
- }
10857
- w *= baseMinusT;
10858
- }
10859
- const out = output.length + 1;
10860
- bias2 = adapt(i - oldi, out, oldi == 0);
10861
- if (floor(i / out) > maxInt - n2) {
10862
- error("overflow");
10863
- }
10864
- n2 += floor(i / out);
10865
- i %= out;
10866
- output.splice(i++, 0, n2);
10867
- }
10868
- return String.fromCodePoint(...output);
10869
- }
10870
- function toUnicode(input) {
10871
- return mapDomain(input, function(string) {
10872
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10873
- });
10874
- }
10875
-
10876
- // ../../internal/utils/src/url.ts
10849
+ // ../asset-parse/src/model.ts
10850
+ var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
10851
+ AssetModel2["Addon"] = "addon";
10852
+ AssetModel2["App"] = "app";
10853
+ AssetModel2["Bot"] = "bot";
10854
+ AssetModel2["BusinessProfile"] = "business-profile";
10855
+ AssetModel2["Catalog"] = "catalog";
10856
+ AssetModel2["Collection"] = "collection";
10857
+ AssetModel2["Channel"] = "channel";
10858
+ AssetModel2["Group"] = "group";
10859
+ AssetModel2["Post"] = "post";
10860
+ AssetModel2["Profile"] = "profile";
10861
+ AssetModel2["Short"] = "short";
10862
+ AssetModel2["Video"] = "video";
10863
+ AssetModel2["Space"] = "space";
10864
+ AssetModel2["Issue"] = "issue";
10865
+ AssetModel2["PullRequest"] = "pull-request";
10866
+ AssetModel2["Discussion"] = "discussion";
10867
+ AssetModel2["Repository"] = "repository";
10868
+ AssetModel2["Article"] = "Article";
10869
+ AssetModel2["Comment"] = "comment";
10870
+ AssetModel2["List"] = "list";
10871
+ AssetModel2["Subreddit"] = "subreddit";
10872
+ AssetModel2["Community"] = "community";
10873
+ AssetModel2["MiniApp"] = "mini-app";
10874
+ AssetModel2["Developer"] = "developer";
10875
+ return AssetModel2;
10876
+ })(AssetModel || {});
10877
10877
  function isUrl(input) {
10878
10878
  if (input.trim() === "") {
10879
10879
  return false;
@@ -10883,21 +10883,6 @@ function isUrl(input) {
10883
10883
  }
10884
10884
  return URL.canParse(input) || URL.canParse(`https://${input}`);
10885
10885
  }
10886
- function isEmail(input) {
10887
- if (input.trim() === "") {
10888
- return false;
10889
- }
10890
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10891
- return emailRegex.test(input);
10892
- }
10893
- function removeHttpProtocol(input) {
10894
- return input.replace(/^https?:\/\//, "");
10895
- }
10896
- function stripDomainWildcardPrefix(domain) {
10897
- const trimmedDomain = domain.trim();
10898
- const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10899
- return strippedDomain.length > 0 ? strippedDomain : null;
10900
- }
10901
10886
  function getNormalizedUrl(input) {
10902
10887
  if (!isUrl(input)) {
10903
10888
  throw new Error(`Invalid URL: ${input}`);
@@ -10921,20 +10906,15 @@ function getNormalizedUrl(input) {
10921
10906
  throw new Error(`Invalid URL: ${input}`);
10922
10907
  }
10923
10908
  }
10924
- function getDefangedUrl(input) {
10925
- if (!isUrl(input)) {
10926
- console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10927
- return input;
10909
+ var ensureHttpsPrefix = (url) => {
10910
+ if (!url.startsWith("http")) {
10911
+ return `https://${url}`;
10928
10912
  }
10929
- return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10930
- }
10931
- function getRefangedUrl(input) {
10932
- return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10933
- }
10913
+ return url.replace(/^https?:\/{1,2}/, "https://");
10914
+ };
10934
10915
  function getHostname(input) {
10935
10916
  try {
10936
- const normalizedUrl = getNormalizedUrl(input);
10937
- return normalizedUrl.hostname;
10917
+ return getNormalizedUrl(input).hostname;
10938
10918
  } catch (e4) {
10939
10919
  return null;
10940
10920
  }
@@ -10971,62 +10951,8 @@ function trimDomainToLevels(domain, options = { levels: 4 }) {
10971
10951
  const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
10972
10952
  return trimmedSubdomains;
10973
10953
  }
10974
- var ensureHttpsPrefix = (url) => {
10975
- if (!url.startsWith("http")) {
10976
- return `https://${url}`;
10977
- }
10978
- return url.replace(/^https?:\/{1,2}/, "https://");
10979
- };
10980
- function containsPunycode(url) {
10981
- return url.indexOf("xn--") !== -1;
10982
- }
10983
- function toUnicode2(url) {
10984
- return toUnicode(url);
10985
- }
10986
- function convertHttpsToHttp(url) {
10987
- if (url.startsWith("https://")) {
10988
- const httpUrl = new URL(url);
10989
- httpUrl.protocol = "http:";
10990
- return httpUrl.toString();
10991
- }
10992
- throw new Error(`URL is not HTTPS: ${url}`);
10993
- }
10994
- function generateCanonicalIPFSUrl(content) {
10995
- if (!content) {
10996
- return content;
10997
- }
10998
- if (content.includes("ipfs.io")) {
10999
- return content;
11000
- }
11001
- if (content.startsWith("Qm") || content.startsWith("bafy")) {
11002
- return `ipfs.io/ipfs/${content}`;
11003
- }
11004
- return content;
11005
- }
11006
- function isWalrusSite(content) {
11007
- return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11008
- }
11009
- function getFaviconUrl(content) {
11010
- const normalizedUrl = getNormalizedUrl(content);
11011
- return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11012
- }
11013
- function sanitizeHttpUrl(value) {
11014
- if (typeof value !== "string" || value.length === 0) {
11015
- return null;
11016
- }
11017
- try {
11018
- const parsed = new URL(value);
11019
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11020
- return null;
11021
- }
11022
- return parsed.toString();
11023
- } catch (e4) {
11024
- return null;
11025
- }
11026
- }
11027
- var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11028
10954
 
11029
- // ../../internal/utils/src/phone.ts
10955
+ // ../asset-parse/src/phone.ts
11030
10956
  var phone_exports = {};
11031
10957
  __export(phone_exports, {
11032
10958
  PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
@@ -11153,7 +11079,199 @@ function normalizePhoneNumber(phone) {
11153
11079
  return hasPlus ? `+${digitsOnly}` : digitsOnly;
11154
11080
  }
11155
11081
 
11156
- // ../../internal/utils/src/email.ts
11082
+ // ../../internal/utils/src/punycode.ts
11083
+ var maxInt = 2147483647;
11084
+ var base = 36;
11085
+ var tMin = 1;
11086
+ var tMax = 26;
11087
+ var skew = 38;
11088
+ var damp = 700;
11089
+ var initialBias = 72;
11090
+ var initialN = 128;
11091
+ var delimiter = "-";
11092
+ var regexPunycode = /^xn--/;
11093
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
11094
+ var errors = {
11095
+ overflow: "Overflow: input needs wider integers to process",
11096
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
11097
+ "invalid-input": "Invalid input"
11098
+ };
11099
+ var baseMinusTMin = base - tMin;
11100
+ var floor = Math.floor;
11101
+ function error(type) {
11102
+ throw new RangeError(errors[type]);
11103
+ }
11104
+ function mapDomain(domain, callback) {
11105
+ const parts = domain.split("@");
11106
+ let result = "";
11107
+ if (parts.length > 1) {
11108
+ result = parts[0] + "@";
11109
+ domain = parts[1];
11110
+ }
11111
+ domain = domain.replace(regexSeparators, ".");
11112
+ const labels = domain.split(".");
11113
+ const encoded = labels.map(callback).join(".");
11114
+ return result + encoded;
11115
+ }
11116
+ function basicToDigit(codePoint) {
11117
+ if (codePoint >= 48 && codePoint < 58) {
11118
+ return 26 + (codePoint - 48);
11119
+ }
11120
+ if (codePoint >= 65 && codePoint < 91) {
11121
+ return codePoint - 65;
11122
+ }
11123
+ if (codePoint >= 97 && codePoint < 123) {
11124
+ return codePoint - 97;
11125
+ }
11126
+ return base;
11127
+ }
11128
+ function adapt(delta, numPoints, firstTime) {
11129
+ let k4 = 0;
11130
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
11131
+ delta += floor(delta / numPoints);
11132
+ for (
11133
+ ;
11134
+ /* no initialization */
11135
+ delta > baseMinusTMin * tMax >> 1;
11136
+ k4 += base
11137
+ ) {
11138
+ delta = floor(delta / baseMinusTMin);
11139
+ }
11140
+ return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
11141
+ }
11142
+ function decode(input) {
11143
+ const output = [];
11144
+ const inputLength = input.length;
11145
+ let i = 0;
11146
+ let n2 = initialN;
11147
+ let bias2 = initialBias;
11148
+ let basic = input.lastIndexOf(delimiter);
11149
+ if (basic < 0) {
11150
+ basic = 0;
11151
+ }
11152
+ for (let j = 0; j < basic; ++j) {
11153
+ if (input.charCodeAt(j) >= 128) {
11154
+ error("not-basic");
11155
+ }
11156
+ output.push(input.charCodeAt(j));
11157
+ }
11158
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
11159
+ const oldi = i;
11160
+ for (let w = 1, k4 = base; ; k4 += base) {
11161
+ if (index >= inputLength) {
11162
+ error("invalid-input");
11163
+ }
11164
+ const digit = basicToDigit(input.charCodeAt(index++));
11165
+ if (digit >= base) {
11166
+ error("invalid-input");
11167
+ }
11168
+ if (digit > floor((maxInt - i) / w)) {
11169
+ error("overflow");
11170
+ }
11171
+ i += digit * w;
11172
+ const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
11173
+ if (digit < t) {
11174
+ break;
11175
+ }
11176
+ const baseMinusT = base - t;
11177
+ if (w > floor(maxInt / baseMinusT)) {
11178
+ error("overflow");
11179
+ }
11180
+ w *= baseMinusT;
11181
+ }
11182
+ const out = output.length + 1;
11183
+ bias2 = adapt(i - oldi, out, oldi == 0);
11184
+ if (floor(i / out) > maxInt - n2) {
11185
+ error("overflow");
11186
+ }
11187
+ n2 += floor(i / out);
11188
+ i %= out;
11189
+ output.splice(i++, 0, n2);
11190
+ }
11191
+ return String.fromCodePoint(...output);
11192
+ }
11193
+ function toUnicode(input) {
11194
+ return mapDomain(input, function(string) {
11195
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
11196
+ });
11197
+ }
11198
+
11199
+ // ../../internal/utils/src/url.ts
11200
+ function isEmail(input) {
11201
+ if (input.trim() === "") {
11202
+ return false;
11203
+ }
11204
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
11205
+ return emailRegex.test(input);
11206
+ }
11207
+ function removeHttpProtocol(input) {
11208
+ return input.replace(/^https?:\/\//, "");
11209
+ }
11210
+ function stripDomainWildcardPrefix(domain) {
11211
+ const trimmedDomain = domain.trim();
11212
+ const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
11213
+ return strippedDomain.length > 0 ? strippedDomain : null;
11214
+ }
11215
+ function getDefangedUrl(input) {
11216
+ if (!isUrl(input)) {
11217
+ console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
11218
+ return input;
11219
+ }
11220
+ return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
11221
+ }
11222
+ function getRefangedUrl(input) {
11223
+ return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
11224
+ }
11225
+ function containsPunycode(url) {
11226
+ return url.indexOf("xn--") !== -1;
11227
+ }
11228
+ function toUnicode2(url) {
11229
+ return toUnicode(url);
11230
+ }
11231
+ function convertHttpsToHttp(url) {
11232
+ if (url.startsWith("https://")) {
11233
+ const httpUrl = new URL(url);
11234
+ httpUrl.protocol = "http:";
11235
+ return httpUrl.toString();
11236
+ }
11237
+ throw new Error(`URL is not HTTPS: ${url}`);
11238
+ }
11239
+ function generateCanonicalIPFSUrl(content) {
11240
+ if (!content) {
11241
+ return content;
11242
+ }
11243
+ if (content.includes("ipfs.io")) {
11244
+ return content;
11245
+ }
11246
+ if (content.startsWith("Qm") || content.startsWith("bafy")) {
11247
+ return `ipfs.io/ipfs/${content}`;
11248
+ }
11249
+ return content;
11250
+ }
11251
+ function isWalrusSite(content) {
11252
+ return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11253
+ }
11254
+ function getFaviconUrl(content) {
11255
+ const normalizedUrl = getNormalizedUrl(content);
11256
+ return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11257
+ }
11258
+ function sanitizeHttpUrl(value) {
11259
+ if (typeof value !== "string" || value.length === 0) {
11260
+ return null;
11261
+ }
11262
+ try {
11263
+ const parsed = new URL(value);
11264
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11265
+ return null;
11266
+ }
11267
+ return parsed.toString();
11268
+ } catch (e4) {
11269
+ return null;
11270
+ }
11271
+ }
11272
+ var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11273
+
11274
+ // ../../internal/utils/src/email.ts
11157
11275
  var email_exports = {};
11158
11276
  __export(email_exports, {
11159
11277
  extractTextFromGmailPayload: () => extractTextFromGmailPayload,
@@ -11399,816 +11517,6 @@ function countPatternMatches(content, pattern, maxMatches = DEFAULT_MAX_MATCHES)
11399
11517
  return count;
11400
11518
  }
11401
11519
 
11402
- // ../../internal/utils/src/itunes-api.ts
11403
- var itunes_api_exports = {};
11404
- __export(itunes_api_exports, {
11405
- APP_STORE_COUNTRIES: () => APP_STORE_COUNTRIES,
11406
- fetchItunesAppData: () => fetchItunesAppData,
11407
- fetchItunesSearchResults: () => fetchItunesSearchResults,
11408
- getAllAppStoreCountryCodes: () => getAllAppStoreCountryCodes,
11409
- getAppStoreCountryName: () => getAppStoreCountryName,
11410
- isValidAppStoreCountryCode: () => isValidAppStoreCountryCode,
11411
- selectBestArtworkUrl: () => selectBestArtworkUrl
11412
- });
11413
- var APP_STORE_COUNTRIES = [
11414
- { code: "al", name: "Albania" },
11415
- { code: "dz", name: "Algeria" },
11416
- { code: "ao", name: "Angola" },
11417
- { code: "ai", name: "Anguilla" },
11418
- { code: "ag", name: "Antigua and Barbuda" },
11419
- { code: "ar", name: "Argentina" },
11420
- { code: "am", name: "Armenia" },
11421
- { code: "au", name: "Australia" },
11422
- { code: "at", name: "Austria" },
11423
- { code: "az", name: "Azerbaijan" },
11424
- { code: "bs", name: "Bahamas" },
11425
- { code: "bh", name: "Bahrain" },
11426
- { code: "bb", name: "Barbados" },
11427
- { code: "by", name: "Belarus" },
11428
- { code: "be", name: "Belgium" },
11429
- { code: "bz", name: "Belize" },
11430
- { code: "bj", name: "Benin" },
11431
- { code: "bm", name: "Bermuda" },
11432
- { code: "bt", name: "Bhutan" },
11433
- { code: "bo", name: "Bolivia" },
11434
- { code: "bw", name: "Botswana" },
11435
- { code: "br", name: "Brazil" },
11436
- { code: "vg", name: "British Virgin Islands" },
11437
- { code: "bn", name: "Brunei" },
11438
- { code: "bg", name: "Bulgaria" },
11439
- { code: "bf", name: "Burkina Faso" },
11440
- { code: "kh", name: "Cambodia" },
11441
- { code: "ca", name: "Canada" },
11442
- { code: "cv", name: "Cape Verde" },
11443
- { code: "ky", name: "Cayman Islands" },
11444
- { code: "cl", name: "Chile" },
11445
- { code: "td", name: "Chad" },
11446
- { code: "cn", name: "China" },
11447
- { code: "co", name: "Colombia" },
11448
- { code: "cd", name: "Congo" },
11449
- { code: "cr", name: "Costa Rica" },
11450
- { code: "hr", name: "Croatia" },
11451
- { code: "cy", name: "Cyprus" },
11452
- { code: "cz", name: "Czechia" },
11453
- { code: "dk", name: "Denmark" },
11454
- { code: "dm", name: "Dominica" },
11455
- { code: "do", name: "Dominican Republic" },
11456
- { code: "ec", name: "Ecuador" },
11457
- { code: "eg", name: "Egypt" },
11458
- { code: "sv", name: "El Salvador" },
11459
- { code: "ee", name: "Estonia" },
11460
- { code: "fj", name: "Fiji" },
11461
- { code: "fi", name: "Finland" },
11462
- { code: "fr", name: "France" },
11463
- { code: "de", name: "Germany" },
11464
- { code: "gm", name: "Gambia" },
11465
- { code: "gb", name: "United Kingdom" },
11466
- { code: "gh", name: "Ghana" },
11467
- { code: "gr", name: "Greece" },
11468
- { code: "gd", name: "Grenada" },
11469
- { code: "gt", name: "Guatemala" },
11470
- { code: "gw", name: "Guinea-bissau" },
11471
- { code: "gy", name: "Guyana" },
11472
- { code: "hn", name: "Honduras" },
11473
- { code: "hk", name: "Hong Kong" },
11474
- { code: "hu", name: "Hungary" },
11475
- { code: "is", name: "Iceland" },
11476
- { code: "in", name: "India" },
11477
- { code: "id", name: "Indonesia" },
11478
- { code: "ie", name: "Ireland" },
11479
- { code: "il", name: "Israel" },
11480
- { code: "it", name: "Italy" },
11481
- { code: "jm", name: "Jamaica" },
11482
- { code: "jp", name: "Japan" },
11483
- { code: "jo", name: "Jordan" },
11484
- { code: "kz", name: "Kazakhstan" },
11485
- { code: "ke", name: "Kenya" },
11486
- { code: "kw", name: "Kuwait" },
11487
- { code: "kg", name: "Kyrgyzstan" },
11488
- { code: "la", name: "Lao Peoples Democratic Republic" },
11489
- { code: "lv", name: "Latvia" },
11490
- { code: "lb", name: "Lebanon" },
11491
- { code: "li", name: "Liberia" },
11492
- { code: "lt", name: "Lithuania" },
11493
- { code: "lu", name: "Luxembourg" },
11494
- { code: "mo", name: "Macao" },
11495
- { code: "mk", name: "North Macedonia" },
11496
- { code: "mg", name: "Madagascar" },
11497
- { code: "mw", name: "Malawi" },
11498
- { code: "my", name: "Malaysia" },
11499
- { code: "ml", name: "Mali" },
11500
- { code: "mt", name: "Malta" },
11501
- { code: "mr", name: "Mauritania" },
11502
- { code: "mu", name: "Mauritius" },
11503
- { code: "mx", name: "Mexico" },
11504
- { code: "fm", name: "Micronesia" },
11505
- { code: "md", name: "Moldova" },
11506
- { code: "mn", name: "Mongolia" },
11507
- { code: "ms", name: "Montserrat" },
11508
- { code: "mz", name: "Mozambique" },
11509
- { code: "na", name: "Namibia" },
11510
- { code: "np", name: "Nepal" },
11511
- { code: "nl", name: "Netherlands" },
11512
- { code: "nz", name: "New Zealand" },
11513
- { code: "ni", name: "Nicaragua" },
11514
- { code: "ne", name: "Niger" },
11515
- { code: "ng", name: "Nigeria" },
11516
- { code: "no", name: "Norway" },
11517
- { code: "om", name: "Oman" },
11518
- { code: "pk", name: "Pakistan" },
11519
- { code: "pw", name: "Palau" },
11520
- { code: "pa", name: "Panama" },
11521
- { code: "pg", name: "Papua New Guinea" },
11522
- { code: "py", name: "Paraguay" },
11523
- { code: "pe", name: "Peru" },
11524
- { code: "ph", name: "Philippines" },
11525
- { code: "pl", name: "Poland" },
11526
- { code: "pt", name: "Portugal" },
11527
- { code: "qa", name: "Qatar" },
11528
- { code: "ro", name: "Romania" },
11529
- { code: "ru", name: "Russia" },
11530
- { code: "st", name: "Sao Tome & Principe" },
11531
- { code: "sa", name: "Saudi Arabia" },
11532
- { code: "sn", name: "Senegal" },
11533
- { code: "sc", name: "Seychelles" },
11534
- { code: "sl", name: "Sierra Leone" },
11535
- { code: "sg", name: "Singapore" },
11536
- { code: "sk", name: "Slovakia" },
11537
- { code: "si", name: "Slovenia" },
11538
- { code: "sb", name: "Solomon Islands" },
11539
- { code: "za", name: "South Africa" },
11540
- { code: "kr", name: "South Korea" },
11541
- { code: "es", name: "Spain" },
11542
- { code: "lk", name: "Sri Lanka" },
11543
- { code: "kn", name: "St. Kitts and Nevis" },
11544
- { code: "lc", name: "St. Lucia" },
11545
- { code: "vc", name: "St. Vincent & The Grenadines" },
11546
- { code: "sr", name: "Suriname" },
11547
- { code: "sz", name: "Swaziland" },
11548
- { code: "se", name: "Sweden" },
11549
- { code: "ch", name: "Switzerland" },
11550
- { code: "tw", name: "Taiwan" },
11551
- { code: "tj", name: "Tajikistan" },
11552
- { code: "tz", name: "Tanzania" },
11553
- { code: "th", name: "Thailand" },
11554
- { code: "tt", name: "Trinidad and Tobago" },
11555
- { code: "tn", name: "Tunisia" },
11556
- { code: "tr", name: "Turkey" },
11557
- { code: "tm", name: "Turkmenistan" },
11558
- { code: "tc", name: "Turks and Caicos" },
11559
- { code: "ug", name: "Uganda" },
11560
- { code: "ua", name: "Ukraine" },
11561
- { code: "ae", name: "United Arab Emirates" },
11562
- { code: "us", name: "United States" },
11563
- { code: "uy", name: "Uruguay" },
11564
- { code: "uz", name: "Uzbekistan" },
11565
- { code: "ve", name: "Venezuela" },
11566
- { code: "vn", name: "Vietnam" },
11567
- { code: "ye", name: "Yemen" },
11568
- { code: "zw", name: "Zimbabwe" }
11569
- ];
11570
- var APP_STORE_COUNTRY_MAP = new Map(
11571
- APP_STORE_COUNTRIES.map((country) => [country.code, country.name])
11572
- );
11573
- var APP_STORE_CODES_SET = new Set(APP_STORE_COUNTRIES.map((country) => country.code));
11574
- var APP_STORE_CODES_ARRAY = Array.from(APP_STORE_CODES_SET).sort();
11575
- function getAppStoreCountryName(code) {
11576
- return APP_STORE_COUNTRY_MAP.get(code);
11577
- }
11578
- function getAllAppStoreCountryCodes() {
11579
- return APP_STORE_CODES_ARRAY;
11580
- }
11581
- function isValidAppStoreCountryCode(code) {
11582
- return APP_STORE_CODES_SET.has(code);
11583
- }
11584
- function selectBestArtworkUrl(appData) {
11585
- return appData.artworkUrl512 || appData.artworkUrl100 || appData.artworkUrl60;
11586
- }
11587
- function fetchItunesSearchResults(term, country = "us", limit = 10) {
11588
- return __async(this, null, function* () {
11589
- const params = new URLSearchParams({
11590
- media: "software",
11591
- term,
11592
- country,
11593
- lang: "en_us",
11594
- entity: "software",
11595
- explicit: "yes",
11596
- limit: String(limit)
11597
- });
11598
- const response = yield fetch(`https://itunes.apple.com/search?${params.toString()}`, {
11599
- headers: { "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)" }
11600
- });
11601
- if (!response.ok) {
11602
- throw new Error(`iTunes API returned ${response.status} ${response.statusText}`);
11603
- }
11604
- const data = yield response.json();
11605
- return data.results.map((r) => ({
11606
- trackId: r.trackId,
11607
- trackName: r.trackName,
11608
- trackViewUrl: r.trackViewUrl,
11609
- releaseDate: r.releaseDate,
11610
- artistName: r.artistName,
11611
- bundleId: r.bundleId
11612
- }));
11613
- });
11614
- }
11615
- function fetchItunesAppData(appId, country = "us") {
11616
- return __async(this, null, function* () {
11617
- try {
11618
- const apiUrl = `https://itunes.apple.com/lookup?id=${appId}&country=${country}&entity=software`;
11619
- const response = yield fetch(apiUrl, {
11620
- headers: {
11621
- "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)"
11622
- }
11623
- });
11624
- if (!response.ok) {
11625
- throw new Error(
11626
- `iTunes API request failed: ${response.status} ${response.statusText}`
11627
- );
11628
- }
11629
- const data = yield response.json();
11630
- if (data.resultCount > 0 && data.results.length > 0) {
11631
- return data.results[0];
11632
- }
11633
- return null;
11634
- } catch (error2) {
11635
- console.error("Error fetching iTunes app data", { error: error2 });
11636
- return null;
11637
- }
11638
- });
11639
- }
11640
-
11641
- // ../../internal/utils/src/google-play-api.ts
11642
- var GOOGLE_PLAY_COUNTRIES = [
11643
- { code: "af", name: "Afghanistan" },
11644
- { code: "al", name: "Albania" },
11645
- { code: "dz", name: "Algeria" },
11646
- { code: "as", name: "American Samoa" },
11647
- { code: "ad", name: "Andorra" },
11648
- { code: "ao", name: "Angola" },
11649
- { code: "ai", name: "Anguilla" },
11650
- { code: "aq", name: "Antarctica" },
11651
- { code: "ag", name: "Antigua and Barbuda" },
11652
- { code: "ar", name: "Argentina" },
11653
- { code: "am", name: "Armenia" },
11654
- { code: "aw", name: "Aruba" },
11655
- { code: "au", name: "Australia" },
11656
- { code: "at", name: "Austria" },
11657
- { code: "az", name: "Azerbaijan" },
11658
- { code: "bs", name: "Bahamas" },
11659
- { code: "bh", name: "Bahrain" },
11660
- { code: "bd", name: "Bangladesh" },
11661
- { code: "bb", name: "Barbados" },
11662
- { code: "by", name: "Belarus" },
11663
- { code: "be", name: "Belgium" },
11664
- { code: "bz", name: "Belize" },
11665
- { code: "bj", name: "Benin" },
11666
- { code: "bm", name: "Bermuda" },
11667
- { code: "bt", name: "Bhutan" },
11668
- { code: "bo", name: "Bolivia" },
11669
- { code: "ba", name: "Bosnia and Herzegovina" },
11670
- { code: "bw", name: "Botswana" },
11671
- { code: "bv", name: "Bouvet Island" },
11672
- { code: "br", name: "Brazil" },
11673
- { code: "io", name: "British Indian Ocean Territory" },
11674
- { code: "bn", name: "Brunei Darussalam" },
11675
- { code: "bg", name: "Bulgaria" },
11676
- { code: "bf", name: "Burkina Faso" },
11677
- { code: "bi", name: "Burundi" },
11678
- { code: "kh", name: "Cambodia" },
11679
- { code: "cm", name: "Cameroon" },
11680
- { code: "ca", name: "Canada" },
11681
- { code: "cv", name: "Cape Verde" },
11682
- { code: "ky", name: "Cayman Islands" },
11683
- { code: "cf", name: "Central African Republic" },
11684
- { code: "td", name: "Chad" },
11685
- { code: "cl", name: "Chile" },
11686
- { code: "cn", name: "China" },
11687
- { code: "cx", name: "Christmas Island" },
11688
- { code: "cc", name: "Cocos (Keeling) Islands" },
11689
- { code: "co", name: "Colombia" },
11690
- { code: "km", name: "Comoros" },
11691
- { code: "cg", name: "Congo" },
11692
- { code: "cd", name: "Congo, the Democratic Republic of the" },
11693
- { code: "ck", name: "Cook Islands" },
11694
- { code: "cr", name: "Costa Rica" },
11695
- { code: "ci", name: "Cote D'ivoire" },
11696
- { code: "hr", name: "Croatia" },
11697
- { code: "cu", name: "Cuba" },
11698
- { code: "cy", name: "Cyprus" },
11699
- { code: "cz", name: "Czech Republic" },
11700
- { code: "dk", name: "Denmark" },
11701
- { code: "dj", name: "Djibouti" },
11702
- { code: "dm", name: "Dominica" },
11703
- { code: "do", name: "Dominican Republic" },
11704
- { code: "ec", name: "Ecuador" },
11705
- { code: "eg", name: "Egypt" },
11706
- { code: "sv", name: "El Salvador" },
11707
- { code: "gq", name: "Equatorial Guinea" },
11708
- { code: "er", name: "Eritrea" },
11709
- { code: "ee", name: "Estonia" },
11710
- { code: "et", name: "Ethiopia" },
11711
- { code: "fk", name: "Falkland Islands (Malvinas)" },
11712
- { code: "fo", name: "Faroe Islands" },
11713
- { code: "fj", name: "Fiji" },
11714
- { code: "fi", name: "Finland" },
11715
- { code: "fr", name: "France" },
11716
- { code: "gf", name: "French Guiana" },
11717
- { code: "pf", name: "French Polynesia" },
11718
- { code: "tf", name: "French Southern Territories" },
11719
- { code: "ga", name: "Gabon" },
11720
- { code: "gm", name: "Gambia" },
11721
- { code: "ge", name: "Georgia" },
11722
- { code: "de", name: "Germany" },
11723
- { code: "gh", name: "Ghana" },
11724
- { code: "gi", name: "Gibraltar" },
11725
- { code: "gr", name: "Greece" },
11726
- { code: "gl", name: "Greenland" },
11727
- { code: "gd", name: "Grenada" },
11728
- { code: "gp", name: "Guadeloupe" },
11729
- { code: "gu", name: "Guam" },
11730
- { code: "gt", name: "Guatemala" },
11731
- { code: "gg", name: "Guernsey" },
11732
- { code: "gn", name: "Guinea" },
11733
- { code: "gw", name: "Guinea-Bissau" },
11734
- { code: "gy", name: "Guyana" },
11735
- { code: "ht", name: "Haiti" },
11736
- { code: "hm", name: "Heard Island and Mcdonald Islands" },
11737
- { code: "va", name: "Holy See (Vatican City State)" },
11738
- { code: "hn", name: "Honduras" },
11739
- { code: "hk", name: "Hong Kong" },
11740
- { code: "hu", name: "Hungary" },
11741
- { code: "is", name: "Iceland" },
11742
- { code: "in", name: "India" },
11743
- { code: "id", name: "Indonesia" },
11744
- { code: "ir", name: "Iran, Islamic Republic of" },
11745
- { code: "iq", name: "Iraq" },
11746
- { code: "ie", name: "Ireland" },
11747
- { code: "im", name: "Isle of Man" },
11748
- { code: "il", name: "Israel" },
11749
- { code: "it", name: "Italy" },
11750
- { code: "je", name: "Jersey" },
11751
- { code: "jm", name: "Jamaica" },
11752
- { code: "jp", name: "Japan" },
11753
- { code: "jo", name: "Jordan" },
11754
- { code: "kz", name: "Kazakhstan" },
11755
- { code: "ke", name: "Kenya" },
11756
- { code: "ki", name: "Kiribati" },
11757
- { code: "kp", name: "Korea, Democratic People's Republic of" },
11758
- { code: "kr", name: "Korea, Republic of" },
11759
- { code: "kw", name: "Kuwait" },
11760
- { code: "kg", name: "Kyrgyzstan" },
11761
- { code: "la", name: "Lao People's Democratic Republic" },
11762
- { code: "lv", name: "Latvia" },
11763
- { code: "lb", name: "Lebanon" },
11764
- { code: "ls", name: "Lesotho" },
11765
- { code: "lr", name: "Liberia" },
11766
- { code: "ly", name: "Libyan Arab Jamahiriya" },
11767
- { code: "li", name: "Liechtenstein" },
11768
- { code: "lt", name: "Lithuania" },
11769
- { code: "lu", name: "Luxembourg" },
11770
- { code: "mo", name: "Macao" },
11771
- { code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
11772
- { code: "mg", name: "Madagascar" },
11773
- { code: "mw", name: "Malawi" },
11774
- { code: "my", name: "Malaysia" },
11775
- { code: "mv", name: "Maldives" },
11776
- { code: "ml", name: "Mali" },
11777
- { code: "mt", name: "Malta" },
11778
- { code: "mh", name: "Marshall Islands" },
11779
- { code: "mq", name: "Martinique" },
11780
- { code: "mr", name: "Mauritania" },
11781
- { code: "mu", name: "Mauritius" },
11782
- { code: "yt", name: "Mayotte" },
11783
- { code: "mx", name: "Mexico" },
11784
- { code: "fm", name: "Micronesia, Federated States of" },
11785
- { code: "md", name: "Moldova, Republic of" },
11786
- { code: "mc", name: "Monaco" },
11787
- { code: "mn", name: "Mongolia" },
11788
- { code: "me", name: "Montenegro" },
11789
- { code: "ms", name: "Montserrat" },
11790
- { code: "ma", name: "Morocco" },
11791
- { code: "mz", name: "Mozambique" },
11792
- { code: "mm", name: "Myanmar" },
11793
- { code: "na", name: "Namibia" },
11794
- { code: "nr", name: "Nauru" },
11795
- { code: "np", name: "Nepal" },
11796
- { code: "nl", name: "Netherlands" },
11797
- { code: "an", name: "Netherlands Antilles" },
11798
- { code: "nc", name: "New Caledonia" },
11799
- { code: "nz", name: "New Zealand" },
11800
- { code: "ni", name: "Nicaragua" },
11801
- { code: "ne", name: "Niger" },
11802
- { code: "ng", name: "Nigeria" },
11803
- { code: "nu", name: "Niue" },
11804
- { code: "nf", name: "Norfolk Island" },
11805
- { code: "mp", name: "Northern Mariana Islands" },
11806
- { code: "no", name: "Norway" },
11807
- { code: "om", name: "Oman" },
11808
- { code: "pk", name: "Pakistan" },
11809
- { code: "pw", name: "Palau" },
11810
- { code: "ps", name: "Palestinian Territory, Occupied" },
11811
- { code: "pa", name: "Panama" },
11812
- { code: "pg", name: "Papua New Guinea" },
11813
- { code: "py", name: "Paraguay" },
11814
- { code: "pe", name: "Peru" },
11815
- { code: "ph", name: "Philippines" },
11816
- { code: "pn", name: "Pitcairn" },
11817
- { code: "pl", name: "Poland" },
11818
- { code: "pt", name: "Portugal" },
11819
- { code: "pr", name: "Puerto Rico" },
11820
- { code: "qa", name: "Qatar" },
11821
- { code: "re", name: "Reunion" },
11822
- { code: "ro", name: "Romania" },
11823
- { code: "ru", name: "Russian Federation" },
11824
- { code: "rw", name: "Rwanda" },
11825
- { code: "sh", name: "Saint Helena" },
11826
- { code: "kn", name: "Saint Kitts and Nevis" },
11827
- { code: "lc", name: "Saint Lucia" },
11828
- { code: "pm", name: "Saint Pierre and Miquelon" },
11829
- { code: "vc", name: "Saint Vincent and the Grenadines" },
11830
- { code: "ws", name: "Samoa" },
11831
- { code: "sm", name: "San Marino" },
11832
- { code: "st", name: "Sao Tome and Principe" },
11833
- { code: "sa", name: "Saudi Arabia" },
11834
- { code: "sn", name: "Senegal" },
11835
- { code: "rs", name: "Serbia" },
11836
- { code: "sc", name: "Seychelles" },
11837
- { code: "sl", name: "Sierra Leone" },
11838
- { code: "sg", name: "Singapore" },
11839
- { code: "sk", name: "Slovakia" },
11840
- { code: "si", name: "Slovenia" },
11841
- { code: "sb", name: "Solomon Islands" },
11842
- { code: "so", name: "Somalia" },
11843
- { code: "za", name: "South Africa" },
11844
- { code: "gs", name: "South Georgia and the South Sandwich Islands" },
11845
- { code: "es", name: "Spain" },
11846
- { code: "lk", name: "Sri Lanka" },
11847
- { code: "sd", name: "Sudan" },
11848
- { code: "sr", name: "Suriname" },
11849
- { code: "sj", name: "Svalbard and Jan Mayen" },
11850
- { code: "sz", name: "Swaziland" },
11851
- { code: "se", name: "Sweden" },
11852
- { code: "ch", name: "Switzerland" },
11853
- { code: "sy", name: "Syrian Arab Republic" },
11854
- { code: "tw", name: "Taiwan, Province of China" },
11855
- { code: "tj", name: "Tajikistan" },
11856
- { code: "tz", name: "Tanzania, United Republic of" },
11857
- { code: "th", name: "Thailand" },
11858
- { code: "tl", name: "Timor-Leste" },
11859
- { code: "tg", name: "Togo" },
11860
- { code: "tk", name: "Tokelau" },
11861
- { code: "to", name: "Tonga" },
11862
- { code: "tt", name: "Trinidad and Tobago" },
11863
- { code: "tn", name: "Tunisia" },
11864
- { code: "tr", name: "Turkiye" },
11865
- { code: "tm", name: "Turkmenistan" },
11866
- { code: "tc", name: "Turks and Caicos Islands" },
11867
- { code: "tv", name: "Tuvalu" },
11868
- { code: "ug", name: "Uganda" },
11869
- { code: "ua", name: "Ukraine" },
11870
- { code: "ae", name: "United Arab Emirates" },
11871
- { code: "uk", name: "United Kingdom" },
11872
- { code: "gb", name: "United Kingdom" },
11873
- { code: "us", name: "United States" },
11874
- { code: "um", name: "United States Minor Outlying Islands" },
11875
- { code: "uy", name: "Uruguay" },
11876
- { code: "uz", name: "Uzbekistan" },
11877
- { code: "vu", name: "Vanuatu" },
11878
- { code: "ve", name: "Venezuela" },
11879
- { code: "vn", name: "Viet Nam" },
11880
- { code: "vg", name: "Virgin Islands, British" },
11881
- { code: "vi", name: "Virgin Islands, U.S." },
11882
- { code: "wf", name: "Wallis and Futuna" },
11883
- { code: "eh", name: "Western Sahara" },
11884
- { code: "ye", name: "Yemen" },
11885
- { code: "zm", name: "Zambia" },
11886
- { code: "zw", name: "Zimbabwe" }
11887
- ];
11888
- var GOOGLE_PLAY_COUNTRY_MAP = new Map(
11889
- GOOGLE_PLAY_COUNTRIES.map((country) => [country.code, country.name])
11890
- );
11891
- var GOOGLE_PLAY_CODES_SET = new Set(
11892
- GOOGLE_PLAY_COUNTRIES.map((country) => country.code)
11893
- );
11894
- Array.from(GOOGLE_PLAY_CODES_SET).sort();
11895
- function getGooglePlayCountryName(code) {
11896
- return GOOGLE_PLAY_COUNTRY_MAP.get(code);
11897
- }
11898
-
11899
- // ../../internal/utils/src/country-codes.ts
11900
- var country_codes_exports = {};
11901
- __export(country_codes_exports, {
11902
- APPLE_ONLY_COUNTRY_CODES: () => APPLE_ONLY_COUNTRY_CODES,
11903
- COUNTRY_NAMES: () => COUNTRY_NAMES,
11904
- GOOGLE_ONLY_COUNTRY_CODES: () => GOOGLE_ONLY_COUNTRY_CODES,
11905
- SHARED_COUNTRY_CODES: () => SHARED_COUNTRY_CODES,
11906
- countryCodeToFlag: () => countryCodeToFlag,
11907
- getAllCountryCodes: () => getAllCountryCodes,
11908
- getCountryName: () => getCountryName,
11909
- isValidAppleCountryCode: () => isValidAppleCountryCode,
11910
- isValidGoogleCountryCode: () => isValidGoogleCountryCode
11911
- });
11912
- function createCountryLists() {
11913
- const appleCodesSet = new Set(APP_STORE_COUNTRIES.map((c2) => c2.code));
11914
- const googleCodesSet = new Set(GOOGLE_PLAY_COUNTRIES.map((c2) => c2.code));
11915
- const shared2 = [];
11916
- const appleOnly2 = [];
11917
- const googleOnly2 = [];
11918
- appleCodesSet.forEach((code) => {
11919
- if (googleCodesSet.has(code)) {
11920
- shared2.push(code);
11921
- } else {
11922
- appleOnly2.push(code);
11923
- }
11924
- });
11925
- googleCodesSet.forEach((code) => {
11926
- if (!appleCodesSet.has(code)) {
11927
- googleOnly2.push(code);
11928
- }
11929
- });
11930
- return {
11931
- shared: shared2.sort(),
11932
- appleOnly: appleOnly2.sort(),
11933
- googleOnly: googleOnly2.sort()
11934
- };
11935
- }
11936
- var { shared, appleOnly, googleOnly } = createCountryLists();
11937
- var SHARED_COUNTRY_CODES = shared;
11938
- var APPLE_ONLY_COUNTRY_CODES = appleOnly;
11939
- var GOOGLE_ONLY_COUNTRY_CODES = googleOnly;
11940
- function isValidGoogleCountryCode(code) {
11941
- return SHARED_COUNTRY_CODES.includes(code) || GOOGLE_ONLY_COUNTRY_CODES.includes(code);
11942
- }
11943
- function isValidAppleCountryCode(code) {
11944
- return SHARED_COUNTRY_CODES.includes(code) || APPLE_ONLY_COUNTRY_CODES.includes(code);
11945
- }
11946
- function getCountryName(code) {
11947
- return getAppStoreCountryName(code) || getGooglePlayCountryName(code);
11948
- }
11949
- function getAllCountryCodes(platform) {
11950
- if (platform === "apple") {
11951
- return [...SHARED_COUNTRY_CODES, ...APPLE_ONLY_COUNTRY_CODES].sort();
11952
- } else {
11953
- return [...SHARED_COUNTRY_CODES, ...GOOGLE_ONLY_COUNTRY_CODES].sort();
11954
- }
11955
- }
11956
- var COUNTRY_NAMES = {
11957
- AD: "Andorra",
11958
- AE: "United Arab Emirates",
11959
- AF: "Afghanistan",
11960
- AG: "Antigua and Barbuda",
11961
- AI: "Anguilla",
11962
- AL: "Albania",
11963
- AM: "Armenia",
11964
- AO: "Angola",
11965
- AQ: "Antarctica",
11966
- AR: "Argentina",
11967
- AS: "American Samoa",
11968
- AT: "Austria",
11969
- AU: "Australia",
11970
- AW: "Aruba",
11971
- AX: "\xC5land Islands",
11972
- AZ: "Azerbaijan",
11973
- BA: "Bosnia and Herzegovina",
11974
- BB: "Barbados",
11975
- BD: "Bangladesh",
11976
- BE: "Belgium",
11977
- BF: "Burkina Faso",
11978
- BG: "Bulgaria",
11979
- BH: "Bahrain",
11980
- BI: "Burundi",
11981
- BJ: "Benin",
11982
- BL: "Saint Barth\xE9lemy",
11983
- BM: "Bermuda",
11984
- BN: "Brunei",
11985
- BO: "Bolivia",
11986
- BQ: "Caribbean Netherlands",
11987
- BR: "Brazil",
11988
- BS: "Bahamas",
11989
- BT: "Bhutan",
11990
- BV: "Bouvet Island",
11991
- BW: "Botswana",
11992
- BY: "Belarus",
11993
- BZ: "Belize",
11994
- CA: "Canada",
11995
- CC: "Cocos (Keeling) Islands",
11996
- CD: "DR Congo",
11997
- CF: "Central African Republic",
11998
- CG: "Republic of the Congo",
11999
- CH: "Switzerland",
12000
- CI: "C\xF4te d'Ivoire",
12001
- CK: "Cook Islands",
12002
- CL: "Chile",
12003
- CM: "Cameroon",
12004
- CN: "China",
12005
- CO: "Colombia",
12006
- CR: "Costa Rica",
12007
- CU: "Cuba",
12008
- CV: "Cape Verde",
12009
- CW: "Cura\xE7ao",
12010
- CX: "Christmas Island",
12011
- CY: "Cyprus",
12012
- CZ: "Czechia",
12013
- DE: "Germany",
12014
- DJ: "Djibouti",
12015
- DK: "Denmark",
12016
- DM: "Dominica",
12017
- DO: "Dominican Republic",
12018
- DZ: "Algeria",
12019
- EC: "Ecuador",
12020
- EE: "Estonia",
12021
- EG: "Egypt",
12022
- EH: "Western Sahara",
12023
- ER: "Eritrea",
12024
- ES: "Spain",
12025
- ET: "Ethiopia",
12026
- FI: "Finland",
12027
- FJ: "Fiji",
12028
- FK: "Falkland Islands",
12029
- FM: "Micronesia",
12030
- FO: "Faroe Islands",
12031
- FR: "France",
12032
- GA: "Gabon",
12033
- GB: "United Kingdom",
12034
- GD: "Grenada",
12035
- GE: "Georgia",
12036
- GF: "French Guiana",
12037
- GG: "Guernsey",
12038
- GH: "Ghana",
12039
- GI: "Gibraltar",
12040
- GL: "Greenland",
12041
- GM: "Gambia",
12042
- GN: "Guinea",
12043
- GP: "Guadeloupe",
12044
- GQ: "Equatorial Guinea",
12045
- GR: "Greece",
12046
- GS: "South Georgia",
12047
- GT: "Guatemala",
12048
- GU: "Guam",
12049
- GW: "Guinea-Bissau",
12050
- GY: "Guyana",
12051
- HK: "Hong Kong",
12052
- HM: "Heard Island and McDonald Islands",
12053
- HN: "Honduras",
12054
- HR: "Croatia",
12055
- HT: "Haiti",
12056
- HU: "Hungary",
12057
- ID: "Indonesia",
12058
- IE: "Ireland",
12059
- IL: "Israel",
12060
- IM: "Isle of Man",
12061
- IN: "India",
12062
- IO: "British Indian Ocean Territory",
12063
- IQ: "Iraq",
12064
- IR: "Iran",
12065
- IS: "Iceland",
12066
- IT: "Italy",
12067
- JE: "Jersey",
12068
- JM: "Jamaica",
12069
- JO: "Jordan",
12070
- JP: "Japan",
12071
- KE: "Kenya",
12072
- KG: "Kyrgyzstan",
12073
- KH: "Cambodia",
12074
- KI: "Kiribati",
12075
- KM: "Comoros",
12076
- KN: "Saint Kitts and Nevis",
12077
- KP: "North Korea",
12078
- KR: "South Korea",
12079
- KW: "Kuwait",
12080
- KY: "Cayman Islands",
12081
- KZ: "Kazakhstan",
12082
- LA: "Laos",
12083
- LB: "Lebanon",
12084
- LC: "Saint Lucia",
12085
- LI: "Liechtenstein",
12086
- LK: "Sri Lanka",
12087
- LR: "Liberia",
12088
- LS: "Lesotho",
12089
- LT: "Lithuania",
12090
- LU: "Luxembourg",
12091
- LV: "Latvia",
12092
- LY: "Libya",
12093
- MA: "Morocco",
12094
- MC: "Monaco",
12095
- MD: "Moldova",
12096
- ME: "Montenegro",
12097
- MF: "Saint Martin",
12098
- MG: "Madagascar",
12099
- MH: "Marshall Islands",
12100
- MK: "North Macedonia",
12101
- ML: "Mali",
12102
- MM: "Myanmar",
12103
- MN: "Mongolia",
12104
- MO: "Macau",
12105
- MP: "Northern Mariana Islands",
12106
- MQ: "Martinique",
12107
- MR: "Mauritania",
12108
- MS: "Montserrat",
12109
- MT: "Malta",
12110
- MU: "Mauritius",
12111
- MV: "Maldives",
12112
- MW: "Malawi",
12113
- MX: "Mexico",
12114
- MY: "Malaysia",
12115
- MZ: "Mozambique",
12116
- NA: "Namibia",
12117
- NC: "New Caledonia",
12118
- NE: "Niger",
12119
- NF: "Norfolk Island",
12120
- NG: "Nigeria",
12121
- NI: "Nicaragua",
12122
- NL: "Netherlands",
12123
- NO: "Norway",
12124
- NP: "Nepal",
12125
- NR: "Nauru",
12126
- NU: "Niue",
12127
- NZ: "New Zealand",
12128
- OM: "Oman",
12129
- PA: "Panama",
12130
- PE: "Peru",
12131
- PF: "French Polynesia",
12132
- PG: "Papua New Guinea",
12133
- PH: "Philippines",
12134
- PK: "Pakistan",
12135
- PL: "Poland",
12136
- PM: "Saint Pierre and Miquelon",
12137
- PN: "Pitcairn Islands",
12138
- PR: "Puerto Rico",
12139
- PS: "Palestine",
12140
- PT: "Portugal",
12141
- PW: "Palau",
12142
- PY: "Paraguay",
12143
- QA: "Qatar",
12144
- RE: "R\xE9union",
12145
- RO: "Romania",
12146
- RS: "Serbia",
12147
- RU: "Russia",
12148
- RW: "Rwanda",
12149
- SA: "Saudi Arabia",
12150
- SB: "Solomon Islands",
12151
- SC: "Seychelles",
12152
- SD: "Sudan",
12153
- SE: "Sweden",
12154
- SG: "Singapore",
12155
- SH: "Saint Helena",
12156
- SI: "Slovenia",
12157
- SJ: "Svalbard and Jan Mayen",
12158
- SK: "Slovakia",
12159
- SL: "Sierra Leone",
12160
- SM: "San Marino",
12161
- SN: "Senegal",
12162
- SO: "Somalia",
12163
- SR: "Suriname",
12164
- SS: "South Sudan",
12165
- ST: "S\xE3o Tom\xE9 and Pr\xEDncipe",
12166
- SV: "El Salvador",
12167
- SX: "Sint Maarten",
12168
- SY: "Syria",
12169
- SZ: "Eswatini",
12170
- TC: "Turks and Caicos Islands",
12171
- TD: "Chad",
12172
- TF: "French Southern Territories",
12173
- TG: "Togo",
12174
- TH: "Thailand",
12175
- TJ: "Tajikistan",
12176
- TK: "Tokelau",
12177
- TL: "Timor-Leste",
12178
- TM: "Turkmenistan",
12179
- TN: "Tunisia",
12180
- TO: "Tonga",
12181
- TR: "Turkey",
12182
- TT: "Trinidad and Tobago",
12183
- TV: "Tuvalu",
12184
- TW: "Taiwan",
12185
- TZ: "Tanzania",
12186
- UA: "Ukraine",
12187
- UG: "Uganda",
12188
- UM: "U.S. Minor Outlying Islands",
12189
- US: "United States",
12190
- UY: "Uruguay",
12191
- UZ: "Uzbekistan",
12192
- VA: "Vatican City",
12193
- VC: "Saint Vincent and the Grenadines",
12194
- VE: "Venezuela",
12195
- VG: "British Virgin Islands",
12196
- VI: "U.S. Virgin Islands",
12197
- VN: "Vietnam",
12198
- VU: "Vanuatu",
12199
- WF: "Wallis and Futuna",
12200
- WS: "Samoa",
12201
- XK: "Kosovo",
12202
- YE: "Yemen",
12203
- YT: "Mayotte",
12204
- ZA: "South Africa",
12205
- ZM: "Zambia",
12206
- ZW: "Zimbabwe"
12207
- };
12208
- function countryCodeToFlag(code) {
12209
- return code.toUpperCase().split("").map((c2) => String.fromCodePoint(127462 + c2.charCodeAt(0) - 65)).join("");
12210
- }
12211
-
12212
11520
  // ../../internal/utils/src/text.ts
12213
11521
  var text_exports = {};
12214
11522
  __export(text_exports, {
@@ -12762,241 +12070,6 @@ z.object({
12762
12070
  })
12763
12071
  )
12764
12072
  });
12765
-
12766
- // ../../internal/asset/src/parse/caip2.ts
12767
- var SUPPORTED_CHAINS = {
12768
- // EIP155 chains (Ethereum Virtual Machine compatible)
12769
- ETHEREUM_MAINNET: {
12770
- chainId: "eip155:1",
12771
- namespace: "eip155",
12772
- reference: "1",
12773
- name: "Ethereum Mainnet",
12774
- shortName: "Ethereum",
12775
- explorerUrl: "https://etherscan.io",
12776
- explorerName: "Etherscan"
12777
- },
12778
- OPTIMISM: {
12779
- chainId: "eip155:10",
12780
- namespace: "eip155",
12781
- reference: "10",
12782
- name: "Optimism",
12783
- shortName: "Optimism",
12784
- explorerUrl: "https://optimistic.etherscan.io",
12785
- explorerName: "Optimism Explorer"
12786
- },
12787
- POLYGON: {
12788
- chainId: "eip155:137",
12789
- namespace: "eip155",
12790
- reference: "137",
12791
- name: "Polygon",
12792
- shortName: "Polygon",
12793
- explorerUrl: "https://polygonscan.com",
12794
- explorerName: "PolygonScan"
12795
- },
12796
- ARBITRUM: {
12797
- chainId: "eip155:42161",
12798
- namespace: "eip155",
12799
- reference: "42161",
12800
- name: "Arbitrum",
12801
- shortName: "Arbitrum",
12802
- explorerUrl: "https://arbiscan.io",
12803
- explorerName: "Arbiscan"
12804
- },
12805
- BASE: {
12806
- chainId: "eip155:8453",
12807
- namespace: "eip155",
12808
- reference: "8453",
12809
- name: "Base",
12810
- shortName: "Base",
12811
- explorerUrl: "https://basescan.org",
12812
- explorerName: "BaseScan"
12813
- },
12814
- CELO: {
12815
- chainId: "eip155:42220",
12816
- namespace: "eip155",
12817
- reference: "42220",
12818
- name: "Celo",
12819
- shortName: "Celo",
12820
- explorerUrl: "https://celoscan.io",
12821
- explorerName: "CeloScan"
12822
- },
12823
- PLASMA: {
12824
- chainId: "eip155:9745",
12825
- namespace: "eip155",
12826
- reference: "9745",
12827
- name: "Plasma",
12828
- shortName: "Plasma",
12829
- explorerUrl: "https://plasmascan.to",
12830
- explorerName: "PlasmaScan"
12831
- },
12832
- BSC: {
12833
- chainId: "eip155:56",
12834
- namespace: "eip155",
12835
- reference: "56",
12836
- name: "Binance Smart Chain",
12837
- shortName: "BSC",
12838
- explorerUrl: "https://bscscan.com",
12839
- explorerName: "BscScan"
12840
- },
12841
- LINEA: {
12842
- chainId: "eip155:59144",
12843
- namespace: "eip155",
12844
- reference: "59144",
12845
- name: "Linea",
12846
- shortName: "Linea",
12847
- explorerUrl: "https://lineascan.build",
12848
- explorerName: "LineaScan"
12849
- },
12850
- MONAD: {
12851
- chainId: "eip155:143",
12852
- namespace: "eip155",
12853
- reference: "143",
12854
- name: "Monad",
12855
- shortName: "Monad",
12856
- explorerUrl: "https://monadvision.com",
12857
- explorerName: "MonadVision"
12858
- },
12859
- INK: {
12860
- chainId: "eip155:57073",
12861
- namespace: "eip155",
12862
- reference: "57073",
12863
- name: "Ink",
12864
- shortName: "Ink",
12865
- explorerUrl: "https://explorer.inkonchain.com",
12866
- explorerName: "Ink Explorer"
12867
- },
12868
- SHAPE: {
12869
- chainId: "eip155:360",
12870
- namespace: "eip155",
12871
- reference: "360",
12872
- name: "Shape",
12873
- shortName: "Shape",
12874
- explorerUrl: "https://shapescan.xyz",
12875
- explorerName: "ShapeScan"
12876
- },
12877
- SONEIUM: {
12878
- chainId: "eip155:1868",
12879
- namespace: "eip155",
12880
- reference: "1868",
12881
- name: "Soneium",
12882
- shortName: "Soneium",
12883
- explorerUrl: "https://soneium.blockscout.com",
12884
- explorerName: "Soneium Blockscout"
12885
- },
12886
- UNICHAIN: {
12887
- chainId: "eip155:130",
12888
- namespace: "eip155",
12889
- reference: "130",
12890
- name: "Unichain",
12891
- shortName: "Unichain",
12892
- explorerUrl: "https://unichain.blockscout.com",
12893
- explorerName: "Unichain Blockscout"
12894
- },
12895
- WORLD_CHAIN: {
12896
- chainId: "eip155:480",
12897
- namespace: "eip155",
12898
- reference: "480",
12899
- name: "World Chain",
12900
- shortName: "World Chain",
12901
- explorerUrl: "https://worldscan.org",
12902
- explorerName: "WorldScan"
12903
- },
12904
- // Non-EVM chains
12905
- SOLANA_MAINNET: {
12906
- chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12907
- namespace: "solana",
12908
- reference: "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12909
- name: "Solana Mainnet",
12910
- shortName: "Solana",
12911
- explorerUrl: "https://solscan.io",
12912
- explorerName: "Solscan"
12913
- },
12914
- STELLAR_PUBNET: {
12915
- chainId: "stellar:pubnet",
12916
- namespace: "stellar",
12917
- reference: "pubnet",
12918
- name: "Stellar",
12919
- shortName: "Stellar",
12920
- explorerUrl: "https://stellar.expert/explorer/public",
12921
- explorerName: "Stellar Expert"
12922
- },
12923
- TRON_MAINNET: {
12924
- chainId: "tron:mainnet",
12925
- namespace: "tron",
12926
- reference: "mainnet",
12927
- name: "Tron",
12928
- shortName: "Tron",
12929
- explorerUrl: "https://tronscan.org",
12930
- explorerName: "TronScan"
12931
- },
12932
- BITCOIN_MAINNET: {
12933
- chainId: "bip122:000000000019d6689c085ae165831e93-p2wpkh",
12934
- namespace: "bip122",
12935
- reference: "000000000019d6689c085ae165831e93-p2wpkh",
12936
- name: "Bitcoin (P2WPKH)",
12937
- shortName: "Bitcoin",
12938
- explorerUrl: "https://mempool.space",
12939
- explorerName: "Mempool"
12940
- },
12941
- CARDANO_MAINNET: {
12942
- chainId: "cip34:1-764824073",
12943
- namespace: "cip34",
12944
- reference: "1-764824073",
12945
- name: "Cardano",
12946
- shortName: "Cardano",
12947
- explorerUrl: "https://cardanoscan.io",
12948
- explorerName: "CardanoScan"
12949
- },
12950
- SUI_MAINNET: {
12951
- chainId: "sui:mainnet",
12952
- namespace: "sui",
12953
- reference: "mainnet",
12954
- name: "Sui Mainnet",
12955
- shortName: "Sui",
12956
- explorerUrl: "https://suiscan.xyz",
12957
- explorerName: "SuiScan"
12958
- }
12959
- };
12960
- Object.fromEntries(
12961
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.shortName, chain])
12962
- );
12963
- Object.fromEntries(
12964
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.chainId, chain])
12965
- );
12966
- Object.values(SUPPORTED_CHAINS).filter(
12967
- (chain) => chain.namespace === "eip155"
12968
- );
12969
-
12970
- // ../../internal/asset/src/parse/model.ts
12971
- var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
12972
- AssetModel2["Addon"] = "addon";
12973
- AssetModel2["App"] = "app";
12974
- AssetModel2["Bot"] = "bot";
12975
- AssetModel2["BusinessProfile"] = "business-profile";
12976
- AssetModel2["Catalog"] = "catalog";
12977
- AssetModel2["Collection"] = "collection";
12978
- AssetModel2["Channel"] = "channel";
12979
- AssetModel2["Group"] = "group";
12980
- AssetModel2["Post"] = "post";
12981
- AssetModel2["Profile"] = "profile";
12982
- AssetModel2["Short"] = "short";
12983
- AssetModel2["Video"] = "video";
12984
- AssetModel2["Space"] = "space";
12985
- AssetModel2["Issue"] = "issue";
12986
- AssetModel2["PullRequest"] = "pull-request";
12987
- AssetModel2["Discussion"] = "discussion";
12988
- AssetModel2["Repository"] = "repository";
12989
- AssetModel2["Article"] = "Article";
12990
- AssetModel2["Comment"] = "comment";
12991
- AssetModel2["List"] = "list";
12992
- AssetModel2["Subreddit"] = "subreddit";
12993
- AssetModel2["Community"] = "community";
12994
- AssetModel2["MiniApp"] = "mini-app";
12995
- AssetModel2["Developer"] = "developer";
12996
- return AssetModel2;
12997
- })(AssetModel || {});
12998
-
12999
- // ../../internal/validation/src/assets/parse.ts
13000
12073
  z.object({
13001
12074
  content: z.string().min(1, "Input string is required").describe("The asset content to parse (URL, address, etc.)")
13002
12075
  }).describe("Parse asset request body");
@@ -13093,6 +12166,7 @@ z.object({
13093
12166
  }).optional(),
13094
12167
  isOverviewManuallyEdited: z.boolean().optional(),
13095
12168
  overviewDisplayLocation: z.enum(["cover", "separate"]).default("cover"),
12169
+ coverVersion: z.enum(["v1", "v2"]).default("v1"),
13096
12170
  showCaseStudyOrgNames: z.boolean().default(true),
13097
12171
  showSimilarThreats: z.boolean().default(true),
13098
12172
  threatAnalysisType: z.enum(["threats_blocked", "takedowns_completed"]).default("threats_blocked"),
@@ -13383,11 +12457,11 @@ var parseNamed_default = parseNamed;
13383
12457
 
13384
12458
  // ../../node_modules/culori/src/rgb/parseHex.js
13385
12459
  var hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
13386
- var parseHex2 = (color) => {
12460
+ var parseHex = (color) => {
13387
12461
  let match2;
13388
12462
  return (match2 = color.match(hex)) ? parseNumber_default(parseInt(match2[1], 16), match2[1].length) : void 0;
13389
12463
  };
13390
- var parseHex_default = parseHex2;
12464
+ var parseHex_default = parseHex;
13391
12465
 
13392
12466
  // ../../node_modules/culori/src/util/regex.js
13393
12467
  var num = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)";