@chainpatrol/sdk 1.10.0 → 1.12.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/CHANGELOG.md +34 -0
- package/dist/api/index.d.mts +89 -2
- package/dist/api/index.d.ts +89 -2
- package/dist/api/index.js +18 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +18 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/index.js +1626 -1104
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1627 -1105
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __spreadValues, __export,
|
|
1
|
+
import { __spreadValues, __export, __async, __spreadProps, __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
|
|
|
@@ -1216,17 +1216,17 @@ var PolyDateFormatter = class {
|
|
|
1216
1216
|
constructor(dt, intl, opts) {
|
|
1217
1217
|
this.opts = opts;
|
|
1218
1218
|
this.originalZone = void 0;
|
|
1219
|
-
let
|
|
1219
|
+
let z68 = void 0;
|
|
1220
1220
|
if (this.opts.timeZone) {
|
|
1221
1221
|
this.dt = dt;
|
|
1222
1222
|
} else if (dt.zone.type === "fixed") {
|
|
1223
1223
|
const gmtOffset = -1 * (dt.offset / 60);
|
|
1224
1224
|
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
|
|
1225
1225
|
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
|
|
1226
|
-
|
|
1226
|
+
z68 = offsetZ;
|
|
1227
1227
|
this.dt = dt;
|
|
1228
1228
|
} else {
|
|
1229
|
-
|
|
1229
|
+
z68 = "UTC";
|
|
1230
1230
|
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1231
1231
|
this.originalZone = dt.zone;
|
|
1232
1232
|
}
|
|
@@ -1234,14 +1234,14 @@ var PolyDateFormatter = class {
|
|
|
1234
1234
|
this.dt = dt;
|
|
1235
1235
|
} else if (dt.zone.type === "iana") {
|
|
1236
1236
|
this.dt = dt;
|
|
1237
|
-
|
|
1237
|
+
z68 = dt.zone.name;
|
|
1238
1238
|
} else {
|
|
1239
|
-
|
|
1239
|
+
z68 = "UTC";
|
|
1240
1240
|
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1241
1241
|
this.originalZone = dt.zone;
|
|
1242
1242
|
}
|
|
1243
1243
|
const intlOpts = __spreadValues({}, this.opts);
|
|
1244
|
-
intlOpts.timeZone = intlOpts.timeZone ||
|
|
1244
|
+
intlOpts.timeZone = intlOpts.timeZone || z68;
|
|
1245
1245
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1246
1246
|
}
|
|
1247
1247
|
format() {
|
|
@@ -6975,6 +6975,30 @@ z.object({
|
|
|
6975
6975
|
z.object({
|
|
6976
6976
|
noteId: z.number().int().positive()
|
|
6977
6977
|
});
|
|
6978
|
+
var getAssetSubscriptionSchema = z.object({
|
|
6979
|
+
slug: z.string().min(1),
|
|
6980
|
+
assetId: z.number().int().positive()
|
|
6981
|
+
});
|
|
6982
|
+
getAssetSubscriptionSchema.extend({
|
|
6983
|
+
/** True to follow this asset, false to stop following it. */
|
|
6984
|
+
subscribed: z.boolean()
|
|
6985
|
+
});
|
|
6986
|
+
var ASSET_TAGS = {
|
|
6987
|
+
ENFORCEMENT_EXHAUSTED: {
|
|
6988
|
+
label: "Enforcement Exhausted",
|
|
6989
|
+
description: "All available enforcement options have been pursued with the relevant providers. The asset remains active due to provider inaction.",
|
|
6990
|
+
colorScheme: "orange"
|
|
6991
|
+
}
|
|
6992
|
+
};
|
|
6993
|
+
var ASSET_TAG_KEYS = Object.keys(ASSET_TAGS);
|
|
6994
|
+
var assetTagKeySchema = z.enum(ASSET_TAG_KEYS);
|
|
6995
|
+
z.object({
|
|
6996
|
+
assetId: z.number().int().positive()
|
|
6997
|
+
});
|
|
6998
|
+
z.object({
|
|
6999
|
+
assetId: z.number().int().positive(),
|
|
7000
|
+
tag: assetTagKeySchema
|
|
7001
|
+
});
|
|
6978
7002
|
z.object({
|
|
6979
7003
|
slug: z.string(),
|
|
6980
7004
|
assetId: z.number(),
|
|
@@ -6988,6 +7012,9 @@ z.object({
|
|
|
6988
7012
|
email: z.string().email(),
|
|
6989
7013
|
description: z.string().optional().default("")
|
|
6990
7014
|
});
|
|
7015
|
+
z.object({
|
|
7016
|
+
slug: z.string().min(1)
|
|
7017
|
+
});
|
|
6991
7018
|
z.object({
|
|
6992
7019
|
/** Canonicalization algorithm version the client computed its prefixes with. */
|
|
6993
7020
|
algoVersion: z.number().int().positive(),
|
|
@@ -7134,7 +7161,10 @@ var AssetType = {
|
|
|
7134
7161
|
FIVE_HUNDRED_PX: "FIVE_HUNDRED_PX",
|
|
7135
7162
|
LUMA: "LUMA",
|
|
7136
7163
|
SMARTMONEYMATCH: "SMARTMONEYMATCH",
|
|
7137
|
-
APK_GOLD: "APK_GOLD"
|
|
7164
|
+
APK_GOLD: "APK_GOLD",
|
|
7165
|
+
GLASSDOOR: "GLASSDOOR",
|
|
7166
|
+
PUMP_FUN: "PUMP_FUN",
|
|
7167
|
+
TUMBLR: "TUMBLR"
|
|
7138
7168
|
};
|
|
7139
7169
|
var LivenessStatus = {
|
|
7140
7170
|
UNKNOWN: "UNKNOWN",
|
|
@@ -7295,8 +7325,23 @@ z.object({
|
|
|
7295
7325
|
watchStatus: z.nativeEnum(WatchStatus).optional().describe("The watch status of the asset.")
|
|
7296
7326
|
}).describe("Check asset response body");
|
|
7297
7327
|
var assetListInputSchema = z.object({
|
|
7298
|
-
/**
|
|
7299
|
-
|
|
7328
|
+
/**
|
|
7329
|
+
* The type of asset to retrieve. Omitting the key means every asset type,
|
|
7330
|
+
* which lets a bulk consumer sweep the whole blocklist with one cursor
|
|
7331
|
+
* instead of looping all 94 members of `AssetType`.
|
|
7332
|
+
*
|
|
7333
|
+
* An explicit `null` is rejected with a 400 rather than treated as "all
|
|
7334
|
+
* types". Only omission opts into the full sweep, so a client that sends
|
|
7335
|
+
* `type: null` from an uninitialised variable gets a clear error instead of
|
|
7336
|
+
* silently pulling every blocked asset.
|
|
7337
|
+
*
|
|
7338
|
+
* Not `.nullable()`: besides accepting that null, it renders in the
|
|
7339
|
+
* generated MCP tool manifest as a nested `anyOf` containing `{"not": {}}`,
|
|
7340
|
+
* which buries the enum hint telling a model which values are legal.
|
|
7341
|
+
*/
|
|
7342
|
+
type: z.nativeEnum(AssetType).optional().describe(
|
|
7343
|
+
"Asset type to retrieve. Omit the field entirely to retrieve assets of every type in a single paginated sweep; an explicit null is rejected."
|
|
7344
|
+
),
|
|
7300
7345
|
/** Optional status filter for the assets; defaults to `BLOCKED`. */
|
|
7301
7346
|
status: z.nativeEnum(AssetStatus).optional().default(AssetStatus.BLOCKED).describe("Status of the assets to retrieve"),
|
|
7302
7347
|
/**
|
|
@@ -7324,7 +7369,8 @@ var assetListInputSchema = z.object({
|
|
|
7324
7369
|
}).describe(
|
|
7325
7370
|
`List asset request body
|
|
7326
7371
|
|
|
7327
|
-
|
|
7372
|
+
With no \`startDate\`, this returns every matching asset regardless of age \u2014 there
|
|
7373
|
+
is no implicit one-day window. Pass \`startDate\` to get a delta instead.
|
|
7328
7374
|
|
|
7329
7375
|
You can also choose a \`startDate\` and \`endDate\` for the range of asset updates, most
|
|
7330
7376
|
timestamp formats should work, we use [Luxon](https://moment.github.io/luxon/#/parsing)
|
|
@@ -7433,6 +7479,8 @@ var ThreatDetectionSourceKey = /* @__PURE__ */ ((ThreatDetectionSourceKey2) => {
|
|
|
7433
7479
|
ThreatDetectionSourceKey2["TELEGRAM_CHANNELS_SEARCH_VETRIC"] = "telegram_channels_search_vetric";
|
|
7434
7480
|
ThreatDetectionSourceKey2["TELEGRAM_USER_SEARCH_VETRIC"] = "telegram_user_search_vetric";
|
|
7435
7481
|
ThreatDetectionSourceKey2["FACEBOOK_PAGE_SEARCH_VETRIC"] = "facebook_page_search_vetric";
|
|
7482
|
+
ThreatDetectionSourceKey2["FACEBOOK_USER_SEARCH_VETRIC"] = "facebook_user_search_vetric";
|
|
7483
|
+
ThreatDetectionSourceKey2["FACEBOOK_POST_SEARCH_VETRIC"] = "facebook_post_search_vetric";
|
|
7436
7484
|
ThreatDetectionSourceKey2["INSTAGRAM_ACCOUNT_SEARCH_VETRIC"] = "instagram_account_search_vetric";
|
|
7437
7485
|
ThreatDetectionSourceKey2["TWITTER_SEARCH_VETRIC"] = "twitter_search_vetric";
|
|
7438
7486
|
ThreatDetectionSourceKey2["LINKEDIN_PEOPLE_SEARCH_VETRIC"] = "linkedin_people_search_vetric";
|
|
@@ -7445,6 +7493,7 @@ var ThreatDetectionSourceKey = /* @__PURE__ */ ((ThreatDetectionSourceKey2) => {
|
|
|
7445
7493
|
ThreatDetectionSourceKey2["BLOCKLIST"] = "blocklist";
|
|
7446
7494
|
ThreatDetectionSourceKey2["APPLE_APP_STORE"] = "apple_app_store";
|
|
7447
7495
|
ThreatDetectionSourceKey2["GOOGLE_ADS_SEARCH"] = "google_ads_search";
|
|
7496
|
+
ThreatDetectionSourceKey2["GOOGLE_ADS_TRANSPARENCY_SEARCH"] = "google_ads_transparency_search";
|
|
7448
7497
|
ThreatDetectionSourceKey2["MOZILLA_ADDON_SEARCH"] = "mozilla_addon_search";
|
|
7449
7498
|
ThreatDetectionSourceKey2["REDDIT_SUBREDDIT_SEARCH"] = "reddit_subreddit_search";
|
|
7450
7499
|
ThreatDetectionSourceKey2["ASSET_CHECK"] = "asset_check";
|
|
@@ -7472,14 +7521,17 @@ var ThreatDetectionSourceKey = /* @__PURE__ */ ((ThreatDetectionSourceKey2) => {
|
|
|
7472
7521
|
ThreatDetectionSourceKey2["GROK_USER_SEARCH"] = "grok_user_search";
|
|
7473
7522
|
ThreatDetectionSourceKey2["GOOGLE_LENS_IMAGE_SEARCH"] = "google_lens_image_search";
|
|
7474
7523
|
ThreatDetectionSourceKey2["YANDEX_SEARCH"] = "yandex_search";
|
|
7524
|
+
ThreatDetectionSourceKey2["YANDEX_IMAGE_SEARCH"] = "yandex_image_search";
|
|
7475
7525
|
ThreatDetectionSourceKey2["LINKEDIN_EMPLOYEE_DETECTION"] = "linkedin_employee_detection";
|
|
7476
7526
|
ThreatDetectionSourceKey2["LINKEDIN_POST_SEARCH"] = "linkedin_post_search";
|
|
7477
7527
|
ThreatDetectionSourceKey2["LINKEDIN_COMPANY_SEARCH"] = "linkedin_company_search";
|
|
7478
7528
|
ThreatDetectionSourceKey2["BING_ADS_SEARCH"] = "bing_ads_search";
|
|
7479
7529
|
ThreatDetectionSourceKey2["TIK_TOK_ADS_SEARCH"] = "tik_tok_ads_search";
|
|
7530
|
+
ThreatDetectionSourceKey2["ADLIBRARY_ADS_SEARCH"] = "adlibrary_ads_search";
|
|
7480
7531
|
ThreatDetectionSourceKey2["DNSDB"] = "dnsdb";
|
|
7481
7532
|
ThreatDetectionSourceKey2["DAILY_MOTION_SEARCH"] = "daily_motion_search";
|
|
7482
7533
|
ThreatDetectionSourceKey2["WATCHLIST"] = "watchlist";
|
|
7534
|
+
ThreatDetectionSourceKey2["GITHUB_SEARCH"] = "github_search";
|
|
7483
7535
|
return ThreatDetectionSourceKey2;
|
|
7484
7536
|
})(ThreatDetectionSourceKey || {});
|
|
7485
7537
|
var ThreatDetectionScope = /* @__PURE__ */ ((ThreatDetectionScope2) => {
|
|
@@ -7488,568 +7540,47 @@ var ThreatDetectionScope = /* @__PURE__ */ ((ThreatDetectionScope2) => {
|
|
|
7488
7540
|
return ThreatDetectionScope2;
|
|
7489
7541
|
})(ThreatDetectionScope || {});
|
|
7490
7542
|
|
|
7491
|
-
// ../../internal/utils/src/
|
|
7492
|
-
var
|
|
7493
|
-
__export(
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7543
|
+
// ../../internal/utils/src/url.ts
|
|
7544
|
+
var url_exports = {};
|
|
7545
|
+
__export(url_exports, {
|
|
7546
|
+
URL_REGEX: () => URL_REGEX,
|
|
7547
|
+
containsPunycode: () => containsPunycode,
|
|
7548
|
+
convertHttpsToHttp: () => convertHttpsToHttp,
|
|
7549
|
+
ensureHttpsPrefix: () => ensureHttpsPrefix,
|
|
7550
|
+
generateCanonicalIPFSUrl: () => generateCanonicalIPFSUrl,
|
|
7551
|
+
getDefangedUrl: () => getDefangedUrl,
|
|
7552
|
+
getDomain: () => getDomain,
|
|
7553
|
+
getFaviconUrl: () => getFaviconUrl,
|
|
7554
|
+
getHostname: () => getHostname,
|
|
7555
|
+
getNormalizedUrl: () => getNormalizedUrl,
|
|
7556
|
+
getParentDomains: () => getParentDomains,
|
|
7557
|
+
getPublicHostname: () => getPublicHostname,
|
|
7558
|
+
getRefangedUrl: () => getRefangedUrl,
|
|
7559
|
+
isEmail: () => isEmail,
|
|
7560
|
+
isUrl: () => isUrl,
|
|
7561
|
+
isWalrusSite: () => isWalrusSite,
|
|
7562
|
+
removeHttpProtocol: () => removeHttpProtocol,
|
|
7563
|
+
sanitizeHttpUrl: () => sanitizeHttpUrl,
|
|
7564
|
+
slugify: () => slugify,
|
|
7565
|
+
stripDomainWildcardPrefix: () => stripDomainWildcardPrefix,
|
|
7566
|
+
toUnicode: () => toUnicode2,
|
|
7567
|
+
trimDomainToLevels: () => trimDomainToLevels
|
|
7499
7568
|
});
|
|
7500
|
-
var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
|
|
7501
|
-
AssetScanEnrichmentType2["CONTENT_AND_METADATA"] = "content_and_metadata";
|
|
7502
|
-
AssetScanEnrichmentType2["BROWSER_CAPTURE"] = "browser_capture";
|
|
7503
|
-
AssetScanEnrichmentType2["OWNERSHIP_AND_REGISTRATION"] = "ownership_and_registration";
|
|
7504
|
-
AssetScanEnrichmentType2["GEOLOCATION_AND_IP"] = "geolocation_and_ip";
|
|
7505
|
-
AssetScanEnrichmentType2["DNS"] = "dns";
|
|
7506
|
-
AssetScanEnrichmentType2["TLS"] = "tls";
|
|
7507
|
-
AssetScanEnrichmentType2["TCP"] = "tcp";
|
|
7508
|
-
AssetScanEnrichmentType2["TWITTER_POST"] = "post";
|
|
7509
|
-
AssetScanEnrichmentType2["TWITTER_PROFILE"] = "profile";
|
|
7510
|
-
AssetScanEnrichmentType2["TWITTER_FOLLOWERS"] = "twitter_followers";
|
|
7511
|
-
AssetScanEnrichmentType2["FARCASTER_CAST"] = "cast";
|
|
7512
|
-
AssetScanEnrichmentType2["FARCASTER_PROFILE"] = "farcaster_profile";
|
|
7513
|
-
AssetScanEnrichmentType2["FARCASTER_CHANNEL"] = "channel";
|
|
7514
|
-
AssetScanEnrichmentType2["FARCASTER_MINIAPP"] = "miniapp";
|
|
7515
|
-
AssetScanEnrichmentType2["TELEGRAM_PROFILE"] = "telegram_profile";
|
|
7516
|
-
AssetScanEnrichmentType2["INSTAGRAM_PROFILE"] = "instagram_profile";
|
|
7517
|
-
AssetScanEnrichmentType2["FACEBOOK_PROFILE"] = "facebook_profile";
|
|
7518
|
-
AssetScanEnrichmentType2["YOUTUBE_VIDEO"] = "youtube_video";
|
|
7519
|
-
AssetScanEnrichmentType2["YOUTUBE_CHANNEL"] = "youtube_channel";
|
|
7520
|
-
AssetScanEnrichmentType2["APPLE_APP_STORE_LISTING"] = "apple_app_store_listing";
|
|
7521
|
-
AssetScanEnrichmentType2["GOOGLE_PLAY_STORE_LISTING"] = "google_play_store_listing";
|
|
7522
|
-
AssetScanEnrichmentType2["MOZILLA_ADDON"] = "mozilla_addon";
|
|
7523
|
-
AssetScanEnrichmentType2["REDDIT_SUBREDDIT"] = "reddit_subreddit";
|
|
7524
|
-
AssetScanEnrichmentType2["EMAIL_VALIDATION"] = "email_validation";
|
|
7525
|
-
AssetScanEnrichmentType2["PHONE_LOOKUP"] = "phone_lookup";
|
|
7526
|
-
AssetScanEnrichmentType2["BILIBILI_VIDEO"] = "bilibili_video";
|
|
7527
|
-
AssetScanEnrichmentType2["BILIBILI_PROFILE"] = "bilibili_profile";
|
|
7528
|
-
AssetScanEnrichmentType2["DAILYMOTION_VIDEO"] = "dailymotion_video";
|
|
7529
|
-
AssetScanEnrichmentType2["VIMEO_VIDEO"] = "vimeo_video";
|
|
7530
|
-
AssetScanEnrichmentType2["VIMEO_PROFILE"] = "vimeo_profile";
|
|
7531
|
-
AssetScanEnrichmentType2["STACKBLITZ_PAGE"] = "stackblitz_page";
|
|
7532
|
-
AssetScanEnrichmentType2["LEETCODE_PAGE"] = "leetcode_page";
|
|
7533
|
-
AssetScanEnrichmentType2["NPM_PACKAGE"] = "npm_package";
|
|
7534
|
-
AssetScanEnrichmentType2["PYPI_PACKAGE"] = "pypi_package";
|
|
7535
|
-
AssetScanEnrichmentType2["RUST_PACKAGE"] = "rust_package";
|
|
7536
|
-
AssetScanEnrichmentType2["LINKEDIN_PROFILE"] = "linkedin_profile";
|
|
7537
|
-
AssetScanEnrichmentType2["META_AD"] = "meta_ad";
|
|
7538
|
-
AssetScanEnrichmentType2["GOOGLE_AD"] = "google_ad";
|
|
7539
|
-
AssetScanEnrichmentType2["CONTRACT_DEPLOYER"] = "contract_deployer";
|
|
7540
|
-
return AssetScanEnrichmentType2;
|
|
7541
|
-
})(AssetScanEnrichmentType || {});
|
|
7542
|
-
var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) => {
|
|
7543
|
-
AssetScanEnrichmentSource2["URLSCAN"] = "urlscan";
|
|
7544
|
-
AssetScanEnrichmentSource2["WHOIS"] = "whois";
|
|
7545
|
-
AssetScanEnrichmentSource2["RDAP"] = "rdap";
|
|
7546
|
-
AssetScanEnrichmentSource2["HTTP_CONTENT"] = "http_content";
|
|
7547
|
-
AssetScanEnrichmentSource2["NETWORK"] = "node_js_network";
|
|
7548
|
-
AssetScanEnrichmentSource2["EXTENSION"] = "extension";
|
|
7549
|
-
AssetScanEnrichmentSource2["PLAYWRIGHT"] = "playwright";
|
|
7550
|
-
AssetScanEnrichmentSource2["X_API"] = "x_api";
|
|
7551
|
-
AssetScanEnrichmentSource2["SOCIALDATA_API"] = "socialdata_api";
|
|
7552
|
-
AssetScanEnrichmentSource2["NEYNAR_API"] = "neynar_api";
|
|
7553
|
-
AssetScanEnrichmentSource2["TELEGRAM_API"] = "telegram_api";
|
|
7554
|
-
AssetScanEnrichmentSource2["INSTAGRAM_API"] = "instagram_api";
|
|
7555
|
-
AssetScanEnrichmentSource2["FACEBOOK_API"] = "facebook_api";
|
|
7556
|
-
AssetScanEnrichmentSource2["YOUTUBE_API"] = "youtube_api";
|
|
7557
|
-
AssetScanEnrichmentSource2["APPLE_APP_STORE_API"] = "apple_app_store_api";
|
|
7558
|
-
AssetScanEnrichmentSource2["GOOGLE_PLAY_STORE_API"] = "google_play_store_api";
|
|
7559
|
-
AssetScanEnrichmentSource2["MOZILLA_ADDONS_API"] = "mozilla_addons_api";
|
|
7560
|
-
AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
|
|
7561
|
-
AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
|
|
7562
|
-
AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
|
|
7563
|
-
AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
|
|
7564
|
-
AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
|
|
7565
|
-
AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
|
|
7566
|
-
AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
|
|
7567
|
-
AssetScanEnrichmentSource2["LEETCODE_API"] = "leetcode_api";
|
|
7568
|
-
AssetScanEnrichmentSource2["NPM_REGISTRY_API"] = "npm_registry_api";
|
|
7569
|
-
AssetScanEnrichmentSource2["PYPI_REGISTRY_API"] = "pypi_registry_api";
|
|
7570
|
-
AssetScanEnrichmentSource2["CRATES_IO_API"] = "crates_io_api";
|
|
7571
|
-
AssetScanEnrichmentSource2["APIFY_LINKEDIN_API"] = "apify_linkedin_api";
|
|
7572
|
-
AssetScanEnrichmentSource2["META_ADS_LIBRARY"] = "meta_ads_library";
|
|
7573
|
-
AssetScanEnrichmentSource2["GOOGLE_ADS_TRANSPARENCY_CENTER"] = "google_ads_transparency_center";
|
|
7574
|
-
AssetScanEnrichmentSource2["ETHERSCAN_API"] = "etherscan_api";
|
|
7575
|
-
return AssetScanEnrichmentSource2;
|
|
7576
|
-
})(AssetScanEnrichmentSource || {});
|
|
7577
|
-
var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
|
|
7578
|
-
["content_and_metadata" /* CONTENT_AND_METADATA */]: "Content and Metadata",
|
|
7579
|
-
["post" /* TWITTER_POST */]: "Post",
|
|
7580
|
-
["profile" /* TWITTER_PROFILE */]: "Profile",
|
|
7581
|
-
["twitter_followers" /* TWITTER_FOLLOWERS */]: "Twitter Followers",
|
|
7582
|
-
["browser_capture" /* BROWSER_CAPTURE */]: "Browser Capture",
|
|
7583
|
-
["geolocation_and_ip" /* GEOLOCATION_AND_IP */]: "Geolocation and IP",
|
|
7584
|
-
["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */]: "Ownership and Registration",
|
|
7585
|
-
["dns" /* DNS */]: "DNS Lookup",
|
|
7586
|
-
["tls" /* TLS */]: "TLS Connection Info",
|
|
7587
|
-
["tcp" /* TCP */]: "TCP Connection Info",
|
|
7588
|
-
// Farcaster
|
|
7589
|
-
["cast" /* FARCASTER_CAST */]: "Farcaster Cast",
|
|
7590
|
-
["farcaster_profile" /* FARCASTER_PROFILE */]: "Farcaster Profile",
|
|
7591
|
-
["channel" /* FARCASTER_CHANNEL */]: "Farcaster Channel",
|
|
7592
|
-
["miniapp" /* FARCASTER_MINIAPP */]: "Farcaster MiniApp",
|
|
7593
|
-
// Telegram
|
|
7594
|
-
["telegram_profile" /* TELEGRAM_PROFILE */]: "Telegram Profile",
|
|
7595
|
-
// Instagram
|
|
7596
|
-
["instagram_profile" /* INSTAGRAM_PROFILE */]: "Instagram Profile",
|
|
7597
|
-
// Facebook
|
|
7598
|
-
["facebook_profile" /* FACEBOOK_PROFILE */]: "Facebook Profile",
|
|
7599
|
-
// YouTube
|
|
7600
|
-
["youtube_video" /* YOUTUBE_VIDEO */]: "YouTube Video",
|
|
7601
|
-
["youtube_channel" /* YOUTUBE_CHANNEL */]: "YouTube Channel",
|
|
7602
|
-
// Apple App Store
|
|
7603
|
-
["apple_app_store_listing" /* APPLE_APP_STORE_LISTING */]: "Apple App Store Listing",
|
|
7604
|
-
// Google Play Store
|
|
7605
|
-
["google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */]: "Google Play Store Listing",
|
|
7606
|
-
// Mozilla
|
|
7607
|
-
["mozilla_addon" /* MOZILLA_ADDON */]: "Mozilla Add-on",
|
|
7608
|
-
// Reddit
|
|
7609
|
-
["reddit_subreddit" /* REDDIT_SUBREDDIT */]: "Reddit Subreddit",
|
|
7610
|
-
// Email
|
|
7611
|
-
["email_validation" /* EMAIL_VALIDATION */]: "Email Validation",
|
|
7612
|
-
// Phone Number
|
|
7613
|
-
["phone_lookup" /* PHONE_LOOKUP */]: "Phone Lookup",
|
|
7614
|
-
// Bilibili
|
|
7615
|
-
["bilibili_video" /* BILIBILI_VIDEO */]: "Bilibili Video",
|
|
7616
|
-
["bilibili_profile" /* BILIBILI_PROFILE */]: "Bilibili Profile",
|
|
7617
|
-
// DailyMotion
|
|
7618
|
-
["dailymotion_video" /* DAILYMOTION_VIDEO */]: "DailyMotion Video",
|
|
7619
|
-
// Vimeo
|
|
7620
|
-
["vimeo_video" /* VIMEO_VIDEO */]: "Vimeo Video",
|
|
7621
|
-
["vimeo_profile" /* VIMEO_PROFILE */]: "Vimeo Profile",
|
|
7622
|
-
// Stackblitz
|
|
7623
|
-
["stackblitz_page" /* STACKBLITZ_PAGE */]: "Stackblitz Page",
|
|
7624
|
-
// Leetcode
|
|
7625
|
-
["leetcode_page" /* LEETCODE_PAGE */]: "Leetcode Page",
|
|
7626
|
-
// NPM
|
|
7627
|
-
["npm_package" /* NPM_PACKAGE */]: "NPM Package",
|
|
7628
|
-
// PyPI
|
|
7629
|
-
["pypi_package" /* PYPI_PACKAGE */]: "PyPI Package",
|
|
7630
|
-
// Rust Package
|
|
7631
|
-
["rust_package" /* RUST_PACKAGE */]: "Rust Package",
|
|
7632
|
-
// LinkedIn
|
|
7633
|
-
["linkedin_profile" /* LINKEDIN_PROFILE */]: "LinkedIn Profile",
|
|
7634
|
-
// Meta Ads
|
|
7635
|
-
["meta_ad" /* META_AD */]: "Meta Ad",
|
|
7636
|
-
// Google Ads
|
|
7637
|
-
["google_ad" /* GOOGLE_AD */]: "Google Ad",
|
|
7638
|
-
// Crypto / Onchain
|
|
7639
|
-
["contract_deployer" /* CONTRACT_DEPLOYER */]: "Contract Deployer"
|
|
7640
|
-
};
|
|
7641
|
-
var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
|
|
7642
|
-
// URL
|
|
7643
|
-
["urlscan" /* URLSCAN */]: "URLScan",
|
|
7644
|
-
["whois" /* WHOIS */]: "Whois",
|
|
7645
|
-
["rdap" /* RDAP */]: "RDAP",
|
|
7646
|
-
["http_content" /* HTTP_CONTENT */]: "HTTP Content",
|
|
7647
|
-
["node_js_network" /* NETWORK */]: "Network",
|
|
7648
|
-
["extension" /* EXTENSION */]: "Browser Extension",
|
|
7649
|
-
["playwright" /* PLAYWRIGHT */]: "Playwright",
|
|
7650
|
-
// Twitter
|
|
7651
|
-
["x_api" /* X_API */]: "X API",
|
|
7652
|
-
["socialdata_api" /* SOCIALDATA_API */]: "SocialData API",
|
|
7653
|
-
// Farcaster
|
|
7654
|
-
["neynar_api" /* NEYNAR_API */]: "Neynar API",
|
|
7655
|
-
// Telegram
|
|
7656
|
-
["telegram_api" /* TELEGRAM_API */]: "Telegram API",
|
|
7657
|
-
// Instagram
|
|
7658
|
-
["instagram_api" /* INSTAGRAM_API */]: "Instagram API",
|
|
7659
|
-
// Facebook
|
|
7660
|
-
["facebook_api" /* FACEBOOK_API */]: "Facebook API",
|
|
7661
|
-
// YouTube
|
|
7662
|
-
["youtube_api" /* YOUTUBE_API */]: "YouTube API",
|
|
7663
|
-
// Apple App Store
|
|
7664
|
-
["apple_app_store_api" /* APPLE_APP_STORE_API */]: "Apple App Store API",
|
|
7665
|
-
// Google Play Store
|
|
7666
|
-
["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: "Google Play Store API",
|
|
7667
|
-
// Mozilla
|
|
7668
|
-
["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: "Mozilla Add-ons API",
|
|
7669
|
-
// Reddit
|
|
7670
|
-
["reddit_api" /* REDDIT_API */]: "Reddit API",
|
|
7671
|
-
// Email
|
|
7672
|
-
["mails_api" /* MAILS_API */]: "Mails.so API",
|
|
7673
|
-
// Phone Number
|
|
7674
|
-
["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
|
|
7675
|
-
["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
|
|
7676
|
-
// DailyMotion
|
|
7677
|
-
["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
|
|
7678
|
-
// Vimeo
|
|
7679
|
-
["vimeo_api" /* VIMEO_API */]: "Vimeo API",
|
|
7680
|
-
// Stackblitz
|
|
7681
|
-
["stackblitz_api" /* STACKBLITZ_API */]: "Stackblitz API",
|
|
7682
|
-
// Leetcode
|
|
7683
|
-
["leetcode_api" /* LEETCODE_API */]: "Leetcode API",
|
|
7684
|
-
// NPM
|
|
7685
|
-
["npm_registry_api" /* NPM_REGISTRY_API */]: "NPM Registry API",
|
|
7686
|
-
// PyPI
|
|
7687
|
-
["pypi_registry_api" /* PYPI_REGISTRY_API */]: "PyPI Registry API",
|
|
7688
|
-
// Rust Package
|
|
7689
|
-
["crates_io_api" /* CRATES_IO_API */]: "Crates.io API",
|
|
7690
|
-
// LinkedIn
|
|
7691
|
-
["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: "Apify LinkedIn API",
|
|
7692
|
-
// Meta Ads
|
|
7693
|
-
["meta_ads_library" /* META_ADS_LIBRARY */]: "Meta Ads Library",
|
|
7694
|
-
// Google Ads
|
|
7695
|
-
["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: "Google Ads Transparency Center",
|
|
7696
|
-
// Crypto / Onchain
|
|
7697
|
-
["etherscan_api" /* ETHERSCAN_API */]: "Etherscan"
|
|
7698
|
-
};
|
|
7699
|
-
var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
|
|
7700
|
-
// URL-related sources
|
|
7701
|
-
["urlscan" /* URLSCAN */]: [
|
|
7702
|
-
"browser_capture" /* BROWSER_CAPTURE */,
|
|
7703
|
-
"geolocation_and_ip" /* GEOLOCATION_AND_IP */
|
|
7704
|
-
],
|
|
7705
|
-
["whois" /* WHOIS */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
|
|
7706
|
-
["rdap" /* RDAP */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
|
|
7707
|
-
["http_content" /* HTTP_CONTENT */]: [
|
|
7708
|
-
"content_and_metadata" /* CONTENT_AND_METADATA */
|
|
7709
|
-
],
|
|
7710
|
-
["node_js_network" /* NETWORK */]: [
|
|
7711
|
-
"dns" /* DNS */,
|
|
7712
|
-
"tls" /* TLS */,
|
|
7713
|
-
"tcp" /* TCP */
|
|
7714
|
-
],
|
|
7715
|
-
["extension" /* EXTENSION */]: [
|
|
7716
|
-
"browser_capture" /* BROWSER_CAPTURE */,
|
|
7717
|
-
"telegram_profile" /* TELEGRAM_PROFILE */,
|
|
7718
|
-
"linkedin_profile" /* LINKEDIN_PROFILE */,
|
|
7719
|
-
"instagram_profile" /* INSTAGRAM_PROFILE */,
|
|
7720
|
-
"meta_ad" /* META_AD */
|
|
7721
|
-
],
|
|
7722
|
-
["playwright" /* PLAYWRIGHT */]: [
|
|
7723
|
-
"browser_capture" /* BROWSER_CAPTURE */,
|
|
7724
|
-
"bilibili_video" /* BILIBILI_VIDEO */,
|
|
7725
|
-
"bilibili_profile" /* BILIBILI_PROFILE */,
|
|
7726
|
-
"telegram_profile" /* TELEGRAM_PROFILE */
|
|
7727
|
-
],
|
|
7728
|
-
// Twitter-related sources
|
|
7729
|
-
["x_api" /* X_API */]: [
|
|
7730
|
-
"post" /* TWITTER_POST */,
|
|
7731
|
-
"profile" /* TWITTER_PROFILE */,
|
|
7732
|
-
"twitter_followers" /* TWITTER_FOLLOWERS */
|
|
7733
|
-
],
|
|
7734
|
-
["socialdata_api" /* SOCIALDATA_API */]: [
|
|
7735
|
-
"post" /* TWITTER_POST */,
|
|
7736
|
-
"profile" /* TWITTER_PROFILE */,
|
|
7737
|
-
"twitter_followers" /* TWITTER_FOLLOWERS */
|
|
7738
|
-
],
|
|
7739
|
-
// Farcaster-related sources
|
|
7740
|
-
["neynar_api" /* NEYNAR_API */]: [
|
|
7741
|
-
"cast" /* FARCASTER_CAST */,
|
|
7742
|
-
"farcaster_profile" /* FARCASTER_PROFILE */,
|
|
7743
|
-
"channel" /* FARCASTER_CHANNEL */,
|
|
7744
|
-
"miniapp" /* FARCASTER_MINIAPP */
|
|
7745
|
-
],
|
|
7746
|
-
// Telegram-related sources
|
|
7747
|
-
["telegram_api" /* TELEGRAM_API */]: ["telegram_profile" /* TELEGRAM_PROFILE */],
|
|
7748
|
-
// Instagram-related sources
|
|
7749
|
-
["instagram_api" /* INSTAGRAM_API */]: ["instagram_profile" /* INSTAGRAM_PROFILE */],
|
|
7750
|
-
// Facebook-related sources
|
|
7751
|
-
["facebook_api" /* FACEBOOK_API */]: ["facebook_profile" /* FACEBOOK_PROFILE */],
|
|
7752
|
-
// YouTube-related sources
|
|
7753
|
-
["youtube_api" /* YOUTUBE_API */]: [
|
|
7754
|
-
"youtube_video" /* YOUTUBE_VIDEO */,
|
|
7755
|
-
"youtube_channel" /* YOUTUBE_CHANNEL */
|
|
7756
|
-
],
|
|
7757
|
-
// Apple App Store-related sources
|
|
7758
|
-
["apple_app_store_api" /* APPLE_APP_STORE_API */]: [
|
|
7759
|
-
"apple_app_store_listing" /* APPLE_APP_STORE_LISTING */
|
|
7760
|
-
],
|
|
7761
|
-
// Google Play Store-related sources
|
|
7762
|
-
["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: [
|
|
7763
|
-
"google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */
|
|
7764
|
-
],
|
|
7765
|
-
// Mozilla-related sources
|
|
7766
|
-
["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: ["mozilla_addon" /* MOZILLA_ADDON */],
|
|
7767
|
-
// Reddit-related sources
|
|
7768
|
-
["reddit_api" /* REDDIT_API */]: ["reddit_subreddit" /* REDDIT_SUBREDDIT */],
|
|
7769
|
-
// Email-related sources
|
|
7770
|
-
["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
|
|
7771
|
-
// Phone Number-related sources
|
|
7772
|
-
["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
|
|
7773
|
-
["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
|
|
7774
|
-
// DailyMotion-related sources
|
|
7775
|
-
["dailymotion_api" /* DAILYMOTION_API */]: [
|
|
7776
|
-
"dailymotion_video" /* DAILYMOTION_VIDEO */
|
|
7777
|
-
],
|
|
7778
|
-
// Vimeo-related sources
|
|
7779
|
-
["vimeo_api" /* VIMEO_API */]: [
|
|
7780
|
-
"vimeo_video" /* VIMEO_VIDEO */,
|
|
7781
|
-
"vimeo_profile" /* VIMEO_PROFILE */
|
|
7782
|
-
],
|
|
7783
|
-
// Stackblitz-related sources
|
|
7784
|
-
["stackblitz_api" /* STACKBLITZ_API */]: ["stackblitz_page" /* STACKBLITZ_PAGE */],
|
|
7785
|
-
// Leetcode-related sources
|
|
7786
|
-
["leetcode_api" /* LEETCODE_API */]: ["leetcode_page" /* LEETCODE_PAGE */],
|
|
7787
|
-
// NPM-related sources
|
|
7788
|
-
["npm_registry_api" /* NPM_REGISTRY_API */]: ["npm_package" /* NPM_PACKAGE */],
|
|
7789
|
-
// PyPI-related sources
|
|
7790
|
-
["pypi_registry_api" /* PYPI_REGISTRY_API */]: ["pypi_package" /* PYPI_PACKAGE */],
|
|
7791
|
-
// Rust Package-related sources
|
|
7792
|
-
["crates_io_api" /* CRATES_IO_API */]: ["rust_package" /* RUST_PACKAGE */],
|
|
7793
|
-
// LinkedIn-related sources
|
|
7794
|
-
["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: [
|
|
7795
|
-
"linkedin_profile" /* LINKEDIN_PROFILE */
|
|
7796
|
-
],
|
|
7797
|
-
// Meta Ads-related sources
|
|
7798
|
-
["meta_ads_library" /* META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
|
|
7799
|
-
// Google Ads-related sources
|
|
7800
|
-
["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: [
|
|
7801
|
-
"google_ad" /* GOOGLE_AD */
|
|
7802
|
-
],
|
|
7803
|
-
// Crypto / Onchain sources
|
|
7804
|
-
["etherscan_api" /* ETHERSCAN_API */]: ["contract_deployer" /* CONTRACT_DEPLOYER */]
|
|
7805
|
-
};
|
|
7806
7569
|
|
|
7807
|
-
// ../../
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
chunkArray: () => chunkArray,
|
|
7812
|
-
combineAndRemoveDuplicatesByKey: () => combineAndRemoveDuplicatesByKey,
|
|
7813
|
-
isArray: () => isArray,
|
|
7814
|
-
isEmptyArray: () => isEmptyArray,
|
|
7815
|
-
isNonEmptyArray: () => isNonEmptyArray,
|
|
7816
|
-
randomElement: () => randomElement,
|
|
7817
|
-
randomIndex: () => randomIndex,
|
|
7818
|
-
removeDuplicates: () => removeDuplicates,
|
|
7819
|
-
shuffleInPlace: () => shuffleInPlace,
|
|
7820
|
-
shuffled: () => shuffled
|
|
7821
|
-
});
|
|
7822
|
-
function isArray(value) {
|
|
7823
|
-
return Array.isArray(value);
|
|
7824
|
-
}
|
|
7825
|
-
function isEmptyArray(value) {
|
|
7826
|
-
return value.length === 0;
|
|
7827
|
-
}
|
|
7828
|
-
function isNonEmptyArray(value) {
|
|
7829
|
-
return value.length > 0;
|
|
7830
|
-
}
|
|
7831
|
-
function randomIndex(array) {
|
|
7832
|
-
return Math.floor(Math.random() * array.length);
|
|
7833
|
-
}
|
|
7834
|
-
function randomElement(array) {
|
|
7835
|
-
return array[randomIndex(array)];
|
|
7836
|
-
}
|
|
7837
|
-
function removeDuplicates(array) {
|
|
7838
|
-
return Array.from(new Set(array));
|
|
7839
|
-
}
|
|
7840
|
-
function combineAndRemoveDuplicatesByKey(arr1, arr2, uniqueKey) {
|
|
7841
|
-
const combinedArray = [...arr1, ...arr2];
|
|
7842
|
-
const uniqueObjects = new Map(
|
|
7843
|
-
combinedArray.map((item) => [item[uniqueKey], item])
|
|
7844
|
-
);
|
|
7845
|
-
return Array.from(uniqueObjects.values());
|
|
7846
|
-
}
|
|
7847
|
-
function chunkArray(array, chunkSize) {
|
|
7848
|
-
const chunks = [];
|
|
7849
|
-
for (let i = 0; i < array.length; i += chunkSize) {
|
|
7850
|
-
chunks.push(array.slice(i, i + chunkSize));
|
|
7851
|
-
}
|
|
7852
|
-
return chunks;
|
|
7853
|
-
}
|
|
7854
|
-
function shuffleInPlace(array) {
|
|
7855
|
-
for (let i = array.length - 1; i > 0; i--) {
|
|
7856
|
-
const j = Math.floor(Math.random() * (i + 1));
|
|
7857
|
-
[array[i], array[j]] = [array[j], array[i]];
|
|
7570
|
+
// ../../node_modules/@sindresorhus/slugify/node_modules/escape-string-regexp/index.js
|
|
7571
|
+
function escapeStringRegexp(string) {
|
|
7572
|
+
if (typeof string !== "string") {
|
|
7573
|
+
throw new TypeError("Expected a string");
|
|
7858
7574
|
}
|
|
7859
|
-
}
|
|
7860
|
-
function shuffled(array) {
|
|
7861
|
-
const newArray = array.slice();
|
|
7862
|
-
shuffleInPlace(newArray);
|
|
7863
|
-
return newArray;
|
|
7864
|
-
}
|
|
7865
|
-
function arraysEqual(a, b) {
|
|
7866
|
-
if (a.length !== b.length) return false;
|
|
7867
|
-
const sortedA = [...a].sort();
|
|
7868
|
-
const sortedB = [...b].sort();
|
|
7869
|
-
return sortedA.every((val, idx) => val === sortedB[idx]);
|
|
7575
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
7870
7576
|
}
|
|
7871
7577
|
|
|
7872
|
-
// ../../
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
isValidCronExpression: () => isValidCronExpression
|
|
7877
|
-
});
|
|
7878
|
-
var WEEKDAYS = [
|
|
7879
|
-
"Sunday",
|
|
7880
|
-
"Monday",
|
|
7881
|
-
"Tuesday",
|
|
7882
|
-
"Wednesday",
|
|
7883
|
-
"Thursday",
|
|
7884
|
-
"Friday",
|
|
7885
|
-
"Saturday"
|
|
7886
|
-
];
|
|
7887
|
-
var MONTHS = [
|
|
7888
|
-
"January",
|
|
7889
|
-
"February",
|
|
7890
|
-
"March",
|
|
7891
|
-
"April",
|
|
7892
|
-
"May",
|
|
7893
|
-
"June",
|
|
7894
|
-
"July",
|
|
7895
|
-
"August",
|
|
7896
|
-
"September",
|
|
7897
|
-
"October",
|
|
7898
|
-
"November",
|
|
7899
|
-
"December"
|
|
7900
|
-
];
|
|
7901
|
-
function cronToHumanReadable(cronExpression) {
|
|
7902
|
-
const [minute, hour, dayOfMonth, month, dayOfWeek2] = cronExpression.split(" ");
|
|
7903
|
-
let result = "Runs ";
|
|
7904
|
-
if (minute === "*") {
|
|
7905
|
-
result += "every minute ";
|
|
7906
|
-
} else if (minute.includes("/")) {
|
|
7907
|
-
const [, interval] = minute.split("/");
|
|
7908
|
-
result += `every ${interval} minutes `;
|
|
7909
|
-
} else {
|
|
7910
|
-
result += `at minute ${minute} `;
|
|
7911
|
-
}
|
|
7912
|
-
if (hour !== "*") {
|
|
7913
|
-
result += `past hour ${hour} `;
|
|
7914
|
-
}
|
|
7915
|
-
if (dayOfMonth !== "*") {
|
|
7916
|
-
result += `on the ${dayOfMonth}${getDaySuffix(
|
|
7917
|
-
parseInt(dayOfMonth)
|
|
7918
|
-
)} day of the month `;
|
|
7919
|
-
}
|
|
7920
|
-
if (month !== "*") {
|
|
7921
|
-
const monthNames = month.split(",").map((m) => MONTHS[parseInt(m) - 1]);
|
|
7922
|
-
result += `in ${monthNames.join(", ")} `;
|
|
7923
|
-
}
|
|
7924
|
-
if (dayOfWeek2 !== "*") {
|
|
7925
|
-
const dayNames = dayOfWeek2.split(",").map((d) => WEEKDAYS[parseInt(d)]);
|
|
7926
|
-
result += `on ${dayNames.join(", ")}`;
|
|
7927
|
-
}
|
|
7928
|
-
return result.trim();
|
|
7929
|
-
}
|
|
7930
|
-
function getDaySuffix(day) {
|
|
7931
|
-
if (day >= 11 && day <= 13) {
|
|
7932
|
-
return "th";
|
|
7933
|
-
}
|
|
7934
|
-
switch (day % 10) {
|
|
7935
|
-
case 1:
|
|
7936
|
-
return "st";
|
|
7937
|
-
case 2:
|
|
7938
|
-
return "nd";
|
|
7939
|
-
case 3:
|
|
7940
|
-
return "rd";
|
|
7941
|
-
default:
|
|
7942
|
-
return "th";
|
|
7943
|
-
}
|
|
7944
|
-
}
|
|
7945
|
-
function isValidCronExpression(cronExpression) {
|
|
7946
|
-
if (!cronExpression || typeof cronExpression !== "string") {
|
|
7947
|
-
return false;
|
|
7948
|
-
}
|
|
7949
|
-
const parts = cronExpression.trim().split(/\s+/);
|
|
7950
|
-
if (parts.length !== 5) {
|
|
7951
|
-
return false;
|
|
7578
|
+
// ../../node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp/index.js
|
|
7579
|
+
function escapeStringRegexp2(string) {
|
|
7580
|
+
if (typeof string !== "string") {
|
|
7581
|
+
throw new TypeError("Expected a string");
|
|
7952
7582
|
}
|
|
7953
|
-
|
|
7954
|
-
return isValidCronField(minute, 0, 59) && isValidCronField(hour, 0, 23) && isValidCronField(dayOfMonth, 1, 31) && isValidCronField(month, 1, 12) && isValidCronField(dayOfWeek2, 0, 7);
|
|
7955
|
-
}
|
|
7956
|
-
function isValidCronField(field, min, max) {
|
|
7957
|
-
if (!field) return false;
|
|
7958
|
-
if (field === "*") return true;
|
|
7959
|
-
if (field.includes("/")) {
|
|
7960
|
-
const [range, step] = field.split("/");
|
|
7961
|
-
const stepNum = parseInt(step);
|
|
7962
|
-
if (isNaN(stepNum) || stepNum <= 0) return false;
|
|
7963
|
-
if (range === "*") return true;
|
|
7964
|
-
return isValidCronField(range, min, max);
|
|
7965
|
-
}
|
|
7966
|
-
if (field.includes("-")) {
|
|
7967
|
-
const [start, end] = field.split("-");
|
|
7968
|
-
const startNum = parseInt(start);
|
|
7969
|
-
const endNum = parseInt(end);
|
|
7970
|
-
if (isNaN(startNum) || isNaN(endNum)) return false;
|
|
7971
|
-
return startNum >= min && startNum <= max && endNum >= min && endNum <= max && startNum <= endNum;
|
|
7972
|
-
}
|
|
7973
|
-
if (field.includes(",")) {
|
|
7974
|
-
const values = field.split(",");
|
|
7975
|
-
return values.every((value) => isValidCronField(value.trim(), min, max));
|
|
7976
|
-
}
|
|
7977
|
-
const num3 = parseInt(field);
|
|
7978
|
-
if (isNaN(num3)) return false;
|
|
7979
|
-
if (max === 7 && num3 === 7) return true;
|
|
7980
|
-
return num3 >= min && num3 <= max;
|
|
7981
|
-
}
|
|
7982
|
-
|
|
7983
|
-
// ../../internal/utils/src/object.ts
|
|
7984
|
-
var object_exports = {};
|
|
7985
|
-
__export(object_exports, {
|
|
7986
|
-
isDefined: () => isDefined,
|
|
7987
|
-
isDefinedAndNotNull: () => isDefinedAndNotNull,
|
|
7988
|
-
isNotNull: () => isNotNull
|
|
7989
|
-
});
|
|
7990
|
-
function isDefined(value) {
|
|
7991
|
-
return value !== void 0;
|
|
7992
|
-
}
|
|
7993
|
-
function isNotNull(value) {
|
|
7994
|
-
return value !== null;
|
|
7995
|
-
}
|
|
7996
|
-
function isDefinedAndNotNull(value) {
|
|
7997
|
-
return value !== null && value !== void 0;
|
|
7998
|
-
}
|
|
7999
|
-
|
|
8000
|
-
// ../../internal/utils/src/promise.ts
|
|
8001
|
-
var promise_exports = {};
|
|
8002
|
-
__export(promise_exports, {
|
|
8003
|
-
isPromiseSettledResultFulfilled: () => isPromiseSettledResultFulfilled,
|
|
8004
|
-
isPromiseSettledResultRejected: () => isPromiseSettledResultRejected
|
|
8005
|
-
});
|
|
8006
|
-
function isPromiseSettledResultFulfilled(result) {
|
|
8007
|
-
return result.status === "fulfilled";
|
|
8008
|
-
}
|
|
8009
|
-
function isPromiseSettledResultRejected(result) {
|
|
8010
|
-
return result.status === "rejected";
|
|
8011
|
-
}
|
|
8012
|
-
|
|
8013
|
-
// ../../internal/utils/src/url.ts
|
|
8014
|
-
var url_exports = {};
|
|
8015
|
-
__export(url_exports, {
|
|
8016
|
-
URL_REGEX: () => URL_REGEX,
|
|
8017
|
-
containsPunycode: () => containsPunycode,
|
|
8018
|
-
convertHttpsToHttp: () => convertHttpsToHttp,
|
|
8019
|
-
ensureHttpsPrefix: () => ensureHttpsPrefix,
|
|
8020
|
-
generateCanonicalIPFSUrl: () => generateCanonicalIPFSUrl,
|
|
8021
|
-
getDefangedUrl: () => getDefangedUrl,
|
|
8022
|
-
getDomain: () => getDomain,
|
|
8023
|
-
getFaviconUrl: () => getFaviconUrl,
|
|
8024
|
-
getHostname: () => getHostname,
|
|
8025
|
-
getNormalizedUrl: () => getNormalizedUrl,
|
|
8026
|
-
getParentDomains: () => getParentDomains,
|
|
8027
|
-
getRefangedUrl: () => getRefangedUrl,
|
|
8028
|
-
isEmail: () => isEmail,
|
|
8029
|
-
isUrl: () => isUrl,
|
|
8030
|
-
isWalrusSite: () => isWalrusSite,
|
|
8031
|
-
removeHttpProtocol: () => removeHttpProtocol,
|
|
8032
|
-
sanitizeHttpUrl: () => sanitizeHttpUrl,
|
|
8033
|
-
slugify: () => slugify,
|
|
8034
|
-
stripDomainWildcardPrefix: () => stripDomainWildcardPrefix,
|
|
8035
|
-
toUnicode: () => toUnicode2,
|
|
8036
|
-
trimDomainToLevels: () => trimDomainToLevels
|
|
8037
|
-
});
|
|
8038
|
-
|
|
8039
|
-
// ../../node_modules/@sindresorhus/slugify/node_modules/escape-string-regexp/index.js
|
|
8040
|
-
function escapeStringRegexp(string) {
|
|
8041
|
-
if (typeof string !== "string") {
|
|
8042
|
-
throw new TypeError("Expected a string");
|
|
8043
|
-
}
|
|
8044
|
-
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
8045
|
-
}
|
|
8046
|
-
|
|
8047
|
-
// ../../node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp/index.js
|
|
8048
|
-
function escapeStringRegexp2(string) {
|
|
8049
|
-
if (typeof string !== "string") {
|
|
8050
|
-
throw new TypeError("Expected a string");
|
|
8051
|
-
}
|
|
8052
|
-
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
7583
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
8053
7584
|
}
|
|
8054
7585
|
|
|
8055
7586
|
// ../../node_modules/@sindresorhus/transliterate/replacements.js
|
|
@@ -10128,472 +9659,1140 @@ var buildPatternSlug = (options) => {
|
|
|
10128
9659
|
}
|
|
10129
9660
|
return new RegExp(`[^${negationSetPattern}]+`, "g");
|
|
10130
9661
|
};
|
|
10131
|
-
function slugify(string, options) {
|
|
10132
|
-
if (typeof string !== "string") {
|
|
10133
|
-
throw new TypeError(`Expected a string, got \`${typeof string}\``);
|
|
10134
|
-
}
|
|
10135
|
-
options = __spreadValues({
|
|
10136
|
-
separator: "-",
|
|
10137
|
-
lowercase: true,
|
|
10138
|
-
decamelize: true,
|
|
10139
|
-
customReplacements: [],
|
|
10140
|
-
preserveLeadingUnderscore: false,
|
|
10141
|
-
preserveTrailingDash: false,
|
|
10142
|
-
preserveCharacters: []
|
|
10143
|
-
}, options);
|
|
10144
|
-
const shouldPrependUnderscore = options.preserveLeadingUnderscore && string.startsWith("_");
|
|
10145
|
-
const shouldAppendDash = options.preserveTrailingDash && string.endsWith("-");
|
|
10146
|
-
const customReplacements = new Map([
|
|
10147
|
-
...overridable_replacements_default,
|
|
10148
|
-
...options.customReplacements
|
|
10149
|
-
]);
|
|
10150
|
-
string = transliterate(string, { customReplacements });
|
|
10151
|
-
if (options.decamelize) {
|
|
10152
|
-
string = decamelize(string);
|
|
10153
|
-
}
|
|
10154
|
-
const patternSlug = buildPatternSlug(options);
|
|
10155
|
-
if (options.lowercase) {
|
|
10156
|
-
string = string.toLowerCase();
|
|
10157
|
-
}
|
|
10158
|
-
string = string.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g, "$1$2$3");
|
|
10159
|
-
string = string.replace(patternSlug, options.separator);
|
|
10160
|
-
string = string.replace(/\\/g, "");
|
|
10161
|
-
if (options.separator) {
|
|
10162
|
-
string = removeMootSeparators(string, options.separator);
|
|
10163
|
-
}
|
|
10164
|
-
if (shouldPrependUnderscore) {
|
|
10165
|
-
string = `_${string}`;
|
|
10166
|
-
}
|
|
10167
|
-
if (shouldAppendDash) {
|
|
10168
|
-
string = `${string}-`;
|
|
10169
|
-
}
|
|
10170
|
-
return string;
|
|
10171
|
-
}
|
|
9662
|
+
function slugify(string, options) {
|
|
9663
|
+
if (typeof string !== "string") {
|
|
9664
|
+
throw new TypeError(`Expected a string, got \`${typeof string}\``);
|
|
9665
|
+
}
|
|
9666
|
+
options = __spreadValues({
|
|
9667
|
+
separator: "-",
|
|
9668
|
+
lowercase: true,
|
|
9669
|
+
decamelize: true,
|
|
9670
|
+
customReplacements: [],
|
|
9671
|
+
preserveLeadingUnderscore: false,
|
|
9672
|
+
preserveTrailingDash: false,
|
|
9673
|
+
preserveCharacters: []
|
|
9674
|
+
}, options);
|
|
9675
|
+
const shouldPrependUnderscore = options.preserveLeadingUnderscore && string.startsWith("_");
|
|
9676
|
+
const shouldAppendDash = options.preserveTrailingDash && string.endsWith("-");
|
|
9677
|
+
const customReplacements = new Map([
|
|
9678
|
+
...overridable_replacements_default,
|
|
9679
|
+
...options.customReplacements
|
|
9680
|
+
]);
|
|
9681
|
+
string = transliterate(string, { customReplacements });
|
|
9682
|
+
if (options.decamelize) {
|
|
9683
|
+
string = decamelize(string);
|
|
9684
|
+
}
|
|
9685
|
+
const patternSlug = buildPatternSlug(options);
|
|
9686
|
+
if (options.lowercase) {
|
|
9687
|
+
string = string.toLowerCase();
|
|
9688
|
+
}
|
|
9689
|
+
string = string.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g, "$1$2$3");
|
|
9690
|
+
string = string.replace(patternSlug, options.separator);
|
|
9691
|
+
string = string.replace(/\\/g, "");
|
|
9692
|
+
if (options.separator) {
|
|
9693
|
+
string = removeMootSeparators(string, options.separator);
|
|
9694
|
+
}
|
|
9695
|
+
if (shouldPrependUnderscore) {
|
|
9696
|
+
string = `_${string}`;
|
|
9697
|
+
}
|
|
9698
|
+
if (shouldAppendDash) {
|
|
9699
|
+
string = `${string}-`;
|
|
9700
|
+
}
|
|
9701
|
+
return string;
|
|
9702
|
+
}
|
|
9703
|
+
|
|
9704
|
+
// ../asset-parse/src/model.ts
|
|
9705
|
+
var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
|
|
9706
|
+
AssetModel2["Addon"] = "addon";
|
|
9707
|
+
AssetModel2["App"] = "app";
|
|
9708
|
+
AssetModel2["Bot"] = "bot";
|
|
9709
|
+
AssetModel2["BusinessProfile"] = "business-profile";
|
|
9710
|
+
AssetModel2["Catalog"] = "catalog";
|
|
9711
|
+
AssetModel2["Collection"] = "collection";
|
|
9712
|
+
AssetModel2["Channel"] = "channel";
|
|
9713
|
+
AssetModel2["Group"] = "group";
|
|
9714
|
+
AssetModel2["Post"] = "post";
|
|
9715
|
+
AssetModel2["Profile"] = "profile";
|
|
9716
|
+
AssetModel2["Short"] = "short";
|
|
9717
|
+
AssetModel2["Video"] = "video";
|
|
9718
|
+
AssetModel2["Space"] = "space";
|
|
9719
|
+
AssetModel2["Issue"] = "issue";
|
|
9720
|
+
AssetModel2["PullRequest"] = "pull-request";
|
|
9721
|
+
AssetModel2["Discussion"] = "discussion";
|
|
9722
|
+
AssetModel2["Repository"] = "repository";
|
|
9723
|
+
AssetModel2["Article"] = "Article";
|
|
9724
|
+
AssetModel2["Comment"] = "comment";
|
|
9725
|
+
AssetModel2["List"] = "list";
|
|
9726
|
+
AssetModel2["Subreddit"] = "subreddit";
|
|
9727
|
+
AssetModel2["Community"] = "community";
|
|
9728
|
+
AssetModel2["MiniApp"] = "mini-app";
|
|
9729
|
+
AssetModel2["Developer"] = "developer";
|
|
9730
|
+
return AssetModel2;
|
|
9731
|
+
})(AssetModel || {});
|
|
9732
|
+
function isUrl(input) {
|
|
9733
|
+
if (input.trim() === "") {
|
|
9734
|
+
return false;
|
|
9735
|
+
}
|
|
9736
|
+
if (input.startsWith("/") || input.startsWith("#") || input.startsWith("?") || input.startsWith(".") || !input.includes(".")) {
|
|
9737
|
+
return false;
|
|
9738
|
+
}
|
|
9739
|
+
return URL.canParse(input) || URL.canParse(`https://${input}`);
|
|
9740
|
+
}
|
|
9741
|
+
function getNormalizedUrl(input) {
|
|
9742
|
+
if (!isUrl(input)) {
|
|
9743
|
+
throw new Error(`Invalid URL: ${input}`);
|
|
9744
|
+
}
|
|
9745
|
+
let url;
|
|
9746
|
+
try {
|
|
9747
|
+
url = new URL(input);
|
|
9748
|
+
} catch (e4) {
|
|
9749
|
+
try {
|
|
9750
|
+
url = new URL(`https://${input}`);
|
|
9751
|
+
} catch (e5) {
|
|
9752
|
+
throw new Error(`Invalid URL: ${input}`);
|
|
9753
|
+
}
|
|
9754
|
+
}
|
|
9755
|
+
const normalizedUrl = normalizeUrl(url.toString(), {
|
|
9756
|
+
defaultProtocol: "https"
|
|
9757
|
+
});
|
|
9758
|
+
try {
|
|
9759
|
+
return new URL(normalizedUrl);
|
|
9760
|
+
} catch (e4) {
|
|
9761
|
+
throw new Error(`Invalid URL: ${input}`);
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
var ensureHttpsPrefix = (url) => {
|
|
9765
|
+
if (!url.startsWith("http")) {
|
|
9766
|
+
return `https://${url}`;
|
|
9767
|
+
}
|
|
9768
|
+
return url.replace(/^https?:\/{1,2}/, "https://");
|
|
9769
|
+
};
|
|
9770
|
+
function getHostname(input) {
|
|
9771
|
+
try {
|
|
9772
|
+
return getNormalizedUrl(input).hostname;
|
|
9773
|
+
} catch (e4) {
|
|
9774
|
+
return null;
|
|
9775
|
+
}
|
|
9776
|
+
}
|
|
9777
|
+
function getParentDomains(input) {
|
|
9778
|
+
const domain = getHostname(input);
|
|
9779
|
+
if (!domain) {
|
|
9780
|
+
return [];
|
|
9781
|
+
}
|
|
9782
|
+
const subdomain = getSubdomain(domain, { mixedInputs: false });
|
|
9783
|
+
if (!subdomain) {
|
|
9784
|
+
return [domain];
|
|
9785
|
+
}
|
|
9786
|
+
const domainWithSuffix = getDomain(domain, { mixedInputs: false });
|
|
9787
|
+
if (!domainWithSuffix) {
|
|
9788
|
+
return [];
|
|
9789
|
+
}
|
|
9790
|
+
const parentDomains = [domainWithSuffix];
|
|
9791
|
+
const parentDomainParts = subdomain.split(".");
|
|
9792
|
+
for (let i = parentDomainParts.length - 1; i >= 0; i--) {
|
|
9793
|
+
const parentDomainPart = parentDomainParts.slice(i).join(".");
|
|
9794
|
+
parentDomains.push(`${parentDomainPart}.${domainWithSuffix}`);
|
|
9795
|
+
}
|
|
9796
|
+
return parentDomains.reverse();
|
|
9797
|
+
}
|
|
9798
|
+
function trimDomainToLevels(domain, options = { levels: 4 }) {
|
|
9799
|
+
var _a;
|
|
9800
|
+
const parsed = parse$1(domain);
|
|
9801
|
+
const eTLDPlusOne = (_a = parsed.domain) != null ? _a : "";
|
|
9802
|
+
const subdomains = domain.replace(/https?:\/\/(www\.)?/, "").split(".");
|
|
9803
|
+
const eTLDPlusOneIndex = subdomains.findIndex(
|
|
9804
|
+
(_, i) => subdomains.slice(i).join(".") === eTLDPlusOne
|
|
9805
|
+
);
|
|
9806
|
+
const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
|
|
9807
|
+
return trimmedSubdomains;
|
|
9808
|
+
}
|
|
9809
|
+
|
|
9810
|
+
// ../asset-parse/src/phone.ts
|
|
9811
|
+
var phone_exports = {};
|
|
9812
|
+
__export(phone_exports, {
|
|
9813
|
+
PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
|
|
9814
|
+
isPhoneNumber: () => isPhoneNumber,
|
|
9815
|
+
normalizePhoneNumber: () => normalizePhoneNumber
|
|
9816
|
+
});
|
|
9817
|
+
var PHONE_NUMBER_REGEX = /(?:\+?\d{1,4}[\s.-]?)?(?:\(\d{1,4}\)|\d{1,4})[\s.-]?\d{1,4}[\s.-]?\d{1,4}[\s.-]?\d{0,4}(?:\s*(?:ext|x|extension)[\s.]*\d{1,6})?/gi;
|
|
9818
|
+
function preparePhoneInput(input) {
|
|
9819
|
+
let s2 = input.trim();
|
|
9820
|
+
s2 = s2.replace(/^\s*tel:\s*(?:\/\/)?\s*/i, "");
|
|
9821
|
+
s2 = s2.trim();
|
|
9822
|
+
s2 = s2.replace(/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g, " ");
|
|
9823
|
+
s2 = s2.replace(/[\u2010\u2011\u2012\u2013\u2014\u2015\u2212\uFE58\uFE63\uFF0D]/g, "-");
|
|
9824
|
+
s2 = s2.replace(/\uFF0B/g, "+");
|
|
9825
|
+
s2 = s2.replace(/\uFF08/g, "(");
|
|
9826
|
+
s2 = s2.replace(/\uFF09/g, ")");
|
|
9827
|
+
return s2.trim();
|
|
9828
|
+
}
|
|
9829
|
+
function isAllSameDigit(digits2) {
|
|
9830
|
+
return /^(\d)\1+$/.test(digits2);
|
|
9831
|
+
}
|
|
9832
|
+
function isStrictlyMonotonicStep1(digits2) {
|
|
9833
|
+
if (digits2.length < 8) {
|
|
9834
|
+
return false;
|
|
9835
|
+
}
|
|
9836
|
+
let increasing = true;
|
|
9837
|
+
let decreasing = true;
|
|
9838
|
+
for (let i = 1; i < digits2.length; i++) {
|
|
9839
|
+
const curr = digits2.charCodeAt(i) - 48;
|
|
9840
|
+
const prev = digits2.charCodeAt(i - 1) - 48;
|
|
9841
|
+
if (curr !== prev + 1) {
|
|
9842
|
+
increasing = false;
|
|
9843
|
+
}
|
|
9844
|
+
if (curr !== prev - 1) {
|
|
9845
|
+
decreasing = false;
|
|
9846
|
+
}
|
|
9847
|
+
}
|
|
9848
|
+
return increasing || decreasing;
|
|
9849
|
+
}
|
|
9850
|
+
function isValidNanpNational10(d10) {
|
|
9851
|
+
if (d10.length !== 10) {
|
|
9852
|
+
return false;
|
|
9853
|
+
}
|
|
9854
|
+
const npaFirst = d10.charCodeAt(0) - 48;
|
|
9855
|
+
const nxxFirst = d10.charCodeAt(3) - 48;
|
|
9856
|
+
if (npaFirst < 2 || npaFirst > 9) {
|
|
9857
|
+
return false;
|
|
9858
|
+
}
|
|
9859
|
+
if (nxxFirst < 2 || nxxFirst > 9) {
|
|
9860
|
+
return false;
|
|
9861
|
+
}
|
|
9862
|
+
return true;
|
|
9863
|
+
}
|
|
9864
|
+
function isPlausiblePhoneDigits(withoutExt) {
|
|
9865
|
+
const hasPlus = withoutExt.startsWith("+");
|
|
9866
|
+
const d = withoutExt.replace(/\D/g, "");
|
|
9867
|
+
if (d.length < 8 || d.length > 15) {
|
|
9868
|
+
return false;
|
|
9869
|
+
}
|
|
9870
|
+
if (isAllSameDigit(d) || isStrictlyMonotonicStep1(d)) {
|
|
9871
|
+
return false;
|
|
9872
|
+
}
|
|
9873
|
+
const onlyDigits = /^\d+$/.test(withoutExt);
|
|
9874
|
+
if (hasPlus) {
|
|
9875
|
+
if (d.length === 11 && d.startsWith("1")) {
|
|
9876
|
+
return isValidNanpNational10(d.slice(1));
|
|
9877
|
+
}
|
|
9878
|
+
return true;
|
|
9879
|
+
}
|
|
9880
|
+
if (onlyDigits) {
|
|
9881
|
+
if (d.length === 10) {
|
|
9882
|
+
return isValidNanpNational10(d);
|
|
9883
|
+
}
|
|
9884
|
+
if (d.length === 11 && d.startsWith("1")) {
|
|
9885
|
+
return isValidNanpNational10(d.slice(1));
|
|
9886
|
+
}
|
|
9887
|
+
if (d.length === 11 && d.startsWith("0")) {
|
|
9888
|
+
return true;
|
|
9889
|
+
}
|
|
9890
|
+
return false;
|
|
9891
|
+
}
|
|
9892
|
+
if (d.length === 10) {
|
|
9893
|
+
return isValidNanpNational10(d);
|
|
9894
|
+
}
|
|
9895
|
+
if (d.length === 11 && d.startsWith("1")) {
|
|
9896
|
+
return isValidNanpNational10(d.slice(1));
|
|
9897
|
+
}
|
|
9898
|
+
if (d.length === 11 && d.startsWith("0")) {
|
|
9899
|
+
return true;
|
|
9900
|
+
}
|
|
9901
|
+
if (d.length >= 12 && d.length <= 15) {
|
|
9902
|
+
return true;
|
|
9903
|
+
}
|
|
9904
|
+
return false;
|
|
9905
|
+
}
|
|
9906
|
+
function isPhoneNumber(input) {
|
|
9907
|
+
const trimmed = preparePhoneInput(input);
|
|
9908
|
+
if (trimmed === "") {
|
|
9909
|
+
return false;
|
|
9910
|
+
}
|
|
9911
|
+
if (!/^[+\d(]/.test(trimmed)) {
|
|
9912
|
+
return false;
|
|
9913
|
+
}
|
|
9914
|
+
const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
|
|
9915
|
+
if (/[a-zA-Z]/.test(withoutExt)) {
|
|
9916
|
+
return false;
|
|
9917
|
+
}
|
|
9918
|
+
const hasPhoneMarker = /[+()\s-]/.test(trimmed);
|
|
9919
|
+
const isPureDotSeparated = /^\d+(\.\d+)+$/.test(trimmed);
|
|
9920
|
+
if (isPureDotSeparated && !hasPhoneMarker) {
|
|
9921
|
+
return false;
|
|
9922
|
+
}
|
|
9923
|
+
const phoneRegex = /^(?:\+?\d{1,4}[\s.-]?)?(?:\(\d{1,4}\)|\d{1,4})[\s.-]?\d{1,4}[\s.-]?\d{1,4}[\s.-]?\d{0,4}(?:\s*(?:ext|x|extension)[\s.]*\d{1,6})?$/i;
|
|
9924
|
+
if (!phoneRegex.test(trimmed)) {
|
|
9925
|
+
return false;
|
|
9926
|
+
}
|
|
9927
|
+
return isPlausiblePhoneDigits(withoutExt);
|
|
9928
|
+
}
|
|
9929
|
+
function normalizePhoneNumber(phone) {
|
|
9930
|
+
const trimmed = preparePhoneInput(phone);
|
|
9931
|
+
const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
|
|
9932
|
+
const hasPlus = withoutExt.startsWith("+");
|
|
9933
|
+
const digitsOnly = withoutExt.replace(/\D/g, "");
|
|
9934
|
+
return hasPlus ? `+${digitsOnly}` : digitsOnly;
|
|
9935
|
+
}
|
|
9936
|
+
|
|
9937
|
+
// ../../internal/utils/src/punycode.ts
|
|
9938
|
+
var maxInt = 2147483647;
|
|
9939
|
+
var base = 36;
|
|
9940
|
+
var tMin = 1;
|
|
9941
|
+
var tMax = 26;
|
|
9942
|
+
var skew = 38;
|
|
9943
|
+
var damp = 700;
|
|
9944
|
+
var initialBias = 72;
|
|
9945
|
+
var initialN = 128;
|
|
9946
|
+
var delimiter = "-";
|
|
9947
|
+
var regexPunycode = /^xn--/;
|
|
9948
|
+
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
9949
|
+
var errors = {
|
|
9950
|
+
overflow: "Overflow: input needs wider integers to process",
|
|
9951
|
+
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
9952
|
+
"invalid-input": "Invalid input"
|
|
9953
|
+
};
|
|
9954
|
+
var baseMinusTMin = base - tMin;
|
|
9955
|
+
var floor = Math.floor;
|
|
9956
|
+
function error(type) {
|
|
9957
|
+
throw new RangeError(errors[type]);
|
|
9958
|
+
}
|
|
9959
|
+
function mapDomain(domain, callback) {
|
|
9960
|
+
const parts = domain.split("@");
|
|
9961
|
+
let result = "";
|
|
9962
|
+
if (parts.length > 1) {
|
|
9963
|
+
result = parts[0] + "@";
|
|
9964
|
+
domain = parts[1];
|
|
9965
|
+
}
|
|
9966
|
+
domain = domain.replace(regexSeparators, ".");
|
|
9967
|
+
const labels = domain.split(".");
|
|
9968
|
+
const encoded = labels.map(callback).join(".");
|
|
9969
|
+
return result + encoded;
|
|
9970
|
+
}
|
|
9971
|
+
function basicToDigit(codePoint) {
|
|
9972
|
+
if (codePoint >= 48 && codePoint < 58) {
|
|
9973
|
+
return 26 + (codePoint - 48);
|
|
9974
|
+
}
|
|
9975
|
+
if (codePoint >= 65 && codePoint < 91) {
|
|
9976
|
+
return codePoint - 65;
|
|
9977
|
+
}
|
|
9978
|
+
if (codePoint >= 97 && codePoint < 123) {
|
|
9979
|
+
return codePoint - 97;
|
|
9980
|
+
}
|
|
9981
|
+
return base;
|
|
9982
|
+
}
|
|
9983
|
+
function adapt(delta, numPoints, firstTime) {
|
|
9984
|
+
let k4 = 0;
|
|
9985
|
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
9986
|
+
delta += floor(delta / numPoints);
|
|
9987
|
+
for (
|
|
9988
|
+
;
|
|
9989
|
+
/* no initialization */
|
|
9990
|
+
delta > baseMinusTMin * tMax >> 1;
|
|
9991
|
+
k4 += base
|
|
9992
|
+
) {
|
|
9993
|
+
delta = floor(delta / baseMinusTMin);
|
|
9994
|
+
}
|
|
9995
|
+
return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
9996
|
+
}
|
|
9997
|
+
function decode(input) {
|
|
9998
|
+
const output = [];
|
|
9999
|
+
const inputLength = input.length;
|
|
10000
|
+
let i = 0;
|
|
10001
|
+
let n2 = initialN;
|
|
10002
|
+
let bias2 = initialBias;
|
|
10003
|
+
let basic = input.lastIndexOf(delimiter);
|
|
10004
|
+
if (basic < 0) {
|
|
10005
|
+
basic = 0;
|
|
10006
|
+
}
|
|
10007
|
+
for (let j = 0; j < basic; ++j) {
|
|
10008
|
+
if (input.charCodeAt(j) >= 128) {
|
|
10009
|
+
error("not-basic");
|
|
10010
|
+
}
|
|
10011
|
+
output.push(input.charCodeAt(j));
|
|
10012
|
+
}
|
|
10013
|
+
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
|
|
10014
|
+
const oldi = i;
|
|
10015
|
+
for (let w = 1, k4 = base; ; k4 += base) {
|
|
10016
|
+
if (index >= inputLength) {
|
|
10017
|
+
error("invalid-input");
|
|
10018
|
+
}
|
|
10019
|
+
const digit = basicToDigit(input.charCodeAt(index++));
|
|
10020
|
+
if (digit >= base) {
|
|
10021
|
+
error("invalid-input");
|
|
10022
|
+
}
|
|
10023
|
+
if (digit > floor((maxInt - i) / w)) {
|
|
10024
|
+
error("overflow");
|
|
10025
|
+
}
|
|
10026
|
+
i += digit * w;
|
|
10027
|
+
const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
|
|
10028
|
+
if (digit < t) {
|
|
10029
|
+
break;
|
|
10030
|
+
}
|
|
10031
|
+
const baseMinusT = base - t;
|
|
10032
|
+
if (w > floor(maxInt / baseMinusT)) {
|
|
10033
|
+
error("overflow");
|
|
10034
|
+
}
|
|
10035
|
+
w *= baseMinusT;
|
|
10036
|
+
}
|
|
10037
|
+
const out = output.length + 1;
|
|
10038
|
+
bias2 = adapt(i - oldi, out, oldi == 0);
|
|
10039
|
+
if (floor(i / out) > maxInt - n2) {
|
|
10040
|
+
error("overflow");
|
|
10041
|
+
}
|
|
10042
|
+
n2 += floor(i / out);
|
|
10043
|
+
i %= out;
|
|
10044
|
+
output.splice(i++, 0, n2);
|
|
10045
|
+
}
|
|
10046
|
+
return String.fromCodePoint(...output);
|
|
10047
|
+
}
|
|
10048
|
+
function toUnicode(input) {
|
|
10049
|
+
return mapDomain(input, function(string) {
|
|
10050
|
+
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
10051
|
+
});
|
|
10052
|
+
}
|
|
10053
|
+
|
|
10054
|
+
// ../../internal/utils/src/url.ts
|
|
10055
|
+
function isEmail(input) {
|
|
10056
|
+
if (input.trim() === "") {
|
|
10057
|
+
return false;
|
|
10058
|
+
}
|
|
10059
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
10060
|
+
return emailRegex.test(input);
|
|
10061
|
+
}
|
|
10062
|
+
function removeHttpProtocol(input) {
|
|
10063
|
+
return input.replace(/^https?:\/\//, "");
|
|
10064
|
+
}
|
|
10065
|
+
function stripDomainWildcardPrefix(domain) {
|
|
10066
|
+
const trimmedDomain = domain.trim();
|
|
10067
|
+
const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
|
|
10068
|
+
return strippedDomain.length > 0 ? strippedDomain : null;
|
|
10069
|
+
}
|
|
10070
|
+
function getDefangedUrl(input) {
|
|
10071
|
+
if (!isUrl(input)) {
|
|
10072
|
+
console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
|
|
10073
|
+
return input;
|
|
10074
|
+
}
|
|
10075
|
+
return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
|
|
10076
|
+
}
|
|
10077
|
+
function getRefangedUrl(input) {
|
|
10078
|
+
return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
|
|
10079
|
+
}
|
|
10080
|
+
function containsPunycode(url) {
|
|
10081
|
+
return url.indexOf("xn--") !== -1;
|
|
10082
|
+
}
|
|
10083
|
+
function toUnicode2(url) {
|
|
10084
|
+
return toUnicode(url);
|
|
10085
|
+
}
|
|
10086
|
+
function convertHttpsToHttp(url) {
|
|
10087
|
+
if (url.startsWith("https://")) {
|
|
10088
|
+
const httpUrl = new URL(url);
|
|
10089
|
+
httpUrl.protocol = "http:";
|
|
10090
|
+
return httpUrl.toString();
|
|
10091
|
+
}
|
|
10092
|
+
throw new Error(`URL is not HTTPS: ${url}`);
|
|
10093
|
+
}
|
|
10094
|
+
function generateCanonicalIPFSUrl(content) {
|
|
10095
|
+
if (!content) {
|
|
10096
|
+
return content;
|
|
10097
|
+
}
|
|
10098
|
+
if (content.includes("ipfs.io")) {
|
|
10099
|
+
return content;
|
|
10100
|
+
}
|
|
10101
|
+
if (content.startsWith("Qm") || content.startsWith("bafy")) {
|
|
10102
|
+
return `ipfs.io/ipfs/${content}`;
|
|
10103
|
+
}
|
|
10104
|
+
return content;
|
|
10105
|
+
}
|
|
10106
|
+
function isWalrusSite(content) {
|
|
10107
|
+
return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
|
|
10108
|
+
}
|
|
10109
|
+
function getFaviconUrl(content) {
|
|
10110
|
+
const normalizedUrl = getNormalizedUrl(content);
|
|
10111
|
+
return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
|
|
10112
|
+
}
|
|
10113
|
+
function sanitizeHttpUrl(value) {
|
|
10114
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
10115
|
+
return null;
|
|
10116
|
+
}
|
|
10117
|
+
try {
|
|
10118
|
+
const parsed = new URL(value);
|
|
10119
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
10120
|
+
return null;
|
|
10121
|
+
}
|
|
10122
|
+
return parsed.toString();
|
|
10123
|
+
} catch (e4) {
|
|
10124
|
+
return null;
|
|
10125
|
+
}
|
|
10126
|
+
}
|
|
10127
|
+
var SCHEME_PREFIX_REGEX = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
10128
|
+
function getPublicHostname(input) {
|
|
10129
|
+
try {
|
|
10130
|
+
const trimmed = input.trim();
|
|
10131
|
+
const hasHttpScheme = /^https?:\/\//i.test(trimmed);
|
|
10132
|
+
if (!hasHttpScheme && SCHEME_PREFIX_REGEX.test(trimmed)) {
|
|
10133
|
+
return null;
|
|
10134
|
+
}
|
|
10135
|
+
const withScheme = hasHttpScheme ? trimmed : `https://${trimmed}`;
|
|
10136
|
+
const afterScheme = withScheme.replace(SCHEME_PREFIX_REGEX, "");
|
|
10137
|
+
const authority = afterScheme.split(/[/?#\\]/)[0];
|
|
10138
|
+
const remainder = afterScheme.slice(authority.length);
|
|
10139
|
+
if (remainder !== "" && remainder !== "/") {
|
|
10140
|
+
return null;
|
|
10141
|
+
}
|
|
10142
|
+
if (!/^[\p{L}\p{N}.-]+$/u.test(authority)) {
|
|
10143
|
+
return null;
|
|
10144
|
+
}
|
|
10145
|
+
const url = new URL(withScheme);
|
|
10146
|
+
const host = url.hostname.toLowerCase().replace(/\.$/, "");
|
|
10147
|
+
if (host.split(".").includes("")) {
|
|
10148
|
+
return null;
|
|
10149
|
+
}
|
|
10150
|
+
const parsed = parse$1(host);
|
|
10151
|
+
if (parsed.isIp || !parsed.isIcann || !parsed.domain) {
|
|
10152
|
+
return null;
|
|
10153
|
+
}
|
|
10154
|
+
return host;
|
|
10155
|
+
} catch (e4) {
|
|
10156
|
+
return null;
|
|
10157
|
+
}
|
|
10158
|
+
}
|
|
10159
|
+
var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
|
|
10160
|
+
|
|
10161
|
+
// ../../internal/utils/src/enrichments.ts
|
|
10162
|
+
var enrichments_exports = {};
|
|
10163
|
+
__export(enrichments_exports, {
|
|
10164
|
+
ASSET_SCAN_ENRICHMENT_SOURCE_LABELS: () => ASSET_SCAN_ENRICHMENT_SOURCE_LABELS,
|
|
10165
|
+
ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES: () => ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES,
|
|
10166
|
+
ASSET_SCAN_ENRICHMENT_TYPE_LABELS: () => ASSET_SCAN_ENRICHMENT_TYPE_LABELS,
|
|
10167
|
+
AssetScanEnrichmentSource: () => AssetScanEnrichmentSource,
|
|
10168
|
+
AssetScanEnrichmentType: () => AssetScanEnrichmentType
|
|
10169
|
+
});
|
|
10170
|
+
var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
|
|
10171
|
+
AssetScanEnrichmentType2["CONTENT_AND_METADATA"] = "content_and_metadata";
|
|
10172
|
+
AssetScanEnrichmentType2["BROWSER_CAPTURE"] = "browser_capture";
|
|
10173
|
+
AssetScanEnrichmentType2["OWNERSHIP_AND_REGISTRATION"] = "ownership_and_registration";
|
|
10174
|
+
AssetScanEnrichmentType2["GEOLOCATION_AND_IP"] = "geolocation_and_ip";
|
|
10175
|
+
AssetScanEnrichmentType2["DNS"] = "dns";
|
|
10176
|
+
AssetScanEnrichmentType2["TLS"] = "tls";
|
|
10177
|
+
AssetScanEnrichmentType2["TCP"] = "tcp";
|
|
10178
|
+
AssetScanEnrichmentType2["HOSTNAME_FIRST_SEEN"] = "hostname_first_seen";
|
|
10179
|
+
AssetScanEnrichmentType2["TWITTER_POST"] = "post";
|
|
10180
|
+
AssetScanEnrichmentType2["TWITTER_PROFILE"] = "profile";
|
|
10181
|
+
AssetScanEnrichmentType2["TWITTER_FOLLOWERS"] = "twitter_followers";
|
|
10182
|
+
AssetScanEnrichmentType2["FARCASTER_CAST"] = "cast";
|
|
10183
|
+
AssetScanEnrichmentType2["FARCASTER_PROFILE"] = "farcaster_profile";
|
|
10184
|
+
AssetScanEnrichmentType2["FARCASTER_CHANNEL"] = "channel";
|
|
10185
|
+
AssetScanEnrichmentType2["FARCASTER_MINIAPP"] = "miniapp";
|
|
10186
|
+
AssetScanEnrichmentType2["TELEGRAM_PROFILE"] = "telegram_profile";
|
|
10187
|
+
AssetScanEnrichmentType2["INSTAGRAM_PROFILE"] = "instagram_profile";
|
|
10188
|
+
AssetScanEnrichmentType2["FACEBOOK_PROFILE"] = "facebook_profile";
|
|
10189
|
+
AssetScanEnrichmentType2["YOUTUBE_VIDEO"] = "youtube_video";
|
|
10190
|
+
AssetScanEnrichmentType2["YOUTUBE_CHANNEL"] = "youtube_channel";
|
|
10191
|
+
AssetScanEnrichmentType2["APPLE_APP_STORE_LISTING"] = "apple_app_store_listing";
|
|
10192
|
+
AssetScanEnrichmentType2["GOOGLE_PLAY_STORE_LISTING"] = "google_play_store_listing";
|
|
10193
|
+
AssetScanEnrichmentType2["MOZILLA_ADDON"] = "mozilla_addon";
|
|
10194
|
+
AssetScanEnrichmentType2["GITHUB_COMMENT"] = "github_comment";
|
|
10195
|
+
AssetScanEnrichmentType2["REDDIT_SUBREDDIT"] = "reddit_subreddit";
|
|
10196
|
+
AssetScanEnrichmentType2["EMAIL_VALIDATION"] = "email_validation";
|
|
10197
|
+
AssetScanEnrichmentType2["PHONE_LOOKUP"] = "phone_lookup";
|
|
10198
|
+
AssetScanEnrichmentType2["BILIBILI_VIDEO"] = "bilibili_video";
|
|
10199
|
+
AssetScanEnrichmentType2["BILIBILI_PROFILE"] = "bilibili_profile";
|
|
10200
|
+
AssetScanEnrichmentType2["DAILYMOTION_VIDEO"] = "dailymotion_video";
|
|
10201
|
+
AssetScanEnrichmentType2["VIMEO_VIDEO"] = "vimeo_video";
|
|
10202
|
+
AssetScanEnrichmentType2["VIMEO_PROFILE"] = "vimeo_profile";
|
|
10203
|
+
AssetScanEnrichmentType2["STACKBLITZ_PAGE"] = "stackblitz_page";
|
|
10204
|
+
AssetScanEnrichmentType2["LEETCODE_PAGE"] = "leetcode_page";
|
|
10205
|
+
AssetScanEnrichmentType2["TUMBLR_BLOG"] = "tumblr_blog";
|
|
10206
|
+
AssetScanEnrichmentType2["TUMBLR_POST"] = "tumblr_post";
|
|
10207
|
+
AssetScanEnrichmentType2["TUMBLR_COMMUNITY"] = "tumblr_community";
|
|
10208
|
+
AssetScanEnrichmentType2["NPM_PACKAGE"] = "npm_package";
|
|
10209
|
+
AssetScanEnrichmentType2["PYPI_PACKAGE"] = "pypi_package";
|
|
10210
|
+
AssetScanEnrichmentType2["RUST_PACKAGE"] = "rust_package";
|
|
10211
|
+
AssetScanEnrichmentType2["LINKEDIN_PROFILE"] = "linkedin_profile";
|
|
10212
|
+
AssetScanEnrichmentType2["PUMP_FUN_TOKEN"] = "pump_fun_token";
|
|
10213
|
+
AssetScanEnrichmentType2["META_AD"] = "meta_ad";
|
|
10214
|
+
AssetScanEnrichmentType2["GOOGLE_AD"] = "google_ad";
|
|
10215
|
+
AssetScanEnrichmentType2["ADLIBRARY_AD"] = "adlibrary_ad";
|
|
10216
|
+
AssetScanEnrichmentType2["CONTRACT_DEPLOYER"] = "contract_deployer";
|
|
10217
|
+
AssetScanEnrichmentType2["THREAT_INTEL"] = "threat_intel";
|
|
10218
|
+
AssetScanEnrichmentType2["LIST_MEMBERSHIP"] = "list_membership";
|
|
10219
|
+
AssetScanEnrichmentType2["THREAT_SCORE"] = "threat_score";
|
|
10220
|
+
return AssetScanEnrichmentType2;
|
|
10221
|
+
})(AssetScanEnrichmentType || {});
|
|
10222
|
+
var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) => {
|
|
10223
|
+
AssetScanEnrichmentSource2["URLSCAN"] = "urlscan";
|
|
10224
|
+
AssetScanEnrichmentSource2["WHOIS"] = "whois";
|
|
10225
|
+
AssetScanEnrichmentSource2["RDAP"] = "rdap";
|
|
10226
|
+
AssetScanEnrichmentSource2["HTTP_CONTENT"] = "http_content";
|
|
10227
|
+
AssetScanEnrichmentSource2["NETWORK"] = "node_js_network";
|
|
10228
|
+
AssetScanEnrichmentSource2["EXTENSION"] = "extension";
|
|
10229
|
+
AssetScanEnrichmentSource2["PLAYWRIGHT"] = "playwright";
|
|
10230
|
+
AssetScanEnrichmentSource2["CHAINPATROL_BROWSER"] = "chainpatrol_browser";
|
|
10231
|
+
AssetScanEnrichmentSource2["STEEL_BROWSER"] = "steel_browser";
|
|
10232
|
+
AssetScanEnrichmentSource2["X_API"] = "x_api";
|
|
10233
|
+
AssetScanEnrichmentSource2["SOCIALDATA_API"] = "socialdata_api";
|
|
10234
|
+
AssetScanEnrichmentSource2["NEYNAR_API"] = "neynar_api";
|
|
10235
|
+
AssetScanEnrichmentSource2["TELEGRAM_API"] = "telegram_api";
|
|
10236
|
+
AssetScanEnrichmentSource2["INSTAGRAM_API"] = "instagram_api";
|
|
10237
|
+
AssetScanEnrichmentSource2["FACEBOOK_API"] = "facebook_api";
|
|
10238
|
+
AssetScanEnrichmentSource2["YOUTUBE_API"] = "youtube_api";
|
|
10239
|
+
AssetScanEnrichmentSource2["APPLE_APP_STORE_API"] = "apple_app_store_api";
|
|
10240
|
+
AssetScanEnrichmentSource2["GOOGLE_PLAY_STORE_API"] = "google_play_store_api";
|
|
10241
|
+
AssetScanEnrichmentSource2["MOZILLA_ADDONS_API"] = "mozilla_addons_api";
|
|
10242
|
+
AssetScanEnrichmentSource2["GITHUB_API"] = "github_api";
|
|
10243
|
+
AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
|
|
10244
|
+
AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
|
|
10245
|
+
AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
|
|
10246
|
+
AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
|
|
10247
|
+
AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
|
|
10248
|
+
AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
|
|
10249
|
+
AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
|
|
10250
|
+
AssetScanEnrichmentSource2["LEETCODE_API"] = "leetcode_api";
|
|
10251
|
+
AssetScanEnrichmentSource2["TUMBLR_API"] = "tumblr_api";
|
|
10252
|
+
AssetScanEnrichmentSource2["NPM_REGISTRY_API"] = "npm_registry_api";
|
|
10253
|
+
AssetScanEnrichmentSource2["PYPI_REGISTRY_API"] = "pypi_registry_api";
|
|
10254
|
+
AssetScanEnrichmentSource2["CRATES_IO_API"] = "crates_io_api";
|
|
10255
|
+
AssetScanEnrichmentSource2["APIFY_LINKEDIN_API"] = "apify_linkedin_api";
|
|
10256
|
+
AssetScanEnrichmentSource2["PUMP_FUN_API"] = "pump_fun_api";
|
|
10257
|
+
AssetScanEnrichmentSource2["META_ADS_LIBRARY"] = "meta_ads_library";
|
|
10258
|
+
AssetScanEnrichmentSource2["STEEL_META_ADS_LIBRARY"] = "steel_meta_ads_library";
|
|
10259
|
+
AssetScanEnrichmentSource2["GOOGLE_ADS_TRANSPARENCY_CENTER"] = "google_ads_transparency_center";
|
|
10260
|
+
AssetScanEnrichmentSource2["ADLIBRARY"] = "adlibrary";
|
|
10261
|
+
AssetScanEnrichmentSource2["ETHERSCAN_API"] = "etherscan_api";
|
|
10262
|
+
AssetScanEnrichmentSource2["GOOGLE_WEB_RISK"] = "google_web_risk";
|
|
10263
|
+
AssetScanEnrichmentSource2["SEAL_ISAC"] = "seal_isac";
|
|
10264
|
+
AssetScanEnrichmentSource2["ETH_PHISHING_DETECT"] = "eth_phishing_detect";
|
|
10265
|
+
AssetScanEnrichmentSource2["POLKADOT_PHISHING"] = "polkadot_phishing";
|
|
10266
|
+
AssetScanEnrichmentSource2["TRANCO"] = "tranco";
|
|
10267
|
+
AssetScanEnrichmentSource2["UMBRELLA"] = "umbrella";
|
|
10268
|
+
AssetScanEnrichmentSource2["OPEN_PAGE_RANK"] = "open_page_rank";
|
|
10269
|
+
AssetScanEnrichmentSource2["DEFILLAMA"] = "defillama";
|
|
10270
|
+
AssetScanEnrichmentSource2["VERCEL_DOMAINS"] = "vercel_domains";
|
|
10271
|
+
return AssetScanEnrichmentSource2;
|
|
10272
|
+
})(AssetScanEnrichmentSource || {});
|
|
10273
|
+
var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
|
|
10274
|
+
["content_and_metadata" /* CONTENT_AND_METADATA */]: "Content and Metadata",
|
|
10275
|
+
["post" /* TWITTER_POST */]: "Post",
|
|
10276
|
+
["profile" /* TWITTER_PROFILE */]: "Profile",
|
|
10277
|
+
["twitter_followers" /* TWITTER_FOLLOWERS */]: "Twitter Followers",
|
|
10278
|
+
["browser_capture" /* BROWSER_CAPTURE */]: "Browser Capture",
|
|
10279
|
+
["geolocation_and_ip" /* GEOLOCATION_AND_IP */]: "Geolocation and IP",
|
|
10280
|
+
["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */]: "Ownership and Registration",
|
|
10281
|
+
["dns" /* DNS */]: "DNS Lookup",
|
|
10282
|
+
["tls" /* TLS */]: "TLS Connection Info",
|
|
10283
|
+
["tcp" /* TCP */]: "TCP Connection Info",
|
|
10284
|
+
["hostname_first_seen" /* HOSTNAME_FIRST_SEEN */]: "Hostname First Seen",
|
|
10285
|
+
// Farcaster
|
|
10286
|
+
["cast" /* FARCASTER_CAST */]: "Farcaster Cast",
|
|
10287
|
+
["farcaster_profile" /* FARCASTER_PROFILE */]: "Farcaster Profile",
|
|
10288
|
+
["channel" /* FARCASTER_CHANNEL */]: "Farcaster Channel",
|
|
10289
|
+
["miniapp" /* FARCASTER_MINIAPP */]: "Farcaster MiniApp",
|
|
10290
|
+
// Telegram
|
|
10291
|
+
["telegram_profile" /* TELEGRAM_PROFILE */]: "Telegram Profile",
|
|
10292
|
+
// Instagram
|
|
10293
|
+
["instagram_profile" /* INSTAGRAM_PROFILE */]: "Instagram Profile",
|
|
10294
|
+
// Facebook
|
|
10295
|
+
["facebook_profile" /* FACEBOOK_PROFILE */]: "Facebook Profile",
|
|
10296
|
+
// YouTube
|
|
10297
|
+
["youtube_video" /* YOUTUBE_VIDEO */]: "YouTube Video",
|
|
10298
|
+
["youtube_channel" /* YOUTUBE_CHANNEL */]: "YouTube Channel",
|
|
10299
|
+
// Apple App Store
|
|
10300
|
+
["apple_app_store_listing" /* APPLE_APP_STORE_LISTING */]: "Apple App Store Listing",
|
|
10301
|
+
// Google Play Store
|
|
10302
|
+
["google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */]: "Google Play Store Listing",
|
|
10303
|
+
// Mozilla
|
|
10304
|
+
["mozilla_addon" /* MOZILLA_ADDON */]: "Mozilla Add-on",
|
|
10305
|
+
// GitHub
|
|
10306
|
+
["github_comment" /* GITHUB_COMMENT */]: "GitHub Comment",
|
|
10307
|
+
// Reddit
|
|
10308
|
+
["reddit_subreddit" /* REDDIT_SUBREDDIT */]: "Reddit Subreddit",
|
|
10309
|
+
// Email
|
|
10310
|
+
["email_validation" /* EMAIL_VALIDATION */]: "Email Validation",
|
|
10311
|
+
// Phone Number
|
|
10312
|
+
["phone_lookup" /* PHONE_LOOKUP */]: "Phone Lookup",
|
|
10313
|
+
// Bilibili
|
|
10314
|
+
["bilibili_video" /* BILIBILI_VIDEO */]: "Bilibili Video",
|
|
10315
|
+
["bilibili_profile" /* BILIBILI_PROFILE */]: "Bilibili Profile",
|
|
10316
|
+
// DailyMotion
|
|
10317
|
+
["dailymotion_video" /* DAILYMOTION_VIDEO */]: "DailyMotion Video",
|
|
10318
|
+
// Vimeo
|
|
10319
|
+
["vimeo_video" /* VIMEO_VIDEO */]: "Vimeo Video",
|
|
10320
|
+
["vimeo_profile" /* VIMEO_PROFILE */]: "Vimeo Profile",
|
|
10321
|
+
// Stackblitz
|
|
10322
|
+
["stackblitz_page" /* STACKBLITZ_PAGE */]: "Stackblitz Page",
|
|
10323
|
+
// Leetcode
|
|
10324
|
+
["leetcode_page" /* LEETCODE_PAGE */]: "Leetcode Page",
|
|
10325
|
+
// Tumblr
|
|
10326
|
+
["tumblr_blog" /* TUMBLR_BLOG */]: "Tumblr Blog",
|
|
10327
|
+
["tumblr_post" /* TUMBLR_POST */]: "Tumblr Post",
|
|
10328
|
+
["tumblr_community" /* TUMBLR_COMMUNITY */]: "Tumblr Community",
|
|
10329
|
+
// NPM
|
|
10330
|
+
["npm_package" /* NPM_PACKAGE */]: "NPM Package",
|
|
10331
|
+
// PyPI
|
|
10332
|
+
["pypi_package" /* PYPI_PACKAGE */]: "PyPI Package",
|
|
10333
|
+
// Rust Package
|
|
10334
|
+
["rust_package" /* RUST_PACKAGE */]: "Rust Package",
|
|
10335
|
+
// LinkedIn
|
|
10336
|
+
["linkedin_profile" /* LINKEDIN_PROFILE */]: "LinkedIn Profile",
|
|
10337
|
+
// Pump.fun
|
|
10338
|
+
["pump_fun_token" /* PUMP_FUN_TOKEN */]: "Pump.fun Token",
|
|
10339
|
+
// Meta Ads
|
|
10340
|
+
["meta_ad" /* META_AD */]: "Meta Ad",
|
|
10341
|
+
// Google Ads
|
|
10342
|
+
["google_ad" /* GOOGLE_AD */]: "Google Ad",
|
|
10343
|
+
// Cross-platform ad intelligence
|
|
10344
|
+
["adlibrary_ad" /* ADLIBRARY_AD */]: "AdLibrary Ad",
|
|
10345
|
+
// Crypto / Onchain
|
|
10346
|
+
["contract_deployer" /* CONTRACT_DEPLOYER */]: "Contract Deployer",
|
|
10347
|
+
// URL reputation
|
|
10348
|
+
["threat_intel" /* THREAT_INTEL */]: "Threat Intelligence",
|
|
10349
|
+
["list_membership" /* LIST_MEMBERSHIP */]: "List Membership",
|
|
10350
|
+
["threat_score" /* THREAT_SCORE */]: "Threat Score"
|
|
10351
|
+
};
|
|
10352
|
+
var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
|
|
10353
|
+
// URL
|
|
10354
|
+
["urlscan" /* URLSCAN */]: "URLScan",
|
|
10355
|
+
["whois" /* WHOIS */]: "Whois",
|
|
10356
|
+
["rdap" /* RDAP */]: "RDAP",
|
|
10357
|
+
["http_content" /* HTTP_CONTENT */]: "HTTP Content",
|
|
10358
|
+
["node_js_network" /* NETWORK */]: "Network",
|
|
10359
|
+
["extension" /* EXTENSION */]: "Browser Extension",
|
|
10360
|
+
["playwright" /* PLAYWRIGHT */]: "Playwright",
|
|
10361
|
+
["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: "ChainPatrol Browser",
|
|
10362
|
+
["steel_browser" /* STEEL_BROWSER */]: "Steel Browser",
|
|
10363
|
+
// Twitter
|
|
10364
|
+
["x_api" /* X_API */]: "X API",
|
|
10365
|
+
["socialdata_api" /* SOCIALDATA_API */]: "SocialData API",
|
|
10366
|
+
// Farcaster
|
|
10367
|
+
["neynar_api" /* NEYNAR_API */]: "Neynar API",
|
|
10368
|
+
// Telegram
|
|
10369
|
+
["telegram_api" /* TELEGRAM_API */]: "Telegram API",
|
|
10370
|
+
// Instagram
|
|
10371
|
+
["instagram_api" /* INSTAGRAM_API */]: "Instagram API",
|
|
10372
|
+
// Facebook
|
|
10373
|
+
["facebook_api" /* FACEBOOK_API */]: "Facebook API",
|
|
10374
|
+
// YouTube
|
|
10375
|
+
["youtube_api" /* YOUTUBE_API */]: "YouTube API",
|
|
10376
|
+
// Apple App Store
|
|
10377
|
+
["apple_app_store_api" /* APPLE_APP_STORE_API */]: "Apple App Store API",
|
|
10378
|
+
// Google Play Store
|
|
10379
|
+
["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: "Google Play Store API",
|
|
10380
|
+
// Mozilla
|
|
10381
|
+
["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: "Mozilla Add-ons API",
|
|
10382
|
+
// GitHub
|
|
10383
|
+
["github_api" /* GITHUB_API */]: "GitHub API",
|
|
10384
|
+
// Reddit
|
|
10385
|
+
["reddit_api" /* REDDIT_API */]: "Reddit API",
|
|
10386
|
+
// Email
|
|
10387
|
+
["mails_api" /* MAILS_API */]: "Mails.so API",
|
|
10388
|
+
// Phone Number
|
|
10389
|
+
["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
|
|
10390
|
+
["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
|
|
10391
|
+
// DailyMotion
|
|
10392
|
+
["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
|
|
10393
|
+
// Vimeo
|
|
10394
|
+
["vimeo_api" /* VIMEO_API */]: "Vimeo API",
|
|
10395
|
+
// Stackblitz
|
|
10396
|
+
["stackblitz_api" /* STACKBLITZ_API */]: "Stackblitz API",
|
|
10397
|
+
// Leetcode
|
|
10398
|
+
["leetcode_api" /* LEETCODE_API */]: "Leetcode API",
|
|
10399
|
+
// Tumblr
|
|
10400
|
+
["tumblr_api" /* TUMBLR_API */]: "Tumblr API",
|
|
10401
|
+
// NPM
|
|
10402
|
+
["npm_registry_api" /* NPM_REGISTRY_API */]: "NPM Registry API",
|
|
10403
|
+
// PyPI
|
|
10404
|
+
["pypi_registry_api" /* PYPI_REGISTRY_API */]: "PyPI Registry API",
|
|
10405
|
+
// Rust Package
|
|
10406
|
+
["crates_io_api" /* CRATES_IO_API */]: "Crates.io API",
|
|
10407
|
+
// LinkedIn
|
|
10408
|
+
["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: "Apify LinkedIn API",
|
|
10409
|
+
// Pump.fun
|
|
10410
|
+
["pump_fun_api" /* PUMP_FUN_API */]: "Pump.fun API",
|
|
10411
|
+
// Meta Ads
|
|
10412
|
+
["meta_ads_library" /* META_ADS_LIBRARY */]: "Meta Ads Library",
|
|
10413
|
+
["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: "Steel Meta Ads Library",
|
|
10414
|
+
// Google Ads
|
|
10415
|
+
["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: "Google Ads Transparency Center",
|
|
10416
|
+
// Cross-platform ad intelligence
|
|
10417
|
+
["adlibrary" /* ADLIBRARY */]: "AdLibrary",
|
|
10418
|
+
// Crypto / Onchain
|
|
10419
|
+
["etherscan_api" /* ETHERSCAN_API */]: "Etherscan",
|
|
10420
|
+
// URL reputation
|
|
10421
|
+
["google_web_risk" /* GOOGLE_WEB_RISK */]: "Google Web Risk",
|
|
10422
|
+
["seal_isac" /* SEAL_ISAC */]: "SEAL-ISAC",
|
|
10423
|
+
["eth_phishing_detect" /* ETH_PHISHING_DETECT */]: "eth-phishing-detect",
|
|
10424
|
+
["polkadot_phishing" /* POLKADOT_PHISHING */]: "Polkadot Phishing",
|
|
10425
|
+
["tranco" /* TRANCO */]: "Tranco",
|
|
10426
|
+
["umbrella" /* UMBRELLA */]: "Cisco Umbrella",
|
|
10427
|
+
["open_page_rank" /* OPEN_PAGE_RANK */]: "Open Page Rank",
|
|
10428
|
+
["defillama" /* DEFILLAMA */]: "DefiLlama",
|
|
10429
|
+
["vercel_domains" /* VERCEL_DOMAINS */]: "Vercel Domains"
|
|
10430
|
+
};
|
|
10431
|
+
var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
|
|
10432
|
+
// URL-related sources
|
|
10433
|
+
["urlscan" /* URLSCAN */]: [
|
|
10434
|
+
"browser_capture" /* BROWSER_CAPTURE */,
|
|
10435
|
+
"geolocation_and_ip" /* GEOLOCATION_AND_IP */,
|
|
10436
|
+
"hostname_first_seen" /* HOSTNAME_FIRST_SEEN */
|
|
10437
|
+
],
|
|
10438
|
+
["whois" /* WHOIS */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
|
|
10439
|
+
["rdap" /* RDAP */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
|
|
10440
|
+
["http_content" /* HTTP_CONTENT */]: [
|
|
10441
|
+
"content_and_metadata" /* CONTENT_AND_METADATA */
|
|
10442
|
+
],
|
|
10443
|
+
["node_js_network" /* NETWORK */]: [
|
|
10444
|
+
"dns" /* DNS */,
|
|
10445
|
+
"tls" /* TLS */,
|
|
10446
|
+
"tcp" /* TCP */
|
|
10447
|
+
],
|
|
10448
|
+
["extension" /* EXTENSION */]: [
|
|
10449
|
+
"browser_capture" /* BROWSER_CAPTURE */,
|
|
10450
|
+
"telegram_profile" /* TELEGRAM_PROFILE */,
|
|
10451
|
+
"linkedin_profile" /* LINKEDIN_PROFILE */,
|
|
10452
|
+
"instagram_profile" /* INSTAGRAM_PROFILE */,
|
|
10453
|
+
"meta_ad" /* META_AD */
|
|
10454
|
+
],
|
|
10455
|
+
["playwright" /* PLAYWRIGHT */]: [
|
|
10456
|
+
"browser_capture" /* BROWSER_CAPTURE */,
|
|
10457
|
+
"bilibili_video" /* BILIBILI_VIDEO */,
|
|
10458
|
+
"bilibili_profile" /* BILIBILI_PROFILE */,
|
|
10459
|
+
"telegram_profile" /* TELEGRAM_PROFILE */
|
|
10460
|
+
],
|
|
10461
|
+
// Only the generic page capture: the in-house browser does not (yet) run the
|
|
10462
|
+
// platform-specific scrapes PLAYWRIGHT does above.
|
|
10463
|
+
["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: [
|
|
10464
|
+
"browser_capture" /* BROWSER_CAPTURE */
|
|
10465
|
+
],
|
|
10466
|
+
["steel_browser" /* STEEL_BROWSER */]: ["browser_capture" /* BROWSER_CAPTURE */],
|
|
10467
|
+
// Twitter-related sources
|
|
10468
|
+
["x_api" /* X_API */]: [
|
|
10469
|
+
"post" /* TWITTER_POST */,
|
|
10470
|
+
"profile" /* TWITTER_PROFILE */,
|
|
10471
|
+
"twitter_followers" /* TWITTER_FOLLOWERS */
|
|
10472
|
+
],
|
|
10473
|
+
["socialdata_api" /* SOCIALDATA_API */]: [
|
|
10474
|
+
"post" /* TWITTER_POST */,
|
|
10475
|
+
"profile" /* TWITTER_PROFILE */,
|
|
10476
|
+
"twitter_followers" /* TWITTER_FOLLOWERS */
|
|
10477
|
+
],
|
|
10478
|
+
// Farcaster-related sources
|
|
10479
|
+
["neynar_api" /* NEYNAR_API */]: [
|
|
10480
|
+
"cast" /* FARCASTER_CAST */,
|
|
10481
|
+
"farcaster_profile" /* FARCASTER_PROFILE */,
|
|
10482
|
+
"channel" /* FARCASTER_CHANNEL */,
|
|
10483
|
+
"miniapp" /* FARCASTER_MINIAPP */
|
|
10484
|
+
],
|
|
10485
|
+
// Telegram-related sources
|
|
10486
|
+
["telegram_api" /* TELEGRAM_API */]: ["telegram_profile" /* TELEGRAM_PROFILE */],
|
|
10487
|
+
// Instagram-related sources
|
|
10488
|
+
["instagram_api" /* INSTAGRAM_API */]: ["instagram_profile" /* INSTAGRAM_PROFILE */],
|
|
10489
|
+
// Facebook-related sources
|
|
10490
|
+
["facebook_api" /* FACEBOOK_API */]: ["facebook_profile" /* FACEBOOK_PROFILE */],
|
|
10491
|
+
// YouTube-related sources
|
|
10492
|
+
["youtube_api" /* YOUTUBE_API */]: [
|
|
10493
|
+
"youtube_video" /* YOUTUBE_VIDEO */,
|
|
10494
|
+
"youtube_channel" /* YOUTUBE_CHANNEL */
|
|
10495
|
+
],
|
|
10496
|
+
// Apple App Store-related sources
|
|
10497
|
+
["apple_app_store_api" /* APPLE_APP_STORE_API */]: [
|
|
10498
|
+
"apple_app_store_listing" /* APPLE_APP_STORE_LISTING */
|
|
10499
|
+
],
|
|
10500
|
+
// Google Play Store-related sources
|
|
10501
|
+
["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: [
|
|
10502
|
+
"google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */
|
|
10503
|
+
],
|
|
10504
|
+
// Mozilla-related sources
|
|
10505
|
+
["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: ["mozilla_addon" /* MOZILLA_ADDON */],
|
|
10506
|
+
// GitHub-related sources
|
|
10507
|
+
["github_api" /* GITHUB_API */]: ["github_comment" /* GITHUB_COMMENT */],
|
|
10508
|
+
// Reddit-related sources
|
|
10509
|
+
["reddit_api" /* REDDIT_API */]: ["reddit_subreddit" /* REDDIT_SUBREDDIT */],
|
|
10510
|
+
// Email-related sources
|
|
10511
|
+
["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
|
|
10512
|
+
// Phone Number-related sources
|
|
10513
|
+
["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
|
|
10514
|
+
["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
|
|
10515
|
+
// DailyMotion-related sources
|
|
10516
|
+
["dailymotion_api" /* DAILYMOTION_API */]: [
|
|
10517
|
+
"dailymotion_video" /* DAILYMOTION_VIDEO */
|
|
10518
|
+
],
|
|
10519
|
+
// Vimeo-related sources
|
|
10520
|
+
["vimeo_api" /* VIMEO_API */]: [
|
|
10521
|
+
"vimeo_video" /* VIMEO_VIDEO */,
|
|
10522
|
+
"vimeo_profile" /* VIMEO_PROFILE */
|
|
10523
|
+
],
|
|
10524
|
+
// Stackblitz-related sources
|
|
10525
|
+
["stackblitz_api" /* STACKBLITZ_API */]: ["stackblitz_page" /* STACKBLITZ_PAGE */],
|
|
10526
|
+
// Leetcode-related sources
|
|
10527
|
+
["leetcode_api" /* LEETCODE_API */]: ["leetcode_page" /* LEETCODE_PAGE */],
|
|
10528
|
+
// Tumblr-related sources
|
|
10529
|
+
["tumblr_api" /* TUMBLR_API */]: [
|
|
10530
|
+
"tumblr_blog" /* TUMBLR_BLOG */,
|
|
10531
|
+
"tumblr_post" /* TUMBLR_POST */,
|
|
10532
|
+
"tumblr_community" /* TUMBLR_COMMUNITY */
|
|
10533
|
+
],
|
|
10534
|
+
// NPM-related sources
|
|
10535
|
+
["npm_registry_api" /* NPM_REGISTRY_API */]: ["npm_package" /* NPM_PACKAGE */],
|
|
10536
|
+
// PyPI-related sources
|
|
10537
|
+
["pypi_registry_api" /* PYPI_REGISTRY_API */]: ["pypi_package" /* PYPI_PACKAGE */],
|
|
10538
|
+
// Rust Package-related sources
|
|
10539
|
+
["crates_io_api" /* CRATES_IO_API */]: ["rust_package" /* RUST_PACKAGE */],
|
|
10540
|
+
// LinkedIn-related sources
|
|
10541
|
+
["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: [
|
|
10542
|
+
"linkedin_profile" /* LINKEDIN_PROFILE */
|
|
10543
|
+
],
|
|
10544
|
+
// Pump.fun
|
|
10545
|
+
["pump_fun_api" /* PUMP_FUN_API */]: ["pump_fun_token" /* PUMP_FUN_TOKEN */],
|
|
10546
|
+
// Meta Ads-related sources
|
|
10547
|
+
["meta_ads_library" /* META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
|
|
10548
|
+
["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
|
|
10549
|
+
// Google Ads-related sources
|
|
10550
|
+
["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: [
|
|
10551
|
+
"google_ad" /* GOOGLE_AD */
|
|
10552
|
+
],
|
|
10553
|
+
// Cross-platform ad intelligence sources
|
|
10554
|
+
["adlibrary" /* ADLIBRARY */]: ["adlibrary_ad" /* ADLIBRARY_AD */],
|
|
10555
|
+
// Crypto / Onchain sources
|
|
10556
|
+
["etherscan_api" /* ETHERSCAN_API */]: ["contract_deployer" /* CONTRACT_DEPLOYER */],
|
|
10557
|
+
// URL reputation
|
|
10558
|
+
["google_web_risk" /* GOOGLE_WEB_RISK */]: ["threat_score" /* THREAT_SCORE */],
|
|
10559
|
+
["seal_isac" /* SEAL_ISAC */]: ["threat_intel" /* THREAT_INTEL */],
|
|
10560
|
+
["eth_phishing_detect" /* ETH_PHISHING_DETECT */]: ["threat_intel" /* THREAT_INTEL */],
|
|
10561
|
+
["polkadot_phishing" /* POLKADOT_PHISHING */]: ["threat_intel" /* THREAT_INTEL */],
|
|
10562
|
+
["tranco" /* TRANCO */]: ["list_membership" /* LIST_MEMBERSHIP */],
|
|
10563
|
+
["umbrella" /* UMBRELLA */]: ["list_membership" /* LIST_MEMBERSHIP */],
|
|
10564
|
+
["open_page_rank" /* OPEN_PAGE_RANK */]: ["list_membership" /* LIST_MEMBERSHIP */],
|
|
10565
|
+
["defillama" /* DEFILLAMA */]: ["list_membership" /* LIST_MEMBERSHIP */],
|
|
10566
|
+
["vercel_domains" /* VERCEL_DOMAINS */]: ["list_membership" /* LIST_MEMBERSHIP */]
|
|
10567
|
+
};
|
|
10172
10568
|
|
|
10173
|
-
//
|
|
10174
|
-
var
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
AssetModel2["Discussion"] = "discussion";
|
|
10191
|
-
AssetModel2["Repository"] = "repository";
|
|
10192
|
-
AssetModel2["Article"] = "Article";
|
|
10193
|
-
AssetModel2["Comment"] = "comment";
|
|
10194
|
-
AssetModel2["List"] = "list";
|
|
10195
|
-
AssetModel2["Subreddit"] = "subreddit";
|
|
10196
|
-
AssetModel2["Community"] = "community";
|
|
10197
|
-
AssetModel2["MiniApp"] = "mini-app";
|
|
10198
|
-
AssetModel2["Developer"] = "developer";
|
|
10199
|
-
return AssetModel2;
|
|
10200
|
-
})(AssetModel || {});
|
|
10201
|
-
function isUrl(input) {
|
|
10202
|
-
if (input.trim() === "") {
|
|
10203
|
-
return false;
|
|
10204
|
-
}
|
|
10205
|
-
if (input.startsWith("/") || input.startsWith("#") || input.startsWith("?") || input.startsWith(".") || !input.includes(".")) {
|
|
10206
|
-
return false;
|
|
10207
|
-
}
|
|
10208
|
-
return URL.canParse(input) || URL.canParse(`https://${input}`);
|
|
10209
|
-
}
|
|
10210
|
-
function getNormalizedUrl(input) {
|
|
10211
|
-
if (!isUrl(input)) {
|
|
10212
|
-
throw new Error(`Invalid URL: ${input}`);
|
|
10213
|
-
}
|
|
10214
|
-
let url;
|
|
10215
|
-
try {
|
|
10216
|
-
url = new URL(input);
|
|
10217
|
-
} catch (e4) {
|
|
10218
|
-
try {
|
|
10219
|
-
url = new URL(`https://${input}`);
|
|
10220
|
-
} catch (e5) {
|
|
10221
|
-
throw new Error(`Invalid URL: ${input}`);
|
|
10222
|
-
}
|
|
10223
|
-
}
|
|
10224
|
-
const normalizedUrl = normalizeUrl(url.toString(), {
|
|
10225
|
-
defaultProtocol: "https"
|
|
10226
|
-
});
|
|
10227
|
-
try {
|
|
10228
|
-
return new URL(normalizedUrl);
|
|
10229
|
-
} catch (e4) {
|
|
10230
|
-
throw new Error(`Invalid URL: ${input}`);
|
|
10231
|
-
}
|
|
10232
|
-
}
|
|
10233
|
-
var ensureHttpsPrefix = (url) => {
|
|
10234
|
-
if (!url.startsWith("http")) {
|
|
10235
|
-
return `https://${url}`;
|
|
10236
|
-
}
|
|
10237
|
-
return url.replace(/^https?:\/{1,2}/, "https://");
|
|
10238
|
-
};
|
|
10239
|
-
function getHostname(input) {
|
|
10240
|
-
try {
|
|
10241
|
-
return getNormalizedUrl(input).hostname;
|
|
10242
|
-
} catch (e4) {
|
|
10243
|
-
return null;
|
|
10244
|
-
}
|
|
10245
|
-
}
|
|
10246
|
-
function getParentDomains(input) {
|
|
10247
|
-
const domain = getHostname(input);
|
|
10248
|
-
if (!domain) {
|
|
10249
|
-
return [];
|
|
10250
|
-
}
|
|
10251
|
-
const subdomain = getSubdomain(domain, { mixedInputs: false });
|
|
10252
|
-
if (!subdomain) {
|
|
10253
|
-
return [domain];
|
|
10254
|
-
}
|
|
10255
|
-
const domainWithSuffix = getDomain(domain, { mixedInputs: false });
|
|
10256
|
-
if (!domainWithSuffix) {
|
|
10257
|
-
return [];
|
|
10258
|
-
}
|
|
10259
|
-
const parentDomains = [domainWithSuffix];
|
|
10260
|
-
const parentDomainParts = subdomain.split(".");
|
|
10261
|
-
for (let i = parentDomainParts.length - 1; i >= 0; i--) {
|
|
10262
|
-
const parentDomainPart = parentDomainParts.slice(i).join(".");
|
|
10263
|
-
parentDomains.push(`${parentDomainPart}.${domainWithSuffix}`);
|
|
10264
|
-
}
|
|
10265
|
-
return parentDomains.reverse();
|
|
10569
|
+
// ../../internal/utils/src/array.ts
|
|
10570
|
+
var array_exports = {};
|
|
10571
|
+
__export(array_exports, {
|
|
10572
|
+
arraysEqual: () => arraysEqual,
|
|
10573
|
+
chunkArray: () => chunkArray,
|
|
10574
|
+
combineAndRemoveDuplicatesByKey: () => combineAndRemoveDuplicatesByKey,
|
|
10575
|
+
isArray: () => isArray,
|
|
10576
|
+
isEmptyArray: () => isEmptyArray,
|
|
10577
|
+
isNonEmptyArray: () => isNonEmptyArray,
|
|
10578
|
+
randomElement: () => randomElement,
|
|
10579
|
+
randomIndex: () => randomIndex,
|
|
10580
|
+
removeDuplicates: () => removeDuplicates,
|
|
10581
|
+
shuffleInPlace: () => shuffleInPlace,
|
|
10582
|
+
shuffled: () => shuffled
|
|
10583
|
+
});
|
|
10584
|
+
function isArray(value) {
|
|
10585
|
+
return Array.isArray(value);
|
|
10266
10586
|
}
|
|
10267
|
-
function
|
|
10268
|
-
|
|
10269
|
-
const parsed = parse$1(domain);
|
|
10270
|
-
const eTLDPlusOne = (_a = parsed.domain) != null ? _a : "";
|
|
10271
|
-
const subdomains = domain.replace(/https?:\/\/(www\.)?/, "").split(".");
|
|
10272
|
-
const eTLDPlusOneIndex = subdomains.findIndex(
|
|
10273
|
-
(_, i) => subdomains.slice(i).join(".") === eTLDPlusOne
|
|
10274
|
-
);
|
|
10275
|
-
const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
|
|
10276
|
-
return trimmedSubdomains;
|
|
10587
|
+
function isEmptyArray(value) {
|
|
10588
|
+
return value.length === 0;
|
|
10277
10589
|
}
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
var phone_exports = {};
|
|
10281
|
-
__export(phone_exports, {
|
|
10282
|
-
PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
|
|
10283
|
-
isPhoneNumber: () => isPhoneNumber,
|
|
10284
|
-
normalizePhoneNumber: () => normalizePhoneNumber
|
|
10285
|
-
});
|
|
10286
|
-
var PHONE_NUMBER_REGEX = /(?:\+?\d{1,4}[\s.-]?)?(?:\(\d{1,4}\)|\d{1,4})[\s.-]?\d{1,4}[\s.-]?\d{1,4}[\s.-]?\d{0,4}(?:\s*(?:ext|x|extension)[\s.]*\d{1,6})?/gi;
|
|
10287
|
-
function preparePhoneInput(input) {
|
|
10288
|
-
let s2 = input.trim();
|
|
10289
|
-
s2 = s2.replace(/^\s*tel:\s*(?:\/\/)?\s*/i, "");
|
|
10290
|
-
s2 = s2.trim();
|
|
10291
|
-
s2 = s2.replace(/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g, " ");
|
|
10292
|
-
s2 = s2.replace(/[\u2010\u2011\u2012\u2013\u2014\u2015\u2212\uFE58\uFE63\uFF0D]/g, "-");
|
|
10293
|
-
s2 = s2.replace(/\uFF0B/g, "+");
|
|
10294
|
-
s2 = s2.replace(/\uFF08/g, "(");
|
|
10295
|
-
s2 = s2.replace(/\uFF09/g, ")");
|
|
10296
|
-
return s2.trim();
|
|
10590
|
+
function isNonEmptyArray(value) {
|
|
10591
|
+
return value.length > 0;
|
|
10297
10592
|
}
|
|
10298
|
-
function
|
|
10299
|
-
return
|
|
10593
|
+
function randomIndex(array) {
|
|
10594
|
+
return Math.floor(Math.random() * array.length);
|
|
10300
10595
|
}
|
|
10301
|
-
function
|
|
10302
|
-
|
|
10303
|
-
return false;
|
|
10304
|
-
}
|
|
10305
|
-
let increasing = true;
|
|
10306
|
-
let decreasing = true;
|
|
10307
|
-
for (let i = 1; i < digits2.length; i++) {
|
|
10308
|
-
const curr = digits2.charCodeAt(i) - 48;
|
|
10309
|
-
const prev = digits2.charCodeAt(i - 1) - 48;
|
|
10310
|
-
if (curr !== prev + 1) {
|
|
10311
|
-
increasing = false;
|
|
10312
|
-
}
|
|
10313
|
-
if (curr !== prev - 1) {
|
|
10314
|
-
decreasing = false;
|
|
10315
|
-
}
|
|
10316
|
-
}
|
|
10317
|
-
return increasing || decreasing;
|
|
10596
|
+
function randomElement(array) {
|
|
10597
|
+
return array[randomIndex(array)];
|
|
10318
10598
|
}
|
|
10319
|
-
function
|
|
10320
|
-
|
|
10321
|
-
return false;
|
|
10322
|
-
}
|
|
10323
|
-
const npaFirst = d10.charCodeAt(0) - 48;
|
|
10324
|
-
const nxxFirst = d10.charCodeAt(3) - 48;
|
|
10325
|
-
if (npaFirst < 2 || npaFirst > 9) {
|
|
10326
|
-
return false;
|
|
10327
|
-
}
|
|
10328
|
-
if (nxxFirst < 2 || nxxFirst > 9) {
|
|
10329
|
-
return false;
|
|
10330
|
-
}
|
|
10331
|
-
return true;
|
|
10599
|
+
function removeDuplicates(array) {
|
|
10600
|
+
return Array.from(new Set(array));
|
|
10332
10601
|
}
|
|
10333
|
-
function
|
|
10334
|
-
const
|
|
10335
|
-
const
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
if (isAllSameDigit(d) || isStrictlyMonotonicStep1(d)) {
|
|
10340
|
-
return false;
|
|
10341
|
-
}
|
|
10342
|
-
const onlyDigits = /^\d+$/.test(withoutExt);
|
|
10343
|
-
if (hasPlus) {
|
|
10344
|
-
if (d.length === 11 && d.startsWith("1")) {
|
|
10345
|
-
return isValidNanpNational10(d.slice(1));
|
|
10346
|
-
}
|
|
10347
|
-
return true;
|
|
10348
|
-
}
|
|
10349
|
-
if (onlyDigits) {
|
|
10350
|
-
if (d.length === 10) {
|
|
10351
|
-
return isValidNanpNational10(d);
|
|
10352
|
-
}
|
|
10353
|
-
if (d.length === 11 && d.startsWith("1")) {
|
|
10354
|
-
return isValidNanpNational10(d.slice(1));
|
|
10355
|
-
}
|
|
10356
|
-
if (d.length === 11 && d.startsWith("0")) {
|
|
10357
|
-
return true;
|
|
10358
|
-
}
|
|
10359
|
-
return false;
|
|
10360
|
-
}
|
|
10361
|
-
if (d.length === 10) {
|
|
10362
|
-
return isValidNanpNational10(d);
|
|
10363
|
-
}
|
|
10364
|
-
if (d.length === 11 && d.startsWith("1")) {
|
|
10365
|
-
return isValidNanpNational10(d.slice(1));
|
|
10366
|
-
}
|
|
10367
|
-
if (d.length === 11 && d.startsWith("0")) {
|
|
10368
|
-
return true;
|
|
10369
|
-
}
|
|
10370
|
-
if (d.length >= 12 && d.length <= 15) {
|
|
10371
|
-
return true;
|
|
10372
|
-
}
|
|
10373
|
-
return false;
|
|
10602
|
+
function combineAndRemoveDuplicatesByKey(arr1, arr2, uniqueKey) {
|
|
10603
|
+
const combinedArray = [...arr1, ...arr2];
|
|
10604
|
+
const uniqueObjects = new Map(
|
|
10605
|
+
combinedArray.map((item) => [item[uniqueKey], item])
|
|
10606
|
+
);
|
|
10607
|
+
return Array.from(uniqueObjects.values());
|
|
10374
10608
|
}
|
|
10375
|
-
function
|
|
10376
|
-
const
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
}
|
|
10380
|
-
if (!/^[+\d(]/.test(trimmed)) {
|
|
10381
|
-
return false;
|
|
10382
|
-
}
|
|
10383
|
-
const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
|
|
10384
|
-
if (/[a-zA-Z]/.test(withoutExt)) {
|
|
10385
|
-
return false;
|
|
10386
|
-
}
|
|
10387
|
-
const hasPhoneMarker = /[+()\s-]/.test(trimmed);
|
|
10388
|
-
const isPureDotSeparated = /^\d+(\.\d+)+$/.test(trimmed);
|
|
10389
|
-
if (isPureDotSeparated && !hasPhoneMarker) {
|
|
10390
|
-
return false;
|
|
10609
|
+
function chunkArray(array, chunkSize) {
|
|
10610
|
+
const chunks = [];
|
|
10611
|
+
for (let i = 0; i < array.length; i += chunkSize) {
|
|
10612
|
+
chunks.push(array.slice(i, i + chunkSize));
|
|
10391
10613
|
}
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10614
|
+
return chunks;
|
|
10615
|
+
}
|
|
10616
|
+
function shuffleInPlace(array) {
|
|
10617
|
+
for (let i = array.length - 1; i > 0; i--) {
|
|
10618
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
10619
|
+
[array[i], array[j]] = [array[j], array[i]];
|
|
10395
10620
|
}
|
|
10396
|
-
return isPlausiblePhoneDigits(withoutExt);
|
|
10397
10621
|
}
|
|
10398
|
-
function
|
|
10399
|
-
const
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
const digitsOnly = withoutExt.replace(/\D/g, "");
|
|
10403
|
-
return hasPlus ? `+${digitsOnly}` : digitsOnly;
|
|
10622
|
+
function shuffled(array) {
|
|
10623
|
+
const newArray = array.slice();
|
|
10624
|
+
shuffleInPlace(newArray);
|
|
10625
|
+
return newArray;
|
|
10404
10626
|
}
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
var tMax = 26;
|
|
10411
|
-
var skew = 38;
|
|
10412
|
-
var damp = 700;
|
|
10413
|
-
var initialBias = 72;
|
|
10414
|
-
var initialN = 128;
|
|
10415
|
-
var delimiter = "-";
|
|
10416
|
-
var regexPunycode = /^xn--/;
|
|
10417
|
-
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
10418
|
-
var errors = {
|
|
10419
|
-
overflow: "Overflow: input needs wider integers to process",
|
|
10420
|
-
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
10421
|
-
"invalid-input": "Invalid input"
|
|
10422
|
-
};
|
|
10423
|
-
var baseMinusTMin = base - tMin;
|
|
10424
|
-
var floor = Math.floor;
|
|
10425
|
-
function error(type) {
|
|
10426
|
-
throw new RangeError(errors[type]);
|
|
10627
|
+
function arraysEqual(a, b) {
|
|
10628
|
+
if (a.length !== b.length) return false;
|
|
10629
|
+
const sortedA = [...a].sort();
|
|
10630
|
+
const sortedB = [...b].sort();
|
|
10631
|
+
return sortedA.every((val, idx) => val === sortedB[idx]);
|
|
10427
10632
|
}
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10633
|
+
|
|
10634
|
+
// ../../internal/utils/src/cron.ts
|
|
10635
|
+
var cron_exports = {};
|
|
10636
|
+
__export(cron_exports, {
|
|
10637
|
+
cronToHumanReadable: () => cronToHumanReadable,
|
|
10638
|
+
isValidCronExpression: () => isValidCronExpression
|
|
10639
|
+
});
|
|
10640
|
+
var WEEKDAYS = [
|
|
10641
|
+
"Sunday",
|
|
10642
|
+
"Monday",
|
|
10643
|
+
"Tuesday",
|
|
10644
|
+
"Wednesday",
|
|
10645
|
+
"Thursday",
|
|
10646
|
+
"Friday",
|
|
10647
|
+
"Saturday"
|
|
10648
|
+
];
|
|
10649
|
+
var MONTHS = [
|
|
10650
|
+
"January",
|
|
10651
|
+
"February",
|
|
10652
|
+
"March",
|
|
10653
|
+
"April",
|
|
10654
|
+
"May",
|
|
10655
|
+
"June",
|
|
10656
|
+
"July",
|
|
10657
|
+
"August",
|
|
10658
|
+
"September",
|
|
10659
|
+
"October",
|
|
10660
|
+
"November",
|
|
10661
|
+
"December"
|
|
10662
|
+
];
|
|
10663
|
+
function cronToHumanReadable(cronExpression) {
|
|
10664
|
+
const [minute, hour, dayOfMonth, month, dayOfWeek2] = cronExpression.split(" ");
|
|
10665
|
+
let result = "Runs ";
|
|
10666
|
+
if (minute === "*") {
|
|
10667
|
+
result += "every minute ";
|
|
10668
|
+
} else if (minute.includes("/")) {
|
|
10669
|
+
const [, interval] = minute.split("/");
|
|
10670
|
+
result += `every ${interval} minutes `;
|
|
10671
|
+
} else {
|
|
10672
|
+
result += `at minute ${minute} `;
|
|
10434
10673
|
}
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
const encoded = labels.map(callback).join(".");
|
|
10438
|
-
return result + encoded;
|
|
10439
|
-
}
|
|
10440
|
-
function basicToDigit(codePoint) {
|
|
10441
|
-
if (codePoint >= 48 && codePoint < 58) {
|
|
10442
|
-
return 26 + (codePoint - 48);
|
|
10674
|
+
if (hour !== "*") {
|
|
10675
|
+
result += `past hour ${hour} `;
|
|
10443
10676
|
}
|
|
10444
|
-
if (
|
|
10445
|
-
|
|
10677
|
+
if (dayOfMonth !== "*") {
|
|
10678
|
+
result += `on the ${dayOfMonth}${getDaySuffix(
|
|
10679
|
+
parseInt(dayOfMonth)
|
|
10680
|
+
)} day of the month `;
|
|
10446
10681
|
}
|
|
10447
|
-
if (
|
|
10448
|
-
|
|
10682
|
+
if (month !== "*") {
|
|
10683
|
+
const monthNames = month.split(",").map((m) => MONTHS[parseInt(m) - 1]);
|
|
10684
|
+
result += `in ${monthNames.join(", ")} `;
|
|
10449
10685
|
}
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
let k4 = 0;
|
|
10454
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
10455
|
-
delta += floor(delta / numPoints);
|
|
10456
|
-
for (
|
|
10457
|
-
;
|
|
10458
|
-
/* no initialization */
|
|
10459
|
-
delta > baseMinusTMin * tMax >> 1;
|
|
10460
|
-
k4 += base
|
|
10461
|
-
) {
|
|
10462
|
-
delta = floor(delta / baseMinusTMin);
|
|
10686
|
+
if (dayOfWeek2 !== "*") {
|
|
10687
|
+
const dayNames = dayOfWeek2.split(",").map((d) => WEEKDAYS[parseInt(d)]);
|
|
10688
|
+
result += `on ${dayNames.join(", ")}`;
|
|
10463
10689
|
}
|
|
10464
|
-
return
|
|
10690
|
+
return result.trim();
|
|
10465
10691
|
}
|
|
10466
|
-
function
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
let i = 0;
|
|
10470
|
-
let n2 = initialN;
|
|
10471
|
-
let bias2 = initialBias;
|
|
10472
|
-
let basic = input.lastIndexOf(delimiter);
|
|
10473
|
-
if (basic < 0) {
|
|
10474
|
-
basic = 0;
|
|
10475
|
-
}
|
|
10476
|
-
for (let j = 0; j < basic; ++j) {
|
|
10477
|
-
if (input.charCodeAt(j) >= 128) {
|
|
10478
|
-
error("not-basic");
|
|
10479
|
-
}
|
|
10480
|
-
output.push(input.charCodeAt(j));
|
|
10692
|
+
function getDaySuffix(day) {
|
|
10693
|
+
if (day >= 11 && day <= 13) {
|
|
10694
|
+
return "th";
|
|
10481
10695
|
}
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
}
|
|
10492
|
-
if (digit > floor((maxInt - i) / w)) {
|
|
10493
|
-
error("overflow");
|
|
10494
|
-
}
|
|
10495
|
-
i += digit * w;
|
|
10496
|
-
const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
|
|
10497
|
-
if (digit < t) {
|
|
10498
|
-
break;
|
|
10499
|
-
}
|
|
10500
|
-
const baseMinusT = base - t;
|
|
10501
|
-
if (w > floor(maxInt / baseMinusT)) {
|
|
10502
|
-
error("overflow");
|
|
10503
|
-
}
|
|
10504
|
-
w *= baseMinusT;
|
|
10505
|
-
}
|
|
10506
|
-
const out = output.length + 1;
|
|
10507
|
-
bias2 = adapt(i - oldi, out, oldi == 0);
|
|
10508
|
-
if (floor(i / out) > maxInt - n2) {
|
|
10509
|
-
error("overflow");
|
|
10510
|
-
}
|
|
10511
|
-
n2 += floor(i / out);
|
|
10512
|
-
i %= out;
|
|
10513
|
-
output.splice(i++, 0, n2);
|
|
10696
|
+
switch (day % 10) {
|
|
10697
|
+
case 1:
|
|
10698
|
+
return "st";
|
|
10699
|
+
case 2:
|
|
10700
|
+
return "nd";
|
|
10701
|
+
case 3:
|
|
10702
|
+
return "rd";
|
|
10703
|
+
default:
|
|
10704
|
+
return "th";
|
|
10514
10705
|
}
|
|
10515
|
-
return String.fromCodePoint(...output);
|
|
10516
|
-
}
|
|
10517
|
-
function toUnicode(input) {
|
|
10518
|
-
return mapDomain(input, function(string) {
|
|
10519
|
-
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
10520
|
-
});
|
|
10521
10706
|
}
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
function isEmail(input) {
|
|
10525
|
-
if (input.trim() === "") {
|
|
10707
|
+
function isValidCronExpression(cronExpression) {
|
|
10708
|
+
if (!cronExpression || typeof cronExpression !== "string") {
|
|
10526
10709
|
return false;
|
|
10527
10710
|
}
|
|
10528
|
-
const
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
function removeHttpProtocol(input) {
|
|
10532
|
-
return input.replace(/^https?:\/\//, "");
|
|
10533
|
-
}
|
|
10534
|
-
function stripDomainWildcardPrefix(domain) {
|
|
10535
|
-
const trimmedDomain = domain.trim();
|
|
10536
|
-
const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
|
|
10537
|
-
return strippedDomain.length > 0 ? strippedDomain : null;
|
|
10538
|
-
}
|
|
10539
|
-
function getDefangedUrl(input) {
|
|
10540
|
-
if (!isUrl(input)) {
|
|
10541
|
-
console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
|
|
10542
|
-
return input;
|
|
10543
|
-
}
|
|
10544
|
-
return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
|
|
10545
|
-
}
|
|
10546
|
-
function getRefangedUrl(input) {
|
|
10547
|
-
return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
|
|
10548
|
-
}
|
|
10549
|
-
function containsPunycode(url) {
|
|
10550
|
-
return url.indexOf("xn--") !== -1;
|
|
10551
|
-
}
|
|
10552
|
-
function toUnicode2(url) {
|
|
10553
|
-
return toUnicode(url);
|
|
10554
|
-
}
|
|
10555
|
-
function convertHttpsToHttp(url) {
|
|
10556
|
-
if (url.startsWith("https://")) {
|
|
10557
|
-
const httpUrl = new URL(url);
|
|
10558
|
-
httpUrl.protocol = "http:";
|
|
10559
|
-
return httpUrl.toString();
|
|
10711
|
+
const parts = cronExpression.trim().split(/\s+/);
|
|
10712
|
+
if (parts.length !== 5) {
|
|
10713
|
+
return false;
|
|
10560
10714
|
}
|
|
10561
|
-
|
|
10715
|
+
const [minute, hour, dayOfMonth, month, dayOfWeek2] = parts;
|
|
10716
|
+
return isValidCronField(minute, 0, 59) && isValidCronField(hour, 0, 23) && isValidCronField(dayOfMonth, 1, 31) && isValidCronField(month, 1, 12) && isValidCronField(dayOfWeek2, 0, 7);
|
|
10562
10717
|
}
|
|
10563
|
-
function
|
|
10564
|
-
if (!
|
|
10565
|
-
|
|
10718
|
+
function isValidCronField(field, min, max) {
|
|
10719
|
+
if (!field) return false;
|
|
10720
|
+
if (field === "*") return true;
|
|
10721
|
+
if (field.includes("/")) {
|
|
10722
|
+
const [range, step] = field.split("/");
|
|
10723
|
+
const stepNum = parseInt(step);
|
|
10724
|
+
if (isNaN(stepNum) || stepNum <= 0) return false;
|
|
10725
|
+
if (range === "*") return true;
|
|
10726
|
+
return isValidCronField(range, min, max);
|
|
10566
10727
|
}
|
|
10567
|
-
if (
|
|
10568
|
-
|
|
10728
|
+
if (field.includes("-")) {
|
|
10729
|
+
const [start, end] = field.split("-");
|
|
10730
|
+
const startNum = parseInt(start);
|
|
10731
|
+
const endNum = parseInt(end);
|
|
10732
|
+
if (isNaN(startNum) || isNaN(endNum)) return false;
|
|
10733
|
+
return startNum >= min && startNum <= max && endNum >= min && endNum <= max && startNum <= endNum;
|
|
10569
10734
|
}
|
|
10570
|
-
if (
|
|
10571
|
-
|
|
10735
|
+
if (field.includes(",")) {
|
|
10736
|
+
const values = field.split(",");
|
|
10737
|
+
return values.every((value) => isValidCronField(value.trim(), min, max));
|
|
10572
10738
|
}
|
|
10573
|
-
|
|
10739
|
+
const num3 = parseInt(field);
|
|
10740
|
+
if (isNaN(num3)) return false;
|
|
10741
|
+
if (max === 7 && num3 === 7) return true;
|
|
10742
|
+
return num3 >= min && num3 <= max;
|
|
10574
10743
|
}
|
|
10575
|
-
|
|
10576
|
-
|
|
10744
|
+
|
|
10745
|
+
// ../../internal/utils/src/object.ts
|
|
10746
|
+
var object_exports = {};
|
|
10747
|
+
__export(object_exports, {
|
|
10748
|
+
isDefined: () => isDefined,
|
|
10749
|
+
isDefinedAndNotNull: () => isDefinedAndNotNull,
|
|
10750
|
+
isNotNull: () => isNotNull
|
|
10751
|
+
});
|
|
10752
|
+
function isDefined(value) {
|
|
10753
|
+
return value !== void 0;
|
|
10577
10754
|
}
|
|
10578
|
-
function
|
|
10579
|
-
|
|
10580
|
-
return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
|
|
10755
|
+
function isNotNull(value) {
|
|
10756
|
+
return value !== null;
|
|
10581
10757
|
}
|
|
10582
|
-
function
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10758
|
+
function isDefinedAndNotNull(value) {
|
|
10759
|
+
return value !== null && value !== void 0;
|
|
10760
|
+
}
|
|
10761
|
+
|
|
10762
|
+
// ../../internal/utils/src/promise.ts
|
|
10763
|
+
var promise_exports = {};
|
|
10764
|
+
__export(promise_exports, {
|
|
10765
|
+
allSettledWithConcurrency: () => allSettledWithConcurrency,
|
|
10766
|
+
isPromiseSettledResultFulfilled: () => isPromiseSettledResultFulfilled,
|
|
10767
|
+
isPromiseSettledResultRejected: () => isPromiseSettledResultRejected
|
|
10768
|
+
});
|
|
10769
|
+
function isPromiseSettledResultFulfilled(result) {
|
|
10770
|
+
return result.status === "fulfilled";
|
|
10771
|
+
}
|
|
10772
|
+
function isPromiseSettledResultRejected(result) {
|
|
10773
|
+
return result.status === "rejected";
|
|
10774
|
+
}
|
|
10775
|
+
function allSettledWithConcurrency(items, limit, fn5) {
|
|
10776
|
+
return __async(this, null, function* () {
|
|
10777
|
+
const results = new Array(items.length);
|
|
10778
|
+
let next = 0;
|
|
10779
|
+
const worker = () => __async(null, null, function* () {
|
|
10780
|
+
for (; ; ) {
|
|
10781
|
+
const index = next;
|
|
10782
|
+
next += 1;
|
|
10783
|
+
if (index >= items.length) return;
|
|
10784
|
+
try {
|
|
10785
|
+
results[index] = { status: "fulfilled", value: yield fn5(items[index], index) };
|
|
10786
|
+
} catch (reason) {
|
|
10787
|
+
results[index] = { status: "rejected", reason };
|
|
10788
|
+
}
|
|
10789
|
+
}
|
|
10790
|
+
});
|
|
10791
|
+
const workers = Math.max(1, Math.min(Math.floor(limit) || 1, items.length));
|
|
10792
|
+
yield Promise.all(Array.from({ length: workers }, worker));
|
|
10793
|
+
return results;
|
|
10794
|
+
});
|
|
10595
10795
|
}
|
|
10596
|
-
var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
|
|
10597
10796
|
|
|
10598
10797
|
// ../../internal/utils/src/email.ts
|
|
10599
10798
|
var email_exports = {};
|
|
@@ -10763,6 +10962,7 @@ function buildSafePreviewUrl({
|
|
|
10763
10962
|
var parse_exports = {};
|
|
10764
10963
|
__export(parse_exports, {
|
|
10765
10964
|
parseTerms: () => parseTerms,
|
|
10965
|
+
repairTermsString: () => repairTermsString,
|
|
10766
10966
|
stringifyTerms: () => stringifyTerms
|
|
10767
10967
|
});
|
|
10768
10968
|
function parseTerms(terms, {
|
|
@@ -10789,6 +10989,31 @@ function parseTerms(terms, {
|
|
|
10789
10989
|
function stringifyTerms(parsedTerms) {
|
|
10790
10990
|
return parsedTerms.map((term) => term.type === "exact" ? `*${term.value}*` : term.value).join(", ");
|
|
10791
10991
|
}
|
|
10992
|
+
function repairTermsString(terms) {
|
|
10993
|
+
if (!terms) return terms;
|
|
10994
|
+
const entries = terms.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
10995
|
+
if (entries.length === 0) return terms;
|
|
10996
|
+
const first = entries[0];
|
|
10997
|
+
const last = entries[entries.length - 1];
|
|
10998
|
+
const isWholeListWrap = entries.length > 1 && first.startsWith("*") && !first.endsWith("*") && last.endsWith("*") && !last.startsWith("*");
|
|
10999
|
+
const hasOneSidedAsterisk = entries.some(
|
|
11000
|
+
(entry) => entry.startsWith("*") !== entry.endsWith("*")
|
|
11001
|
+
);
|
|
11002
|
+
if (!isWholeListWrap && !hasOneSidedAsterisk) return terms;
|
|
11003
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11004
|
+
const repaired = [];
|
|
11005
|
+
for (const entry of entries) {
|
|
11006
|
+
const inner = entry.replace(/^\*+|\*+$/g, "").trim();
|
|
11007
|
+
if (inner.length === 0) continue;
|
|
11008
|
+
const isExact = isWholeListWrap || entry.startsWith("*") && entry.endsWith("*") && entry.length > 2;
|
|
11009
|
+
const formatted = isExact ? `*${inner}*` : inner;
|
|
11010
|
+
const key = formatted.toLowerCase();
|
|
11011
|
+
if (seen.has(key)) continue;
|
|
11012
|
+
seen.add(key);
|
|
11013
|
+
repaired.push(formatted);
|
|
11014
|
+
}
|
|
11015
|
+
return repaired.join(", ");
|
|
11016
|
+
}
|
|
10792
11017
|
|
|
10793
11018
|
// ../../internal/utils/src/brand-pattern.ts
|
|
10794
11019
|
var brand_pattern_exports = {};
|
|
@@ -11050,6 +11275,65 @@ function parseLinkedInProfileUrl(url) {
|
|
|
11050
11275
|
return { pathSegment, handle, name, profileUrl };
|
|
11051
11276
|
}
|
|
11052
11277
|
|
|
11278
|
+
// ../../internal/utils/src/detection-sources.ts
|
|
11279
|
+
var UNKNOWN_DETECTION_SOURCE = "unknown";
|
|
11280
|
+
var WORD_OVERRIDES = {
|
|
11281
|
+
ads: "Ads",
|
|
11282
|
+
dns: "DNS",
|
|
11283
|
+
dnsdb: "DNSDB",
|
|
11284
|
+
duck: "Duck",
|
|
11285
|
+
go: "Go",
|
|
11286
|
+
ip: "IP",
|
|
11287
|
+
linkedin: "LinkedIn",
|
|
11288
|
+
rss: "RSS",
|
|
11289
|
+
serp: "SERP",
|
|
11290
|
+
tik: "Tik",
|
|
11291
|
+
tok: "Tok",
|
|
11292
|
+
urlscan: "URLScan",
|
|
11293
|
+
youtube: "YouTube"
|
|
11294
|
+
};
|
|
11295
|
+
var KEY_OVERRIDES = {
|
|
11296
|
+
["duck_duck_go_search" /* DUCK_DUCK_GO_SEARCH */]: "DuckDuckGo Search",
|
|
11297
|
+
["tik_tok_ads_search" /* TIK_TOK_ADS_SEARCH */]: "TikTok Ads Search",
|
|
11298
|
+
["tik_tok_user_search" /* TIK_TOK_USER_SEARCH */]: "TikTok User Search",
|
|
11299
|
+
["tik_tok_video_search" /* TIK_TOK_VIDEO_SEARCH */]: "TikTok Video Search",
|
|
11300
|
+
["dns_twist" /* DNS_TWIST */]: "DNSTwist",
|
|
11301
|
+
// Keys carry the vendor for internal traceability; customers see neither.
|
|
11302
|
+
["telegram_user_search_vetric" /* TELEGRAM_USER_SEARCH_VETRIC */]: "Telegram User Discovery",
|
|
11303
|
+
["telegram_channels_search_vetric" /* TELEGRAM_CHANNELS_SEARCH_VETRIC */]: "Telegram Channel Discovery",
|
|
11304
|
+
["facebook_page_search_vetric" /* FACEBOOK_PAGE_SEARCH_VETRIC */]: "Facebook Page Discovery",
|
|
11305
|
+
["facebook_user_search_vetric" /* FACEBOOK_USER_SEARCH_VETRIC */]: "Facebook User Discovery",
|
|
11306
|
+
["facebook_post_search_vetric" /* FACEBOOK_POST_SEARCH_VETRIC */]: "Facebook Post Discovery",
|
|
11307
|
+
["instagram_account_search_vetric" /* INSTAGRAM_ACCOUNT_SEARCH_VETRIC */]: "Instagram Account Discovery",
|
|
11308
|
+
["twitter_search_vetric" /* TWITTER_SEARCH_VETRIC */]: "Twitter People Discovery",
|
|
11309
|
+
["linkedin_people_search_vetric" /* LINKEDIN_PEOPLE_SEARCH_VETRIC */]: "LinkedIn People Discovery",
|
|
11310
|
+
["linkedin_company_search_vetric" /* LINKEDIN_COMPANY_SEARCH_VETRIC */]: "LinkedIn Company Discovery",
|
|
11311
|
+
["meta_ads_search_vetric" /* META_ADS_SEARCH_VETRIC */]: "Meta Ads Discovery",
|
|
11312
|
+
["tik_tok_user_search_vetric" /* TIK_TOK_USER_SEARCH_VETRIC */]: "TikTok User Discovery",
|
|
11313
|
+
["tik_tok_video_search_vetric" /* TIK_TOK_VIDEO_SEARCH_VETRIC */]: "TikTok Post Discovery",
|
|
11314
|
+
[UNKNOWN_DETECTION_SOURCE]: "Unknown (no source recorded)"
|
|
11315
|
+
};
|
|
11316
|
+
function detectionSourceLabel(key) {
|
|
11317
|
+
const override = KEY_OVERRIDES[key];
|
|
11318
|
+
if (override) return override;
|
|
11319
|
+
return key.split("_").map((word2) => {
|
|
11320
|
+
var _a;
|
|
11321
|
+
return (_a = WORD_OVERRIDES[word2]) != null ? _a : word2.charAt(0).toUpperCase() + word2.slice(1);
|
|
11322
|
+
}).join(" ");
|
|
11323
|
+
}
|
|
11324
|
+
[
|
|
11325
|
+
...Object.values(ThreatDetectionSourceKey).map((key) => ({
|
|
11326
|
+
value: key,
|
|
11327
|
+
label: detectionSourceLabel(key),
|
|
11328
|
+
searchText: `${key} ${detectionSourceLabel(key)}`
|
|
11329
|
+
})),
|
|
11330
|
+
{
|
|
11331
|
+
value: UNKNOWN_DETECTION_SOURCE,
|
|
11332
|
+
label: detectionSourceLabel(UNKNOWN_DETECTION_SOURCE),
|
|
11333
|
+
searchText: UNKNOWN_DETECTION_SOURCE
|
|
11334
|
+
}
|
|
11335
|
+
].sort((a, b) => a.label.localeCompare(b.label));
|
|
11336
|
+
|
|
11053
11337
|
// ../../internal/validation/src/public/detection/configs-create.ts
|
|
11054
11338
|
z.object({
|
|
11055
11339
|
slug: z.string().min(1).optional().describe(
|
|
@@ -11434,6 +11718,44 @@ z.object({
|
|
|
11434
11718
|
})
|
|
11435
11719
|
)
|
|
11436
11720
|
});
|
|
11721
|
+
var DATE_ONLY_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
11722
|
+
var utcDateSchema = (endOfDay) => z.preprocess((value) => {
|
|
11723
|
+
if (typeof value !== "string") {
|
|
11724
|
+
return value;
|
|
11725
|
+
}
|
|
11726
|
+
const parsed = DateTime.fromISO(value, { zone: "utc" });
|
|
11727
|
+
if (!parsed.isValid) {
|
|
11728
|
+
return new Date(Number.NaN);
|
|
11729
|
+
}
|
|
11730
|
+
return endOfDay && DATE_ONLY_PATTERN.test(value) ? parsed.endOf("day").toJSDate() : parsed.toJSDate();
|
|
11731
|
+
}, z.coerce.date());
|
|
11732
|
+
|
|
11733
|
+
// ../../internal/validation/src/public/metrics/false-positive-rate.ts
|
|
11734
|
+
z.object({
|
|
11735
|
+
slug: z.string().min(1).describe("Organization slug"),
|
|
11736
|
+
startDate: utcDateSchema(false).optional().describe(
|
|
11737
|
+
"Only include assets blocked on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11738
|
+
),
|
|
11739
|
+
endDate: utcDateSchema(true).optional().describe(
|
|
11740
|
+
"Only include assets blocked on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11741
|
+
),
|
|
11742
|
+
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands"),
|
|
11743
|
+
countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries")
|
|
11744
|
+
});
|
|
11745
|
+
z.object({
|
|
11746
|
+
byAssetType: z.array(
|
|
11747
|
+
z.object({
|
|
11748
|
+
assetType: z.nativeEnum(AssetType).describe("Asset type that was blocked"),
|
|
11749
|
+
blocked: z.number().describe("Assets of this type blocked within the date range"),
|
|
11750
|
+
falsePositives: z.number().describe("Of those, how many are no longer blocked today"),
|
|
11751
|
+
falsePositiveRate: z.number().nullable().describe(
|
|
11752
|
+
"falsePositives / blocked, 0-1. Null only when nothing was blocked, which cannot happen for a returned row"
|
|
11753
|
+
)
|
|
11754
|
+
})
|
|
11755
|
+
).describe(
|
|
11756
|
+
"False positive rate, one entry per asset type blocked in the range, descending by number blocked. Asset types with no false positives are included with a rate of 0; asset types with no blocks at all in the range are omitted, since they have no rate to report. The denominator counts block events, not distinct assets, so an asset blocked twice in the range counts twice. Whether a block still stands is read as of now while the range bounds the block itself, so a recent range reads low. An asset's blocked status is global, so a block another organization's report caused to be reversed is counted here too"
|
|
11757
|
+
)
|
|
11758
|
+
});
|
|
11437
11759
|
z.object({
|
|
11438
11760
|
slug: z.string().min(1),
|
|
11439
11761
|
startDate: z.date(),
|
|
@@ -11448,8 +11770,8 @@ z.object({
|
|
|
11448
11770
|
endDate: z.date()
|
|
11449
11771
|
})
|
|
11450
11772
|
});
|
|
11451
|
-
var
|
|
11452
|
-
var
|
|
11773
|
+
var DATE_ONLY_PATTERN2 = /^\d{4}-\d{2}-\d{2}$/;
|
|
11774
|
+
var utcDateSchema2 = (endOfDay) => z.preprocess((value) => {
|
|
11453
11775
|
if (typeof value !== "string") {
|
|
11454
11776
|
return value;
|
|
11455
11777
|
}
|
|
@@ -11457,7 +11779,7 @@ var utcDateSchema = (endOfDay) => z.preprocess((value) => {
|
|
|
11457
11779
|
if (!parsed.isValid) {
|
|
11458
11780
|
return new Date(Number.NaN);
|
|
11459
11781
|
}
|
|
11460
|
-
return endOfDay &&
|
|
11782
|
+
return endOfDay && DATE_ONLY_PATTERN2.test(value) ? parsed.endOf("day").toJSDate() : parsed.toJSDate();
|
|
11461
11783
|
}, z.coerce.date());
|
|
11462
11784
|
var funnelCountsSchema = z.object({
|
|
11463
11785
|
blocked: z.number().int().nonnegative().describe(
|
|
@@ -11466,10 +11788,10 @@ var funnelCountsSchema = z.object({
|
|
|
11466
11788
|
});
|
|
11467
11789
|
z.object({
|
|
11468
11790
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11469
|
-
startDate:
|
|
11791
|
+
startDate: utcDateSchema2(false).describe(
|
|
11470
11792
|
"Only include assets whose earliest report was created on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11471
11793
|
),
|
|
11472
|
-
endDate:
|
|
11794
|
+
endDate: utcDateSchema2(true).describe(
|
|
11473
11795
|
"Only include assets whose earliest report was created on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11474
11796
|
),
|
|
11475
11797
|
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands")
|
|
@@ -11523,25 +11845,12 @@ z.object({
|
|
|
11523
11845
|
})
|
|
11524
11846
|
)
|
|
11525
11847
|
});
|
|
11526
|
-
var DATE_ONLY_PATTERN2 = /^\d{4}-\d{2}-\d{2}$/;
|
|
11527
|
-
var utcDateSchema2 = (endOfDay) => z.preprocess((value) => {
|
|
11528
|
-
if (typeof value !== "string") {
|
|
11529
|
-
return value;
|
|
11530
|
-
}
|
|
11531
|
-
const parsed = DateTime.fromISO(value, { zone: "utc" });
|
|
11532
|
-
if (!parsed.isValid) {
|
|
11533
|
-
return new Date(Number.NaN);
|
|
11534
|
-
}
|
|
11535
|
-
return endOfDay && DATE_ONLY_PATTERN2.test(value) ? parsed.endOf("day").toJSDate() : parsed.toJSDate();
|
|
11536
|
-
}, z.coerce.date());
|
|
11537
|
-
|
|
11538
|
-
// ../../internal/validation/src/public/metrics/takedown-success-rate.ts
|
|
11539
11848
|
z.object({
|
|
11540
11849
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11541
|
-
startDate:
|
|
11850
|
+
startDate: utcDateSchema(false).optional().describe(
|
|
11542
11851
|
"Only include takedowns first submitted to a provider on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11543
11852
|
),
|
|
11544
|
-
endDate:
|
|
11853
|
+
endDate: utcDateSchema(true).optional().describe(
|
|
11545
11854
|
"Only include takedowns first submitted to a provider on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11546
11855
|
),
|
|
11547
11856
|
blockLabel: z.string().optional().describe(
|
|
@@ -11569,10 +11878,10 @@ z.object({
|
|
|
11569
11878
|
});
|
|
11570
11879
|
z.object({
|
|
11571
11880
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11572
|
-
startDate:
|
|
11881
|
+
startDate: utcDateSchema(false).optional().describe(
|
|
11573
11882
|
"Only include takedowns completed on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11574
11883
|
),
|
|
11575
|
-
endDate:
|
|
11884
|
+
endDate: utcDateSchema(true).optional().describe(
|
|
11576
11885
|
"Only include takedowns completed on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11577
11886
|
),
|
|
11578
11887
|
blockLabel: z.string().optional().describe(
|
|
@@ -11602,10 +11911,10 @@ var TakedownProviderRoleSchema = z.enum([
|
|
|
11602
11911
|
]);
|
|
11603
11912
|
z.object({
|
|
11604
11913
|
slug: z.string().min(1).describe("Organization slug"),
|
|
11605
|
-
startDate:
|
|
11914
|
+
startDate: utcDateSchema(false).optional().describe(
|
|
11606
11915
|
"Only include takedowns completed on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
11607
11916
|
),
|
|
11608
|
-
endDate:
|
|
11917
|
+
endDate: utcDateSchema(true).optional().describe(
|
|
11609
11918
|
"Only include takedowns completed on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
11610
11919
|
),
|
|
11611
11920
|
roles: z.array(TakedownProviderRoleSchema).optional().describe(
|
|
@@ -11684,6 +11993,35 @@ z.object({
|
|
|
11684
11993
|
"One series per requested asset type, in the order requested, or a single pooled series when no asset types were given"
|
|
11685
11994
|
)
|
|
11686
11995
|
});
|
|
11996
|
+
z.object({
|
|
11997
|
+
slug: z.string().min(1).describe("Organization slug"),
|
|
11998
|
+
startDate: utcDateSchema(false).optional().describe(
|
|
11999
|
+
"Only include assets blocked on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
|
|
12000
|
+
),
|
|
12001
|
+
endDate: utcDateSchema(true).optional().describe(
|
|
12002
|
+
"Only include assets blocked on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
|
|
12003
|
+
),
|
|
12004
|
+
brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands"),
|
|
12005
|
+
countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries")
|
|
12006
|
+
});
|
|
12007
|
+
z.object({
|
|
12008
|
+
byAssetType: z.array(
|
|
12009
|
+
z.object({
|
|
12010
|
+
assetType: z.nativeEnum(AssetType).describe("Asset type that was blocked"),
|
|
12011
|
+
blocked: z.number().describe(
|
|
12012
|
+
"Distinct assets of this type the organization blocked within the date range that are still blocked today"
|
|
12013
|
+
),
|
|
12014
|
+
withEvidence: z.number().describe(
|
|
12015
|
+
"Of those, how many enter the median: an accepted live date and an automated detection after it. A live date with no detection result does not count, and a human report is not a detection"
|
|
12016
|
+
),
|
|
12017
|
+
medianDaysAtLeast: z.number().nullable().describe(
|
|
12018
|
+
"Median days the asset was already live before the earliest automated detection of that asset, for any organization. Always a minimum, because the live date is the first time anyone saw the asset. Null when withEvidence is 0"
|
|
12019
|
+
)
|
|
12020
|
+
})
|
|
12021
|
+
).describe(
|
|
12022
|
+
"Time to Detection, one entry per asset type this organization blocked in the range, descending by number blocked. The clock stops at the earliest automated detection of the asset for any organization, not at this organization's report. Assets that do not enter withEvidence are left out of the median. For URL and page assets only an observed-serving date counts, so a domain registration date never enters the number"
|
|
12023
|
+
)
|
|
12024
|
+
});
|
|
11687
12025
|
z.object({
|
|
11688
12026
|
slug: z.string().optional().describe(
|
|
11689
12027
|
"Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
|
|
@@ -11889,6 +12227,79 @@ var brandItemSchema = z.object({
|
|
|
11889
12227
|
z.object({
|
|
11890
12228
|
brands: z.array(brandItemSchema).describe("List of brands")
|
|
11891
12229
|
}).describe("Successful operation");
|
|
12230
|
+
var threatLifecycleStateSchema = z.enum(["investigating", "escalated", "blocked", "allowed", "closed"]).describe(
|
|
12231
|
+
"Lifecycle stage: `investigating` (a report is open and under review), `escalated` (an open report has been passed to the organization for a decision), `blocked` (confirmed malicious), `allowed` (confirmed benign / false positive), `closed` (every report reviewed, asset neither blocked nor allowed). `escalated` reflects an escalation that is still open, not one that was decided and followed by a new report."
|
|
12232
|
+
);
|
|
12233
|
+
z.object({
|
|
12234
|
+
slug: z.string().optional().describe(
|
|
12235
|
+
"Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
|
|
12236
|
+
),
|
|
12237
|
+
/**
|
|
12238
|
+
* A poll watermark rather than a true event cursor: there is no single
|
|
12239
|
+
* change log behind these threats, so the filter is an OR across the
|
|
12240
|
+
* `updatedAt` of every table the projection reads. Set it a few minutes
|
|
12241
|
+
* behind the last successful sync so in-flight writes are not skipped.
|
|
12242
|
+
*/
|
|
12243
|
+
updatedSince: z.string().refine((value) => DateTime.fromISO(value, { zone: "utc" }).isValid, {
|
|
12244
|
+
message: "updatedSince must be a valid ISO 8601 timestamp"
|
|
12245
|
+
}).transform((value) => DateTime.fromISO(value, { zone: "utc" }).toJSDate()).optional().describe(
|
|
12246
|
+
"Only return threats touched at or after this ISO 8601 timestamp. Compared against the most recent change to the asset, its reports, and its takedown \u2014 whichever is latest. Omit for a full backfill. Overlap your windows by a few minutes: writes that land mid-request can otherwise fall between two polls."
|
|
12247
|
+
),
|
|
12248
|
+
assetType: z.nativeEnum(AssetType).optional().describe("Filter by asset type. Omit to return every type."),
|
|
12249
|
+
per_page: z.number().int().min(1).max(1e3).optional().default(100).describe("The number of threats to return per page (max 1000)"),
|
|
12250
|
+
next_page: z.string().optional().nullable().describe("Cursor for fetching the next page of results")
|
|
12251
|
+
}).describe(
|
|
12252
|
+
`List organization threats request body
|
|
12253
|
+
|
|
12254
|
+
Returns every asset this organization has filed a report against, together with
|
|
12255
|
+
the lifecycle state of that investigation \u2014 report opened, escalated, blocked,
|
|
12256
|
+
takedown submitted, takedown completed.
|
|
12257
|
+
|
|
12258
|
+
This is a projection of current state, not an event stream: each threat is
|
|
12259
|
+
returned with the facts as they stand right now, so a consumer that upserts on
|
|
12260
|
+
\`id\` converges regardless of which intermediate transitions it saw. Results are
|
|
12261
|
+
ordered by asset ID ascending and paginated with \`next_page\`.`
|
|
12262
|
+
);
|
|
12263
|
+
var organizationThreatBrandSchema = z.object({
|
|
12264
|
+
slug: z.string().describe("Brand slug"),
|
|
12265
|
+
name: z.string().describe("Brand name")
|
|
12266
|
+
});
|
|
12267
|
+
var organizationThreatTakedownSchema = z.object({
|
|
12268
|
+
status: z.nativeEnum(TakedownStatus).describe("Current takedown status"),
|
|
12269
|
+
submittedAt: z.date().nullable().describe(
|
|
12270
|
+
"When the first takedown request was submitted to a provider, or null if nothing has been submitted yet"
|
|
12271
|
+
),
|
|
12272
|
+
completedAt: z.date().nullable().describe("When the takedown was marked completed, or null if it has not been")
|
|
12273
|
+
});
|
|
12274
|
+
var organizationThreatSchema = z.object({
|
|
12275
|
+
id: z.number().describe("Asset ID"),
|
|
12276
|
+
content: z.string().describe("Asset content (URL, handle, email, etc.)"),
|
|
12277
|
+
type: z.nativeEnum(AssetType).describe("Asset type"),
|
|
12278
|
+
status: z.nativeEnum(AssetStatus).describe("Raw asset status"),
|
|
12279
|
+
state: threatLifecycleStateSchema,
|
|
12280
|
+
livenessStatus: z.nativeEnum(LivenessStatus).describe(
|
|
12281
|
+
"Whether the threat is currently reachable (`ALIVE`), gone (`DEAD`), or unchecked (`UNKNOWN`)"
|
|
12282
|
+
),
|
|
12283
|
+
brands: z.array(organizationThreatBrandSchema).describe(
|
|
12284
|
+
"The brands of yours this threat was reported against. Empty when no report named one."
|
|
12285
|
+
),
|
|
12286
|
+
firstReportedAt: z.date().describe("When this organization first filed a report against the asset"),
|
|
12287
|
+
escalatedAt: z.date().nullable().describe(
|
|
12288
|
+
"When the asset was *first* escalated to this organization for a decision, or null if it never was. This is escalation history, not current state: an asset escalated once and later reported again reports `escalated_at` alongside a `state` of `investigating`. Read `state` to know whether anything is waiting on you right now."
|
|
12289
|
+
),
|
|
12290
|
+
blockedAt: z.date().nullable().describe("When the asset was blocklisted, or null if it has not been"),
|
|
12291
|
+
takedown: organizationThreatTakedownSchema.nullable().describe("Takedown progress, or null if no takedown was opened"),
|
|
12292
|
+
detailsUrl: z.string().describe("Deep link to the asset's reports and takedowns in the ChainPatrol app"),
|
|
12293
|
+
updatedAt: z.date().describe(
|
|
12294
|
+
"The most recent change to anything in this record \u2014 the asset, its reports, its takedown or that takedown's tasks. Matches what `updatedSince` filters on. To derive your next watermark, drain every page until `next_page` is null and take the highest value across the whole sweep: results are ordered by asset ID, not by this field, so a later page can carry an earlier timestamp and a per-page watermark would skip it."
|
|
12295
|
+
)
|
|
12296
|
+
});
|
|
12297
|
+
z.object({
|
|
12298
|
+
threats: z.array(organizationThreatSchema),
|
|
12299
|
+
next_page: z.string().nullable().optional().describe(
|
|
12300
|
+
"Cursor for fetching the next page of results, or null on the last page. Drain it to null before advancing your `updatedSince` watermark \u2014 see `updatedAt`."
|
|
12301
|
+
)
|
|
12302
|
+
}).describe("Successful operation");
|
|
11892
12303
|
var FILTERABLE_SUBSCRIPTION_STATUSES = [
|
|
11893
12304
|
SubscriptionStatus.PROSPECT,
|
|
11894
12305
|
SubscriptionStatus.POC,
|
|
@@ -12241,8 +12652,10 @@ var reportCreateInputSchema = z.object({
|
|
|
12241
12652
|
).optional().refine((value) => !value || !isPhoneNumberMissingCountryCode(value), {
|
|
12242
12653
|
message: PHONE_COUNTRY_CODE_ERROR_MESSAGE
|
|
12243
12654
|
}),
|
|
12244
|
-
/** Optional list of URLs for
|
|
12245
|
-
attachmentUrls: z.array(z.string().url()).optional().describe(
|
|
12655
|
+
/** Optional list of URLs for files to be attached to the report as evidence. */
|
|
12656
|
+
attachmentUrls: z.array(z.string().url()).optional().describe(
|
|
12657
|
+
"URLs of files to attach to the report as evidence. Any file type, not only images: .eml/.msg messages, PDFs, and documents are all supported. Upload a file to POST /attachment/upload to get a URL, or pass a publicly reachable URL you host yourself."
|
|
12658
|
+
),
|
|
12246
12659
|
/** Optional link to the external submission (e.g. Telegram message link) */
|
|
12247
12660
|
externalSubmissionLink: z.string().url().optional().describe("Link to the external submission (e.g. Telegram message link)"),
|
|
12248
12661
|
/** Optional user agent string from the reporter's browser */
|
|
@@ -12410,6 +12823,38 @@ for parsing the dates.`
|
|
|
12410
12823
|
path: ["startDate"]
|
|
12411
12824
|
}
|
|
12412
12825
|
);
|
|
12826
|
+
var TakedownProofType = {
|
|
12827
|
+
ProviderEmail: "provider-email"
|
|
12828
|
+
};
|
|
12829
|
+
var takedownProofEmailSchema = z.object({
|
|
12830
|
+
text: z.string().describe(
|
|
12831
|
+
"The provider's reply, verbatim. Plain-text body where the provider sent one, otherwise the raw HTML body \u2014 treat it as untrusted content and escape it before rendering."
|
|
12832
|
+
),
|
|
12833
|
+
subject: z.string().nullable().describe("Subject line of the provider's reply.")
|
|
12834
|
+
}).nullable().describe(
|
|
12835
|
+
"Present when `type` is `provider-email`, `null` for every other proof type."
|
|
12836
|
+
);
|
|
12837
|
+
var takedownProofSchema = z.object({
|
|
12838
|
+
type: z.nativeEnum(TakedownProofType).describe(
|
|
12839
|
+
"Which kind of evidence this is. Currently only `provider-email`. New types may be added over time \u2014 read `type` before reading any of the type-specific objects below, and treat an unrecognised value as an opaque proof rather than an error."
|
|
12840
|
+
),
|
|
12841
|
+
source: z.string().nullable().describe(
|
|
12842
|
+
"Who confirmed the takedown, in whatever form that provider identifies itself \u2014 an address such as `abuse@example.com` for `provider-email`."
|
|
12843
|
+
),
|
|
12844
|
+
confirmedAt: z.date().describe("When the provider confirmed the takedown."),
|
|
12845
|
+
email: takedownProofEmailSchema
|
|
12846
|
+
});
|
|
12847
|
+
var takedownProofsSchema = z.array(takedownProofSchema).describe(
|
|
12848
|
+
`Evidence that this takedown is ours: providers confirming they removed the asset, newest first.
|
|
12849
|
+
|
|
12850
|
+
A takedown filed at several providers can be confirmed by more than one of them, so this is a list. At most 5 are returned per takedown.
|
|
12851
|
+
|
|
12852
|
+
\`type\`, \`source\` and \`confirmedAt\` are present on every entry, so a caller that only needs to show "confirmed by X on date Y" never has to branch on the type. The type-specific object (\`email\`, and others as they are added) carries the underlying evidence.
|
|
12853
|
+
|
|
12854
|
+
Empty unless the takedown is COMPLETED and we hold a confirmation \u2014 which is the common case, because most providers either never reply or reply without confirming they acted. An empty list is not evidence that the asset is still up.
|
|
12855
|
+
|
|
12856
|
+
Requires the \`takedown-proof-api\` feature flag; without it this is always empty.`
|
|
12857
|
+
);
|
|
12413
12858
|
var takedownItemSchema = z.object({
|
|
12414
12859
|
id: z.number().describe("Takedown ID"),
|
|
12415
12860
|
status: z.nativeEnum(TakedownStatus).describe("Takedown status"),
|
|
@@ -12459,7 +12904,8 @@ var takedownItemSchema = z.object({
|
|
|
12459
12904
|
name: z.string().describe("TLD registrar name (e.g. `Verisign`, `Public Interest Registry`)")
|
|
12460
12905
|
}).nullable().describe(
|
|
12461
12906
|
"Top-level-domain registrar assigned to this takedown. `null` when unresolved."
|
|
12462
|
-
)
|
|
12907
|
+
),
|
|
12908
|
+
proofs: takedownProofsSchema
|
|
12463
12909
|
});
|
|
12464
12910
|
z.object({
|
|
12465
12911
|
takedowns: z.array(takedownItemSchema).describe("List of takedowns"),
|
|
@@ -12775,12 +13221,17 @@ var ONE_PAGER_BUDGETS = {
|
|
|
12775
13221
|
headline: 60,
|
|
12776
13222
|
badge: 28,
|
|
12777
13223
|
frontLabel: 44,
|
|
12778
|
-
paragraph: 480,
|
|
12779
13224
|
paragraphsMax: 2,
|
|
12780
13225
|
heroPhrase: 80,
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
13226
|
+
landscapeCaption: 180,
|
|
13227
|
+
xp01Line: 220,
|
|
13228
|
+
screenshotCaption: 48,
|
|
13229
|
+
divergenceLine: 220
|
|
13230
|
+
};
|
|
13231
|
+
var ONE_PAGER_STORED_MAX = {
|
|
13232
|
+
paragraph: 480,
|
|
13233
|
+
paragraph2Lead: 60,
|
|
13234
|
+
heroNarrative: 300
|
|
12784
13235
|
};
|
|
12785
13236
|
var onePagerFactPayloadSchema = z.object({
|
|
12786
13237
|
/** Raw (not defanged) asset contents the prose may reference. */
|
|
@@ -12792,24 +13243,56 @@ var onePagerFactPayloadSchema = z.object({
|
|
|
12792
13243
|
platforms: z.array(z.string()),
|
|
12793
13244
|
groupSize: z.number(),
|
|
12794
13245
|
takedownCompletedAt: z.string().nullable(),
|
|
12795
|
-
activeSince: z.string().nullable()
|
|
13246
|
+
activeSince: z.string().nullable(),
|
|
13247
|
+
// ---- v2 enrichment ----------------------------------------------------
|
|
13248
|
+
// Optional rather than defaulted so rows stored by v1 keep parsing AND the
|
|
13249
|
+
// inferred type stays assignable from a v1-shaped literal.
|
|
13250
|
+
/** How the attacker paid for the surface ("free_subdomain" | ...). */
|
|
13251
|
+
hostingPattern: z.string().nullable().optional(),
|
|
13252
|
+
/** Who surfaced it first ("client_reported" | "proactive"). */
|
|
13253
|
+
sourceKind: z.string().nullable().optional(),
|
|
13254
|
+
/** Prior blocked assets in the same relaunch family. */
|
|
13255
|
+
relaunchCount: z.number().nullable().optional(),
|
|
13256
|
+
/** Earliest sighting, ISO. */
|
|
13257
|
+
firstSeenAt: z.string().nullable().optional(),
|
|
13258
|
+
/**
|
|
13259
|
+
* Pre-computed hours from first sighting to confirmed removal, as a string
|
|
13260
|
+
* so it lands in the same allowlist as `numbers`. The model is forbidden
|
|
13261
|
+
* from doing arithmetic, so every duration it may cite is computed here.
|
|
13262
|
+
*/
|
|
13263
|
+
timeToRemovalHrs: z.string().nullable().optional()
|
|
12796
13264
|
});
|
|
12797
13265
|
var onePagerStorySchema = z.object({
|
|
12798
13266
|
archetypeId: z.string(),
|
|
12799
13267
|
archetypeCategory: z.string(),
|
|
12800
13268
|
/** 1-5 = placed on the page; null = alternate available for swap. */
|
|
12801
13269
|
slot: z.number().int().min(1).max(5).nullable(),
|
|
13270
|
+
/** Column layout the story occupies; slot 1 is full-width by convention. */
|
|
13271
|
+
layout: z.enum(["full", "half"]).default("half"),
|
|
12802
13272
|
frontLabel: z.string().max(ONE_PAGER_BUDGETS.frontLabel),
|
|
12803
13273
|
headline: z.string().max(ONE_PAGER_BUDGETS.headline),
|
|
13274
|
+
/** Compound "10 of 10 removed · 3 hrs". */
|
|
12804
13275
|
badge: z.string().max(ONE_PAGER_BUDGETS.badge),
|
|
12805
|
-
paragraphs: z.array(z.string().max(
|
|
13276
|
+
paragraphs: z.array(z.string().max(ONE_PAGER_STORED_MAX.paragraph)).min(1).max(ONE_PAGER_BUDGETS.paragraphsMax),
|
|
13277
|
+
/** Bold lead-in shown ahead of the second paragraph. */
|
|
13278
|
+
paragraph2Lead: z.string().max(ONE_PAGER_STORED_MAX.paragraph2Lead).nullable().default(null),
|
|
12806
13279
|
/** Defanged, display-ready asset identifiers. */
|
|
12807
|
-
assetList: z.array(z.string()).max(
|
|
13280
|
+
assetList: z.array(z.string()).max(12),
|
|
13281
|
+
/** Story-bank identity for the referenced assets. */
|
|
13282
|
+
assetIds: z.array(z.number()).default([]),
|
|
12808
13283
|
screenshotUrls: z.array(z.string()),
|
|
12809
13284
|
selectedScreenshotUrls: z.array(z.string()).max(2),
|
|
13285
|
+
/** Parallel to selectedScreenshotUrls. */
|
|
13286
|
+
screenshotCaptions: z.array(z.string().max(ONE_PAGER_BUDGETS.screenshotCaption)).max(2).default([]),
|
|
13287
|
+
/** Manual redact toggle, parallel to selectedScreenshotUrls. */
|
|
13288
|
+
screenshotBlur: z.array(z.boolean()).max(2).default([]),
|
|
12810
13289
|
xp01Line: z.string().max(ONE_PAGER_BUDGETS.xp01Line).nullable(),
|
|
12811
13290
|
factPayload: onePagerFactPayloadSchema,
|
|
12812
|
-
proseSource: z.enum(["llm", "template"])
|
|
13291
|
+
proseSource: z.enum(["llm", "template"]),
|
|
13292
|
+
/** Cross-period continuation framing. */
|
|
13293
|
+
continuation: z.boolean().default(false),
|
|
13294
|
+
/** Shown in the editor when this story overlaps with a prior period. */
|
|
13295
|
+
priorHeadline: z.string().nullable().default(null)
|
|
12813
13296
|
});
|
|
12814
13297
|
var onePagerLandscapeRowSchema = z.object({
|
|
12815
13298
|
platform: z.string(),
|
|
@@ -12820,25 +13303,55 @@ var onePagerFormDataObjectSchema = z.object({
|
|
|
12820
13303
|
orgName: z.string(),
|
|
12821
13304
|
orgSlug: z.string(),
|
|
12822
13305
|
periodLabel: z.string(),
|
|
13306
|
+
partnershipLabel: z.string().max(40).default("AN ONGOING PARTNERSHIP"),
|
|
13307
|
+
coverageWindow: z.object({ start: z.string(), end: z.string(), label: z.string(), short: z.boolean() }).nullable().default(null),
|
|
12823
13308
|
heroStat: z.object({
|
|
12824
13309
|
value: z.string(),
|
|
12825
13310
|
phrase: z.string().max(ONE_PAGER_BUDGETS.heroPhrase)
|
|
12826
13311
|
}),
|
|
12827
|
-
heroNarrative: z.string().max(
|
|
12828
|
-
|
|
13312
|
+
heroNarrative: z.string().max(ONE_PAGER_STORED_MAX.heroNarrative),
|
|
13313
|
+
/**
|
|
13314
|
+
* Up to 4 rows, but the metric library legitimately returns fewer on a thin
|
|
13315
|
+
* month (a zero-valued metric is excluded outright rather than rendered as
|
|
13316
|
+
* a "0" row), so this is a range, not a fixed length. Below 2 the block
|
|
13317
|
+
* reads as broken rather than short.
|
|
13318
|
+
*/
|
|
13319
|
+
metricsRows: z.array(
|
|
13320
|
+
z.object({
|
|
13321
|
+
key: z.string().default("legacy"),
|
|
13322
|
+
label: z.string(),
|
|
13323
|
+
value: z.string()
|
|
13324
|
+
})
|
|
13325
|
+
).min(2).max(4),
|
|
12829
13326
|
landscape: z.object({
|
|
12830
13327
|
rows: z.array(onePagerLandscapeRowSchema).max(8),
|
|
12831
13328
|
otherCount: z.number().nullable(),
|
|
12832
13329
|
otherPlatformsLabel: z.string().nullable(),
|
|
12833
|
-
|
|
13330
|
+
/** Kept for legacy row parse; caption is preferred going forward. */
|
|
13331
|
+
divergenceLine: z.string().max(ONE_PAGER_BUDGETS.divergenceLine).nullable(),
|
|
13332
|
+
caption: z.string().max(ONE_PAGER_BUDGETS.landscapeCaption).nullable().default(null)
|
|
12834
13333
|
}),
|
|
12835
13334
|
stories: z.array(onePagerStorySchema).min(1).max(6),
|
|
12836
|
-
footer: z.object({
|
|
13335
|
+
footer: z.object({
|
|
13336
|
+
contactName: z.string(),
|
|
13337
|
+
contactLine: z.string(),
|
|
13338
|
+
contactEmail: z.string().default(""),
|
|
13339
|
+
bookingLink: z.string().default(""),
|
|
13340
|
+
ctaLine: z.string().default("Anything your community has flagged, send it over.")
|
|
13341
|
+
}),
|
|
13342
|
+
/** Engine v2 writes 2; absent/older rows default to 1. */
|
|
13343
|
+
schemaVersion: z.number().default(1)
|
|
12837
13344
|
});
|
|
12838
13345
|
onePagerFormDataObjectSchema.refine(
|
|
12839
13346
|
(data) => data.stories.some((s2) => s2.slot !== null),
|
|
12840
13347
|
{ message: "at least one story must be placed", path: ["stories"] }
|
|
12841
13348
|
);
|
|
13349
|
+
var INTERNAL_ORG_SLUGS = [
|
|
13350
|
+
"chainpatrol",
|
|
13351
|
+
"chainpatrol-automation",
|
|
13352
|
+
"mountaintop"
|
|
13353
|
+
];
|
|
13354
|
+
new Set(INTERNAL_ORG_SLUGS);
|
|
12842
13355
|
z.object({
|
|
12843
13356
|
x: z.number().min(0).max(1),
|
|
12844
13357
|
y: z.number().min(0).max(1),
|
|
@@ -13459,7 +13972,7 @@ function parseModernSyntax(tokens, includeHue) {
|
|
|
13459
13972
|
coords.unshift(token.value);
|
|
13460
13973
|
return coords;
|
|
13461
13974
|
}
|
|
13462
|
-
var
|
|
13975
|
+
var parse4 = (color) => {
|
|
13463
13976
|
if (typeof color !== "string") {
|
|
13464
13977
|
return void 0;
|
|
13465
13978
|
}
|
|
@@ -13475,7 +13988,7 @@ var parse3 = (color) => {
|
|
|
13475
13988
|
}
|
|
13476
13989
|
return tokens ? parseColorSyntax(tokens) : void 0;
|
|
13477
13990
|
};
|
|
13478
|
-
var parse_default =
|
|
13991
|
+
var parse_default = parse4;
|
|
13479
13992
|
|
|
13480
13993
|
// ../../node_modules/culori/src/rgb/parseRgb.js
|
|
13481
13994
|
function parseRgb(color, parsed) {
|
|
@@ -13604,20 +14117,20 @@ var convertA98ToXyz65_default = convertA98ToXyz65;
|
|
|
13604
14117
|
|
|
13605
14118
|
// ../../node_modules/culori/src/a98/convertXyz65ToA98.js
|
|
13606
14119
|
var gamma = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
|
|
13607
|
-
var convertXyz65ToA98 = ({ x, y, z:
|
|
14120
|
+
var convertXyz65ToA98 = ({ x, y, z: z68, alpha }) => {
|
|
13608
14121
|
if (x === void 0) x = 0;
|
|
13609
14122
|
if (y === void 0) y = 0;
|
|
13610
|
-
if (
|
|
14123
|
+
if (z68 === void 0) z68 = 0;
|
|
13611
14124
|
let res = {
|
|
13612
14125
|
mode: "a98",
|
|
13613
14126
|
r: gamma(
|
|
13614
|
-
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 *
|
|
14127
|
+
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z68
|
|
13615
14128
|
),
|
|
13616
14129
|
g: gamma(
|
|
13617
|
-
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 *
|
|
14130
|
+
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z68
|
|
13618
14131
|
),
|
|
13619
14132
|
b: gamma(
|
|
13620
|
-
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 *
|
|
14133
|
+
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z68
|
|
13621
14134
|
)
|
|
13622
14135
|
};
|
|
13623
14136
|
if (alpha !== void 0) {
|
|
@@ -13684,14 +14197,14 @@ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
|
|
|
13684
14197
|
var convertLrgbToRgb_default = convertLrgbToRgb;
|
|
13685
14198
|
|
|
13686
14199
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js
|
|
13687
|
-
var convertXyz65ToRgb = ({ x, y, z:
|
|
14200
|
+
var convertXyz65ToRgb = ({ x, y, z: z68, alpha }) => {
|
|
13688
14201
|
if (x === void 0) x = 0;
|
|
13689
14202
|
if (y === void 0) y = 0;
|
|
13690
|
-
if (
|
|
14203
|
+
if (z68 === void 0) z68 = 0;
|
|
13691
14204
|
let res = convertLrgbToRgb_default({
|
|
13692
|
-
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 *
|
|
13693
|
-
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 *
|
|
13694
|
-
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 *
|
|
14205
|
+
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z68,
|
|
14206
|
+
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z68,
|
|
14207
|
+
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z68
|
|
13695
14208
|
});
|
|
13696
14209
|
if (alpha !== void 0) {
|
|
13697
14210
|
res.alpha = alpha;
|
|
@@ -13941,13 +14454,13 @@ var convertLab65ToRgb_default = convertLab65ToRgb;
|
|
|
13941
14454
|
|
|
13942
14455
|
// ../../node_modules/culori/src/lab65/convertXyz65ToLab65.js
|
|
13943
14456
|
var f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
|
|
13944
|
-
var convertXyz65ToLab65 = ({ x, y, z:
|
|
14457
|
+
var convertXyz65ToLab65 = ({ x, y, z: z68, alpha }) => {
|
|
13945
14458
|
if (x === void 0) x = 0;
|
|
13946
14459
|
if (y === void 0) y = 0;
|
|
13947
|
-
if (
|
|
14460
|
+
if (z68 === void 0) z68 = 0;
|
|
13948
14461
|
let f0 = f(x / D65.X);
|
|
13949
14462
|
let f1 = f(y / D65.Y);
|
|
13950
|
-
let f22 = f(
|
|
14463
|
+
let f22 = f(z68 / D65.Z);
|
|
13951
14464
|
let res = {
|
|
13952
14465
|
mode: "lab65",
|
|
13953
14466
|
l: 116 * f1 - 16,
|
|
@@ -14604,10 +15117,10 @@ var convertItpToXyz65_default = convertItpToXyz65;
|
|
|
14604
15117
|
|
|
14605
15118
|
// ../../node_modules/culori/src/itp/convertXyz65ToItp.js
|
|
14606
15119
|
var toAbs = (c2 = 0) => Math.max(c2 * YW, 0);
|
|
14607
|
-
var convertXyz65ToItp = ({ x, y, z:
|
|
15120
|
+
var convertXyz65ToItp = ({ x, y, z: z68, alpha }) => {
|
|
14608
15121
|
const absX = toAbs(x);
|
|
14609
15122
|
const absY = toAbs(y);
|
|
14610
|
-
const absZ = toAbs(
|
|
15123
|
+
const absZ = toAbs(z68);
|
|
14611
15124
|
const l2 = transferPqEncode(
|
|
14612
15125
|
0.3592832590121217 * absX + 0.6976051147779502 * absY - 0.0358915932320289 * absZ
|
|
14613
15126
|
);
|
|
@@ -14665,15 +15178,15 @@ var jabPqEncode = (v) => {
|
|
|
14665
15178
|
return Math.pow((C1 + C2 * vn3) / (1 + C3 * vn3), p);
|
|
14666
15179
|
};
|
|
14667
15180
|
var abs = (v = 0) => Math.max(v * 203, 0);
|
|
14668
|
-
var convertXyz65ToJab = ({ x, y, z:
|
|
15181
|
+
var convertXyz65ToJab = ({ x, y, z: z68, alpha }) => {
|
|
14669
15182
|
x = abs(x);
|
|
14670
15183
|
y = abs(y);
|
|
14671
|
-
|
|
14672
|
-
let xp = 1.15 * x - 0.15 *
|
|
15184
|
+
z68 = abs(z68);
|
|
15185
|
+
let xp = 1.15 * x - 0.15 * z68;
|
|
14673
15186
|
let yp = 0.66 * y + 0.34 * x;
|
|
14674
|
-
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 *
|
|
14675
|
-
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 *
|
|
14676
|
-
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 *
|
|
15187
|
+
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z68);
|
|
15188
|
+
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z68);
|
|
15189
|
+
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z68);
|
|
14677
15190
|
let i = (l2 + m) / 2;
|
|
14678
15191
|
let res = {
|
|
14679
15192
|
mode: "jab",
|
|
@@ -14859,14 +15372,14 @@ var convertLabToXyz50 = ({ l: l2, a, b, alpha }) => {
|
|
|
14859
15372
|
var convertLabToXyz50_default = convertLabToXyz50;
|
|
14860
15373
|
|
|
14861
15374
|
// ../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js
|
|
14862
|
-
var convertXyz50ToRgb = ({ x, y, z:
|
|
15375
|
+
var convertXyz50ToRgb = ({ x, y, z: z68, alpha }) => {
|
|
14863
15376
|
if (x === void 0) x = 0;
|
|
14864
15377
|
if (y === void 0) y = 0;
|
|
14865
|
-
if (
|
|
15378
|
+
if (z68 === void 0) z68 = 0;
|
|
14866
15379
|
let res = convertLrgbToRgb_default({
|
|
14867
|
-
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 *
|
|
14868
|
-
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 *
|
|
14869
|
-
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 *
|
|
15380
|
+
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z68,
|
|
15381
|
+
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z68,
|
|
15382
|
+
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z68
|
|
14870
15383
|
});
|
|
14871
15384
|
if (alpha !== void 0) {
|
|
14872
15385
|
res.alpha = alpha;
|
|
@@ -14897,13 +15410,13 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
|
|
|
14897
15410
|
|
|
14898
15411
|
// ../../node_modules/culori/src/lab/convertXyz50ToLab.js
|
|
14899
15412
|
var f2 = (value) => value > e3 ? Math.cbrt(value) : (k3 * value + 16) / 116;
|
|
14900
|
-
var convertXyz50ToLab = ({ x, y, z:
|
|
15413
|
+
var convertXyz50ToLab = ({ x, y, z: z68, alpha }) => {
|
|
14901
15414
|
if (x === void 0) x = 0;
|
|
14902
15415
|
if (y === void 0) y = 0;
|
|
14903
|
-
if (
|
|
15416
|
+
if (z68 === void 0) z68 = 0;
|
|
14904
15417
|
let f0 = f2(x / D50.X);
|
|
14905
15418
|
let f1 = f2(y / D50.Y);
|
|
14906
|
-
let f22 = f2(
|
|
15419
|
+
let f22 = f2(z68 / D50.Z);
|
|
14907
15420
|
let res = {
|
|
14908
15421
|
mode: "lab",
|
|
14909
15422
|
l: 116 * f1 - 16,
|
|
@@ -15138,18 +15651,18 @@ var convertLchuvToLuv = ({ l: l2, c: c2, h, alpha }) => {
|
|
|
15138
15651
|
var convertLchuvToLuv_default = convertLchuvToLuv;
|
|
15139
15652
|
|
|
15140
15653
|
// ../../node_modules/culori/src/luv/convertXyz50ToLuv.js
|
|
15141
|
-
var u_fn = (x, y,
|
|
15142
|
-
var v_fn = (x, y,
|
|
15654
|
+
var u_fn = (x, y, z68) => 4 * x / (x + 15 * y + 3 * z68);
|
|
15655
|
+
var v_fn = (x, y, z68) => 9 * y / (x + 15 * y + 3 * z68);
|
|
15143
15656
|
var un = u_fn(D50.X, D50.Y, D50.Z);
|
|
15144
15657
|
var vn = v_fn(D50.X, D50.Y, D50.Z);
|
|
15145
15658
|
var l_fn = (value) => value <= e3 ? k3 * value : 116 * Math.cbrt(value) - 16;
|
|
15146
|
-
var convertXyz50ToLuv = ({ x, y, z:
|
|
15659
|
+
var convertXyz50ToLuv = ({ x, y, z: z68, alpha }) => {
|
|
15147
15660
|
if (x === void 0) x = 0;
|
|
15148
15661
|
if (y === void 0) y = 0;
|
|
15149
|
-
if (
|
|
15662
|
+
if (z68 === void 0) z68 = 0;
|
|
15150
15663
|
let l2 = l_fn(y / D50.Y);
|
|
15151
|
-
let u = u_fn(x, y,
|
|
15152
|
-
let v = v_fn(x, y,
|
|
15664
|
+
let u = u_fn(x, y, z68);
|
|
15665
|
+
let v = v_fn(x, y, z68);
|
|
15153
15666
|
if (!isFinite(u) || !isFinite(v)) {
|
|
15154
15667
|
l2 = u = v = 0;
|
|
15155
15668
|
} else {
|
|
@@ -15170,8 +15683,8 @@ var convertXyz50ToLuv = ({ x, y, z: z61, alpha }) => {
|
|
|
15170
15683
|
var convertXyz50ToLuv_default = convertXyz50ToLuv;
|
|
15171
15684
|
|
|
15172
15685
|
// ../../node_modules/culori/src/luv/convertLuvToXyz50.js
|
|
15173
|
-
var u_fn2 = (x, y,
|
|
15174
|
-
var v_fn2 = (x, y,
|
|
15686
|
+
var u_fn2 = (x, y, z68) => 4 * x / (x + 15 * y + 3 * z68);
|
|
15687
|
+
var v_fn2 = (x, y, z68) => 9 * y / (x + 15 * y + 3 * z68);
|
|
15175
15688
|
var un2 = u_fn2(D50.X, D50.Y, D50.Z);
|
|
15176
15689
|
var vn2 = v_fn2(D50.X, D50.Y, D50.Z);
|
|
15177
15690
|
var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
@@ -15185,8 +15698,8 @@ var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
|
15185
15698
|
let vp = v / (13 * l2) + vn2;
|
|
15186
15699
|
let y = D50.Y * (l2 <= 8 ? l2 / k3 : Math.pow((l2 + 16) / 116, 3));
|
|
15187
15700
|
let x = y * (9 * up) / (4 * vp);
|
|
15188
|
-
let
|
|
15189
|
-
let res = { mode: "xyz50", x, y, z:
|
|
15701
|
+
let z68 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
|
|
15702
|
+
let res = { mode: "xyz50", x, y, z: z68 };
|
|
15190
15703
|
if (alpha !== void 0) {
|
|
15191
15704
|
res.alpha = alpha;
|
|
15192
15705
|
}
|
|
@@ -15803,15 +16316,15 @@ var convertP3ToXyz65 = (rgb2) => {
|
|
|
15803
16316
|
var convertP3ToXyz65_default = convertP3ToXyz65;
|
|
15804
16317
|
|
|
15805
16318
|
// ../../node_modules/culori/src/p3/convertXyz65ToP3.js
|
|
15806
|
-
var convertXyz65ToP3 = ({ x, y, z:
|
|
16319
|
+
var convertXyz65ToP3 = ({ x, y, z: z68, alpha }) => {
|
|
15807
16320
|
if (x === void 0) x = 0;
|
|
15808
16321
|
if (y === void 0) y = 0;
|
|
15809
|
-
if (
|
|
16322
|
+
if (z68 === void 0) z68 = 0;
|
|
15810
16323
|
let res = convertLrgbToRgb_default(
|
|
15811
16324
|
{
|
|
15812
|
-
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 *
|
|
15813
|
-
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 *
|
|
15814
|
-
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 *
|
|
16325
|
+
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z68,
|
|
16326
|
+
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z68,
|
|
16327
|
+
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z68
|
|
15815
16328
|
},
|
|
15816
16329
|
"p3"
|
|
15817
16330
|
);
|
|
@@ -15846,19 +16359,19 @@ var gamma2 = (v) => {
|
|
|
15846
16359
|
}
|
|
15847
16360
|
return 16 * v;
|
|
15848
16361
|
};
|
|
15849
|
-
var convertXyz50ToProphoto = ({ x, y, z:
|
|
16362
|
+
var convertXyz50ToProphoto = ({ x, y, z: z68, alpha }) => {
|
|
15850
16363
|
if (x === void 0) x = 0;
|
|
15851
16364
|
if (y === void 0) y = 0;
|
|
15852
|
-
if (
|
|
16365
|
+
if (z68 === void 0) z68 = 0;
|
|
15853
16366
|
let res = {
|
|
15854
16367
|
mode: "prophoto",
|
|
15855
16368
|
r: gamma2(
|
|
15856
|
-
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 *
|
|
16369
|
+
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z68
|
|
15857
16370
|
),
|
|
15858
16371
|
g: gamma2(
|
|
15859
|
-
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 *
|
|
16372
|
+
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z68
|
|
15860
16373
|
),
|
|
15861
|
-
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 *
|
|
16374
|
+
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z68)
|
|
15862
16375
|
};
|
|
15863
16376
|
if (alpha !== void 0) {
|
|
15864
16377
|
res.alpha = alpha;
|
|
@@ -15918,20 +16431,20 @@ var gamma3 = (v) => {
|
|
|
15918
16431
|
}
|
|
15919
16432
|
return 4.5 * v;
|
|
15920
16433
|
};
|
|
15921
|
-
var convertXyz65ToRec2020 = ({ x, y, z:
|
|
16434
|
+
var convertXyz65ToRec2020 = ({ x, y, z: z68, alpha }) => {
|
|
15922
16435
|
if (x === void 0) x = 0;
|
|
15923
16436
|
if (y === void 0) y = 0;
|
|
15924
|
-
if (
|
|
16437
|
+
if (z68 === void 0) z68 = 0;
|
|
15925
16438
|
let res = {
|
|
15926
16439
|
mode: "rec2020",
|
|
15927
16440
|
r: gamma3(
|
|
15928
|
-
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 *
|
|
16441
|
+
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z68
|
|
15929
16442
|
),
|
|
15930
16443
|
g: gamma3(
|
|
15931
|
-
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 *
|
|
16444
|
+
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z68
|
|
15932
16445
|
),
|
|
15933
16446
|
b: gamma3(
|
|
15934
|
-
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 *
|
|
16447
|
+
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z68
|
|
15935
16448
|
)
|
|
15936
16449
|
};
|
|
15937
16450
|
if (alpha !== void 0) {
|
|
@@ -16084,15 +16597,15 @@ var definition_default26 = definition26;
|
|
|
16084
16597
|
|
|
16085
16598
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
|
|
16086
16599
|
var convertXyz65ToXyz50 = (xyz652) => {
|
|
16087
|
-
let { x, y, z:
|
|
16600
|
+
let { x, y, z: z68, alpha } = xyz652;
|
|
16088
16601
|
if (x === void 0) x = 0;
|
|
16089
16602
|
if (y === void 0) y = 0;
|
|
16090
|
-
if (
|
|
16603
|
+
if (z68 === void 0) z68 = 0;
|
|
16091
16604
|
let res = {
|
|
16092
16605
|
mode: "xyz50",
|
|
16093
|
-
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 *
|
|
16094
|
-
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 *
|
|
16095
|
-
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 *
|
|
16606
|
+
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z68,
|
|
16607
|
+
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z68,
|
|
16608
|
+
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z68
|
|
16096
16609
|
};
|
|
16097
16610
|
if (alpha !== void 0) {
|
|
16098
16611
|
res.alpha = alpha;
|
|
@@ -16103,15 +16616,15 @@ var convertXyz65ToXyz50_default = convertXyz65ToXyz50;
|
|
|
16103
16616
|
|
|
16104
16617
|
// ../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
|
|
16105
16618
|
var convertXyz50ToXyz65 = (xyz502) => {
|
|
16106
|
-
let { x, y, z:
|
|
16619
|
+
let { x, y, z: z68, alpha } = xyz502;
|
|
16107
16620
|
if (x === void 0) x = 0;
|
|
16108
16621
|
if (y === void 0) y = 0;
|
|
16109
|
-
if (
|
|
16622
|
+
if (z68 === void 0) z68 = 0;
|
|
16110
16623
|
let res = {
|
|
16111
16624
|
mode: "xyz65",
|
|
16112
|
-
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 *
|
|
16113
|
-
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 *
|
|
16114
|
-
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 *
|
|
16625
|
+
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z68,
|
|
16626
|
+
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z68,
|
|
16627
|
+
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z68
|
|
16115
16628
|
};
|
|
16116
16629
|
if (alpha !== void 0) {
|
|
16117
16630
|
res.alpha = alpha;
|
|
@@ -16348,6 +16861,13 @@ function validateTermsString(termsString) {
|
|
|
16348
16861
|
};
|
|
16349
16862
|
}
|
|
16350
16863
|
} else {
|
|
16864
|
+
if (term.startsWith("*") || term.endsWith("*")) {
|
|
16865
|
+
const inner = term.replace(/^\*+|\*+$/g, "");
|
|
16866
|
+
return {
|
|
16867
|
+
valid: false,
|
|
16868
|
+
error: `Term "${term}" has an unmatched asterisk. Use *${inner}* for exact matching, or ${inner} for loose matching.`
|
|
16869
|
+
};
|
|
16870
|
+
}
|
|
16351
16871
|
normalizedTerm = term.replace(/\s+/g, "");
|
|
16352
16872
|
if (normalizedTerm.length < 6) {
|
|
16353
16873
|
return {
|
|
@@ -16945,6 +17465,8 @@ var SCAN_TEMPLATES = [
|
|
|
16945
17465
|
new Map(
|
|
16946
17466
|
SCAN_TEMPLATES.map((template) => [template.id, template])
|
|
16947
17467
|
);
|
|
17468
|
+
var DARK_WEB_ENTITY_SEARCH_KINDS = ["domain", "email", "crypto"];
|
|
17469
|
+
z.enum(DARK_WEB_ENTITY_SEARCH_KINDS);
|
|
16948
17470
|
|
|
16949
17471
|
// src/client.ts
|
|
16950
17472
|
function trimTrailingSlashes(url) {
|