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 Vawlt LLC https://www.vawlt.com 4// ** All rights reserved. 5class C0{static f0(t){return t?t.length-1:-1}static f1(t,e){for(var i=0;i<t.length;i++)if(t[i]==e)return i;return-1}static f2(t){return t?t[C0.f0(t)]:void 0}static f3(t){return t?t[0]:void 0}static f4(t){if(t)return t[Math.floor(Math.random()*t.length)]}static f5(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return!0;return!1}static f6(t){return!!t&&0===t.length}static f7(t){if(!array)return!0;for(var e=0;e<array.length;e++)if(!t.isEmtpy(array[e]))return!1;return!0}static f8(t,e){if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if(t.length!==e.length)return!1;for(var i=t.length;i--;)if(t[i]!==e[i])return!1;return!0}static f9(t,e){if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;for(var i=0;i<t.length;i++)if(!C0.f8(t[i],e[i]))return!1;return!0}static f10(t,e){for(var i=0;i<t.length;i++)e.push(t[i])}static f11(t,e){for(var i=0;i<t.length;i++)t[i]=e}static f12(t,e,i,a){for(var r=i;r<t.length;r+=a)t[r]=e}static f13(t){t.length=0}static f14(t){return t.length}}class C2{static f0(t,e,i){return{rank:t,suit:e,facing:i}}static f1(t){if(!t||t.length<1)C6.f2("C2.f1 undefined or empty cards list");else for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1)),a=t[e];t[e]=t[i],t[i]=a}}static f2(t){return t.facing===C2.v6.Down}static f3(t){return t.facing===C2.v6.Up}static f4(t){t.facing=C2.v6.Down}static f5(t){t.facing=C2.v6.Up}static f6(t){C2.f2(t)?C2.f5(t):C2.f4(t)}static f7(t){return t.suit===C2.v5.Hearts||t.suit===C2.v5.Diamonds}static f8(t){return t.suit===C2.v5.Spades||t.suit===C2.v5.Clubs}static f9(t,e){return C2.f7(t)?C2.f8(e):C2.f7(e)}static f10(t){return C2.v1[t.rank]}static f11(t){return C2.v2[t.rank]}static f12(t){return C2.v3[t.suit]}static f13(t){return C2.v4[t.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(t=!0){C3.v10=parseInt(C7.f33("--card-height")),C3.v11=parseInt(C7.f33("--card-width")),C3.v12=parseInt(C7.f33("--card-border-radius")),C3.v13=t,C3.f1()}static f1(){var t=C7.f33("--cards-url","../common/img/cards.svg");if(C6.f1("Loading Cards at URL:"+t),!C1.f1())return(e=new XMLHttpRequest).open("GET",t,!0),e.send(),void(e.onload=function(t){var i=document.createElement("div");i.classList.add("hidden"),i.innerHTML=e.responseText,document.body.insertBefore(i,document.body.childNodes[0])});var i=C7.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 e;(e=new XMLHttpRequest).open("GET",t,!0),e.send(),e.onload=function(a){if(e.status>=400||e.status<200)C6.f2("Can't find cards svg. url :"+t+" status: "+e.status);else{var r=document.createElement("div");r.classList.add("hidden"),r.innerHTML=e.responseText,document.body.insertBefore(r,document.body.childNodes[0]),localStorage.setItem(i,e.responseText)}}}}static f2(t){var e="#"+C2.f11(t).toLowerCase();return t.rank!=C2.v0.Joker&&(e+="_"+C2.f13(t).toLowerCase()),t.rank>=C2.v0.Jack&&t.rank<=C2.v0.King&&(e+=C3.v13?"":"_no_face"),e}static f3(t,e,i="card_back"){var a=document.createElement("div");a.id=C3.v1+t,a.classList.add(C3.v0),C7.f23(a,C3.v11,C3.v10);var r=document.createElement("div");r.id=C3.v3+t,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+t,n.id=C3.v4+t;var d=C3.v11,c=C3.v10;l.setAttribute("viewBox","0 0 "+d+" "+c),n.setAttribute("viewBox","0 0 "+d+" "+c),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+i);var u=C3.f2(e);return o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u),l.appendChild(s),n.appendChild(o),r.appendChild(l),r.appendChild(n),r.classList.add(C3.v9),a.appendChild(r),C7.f22(a,C3.v12),a}static f4(t,e){var r=t.childNodes[0].childNodes[1].childNodes[0],n=C3.f2(e);r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n)}static f5(t,e){var i=e.getElementsByClassName(C3.v2)[0],a=C2.f3(t);i.classList.toggle("face_up",a),i.classList.toggle("face_down",!a)}static f6(t,e){t.classList.toggle(C3.v8,e)}static f7(t,e){t.getElementsByClassName(C3.v2)[0].classList.toggle(C3.v9,e)}static f8(t,e){t.getElementsByClassName(C3.v2)[0].style.transitionDelay=e+"s"}static f9(t){t.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.v12=9,C3.v13=!0;class C5{static f0(){}static f1(t){var e=document.getElementById(t);e?C5.v4.push(e):C6.f2("Can't find dialog id: "+t)}static f2(t){for(var e=0;e<C5.v5.length;e++){var i=C5.v5[e];if(i.id===t)return i.config}return C5.v6}static f3(){if(!C5.v3){var t=document.createElement("div");t.id=C5.v1,t.classList.add("dialog_curtain"),C7.f32(t,"dialog",0),t.onclick=C5.f7,document.body.appendChild(t),C5.v3=t}}static f4(t,e){var i=document.getElementById(t);i?(C5.v3||C5.f3(),C5.v2=e,i.onclick=C5.f7,C7.f32(i,"dialog",1),C7.f37(C5.v3),C5.f5(i),C5.v0=Date.now(),C6.f1("DialogUtil visibility:"+i.style.visibility),"visible"!=i.style.visibility&&(C6.f1("DialogUtil Make Visible"),C7.f37(i))):C6.f2("DialogUtil. Can't find dialog id: "+t)}static f5(t){var e=t.offsetHeight,a=document.body.offsetHeight-e;t.style.top=a/4+"px"}static f6(){for(var t=0;t<C5.v4.length;t++){C6.f1("Closing Dialog ii: "+t);var e=C5.v4[t];C7.f36(e),C6.f1("Visibility:"+e.style.visibility)}C5.v3&&C7.f36(C5.v3),C5.v2&&C5.v2()}static f7(){C6.f1("C5.f7"),Date.now()-C5.v0<C5.v7||C5.f6()}}C5.v0=0,C5.v1="dialog_util_curtain",C5.v2,C5.v3=void 0,C5.v4=[],C5.v5=[],C5.v6={delayShow:0},C5.v7=250;class C4{static f0(t){t.addEventListener("mousedown",C4.f5),t.addEventListener("mousemove",C4.f10),t.addEventListener("mouseup",C4.f14),t.addEventListener("mouseleave",C4.f17),t.addEventListener("touchstart",C4.f18,!0),t.addEventListener("touchmove",C4.f19,!0),t.addEventListener("touchend",C4.f20,!0),t.addEventListener("touchleave",C4.f21,!0),t.addEventListener("touchcancel",C4.f22,!0),C4.v8=t,C4.v27=JSON.parse(C7.f33("--prevent-defaults","false"))}static f1(t,e){C4.v9[t]=e}static f2(t){for(;!t.classList.contains("draggable");)if(null===(t=t.parentElement))return!1;return!0}static f3(t){for(;!t.classList.contains("clickable");)if(null===(t=t.parentElement))return!1;return!0}static f4(t){for(;!t.classList.contains("tappable");)if(null===(t=t.parentElement))return!1;return!0}static f5(t){if(!(Date.now()-C4.v13<C4.v26)){C4.v13=Date.now();var e=t.touches?t.touches[0].target:t.target;if(e&&e.classList.contains("pass_thru"))C6.f1("C4.f5 TargetElement requesting pass thru");else{var i=document.hasFocus();C4.v9[C4.v14]&&C4.v9[C4.v14]();
5var a=C4.f3(e),r=C4.f2(e);a?(C4.f6(t.touches?t.touches[0]:t),i&&t.preventDefault()):r&&(C4.f7(t.touches?t.touches[0]:t),i&&t.preventDefault())}}}static f6(t){for(var e=t.target;!e.classList.contains("clickable");)if(null===(e=e.parentElement))return C6.f2("C4.f6 called on non clickable"),!1;C4.v9[C4.v18]&&C4.v9[C4.v18](e)}static f7(t){for(var e=t.target;!e.classList.contains("draggable");)if(null===(e=e.parentElement))return void C6.f2("C4.f7 called on a non draggalbe");C4.v0=!0,C4.v3||(C6.f1("Start Drag Location"),C4.v3={x:0,y:0},C4.v3.x=parseFloat(t.clientX),C4.v3.y=parseFloat(t.clientY)),C4.v4||(C6.f1("Start Drag Time"),C4.v4=Date.now()),C4.v9[C4.v16]&&C4.v9[C4.v16](e)}static f8(t,e=0){C4.v5.push(t),C7.f51(t),C7.f48(t,"dragging","move"),C7.f32(t,"dragging",e);var i={x:0,y:0};i.x=C4.v3.x-parseFloat(t.style.left),i.y=C4.v3.y-parseFloat(t.style.top),C4.v6.push(i)}static f9(t){t.classList.toggle("droppable",!0),C4.v7.push(t)}static f10(t){if(C4.v0){C4.f4(C4.f15());C4.f11(t)>=C4.v25&&C4.f12(t),t.preventDefault()}C4.v27&&t.preventDefault()}static f11(t){if(!C4.v3)return 0;t.touches&&(t=t.touches[0]);var e={x:parseFloat(t.clientX),y:parseFloat(t.clientY)};return C7.f42(C4.v3,e)}static f12(t){if(C4.v0){t.touches&&(t=t.touches[0]);for(var e=0;e<C4.v5.length;e++){var i=C4.v5[e],a=C4.v6[e],r=t.clientX-a.x,n=t.clientY-a.y;C7.f24(i,r,n)}for(i=C4.v5[0],e=0;e<C4.v7.length;e++){var o=C4.v7[e];o.classList.toggle("droppable_hover",C7.f38(i,o))}}}static f13(t,e){if(!C4.v3)return C6.f2("isTap called with a drag start"),!1;C6.f1("isTap");var i=C7.f42(e,C4.v3);if(C6.f1(i),i>C4.v24)return!1;var a=Date.now()-C4.v4;return C6.f1(a),!(a>C4.v23)}static f14(t){if(C4.v9[C4.v15]&&C4.v9[C4.v15](),C4.v0){var e={x:(t=t.changedTouches?t.changedTouches[0]:t).clientX,y:t.clientY},i=C4.f15();if(C4.f4(i)&&C4.f13(t,e))return C6.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];C7.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=C7.f40(s,e);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(t=0){return C4.v5[t]}static f16(t){C4.v0=!1,C4.v5=[],C4.v6=[],C4.v3=void 0,C4.v4=void 0;for(var e=0;e<C4.v7.length;e++){C4.v7[e].classList.toggle("droppable_hover",!1)}C4.v7=[]}static f17(t){try{C4.f14(t)}catch(t){C6.f2("Error MouseLeave"),C6.f2(t)}}static f18(t){try{C4.f5(t)}catch(t){C6.f2("Error touchStart"),C6.f2(t)}}static f19(t){try{C4.f10(t),C4.v27&&t.preventDefault()}catch(t){C6.f2("Error touchMove"),C6.f2(t)}}static f20(t){try{C4.f14(t)}catch(t){C6.f2("Error touchEnd"),C6.f2(t)}}static f21(t){try{C4.f14(t)}catch(t){C6.f2("Error touchLeave"),C6.f2(t)}}static f22(t){try{C4.f14(t)}catch(t){C6.f2("Error touchCancel"),C6.f2(t)}}}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 C6{static f0(t){C6.f5(C6.v1.Debug,t)}static f1(t){C6.f5(C6.v1.Info,t)}static f2(t){C6.f5(C6.v1.Error,"ERROR:"),C6.f5(C6.v1.Error,t)}static f3(t){C6.f5(C6.v1.Critical,"CRITICAL:"),C6.f5(C6.v1.Critical,t)}static f4(){console.log("Muting Log...."),Log.level=C6.v1.Mute}static set level(t){C6.v3=t}static get level(){return C6.v3}static f5(t,e){t>=C6.v3&&console.log(e)}}C6.v1={Debug:0,Info:1,Error:2,Critical:3,Mute:4},C6.v3=C6.v1.Debug;class C7{static f0(t,e,i){C7.v6=t,C7.v45=C7.f33("--game-align",C7.v48),C7.f9(e,i),C7.f7(),window.onresize=C7.f3,window.onorientationchange=C7.f2}static f1(t,e){C7.v11[t]=e}static f2(){C7.v13||(C7.v13=!0,setTimeout(function(){C7.f3(),C7.v13=!1},C7.v56))}static f3(){C7.f7(),C7.f4(),C7.v11[C7.v14]&&C7.v11[C7.v14]()}static f4(){for(var t=0;t<C7.v5.length;t++){var e=C7.v5[t];if(e){var i=e.getAttribute(C7.v20),a=e.getAttribute(C7.v19),r=e.getAttribute(C7.v22),n=e.getAttribute(C7.v23),o=e.getAttribute(C7.v17),l=e.getAttribute(C7.v18);C7.f49(e,"move",!1),C7.f23(e,o,l),C7.f21(e,i,a,r,n),C7.f5(e)}}}static f5(t){var e=t.getAttribute(C7.v21);if(e){var a=parseInt(e)*C7.f8();t.style.borderRadius=a+"px"}}static f6(t){if(!C7.v6)throw C6.f2("C7.f6 no root eleement registered"),new Error("No root element specified");C7.v6.appendChild(t)}
5static f7(){var t=C7.f10(),e=C7.f11(),a=C7.f13(),r=C7.f14(),n=a/t,o=r/e;C7.v44=n<o?n:o;var l=a-t*C7.v44,s=r-e*C7.v44,d=C7.f33(C7.v46,C7.v49);switch(d){case C7.v48:C7.v7=l/2;break;case C7.v49:C7.v7=0;break;case C7.v50:C7.v7=l;break;default:if(d.startsWith(C7.v55)){var c=parseInt(d.substr(C7.v55.length));C7.v7=excess*(c/100)}}var u=C7.f33(C7.v47,C7.v51);switch(u){case C7.v48:C7.v8=parseInt(s/2);break;case C7.v51:C7.v8=0;break;case C7.v52:C7.v8=s;break;case C7.v53:C7.v8=parseInt(s/3);break;case C7.v54:C7.v8=parseInt(2*s/3);break;default:if(u.startsWith(C7.v55)){c=parseInt(u.substr(C7.v55.length));C7.v8=s*(c/100)}}}static f8(){return C7.v44}static f9(t,e){C6.f1("Set Canonical Size cwidth: "+t+" cheight: "+e),C7.v9=t,C7.v10=e}static f10(){return C7.v9}static f11(){return C7.v10}static f12(){return C7.f10()/C7.f11()}static f13(){return parseInt(C7.v6.clientWidth)}static f14(){return parseInt(C7.v6.clientHeight)}static f15(){return C7.f13()/C7.f14()}static f16(){return C7.v7}static f17(){return C7.v8}static f18(){var t=document.getElementById("em_div");return t?(t.style.height="1em",t.offsetHeight):-1}static f19(t){C7.v5.push(t)}static f21(t,e,i,a=0,r=0){t.style.position="absolute",t.setAttribute(C7.v20,e),t.setAttribute(C7.v19,i),t.setAttribute(C7.v22,a),t.setAttribute(C7.v23,r);var n=C7.f13(),o=C7.f14(),l=0,s=0;-1!=(""+e).indexOf("%")?(s=n*(parseFloat(e)/100),t.style.left=s+"px"):(e=parseFloat(e),s=C7.v7+C7.f8()*e,s+=parseInt(a),t.style.left=s+"px");if(-1!=(""+i).indexOf("%")){l=o*(parseFloat(i)/100);t.style.top=l+"px"}else i=parseFloat(i),l=C7.v8+C7.f8()*i,l+=parseInt(r),t.style.top=l+"px"}static f22(t,e){t.setAttribute(C7.v21,e);var i=e*C7.f8();t.style.borderRadius=i+"px"}static f23(t,e,i){t.style.position="absolute",t.setAttribute(C7.v17,e),t.setAttribute(C7.v18,i);var a=0,r=0;-1!=(""+e).indexOf("%")?t.style.width=e:(e=parseFloat(e),a=C7.f8()*e,t.style.width=a+"px"),-1!=(""+i).indexOf("%")?t.style.height=i:(i=parseFloat(i),r=C7.f8()*i,t.style.height=r+"px")}static f24(t,e,i){t.style.position="absolute",t.style.left=parseInt(e)+"px",t.style.top=parseInt(i)+"px"}static f25(t,e){var i=document.getElementById(t);i&&i.classList.add(e)}static f26(t,e){var i=document.getElementById(t);i&&i.classList.toggle(e,!0)}static f27(t,e){var i=document.getElementById(t);i&&i.classList.toggle(e,!1)}static f28(t){var e=C7.f34(t);if(!C0.f6(e))for(var i=0;i<e.length;i++)e[i].classList.toggle(t,!1)}static f29(t,e){var i=C0.f2(C7.v1),a=0;i&&(a=i.maxZ+1);var r=a+e;C7.v1.push({name:t,minZ:a,maxZ:r})}static f30(t){for(var e=0;e<C7.v1.length;e++){var i=C7.v1[e];if(i.name===t)return i.minZ}return C7.v0=-1}static f31(t){for(var e=0;e<C7.v1.length;e++){var i=C7.v1[e];if(i.name===t)return i.maxZ}return C7.v0=-1}static f32(t,e,i=0){var r=C7.f30(e)+i;t.style.zIndex=r}static f33(t,e=null){var i=getComputedStyle(document.body).getPropertyValue(t);return i?i.trim():e}static f34(t){return document.getElementsByClassName(t)}static f35(t,e){var i=!1,a_left=parseFloat(t.style.left),a_top=parseFloat(t.style.top),a_width=parseFloat(t.style.width),a_height=parseFloat(t.style.height);return e.x>=a_left&&e.x<=a_left+a_width&&e.y>=a_top&&e.y<=a_top+a_height&&(i=!0),i}static f36(t){C6.f1("UIUtil Make Hidden"),t.style.visibility="hidden"}static f37(t){t.style.visibility="visible"}static f38(t,e){var i={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)},a={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 C7.f39(i,a)}static f39(t,e){return t.left<=e.right&&e.left<=t.right&&t.top<=e.bottom&&e.top<=t.bottom}static f40(t,e){var i={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 C7.f41(i,e)}static f41(t,e){var i_x=t.left+(t.right-t.left)/2,i_y=t.top+(t.bottom-t.top)/2,a=e.x-i_x,r=e.y-i_y;return Math.abs(Math.sqrt(a*a+r*r))}static f42(t,e){var i=t.x-e.x,a=t.y-e.y;return Math.abs(Math.sqrt(i*i+a*a))}static f43(t){for(var e=C7.f34(t),i=0;i<e.length;i++)e[i].classList.toggle(t,!1)}static f44(t,e){C7.v4[t]||(C7.v4[t]=[]),C7.v4[t][e]=""}
5static f45(t,e,i){C7.v4[t][e]=i}static f46(t,e){C7.v4[t][e]=""}static f47(t,e){return C7.v4[t][e]}static f48(t,e,i){var a=C7.f47(e,i),r=t.getAttribute(i);r&&t.classList.toggle(r,!1),a&&t.classList.toggle(a,!0),t.setAttribute(i,a)}static f49(t,e,i){var a=t.getAttribute(e);a&&t.classList.toggle(a,i)}static f50(t,e){t.style.transitionDelay=e+"s"}static f51(t){t.style.transitionDelay=""}static f52(t,e,i="",a=""){var r=document.createElement("div");r.id=t;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",e),n.appendChild(o),n.classList.add("svg_sprite"),i?n.setAttribute("viewBox","0 0 "+i+" "+a):C6.f1("Not Setting the viewbox"),r.appendChild(n),C7.f23(r,i,a),r}static f53(t,e){t.nodeName.toLowerCase()==="TEXT".toLowerCase()?t.textContent=e:t.innerText=e}static f54(t,e=!0){var i=0,a=t.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&&e&&Util.selectLanguage("en-US",!1)}}C7.v0=-1,C7.v1=[],C7.v2=[],C7.v3=[],C7.v4=[],C7.v5=[],C7.v6,C7.v7,C7.v8,C7.v9,C7.v10,C7.v11=[],C7.v12,C7.v13=!1,C7.v14="ui_resize",C7.v15="--game-cwidth",C7.v16="--game-cheight",C7.v17="canonical_width",C7.v18="canonical_height",C7.v19="canonical_top",C7.v20="canonical_left",C7.v21="canonical_border_radius",C7.v22="aoffset_left",C7.v23="aoffset_top",C7.v24="element_width",C7.v25="element_height",C7.v26="element_top",C7.v27="element_left",C7.v28="cpx",C7.v29="apx",C7.v30="ch%",C7.v31="cw%",C7.v32="ah%",C7.v33="aw%",C7.v34="min_width",C7.v35="max_width",C7.v36="min_height",C7.v37="max_height",C7.v38="min_left",C7.v39="max_left",C7.v40="min_top",C7.v41="max_top",C7.v42,C7.v43="element_scale",C7.v44,C7.v45,C7.v46="--game-align-horizontal",C7.v47="--game-align-vertical",C7.v48="align_center",C7.v49="align_left",C7.v50="align_right",C7.v51="align_top",C7.v52="align_bottom",C7.v53="align_top_third",C7.v54="align_bottom_third",C7.v55="align_percent_",C7.v56=800;class C1{static f0(t){return JSON.parse(JSON.stringify(t))}static f1(){try{if(void 0===localStorage||null===localStorage)return!1;const t="b7d7b332-ecad-4577-9db9-dd7a5ab98ba5";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}}}class C8{static f0(t){var i=(t=Math.round(t))%3600,r=i%60;return{h:Math.floor(t/3600),m:Math.floor(i/60),s:Math.ceil(r)}}static f1(t){var e=t.split(":"),i=0;return e.length>=3&&(i+=3600*parseInt(e.shift())),e.length>=2&&(i+=60*parseInt(e.shift())),e.length>=1&&(i+=parseInt(e.shift())),i}}class C9{static f0(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}static f1(){var t=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"];for(-1!==navigator.userAgent.toLowerCase().indexOf("iphone")&&(s_bIsIphone=!0);t.length;)if(navigator.platform===t.pop())return!0;return s_bIsIphone=!1,!1}static f2(){var t=document.documentElement.clientWidth/window.innerWidth;return window.innerHeight*t}static f3(){var t=(0===window.orientation?screen.height:screen.width)-getIOSWindowHeight();return t>1?t:0}static f4(){try{return window.self!==window.top}catch(t){return!0}}static f5(){var t=document.getElementById("canvas");return!(!t.getContext||!t.getContext("2d"))&&0==t.toDataURL("image/webp").indexOf("data:image/webp")}}const SHOW_TIME=5e3;function r(t,e){return Math.random()*(e-t)+t}window.module={},module={},function(){var t,e;window.requestAnimationFrame&&window.cancelAnimationFrame?(t=window.requestAnimationFrame,e=window.cancelAnimationFrame):["webkit","moz","o","ms"].forEach(function(i){if(!t||!e){var a=i+"RequestAnimationFrame",r=i+"CancelAnimationFrame";window[a]&&window[r]&&(t=window[a],e=window[r])}}),t&&e||(t=function(t){return window.setTimeout(t,1e3/60)},e=function(t){return window.clearTimeout(t)});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(t){return module.exports.Promise?new module.exports.Promise(t):(t(a,a),null)}function l(t,e,a){return function(t,e){return e?e(t):t}(t&&function(t){return!(null===t||void 0===t)}(t[e])?t[e]:i[e],a)}function s(t,e){return Math.floor(Math.random()*(e-t))+t}function d(t){return parseInt(t,16)}function m(t){t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight}function U(t){var e=t.getBoundingClientRect();t.width=e.width,t.height=e.height}function g(t){var e=document.createElement("canvas");return m(e),e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=t,e}function I(t){var e=t.angle*(Math.PI/180),i=t.spread*(Math.PI/180);return{x:t.x,y:t.y,wobble:10*Math.random(),velocity:.5*t.startVelocity+Math.random()*t.startVelocity,angle2D:-e+(.5*i-Math.random()*i),tiltAngle:Math.random()*Math.PI,color:function(t){var e=String(t).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:d(e.substring(0,2)),g:d(e.substring(2,4)),b:d(e.substring(4,6))}}(t.color),shape:t.shape,tick:0,totalTicks:t.ticks,decay:t.decay,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0}}function y(i,a,n,o,l){var I,y,s=a.slice(),d=i.getContext("2d"),c=i.width,u=i.height,g=n?m:U;function f(){c=u=null}var v=r(function(e){function a(){I=y=null,o&&window.removeEventListener("resize",f),d.clearRect(0,0,c,u),l(),e()}I=t(function r(){c||u||(g(i),c=i.width,u=i.height),d.clearRect(0,0,c,u),(s=s.filter(function(t){return function(t,e){e.x+=Math.cos(e.angle2D)*e.velocity,e.y+=Math.sin(e.angle2D)*e.velocity+3,e.wobble+=.1,e.velocity
5*=e.decay,e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+5,e.wobbleX=e.x+10*Math.cos(e.wobble),e.wobbleY=e.y+10*Math.sin(e.wobble);var i=e.tick++/e.totalTicks,a=e.x+e.random*e.tiltCos,r=e.y+e.random*e.tiltSin,n=e.wobbleX+e.random*e.tiltCos,o=e.wobbleY+e.random*e.tiltSin;return t.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-i)+")",t.beginPath(),"circle"===e.shape?t.ellipse(e.x,e.y,.6*Math.abs(n-a),.6*Math.abs(o-r),Math.PI/10*e.wobble,0,2*Math.PI):(t.moveTo(Math.floor(e.x),Math.floor(e.y)),t.lineTo(Math.floor(e.wobbleX),Math.floor(r)),t.lineTo(Math.floor(n),Math.floor(o)),t.lineTo(Math.floor(a),Math.floor(e.wobbleY))),t.closePath(),t.fill(),e.tick<e.totalTicks}(d,t)})).length?I=t(r):a()}),y=a});return o&&window.addEventListener("resize",f,!1),{addFettis:function(t){return s=s.concat(t),v},canvas:i,promise:v,reset:function(){I&&e(I),y&&y()}}}function f(t,e){var n,i=!t,a=!!l(e||{},"resize"),r=!1;function o(e){var o=l(e,"particleCount",Math.floor),d=l(e,"angle",Number),c=l(e,"spread",Number),m=l(e,"startVelocity",Number),_=l(e,"decay",Number),f=l(e,"colors"),v=l(e,"ticks",Number),p=l(e,"zIndex",Number),A=l(e,"shapes"),E=function(t){var e=l(t,"origin",Object);return e.x=l(e,"x",Number),e.y=l(e,"y",Number),e}(e),C=o,w=[];i?t=n?n.canvas:g(p):a&&!r&&(U(t),r=!0);for(var h=t.width*E.x,P=t.height*E.y;C--;)w.push(I({x:h,y:P,angle:d,spread:c,startVelocity:m,color:f[C%f.length],shape:A[s(0,A.length)],ticks:v,decay:_}));return n?n.addFettis(w):(i&&document.body.appendChild(t),(n=y(t,w,i,i||a,function(){n=null,i&&document.body.removeChild(t)})).promise)}return o.reset=function(){n&&n.reset()},o}module.exports=f(),module.exports.create=f,module.exports.Promise=window.Promise||null}(),window.confetti=module.exports;var confettiActive=!1;function stopConfetti(){confettiActive=!1}function showConfetti(){if(!confettiActive){var t=Date.now()+SHOW_TIME;confettiActive=!0,function e(){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()<t&&confettiActive&&requestAnimationFrame(e)}()}}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Redux={})}(this,function(t){"use strict";var e=function(t){var e,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?e=i.observable:(e=i("observable"),i.observable=e):e="@@observable",e}(),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(t,e){var i=e&&e.type;return"Given "+(i&&'action "'+i+'"'||"an action")+', reducer "'+t+'" 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(t,e){return function(){return e(t.apply(this,arguments))}}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function d(){for(var t=arguments.length,e=Array(t),i=0;t>i;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}t.__DO_NOT_USE__ActionTypes=a,t.applyMiddleware=function(){for(var t=arguments.length,e=Array(t),i=0;t>i;i++)e[i]=arguments[i];return function(t){return function(){var i=t.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=e.map(function(t){return t(r)});return function(t){for(var e=1;arguments.length>e;e++){var i=null!=arguments[e]?arguments[e]:{};
5e%2?l(i,!0).forEach(function(e){o(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):l(i).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},i,{dispatch:a=d.apply(void 0,n)(i.dispatch)})}}},t.bindActionCreators=function(t,e){if("function"==typeof t)return n(t,e);if("object"!=typeof t||null===t)throw Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var i={};for(var a in t){var r=t[a];"function"==typeof r&&(i[a]=n(r,e))}return i},t.combineReducers=function(t){for(var e=Object.keys(t),i={},n=0;e.length>n;n++){var o=e[n];"function"==typeof t[o]&&(i[o]=t[o])}var l,s=Object.keys(i);try{!function(t){Object.keys(t).forEach(function(e){var i=t[e];if(void 0===i(void 0,{type:a.INIT}))throw Error('Reducer "'+e+"\" 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 "'+e+"\" 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(t){l=t}return function(t,e){if(void 0===t&&(t={}),l)throw l;for(var a=!1,n={},o=0;s.length>o;o++){var d=s[o],c=t[d],u=(0,i[d])(c,e);if(void 0===u){var m=r(d,e);throw Error(m)}n[d]=u,a=a||u!==c}return a?n:t}},t.compose=d,t.createStore=function t(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(t)(i,r)}if("function"!=typeof i)throw Error("Expected the reducer to be a function.");var l=i,s=r,d=[],c=d,u=!1;function m(){c===d&&(c=d.slice())}function U(){if(u)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(t){if("function"!=typeof t)throw Error("Expected the listener to be a function.");if(u)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 e=!0;return m(),c.push(t),function(){if(e){if(u)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.");e=!1,m();var i=c.indexOf(t);c.splice(i,1)}}}function I(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw Error("Reducers may not dispatch actions.");try{u=!0,s=l(s,t)}finally{u=!1}for(var e=d=c,i=0;e.length>i;i++)(0,e[i])();return t}return I({type:a.INIT}),(o={dispatch:I,subscribe:g,getState:U,replaceReducer:function(t){if("function"!=typeof t)throw Error("Expected the nextReducer to be a function.");l=t,I({type:a.REPLACE})}})[e]=function(){var t,i=g;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function e(){t.next&&t.next(U())}return e(),{unsubscribe:i(e)}}})[e]=function(){return this},t},o}
5,Object.defineProperty(t,"__esModule",{value:!0})});class C10{static f0(){var t=C1.f0(C10.v19);return C10.f1(t),C10.f2(t),C10.f3(t),t}static f1(t){for(var e=0,i=0;i<C2.v8;i++)for(var a=0;a<C2.v7;a++)t.cards[e]=C2.f0(C2.v0.Ace+a,C2.v5.Hearts+i,C2.v6.Up),e++}static f2(t){for(var e=0;e<t.cards.length;e++)t.board.stock[e]=e;C2.f1(t.board.stock),t.board.stock.length!=C10.v3&&C6.f2("Wrong number of cards in stock "+t.board.stock.length)}static f3(t){for(var e=t.cards,i=0;i<C10.v5;i++)for(var a=0;a<i+1;a++){var n=e[r=t.board.stock.pop()];C2.f5(n),t.board.tableau[i][a]=r}var r;n=e[r=C0.f2(t.board.stock)];C2.f5(n)}static f4(){return C10.v14}static f5(){return C10.v13}static f6(){return C10.v12}static f7(){return C10.v13+C10.v7+C10.v12}static f8(){return C10.v10}static f9(t,e=0){return C10.v11+t+C10.v8+e}static f10(){return C10.v12+C10.v7+C10.v10}static f11(t){return C10.v12+C10.v7+C10.v11+t}static f12(t,e,i){return C10.v11+t+C10.v8+e+C10.v7+C10.v10+i}static f13(t,e){switch(C10.f19(t),e){case C10.v14:C10.f21(t);break;case C10.v16:C10.f22(t);break;default:var i=e.split(C10.v7);C0.f2(i)===C10.v10&&C10.f14(t,e)}C10.f26(t)&&(t.status=C10.v0)}static f14(t,e){var i=t.cards,a=e.split(C10.v7);if(C0.f2(a)==C10.v10){var r=a[0],n=C10.f15(t,r),o=i[n];if(C10.v17[o.rank]===C10.v18)return C2.f4(o),void t.board.foundation.push(n);var l=a[1],s=C10.f15(t,l),d=i[s];if(C10.v17[o.rank]+C10.v17[d.rank]===C10.v18)return C2.f4(o),C2.f4(d),t.board.foundation.push(n),void t.board.foundation.push(s);throw C6.f2("Invalid Move to foundation:"+e),new Error("Invalid Move to Foundation")}C6.f2("toFoundation called with a move that isnt' to move to the foundation"+e)}static f15(t,e){var i=C2.v9;switch(e.charAt(0)){case C10.v12:i=t.board.waste.pop();break;case C10.v13:i=t.board.stock.pop();break;case C10.v11:var a=parseInt(e.charAt(1)),r=parseInt(e.substr(3));i=t.board.tableau[a][r],t.board.tableau[a][r]=C2.v9;break;default:C6.f2("getCardIdAndRemove invalid moveLocation: "+e)}return i}static f16(t){return t.board.resets>0}static f17(t){if(!C0.f6(t.board.stock))return!0;var e=[];e.push(C0.f2(t.board.waste));for(var i=0;i<C10.v5;i++)for(var a=t.board.tableau[i],r=0;r<a.length;r++)if(!C10.f23(t,i,r)){if(a[r]===C2.v9)continue;e.push(a[r])}return C10.f18(t,e)||C10.f16(t)}static f18(t,e){for(var i=t.cards,a=0;a<e.length;a++)if(e[a]!==C2.v9){var r=i[e[a]];if(C10.v17[r.rank]===C10.v18)return!0;for(var n=a+1;n<e.length;n++)if(e[n]!==C2.v9){var o=i[e[n]];if(C10.v17[r.rank]+C10.v17[o.rank]===C10.v18)return!0}}return!1}static f19(t){var e=C10.f28(t.board),i=C10.f28(t.cards),a=e+C10.v9+i;t.history.push(a)}static f20(t){if(!C0.f6(t.history)){var i=t.history.pop().split(C10.v9),a=i[0],r=i[1];t.moves.push(C10.v15);var n=C10.f29(a);t.board=n;var o=C10.f29(r);return t.cards=o,t}C6.f2("Can't restore from empty history")}static f21(t){if(C0.f6(t.board.stock))if(C10.f16(t)){for(;!C0.f6(t.board.waste);){var e=t.board.waste.pop();t.board.stock.push(e)}t.board.resets--}else C6.f2("We are out of resets for this game");else C6.f2("C10.f21 Being Asked to reset an non empty stock")}static f22(t,e=1){if(e<1||e>3)C6.f2("C10.f22 numCardsMax is invalid:"+e);else if(C0.f6(t.board.stock))C6.f2("C10.f22 stock is empty");else for(var i=0;i<e;i++){var a=t.board.stock.pop();if(t.board.waste.push(a),C2.f5(t.cards[a]),C0.f6(t.board.stock))break}}static f23(t,e,i){if(e===C10.v5-1)return!1;for(var a=t.board.tableau,r=C10.v5-1,n=C10.v5-1;n>=0&&C10.f24(a[n]);n--)r=n;if(e===r)return!1;var o=e+1,l=i,s=i+1;return a[o][l]!=C2.v9||a[o][s]!=C2.v9}static f24(t){for(var e=0;e<t.length;e++)if(t[e]!=C2.v9)return!1;return!0}static f25(t,e){switch(e.charAt(0)){case C10.v12:var i=t.board.waste;return C0.f6(i)?C2.v9:C0.f2(i);case C10.v11:var a=e.charAt(1),r=t.board.tableau[a];return-1==e.indexOf(C10.v8)?C0.f6(r)?C2.v9:C0.f2(r):C0.f6(r)?(C6.f2("C10.f25 specifying index on empty tableau"),C2.v9):r[e.split(C10.v8)[1]];case C10.v10:var l=e.charAt(1),s=t.board.foundation[l];return C0.f6(s)?C2.v9:C0.f2(s)}return C2.v9}static f26(t){if(t.status==C10.v2){for(var e=0;e<C10.v5;e++)if(!C10.f24(t.board.tableau[e]))return!1;return!0}C6.f2("Calling isGameOver on a game that isn't playing:"+t.status)}static f27(t){var e=t.cards,i=t.board.stock,a=t.board.tableau,r=t.board.waste,n=t.board.foundation;if(C0.f6(e))return C6.f2("C10.f27() CARDS LIST MISSING"),!1;if(e.length!=C10.v3)return C6.f2("C10.f27() CARD LIST IS WRONG SIZE"),!1;for(var o=0;o<C10.v3;o++){if(!(l=e[o]))return void C6.f2("C10.f27() CARD OBJECT MISSING AT IDX :"+o)}var s=[];for(o=0;o<C10.v3;o++)s.push(!1);for(var d=0;d<i.length;d++){var l=e[i[d]];if(s[i[d]]=!0,C2.f3(l))return C6.f2("C10.f27() CARD IS FACING UP IN STOCK :"+o),!1}for(var c=0;c<r.length;c++){l=e[r[c]];if(s[r[c]]=!0,C2.f2(l))return C6.f2("C10.f27() CARD IS FACING DOWN IN WASTE :"+o),!1}for(o=0;o<n.length;o++){l=e[n[o]];if(s[n[o]]=!0,C2.f3(l))return C6.f2("C10.f27() CARD IS FACING UP IN FOUNDATION :"+f),!1}for(var u=0;u<C10.v5;u++)for(o=0;o<a[u].length;o++){l=e[a[u][o]];if(s[a[u][o]]=!0,C2.f2(l))return C6.f2("C10.f27() CARD IS DOWN IN TABLEAU :"+u),!1}for(o=0;o<C10.v3;o++)if(!s[o])return C6.f2("C10.f27() LOST A CARD FROM BOARD ID :"+o),!1;return!0}static f28(t){return JSON.stringify(t)}static f29(t){return JSON.parse(t)}}C10.v0="game_over",C10.v1="init",C10.v2="playing",C10.v3=52,C10.v4=1,C10.v5=7,C10.v6=19,C10.v7="|",C10.v8="-",C10.v9="##",C10.v10="f",C10.v11="t",C10.v12="w",C10.v13="s",C10.v14="r",C10.v15="u",C10.v16="s|w",C10.v17=[0,1,2,3,4,5,6,7,8,9,10,11,12,13],C10.v18=13,C10.v19={status:"init",cards:[],board:{stock:[],waste:[],foundation:[],tableau:[[-1],[-1,-1],[-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1]],resets:2,score:0},config:{},moves:[],history:[],time:0};const{createStore:createStore,combineReducers:combineReducers}=Redux;class C11{static f0(){C6.f1("C11.f0()...."),C11.v0=combineReducers({gameState:C11.f2});let t={gameState:C10.f0()};C11.v1=createStore(C11.v0,t)}static f1(){return C11.v1.getState().gameState}static f2(t,e){let i=t;return i&&e&&e.type&&(e.type===C11.v7?C0.f6(i.history)||(C6.f1("Undo. Restoring from laste state"),i=C10.f20(i)):(i=C11.f5(i,e),i=C11.f6(i,e),i=C11.f7(i,e))),C11.v2=e,void 0!=i?i:C10.v19}static f3(t){C11.v1.dispatch(t)}static f4(t){C11.v1.subscribe(t),t()}static f5(t,e){switch(e.type){case C11.v3:t=C10.f0();break;case C11.v4:t.status=C10.v2;break;case C11.v5:var i=e.payload.move;C10.f13(t,i);break;case C11.v7:}return t}static f6(t,e){if(e.type===C11.v5){var i=e.payload.move;t.moves.push(i)}return t}static f7(t,e){return e.type===C11.v6&&(t.time+=e.payload.deltaT
5ime),t}static f8(t,e=C11.v8){return{type:C11.v5,payload:{move:t,agent:e}}}static f9(){return{type:C11.v3}}static f10(){return{type:C11.v4}}static f11(){return{type:C11.v7}}static f12(t){return{type:C11.v6,payload:{deltaTime:t}}}}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(t={}){var e=document.getElementById(C12.v4);C7.f0(e,C12.f14(),C12.f15()),C4.f0(e);var i=!0;Object.keys(t).includes("card_faces")&&(i="true"===t.card_faces),C3.f0(i),C12.f5(),C12.f6(),C12.f12(),C12.f13(),C11.f4(C12.f35),C12.f7(),C12.f1()}static f1(){C4.f1(C4.v18,C12.f40),C4.f1(C4.v14,C12.f8),C4.f1(C4.v15,C12.f9)}static f2(t){C12.v40=t}static f3(t){C12.v38.push(t)}static f4(t){C12.v39.push(t)}static f5(){C7.f29("background",1),C7.f29("target",1),C7.f29("tableau",C10.v3),C7.f29("stock",C12.v34),C7.f29("waste",C12.v34),C7.f29("foundation",C2.v7),C7.f29("dragging",C12.v35),C7.f29("dialog",10)}static f6(){C7.f44("stock","move"),C7.f44("waste","move"),C7.f44("tableau","move"),C7.f44("foundation","move"),C7.f44("dragging","move"),C7.f45("dragging","move",""),C7.f45("stock","move","move_animation_immediate"),C7.f45("waste","move","move_animation_immediate"),C7.f45("tableau","move","move_animation_immediate"),C7.f45("foundation","move","move_animation_immediate")}static f7(){C12.v2=setInterval(function(){if(document.hasFocus()&&C11.f1().status==C10.v2){var e=C11.f12(1);C11.f3(e)}},1e3)}static f8(){C6.f1("C12.f8");var t=C11.f1(),e=document.getElementById(C12.v9);e&&"hidden"!=e.style.visibility&&(e.style.visibility="hidden");var i=document.getElementById(C12.v14);
5if(C6.f1("No Moves Dialog"),C6.f1(i),i&&(C6.f1(i.style.visibility),"hidden"!=i.style.visibility&&(C6.f1("Setting no moves to hidden"),i.style.visibility="hidden")),t.status===C10.v1){var a=C11.f10();C11.f3(a),document.getElementById(C12.v9).style.visibility="hidden"}if(t.status===C10.v0||!C10.f17(t)){var n=t.config.mode,o=C11.f9(n);C11.f3(o),document.getElementById(C12.v9).style.visibility="hidden"}}static f9(){C12.f11()}static f10(){C12.v41=!0;var t=document.getElementById(C12.v20);C6.f1(t),t.classList.toggle("button_shadow",!1);var e=C12.f26();C7.f21(t,e.left+C12.v42,e.top+C12.v42)}static f11(){if(C12.v41){var t=document.getElementById(C12.v20);t.classList.toggle("button_shadow",!0);var e=C12.f26();C7.f21(t,e.left,e.top),C12.v41=!1}}static f12(){var e=C11.f1().cards;if(document.getElementById(C12.v4))for(var a=0;a<e.length;a++){var r=C3.f3(a,e[a],"card_back_gradient_yellow_pyramid");C6.f1("card back pyramid"),C3.f5(e[a],r),r.setAttribute("card_id",a),document.getElementById(C12.v4).appendChild(r),C7.f19(r)}else C6.f2("C12.f12 CAN'T FIND ROOT NODE: ")}static f13(){C11.f1();var e=document.getElementById(C12.v4);if(e){var i=C12.f28(),a=C7.f52(C12.v21,"#pyramid_control_bar");a.classList.add("target_div"),C7.f21(a,"0%",i.top-C12.v22/2),C7.f23(a,"100%",C3.v10+C12.v22),C7.f32(a,"target",0),C7.f19(a),e.appendChild(a);i=C12.f28();var r=C7.f52(C12.v17,"#stock_target_refresh",C3.v11,C3.v10);r.classList.add("target_div"),r.setAttribute("move_location",C10.f4()),r.classList.toggle("clickable",!0),C7.f21(r,i.left,i.top),C7.f23(r,C3.v11,C3.v10),C7.f32(r,"target",0),C7.f19(r),e.appendChild(r),(r=C7.f52(C12.v18,"#stock_target_x",C3.v11,C3.v10)).classList.add("target_div"),r.style.visibility="hidden",C7.f21(r,i.left,i.top),C7.f23(r,C3.v11,C3.v10),C7.f32(r,"target",0),C7.f19(r),e.appendChild(r),(r=C7.f52(C12.v19,"#stock_target",C3.v11,C3.v10)).classList.add("target_div"),r.setAttribute("move_location",C10.f6()),i=C12.f24(),C7.f21(r,i.left,i.top),C7.f23(r,C3.v11,C3.v10),C7.f32(r,"target",0),C7.f19(r),e.appendChild(r);var n=C7.f52(C12.v20,"#pyramid_stock_to_waste_button",C12.v30,C12.v31);n.classList.add("button_shadow"),C7.f22(n,9),n.classList.add("target_div"),n.setAttribute("move_location",C10.f7()),n.classList.toggle("clickable",!0),C7.f32(n,"target",0),i=C12.f26(),C7.f21(n,i.left,i.top),C7.f23(n,C12.v30,C12.v31),C7.f19(n),e.appendChild(n)}else C6.f2("C12.f13 CAN'T FIND ROOT NODE: ")}static f14(){return C12.v22+C10.v5*C3.v11+(C10.v5-1)*C12.v24+C12.v22}static f15(){return C12.v22+C3.v10+(C10.v5-1)*C12.v27+C3.v10+C12.v25+C12.v22+C12.v22}static f16(){return C12.f14()/C12.f15()}static f17(){var t=C7.f14(),e=C7.f8();return(t-C7.f11()*e)/3/e}static f18(t){var i=C12.f14()/2-C12.v24*t/2;i-=C3.v11/2*(t+1);var a=0;return t>0&&(a+=C12.v27*t),{left:i,top:C12.v22+a}}static f19(t){var e=document.getElementById(C12.v21),i=C12.f28();C7.f21(e,"0%",i.top-C12.v22/2),C7.f23(e,"100%",C3.v10+C12.v22),C7.f32(e,"target",0)}static f20(t){for(var e=t.cards,i=t.board.tableau,a=0;a<i.length;a++)for(var r=C12.f18(a),n=0;n<i[a].length;n++){var o=i[a][n];if(o!==C2.v9){var l=document.getElementById(C3.v1+o);l.setAttribute("move_location",C10.f9(a,n)),C7.f48(l,"tableau","move"),C7.f51(l);var s=0;n>0&&(s=n*C12.v24+(C3.v11*n-1)),C7.f21(l,r.left+s,r.top),C7.f23(l,C3.v11,C3.v10),C3.f5(e[o],l);var d=C10.f23(t,a,n);l.classList.toggle("clickable",!d),C7.f32(l,"tableau",a)}}}static f21(){return{left:C12.v22,top:"5%"}}static f22(t){for(var e=t.cards,i=t.board.foundation,a=C12.f21(),r=0;r<i.length;r++){var n=i[r],o=document.getElementById(C3.v1+n);o.classList.toggle("clickable",!1),C7.f32(o,"foundation",r),o.setAttribute("move_location",C10.f8()),C7.f48(o,"foundation","move"),C7.f51(o),C7.f21(o,a.left,a.top),C7.f23(o,C3.v11,C3.v10),C3.f5(e[n],o)}}static f23(){var t=C7.f14(),e=C7.f8();return(t-C7.f11()*e)/2/e}static f24(){var e=C12.f14()/2-C12.v30/2;return e-=C12.v24,e-=C3.v11,{left:e-=2*C12.v22,top:C12.f15()-C12.v22-C3.v10}}static f25(t){for(var e=t.cards,i=C12.f24(),a=t.board.waste,r=0;r<a.length;r++){var n=a[r],o=document.getElementById(C3.v1+n);o.classList.toggle("clickable",!1),C3.f7(o,t.status===C10.v2),C7.f32(o,"waste",r),C7.f48(o,"w
5aste","move"),C7.f21(o,i.left,i.top),C7.f23(o,C3.v11,C3.v10),C7.f51(o),C3.f5(e[n],o),o.setAttribute("move_location",C10.f6()),r===a.length-1&&o.classList.toggle("clickable",!0)}}static f26(){return{left:C12.f14()/2-C12.v30/2,top:C12.f15()-C12.v22-C3.v10+20}}static f27(){if(!C12.v41){var t=document.getElementById(C12.v20);t.classList.toggle("clickable",!0),t.setAttribute("move_location",C10.f7());var e=C12.f26();C6.f1("LayoutButton"),C7.f21(t,e.left,e.top),C7.f23(t,C12.v30,C12.v31),C7.f32(t,"target",0)}}static f28(){var e=C12.f14()/2+C12.v30/2;return e+=C12.v24,{left:e+=2*C12.v22,top:C12.f15()-C12.v22-C3.v10}}static f29(t){var e=C11.v2,i=t.cards,a=C12.f28(),r=!(!e||!e.payload)&&e.payload.move.startsWith(C10.v14),n=parseFloat(C7.f33("--pyramid-stock-animation-delay",.1)),o=document.getElementById(C12.v17);o.classList.toggle("clickable",!0),o.style.visibility=t.board.resets>0?"visible":"hidden",document.getElementById(C12.v18).style.visibility=t.board.resets>0?"hidden":"visible";for(var s=t.board.stock,d=0;d<s.length;d++){var c=s[d],u=document.getElementById(C3.v1+c);u.classList.toggle("clickable",!1),C7.f21(u,a.left,a.top),C7.f23(u,C3.v11,C3.v10),C7.f32(u,"stock",d+1),C3.f5(i[c],u),u.setAttribute("move_location",C10.f5()),C7.f48(u,"stock","move"),r?C7.f50(u,n*d):C7.f51(u),d===s.length-1&&u.classList.toggle("clickable",!0)}}static f30(t,e){return!t||!C0.f8(t.board.stock,e.board.stock)}static f31(t,e){return!t||!C0.f8(t.board.waste,e.board.waste)}static f32(t,e){return!t||!C0.f9(t.board.tableau,e.board.tableau)}static f33(t,e){return!t||!C0.f8(t.board.foundation,e.board.foundation)}static f34(t){var e=C11.v2;if(t.status==C10.v2&&e||(C7.f45("stock","move","move_animation_immediate"),C7.f45("waste","move","move_animation_immediate"),C7.f45("tableau","move","move_animation_immediate"),C7.f45("foundation","move","move_animation_immediate")),e.type===C11.v7&&(C7.f45("stock","move","move_animation_z_end"),C7.f45("waste","move","move_animation_z_start"),C7.f45("tableau","move","move_animation_z_start"),C7.f45("foundation","move","move_animation_z_start")),e.type===C11.v5){var i=e.payload.move.startsWith(C10.v14);C7.f45("stock","move",i?"move_animation_z_start":"move_animation_z_end"),C7.f45("waste","move","move_animation_z_start"),C7.f45("tableau","move","move_animation_z_end"),C7.f45("foundation","move","move_animation_z_start")}for(var a=0;a<C10.v3;a++){var r=document.getElementById(C3.v1+a);C3.f7(r,t.status===C10.v2)}}static f35(){var t=C11.f1(),e=C11.v2;e&&e.type===C11.v3&&C12.v40&&C12.v40(),C12.f34(t);var i=!1;C12.f30(C12.v1,t)&&(i=!0,C12.f29(t)),C12.f31(C12.v1,t)&&(i=!0,C12.f25(t)),C12.f32(C12.v1,t)&&(i=!0,C12.f20(t)),C12.f33(C12.v1,t)&&(i=!0,C12.f22(t)),C12.f19(),C12.f27();var a=t.moves.length,r=document.getElementById("moves"),n=""+a;r&&C7.f53(r,n);var o=t.time,l=C8.f0(o),s=document.getElementById("time"),d=(l.h>0?l.h+":":"")+l.m+":"+(l.s<10?"0":"")+l.s;s&&C7.f53(s,d);var c=t.history.length,u=document.getElementById("undos_left"),m=""+c;u&&C7.f53(u,m);var U=t.board.resets,g=document.getElementById("resets_left"),I="Resets:"+U;g&&C7.f53(g,I);var y="Score: "+t.board.score;if(i&&t.status===C10.v0)setTimeout(function(){C12.f38(n,d,y),C12.f36(n,d)},C12.v37);else if(i&&!C10.f17(t)){C6.f1("NO MORE MOVES"),"visible"!=document.getElementById(C12.v14).style.visibility&&setTimeout(function(){C12.f39(y),C12.f37(n,d)},C12.v37)}C6.f1(t),C12.v1=JSON.parse(JSON.stringify(t))}static f36(t,e){C6.f1("C12.f36");for(var i=0;i<C12.v38.length;i++)C6.f1("Notify Game Over"),C12.v38[i](t,e)}static f37(t,e){C6.f1("C12.f37");for(var i=0;i<C12.v39.length;i++)C6.f1("Notify No Move"),C12.v39[i](t,e)}static f38(t,e,i){var a=document.getElementById(C12.v9);if(a){a.style.visibility="visible",document.getElementById(C12.v10).innerText=t,document.getElementById(C12.v11).innerText=e;document.getElementById(C12.v12)}}static f39(t){var e=document.getElementById(C12.v14);
5if(e){e.style.visibility="visible";document.getElementById(C12.v13)}}static f40(t){C6.f1("Handling Click");var e=t.getAttribute("move_location"),i=C11.f1(),a=i.cards;if(e===C10.v16||e===C10.v14){if(e===C10.v10&&i.board.resets<=0)return;if(e===C10.v16&&i.board.stock.length<=0)return;e===C10.v16&&C12.f10();var r=C11.f8(e);return C11.f3(r),void C12.f41()}if(C12.v3){var n=parseInt(C12.v3.getAttribute("card_id")),o=a[n],l=parseInt(t.getAttribute("card_id")),s=a[l];if(n===l)return void C12.f41();if(C10.v17[o.rank]+C10.v17[s.rank]!=C10.v18)return;e=C12.v3.getAttribute("move_location");e+=C10.v7,e+=t.getAttribute("move_location"),e+=C10.v7,e+=C10.v10;r=C11.f8(e);C11.f3(r),C12.f41()}else{if(t.classList.toggle("selected",!0),a[parseInt(t.getAttribute("card_id"))].rank==C2.v0.King){e=t.getAttribute("move_location");e+=C10.v7+C10.v10;r=C11.f8(e);return C11.f3(r),void C12.f41()}C12.v3=t}}static f41(){C12.v3=null,C7.f43("selected")}}C12.v0="",C12.v1,C12.v2,C12.v3,C12.v4="pyramid_div",C12.v5="pyramid_foundation",C12.v6="pyramid_waste",C12.v7="pyramid_stock",C12.v8="pyramid_tableau",C12.v9="game_over_div",C12.v10="game_over_moves",C12.v11="game_over_time",C12.v12="game_over_score",C12.v13="no_moves_score",C12.v14="no_more_moves_div",C12.v15="foundation_target_",C12.v16="tableau_target_",C12.v17="s_target_refresh",C12.v18="s_target_x",C12.v19="waste_target",C12.v20="pyramid_stock_to_waste_div",C12.v21="pyramid_control_bar",C12.v22=10,C12.v24=3,C12.v25=30,C12.v27=.4*C3.v10,C12.v28=33,C12.v29=2,C12.v30=60,C12.v31=60,C12.v32=9,C12.v33=.05,C12.v34=C10.v3,C12.v35=C2.v7,C12.v36=8,C12.v37=750,C12.v38=[],C12.v39=[],C12.v40,C12.v41=!1,C12.v42=3;var _newGameCallback,_analyticsHandler=void 0,_lang=void 0;function registerAnalyticsHandler(t){_analyticsHandler=t}function analyticsEvent(t,e,i,a){console.log("Analytics: Category="+t+" Action="+e+" Label="+i+" Value="+a),_analyticsHandler&&_analyticsHandler(t,e,i,a)}function addNewGameCallback(t){_newGameCallback=t}function newGameStarted(){stopConfetti(),_newGameCallback&&_newGameCallback()}function newGameSameMode(){newGame()}function newGame(){stopConfetti();var t=C11.f9();C11.f3(t)}function gameOver(t,e){console.log("Game.js gameOver"),analyticsEvent("game","end-game","Win"),analyticsEvent("game","end-game-moves","Number of Moves",parseInt(t)),analyticsEvent("game","end-game-time","Length of Game",C8.f1(e)),showConfetti()}function noMoves(t,e){console.log("Game.js gameOver"),analyticsEvent("game","end-game","No Moves"),analyticsEvent("game","end-game-moves","Number of Moves",parseInt(t)),analyticsEvent("game","end-game-time","Length of Game",C8.f1(e))}function startGame(t={}){C11.f0(),C12.f0(t),C12.f3(gameOver),C12.f4(noMoves),C12.f2(newGameStarted);var e=0;document.addEventListener("touchend",function(t){var i=(new Date).getTime();i-e<=300&&t.preventDefault(),e=i},!1),window.onclick=function(t){if(!t.target.matches(".dropbtn")){var i,e=document.getElementsByClassName("dropup-content");for(i=0;i<e.length;i++){var a=e[i];a.classList.contains("show")&&a.classList.remove("show")}}}}var _startReported=!1;function toggleDropUp(){document.getElementById("optionsDropup").classList.toggle("show")}function undo(){var e=C11.f1().history.length;if(!(e<=0)){analyticsEvent("game","undo","Undo Clicked",e);var i=C11.f11();C11.f3(i)}}function registerDialog(t){C5.f1(t)}function showDialog(t,e){C5.f4(t,e)}function select_language(t,e=!0){var i=0;_lang=t;var a=t.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&&e&&select_language("en-US",!1)}document.addEventListener("mousedown",function(t){_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.