From 8675e43451787dd4b43231d1a6c97b2a0196132f Mon Sep 17 00:00:00 2001 From: kangasta Date: Wed, 13 Nov 2024 00:01:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2025800?= =?UTF-8?q?87a941ff0605a865c03782354cfcf13fb42=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 5 ++--- assets/index-BSOoYR09.js | 21 +++++++++++++++++++++ assets/index-C0X67hV1.css | 1 + assets/index-a771967f.css | 1 - assets/index-e232b918.js | 20 -------------------- index.html | 5 ++--- sw.js | 2 +- workbox-89dafc17.js | 1 - workbox-e3490c72.js | 1 + 9 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 assets/index-BSOoYR09.js create mode 100644 assets/index-C0X67hV1.css delete mode 100644 assets/index-a771967f.css delete mode 100644 assets/index-e232b918.js delete mode 100644 workbox-89dafc17.js create mode 100644 workbox-e3490c72.js diff --git a/404.html b/404.html index 72b6bc5..a59af38 100644 --- a/404.html +++ b/404.html @@ -25,11 +25,10 @@ - - + + - diff --git a/assets/index-BSOoYR09.js b/assets/index-BSOoYR09.js new file mode 100644 index 0000000..60eefe5 --- /dev/null +++ b/assets/index-BSOoYR09.js @@ -0,0 +1,21 @@ +var Ba=Object.defineProperty;var an=e=>{throw TypeError(e)};var Ha=(e,t,r)=>t in e?Ba(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var on=(e,t,r)=>Ha(e,typeof t!="symbol"?t+"":t,r),br=(e,t,r)=>t.has(e)||an("Cannot "+r);var Ne=(e,t,r)=>(br(e,t,"read from private field"),r?r.call(e):t.get(e)),St=(e,t,r)=>t.has(e)?an("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),mr=(e,t,r,n)=>(br(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ln=(e,t,r)=>(br(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();const Wa=!1;var Lt=Array.isArray,Mr=Array.from,Ja=Object.defineProperty,it=Object.getOwnPropertyDescriptor,Mn=Object.getOwnPropertyDescriptors,Ga=Object.prototype,Ya=Array.prototype,Bt=Object.getPrototypeOf;const ot=()=>{};function Za(e){return e()}function _r(e){for(var t=0;t=F.v&&m(F,C+1)}un(o)}return!0},ownKeys(u){c(o);var s=Reflect.ownKeys(u).filter(v=>{var p=a.get(v);return p===void 0||p.v!==se});for(var[f,d]of a)d.v!==se&&!(f in u)&&s.push(f);return s},setPrototypeOf(){ui()}})}function un(e,t=1){m(e,e.v+t)}var Sr,Vn,Bn,Hn;function Si(){if(Sr===void 0){Sr=window,Vn=document;var e=Element.prototype,t=Node.prototype;Bn=it(t,"firstChild").get,Hn=it(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function or(e=""){return document.createTextNode(e)}function ct(e){return Bn.call(e)}function lr(e){return Hn.call(e)}function N(e,t){return ct(e)}function de(e,t){{var r=ct(e);return r instanceof Comment&&r.data===""?lr(r):r}}function L(e,t=1,r=!1){let n=e;for(;t--;)n=lr(n);return n}function ki(e){e.textContent=""}function fe(e){var t=De|qe;z===null?t|=Ge:z.f|=$n;const r={children:null,ctx:V,deps:null,equals:jn,f:t,fn:e,reactions:null,v:null,version:0,parent:z};if(W!==null&&W.f&De){var n=W;(n.children??(n.children=[])).push(r)}return r}function we(e){const t=fe(e);return t.equals=$r,t}function Wn(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r{Ye(t)}}function ur(e){return _t(Rn,e,!1)}function $(e,t){var r=V,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=sr(()=>{e(),!n.ran&&(n.ran=!0,m(r.l.r2,!0),Fe(t))})}function xe(){var e=V;sr(()=>{if(c(e.l.r2)){for(var t of e.l.r1){var r=t.effect;r.f&oe&&ke(r,mt),wt(r)&&$t(r),t.ran=!1}e.l.r2.v=!1}})}function sr(e){return _t(It,e,!0)}function Z(e){return cr(e)}function cr(e,t=0){return _t(It|Rr|t,e,!0)}function ft(e,t=!0){return _t(It|Se,e,!0,t)}function Qn(e){var t=e.teardown;if(t!==null){const r=Vr,n=W;cn(!0),ze(null);try{t.call(null)}finally{cn(r),ze(n)}}}function Xn(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r{Ye(e),t&&t()})}function ra(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var a of e)a.out(n)}else t()}function qr(e,t,r){if(!(e.f&Ce)){if(e.f^=Ce,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var a=n.next,i=(n.f&ar)!==0||(n.f&Se)!==0;qr(n,t,i?r:!1),n=a}}}function Jt(e){na(e,!0)}function na(e,t){if(e.f&Ce){wt(e)&&$t(e),e.f^=Ce;for(var r=e.first;r!==null;){var n=r.next,a=(r.f&ar)!==0||(r.f&Se)!==0;na(r,a?t:!1),r=n}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}let Tr=!1,Cr=[];function Oi(){Tr=!1;const e=Cr.slice();Cr=[],_r(e)}function zr(e){Tr||(Tr=!0,queueMicrotask(Oi)),Cr.push(e)}function fr(e){throw new Error("lifecycle_outside_component")}let Gt=!1,ut=!1,Vr=!1;function sn(e){ut=e}function cn(e){Vr=e}let Er=[],Et=0;let W=null;function ze(e){W=e}let z=null;function Ae(e){z=e}let Ee=null;function Ni(e){Ee=e}let ie=null,ce=0,je=null;function Pi(e){je=e}let aa=0,at=!1,V=null;function ia(){return++aa}function Br(){return!yt||V!==null&&V.l===null}function wt(e){var o,l;var t=e.f;if(t&qe)return!0;if(t&mt){var r=e.deps,n=(t&Ge)!==0;if(r!==null){var a;if(t&Ht){for(a=0;ae.version)return!0}}n||ke(e,oe)}return!1}function Di(e,t,r){throw e}function oa(e){var v;var t=ie,r=ce,n=je,a=W,i=at,o=Ee,l=V,u=e.f;ie=null,ce=0,je=null,W=u&(Se|Mt)?null:e,at=!ut&&(u&Ge)!==0,Ee=null,V=e.ctx;try{var s=(0,e.fn)(),f=e.deps;if(ie!==null){var d;if(Ot(e,ce),f!==null&&ce>0)for(f.length=ce+ie.length,d=0;d1e3&&(Et=0,ii()),Et++}function Li(e){var t=e.length;if(t!==0){xi();var r=ut;ut=!0;try{for(var n=0;n1001)return;const e=Er;Er=[],Li(e),Gt||(Et=0)}function dr(e){Gt||(Gt=!0,queueMicrotask(Mi));for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(Mt|Se)){if(!(r&oe))return;t.f^=oe}}Er.push(t)}function la(e,t){var r=e.first,n=[];e:for(;r!==null;){var a=r.f,i=(a&Se)!==0,o=i&&(a&oe)!==0;if(!o&&!(a&Ce))if(a&It){i?r.f^=oe:wt(r)&&$t(r);var l=r.first;if(l!==null){r=l;continue}}else a&Rn&&n.push(r);var u=r.next;if(u===null){let d=r.parent;for(;d!==null;){if(e===d)break e;var s=d.next;if(s!==null){r=s;continue e}d=d.parent}}r=u}for(var f=0;fr.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?zr(()=>{t.addEventListener(e,a,n)}):t.addEventListener(e,a,n),a}function le(e,t,r,n,a){var i={capture:n,passive:a},o=qi(e,t,r,i);(t===document.body||t===window||t===document)&&Zn(()=>{t.removeEventListener(e,o,i)})}function Ct(e){var C;var t=this,r=t.ownerDocument,n=e.type,a=((C=e.composedPath)==null?void 0:C.call(e))||[],i=a[0]||e.target,o=0,l=e.__root;if(l){var u=a.indexOf(l);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var s=a.indexOf(t);if(s===-1)return;u<=s&&(o=u)}if(i=a[o]||e.target,i!==t){Ja(e,"currentTarget",{configurable:!0,get(){return i||r}});var f=W,d=z;ze(null),Ae(null);try{for(var v,p=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var y=i["__"+n];if(y!==void 0&&!i.disabled)if(Lt(y)){var[T,...F]=y;T.apply(i,[e,...F])}else y.call(i,e)}catch(A){v?p.push(A):v=A}if(e.cancelBubble||g===t||g===null)break;i=g}if(v){for(let A of p)queueMicrotask(()=>{throw A});throw v}}finally{e.__root=t,delete e.currentTarget,ze(f),Ae(d)}}}function ca(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Nt(e,t){var r=z;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function H(e,t){var r=(t&_i)!==0,n=(t&wi)!==0,a,i=!e.startsWith("");return()=>{a===void 0&&(a=ca(i?e:""+e),r||(a=ct(a)));var o=n?document.importNode(a,!0):a.cloneNode(!0);if(r){var l=ct(o),u=o.lastChild;Nt(l,u)}else Nt(o,o);return o}}function fa(e,t,r="svg"){var n=!e.startsWith(""),a=`<${r}>${n?e:""+e}`,i;return()=>{if(!i){var o=ca(a),l=ct(o);i=ct(l)}var u=i.cloneNode(!0);return Nt(u,u),u}}function Yt(e=""){{var t=or(e+"");return Nt(t,t),t}}function vr(){var e=document.createDocumentFragment(),t=document.createComment(""),r=or();return e.append(t,r),Nt(t,r),e}function U(e,t){e!==null&&e.before(t)}const zi=["touchstart","touchmove"];function Vi(e){return zi.includes(e)}function _e(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function Bi(e,t){return Hi(e,t)}const Xe=new Map;function Hi(e,{target:t,anchor:r,props:n={},events:a,context:i,intro:o=!0}){Si();var l=new Set,u=d=>{for(var v=0;v{var d=r??t.appendChild(or());return ft(()=>{if(i){ne({});var v=V;v.c=i}a&&(n.$$events=a),s=e(d,n)||{},i&&ae()}),()=>{var g;for(var v of l){t.removeEventListener(v,Ct);var p=Xe.get(v);--p===0?(document.removeEventListener(v,Ct),Xe.delete(v)):Xe.set(v,p)}fn.delete(u),dn.delete(s),d!==r&&((g=d.parentNode)==null||g.removeChild(d))}});return dn.set(s,f),s}let dn=new WeakMap;function re(e,t,r,n=null,a=!1){var i=e,o=null,l=null,u=null,s=a?ar:0;cr(()=>{u!==(u=!!t())&&(u?(o?Jt(o):o=ft(()=>r(i)),l&&Wt(l,()=>{l=null})):(l?Jt(l):n&&(l=ft(()=>n(i))),o&&Wt(o,()=>{o=null})))},s)}function dt(e,t){return t}function Wi(e,t,r,n){for(var a=[],i=t.length,o=0;o0&&a.length===0&&r!==null;if(l){var u=r.parentNode;ki(u),u.append(r),n.clear(),Me(e,t[0].prev,t[i-1].next)}ra(a,()=>{for(var s=0;s{var v=r(),p=Lt(v)?v:v==null?[]:Mr(v),g=p.length;if(!(d&&g===0)){d=g===0;{var y=W;Ji(p,l,o,a,t,(y.f&Ce)!==0,n)}i!==null&&(g===0?f?Jt(f):f=ft(()=>i(o)):f!==null&&Wt(f,()=>{f=null})),r()}})}function Ji(e,t,r,n,a,i,o){var b,w,x,R;var l=(a&vi)!==0,u=(a&(jr|Ur))!==0,s=e.length,f=t.items,d=t.first,v=d,p,g=null,y,T=[],F=[],C,A,O,k;if(l)for(k=0;k0){var h=a&qn&&s===0?r:null;if(l){for(k=0;k<_;k+=1)(x=J[k].a)==null||x.measure();for(k=0;k<_;k+=1)(R=J[k].a)==null||R.fix()}Wi(t,J,h,f)}}l&&zr(()=>{var S;if(y!==void 0)for(O of y)(S=O.a)==null||S.apply()}),z.first=t.first&&t.first.e,z.last=g&&g.e}function Gi(e,t,r,n){n&jr&&wr(e.v,t),n&Ur?wr(e.i,r):e.i=r}function Yi(e,t,r,n,a,i,o,l,u){var s=(u&jr)!==0,f=(u&hi)===0,d=s?f?ir(a):pe(a):a,v=u&Ur?pe(o):o,p={i:v,v:d,k:i,a:null,e:null,prev:r,next:n};try{return p.e=ft(()=>l(e,d,v),zn),p.e.prev=r&&r.e,p.e.next=n&&n.e,r===null?t.first=p:(r.next=p,r.e.next=p.e),n!==null&&(n.prev=p,n.e.prev=p.e),p}finally{}}function vn(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,a=t?t.e.nodes_start:r,i=e.e.nodes_start;i!==n;){var o=lr(i);a.before(i),i=o}}function Me(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function hr(e,t,r,n,a){var l;var i=(l=t.$$slots)==null?void 0:l[r],o=!1;i===!0&&(i=t.children,o=!0),i===void 0?a!==null&&a(e):i(e,o?()=>n:n)}function Zi(e,t,r){var n=e,a,i;cr(()=>{a!==(a=t())&&(i&&(Wt(i),i=null),a&&(i=ft(()=>r(n,a))))},ar)}function te(e,t,r,n){var a=e.__attributes??(e.__attributes={});a[t]!==(a[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[ti]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Qi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var hn=new Map;function Qi(e){var t=hn.get(e.nodeName);if(t)return t;hn.set(e.nodeName,t=[]);for(var r,n=Bt(e),a=Element.prototype;a!==n;){r=Mn(n);for(var i in r)r[i].set&&t.push(i);n=Bt(n)}return t}function Ue(e,t){var r=e.__className,n=Xi(t);(r!==n||zn)&&(t==null?e.removeAttribute("class"):e.className=n,e.__className=n)}function Xi(e){return e??""}function X(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function pn(e,t,r,n){var a=e.__styles??(e.__styles={});a[t]!==r&&(a[t]=r,r==null?e.style.removeProperty(t):e.style.setProperty(t,r,""))}var Re,st,xt,rr,da;const nr=class nr{constructor(t){St(this,rr);St(this,Re,new WeakMap);St(this,st);St(this,xt);mr(this,xt,t)}observe(t,r){var n=Ne(this,Re).get(t)||new Set;return n.add(r),Ne(this,Re).set(t,n),ln(this,rr,da).call(this).observe(t,Ne(this,xt)),()=>{var a=Ne(this,Re).get(t);a.delete(r),a.size===0&&(Ne(this,Re).delete(t),Ne(this,st).unobserve(t))}}};Re=new WeakMap,st=new WeakMap,xt=new WeakMap,rr=new WeakSet,da=function(){return Ne(this,st)??mr(this,st,new ResizeObserver(t=>{for(var r of t){nr.entries.set(r.target,r);for(var n of Ne(this,Re).get(r.target)||[])n(r)}}))},on(nr,"entries",new WeakMap);let Or=nr;var eo=new Or({box:"border-box"});function gn(e,t,r){var n=eo.observe(e,()=>r(e[t]));ur(()=>(Fe(()=>r(e[t])),n))}function bn(e,t){return e===t||(e==null?void 0:e[lt])===t}function to(e={},t,r,n){return ur(()=>{var a,i;return sr(()=>{a=i,i=[],Fe(()=>{e!==r(...i)&&(t(e,...i),a&&bn(r(...a),e)&&t(null,...a))})}),()=>{zr(()=>{i&&bn(r(...i),e)&&t(null,...i)})}}),e}function ue(e=!1){const t=V,r=t.l.u;if(!r)return;let n=()=>I(t.s);if(e){let a=0,i={};const o=fe(()=>{let l=!1;const u=t.s;for(const s in u)u[s]!==i[s]&&(i[s]=u[s],l=!0);return l&&a++,a});n=()=>c(o)}r.b.length&&Ci(()=>{mn(t,n),_r(r.b)}),kr(()=>{const a=Fe(()=>r.m.map(Za));return()=>{for(const i of a)typeof i=="function"&&i()}}),r.a.length&&kr(()=>{mn(t,n),_r(r.a)})}function mn(e,t){if(e.l.s)for(const r of e.l.s)c(r);t()}function Nr(e,t){var i;var r=(i=e.$$events)==null?void 0:i[t.type],n=Lt(r)?r.slice():r==null?[]:[r];for(var a of n)a.call(this,t)}function va(e,t,r){if(e==null)return t(void 0),ot;const n=Fe(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}let Ut=!1;function Ve(e,t,r){const n=r[t]??(r[t]={store:null,source:ir(void 0),unsubscribe:ot});if(n.store!==e)if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=ot;else{var a=!0;n.unsubscribe=va(e,i=>{a?n.source.v=i:m(n.source,i)}),a=!1}return c(n.source)}function Ze(){const e={};return Zn(()=>{for(var t in e)e[t].unsubscribe()}),e}function ro(e){var t=Ut;try{return Ut=!1,[e(),Ut]}finally{Ut=t}}function yn(e){for(var t=z,r=z;t!==null&&!(t.f&(Se|Mt));)t=t.parent;try{return Ae(t),e()}finally{Ae(r)}}function K(e,t,r,n){var q;var a=(r&pi)!==0,i=!yt||(r&gi)!==0,o=(r&mi)!==0,l=(r&yi)!==0,u=!1,s;o?[s,u]=ro(()=>e[t]):s=e[t];var f=(q=it(e,t))==null?void 0:q.set,d=n,v=!0,p=!1,g=()=>(p=!0,v&&(v=!1,l?d=Fe(n):d=n),d);s===void 0&&n!==void 0&&(f&&i&&oi(),s=g(),f&&f(s));var y;if(i)y=()=>{var E=e[t];return E===void 0?g():(v=!0,p=!1,E)};else{var T=yn(()=>(a?fe:we)(()=>e[t]));T.f|=Xa,y=()=>{var E=c(T);return E!==void 0&&(d=void 0),E===void 0?d:E}}if(!(r&bi))return y;if(f){var F=e.$$legacy;return function(E,B){return arguments.length>0?((!i||!B||F||u)&&f(B?y():E),E):y()}}var C=!1,A=!1,O=ir(s),k=yn(()=>fe(()=>{var E=y(),B=c(O);return C?(C=!1,A=!0,B):(A=!1,O.v=E)}));return a||(k.equals=$r),function(E,B){if(arguments.length>0){const G=B?c(k):i&&o?nt(E):E;return k.equals(G)||(C=!0,m(O,G),p&&d!==void 0&&(d=G),Fe(()=>c(k))),E}return c(k)}}function jt(e){V===null&&fr(),yt&&V.l!==null?ao(V).m.push(e):kr(()=>{const t=Fe(e);if(typeof t=="function")return t})}function ha(e){V===null&&fr(),jt(()=>()=>Fe(e))}function no(e,t,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:n})}function Hr(){const e=V;return e===null&&fr(),(t,r,n)=>{var i;const a=(i=e.s.$$events)==null?void 0:i[t];if(a){const o=Lt(a)?a.slice():[a],l=no(t,r,n);for(const u of o)u.call(e.x,l);return!l.defaultPrevented}return!0}}function ao(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const io="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(io);fi();var oo=H(""),lo=H('');function uo(e,t){ne(t,!1);const r="",n="2580087a941ff0605a865c03782354cfcf13fb42".slice(0,8);ue();var a=lo(),i=L(N(a),2);re(i,()=>n||r,o=>{var l=oo();l.textContent=`at ${r} ${n??""}`,U(o,l)}),U(e,a),ae()}const et=[];function Wr(e,t=ot){let r=null;const n=new Set;function a(l){if(Un(e,l)&&(e=l,r)){const u=!et.length;for(const s of n)s[1](),et.push(s,e);if(u){for(let s=0;s{n.delete(s),n.size===0&&r&&(r(),r=null)}}return{set:a,update:i,subscribe:o}}function so(e){let t;return va(e,r=>t=r)(),t}const pa="settings",co={game:"pileon",colors:"default",size:"default"},fo=JSON.parse(localStorage.getItem(pa)??"null"),ht=Wr(fo??co);ht.subscribe(e=>localStorage.setItem(pa,JSON.stringify(e)));const vo={},pt=Wr(vo);/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var ga=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Zt=ga.join(","),ba=typeof Element>"u",Je=ba?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qt=!ba&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Xt=function e(t,r){var n;r===void 0&&(r=!0);var a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=a===""||a==="true",o=i||r&&t&&e(t.parentNode);return o},ho=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},ma=function(t,r,n){if(Xt(t))return[];var a=Array.prototype.slice.apply(t.querySelectorAll(Zt));return r&&Je.call(t,Zt)&&a.unshift(t),a=a.filter(n),a},ya=function e(t,r,n){for(var a=[],i=Array.from(t);i.length;){var o=i.shift();if(!Xt(o,!1))if(o.tagName==="SLOT"){var l=o.assignedElements(),u=l.length?l:o.children,s=e(u,!0,n);n.flatten?a.push.apply(a,s):a.push({scopeParent:o,candidates:s})}else{var f=Je.call(o,Zt);f&&n.filter(o)&&(r||!t.includes(o))&&a.push(o);var d=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),v=!Xt(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(d&&v){var p=e(d===!0?o.children:d.children,!0,n);n.flatten?a.push.apply(a,p):a.push({scopeParent:o,candidates:p})}else i.unshift.apply(i,o.children)}}return a},_a=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},We=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ho(t))&&!_a(t)?0:t.tabIndex},po=function(t,r){var n=We(t);return n<0&&r&&!_a(t)?0:n},go=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},wa=function(t){return t.tagName==="INPUT"},bo=function(t){return wa(t)&&t.type==="hidden"},mo=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},yo=function(t,r){for(var n=0;nsummary:first-of-type"),o=i?t.parentElement:t;if(Je.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof a=="function"){for(var l=t;t;){var u=t.parentElement,s=Qt(t);if(u&&!u.shadowRoot&&a(u)===!0)return _n(t);t.assignedSlot?t=t.assignedSlot:!u&&s!==t.ownerDocument?t=s.host:t=u}t=l}if(ko(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return _n(t);return!1},Co=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},Ao=function e(t){var r=[],n=[];return t.forEach(function(a,i){var o=!!a.scopeParent,l=o?a.scopeParent:a,u=po(l,o),s=o?e(a.candidates):l;u===0?o?r.push.apply(r,s):r.push(l):n.push({documentOrder:i,tabIndex:u,item:a,isScope:o,content:s})}),n.sort(go).reduce(function(a,i){return i.isScope?a.push.apply(a,i.content):a.push(i.content),a},[]).concat(r)},Oo=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:Pr.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Eo}):n=ma(t,r.includeContainer,Pr.bind(null,r)),Ao(n)},No=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:er.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=ma(t,r.includeContainer,er.bind(null,r)),n},tt=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Je.call(t,Zt)===!1?!1:Pr(r,t)},Po=ga.concat("iframe").join(","),yr=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Je.call(t,Po)===!1?!1:er(r,t)};/*! +* focus-trap 7.6.1 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function Dr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0){var n=t[t.length-1];n!==r&&n.pause()}var a=t.indexOf(r);a===-1||t.splice(a,1),t.push(r)},deactivateTrap:function(t,r){var n=t.indexOf(r);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},jo=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Uo=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},At=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},Ko=function(t){return At(t)&&!t.shiftKey},qo=function(t){return At(t)&&t.shiftKey},Tn=function(t){return setTimeout(t,0)},Cn=function(t,r){var n=-1;return t.every(function(a,i){return r(a)?(n=i,!1):!0}),n},kt=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a1&&arguments[1]!==void 0?arguments[1]:{},w=b.hasFallback,x=w===void 0?!1:w,R=b.params,S=R===void 0?[]:R,P=i[h];if(typeof P=="function"&&(P=P.apply(void 0,Io(S))),P===!0&&(P=void 0),!P){if(P===void 0||P===!1)return P;throw new Error("`".concat(h,"` was specified but was not a node, or did not return a node"))}var M=P;if(typeof P=="string"){try{M=n.querySelector(P)}catch(j){throw new Error("`".concat(h,'` appears to be an invalid selector; error="').concat(j.message,'"'))}if(!M&&!x)throw new Error("`".concat(h,"` as selector refers to no known node"))}return M},d=function(){var h=f("initialFocus",{hasFallback:!0});if(h===!1)return!1;if(h===void 0||h&&!yr(h,i.tabbableOptions))if(s(n.activeElement)>=0)h=n.activeElement;else{var b=o.tabbableGroups[0],w=b&&b.firstTabbableNode;h=w||f("fallbackFocus")}else h===null&&(h=f("fallbackFocus"));if(!h)throw new Error("Your focus-trap needs to have at least one focusable element");return h},v=function(){if(o.containerGroups=o.containers.map(function(h){var b=Oo(h,i.tabbableOptions),w=No(h,i.tabbableOptions),x=b.length>0?b[0]:void 0,R=b.length>0?b[b.length-1]:void 0,S=w.find(function(j){return tt(j)}),P=w.slice().reverse().find(function(j){return tt(j)}),M=!!b.find(function(j){return We(j)>0});return{container:h,tabbableNodes:b,focusableNodes:w,posTabIndexesFound:M,firstTabbableNode:x,lastTabbableNode:R,firstDomTabbableNode:S,lastDomTabbableNode:P,nextTabbableNode:function(ve){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,he=b.indexOf(ve);return he<0?Te?w.slice(w.indexOf(ve)+1).find(function(me){return tt(me)}):w.slice(0,w.indexOf(ve)).reverse().find(function(me){return tt(me)}):b[he+(Te?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(h){return h.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(h){return h.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(h){var b=h.activeElement;if(b)return b.shadowRoot&&b.shadowRoot.activeElement!==null?p(b.shadowRoot):b},g=function(h){if(h!==!1&&h!==p(document)){if(!h||!h.focus){g(d());return}h.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=h,jo(h)&&h.select()}},y=function(h){var b=f("setReturnFocus",{params:[h]});return b||(b===!1?!1:h)},T=function(h){var b=h.target,w=h.event,x=h.isBackward,R=x===void 0?!1:x;b=b||Kt(w),v();var S=null;if(o.tabbableGroups.length>0){var P=s(b,w),M=P>=0?o.containerGroups[P]:void 0;if(P<0)R?S=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:S=o.tabbableGroups[0].firstTabbableNode;else if(R){var j=Cn(o.tabbableGroups,function(ye){var Oe=ye.firstTabbableNode;return b===Oe});if(j<0&&(M.container===b||yr(b,i.tabbableOptions)&&!tt(b,i.tabbableOptions)&&!M.nextTabbableNode(b,!1))&&(j=P),j>=0){var ve=j===0?o.tabbableGroups.length-1:j-1,Te=o.tabbableGroups[ve];S=We(b)>=0?Te.lastTabbableNode:Te.lastDomTabbableNode}else At(w)||(S=M.nextTabbableNode(b,!1))}else{var he=Cn(o.tabbableGroups,function(ye){var Oe=ye.lastTabbableNode;return b===Oe});if(he<0&&(M.container===b||yr(b,i.tabbableOptions)&&!tt(b,i.tabbableOptions)&&!M.nextTabbableNode(b))&&(he=P),he>=0){var me=he===o.tabbableGroups.length-1?0:he+1,Qe=o.tabbableGroups[me];S=We(b)>=0?Qe.firstTabbableNode:Qe.firstDomTabbableNode}else At(w)||(S=M.nextTabbableNode(b))}}else S=f("fallbackFocus");return S},F=function(h){var b=Kt(h);if(!(s(b,h)>=0)){if(kt(i.clickOutsideDeactivates,h)){l.deactivate({returnFocus:i.returnFocusOnDeactivate});return}kt(i.allowOutsideClick,h)||h.preventDefault()}},C=function(h){var b=Kt(h),w=s(b,h)>=0;if(w||b instanceof Document)w&&(o.mostRecentlyFocusedNode=b);else{h.stopImmediatePropagation();var x,R=!0;if(o.mostRecentlyFocusedNode)if(We(o.mostRecentlyFocusedNode)>0){var S=s(o.mostRecentlyFocusedNode),P=o.containerGroups[S].tabbableNodes;if(P.length>0){var M=P.findIndex(function(j){return j===o.mostRecentlyFocusedNode});M>=0&&(i.isKeyForward(o.recentNavEvent)?M+1=0&&(x=P[M-1],R=!1))}}else o.containerGroups.some(function(j){return j.tabbableNodes.some(function(ve){return We(ve)>0})})||(R=!1);else R=!1;R&&(x=T({target:o.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(o.recentNavEvent)})),g(x||o.mostRecentlyFocusedNode||d())}o.recentNavEvent=void 0},A=function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=h;var w=T({event:h,isBackward:b});w&&(At(h)&&h.preventDefault(),g(w))},O=function(h){(i.isKeyForward(h)||i.isKeyBackward(h))&&A(h,i.isKeyBackward(h))},k=function(h){Uo(h)&&kt(i.escapeDeactivates,h)!==!1&&(h.preventDefault(),l.deactivate())},q=function(h){var b=Kt(h);s(b,h)>=0||kt(i.clickOutsideDeactivates,h)||kt(i.allowOutsideClick,h)||(h.preventDefault(),h.stopImmediatePropagation())},E=function(){if(o.active)return kn.activateTrap(a,l),o.delayInitialFocusTimer=i.delayInitialFocus?Tn(function(){g(d())}):g(d()),n.addEventListener("focusin",C,!0),n.addEventListener("mousedown",F,{capture:!0,passive:!1}),n.addEventListener("touchstart",F,{capture:!0,passive:!1}),n.addEventListener("click",q,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),n.addEventListener("keydown",k),l},B=function(){if(o.active)return n.removeEventListener("focusin",C,!0),n.removeEventListener("mousedown",F,!0),n.removeEventListener("touchstart",F,!0),n.removeEventListener("click",q,!0),n.removeEventListener("keydown",O,!0),n.removeEventListener("keydown",k),l},G=function(h){var b=h.some(function(w){var x=Array.from(w.removedNodes);return x.some(function(R){return R===o.mostRecentlyFocusedNode})});b&&g(d())},Y=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(G):void 0,J=function(){Y&&(Y.disconnect(),o.active&&!o.paused&&o.containers.map(function(h){Y.observe(h,{subtree:!0,childList:!0})}))};return l={get active(){return o.active},get paused(){return o.paused},activate:function(h){if(o.active)return this;var b=u(h,"onActivate"),w=u(h,"onPostActivate"),x=u(h,"checkCanFocusTrap");x||v(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=n.activeElement,b==null||b();var R=function(){x&&v(),E(),J(),w==null||w()};return x?(x(o.containers.concat()).then(R,R),this):(R(),this)},deactivate:function(h){if(!o.active)return this;var b=Sn({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},h);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,B(),o.active=!1,o.paused=!1,J(),kn.deactivateTrap(a,l);var w=u(b,"onDeactivate"),x=u(b,"onPostDeactivate"),R=u(b,"checkCanReturnFocus"),S=u(b,"returnFocus","returnFocusOnDeactivate");w==null||w();var P=function(){Tn(function(){S&&g(y(o.nodeFocusedBeforeActivation)),x==null||x()})};return S&&R?(R(y(o.nodeFocusedBeforeActivation)).then(P,P),this):(P(),this)},pause:function(h){if(o.paused||!o.active)return this;var b=u(h,"onPause"),w=u(h,"onPostPause");return o.paused=!0,b==null||b(),B(),J(),w==null||w(),this},unpause:function(h){if(!o.paused||!o.active)return this;var b=u(h,"onUnpause"),w=u(h,"onPostUnpause");return o.paused=!1,b==null||b(),v(),E(),J(),w==null||w(),this},updateContainerElements:function(h){var b=[].concat(h).filter(Boolean);return o.containers=b.map(function(w){return typeof w=="string"?n.querySelector(w):w}),o.active&&v(),J(),this}},l.updateContainerElements(t),l};const Sa=()=>(Math.random()+1).toString(36).substring(5),Bo={Close:{path:"M 3 3 L 13 13 M 3 13 L 13 3"},Help:{path:"M 8 12 L 8 12 M 8 10 L 8 9 C 8 7 10 8 10 6 A 2 2 0 1 0 6 6 M 8 1.5 A 6.5 6.5 0 0 1 8 14.5 A 6.5 6.5 0 0 1 8 1.5"},Menu:{path:"M 2 4 L 14 4 M 2 8 L 14 8 M 2 12 L 14 12"},Minimize:{path:"M 11 13 L 6.75 13 M 11 11 L 6.75 11 M 11 11 L 11 6.75 M 11 11 L 3 3"},OpenModal:{path:"M 3 3 L 7.25 3 M 3 3 L 3 7.25 M 3 3 L 10 10 M 3 11 A 2 2 0 0 0 5 13 L 11 13 A 2 2 0 0 0 13 11 L 13 5 A 2 2 0 0 0 11 3 L 11 3"},Shuffle:{path:"M 5 2 L 2 5 L 5 8 M 2 5 L 12 5 M 11 14 L 14 11 L 11 8 M 14 11 L 4 11"},Undo:{path:"M 5 3 L 2 6 L 5 9 M 2 6 L 10 6 A 3 3 0 1 1 10 13 L 8 13"}};var Ho=fa('');function ka(e,t){ne(t,!1);let r=K(t,"icon",8);ue();var n=Ho(),a=N(n);Z(()=>te(a,"d",Bo[r()].path)),U(e,n),ae()}var Wo=H('
');function $e(e,t){ne(t,!1);let r=K(t,"icon",8),n=K(t,"label",8),a=K(t,"onClick",8);const i=`${Sa()}-label`;ue();var o=Wo(),l=N(o),u=N(l);te(u,"aria-labelledby",i),X(u,"open",open);var s=N(u),f=N(s);ka(f,{get icon(){return r()}});var d=L(u,2);te(d,"id",i);var v=N(d);Z(()=>_e(v,n())),le("click",u,function(...p){var g;(g=a())==null||g.apply(this,p)}),le("click",o,function(...p){var g;(g=a())==null||g.apply(this,p)}),U(e,o),ae()}var Jo=H('

',1);function Jr(e,t){var O,k;ne(t,!1);let r=K(t,"title",8),n=K(t,"position",8,"center"),a=K(t,"closeIcon",8,"Close");const i=`modal-${Sa()}`,o=`${i}-title`;let l=D(!1);jt(()=>{const q=Vo(`#${i}`,{clickOutsideDeactivates:!0,onDeactivate:()=>s()});q.activate();const E=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{m(l,!0)},0),()=>{q.deactivate(),document.body.style.overflow=E}});const u=Hr(),s=()=>{m(l,!1),setTimeout(()=>u("close"),125)};let f=((O=navigator.windowControlsOverlay)==null?void 0:O.visible)&&((k=navigator.windowControlsOverlay)==null?void 0:k.getTitlebarAreaRect().left)>0;ue();var d=Jo(),v=de(d),p=L(v,2);te(p,"aria-labelledby",o),te(p,"id",i);var g=N(p),y=N(g);te(y,"id",o);var T=N(y),F=L(y,2);$e(F,{get icon(){return a()},label:"Close",onClick:s});var C=L(g,2),A=N(C);hr(A,t,"default",{},null),Z(()=>{X(v,"open",c(l)),Ue(p,`modal ${n()??""} ${(f?"window-controls-on-left":"")??""} svelte-fabgrs`),X(p,"open",c(l)),_e(T,r())}),U(e,d),ae()}var Go=H('');function Pe(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(ht,"$settings",r),a=D(),i=D();let o=K(t,"target",8),l=K(t,"value",8);const{update:u}=ht,s=()=>{};$(()=>(n(),I(o()),I(l())),()=>{m(i,n()[o()]===l())}),$(()=>(c(i),I(o()),I(l())),()=>{m(a,c(i)?s:()=>u(v=>({...v,[o()]:l()})))}),xe(),ue();var f=Go(),d=N(f);hr(d,t,"default",{},v=>{var p=Yt();Z(()=>_e(p,l())),U(v,p)}),Z(()=>{te(f,"aria-pressed",c(i)?"true":"false"),f.disabled=c(i),X(f,"pressed",c(i))}),le("click",f,function(...v){var p;(p=c(a))==null||p.apply(this,v)}),U(e,f),ae()}var Yo=H('

Settings

Colors: / /
Size: / / /
'),Zo=H('
',1);function Qo(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(pt,"$actions",r);let a=D(!1);const i=C=>A=>{m(a,C==="open"),A.stopPropagation()};let o=D(),l=D("");const u=()=>{var O,k;if(!((O=navigator.windowControlsOverlay)!=null&&O.visible))return;const C=c(o).getBoundingClientRect(),A=(k=navigator.windowControlsOverlay)==null?void 0:k.getTitlebarAreaRect();A.left>C.left||A.righti("open"));$e(v,{icon:"Menu",label:"Menu",get onClick(){return c(p)}});var g=L(v,2);re(g,()=>n().help!==void 0,C=>{$e(C,{icon:"Help",label:"Help",get onClick(){return n().help}})});var y=L(g,2);re(y,()=>n().shuffle!==void 0,C=>{$e(C,{icon:"Shuffle",label:"Shuffle",get onClick(){return n().shuffle}})});var T=L(y,2);re(T,()=>n().undo!==void 0,C=>{$e(C,{icon:"Undo",label:"Undo",get onClick(){return n().undo}})}),to(d,C=>m(o,C),()=>c(o));var F=L(f,2);re(F,()=>c(a),C=>{var A=fe(()=>i("close"));Jr(C,{position:"left",title:"Menu",$$events:{close(...O){var k;(k=c(A))==null||k.apply(this,O)}},children:(O,k)=>{var q=Yo(),E=N(q),B=N(E),G=N(B);Pe(G,{target:"game",value:"pileon",children:(me,Qe)=>{var ye=Yt("Pileon solitaire");U(me,ye)},$$slots:{default:!0}});var Y=L(B,2),J=N(Y);Pe(J,{target:"game",value:"deck",children:(me,Qe)=>{var ye=Yt("Deck of cards");U(me,ye)},$$slots:{default:!0}});var _=L(E,6),h=N(_),b=N(h),w=L(N(b)),x=N(w);Pe(x,{target:"colors",value:"default"});var R=L(x,2);Pe(R,{target:"colors",value:"standard"});var S=L(R,2);Pe(S,{target:"colors",value:"four-color"});var P=L(b),M=L(N(P)),j=N(M);Pe(j,{target:"size",value:"default"});var ve=L(j,2);Pe(ve,{target:"size",value:"bridge"});var Te=L(ve,2);Pe(Te,{target:"size",value:"poker"});var he=L(Te,2);Pe(he,{target:"size",value:"small"}),U(O,q)},$$slots:{default:!0}})}),Z(()=>Ue(d,`menu ${c(l)??""} svelte-vd9w7o`)),U(e,s),ae()}var Q={},ge={};function gt(e){"@babel/helpers - typeof";return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(e)}Object.defineProperty(ge,"__esModule",{value:!0});var Fr=ge.Cards=ge.CardSuits=Pa=ge.CardStringType=ge.Card=void 0;function Le(e,t,r){return t=Ea(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Pt(e,t){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Pt(e,t)}function Dt(e){return Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dt(e)}function al(e,t){return ul(e)||ll(e,t)||ol(e,t)||il()}function il(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ol(e,t){if(e){if(typeof e=="string")return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return An(e,t)}}function An(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:be.StringType.Short;return a===Gr.Char?"_"+this.map(function(i){return i.toString(a)}).join(""):this.map(function(i){return i.toString(a)}).join(", ")}}]),r}(xr(Array));Fr=ge.Cards=vl;var hl=function(t){return typeof t=="string"?fl(t):t instanceof be?t.num:t},be=function(){function e(t){Ta(this,e),Le(this,"num",void 0),this.num=hl(t)}return Ca(e,[{key:"suit",get:function(){return e.getSuit(this.num)}},{key:"value",get:function(){return e.getValue(this.num)}},{key:"toString",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.StringType.Long;switch(r){case e.StringType.Short:return this.toString(e.StringType.ShortValue)+this.toString(e.StringType.ShortSuit);case e.StringType.ShortEmoji:return this.toString(e.StringType.ShortValue)+this.toString(e.StringType.EmojiSuit);case e.StringType.Long:return this.toString(e.StringType.LongValue)+" of "+this.toString(e.StringType.LongSuit);case e.StringType.Char:return e.chars[this.num];case e.StringType.ShortSuit:return e.shortSuits[this.suit];case e.StringType.LongSuit:return e.longSuits[this.suit];case e.StringType.EmojiSuit:return e.emojiSuits[this.suit];case e.StringType.ShortValue:return e.shortValues[this.value===13?0:this.value];case e.StringType.LongValue:return e.longValues[this.value===13?0:this.value]}throw new Error("Unsupported output type")}}],[{key:"fromJSON",value:function(r){var n=r.num;return new e(n)}},{key:"getSuit",value:function(r){return Math.floor(r/13)%4}},{key:"getValue",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return r%13||n?r%13:13}},{key:"compare",value:function(r,n){return n.value-r.value}}]),e}();ge.Card=be;Le(be,"Suits",Na);Le(be,"StringType",Gr);Le(be,"chars","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");Le(be,"emojiSuits",["♥","♠","♦","♣"]);Le(be,"shortSuits",["h","s","d","c"]);Le(be,"longSuits",["hearts","spades","diamonds","clubs"]);Le(be,"shortValues",["A","2","3","4","5","6","7","8","9","T","J","Q","K"]);Le(be,"longValues",["ace","two","three","four","five","six","seven","eight","nine","ten","jack","queen","king"]);var pr={},ee={};Object.defineProperty(ee,"__esModule",{value:!0});ee.uniqueFilter=ee.shuffle=ee.last=ee.isSorted=ee.getCombinationsHelper=ee.getCombinations=ee.arraySubtraction=void 0;var pl=function(t,r){return t.filter(function(n){return!r.includes(n)})};ee.arraySubtraction=pl;var Da=function e(t,r,n,a,i){if(a.length>=r)i.push(a);else for(var o=n;o2&&arguments[2]!==void 0?arguments[2]:!1,a=n?-1:1;try{return t.reduce(function(i,o){if(a*r(i,o)<=0)return o;throw new Error}),!0}catch{return!1}};ee.isSorted=bl;var ml=function(t){return t[t.length-1]};ee.last=ml;var yl=function(t){for(var r=t.length-1;r>0;r--){var n=Math.floor(Math.random()*(r+1)),a=[t[n],t[r]];t[r]=a[0],t[n]=a[1]}return t};ee.shuffle=yl;var _l=function(t,r,n){return n.indexOf(t)===r};ee.uniqueFilter=_l;Object.defineProperty(pr,"__esModule",{value:!0});pr.Deck=void 0;var On=ee,Tt=ge;function Ft(e){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(e)}function wl(e){return Cl(e)||Tl(e)||kl(e)||Sl()}function Sl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kl(e,t){if(e){if(typeof e=="string")return Lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lr(e,t)}}function Tl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cl(e){if(Array.isArray(e))return Lr(e)}function Lr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;El(this,e),Ol(this,"cards",void 0),this.cards=wl(Array(52*r).keys()).map(function(n){return new Tt.Card(n)}),t&&this.shuffle()}return Al(e,[{key:"shuffle",value:function(){(0,On.shuffle)(this.cards)}},{key:"isShuffled",value:function(){return!(0,On.isSorted)(this.cards,function(r,n){return r.num-n.num})}},{key:"cardsRemaining",get:function(){return this.cards.length}},{key:"pop",value:function(){return this.cards.pop()}},{key:"popN",value:function(r){for(var n=[],a,i=0;i0&&arguments[0]!==void 0?arguments[0]:Tt.Card.StringType.Char;return new Tt.Cards(this.cards).toString(r)}}],[{key:"fromJSON",value:function(r){var n=r.cards,a=new e(!1,0);return a.cards=n.map(function(i){return Tt.Card.fromJSON(i)}),a}},{key:"fromString",value:function(r){var n=new e(!1,0);return n.cards=new Tt.Cards(r),n}}]),e}();pr.Deck=Pl;var bt={},gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.uuid4=void 0;var Dl=function(t){var r;do r=Math.random().toString(16).slice(2,t+2);while(r.lengthe.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:Ie.Card.StringType.Short;return new Ie.Cards(this.cards).toString(r)}},{key:"toString",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie.Card.StringType.Short,a=Ie.Card.StringType.LongValue,i=function(u){return r.cards[u].toString(a)},o=this.getCardsString(n);switch(this.rank){case e.Rank.FiveOfAKind:return"Five of a kind, ".concat(i(0),"s (").concat(o,")");case e.Rank.StraightFlush:return"Straigth flush, ".concat(i(0)," high (").concat(o,")");case e.Rank.FourOfAKind:return"Four of a kind, ".concat(i(0),"s (").concat(o,")");case e.Rank.FullHouse:return"Full house, ".concat(i(0),"s over ").concat(i(3),"s (").concat(o,")");case e.Rank.Flush:return"Flush, ".concat(i(0)," high (").concat(o,")");case e.Rank.Straight:return"Straigth, ".concat(i(0)," high (").concat(o,")");case e.Rank.ThreeOfAKind:return"Three of a kind, ".concat(i(0),"s (").concat(o,")");case e.Rank.TwoPairs:return"Two pairs, ".concat(i(0),"s and ").concat(i(2),"s (").concat(o,")");case e.Rank.Pair:return"Pair, ".concat(i(0),"s (").concat(o,")");case e.Rank.High:return"".concat(i(0).replace(/^\w/,function(l){return l.toUpperCase()})," high (").concat(o,")")}throw new Error("Unsupported rank value")}}],[{key:"fromJSON",value:function(r){var n=r.rank,a=r.cards,i=r.uuid;return new e(n,a.map(Ie.Card.fromJSON),i)}},{key:"solve",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,a,i;return(a=e.isNumOfAKind(5,r))?i=e.Rank.FiveOfAKind:(a=e.isStraightFlush(r,n))?i=e.Rank.StraightFlush:(a=e.isNumOfAKind(4,r))?i=e.Rank.FourOfAKind:(a=e.isFullHouse(r))?i=e.Rank.FullHouse:(a=e.isFlush(r,n))?i=e.Rank.Flush:(a=e.isStraight(r,n))?i=e.Rank.Straight:(a=e.isNumOfAKind(3,r))?i=e.Rank.ThreeOfAKind:(a=e.isTwoPairs(r))?i=e.Rank.TwoPairs:(a=e.isNumOfAKind(2,r))?i=e.Rank.Pair:(a=[],i=e.Rank.High),a=e.fillWithKickers(a,r),new e(i,a)}},{key:"solveHoldEm",value:function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(a===0)return e.solve([].concat(Be(r),Be(n)));for(var i=(0,rt.getCombinations)(r,r.length-a),o=(0,rt.getCombinations)(n,Math.min(n.length,a)),l=[],u=0;u2&&arguments[2]!==void 0?arguments[2]:5;return n=(0,rt.arraySubtraction)(n,r).sort(Ie.Card.compare),[].concat(Be(r),Be(n)).slice(0,a)}},{key:"getUniqueValues",value:function(r){return r.map(function(n){return n.value}).filter(rt.uniqueFilter).sort(function(n,a){return a-n})}},{key:"isNumOfAKind",value:function(r,n){for(var a=e.getUniqueValues(n),i,o=function(f){if(i=n.filter(function(d){return d.value==a[f]}),i.length>=r)return{v:i}},l=0;l1&&arguments[1]!==void 0?arguments[1]:5,a=[],i=function(s){if(a=r.filter(function(d){return d.suit===s}),a.length1&&arguments[1]!==void 0?arguments[1]:5,a=function(u){var s=r.filter(function(f){return f.suit==u});if(s.length>=n)return{v:s.sort(Ie.Card.compare).slice(0,n)}},i=0;i<4;i++){var o=a(i);if(Ke(o)==="object")return o.v}return!1}},{key:"isStraight",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,a=e.getUniqueValues(r);if(a.length{switch(e){case"bridge":return{height:Dn,width:Kl};case"poker":return{height:Dn,width:ql};case"small":return{height:Vl,width:zl}}},Yr="card-appearance",Bl={size:"bridge",fourColor:!1},Hl=({size:e,colors:t})=>({size:e==="default"?"poker":e,fourColor:t==="four-color"}),Ra=e=>{const t=Wr(Bl,r=>(ht.subscribe(n=>r(e(n))),()=>{}));return $i(Yr,t),t},Zr=()=>ua(Yr),Fn=e=>{const t=ua(Yr);if(t){const r=so(ht);t.set(e(r))}},$a=(e,t,r={})=>n=>{(Array.isArray(e)?e:[e]).includes(n.code)&&t!==void 0&&(r.preventDefault&&n.preventDefault(),t())};var Wl=fa('');function ja(e,t){ne(t,!1);const r=D();let n=K(t,"suit",8,null),a=K(t,"flip",8,!1);const i=u=>{switch(u){case"hearts":return"M 8 2 C 9 0 11 0 12 0 C 13 0 16 1 16 6 C 16 8 15.5 10 14 12 L 8 20 L 2 12 C 0.5 10 0 8 0 6 C 0 1 3 0 4 0 C 5 0 7 0 8 2";case"spades":return"M 8 0 L 13 5 C 16 8 16 10 16 12 C 16 14 14 16 12 16 C 11 16 9 16 8 14 L 12 20 L 4 20 L 8 14 C 7 16 5 16 4 16 C 2 16 0 14 0 12 C 0 10 0 8 3 5 L 8 0";case"diamonds":return"M 8 0 L 16 10 L 8 20 L 0 10 L 8 0";case"clubs":return"M 8 0 C 10 0 12 2 12 4 C 12 6 11 8 8 10 C 9 8 10 7 12 7 C 14 7 16 9 16 12 C 16 14 14 16 12 16 C 11 16 9 16 8 14 L 12 20 L 4 20 L 8 14 C 7 16 5 16 4 16 C 2 16 0 14 0 12 C 0 9 2 7 4 7 C 6 7 7 8 8 10 C 5 8 4 6 4 4 C 4 2 6 0 8 0";default:return null}};$(()=>I(n()),()=>{m(r,i(n()))}),xe();var o=vr(),l=de(o);re(l,()=>c(r),u=>{var s=Wl(),f=N(s);Z(()=>{X(s,"flip",a()),te(f,"d",c(r))}),U(u,s)}),U(e,o),ae()}var Jl=H(''),Gl=H("
"),Yl=H('
');function Zl(e,t){let r=K(t,"suit",8),n=K(t,"rank",8);const a={A:["U"],2:["U","D"],3:["U","U","D"],4:["UU","DD"],5:["UU","U","DD"],6:["UU","UU","DD"],7:["UU","u","UU","DD"],8:["UU","UU","DD","DD"],9:["UU","u","UU","DD","DD"],10:["UU","u","UU","DD","d","DD"]},i=u=>a[u]??[],o=u=>u.toUpperCase()===u?"grow":"";var l=Yl();vt(l,5,()=>i(n()),dt,(u,s)=>{var f=Gl();const d=we(()=>`row ${o(c(s))??""} svelte-1sm49dl`);vt(f,5,()=>c(s).split(""),dt,(v,p)=>{var g=Jl(),y=N(g),T=we(()=>c(p).toLowerCase()==="d");ja(y,{get suit(){return r()},get flip(){return c(T)}}),U(v,g)}),Z(()=>Ue(f,c(d))),U(u,f)}),U(e,l)}var Ql=H('');function Xl(e,t){var r=Ql(),n=N(r);hr(n,t,"default",{},null),U(e,r)}var eu=H('
',1),tu=H("
");function tr(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(p,"$cardAppearance",r),a=D(),i=D(),o=D(),l=D(),u=D(),s=D(),f=D(),d=D(),v=D(),p=Zr();let g=K(t,"card",8,null),y=K(t,"empty",8,!1),T=K(t,"shadow",8,!1),F=K(t,"stack",8,void 0);const C=["top","bottom"];$(()=>n(),()=>{m(a,n().size==="bridge")}),$(()=>n(),()=>{m(i,n().size==="small")}),$(()=>n(),()=>{m(o,n().fourColor)}),$(()=>(I(g()),I(T())),()=>{m(l,g()===null&&!T())}),$(()=>(I(y()),c(l),I(T())),()=>{m(u,!(y()||c(l)||T()))}),$(()=>(c(u),I(g()),Q.Card),()=>{var q;m(s,c(u)&&((q=g())==null?void 0:q.toString(Q.Card.StringType.ShortValue).replace("T","10"))||"")}),$(()=>(c(u),I(g()),Q.Card),()=>{var q;m(f,c(u)&&((q=g())==null?void 0:q.toString(Q.Card.StringType.LongSuit))||"")}),$(()=>(c(u),I(g())),()=>{var q;m(d,c(u)&&(((q=g())==null?void 0:q.num)??0)%13>9)}),$(()=>(c(u),I(g()),Q.Card),()=>{var q;m(v,c(u)&&((q=g())==null?void 0:q.toString(Q.Card.StringType.Long))||"")}),xe(),ue();var A=tu(),O=N(A);re(O,()=>c(u),q=>{Xl(q,{children:(E,B)=>{var G=Yt();Z(()=>_e(G,c(v))),U(E,G)},$$slots:{default:!0}})});var k=L(O,2);vt(k,1,()=>C,dt,(q,E)=>{var B=eu(),G=de(B),Y=N(G),J=N(Y),_=L(Y,2),h=N(_);ja(h,{get suit(){return c(f)}});var b=L(G,2),w=N(b);re(w,()=>!c(i),x=>{Zl(x,{get suit(){return c(f)},get rank(){return c(s)}})}),Z(()=>{Ue(G,`${c(E)??""} label svelte-hurvu3`),Ue(Y,`rank rank-${c(s)??""} svelte-hurvu3`),_e(J,c(s)),X(b,"face",c(d))}),U(q,B)}),Z(()=>{Ue(A,`card ${c(f)??""} stack-${F()??""} svelte-hurvu3`),X(A,"bridge",c(a)),X(A,"small",c(i)),X(A,"fourColor",c(o)),X(A,"empty",y()),X(A,"hidden",c(l)),X(A,"shadow",T()),X(A,"visible",c(u))}),U(e,A),ae()}var ru=H('
'),nu=H('
');function au(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(s,"$cardAppearance",r),a=D(),i=D(),o=D(),l=D(),u=D(),s=Zr();let f=K(t,"numCards",8,52),d=K(t,"numDecks",8,1),v=K(t,"topCard",8,null),p=K(t,"numShadows",8,10),g=K(t,"shuffleAnimationSteps",8,4),y=K(t,"shuffleAnimationMaxDistanceEm",8,.8),T=K(t,"shuffleAnimationMaxRotateDeg",8,7),F=K(t,"onClick",8,()=>{}),C=D(0);function A(_,h,b,w){const x=_/w*h,R=.5*x/(b*52),S=1*x/(b*52);return`translate(${R}em , ${S}em)`}function O(_,h){const b=S=>[1,h+2].includes(_)?0:(Math.random()*2-1)*S,w=b(y()),x=b(y()),R=b(T());return`translate(${w}em, ${x}em) rotate(${R}deg)`}function k(){c(C)>0&&setTimeout(()=>{m(C,c(C)-1),k()},250)}function q(){if(!c(l))return F()()}$(()=>n(),()=>{var _;m(a,((_=n())==null?void 0:_.size)==="bridge")}),$(()=>n(),()=>{var _;m(i,((_=n())==null?void 0:_.size)==="small")}),$(()=>(I(v()),I(f()),I(d()),I(g())),()=>{v()===null&&f()===52*d()&&g()>0&&(m(C,g()+2),k())}),$(()=>c(C),()=>{m(l,c(C)>0)}),$(()=>(I(v()),c(l),I(p()),c(C),I(g()),I(f()),I(d())),()=>{m(o,v()===void 0?[]:c(l)?[...Array(p())].map(()=>({card:null,shadow:!1,transform:O(c(C),g())})):[...Array(p())].map((_,h)=>({card:void 0,shadow:!0,transform:A(h,f(),d(),p())})))}),$(()=>I(v()),()=>{m(u,v()===void 0?"Shuffle the deck":"Draw a card")}),xe(),ue();var E=nu(),B=fe(()=>$a(["Space","Enter"],q,{preventDefault:!0})),G=N(E),Y=N(G);re(Y,()=>!c(l),_=>{var h=we(()=>v()===void 0);tr(_,{get card(){return v()},get empty(){return c(h)}})});var J=L(Y,2);vt(J,1,()=>c(o),dt,(_,h)=>{let b=()=>c(h).card,w=()=>c(h).shadow,x=()=>c(h).transform;var R=ru(),S=N(R);tr(S,{get card(){return b()},get shadow(){return w()}}),Z(()=>te(R,"style",`transform: ${x()??""}`)),U(_,R)}),Z(()=>{te(E,"aria-label",c(u)),te(E,"aria-disabled",c(l)),X(E,"bridge",c(a)),X(E,"small",c(i)),X(E,"shuffling",c(l))}),le("keydown",E,function(..._){var h;(h=c(B))==null||h.apply(this,_)}),le("click",E,q),U(e,E),ae()}var iu=H('
');function ou(e,t){ne(t,!1),Ra(Hl);let r=new Q.Deck,n=D(r.cardsRemaining),a=D(null);function i(){c(a)!==void 0?m(a,r.pop()):(r=new Q.Deck,m(a,null)),m(n,r.cardsRemaining)}const o=s=>{s.stopPropagation(),r=new Q.Deck,m(a,null),m(n,r.cardsRemaining)};jt(()=>{pt.update(s=>({...s,shuffle:o}))}),ha(()=>{pt.update(s=>({...s,shuffle:void 0}))}),ue();var l=iu(),u=N(l);au(u,{onClick:i,get topCard(){return c(a)},get numCards(){return c(n)}}),U(e,l),ae()}const Qr=(e,t)=>Ma(t).width+(e-1)*1.125,lu=(e,t,r)=>e.length===0?"empty":t?`closed${r==="rank"?`, ${e[0].toString(Q.CardStringType.LongValue)}s`:""}`:e.toString(Q.CardStringType.Long),uu=(e,t,r,n,a=!1)=>{const i=lu(new Q.Cards(t),n,a),o=r>0?` ${r} cards selected: ${new Q.Cards(t.slice(t.length-r)).toString(Q.CardStringType.Long)}`:"";return`${e}: ${i}.${o}`},su=(e,t,r)=>{const n={sourceStack:t,cards:r};e.dataTransfer&&(e.dataTransfer.setData("application/json",JSON.stringify(n)),e.dataTransfer.effectAllowed="move")},cu=e=>{var n;const{sourceStack:t,cards:r}=JSON.parse(((n=e.dataTransfer)==null?void 0:n.getData("application/json"))??"");return{sourceStack:t,cards:r.map(Q.Card.fromJSON)}};var fu=H('
'),du=H('
');function Ua(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(p,"$cardAppearance",r),a=D(),i=D(),o=D(),l=D(),u=D(),s=D(),f=D(),d=D(),v=D(),p=Zr();let g=K(t,"cards",24,()=>[]),y=K(t,"capacity",8,4),T=K(t,"closed",8,!1),F=K(t,"index",8,0),C=K(t,"isDraggableFn",8,()=>!1),A=K(t,"selectedCardsN",8,0),O=K(t,"labelOptions",24,()=>({title:"Stack"})),k=K(t,"nested",8,!1);const q=Hr();$(()=>n(),()=>{m(a,n().size)}),$(()=>(I(y()),c(a)),()=>{m(i,`width: ${Qr(y(),c(a))}em`)}),$(()=>(I(T()),I(C()),I(g())),()=>{m(o,!T()&&C()(g()))}),$(()=>(I(A()),I(g())),()=>{m(l,A()>0&&A()===g().length)}),$(()=>(I(T()),I(g())),()=>{m(u,T()&&g().length===1)}),$(()=>(I(F()),I(g())),()=>{m(s,_=>{_.stopPropagation(),su(_,F(),g())})}),$(()=>{},()=>{m(f,_=>{_.preventDefault()})}),$(()=>(I(k()),I(F())),()=>{m(d,()=>{k()||q("select",{index:F()})})}),$(()=>(I(k()),I(O()),I(g()),I(A()),I(T())),()=>{m(v,k()?void 0:uu(O().title,g(),A(),T(),O().closed))}),xe(),ue();var E=du(),B=fe(()=>$a(["Enter","Space"],c(d),{preventDefault:!0})),G=N(E),Y=N(G);re(Y,()=>g().length===0,_=>{tr(_,{empty:!0})},_=>{var h=we(()=>c(u)?null:g()[0]);tr(_,{get card(){return c(h)},stack:"left"})});var J=L(Y,2);re(J,()=>g().length>1,_=>{var h=fu(),b=N(h),w=we(()=>g().slice(1)),x=we(()=>y()-1);Ua(b,{get cards(){return c(w)},get capacity(){return c(x)},nested:!0,get closed(){return T()},get index(){return F()},get isDraggableFn(){return C()},get selectedCardsN(){return A()}}),U(_,h)}),Z(()=>{te(E,"aria-label",c(v)),te(E,"style",c(i)),te(E,"draggable",c(o)),te(E,"tabindex",k()?void 0:0),X(E,"selected",c(l)),te(G,"aria-hidden",k()?void 0:"true")}),le("dblclick",E,function(_){Nr.call(this,t,_)}),le("dragstart",E,function(..._){var h;(h=c(s))==null||h.apply(this,_)}),le("dragover",E,function(..._){var h;(h=c(f))==null||h.apply(this,_)}),le("drop",E,function(_){Nr.call(this,t,_)}),le("click",E,function(..._){var h;(h=c(d))==null||h.apply(this,_)}),le("keydown",E,function(..._){var h;(h=c(B))==null||h.apply(this,_)}),U(e,E),ae()}const vu=(e,t)=>{const r=e/t;return r<3/4?[3,5]:r<4/3?[4,4]:[5,3]},hu=(e,t)=>({length:e*t-15}),Ka=(e,t,r)=>{const n=Qr(4,e)*t+(t-1),a=Ma(e).height*r+(r-1);return[n,a]},pu=(e,t,r)=>{const n=Math.min(t,r*2.3333333333333335),[a,i]=vu(n,r),[o,l]=Ka(e,a,i),u=n*.95/o,s=r*.95/l;return{fontSize:Math.max(Math.min(u,s),10),columns:a,rows:i,tableWidthEm:o,tableHeightEm:l}},xn=()=>{const e=new Q.Deck;return[...Array(13)].map(()=>e.popN(4)).concat([[],[]])},Xr=e=>{const[t,...r]=e;return r.every(n=>n.value===t.value)},gu=e=>e.length===0?!1:e.length===1?!0:Xr(e),en=(e,t)=>e.length+t.length>4?!1:t.length===0||t[t.length-1].value===e[0].value,tn=(e,t,r,n)=>{const a=e.map(i=>[...i]);if(!en(n,a[r]))throw new Error(`Can not move cards ${n.map(i=>i.toString(Pa.ShortEmoji))} from pile ${t} to pile ${r}`);return a[t]=a[t].slice(0,a[t].length-n.length),a[r]=[...a[r],...n],a},rn=e=>e.length===1||Xr(e)?e:rn(e.slice(1)),bu=(e,t)=>{if(e[t].length===0)throw new Error("Cannot move cards from an empty pile.");if(nn(e[t]))throw new Error("Cannot move cards from a completed pile.");const r=rn(e[t]),n=e.reduce((o,l,u)=>u!==t&&en(r,l)?[...o,u]:o,[]);if(n.length===0)throw new Error(`Cannot move cards from pile ${t} to any other pile`);const a=n.filter(o=>e[o].length>0),i=a.length>0?a[0]:n[0];return tn(e,t,i,r)},mu=(e,t)=>{const r=e[t].slice(-1);return r.length===0?[[],r]:[e.reduce((a,i,o)=>o!==t&&en(r,i)?[...a,o]:a,[]),r]},qa=e=>e.reduce((t,r,n)=>{const[a,i]=mu(e,n);return a.length===0?t:[...t,[n,a,i]]},[]),yu=(e,t)=>{if(e[0]!==t[0]||e[1].length!==t[1].length)return!1;for(let r=0;r(t,r,n)=>{var v;const[a,i,o]=t,l=[...o];if(i.length>1)return[!1,[]];const u=i[0],s=tn(e,a,u,o),f=qa(s),d=n.filter(([p])=>p!==u).map(p=>p[0]===a?[u,[a],o]:p).sort((p,g)=>p[0]-g[0]);if(f.length-d.length===1){const p=s[a].slice(-2);if(((v=s[u][0])==null?void 0:v.value)!==o[0].value&&p.length===2&&p.every(g=>g.value===o[0].value))d.push([a,i,[p[1]]]),d.sort((g,y)=>g[0]-y[0]),l.push(p[1]);else return[!1,[]]}return f.length!==d.length?[!1,[]]:[d.every((p,g)=>yu(p,f[g])),l]},wu=e=>{const t=qa(e);if(t.length===0)return["dead-end",[]];const r=t.map(_u(e));return r.every(([n])=>n)&&r.length>0?["infinite-loop",r.reduce((a,i)=>[...a,...i[1]],[])]:[!1,[]]},nn=e=>e.length===4&&Xr(e),za=e=>e.every(t=>nn(t)||t.length===0),Su=e=>e.reduce((t,r,n)=>nn(r)?[...t,n]:t,[]),He=e=>({type:e,timestamp:Date.now()}),ku=e=>{const t={};return e.forEach(({type:r})=>t[r]=(t[r]??0)+1),t},Ln=e=>e.reduce((t,r)=>t+r,0),Tu=e=>{const t=e.filter(a=>a.type==="start").map(a=>a.timestamp),r=e.filter(a=>a.type==="stop").map(a=>a.timestamp);if(t.length===0)return[null,null];const n=(r[r.length-1]??Date.now())-t[0];return t.length!==r.length?[null,n]:[Ln(r)-Ln(t),n]},qt=(e,t)=>e>0?`${e} ${t}`:"",Cu=e=>{if(e===null)return"N/A";if(e<1e3)return qt(e,"ms");const t=Math.floor(e/36e5),r=Math.floor(e/6e4-t*60),n=Math.floor(e/1e3-r*60-t*3600);return[qt(t,"h"),qt(r,"min"),qt(n,"s")].join(" ").trim()};var Eu=H(' ',1);function Va(e,t){let r=K(t,"title",8),n=K(t,"position",8,"center"),a=D(!0);const i=()=>{m(a,!1)},o=()=>{m(a,!0)};var l=Eu(),u=de(l);re(u,()=>c(a),p=>{Jr(p,{get title(){return r()},get position(){return n()},closeIcon:"Minimize",$$events:{close:i},children:(g,y)=>{var T=vr(),F=de(T);hr(F,t,"default",{},null),U(g,T)},$$slots:{default:!0}})});var s=L(u,2),f=N(s);ka(f,{icon:"OpenModal"});var d=L(f,2),v=N(d);Z(()=>{Ue(s,`minimized-modal ${(c(a)?"":"open")??""} svelte-ufcprb`),_e(v,r())}),le("click",s,o),U(e,l)}var Au=H(`

Here are statistics about the completed game. Undo and undone moves are + excluded from Significant moves but included in Total moves.

Elapsed time:
Significant moves:
Total moves:
Undone moves:
`,1);function Ou(e,t){ne(t,!1);const r=D(),n=D(),a=D();let i=K(t,"events",8);$(()=>I(i()),()=>{m(r,ku(i()))}),$(()=>(c(n),c(a),I(i())),()=>{(k=>(m(n,k[0]),m(a,k[1])))(Tu(i()))}),xe(),ue();var o=Au(),l=L(de(o),2),u=N(l),s=N(u),f=L(N(s)),d=N(f);Z(()=>_e(d,Cu(c(a))));var v=L(s),p=L(N(v)),g=N(p),y=L(v),T=L(N(y)),F=N(T),C=L(y),A=L(N(C)),O=N(A);Z(()=>{_e(g,(c(r).move??0)-(c(r).undo??0)),_e(F,(c(r).move??0)+(c(r).undo??0)),_e(O,c(r).undo??0)}),U(e,o),ae()}var Nu=H('
',1);function Pu(e,t){ne(t,!1);const r=D();let n=K(t,"events",8),a=K(t,"piles",8);const i=Hr();$(()=>I(a()),()=>{m(r,za(a()))}),xe(),ue();var o=vr(),l=de(o);re(l,()=>c(r),u=>{Va(u,{title:"Completed",children:(s,f)=>{var d=Nu(),v=de(d);Ou(v,{get events(){return n()}});var p=L(v,2),g=N(p);$e(g,{icon:"Shuffle",label:"Shuffle",onClick:()=>i("shuffle")}),U(s,d)},$$slots:{default:!0}})}),U(e,o),ae()}const Du=(e,t=Q.CardStringType.Long)=>{const r=e.map(a=>a.toString(t)),n=[r.slice(0,-1).join(", "),...r.slice(-1)].filter(a=>a).join(" and ");return n.charAt(0).toUpperCase()+n.slice(1)};var Fu=H("

No more possible moves. Undo the last move or start a new game.

"),xu=H("

"),Lu=H('
',1);function Iu(e,t){ne(t,!0);const r=fe(()=>wu(t.piles)),n=fe(()=>c(r)[0]),a=fe(()=>c(r)[1]),i=fe(()=>Du(c(a)));var o=vr(),l=de(o);re(l,()=>c(n),u=>{Va(u,{title:"Dead end",children:(s,f)=>{var d=Lu(),v=de(d);re(v,()=>c(n)==="dead-end",F=>{var C=Fu();U(F,C)});var p=L(v,2);re(p,()=>c(n)==="infinite-loop",F=>{var C=xu(),A=N(C);Z(()=>_e(A,`${c(i)??""} can be moved back and forth between two piles. There are no + other possible moves. Undo the last move or start a new game.`)),U(F,C)});var g=L(p,2),y=N(g);$e(y,{icon:"Shuffle",label:"Shuffle",get onClick(){return t.shuffle}});var T=L(y,2);$e(T,{icon:"Undo",label:"Undo",get onClick(){return t.undo}}),U(s,d)},$$slots:{default:!0}})}),U(e,o),ae()}var Mu=H(`

The goal of the pileon solitaire is to rearrange a deck of cards into piles + of equal ranks from thirteen random piles of four using fifteen piles.

Rules

  • Each pile can contain up to four cards.
  • Cards can be moved from top of the pile into a pile where the top card is + of the same rank as the card that is moved.
  • Cards of any rank can be moved into an empty pile.
  • Multiple cards with the same rank can be moved at once.
  • Pile is complete when it contains all four cards with the same rank.

Moving cards

  1. Select the source pile by clicking a pile. Cards to be moved are + highlighted. Click the source pile again to reduce the amount of selected + cards.
  2. Move cards by clicking the target pile. If the move is valid, the cards + are moved from the source pile into the target pile.

If your device supports drag-and-drop, you can also drag the cards you want + to move from the source pile into the target pile. Double-clicking the + source pile automatically moves cards from the pile to an available target + pile.

`,1);function Ru(e,t){Jr(e,{title:"How to play?",$$events:{close(r){Nr.call(this,t,r)}},children:(r,n)=>{var a=Mu();U(r,a)},$$slots:{default:!0}})}var $u=H('
'),ju=H('
'),Uu=H("
",1);function In(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(g,"$appearance",r),a=D(),i=D(),o=D(),l=D(),u=D(),s=D(),f=D(),d=D();let v=D(),p=D(),g=Ra(S=>({size:S.size==="default"?"bridge":S.size,fourColor:S.colors==="four-color"})),y=D([xn()]),T=D([He("start")]),F=D(!1);const C=S=>{S.stopPropagation(),m(F,!0)},A=S=>{S.stopPropagation(),m(k,[void 0,[]]),m(y,[xn()]),m(T,[He("start")])},O=S=>{S.stopPropagation(),c(y).length>1&&(m(k,[void 0,[]]),m(y,c(y).slice(0,c(y).length-1)),m(T,[...c(T),He("undo")]))};let k=D([void 0,[]]);const q=(S,P,M)=>{try{m(k,[void 0,[]]);const j=tn(c(y)[c(y).length-1],S,P,M);m(y,[...c(y),j]),m(T,[...c(T),He("move")])}catch{}},E=S=>{const[P,M]=c(k),j=S.detail.index;c(i).includes(j)||(P===void 0||M.length===0?m(k,[j,rn(c(a)[j])]):P===j?m(k,[j,M.slice(1)]):P!==j&&(q(P,j,M),m(k,[void 0,[]])))},B=S=>P=>{P.preventDefault();const{sourceStack:M,cards:j}=cu(P);M!==S&&q(M,S,j)},G=S=>P=>{P.preventDefault();try{m(k,[void 0,[]]);const M=bu(c(y)[c(y).length-1],S);m(y,[...c(y),M]),m(T,[...c(T),He("move")])}catch{}};jt(()=>{pt.update(S=>({...S,help:C,shuffle:A,undo:O}))}),ha(()=>{pt.update(S=>({...S,help:void 0,shuffle:void 0,undo:void 0}))}),$(()=>(c(v),c(p),Fn),()=>{const S=c(v)<800||c(p)<400?"small":"bridge";Fn(P=>({size:P.size==="default"?S:P.size,fourColor:P.colors==="four-color"}))}),$(()=>c(y),()=>{m(a,c(y)[c(y).length-1])}),$(()=>c(a),()=>{m(i,Su(c(a)))}),$(()=>(c(a),c(T),He),()=>{za(c(a))&&c(T).push(He("stop"))}),$(()=>c(k),()=>{m(o,c(k)[0])}),$(()=>c(k),()=>{m(l,c(k)[1])}),$(()=>n(),()=>{m(u,n().size)}),$(()=>(c(u),c(v),c(p)),()=>{m(s,pu(c(u),c(v),c(p)))}),$(()=>(c(f),c(d),c(u)),()=>{(S=>(m(f,S[0]),m(d,S[1])))(Ka(c(u),5,3))}),xe(),ue();var Y=Uu(),J=de(Y),_=N(J);vt(_,1,()=>c(a),dt,(S,P,M)=>{var j=$u(),ve=N(j),Te=we(()=>c(i).includes(M)),he=we(()=>c(o)===M?c(l).length:0),me=fe(()=>B(M)),Qe=fe(()=>G(M));Ua(ve,{get cards(){return c(P)},get closed(){return c(Te)},get selectedCardsN(){return c(he)},labelOptions:{title:`Stack ${M+1}`,closed:"rank"},index:M,isDraggableFn:gu,$$events:{drop(...ye){var Oe;(Oe=c(me))==null||Oe.apply(this,ye)},dblclick(...ye){var Oe;(Oe=c(Qe))==null||Oe.apply(this,ye)},select:E}}),U(S,j)});var h=L(_,2);vt(h,1,()=>hu(c(s).columns,c(s).rows),dt,(S,P)=>{var M=ju();const j=we(()=>`min-width: ${Qr(4,c(u))}em`);Z(()=>te(M,"style",c(j))),U(S,M)});var w=L(J,2);re(w,()=>c(F),S=>{Ru(S,{$$events:{close:()=>{m(F,!1)}}})});var x=L(w,2);Pu(x,{get events(){return c(T)},get piles(){return c(a)},$$events:{shuffle:A}});var R=L(x,2);Iu(R,{get piles(){return c(a)},shuffle:A,undo:O}),Z(()=>{Ue(J,`pileon deal-${c(s).columns??""}x${c(s).rows??""} svelte-3hj6i4`),pn(J,"font-size",`${c(s).fontSize??""}px`),pn(J,"max-width",`${c(f)*1.25}em`)}),gn(J,"clientHeight",S=>m(p,S)),gn(J,"clientWidth",S=>m(v,S)),U(e,Y),ae()}var Ku=H(" ",1);function qu(e,t){ne(t,!1);const r=Ze(),n=()=>Ve(ht,"$settings",r),a=()=>Ve(pt,"$actions",r),i=D(),o=d=>{d.key==="z"&&(d.ctrlKey||d.metaKey)&&a().undo!==void 0&&a().undo(d),d.key==="F1"&&a().help!==void 0&&a().help(d)};$(()=>(n(),In),()=>{m(i,n().game==="deck"?ou:In)}),xe(),ue();var l=Ku();le("keydown",Vn.body,o);var u=de(l);Qo(u,{});var s=L(u,2);Zi(s,()=>c(i),(d,v)=>{v(d,{})});var f=L(s,2);uo(f,{}),U(e,l),ae()}Bi(qu,{target:document.body}); diff --git a/assets/index-C0X67hV1.css b/assets/index-C0X67hV1.css new file mode 100644 index 0000000..28c3262 --- /dev/null +++ b/assets/index-C0X67hV1.css @@ -0,0 +1 @@ +:root{--text-red: OrangeRed;--text-green: ForestGreen;--text-blue: RoyalBlue;--text-black: DarkSlateGray;--background: SeaGreen;--background-card: White;--background-highlight: NavajoWhite;--text-secondary: var(--text-black);--text-primary: DarkSlateGray;--text-grey: var(--text-black)}html,body{position:relative;width:100%;height:100%}body{background:var(--background);color:var(--text-primary);margin:-1px 0 0;padding:1px 0 0;box-sizing:border-box;font-family:Arial,sans-serif;display:flex;min-height:100vh;flex-direction:column}@media (max-width: 5rem) and (max-height: 7rem){body{font-size:50%}}@media (min-width: 10rem) and (min-height: 14rem){body{font-size:150%}}@media (min-width: 15rem) and (min-height: 21rem){body{font-size:200%}}@media (min-width: 20rem) and (min-height: 28rem){body{font-size:300%}}a{color:var(--text-primary);text-decoration:underline}a:visited{color:var(--text-primary)}a:hover,a:focus{outline:none;text-decoration-style:double}footer.svelte-ivyywu{font-size:1rem;padding:1rem 0 .5rem;text-align:center}div.icon-button.svelte-7d82q0{display:inline-flex;flex-direction:column;justify-content:center;height:4.5626rem;-webkit-tap-highlight-color:transparent}div.icon-button.svelte-7d82q0:hover .content:where(.svelte-7d82q0){transform:scale(1.1) translateY(-.15rem)}div.icon-button.svelte-7d82q0:active .icon:where(.svelte-7d82q0){transform:translateY(.15rem)}div.content.svelte-7d82q0{display:inline-flex;flex-direction:column;align-items:center;transition:transform 125ms}.clickable.svelte-7d82q0{cursor:pointer}button.svelte-7d82q0{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0px none;color:inherit;padding:0;margin:.75rem}button.svelte-7d82q0:focus-visible{outline:3px solid black;border-radius:.5em}button.svelte-7d82q0 svg{height:2rem}div.label.svelte-7d82q0{font-size:1rem;font-weight:600;margin-top:-.75rem}.backdrop.svelte-fabgrs{position:fixed;top:0;left:0;height:100vh;width:100vw;z-index:4;-webkit-backdrop-filter:none;backdrop-filter:none;transition:backdrop-filter 125ms}.backdrop.open.svelte-fabgrs{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal.svelte-fabgrs{display:flex;flex-direction:column;position:fixed;background:#fff;z-index:6;font-size:1rem;overflow:hidden;box-sizing:border-box}.modal.center.svelte-fabgrs{top:50%;left:50%;max-height:90%;width:500px;max-width:100%;padding:0 1em 2em;box-shadow:0 .5rem 1rem #000000bf;opacity:0;transform:translate(-50%,-25%) scale(.25);transition:opacity 125ms,transform 125ms}.modal.center.open.svelte-fabgrs{opacity:1;transform:translate(-50%,-50%) scale(1)}@media (min-width: 501px){.modal.center.svelte-fabgrs{border-radius:.25em}}.modal.left.svelte-fabgrs{top:-2vh;left:0;height:104vh;max-width:95%;padding:2vh 1em;box-shadow:.5rem 0 1rem #000000bf;opacity:0;transform:translate(-50%);transition:opacity 125ms,transform 125ms}.modal.left.svelte-fabgrs .content:where(.svelte-fabgrs){flex:1}.modal.left.open.svelte-fabgrs{opacity:1;transform:translate(0)}@media (display-mode: window-controls-overlay){.modal.left.window-controls-on-left.svelte-fabgrs{border-radius:0 .25em 0 0;height:calc(102vh - env(titlebar-area-height) - 1rem);padding:0 1em 2vh;top:calc(env(titlebar-area-height) + 1rem)}}.modal.svelte-fabgrs .header:where(.svelte-fabgrs){display:flex;align-items:center}.modal.svelte-fabgrs .content:where(.svelte-fabgrs){overflow:auto}.modal.svelte-fabgrs h2:where(.svelte-fabgrs){flex:1;font-size:1.5em;margin:1em 0}button.svelte-fhaqyy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;color:inherit;font:inherit;padding:0;text-decoration:underline;cursor:pointer}button.pressed.svelte-fhaqyy{cursor:default;text-decoration:none}button.svelte-fhaqyy:focus-visible{outline:3px solid black;outline-offset:2px;border-radius:.125em}.titlebar.svelte-vd9w7o{app-region:drag;display:flex;margin-bottom:.25em}.window-controls.svelte-vd9w7o{flex:1;height:env(titlebar-area-height,auto)}.menu.svelte-vd9w7o{app-region:no-drag;transition:margin-top 125ms}.menu.below-titlebar.svelte-vd9w7o{margin-top:env(titlebar-area-height)}.drawer.svelte-vd9w7o{display:flex;height:100%;flex-direction:column}.drawer.svelte-vd9w7o ul:where(.svelte-vd9w7o){list-style-type:none;padding:0}.drawer.svelte-vd9w7o li:where(.svelte-vd9w7o){padding:1em 0;border-top:1px solid currentColor}.drawer.svelte-vd9w7o li:where(.svelte-vd9w7o):last-of-type{border-bottom:1px solid currentColor}.drawer.svelte-vd9w7o .whitespace:where(.svelte-vd9w7o){flex:1}.drawer.svelte-vd9w7o table:where(.svelte-vd9w7o){font-size:1rem;margin:0 0 2em;width:100%}.drawer.svelte-vd9w7o table:where(.svelte-vd9w7o) th:where(.svelte-vd9w7o),.drawer.svelte-vd9w7o table:where(.svelte-vd9w7o) td:where(.svelte-vd9w7o){padding:.5em 0}.drawer.svelte-vd9w7o table:where(.svelte-vd9w7o) th:where(.svelte-vd9w7o){padding-right:1em;text-align:left}svg.svelte-1jimf84{height:1em}svg.flip.svelte-1jimf84{transform:scaleY(-1)}.center-pattern.svelte-1sm49dl{box-sizing:border-box;display:flex;flex-direction:column;font-size:.5em;height:100%;padding:0 .25em;width:100%}.row.svelte-1sm49dl{align-items:center;display:flex;justify-content:space-between}.row.grow.svelte-1sm49dl{flex-grow:1}.row.svelte-1sm49dl:only-child{margin:auto 0}.row.svelte-1sm49dl span:where(.svelte-1sm49dl):only-child{margin:0 auto}.screen-reader-only.svelte-3uotpv{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}.card.svelte-hurvu3{border-radius:.25em;box-sizing:border-box;display:block;font-family:sans-serif;position:relative;-webkit-user-select:none;user-select:none;width:5em;height:7em}.card.stack-left.svelte-hurvu3{box-shadow:-3px 0 2.5px #2f4f4faa}.card.bridge.svelte-hurvu3{width:4.5em}.card.small.svelte-hurvu3{width:3em;height:5em}.card.visible.svelte-hurvu3{border-width:0;background-color:var(--background-card)}.card.hidden.svelte-hurvu3:not(.visible){border:.2em white solid;background:repeating-linear-gradient(60deg,transparent,transparent .35em,white .05em,white .4em),repeating-linear-gradient(-60deg,#ff4500,#ff4500 .35em,#fff .05em,#fff .4em)}.card.empty.svelte-hurvu3:not(.visible){border:var(--text-primary) .2em solid;background:transparent}.card.shadow.svelte-hurvu3:not(.visible){background:var(--text-primary)}.card.spades.svelte-hurvu3,.card.clubs.svelte-hurvu3{color:var(--text-black)}.card.clubs.fourColor.svelte-hurvu3{color:var(--text-green)}.card.hearts.svelte-hurvu3,.card.diamonds.svelte-hurvu3{color:var(--text-red)}.card.diamonds.fourColor.svelte-hurvu3{color:var(--text-blue)}.label.svelte-hurvu3{visibility:hidden}.visible.svelte-hurvu3 .label:where(.svelte-hurvu3){align-items:center;display:flex;flex-direction:column;padding:.2em .1em;position:absolute;row-gap:.3em;visibility:visible;width:1em}.visible.svelte-hurvu3 .label.bottom:where(.svelte-hurvu3){bottom:0;right:0;transform:rotate(180deg)}.visible.svelte-hurvu3 .label.top:where(.svelte-hurvu3){left:0;top:0}.visible.svelte-hurvu3 .label:where(.svelte-hurvu3) .rank.rank-10:where(.svelte-hurvu3){letter-spacing:-.15em;padding-right:.25em}.visible.svelte-hurvu3 .label:where(.svelte-hurvu3) .suit:where(.svelte-hurvu3){font-size:.8em}.center.svelte-hurvu3{border-radius:.25em;height:5.5em;left:50%;padding:.1em;position:absolute;top:50%;transform:translate(-50%,-50%);width:2em}.card.bridge.svelte-hurvu3 .center:where(.svelte-hurvu3){width:1.7em}.card.small.svelte-hurvu3 .center:where(.svelte-hurvu3){height:3.5em;width:.3em}.center.face.svelte-hurvu3{background:var(--background-highlight)}.deck.svelte-1ns87h6{cursor:pointer;position:relative;width:5em;height:7em;margin:.5em .5em 1em;-webkit-tap-highlight-color:transparent}.deck.shuffling.svelte-1ns87h6{cursor:default}.deck.bridge.svelte-1ns87h6{width:4.5em}.deck.small.svelte-1ns87h6{height:5em;width:3em}.deck.svelte-1ns87h6:focus-visible{border-radius:.25em;outline:4px solid black;outline-offset:4px;transition:outline 125ms}.deck:focus-visible.shuffling.svelte-1ns87h6{outline-color:#00000040}.shadow-container.svelte-1ns87h6{z-index:-10;left:0;top:0;position:absolute;transition:transform .25s}main.svelte-1tag1lj{flex:1;display:flex;align-items:center;justify-content:center}.stack.svelte-o50ay1{position:relative}.stack.selected.svelte-o50ay1{bottom:.666em}.stack.svelte-o50ay1:focus-visible{border-radius:.25em;outline:4px solid black;outline-offset:4px}.nested.svelte-o50ay1{position:absolute;left:1.125em;top:0}.minimized-modal.svelte-ufcprb{position:fixed;bottom:-4rem;right:1.5rem;z-index:2;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:0px none;border-radius:.25em;cursor:pointer;padding:.33em .66em 1.33rem .5em;-webkit-tap-highlight-color:transparent;display:flex;align-items:center;gap:.25em;font-size:1rem;box-shadow:0 0 1rem #000000bf;transition:bottom 125ms,box-shadow 125ms,transform 125ms}.minimized-modal.open.svelte-ufcprb{bottom:-1rem}.minimized-modal.svelte-ufcprb:hover{transform:translateY(-.15rem)}.minimized-modal.svelte-ufcprb:active{box-shadow:0 -.25rem 1rem #000000bf;transform:translateY(.1rem)}.minimized-modal.svelte-ufcprb:focus-visible{outline:4px solid black;outline-offset:4px}.minimized-modal.svelte-ufcprb svg{height:1.5em;vertical-align:top;margin-right:.25em}table.svelte-5tdcck{margin:1em 0}th.svelte-5tdcck,td.svelte-5tdcck{padding:0}th.svelte-5tdcck{padding-right:1em;text-align:left}.actions.svelte-16kom67{text-align:center}.pileon.svelte-3hj6i4{flex:1;flex-wrap:wrap;font-size:10px;display:flex;align-content:center;align-items:center;justify-content:center;width:100vw;column-gap:1em;row-gap:1em;margin:auto}@media (max-aspect-ratio: 9/17){.pileon.svelte-3hj6i4{row-gap:1em}}.pile.svelte-3hj6i4{flex-basis:16.7%}.pile.deal-4x4.svelte-3hj6i4{flex-basis:20.1%}.pile.deal-3x5.svelte-3hj6i4{flex-basis:25.1%} diff --git a/assets/index-a771967f.css b/assets/index-a771967f.css deleted file mode 100644 index 27ba9a7..0000000 --- a/assets/index-a771967f.css +++ /dev/null @@ -1 +0,0 @@ -:root{--text-red: OrangeRed;--text-green: ForestGreen;--text-blue: RoyalBlue;--text-black: DarkSlateGray;--background: SeaGreen;--background-card: White;--background-highlight: NavajoWhite;--text-secondary: var(--text-black);--text-primary: DarkSlateGray;--text-grey: var(--text-black)}html,body{position:relative;width:100%;height:100%}body{background:var(--background);color:var(--text-primary);margin:-1px 0 0;padding:1px 0 0;box-sizing:border-box;font-family:Arial,sans-serif;display:flex;min-height:100vh;flex-direction:column}@media (max-width: 5rem) and (max-height: 7rem){body{font-size:50%}}@media (min-width: 10rem) and (min-height: 14rem){body{font-size:150%}}@media (min-width: 15rem) and (min-height: 21rem){body{font-size:200%}}@media (min-width: 20rem) and (min-height: 28rem){body{font-size:300%}}a{color:var(--text-primary);text-decoration:underline}a:visited{color:var(--text-primary)}a:hover,a:focus{outline:none;text-decoration-style:double}footer.svelte-ivyywu{font-size:1rem;padding:1rem 0 .5rem;text-align:center}div.icon-button.svelte-7d82q0.svelte-7d82q0{display:inline-flex;flex-direction:column;justify-content:center;height:4.5626rem;-webkit-tap-highlight-color:transparent}div.icon-button.svelte-7d82q0:hover .content.svelte-7d82q0{transform:scale(1.1) translateY(-.15rem)}div.icon-button.svelte-7d82q0:active .icon.svelte-7d82q0{transform:translateY(.15rem)}div.content.svelte-7d82q0.svelte-7d82q0{display:inline-flex;flex-direction:column;align-items:center;transition:transform 125ms}.clickable.svelte-7d82q0.svelte-7d82q0{cursor:pointer}button.svelte-7d82q0.svelte-7d82q0{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0px none;color:inherit;padding:0;margin:.75rem}button.svelte-7d82q0.svelte-7d82q0:focus-visible{outline:3px solid black;border-radius:.5em}button.svelte-7d82q0 svg{height:2rem}div.label.svelte-7d82q0.svelte-7d82q0{font-size:1rem;font-weight:600;margin-top:-.75rem}.backdrop.svelte-fabgrs.svelte-fabgrs{position:fixed;top:0;left:0;height:100vh;width:100vw;z-index:4;-webkit-backdrop-filter:none;backdrop-filter:none;transition:backdrop-filter 125ms}.backdrop.open.svelte-fabgrs.svelte-fabgrs{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal.svelte-fabgrs.svelte-fabgrs{display:flex;flex-direction:column;position:fixed;background:white;z-index:6;font-size:1rem;overflow:hidden;box-sizing:border-box}.modal.center.svelte-fabgrs.svelte-fabgrs{top:50%;left:50%;max-height:90%;width:500px;max-width:100%;padding:0 1em 2em;box-shadow:0 .5rem 1rem #000000bf;opacity:0;transform:translate(-50%,-25%) scale(.25);transition:opacity 125ms,transform 125ms}.modal.center.open.svelte-fabgrs.svelte-fabgrs{opacity:1;transform:translate(-50%,-50%) scale(1)}@media (min-width: 501px){.modal.center.svelte-fabgrs.svelte-fabgrs{border-radius:.25em}}.modal.left.svelte-fabgrs.svelte-fabgrs{top:-2vh;left:0;height:104vh;max-width:95%;padding:2vh 1em;box-shadow:.5rem 0 1rem #000000bf;opacity:0;transform:translate(-50%);transition:opacity 125ms,transform 125ms}.modal.left.svelte-fabgrs .content.svelte-fabgrs{flex:1}.modal.left.open.svelte-fabgrs.svelte-fabgrs{opacity:1;transform:translate(0)}@media (display-mode: window-controls-overlay){.modal.left.window-controls-on-left.svelte-fabgrs.svelte-fabgrs{border-radius:0 .25em 0 0;height:calc(102vh - env(titlebar-area-height) - 1rem);padding:0 1em 2vh;top:calc(env(titlebar-area-height) + 1rem)}}.modal.svelte-fabgrs .header.svelte-fabgrs{display:flex;align-items:center}.modal.svelte-fabgrs .content.svelte-fabgrs{overflow:auto}.modal.svelte-fabgrs h2.svelte-fabgrs{flex:1;font-size:1.5em;margin:1em 0}button.svelte-fhaqyy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;color:inherit;font:inherit;padding:0;text-decoration:underline;cursor:pointer}button.pressed.svelte-fhaqyy{cursor:default;text-decoration:none}button.svelte-fhaqyy:focus-visible{outline:3px solid black;outline-offset:2px;border-radius:.125em}.titlebar.svelte-vd9w7o.svelte-vd9w7o{app-region:drag;display:flex;margin-bottom:.25em}.window-controls.svelte-vd9w7o.svelte-vd9w7o{flex:1;height:env(titlebar-area-height,auto)}.menu.svelte-vd9w7o.svelte-vd9w7o{app-region:no-drag;transition:margin-top 125ms}.menu.below-titlebar.svelte-vd9w7o.svelte-vd9w7o{margin-top:env(titlebar-area-height)}.drawer.svelte-vd9w7o.svelte-vd9w7o{display:flex;height:100%;flex-direction:column}.drawer.svelte-vd9w7o ul.svelte-vd9w7o{list-style-type:none;padding:0}.drawer.svelte-vd9w7o li.svelte-vd9w7o{padding:1em 0;border-top:1px solid currentColor}.drawer.svelte-vd9w7o li.svelte-vd9w7o:last-of-type{border-bottom:1px solid currentColor}.drawer.svelte-vd9w7o .whitespace.svelte-vd9w7o{flex:1}.drawer.svelte-vd9w7o table.svelte-vd9w7o{font-size:1rem;margin:0 0 2em;width:100%}.drawer.svelte-vd9w7o table th.svelte-vd9w7o,.drawer.svelte-vd9w7o table td.svelte-vd9w7o{padding:.5em 0}.drawer.svelte-vd9w7o table th.svelte-vd9w7o{padding-right:1em;text-align:left}svg.svelte-1jimf84{height:1em}svg.flip.svelte-1jimf84{transform:scaleY(-1)}.center-pattern.svelte-1sm49dl.svelte-1sm49dl{box-sizing:border-box;display:flex;flex-direction:column;font-size:.5em;height:100%;padding:0 .25em;width:100%}.row.svelte-1sm49dl.svelte-1sm49dl{align-items:center;display:flex;justify-content:space-between}.row.grow.svelte-1sm49dl.svelte-1sm49dl{flex-grow:1}.row.svelte-1sm49dl.svelte-1sm49dl:only-child{margin:auto 0}.row.svelte-1sm49dl span.svelte-1sm49dl:only-child{margin:0 auto}.screen-reader-only.svelte-3uotpv{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}.card.svelte-hurvu3.svelte-hurvu3{border-radius:.25em;box-sizing:border-box;display:block;font-family:sans-serif;position:relative;-webkit-user-select:none;user-select:none;width:5em;height:7em}.card.stack-left.svelte-hurvu3.svelte-hurvu3{box-shadow:-3px 0 2.5px #2f4f4faa}.card.bridge.svelte-hurvu3.svelte-hurvu3{width:4.5em}.card.small.svelte-hurvu3.svelte-hurvu3{width:3em;height:5em}.card.visible.svelte-hurvu3.svelte-hurvu3{border-width:0;background-color:var(--background-card)}.card.hidden.svelte-hurvu3.svelte-hurvu3:not(.visible){border:.2em white solid;background:repeating-linear-gradient(60deg,transparent,transparent .35em,white .05em,white .4em),repeating-linear-gradient(-60deg,orangered,orangered .35em,white .05em,white .4em)}.card.empty.svelte-hurvu3.svelte-hurvu3:not(.visible){border:var(--text-primary) .2em solid;background:transparent}.card.shadow.svelte-hurvu3.svelte-hurvu3:not(.visible){background:var(--text-primary)}.card.spades.svelte-hurvu3.svelte-hurvu3,.card.clubs.svelte-hurvu3.svelte-hurvu3{color:var(--text-black)}.card.clubs.fourColor.svelte-hurvu3.svelte-hurvu3{color:var(--text-green)}.card.hearts.svelte-hurvu3.svelte-hurvu3,.card.diamonds.svelte-hurvu3.svelte-hurvu3{color:var(--text-red)}.card.diamonds.fourColor.svelte-hurvu3.svelte-hurvu3{color:var(--text-blue)}.label.svelte-hurvu3.svelte-hurvu3{visibility:hidden}.visible.svelte-hurvu3 .label.svelte-hurvu3{align-items:center;display:flex;flex-direction:column;padding:.2em .1em;position:absolute;row-gap:.3em;visibility:visible;width:1em}.visible.svelte-hurvu3 .label.bottom.svelte-hurvu3{bottom:0;right:0;transform:rotate(180deg)}.visible.svelte-hurvu3 .label.top.svelte-hurvu3{left:0;top:0}.visible.svelte-hurvu3 .label .rank.rank-10.svelte-hurvu3{letter-spacing:-.15em;padding-right:.25em}.visible.svelte-hurvu3 .label .suit.svelte-hurvu3{font-size:.8em}.center.svelte-hurvu3.svelte-hurvu3{border-radius:.25em;height:5.5em;left:50%;padding:.1em;position:absolute;top:50%;transform:translate(-50%,-50%);width:2em}.card.bridge.svelte-hurvu3 .center.svelte-hurvu3{width:1.7em}.card.small.svelte-hurvu3 .center.svelte-hurvu3{height:3.5em;width:.3em}.center.face.svelte-hurvu3.svelte-hurvu3{background:var(--background-highlight)}.deck.svelte-1ns87h6{cursor:pointer;position:relative;width:5em;height:7em;margin:.5em .5em 1em;-webkit-tap-highlight-color:transparent}.deck.shuffling.svelte-1ns87h6{cursor:default}.deck.bridge.svelte-1ns87h6{width:4.5em}.deck.small.svelte-1ns87h6{height:5em;width:3em}.deck.svelte-1ns87h6:focus-visible{border-radius:.25em;outline:4px solid black;outline-offset:4px;transition:outline 125ms}.deck:focus-visible.shuffling.svelte-1ns87h6{outline-color:#00000040}.shadow-container.svelte-1ns87h6{z-index:-10;left:0;top:0;position:absolute;transition:transform .25s}main.svelte-1tag1lj{flex:1;display:flex;align-items:center;justify-content:center}.stack.svelte-o50ay1{position:relative}.stack.selected.svelte-o50ay1{bottom:.666em}.stack.svelte-o50ay1:focus-visible{border-radius:.25em;outline:4px solid black;outline-offset:4px}.nested.svelte-o50ay1{position:absolute;left:1.125em;top:0}.minimized-modal.svelte-ufcprb{position:fixed;bottom:-4rem;right:1.5rem;z-index:2;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:white;border:0px none;border-radius:.25em;cursor:pointer;padding:.33em .66em 1.33rem .5em;-webkit-tap-highlight-color:transparent;display:flex;align-items:center;gap:.25em;font-size:1rem;box-shadow:0 0 1rem #000000bf;transition:bottom 125ms,box-shadow 125ms,transform 125ms}.minimized-modal.open.svelte-ufcprb{bottom:-1rem}.minimized-modal.svelte-ufcprb:hover{transform:translateY(-.15rem)}.minimized-modal.svelte-ufcprb:active{box-shadow:0 -.25rem 1rem #000000bf;transform:translateY(.1rem)}.minimized-modal.svelte-ufcprb:focus-visible{outline:4px solid black;outline-offset:4px}.minimized-modal.svelte-ufcprb svg{height:1.5em;vertical-align:top;margin-right:.25em}table.svelte-5tdcck{margin:1em 0}th.svelte-5tdcck,td.svelte-5tdcck{padding:0}th.svelte-5tdcck{padding-right:1em;text-align:left}.actions.svelte-16kom67{text-align:center}.pileon.svelte-3hj6i4{flex:1;flex-wrap:wrap;font-size:10px;display:flex;align-content:center;align-items:center;justify-content:center;width:100vw;column-gap:1em;row-gap:1em;margin:auto}@media (max-aspect-ratio: 9/17){.pileon.svelte-3hj6i4{row-gap:1em}}.pile.svelte-3hj6i4{flex-basis:16.7%}.pile.deal-4x4.svelte-3hj6i4{flex-basis:20.1%}.pile.deal-3x5.svelte-3hj6i4{flex-basis:25.1%} diff --git a/assets/index-e232b918.js b/assets/index-e232b918.js deleted file mode 100644 index f4b1d12..0000000 --- a/assets/index-e232b918.js +++ /dev/null @@ -1,20 +0,0 @@ -var gr=Object.defineProperty;var hr=(t,e,n)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var vt=(t,e,n)=>(hr(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function te(){}function vr(t,e){for(const n in e)t[n]=e[n];return t}function Fn(t){return t()}function Kt(){return Object.create(null)}function ye(t){t.forEach(Fn)}function de(t){return typeof t=="function"}function Y(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function pr(t){return Object.keys(t).length===0}function Mn(t,...e){if(t==null){for(const r of e)r(void 0);return te}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function br(t){let e;return Mn(t,n=>e=n)(),e}function pe(t,e,n){t.$$.on_destroy.push(Mn(e,n))}function ot(t,e,n,r){if(t){const i=Ln(t,e,n,r);return t[0](i)}}function Ln(t,e,n,r){return t[1]&&r?vr(n.ctx.slice(),t[1](r(e))):n.ctx}function lt(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],l=Math.max(e.dirty.length,i.length);for(let a=0;a32){const e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function b(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function yr(t){return Array.from(t.childNodes)}function fe(t,e){e=""+e,t.data!==e&&(t.data=e)}function Ee(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}let We;function _r(){if(We===void 0){We=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{We=!0}}return We}function wr(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const r=C("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;const i=_r();let o;return i?(r.src="data:text/html, - + + - diff --git a/sw.js b/sw.js index c53955b..2a54e68 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),f={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map((e=>f[e]||l(e)))).then((e=>(r(...e),o)))}}define(["./workbox-89dafc17"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/index-a771967f.css",revision:null},{url:"assets/index-e232b918.js",revision:null},{url:"index.html",revision:"24c0805f22d8e63469d89e191a4b0faa"},{url:"registerSW.js",revision:"19bf7f5bebfbbbd1c734575aae27e612"},{url:"manifest.webmanifest",revision:"178cb6b081b36b79d616305b9316e663"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),u={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map((e=>u[e]||l(e)))).then((e=>(r(...e),o)))}}define(["./workbox-e3490c72"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/index-BSOoYR09.js",revision:null},{url:"assets/index-C0X67hV1.css",revision:null},{url:"index.html",revision:"82d56d100d8b8ae9e5c4aa2f8459acf0"},{url:"registerSW.js",revision:"19bf7f5bebfbbbd1c734575aae27e612"},{url:"manifest.webmanifest",revision:"178cb6b081b36b79d616305b9316e663"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); diff --git a/workbox-89dafc17.js b/workbox-89dafc17.js deleted file mode 100644 index 872d107..0000000 --- a/workbox-89dafc17.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=i&&i.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:r})}catch(t){a=Promise.reject(t)}const h=i&&i.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const o=i.match({url:t,sameOrigin:e,request:s,event:n});if(o)return r=o,(Array.isArray(r)&&0===r.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new r((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new i(t,e,n);else if("function"==typeof t)o=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}try{self["workbox:core:7.0.0"]&&_()}catch(t){}const u=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class l extends Error{constructor(t,e){super(u(t,e)),this.name=t,this.details=e}}const f={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},w=t=>[f.prefix,t,f.suffix].filter((t=>t&&t.length>0)).join("-"),d=t=>t||w(f.precache);function p(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function y(t){if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:s}=t;if(!s)throw new l("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(s,location.href);return{cacheKey:t.href,url:t.href}}const n=new URL(s,location.href),r=new URL(s,location.href);return n.searchParams.set("__WB_REVISION__",e),{cacheKey:n.href,url:r.href}}class g{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class R{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let m;async function v(t,e){let s=null;if(t.url){s=new URL(t.url).origin}if(s!==self.location.origin)throw new l("cross-origin-copy-response",{origin:s});const n=t.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=e?e(r):r,o=function(){if(void 0===m){const t=new Response("");if("body"in t)try{new Response(t.body),m=!0}catch(t){m=!1}m=!1}return m}()?n.body:await n.blob();return new Response(o,i)}try{self["workbox:core:7.0.0"]&&_()}catch(t){}const q={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},U=t=>[q.prefix,t,q.suffix].filter((t=>t&&t.length>0)).join("-"),b=t=>t||U(q.runtime),L=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class x extends Error{constructor(t,e){super(L(t,e)),this.name=t,this.details=e}}function E(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class O{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const C=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function N(t){return"string"==typeof t?new Request(t):t}class k{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new O,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let s=N(t);if("navigate"===s.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))s=await t({request:s.clone(),event:e})}catch(t){if(t instanceof Error)throw new x("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=s.clone();try{let t;t=await fetch(s,"navigate"===s.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw n&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:n.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=N(t);let s;const{cacheName:n,matchOptions:r}=this.l,i=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const s=N(t);var n;await(n=0,new Promise((t=>setTimeout(t,n))));const r=await this.getCacheKey(s,"write");if(!e)throw new x("cache-put-with-no-response",{url:(i=r.url,new URL(String(i),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var i;const o=await this.v(e);if(!o)return!1;const{cacheName:c,matchOptions:a}=this.l,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),l=u?await async function(t,e,s,n){const r=E(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,i);for(const e of o)if(r===E(e.url,s))return t.match(e,n)}(h,r.clone(),["__WB_REVISION__"],a):null;try{await h.put(r,u?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of C)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:l,newResponse:o.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=N(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class S{constructor(t={}){this.cacheName=b(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new k(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.U(i,r,s,e)]}async q(t,e,s){let n;await t.runCallbacks("handlerWillStart",{event:s,request:e});try{if(n=await this.L(e,t),!n||"error"===n.type)throw new x("no-response",{url:e.url})}catch(r){if(r instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(n=await i({error:r,event:s,request:e}),n)break;if(!n)throw r}for(const r of t.iterateCallbacks("handlerWillRespond"))n=await r({event:s,request:e,response:n});return n}async U(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}class K extends S{constructor(t={}){t.cacheName=d(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(K.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.C(t,e))}async C(t,e){let s;const n=e.params||{};if(!this._)throw new l("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const r=n.integrity,i=t.integrity,o=!i||i===r;s=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||r:void 0})),r&&o&&"no-cors"!==t.mode&&(this.N(),await e.cachePut(t,s.clone()))}return s}async O(t,e){this.N();const s=await e.fetch(t);if(!await e.cachePut(t,s.clone()))throw new l("bad-precaching-response",{url:t.url,status:s.status});return s}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==K.copyRedirectedCacheableResponsesPlugin&&(n===K.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(K.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}K.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},K.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await v(t):t};class P{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.k=new Map,this.S=new Map,this.K=new Map,this.l=new K({cacheName:d(t),plugins:[...e,new R({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.P||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.P=!0)}addToCacheList(t){const e=[];for(const s of t){"string"==typeof s?e.push(s):s&&void 0===s.revision&&e.push(s.url);const{cacheKey:t,url:n}=y(s),r="string"!=typeof s&&s.revision?"reload":"default";if(this.k.has(n)&&this.k.get(n)!==t)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this.k.get(n),secondEntry:t});if("string"!=typeof s&&s.integrity){if(this.K.has(t)&&this.K.get(t)!==s.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:n});this.K.set(t,s.integrity)}if(this.k.set(n,t),this.S.set(n,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return p(t,(async()=>{const e=new g;this.strategy.plugins.push(e);for(const[e,s]of this.k){const n=this.K.get(s),r=this.S.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return p(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.k.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.k}getCachedURLs(){return[...this.k.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.k.get(e.href)}getIntegrityForCacheKey(t){return this.K.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new l("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let T;const W=()=>(T||(T=new P),T);class j extends r{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(i,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends r{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.T(t)),t),this.W=e,this.j=s}T({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.j)if(t.test(s))return!1;return!!this.W.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=d();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.createHandlerBoundToURL=function(t){return W().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){W().precache(t)}(t),function(t){const e=W();h(new j(e,t))}(e)},t.registerRoute=h})); diff --git a/workbox-e3490c72.js b/workbox-e3490c72.js new file mode 100644 index 0000000..800fb2f --- /dev/null +++ b/workbox-e3490c72.js @@ -0,0 +1 @@ +define(["exports"],(function(t){"use strict";try{self["workbox:core:7.2.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.2.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.2.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.2.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));