#include "third_party/blink/renderer/core/timing/third_party_script_detector.h"
#include <cmath>
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
constexpr char kThirdPartyTechnologiesSourceLocationRegexString[] = …
"(/wp-content/plugins/elementor)"
"|(google-analytics\\.com/(?:ga|urchin|analytics)\\.js"
"|googletagmanager\\.com/gtag/js)"
"|(googleapis\\.com/.+webfont)"
"|(googletagmanager\\.com/gtm\\.js)"
"|((?:maps\\.google\\.com/"
"maps\\?file=api(?:&v=(?:[\\d.]+))?|maps\\.google\\.com/maps/api/"
"staticmap)\\;version:API v1"
"|//maps\\.google(?:apis)?\\.com/maps/api/js)"
"|(connect\\.facebook.\\w+/signals/config/"
"\\d+\\?v=(?:[\\d\\.]+)\\;version:1"
"|connect\\.facebook\\.\\w+/.+/fbevents\\.js)"
"|(youtube\\.com)"
"|(adoberesources\\.net/alloy/.+/alloy(?:\\.min)?\\.js"
"|adobedtm\\.com/extensions/.+/AppMeasurement(?:\\.min)?\\.js)"
"|(analytics\\.tiktok\\.com)"
"|(static\\.hotjar\\.com)"
"|(googlesyndication\\.com/[^\"]+/"
"(?:adsbygoogle|show_ads_impl|interstitial_ad_frame))"
"|(doubleclick\\.net/[^\"]+/pubads_impl(?:_page_level_ads)?.js"
"|googlesyndication\\.com/tag/js/gpt\\.js)"
"|(googlesyndication\\.com/[^\"]+/(?:ufs_web_display|reactive_library_fy))"
"|(fundingchoicesmessages\\.google\\.com)"
"|(/wp-(?:content|includes)/"
"|wp-embed\\.min\\.js)";
constexpr int kTechnologyCount = …;
ThirdPartyScriptDetector::Technology GetTechnologyFromGroupIndex(int index) { … }
}
const char ThirdPartyScriptDetector::kSupplementName[] = …;
ThirdPartyScriptDetector& ThirdPartyScriptDetector::From(
LocalDOMWindow& window) { … }
ThirdPartyScriptDetector::ThirdPartyScriptDetector(LocalDOMWindow& window)
: … { … }
void ThirdPartyScriptDetector::Trace(Visitor* visitor) const { … }
ThirdPartyScriptDetector::Technology ThirdPartyScriptDetector::Detect(
const WTF::String url) { … }
}