PageSourceSearch

https://gamechannel.io/solitaire/k.js

js gamechannel.io collected 2026-09-24 15:03:41 UTC 59,268 bytes, 5 lines download raw bytes

1// ** Content / code theft and/or plagiarism is a crime. 
2// ** Any content theft and/or plagiarism, without exception, will be prosecuted to the full extent of all applicable laws.
3// ** Copyright 2019-2024 Vawlt LLC https://www.vawlt.com
4// ** All rights reserved.
5class c0{static f0(e){return e?e.length-1:-1}static f1(e,t){for(var i=0;i<e.length;i++)if(e[i]==t)return i;return-1}static f2(e){return e?e[c0.f0(e)]:void 0}static f3(e){return e?e[0]:void 0}static f4(e){if(e)return e[Math.floor(Math.random()*e.length)]}static f5(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return!0;return!1}static f6(e){return!!e&&0===e.length}static f7(e){if(!array)return!0;for(var t=0;t<array.length;t++)if(!e.isEmtpy(array[t]))return!1;return!0}static f8(e,t){if(!e&&!t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if(e.length!==t.length)return!1;for(var i=e.length;i--;)if(e[i]!==t[i])return!1;return!0}static f9(e,t){if(!e&&!t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;for(var i=0;i<e.length;i++)if(!c0.f8(e[i],t[i]))return!1;return!0}static f10(e,t){for(var i=0;i<e.length;i++)t.push(e[i])}static f11(e,t){for(var i=0;i<e.length;i++)e[i]=t}static f12(e,t,i,a){for(var r=i;r<e.length;r+=a)e[r]=t}static f13(e){e.length=0}static f14(e){return e.length}}class c2{static f0(e,t,i){return{rank:e,suit:t,facing:i}}static f1(e){if(!e||e.length<1)c5.f2("c2.f1 undefined or empty cards list");else for(let t=e.length-1;t>0;t--){let i=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[i],e[i]=a}}static f2(e){return e.facing===c2.v6.Down}static f3(e){return e.facing===c2.v6.Up}static f4(e){e.facing=c2.v6.Down}static f5(e){e.facing=c2.v6.Up}static f6(e){c2.f2(e)?c2.f5(e):c2.f4(e)}static f7(e){return e.suit===c2.v5.Hearts||e.suit===c2.v5.Diamonds}static f8(e){return e.suit===c2.v5.Spades||e.suit===c2.v5.Clubs}static f9(e,t){return c2.f7(e)?c2.f8(t):c2.f7(t)}static f10(e){return c2.v1[e.rank]}static f11(e){return c2.v2[e.rank]}static f12(e){return c2.v3[e.suit]}static f13(e){return c2.v4[e.suit]}}c2.v0={Joker:0,Ace:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,Eight:8,Nine:9,Ten:10,Jack:11,Queen:12,King:13},c2.v1=["Jo","A","2","3","4","5","6","7","8","9","10","J","Q","K"],c2.v2=["Joker","Ace","2","3","4","5","6","7","8","9","10","Jack","Queen","King"],c2.v3=[" ","♡","♠","♢","♣"],c2.v4=["joker","hearts","spades","diamonds","clubs"],c2.v5={Joker:0,Hearts:1,Spades:2,Diamonds:3,Clubs:4},c2.v6={Down:0,Up:1},c2.v7=13,c2.v8=4,c2.v9=-1;class c3{static f0(e=!0){c3.v10=parseInt(c6.f33("--card-height")),c3.v11=parseInt(c6.f33("--card-width")),c3.v12=parseInt(c6.f33("--card-border-radius")),c3.v13=e,c3.f1()}static f1(){var e=c6.f33("--cards-url","../common/img/cards.svg");if(c5.f1("Loading Cards at URL:"+e),!c1.f1())return(t=new XMLHttpRequest).open("GET",e,!0),t.send(),void(t.onload=function(e){var i=document.createElement("div");i.classList.add("hidden"),i.innerHTML=t.responseText,document.body.insertBefore(i,document.body.childNodes[0])});var i=c6.f33("--cards-key","cards_1.0"),a=localStorage.getItem(i);if(a){var r=document.createElement("div");r.classList.add("hidden"),r.innerHTML=a,document.body.insertBefore(r,document.body.childNodes[0])}else{var t;(t=new XMLHttpRequest).open("GET",e,!0),t.send(),t.onload=function(a){if(t.status>=400||t.status<200)c5.f2("Can't find cards svg. url :"+e+" status: "+t.status);else{var r=document.createElement("div");r.classList.add("hidden"),r.innerHTML=t.responseText,document.body.insertBefore(r,document.body.childNodes[0]),localStorage.setItem(i,t.responseText)}}}}static f2(e){var t="#"+c2.f11(e).toLowerCase();return e.rank!=c2.v0.Joker&&(t+="_"+c2.f13(e).toLowerCase()),e.rank>=c2.v0.Jack&&e.rank<=c2.v0.King&&(t+=c3.v13?"":"_no_face"),t}static f3(e,t,i="card_back"){var a=document.createElement("div");a.id=c3.v1+e,a.classList.add(c3.v0),c6.f23(a,c3.v11,c3.v10);var r=document.createElement("div");r.id=c3.v3+e,r.classList.add(c3.v2);var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=document.createElementNS("http://www.w3.org/2000/svg","use"),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","use");l.classList.add(c3.v7),n.classList.add(c3.v5),l.id=c3.v6+e,n.id=c3.v4+e;var d=c3.v11,u=c3.v10;l.setAttribute("viewBox","0 0 "+d+" "+u),n.setAttribute("viewBox","0 0 "+d+" "+u),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+i);var c=c3.f2(t);return o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c),l.appendChild(s),n.appendChild(o),r.appendChild(l),r.appendChild(n),r.classList.add(c3.v9),a.appendChild(r),c6.f22(a,c3.v12),a}static f4(e,t){var r=e.childNodes[0].childNodes[1].childNodes[0],n=c3.f2(t);r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n)}static f5(e,t){var i=t.getElementsByClassName(c3.v2)[0],a=c2.f3(e);i.classList.toggle("face_up",a),i.classList.toggle("face_down",!a)}static f6(e,t){e.classList.toggle(c3.v8,t)}static f7(e,t){e.getElementsByClassName(c3.v2)[0].classList.toggle(c3.v9,t)}static f8(e,t){e.getElementsByClassName(c3.v2)[0].style.transitionDelay=t+"s"}static f9(e){e.getElementsByClassName(c3.v2)[0].style.transitionDelay=""}}c3.v0="card_sprite",c3.v1="card_sprite_",c3.v2="card_div",c3.v3="card_div_",c3.v4="card_front_",c3.v5="card_front",c3.v6="card_back_",c3.v7="card_back",c3.v8="move_animation",c3.v9="flip_animation",c3.v10=120,c3.v11=82,c3.v
512=9,c3.v13=!0;class c7{static f0(){}static f1(e){var t=document.getElementById(e);t?c7.v4.push(t):c5.f2("Can't find dialog id: "+e)}static f2(e){for(var t=0;t<c7.v5.length;t++){var i=c7.v5[t];if(i.id===e)return i.config}return c7.v6}static f3(){if(!c7.v3){var e=document.createElement("div");e.id=c7.v1,e.classList.add("dialog_curtain"),c6.f32(e,"dialog",0),e.onclick=c7.f7,document.body.appendChild(e),c7.v3=e}}static f4(e,t){var i=document.getElementById(e);i?(c7.v3||c7.f3(),c7.v2=t,i.onclick=c7.f7,c6.f32(i,"dialog",1),c6.f37(c7.v3),c7.f5(i),c7.v0=Date.now(),c5.f1("DialogUtil visibility:"+i.style.visibility),"visible"!=i.style.visibility&&(c5.f1("DialogUtil Make Visible"),c6.f37(i))):c5.f2("DialogUtil. Can't find dialog id: "+e)}static f5(e){var t=e.offsetHeight,a=document.body.offsetHeight-t;e.style.top=a/4+"px"}static f6(){for(var e=0;e<c7.v4.length;e++){c5.f1("Closing Dialog ii: "+e);var t=c7.v4[e];c6.f36(t),c5.f1("Visibility:"+t.style.visibility)}c7.v3&&c6.f36(c7.v3),c7.v2&&c7.v2()}static f7(){c5.f1("c7.f7"),Date.now()-c7.v0<c7.v7||c7.f6()}}c7.v0=0,c7.v1="dialog_util_curtain",c7.v2,c7.v3=void 0,c7.v4=[],c7.v5=[],c7.v6={delayShow:0},c7.v7=250;class c4{static f0(e){e.addEventListener("mousedown",c4.f5),e.addEventListener("mousemove",c4.f10),e.addEventListener("mouseup",c4.f14),e.addEventListener("mouseleave",c4.f17),e.addEventListener("touchstart",c4.f18,!0),e.addEventListener("touchmove",c4.f19,!0),e.addEventListener("touchend",c4.f20,!0),e.addEventListener("touchleave",c4.f21,!0),e.addEventListener("touchcancel",c4.f22,!0),c4.v8=e,c4.v27=JSON.parse(c6.f33("--prevent-defaults","false"))}static f1(e,t){c4.v9[e]=t}static f2(e){for(;!e.classList.contains("draggable");)if(null===(e=e.parentElement))return!1;return!0}static f3(e){for(;!e.classList.contains("clickable");)if(null===(e=e.parentElement))return!1;return!0}static f4(e){for(;!e.classList.contains("tappable");)if(null===(e=e.parentElement))return!1;return!0}static f5(e){if(!(Date.now()-c4.v13<c4.v26)){c4.v13=Date.now();var t=e.touches?e.touches[0].target:e.target;if(t&&t.classList.contains("pass_thru"))c5.f1("c4.f5 TargetElement requesting pass thru");else{var i=document.hasFocus();c4.v9[c4.v14]&&c4.v9[c4.v14]();var a=c4.f3(t),r=c4.f2(t);a?(c4.f6(e.touches?e.touches[0]:e),i&&e.preventDefault()):r&&(c4.f7(e.touches?e.touches[0]:e),i&&e.preventDefault())}}}static f6(e){for(var t=e.target;!t.classList.contains("clickable");)if(null===(t=t.parentElement))return c5.f2("c4.f6 called on non clickable"),!1;c4.v9[c4.v18]&&c4.v9[c4.v18](t)}static f7(e){for(var t=e.target;!t.classList.contains("draggable");)if(null===(t=t.parentElement))return void c5.f2("c4.f7 called on a non draggalbe");c4.v0=!0,c4.v3||(c5.f1("Start Drag Location"),c4.v3={x:0,y:0},c4.v3.x=parseFloat(e.clientX),c4.v3.y=parseFloat(e.clientY)),c4.v4||(c5.f1("Start Drag Time"),c4.v4=Date.now()),c4.v9[c4.v16]&&c4.v9[c4.v16](t)}static f8(e,t=0){c4.v5.push(e),c6.f51(e),c6.f48(e,"dragging","move"),c6.f32(e,"dragging",t);var i={x:0,y:0};i.x=c4.v3.x-parseFloat(e.style.left),i.y=c4.v3.y-parseFloat(e.style.top),c4.v6.push(i)}static f9(e){e.classList.toggle("droppable",!0),c4.v7.push(e)}static f10(e){if(c4.v0){c4.f4(c4.f15());c4.f11(e)>=c4.v25&&c4.f12(e),e.preventDefault()}c4.v27&&e.preventDefault()}static f11(e){if(!c4.v3)return 0;e.touches&&(e=e.touches[0]);var t={x:parseFloat(e.clientX),y:parseFloat(e.clientY)};return c6.f42(c4.v3,t)}static f12(e){if(c4.v0){e.touches&&(e=e.touches[0]);for(var t=0;t<c4.v5.length;t++){var i=c4.v5[t],a=c4.v6[t],r=e.clientX-a.x,n=e.clientY-a.y;c6.f24(i,r,n)}for(i=c4.v5[0],t=0;t<c4.v7.length;t++){var o=c4.v7[t];o.classList.toggle("droppable_hover",c6.f38(i,o))}}}static f13(e,t){if(!c4.v3)return c5.f2("isTap called with a drag start"),!1;c5.f1("isTap");var i=c6.f42(t,c4.v3);if(c5.f1(i),i>c4.v24)return!1;var a=Date.now()-c4.v4;return c5.f1(a),!(a>c4.v23)}static f14(e){if(c4.v9[c4.v15]&&c4.v9[c4.v15](),c4.v0){var t={x:(e=e.changedTouches?e.changedTouches[0]:e).clientX,y:e.clientY},i=c4.f15();if(c4.f4(i)&&c4.f13(e,t))return c5.f1("was a tap"),c4.v9[c4.v19]&&c4.v9[c4.v19](),c4.f16(),void(c4.v9[c4.v20]&&c4.v9[c4.v20](i));for(var a=[],r=0;r<c4.v7.length;r++){var n=c4.v7[r];c6.f38(c4.f15(),n)&&a.push(n)}var o=c4.v21,l=null;for(r=0;r<a.length;r++){var s=a[r],d=c6.f40(s,t);d<o&&(l=s,o=d)}l&&c4.v9[c4.v17]&&c4.v9[c4.v17](l),c4.v9[c4.v19]&&c4.v9[c4.v19](),c4.f16()}}static f15(e=0){return c4.v5[e]}static f16(e){c4.v0=!1,c4.v5=[],c4.v6=[],c4.v3=void 0,c4.v4=void 0;for(var t=0;t<c4.v7.length;t++){c4.v7[t].classList.toggle("droppable_hover",!1)}c4.v7=[]}static f17(e){try{c4.f14(e)}catch(e){c5.f2("Error MouseLeave"),c5.f2(e)}}static f18(e){try{c4.f5(e)}catch(e){c5.f2("Error touchStart"),c5.f2(e)}}static f19(e){try{c4.f10(e),c4.v27&&e.preventDefault()}catch(e){c5.f2("Error touchMove"),c5.f2(e)}}static f20(e){try{c4.f14(e)}catch(e){c5.f2("Error touchEnd"),c5.f2(e)}}static f21(e){try{c4.f14(e)}catch(e){c5.f2("Error touchLeave"),c5.f2(e)}}static f22(e){try{c4.f14(e)}catch(e){c5.f2("Error touchCancel"),c5.f2(e)}}}c4.v0=!1,c4.v3=void 0,c4.v4=void 0,c4.v5=[],c4.v6=[],c4.v7=[],c4.v8,c4.v9=[],c4.v10=0,c4.v11=void 0,c4.v12=void 0,c4.v13=0,c4.v14="mouse_down",c4.v15="mouse_up",c4.v16="start_drag",c4.v17="handle_drop",c4.v18="handle_click",c4.v19="stop_drag",c4.v20="on_tap",c4.v21=999,c4.v22=300,c4.v23=250,c4.v24=8,c4.v25=8,c4.v26=200;class c5{static f0(e){c5.f5(c5.v1.Debug,e)}
5static f1(e){c5.f5(c5.v1.Info,e)}static f2(e){c5.f5(c5.v1.Error,"ERROR:"),c5.f5(c5.v1.Error,e)}static f3(e){c5.f5(c5.v1.Critical,"CRITICAL:"),c5.f5(c5.v1.Critical,e)}static f4(){console.log("Muting Log...."),Log.level=c5.v1.Mute}static set level(e){c5.v3=e}static get level(){return c5.v3}static f5(e,t){e>=c5.v3&&console.log(t)}}c5.v1={Debug:0,Info:1,Error:2,Critical:3,Mute:4},c5.v3=c5.v1.Debug;class c6{static f0(e,t,i){c6.v6=e,c6.v45=c6.f33("--game-align",c6.v48),c6.f9(t,i),c6.f7(),window.onresize=c6.f3,window.onorientationchange=c6.f2}static f1(e,t){c6.v11[e]=t}static f2(){c6.v13||(c6.v13=!0,setTimeout(function(){c6.f3(),c6.v13=!1},c6.v56))}static f3(){c6.f7(),c6.f4(),c6.v11[c6.v14]&&c6.v11[c6.v14]()}static f4(){for(var e=0;e<c6.v5.length;e++){var t=c6.v5[e];if(t){var i=t.getAttribute(c6.v20),a=t.getAttribute(c6.v19),r=t.getAttribute(c6.v22),n=t.getAttribute(c6.v23),o=t.getAttribute(c6.v17),l=t.getAttribute(c6.v18);c6.f49(t,"move",!1),c6.f23(t,o,l),c6.f21(t,i,a,r,n),c6.f5(t)}}}static f5(e){var t=e.getAttribute(c6.v21);if(t){var a=parseInt(t)*c6.f8();e.style.borderRadius=a+"px"}}static f6(e){if(!c6.v6)throw c5.f2("c6.f6 no root eleement registered"),new Error("No root element specified");c6.v6.appendChild(e)}static f7(){var e=c6.f10(),t=c6.f11(),a=c6.f13(),r=c6.f14(),n=a/e,o=r/t;c6.v44=n<o?n:o;var l=a-e*c6.v44,s=r-t*c6.v44,d=c6.f33(c6.v46,c6.v49);switch(d){case c6.v48:c6.v7=l/2;break;case c6.v49:c6.v7=0;break;case c6.v50:c6.v7=l;break;default:if(d.startsWith(c6.v55)){var u=parseInt(d.substr(c6.v55.length));c6.v7=excess*(u/100)}}var c=c6.f33(c6.v47,c6.v51);switch(c){case c6.v48:c6.v8=parseInt(s/2);break;case c6.v51:c6.v8=0;break;case c6.v52:c6.v8=s;break;case c6.v53:c6.v8=parseInt(s/3);break;case c6.v54:c6.v8=parseInt(2*s/3);break;default:if(c.startsWith(c6.v55)){u=parseInt(c.substr(c6.v55.length));c6.v8=s*(u/100)}}}static f8(){return c6.v44}static f9(e,t){c5.f1("Set Canonical Size cwidth: "+e+" cheight: "+t),c6.v9=e,c6.v10=t}static f10(){return c6.v9}static f11(){return c6.v10}static f12(){return c6.f10()/c6.f11()}static f13(){return parseInt(c6.v6.clientWidth)}static f14(){return parseInt(c6.v6.clientHeight)}static f15(){return c6.f13()/c6.f14()}static f16(){return c6.v7}static f17(){return c6.v8}static f18(){var e=document.getElementById("em_div");return e?(e.style.height="1em",e.offsetHeight):-1}static f19(e){c6.v5.push(e)}static f21(e,t,i,a=0,r=0){e.style.position="absolute",e.setAttribute(c6.v20,t),e.setAttribute(c6.v19,i),e.setAttribute(c6.v22,a),e.setAttribute(c6.v23,r);var n=c6.f13(),o=c6.f14(),l=0,s=0;-1!=(""+t).indexOf("%")?(s=n*(parseFloat(t)/100),e.style.left=s+"px"):(t=parseFloat(t),s=c6.v7+c6.f8()*t,s+=parseInt(a),e.style.left=s+"px");if(-1!=(""+i).indexOf("%")){l=o*(parseFloat(i)/100);e.style.top=l+"px"}else i=parseFloat(i),l=c6.v8+c6.f8()*i,l+=parseInt(r),e.style.top=l+"px"}static f22(e,t){e.setAttribute(c6.v21,t);var i=t*c6.f8();e.style.borderRadius=i+"px"}static f23(e,t,i){e.style.position="absolute",e.setAttribute(c6.v17,t),e.setAttribute(c6.v18,i);var a=0,r=0;-1!=(""+t).indexOf("%")?e.style.width=t:(t=parseFloat(t),a=c6.f8()*t,e.style.width=a+"px"),-1!=(""+i).indexOf("%")?e.style.height=i:(i=parseFloat(i),r=c6.f8()*i,e.style.height=r+"px")}static f24(e,t,i){e.style.position="absolute",e.style.left=parseInt(t)+"px",e.style.top=parseInt(i)+"px"}static f25(e,t){var i=document.getElementById(e);i&&i.classList.add(t)}static f26(e,t){var i=document.getElementById(e);i&&i.classList.toggle(t,!0)}static f27(e,t){var i=document.getElementById(e);i&&i.classList.toggle(t,!1)}static f28(e){var t=c6.f34(e);if(!c0.f6(t))for(var i=0;i<t.length;i++)t[i].classList.toggle(e,!1)}static f29(e,t){var i=c0.f2(c6.v1),a=0;i&&(a=i.maxZ+1);var r=a+t;c6.v1.push({name:e,minZ:a,maxZ:r})}static f30(e){for(var t=0;t<c6.v1.length;t++){var i=c6.v1[t];if(i.name===e)return i.minZ}return c6.v0=-1}static f31(e){for(var t=0;t<c6.v1.length;t++){var i=c6.v1[t];if(i.name===e)return i.maxZ}return c6.v0=-1}static f32(e,t,i=0){var r=c6.f30(t)+i;e.style.zIndex=r}static f33(e,t=null){var i=getComputedStyle(document.body).getPropertyValue(e);return i?i.trim():t}static f34(e){return document.getElementsByClassName(e)}static f35(e,t){var i=!1,a_left=parseFloat(e.style.left),a_top=parseFloat(e.style.top),a_width=parseFloat(e.style.width),a_height=parseFloat(e.style.height);return t.x>=a_left&&t.x<=a_left+a_width&&t.y>=a_top&&t.y<=a_top+a_height&&(i=!0),i}static f36(e){c5.f1("UIUtil Make Hidden"),e.style.visibility="hidden"}static f37(e){e.style.visibility="visible"}static f38(e,t){var i={left:parseFloat(e.style.left),right:parseFloat(e.style.left)+parseFloat(e.style.width),top:parseFloat(e.style.top),bottom:parseFloat(e.style.top)+parseFloat(e.style.height)},a={left:parseFloat(t.style.left),right:parseFloat(t.style.left)+parseFloat(t.style.width),top:parseFloat(t.style.top),bottom:parseFloat(t.style.top)+parseFloat(t.style.height)};return c6.f39(i,a)}static f39(e,t){return e.left<=t.right&&t.left<=e.right&&e.top<=t.bottom&&t.top<=e.bottom}static f40(e,t){var i={left:parseFloat(e.style.left),right:parseFloat(e.style.left)+parseFloat(e.style.width),top:parseFloat(e.style.top),bottom:parseFloat(e.style.top)+parseFloat(e.style.height)};return c6.f41(i,t)}static f41(e,t){var i_x=e.left+(e.right-e.left)/2,i_y=e.top+(e.bottom-e.top)/2,a=t.x-i_x,r=t.y-i_y;return Math.abs(Math.sqrt(a*a+r*r))}static f42(e,t){var i=e.x-t.x,a=e.y-t.y;return Math.abs(Math.sqrt(i*i+a*a))}static f43(e){for(var t=c6.f34(e),i=0;i<t.length;i++)t[i].classList.toggle(e,!1)}static f44(e,t){c6.v4[e]||(c6.v4[e]=[]),c6.v4[e][t]=""}static f45(e,t,i){c6.v4[e][t]=i}static f46(e,t){c6.v4[e][t]=""}static f47(e,t){return c6.v4[e][t]}static f48(e,t,i){var a=c6.f47(t,i),r=e.getAttribute(i);r&&e.classList.toggle(r,!1),a&&e.classList.toggle(a,!0),e.setAttribute(i,a)}static f49(e,t,i){var a=e.getAttribute(t);a&&e.classList.toggle(a,i)}static f50(e,t){e.style.transitionDelay=t+"s"}static f51(e){e.style.transitionDelay=""}static f52(e,t,i="",a=""){var r=document.createElement("div");r.id=e;var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=document.createElementNS("http://www.w3.org/2000/svg","use");return o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),n.appendChild(o),n.classList.add("svg_sprite"),i?n.setAttribute("viewBox","0 0 "+i+" "+a):c5.f1("Not Setting the viewbox"),r.appendChild(n),c6.f23(r,i,a),r}static f53(e,t){e.nodeName.toLowerCase()==="TEXT".toLowerCase()?e.textContent=t:e.innerText=t}
5static f54(e,t=!0){var i=0,a=e.substr(0,2);a=a.toLowerCase();for(var r=document.getElementsByClassName("lang"),n=0;n<r.length;n++){var o=r[n];o.getAttribute("lang")===a?o.style.display="":(i++,o.style.display="none")}i>=r.length&&t&&Util.selectLanguage("en-US",!1)}}c6.v0=-1,c6.v1=[],c6.v2=[],c6.v3=[],c6.v4=[],c6.v5=[],c6.v6,c6.v7,c6.v8,c6.v9,c6.v10,c6.v11=[],c6.v12,c6.v13=!1,c6.v14="ui_resize",c6.v15="--game-cwidth",c6.v16="--game-cheight",c6.v17="canonical_width",c6.v18="canonical_height",c6.v19="canonical_top",c6.v20="canonical_left",c6.v21="canonical_border_radius",c6.v22="aoffset_left",c6.v23="aoffset_top",c6.v24="element_width",c6.v25="element_height",c6.v26="element_top",c6.v27="element_left",c6.v28="cpx",c6.v29="apx",c6.v30="ch%",c6.v31="cw%",c6.v32="ah%",c6.v33="aw%",c6.v34="min_width",c6.v35="max_width",c6.v36="min_height",c6.v37="max_height",c6.v38="min_left",c6.v39="max_left",c6.v40="min_top",c6.v41="max_top",c6.v42,c6.v43="element_scale",c6.v44,c6.v45,c6.v46="--game-align-horizontal",c6.v47="--game-align-vertical",c6.v48="align_center",c6.v49="align_left",c6.v50="align_right",c6.v51="align_top",c6.v52="align_bottom",c6.v53="align_top_third",c6.v54="align_bottom_third",c6.v55="align_percent_",c6.v56=800;class c1{static f0(e){return JSON.parse(JSON.stringify(e))}static f1(){try{if(void 0===localStorage||null===localStorage)return!1;const e="b7d7b332-ecad-4577-9db9-dd7a5ab98ba5";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}}class c8{static f0(e){var i=(e=Math.round(e))%3600,r=i%60;return{h:Math.floor(e/3600),m:Math.floor(i/60),s:Math.ceil(r)}}static f1(e){var t=e.split(":"),i=0;return t.length>=3&&(i+=3600*parseInt(t.shift())),t.length>=2&&(i+=60*parseInt(t.shift())),t.length>=1&&(i+=parseInt(t.shift())),i}}class c9{static f0(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}static f1(){var e=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"];for(-1!==navigator.userAgent.toLowerCase().indexOf("iphone")&&(s_bIsIphone=!0);e.length;)if(navigator.platform===e.pop())return!0;return s_bIsIphone=!1,!1}static f2(){var e=document.documentElement.clientWidth/window.innerWidth;return window.innerHeight*e}static f3(){var e=(0===window.orientation?screen.height:screen.width)-getIOSWindowHeight();return e>1?e:0}static f4(){try{return window.self!==window.top}catch(e){return!0}}static f5(){var e=document.getElementById("canvas");return!(!e.getContext||!e.getContext("2d"))&&0==e.toDataURL("image/webp").indexOf("data:image/webp")}}const SHOW_TIME=5e3;function r(e,t){return Math.random()*(t-e)+e}window.module={},module={},function(){var e,t;window.requestAnimationFrame&&window.cancelAnimationFrame?(e=window.requestAnimationFrame,t=window.cancelAnimationFrame):["webkit","moz","o","ms"].forEach(function(i){if(!e||!t){var a=i+"RequestAnimationFrame",r=i+"CancelAnimationFrame";window[a]&&window[r]&&(e=window[a],t=window[r])}}),e&&t||(e=function(e){return window.setTimeout(e,1e3/60)},t=function(e){return window.clearTimeout(e)});var i={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"]};function a(){}function r(e){return module.exports.Promise?new module.exports.Promise(e):(e(a,a),null)}function l(e,t,a){return function(e,t){return t?t(e):e}(e&&function(e){return!(null===e||void 0===e)}(e[t])?e[t]:i[t],a)}function s(e,t){return Math.floor(Math.random()*(t-e))+e}function d(e){return parseInt(e,16)}function U(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function f(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function g(e){var t=document.createElement("canvas");return U(t),t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}function I(e){var t=e.angle*(Math.PI/180),i=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:10*Math.random(),velocity:.5*e.startVelocity+Math.random()*e.startVelocity,angle2D:-t+(.5*i-Math.random()*i),tiltAngle:Math.random()*Math.PI,color:function(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:d(t.substring(0,2)),g:d(t.substring(2,4)),b:d(t.substring(4,6))}}(e.color),shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0}}function v(i,a,n,o,l){var I,v,s=a.slice(),d=i.getContext("2d"),u=i.width,c=i.height,g=n?U:f;function _(){u=c=null}var m=r(function(t){function a(){I=v=null,o&&window.removeEventListener("resize",_),d.clearRect(0,0,u,c),l(),t()}I=e(function r(){u||c||(g(i),u=i.width,c=i.height),d.clearRect(0,0,u,c),(s=s.filter(function(e){return function(e,t){t.x+=Math.cos(t.angle2D)*t.velocity,t.y+=Math.sin(t.angle2D)*t.velocity+3,t.wobble+=.1,t.velocity
5*=t.decay,t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+5,t.wobbleX=t.x+10*Math.cos(t.wobble),t.wobbleY=t.y+10*Math.sin(t.wobble);var i=t.tick++/t.totalTicks,a=t.x+t.random*t.tiltCos,r=t.y+t.random*t.tiltSin,n=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-i)+")",e.beginPath(),"circle"===t.shape?e.ellipse(t.x,t.y,.6*Math.abs(n-a),.6*Math.abs(o-r),Math.PI/10*t.wobble,0,2*Math.PI):(e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(r)),e.lineTo(Math.floor(n),Math.floor(o)),e.lineTo(Math.floor(a),Math.floor(t.wobbleY))),e.closePath(),e.fill(),t.tick<t.totalTicks}(d,e)})).length?I=e(r):a()}),v=a});return o&&window.addEventListener("resize",_,!1),{addFettis:function(e){return s=s.concat(e),m},canvas:i,promise:m,reset:function(){I&&t(I),v&&v()}}}function _(e,t){var n,i=!e,a=!!l(t||{},"resize"),r=!1;function o(t){var o=l(t,"particleCount",Math.floor),d=l(t,"angle",Number),u=l(t,"spread",Number),U=l(t,"startVelocity",Number),A=l(t,"decay",Number),_=l(t,"colors"),m=l(t,"ticks",Number),p=l(t,"zIndex",Number),E=l(t,"shapes"),k=function(e){var t=l(e,"origin",Object);return t.x=l(t,"x",Number),t.y=l(t,"y",Number),t}(t),C=o,h=[];i?e=n?n.canvas:g(p):a&&!r&&(f(e),r=!0);for(var T=e.width*k.x,w=e.height*k.y;C--;)h.push(I({x:T,y:w,angle:d,spread:u,startVelocity:U,color:_[C%_.length],shape:E[s(0,E.length)],ticks:m,decay:A}));return n?n.addFettis(h):(i&&document.body.appendChild(e),(n=v(e,h,i,i||a,function(){n=null,i&&document.body.removeChild(e)})).promise)}return o.reset=function(){n&&n.reset()},o}module.exports=_(),module.exports.create=_,module.exports.Promise=window.Promise||null}(),window.confetti=module.exports;var confettiActive=!1;function stopConfetti(){confettiActive=!1}function showConfetti(){if(!confettiActive){var e=Date.now()+SHOW_TIME;confettiActive=!0,function t(){confetti({particleCount:5,angle:60,spread:55,origin:{x:0},zIndex:1e3}),confetti({particleCount:5,angle:120,spread:55,origin:{x:1},zIndex:1e3}),Date.now()<e&&confettiActive&&requestAnimationFrame(t)}()}}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Redux={})}(this,function(e){"use strict";var t=function(e){var t,i=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof i?i.observable?t=i.observable:(t=i("observable"),i.observable=t):t="@@observable",t}(),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function r(e,t){var i=t&&t.type;return"Given "+(i&&'action "'+i+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function n(e,t){return function(){return t(e.apply(this,arguments))}}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){var i=Object.keys(e);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(e)),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i}function d(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}e.__DO_NOT_USE__ActionTypes=a,e.applyMiddleware=function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return function(e){return function(){var i=e.apply(void 0,arguments),a=function(){throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},n=t.map(function(e){return e(r)});return function(e){for(var t=1;arguments.length>t;t++){var i=null!=arguments[t]?arguments[t]:{};
5t%2?l(i,!0).forEach(function(t){o(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}({},i,{dispatch:a=d.apply(void 0,n)(i.dispatch)})}}},e.bindActionCreators=function(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var i={};for(var a in e){var r=e[a];"function"==typeof r&&(i[a]=n(r,t))}return i},e.combineReducers=function(e){for(var t=Object.keys(e),i={},n=0;t.length>n;n++){var o=t[n];"function"==typeof e[o]&&(i[o]=e[o])}var l,s=Object.keys(i);try{!function(e){Object.keys(e).forEach(function(t){var i=e[t];if(void 0===i(void 0,{type:a.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===i(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(i)}catch(e){l=e}return function(e,t){if(void 0===e&&(e={}),l)throw l;for(var a=!1,n={},o=0;s.length>o;o++){var d=s[o],u=e[d],c=(0,i[d])(u,t);if(void 0===c){var U=r(d,t);throw Error(U)}n[d]=c,a=a||c!==u}return a?n:e}},e.compose=d,e.createStore=function e(i,r,n){var o;if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof r&&void 0===n&&(n=r,r=void 0),void 0!==n){if("function"!=typeof n)throw Error("Expected the enhancer to be a function.");return n(e)(i,r)}if("function"!=typeof i)throw Error("Expected the reducer to be a function.");var l=i,s=r,d=[],u=d,c=!1;function U(){u===d&&(u=d.slice())}function f(){if(c)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function g(e){if("function"!=typeof e)throw Error("Expected the listener to be a function.");if(c)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return U(),u.push(e),function(){if(t){if(c)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,U();var i=u.indexOf(e);u.splice(i,1)}}}function I(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw Error("Reducers may not dispatch actions.");try{c=!0,s=l(s,e)}finally{c=!1}for(var t=d=u,i=0;t.length>i;i++)(0,t[i])();return e}return I({type:a.INIT}),(o={dispatch:I,subscribe:g,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");l=e,I({type:a.REPLACE})}})[t]=function(){var e,i=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(f())}return t(),{unsubscribe:i(t)}}})[t]=function(){return this},e},o}
5,Object.defineProperty(e,"__esModule",{value:!0})});class c10{static f0(e=c10.v0){if(c5.f1("New Game State"),!e||e!==c10.v0&&e!==c10.v1)return c5.f3("Klondike: Invalid mode for new game state"+e),null;var t=c1.f0(c10.v19);return c5.f1("Creating Fresh Game State"),c5.f1(t),t.config.mode=e,c10.f1(t),new URLSearchParams(window.location.search).get("end")?(c5.f1("Starting with almost end state"),c10.f5(t)):(c10.f2(t),c10.f3(t),c10.f4(t)),t}static f1(e){for(var t=0,i=0;i<c2.v8;i++)for(var a=0;a<c2.v7;a++)e.cards[t]=c2.f0(c2.v0.Ace+a,c2.v5.Hearts+i,c2.v6.Down),t++}static f2(e){for(var t=0;t<e.cards.length;t++)e.board.stock[t]=t}static f3(e){c2.f1(e.board.stock),e.board.stock.length!=c10.v5&&c5.f2("Wrong number of cards in stock "+e.board.stock.length)}static f4(e){for(var t=0;t<c10.v7;t++)for(var i=t;i<c10.v7;i++){if((a=e.board.stock.pop())===c2.v9){c5.f2("Not enough cards in stock");break}e.board.tableau[i].push(a)}for(var r=0;r<c10.v7;r++)if(e.board.tableau[r].length!=r+1){c5.f2("c10.f4 invalid length of tableau t"+r);break}for(i=0;i<c10.v7;i++){var a=c0.f2(e.board.tableau[i]);c2.f5(e.cards[a])}}static f5(e){var t=e.cards;e.board.tableau=c1.f0(c10.v20),e.board.waste=c1.f0(c10.v21);for(var i=0,a=0;a<c2.v8;a++)for(var r=0;r<c2.v7;r++){var n=t[i++];c2.f5(n)}}static f6(){return c10.v18}static f7(){return c10.v16}static f8(){return c10.v15}static f9(e){return c10.v12+e}static f10(e,t){return c10.v12+e+c10.v9+c10.v12+t}static f11(e,t=0){return c10.v13+e+c10.v10+t}static f12(){return c10.v14}static f13(e){return c10.v14+c10.v9+c10.v12+e}static f14(e){return c10.v14+c10.v9+c10.v13+e}static f15(e,t,i){return c10.v13+e+c10.v10+t+c10.v9+c10.v12+i}static f16(e,t,i){var a=c10.v13+e;return-1!=t&&(a+=c10.v10+t),a+=c10.v9+c10.v13+i}static f17(e,t){return c10.v12+e+c10.v9+c10.v13+t}static f18(e){let t=[];if(c0.f6(e.board.waste))return t;for(var i=0;i<c10.v6;i++){var a=c10.f13(i);c10.f37(e,a)&&t.push(a)}for(var r=0;r<c10.v7;r++){a=c10.f14(r);c10.f37(e,a)&&t.push(a)}return t}static f19(e,t){var i=[],a=parseInt(t.charAt(1)),r=-1;r=-1!=t.indexOf(c10.v10)?parseInt(t.substr(3)):-1;var n=e.board.tableau[a];if(c0.f6(n))return i;if(-1===r||r===c0.f0(n))for(var o=0;o<c10.v6;o++){var l=c10.f15(a,r,o);c10.f37(e,l)&&i.push(l)}for(var s=0;s<c10.v7;s++){if(s!==a)l=c10.f16(a,r,s),c10.f37(e,l)&&i.push(l)}return i}static f20(e,t){if(t.charAt(0)==c10.v12){for(var i=parseInt(t.charAt(1)),a=[],r=0;r<c10.v7;r++){var n=c10.f17(i,r);c10.f37(e,n)&&a.push(n)}for(var o=0;o<c10.v6;o++)if(o!==i){n=c10.f10(i,o);c10.f37(e,n)&&a.push(n)}return a}c5.f2("Invalid location for calculateMoveListForFoundation"+t)}static f21(e,t){switch(c10.f23(e),t.charAt(0)){case c10.v16:c10.f25(e);break;case c10.v15:var i=e.config.mode===c10.v0?1:3;c10.f26(e,i);break;case c10.v14:c10.f27(e,t);break;case c10.v13:c10.f28(e,t);break;case c10.v12:c10.f31(e,t);break;case c10.v18:c10.f32(e,t)}c10.f38(e)&&(e.status=c10.v2)}static f22(e,t){if(e.charAt(0)!=t.charAt(0))return!1;switch(e.charAt(0)){case c10.v15:case c10.v14:return!0;case c10.v12:return e.charAt(1)===t.charAt(1);case c10.v13:if(e.charAt(1)!=t.charAt(1))return!1}return!0}static f23(e){var t=c10.f41(e.board),i=c10.f41(e.cards),a=t+c10.v11+i;e.history.push(a)}static f24(e){if(!c0.f6(e.history)){var i=e.history.pop().split(c10.v11),a=i[0],r=i[1];e.moves.push(c10.v17);var n=c10.f42(a);e.board=n;var o=c10.f42(r);return e.cards=o,e}c5.f2("Can't restore from empty history")}static f25(e){for(c0.f6(e.board.stock)||c5.f2("c10.f25 Being Asked to reset an non empty stock");!c0.f6(e.board.waste);){var t=e.board.waste.pop(),i=e.cards[t];c2.f4(i),e.board.stock.push(t)}}static f26(e,t=1){if(t<1||t>3)c5.f2("c10.f26 numCardsMax is invalid:"+t);else if(c0.f6(e.board.stock))c5.f2("c10.f26 stock is empty");else for(var i=0;i<t;i++){var a=e.board.stock.pop();if(e.board.waste.push(a),c2.f5(e.cards[a]),c0.f6(e.board.stock))break}}static f27(e,t){var i=t.split(c10.v9),a=i[0],r=i[1];if(a.startsWith(c10.v14))if(c0.f6(e.board.waste))c5.f2("c10.f27 waste is empty of cards:"+t);else if(c10.f37(e,t)){var n=c10.f34(e,r),o=e.board.waste.pop();n.push(o)}else c5.f2("c10.f27 INVALID MOVE:"+t);else c5.f2("c10.f27 being called for wrong move type"+t)}static f28(e,t){var i=t.split(c10.v9),a=i[0],r=i[1];if(a.charAt(0)==c10.v13)if(c10.f37(e,t)){var o,n=a.charAt(1);if(-1!=a.indexOf(c10.v10))o=a.split(c10.v10)[1];else o=c0.f0(e.board.tableau[n]);switch(r.charAt(0)){case c10.v12:var s=r.charAt(1),d=e.board.tableau[n].pop();c10.f29(e,s,d);break;case c10.v13:var u=e.board.tableau[n].splice(o),c=r.charAt(1);c10.f30(e,c,u)}if(!c0.f6(e.board.tableau[n])){d=c0.f2(e.board.tableau[n]);c2.f2(e.cards[d])&&c2.f5(e.cards[d])}}else c5.f2("c10.f28 INVALID MOVE:"+t);else c5.f2("c10.f28 being called for wrong move type"+t)}static f29(e,t,i){var a=e.cards[i];if(c0.f6(e.board.foundation[t])){if(a.rank!=c2.v0.Ace)return void c5.f2("c10.f29 Moving non-ACE to empty foundation f: "+t+" cardId: "+i);e.board.foundation[t].push(i)}else{var r=c0.f2(e.board.foundation[t]),n=e.cards[r];if(a.suit!=n.suit)return c5.f2("c10.f29 Moving non matching suits foundation f: "+t),c5.f2(a),void c5.f2(n);if(a.rank!=n.rank+1)return c5.f2("c10.f29 Moving wrong sequential ranks to foundation f: "+t),c5.f2(a),void c5.f2(n);e.board.foundation[t].push(i)}}static f30(e,t,i){var a=e.cards[i[0]];
5if(c0.f6(e.board.tableau[t])){if(a.rank!=c2.v0.King)return void c5.f2("c10.f30 non-King moving to empty tableau:"+a)}else{var r=c0.f2(e.board.tableau[t]),n=e.cards[r];if(!c2.f9(a,n))return void c5.f2("c10.f30 destCard and topCard same colors:"+a.suit+" destCard: "+n.suit);if(n.rank!=a.rank+1)return void c5.f2("c10.f30 destCard and topCard not descenting ranks:"+a.rank+" destCard: "+r.rank)}c0.f10(i,e.board.tableau[t])}static f31(e,t){var i=t.split(c10.v9),a=i[0],r=i[1];if(a.charAt(0)==c10.v12)if(c10.f37(e,t)){var n=c10.f34(e,r),o=a.charAt(1),l=e.board.foundation[o].pop();n.push(l)}else c5.f2("Klondike.fromMove INVALID MOVE:"+t);else c5.f2("c10.f31 being called for wrong move type"+t)}static f32(e,t){if(!c10.f39(e))return c5.f2("autoMoveToFoundation. Invalid state"),void c5.f2(e);c5.f1("Auto Move To Foundation");for(var i=e.cards,n=(e.board.tableau,e.board.waste,e.board.foundation),o=[-1,-1,-1,-1],l=[-1,-1,-1,-1],s=0;s<c10.v6;s++){if(!c0.f6(n[s]))l[(c=i[c0.f2(n[s])].suit)-1]=s,o[s]=c}for(s=0;s<c10.v6;s++)if(-1===o[s])for(var U=0;U<l.length;U++)if(-1===l[U]){o[s]=U+1,l[U]=s;break}for(s=0;s<c10.v6;s++){for(var c=o[s],f=[],g=0;g<c2.v7;g++)f.push((c-1)*c2.v7+g);n[s]=c1.f0(f)}for(var I=0;I<c10.v7;I++)c0.f13(e.board.tableau[I]);c0.f13(e.board.waste),c0.f13(e.board.stock)}static f33(e){for(var t=e.board.foundation,i=[-1,-1,-1,-1],a=0;a<c10.v6;a++)c0.f6(t[a])?i[a]=-1:i[a]=c0.f2(t[a]);return i}static f34(e,t){var i;switch(t.charAt(0)){case c10.v12:var a=t.charAt(1);i=e.board.foundation[a];break;case c10.v13:var r=t.charAt(1);i=e.board.tableau[r]}return i}static f35(e,t){for(var i=e.board.stock,a=e.board.waste,r=e.board.tableau,n=e.board.foundation,o=0;o<c10.v7;o++)if(-1!=(s=c0.f1(r[o],t)))return c10.v13+o+c10.v10+s;if(-1!=(s=c0.f1(a,t)))return c10.v14+c10.v10+s;for(var l=0;l<c10.v6;l++)if(-1!=(s=c0.f1(n[l],t)))return c10.v12+l+c10.v10+s;var s=c0.f1(i,t);if(-1!=s)return c10.v15+c10.v10+s;c5.f2("c10.f35. Couldn't find cardId: "+t)}static f36(e,t){switch(t.charAt(0)){case c10.v14:var i=e.board.waste;return c0.f6(i)?c2.v9:c0.f2(i);case c10.v13:var a=t.charAt(1),r=e.board.tableau[a];return-1==t.indexOf(c10.v10)?c0.f6(r)?c2.v9:c0.f2(r):c0.f6(r)?(c5.f2("c10.f36 specifying index on empty tableau"),c2.v9):r[t.split(c10.v10)[1]];case c10.v12:var l=t.charAt(1),s=e.board.foundation[l];return c0.f6(s)?c2.v9:c0.f2(s)}return c2.v9}static f37(e,t){var i=t.split(c10.v9);if(!i||2!=i.length)return c5.f2("c10.f37 invalid move sent:"+t),!1;var a=i[0],r=i[1],n=c10.f36(e,a);if(n===c2.v9)return c5.f2("c10.f37  sourceCard is blank. Move: "+t+" source: "+a),!1;var o=e.cards[n];if(!c2.f3(o))return!1;switch(r.charAt(0)){case c10.v12:var l=r.charAt(1);if(c0.f6(e.board.foundation[l]))return o.rank===c2.v0.Ace;var s=c0.f2(e.board.foundation[l]);return(d=e.cards[s]).suit===o.suit&&d.rank===o.rank-1;case c10.v13:var u=r.charAt(1);if(c0.f6(e.board.tableau[u]))return o.rank===c2.v0.King;s=c0.f2(e.board.tableau[u]);var d=e.cards[s];return c2.f9(d,o)&&d.rank===o.rank+1}return!1}static f38(e){if(e.status==c10.v4){if(!c0.f6(e.board.stock))return!1;if(!c0.f6(e.board.waste))return!1;for(var t=0;t<c10.v6;t++){if(e.board.foundation[t].length!=c2.v7)return!1;for(var i=e.board.foundation[t][0].suit,a=0;a<c2.v7;a++){var r=e.board.foundation[t][a];if(e.cards[r].rank!=a+1)return c5.f2("Card out of order in foundation: F:"+t+" C:"+a+" CardID:"+r),!1;if(e.cards[r].suit===i)return c5.f2("Suit mismatch in foundation: F:"+t+" C:"+a+" CardID:"+r+" colSuit:"+i),!1}}return!0}c5.f2("Calling isGameOver on a game that isn't playing:"+e.status)}static f39(e){if(!c0.f6(e.board.stock))return!1;var t=e.board.waste;if(c0.f14(t)>1)return!1;for(var i=0;i<c10.v7;i++)for(var a=e.board.tableau[i],r=0;r<a.length;r++){var n=a[r],o=e.cards[n];if(c2.f2(o))return!1}return!0}static f40(e){var t=e.cards,i=e.board.stock,a=e.board.tableau,r=e.board.waste,n=e.board.foundation;if(c0.f6(t))return c5.f2("c10.f40() CARDS LIST MISSING"),!1;if(t.length!=c10.v5)return c5.f2("c10.f40() CARD LIST IS WRONG SIZE"),!1;for(var o=0;o<c10.v5;o++){if(!(l=t[o]))return void c5.f2("c10.f40() CARD OBJECT MISSING AT IDX :"+o)}var s=[];for(o=0;o<c10.v5;o++)s.push(!1);for(var d=0;d<i.length;d++){var l=t[i[d]];if(s[i[d]]=!0,c2.f3(l))return c5.f2("c10.f40() CARD IS FACING UP IN STOCK :"+o),!1}for(var u=0;u<r.length;u++){l=t[r[u]];if(s[r[u]]=!0,c2.f2(l))return c5.f2("c10.f40() CARD IS FACING DOWN IN WASTE :"+o),!1}for(var c=0;c<c10.v6;c++){var U;c0.f6(n[c])||(U=t[n[c][0]].suit);for(o=0;o<n[c].length;o++){l=t[n[c][o]];if(s[n[c][o]]=!0,c2.f2(l))return c5.f2("c10.f40() CARD IS FACING DOWN IN FOUNDATION :"+c),!1;if(l.suit!=U)return c5.f2("c10.f40() SUIT MISMATCH IN FOUNDATION :"+c),!1;
5if(l.rank!=c2.v0.Ace+o)return c5.f2("c10.f40() RANKS OUT OF ORDER IN FOUNDATION :"+c),!1}}for(var f=0;f<c10.v7;f++){var g=!1,I=void 0;for(o=0;o<a[f].length;o++){l=t[a[f][o]];if(s[a[f][o]]=!0,c2.f3(l))g=!0;else if(g)return c5.f2("c10.f40() CARD IS DOWN AFTER AN UP CARD IN TABLEAU :"+f),!1;if(g&&I){if(!c2.f9(l,I))return c5.f2("c10.f40() TABLEAU CARDS NOT ALTERNATING COLORS :"+f),!1;if(I.rank!=l.rank+1)return c5.f2("c10.f40() TABLEAU CARDS NOT IN RANK SEQUENCE :"+f),!1;I=l}else g&&(I=l)}}for(o=0;o<c10.v5;o++)if(!s[o])return c5.f2("c10.f40() LOST A CARD FROM BOARD ID :"+o),!1;return!0}static f41(e){return JSON.stringify(e)}static f42(e){return JSON.parse(e)}}c10.v0="flip_1",c10.v1="flip_3",c10.v2="game_over",c10.v3="init",c10.v4="playing",c10.v5=52,c10.v6=4,c10.v7=7,c10.v8=19,c10.v9="|",c10.v10="-",c10.v11="##",c10.v12="f",c10.v13="t",c10.v14="w",c10.v15="s",c10.v16="r",c10.v17="u",c10.v18="a",c10.v19={status:"init",cards:[],board:{stock:[],waste:[],foundation:[[],[],[],[]],tableau:[[],[],[],[],[],[],[]]},config:{mode:"flip_1"},moves:[],history:[],time:0},c10.v20=[[12,24,10,22,8,20,6,18,4,16,2,14,0],[25,11,23,9,21,7,19,5,17,3,15,1,13],[38,50,36,48,34,46,32,44,30,42,28,40,26],[37,49,35,47,33,45,31,43,29,41,27,39],[],[],[]],c10.v21=[51];const{createStore:createStore,combineReducers:combineReducers}=Redux;class c11{static f0(){c5.f1("c11.f0()...."),c11.v0=combineReducers({gameState:c11.f2});let e={gameState:c10.f0()};c11.v1=createStore(c11.v0,e)}static f1(){return c11.v1.getState().gameState}static f2(e,t){let i=e;return i&&t&&t.type&&(t.type===c11.v7?c0.f6(i.history)||(i=c10.f24(i)):(i=c11.f5(i,t),i=c11.f6(i,t),i=c11.f7(i,t))),c11.v2=t,void 0!=i?i:c10.v19}static f3(e){c11.v1.dispatch(e)}static f4(e){c11.v1.subscribe(e),e()}static f5(e,t){switch(t.type){case c11.v3:var i=t.payload.mode;e=c10.f0(i);break;case c11.v4:e.status=c10.v4;break;case c11.v5:var a=t.payload.move;c10.f21(e,a);break;case c11.v7:}return e}static f6(e,t){if(t.type===c11.v5){var i=t.payload.move;e.moves.push(i)}return e}static f7(e,t){return t.type===c11.v6&&(e.time+=t.payload.deltaTime),e}static f8(e,t=c11.v8){return{type:c11.v5,payload:{move:e,agent:t}}}static f9(e){return{type:c11.v3,payload:{mode:e}}}static f10(){return{type:c11.v4}}static f11(){return{type:c11.v7}}static f12(e){return{type:c11.v6,payload:{deltaTime:e}}}}c11.v0,c11.v1,c11.v2,c11.v3="NEW_GAME",c11.v4="START_GAME",c11.v5="MOVE",c11.v6="UPDATE_TIME",c11.v7="UNDO",c11.v8="USER",c11.v9="AI";class c12{static f0(e={}){var t=document.getElementById(c12.v3);c6.f0(t,c12.f14(),c12.f15()),c4.f0(t);var i=!0;Object.keys(e).includes("card_faces")&&(i="true"===e.card_faces),c3.f0(i),c12.f5(),c12.f6(),c12.f10(),c12.f11(),c12.f7(),c12.f1(),c5.f1("Init");var a=c12.f12();c12.f13(a),c12.f2(),c6.f1(c6.v14,c12.f24),c11.f4(c12.f41)}static f1(){c4.f1(c4.v16,c12.f44),c4.f1(c4.v18,c12.f49),c4.f1(c4.v17,c12.f46),c4.f1(c4.v19,c12.f50),c4.f1(c4.v14,c12.f9),c4.f1(c4.v20,c12.f48)}static f2(){c7.f1(c12.v16),c7.f1(c12.v8)}static f3(e){c12.v35.push(e)}static f4(e){c12.v36=e}static f5(){c6.f29("background",1),c6.f29("target",1),c6.f29("foundation",c2.v7),c6.f29("tableau",c10.v7+c10.v5),c6.f29("stock",c12.v29),c6.f29("waste",c12.v29),c6.f29("dragging",c12.v30),c6.f29("dialog",10)}static f6(){c6.f44("stock","move"),c6.f44("waste","move"),c6.f44("tableau","move"),c6.f44("foundation","move"),c6.f44("dragging","move"),c6.f45("dragging","move",""),c6.f45("stock","move","move_animation_immediate"),c6.f45("waste","move","move_animation_immediate"),c6.f45("tableau","move","move_animation_immediate"),c6.f45("foundation","move","move_animation_immediate")}static f7(){c12.v2=setInterval(function(){if(document.hasFocus()&&c11.f1().status==c10.v4){var t=c11.f12(1);c11.f3(t)}},1e3)}static f8(){if(c5.f1("c12.f8()"),c11.f1().status!=c10.v4){c5.f1("Dispatching Action to start game");var t=c11.f10();c11.f3(t)}}static f9(){var e=c11.f1();if(e.status===c10.v3){var t=c11.f10();c11.f3(t)}if(e.status===c10.v2){var i=e.config.mode,a=c11.f9(i);c11.f3(a)}}static f10(){var t=c11.f1().cards;if(document.getElementById(c12.v3))for(var a=0;a<t.length;a++){var r=c3.f3(a,t[a],"card_back_gradient_blue");c3.f5(t[a],r),r.setAttribute("card_id",a),document.getElementById(c12.v3).appendChild(r),c6.f19(r)}
5else c5.f2("c12.f10 CAN'T FIND ROOT NODE: ")}static f11(){c11.f1();var t=document.getElementById(c12.v3);if(t){for(var i=0;i<c10.v6;i++){(a=c6.f52(c12.v11+i,"#foundation_target",c3.v11,c3.v10)).classList.add("target_div"),c6.f22(a,c3.v12),a.setAttribute("move_location",c10.f9(i));var r=c12.f21(i);c6.f21(a,r.left,r.top),c6.f23(a,c3.v11,c3.v10),c6.f32(a,"target",0),c6.f19(a),t.appendChild(a)}for(var n=0;n<c10.v7;n++){r=c12.f17(n);(a=c6.f52(c12.v12+n,"#tableau_target",c3.v11,c3.v10)).style.width=c6.f8()*c3.v11+"px",a.style.height=c6.f8()*c3.v10+"px",a.classList.add("target_div"),c6.f22(a,c3.v12),a.setAttribute("move_location",c10.f11(n)),c6.f21(a,r.left,r.top),c6.f23(a,c3.v11,c3.v10),c6.f32(a,"tableau",0),c6.f19(a),t.appendChild(a)}var a;(a=c6.f52(c12.v13,"#stock_target_refresh",c3.v11,c3.v10)).style.width=c6.f8()*c3.v11+"px",a.style.height=c6.f8()*c3.v10+"px",a.classList.add("target_div"),a.setAttribute("move_location",c10.f7()),a.classList.toggle("clickable",!0);r=c12.f32();c6.f21(a,r.left,r.top),c6.f23(a,c3.v11,c3.v10),c6.f32(a,"target",0),c6.f19(a),t.appendChild(a)}else c5.f2("c12.f11 CAN'T FIND ROOT NODE: ")}static f12(){var e=document.getElementById(c12.v14);if(e){c11.f1();e.classList.toggle("clickable",!0),e.setAttribute("move_location",c10.f6()),c12.f26()}}static f13(){var e=document.getElementById(c12.v15);if(e){c11.f1();e.classList.toggle("clickable",!0),e.setAttribute("move_location",c12.v17),c12.f25()}}static f14(){return c12.v18+c10.v7*c3.v11+(c10.v7-1)*c12.v20+c12.v18}static f15(){return c12.v18+c3.v10+c12.v21+c3.v10+(c12.v31-1)*c12.v22+c12.v18}static f16(){return c12.f14()/c12.f15()}static f17(e){return{left:c12.v18+e*c3.v11+e*c12.v20,top:c12.v18+c3.v10+c12.v21}}static f18(e,t){for(var i=e.board.tableau[t],a=e.cards,r=0,n=0;n<i.length;n++)if(n>0){var o=a[i[n-1]];r+=c2.f3(o)?c12.v22:.5*c12.v22}return c0.f6(i)||(r+=c3.v10),r}static f19(e,t){var i=c6.f8(),r=i*c12.f17(e).top+i*t,n=c6.f14();return r<=(n-=c12.v18*i)?0:r-n}static f20(e){for(var t=e.cards,i=c10.v7,a=e.board.tableau,r=0;r<a.length;r++){var n=c12.f17(r);i=2;for(var o=a[r].length,l=1,d=0;d<a[r].length;d++)c2.f3(t[a[r][d]])?1:.5;o=c12.f18(e,r);var u=c12.f19(r,o);if(u>0)l=1-u/c6.f8()/o;var U=0;if(l<1)U=(c3.v11-c3.v11*l)/2;document.getElementById(c12.v12+r).style.visibility=l<1?"hidden":"visible";for(var I=0,A=0;A<a[r].length;A++){var v=a[r][A],_=document.getElementById(c3.v1+v);if(_.classList.toggle("clickable",!1),_.setAttribute("move_location",c10.f11(r,A)),c6.f48(_,"tableau","move"),c6.f51(_),A>0){var p=t[a[r][A-1]];I+=(c2.f3(p)?c12.v22:.5*c12.v22)*l}c6.f21(_,n.left+U,n.top+I),c6.f23(_,c3.v11*l,c3.v10*l),c3.f5(t[v],_),c2.f3(t[v])&&(_.classList.toggle("draggable",!0),_.classList.toggle("tappable",!0)),c6.f32(_,"tableau",i++)}}}static f21(e){return{left:c12.v18+e*c3.v11+e*c12.v20,top:c12.v18}}static f22(e,t){var i=e.cards,r=(e.board.foundation,c2.v0.King+1);if(t)for(var n=0;n<t.length;n++)if(t[n]!==c2.v9){var l=i[t[n]];l.rank<r&&(r=l.rank)}else r=0;return r}static f23(){c7.f4(c12.v16)}static f24(){var e=c12.f26();c12.f25(e)}static f25(e=!1){var t=document.getElementById(c12.v15),i=c11.f1(),a=t.offsetWidth,r=t.offsetHeight;c6.f32(t,"dialog",0);var n=document.getElementById(c12.v3),o=document.getElementsByClassName("btn-group")[0],l=n.offsetWidth/2-a/2,s=o.offsetTop-r-c12.v27-n.offsetTop;t.style.top=s+"px",t.style.left=l+"px";var d=i.history.length<=2&&!e?"visible":"hidden";return t.style.visibility=d,d}static f26(e=!1){var t=document.getElementById(c12.v14),i=c11.f1(),a=t.offsetWidth,r=t.offsetHeight;c6.f32(t,"dialog",0);var n=document.getElementById(c12.v3),o=document.getElementsByClassName("btn-group")[0],l=n.offsetWidth/2-a/2,s=o.offsetTop-r-c12.v26-n.offsetTop;t.style.top=s+"px",t.style.left=l+"px";var d=i.status!=c10.v2&&c10.f39(i)&&!e;return t.style.visibility=d?"visible":"hidden",d}static f27(){for(var e=0;e<c10.v5;e++){var t=document.getElementById(c3.v1+e);c6.f51(t)}c12.v34=0}static f28(e,t){if(t){for(var i=0,a=e.cards,r=0;r<c2.v7;r++)for(var n=0;n<c10.v6;n++){var l=e.board.foundation[n][r],s=a[l],d=t[n],u=-1!=d?a[d].rank:0;if(s.rank>u){var c=document.getElementById(c3.v1+l);c6.f50(c,c12.v28*i),i++}}c12.v34=c12.v28*i}}static f29(e,t){var i=e.cards,a=e.board.foundation;t?c12.f28(e,t):c12.f27();for(var r=0;r<a.length;r++)for(var n=c12.f21(r),o=0;o<a[r].length;o++){var l=a[r][o],d=(i[l],document.getElementById(c3.v1+l));d.classList.toggle("clickable",!1),c6.f32(d,"foundation",o+1),d.setAttribute("move_location",c10.f9(r)),c6.f48(d,"foundation","move"),c6.f21(d,n.left,n.top),c6.f23(d,c3.v11,c3.v10),c3.f5(i[l],d),o===a[r].length-1&&(
5d.classList.toggle("draggable",!0),d.classList.toggle("tappable",!0))}}static f30(){return{left:c12.v18+5*c3.v11+5*c12.v20-2*c12.v23,top:c12.v18}}static f31(e){for(var t=e.cards,i=c12.f30(),a=e.board.waste,r=0;r<a.length;r++){var n=a[r],o=document.getElementById(c3.v1+n);o.classList.toggle("clickable",!1);var l=0;e.config.mode===c10.v1?r===a.length-1?l=2*c12.v23:r===a.length-2&&(l=1*c12.v23):l=2*c12.v23,c3.f7(o,e.status===c10.v4),c6.f32(o,"waste",r),c6.f51(o),c6.f48(o,"waste","move"),c6.f21(o,i.left+l,i.top),c6.f23(o,c3.v11,c3.v10),c3.f5(t[n],o),o.setAttribute("move_location",c10.f12()),r===a.length-1&&(o.classList.toggle("draggable",!0),o.classList.toggle("tappable",!0))}}static f32(){return{left:c12.v18+6*c3.v11+6*c12.v20,top:c12.v18}}static f33(e){var t=e.cards,i=c12.f32();document.getElementById(c12.v13).classList.toggle("clickable",!0);for(var r=e.board.stock,n=0;n<r.length;n++){var o=r[n],l=document.getElementById(c3.v1+o);l.classList.toggle("clickable",!1),c6.f21(l,i.left,i.top),c6.f23(l,c3.v11,c3.v10),c6.f32(l,"stock",n+1),c3.f5(t[o],l),l.setAttribute("move_location",c10.v15),c6.f48(l,"stock","move"),c6.f51(l),n===r.length-1&&l.classList.toggle("clickable",!0)}}static f34(e,t){return!e||(e.status!=t.status||!c0.f8(e.board.stock,t.board.stock))}static f35(e,t){return!e||(e.status!=t.status||!c0.f8(e.board.waste,t.board.waste))}static f36(e,t){return!e||(e.status!=t.status||!c0.f9(e.board.tableau,t.board.tableau))}static f37(e,t){return!e||(e.status!=t.status||!c0.f9(e.board.foundation,t.board.foundation))}static f38(e){var t=c11.v2;if(e.status==c10.v4&&t||(c6.f45("stock","move","move_animation_immediate"),c6.f45("waste","move","move_animation_immediate"),c6.f45("tableau","move","move_animation_immediate"),c6.f45("foundation","move","move_animation_immediate")),t.type===c11.v7&&(c6.f45("stock","move","move_animation_z_end"),c6.f45("waste","move","move_animation_z_start"),c6.f45("tableau","move","move_animation_z_start"),c6.f45("foundation","move","move_animation_z_start")),t.type===c11.v5){var i=t.payload&&t.payload.move&&t.payload.move.startsWith(c10.v16),a=t.payload&&t.payload.move&&t.payload.move.startsWith(c10.v18);c6.f45("stock","move",i?"move_animation_z_end":"move_animation_z_start"),c6.f45("waste","move","move_animation_z_start"),c6.f45("tableau","move",c12.v37?"move_animation_z_end":"move_animation_snap"),c6.f45("foundation","move",a?"move_animation_all_z_end":"move_animation_snap")}}static f39(e){e=c11.f1();for(var t=0;t<c10.v5;t++){var i=document.getElementById(c3.v1+t),a=t,r=e.cards[t];c2.f3(r)?c0.f5(e.board.waste,a)?i.classList.toggle("draggable",c0.f2(e.board.waste)===a):(i.classList.toggle("draggable",!0),i.classList.toggle("tappable",!0)):(i.classList.toggle("draggable",!1),i.classList.toggle("tappable",!1)),c3.f7(i,e.status===c10.v4)}}static f40(e,t){for(var i=0;i<c12.v35.length;i++)c12.v35[i](e,t)}static f41(){var e=c11.f1(),t=c11.v2;t&&t.type===c11.v3&&c12.v36&&c12.v36(),c12.f38(e),c12.f39(e);var i=!1;if(c12.f34(c12.v1,e)&&(i=!0,c12.f33(e)),c12.f35(c12.v1,e)&&(i=!0,c12.f31(e)),c12.f36(c12.v1,e)&&(i=!0,c12.f20(e)),c12.f37(c12.v1,e))if(i=!0,t&&t.type===c11.v5&&t.payload.move.startsWith(c10.v18)){for(var r=t.payload.move.split(c10.v9),n=[],o=0;o<c10.v6;o++){var l=parseInt(r[o+1]);n[o]=l}c5.f1("Calling layoutFoundation with snapshot"),c12.f29(e,n)}else c12.f29(e);if(i){c5.f1("Game State Updated");var s=c12.f26();c12.f25(s)}var d=e.moves.length,u=document.getElementById("moves"),c=""+d;u&&c6.f53(u,c);var U=e.time,f=c8.f0(U),g=document.getElementById("time"),I=(f.h>0?f.h+":":"")+f.m+":"+(f.s<10?"0":"")+f.s;g&&c6.f53(g,I);var A=e.history.length,v=document.getElementById("undos_left"),_=""+A;if(v&&c6.f53(v,_),e.status===c10.v2){c5.f1("Delay for game over:"+c12.v34);var m=c12.v33+1e3*c12.v34;setTimeout(function(){c12.f43(c,I),c12.f40(c,I),c12.f27()},m)}c12.v1=JSON.parse(JSON.stringify(e))}static f42(){var e=c11.f1(),t=c11.f9(e.config.mode);c11.f3(t)}static f43(e,t){document.getElementById(c12.v9).innerText=e,document.getElementById(c12.v10).innerText=t,c7.f4(c12.v8,c12.f42)}static f44(e){var t=e.getAttribute("card_id"),i=c11.f1(),a=e.getAttribute("move_location");if(c12.v0=a,a.startsWith(c10.v13)&&-1!=a.indexOf(c10.v10))for(var r=a.charAt(1),l=0,s=a.split(c10.v10)[1];s<i.board.tableau[r].length;s++){t=i.board.tableau[r][s],e=document.getElementById(c3.v1+t);c6.f23(e,c3.v11,c3.v10),c4.f8(e,l),l+=1}else c6.f23(e,c3.v11,c3.v10),c4.f8(e);switch(a.charAt(0)){case c10.v14:var d=c10.f18(i);c12.f45(i,d);break;case c10.v13:d=c10.f19(i,a);c12.f45(i,d);break;case c10.v12:d=c10.f20(i,a);c12.f45(i,d);break;default:c5.f2("Dragging from a non valid location :"+a)}}static f45(e,t){if(!c0.f6(t))for(var i=0;i<t.length;i++){var a=t[i].split(c10.v9)[1],r=c10.f36(e,a);if(r!=c2.v9){var n=document.getElementById(c3.v1+r);c4.f9(n)}else if(a.charAt(0)==c10.v12){var o=parseInt(a.charAt(1)),l=document.getElementById(c12.v11+o);c4.f9(l)}else if(a.charAt(0)==c10.v13){var s=parseInt(a.charAt(1));l=document.getElementById(c12.v12+s);c4.f9(l)}}}static f46(e){if(c5.f1("Handle Drop"),c12.v0){var t=c12.v0,i=e.getAttribute("move_location");if(c10.f22(c12.v0,i))c12.f50();else{var a=t+c10.v9+i,r=c11.f1();if(c10.f37(r,a)){var n;switch(i.charAt(0)){case c10.v12:n="foundation";break;case c10.v13:n="tableau"}c6.f45(n,"move","move_animation_snap");var o=c11.f8(a);c11.f3(o),c12.v0=void 0,c6.f43("droppable")}else c12.f50()}}}static f47(e){for(var t=c11.f1(),i=c10.f33(t),a=0;a<i.length;a++)e=e+c10.v9+i[a];return e}static f48(e){var a,t=c11.f1(),i=e.getAttribute("move_location");switch(c5.f1("Location:"+i),i.charAt(0)){case c10.v14:a=c10.f18(t);break;case c10.v13:a=c10.f19(t,i);break;default:return}
5if(c0.f6(a))c5.f1("No Moves for this tap");else{for(var o,r=[],n=0;n<a.length;n++)c10.f37(t,a[n])&&r.push(a[n]);o=r[0].includes(c10.v12)?r[0]:c0.f4(r),c12.v37=!0;var l=c11.f8(o);c11.f3(l)}}static f49(e){var t=c11.f1(),i=e.getAttribute("move_location");if(c5.f1(i),i!==c12.v17){if(i!==c10.v16||!c0.f6(t.board.waste)){i.startsWith(c10.v18)&&(i=c12.f47(i));var a=c11.f8(i);c11.f3(a)}}else c12.f23()}static f50(){if(c12.v0){var e=c12.v0,t=c11.f1();switch(e.charAt(0)){case c10.v12:c6.f45("foundation","move","move_animation_z_end"),c12.f29(t);break;case c10.v13:c6.f45("tableau","move","move_animation_z_end"),c12.f20(t);break;case c10.v14:c6.f45("waste","move","move_animation_z_end"),c12.f31(t);break;case c10.v15:c6.f45("stock","move","move_animation_z_end"),c12.f33(t)}}c12.v0=""}}c12.v0="",c12.v1,c12.v2,c12.v3="klondike_div",c12.v4="klondike_foundation",c12.v5="klondike_waste",c12.v6="klondike_stock",c12.v7="klondike_tableau",c12.v8="game_over_div",c12.v9="game_over_moves",c12.v10="game_over_time",c12.v11="foundation_target_",c12.v12="tableau_target_",c12.v13="stock_target",c12.v14="auto_move",c12.v15="help_button",c12.v16="help_div",c12.v17="help",c12.v18=10,c12.v20=2,c12.v21=10,c12.v22=33,c12.v23=33,c12.v24=9,c12.v25=.05,c12.v26=5,c12.v27=5,c12.v28=.08,c12.v29=24,c12.v30=c2.v7,c12.v31=8,c12.v33=750,c12.v34=0,c12.v35=[],c12.v36,c12.v37=!1;var _newGameCallback,_analyticsHandler=void 0,_lang=void 0;function registerAnalyticsHandler(e){_analyticsHandler=e}function analyticsEvent(e,t,i,a){console.log("Analytics: Category="+e+" Action="+t+" Label="+i+" Value="+a),_analyticsHandler&&_analyticsHandler(e,t,i,a)}var lastTouchEnd=0;function addNewGameCallback(e){_newGameCallback=e}function addGameOverCallback(e){c12.f3(e)}function newGameStarted(){stopConfetti(),_newGameCallback&&_newGameCallback()}function gameOver(e,t){analyticsEvent("game","end-game","Win"),analyticsEvent("game","end-game-moves","Number of Moves",parseInt(e)),analyticsEvent("game","end-game-time","Length of Game",c8.f1(t)),showConfetti()}function registerDialog(e){c7.f1(e)}function showDialog(e,t){c7.f4(e,t)}function gameStateUpdated(){c11.f1()}function startGame(e={}){c11.f0(),c12.f0(e),c12.f8(),c11.f4(gameStateUpdated),addGameOverCallback(gameOver),c12.f4(newGameStarted),document.addEventListener("touchend",function(e){var t=(new Date).getTime();t-lastTouchEnd<=300&&e.preventDefault(),lastTouchEnd=t},!1);for(var t=function(e){e.preventDefault,e.target.classList.remove("animate"),e.target.classList.add("animate"),setTimeout(function(){e.target.classList.remove("animate")},700)},i=document.getElementsByClassName("btn"),a=0;a<i.length;a++)i[a].addEventListener("click",t,!1);window.onclick=function(e){if(!e.target.matches(".dropbtn")){var i,t=document.getElementsByClassName("dropup-content");for(i=0;i<t.length;i++){var a=t[i];a.classList.contains("show")&&a.classList.remove("show")}}}}var _startReported=!1;function newGameSameMode(){var e=c11.f1();newGame(e?e.config.mode:c10.v0)}function newGame(e){analyticsEvent("game","new-game","mode="+e);var t=c11.f9(e);c11.f3(t)}function newGameDraw1(){newGame(c10.v0)}function newGameDraw3(){newGame(c10.v1)}function toggleDropUp(){document.getElementById("optionsDropup").classList.toggle("show")}function showHelpDialog(){c12.f23()}function undo(){var t=c11.f1().history.length;if(!(t<=0)){analyticsEvent("game","undo","Undo Clicked",t);var i=c11.f11();c11.f3(i)}}function select_language(e,t=!0){var i=0;_lang=e;var a=e.substr(0,2);a=a.toLowerCase();for(var r=document.querySelectorAll(".lang"),n=0;n<r.length;n++){var o=r[n];o.getAttribute("lang")===a?o.style.display="":(i++,o.style.display="none")}i>=r.length&&t&&select_language("en-US",!1)}document.addEventListener("mousedown",function(e){_startReported||(analyticsEvent("game","start-play","lang="+_lang),analyticsEvent("game","new-game","mode="+c11.f1().config.mode),_startReported=!0)});

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.