!function(t){const e="397438c3834c77471c3168868bfdab0e03e1ea855b61728277e6361c4befcf04",o="hs/list",n="/game/clear-the-numbers/";function i(){const t=window.top.document.head.querySelector("[property='og:title'][content]").content;return t||window.top.document.title}function r(){const t=window.top.document.head.querySelector("[property='og:url'][content]").content;return t||window.top.document.location}function a(t=null){t&&t.preventDefault();const e=document.querySelector("div.popupWrap");document.body.removeChild(e)}function s(t){let e=document.querySelector("div.popupWrap");e||(e=document.createElement("div"),e.classList.add("popupWrap"),document.body.appendChild(e));let o=window.innerWidth/880;o>1.4&&(o=1.4);const n=Math.round(500*o),i=Math.round(300*o),r=`';e.innerHTML=r;return e.querySelector("div.close").addEventListener("click",a),e}function c(t,e){return fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function d(t){const i=await async function(t=""){const i=await c(o,{GAME_ID:`${n}${t}`,TOKEN:e});if(!i.ok)return console.log(`Could not load ${o}: ${i.status}`),[];try{return await i.json()}catch(t){return console.log(`Could not parse response data from: ${o}: ${t}`),[]}}("");if(i&&Array.isArray(i)){s(`${'

High Scores

'+i.map(((t,e)=>``)).join("")+"
RankPlayerScoreDate
${e+1}${t.username}${t.score}${t.date}
"}`)}else console.log("no data")}window.HS={leaderBoard:d,submitScore:function(t,o=""){s(`

Submit your score

${t}

`),document.getElementById("submitBtn").addEventListener("click",(o=>{o.preventDefault();const l=document.getElementById("iptPlayer"),p=l.value;p&&p.length>0&&p.trim().length>0?async function(t,o,l=""){await c("hs/submit",{GAME_ID:`${n}${l}`,TOKEN:e,username:t,score:o}),a();const p=s('

Score submitted

Your score has been submitted.

Share your high score

');p.querySelector("button.btn").addEventListener("click",(()=>{a(),d()})),p.querySelector("span.facebook").addEventListener("click",(()=>{const t=i(),e=r(),n=`I just scored ${o} points playing ${t}. This is the all time high score among my friends and enemies. Think you can beat me? Think again! Play here: ${e} #solitaireorg`,a="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e)+""e="+encodeURIComponent(n);window.open(a,"Facebook","height=269,width=550,resizable=1")})),p.querySelector("span.twitter").addEventListener("click",(()=>{const t=i(),e=r(),n="https://twitter.com/intent/tweet?text="+encodeURIComponent(`I just scored ${o} points playing ${t}. This is the all time high score among my friends and enemies. Think you can beat me? Think again! Play here: ${e} #solitaireorg`)+"&url="+encodeURIComponent(e);window.open(n,"Twitter","height=285,width=550,resizable=1")}))}(p,t,""):(l.classList.add("error"),l.focus())}))}}}();