PageSourceSearch

https://hankfm.com/wp-content/plugins/ione-modules/build/device-id/index.js?ver=9617fb2

js hankfm.com collected 2026-09-25 00:09:57 UTC 4,135 bytes, 1 lines download raw bytes

1(()=>{"use strict";const e=window.wp.hooks,t=window.wp.url,n=e=>{try{const t=window.localStorage.getItem(e);return("string"==typeof t?t.trim():"")||null}catch{return null}},i=(e,t)=>{try{window.localStorage.setItem(e,t)}catch{}},o=e=>{try{window.localStorage.removeItem(e)}catch{}};iOneScriptLoader.highPriority(()=>{const r="uo_did",s="user_id",a="segments",d=e=>{"string"==typeof e&&e.trim()&&e.trim().length<=256&&window.iOneGA.setUserId(e.trim())},c=e=>{let t;if(Array.isArray(e))t=e;else{if("string"!=typeof e)return[];t=e.split(",")}return t.map(e=>{return"string"==typeof e?e:e&&"object"==typeof e&&!Array.isArray(e)&&null!==(t=null!==(n=null!==(i=null!==(o=e.segment_code)&&void 0!==o?o:e.targeting_value)&&void 0!==i?i:e.code)&&void 0!==n?n:e.name)&&void 0!==t?t:null;var t,n,i,o}).filter(e=>"string"==typeof e&&e.trim().length>0).map(e=>e.trim()).slice(0,10)},u=()=>{const e={};if(!window?.OnetrustActiveGroups?.includes("C0004"))return e;const t=n(s),i=n(a),o=/^[A-Za-z0-9+.=/_$,{}\-]{22,150}$/;if("string"==typeof t){const n=t.trim();o.test(n)&&(e.userId=n)}if("string"!=typeof i||!i.trim())return e;let r;try{r=JSON.parse(i)}catch(t){return console.error("Error parsing segments from local storage, please regenerate the segments:",t),e}const d=c(r);return d.length>0&&(e.segments=d),e},l=e=>{if(!e||"object"!=typeof e||"string"!=typeof e.uo_uid)return!1;const t=c(e.segments);return i(s,e.uo_uid),i(a,JSON.stringify(t)),d(e.uo_uid),window.ione_uads?.applyUoDidSegmentsTargeting?.(),!0},g=async(e,t=!1)=>{var n,i;const o=new AbortController;let r;const s=null!==(n=window?.deviceIdVars?.restUrl)&&void 0!==n?n:"",a=null!==(i=window?.deviceIdVars?.nonce)&&void 0!==i?i:"";if(!s)return console.error("REST URL is not defined. Cannot generate user ID and segments."),null;try{r=setTimeout(()=>o.abort(),5e3);const n=await fetch(s,{method:"POST",body:JSON.stringify({uo_did:m,[t?"hashed_email":"email"]:e}),headers:{Accept:"application/json","Content-Type":"application/json","X-WP-Nonce":a},signal:o.signal});return n.ok?await n.json():(console.error(`Error generating user ID and segments: HTTP ${n.status}`),null)}catch(e){return console.error("Error generating user ID and segments:",e),null}finally{clearTimeout(r)}};let m=n(r);var _,y;"string"==typeof(_=m)&&/^[a-z0-9]{32}$/.test(_)||(m=""),m||(m=(()=>{const e=Array.from(crypto.getRandomValues(new Uint8Array(32))).map(e=>"abcdefghijklmnopqrstuvwxyz0123456789"[e%36]).join("");return i(r,e),e})()),y=m,setTimeout(()=>{window.dispatchEvent(new CustomEvent("ione_device_id",{detail:{deviceID:y}}))});const w=async i=>{if("string"!=typeof i||!i.trim()||!(0,t.isEmail)(i))return;const o=n(s);if(o)return await p(i),void(0,e.doAction)("ione_uo_uid_minted",o);const r=await g(i);l(r)&&(0,e.doAction)("ione_uo_uid_minted",r.uo_uid)},p=async e=>{const o=n(a);if(o&&"[]"!==o)return;if("string"!=typeof e||!e.trim()||!(0,t.isEmail)(e))return;const r=await g(e);r&&"object"==typeof r&&(i(a,JSON.stringify(c(r.segments))),window.ione_uads?.applyUoDidSegmentsTargeting?.())};(0,e.addAction)("ione_newsletter_sign_up_success","ione-modules/device-id",w);let f=!1;(0,e.addAction)("ione_uo_uid_needs_mint","ione-modules/device-id",e=>{f||(f=!0,w(e))}),(0,e.addAction)("ione_uo_uid_authoritative","ione-modules/device-id",e=>{f||(f=!0,(async e=>{const r=e?.uoUid,u=e?.email;if("string"!=typeof r||!r.trim())return;const l=n(s)!==r;i(s,r),d(r),l&&o(a);const m=n(a);if((!m||"[]"===m)&&"string"==typeof u&&u.trim()&&(0,t.isEmail)(u)){const e=await g(u);e&&"object"==typeof e&&(i(a,JSON.stringify(c(e.segments))),i(s,r),d(r))}window.ione_uads?.applyUoDidSegmentsTargeting?.()})(e))}),(0,e.addAction)("ione_auth0_logout","ione-modules/device-id",()=>{o(s),o(a)}),(0,e.doAction)("ione_uo_uid_request");const v=n(s);d(v),(0,e.addFilter)("ione__ione_modules__universal_ads__uo_did_segments","ione/modules/device-id",e=>({...e,...u()})),window.addEventListener("ione_device_id",async e=>{const t=e?.detail?.deviceID,i=n(s),o=new URLSearchParams(window.location.search).get("ue"),r="string"==typeof o?o.toLowerCase():"",a=/^[a-f0-9]{64}$/.test(r);if(t&&!i&&a){const e=await g(r,!0);l(e)}})})})();

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.