PageSourceSearch

https://spectator.com/wp-content/themes/spectator-theme/dist/js/3779.806a4fbfdb13dc93cbdc.chunk.js

js spectator.com collected 2026-10-02 03:33:37 UTC 2,407 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkspectator_theme=self.webpackChunkspectator_theme||[]).push([[3779],{3779:function(t,e,n){n.r(e);e.default=()=>{if("undefined"===typeof DISQUS_EPS)return null;const t=async()=>{try{const t=await(()=>{if(!window.tp||"function"!==typeof window.tp.push)return Promise.resolve(null);const t=window.tp.pianoId?.getUser?.();return t?.email?Promise.resolve(t):new Promise((t=>{window.tp.push(["init",()=>t(window.tp.pianoId?.getUser?.()||null)])}))})(),e=t?.email||"";if(!e)throw new Error("Email not found for the user.");const n=`/wp-json/spectator/v1/piano/profile?email=${encodeURIComponent(e)}`,r=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch account details: ${r.statusText}`);return await r.json()}catch(t){return console.error("Error getting Piano account details:",t),null}},e=async t=>{const e=(new Date).toUTCString(),n=(()=>{const t="0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ";let e="";for(let n=0;n<=12;n++){const n=Math.floor(72*Math.random());e+=t.substring(n,n+1)}return e})(),r=(t=>{const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].trim();if(r.startsWith(`${t}=`))return r.substring(t.length+1)}return null})(),o=t.email+r+e+n;try{const e=await(async t=>{const e=(new TextEncoder).encode(t),n=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(n)).map((t=>t.toString(16).padStart(2,"0"))).join("").replace(/[+/=]/g,"")})(o),n=`/wp-json/spectator/v1/piano/set-disqus-id?disqus_id=${encodeURIComponent(e)}&user_id=${encodeURIComponent(t.uid)}`;try{if((await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"}})).ok)return e}catch{return null}}catch{return null}return null},n=async({id:t,email:e,username:n})=>{const r={id:t,email:e,username:n};return await(async t=>{try{const e=await fetch(DISQUS_EPS.disqus_payload_url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(e.ok)return e.json();throw new Error(`Failed to get Disqus payload: ${e.statusText}`)}catch(t){console.error("Error getting Disqus payload:",t)}return null})(r)};return{init:async()=>{const r=await t();return r?(r?.disqus_id||(r.disqus_id=await e(r)),(async({disqus_id:t,email:e,disqus_display_name:r})=>n({id:t,email:e,username:r||"Spectator User"}))(r)):null}}}}}]);

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.