PageSourceSearch

https://fastgpt.io/_next/static/chunks/864.f43662fc587504f1.js

js fastgpt.io collected 2026-10-09 22:41:43 UTC 5,847 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[864],{41132:(e,t,r)=>{r.d(t,{u:()=>n});function n(e,t={},r=2e4){let i=new AbortController,o=setTimeout(()=>i.abort(),r);return fetch(e,{...t,signal:i.signal}).finally(()=>{clearTimeout(o)})}},90864:(e,t,r)=>{let n;r.r(t),r.d(t,{DEFAULT_ATTRIBUTION_SOURCE:()=>s,classifyVisit:()=>g,clearAttribution:()=>b,configureAttribution:()=>o.Ed,getAttributionPayload:()=>S,getAttributionStorageStatus:()=>y,getLastTouchUtmSnapshot:()=>v,getSubmissionSource:()=>C,getVisitorId:()=>l.Y,reportAnonymousAttribution:()=>L,trackVisit:()=>k});var i=r(59691),o=r(60159),c=r(20956);function a(e){if("string"!=typeof e||!e)return"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return`${t.origin}${t.pathname}`}catch{return""}}var l=r(83542),u=r(41132);let s="home-io".trim()?.slice(0,128)||"未知",m="fastgpt_reported_attribution",d=[["google.","Google"],["bing.","Bing"],["baidu.","百度"],["sogou.","搜狗"],["so.com","360搜索"],["yandex.","Yandex"],["duckduckgo.","DuckDuckGo"],["ecosia.","Ecosia"]],_=[["chatgpt.com","ChatGPT"],["chat.openai.com","ChatGPT"],["openai.com","ChatGPT"],["doubao.com","豆包"],["deepseek.com","DeepSeek"],["gemini.google.com","Gemini"],["bard.google.com","Gemini"],["perplexity.ai","Perplexity"],["kimi.com","Kimi"],["moonshot.cn","Kimi"],["copilot.microsoft.com","Copilot"],["tongyi.","通义千问"],["qianwen","通义千问"],["yiyan.baidu.com","文心一言"],["metaso.cn","秘塔"],["grok.com","Grok"],["claude.ai","Claude"]],h=[["zhihu.com","知乎"],["bilibili.com","B站"],["xiaohongshu.com","小红书"],["xhslink.com","小红书"],["weibo.c","微博"],["linkedin.com","LinkedIn"],["twitter.com","X"],["x.com","X"],["facebook.com","Facebook"],["youtube.com","YouTube"],["douyin.com","抖音"],["weixin","微信"],["wechat","微信"]];function f(e,t){for(let[r,n]of t)if(e.includes(r))return n;return null}function g(e){let t=new URLSearchParams(e.search||""),r=t.get("utm_source")||"",n=(t.get("utm_medium")||"").toLowerCase(),i=t.get("utm_campaign")||"",o=t.get("utm_term")||"",c=t.get("utm_content")||"",l=t.get("gclid")||t.get("msclkid")||t.get("bd_vid")||t.get("ttclid")||"",u={utm_source:r,utm_medium:n,utm_campaign:i,utm_term:o,utm_content:c,click_id:l,referrer:e.referrer?a(e.referrer):"",landing_url:a(e.landingUrl),at:e.now},s=(e,t,r)=>({channel_l1:e,channel_l2:t,is_paid:r,label:t?`${e} \xb7 ${t}`:e,...u});if(r||n){let e=r||"(unknown)";return/cpc|ppc|paid|sem|cpm|adwords/.test(n)?s("paid_search",e,!0):/feed|display|banner/.test(n)?s("paid_feed",e,!0):/social/.test(n)?s("paid_social",e,!0):/email|edm|newsletter/.test(n)?s("owned",e,!1):/affiliate|partner|referral/.test(n)?s("referral",e,!1):f(r.toLowerCase(),d)?s("organic_search",e,!1):s("referral",e,!1)}if(l){if(t.get("gclid"))return s("paid_search","Google Ads",!0);if(t.get("msclkid"))return s("paid_search","Bing Ads",!0);if(t.get("bd_vid"))return s("paid_search","百度 SEM",!0);if(t.get("ttclid"))return s("paid_feed","巨量引擎",!0)}let m=(e.referrer||"").toLowerCase();if(m){let t="";try{t=new URL(e.referrer).hostname.toLowerCase()}catch{t=m}let r=f(t,_);if(r)return s("llm",r,!1);let n=f(t,d);if(n)return s("organic_search",n,!1);let i=f(t,h);return i?s("organic_social",i,!1):s("referral",t,!1)}return s("direct","",!1)}let p=null;function w(){return(0,i.UI)((0,o.SN)()).value}function b(){(0,i.VJ)((0,o.SN)()),(0,l.c)(),p=null}function y(){return(0,i.R3)()}function k(){try{let e=(0,l.Y)(),t=new Date().toISOString(),r=p===document?"":document.referrer||"";try{r&&function(e){try{let t=new URL(e);if(t.origin===window.location.origin)return!0;let r=(0,c.n)((0,o.vh)(),window.location.hostname);if("shared"!==r.scope)return!1;let n=t.hostname.toLowerCase();return n===r.normalizedDomain||n.endsWith(`.${r.normalizedDomain}`)}catch{return!1}}(r)&&(r="")}catch{}let n=g({search:window.location.search,referrer:r,landingUrl:window.location.href,now:t}),a=w(),u=a?.first??n,s=a?.last??n;"direct"!==n.channel_l1&&(s=n);let m={visitor_id:e,first:u,last:s};(0,i.ZE)(m,(0,o.SN)()).value&&(p=document)}catch{}}function S(){let e=w(),t=(0,l.Y)();if(!e)return{visitor_id:"",first_touch_channel:"",first_touch_source:"",first_landing_url:"",first_touch_at:"",last_touch_channel:"",last_touch_source:"",channel_l1:"",channel_l2:"",is_paid:!1,utm_source:"",utm_medium:"",utm_campaign:"",utm_term:"",utm_content:"",click_id:"",referrer_url:"",visitor_id:t};let{first:r,last:n}=e;return{visitor_id:t,first_touch_channel:r.label,first_touch_source:r.channel_l2||r.channel_l1,first_landing_url:r.landing_url,first_touch_at:r.at,last_touch_channel:n.label,last_touch_source:n.channel_l2||n.channel_l1,channel_l1:r.channel_l1,channel_l2:r.channel_l2,is_paid:r.is_paid,utm_source:r.utm_source,utm_medium:r.utm_medium,utm_campaign:r.utm_campaign,utm_term:r.utm_term,utm_content:r.utm_content,click_id:r.click_id,referrer_url:r.referrer}}function C(e=s){return(new URLSearchParams(window.location.search).get("source")?.trim()||e.trim()||s).slice(0,128)}function v(){try{let e=w();if(!e)return null;let{utm_source:t,utm_medium:r,utm_campaign:n,utm_term:i,utm_content:o}=e.last;return{utm_source:t,utm_medium:r,utm_campaign:n,utm_term:i,utm_content:o}}catch{return null}}function L(){if(n)return n;let e="https://pwybrriqksxn.cloud.sealos.io/api/v1".trim().replace(/\/$/,"");return e?n=(async()=>{try{k();let t=S();if(!t.visitor_id)return;let r=JSON.stringify(t);if(function(){try{return window.localStorage.getItem(m)||""}catch{return""}}()===r)return;(await (0,u.u)(`${e}/visitors/track`,{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({locale:document.documentElement.lang||"zh",...t})})).ok&&function(e){try{window.localStorage.setItem(m,e)}catch{}}(r)}catch{}})().finally(()=>{n=void 0}):Promise.resolve()}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.