playlight-sdk 0.2.11 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.defineProperty,v=t=>{throw TypeError(t)},p=(t,e,n)=>e.has(t)||v("Cannot "+n),h=(t,e,n)=>(p(t,e,"read from private field"),n?n.call(t):e.get(t)),g=(t,e,n)=>e.has(t)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),m=(t,e,n,r)=>(p(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),y=(t,e,n)=>(p(t,e,"access private method"),n);var b=Array.isArray,w=Array.prototype.indexOf,x=Array.from,$=Object.defineProperty,k=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyDescriptors,C=Object.prototype,S=Array.prototype,M=Object.getPrototypeOf,P=Object.isExtensible;function I(t){return"function"==typeof t}const j=()=>{};function z(t){return t()}function T(t){for(var e=0;e<t.length;e++)t[e]()}const O=256,E=1024,N=2048,A=4096,B=8192,W=16384,L=65536,D=1<<21,q=Symbol("$state"),G=Symbol("legacy props"),F=Symbol("");function H(t){return t===this.v}function R(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function V(t){return!R(t,this.v)}let K=!1;const U=Symbol();function Y(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Z=null;function J(t){Z=t}function X(t,e=!1,n){var r=Z={p:Z,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};K&&!e&&(Z.l={s:null,u:null,r1:[],r2:ot(!1)}),It((()=>{r.d=!0}))}function Q(t){const e=Z;if(null!==e){const t=e.e;if(null!==t){var n=se,r=ie;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];ue(i.effect),ae(i.reaction),zt(i.fn)}}finally{ue(n),ae(r)}}Z=e.p,e.m=!0}return{}}function tt(){return!K||null!==Z&&null===Z.l}function et(t,e){if("object"!=typeof t||null===t||q in t)return t;const n=M(t);if(n!==C&&n!==S)return t;var r=new Map,o=b(t),i=it(0),l=ie,a=t=>{var e,n=ie;return ae(l),e=t(),ae(n),e};return o&&r.set("length",it(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=r.get(e);return void 0===o?(o=a((()=>it(n.value))),r.set(e,o)):at(o,a((()=>et(n.value)))),!0},deleteProperty(t,e){var n=r.get(e);if(void 0===n)e in t&&r.set(e,a((()=>it(U))));else{if(o&&"string"==typeof e){var l=r.get("length"),s=Number(e);Number.isInteger(s)&&s<l.v&&at(l,s)}at(n,U),nt(i)}return!0},get(e,n,o){var i;if(n===q)return t;var l=r.get(n),s=n in e;if(void 0!==l||s&&!(null==(i=k(e,n))?void 0:i.writable)||(l=a((()=>it(et(s?e[n]:U)))),r.set(n,l)),void 0!==l){var u=ze(l);return u===U?void 0:u}return Reflect.get(e,n,o)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var o=r.get(e);o&&(n.value=ze(o))}else if(void 0===n){var i=r.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==U)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){var n;if(e===q)return!0;var o=r.get(e),i=void 0!==o&&o.v!==U||Reflect.has(t,e);return!((void 0!==o||null!==se&&(!i||(null==(n=k(t,e))?void 0:n.writable)))&&(void 0===o&&(o=a((()=>it(i?et(t[e]):U))),r.set(e,o)),ze(o)===U))&&i},set(t,e,n,l){var s,u=r.get(e),c=e in t;if(o&&"length"===e)for(var d=n;d<u.v;d+=1){var f=r.get(d+"");void 0!==f?at(f,U):d in t&&(f=a((()=>it(U))),r.set(d+"",f))}void 0===u?c&&!(null==(s=k(t,e))?void 0:s.writable)||(at(u=a((()=>it(void 0))),a((()=>et(n)))),r.set(e,u)):(c=u.v!==U,at(u,a((()=>et(n)))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(l,n),!c){if(o&&"string"==typeof e){var p=r.get("length"),h=Number(e);Number.isInteger(h)&&h>=p.v&&at(p,h+1)}nt(i)}return!0},ownKeys(t){ze(i);var e=Reflect.ownKeys(t).filter((t=>{var e=r.get(t);return void 0===e||e.v!==U}));for(var[n,o]of r)o.v===U||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function nt(t,e=1){at(t,t.v+e)}const rt=new Map;function ot(t,e){return{f:0,v:t,reactions:null,equals:H,rv:0,wv:0}}function it(t,e){const n=ot(t);return de(n),n}function lt(t,e=!1){var n;const r=ot(t);return e||(r.equals=V),K&&null!==Z&&null!==Z.l&&((n=Z.l).s??(n.s=[])).push(r),r}function at(t,e,n=!1){return null!==ie&&!le&&tt()&&18&ie.f&&!(null==ce?void 0:ce.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),st(t,n?et(e):e)}function st(t,e){if(!t.equals(e)){var n=t.v;ne?rt.set(t,e):rt.set(t,n),t.v=e,t.wv=ye(),ct(t,N),tt()&&null!==se&&se.f&E&&!(96&se.f)&&(null===pe?pe=[t]:pe.push(t))}return e}function ut(t,e=1){var n=ze(t),r=1===e?n++:n--;return at(t,n),r}function ct(t,e){var n=t.reactions;if(null!==n)for(var r=tt(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&N||(r||l!==se)&&(Ee(l,e),1280&a&&(2&a?ct(l,A):Ie(l)))}}var dt,ft,vt,pt,ht;function gt(t=""){return document.createTextNode(t)}function mt(t){return pt.call(t)}function yt(t){return ht.call(t)}function bt(t,e){return mt(t)}function wt(t,e){var n=mt(t);return n instanceof Comment&&""===n.data?yt(n):n}function xt(t,e=1,n=!1){let r=t;for(;e--;)r=yt(r);return r}function $t(t){var e=2050,n=null!==ie&&2&ie.f?ie:null;return null===se||null!==n&&n.f&O?e|=O:se.f|=1048576,{ctx:Z,deps:null,effects:null,equals:H,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??se}}function kt(t){const e=$t(t);return de(e),e}function _t(t){const e=$t(t);return e.equals=V,e}function Ct(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)Dt(e[n])}}function St(t){var e=function(t){var e,n=se;ue(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{Ct(t),e=$e(t)}finally{ue(n)}return e}(t);Ee(t,(me||t.f&O)&&null!==t.deps?A:E),t.equals(e)||(t.v=e,t.wv=ye())}function Mt(t){null===se&&null===ie&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==ie&&ie.f&O&&null===se&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),ne&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Pt(t,e,n,r=!0){var o,i,l,a=se,s={ctx:Z,deps:null,nodes_start:null,nodes_end:null,f:t|N,first:null,fn:e,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(n)try{Ce(s),s.f|=32768}catch(o){throw Dt(s),o}else null!==e&&Ie(s);if((!n||null!==s.deps||null!==s.first||null!==s.nodes_start||null!==s.teardown||1048704&s.f)&&r&&(null!==a&&(o=s,null===(l=(i=a).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==ie&&2&ie.f)){var u=ie;(u.effects??(u.effects=[])).push(s)}return s}function It(t){const e=Pt(8,null,!1);return Ee(e,E),e.teardown=t,e}function jt(t){if(Mt(),!(null!==se&&32&se.f&&null!==Z)||Z.m)return zt(t);var e=Z;(e.e??(e.e=[])).push({fn:t,effect:se,reaction:ie})}function zt(t){return Pt(4,t,!1)}function Tt(t,e){var n=Z,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=Et((()=>{t(),r.ran||(r.ran=!0,at(n.l.r2,!0),Te(e))}))}function Ot(){var t=Z;Et((()=>{if(ze(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&E&&Ee(n,A),be(n)&&Ce(n),e.ran=!1}t.l.r2.v=!1}}))}function Et(t){return Pt(8,t,!0)}function Nt(t,e=[],n=$t){const r=e.map(n);return At((()=>t(...r.map(ze))))}function At(t,e=0){return Pt(24|e,t,!0)}function Bt(t,e=!0){return Pt(40,t,!0,e)}function Wt(t){var e=t.teardown;if(null!==e){const t=ne,n=ie;re(!0),ae(null);try{e.call(null)}finally{re(t),ae(n)}}}function Lt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;64&n.f?n.parent=null:Dt(n,e),n=r}}function Dt(t,e=!0){var n=!1;if((e||524288&t.f)&&null!==t.nodes_start){for(var r=t.nodes_start,o=t.nodes_end;null!==r;){var i=r===o?null:yt(r);r.remove(),r=i}n=!0}Lt(t,e&&!n),_e(t,0),Ee(t,W);var l=t.transitions;if(null!==l)for(const s of l)s.stop();Wt(t);var a=t.parent;null!==a&&null!==a.first&&qt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function qt(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Gt(t,e){var n=[];Ht(t,n,!0),Ft(n,(()=>{Dt(t),e&&e()}))}function Ft(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function Ht(t,e,n){if(!(t.f&B)){if(t.f^=B,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;Ht(r,e,!!(r.f&L||32&r.f)&&n),r=o}}}function Rt(t){Vt(t,!0)}function Vt(t,e){if(t.f&B){t.f^=B,t.f&E||(t.f^=E),be(t)&&(Ee(t,N),Ie(t));for(var n=t.first;null!==n;){var r=n.next;Vt(n,!!(n.f&L||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let Kt=[],Ut=[];function Yt(){var t=Kt;Kt=[],T(t)}function Zt(t){0===Kt.length&&queueMicrotask(Yt),Kt.push(t)}function Jt(){var t;Kt.length>0&&Yt(),Ut.length>0&&(t=Ut,Ut=[],T(t))}let Xt=!1,Qt=!1,te=null,ee=!1,ne=!1;function re(t){ne=t}let oe=[],ie=null,le=!1;function ae(t){ie=t}let se=null;function ue(t){se=t}let ce=null;function de(t){null!==ie&&ie.f&D&&(null===ce?ce=[t]:ce.push(t))}let fe=null,ve=0,pe=null,he=1,ge=0,me=!1;function ye(){return++he}function be(t){var e,n=t.f;if(n&N)return!0;if(n&A){var r=t.deps,o=!!(n&O);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==se&&!me,u=r.length;if(a||s){var c=t,d=c.parent;for(i=0;i<u;i++)l=r[i],!a&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(c))||(l.reactions??(l.reactions=[])).push(c);a&&(c.f^=512),!s||null===d||d.f&O||(c.f^=O)}for(i=0;i<u;i++)if(be(l=r[i])&&St(l),l.wv>t.wv)return!0}o&&(null===se||me)||Ee(t,E)}return!1}function we(t,e,n,r){if(Xt){if(null===n&&(Xt=!1),!((o=e).f&W||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(Xt=!0),function(t,e){for(var n=e;null!==n;){if(128&n.f)try{return void n.fn(t)}catch{n.f^=128}n=n.parent}throw Xt=!1,t}(t,e);var o}function xe(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];(null==ce?void 0:ce.includes(t))||(2&i.f?xe(i,e,!1):e===i&&(n?Ee(i,N):i.f&E&&Ee(i,A),Ie(i)))}}function $e(t){var e,n=fe,r=ve,o=pe,i=ie,l=me,a=ce,s=Z,u=le,c=t.f;fe=null,ve=0,pe=null,me=!!(c&O)&&(le||!ee||null===ie),ie=96&c?null:t,ce=null,J(t.ctx),le=!1,ge++,t.f|=D;try{var d=(0,t.fn)(),f=t.deps;if(null!==fe){var v;if(_e(t,ve),null!==f&&ve>0)for(f.length=ve+fe.length,v=0;v<fe.length;v++)f[ve+v]=fe[v];else t.deps=f=fe;if(!me)for(v=ve;v<f.length;v++)((e=f[v]).reactions??(e.reactions=[])).push(t)}else null!==f&&ve<f.length&&(_e(t,ve),f.length=ve);if(tt()&&null!==pe&&!le&&null!==f&&!(6146&t.f))for(v=0;v<pe.length;v++)xe(pe[v],t);return null!==i&&(ge++,null!==pe&&(null===o?o=pe:o.push(...pe))),d}finally{fe=n,ve=r,pe=o,ie=i,me=l,ce=a,J(s),le=u,t.f^=D}}function ke(t,e){let n=e.reactions;if(null!==n){var r=w.call(n,t);if(-1!==r){var o=n.length-1;0===o?n=e.reactions=null:(n[r]=n[o],n.pop())}}null===n&&2&e.f&&(null===fe||!fe.includes(e))&&(Ee(e,A),768&e.f||(e.f^=512),Ct(e),_e(e,0))}function _e(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)ke(t,n[r])}function Ce(t){var e=t.f;if(!(e&W)){Ee(t,E);var n=se,r=Z,o=ee;se=t,ee=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||Dt(e),e=n}}(t):Lt(t),Wt(t);var i=$e(t);t.teardown="function"==typeof i?i:null,t.wv=he,t.deps}catch(l){we(l,t,n,r||t.ctx)}finally{ee=o,se=n}}}function Se(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===te)throw t;we(t,te,null)}}function Me(){var t=ee;try{var e=0;for(ee=!0;oe.length>0;){e++>1e3&&Se();var n=oe,r=n.length;oe=[];for(var o=0;o<r;o++)Pe(je(n[o]))}}finally{Qt=!1,ee=t,te=null,rt.clear()}}function Pe(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{be(r)&&(Ce(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?qt(r):r.fn=null))}catch(o){we(o,r,null,r.ctx)}}}function Ie(t){Qt||(Qt=!0,queueMicrotask(Me));for(var e=te=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&E))return;e.f^=E}}oe.push(e)}function je(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&r&E||r&B)){if(4&r)e.push(n);else if(o)n.f^=E;else{var i=ie;try{ie=n,be(n)&&Ce(n)}catch(s){we(s,n,null,n.ctx)}finally{ie=i}}var l=n.first;if(null!==l){n=l;continue}}var a=n.parent;for(n=n.next;null===n&&null!==a;)n=a.next,a=a.parent}return e}function ze(t){var e=!!(2&t.f);if(null===ie||le){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&O||(n.f^=O)}}else if(!(null==ce?void 0:ce.includes(t))){var o=ie.deps;t.rv<ge&&(t.rv=ge,null===fe&&null!==o&&o[ve]===t?ve++:null===fe?fe=[t]:me&&fe.includes(t)||fe.push(t))}return e&&be(n=t)&&St(n),ne&&rt.has(t)?rt.get(t):t.v}function Te(t){var e=le;try{return le=!0,t()}finally{le=e}}const Oe=-7169;function Ee(t,e){t.f=t.f&Oe|e}function Ne(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(q in t)Ae(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&q in n&&Ae(n)}}function Ae(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{Ae(t[o],e)}catch(n){}const r=M(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=_(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Be(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const We=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Le(t){return We.includes(t)}const De={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function qe(t){return t=t.toLowerCase(),De[t]??t}const Ge=["touchstart","touchmove"];function Fe(t){return Ge.includes(t)}function He(t,e){if(e){const e=document.body;t.autofocus=!0,Zt((()=>{document.activeElement===e&&t.focus()}))}}let Re=!1;function Ve(t){var e=ie,n=se;ae(null),ue(null);try{return t()}finally{ae(e),ue(n)}}const Ke=new Set,Ue=new Set;function Ye(t,e,n,r={}){function o(t){if(r.capture||Xe.call(e,t),!t.cancelBubble)return Ve((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?Zt((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Ze(t,e,n,r,o){var i={capture:r,passive:o},l=Ye(t,e,n,i);e!==document.body&&e!==window&&e!==document||It((()=>{e.removeEventListener(t,l,i)}))}function Je(t){for(var e=0;e<t.length;e++)Ke.add(t[e]);for(var n of Ue)n(t)}function Xe(t){var e,n=this,r=n.ownerDocument,o=t.type,i=(null==(e=t.composedPath)?void 0:e.call(t))||[],l=i[0]||t.target,a=0,s=t.__root;if(s){var u=i.indexOf(s);if(-1!==u&&(n===document||n===window))return void(t.__root=n);var c=i.indexOf(n);if(-1===c)return;u<=c&&(a=u)}if((l=i[a]||t.target)!==n){$(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=ie,f=se;ae(null),ue(null);try{for(var v,p=[];null!==l;){var h=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(b(g)){var[m,...y]=g;m.apply(l,[t,...y])}else g.call(l,t)}catch(w){v?p.push(w):v=w}if(t.cancelBubble||h===n||null===h)break;l=h}if(v){for(let t of p)queueMicrotask((()=>{throw t}));throw v}}finally{t.__root=n,delete t.currentTarget,ae(d),ue(f)}}}function Qe(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function tn(t,e){var n=se;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function en(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Qe(i?t:"<!>"+t),r||(n=mt(n)));var e=o||vt?document.importNode(n,!0):n.cloneNode(!0);return r?tn(mt(e),e.lastChild):tn(e,e),e}}function nn(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=mt(Qe(o));r=mt(t)}var e=r.cloneNode(!0);return tn(e,e),e}}function rn(t=""){var e=gt(t+"");return tn(e,e),e}function on(){var t=document.createDocumentFragment(),e=document.createComment(""),n=gt();return t.append(e,n),tn(e,n),t}function ln(t,e){null!==t&&t.before(e)}let an=!0;function sn(t){an=t}function un(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function cn(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===dt){dt=window,ft=document,vt=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;pt=k(e,"firstChild").get,ht=k(e,"nextSibling").get,P(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),P(n)&&(n.__t=void 0)}}();var a=new Set,s=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!a.has(r)){a.add(r);var o=Fe(r);e.addEventListener(r,Xe,{passive:o});var i=dn.get(r);void 0===i?(document.addEventListener(r,Xe,{passive:o}),dn.set(r,1)):dn.set(r,i+1)}}};s(x(Ke)),Ue.add(s);var u=void 0,c=function(t){const e=Pt(64,t,!0);return(t={})=>new Promise((n=>{t.outro?Gt(e,(()=>{Dt(e),n(void 0)})):(Dt(e),n(void 0))}))}((()=>{var c=n??e.appendChild(gt());return Bt((()=>{i&&(X({}),Z.c=i),o&&(r.$$events=o),an=l,u=t(c,r)||{},an=!0,i&&Q()})),()=>{var t;for(var r of a){e.removeEventListener(r,Xe);var o=dn.get(r);0==--o?(document.removeEventListener(r,Xe),dn.delete(r)):dn.set(r,o)}Ue.delete(s),c!==n&&(null==(t=c.parentNode)||t.removeChild(c))}}));return fn.set(u,c),u}(t,e)}const dn=new Map;let fn=new WeakMap;function vn(t,e,[n,r]=[0,0]){var o=t,i=null,l=null,a=U,s=!1;const u=(t,e=!0)=>{s=!0,c(e,t)},c=(t,e)=>{a!==(a=t)&&(a?(i?Rt(i):e&&(i=Bt((()=>e(o)))),l&&Gt(l,(()=>{l=null}))):(l?Rt(l):e&&(l=Bt((()=>e(o,[n+1,r])))),i&&Gt(i,(()=>{i=null}))))};At((()=>{s=!1,e(u),s||c(null,null)}),n>0?L:0)}let pn=null;function hn(t){pn=t}function gn(t,e){return e}function mn(t,e,n,r,o,i=null){var l=t,a={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(gt()));var s=null,u=!1,c=_t((()=>{var t=n();return b(t)?t:null==t?[]:x(t)}));At((()=>{var t=ze(c),d=t.length;u&&0===d||(u=0===d,function(t,e,n,r,o,i,l){var a,s,u,c,d,f,v,p,h,g,m=!!(8&o),y=!!(3&o),b=t.length,w=e.items,$=e.first,k=null,_=[],C=[];if(m)for(g=0;g<b;g+=1)p=i(v=t[g],g),void 0!==(h=w.get(p))&&(null==(a=h.a)||a.measure(),(f??(f=new Set)).add(h));for(g=0;g<b;g+=1)if(p=i(v=t[g],g),void 0!==(h=w.get(p))){if(y&&yn(h,v,g,o),h.e.f&B&&(Rt(h.e),m&&(null==(s=h.a)||s.unfix(),(f??(f=new Set)).delete(h))),h!==$){if(void 0!==d&&d.has(h)){if(_.length<C.length){var S,M=C[0];k=M.prev;var P=_[0],I=_[_.length-1];for(S=0;S<_.length;S+=1)wn(_[S],M,n);for(S=0;S<C.length;S+=1)d.delete(C[S]);xn(e,P.prev,I.next),xn(e,k,P),xn(e,I,M),$=M,k=I,g-=1,_=[],C=[]}else d.delete(h),wn(h,$,n),xn(e,h.prev,h.next),xn(e,h,null===k?e.first:k.next),xn(e,k,h),k=h;continue}for(_=[],C=[];null!==$&&$.k!==p;)$.e.f&B||(d??(d=new Set)).add($),C.push($),$=$.next;if(null===$)continue;h=$}_.push(h),k=h,$=h.next}else k=bn($?$.e.nodes_start:n,e,k,null===k?e.first:k.next,v,p,g,r,o,l),w.set(p,k),_=[],C=[],$=k.next;if(null!==$||void 0!==d){for(var j=void 0===d?[]:x(d);null!==$;)$.e.f&B||j.push($),$=$.next;var z=j.length;if(z>0){var T=4&o&&0===b?n:null;if(m){for(g=0;g<z;g+=1)null==(u=j[g].a)||u.measure();for(g=0;g<z;g+=1)null==(c=j[g].a)||c.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)Ht(e[l].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var s=n.parentNode;s.textContent="",s.append(n),r.clear(),xn(t,e[0].prev,e[i-1].next)}Ft(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),xn(t,o.prev,o.next)),Dt(o.e,!a)}}))}(e,j,T,w)}}m&&Zt((()=>{var t;if(void 0!==f)for(h of f)null==(t=h.a)||t.apply()})),se.first=e.first&&e.first.e,se.last=k&&k.e}(t,a,l,o,e,r,n),null!==i&&(0===d?s?Rt(s):s=Bt((()=>i(l))):null!==s&&Gt(s,(()=>{s=null}))),ze(c))}))}function yn(t,e,n,r){1&r&&st(t.v,e),2&r?st(t.i,n):t.i=n}function bn(t,e,n,r,o,i,l,a,s,u){var c=pn,d=1&s?16&s?ot(o):lt(o):o,f=2&s?ot(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};pn=v;try{return v.e=Bt((()=>a(t,d,f,u)),!1),v.e.prev=n&&n.e,v.e.next=r&&r.e,null===n?e.first=v:(n.next=v,n.e.next=v.e),null!==r&&(r.prev=v,r.e.prev=v.e),v}finally{pn=c}}function wn(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var l=yt(i);o.before(i),i=l}}function xn(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}function $n(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],a=!1;!0===l&&(l=e["default"===n?"children":n],a=!0),void 0===l?null!==o&&o(t):l(t,a?()=>r:r)}function kn(t,e,n){var r,o,i=t;At((()=>{r!==(r=e())&&(o&&(Gt(o),o=null),r&&(o=Bt((()=>n(i,r)))))}),L)}function _n(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=_n(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Cn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=_n(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const Sn=[..." \t\n\r\f \v\ufeff"];function Mn(t,e=!1){var n=e?" !important;":";",r="";for(var o in t){var i=t[o];null!=i&&""!==i&&(r+=" "+o+": "+i+n)}return r}function Pn(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function In(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var a=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,l=0;(l=r.indexOf(o,l))>=0;){var a=l+i;0!==l&&!Sn.includes(r[l-1])||a!==r.length&&!Sn.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==a?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a),t.__className=n}else if(i&&o!==i)for(var s in i){var u=!!i[s];null!=o&&u===!!o[s]||t.classList.toggle(s,u)}return i}function jn(t,e={},n,r){for(var o in n){var i=n[o];e[o]!==i&&(null==n[o]?t.style.removeProperty(o):t.style.setProperty(o,i,r))}}function zn(t,e,n,r){if(t.__style!==e){var o=function(t,e){if(e){var n,r,o="";if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,l=0,a=!1,s=[];n&&s.push(...Object.keys(n).map(Pn)),r&&s.push(...Object.keys(r).map(Pn));var u=0,c=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(a?"/"===f&&"*"===t[d-1]&&(a=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?a=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!a&&!1===i&&0===l)if(":"===f&&-1===c)c=d;else if(";"===f||d===e-1){if(-1!==c){var v=Pn(t.substring(u,c).trim());s.includes(v)||(";"!==f&&d++,o+=" "+t.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(o+=Mn(n)),r&&(o+=Mn(r,!0)),""===(o=o.trim())?null:o}return null==t?null:String(t)}(e,r);null==o?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(jn(t,null==n?void 0:n[0],r[0]),jn(t,null==n?void 0:n[1],r[1],"important")):jn(t,n,r));return r}const Tn=Symbol("class"),On=Symbol("style"),En=Symbol("is custom element"),Nn=Symbol("is html");function An(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Bn(t,e,n,r){var o=Ln(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[F]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&qn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Wn(t,e,n,r,o=!1){var i=Ln(t),l=i[En],a=!i[Nn],s=e||{},u="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=Cn(n.class):(r||n[Tn])&&(n.class=null),n[On]&&(n.style??(n.style=null));var d=qn(t);for(const m in n){let o=n[m];if(u&&"value"===m&&null==o)t.value=t.__value="",s[m]=o;else if("class"!==m)if("style"!==m){var f=s[m];if(o!==f){s[m]=o;var v=m[0]+m[1];if("$$"!==v)if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=Le(r);if(Be(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=o)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=o)if(p)t[`__${r}`]=o,Je([r]);else{let o=function(t){s[m].call(this,t)};s[n]=Ye(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m)Bn(t,m,o);else if("autofocus"===m)He(t,Boolean(o));else if(l||"__value"!==m&&("value"!==m||null==o))if("selected"===m&&u)An(t,o);else{var h=m;a||(h=qe(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=o||l||g)g||d.includes(h)&&(l||"string"!=typeof o)?t[h]=o:"function"!=typeof o&&Bn(t,h,o);else if(i[m]=null,"value"===h||"checked"===h){let n=t;const r=void 0===e;if("value"===h){let t=n.defaultValue;n.removeAttribute(h),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(h),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(m)}else t.value=t.__value=o}}else zn(t,o,null==e?void 0:e[On],n[On]),s[m]=o,s[On]=n[On];else In(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,o,r,null==e?void 0:e[Tn],n[Tn]),s[m]=o,s[Tn]=n[Tn]}return s}function Ln(t){return t.__attributes??(t.__attributes={[En]:t.nodeName.includes("-"),[Nn]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var Dn=new Map;function qn(t){var e,n=Dn.get(t.nodeName);if(n)return n;Dn.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var i in e=_(r))e[i].set&&n.push(i);r=M(r)}return n}const Gn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function Fn(){const t=Gn.now();Gn.tasks.forEach((e=>{e.c(t)||(Gn.tasks.delete(e),e.f())})),0!==Gn.tasks.size&&Gn.tick(Fn)}function Hn(t,e){Ve((()=>{t.dispatchEvent(new CustomEvent(e))}))}function Rn(t){if("float"===t)return"cssFloat";if("offset"===t)return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return 1===e.length?e[0]:e[0]+e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("")}function Vn(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Rn(t.trim())]=n.trim()}return e}const Kn=t=>t;function Un(t,e,n,r){var o,i,l,a=!!(1&t),s=!!(2&t),u=!!(4&t),c=a&&s?"both":a?"in":"out",d=e.inert,f=e.style.overflow;function v(){var t=ie,i=se;ae(null),ue(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:c}))}finally{ae(t),ue(i)}}var p={is_global:u,in(){var t;if(e.inert=d,!a)return null==l||l.abort(),void(null==(t=null==l?void 0:l.reset)||t.call(l));s||null==i||i.abort(),Hn(e,"introstart"),i=Yn(e,v(),l,1,(()=>{Hn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=f}))},out(t){if(!s)return null==t||t(),void(o=void 0);e.inert=!0,Hn(e,"outrostart"),l=Yn(e,v(),i,0,(()=>{Hn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},h=se;if((h.transitions??(h.transitions=[])).push(p),a&&an){var g=u;if(!g){for(var m=h.parent;m&&m.f&L;)for(;(m=m.parent)&&!(16&m.f););g=!m||!!(32768&m.f)}g&&zt((()=>{Te((()=>p.in()))}))}}function Yn(t,e,n,r,o){var i=1===r;if(I(e)){var l,a=!1;return Zt((()=>{if(!a){var s=e({direction:i?"in":"out"});l=Yn(t,s,n,r,o)}})),{abort:()=>{a=!0,null==l||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(null==n||n.deactivate(),!(null==e?void 0:e.duration))return o(),{abort:j,deactivate:j,reset:j,t:()=>r};const{delay:s=0,css:u,tick:c,easing:d=Kn}=e;var f=[];if(i&&void 0===n&&(c&&c(0,1),u)){var v=Vn(u(0,1));f.push(v,v)}var p=()=>1-r,h=t.animate(f,{duration:s});return h.onfinish=()=>{var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,a=e.duration*Math.abs(l),s=[];if(a>0){var f=!1;if(u)for(var v=Math.ceil(a/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),y=Vn(u(m,1-m));s.push(y),f||(f="hidden"===y.overflow)}f&&(t.style.overflow="hidden"),p=()=>{var t=h.currentTime;return i+l*d(t/a)},c&&function(t){let e;0===Gn.tasks.size&&Gn.tick(Fn),new Promise((n=>{Gn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==h.playState)return!1;var t=p();return c(t,1-t),!0}))}(h=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{p=()=>r,null==c||c(r,1-r),o()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=j)},deactivate:()=>{o=j},reset:()=>{0===r&&(null==c||c(1,0))},t:()=>p()}}function Zn(t){var e=t.type;return"number"===e||"range"===e}function Jn(t){return""===t?null:+t}const Xn=class{constructor(o){g(this,r),g(this,t,new WeakMap),g(this,e),g(this,n),m(this,n,o)}observe(i,l){var a=h(this,t).get(i)||new Set;return a.add(l),h(this,t).set(i,a),y(this,r,o).call(this).observe(i,h(this,n)),()=>{var n=h(this,t).get(i);n.delete(l),0===n.size&&(h(this,t).delete(i),h(this,e).unobserve(i))}}};var Qn;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakSet,o=function(){return h(this,e)??m(this,e,new ResizeObserver((e=>{for(var n of e)for(var r of(Xn.entries.set(n.target,n),h(this,t).get(n.target)||[]))r(n)})))},((t,e,n)=>{e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(Xn,"symbol"!=typeof(Qn="entries")?Qn+"":Qn,new WeakMap);var tr=new Xn({box:"border-box"});function er(t,e){return t===e||(null==t?void 0:t[q])===e}function nr(t={},e,n,r){return zt((()=>{var r,o;return Et((()=>{r=o,o=[],Te((()=>{t!==n(...o)&&(e(t,...o),r&&er(n(...r),t)&&e(null,...r))}))})),()=>{Zt((()=>{o&&er(n(...o),t)&&e(null,...o)}))}})),t}function rr(t=!1){const e=Z,n=e.l.u;if(!n)return;let r=()=>Ne(e.s);if(t){let t=0,n={};const o=$t((()=>{let r=!1;const o=e.s;for(const t in o)o[t]!==n[t]&&(n[t]=o[t],r=!0);return r&&t++,t}));r=()=>ze(o)}var o;n.b.length&&(o=()=>{or(e,r),T(n.b)},Mt(),Et(o)),jt((()=>{const t=Te((()=>n.m.map(z)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&jt((()=>{or(e,r),T(n.a)}))}function or(t,e){if(t.l.s)for(const n of t.l.s)ze(n);e()}function ir(t,e,n){if(null==t)return e(void 0),j;const r=Te((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const lr=[];function ar(t,e=j){let n=null;const r=new Set;function o(e){if(R(t,e)&&(t=e,n)){const e=!lr.length;for(const n of r)n[1](),lr.push(n,t);if(e){for(let t=0;t<lr.length;t+=2)lr[t][0](lr[t+1]);lr.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=j){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||j),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function sr(t){let e;return ir(t,(t=>e=t))(),e}let ur=!1,cr=Symbol();function dr(t,e,n){const r=n[e]??(n[e]={store:null,source:lt(void 0),unsubscribe:j});if(r.store!==t&&!(cr in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=j;else{var o=!0;r.unsubscribe=ir(t,(t=>{o?r.source.v=t:at(r.source,t)})),o=!1}return t&&cr in n?sr(t):ze(r.source)}function fr(t,e){return t.set(e),e}function vr(){const t={};return[t,function(){It((()=>{for(var e in t)t[e].unsubscribe();$(t,cr,{enumerable:!1,value:!0})}))}]}const pr={get(t,e){if(!t.exclude.includes(e))return ze(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=br({get[e](){return t.props[e]}},e,4)),t.special[e](n),ut(t.version),!0),getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),ut(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter((e=>!t.exclude.includes(e)))};function hr(t,e){return new Proxy({props:t,exclude:e,special:{},version:ot(0)},pr)}const gr={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(I(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r)return r[e]}},set(t,e,n){let r=t.props.length;for(;r--;){let o=t.props[r];I(o)&&(o=o());const i=k(o,e);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(I(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=k(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===q||e===G)return!1;for(let n of t.props)if(I(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){I(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function mr(...t){return new Proxy({props:t},gr)}function yr(t){var e;return(null==(e=t.ctx)?void 0:e.d)??!1}function br(t,e,n,r){var o,i,l=!!(1&n),a=!K||!!(2&n),s=!!(8&n),u=!!(16&n),c=!1;s?[i,c]=function(t){var e=ur;try{return ur=!1,[t(),ur]}finally{ur=e}}((()=>t[e])):i=t[e];var d,f=q in t||G in t,v=s&&((null==(o=k(t,e))?void 0:o.set)??(f&&e in t&&(n=>t[e]=n)))||void 0,p=r,h=!0,g=!1,m=()=>(g=!0,h&&(h=!1,p=u?Te(r):r),p);if(void 0===i&&void 0!==r&&(v&&a&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i=m(),v&&v(i)),a)d=()=>{var n=t[e];return void 0===n?m():(h=!0,g=!1,n)};else{var y=(l?$t:_t)((()=>t[e]));y.f|=131072,d=()=>{var t=ze(y);return void 0!==t&&(p=void 0),void 0===t?p:t}}if(!(4&n))return d;if(v){var b=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!b&&!c||v(e?d():t),t):d()}}var w=!1,x=lt(i),$=$t((()=>{var t=d(),e=ze(x);return w?(w=!1,e):x.v=t}));return s&&ze($),l||($.equals=V),function(t,e){if(arguments.length>0){const n=e?ze($):a&&s?et(t):t;if(!$.equals(n)){if(w=!0,at(x,n),g&&void 0!==p&&(p=n),yr($))return t;Te((()=>ze($)))}return t}return yr($)?$.v:ze($)}}function wr(t){var e,n;null===Z&&Y(),K&&null!==Z.l?(e=Z,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):jt((()=>{const e=Te(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&((i=window.__svelte??(window.__svelte={})).v??(i.v=new Set)).add("5"),K=!0;
1
+ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m,w,y,b,x,$,k,_,M,S,E,C,I,O,W,P,j,T,L,A,N,z,R,B,D,q,F,Y,G,H,U,V,K,X,Z,J,Q,tt,et,nt,rt,ot,it=Object.defineProperty,lt=t=>{throw TypeError(t)},st=(t,e,n)=>((t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),at=(t,e,n)=>e.has(t)||lt("Cannot "+n),ct=(t,e,n)=>(at(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>e.has(t)?lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),dt=(t,e,n,r)=>(at(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ft=(t,e,n)=>(at(t,e,"access private method"),n),vt="undefined"!=typeof document?document.currentScript:null;const ht={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function pt(t={}){return gt(ht,t)}function gt(t,e){const n={...t};return mt(t)&&mt(e)&&Object.keys(e).forEach(r=>{mt(e[r])?r in t?n[r]=gt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function mt(t){return t&&"object"==typeof t&&!Array.isArray(t)}var wt=Array.isArray,yt=Array.prototype.indexOf,bt=Array.from,xt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,kt=Object.getOwnPropertyDescriptors,_t=Object.prototype,Mt=Array.prototype,St=Object.getPrototypeOf,Et=Object.isExtensible;function Ct(t){return"function"==typeof t}const It=()=>{};function Ot(t){return t()}function Wt(t){for(var e=0;e<t.length;e++)t[e]()}function Pt(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function jt(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const Tt=16,Lt=1024,At=2048,Nt=4096,zt=8192,Rt=16384,Bt=32768,Dt=65536,qt=1<<19,Ft=256,Yt=1<<21,Gt=1<<23,Ht=Symbol("$state"),Ut=Symbol("legacy props"),Vt=Symbol(""),Kt=new class extends Error{constructor(){super(...arguments),st(this,"name","StaleReactionError"),st(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Xt(t){return t===this.v}function Zt(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Jt(t){return!Zt(t,this.v)}function Qt(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let te=!1;const ee=Symbol();let ne=null;function re(t){ne=t}function oe(t){return ae().get(t)}function ie(t,e=!1,n){ne={p:ne,c:null,e:null,s:t,x:null,l:te&&!e?{s:null,u:null,$:[]}:null}}function le(t){var e=ne,n=e.e;if(null!==n)for(var r of(e.e=null,n))Qn(r);return ne=e.p,{}}function se(){return!te||null!==ne&&null===ne.l}function ae(t){return null===ne&&Qt(),ne.c??(ne.c=new Map(function(t){let e=t.p;for(;null!==e;){const t=e.c;if(null!==t)return t;e=e.p}return null}(ne)||void 0))}let ce=[];function ue(){var t=ce;ce=[],Wt(t)}function de(t){if(0===ce.length&&!ze){var e=ce;queueMicrotask(()=>{e===ce&&ue()})}ce.push(t)}function fe(){for(;ce.length>0;)ue()}function ve(t){if("object"!=typeof t||null===t||Ht in t)return t;const e=St(t);if(e!==_t&&e!==Mt)return t;var n=new Map,r=wt(t),o=ln(0),i=Pn,l=t=>{if(Pn===i)return t();var e=bn,n=Pn;$n(null),jn(i);var r=t();return $n(e),jn(n),r};return r&&n.set("length",ln(t.length)),new Proxy(t,{defineProperty(t,e,r){"value"in r&&!1!==r.configurable&&!1!==r.enumerable&&!1!==r.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=n.get(e);return void 0===o?o=l(()=>{var t=ln(r.value);return n.set(e,t),t}):an(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=l(()=>ln(ee));n.set(e,t),dn(o)}}else an(r,ee),dn(o);return!0},get(e,r,o){var i;if(r===Ht)return t;var s=n.get(r),a=r in e;if(void 0!==s||a&&!(null==(i=$t(e,r))?void 0:i.writable)||(s=l(()=>ln(ve(a?e[r]:ee))),n.set(r,s)),void 0!==s){var c=qn(s);return c===ee?void 0:c}return Reflect.get(e,r,o)},getOwnPropertyDescriptor(t,e){var r=Reflect.getOwnPropertyDescriptor(t,e);if(r&&"value"in r){var o=n.get(e);o&&(r.value=qn(o))}else if(void 0===r){var i=n.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==ee)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return r},has(t,e){var r;if(e===Ht)return!0;var o=n.get(e),i=void 0!==o&&o.v!==ee||Reflect.has(t,e);return!((void 0!==o||null!==kn&&(!i||(null==(r=$t(t,e))?void 0:r.writable)))&&(void 0===o&&(o=l(()=>ln(i?ve(t[e]):ee)),n.set(e,o)),qn(o)===ee))&&i},set(t,e,i,s){var a,c=n.get(e),u=e in t;if(r&&"length"===e)for(var d=i;d<c.v;d+=1){var f=n.get(d+"");void 0!==f?an(f,ee):d in t&&(f=l(()=>ln(ee)),n.set(d+"",f))}void 0===c?u&&!(null==(a=$t(t,e))?void 0:a.writable)||(an(c=l(()=>ln(void 0)),ve(i)),n.set(e,c)):(u=c.v!==ee,an(c,l(()=>ve(i))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(s,i),!u){if(r&&"string"==typeof e){var h=n.get("length"),p=Number(e);Number.isInteger(p)&&p>=h.v&&an(h,p+1)}dn(o)}return!0},ownKeys(t){qn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==ee});for(var[r,i]of n)i.v===ee||r in t||e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function he(t){try{if(null!==t&&"object"==typeof t&&Ht in t)return t[Ht]}catch{}return t}function pe(t,e){return Object.is(he(t),he(e))}var ge,me,we,ye;function be(t=""){return document.createTextNode(t)}function xe(t){return we.call(t)}function $e(t){return ye.call(t)}function ke(t,e){return xe(t)}function _e(t,e=!1){var n=xe(t);return n instanceof Comment&&""===n.data?$e(n):n}function Me(t,e=1,n=!1){let r=t;for(;e--;)r=$e(r);return r}const Se=new WeakMap;function Ee(t){var e=kn;if(null===e)return bn.f|=Gt,t;if(0===(e.f&Bt)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&Ie(t),t;e.b.error(t)}else Ce(t,e)}function Ce(t,e){for(;null!==e;){if(128&e.f)try{return void e.b.error(t)}catch(n){t=n}e=e.parent}throw t instanceof Error&&Ie(t),t}function Ie(t){const e=Se.get(t);e&&(xt(t,"message",{value:e.message}),xt(t,"stack",{value:e.stack}))}const Oe=new Set;let We=null,Pe=null,je=null,Te=new Set,Le=[],Ae=null,Ne=!1,ze=!1;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(t,e){var n;t.f^=Lt;for(var r=t.first;null!==r;){var o=r.f,i=!!(96&o),l=i&&0!==(o&Lt)||0!==(o&zt)||this.skipped_effects.has(r);if(!!(128&r.f)&&(null==(n=r.b)?void 0:n.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&null!==r.fn){i?r.f^=Lt:4&o?e.effects.push(r):An(r)&&(0!==(r.f&Tt)&&e.block_effects.push(r),Dn(r));var a=r.first;if(null!==a){r=a;continue}}var u=r.parent;for(r=r.next;null===r&&null!==u;)u===e.effect&&(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects),e=e.parent),r=u.next,u=u.parent}},c=function(t){for(const e of t)(0!==(e.f&At)?ct(this,i):ct(this,l)).push(e),Hn(e,Lt)},u=function(){if(0===ct(this,r)){for(const t of ct(this,e))t();ct(this,e).clear()}0===ct(this,n)&&ft(this,s,d).call(this)},d=function(){var e,n;if(Oe.size>1){ct(this,t).clear();var r=je,i=!0,l={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const t of Oe){if(t===this){i=!1;continue}const n=[];for(const[e,o]of this.current){if(t.current.has(e)){if(!i||o===t.current.get(e))continue;t.current.set(e,o)}n.push(e)}if(0===n.length)continue;const r=[...t.current.keys()].filter(t=>!this.current.has(t));if(r.length>0){const o=new Set,i=new Map;for(const t of n)Ye(t,r,o,i);if(Le.length>0){We=t,t.apply();for(const n of Le)ft(e=t,s,a).call(e,n,l);Le=[],t.deactivate()}}}We=null,je=r}this.committed=!0,Oe.delete(this),null==(n=ct(this,o))||n.resolve()};let Re=class d{constructor(){ut(this,s),st(this,"committed",!1),st(this,"current",new Map),ut(this,t,new Map),ut(this,e,new Set),ut(this,n,0),ut(this,r,0),ut(this,o,null),ut(this,i,[]),ut(this,l,[]),st(this,"skipped_effects",new Set)}process(t){Le=[],Pe=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)ft(this,s,a).call(this,n,e);ft(this,s,u).call(this),ct(this,r)>0?(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects)):(Pe=this,We=null,Fe(e.render_effects),Fe(e.effects),Pe=null),je=null}capture(e,n){ct(this,t).has(e)||ct(this,t).set(e,n),this.current.set(e,e.v),null==je||je.set(e,e.v)}activate(){We=this}deactivate(){We=null,je=null}flush(){if(Le.length>0){if(this.activate(),Be(),null!==We&&We!==this)return}else ft(this,s,u).call(this);this.deactivate();for(const t of Te)if(Te.delete(t),t(),null!==We)break}increment(t){dt(this,n,ct(this,n)+1),t&&dt(this,r,ct(this,r)+1)}decrement(t){dt(this,n,ct(this,n)-1),t&&dt(this,r,ct(this,r)-1);for(const e of ct(this,i))Hn(e,At),He(e);for(const e of ct(this,l))Hn(e,Nt),He(e);dt(this,i,[]),dt(this,l,[]),this.flush()}add_callback(t){ct(this,e).add(t)}settled(){return(ct(this,o)??dt(this,o,Pt())).promise}static ensure(){if(null===We){const t=We=new d;Oe.add(We),ze||d.enqueue(()=>{We===t&&t.flush()})}return We}static enqueue(t){de(t)}apply(){}};function Be(){var t=gn;Ne=!0;try{var e=0;for(mn(!0);Le.length>0;){var n=Re.ensure();e++>1e3&&De(),n.process(Le),rn.clear()}}finally{Ne=!1,mn(t),Ae=null}}function De(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){Ce(t,Ae)}}let qe=null;function Fe(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&An(r)&&(qe=new Set,Dn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?cr(r):r.fn=null),(null==qe?void 0:qe.size)>0)){rn.clear();for(const t of qe){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)qe.has(n)&&(qe.delete(n),e.push(n)),n=n.parent;for(let t=e.length-1;t>=0;t--){const n=e[t];24576&n.f||Dn(n)}}qe.clear()}}qe=null}}function Ye(t,e,n,r){if(!n.has(t)&&(n.add(t),null!==t.reactions))for(const o of t.reactions){const t=o.f;2&t?Ye(o,e,n,r):4194320&t&&0===(t&At)&&Ge(o,e,r)&&(Hn(o,At),He(o))}}function Ge(t,e,n){const r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const o of t.deps){if(e.includes(o))return!0;if(2&o.f&&Ge(o,e,n))return n.set(o,!0),!0}return n.set(t,!1),!1}function He(t){for(var e=Ae=t;null!==e.parent;){var n=(e=e.parent).f;if(Ne&&e===kn&&0!==(n&Tt))return;if(96&n){if(0===(n&Lt))return;e.f^=Lt}}Le.push(e)}function Ue(t){let e,n=0,r=on(0);return()=>{(function(){return null!==bn&&!xn})()&&(qn(r),nr(()=>(0===n&&(e=Yn(()=>t(()=>dn(r)))),n+=1,()=>{de(()=>{n-=1,0===n&&(null==e||e(),e=void 0,dn(r))})})))}}class Ve{constructor(t,e,n){ut(this,I),st(this,"parent"),ut(this,f,!1),ut(this,v),ut(this,h,null),ut(this,p),ut(this,g),ut(this,m),ut(this,w,null),ut(this,y,null),ut(this,b,null),ut(this,x,null),ut(this,$,null),ut(this,k,0),ut(this,_,0),ut(this,M,!1),ut(this,S,null),ut(this,E,()=>{ct(this,S)&&cn(ct(this,S),ct(this,k))}),ut(this,C,Ue(()=>(dt(this,S,on(ct(this,k))),()=>{dt(this,S,null)}))),dt(this,v,t),dt(this,p,e),dt(this,g,n),this.parent=kn.b,dt(this,f,!!ct(this,p).pending),dt(this,m,or(()=>{kn.b=this;var t=ft(this,I,O).call(this);try{dt(this,w,ir(()=>n(t)))}catch(e){this.error(e)}return ct(this,_)>0?ft(this,I,P).call(this):dt(this,f,!1),()=>{var t;null==(t=ct(this,$))||t.remove()}},589952))}is_pending(){return ct(this,f)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!ct(this,p).pending}update_pending_count(t){ft(this,I,j).call(this,t),dt(this,k,ct(this,k)+t),Te.add(ct(this,E))}get_effect_pending(){return ct(this,C).call(this),qn(ct(this,S))}error(t){var e=ct(this,p).onerror;let n=ct(this,p).failed;if(ct(this,M)||!e&&!n)throw t;ct(this,w)&&(ar(ct(this,w)),dt(this,w,null)),ct(this,y)&&(ar(ct(this,y)),dt(this,y,null)),ct(this,b)&&(ar(ct(this,b)),dt(this,b,null));var r=!1,o=!1;const i=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,o&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),Re.ensure(),dt(this,k,0),null!==ct(this,b)&&ur(ct(this,b),()=>{dt(this,b,null)}),dt(this,f,this.has_pending_snippet()),dt(this,w,ft(this,I,W).call(this,()=>(dt(this,M,!1),ir(()=>ct(this,g).call(this,ct(this,v)))))),ct(this,_)>0?ft(this,I,P).call(this):dt(this,f,!1))};var l=bn;try{$n(null),o=!0,null==e||e(t,i),o=!1}catch(s){Ce(s,ct(this,m)&&ct(this,m).parent)}finally{$n(l)}n&&de(()=>{dt(this,b,ft(this,I,W).call(this,()=>{Re.ensure(),dt(this,M,!0);try{return ir(()=>{n(ct(this,v),()=>t,()=>i)})}catch(s){return Ce(s,ct(this,m).parent),null}finally{dt(this,M,!1)}}))})}}function Ke(t,e,n){const r=se()?Ze:Qe;if(0!==e.length){var o=We,i=kn,l=function(){var t=kn,e=bn,n=ne,r=We;return function(){_n(t),$n(e),re(n),null==r||r.activate()}}();Promise.all(e.map(t=>function(t){let e=kn;null===e&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=e.b,r=void 0,o=on(ee),i=!bn,l=new Map;return Xn(4718592,()=>{var e,s=Pt();r=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{a===We&&a.committed&&a.deactivate(),Xe()})}catch(d){s.reject(d),Xe()}var a=We;if(i){var c=!n.is_pending();n.update_pending_count(1),a.increment(c),null==(e=l.get(a))||e.reject(Kt),l.delete(a),l.set(a,s)}const u=(t,e=void 0)=>{if(a.activate(),e)e!==Kt&&(o.f|=Gt,cn(o,e));else{0!==(o.f&Gt)&&(o.f^=Gt),cn(o,t);for(const[t,e]of l){if(l.delete(t),t===a)break;e.reject(Kt)}}i&&(n.update_pending_count(-1),a.decrement(c))};s.promise.then(u,t=>u(null,t||"unknown"))},!0),Zn(()=>{for(const t of l.values())t.reject(Kt)}),new Promise(t=>{!function e(n){function i(){n===r?t(o):e(r)}n.then(i,i)}(r)})}(t))).then(e=>{l();try{n([...t.map(r),...e])}catch(s){0===(i.f&Rt)&&Ce(s,i)}null==o||o.deactivate(),Xe()}).catch(t=>{Ce(t,i)})}else n(t.map(r))}function Xe(){_n(null),$n(null),re(null)}function Ze(t){var e=2050,n=null!==bn&&2&bn.f?bn:null;return null===kn||null!==n&&0!==(n.f&Ft)?e|=Ft:kn.f|=qt,{ctx:ne,deps:null,effects:null,equals:Xt,f:e,fn:t,reactions:null,rv:0,v:ee,wv:0,parent:n??kn,ac:null}}function Je(t){const e=Ze(t);return Sn(e),e}function Qe(t){const e=Ze(t);return e.equals=Jt,e}function tn(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)ar(e[n])}}function en(t){var e,n=kn;_n(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{t.f&=-32769,tn(t),e=zn(t)}finally{_n(n)}return e}function nn(t){var e=en(t);t.equals(e)||(t.v=e,t.wv=Ln()),wn||(null!==je?je.set(t,t.v):Hn(t,!Tn&&0===(t.f&Ft)||null===t.deps?Lt:Nt))}f=new WeakMap,v=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,$=new WeakMap,k=new WeakMap,_=new WeakMap,M=new WeakMap,S=new WeakMap,E=new WeakMap,C=new WeakMap,I=new WeakSet,O=function(){var t=ct(this,v);return ct(this,f)&&(dt(this,$,be()),ct(this,v).before(ct(this,$)),t=ct(this,$)),t},W=function(t){var e=kn,n=bn,r=ne;_n(ct(this,m)),$n(ct(this,m)),re(ct(this,m).ctx);try{return t()}catch(o){return Ee(o),null}finally{_n(e),$n(n),re(r)}},P=function(){const t=ct(this,p).pending;null!==ct(this,w)&&(dt(this,x,document.createDocumentFragment()),ct(this,x).append(ct(this,$)),pr(ct(this,w),ct(this,x))),null===ct(this,y)&&dt(this,y,ir(()=>t(ct(this,v))))},j=function(t){var e;this.has_pending_snippet()?(dt(this,_,ct(this,_)+t),0===ct(this,_)&&(dt(this,f,!1),ct(this,y)&&ur(ct(this,y),()=>{dt(this,y,null)}),ct(this,x)&&(ct(this,v).before(ct(this,x)),dt(this,x,null)))):this.parent&&ft(e=this.parent,I,j).call(e,t)};const rn=new Map;function on(t,e){return{f:0,v:t,reactions:null,equals:Xt,rv:0,wv:0}}function ln(t,e){const n=on(t);return Sn(n),n}function sn(t,e=!1,n=!0){var r;const o=on(t);return e||(o.equals=Jt),te&&n&&null!==ne&&null!==ne.l&&((r=ne.l).s??(r.s=[])).push(o),o}function an(t,e,n=!1){return null!==bn&&(!xn||!!(131072&bn.f))&&se()&&4325394&bn.f&&!(null==Mn?void 0:Mn.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),cn(t,n?ve(e):e)}function cn(t,e){if(!t.equals(e)){var n=t.v;wn?rn.set(t,e):rn.set(t,n),t.v=e,Re.ensure().capture(t,n),2&t.f&&(0!==(t.f&At)&&en(t),Hn(t,0===(t.f&Ft)?Lt:Nt)),t.wv=Ln(),fn(t,At),!se()||null===kn||0===(kn.f&Lt)||96&kn.f||(null===In?In=[t]:In.push(t))}return e}function un(t,e=1){var n=qn(t),r=1===e?n++:n--;return an(t,n),r}function dn(t){an(t,t.v+1)}function fn(t,e){var n=t.reactions;if(null!==n)for(var r=se(),o=n.length,i=0;i<o;i++){var l=n[i],s=l.f;if(r||l!==kn){var a=0===(s&At);a&&Hn(l,e),2&s?!(32768&s)&&(l.f|=32768,fn(l,Nt)):a&&(0!==(s&Tt)&&null!==qe&&qe.add(l),He(l))}}}function vn(t,e){if(e){const e=document.body;t.autofocus=!0,de(()=>{document.activeElement===e&&t.focus()})}}let hn=!1;function pn(t){var e=bn,n=kn;$n(null),_n(null);try{return t()}finally{$n(e),_n(n)}}let gn=!1;function mn(t){gn=t}let wn=!1;function yn(t){wn=t}let bn=null,xn=!1;function $n(t){bn=t}let kn=null;function _n(t){kn=t}let Mn=null;function Sn(t){null!==bn&&(null===Mn?Mn=[t]:Mn.push(t))}let En=null,Cn=0,In=null,On=1,Wn=0,Pn=Wn;function jn(t){Pn=t}let Tn=!1;function Ln(){return++On}function An(t){var e,n=t.f;if(0!==(n&At))return!0;if(0!==(n&Nt)){var r=t.deps,o=0!==(n&Ft);if(2&n&&(t.f&=-32769),null!==r){var i,l,s=!!(512&n),a=o&&null!==kn&&!Tn,c=r.length;if((s||a)&&(null===kn||0===(kn.f&Rt))){var u=t,d=u.parent;for(i=0;i<c;i++)l=r[i],!s&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(u))||(l.reactions??(l.reactions=[])).push(u);s&&(u.f^=512),a&&null!==d&&0===(d.f&Ft)&&(u.f^=Ft)}for(i=0;i<c;i++)if(An(l=r[i])&&nn(l),l.wv>t.wv)return!0}o&&(null===kn||Tn)||Hn(t,Lt)}return!1}function Nn(t,e,n=!0){var r=t.reactions;if(null!==r&&!(null==Mn?void 0:Mn.includes(t)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?Nn(i,e,!1):e===i&&(n?Hn(i,At):0!==(i.f&Lt)&&Hn(i,Nt),He(i))}}function zn(t){var e,n=En,r=Cn,o=In,i=bn,l=Tn,s=Mn,a=ne,c=xn,u=Pn,d=t.f;En=null,Cn=0,In=null,Tn=0!==(d&Ft)&&(xn||!gn||null===bn),bn=96&d?null:t,Mn=null,re(t.ctx),xn=!1,Pn=++Wn,null!==t.ac&&(pn(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Yt;var f=(0,t.fn)(),v=t.deps;if(null!==En){var h;if(Bn(t,Cn),null!==v&&Cn>0)for(v.length=Cn+En.length,h=0;h<En.length;h++)v[Cn+h]=En[h];else t.deps=v=En;if(!Tn||2&d&&null!==t.reactions)for(h=Cn;h<v.length;h++)((e=v[h]).reactions??(e.reactions=[])).push(t)}else null!==v&&Cn<v.length&&(Bn(t,Cn),v.length=Cn);if(se()&&null!==In&&!xn&&null!==v&&!(6146&t.f))for(h=0;h<In.length;h++)Nn(In[h],t);return null!==i&&i!==t&&(Wn++,null!==In&&(null===o?o=In:o.push(...In))),0!==(t.f&Gt)&&(t.f^=Gt),f}catch(p){return Ee(p)}finally{t.f^=Yt,En=n,Cn=r,In=o,bn=i,Tn=l,Mn=s,re(a),xn=c,Pn=u}}function Rn(t,e){let n=e.reactions;if(null!==n){var r=yt.call(n,t);if(-1!==r){var o=n.length-1;0===o?n=e.reactions=null:(n[r]=n[o],n.pop())}}null===n&&2&e.f&&(null===En||!En.includes(e))&&(Hn(e,Nt),768&e.f||(e.f^=512),tn(e),Bn(e,0))}function Bn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)Rn(t,n[r])}function Dn(t){var e=t.f;if(0===(e&Rt)){Hn(t,Lt);var n=kn,r=gn;kn=t,gn=!0;try{0!==(e&Tt)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&ar(e),e=n}}(t):sr(t),lr(t);var o=zn(t);t.teardown="function"==typeof o?o:null,t.wv=On}finally{gn=r,kn=n}}}function qn(t){var e=!!(2&t.f);if(null===bn||xn){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&Ft)&&(n.f^=Ft)}}else if((null===kn||0===(kn.f&Rt))&&!(null==Mn?void 0:Mn.includes(t))){var o=bn.deps;if(0!==(bn.f&Yt))t.rv<Wn&&(t.rv=Wn,null===En&&null!==o&&o[Cn]===t?Cn++:null===En?En=[t]:Tn&&En.includes(t)||En.push(t));else{(bn.deps??(bn.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[bn]:i.includes(bn)||i.push(bn)}}if(wn){if(rn.has(t))return rn.get(t);if(e){var l=(n=t).v;return(0===(n.f&Lt)&&null!==n.reactions||Fn(n))&&(l=en(n)),rn.set(n,l),l}}else if(e){if(n=t,null==je?void 0:je.has(n))return je.get(n);An(n)&&nn(n)}if(null==je?void 0:je.has(t))return je.get(t);if(0!==(t.f&Gt))throw t.v;return t.v}function Fn(t){if(t.v===ee)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(rn.has(e))return!0;if(2&e.f&&Fn(e))return!0}return!1}function Yn(t){var e=xn;try{return xn=!0,t()}finally{xn=e}}const Gn=-7169;function Hn(t,e){t.f=t.f&Gn|e}function Un(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(Ht in t)Vn(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&Ht in n&&Vn(n)}}function Vn(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{Vn(t[o],e)}catch(n){}const r=St(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=kt(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Kn(t){null===kn&&null===bn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==bn&&0!==(bn.f&Ft)&&null===kn&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),wn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Xn(t,e,n,r=!0){var o=kn;null!==o&&0!==(o.f&zt)&&(t|=zt);var i,l,s,a={ctx:ne,deps:null,nodes_start:null,nodes_end:null,f:t|At,first:null,fn:e,last:null,next:null,parent:o,b:o&&o.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Dn(a),a.f|=Bt}catch(d){throw ar(a),d}else null!==e&&He(a);if(r){var c=a;if(n&&null===c.deps&&null===c.teardown&&null===c.nodes_start&&c.first===c.last&&0===(c.f&qt)&&(c=c.first,0!==(t&Tt)&&0!==(t&Dt)&&null!==c&&(c.f|=Dt)),null!==c&&(c.parent=o,null!==o&&(i=c,null===(s=(l=o).last)?l.last=l.first=i:(s.next=i,i.prev=s,l.last=i)),null!==bn&&2&bn.f&&!(64&t))){var u=bn;(u.effects??(u.effects=[])).push(c)}}return a}function Zn(t){const e=Xn(8,null,!1);return Hn(e,Lt),e.teardown=t,e}function Jn(t){Kn();var e=kn.f;if(bn||!(32&e)||0!==(e&Bt))return Qn(t);var n=ne;(n.e??(n.e=[])).push(t)}function Qn(t){return Xn(1048580,t,!1)}function tr(t){return Kn(),Xn(1048584,t,!0)}function er(t){return Xn(4,t,!1)}function nr(t,e=0){return Xn(8|e,t,!0)}function rr(t,e=[],n=[]){Ke(e,n,e=>{Xn(8,()=>t(...e.map(qn)),!0)})}function or(t,e=0){return Xn(Tt|e,t,!0)}function ir(t,e=!0){return Xn(524320,t,!0,e)}function lr(t){var e=t.teardown;if(null!==e){const t=wn,n=bn;yn(!0),$n(null);try{e.call(null)}finally{yn(t),$n(n)}}}function sr(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&pn(()=>{t.abort(Kt)});var r=n.next;64&n.f?n.parent=null:ar(n,e),n=r}}function ar(t,e=!0){var n=!1;(e||262144&t.f)&&null!==t.nodes_start&&null!==t.nodes_end&&(function(t,e){for(;null!==t;){var n=t===e?null:$e(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),sr(t,e&&!n),Bn(t,0),Hn(t,Rt);var r=t.transitions;if(null!==r)for(const i of r)i.stop();lr(t);var o=t.parent;null!==o&&null!==o.first&&cr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function cr(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function ur(t,e,n=!0){var r=[];fr(t,r,!0),dr(r,()=>{n&&ar(t),e&&e()})}function dr(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function fr(t,e,n){if(0===(t.f&zt)){if(t.f^=zt,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;fr(r,e,!!(0!==(r.f&Dt)||32&r.f&&0!==(t.f&Tt))&&n),r=o}}}function vr(t){hr(t,!0)}function hr(t,e){if(0!==(t.f&zt)){t.f^=zt,0===(t.f&Lt)&&(Hn(t,At),He(t));for(var n=t.first;null!==n;){var r=n.next;hr(n,!!(0!==(n.f&Dt)||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function pr(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:$e(n);e.append(n),n=o}}function gr(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const mr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function wr(t){return mr.includes(t)}const yr={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function br(t){return t=t.toLowerCase(),yr[t]??t}const xr=["touchstart","touchmove"];function $r(t){return xr.includes(t)}const kr=new Set,_r=new Set;function Mr(t,e,n,r={}){function o(t){if(r.capture||Or.call(e,t),!t.cancelBubble)return pn(()=>null==n?void 0:n.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?de(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Sr(t,e,n,r={}){var o=Mr(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Er(t,e,n,r,o){var i={capture:r,passive:o},l=Mr(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Zn(()=>{e.removeEventListener(t,l,i)})}function Cr(t){for(var e=0;e<t.length;e++)kr.add(t[e]);for(var n of _r)n(t)}let Ir=null;function Or(t){var e,n=this,r=n.ownerDocument,o=t.type,i=(null==(e=t.composedPath)?void 0:e.call(t))||[],l=i[0]||t.target;Ir=t;var s=0,a=Ir===t&&t.__root;if(a){var c=i.indexOf(a);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var u=i.indexOf(n);if(-1===u)return;c<=u&&(s=c)}if((l=i[s]||t.target)!==n){xt(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=bn,f=kn;$n(null),_n(null);try{for(var v,h=[];null!==l;){var p=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(wt(g)){var[m,...w]=g;m.apply(l,[t,...w])}else g.call(l,t)}catch(y){v?h.push(y):v=y}if(t.cancelBubble||p===n||null===p)break;l=p}if(v){for(let t of h)queueMicrotask(()=>{throw t});throw v}}finally{t.__root=n,delete t.currentTarget,$n(d),_n(f)}}}function Wr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function Pr(t,e){var n=kn;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function jr(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Wr(i?t:"<!>"+t),r||(n=xe(n)));var e=o||me?document.importNode(n,!0):n.cloneNode(!0);return r?Pr(xe(e),e.lastChild):Pr(e,e),e}}function Tr(t,e){return function(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=xe(Wr(o));r=xe(t)}var e=r.cloneNode(!0);return Pr(e,e),e}}(t,0,"svg")}function Lr(t=""){var e=be(t+"");return Pr(e,e),e}function Ar(){var t=document.createDocumentFragment(),e=document.createComment(""),n=be();return t.append(e,n),Pr(e,n),t}function Nr(t,e){null!==t&&t.before(e)}let zr=!0;function Rr(t){zr=t}function Br(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function Dr(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===ge){ge=window,me=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;we=$t(e,"firstChild").get,ye=$t(e,"nextSibling").get,Et(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Et(n)&&(n.__t=void 0)}}();var s=new Set,a=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!s.has(r)){s.add(r);var o=$r(r);e.addEventListener(r,Or,{passive:o});var i=qr.get(r);void 0===i?(document.addEventListener(r,Or,{passive:o}),qr.set(r,1)):qr.set(r,i+1)}}};a(bt(kr)),_r.add(a);var c=void 0,u=function(t){Re.ensure();const e=Xn(524352,t,!0);return(t={})=>new Promise(n=>{t.outro?ur(e,()=>{ar(e),n(void 0)}):(ar(e),n(void 0))})}(()=>{var u,d=n??e.appendChild(be());return u=e=>{i&&(ie({}),ne.c=i),o&&(r.$$events=o),zr=l,c=t(e,r)||{},zr=!0,i&&le()},new Ve(d,{pending:()=>{}},u),()=>{var t;for(var r of s){e.removeEventListener(r,Or);var o=qr.get(r);0===--o?(document.removeEventListener(r,Or),qr.delete(r)):qr.set(r,o)}_r.delete(a),d!==n&&(null==(t=d.parentNode)||t.removeChild(d))}});return Fr.set(c,u),c}(t,e)}const qr=new Map;let Fr=new WeakMap;function Yr(t,e){const n=Fr.get(t);return n?(Fr.delete(t),n(e)):Promise.resolve()}class Gr{constructor(t,e=!0){st(this,"anchor"),ut(this,T,new Map),ut(this,L,new Map),ut(this,A,new Map),ut(this,N,!0),ut(this,z,()=>{var t=We;if(ct(this,T).has(t)){var e=ct(this,T).get(t),n=ct(this,L).get(e);if(n)vr(n);else{var r=ct(this,A).get(e);r&&(ct(this,L).set(e,r.effect),ct(this,A).delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[e,n]of ct(this,T)){if(ct(this,T).delete(e),e===t)break;const r=ct(this,A).get(n);r&&(ar(r.effect),ct(this,A).delete(n))}for(const[t,r]of ct(this,L)){if(t===e)continue;const o=()=>{if(Array.from(ct(this,T).values()).includes(t)){var e=document.createDocumentFragment();pr(r,e),e.append(be()),ct(this,A).set(t,{effect:r,fragment:e})}else ar(r);ct(this,L).delete(t)};ct(this,N)||!n?ur(r,o,!1):o()}}}),this.anchor=t,dt(this,N,e)}ensure(t,e){var n=We;!e||ct(this,L).has(t)||ct(this,A).has(t)||ct(this,L).set(t,ir(()=>e(this.anchor))),ct(this,T).set(n,t),ct(this,z).call(this)}}function Hr(t,e,n=!1){var r=new Gr(t);function o(t,e){r.ensure(t,e)}or(()=>{var t=!1;e((e,n=!0)=>{t=!0,o(n,e)}),t||o(!1,null)},n?Dt:0)}T=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,z=new WeakMap;let Ur=null;function Vr(t){Ur=t}function Kr(t,e){return e}function Xr(t,e,n,r,o,i=null){var l=t,s={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(be()));var a,c,u=null,d=!1,f=new Map,v=Qe(()=>{var t=n();return wt(t)?t:null==t?[]:bt(t)});or(()=>{c??(c=kn);var t=(a=qn(v)).length;d&&0===t||(d=0===t,function(t,e,n,r,o,i,l,s,a){var c,u,d,f,v,h,p,g,m,w,y=!!(8&l),b=!!(3&l),x=e.length,$=n.items,k=n.first,_=null,M=[],S=[];if(y)for(w=0;w<x;w+=1)g=s(p=e[w],w),void 0!==(m=$.get(g))&&(null==(c=m.a)||c.measure(),(h??(h=new Set)).add(m));for(w=0;w<x;w+=1)if(g=s(p=e[w],w),void 0!==(m=$.get(g))){if(b&&Zr(m,p,w,l),0!==(m.e.f&zt)&&(vr(m.e),y&&(null==(u=m.a)||u.unfix(),(h??(h=new Set)).delete(m))),m!==k){if(void 0!==v&&v.has(m)){if(M.length<S.length){var E,C=S[0];_=C.prev;var I=M[0],O=M[M.length-1];for(E=0;E<M.length;E+=1)Qr(M[E],C,o);for(E=0;E<S.length;E+=1)v.delete(S[E]);to(n,I.prev,O.next),to(n,_,I),to(n,O,C),k=C,_=O,w-=1,M=[],S=[]}else v.delete(m),Qr(m,k,o),to(n,m.prev,m.next),to(n,m,null===_?n.first:_.next),to(n,_,m),_=m;continue}for(M=[],S=[];null!==k&&k.k!==g;)0===(k.e.f&zt)&&(v??(v=new Set)).add(k),S.push(k),k=k.next;if(null===k)continue;m=k}M.push(m),_=m,k=m.next}else{var W=r.get(g);if(void 0!==W){r.delete(g),$.set(g,W);var P=_?_.next:k;to(n,_,W),to(n,W,P),Qr(W,P,o),_=W}else _=Jr(k?k.e.nodes_start:o,n,_,null===_?n.first:_.next,p,g,w,i,l,a);$.set(g,_),M=[],S=[],k=_.next}if(null!==k||void 0!==v){for(var j=void 0===v?[]:bt(v);null!==k;)0===(k.e.f&zt)&&j.push(k),k=k.next;var T=j.length;if(T>0){var L=4&l&&0===x?o:null;if(y){for(w=0;w<T;w+=1)null==(d=j[w].a)||d.measure();for(w=0;w<T;w+=1)null==(f=j[w].a)||f.fix()}!function(t,e,n){for(var r=t.items,o=[],i=e.length,l=0;l<i;l++)fr(e[l].e,o,!0);var s=i>0&&0===o.length&&null!==n;if(s){var a=n.parentNode;a.textContent="",a.append(n),r.clear(),to(t,e[0].prev,e[i-1].next)}dr(o,()=>{for(var n=0;n<i;n++){var o=e[n];s||(r.delete(o.k),to(t,o.prev,o.next)),ar(o.e,!s)}})}(n,j,L)}}for(var A of(y&&de(()=>{var t;if(void 0!==h)for(m of h)null==(t=m.a)||t.apply()}),t.first=n.first&&n.first.e,t.last=_&&_.e,r.values()))ar(A.e);r.clear()}(c,a,s,f,l,o,e,r,n),null!==i&&(0===a.length?u?vr(u):u=ir(()=>i(l)):null!==u&&ur(u,()=>{u=null})),qn(v))})}function Zr(t,e,n,r){1&r&&cn(t.v,e),2&r?cn(t.i,n):t.i=n}function Jr(t,e,n,r,o,i,l,s,a,c,u){var d=Ur,f=1&a?16&a?on(o):sn(o,!1,!1):o,v=2&a?on(l):l,h={i:v,v:f,k:i,a:null,e:null,prev:n,next:r};Ur=h;try{return null===t&&document.createDocumentFragment().append(t=be()),h.e=ir(()=>s(t,f,v,c),!1),h.e.prev=n&&n.e,h.e.next=r&&r.e,null===n?u||(e.first=h):(n.next=h,n.e.next=h.e),null!==r&&(r.prev=h,r.e.prev=h.e),h}finally{Ur=d}}function Qr(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;null!==i&&i!==r;){var l=$e(i);o.before(i),i=l}}function to(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}function eo(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],s=!1;!0===l&&(l=e.children,s=!0),void 0===l||l(t,s?()=>r:r)}function no(t,e,...n){var r=new Gr(t);or(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},Dt)}function ro(t,e,n){var r=new Gr(t);or(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},Dt)}function oo(t,e){var n,r=void 0;or(()=>{r!==(r=e())&&(n&&(ar(n),n=null),r&&(n=ir(()=>{er(()=>r(t))})))})}function io(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=io(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function lo(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=io(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const so=[..." \t\n\r\f \v\ufeff"];function ao(t,e=!1){var n=e?" !important;":";",r="";for(var o in t){var i=t[o];null!=i&&""!==i&&(r+=" "+o+": "+i+n)}return r}function co(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function uo(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var s=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,l=0;(l=r.indexOf(o,l))>=0;){var s=l+i;0!==l&&!so.includes(r[l-1])||s!==r.length&&!so.includes(r[s])?l=s:r=(0===l?"":r.substring(0,l))+r.substring(s+1)}return""===r?null:r}(n,r,i);null==s?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=n}else if(i&&o!==i)for(var a in i){var c=!!i[a];null!=o&&c===!!o[a]||t.classList.toggle(a,c)}return i}function fo(t,e={},n,r){for(var o in n){var i=n[o];e[o]!==i&&(null==n[o]?t.style.removeProperty(o):t.style.setProperty(o,i,r))}}function vo(t,e,n,r){if(t.__style!==e){var o=function(t,e){if(e){var n,r,o="";if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,l=0,s=!1,a=[];n&&a.push(...Object.keys(n).map(co)),r&&a.push(...Object.keys(r).map(co));var c=0,u=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(s?"/"===f&&"*"===t[d-1]&&(s=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?s=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!s&&!1===i&&0===l)if(":"===f&&-1===u)u=d;else if(";"===f||d===e-1){if(-1!==u){var v=co(t.substring(c,u).trim());a.includes(v)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=ao(n)),r&&(o+=ao(r,!0)),""===(o=o.trim())?null:o}return null==t?null:String(t)}(e,r);null==o?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(fo(t,null==n?void 0:n[0],r[0]),fo(t,null==n?void 0:n[1],r[1],"important")):fo(t,n,r));return r}function ho(t,e,n=!1){if(t.multiple){if(null==e)return;if(!wt(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(po(r))}else{for(r of t.options)if(pe(po(r),e))return void(r.selected=!0);n&&void 0===e||(t.selectedIndex=-1)}}function po(t){return"__value"in t?t.__value:t.value}const go=Symbol("class"),mo=Symbol("style"),wo=Symbol("is custom element"),yo=Symbol("is html");function bo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function xo(t,e,n,r){var o=ko(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[Vt]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&Mo(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function $o(t,e,n=[],r=[],o,i=!1,l=!1){Ke(n,r,n=>{var r=void 0,s={},a="SELECT"===t.nodeName,c=!1;if(or(()=>{var u=e(...n.map(qn)),d=function(t,e,n,r){var o=ko(t),i=o[wo],l=!o[yo],s=e||{},a="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=lo(n.class):(r||n[go])&&(n.class=null),n[mo]&&(n.style??(n.style=null));var u=Mo(t);for(const g in n){let c=n[g];if(a&&"value"===g&&null==c)t.value=t.__value="",s[g]=c;else if("class"!==g)if("style"!==g){var d=s[g];if(c!==d||void 0===c&&t.hasAttribute(g)){s[g]=c;var f=g[0]+g[1];if("$$"!==f)if("on"===f){const e={},n="$$"+g;let r=g.slice(2);var v=wr(r);if(gr(r)&&(r=r.slice(0,-7),e.capture=!0),!v&&d){if(null!=c)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=c)if(v)t[`__${r}`]=c,Cr([r]);else{let o=function(t){s[g].call(this,t)};s[n]=Mr(r,t,o,e)}else v&&(t[`__${r}`]=void 0)}else if("style"===g)xo(t,g,c);else if("autofocus"===g)vn(t,Boolean(c));else if(i||"__value"!==g&&("value"!==g||null==c))if("selected"===g&&a)bo(t,c);else{var h=g;l||(h=br(h));var p="defaultValue"===h||"defaultChecked"===h;if(null!=c||i||p)p||u.includes(h)&&(i||"string"!=typeof c)?(t[h]=c,h in o&&(o[h]=ee)):"function"!=typeof c&&xo(t,h,c);else if(o[g]=null,"value"===h||"checked"===h){let n=t;const r=void 0===e;if("value"===h){let t=n.defaultValue;n.removeAttribute(h),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(h),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(g)}else t.value=t.__value=c}}else vo(t,c,null==e?void 0:e[mo],n[mo]),s[g]=c,s[mo]=n[mo];else uo(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,c,r,null==e?void 0:e[go],n[go]),s[g]=c,s[go]=n[go]}return s}(t,r,u,o,i,l);c&&a&&"value"in u&&ho(t,u.value);for(let t of Object.getOwnPropertySymbols(s))u[t]||ar(s[t]);for(let e of Object.getOwnPropertySymbols(u)){var f=u[e];"@attach"!==e.description||r&&f===r[e]||(s[e]&&ar(s[e]),s[e]=ir(()=>oo(t,()=>f))),d[e]=f}r=d}),a){var u=t;er(()=>{var t,e;ho(u,r.value,!0),t=u,(e=new MutationObserver(()=>{ho(t,t.__value)})).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Zn(()=>{e.disconnect()})})}c=!0})}function ko(t){return t.__attributes??(t.__attributes={[wo]:t.nodeName.includes("-"),[yo]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var _o=new Map;function Mo(t){var e,n=t.getAttribute("is")||t.nodeName,r=_o.get(n);if(r)return r;_o.set(n,r=[]);for(var o=t,i=Element.prototype;i!==o;){for(var l in e=kt(o))e[l].set&&r.push(l);o=St(o)}return r}const So={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function Eo(){const t=So.now();So.tasks.forEach(e=>{e.c(t)||(So.tasks.delete(e),e.f())}),0!==So.tasks.size&&So.tick(Eo)}function Co(t,e){pn(()=>{t.dispatchEvent(new CustomEvent(e))})}function Io(t){if("float"===t)return"cssFloat";if("offset"===t)return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return 1===e.length?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function Oo(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Io(t.trim())]=n.trim()}return e}const Wo=t=>t;function Po(t,e,n,r){var o,i,l,s=!!(1&t),a=!!(2&t),c=!!(4&t),u=s&&a?"both":s?"in":"out",d=e.inert,f=e.style.overflow;function v(){return pn(()=>o??(o=n()(e,(null==r?void 0:r())??{},{direction:u})))}var h={is_global:c,in(){var t;if(e.inert=d,!s)return null==l||l.abort(),void(null==(t=null==l?void 0:l.reset)||t.call(l));a||null==i||i.abort(),Co(e,"introstart"),i=jo(e,v(),l,1,()=>{Co(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=f})},out(t){if(!a)return null==t||t(),void(o=void 0);e.inert=!0,Co(e,"outrostart"),l=jo(e,v(),i,0,()=>{Co(e,"outroend"),null==t||t()})},stop:()=>{null==i||i.abort(),null==l||l.abort()}},p=kn;if((p.transitions??(p.transitions=[])).push(h),s&&zr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&Dt);)for(;(m=m.parent)&&0===(m.f&Tt););g=!m||0!==(m.f&Bt)}g&&er(()=>{Yn(()=>h.in())})}}function jo(t,e,n,r,o){var i=1===r;if(Ct(e)){var l,s=!1;return de(()=>{if(!s){var a=e({direction:i?"in":"out"});l=jo(t,a,n,r,o)}}),{abort:()=>{s=!0,null==l||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(null==n||n.deactivate(),!(null==e?void 0:e.duration))return o(),{abort:It,deactivate:It,reset:It,t:()=>r};const{delay:a=0,css:c,tick:u,easing:d=Wo}=e;var f=[];if(i&&void 0===n&&(u&&u(0,1),c)){var v=Oo(c(0,1));f.push(v,v)}var h=()=>1-r,p=t.animate(f,{duration:a,fill:"forwards"});return p.onfinish=()=>{p.cancel();var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,s=e.duration*Math.abs(l),a=[];if(s>0){var f=!1;if(c)for(var v=Math.ceil(s/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),w=Oo(c(m,1-m));a.push(w),f||(f="hidden"===w.overflow)}f&&(t.style.overflow="hidden"),h=()=>{var t=p.currentTime;return i+l*d(t/s)},u&&function(t){let e;0===So.tasks.size&&So.tick(Eo),new Promise(n=>{So.tasks.add(e={c:t,f:n})})}(()=>{if("running"!==p.playState)return!1;var t=h();return u(t,1-t),!0})}(p=t.animate(a,{duration:s,fill:"forwards"})).onfinish=()=>{h=()=>r,null==u||u(r,1-r),o()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=It)},deactivate:()=>{o=It},reset:()=>{0===r&&(null==u||u(1,0))},t:()=>h()}}function To(t){var e=t.type;return"number"===e||"range"===e}function Lo(t){return""===t?null:+t}const Ao=class{constructor(t){ut(this,q),ut(this,R,new WeakMap),ut(this,B),ut(this,D),dt(this,D,t)}observe(t,e){var n=ct(this,R).get(t)||new Set;return n.add(e),ct(this,R).set(t,n),ft(this,q,F).call(this).observe(t,ct(this,D)),()=>{var n=ct(this,R).get(t);n.delete(e),0===n.size&&(ct(this,R).delete(t),ct(this,B).unobserve(t))}}};R=new WeakMap,B=new WeakMap,D=new WeakMap,q=new WeakSet,F=function(){return ct(this,B)??dt(this,B,new ResizeObserver(t=>{for(var e of t)for(var n of(Ao.entries.set(e.target,e),ct(this,R).get(e.target)||[]))n(e)}))},st(Ao,"entries",new WeakMap);var No=new Ao({box:"border-box"});function zo(t,e){return t===e||(null==t?void 0:t[Ht])===e}function Ro(t={},e,n,r){return er(()=>{var r,o;return nr(()=>{r=o,o=[],Yn(()=>{t!==n(...o)&&(e(t,...o),r&&zo(n(...r),t)&&e(null,...r))})}),()=>{de(()=>{o&&zo(n(...o),t)&&e(null,...o)})}}),t}function Bo(t=!1){const e=ne,n=e.l.u;if(!n)return;let r=()=>Un(e.s);if(t){let t=0,n={};const o=Ze(()=>{let r=!1;const o=e.s;for(const t in o)o[t]!==n[t]&&(n[t]=o[t],r=!0);return r&&t++,t});r=()=>qn(o)}n.b.length&&tr(()=>{Do(e,r),Wt(n.b)}),Jn(()=>{const t=Yn(()=>n.m.map(Ot));return()=>{for(const e of t)"function"==typeof e&&e()}}),n.a.length&&Jn(()=>{Do(e,r),Wt(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)qn(n);e()}let qo=!1,Fo=Symbol();function Yo(t,e,n){const r=n[e]??(n[e]={store:null,source:sn(void 0),unsubscribe:It});if(r.store!==t&&!(Fo in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=It;else{var o=!0;r.unsubscribe=ti(t,t=>{o?r.source.v=t:an(r.source,t)}),o=!1}return t&&Fo in n?ri(t):qn(r.source)}function Go(t,e){return t.set(e),e}function Ho(){const t={};return[t,function(){Zn(()=>{for(var e in t)t[e].unsubscribe();xt(t,Fo,{enumerable:!1,value:!0})})}]}const Uo={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set:(t,e)=>!1,getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))},Vo={get(t,e){if(!t.exclude.includes(e))return qn(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,n){if(!(e in t.special)){var r=kn;try{_n(t.parent_effect),t.special[e]=Jo({get[e](){return t.props[e]}},e,4)}finally{_n(r)}}return t.special[e](n),un(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),un(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Ko(t,e){return new Proxy({props:t,exclude:e,special:{},version:on(0),parent_effect:kn},Vo)}const Xo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Ct(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r)return r[e]}},set(t,e,n){let r=t.props.length;for(;r--;){let o=t.props[r];Ct(o)&&(o=o());const i=$t(o,e);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Ct(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=$t(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===Ht||e===Ut)return!1;for(let n of t.props)if(Ct(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Ct(n)&&(n=n()),n){for(const t in n)e.includes(t)||e.push(t);for(const t of Object.getOwnPropertySymbols(n))e.includes(t)||e.push(t)}return e}};function Zo(...t){return new Proxy({props:t},Xo)}function Jo(t,e,n,r){var o,i,l,s=!te||!!(2&n),a=!!(8&n),c=!!(16&n),u=r,d=!0,f=()=>(d&&(d=!1,u=c?Yn(r):r),u);if(a){var v=Ht in t||Ut in t;i=(null==(o=$t(t,e))?void 0:o.set)??(v&&e in t?n=>t[e]=n:void 0)}var h,p=!1;if(a?[l,p]=function(t){var e=qo;try{return qo=!1,[t(),qo]}finally{qo=e}}(()=>t[e]):l=t[e],void 0===l&&void 0!==r&&(l=f(),i&&(s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i(l))),h=s?()=>{var n=t[e];return void 0===n?f():(d=!0,n)}:()=>{var n=t[e];return void 0!==n&&(u=void 0),void 0===n?u:n},s&&!(4&n))return h;if(i){var g=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!g&&!p||i(e?h():t),t):h()}}var m=!1,w=(1&n?Ze:Qe)(()=>(m=!1,h()));a&&qn(w);var y=kn;return function(t,e){if(arguments.length>0){const n=e?qn(w):s&&a?ve(t):t;return an(w,n),m=!0,void 0!==u&&(u=n),t}return wn&&m||0!==(y.f&Rt)?w.v:qn(w)}}function Qo(t){var e,n;null===ne&&Qt(),te&&null!==ne.l?(e=ne,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Jn(()=>{const e=Yn(t);if("function"==typeof e)return e})}function ti(t,e,n){if(null==t)return e(void 0),It;const r=Yn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ei=[];function ni(t,e=It){let n=null;const r=new Set;function o(e){if(Zt(t,e)&&(t=e,n)){const e=!ei.length;for(const n of r)n[1](),ei.push(n,t);if(e){for(let t=0;t<ei.length;t+=2)ei[t][0](ei[t+1]);ei.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,s=It){const a=[l,s];return r.add(a),1===r.size&&(n=e(o,i)||It),l(t),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function ri(t){let e;return ti(t,t=>e=t)(),e}"undefined"!=typeof window&&((Y=window.__svelte??(window.__svelte={})).v??(Y.v=new Set)).add("5");const oi=Array(12).fill(0);var ii=jr('<div class="sonner-loading-bar"></div>'),li=jr('<div><div class="sonner-spinner"></div></div>');function si(...t){return t.filter(Boolean).join(" ")}const ai="undefined"!=typeof document,ci="undefined"!=typeof window?window:void 0;new(U=class{constructor(t={}){ut(this,G),ut(this,H);const{window:e=ci,document:n=(null==e?void 0:e.document)}=t;void 0!==e&&(dt(this,G,n),dt(this,H,Ue(t=>{const n=Sr(e,"focusin",t),r=Sr(e,"focusout",t);return()=>{n(),r()}})))}get current(){var t;return null==(t=ct(this,H))||t.call(this),ct(this,G)?function(t){let e=t.activeElement;for(;null==e?void 0:e.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}(ct(this,G)):null}},G=new WeakMap,H=new WeakMap,U);const ui=new(X=class{constructor(t){ut(this,V),ut(this,K),dt(this,V,t),dt(this,K,Symbol(t))}get key(){return ct(this,K)}exists(){return t=ct(this,K),ae().has(t);var t}get(){const t=oe(ct(this,K));if(void 0===t)throw new Error(`Context "${ct(this,V)}" not found`);return t}getOr(t){const e=oe(ct(this,K));return void 0===e?t:e}set(t){return e=ct(this,K),n=t,ae().set(e,n),n;var e,n}},V=new WeakMap,K=new WeakMap,X)("<Toaster/>");let di=0;const fi=new(tt=class{constructor(){ut(this,Z,ln(ve([]))),ut(this,J,ln(ve([]))),ut(this,Q,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),st(this,"addToast",t=>{ai&&this.toasts.unshift(t)}),st(this,"updateToast",({id:t,data:e,type:n,message:r})=>{const o=this.toasts.findIndex(e=>e.id===t),i=this.toasts[o];this.toasts[o]={...i,...e,id:t,title:r,type:n,updated:!0}}),st(this,"create",t=>{var e;const{message:n,...r}=t,o="number"==typeof(null==t?void 0:t.id)||t.id&&(null==(e=t.id)?void 0:e.length)>0?t.id:di++,i=void 0===t.dismissable||t.dismissable,l=void 0===t.type?"default":t.type;return Yn(()=>{this.toasts.find(t=>t.id===o)?this.updateToast({id:o,data:t,type:l,message:n,dismissable:i}):this.addToast({...r,id:o,title:n,dismissable:i,type:l})}),o}),st(this,"dismiss",t=>(Yn(()=>{if(void 0===t)return void(this.toasts=this.toasts.map(t=>({...t,dismiss:!0})));const e=this.toasts.findIndex(e=>e.id===t);this.toasts[e]&&(this.toasts[e]={...this.toasts[e],dismiss:!0})}),t)),st(this,"remove",t=>{if(void 0===t)return void(this.toasts=[]);const e=ct(this,Q).call(this,t);return null!==e?(this.toasts.splice(e,1),t):void 0}),st(this,"message",(t,e)=>this.create({...e,type:"default",message:t})),st(this,"error",(t,e)=>this.create({...e,type:"error",message:t})),st(this,"success",(t,e)=>this.create({...e,type:"success",message:t})),st(this,"info",(t,e)=>this.create({...e,type:"info",message:t})),st(this,"warning",(t,e)=>this.create({...e,type:"warning",message:t})),st(this,"loading",(t,e)=>this.create({...e,type:"loading",message:t})),st(this,"promise",(t,e)=>{if(!e)return;let n;void 0!==e.loading&&(n=this.create({...e,promise:t,type:"loading",message:"string"==typeof e.loading?e.loading:e.loading()}));const r=t instanceof Promise?t:t();let o=void 0!==n;return r.then(t=>{if("object"==typeof t&&t&&"ok"in t&&"boolean"==typeof t.ok&&!t.ok){o=!1;const e=(r=t)&&"object"==typeof r&&"status"in r?`HTTP error! Status: ${r.status}`:`Error! ${r}`;this.create({id:n,type:"error",message:e})}else if(void 0!==e.success){o=!1;const r="function"==typeof e.success?e.success(t):e.success;this.create({id:n,type:"success",message:r})}var r}).catch(t=>{if(void 0!==e.error){o=!1;const r="function"==typeof e.error?e.error(t):e.error;this.create({id:n,type:"error",message:r})}}).finally(()=>{var t;o&&(this.dismiss(n),n=void 0),null==(t=e.finally)||t.call(e)}),n}),st(this,"custom",(t,e)=>{const n=(null==e?void 0:e.id)||di++;return this.create({component:t,id:n,...e}),n}),st(this,"removeHeight",t=>{this.heights=this.heights.filter(e=>e.toastId!==t)}),st(this,"setHeight",t=>{const e=ct(this,Q).call(this,t.toastId);null!==e?this.heights[e]=t:this.heights.push(t)}),st(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return qn(ct(this,Z))}set toasts(t){an(ct(this,Z),t,!0)}get heights(){return qn(ct(this,J))}set heights(t){an(ct(this,J),t,!0)}},Z=new WeakMap,J=new WeakMap,Q=new WeakMap,tt);class vi{constructor(){ut(this,et,Je(()=>fi.toasts.filter(t=>!t.dismiss)))}get toasts(){return qn(ct(this,et))}}et=new WeakMap;const hi=Object.assign(function(t,e){return fi.create({message:t,...e})},{success:fi.success,info:fi.info,warning:fi.warning,error:fi.error,custom:fi.custom,message:fi.message,promise:fi.promise,dismiss:fi.dismiss,loading:fi.loading,getActiveToasts:()=>fi.toasts.filter(t=>!t.dismiss)});function pi(t){return void 0!==t.label}const gi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function mi(t){return 1/(1.5+Math.abs(t)/20)}var wi=jr("<div><!></div>"),yi=(t,e,n,r,o)=>{var i,l;!qn(e)&&qn(n)&&(r(),null==(l=(i=o.toast).onDismiss)||l.call(i,o.toast))},bi=jr('<button data-close-button=""><!></button>'),xi=jr('<div data-icon=""><!> <!></div>'),$i=jr('<div data-description=""><!></div>'),ki=(t,e,n,r)=>{var o,i;pi(e.toast.cancel)&&qn(n)&&(null==(i=null==(o=e.toast.cancel)?void 0:o.onClick)||i.call(o,t),r())},_i=jr('<button data-button="" data-cancel=""> </button>'),Mi=(t,e,n)=>{var r;pi(e.toast.action)&&(null==(r=e.toast.action)||r.onClick(t),t.defaultPrevented||n())},Si=jr('<button data-button=""> </button>'),Ei=jr('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Ci=jr('<li data-sonner-toast=""><!> <!></li>');function Ii(t,e){ie(e,!0);let n=Jo(e,"cancelButtonStyle",3,""),r=Jo(e,"actionButtonStyle",3,""),o=Jo(e,"descriptionClass",3,""),i=Jo(e,"unstyled",3,!1),l=Jo(e,"defaultRichColors",3,!1);const s={...gi};let a=ln(!1),c=ln(!1),u=ln(!1),d=ln(!1),f=ln(!1),v=ln(0),h=ln(0),p=e.toast.duration||e.duration||4e3,g=ln(void 0),m=ln(null),w=ln(null);const y=Je(()=>0===e.index),b=Je(()=>e.index+1<=e.visibleToasts),x=Je(()=>e.toast.type),$=Je(()=>!1!==e.toast.dismissable),k=Je(()=>e.toast.class||""),_=Je(()=>e.toast.descriptionClass||""),M=Je(()=>fi.heights.findIndex(t=>t.toastId===e.toast.id)||0),S=Je(()=>e.toast.closeButton??e.closeButton),E=Je(()=>e.toast.duration??e.duration??4e3);let C=null;const I=Je(()=>e.position.split("-")),O=Je(()=>fi.heights.reduce((t,e,n)=>n>=qn(M)?t:t+e.height,0)),W=function(){let t=ln(ve("undefined"!=typeof document&&document.hidden));return Jn(()=>Sr(document,"visibilitychange",()=>{an(t,document.hidden,!0)})),{get current(){return qn(t)}}}(),P=Je(()=>e.toast.invert||e.invert),j=Je(()=>"loading"===qn(x)),T=Je(()=>({...s,...e.classes})),L=Je(()=>e.toast.title),A=Je(()=>e.toast.description);let N=ln(0),z=ln(0);const R=Je(()=>Math.round(14*qn(M)+qn(O)));function B(){an(c,!0),an(v,qn(R),!0),fi.removeHeight(e.toast.id),setTimeout(()=>{fi.remove(e.toast.id)},200)}let D;Jn(()=>{let t;qn(L),qn(A),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=Yn(()=>qn(g));if(void 0===n)return;n.style.setProperty("height","auto");const r=n.offsetHeight,o=n.getBoundingClientRect().height,i=Math.round(o/t+Number.EPSILON&100)/100;let l;n.style.removeProperty("height"),l=Math.abs(i-r)<1?i:r,an(h,l,!0),Yn(()=>{fi.setHeight({toastId:e.toast.id,height:l})})});const q=Je(()=>e.toast.promise&&"loading"===qn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function F(){an(N,(new Date).getTime(),!0),D=setTimeout(()=>{var t,n;null==(n=(t=e.toast).onAutoClose)||n.call(t,e.toast),B()},p)}Jn(()=>{e.toast.updated&&(clearTimeout(D),p=qn(E),F())}),Jn(()=>(qn(q)||(e.expanded||e.interacting||W.current?function(){if(qn(z)<qn(N)){const t=(new Date).getTime()-qn(N);p-=t}an(z,(new Date).getTime(),!0)}():F()),()=>clearTimeout(D))),Qo(()=>{var t;an(a,!0);const n=null==(t=qn(g))?void 0:t.getBoundingClientRect().height;return an(h,n,!0),fi.setHeight({toastId:e.toast.id,height:n}),()=>{fi.removeHeight(e.toast.id)}}),Jn(()=>{e.toast.delete&&Yn(()=>{var t,n;B(),null==(n=(t=e.toast).onDismiss)||n.call(t,e.toast)})});const Y=Je(()=>e.toast.icon?e.toast.icon:"success"===qn(x)?e.successIcon:"error"===qn(x)?e.errorIcon:"warning"===qn(x)?e.warningIcon:"info"===qn(x)?e.infoIcon:"loading"===qn(x)?e.loadingIcon:null);var G=Ci();let H;xo(G,"tabindex",0),G.__pointermove=t=>{var n,r,o;if(!C||!qn($))return;if(((null==(n=window.getSelection())?void 0:n.toString().length)??-1)>0)return;const i=t.clientY-C.y,l=t.clientX-C.x,s=e.swipeDirections??function(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}(e.position);!qn(m)&&(Math.abs(l)>1||Math.abs(i)>1)&&an(m,Math.abs(l)>Math.abs(i)?"x":"y",!0);let a={x:0,y:0};if("y"===qn(m)){if(s.includes("top")||s.includes("bottom"))if(s.includes("top")&&i<0||s.includes("bottom")&&i>0)a.y=i;else{const t=i*mi(i);a.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===qn(m)&&(s.includes("left")||s.includes("right")))if(s.includes("left")&&l<0||s.includes("right")&&l>0)a.x=l;else{const t=l*mi(l);a.x=Math.abs(t)<Math.abs(l)?t:l}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&an(f,!0),null==(r=qn(g))||r.style.setProperty("--swipe-amount-x",`${a.x}px`),null==(o=qn(g))||o.style.setProperty("--swipe-amount-y",`${a.y}px`)},G.__pointerup=()=>{var t,n,r,o,i,l;if(qn(d)||!qn($))return;C=null;const s=Number((null==(t=qn(g))?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(n=qn(g))?void 0:n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=(new Date).getTime()-0,h="x"===qn(m)?s:a,p=Math.abs(h)/c;if(Math.abs(h)>=45||p>.11)return an(v,qn(R),!0),null==(o=(r=e.toast).onDismiss)||o.call(r,e.toast),"x"===qn(m)?an(w,s>0?"right":"left",!0):an(w,a>0?"down":"up",!0),B(),void an(d,!0);null==(i=qn(g))||i.style.setProperty("--swipe-amount-x","0px"),null==(l=qn(g))||l.style.setProperty("--swipe-amount-y","0px"),an(f,!1),an(u,!1),an(m,null)},G.__pointerdown=t=>{if(qn(j))return;an(v,qn(R),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(an(u,!0),C={x:t.clientX,y:t.clientY})};var U=ke(G),V=t=>{var n=bi();n.__click=[yi,j,$,B,e],no(ke(n),()=>e.closeIcon??It),rr(t=>{xo(n,"aria-label",e.closeButtonAriaLabel),xo(n,"data-disabled",qn(j)),uo(n,1,t)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.closeButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.closeButton))}]),Nr(t,n)};Hr(U,t=>{qn(S)&&!e.toast.component&&"loading"!==qn(x)&&null!==e.closeIcon&&t(V)});var K=Me(U,2),X=t=>{const n=Je(()=>e.toast.component);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps,{closeToast:B}))}),Nr(t,r)},Z=t=>{var i=Ei(),l=_e(i),s=t=>{var n=xi(),r=ke(n),o=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();ro(_e(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Nr(t,n)},i=t=>{(t=>{var n=Ar(),r=_e(n),o=t=>{var n=wi();no(ke(n),()=>e.loadingIcon),rr(t=>{uo(n,1,t),xo(n,"data-visible","loading"===qn(x))},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.loader,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.loader,"sonner-loader"))}]),Nr(t,n)},i=t=>{{let n=Je(()=>{var t,n;return si(null==(t=qn(T))?void 0:t.loader,null==(n=e.toast.classes)?void 0:n.loader)}),r=Je(()=>"loading"===qn(x));!function(t,e){ie(e,!0);var n=li();Xr(ke(n),23,()=>oi,(t,e)=>`spinner-bar-${e}`,(t,e)=>{Nr(t,ii())}),rr(t=>{uo(n,1,t),xo(n,"data-visible",e.visible)},[()=>lo(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),Nr(t,n),le()}(t,{get class(){return qn(n)},get visible(){return qn(r)}})}};Hr(r,t=>{e.loadingIcon?t(o):t(i,!1)}),Nr(t,n)})(t)};Hr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Nr(t,n)};Hr(r,t=>{(e.toast.promise||"loading"===qn(x))&&t(o)});var i=Me(r,2),l=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();ro(_e(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.successIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.errorIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.warningIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.infoIcon??It),Nr(t,n)};Hr(r,t=>{"info"===qn(x)&&t(o)},!0),Nr(t,n)};Hr(r,t=>{"warning"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{"error"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{"success"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Nr(t,n)};Hr(i,t=>{"loading"!==e.toast.type&&t(l)}),rr(t=>uo(n,1,t),[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.icon,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.icon))}]),Nr(t,n)};Hr(l,t=>{(qn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==qn(Y)||e.toast.icon)&&t(s)});var a=Me(l,2),c=ke(a),u=ke(c),d=t=>{var n=Ar(),r=_e(n),o=t=>{const n=Je(()=>e.toast.title);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps))}),Nr(t,r)},i=t=>{var n=Lr();rr(()=>Br(n,e.toast.title)),Nr(t,n)};Hr(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),Nr(t,n)};Hr(u,t=>{e.toast.title&&t(d)});var f=Me(c,2),v=t=>{var n=$i(),r=ke(n),i=t=>{const n=Je(()=>e.toast.description);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps))}),Nr(t,r)},l=t=>{var n=Lr();rr(()=>Br(n,e.toast.description)),Nr(t,n)};Hr(r,t=>{"string"!=typeof e.toast.description?t(i):t(l,!1)}),rr(t=>uo(n,1,t),[()=>{var t,n;return lo(si(o(),qn(_),null==(t=qn(T))?void 0:t.description,null==(n=e.toast.classes)?void 0:n.description))}]),Nr(t,n)};Hr(f,t=>{e.toast.description&&t(v)});var h=Me(a,2),p=t=>{var r=Ar(),o=_e(r),i=t=>{var n=Ar();ro(_e(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),Nr(t,n)},l=t=>{var r=Ar(),o=_e(r),i=t=>{var r=_i();r.__click=[ki,e,$,B];var o=ke(r);rr(t=>{vo(r,e.toast.cancelButtonStyle??n()),uo(r,1,t),Br(o,e.toast.cancel.label)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.cancelButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.cancelButton))}]),Nr(t,r)};Hr(o,t=>{pi(e.toast.cancel)&&t(i)},!0),Nr(t,r)};Hr(o,t=>{"function"==typeof e.toast.cancel?t(i):t(l,!1)}),Nr(t,r)};Hr(h,t=>{e.toast.cancel&&t(p)});var g=Me(h,2),m=t=>{var n=Ar(),o=_e(n),i=t=>{var n=Ar();ro(_e(n),()=>e.toast.action,(t,e)=>{e(t,{})}),Nr(t,n)},l=t=>{var n=Ar(),o=_e(n),i=t=>{var n=Si();n.__click=[Mi,e,B];var o=ke(n);rr(t=>{vo(n,e.toast.actionButtonStyle??r()),uo(n,1,t),Br(o,e.toast.action.label)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.actionButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.actionButton))}]),Nr(t,n)};Hr(o,t=>{pi(e.toast.action)&&t(i)},!0),Nr(t,n)};Hr(o,t=>{"function"==typeof e.toast.action?t(i):t(l,!1)}),Nr(t,n)};Hr(g,t=>{e.toast.action&&t(m)}),rr(t=>uo(c,1,t),[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.title,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.title))}]),Nr(t,i)};Hr(K,t=>{e.toast.component?t(X):t(Z,!1)}),Ro(G,t=>an(g,t),()=>qn(g)),rr((t,n,r,o)=>{uo(G,1,t),xo(G,"data-rich-colors",e.toast.richColors??l()),xo(G,"data-styled",!(e.toast.component||e.toast.unstyled||i())),xo(G,"data-mounted",qn(a)),xo(G,"data-promise",n),xo(G,"data-swiped",qn(f)),xo(G,"data-removed",qn(c)),xo(G,"data-visible",qn(b)),xo(G,"data-y-position",qn(I)[0]),xo(G,"data-x-position",qn(I)[1]),xo(G,"data-index",e.index),xo(G,"data-front",qn(y)),xo(G,"data-swiping",qn(u)),xo(G,"data-dismissable",qn($)),xo(G,"data-type",qn(x)),xo(G,"data-invert",qn(P)),xo(G,"data-swipe-out",qn(d)),xo(G,"data-swipe-direction",qn(w)),xo(G,"data-expanded",r),H=vo(G,`${e.style} ${e.toast.style}`,H,o)},[()=>{var t,n,r,o,i,l;return lo(si(e.class,qn(k),null==(t=qn(T))?void 0:t.toast,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.toast,null==(o=qn(T))?void 0:o[qn(x)],null==(l=null==(i=e.toast)?void 0:i.classes)?void 0:l[qn(x)]))},()=>Boolean(e.toast.promise),()=>Boolean(e.expanded||e.expandByDefault&&qn(a)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":fi.toasts.length-e.index,"--offset":`${qn(c)?qn(v):qn(R)}px`,"--initial-height":e.expandByDefault?"auto":`${qn(h)}px`})]),Er("dragend",G,()=>{an(u,!1),an(m,null),C=null}),Nr(t,G),le()}Cr(["pointermove","pointerup","pointerdown","click"]),te=!0;var Oi=Tr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),Wi=Tr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),Pi=Tr('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>'),ji=Tr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),Ti=Tr('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');const Li="24px",Ai="16px",Ni="dark",zi="light";var Ri=jr("<ol></ol>"),Bi=jr('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');const Di=new(ot=class{constructor(){ut(this,nt),this.baseUrl="https://api.playlight.dev/platform",this.cachedRequests=new Map,this.pendingCacheRequests=new Map}async request(t,e={}){const{deduplicate:n,...r}=e;if(n&&this.pendingCacheRequests.has(t))return this.pendingCacheRequests.get(t);const o=async()=>{try{const e=`${this.baseUrl}${t}`,n=await fetch(e,{...r,headers:{"Content-Type":"application/json",...r.headers}});if(!n.ok){let t;try{t=await n.json()}catch{}switch(n.status){case 429:return console.warn("Playlight request failed due to rate limiting."),null;case 404:return console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production."),null;default:throw new Error((null==t?void 0:t.error)||(null==t?void 0:t.message)||n.status)}}return await n.json()}catch(e){hi.error("Request failed: "+e.message),console.error("Playlight API request error:",e)}};if(n){const e=o().then(e=>(this.pendingCacheRequests.delete(t),e));return this.pendingCacheRequests.set(t,e),e}return o()}async getCategories(){const t="/categories";if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async getSuggestions(t,e=1){let n="/suggestions";if(t&&(n+="/"+t),n+="?without="+ft(this,nt,rt).call(this),e&&(n+="&page="+e),this.cachedRequests.has(n))return structuredClone(this.cachedRequests.get(n));const r=await this.request(n,{deduplicate:!0});return r&&this.cachedRequests.set(n,r),structuredClone(r)}async getCurrentGameInfo(){const t="/game-by-domain/"+ft(this,nt,rt).call(this);if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async trackOpen(){const t=ft(this,nt,rt).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=ft(this,nt,rt).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},nt=new WeakSet,rt=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},ot),qi=new Map;async function Fi(t,...e){const n=qi.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}const Yi=t=>t;function Gi(t){const e=t-1;return e*e*e+1}function Hi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Ui(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Vi(t,{delay:e=0,duration:n=400,easing:r=Hi,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.filter?"":l.filter,c=s*(1-i),[u,d]=Ui(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${s-c*e}; filter: ${a} blur(${e*u}${d});`}}function Ki(t,{delay:e=0,duration:n=400,easing:r=Yi}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Xi(t,{delay:e=0,duration:n=400,easing:r=Gi,x:o=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),a=+s.opacity,c="none"===s.transform?"":s.transform,u=a*(1-l),[d,f]=Ui(o),[v,h]=Ui(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*v}${h});\n\t\t\topacity: ${a-u*e}`}}function Zi(t,{delay:e=0,duration:n=400,easing:r=Gi,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s="y"===o?"height":"width",a=parseFloat(i[s]),c="y"===o?["top","bottom"]:["left","right"],u=c.map(t=>`${t[0].toUpperCase()}${t.slice(1)}`),d=parseFloat(i[`padding${u[0]}`]),f=parseFloat(i[`padding${u[1]}`]),v=parseFloat(i[`margin${u[0]}`]),h=parseFloat(i[`margin${u[1]}`]),p=parseFloat(i[`border${u[0]}Width`]),g=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*l};${s}: ${t*a}px;padding-${c[0]}: ${t*d}px;padding-${c[1]}: ${t*f}px;margin-${c[0]}: ${t*v}px;margin-${c[1]}: ${t*h}px;border-${c[0]}-width: ${t*p}px;border-${c[1]}-width: ${t*g}px;min-${s}: 0`}}function Ji(t,{delay:e=0,duration:n=400,easing:r=Gi,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.transform?"":l.transform,c=1-o,u=s*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${a} scale(${1-c*e});\n\t\t\topacity: ${s-u*e}\n\t\t`}}
2
2
  /**
3
3
  * @license lucide-svelte v0.476.0 - ISC
4
4
  *
@@ -18,6 +18,265 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.de
18
18
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19
19
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
20
  *
21
- */
22
- const xr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var $r=nn("<svg><!><!></svg>");function kr(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);X(e,!1);let o=br(e,"name",8,void 0),i=br(e,"color",8,"currentColor"),l=br(e,"size",8,24),a=br(e,"strokeWidth",8,2),s=br(e,"absoluteStrokeWidth",8,!1),u=br(e,"iconNode",24,(()=>[]));rr();var c=$r();let d;var f=bt(c);mn(f,1,u,gn,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=on();n=wt(d),r=()=>ze(e)[0],o=(t,n)=>{let r;Nt((()=>r=Wn(t,r,{...ze(e)[1]})))},s=null,u=n,c=pn,At((()=>{const t=r()||null;if(t!==i){var e=pn;hn(c),a&&(null===t?Gt(a,(()=>{a=null,l=null})):t===l?Rt(a):(Dt(a),sn(!1))),t&&t!==l&&(a=Bt((()=>{if(tn(s=document.createElementNS("http://www.w3.org/2000/svg",t),s),o){var e=s.appendChild(gt());o(s,e)}se.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),sn(!0),hn(e)}}),L),ln(t,d)})),$n(xt(f),e,"default",{},null),Nt(((t,e)=>d=Wn(c,d,{...xr,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e})),[()=>s()?24*Number(a())/Number(l()):a(),()=>((...t)=>t.filter(((t,e,n)=>Boolean(t)&&n.indexOf(t)===e)).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)],_t),ln(t,c),Q()}function _r(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}const Cr=t=>t;function Sr(t){const e=t-1;return e*e*e+1}function Mr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Pr(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Ir(t,{delay:e=0,duration:n=400,easing:r=Mr,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.filter?"":l.filter,u=a*(1-i),[c,d]=Pr(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function jr(t,{delay:e=0,duration:n=400,easing:r=Cr}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function zr(t,{delay:e=0,duration:n=400,easing:r=Sr,x:o=0,y:i=0,opacity:l=0}={}){const a=getComputedStyle(t),s=+a.opacity,u="none"===a.transform?"":a.transform,c=s*(1-l),[d,f]=Pr(o),[v,p]=Pr(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*d}${f}, ${(1-t)*v}${p});\n\t\t\topacity: ${s-c*e}`}}function Tr(t,{delay:e=0,duration:n=400,easing:r=Sr,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,a="y"===o?"height":"width",s=parseFloat(i[a]),u="y"===o?["top","bottom"]:["left","right"],c=u.map((t=>`${t[0].toUpperCase()}${t.slice(1)}`)),d=parseFloat(i[`padding${c[0]}`]),f=parseFloat(i[`padding${c[1]}`]),v=parseFloat(i[`margin${c[0]}`]),p=parseFloat(i[`margin${c[1]}`]),h=parseFloat(i[`border${c[0]}Width`]),g=parseFloat(i[`border${c[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*l};${a}: ${t*s}px;padding-${u[0]}: ${t*d}px;padding-${u[1]}: ${t*f}px;margin-${u[0]}: ${t*v}px;margin-${u[1]}: ${t*p}px;border-${u[0]}-width: ${t*h}px;border-${u[1]}-width: ${t*g}px;min-${a}: 0`}}function Or(t,{delay:e=0,duration:n=400,easing:r=Sr,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.transform?"":l.transform,u=1-o,c=a*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${s} scale(${1-u*e});\n\t\t\topacity: ${a-c*e}\n\t\t`}}var Er=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Nr=en('<button aria-label="open the game discovery"><p class="z-2 flex items-center overflow-hidden text-nowrap svelte-1j97rta"><!> <span class="text-md mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="bg-background absolute bottom-0 left-0 h-full w-0 transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');Je(["click"]);const Ar=ar(!1),Br=ar(!1),Wr=ar("https://sdk.playlight.dev");var Lr=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),Dr=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),qr=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),Gr=nn('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function Fr(t,e){let n=br(e,"type",8,"success");var r=on(),o=wt(r),i=t=>{ln(t,Lr())},l=(t,e)=>{var r=t=>{ln(t,Dr())},o=(t,e)=>{var r=t=>{ln(t,qr())},o=(t,e)=>{var r=t=>{ln(t,Gr())},o=t=>{};vn(t,(t=>{"warning"===n()?t(r):t(o,!1)}),e)};vn(t,(t=>{"info"===n()?t(r):t(o,!1)}),e)};vn(t,(t=>{"error"===n()?t(r):t(o,!1)}),e)};vn(o,(t=>{"success"===n()?t(i):t(l,!1)})),ln(t,r)}var Hr=en('<div class="sonner-loading-bar"></div>'),Rr=en('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Vr(...t){return t.filter(Boolean).join(" ")}const Kr="undefined"!=typeof document;function Ur(t){const e=ar(t);return{subscribe:e.subscribe,set:function(t){Kr&&e.set(t)},update:function(t){Kr&&e.update(t)}}}let Yr=0;const Zr=function(){const t=Ur([]),e=Ur([]);function n(e){t.update((t=>[e,...t]))}function r(e){var r;const{message:o,...i}=e,l="number"==typeof(null==e?void 0:e.id)||e.id&&(null==(r=e.id)?void 0:r.length)>0?e.id:Yr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return sr(t).find((t=>t.id===l))?t.update((t=>t.map((t=>t.id===l?{...t,...e,id:l,title:o,dismissable:a,type:s,updated:!0}:{...t,updated:!1})))):n({...i,id:l,title:o,dismissable:a,type:s}),l}function o(e){if(void 0!==e)return t.update((t=>t.map((t=>t.id===e?{...t,dismiss:!0}:t)))),e;t.update((t=>t.map((t=>({...t,dismiss:!0})))))}return{create:r,addToast:n,dismiss:o,remove:function(e){if(void 0!==e)return t.update((t=>t.filter((t=>t.id!==e)))),e;t.set([])},message:function(t,e){return r({...e,type:"default",message:t})},error:function(t,e){return r({...e,type:"error",message:t})},success:function(t,e){return r({...e,type:"success",message:t})},info:function(t,e){return r({...e,type:"info",message:t})},warning:function(t,e){return r({...e,type:"warning",message:t})},loading:function(t,e){return r({...e,type:"loading",message:t})},promise:function(t,e){if(!e)return;let n;void 0!==e.loading&&(n=r({...e,promise:t,type:"loading",message:e.loading}));const i=t instanceof Promise?t:t();let l=void 0!==n;return i.then((t=>{if(t&&"boolean"==typeof t.ok&&!t.ok){l=!1;const o="function"==typeof e.error?e.error(`HTTP error! status: ${t.status}`):e.error;r({id:n,type:"error",message:o})}else if(void 0!==e.success){l=!1;const o="function"==typeof e.success?e.success(t):e.success;r({id:n,type:"success",message:o})}})).catch((t=>{if(void 0!==e.error){l=!1;const o="function"==typeof e.error?e.error(t):e.error;r({id:n,type:"error",message:o})}})).finally((()=>{var t;l&&(o(n),n=void 0),null==(t=e.finally)||t.call(e)})),n},custom:function(t,e){const n=(null==e?void 0:e.id)||Yr++;return r({component:t,id:n,...e}),n},removeHeight:function(t){e.update((e=>e.filter((e=>e.toastId!==t))))},setHeight:function(t){void 0!==sr(e).find((e=>e.toastId===t.toastId))?e.update((e=>e.map((e=>e.toastId===t.toastId?t:e)))):e.update((e=>[t,...e]))},reset:function(){t.set([]),e.set([])},toasts:t,heights:e}}(),Jr=Object.assign((function(t,e){return Zr.create({message:t,...e})}),{success:Zr.success,info:Zr.info,warning:Zr.warning,error:Zr.error,custom:Zr.custom,message:Zr.message,promise:Zr.promise,dismiss:Zr.dismiss,loading:Zr.loading});var Xr=en('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'),Qr=en('<div data-icon=""><!> <!></div>'),to=en('<div data-title=""><!></div>'),eo=en('<div data-description=""><!></div>'),no=en('<button data-button="" data-cancel=""> </button>'),ro=en('<button data-button=""> </button>'),oo=en('<!> <div data-content=""><!> <!></div> <!> <!>',1),io=en('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function lo(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);X(e,!1);const[r,o]=vr(),i=()=>dr(x,"$heights",r),l=()=>dr(ze(ot),"$effect",r),a=lt(void 0,!0),s=lt(void 0,!0),u=lt(void 0,!0),c=lt(void 0,!0),d=lt(void 0,!0),f=lt(void 0,!0),v=lt(void 0,!0),p=lt(void 0,!0),h=lt(void 0,!0),g=lt(void 0,!0),m=lt(void 0,!0),y=lt(void 0,!0),b={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:w,heights:x,removeHeight:$,setHeight:k,remove:_}=Zr;let C=br(e,"toast",9),S=br(e,"index",9),M=br(e,"expanded",9),P=br(e,"invert",13),I=br(e,"position",9),z=br(e,"visibleToasts",9),T=br(e,"expandByDefault",9),O=br(e,"closeButton",9),E=br(e,"interacting",9),N=br(e,"cancelButtonStyle",9,""),A=br(e,"actionButtonStyle",9,""),B=br(e,"duration",9,4e3),W=br(e,"descriptionClass",9,""),L=br(e,"classes",29,(()=>({}))),D=br(e,"unstyled",9,!1),q=lt(!1,!0),G=lt(!1,!0),F=lt(!1,!0),H=lt(!1,!0),R=lt(0,!0),V=lt(0,!0),K=lt(void 0,!0),U=lt(0,!0),Y=0,Z=0,J=null;function tt(){at(G,!0),at(R,ze(U)),$(C().id),setTimeout((()=>{_(C().id)}),200)}let et=lt(void 0,!0),nt=lt(C().duration||B()||4e3,!0);function rt(){Y=(new Date).getTime(),at(et,setTimeout((()=>{var t,e;null==(e=(t=C()).onAutoClose)||e.call(t,C()),tt()}),ze(nt)))}let ot=lt(void 0,!0);wr((()=>{at(q,!0);const t=ze(K).getBoundingClientRect().height;return at(V,t),k({toastId:C().id,height:t}),()=>$(C().id)})),Tt((()=>Ne(L())),(()=>{L({...b,...L()})})),Tt((()=>Ne(S())),(()=>{at(a,0===S())})),Tt((()=>(Ne(S()),Ne(z()))),(()=>{at(s,S()+1<=z())})),Tt((()=>Ne(C())),(()=>{at(u,C().title)})),Tt((()=>Ne(C())),(()=>{at(c,C().description)})),Tt((()=>Ne(C())),(()=>{at(d,C().type)})),Tt((()=>Ne(C())),(()=>{at(f,C().class||"")})),Tt((()=>Ne(C())),(()=>{at(v,C().descriptionClass||"")})),Tt((()=>(i(),Ne(C()))),(()=>{at(p,i().findIndex((t=>t.toastId===C().id))||0)})),Tt((()=>Ne(I())),(()=>{at(h,I().split("-"))})),Tt((()=>(i(),ze(p))),(()=>{at(g,i().reduce(((t,e,n)=>n>=ze(p)?t:t+e.height),0))})),Tt((()=>(Ne(P()),Ne(C()))),(()=>{P(C().invert||P())})),Tt((()=>ze(d)),(()=>{at(m,"loading"===ze(d))})),Tt((()=>(ze(p),ze(g))),(()=>{at(U,Math.round(14*ze(p)+ze(g)))})),Tt((()=>(ze(u),ze(c))),(()=>{ze(u),ze(c),async function(){if(!ze(q))return;let t;await async function(){await Promise.resolve(),function(){for(Jt();oe.length>0;)Qt=!0,Me(),Jt()}()}(),t=M()||T()?1:1-.05*S(),ze(K).style.setProperty("height","auto");const e=ze(K).offsetHeight,n=ze(K).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;ze(K).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,at(V,o),k({toastId:C().id,height:o})}()})),Tt((()=>(Ne(C()),ze(et),Ne(B()))),(()=>{C().updated&&(clearTimeout(ze(et)),at(nt,C().duration||B()||4e3),rt())})),Tt((()=>(Ne(C()),ze(d))),(()=>{at(y,C().promise&&"loading"===ze(d)||C().duration===Number.POSITIVE_INFINITY)})),Tt((()=>(ze(y),Ne(M()),Ne(E()),ze(et))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=j)}(at(ot,(t=()=>(ze(y)||(M()||E()?function(){if(Z<Y){const t=(new Date).getTime()-Y;at(nt,ze(nt)-t)}Z=(new Date).getTime()}():rt()),()=>clearTimeout(ze(et))),{subscribe:t})),"$effect",r)})),Tt((()=>l()),(()=>{l()})),Tt((()=>Ne(C())),(()=>{C().delete&&tt()})),Ot(),rr(!0);var it=io();let st;Bn(it,"tabindex",0);var ut=bt(it),ct=t=>{var e=Xr();Nt((t=>{Bn(e,"data-disabled",ze(m)),In(e,1,t)}),[()=>{var t,e,n;return Cn(Vr(null==(t=L())?void 0:t.closeButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.closeButton))}],_t),Ze("click",e,(function(...t){var e;null==(e=ze(m)?void 0:()=>{var t,e;tt(),null==(e=(t=C()).onDismiss)||e.call(t,C())})||e.apply(this,t)})),ln(t,e)};vn(ut,(t=>{O()&&!C().component&&t(ct)}));var dt=xt(ut,2),ft=t=>{var e=on();kn(wt(e),(()=>C().component),((t,e)=>{e(t,mr((()=>C().componentProps),{$$events:{closeToast:tt}}))})),ln(t,e)},vt=t=>{var n=oo(),r=wt(n),o=t=>{var n=Qr(),r=bt(n),o=t=>{var n=on();$n(wt(n),e,"loading-icon",{},null),ln(t,n)};vn(r,(t=>{!C().promise&&"loading"!==ze(d)||C().icon||t(o)}));var i=xt(r,2),l=t=>{var e=on();kn(wt(e),(()=>C().icon),((t,e)=>{e(t,{})})),ln(t,e)},a=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"success-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"error-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"warning-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"info-icon",{},null),ln(t,n)};vn(t,(t=>{"info"===ze(d)&&t(r)}),n)};vn(t,(t=>{"warning"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"error"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"success"===ze(d)?t(r):t(o,!1)}),n)};vn(i,(t=>{C().icon?t(l):t(a,!1)})),ln(t,n)};vn(r,(t=>{("default"!==ze(d)||C().icon||C().promise)&&t(o)}));var i=xt(r,2),l=bt(i),a=t=>{var e=to(),n=bt(e),r=t=>{var e=on();kn(wt(e),(()=>C().title),((t,e)=>{e(t,mr((()=>C().componentProps)))})),ln(t,e)},o=t=>{var e=rn();Nt((()=>un(e,C().title))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().title?t(r):t(o,!1)})),Nt((t=>In(e,1,t)),[()=>{var t,e,n;return Cn(Vr(null==(t=L())?void 0:t.title,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.title))}],_t),ln(t,e)};vn(l,(t=>{C().title&&t(a)}));var s=xt(l,2),u=t=>{var e=eo(),n=bt(e),r=t=>{var e=on();kn(wt(e),(()=>C().description),((t,e)=>{e(t,mr((()=>C().componentProps)))})),ln(t,e)},o=t=>{var e=rn();Nt((()=>un(e,C().description))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().description?t(r):t(o,!1)})),Nt((t=>In(e,1,t)),[()=>{var t,e;return Cn(Vr(W(),ze(v),null==(t=L())?void 0:t.description,null==(e=C().classes)?void 0:e.description))}],_t),ln(t,e)};vn(s,(t=>{C().description&&t(u)}));var c=xt(i,2),f=t=>{var e=no(),n=bt(e);Nt((t=>{zn(e,N()),In(e,1,t),un(n,C().cancel.label)}),[()=>{var t,e,n;return Cn(Vr(null==(t=L())?void 0:t.cancelButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.cancelButton))}],_t),Ze("click",e,(()=>{var t;tt(),(null==(t=C().cancel)?void 0:t.onClick)&&C().cancel.onClick()})),ln(t,e)};vn(c,(t=>{C().cancel&&t(f)}));var p=xt(c,2),h=t=>{var e=ro(),n=bt(e);Nt((t=>{zn(e,A()),In(e,1,t),un(n,C().action.label)}),[()=>{var t,e,n;return Cn(Vr(null==(t=L())?void 0:t.actionButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.actionButton))}],_t),Ze("click",e,(t=>{var e;null==(e=C().action)||e.onClick(t),t.defaultPrevented||tt()})),ln(t,e)};vn(p,(t=>{C().action&&t(h)})),ln(t,n)};vn(dt,(t=>{C().component?t(ft):t(vt,!1)})),nr(it,(t=>at(K,t)),(()=>ze(K))),Nt(((t,e,o)=>{var i;Bn(it,"aria-live",C().important?"assertive":"polite"),In(it,1,t),Bn(it,"data-styled",!(C().component||(null==(i=C())?void 0:i.unstyled)||D())),Bn(it,"data-mounted",ze(q)),Bn(it,"data-promise",e),Bn(it,"data-removed",ze(G)),Bn(it,"data-visible",ze(s)),Bn(it,"data-y-position",ze(h)[0]),Bn(it,"data-x-position",ze(h)[1]),Bn(it,"data-index",S()),Bn(it,"data-front",ze(a)),Bn(it,"data-swiping",ze(F)),Bn(it,"data-type",ze(d)),Bn(it,"data-invert",P()),Bn(it,"data-swipe-out",ze(H)),Bn(it,"data-expanded",o),st=zn(it,`${n.style} ${C().style}`,st,{"--index":S(),"--toasts-before":S(),"--z-index":dr(w,"$toasts",r).length-S(),"--offset":`${ze(G)?ze(R):ze(U)}px`,"--initial-height":`${ze(V)}px`})}),[()=>{var t,e,r,o,i,l;return Cn(Vr(n.class,ze(f),null==(t=L())?void 0:t.toast,null==(r=null==(e=C())?void 0:e.classes)?void 0:r.toast,null==(o=L())?void 0:o[ze(d)],null==(l=null==(i=C())?void 0:i.classes)?void 0:l[ze(d)]))},()=>Boolean(C().promise),()=>Boolean(M()||T()&&ze(q))],_t),Ze("pointerdown",it,(function(t){if(ze(m))return;at(R,ze(U));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(at(F,!0),J={x:t.clientX,y:t.clientY})})),Ze("pointerup",it,(function(){var t,e,n;if(ze(H))return;J=null;const r=Number((null==(t=ze(K))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return at(R,ze(U)),null==(n=(e=C()).onDismiss)||n.call(e,C()),tt(),void at(H,!0);ze(K).style.setProperty("--swipe-amount","0px"),at(F,!1)})),Ze("pointermove",it,(function(t){if(!J)return;const e=t.clientY-J.y,n=t.clientX-J.x,r=("top"===ze(h)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?ze(K).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(J=null)})),ln(t,it),Q(),o()}var ao=en("<ol></ol>"),so=en('<section class="svelte-1fo5d1m"></section>');function uo(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);X(e,!1);const[o,i]=vr(),l=()=>dr(C,"$toasts",o),a=lt(),s=lt(),u="dark",c="light";function d(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let f=br(e,"invert",8,!1),v=br(e,"theme",8,"light"),p=br(e,"position",8,"bottom-right"),h=br(e,"hotkey",24,(()=>["altKey","KeyT"])),g=br(e,"containerAriaLabel",8,"Notifications"),m=br(e,"richColors",8,!1),y=br(e,"expand",8,!1),b=br(e,"duration",8,4e3),w=br(e,"visibleToasts",8,3),x=br(e,"closeButton",8,!1),$=br(e,"toastOptions",24,(()=>({}))),k=br(e,"offset",8,null),_=br(e,"dir",24,d);const{toasts:C,heights:S,reset:M}=Zr;let P=lt(!1),I=lt(!1),j=lt("system"!==(E=v())?E:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),z=lt(),T=null,O=!1;var E;function N(t){O&&!t.currentTarget.contains(t.relatedTarget)&&(O=!1,T&&(T.focus({preventScroll:!0}),T=null))}function A(t){O||(O=!0,T=t.relatedTarget)}!function(t){null===Z&&Y(),wr((()=>()=>Te(t)))}((()=>{ze(z)&&T&&(T.focus({preventScroll:!0}),T=null,O=!1)})),wr((()=>{M();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(at(P,!0),null==(e=ze(z))||e.focus()),"Escape"!==t.code||document.activeElement!==ze(z)&&!(null==(n=ze(z))?void 0:n.contains(document.activeElement))||at(P,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),Tt((()=>(Ne(p()),l())),(()=>{at(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),Tt((()=>Ne(h())),(()=>{at(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),Tt((()=>l()),(()=>{l().length<=1&&at(P,!1)})),Tt((()=>l()),(()=>{const t=l().filter((t=>t.dismiss&&!t.delete));if(t.length>0){const e=l().map((e=>t.find((t=>t.id===e.id))?{...e,delete:!0}:e));C.set(e)}})),Tt((()=>Ne(v())),(()=>{if("system"!==v()&&at(j,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?at(j,u):at(j,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{at(j,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),Ot(),rr();var B=on(),W=wt(B),L=t=>{var i=so();Bn(i,"tabindex",-1),mn(i,5,(()=>ze(a)),gn,((t,i,a,s)=>{var u=ao();let c;mn(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===ze(i)))),(t=>t.id),((t,n,r,o)=>{const l=_t((()=>{var t;return(null==(t=$())?void 0:t.actionButtonStyle)||""})),a=_t((()=>{var t;return(null==(t=$())?void 0:t.cancelButtonStyle)||""})),s=_t((()=>{var t;return(null==(t=$())?void 0:t.class)||""})),u=_t((()=>{var t;return(null==(t=$())?void 0:t.descriptionClass)||""})),c=_t((()=>$().classes||{})),d=_t((()=>{var t;return(null==(t=$())?void 0:t.duration)??b()})),v=_t((()=>$().unstyled||!1));lo(t,{get index(){return ze(r)},get toast(){return ze(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return ze(I)},get position(){return ze(i)},get expandByDefault(){return y()},get expanded(){return ze(P)},get actionButtonStyle(){return ze(l)},get cancelButtonStyle(){return ze(a)},get class(){return ze(s)},get descriptionClass(){return ze(u)},get classes(){return ze(c)},get duration(){return ze(d)},get unstyled(){return ze(v)},$$slots:{"loading-icon":(t,r)=>{var o=on();$n(wt(o),e,"loading-icon",{},(t=>{const e=_t((()=>"loading"===ze(n).type));!function(t,e){X(e,!1);let n=br(e,"visible",8);const r=Array(12).fill(0);rr();var o=Rr();mn(bt(o),5,(()=>r),gn,((t,e)=>{ln(t,Hr())})),Nt((()=>Bn(o,"data-visible",n()))),ln(t,o),Q()}(t,{get visible(){return ze(e)}})})),ln(t,o)},"success-icon":(t,n)=>{var r=on();$n(wt(r),e,"success-icon",{},(t=>{Fr(t,{type:"success"})})),ln(t,r)},"error-icon":(t,n)=>{var r=on();$n(wt(r),e,"error-icon",{},(t=>{Fr(t,{type:"error"})})),ln(t,r)},"warning-icon":(t,n)=>{var r=on();$n(wt(r),e,"warning-icon",{},(t=>{Fr(t,{type:"warning"})})),ln(t,r)},"info-icon":(t,n)=>{var r=on();$n(wt(r),e,"info-icon",{},(t=>{Fr(t,{type:"info"})})),ln(t,r)}}})})),nr(u,(t=>at(z,t)),(()=>ze(z))),Nt(((t,e,i)=>{var l;c=Wn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":ze(j),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r,[On]:{"--front-toast-height":`${null==(l=dr(S,"$heights",o)[0])?void 0:l.height}px`,"--offset":"number"==typeof k()?`${k()}px`:k()||"32px","--width":"356px","--gap":"14px"}},"svelte-1fo5d1m"),u.dir=u.dir}),[()=>"auto"===_()?d():_(),()=>ze(i).split("-")[0],()=>ze(i).split("-")[1]],_t),Ze("blur",u,N),Ze("focus",u,A),Ze("mouseenter",u,(()=>at(P,!0))),Ze("mousemove",u,(()=>at(P,!0))),Ze("mouseleave",u,(()=>{ze(I)||at(P,!1)})),Ze("pointerdown",u,(()=>at(I,!0))),Ze("pointerup",u,(()=>at(I,!1))),ln(t,u)})),Nt((()=>Bn(i,"aria-label",`${g()} ${ze(s)}`))),ln(t,i)};vn(W,(t=>{l().length>0&&t(L)})),ln(t,B),Q(),i()}const co=new(s=class{constructor(){g(this,l),this.baseUrl="https://api.playlight.dev/platform",this.cachedCategories=null,this.currentGame=null}async request(t,e={}){try{const n=`${this.baseUrl}${t}`,r=await fetch(n,{...e,headers:{"Content-Type":"application/json",...e.headers}});if(!r.ok){let t;try{t=await r.json()}catch{}finally{if(429!==r.status&&404!==r.status)throw new Error(`API request failed: ${(null==t?void 0:t.error)||(null==t?void 0:t.message)||r.status}`);return 429===r.status?console.warn("Playlight request didn't go through due to rate limiting."):console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.")}}return await r.json()}catch(n){Jr.error("Error: "+n),console.error("Playlight API error:",n)}}async getCategories(){if(this.cachedCategories)return this.cachedCategories;const t=await this.request("/categories");return this.cachedCategories=t,t}async getSuggestions(t=null,e=1){let n="/suggestions";return t&&(n+="/"+t),e&&(n+="?page="+e),n+="&without="+y(this,l,a).call(this),await this.request(n)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+y(this,l,a).call(this);return this.currentGame=await this.request(t),this.currentGame?{...this.currentGame}:void 0}async trackOpen(){const t=y(this,l,a).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=y(this,l,a).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},l=new WeakSet,a=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},s);var fo=en('<div><p class="font-bold text-white uppercase"> </p></div>');function vo(t,e){let n=br(e,"isHovered",3,!1);var r=fo();let o;var i=bt(r),l=bt(i);Nt((t=>{o=In(r,1,"bg-background absolute top-4 right-4 z-12 px-2 py-0.5 transition-opacity select-none",null,o,t),un(l,e.text)}),[()=>({"opacity-0":n()})]),ln(t,r)}var po=(t,e,n,r,o)=>{!ze(e)||ze(n)?(co.trackClick(o.game.id),window.open("https://"+o.game.domain+"?utm_source=playlight","_blank","noopener")):r()},ho=en('<video playsinline="" loop fetchpriority="low"></video>',2),go=en('<div class="bg-background/25 text-muted-foreground z-12 flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'),mo=en('<div class="bg-background/75 absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'),yo=en('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"> <!> <div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 z-9 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-o63m4o"></div> <img alt="game logo" fetchpriority="high"></div>');function bo(t,e){X(e,!0);const[n,r]=vr();let o,i=br(e,"compact",3,!1),l=it(!1),a=it(!1),s=it(void 0),u=it(!1),c=it(!1),d=it(!1),f=it(!1),v=it(void 0);function p(){ze(l)||ze(f)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(dr(Wr,"$projectUrl",n)+"/static/sounds/hover-selection.ogg",.25),at(l,!0),clearTimeout(o),o=setTimeout((()=>at(a,!0)),300),ze(s)&&e.game.cover_video_url&&ze(s).play().catch((t=>console.error("Video play error:",t)))}function h(){ze(s)&&ze(u)&&ze(s).pause(),at(l,!1),clearTimeout(o),at(a,!1)}var g=yo();Ze("touchstart",ft,(t=>{ze(v)&&!ze(v).contains(t.target)&&h()}),void 0,!0),Ze("pointerdown",ft,(t=>at(f,"touch"===t.pointerType))),Ze("pointermove",ft,(t=>at(f,"touch"===t.pointerType))),g.__click=[po,f,a,p,e];var m=bt(g),y=t=>{vo(t,{get isHovered(){return ze(l)},text:"Featured"})},b=(t,n)=>{var r=t=>{vo(t,{get isHovered(){return ze(l)},text:"New"})};vn(t,(t=>{var n;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(n=e.game)?void 0:n.created_at)&&t(r)}),n)};vn(m,(t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)}));var w=xt(m,2),x=t=>{var n=ho();let r;n.muted=!0,nr(n,(t=>at(s,t)),(()=>ze(s))),Nt((t=>{Bn(n,"src",e.game.cover_video_url),r=In(n,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,t)}),[()=>({"opacity-100":ze(l)&&ze(u)&&e.game.cover_video_url})]),Ze("loadeddata",n,(()=>{at(u,!0)})),ln(t,n)};vn(w,(t=>{e.game.cover_video_url&&t(x)}));var $=xt(w,2);let k;var _=xt($,2),C=t=>{var n=mo(),r=bt(n),o=bt(r),i=bt(o),l=bt(xt(o,2)),a=xt(r,2),s=t=>{var e=go();!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"info"},(()=>n),{iconNode:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:15}),ln(t,e)};vn(a,(t=>{ze(f)&&t(s)}));var u=xt(a,2);Nt((()=>{un(i,e.game.name),un(l,e.game.description||"No description."),In(u,1,`fade-mask bg-background/75 pointer-events-none absolute right-0 ${(ze(f)?"bottom-7":"bottom-0")??""} left-0 h-8`,"svelte-o63m4o")})),Un(3,n,(()=>Tr)),ln(t,n)};vn(_,(t=>{ze(l)&&t(C)}));var S=xt(_,4);let M;nr(g,(t=>at(v,t)),(()=>ze(v))),Nt(((t,n)=>{In(g,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${(ze(c)?"":"animate-pulse")??""} ${(i()?"h-62":"h-92")??""}`,"svelte-o63m4o"),Bn($,"src",e.game.cover_image_url),k=In($,1,"prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-o63m4o",null,k,t),Bn(S,"src",e.game.logo_url),M=In(S,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 z-10 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-o63m4o",null,M,n)}),[()=>({"opacity-100":ze(c)&&(!ze(l)||!ze(u)||!e.game.cover_video_url)}),()=>({"opacity-100":ze(d)})]),Ze("mouseenter",g,p),Ze("mouseleave",g,h),Ze("load",$,(()=>{at(c,!0)})),Ze("load",S,(()=>{at(d,!0)})),ln(t,g),Q(),r()}function wo(t){const e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}function xo(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function $o(t){const e=t-1;return e*e*e+1}function ko(t){return Math.sin(t*Math.PI/2)}function _o(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=$o}=r,a=getComputedStyle(t),s="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,c/=t.clientHeight;var d=function(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;null!==e;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}(t),f=t.clientWidth/n.width/d,v=t.clientHeight/n.height/d,p=e.left+e.width*u,h=e.top+e.height*c,g=n.left+n.width*u,m=n.top+n.height*c,y=(p-g)*f,b=(h-m)*v,w=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(y*y+b*b)):i,easing:l,css:(t,e)=>`transform: ${s} translate(${e*y}px, ${e*b}px) scale(${t+e*w}, ${t+e*x});`}}Je(["click"]);var Co=(t,e,n)=>{at(e,""),at(n,!ze(n))},So=en('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),Mo=en('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),Po=(t,e,n,r,o)=>{var i;e(n),at(r,!1),null==(i=o.onCategoryChange)||i.call(o)},Io=en("<button> </button>"),jo=en('<div class="space-y-1 p-1"></div>'),zo=en('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),To=en('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Oo(t,e){X(e,!0);let n,r=br(e,"categories",19,(()=>[])),o=br(e,"selectedCategory",15),i=it(!1),l=kt((()=>o()||(r().length>0?r()[0]:"..."))),a=it(""),s=it(void 0),u=kt((()=>ze(a)?r().filter((t=>t.toLowerCase().includes(ze(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=it(et(c[0]));wr((()=>{at(d,c[Math.floor(Math.random()*(null==c?void 0:c.length))],!0)}));var f=To();Ze("click",ft,(t=>{var e;!ze(s)||(null==(e=ze(s))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||at(i,!1)}));var v=bt(f),p=bt(v),h=bt(p),g=xt(p,2);g.__click=[Co,a,i];var m=bt(g),y=bt(m),b=xt(m,2);const w=kt((()=>ze(i)?"rotate-180 transform":""));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(b,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${ze(w)??""} transition-transform duration-200`}}),nr(g,(t=>n=t),(()=>n));var x=xt(v,2),$=t=>{var n=zo(),l=bt(n),c=bt(l),d=bt(c);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=xt(d,2),v=bt(xt(l,2)),p=t=>{ln(t,So())},h=(t,n)=>{var r=t=>{ln(t,Mo())},l=t=>{var n=jo();mn(n,28,(()=>ze(u)),(t=>t),((t,n)=>{var r=Io();r.__click=[Po,o,n,i,e];var l,a,s,u,c,d,f,v,p=bt(r);Nt((()=>{In(r,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=n?"hover:bg-muted-foreground/20":"")??""} ${(o()==n?"bg-white text-black":"text-white")??""}`),un(p,n)})),l=r,a=()=>_o,s=()=>({duration:150}),v=null,(f=pn).a??(f.a={element:l,measure(){u=this.element.getBoundingClientRect()},apply(){if(null==d||d.abort(),c=this.element.getBoundingClientRect(),u.left!==c.left||u.right!==c.right||u.top!==c.top||u.bottom!==c.bottom){const t=a()(this.element,{from:u,to:c},null==s?void 0:s());d=Yn(this.element,t,void 0,1,(()=>{null==d||d.abort(),d=void 0}))}},fix(){if(!l.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(l);if("absolute"!==t&&"fixed"!==t){var r=l.style;v={position:r.position,width:r.width,height:r.height,transform:r.transform},r.position="absolute",r.width=e,r.height=n;var o=l.getBoundingClientRect();if(u.left!==o.left||u.top!==o.top){var i=`translate(${u.left-o.left}px, ${u.top-o.top}px)`;r.transform=r.transform?`${r.transform} ${i}`:i}}}},unfix(){if(v){var t=l.style;t.position=v.position,t.width=v.width,t.height=v.height,t.transform=v.transform}}}),f.a.element=l,ln(t,r)})),ln(t,n)};vn(t,(t=>{0===ze(u).length?t(r):t(l,!1)}),n)};vn(v,(t=>{0===r().length?t(p):t(h,!1)})),nr(n,(t=>at(s,t)),(()=>ze(s))),function(t,e,n=e){var r=tt();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ve(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),Re||(Re=!0,document.addEventListener("reset",(t=>{Promise.resolve().then((()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)null==(e=n.__on_r)||e.call(n)}))}),{capture:!0}))})(t,"input",(o=>{var i=o?t.defaultValue:t.value;if(i=Zn(t)?Jn(i):i,n(i),r&&i!==(i=e())){var l=t.selectionStart,a=t.selectionEnd;t.value=i??"",null!==a&&(t.selectionStart=l,t.selectionEnd=Math.min(a,t.value.length))}})),null==Te(e)&&t.value&&n(Zn(t)?Jn(t.value):t.value),Et((()=>{var n=e();Zn(t)&&n===Jn(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(f,(()=>ze(a)),(t=>at(a,t))),Un(1,n,(()=>jr),(()=>({duration:150,easing:ko}))),Un(2,n,(()=>jr),(()=>({duration:200,easing:ko}))),ln(t,n)};vn(x,(t=>{ze(i)&&t($)})),Nt((()=>{un(h,ze(d)),un(y,ze(l))})),Un(3,f,(()=>Or),(()=>({easing:wo,start:.95}))),ln(t,f),Q()}Je(["click"]);var Eo=en('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px min-[1920px]:h-1/4"></div></div></div></div>');function No(t,e,n,r,o,i){at(e,!1),at(n,!0),at(r,250),at(o,0),i(250,0,250,((t,e,n)=>{at(r,t*(1-n)),at(o,n,!0)}))}async function Ao(t,e,n,r){var o;if(!(null==(o=e.currentGame)?void 0:o.id))return;const i=!ze(n);fr(Br,i),at(n,!ze(n)),i?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await co.toggleLike(e.currentGame.id,i)||fr(Br,!i)}var Bo=en('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="max-w-2/3 truncate text-lg font-bold text-white"> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>'),Wo=en('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),Lo=en("<!> <!>",1);function Do(t,e){t.target===t.currentTarget&&fr(Ar,!1)}Je(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","click"]);var qo=(t,e)=>fr(Ar,!1),Go=en('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Fo=en('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'),Ho=en("<!> <!>",1),Ro=en('<div class="flex h-30 items-center"><!></div>'),Vo=en('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'),Ko=en('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 max-sm:w-40"> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-44gflq"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');function Uo(t,e){X(e,!0);const[n,r]=vr(),o=()=>dr(Ar,"$discoveryOpen",n);let i,l=it(!0),a=it(!1),s=it(void 0),u=it(et([])),c=it(void 0),d=it(et([])),f=it(1),v=it(!0),p=it(!1),h=it(void 0),g=it(void 0);async function m(){var t,e;at(d,[],!0),at(f,1),at(v,!0),at(p,!1),(null==(t=ze(s))?void 0:t.featured_game)&&ze(c)==(null==(e=ze(s))?void 0:e.category)&&ze(d).push({...ze(s).featured_game,featured:!0}),await y()}async function y(){if(ze(l)||ze(a))return;1===ze(f)?at(l,!0):at(a,!0);const t=ze(p)?null:ze(c),e=await co.getSuggestions(t,ze(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter((t=>!ze(d).some((e=>e.id===t.id))));at(d,[...ze(d),...o],!0),n.length<r?!ze(p)&&ze(c)?(at(p,!0),at(f,1)):at(v,!1):at(f,ze(f)+1),at(l,!1),at(a,!1),ze(v)&&ze(h)&&ze(h).getBoundingClientRect().bottom<=window.innerHeight+300&&y()}wr((()=>(i=new IntersectionObserver((t=>{t[0].isIntersecting&&ze(v)&&y()}),{rootMargin:"300px",root:ze(g)}),()=>null==i?void 0:i.disconnect()))),jt((()=>{ze(h)&&i&&i.observe(ze(h))})),wr((async()=>{var t,e,n;at(s,await co.getCurrentGameInfo(),!0),at(u,await co.getCategories(),!0),at(c,(null==(t=ze(s))?void 0:t.category)||(null==(n=ze(u))?void 0:n[(null==(e=ze(u))?void 0:e.length)-1]),!0),at(l,!1),await m()}));var b=Ko();Ze("keydown",ft,(t=>{"Escape"==t.key&&fr(Ar,!1)})),b.__click=[Do,o];var w=bt(b),x=bt(w),$=bt(xt(x,2));$.__click=[qo,o],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt($),{size:24,strokeWidth:2.5});var k=xt(w,2);Oo(bt(k),{get categories(){return ze(u)},onCategoryChange:m,get selectedCategory(){return ze(c)},set selectedCategory(t){at(c,t,!0)}});var _=xt(k,2);!function(t,e){var n;X(e,!0);const[r,o]=vr(),i=()=>dr(Br,"$likedInThisSession",r);let l=it(!1),a=it(!0),s=it(!1),u=it(0),c=it(1),d=it(!1),f=it(!1),v=it(et((null==(n=e.currentGame)?void 0:n.likes)||0)),p=0;function h(t){at(d,!0),p=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function g(t){if(!ze(d))return;const e=t.type.includes("touch")?t.touches[0].clientY:t.clientY,n=Math.max(0,e-p);at(u,n,!0),at(c,Math.max(0,1-n/150),!0),n>40&&(at(d,!1),y(ze(u),250,250,((t,e,n)=>{at(u,t+(e-t)*n),at(c,Math.max(0,1-1.5*n),!0),1===n&&(at(a,!1),at(s,!0))})))}function m(){ze(d)&&(at(d,!1),ze(u)<40&&y(ze(u),0,250,((t,e,n)=>{at(u,t*(1-n)),at(c,1)})))}function y(t,e,n,r){const o=Date.now();!function i(){const l=Math.min((Date.now()-o)/n,1);r(t,e,l),l<1&&requestAnimationFrame(i)}()}jt((()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(at(f,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),at(v,(null==(n=e.currentGame)?void 0:n.likes)||0,!0))}));var b=Lo(),w=wt(b),x=t=>{var n=Bo();n.__mousedown=h,n.__mousemove=g,n.__mouseup=m,n.__touchstart=h,n.__touchmove=g,n.__touchend=m;var r=xt(bt(n),2),o=bt(r);let a;var s=xt(o,2),d=bt(s),p=bt(xt(s,2)),y=bt(p),b=xt(p,2);b.__click=[Ao,e,f,i];var w=bt(b);const x=kt((()=>ze(f)?"currentColor":"none"));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"thumbs-up"},(()=>n),{iconNode:[["path",{d:"M7 10v12"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return ze(x)},style:"margin-top: -5px;"}),Nt((t=>{var r,l;zn(n,`transform: translateY(${ze(u)??""}px); opacity: ${ze(c)??""}; cursor: grab;`),Bn(o,"src",null==(r=e.currentGame)?void 0:r.logo_url),a=In(o,1,"bg-muted h-5 w-5 select-none",null,a,t),un(d,(null==(l=e.currentGame)?void 0:l.name)||"Default name"),un(y,i()?ze(v)+1:ze(v)),zn(b,`color: ${(ze(f)?"white !important":"")??""};`),Bn(b,"aria-label",ze(f)?"Unlike game":"Like game")}),[()=>({"animate-pulse":!ze(l)})]),Ze("mouseleave",n,m),Ze("load",o,(()=>{at(l,!0)})),ln(t,n)};vn(w,(t=>{e.currentGame&&ze(a)&&t(x)}));var $=xt(w,2),k=t=>{var e=Wo(),n=bt(e);n.__mousedown=[No,s,a,u,c,y],n.__touchstart=[No,s,a,u,c,y],Un(3,n,(()=>zr),(()=>({delay:150,y:30}))),ln(t,e)};vn($,(t=>{e.currentGame&&ze(s)&&t(k)})),ln(t,b),Q(),o()}(_,{get currentGame(){return ze(s)}});var C=xt(_,2);C.__click=[Do,o];var S=bt(C),M=t=>{var e=Go();_r(bt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),ln(t,e)},P=(t,e)=>{var n=t=>{ln(t,Fo())},r=t=>{var e=Vo(),n=bt(e);mn(n,17,(()=>ze(d)),gn,((t,e,n)=>{var r=Ho();const o=kt((()=>ze(d).findIndex((t=>t.category!==ze(c)&&!t.featured))));var i=wt(r),l=t=>{ln(t,Eo())};vn(i,(t=>{n==ze(o)&&t(l)})),bo(xt(i,2),{get game(){return ze(e)}}),ln(t,r)}));var r=xt(n,2),o=bt(r),i=t=>{var e=Ro();_r(bt(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),ln(t,e)};vn(o,(t=>{ze(a)&&t(i)})),nr(r,(t=>at(h,t)),(()=>ze(h))),ln(t,e)};vn(t,(t=>{0!==ze(d).length||ze(l)?t(r,!1):t(n)}),e)};vn(S,(t=>{ze(l)&&0===ze(d).length?t(M):t(P,!1)})),nr(C,(t=>at(g,t)),(()=>ze(g)));var I=xt(C,2);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"external-link"},(()=>n),{iconNode:[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(xt(bt(I)),{size:14}),Nt((()=>Bn(x,"src",dr(Wr,"$projectUrl",n)+"/static/images/logo-white-small.png"))),Un(3,b,(()=>Ir),(()=>({duration:250}))),ln(t,b),Q(),r()}Je(["click"]);var Yo=en("<button><!></button>");function Zo(t,e){var n=Yo();n.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},function(t,e,...n){var r,o=t,i=j;At((()=>{i!==(i=e())&&(r&&(Dt(r),r=null),r=Bt((()=>i(o,...n))))}),L)}(bt(n),(()=>e.children??j)),Nt((()=>In(n,1,`hover:bg-background text-md inline-flex cursor-pointer items-center bg-white px-3 py-2 font-bold text-nowrap text-black uppercase transition hover:text-white ${e.class??""}`))),ln(t,n)}Je(["click"]);const Jo=new Map;async function Xo(t,...e){const n=Jo.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}var Qo=(t,e)=>{"touch"!==t.pointerType&&e()},ti=en('<div class="fixed top-0 right-0 left-0 h-4"></div>'),ei=en('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"></div>'),ni=en('<div class="ml-3 flex items-center -space-x-2"></div>'),ri=en("More games <!>",1),oi=en('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 z-99998 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'),ii=en("<!> <!>",1);Je(["pointerover"]);var li=en("<!> <!> <!> <!>",1);function ai(t,e){X(e,!0);const[n,r]=vr(),o=()=>dr(Ar,"$discoveryOpen",n),i=()=>dr(e.config,"$config",n);function l(){o()||(fr(Ar,!0),co.trackOpen())}let a;Ar.subscribe((t=>{try{t?(Xo("discoveryOpen"),a=document.body.style.overflow,document.body.style.overflow="hidden"):(Xo("discoveryClose"),document.body.style.overflow=a)}catch(e){console.error("Failed to toggle body overflow style:",e)}}));var s=li(),u=wt(s);const c=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.position})),d=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.visible}));!function(t,e){X(e,!0);let n=br(e,"position",3,"bottom-right"),r=br(e,"visible",3,!0);var o=on(),i=wt(o),l=t=>{var r=Nr();r.__click=[Er,e];var o=bt(r);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"gamepad"},(()=>n),{iconNode:[["line",{x1:"6",x2:"10",y1:"12",y2:"12"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14"}],["line",{x1:"15",x2:"15.01",y1:"13",y2:"13"}],["line",{x1:"18",x2:"18.01",y1:"11",y2:"11"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),Nt((()=>In(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white text-black z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),Un(3,r,(()=>Ir)),ln(t,r)};vn(i,(t=>{r()&&t(l)})),ln(t,o),Q()}(u,{get position(){return ze(c)},get visible(){return ze(d)},onClick:l});var f=xt(u,2),v=t=>{Uo(t,{})};vn(f,(t=>{o()&&t(v)}));var p=xt(f,2);const h=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled})),g=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.immediate}));!function(t,e){X(e,!0);let n,r=br(e,"enabled",3,!0),o=br(e,"immediate",3,!1),i=it(void 0),l=it(void 0),a=it(!1),s=it(void 0);function u(){setTimeout((()=>{var t;n<Date.now()-50&&(clearTimeout(ze(s)),at(s,null),o()?(Xo("exitIntent"),null==(t=e.onIntent)||t.call(e)):(async function(){const t=await co.getCategories(),e=await co.getCurrentGameInfo();ze(d)||at(d,(null==e?void 0:e.category)||(null==t?void 0:t[(null==t?void 0:t.length)-1]),!0);let n=await co.getSuggestions(ze(d),1);at(f,((null==n?void 0:n.games)||[]).slice(0,3),!0)}(),Xo("exitIntent"),at(a,!0)))}),150)}let c=["The cure for boredom.","Ready for what’s next?","Why stop the fun now?","Games don’t play themselves.","A new adventure awaits.","There’s always time for one more."],d=it(void 0),f=it(et([]));var v=ii();Ze("mousemove",dt,(function(t){var e,o;!r()||(null==(e=ze(i))?void 0:e.contains(t.target))||(null==(o=ze(l))?void 0:o.contains(t.target))||(!ze(s)&&ze(a)&&at(s,setTimeout((()=>at(a,!1)),1500),!0),n=Date.now())}));var p=wt(v),h=t=>{var e=ti();e.__pointerover=[Qo,u],nr(e,(t=>at(i,t)),(()=>ze(i))),ln(t,e)};vn(p,(t=>{r()&&t(h)}));var g=xt(p,2),m=t=>{var n=oi(),r=bt(n),o=bt(r);Zo(xt(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout((()=>at(a,!1)),150)},children:(t,e)=>{var n=ri(),r=xt(wt(n)),o=t=>{var e=ni();mn(e,21,(()=>ze(f)),gn,((t,e,n)=>{var r=ei();let o;var i=bt(r);Nt((()=>{o=zn(r,"",o,{"z-index":ze(f).length-n}),Bn(i,"src",ze(e).logo_url)})),ln(t,r)})),Un(3,e,(()=>Tr),(()=>({axis:"x",duration:150}))),ln(t,e)};vn(r,(t=>{var e;(null==(e=ze(f))?void 0:e.length)>=3&&t(o)})),ln(t,n)}}),nr(n,(t=>at(l,t)),(()=>ze(l))),Nt((t=>un(o,t)),[()=>c[Math.floor(Math.random()*c.length)]]),Ze("mouseenter",n,(()=>{clearTimeout(ze(s)),at(s,null)})),Un(3,n,(()=>zr),(()=>({y:-100,easing:xo,duration:500}))),ln(t,n)};vn(g,(t=>{ze(a)&&t(m)})),ln(t,v),Q()}(p,{get enabled(){return ze(h)},get immediate(){return ze(g)},onIntent:l});var m=xt(p,2),y=t=>{uo(t,{})};vn(m,(t=>{o()&&t(y)})),ln(t,s),Q(),r()}const si={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0,immediate:!1}};let ui={...si};function ci(t={}){return ui=di(si,t),ui}function di(t,e){const n={...t};return fi(t)&&fi(e)&&Object.keys(e).forEach((r=>{fi(e[r])?r in t?n[r]=di(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function fi(t){return t&&"object"==typeof t&&!Array.isArray(t)}var vi=en('<div class="flex h-62 w-full items-center justify-center"><!></div>'),pi=en('<div class="snap-center px-2"><!></div>'),hi=en('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>',1),gi=(t,e,n)=>ze(e).scrollBy({left:2*-ze(n),behavior:"smooth"}),mi=en('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),yi=(t,e,n)=>ze(e).scrollBy({left:2*ze(n),behavior:"smooth"}),bi=en('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),wi=en("<!> <!>",1),xi=en('<div class="playlight-sdk-container"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function $i(t,e){X(e,!0);const[n,r]=vr();let o=it(!0),i=it(et([])),l=it(void 0),a=it(void 0),s=it(0),u=it(!1),c=it(!0),d=it("");function f(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);at(d,`mask-image: linear-gradient(\n\t\t\tto right,\n\t\t\trgba(0, 0, 0, ${1-.95*n}) 0%,\n\t\t\trgba(0, 0, 0, ${1-.674*n}) 2%,\n\t\t\trgba(0, 0, 0, ${1-.446*n}) 3.5%,\n\t\t\trgba(0, 0, 0, ${1-.26*n}) 5%,\n\t\t\trgba(0, 0, 0, ${1-.14*n}) 6.5%,\n\t\t\trgba(0, 0, 0, ${1-.046*n}) 8%,\n\t\t\tblack 9%,\n\t\t\tblack 91%,\n\t\t\trgba(0, 0, 0, ${.954*r+(1-r)}) 92%,\n\t\t\trgba(0, 0, 0, ${.86*r+(1-r)}) 93.5%,\n\t\t\trgba(0, 0, 0, ${.74*r+(1-r)}) 95%,\n\t\t\trgba(0, 0, 0, ${.554*r+(1-r)}) 96.5%,\n\t\t\trgba(0, 0, 0, ${.326*r+(1-r)}) 98%,\n\t\t\trgba(0, 0, 0, ${.05*r+(1-r)})\n\t\t)`)}wr((async()=>{const t=await co.getCategories(),e=await co.getCurrentGameInfo();if(at(l,(null==e?void 0:e.category)||(null==t?void 0:t[(null==t?void 0:t.length)-1]),!0),await async function(){at(o,!0);let t=await co.getSuggestions(ze(l),1),e=(null==t?void 0:t.games)||[];if(e.length<10&&ze(l)){const t=await co.getSuggestions(null,1),n=((null==t?void 0:t.games)||[]).filter((t=>!e.some((e=>e.id===t.id))));e=[...e,...n]}at(i,e.slice(0,10),!0),at(o,!1)}(),ze(a)){const t=ze(a).scrollWidth-ze(a).clientWidth;f(ze(a).scrollLeft,t-ze(a).scrollLeft)}}));var v=xi(),p=bt(v),h=bt(p),g=t=>{var e=vi();_r(bt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),ln(t,e)},m=t=>{var e=hi(),n=wt(e);mn(n,17,(()=>ze(i)),gn,((t,e)=>{var n,r,o,i,l=pi();bo(bt(l),{get game(){return ze(e)},compact:!0}),n=l,r="clientWidth",o=t=>at(s,t),i=tr.observe(n,(()=>o(n[r]))),zt((()=>(Te((()=>o(n[r]))),i))),ln(t,l)}));var r=xt(n,2);Zo(xt(bt(r),2),{onclick:()=>{fr(Ar,!0),co.trackOpen()},children:(t,e)=>{ln(t,rn("See all"))}}),ln(t,e)};vn(h,(t=>{ze(o)?t(g):t(m,!1)})),nr(p,(t=>at(a,t)),(()=>ze(a)));var y=xt(p,2),b=t=>{var e=wi(),n=wt(e),r=t=>{var e=mi();e.__click=[gi,a,s],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-left"},(()=>n),{iconNode:[["path",{d:"m15 18-6-6 6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:22,strokeWidth:2.75}),Un(3,e,(()=>Ir)),ln(t,e)};vn(n,(t=>{ze(u)&&t(r)}));var o=xt(n,2),i=t=>{var e=bi();e.__click=[yi,a,s],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-right"},(()=>n),{iconNode:[["path",{d:"m9 18 6-6-6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:22,strokeWidth:2.75}),Un(3,e,(()=>Ir)),ln(t,e)};vn(o,(t=>{ze(c)&&t(i)})),ln(t,e)};vn(y,(t=>{ze(i).length>0&&t(b)})),Nt((()=>zn(p,ze(d)))),Ze("scroll",p,(t=>{const e=t.target;at(u,e.scrollLeft>20),at(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),f(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)})),ln(t,v),Q(),r()}function ki(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach((t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",cn($i,{target:t}))}))}catch(t){console.error("Playlight error occurred initializing and mounting carousel widget:",t)}}Je(["click"]);const _i=new(d=class{constructor(){g(this,u),this.container=null,this.isInitialized=!1,this.config=ar(null),this.api=co}async init(t={}){return"undefined"==typeof window?console.error("Playlight cannot run on the server, as it depends on browser APIs."):this.isInitialized?(console.warn("Playlight SDK already initialized!"),void(document.getElementById("playlight-sdk-container")||y(this,u,c).call(this))):(this.setConfig(t),y(this,u,c).call(this),ki(),function(){try{new MutationObserver((()=>{ki()})).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Playlight error occurred setting up widget observer:",t)}}(),await this.api.getCurrentGameInfo(),void(this.isInitialized=!0))}setDiscovery(t=!0){this.isInitialized&&(Ar.set(t),t&&co.trackOpen())}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent"].includes(t))return console.warn(`Invalid event type "${t}!"`);Jo.has(t)||Jo.set(t,[]),Jo.get(t).push(e)}setConfig(t={}){var e;null==(e=this.config)||e.set(ci(t))}},u=new WeakSet,c=function(){try{this.container=document.createElement("div"),this.container.id="playlight-sdk-container",this.container.className="playlight-sdk-container",document.body.appendChild(this.container),cn(ai,{target:this.container,props:{config:this.config}})}catch(t){console.error("Playlight error occured during mount:",t)}},d);return"undefined"!=typeof window&&(window.playlightSDK=_i),_i}();
21
+ */const Qi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var tl=Tr("<svg><!><!></svg>");function el(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=Ko(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);ie(e,!1);let o=Jo(e,"name",8,void 0),i=Jo(e,"color",8,"currentColor"),l=Jo(e,"size",8,24),s=Jo(e,"strokeWidth",8,2),a=Jo(e,"absoluteStrokeWidth",8,!1),c=Jo(e,"iconNode",24,()=>[]);Bo();var u=tl();$o(u,(t,e)=>({...Qi,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e}),[()=>(Un(a()),Un(s()),Un(l()),Yn(()=>a()?24*Number(s())/Number(l()):s())),()=>(Un(o()),Un(n),Yn(()=>((...t)=>t.filter((t,e,n)=>Boolean(t)&&n.indexOf(t)===e).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)))]);var d=ke(u);Xr(d,1,c,Kr,(t,e)=>{var n,r,o,i,l,s,a=Je(()=>jt(qn(e),2)),c=Ar();n=_e(c),r=()=>qn(a)[0],o=(t,e)=>{$o(t,()=>({...qn(a)[1]}))},i=null,l=Ur,s=new Gr(n,!1),or(()=>{const t=r()||null;return null===t?(s.ensure(null,null),void Rr(!0)):(s.ensure(t,e=>{var n=Ur;if(Vr(l),t){if(Pr(i=document.createElementNS("http://www.w3.org/2000/svg",t),i),o){var r=i.appendChild(be());o(i,r)}kn.nodes_end=i,e.before(i)}Vr(n)}),Rr(!0),()=>{t&&Rr(!1)})},Dt),Zn(()=>{Rr(!0)}),Nr(t,c)}),eo(Me(d),e,"default",{}),Nr(t,u),le()}function nl(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];
22
+ /**
23
+ * @license lucide-svelte v0.476.0 - ISC
24
+ *
25
+ * ISC License
26
+ *
27
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
28
+ *
29
+ * Permission to use, copy, modify, and/or distribute this software for any
30
+ * purpose with or without fee is hereby granted, provided that the above
31
+ * copyright notice and this permission notice appear in all copies.
32
+ *
33
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
34
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
35
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
38
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
39
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40
+ *
41
+ */el(t,Zo({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}function rl(t,e){if(!t||null==e)return console.error("Domain or Game ID are not provided!");Di.trackClick(e),window.open("https://"+t+"?utm_source=playlight","_blank","noopener")}const ol=(t,e=It,n=It)=>{var r=il();let o;var i=ke(r),l=ke(i);rr(t=>{o=uo(r,1,"bg-background absolute top-4 right-4 z-3 px-2 py-0.5 transition-opacity select-none",null,o,t),Br(l,n())},[()=>({"opacity-0":e()})]),Nr(t,r)};var il=jr('<div><p class="font-bold text-white uppercase"> </p></div>'),ll=(t,e,n,r,o,i)=>{!qn(e)||qn(n)||r()?rl(i.game.domain,i.game.id):o()},sl=jr('<video playsinline="" loop fetchpriority="low"></video>',2),al=jr('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'),cl=jr('<div class="bg-background/75 absolute right-0 bottom-0 left-0 flex max-h-1/3 z-2 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'),ul=jr('<div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/>',1),dl=jr('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');function fl(t,e){ie(e,!0);const[n,r]=Ho();let o,i=Jo(e,"compact",3,!1),l=Jo(e,"small",3,!1),s=ln(!1),a=ln(!1),c=ln(!1),u=ln(!1),d=ln(!1),f=ln(void 0),v=ln(!1),h=ln(void 0);function p(){qn(s)||qn(c)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(Yo(ea,"$projectUrl",n)+"/assets/sounds/hover-selection.ogg",.25),an(s,!0),clearTimeout(o),o=setTimeout(()=>an(a,!0),300),qn(f)&&e.game.cover_video_url&&qn(f).play().catch(t=>console.error("Video error:",t))}function g(){qn(f)&&qn(v)&&qn(f).pause(),an(s,!1),clearTimeout(o),an(a,!1)}var m=dl();Er("touchstart",ge,t=>{qn(h)&&!qn(h).contains(t.target)&&g()},void 0,!0),Er("pointerdown",ge,t=>an(c,"touch"===t.pointerType)),Er("pointermove",ge,t=>an(c,"touch"===t.pointerType)),m.__click=[ll,c,a,l,p,e];var w=ke(m),y=t=>{ol(t,()=>qn(s),()=>"Featured")},b=t=>{var n=Ar(),r=_e(n),o=t=>{ol(t,()=>qn(s),()=>"New")};Hr(r,t=>{var n;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(n=e.game)?void 0:n.created_at)&&t(o)},!0),Nr(t,n)};Hr(w,t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)});var x=Me(w,2),$=t=>{var n=sl();let r;n.muted=!0,Ro(n,t=>an(f,t),()=>qn(f)),rr(t=>{xo(n,"src",e.game.cover_video_url),r=uo(n,1,"absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 z-1",null,r,t)},[()=>({"opacity-100":qn(s)&&qn(v)&&e.game.cover_video_url})]),Er("loadeddata",n,()=>{an(v,!0)}),Nr(t,n)};Hr(x,t=>{e.game.cover_video_url&&t($)});var k=Me(x,2);let _;var M=Me(k,2),S=t=>{var n=cl(),r=ke(n),o=ke(r),i=ke(o),l=ke(Me(o,2)),s=Me(r,2),a=t=>{var e=al();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];
42
+ /**
43
+ * @license lucide-svelte v0.476.0 - ISC
44
+ *
45
+ * ISC License
46
+ *
47
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
48
+ *
49
+ * Permission to use, copy, modify, and/or distribute this software for any
50
+ * purpose with or without fee is hereby granted, provided that the above
51
+ * copyright notice and this permission notice appear in all copies.
52
+ *
53
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
54
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
55
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
56
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
57
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
58
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
59
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60
+ *
61
+ */el(t,Zo({name:"info"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:15}),Nr(t,e)};Hr(s,t=>{qn(c)&&t(a)});var u=Me(s,2);rr(()=>{Br(i,e.game.name),Br(l,e.game.description||"No description."),uo(u,1,`bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${qn(c)?"bottom-7":"bottom-0"} left-0 h-8`)}),Po(3,n,()=>Zi),Nr(t,n)};Hr(M,t=>{qn(s)&&!l()&&t(S)});var E=Me(M,2),C=t=>{var n=ul(),r=Me(_e(n),2);let o;rr(t=>{xo(r,"src",e.game.logo_url),o=uo(r,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o",null,o,t)},[()=>({"opacity-100":qn(d)})]),Er("load",r,()=>{an(d,!0)}),Nr(t,n)};Hr(E,t=>{l()||t(C)}),Ro(m,t=>an(h,t),()=>qn(h)),rr(t=>{uo(m,1,`highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${qn(u)?"":"animate-pulse"} ${l()?"h-42":i()?"h-62":"h-92"} ${l()?"bg-muted":"bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`,"svelte-n3ft5o"),xo(k,"src",e.game.cover_image_url),_=uo(k,1,"prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o",null,_,t)},[()=>({"opacity-100":qn(u)&&(!qn(s)||!qn(v)||!e.game.cover_video_url)})]),Er("mouseenter",m,p),Er("mouseleave",m,g),Er("load",k,()=>{an(u,!0)}),Nr(t,m),le(),r()}function vl(t){const e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}function hl(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function pl(t){const e=t-1;return e*e*e+1}function gl(t){return Math.sin(t*Math.PI/2)}function ml(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=pl}=r,s=getComputedStyle(t),a="none"===s.transform?"":s.transform,[c,u]=s.transformOrigin.split(" ").map(parseFloat);c/=t.clientWidth,u/=t.clientHeight;var d=function(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;null!==e;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}(t),f=t.clientWidth/n.width/d,v=t.clientHeight/n.height/d,h=e.left+e.width*c,p=e.top+e.height*u,g=n.left+n.width*c,m=n.top+n.height*u,w=(h-g)*f,y=(p-m)*v,b=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(w*w+y*y)):i,easing:l,css:(t,e)=>`transform: ${a} translate(${e*w}px, ${e*y}px) scale(${t+e*b}, ${t+e*x});`}}Cr(["click"]);var wl=(t,e,n)=>{an(e,""),an(n,!qn(n))},yl=jr('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),bl=jr('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),xl=(t,e,n,r,o)=>{var i;e(n),an(r,!1),null==(i=o.onCategoryChange)||i.call(o)},$l=jr("<button> </button>"),kl=jr('<div class="space-y-1 p-1"></div>'),_l=jr('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),Ml=jr('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Sl(t,e){ie(e,!0);let n,r=Jo(e,"categories",19,()=>[]),o=Jo(e,"selectedCategory",15),i=ln(!1),l=Je(()=>o()||(r().length>0?r()[0]:"...")),s=ln(""),a=ln(void 0),c=Je(()=>qn(s)?r().filter(t=>t.toLowerCase().includes(qn(s).toLowerCase())):r());const u=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=ln(ve(u[0]));Qo(()=>{an(d,u[Math.floor(Math.random()*(null==u?void 0:u.length))],!0)});var f=Ml();Er("click",ge,t=>{var e;!qn(a)||(null==(e=qn(a))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||an(i,!1)});var v=ke(f),h=ke(v),p=ke(h),g=Me(h,2);g.__click=[wl,s,i];var m=ke(g),w=ke(m),y=Me(m,2);{let t=Je(()=>qn(i)?"rotate-180 transform":"");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 9 6 6 6-6"}]];
62
+ /**
63
+ * @license lucide-svelte v0.476.0 - ISC
64
+ *
65
+ * ISC License
66
+ *
67
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
68
+ *
69
+ * Permission to use, copy, modify, and/or distribute this software for any
70
+ * purpose with or without fee is hereby granted, provided that the above
71
+ * copyright notice and this permission notice appear in all copies.
72
+ *
73
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
74
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
75
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
76
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
77
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
78
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
79
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
80
+ *
81
+ */el(t,Zo({name:"chevron-down"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(y,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${qn(t)??""} transition-transform duration-200`}})}Ro(g,t=>n=t,()=>n);var b=Me(v,2),x=t=>{var n=_l(),l=ke(n),u=ke(l),d=ke(u);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];
82
+ /**
83
+ * @license lucide-svelte v0.476.0 - ISC
84
+ *
85
+ * ISC License
86
+ *
87
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
88
+ *
89
+ * Permission to use, copy, modify, and/or distribute this software for any
90
+ * purpose with or without fee is hereby granted, provided that the above
91
+ * copyright notice and this permission notice appear in all copies.
92
+ *
93
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
94
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
95
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
96
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
97
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
98
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
99
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
100
+ *
101
+ */el(t,Zo({name:"search"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=Me(d,2),v=ke(Me(l,2)),h=t=>{Nr(t,yl())},p=t=>{var n=Ar(),r=_e(n),l=t=>{Nr(t,bl())},s=t=>{var n=kl();Xr(n,28,()=>qn(c),t=>t,(t,n)=>{var r=$l();r.__click=[xl,o,n,i,e];var l,s,a,c,u,d,f,v,h=ke(r);rr(()=>{uo(r,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${o()!=n?"hover:bg-muted-foreground/20":""} ${o()==n?"bg-white text-black":"text-white"}`),Br(h,n)}),l=r,s=()=>ml,a=()=>({duration:150}),v=null,(f=Ur).a??(f.a={element:l,measure(){c=this.element.getBoundingClientRect()},apply(){if(null==d||d.abort(),u=this.element.getBoundingClientRect(),c.left!==u.left||c.right!==u.right||c.top!==u.top||c.bottom!==u.bottom){const t=s()(this.element,{from:c,to:u},null==a?void 0:a());d=jo(this.element,t,void 0,1,()=>{null==d||d.abort(),d=void 0})}},fix(){if(!l.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(l);if("absolute"!==t&&"fixed"!==t){var r=l.style;v={position:r.position,width:r.width,height:r.height,transform:r.transform},r.position="absolute",r.width=e,r.height=n;var o=l.getBoundingClientRect();if(c.left!==o.left||c.top!==o.top){var i=`translate(${c.left-o.left}px, ${c.top-o.top}px)`;r.transform=r.transform?`${r.transform} ${i}`:i}}}},unfix(){if(v){var t=l.style;t.position=v.position,t.width=v.width,t.height=v.height,t.transform=v.transform}}}),f.a.element=l,Nr(t,r)}),Nr(t,n)};Hr(r,t=>{0===qn(c).length?t(l):t(s,!1)},!0),Nr(t,n)};Hr(v,t=>{0===r().length?t(h):t(p,!1)}),Ro(n,t=>an(a,t),()=>qn(a)),function(t,e,n=e){var r=new WeakSet;(function(t,e,n,r=n){t.addEventListener(e,()=>pn(n));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),hn||(hn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)null==(e=n.__on_r)||e.call(n)})},{capture:!0}))})(t,"input",async o=>{var i=o?t.defaultValue:t.value;if(i=To(t)?Lo(i):i,n(i),null!==We&&r.add(We),await async function(){await Promise.resolve(),function(){var t=ze;ze=!0;try{for(;;){if(fe(),0===Le.length&&(null==We||We.flush(),0===Le.length))return void(Ae=null);Be()}}finally{ze=t}}()}(),i!==(i=e())){var l=t.selectionStart,s=t.selectionEnd,a=t.value.length;if(t.value=i??"",null!==s){var c=t.value.length;l===s&&s===a&&c>a?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=l,t.selectionEnd=Math.min(s,c))}}}),null==Yn(e)&&t.value&&(n(To(t)?Lo(t.value):t.value),null!==We&&r.add(We)),nr(()=>{var n=e();if(t===document.activeElement){var o=Pe??We;if(r.has(o))return}To(t)&&n===Lo(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")})}(f,()=>qn(s),t=>an(s,t)),Po(1,n,()=>Ki,()=>({duration:150,easing:gl})),Po(2,n,()=>Ki,()=>({duration:200,easing:gl})),Nr(t,n)};Hr(b,t=>{qn(i)&&t(x)}),rr(()=>{Br(p,qn(d)),Br(w,qn(l))}),Po(3,f,()=>Ji,()=>({easing:vl,start:.95})),Nr(t,f),le()}async function El(t,e,n,r){var o;(null==(o=e.currentGame)?void 0:o.id)&&(Go(Zs,!n()),Go(Js,r()+(n()?1:-1)),n()?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await Di.toggleLike(e.currentGame.id,n())||Go(Js,r()+(n()?-1:1)))}Cr(["click"]);var Cl=jr('<img alt="logo"/>'),Il=jr('<div class="bg-muted size-5"></div>'),Ol=jr('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>');function Wl(t,e){ie(e,!0);const n=()=>Yo(Zs,"$currentGameIsLiked",o),r=()=>Yo(Js,"$currentGameLikeCount",o),[o,i]=Ho();let l=ln(!1);Jn(()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(Go(Zs,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),Go(Js,(null==(n=e.currentGame)?void 0:n.likes)||0))});var s=Ol(),a=Me(ke(s),2),c=ke(a),u=t=>{var n=Cl();let r;rr(t=>{var o;xo(n,"src",null==(o=e.currentGame)?void 0:o.logo_url),r=uo(n,1,"bg-muted-foreground/50 size-5 text-[0px]! select-none",null,r,t)},[()=>({"animate-pulse":!qn(l)})]),Er("load",n,()=>{an(l,!0)}),Nr(t,n)},d=t=>{Nr(t,Il())};Hr(c,t=>{var n;(null==(n=e.currentGame)?void 0:n.logo_url)?t(u):t(d,!1)});var f=Me(c,2);let v;var h=ke(f),p=ke(Me(f,2)),g=ke(p),m=Me(p,2);m.__click=[El,e,n,r];var w=ke(m);{let t=Je(()=>n()?"currentColor":"none");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M7 10v12"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}]];
102
+ /**
103
+ * @license lucide-svelte v0.476.0 - ISC
104
+ *
105
+ * ISC License
106
+ *
107
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
108
+ *
109
+ * Permission to use, copy, modify, and/or distribute this software for any
110
+ * purpose with or without fee is hereby granted, provided that the above
111
+ * copyright notice and this permission notice appear in all copies.
112
+ *
113
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
114
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
115
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
116
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
117
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
118
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
119
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
120
+ *
121
+ */el(t,Zo({name:"thumbs-up"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return qn(t)},style:"margin-top: -5px;"})}rr(t=>{var o;v=uo(f,1,"max-w-35 truncate text-lg font-bold text-white",null,v,t),Br(h,(null==(o=e.currentGame)?void 0:o.name)||"Unavailable"),Br(g,r()),vo(m,`color: ${n()?"white !important":""};`),xo(m,"aria-label",n()?"Unlike game":"Like game")},[()=>{var t;return{"opacity-50":!(null==(t=e.currentGame)?void 0:t.name)}}]),Nr(t,s),le(),i()}function Pl(t,e,n,r,o){an(e,!1),an(n,250),an(r,0),o(250,t=>{an(n,250*(1-t)),an(r,t,!0)})}Cr(["click"]);var jl=jr('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border-1 p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'),Tl=jr('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),Ll=jr("<!> <!>",1);function Al(t,e){t.target===t.currentTarget&&"touch"!==t.pointerType&&Go(Xs,!1)}Cr(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"]);var Nl=jr('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'),zl=(t,e)=>Go(Xs,!1),Rl=jr('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Bl=jr('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'),Dl=jr("<!> <!>",1),ql=jr('<div class="flex h-30 items-center"><!></div>'),Fl=jr('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'),Yl=jr('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');function Gl(t,e){ie(e,!0);const n=()=>Yo(Xs,"$discoveryOpen",r),[r,o]=Ho();let i,l=ln(!0),s=ln(!1),a=ln(void 0),c=ln(ve([])),u=ln(void 0),d=ln(ve([])),f=ln(1),v=ln(!0),h=ln(!1),p=ln(void 0),g=ln(void 0);async function m(){var t,e;an(d,[],!0),an(f,1),an(v,!0),an(h,!1),(null==(t=qn(a))?void 0:t.featured_game)&&qn(u)==(null==(e=qn(a))?void 0:e.category)&&qn(d).push({...qn(a).featured_game,featured:!0}),await w()}async function w(){if(qn(l)||qn(s))return;1===qn(f)?an(l,!0):an(s,!0);const t=qn(h)?null:qn(u),e=await Di.getSuggestions(t,qn(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter(t=>!qn(d).some(e=>e.id===t.id));an(d,[...qn(d),...o],!0),n.length<r?!qn(h)&&qn(u)?(an(h,!0),an(f,1)):an(v,!1):an(f,qn(f)+1),an(l,!1),an(s,!1),qn(v)&&qn(p)&&qn(p).getBoundingClientRect().bottom<=window.innerHeight+300&&w()}Qo(()=>(i=new IntersectionObserver(t=>{t[0].isIntersecting&&qn(v)&&w()},{rootMargin:"300px",root:qn(g)}),()=>null==i?void 0:i.disconnect())),Jn(()=>{qn(p)&&i&&i.observe(qn(p))}),Qo(async()=>{var t,e,n;await(async t=>{var e=jt(t,2);an(a,e[0],!0),an(c,e[1],!0)})(await Promise.all([Di.getCurrentGameInfo(),Di.getCategories()])),an(u,(null==(t=qn(a))?void 0:t.category)||(null==(n=qn(c))?void 0:n[(null==(e=qn(c))?void 0:e.length)-1]),!0),an(l,!1),await m()});var y=Yl();Er("keydown",ge,t=>{"Escape"==t.key&&Go(Xs,!1)}),y.__pointerup=[Al,n];var b=ke(y),x=ke(b),$=ke(Me(x,2));$.__click=[zl,n],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];
122
+ /**
123
+ * @license lucide-svelte v0.476.0 - ISC
124
+ *
125
+ * ISC License
126
+ *
127
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
128
+ *
129
+ * Permission to use, copy, modify, and/or distribute this software for any
130
+ * purpose with or without fee is hereby granted, provided that the above
131
+ * copyright notice and this permission notice appear in all copies.
132
+ *
133
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
134
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
135
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
136
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
137
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
139
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
140
+ *
141
+ */el(t,Zo({name:"x"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke($),{size:24,strokeWidth:2.5});var k=Me(b,2);Sl(ke(k),{get categories(){return qn(c)},onCategoryChange:m,get selectedCategory(){return qn(u)},set selectedCategory(t){an(u,t,!0)}});var _=Me(k,2),M=t=>{!function(t,e){ie(e,!0);let n=ln(!1),r=ln(0),o=ln(1),i=ln(!1),l=0;function s(t,e){const n=Date.now();!function r(){const o=Math.min((Date.now()-n)/t,1);e(o),o<1&&requestAnimationFrame(r)}()}function a(t){an(i,!0),l=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function c(t){if(!qn(i))return;const e=Math.max(0,(t.type.includes("touch")?t.touches[0].clientY:t.clientY)-l);an(r,e,!0),an(o,Math.max(0,1-e/150),!0),e>40&&function(){an(i,!1);const t=qn(r);s(250,e=>{an(r,t+(250-t)*e),an(o,Math.max(0,1-1.5*e),!0),1===e&&an(n,!0)})}()}function u(){if(qn(i)&&(an(i,!1),qn(r)<40)){const t=qn(r);s(250,e=>{an(r,t*(1-e)),an(o,1)})}}Qo(()=>s(250,t=>an(o,t,!0)));var d=Ll(),f=_e(d),v=t=>{var n=jl();n.__mousedown=a,n.__mousemove=c,n.__mouseup=u,n.__touchstart=a,n.__touchmove=c,n.__touchend=u,Wl(ke(n),{get currentGame(){return e.currentGame}}),rr(()=>vo(n,`transform: translateY(${qn(r)??""}px); opacity: ${qn(o)??""}; cursor: grab;`)),Er("mouseleave",n,u),Nr(t,n)};Hr(f,t=>{e.currentGame&&!qn(n)&&t(v)});var h=Me(f,2),p=t=>{var e=Tl(),i=ke(e);i.__mousedown=[Pl,n,r,o,s],i.__touchstart=[Pl,n,r,o,s],Po(3,i,()=>Xi,()=>({delay:150,y:30})),Nr(t,e)};Hr(h,t=>{e.currentGame&&qn(n)&&t(p)}),Nr(t,d),le()}(t,{get currentGame(){return qn(a)}})};Hr(_,t=>{Yo(Qs,"$sidebarEnabled",r)&&!Yo(ta,"$sidebarCollapsed",r)||t(M)});var S=Me(_,2);S.__pointerup=[Al,n];var E=ke(S),C=t=>{var e=Rl();nl(ke(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),Nr(t,e)},I=t=>{var e=Ar(),n=_e(e),r=t=>{Nr(t,Bl())},o=t=>{var e=Fl(),n=ke(e);Xr(n,17,()=>qn(d),Kr,(t,e,n)=>{const r=Je(()=>qn(d).findIndex(t=>t.category!==qn(u)&&!t.featured));var o=Dl(),i=_e(o),l=t=>{Nr(t,Nl())};Hr(i,t=>{n==qn(r)&&t(l)}),fl(Me(i,2),{get game(){return qn(e)}}),Nr(t,o)});var r=Me(n,2),o=ke(r),i=t=>{var e=ql();nl(ke(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),Nr(t,e)};Hr(o,t=>{qn(s)&&t(i)}),Ro(r,t=>an(p,t),()=>qn(p)),Nr(t,e)};Hr(n,t=>{0!==qn(d).length||qn(l)?t(o,!1):t(r)},!0),Nr(t,e)};Hr(E,t=>{qn(l)&&0===qn(d).length?t(C):t(I,!1)}),Ro(S,t=>an(g,t),()=>qn(g));var O=Me(S,2);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];
142
+ /**
143
+ * @license lucide-svelte v0.476.0 - ISC
144
+ *
145
+ * ISC License
146
+ *
147
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
148
+ *
149
+ * Permission to use, copy, modify, and/or distribute this software for any
150
+ * purpose with or without fee is hereby granted, provided that the above
151
+ * copyright notice and this permission notice appear in all copies.
152
+ *
153
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
154
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
155
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
156
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
157
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
158
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
159
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160
+ *
161
+ */el(t,Zo({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(ke(O)),{size:14}),rr(()=>xo(x,"src",Yo(ea,"$projectUrl",r)+"/assets/images/logo-white-small.png")),Po(3,y,()=>Vi,()=>({duration:250})),Nr(t,y),le(),o()}Cr(["pointerup","click"]);var Hl=jr("<button><!></button>");function Ul(t,e){let n=Jo(e,"disabled",3,!1),r=Jo(e,"variant",3,"primary");var o=Hl();o.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},no(ke(o),()=>e.children??It),rr(()=>{o.disabled=n(),uo(o,1,`${"primary"==r()?"outline-muted bg-white text-black hover:outline":"secondary"==r()?"bg-background hover:bg-muted outline-muted outline":"ghost"==r()?"hover:opacity-50":""} text-md inline-flex cursor-pointer items-center justify-center gap-2 ${"ghost"!==r()?"hover:bg-background px-3 py-2":""} font-bold text-nowrap uppercase transition hover:text-white ${n()?"pointer-events-none opacity-50":""} ${e.class??""}`)}),Nr(t,o)}async function Vl(t=10,e=!1){const[n,r]=await Promise.all([Di.getCategories(),Di.getCurrentGameInfo()]),o=(null==r?void 0:r.category)||(null==n?void 0:n[(null==n?void 0:n.length)-1]),i=await Di.getSuggestions(o,1);(null==i?void 0:i.pageSize)<t&&console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");let l=(null==i?void 0:i.games)||[];if(e&&(l=l.slice(0,Math.ceil(t/2))),l.length<t||e){const t=await Di.getSuggestions(null,1),e=((null==t?void 0:t.games)||[]).filter(t=>!l.some(e=>e.id===t.id));l=[...l,...e]}return l.slice(0,t)}Cr(["click"]);var Kl=(t,e)=>{"touch"!==t.pointerType&&e()},Xl=jr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Zl=jr('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'),Jl=jr('<div class="ml-3 flex items-center -space-x-2"></div>'),Ql=jr("More games <!>",1),ts=jr('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'),es=jr("<!> <!>",1);Cr(["pointerover"]);var ns=jr("<!> <!> <!>",1);function rs(t,e){ie(e,!1);const n=()=>Yo(Xs,"$discoveryOpen",o),r=()=>Yo(Vs,"$config",o),[o,i]=Ho();Bo();var l=ns(),s=_e(l),a=t=>{Gl(t,{})};Hr(s,t=>{n()&&t(a)});var c=Me(s,2);{let t=Qe(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.enabled}),e=Qe(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.immediate});!function(t,e){ie(e,!0);let n,r=Jo(e,"enabled",3,!0),o=Jo(e,"immediate",3,!1),i=ln(void 0),l=ln(void 0),s=ln(ve([])),a=ln(!1),c=ln(void 0);function u(){setTimeout(async()=>{var t,r;n<Date.now()-50&&(clearTimeout(qn(c)),an(c,null),o()?(Fi("exitIntent"),null==(t=e.onIntent)||t.call(e)):(Fi("exitIntent"),an(a,!0),(null==(r=qn(s))?void 0:r.length)||an(s,await Vl(3),!0)))},150)}let d=["The cure for boredom.","Ready for what’s next?","Why stop the fun now?","Games don’t play themselves.","A new adventure awaits.","There’s always time for one more."];var f=es();Er("mousemove",ge,function(t){var e,o;!r()||(null==(e=qn(i))?void 0:e.contains(t.target))||(null==(o=qn(l))?void 0:o.contains(t.target))||(!qn(c)&&qn(a)&&an(c,setTimeout(()=>an(a,!1),1500),!0),n=Date.now())});var v=_e(f),h=t=>{var e=Xl();e.__pointerover=[Kl,u],Ro(e,t=>an(i,t),()=>qn(i)),Nr(t,e)};Hr(v,t=>{r()&&t(h)});var p=Me(v,2),g=t=>{var n=ts(),r=ke(n),o=ke(r);Ul(Me(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout(()=>an(a,!1),150)},children:(t,e)=>{var n=Ql(),r=Me(_e(n)),o=t=>{var e=Jl();Xr(e,21,()=>qn(s),Kr,(t,e,n)=>{var r=Zl();let o;var i=ke(r);rr(t=>{o=vo(r,"",o,t),xo(i,"src",qn(e).logo_url)},[()=>({"z-index":qn(s).length-n})]),Nr(t,r)}),Po(3,e,()=>Zi,()=>({axis:"x",duration:150})),Nr(t,e)};Hr(r,t=>{var e;(null==(e=qn(s))?void 0:e.length)>=3&&t(o)}),Nr(t,n)},$$slots:{default:!0}}),Ro(n,t=>an(l,t),()=>qn(l)),rr(t=>Br(o,t),[()=>d[Math.floor(Math.random()*d.length)]]),Er("mouseenter",n,()=>{clearTimeout(qn(c)),an(c,null)}),Po(3,n,()=>Xi,()=>({y:-100,easing:hl,duration:500})),Nr(t,n)};Hr(p,t=>{qn(a)&&t(g)}),Nr(t,f),le()}(c,{get enabled(){return qn(t)},get immediate(){return qn(e)},onIntent:()=>{n()||Go(Xs,!0)}})}var u=Me(c,2),d=t=>{!function(t,e){ie(e,!0);let n=Jo(e,"invert",3,!1),r=Jo(e,"position",3,"bottom-right"),o=Jo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Jo(e,"expand",3,!1),l=Jo(e,"closeButton",3,!1),s=Jo(e,"offset",3,Li),a=Jo(e,"mobileOffset",3,Ai),c=Jo(e,"theme",3,"light"),u=Jo(e,"richColors",3,!1),d=Jo(e,"duration",3,4e3),f=Jo(e,"visibleToasts",3,3),v=Jo(e,"toastOptions",19,()=>({})),h=Jo(e,"dir",7,"auto"),p=Jo(e,"gap",3,14),g=Jo(e,"containerAriaLabel",3,"Notifications"),m=Jo(e,"closeButtonAriaLabel",3,"Close toast"),w=new Proxy({props:e,exclude:["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]},Uo);function y(){if("auto"!==h())return h();if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?(Yn(()=>h(t)),t):(Yn(()=>h(window.getComputedStyle(document.documentElement).direction??"ltr")),h())}const b=Je(()=>Array.from(new Set([r(),...fi.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=ln(!1),$=ln(!1),k=ln(ve(function(t){return"system"!==t?t:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ni:zi}(c()))),_=ln(void 0),M=ln(null),S=ln(!1);const E=Je(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Jn(()=>{fi.toasts.length<=1&&an(x,!1)}),Jn(()=>{const t=fi.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=fi.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);fi.toasts=e}}),Jn(()=>()=>{qn(_)&&qn(M)&&(qn(M).focus({preventScroll:!0}),an(M,null),an(S,!1))}),Qo(()=>(fi.reset(),Sr(document,"keydown",t=>{var e,n;o().every(e=>t[e]||t.code===e)&&(an(x,!0),null==(e=qn(_))||e.focus()),"Escape"!==t.code||document.activeElement!==qn(_)&&!(null==(n=qn(_))?void 0:n.contains(document.activeElement))||an(x,!1)}))),Jn(()=>{if("system"!==c()&&an(k,c()),"undefined"!=typeof window){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?an(k,Ni):an(k,zi));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{an(k,t?Ni:zi,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const C=t=>{var n;null==(n=e.onblur)||n.call(e,t),qn(S)&&!t.currentTarget.contains(t.relatedTarget)&&(an(S,!1),qn(M)&&(qn(M).focus({preventScroll:!0}),an(M,null)))},I=t=>{var n;null==(n=e.onfocus)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||qn(S)||(an(S,!0),an(M,t.relatedTarget,!0))},O=t=>{var n;null==(n=e.onpointerdown)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||an($,!0)},W=t=>{var n;null==(n=e.onmouseenter)||n.call(e,t),an(x,!0)},P=t=>{var n;null==(n=e.onmouseleave)||n.call(e,t),qn($)||an(x,!1)},j=t=>{var n;null==(n=e.onmousemove)||n.call(e,t),an(x,!0)},T=t=>{var n;null==(n=e.ondragend)||n.call(e,t),an(x,!1)},L=t=>{var n;null==(n=e.onpointerup)||n.call(e,t),an($,!1)};ui.set(new vi);var A=Bi();xo(A,"tabindex",-1);var N=ke(A),z=t=>{var r=Ar();Xr(_e(r),18,()=>qn(b),t=>t,(t,r,o,c)=>{const h=Je(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Je(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Ai:Li;function l(t){["top","right","bottom","left"].forEach(e=>{n[`${o}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?l(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{const r=t[e];n[`${o}-${e}`]=void 0===r?i:"number"==typeof r?`${r}px`:r}):l(i)}),n}(s(),a()));var b=Ri();$o(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":qn(k),"data-y-position":qn(h).y,"data-x-position":qn(h).x,style:e.style,onblur:C,onfocus:I,onmouseenter:W,onmousemove:j,onmouseleave:P,ondragend:T,onpointerdown:O,onpointerup:L,...w,[mo]:n}),[y,()=>{var t;return{"--front-toast-height":`${null==(t=fi.heights[0])?void 0:t.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":qn(g)["--offset-top"],"--offset-right":qn(g)["--offset-right"],"--offset-bottom":qn(g)["--offset-bottom"],"--offset-left":qn(g)["--offset-left"],"--mobile-offset-top":qn(g)["--mobile-offset-top"],"--mobile-offset-right":qn(g)["--mobile-offset-right"],"--mobile-offset-bottom":qn(g)["--mobile-offset-bottom"],"--mobile-offset-left":qn(g)["--mobile-offset-left"]}}],void 0,"svelte-nbs0zk"),Xr(b,23,()=>fi.toasts.filter(t=>!t.position&&0===qn(o)||t.position===r),t=>t.id,(t,o,s,a)=>{{const a=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.successIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Oi())};Hr(r,t=>{null!==e.successIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.successIcon?t(o):t(i,!1)}),Nr(t,n)},c=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.errorIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Wi())};Hr(r,t=>{null!==e.errorIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.errorIcon?t(o):t(i,!1)}),Nr(t,n)},h=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.warningIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Pi())};Hr(r,t=>{null!==e.warningIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.warningIcon?t(o):t(i,!1)}),Nr(t,n)},p=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.infoIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,ji())};Hr(r,t=>{null!==e.infoIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.infoIcon?t(o):t(i,!1)}),Nr(t,n)},g=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.closeIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Ti())};Hr(r,t=>{null!==e.closeIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.closeIcon?t(o):t(i,!1)}),Nr(t,n)};let w=Je(()=>{var t;return(null==(t=v())?void 0:t.duration)??d()}),y=Je(()=>{var t;return(null==(t=v())?void 0:t.class)??""}),b=Je(()=>{var t;return(null==(t=v())?void 0:t.descriptionClass)||""}),k=Je(()=>{var t;return(null==(t=v())?void 0:t.style)??""}),_=Je(()=>v().classes||{}),M=Je(()=>v().unstyled??!1),S=Je(()=>{var t;return(null==(t=v())?void 0:t.cancelButtonStyle)??""}),E=Je(()=>{var t;return(null==(t=v())?void 0:t.actionButtonStyle)??""}),C=Je(()=>{var t;return(null==(t=v())?void 0:t.closeButtonAriaLabel)??m()});Ii(t,{get index(){return qn(s)},get toast(){return qn(o)},get defaultRichColors(){return u()},get duration(){return qn(w)},get class(){return qn(y)},get descriptionClass(){return qn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return l()},get interacting(){return qn($)},get position(){return r},get style(){return qn(k)},get classes(){return qn(_)},get unstyled(){return qn(M)},get cancelButtonStyle(){return qn(S)},get actionButtonStyle(){return qn(E)},get closeButtonAriaLabel(){return qn(C)},get expandByDefault(){return i()},get expanded(){return qn(x)},get loadingIcon(){return e.loadingIcon},successIcon:a,errorIcon:c,warningIcon:h,infoIcon:p,closeIcon:g,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Ro(b,t=>an(_,t),()=>qn(_)),rr(()=>b.dir=b.dir),Nr(t,b)}),Nr(t,r)};Hr(N,t=>{fi.toasts.length>0&&t(z)}),rr(()=>xo(A,"aria-label",`${g()??""} ${qn(E)??""}`)),Nr(t,A),le()}(t,{})};Hr(u,t=>{(n()||Yo(Qs,"$sidebarEnabled",o))&&t(d)}),Nr(t,l),le(),i()}var os=jr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'),is=jr('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'),ls=jr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'),ss=jr("View all games <!>",1),as=jr("Random game <!>",1),cs=(t,e)=>e(t.clientY),us=(t,e)=>e(t.touches[0].clientY),ds=jr('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'),fs=jr('<div role="button" tabindex="0"><!> <!></div>'),vs=jr('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>',1);function hs(t,e){ie(e,!0);const n=()=>Yo(ta,"$sidebarCollapsed",i),r=()=>Yo(ea,"$projectUrl",i),o=()=>Yo(Xs,"$discoveryOpen",i),[i,l]=Ho();let s=ln(!1),a=ln(void 0),c=ln(0),u=ln(null),d=ln(ve([])),f=Je(()=>{var t;return(null==(t=qn(d))?void 0:t.filter((t,e)=>e%2==0))||[]}),v=Je(()=>{var t;return(null==(t=qn(d))?void 0:t.filter((t,e)=>e%2==1))||[]});function h(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:qn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}tr(()=>{var t;const e=document.documentElement.clientWidth<=768;Go(ta,e||Boolean(null==(t=p())?void 0:t.collapsed))}),Qo(async()=>{var t;return an(m,(null==(t=p())?void 0:t.buttonY)??qn(m),!0),an(s,!0),an(d,await Vl(14,!0),!0),an(a,await Di.getCurrentGameInfo(),!0),an(s,!1),Sr(window,"touchmove",k,{passive:!1})});let g,m=ln(100),w=ln(!1),y=ln(0),b=ln(0),x=ln(null);function $(t){an(w,!0),an(y,t,!0),an(b,qn(m),!0)}function k(t){qn(w)&&(t.preventDefault(),_(t.touches[0].clientY))}function _(t){var e;if(!qn(w))return;const n=t-qn(y),r=qn(b)+n,o=null==(e=qn(x))?void 0:e.offsetHeight;an(m,Math.max(0,Math.min(window.innerHeight-o,r)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(h)}function M(t){if(t.preventDefault(),an(c,qn(c)-t.deltaY),qn(u)){const t=qn(u).offsetHeight/3;an(c,(qn(c)%t+t)%t)}}var S=vs();Er("mousemove",ge,function(t){qn(w)&&_(t.clientY)}),Er("mouseup",ge,()=>an(w,!1)),Er("touchend",ge,()=>an(w,!1)),Er("resize",ge,()=>{document.documentElement.clientWidth<=768&&Go(ta,!0)});var E=_e(S),C=ke(E),I=Me(C,2),O=ke(I),W=t=>{var e=os();nl(ke(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Nr(t,e)},P=t=>{var e=Ar(),n=_e(e),r=t=>{var e=is(),n=ke(e),r=ke(n);let o;Xr(r,21,()=>[...qn(f),...qn(f),...qn(f)],Kr,(t,e)=>{fl(t,{get game(){return qn(e)},small:!0})}),Ro(r,t=>an(u,t),()=>qn(u));var i=ke(Me(n,2));let l;Xr(i,21,()=>[...qn(v),...qn(v),...qn(v)],Kr,(t,e)=>{fl(t,{get game(){return qn(e)},small:!0})}),rr((t,e)=>{o=vo(r,"",o,t),l=vo(i,"",l,e)},[()=>({transform:`translateY(calc(-33.333% + ${qn(c)??""}px))`}),()=>({transform:`translateY(calc(-33.333% + ${qn(c)??""}px))`})]),Er("wheel",e,M),Nr(t,e)},o=t=>{Nr(t,ls())};Hr(n,t=>{var e;(null==(e=qn(d))?void 0:e.length)?t(r):t(o,!1)},!0),Nr(t,e)};Hr(O,t=>{qn(s)?t(W):t(P,!1)});var j=Me(I,2),T=ke(j);Ul(T,{class:"w-full",onclick:()=>Go(Xs,!0),get disabled(){return o()},children:(t,e)=>{var n=ss();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["line",{x1:"6",x2:"10",y1:"11",y2:"11"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"}]];
162
+ /**
163
+ * @license lucide-svelte v0.476.0 - ISC
164
+ *
165
+ * ISC License
166
+ *
167
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
168
+ *
169
+ * Permission to use, copy, modify, and/or distribute this software for any
170
+ * purpose with or without fee is hereby granted, provided that the above
171
+ * copyright notice and this permission notice appear in all copies.
172
+ *
173
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
174
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
175
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
176
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
177
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
178
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
179
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
180
+ *
181
+ */el(t,Zo({name:"gamepad-2"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(_e(n)),{style:"margin-top: -1px;"}),Nr(t,n)},$$slots:{default:!0}}),Ul(Me(T,2),{class:"w-full",variant:"secondary",onclick:()=>{var t,e;const n=Math.floor(Math.random()*(null==(t=qn(d))?void 0:t.length)),r=null==(e=qn(d))?void 0:e[n];rl(null==r?void 0:r.domain,null==r?void 0:r.id)},children:(t,e)=>{var n=as();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6"}],["path",{d:"M6 18h.01"}],["path",{d:"M10 14h.01"}],["path",{d:"M15 6h.01"}],["path",{d:"M18 9h.01"}]];
182
+ /**
183
+ * @license lucide-svelte v0.476.0 - ISC
184
+ *
185
+ * ISC License
186
+ *
187
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
188
+ *
189
+ * Permission to use, copy, modify, and/or distribute this software for any
190
+ * purpose with or without fee is hereby granted, provided that the above
191
+ * copyright notice and this permission notice appear in all copies.
192
+ *
193
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
194
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
195
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
196
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
197
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
198
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
199
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
200
+ *
201
+ */el(t,Zo({name:"dices"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(_e(n)),{style:"margin-top: -2px;"}),Nr(t,n)},$$slots:{default:!0}});var L=ke(Me(j,2));Wl(ke(L),{get currentGame(){return qn(a)}}),Ul(ke(Me(L,2)),{variant:"secondary",class:"text-muted-foreground border-l outline-none!",onclick:()=>{Go(ta,!0),h()},children:(t,e)=>{!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]];
202
+ /**
203
+ * @license lucide-svelte v0.476.0 - ISC
204
+ *
205
+ * ISC License
206
+ *
207
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
208
+ *
209
+ * Permission to use, copy, modify, and/or distribute this software for any
210
+ * purpose with or without fee is hereby granted, provided that the above
211
+ * copyright notice and this permission notice appear in all copies.
212
+ *
213
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
214
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
215
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
216
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
217
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
218
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
219
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
220
+ *
221
+ */el(t,Zo({name:"chevrons-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(t,{})},$$slots:{default:!0}});var A=Me(E,2),N=t=>{var e=fs();let n;e.__mousedown=[cs,$],e.__touchstart=[us,$];var o=ke(e);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]];
222
+ /**
223
+ * @license lucide-svelte v0.476.0 - ISC
224
+ *
225
+ * ISC License
226
+ *
227
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
228
+ *
229
+ * Permission to use, copy, modify, and/or distribute this software for any
230
+ * purpose with or without fee is hereby granted, provided that the above
231
+ * copyright notice and this permission notice appear in all copies.
232
+ *
233
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
234
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
235
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
236
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
237
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
238
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
239
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
240
+ *
241
+ */el(t,Zo({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(o,{class:"text-muted-foreground aspect-square"}),Ul(Me(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Go(ta,!1),h()):Go(Xs,!0)},children:(t,e)=>{var n=ds();rr(()=>xo(n,"src",r()+"/assets/images/icon-white-small.png")),Nr(t,n)},$$slots:{default:!0}}),Ro(e,t=>an(x,t),()=>qn(x)),rr(t=>{uo(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border p-2 shadow-xl backdrop-blur-xl "+(qn(w)?"cursor-grabbing":"cursor-grab"),"svelte-129hoe0"),n=vo(e,"",n,t)},[()=>({top:qn(m)+"px"})]),Po(3,e,()=>Vi),Nr(t,e)};Hr(A,t=>{n()&&!o()&&t(N)}),rr(()=>{uo(E,1,`relative z-1 ml-auto flex h-dvh overflow-y-auto ${n()?"w-0":"w-75 border-l"} bg-background flex-col items-center gap-8 text-white transition-[width] duration-150 ease-out`,"svelte-129hoe0"),xo(C,"src",r()+"/assets/images/logo-white-small.png")}),Nr(t,S),le(),l()}Cr(["mousedown","touchstart"]);let ps=null,gs=null,ms=!1,ws=null,ys=new Map,bs=null;function xs(t,e,n,r,o){const i=t.getAttribute("data-playlight-original-href");let l=i?function(t,e){try{const n=new URL(e,document.baseURI);return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(t,e,r)=>!(r=r.trim())||/^(data:|https?:|\/\/|\/|#)/.test(r)?t:`url(${e}${new URL(r,n).href}${e})`)}catch{return t}}(e,i):e;l=$s(l,n,r,o),t.textContent=l,t.setAttribute("data-playlight-modified","true")}function $s(t,e,n,r){const o=e/(e+r),i=n+r;return t=(t=(t=(t=(t=(t=(t=(t=t.replace(/(\d+(?:\.\d+)?)(vw|svw|lvw|dvw)/gi,(e,n,r,i)=>{const l=t.substring(0,i),s=l.lastIndexOf("{"),a=l.lastIndexOf("}");if(s>a){const t=l.substring(a+1,s).trim();if(/^html[.\s,:[]/.test(t))return e}return`${(parseFloat(n)*o).toFixed(2)}${r}`})).replace(/\((min-width|max-width):\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(${e}: calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n,o,i)=>`(calc(${e} + ${r}px) ${n} width ${o} calc(${i} + ${r}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(width ${e} calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi,(t,e,n)=>`(calc(${e} + ${r}px) ${n} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi,`(max-width: ${i}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi,`(min-width: ${i+1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi,(t,e)=>`.playlight-sdk-inner-wrapper {${e.replace(/\s*!important\s*/gi,"")}}`)}let ks,_s=null,Ms=null,Ss=null,Es=null,Cs=null,Is=null,Os=null,Ws=null,Ps=null,js=null,Ts=new Map,Ls=null,As=null,Ns=null,zs=!1,Rs=!1,Bs=[],Ds=null,qs=null,Fs=null;function Ys(){try{const t=document.createElement("div");t.id="playlight-sdk-container",t.className="playlight-sdk playlight-sdk-container",document.body.appendChild(t);const e=Dr(rs,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(Fs),Fs=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),Yr(e),Ys())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function Gs(){var t,e,n,r;if(!zs)try{const o=document.body,i=document.documentElement,l=["DIV","MAIN","ARTICLE","SECTION","HEADER","FOOTER","NAV","ASIDE","FORM"],s=Array.from(o.children).filter(t=>{var e;return l.includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))&&t.children.length>0}),a=()=>{const t=document.createElement("div");return t.id="playlight-sdk-inner-wrapper",Array.from(o.children).filter(t=>{var e;return!["SCRIPT","STYLE"].includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))}).forEach(e=>t.appendChild(e)),o.appendChild(t),Rs=!0,t};if(!1!==(null==(e=null==(t=ri(Vs))?void 0:t.sidebar)?void 0:e.hasFrameworkRoot)&&s.length>0)if(1===s.length)As=s[0],Rs=!1;else if(!0===(null==(r=null==(n=ri(Vs))?void 0:n.sidebar)?void 0:r.hasFrameworkRoot)){const t=s.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);As=s[t.indexOf(e)],Rs=!1}As||(As=a()),i.classList.add("playlight-sdk-html"),o.classList.add("playlight-sdk-body"),As.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{_s=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),Ss=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),Es=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),Cs=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),Is=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),Os=window.scrollTo,Ws=window.scroll,Ps=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),js=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",js),Ms=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=Ms||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=$s(e,r,window.innerHeight,o);return n.call(window,i)},r=n();Ts.has(e)||Ts.set(e,{listeners:new Set,lastMatches:r.matches});const o=Ts.get(e);return new Proxy(r,{get(t,r){if("media"===r)return e;if("matches"===r)return n().matches;if("addEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.add(n):t.addEventListener(e,n,...r)};if("removeEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.delete(n):t.removeEventListener(e,n,...r)};const i=t[r];return"function"==typeof i?i.bind(t):i}})},ks||(ks=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of Ts.entries()){const r=window.matchMedia(t);if(r.matches!==n){Ts.get(t).lastMatches=r.matches;const n=new MediaQueryListEvent("change",{matches:r.matches,media:r.media});e.forEach(t=>t(n))}}}))}catch(n){console.warn("Could not polyfill window properties:",n)}}(o,As),function(t){const e=()=>{const e=t.clientWidth,n=document.documentElement.clientWidth-e;Array.from(document.styleSheets).forEach(t=>function(t,e,n,r){var o;const i=t.ownerNode;if(!(!i||t.href&&/playlight/i.test(t.href)))try{if(ys.has(i))xs(i,ys.get(i).originalCSS,e,n,r);else{if(!(null==(o=t.cssRules)?void 0:o.length))return;const l=Array.from(t.cssRules).map(t=>t.cssText).join("\n");if("LINK"===i.tagName){const t=document.createElement("style");t.setAttribute("data-playlight-original-href",i.href),ys.set(t,{originalCSS:l,originalElement:i}),i.replaceWith(t),xs(t,l,e,n,r)}else ys.set(i,{originalCSS:l,originalElement:null}),xs(i,l,e,n,r)}}catch(l){console.warn(`Playlight cannot process stylesheet ${t.href||"inline"} due to CORS restrictions.`)}}(t,e,window.innerHeight,n))},n=()=>{ms||(ms=!0,requestAnimationFrame(()=>{ms=!1,e()}))};ps=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;bs!==e&&(bs=e,window.dispatchEvent(new Event("resize")),clearTimeout(ws),ws=setTimeout(n,50))}),ps.observe(t),gs=new MutationObserver(t=>{for(const e of t){for(const t of e.addedNodes)"STYLE"===t.nodeName?n():"LINK"===t.nodeName&&"stylesheet"===t.rel&&(t.sheet?n():t.addEventListener("load",n,{once:!0}));if("attributes"===e.type&&"LINK"===e.target.nodeName){const t=e.target;"stylesheet"===t.rel&&"rel"===e.attributeName&&(t.sheet?n():t.addEventListener("load",n,{once:!0}))}}}),gs.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(o),Bs=Array.from(o.classList).filter(t=>!t.startsWith("playlight")),Bs.forEach(t=>{As.classList.add(t),o.classList.remove(t)});const c=window.getComputedStyle(As);"contents"===c.display&&As.style.setProperty("display","block","important"),"visible"===c.overflow&&As.style.setProperty("overflow","auto","important"),Ls=document.createElement("div"),Ls.className="playlight-sdk playlight-sdk-container-sidebar",i.appendChild(Ls),Ns=Dr(hs,{target:Ls}),Ds=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=As&&!document.body.contains(As),r=Ls&&!document.documentElement.contains(Ls);(t||e||n||r)&&(clearTimeout(qs),qs=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Hs(),Gs()},0))}),Ds.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Ds.observe(document.body,{childList:!0}),zs=!0}catch(o){console.error("Error during sidebar setup:",o)}}function Hs(){if(zs)try{const t=document.body,e=document.documentElement;null==Ds||Ds.disconnect(),clearTimeout(qs),Ns&&Yr(Ns),(null==Ls?void 0:Ls.parentNode)&&e.removeChild(Ls),Rs?(As.parentNode===t&&Array.from(As.children).forEach(e=>{e.parentNode===As&&t.insertBefore(e,As)}),As.remove()):As.classList.remove("playlight-sdk-inner-wrapper"),e.classList.remove("playlight-sdk-html"),t.classList.remove("playlight-sdk-body"),Bs.forEach(e=>{t.classList.add(e),As.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",_s),Object.defineProperty(window,"scrollY",Ss),Object.defineProperty(window,"pageYOffset",Es),Object.defineProperty(window,"scrollX",Cs),Object.defineProperty(window,"pageXOffset",Is),window.scrollTo=Os,window.scroll=Ws,window.scrollBy=Ps,t.removeEventListener("scroll",js),window.matchMedia=Ms,_s=null,Ss=null,Es=null,Cs=null,Is=null,Os=null,Ws=null,Ps=null,js=null,Ms=null}catch(e){console.warn("Could not restore window polyfills:",e)}}(As),function(){null==ps||ps.disconnect(),window.dispatchEvent(new Event("resize")),null==gs||gs.disconnect(),clearTimeout(ws),ps=gs=ws=bs=null;for(const[t,{originalCSS:e,originalElement:n}]of ys.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ys.clear()}(),Ds=null,qs=null,Ls=null,Ns=null,As=null,Bs=[],Rs=!1,zs=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Us="sdk.playlight.dev",Vs=ni(null),Ks=ni(!1),Xs=ni(!1),Zs=ni(!1),Js=ni(0),Qs=ni(!1),ta=ni(!1),ea=ni(function(){const t=vt&&"SCRIPT"===vt.tagName.toUpperCase()&&vt.src||new URL("playlight-sdk.iife.js",document.baseURI).href;if(t.includes(Us)||t.startsWith("file://"))return"https://"+Us;const e=new URL(t);return e.origin+e.pathname.substring(0,e.pathname.lastIndexOf("/"))}());let na;Xs.subscribe(t=>{try{t?(Di.trackOpen(),Fi("discoveryOpen"),na=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(Fi("discoveryClose"),document.body.style.overflow=na)}catch(e){console.error("Error in discoveryOpen store subscription:",e)}}),Vs.subscribe(t=>{var e;(null==(e=null==t?void 0:t.sidebar)?void 0:e.forceVisible)||ri(Ks)?Qs.set(!0):Qs.set(!1)}),Ks.subscribe(t=>{t&&Qs.set(!0)}),Qs.subscribe(t=>{t?(Gs(),Fi("sidebarEnable")):(Hs(),Fi("sidebarDisable"))});var ra=jr('<div class="flex h-62 w-full items-center justify-center"><!></div>'),oa=jr('<div class="snap-center px-2"><!></div>'),ia=jr('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>',1),la=(t,e,n)=>qn(e).scrollBy({left:2*-qn(n),behavior:"smooth"}),sa=jr('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),aa=(t,e,n)=>qn(e).scrollBy({left:2*qn(n),behavior:"smooth"}),ca=jr('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),ua=jr("<!> <!>",1),da=jr('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function fa(t,e){ie(e,!0);const[n,r]=Ho();let o=ln(!0),i=ln(ve([])),l=ln(void 0),s=ln(0),a=ln(!1),c=ln(!0),u=ln("");function d(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);an(u,`mask-image: linear-gradient(\n\t\t\tto right,\n\t\t\trgba(0, 0, 0, ${1-.95*n}) 0%,\n\t\t\trgba(0, 0, 0, ${1-.674*n}) 2%,\n\t\t\trgba(0, 0, 0, ${1-.446*n}) 3.5%,\n\t\t\trgba(0, 0, 0, ${1-.26*n}) 5%,\n\t\t\trgba(0, 0, 0, ${1-.14*n}) 6.5%,\n\t\t\trgba(0, 0, 0, ${1-.046*n}) 8%,\n\t\t\tblack 9%,\n\t\t\tblack 91%,\n\t\t\trgba(0, 0, 0, ${.954*r+(1-r)}) 92%,\n\t\t\trgba(0, 0, 0, ${.86*r+(1-r)}) 93.5%,\n\t\t\trgba(0, 0, 0, ${.74*r+(1-r)}) 95%,\n\t\t\trgba(0, 0, 0, ${.554*r+(1-r)}) 96.5%,\n\t\t\trgba(0, 0, 0, ${.326*r+(1-r)}) 98%,\n\t\t\trgba(0, 0, 0, ${.05*r+(1-r)})\n\t\t)`)}Qo(async()=>{an(o,!0),an(i,await Vl(10,!0),!0),an(o,!1),requestAnimationFrame(()=>{if(qn(l)){const t=qn(l).scrollWidth-qn(l).clientWidth;d(qn(l).scrollLeft,t-qn(l).scrollLeft)}})});var f=da(),v=ke(f),h=ke(v),p=t=>{var e=ra();nl(ke(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Nr(t,e)},g=t=>{var e=ia(),n=_e(e);Xr(n,17,()=>qn(i),Kr,(t,e)=>{var n,r,o,i,l=oa();fl(ke(l),{get game(){return qn(e)},compact:!0}),n=l,r="clientWidth",o=t=>an(s,t),i=No.observe(n,()=>o(n[r])),er(()=>(Yn(()=>o(n[r])),i)),Nr(t,l)});var r=Me(n,2);Ul(Me(ke(r),2),{onclick:()=>Go(Xs,!0),children:(t,e)=>{Nr(t,Lr("See all"))},$$slots:{default:!0}}),Nr(t,e)};Hr(h,t=>{qn(o)?t(p):t(g,!1)}),Ro(v,t=>an(l,t),()=>qn(l));var m=Me(v,2),w=t=>{var e=ua(),n=_e(e),r=t=>{var e=sa();e.__click=[la,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m15 18-6-6 6-6"}]];
242
+ /**
243
+ * @license lucide-svelte v0.476.0 - ISC
244
+ *
245
+ * ISC License
246
+ *
247
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
248
+ *
249
+ * Permission to use, copy, modify, and/or distribute this software for any
250
+ * purpose with or without fee is hereby granted, provided that the above
251
+ * copyright notice and this permission notice appear in all copies.
252
+ *
253
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
254
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
255
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
256
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
257
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
258
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
259
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
260
+ *
261
+ */el(t,Zo({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:22,strokeWidth:2.75}),Po(3,e,()=>Vi),Nr(t,e)};Hr(n,t=>{qn(a)&&t(r)});var o=Me(n,2),i=t=>{var e=ca();e.__click=[aa,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m9 18 6-6-6-6"}]];
262
+ /**
263
+ * @license lucide-svelte v0.476.0 - ISC
264
+ *
265
+ * ISC License
266
+ *
267
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
268
+ *
269
+ * Permission to use, copy, modify, and/or distribute this software for any
270
+ * purpose with or without fee is hereby granted, provided that the above
271
+ * copyright notice and this permission notice appear in all copies.
272
+ *
273
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
274
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
275
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
276
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
277
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
278
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
279
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
280
+ *
281
+ */el(t,Zo({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:22,strokeWidth:2.75}),Po(3,e,()=>Vi),Nr(t,e)};Hr(o,t=>{qn(c)&&t(i)}),Nr(t,e)};Hr(m,t=>{qn(i).length>0&&t(w)}),rr(()=>vo(v,qn(u))),Er("scroll",v,t=>{const e=t.target;an(a,e.scrollLeft>20),an(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),d(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)}),Nr(t,f),le(),r()}function va(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach(t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",Dr(fa,{target:t}))})}catch(t){console.error("Error occurred initializing and mounting carousel widget:",t)}}Cr(["click"]);const ha=new class{init(t={}){if("undefined"==typeof window)return console.error("Playlight cannot run on the server.");if(window.playlightInitialized)return console.warn("Playlight SDK is already initialized!");this.setConfig(t),Ys(),va(),function(){try{new MutationObserver(()=>{va()}).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Error occurred setting up widget observer:",t)}}();const e="true"===sessionStorage.getItem("fromPlaylight"),n="playlight"===new URLSearchParams(window.location.search).get("utm_source");n&&sessionStorage.setItem("fromPlaylight","true"),Ks.set(e||n),window.playlightInitialized=!0}setDiscovery(t=!0){Xs.set(t)}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent","sidebarEnable","sidebarDisable"].includes(t))return console.warn(`Invalid event type "${t}!"`);qi.has(t)||qi.set(t,[]),qi.get(t).push(e)}setConfig(t={}){Vs.set(pt(t))}};return"undefined"!=typeof window&&(window.playlightSDK=ha),ha}();
23
282
  //# sourceMappingURL=playlight-sdk.iife.js.map