PageSourceSearch

https://www.dailykos.com/_static/??-eJyt1N1OwzAMBeAXIkSI/XCDeBa3cd…AxMxi5LFBRoNPzN4Ed5fzm+7Q773evxcLoD7Jfcbg==

js dailykos.com collected 2026-09-24 08:04:51 UTC 14,865 bytes, 24 lines download raw bytes

1(()=>{"use strict";const e="dk_vf_sso_recovery_reloaded",t=8e3,n='[id^="vf-profile__panel_"]:not([style*="display: none"])',o=".vf-profile-header__name",r="dk-vf-tray-profile-link",i="data-vf-uuid",s=["vf-conversations","vf-tray"];let a=0,u=null,c=!1,d="",f="",l=!1,v=!1,w=!1,m=!1;const h={},g={};function p(e=1){if(viafouraFeature.tokenEndpoint){if(1===e){if(c)return;c=!0}fetch(viafouraFeature.tokenEndpoint,{method:"GET",credentials:"same-origin",headers:{"X-WP-Nonce":viafouraFeature.nonce}}).then(function(e){if(!e.ok){const t=e.headers.get("X-DK-Nonce-Header-Present");let n=null;return"1"===t?n=!0:"0"===t&&(n=!1),e.json().catch(function(){return null}).then(function(t){const o=new Error("Token request failed: "+e.status);throw o.httpStatus=e.status,o.errorCode=t&&"string"==typeof t.code?t.code:null,o.nonceArrivedServerside=n,o})}return e.json()}).then(function(e){if(!e.id_token)throw new Error("No ID token in response");c=!1,window.vfQ=window.vfQ||[],window.vfQ.push(function(){window.vf&&window.vf.session&&window.vf.session.login&&window.vf.session.login.openIdConnect(e.id_token)}),function(){if(l||w)return;w=!0,m=!1;let e=0,n=null,o=!1;const r=function(){o||(o=!0,clearInterval(i),w=!1,v||(v=!0,function(e,t){document.dispatchEvent(new CustomEvent("dk-vf-sso-login-unconfirmed",{detail:{polled_for_ms:e,final_anonymous:null==t?null:t,had_authentication_needed:m}}))}(e>t?t:e,n)))},i=setInterval(function(){if(e+=250,!window.vf||!window.vf.context||!window.vf.context.get)return void(e>=t&&r());const s=e;try{Promise.resolve(window.vf.context.get("user")).then(function(a){o||(a&&void 0!==a.anonymous&&(n=a.anonymous,0===a.anonymous)?function(e){if(o)return;o=!0,clearInterval(i),w=!1,l=!0;const n=e>t?t:e;document.dispatchEvent(new CustomEvent("dk-vf-sso-login-succeeded",{detail:{polled_for_ms:n}}))}(s):e>=t&&r())}).catch(function(){e>=t&&r()})}catch(n){e>=t&&r()}},250)}()}).catch(function(t){e<2&&function(e){if(!e)return!1;if("AbortError"===e.name)return!0;const t=e.message?e.message.toLowerCase():"";return t.includes("failed to fetch")||t.includes("load failed")||t.includes("networkerror")}(t)?setTimeout(function(){p(e+1)},500):(c=!1,document.dispatchEvent(new CustomEvent("dk-vf-sso-login-failed",{detail:{context:"oidc_token_fetch",error_message:t&&t.message?t.message:String(t),attempts:e,error_code:t&&void 0!==t.errorCode?t.errorCode:null,http_status:t&&void 0!==t.httpStatus?t.httpStatus:null,nonce_arrived_serverside:t&&void 0!==t.nonceArrivedServerside?t.nonceArrivedServerside:null}})))})}}function _(e){return e?e.trim().toLowerCase():""}function y(e){if(!e)return Promise.resolve("");if(h[e])return Promise.resolve(h[e]);if(g[e])return g[e];const t=function(e){return e&&viafouraFeature.profileEndpoint?viafouraFeature.profileEndpoint+"?vf_uuid="+encodeURIComponent(e)+"&format=json":""}(e);if(!t)return Promise.resolve("");const n=fetch(t,{method:"GET",credentials:"same-origin"}).then(function(e){return e.ok?e.json():null}).then(function(t){return t&&t.resolved&&t.bp_url?(h[e]=t.bp_url,function(e,t){if(!e||!t)return;const n="."+r+"["+i+'="'+e+'"]',o=document.querySelectorAll(n);for(let e=0;e<o.length;e++)o[e].href=t}(e,t.bp_url),t.bp_url):""}).catch(function(e){return document.dispatchEvent(new CustomEvent("dk-error",{detail:{feature:"viafoura",context:"vf_profile_resolve",error_message:e&&e.message?e.message:String(e)}})),""}).then(function(t){return delete g[e],t});return g[e]=n,n}function E(e,t,s){if(!e||!s)return;const a=e.closest(n),u=a?a.querySelector(o):null,c="Open BuddyPress profile for "+(u&&u.textContent?u.textContent:"user").trim()+" in a new tab",d=e.parentElement&&e.parentElement.classList&&e.parentElement.classList.contains(r)?e.parentElement:null;if(d)return d.href=s,d.setAttribute(i,t),void d.setAttribute("aria-label",c);const f=document.createElement("a");f.href=s,f.className=r,f.target="_blank",f.setAttribute(i,t),f.setAttribute("aria-label",c),e.parentNode&&(e.parentNode.insertBefore(f,e),f.appendChild(e))}function b(){const e=document.querySelector(n);if(!e||!d)return;const t=e.querySelector(o),r=_(t?t.textContent:"");if(f&&r&&r!==f)return;const i=d,s=h[i],a=s||function(e){return e&&viafouraFeature.profileEndpoint?viafouraFeature.profileEndpoint+"?vf_uuid="+encodeURIComponent(e):""}(i);if(!a)return;const u=e.querySelector(o),c=e.querySelector(".vf-profile-header__avatar");E(u,i,a),E(c,i,a),s||y(i)}function k(e){const t=[...e.map(function(e){return e.dataset.vfContainerId})].sort(),n=(viafouraFeature.commentCountsEndpoint||"/wp-json/dk/v1/viafoura/comment-counts")+"?container_ids="+t.join(",");fetch(n).then(function(e){if(429===e.status){const t=e.headers.get("Retry-After")||60;return console.warn("Comment counts rate limited. Retry after "+t+"s"),{}}if(400===e.status)return console.warn("Invalid request to comment counts endpoint"),{};if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(t){!function(e,t){t.forEach(function(t){const n=t.dataset.vfContainerId,o=e[n],r=parseInt(t.dataset.cachedCount,10)||0;void 0!==o&&o!==r&&function(e,t){const n=e.querySelector(".dk-comment-count__value");if(!n)return;if(!document.startViewTransition)return void S(e,t);const o=e.dataset.vfContainerId||"unknown";n.style.viewTransitionName="comment-count-"+o.replace(/[^a-z0-9]/gi,"-"),document.startViewTransition(function(){S(e,t)}).finished.finally(function(){n.style.viewTransitionName=""}).catch(function(){})}(t,o)})}(t,e)}).catch(function(e){document.dispatchEvent(new CustomEvent("dk-error",{detail:{feature:"viafoura",context:"vf_comment_counts",error_message:e&&e.message?e.message:String(e)}}))})}function S(e,t){const n=e.querySelector(".dk-comment-count__value");if(!n)return;n.textContent=t.toString();const o=n.nextSibling;o&&o.nodeType===Node.TEXT_NODE&&o.textContent.includes("Comment")&&(o.textContent=1===t?" Comment":" Comments"),e.dataset.cachedCount=t}function C(){const e=viafouraFeature.followingCacheInvalidEndpoint;e&&fetch(e,{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":viafouraFeature.nonce}}).catch(function(e){document.dispatchEvent(new CustomEvent("dk-error",{detail:{feature:"viafoura",context:"vf_following_cache",error_message:e&&e.message?e.message:String(e)}}))})}function x(){const e=document.querySelectorAll("[data-vf-user-id]");if(!e.length)return;const t={},n=[];if(e.forEach(function(e){const o=e.dataset.vfUserId;o&&!t[o]&&(t[o]=!0,n.push(o))}),!n.length)return;const o=viafouraFeature.userProfileStatsEndpoint;if(!o)return;const r=[];for(let e=0;e<n.length;e+=25)r.push(n.slice(e,e+25));r.forEach(function(t){const n=o+"?user_ids="+t.join(",");fetch(n).then(function(e){if(429===e.status)return{};if(400===e.status)return{};if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(t){e.forEach(function(e){const n=e.dataset.vfUserId,o=t[n];if(void 0===o)return;if(o===(parseInt(e.dataset.cachedCount,10)||0))return;const r=e.querySelector(".dk-user-comment-count__value");r&&(r.textContent=o.toString()),e.dataset.cachedCount=o})}).catch(function(e){document.dispatchEvent(new CustomEvent("dk-error",{detail:{feature:"viafoura",context:"vf_user_profile_stats",error_message:e&&e.message?e.message:String(e)}}))})})}function I(){"undefined"!=typeof viafouraFeature&&(function(){const e=document.querySelector(".dk-header-group vf-tray-trigger");e&&new MutationObserver(function(){const t=e.querySelector(".vf-tray-trigger--floating");t&&t.classList.remove("vf-tray-trigger--floating","vf-frontwise-tray-trigger--floating","fake-bell")}).observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}(),window.vf||(window.vfQ=window.vfQ||[],window.vfQ.push({highPriority:!0})),window.vfQ=window.vfQ||[],window.vfQ.push(function(){window.vf&&window.vf.$prepublish&&window.vf.$prepublish(function(t,n,...o){if("authentication"===t&&"needed"===n){w&&(m=!0),window.vf.$publish&&window.vf.$publish("tray","close");const t=o[0]||{},n=t.method?t.method:null;if(viafouraFeature.isLoggedIn&&a<3)return c||(a++,u&&clearTimeout(u),u=setTimeout(function(){a=0,u=null},6e4),p()),!1;if(viafouraFeature.isLoggedIn&&a>=3)return sessionStorage.getItem(e)?(document.dispatchEvent(new CustomEvent("dk-vf-sso-recovery-exhausted",{detail:{context:"auth_interceptor",error_message:"VF session recovery reload already attempted this session.",attempts:a,recovery_blocked:!0}})),!1):(sessionStorage.setItem(e,"1"),document.dispatchEvent(new CustomEvent("dk-vf-sso-recovery-exhausted",{detail:{context:"auth_interceptor",error_message:"VF session recovery failed after "+a+" attempts.",attempts:a}})),window.location.reload(),!1);if("signup"===n){const e=new URL(viafouraFeature.signupUrl||"/signup/",window.location.origin);e.searchParams.set("redirect_to",window.location.href),window.location.href=e.toString()}else{const e=new URL(viafouraFeature.loginUrl||"/signin/",window.location.origin);e.searchParams.set("redirect_to",window.location.href),window.location.href=e.toString()}return!1}if("authentication"===t&&"logout"===n){const e=o[0]&&o[0].widget_type?o[0].widget_type:"";if(!s.includes(e)){if(viafouraFeature.isLoggedIn){let t="";try{t=JSON.stringify(o).slice(0,1e3)}catch(e){t="<unserializable>"}document.dispatchEvent(new CustomEvent("dk-vf-sso-logout-unknown-source",{detail:{widget_type:e,args_payload:t}}
1))}return{channel:t,event:n,args:o}}if(document.dispatchEvent(new CustomEvent("dk-vf-sso-logout-initiated",{detail:{widget_type:e}})),window.vf&&window.vf.session&&window.vf.session.logout){const e=function(e){document.dispatchEvent(new CustomEvent("dk-vf-sso-logout-failed",{detail:{context:"vf_auth_interceptor",error_message:e&&e.message?e.message:String(e)}}))};try{window.vf.session.logout().catch(e)}catch(t){e(t)}}const r=new URL(viafouraFeature.logoutUrl||"/wp-login.php?action=logout",window.location.origin);return r.searchParams.set("redirect_to",window.location.href),r.searchParams.set("dk_logout_source","viafoura_widget"),window.location.href=r.toString(),!1}var r;return"profile"===t&&"show"===n&&((r=o[1]||null)&&r.uuid&&(d=r.uuid,f=_(r.name||r.username||""),y(d)),setTimeout(b,0)),{channel:t,event:n,args:o}})}),viafouraFeature.isLoggedIn?p():function(e=null){let t=!1;const n=function(){e&&!t&&(t=!0,window.location.replace(e))},o=e?setTimeout(n,2e3):null,r=function(){o&&(clearTimeout(o),n())};let i=!1;const s=e?"wp_logout_with_redirect":"wp_logout_no_redirect",a=function(e){if(i||!e||0!==e.anonymous)return;i=!0;const t=function(e){document.dispatchEvent(new CustomEvent("dk-vf-sso-logout-failed",{detail:{context:s,error_message:e&&e.message?e.message:String(e)}}))};try{Promise.resolve(window.vf.session.logout()).catch(t).finally(r)}catch(e){t(e),r()}};window.vfQ=window.vfQ||[],window.vfQ.push(function(){window.vf&&window.vf.session&&window.vf.session.logout?(window.vf.$subscribe&&window.vf.$subscribe("user","loaded",a),window.vf.context&&window.vf.context.get&&function(){let e=0;const t=setInterval(function(){if(e+=100,i||e>=5e3)clearInterval(t);else try{Promise.resolve(window.vf.context.get("user")).then(function(e){e&&0===e.anonymous&&(clearInterval(t),a(e))}).catch(function(){})}catch(e){}},100)}()):r()})}(function(){const e=new URLSearchParams(window.location.search).get("vf_post_logout_redirect");if(!e)return null;try{const t=new URL(e,window.location.origin);return t.origin!==window.location.origin?null:t.toString()}catch(e){return null}}()),function(){const e=new URL(window.location.href);(e.searchParams.has("vf_post_logout_redirect")||e.searchParams.has("loggedout"))&&(e.searchParams.delete("loggedout"),e.searchParams.delete("vf_post_logout_redirect"),window.history.replaceState({},"",e.toString()))}(),function(){document.querySelectorAll(".wp-block-daily-kos-curated-content").forEach(function(e){const t=e.querySelectorAll("[data-vf-container-id]");t.length&&k([...t])});const e=document.querySelectorAll(".dk-comment-count[data-vf-container-id]:not(.wp-block-daily-kos-curated-content .dk-comment-count)");e.length&&k([...e])}(),x(),window.jQuery&&jQuery("#buddypress [data-bp-list]").on("bp_ajax_request",function(){x(),window.vf&&window.vf.$publish&&window.vf.$publish("widgets","mount")}),viafouraFeature.isLoggedIn&&(window.vfQ=window.vfQ||[],window.vfQ.push(function(){window.vf&&window.vf.$subscribe&&(window.vf.$subscribe("topics","followed",function(){C()}),window.vf.$subscribe("topics","unfollowed",function(){C()}))})),new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e.nodeType===Node.ELEMENT_NODE&&function(e){const t=e.querySelectorAll('input[type="radio"][value="disagree"]');t.length&&t.forEach(function(e){const t=e.name,n=e.closest("form"),o=e.closest("label");if(o&&o.remove(),!t||!n)return;const r=Array.from(n.querySelectorAll('input[type="radio"][name="'+t+'"]')).filter(function(e){return!e.disabled});r.length&&(r[0].checked=!0,r[0].dispatchEvent(new Event("change",{bubbles:!0})))})}(e.matches('input[type="radio"][value="disagree"]')&&e.parentElement?e.parentElement:e)})})}).observe(document.body,{childList:!0,subtree:!0}),new MutationObserver(function(e){for(let t=0;t<e.length;t++)if(e[t].addedNodes.length){b();break}}).observe(document.body,{childList:!0,subtree:!0}))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I()})();;
2;
3;
4;
5;
6;
7(()=>{"use strict";window.addEventListener("message",function(t){const e=function(t){if(t&&"object"==typeof t&&t["datawrapper-height"]){const e=Object.values(t["datawrapper-height"]);return e.length&&parseFloat(e[0])||null}if("string"==typeof t)try{const e=JSON.parse(t);if("iframe.resize"===e.context&&e.height)return parseFloat(e.height)||null}catch(t){return null}return null}(t.data);if(!e)return;const n=document.querySelectorAll(".wp-block-html__inner iframe");for(const r of n)if(r.contentWindow===t.source){r.style.height=e+"px",r.style.aspectRatio="";break}})})();;
8;
9(()=>{"use strict";const e=()=>{document.querySelectorAll(".wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close").forEach(e
9=>{e instanceof HTMLElement&&e.click()})},t=()=>{(()=>{let e=null;try{e=document.querySelector("header:has(.dk-header-group)")}catch{return}if(!(e instanceof HTMLElement))return;const t=()=>{const t=e.getBoundingClientRect().height;t>0&&document.documentElement.style.setProperty("--dk-header-height",`${t}px`)};t(),"undefined"!=typeof ResizeObserver&&new ResizeObserver(t).observe(e)})(),(()=>{const t=window.getComputedStyle(document.documentElement).getPropertyValue("--dk-breakpoint-header-collapse").trim()||"76.25em",n=window.matchMedia(`(min-width: ${t})`),o=t=>{t.matches&&e()};n.matches&&e(),"addEventListener"in n?n.addEventListener("change",o):"addListener"in n&&n.addListener(o)})()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()})();;
10;
11;
12;
13;
14;
15;
16;
17;
18;
19;
20;
21;
22;
23;
24;

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.