PageSourceSearch

https://www.envirofone.com/_next/static/chunks/app/en-gb/sell/layout-575bbf7ddc867fbc.js

js envirofone.com collected 2026-10-03 23:26:27 UTC 4,939 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82824],{38644:(e,r,n)=>{"use strict";n.d(r,{$D:()=>i,DG:()=>a,Dc:()=>u,QK:()=>s,oD:()=>l,pH:()=>d,qo:()=>f,rN:()=>c});let t="ef_ref",o=/^[A-Z0-9]{6,12}$/i;function i(e){let r=(e??"").trim();return o.test(r)?r.toUpperCase():null}function a(e){if(!e)return null;for(let r of e.split(";")){let e=r.indexOf("=");if(-1===e||r.slice(0,e).trim()!==t)continue;let n=r.slice(e+1).trim();try{n=decodeURIComponent(n)}catch{break}return i(n)}return null}function s(e,r){return`${t}=${encodeURIComponent(e)}; path=/; max-age=2592000; SameSite=Lax`+(r?"; Secure":"")}function u(e,r="landing"){return[{title:"Get your link",body:"account"===r?"Copy your personal link below, or use a share button.":"Sign in to My Account › EnviroRewards and copy your personal link."},{title:"Share it",body:"Send it to a friend by WhatsApp, text, email or social."},{title:"Your friend trades in",body:`They get a quote through your link and send their device. If it's their first ever Envirofone trade-in and it's worth ${e.minQuoteGbp} or more, we add ${e.friendGbp} to their offer.`},{title:`You get ${e.referrerPoints} points (${e.referrerValue})`,body:`As soon as we pay your friend, ${e.referrerPoints} points land in your account.`}]}function d(e,{boost:r=!1}={}){return["Your friend must use your personal link.",`It must be their first ever Envirofone trade-in, and the quote must be ${e.minQuoteGbp} or more.`,`You get your ${e.referrerPoints} points once we pay your friend.`,"One referral bonus per friend.","No referring yourself, including your own other email addresses.",...r?[`The friend's ${e.friendGbp} doesn't stack with a member price boost: the larger one applies.`]:[],"We may withhold points and bonuses gained by misuse, such as fake accounts or referring yourself."]}function l(e,r){let n=`I sell my old tech to Envirofone. Use my link and get an extra ${e.friendGbp} on your first trade-in of ${e.minQuoteGbp} or more: ${r}`,t=encodeURIComponent(n),o=encodeURIComponent(`An extra ${e.friendGbp} on your first Envirofone trade-in`);return{message:n,whatsapp:`https://wa.me/?text=${t}`,email:`mailto:?subject=${o}&body=${t}`,sms:`sms:?&body=${t}`}}function c(e){return`You've been referred by an EnviroRewards member: get an extra ${e.friendGbp} on your first trade-in of ${e.minQuoteGbp} or more.`}let f="ef_ref_banner_dismissed"},81660:(e,r,n)=>{"use strict";n.d(r,{default:()=>c});var t=n(95155),o=n(12115),i=n(90135),a=n(38644),s=n(28147),u=n(44755);let d=e=>(0,i.zz)(Math.round(100*e)),l=Array.from({length:8},(e,r)=>({angle:45*r+22,colour:["#11b5e9","#b36bc6","#ff5a4f","#f5c542"][r%4]}));function c(){let[e,r]=(0,o.useState)(null),[n,i]=(0,o.useState)(""),[c,f]=(0,o.useState)(!1),b=(0,o.useRef)(void 0);return((0,o.useEffect)(()=>()=>window.clearTimeout(b.current),[]),(0,o.useEffect)(()=>{let e=null;try{e=(0,a.$D)(new URLSearchParams(window.location.search).get("ref"))??(0,a.DG)(document.cookie)}catch{return}if(!e||function(){try{return"1"===window.sessionStorage.getItem(a.qo)}catch{return!1}}())return;let n=!0;return fetch("/api/rewards/programme").then(e=>e.ok?e.json():null).then(e=>{let t=e?.enabled?e.referral:void 0;n&&t&&(i(d(t.friendGbp)),r((0,a.rN)({friendGbp:d(t.friendGbp),minQuoteGbp:d(t.minQuoteGbp)})))}).catch(()=>{}),()=>{n=!1}},[]),e)?(0,t.jsxs)("aside",{className:c?"referred-banner referred-banner--leaving":"referred-banner","aria-label":"EnviroRewards referral",children:[(0,t.jsxs)("span",{className:"referred-banner__gift","aria-hidden":"true",children:[l.map((e,r)=>(0,t.jsx)("i",{className:"referred-banner__spark",style:{"--referred-a":`${e.angle}deg`,background:e.colour}},r)),(0,t.jsx)(u.cW,{size:22})]}),(0,t.jsxs)("div",{className:"referred-banner__body",children:[(0,t.jsxs)("span",{className:"referred-banner__eyebrow","aria-hidden":"true",children:["EnviroRewards",n&&(0,t.jsx)("b",{className:"referred-banner__badge",children:`+${n}`})]}),(0,t.jsx)("p",{className:"referred-banner__text",children:e})]}),(0,t.jsx)("button",{type:"button",className:"referred-banner__close","aria-label":"Dismiss referral message",onClick:()=>{try{window.sessionStorage.setItem(a.qo,"1")}catch{}if((0,s.Oe)())return void r(null);f(!0),b.current=window.setTimeout(()=>r(null),280)},children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 2L12 12M12 2L2 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}):null}},96589:(e,r,n)=>{Promise.resolve().then(n.bind(n,96876)),Promise.resolve().then(n.bind(n,81660))},96876:(e,r,n)=>{"use strict";n.d(r,{default:()=>i});var t=n(12115),o=n(38644);function i(){return(0,t.useEffect)(()=>{try{let e=(0,o.$D)(new URLSearchParams(window.location.search).get("ref"));if(!e)return;document.cookie=(0,o.QK)(e,"https:"===window.location.protocol)}catch{}},[]),null}}},e=>{e.O(0,[45279,28441,31255,77358],()=>e(e.s=96589)),_N_E=e.O()}]);

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.