playlight-sdk 0.2.10 → 0.3.0

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 j(t){return"function"==typeof t}const z=()=>{};function T(t){return t()}function I(t){for(var e=0;e<t.length;e++)t[e]()}const E=256,N=1024,O=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)}),jt((()=>{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),Tt(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=Te(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=Te(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)),Te(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){Te(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,O),tt()&&null!==se&&se.f&N&&!(96&se.f)&&(null===pe?pe=[t]:pe.push(t))}return e}function ut(t,e=1){var n=Te(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&O||(r||l!==se)&&(Ne(l,e),1280&a&&(2&a?ct(l,A):je(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&E?e|=E: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);Ne(t,(me||t.f&E)&&null!==t.deps?A:N),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&E&&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|O,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&&je(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 jt(t){const e=Pt(8,null,!1);return Ne(e,N),e.teardown=t,e}function zt(t){if(Mt(),!(null!==se&&32&se.f&&null!==Z)||Z.m)return Tt(t);var e=Z;(e.e??(e.e=[])).push({fn:t,effect:se,reaction:ie})}function Tt(t){return Pt(4,t,!1)}function It(t,e){var n=Z,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=Nt((()=>{t(),r.ran||(r.ran=!0,at(n.l.r2,!0),Ie(e))}))}function Et(){var t=Z;Nt((()=>{if(Te(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&N&&Ne(n,A),be(n)&&Ce(n),e.ran=!1}t.l.r2.v=!1}}))}function Nt(t){return Pt(8,t,!0)}function Ot(t,e=[],n=$t){const r=e.map(n);return At((()=>t(...r.map(Te))))}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),Ne(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&N||(t.f^=N),be(t)&&(Ne(t,O),je(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=[],I(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=[],I(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&O)return!0;if(n&A){var r=t.deps,o=!!(n&E);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&E||(c.f^=E)}for(i=0;i<u;i++)if(be(l=r[i])&&St(l),l.wv>t.wv)return!0}o&&(null===se||me)||Ne(t,N)}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?Ne(i,O):i.f&N&&Ne(i,A),je(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&E)&&(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))&&(Ne(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)){Ne(t,N);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(ze(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 je(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&N))return;e.f^=N}}oe.push(e)}function ze(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&r&N||r&B)){if(4&r)e.push(n);else if(o)n.f^=N;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 Te(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&E||(n.f^=E)}}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 Ie(t){var e=le;try{return le=!0,t()}finally{le=e}}const Ee=-7169;function Ne(t,e){t.f=t.f&Ee|e}function Oe(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||jt((()=>{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=Te(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],j=_[_.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,j.next),xn(e,k,P),xn(e,j,M),$=M,k=j,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 z=void 0===d?[]:x(d);null!==$;)$.e.f&B||z.push($),$=$.next;var T=z.length;if(T>0){var I=4&o&&0===b?n:null;if(m){for(g=0;g<T;g+=1)null==(u=z[g].a)||u.measure();for(g=0;g<T;g+=1)null==(c=z[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,z,I,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}))),Te(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 jn(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 zn(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 Tn(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)?(zn(t,null==n?void 0:n[0],r[0]),zn(t,null==n?void 0:n[1],r[1],"important")):zn(t,n,r));return r}const In=Symbol("class"),En=Symbol("style"),Nn=Symbol("is custom element"),On=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[Nn],a=!i[On],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[In])&&(n.class=null),n[En]&&(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 Tn(t,o,null==e?void 0:e[En],n[En]),s[m]=o,s[En]=n[En];else jn(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,o,r,null==e?void 0:e[In],n[In]),s[m]=o,s[In]=n[In]}return s}function Ln(t){return t.__attributes??(t.__attributes={[Nn]:t.nodeName.includes("-"),[On]:"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&&Tt((()=>{Ie((()=>p.in()))}))}}function Yn(t,e,n,r,o){var i=1===r;if(j(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:z,deactivate:z,reset:z,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=z)},deactivate:()=>{o=z},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 Tt((()=>{var r,o;return Nt((()=>{r=o,o=[],Ie((()=>{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=()=>Oe(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=()=>Te(o)}var o;n.b.length&&(o=()=>{or(e,r),I(n.b)},Mt(),Nt(o)),zt((()=>{const t=Ie((()=>n.m.map(T)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&zt((()=>{or(e,r),I(n.a)}))}function or(t,e){if(t.l.s)for(const n of t.l.s)Te(n);e()}function ir(t,e,n){if(null==t)return e(void 0),z;const r=Ie((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const lr=[];function ar(t,e=z){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=z){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||z),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:z});if(r.store!==t&&!(cr in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=z;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):Te(r.source)}function fr(t,e){return t.set(e),e}function vr(){const t={};return[t,function(){jt((()=>{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 Te(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(j(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];j(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(j(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(j(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){j(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?Ie(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=Te(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=Te(x);return w?(w=!1,e):x.v=t}));return s&&Te($),l||($.equals=V),function(t,e){if(arguments.length>0){const n=e?Te($):a&&s?et(t):t;if(!$.equals(n)){if(w=!0,at(x,n),g&&void 0!==p&&(p=n),yr($))return t;Ie((()=>Te($)))}return t}return yr($)?$.v:Te($)}}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):zt((()=>{const e=Ie(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,O,I,W,P,j,T,L,A,N,z,B,D,R,q,F,Y,G,H,V,K,U,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);const vt={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function ht(t={}){return pt(vt,t)}function pt(t,e){const n={...t};return gt(t)&&gt(e)&&Object.keys(e).forEach(r=>{gt(e[r])?r in t?n[r]=pt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function gt(t){return t&&"object"==typeof t&&!Array.isArray(t)}var mt=Array.isArray,wt=Array.prototype.indexOf,yt=Array.from,bt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,kt=Object.prototype,_t=Array.prototype,Mt=Object.getPrototypeOf,St=Object.isExtensible;function Et(t){return"function"==typeof t}const Ct=()=>{};function Ot(t){return t()}function It(t){for(var e=0;e<t.length;e++)t[e]()}function Wt(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function Pt(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 jt=16,Tt=1024,Lt=2048,At=4096,Nt=8192,zt=16384,Bt=32768,Dt=65536,Rt=1<<19,qt=256,Ft=1<<21,Yt=1<<23,Gt=Symbol("$state"),Ht=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 Ut(t){return t===this.v}function Xt(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Zt(t){return!Xt(t,this.v)}function Jt(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Qt=!1;const te=Symbol();let ee=null;function ne(t){ee=t}function re(t){return se().get(t)}function oe(t,e=!1,n){ee={p:ee,c:null,e:null,s:t,x:null,l:Qt&&!e?{s:null,u:null,$:[]}:null}}function ie(t){var e=ee,n=e.e;if(null!==n)for(var r of(e.e=null,n))Jn(r);return ee=e.p,{}}function le(){return!Qt||null!==ee&&null===ee.l}function se(t){return null===ee&&Jt(),ee.c??(ee.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}(ee)||void 0))}let ae=[];function ce(){var t=ae;ae=[],It(t)}function ue(t){if(0===ae.length&&!Ne){var e=ae;queueMicrotask(()=>{e===ae&&ce()})}ae.push(t)}function de(){for(;ae.length>0;)ce()}function fe(t){if("object"!=typeof t||null===t||Gt in t)return t;const e=Mt(t);if(e!==kt&&e!==_t)return t;var n=new Map,r=mt(t),o=on(0),i=Wn,l=t=>{if(Wn===i)return t();var e=yn,n=Wn;xn(null),Pn(i);var r=t();return xn(e),Pn(n),r};return r&&n.set("length",on(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=on(r.value);return n.set(e,t),t}):sn(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=l(()=>on(te));n.set(e,t),un(o)}}else sn(r,te),un(o);return!0},get(e,r,o){var i;if(r===Gt)return t;var s=n.get(r),a=r in e;if(void 0!==s||a&&!(null==(i=xt(e,r))?void 0:i.writable)||(s=l(()=>on(fe(a?e[r]:te))),n.set(r,s)),void 0!==s){var c=Rn(s);return c===te?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=Rn(o))}else if(void 0===r){var i=n.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==te)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return r},has(t,e){var r;if(e===Gt)return!0;var o=n.get(e),i=void 0!==o&&o.v!==te||Reflect.has(t,e);return!((void 0!==o||null!==$n&&(!i||(null==(r=xt(t,e))?void 0:r.writable)))&&(void 0===o&&(o=l(()=>on(i?fe(t[e]):te)),n.set(e,o)),Rn(o)===te))&&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?sn(f,te):d in t&&(f=l(()=>on(te)),n.set(d+"",f))}void 0===c?u&&!(null==(a=xt(t,e))?void 0:a.writable)||(sn(c=l(()=>on(void 0)),fe(i)),n.set(e,c)):(u=c.v!==te,sn(c,l(()=>fe(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&&sn(h,p+1)}un(o)}return!0},ownKeys(t){Rn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==te});for(var[r,i]of n)i.v===te||r in t||e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ve(t){try{if(null!==t&&"object"==typeof t&&Gt in t)return t[Gt]}catch{}return t}function he(t,e){return Object.is(ve(t),ve(e))}var pe,ge,me,we;function ye(t=""){return document.createTextNode(t)}function be(t){return me.call(t)}function xe(t){return we.call(t)}function $e(t,e){return be(t)}function ke(t,e=!1){var n=be(t);return n instanceof Comment&&""===n.data?xe(n):n}function _e(t,e=1,n=!1){let r=t;for(;e--;)r=xe(r);return r}const Me=new WeakMap;function Se(t){var e=$n;if(null===e)return yn.f|=Yt,t;if(0===(e.f&Bt)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&Ce(t),t;e.b.error(t)}else Ee(t,e)}function Ee(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&&Ce(t),t}function Ce(t){const e=Me.get(t);e&&(bt(t,"message",{value:e.message}),bt(t,"stack",{value:e.stack}))}const Oe=new Set;let Ie=null,We=null,Pe=null,je=new Set,Te=[],Le=null,Ae=!1,Ne=!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^=Tt;for(var r=t.first;null!==r;){var o=r.f,i=!!(96&o),l=i&&0!==(o&Tt)||0!==(o&Nt)||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^=Tt:4&o?e.effects.push(r):Ln(r)&&(0!==(r.f&jt)&&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&Lt)?ct(this,i):ct(this,l)).push(e),Gn(e,Tt)},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=Pe,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)Fe(t,r,o,i);if(Te.length>0){Ie=t,t.apply();for(const n of Te)ft(e=t,s,a).call(e,n,l);Te=[],t.deactivate()}}}Ie=null,Pe=r}this.committed=!0,Oe.delete(this),null==(n=ct(this,o))||n.resolve()};let ze=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){Te=[],We=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)):(We=this,Ie=null,qe(e.render_effects),qe(e.effects),We=null),Pe=null}capture(e,n){ct(this,t).has(e)||ct(this,t).set(e,n),this.current.set(e,e.v),null==Pe||Pe.set(e,e.v)}activate(){Ie=this}deactivate(){Ie=null,Pe=null}flush(){if(Te.length>0){if(this.activate(),Be(),null!==Ie&&Ie!==this)return}else ft(this,s,u).call(this);this.deactivate();for(const t of je)if(je.delete(t),t(),null!==Ie)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))Gn(e,Lt),Ge(e);for(const e of ct(this,l))Gn(e,At),Ge(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,Wt())).promise}static ensure(){if(null===Ie){const t=Ie=new d;Oe.add(Ie),Ne||d.enqueue(()=>{Ie===t&&t.flush()})}return Ie}static enqueue(t){ue(t)}apply(){}};function Be(){var t=pn;Ae=!0;try{var e=0;for(gn(!0);Te.length>0;){var n=ze.ensure();e++>1e3&&De(),n.process(Te),nn.clear()}}finally{Ae=!1,gn(t),Le=null}}function De(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){Ee(t,Le)}}let Re=null;function qe(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&Ln(r)&&(Re=new Set,Dn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?ar(r):r.fn=null),(null==Re?void 0:Re.size)>0)){nn.clear();for(const t of Re){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)Re.has(n)&&(Re.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)}}Re.clear()}}Re=null}}function Fe(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?Fe(o,e,n,r):4194320&t&&0===(t&Lt)&&Ye(o,e,r)&&(Gn(o,Lt),Ge(o))}}function Ye(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&&Ye(o,e,n))return n.set(o,!0),!0}return n.set(t,!1),!1}function Ge(t){for(var e=Le=t;null!==e.parent;){var n=(e=e.parent).f;if(Ae&&e===$n&&0!==(n&jt))return;if(96&n){if(0===(n&Tt))return;e.f^=Tt}}Te.push(e)}function He(t){let e,n=0,r=rn(0);return()=>{(function(){return null!==yn&&!bn})()&&(Rn(r),er(()=>(0===n&&(e=Fn(()=>t(()=>un(r)))),n+=1,()=>{ue(()=>{n-=1,0===n&&(null==e||e(),e=void 0,un(r))})})))}}class Ve{constructor(t,e,n){ut(this,O),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)&&an(ct(this,S),ct(this,k))}),ut(this,C,He(()=>(dt(this,S,rn(ct(this,k))),()=>{dt(this,S,null)}))),dt(this,v,t),dt(this,p,e),dt(this,g,n),this.parent=$n.b,dt(this,f,!!ct(this,p).pending),dt(this,m,rr(()=>{$n.b=this;var t=ft(this,O,I).call(this);try{dt(this,w,or(()=>n(t)))}catch(e){this.error(e)}return ct(this,_)>0?ft(this,O,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,O,j).call(this,t),dt(this,k,ct(this,k)+t),je.add(ct(this,E))}get_effect_pending(){return ct(this,C).call(this),Rn(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)&&(sr(ct(this,w)),dt(this,w,null)),ct(this,y)&&(sr(ct(this,y)),dt(this,y,null)),ct(this,b)&&(sr(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")}(),ze.ensure(),dt(this,k,0),null!==ct(this,b)&&cr(ct(this,b),()=>{dt(this,b,null)}),dt(this,f,this.has_pending_snippet()),dt(this,w,ft(this,O,W).call(this,()=>(dt(this,M,!1),or(()=>ct(this,g).call(this,ct(this,v)))))),ct(this,_)>0?ft(this,O,P).call(this):dt(this,f,!1))};var l=yn;try{xn(null),o=!0,null==e||e(t,i),o=!1}catch(s){Ee(s,ct(this,m)&&ct(this,m).parent)}finally{xn(l)}n&&ue(()=>{dt(this,b,ft(this,O,W).call(this,()=>{ze.ensure(),dt(this,M,!0);try{return or(()=>{n(ct(this,v),()=>t,()=>i)})}catch(s){return Ee(s,ct(this,m).parent),null}finally{dt(this,M,!1)}}))})}}function Ke(t,e,n){const r=le()?Xe:Je;if(0!==e.length){var o=Ie,i=$n,l=function(){var t=$n,e=yn,n=ee,r=Ie;return function(){kn(t),xn(e),ne(n),null==r||r.activate()}}();Promise.all(e.map(t=>function(t){let e=$n;null===e&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=e.b,r=void 0,o=rn(te),i=!yn,l=new Map;return Un(4718592,()=>{var e,s=Wt();r=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{a===Ie&&a.committed&&a.deactivate(),Ue()})}catch(d){s.reject(d),Ue()}var a=Ie;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|=Yt,an(o,e));else{0!==(o.f&Yt)&&(o.f^=Yt),an(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),Xn(()=>{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&zt)&&Ee(s,i)}null==o||o.deactivate(),Ue()}).catch(t=>{Ee(t,i)})}else n(t.map(r))}function Ue(){kn(null),xn(null),ne(null)}function Xe(t){var e=2050,n=null!==yn&&2&yn.f?yn:null;return null===$n||null!==n&&0!==(n.f&qt)?e|=qt:$n.f|=Rt,{ctx:ee,deps:null,effects:null,equals:Ut,f:e,fn:t,reactions:null,rv:0,v:te,wv:0,parent:n??$n,ac:null}}function Ze(t){const e=Xe(t);return Mn(e),e}function Je(t){const e=Xe(t);return e.equals=Zt,e}function Qe(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)sr(e[n])}}function tn(t){var e,n=$n;kn(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,Qe(t),e=Nn(t)}finally{kn(n)}return e}function en(t){var e=tn(t);t.equals(e)||(t.v=e,t.wv=Tn()),mn||(null!==Pe?Pe.set(t,t.v):Gn(t,!jn&&0===(t.f&qt)||null===t.deps?Tt:At))}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,O=new WeakSet,I=function(){var t=ct(this,v);return ct(this,f)&&(dt(this,$,ye()),ct(this,v).before(ct(this,$)),t=ct(this,$)),t},W=function(t){var e=$n,n=yn,r=ee;kn(ct(this,m)),xn(ct(this,m)),ne(ct(this,m).ctx);try{return t()}catch(o){return Se(o),null}finally{kn(e),xn(n),ne(r)}},P=function(){const t=ct(this,p).pending;null!==ct(this,w)&&(dt(this,x,document.createDocumentFragment()),ct(this,x).append(ct(this,$)),hr(ct(this,w),ct(this,x))),null===ct(this,y)&&dt(this,y,or(()=>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)&&cr(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,O,j).call(e,t)};const nn=new Map;function rn(t,e){return{f:0,v:t,reactions:null,equals:Ut,rv:0,wv:0}}function on(t,e){const n=rn(t);return Mn(n),n}function ln(t,e=!1,n=!0){var r;const o=rn(t);return e||(o.equals=Zt),Qt&&n&&null!==ee&&null!==ee.l&&((r=ee.l).s??(r.s=[])).push(o),o}function sn(t,e,n=!1){return null!==yn&&(!bn||!!(131072&yn.f))&&le()&&4325394&yn.f&&!(null==_n?void 0:_n.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),an(t,n?fe(e):e)}function an(t,e){if(!t.equals(e)){var n=t.v;mn?nn.set(t,e):nn.set(t,n),t.v=e,ze.ensure().capture(t,n),2&t.f&&(0!==(t.f&Lt)&&tn(t),Gn(t,0===(t.f&qt)?Tt:At)),t.wv=Tn(),dn(t,Lt),!le()||null===$n||0===($n.f&Tt)||96&$n.f||(null===Cn?Cn=[t]:Cn.push(t))}return e}function cn(t,e=1){var n=Rn(t),r=1===e?n++:n--;return sn(t,n),r}function un(t){sn(t,t.v+1)}function dn(t,e){var n=t.reactions;if(null!==n)for(var r=le(),o=n.length,i=0;i<o;i++){var l=n[i],s=l.f;if(r||l!==$n){var a=0===(s&Lt);a&&Gn(l,e),2&s?!(32768&s)&&(l.f|=32768,dn(l,At)):a&&(0!==(s&jt)&&null!==Re&&Re.add(l),Ge(l))}}}function fn(t,e){if(e){const e=document.body;t.autofocus=!0,ue(()=>{document.activeElement===e&&t.focus()})}}let vn=!1;function hn(t){var e=yn,n=$n;xn(null),kn(null);try{return t()}finally{xn(e),kn(n)}}let pn=!1;function gn(t){pn=t}let mn=!1;function wn(t){mn=t}let yn=null,bn=!1;function xn(t){yn=t}let $n=null;function kn(t){$n=t}let _n=null;function Mn(t){null!==yn&&(null===_n?_n=[t]:_n.push(t))}let Sn=null,En=0,Cn=null,On=1,In=0,Wn=In;function Pn(t){Wn=t}let jn=!1;function Tn(){return++On}function Ln(t){var e,n=t.f;if(0!==(n&Lt))return!0;if(0!==(n&At)){var r=t.deps,o=0!==(n&qt);if(2&n&&(t.f&=-32769),null!==r){var i,l,s=!!(512&n),a=o&&null!==$n&&!jn,c=r.length;if((s||a)&&(null===$n||0===($n.f&zt))){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&qt)&&(u.f^=qt)}for(i=0;i<c;i++)if(Ln(l=r[i])&&en(l),l.wv>t.wv)return!0}o&&(null===$n||jn)||Gn(t,Tt)}return!1}function An(t,e,n=!0){var r=t.reactions;if(null!==r&&!(null==_n?void 0:_n.includes(t)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?An(i,e,!1):e===i&&(n?Gn(i,Lt):0!==(i.f&Tt)&&Gn(i,At),Ge(i))}}function Nn(t){var e,n=Sn,r=En,o=Cn,i=yn,l=jn,s=_n,a=ee,c=bn,u=Wn,d=t.f;Sn=null,En=0,Cn=null,jn=0!==(d&qt)&&(bn||!pn||null===yn),yn=96&d?null:t,_n=null,ne(t.ctx),bn=!1,Wn=++In,null!==t.ac&&(hn(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Ft;var f=(0,t.fn)(),v=t.deps;if(null!==Sn){var h;if(Bn(t,En),null!==v&&En>0)for(v.length=En+Sn.length,h=0;h<Sn.length;h++)v[En+h]=Sn[h];else t.deps=v=Sn;if(!jn||2&d&&null!==t.reactions)for(h=En;h<v.length;h++)((e=v[h]).reactions??(e.reactions=[])).push(t)}else null!==v&&En<v.length&&(Bn(t,En),v.length=En);if(le()&&null!==Cn&&!bn&&null!==v&&!(6146&t.f))for(h=0;h<Cn.length;h++)An(Cn[h],t);return null!==i&&i!==t&&(In++,null!==Cn&&(null===o?o=Cn:o.push(...Cn))),0!==(t.f&Yt)&&(t.f^=Yt),f}catch(p){return Se(p)}finally{t.f^=Ft,Sn=n,En=r,Cn=o,yn=i,jn=l,_n=s,ne(a),bn=c,Wn=u}}function zn(t,e){let n=e.reactions;if(null!==n){var r=wt.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===Sn||!Sn.includes(e))&&(Gn(e,At),768&e.f||(e.f^=512),Qe(e),Bn(e,0))}function Bn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)zn(t,n[r])}function Dn(t){var e=t.f;if(0===(e&zt)){Gn(t,Tt);var n=$n,r=pn;$n=t,pn=!0;try{0!==(e&jt)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&sr(e),e=n}}(t):lr(t),ir(t);var o=Nn(t);t.teardown="function"==typeof o?o:null,t.wv=On}finally{pn=r,$n=n}}}function Rn(t){var e=!!(2&t.f);if(null===yn||bn){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&qt)&&(n.f^=qt)}}else if((null===$n||0===($n.f&zt))&&!(null==_n?void 0:_n.includes(t))){var o=yn.deps;if(0!==(yn.f&Ft))t.rv<In&&(t.rv=In,null===Sn&&null!==o&&o[En]===t?En++:null===Sn?Sn=[t]:jn&&Sn.includes(t)||Sn.push(t));else{(yn.deps??(yn.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[yn]:i.includes(yn)||i.push(yn)}}if(mn){if(nn.has(t))return nn.get(t);if(e){var l=(n=t).v;return(0===(n.f&Tt)&&null!==n.reactions||qn(n))&&(l=tn(n)),nn.set(n,l),l}}else if(e){if(n=t,null==Pe?void 0:Pe.has(n))return Pe.get(n);Ln(n)&&en(n)}if(null==Pe?void 0:Pe.has(t))return Pe.get(t);if(0!==(t.f&Yt))throw t.v;return t.v}function qn(t){if(t.v===te)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(nn.has(e))return!0;if(2&e.f&&qn(e))return!0}return!1}function Fn(t){var e=bn;try{return bn=!0,t()}finally{bn=e}}const Yn=-7169;function Gn(t,e){t.f=t.f&Yn|e}function Hn(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(Gt in t)Vn(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&Gt 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=Mt(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=$t(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Kn(t){null===$n&&null===yn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==yn&&0!==(yn.f&qt)&&null===$n&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),mn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Un(t,e,n,r=!0){var o=$n;null!==o&&0!==(o.f&Nt)&&(t|=Nt);var i,l,s,a={ctx:ee,deps:null,nodes_start:null,nodes_end:null,f:t|Lt,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 sr(a),d}else null!==e&&Ge(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&Rt)&&(c=c.first,0!==(t&jt)&&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!==yn&&2&yn.f&&!(64&t))){var u=yn;(u.effects??(u.effects=[])).push(c)}}return a}function Xn(t){const e=Un(8,null,!1);return Gn(e,Tt),e.teardown=t,e}function Zn(t){Kn();var e=$n.f;if(yn||!(32&e)||0!==(e&Bt))return Jn(t);var n=ee;(n.e??(n.e=[])).push(t)}function Jn(t){return Un(1048580,t,!1)}function Qn(t){return Kn(),Un(1048584,t,!0)}function tr(t){return Un(4,t,!1)}function er(t,e=0){return Un(8|e,t,!0)}function nr(t,e=[],n=[]){Ke(e,n,e=>{Un(8,()=>t(...e.map(Rn)),!0)})}function rr(t,e=0){return Un(jt|e,t,!0)}function or(t,e=!0){return Un(524320,t,!0,e)}function ir(t){var e=t.teardown;if(null!==e){const t=mn,n=yn;wn(!0),xn(null);try{e.call(null)}finally{wn(t),xn(n)}}}function lr(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&hn(()=>{t.abort(Kt)});var r=n.next;64&n.f?n.parent=null:sr(n,e),n=r}}function sr(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:xe(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),lr(t,e&&!n),Bn(t,0),Gn(t,zt);var r=t.transitions;if(null!==r)for(const i of r)i.stop();ir(t);var o=t.parent;null!==o&&null!==o.first&&ar(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ar(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 cr(t,e,n=!0){var r=[];dr(t,r,!0),ur(r,()=>{n&&sr(t),e&&e()})}function ur(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function dr(t,e,n){if(0===(t.f&Nt)){if(t.f^=Nt,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;dr(r,e,!!(0!==(r.f&Dt)||32&r.f&&0!==(t.f&jt))&&n),r=o}}}function fr(t){vr(t,!0)}function vr(t,e){if(0!==(t.f&Nt)){t.f^=Nt,0===(t.f&Tt)&&(Gn(t,Lt),Ge(t));for(var n=t.first;null!==n;){var r=n.next;vr(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 hr(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:xe(n);e.append(n),n=o}}function pr(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const gr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function mr(t){return gr.includes(t)}const wr={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 yr(t){return t=t.toLowerCase(),wr[t]??t}const br=["touchstart","touchmove"];function xr(t){return br.includes(t)}const $r=new Set,kr=new Set;function _r(t,e,n,r={}){function o(t){if(r.capture||Or.call(e,t),!t.cancelBubble)return hn(()=>null==n?void 0:n.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?ue(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Mr(t,e,n,r={}){var o=_r(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Sr(t,e,n,r,o){var i={capture:r,passive:o},l=_r(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Xn(()=>{e.removeEventListener(t,l,i)})}function Er(t){for(var e=0;e<t.length;e++)$r.add(t[e]);for(var n of kr)n(t)}let Cr=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;Cr=t;var s=0,a=Cr===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){bt(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=yn,f=$n;xn(null),kn(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(mt(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,xn(d),kn(f)}}}function Ir(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function Wr(t,e){var n=$n;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Pr(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ir(i?t:"<!>"+t),r||(n=be(n)));var e=o||ge?document.importNode(n,!0):n.cloneNode(!0);return r?Wr(be(e),e.lastChild):Wr(e,e),e}}function jr(t,e){return function(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=be(Ir(o));r=be(t)}var e=r.cloneNode(!0);return Wr(e,e),e}}(t,0,"svg")}function Tr(t=""){var e=ye(t+"");return Wr(e,e),e}function Lr(){var t=document.createDocumentFragment(),e=document.createComment(""),n=ye();return t.append(e,n),Wr(e,n),t}function Ar(t,e){null!==t&&t.before(e)}let Nr=!0;function zr(t){Nr=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===pe){pe=window,ge=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;me=xt(e,"firstChild").get,we=xt(e,"nextSibling").get,St(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),St(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=xr(r);e.addEventListener(r,Or,{passive:o});var i=Rr.get(r);void 0===i?(document.addEventListener(r,Or,{passive:o}),Rr.set(r,1)):Rr.set(r,i+1)}}};a(yt($r)),kr.add(a);var c=void 0,u=function(t){ze.ensure();const e=Un(524352,t,!0);return(t={})=>new Promise(n=>{t.outro?cr(e,()=>{sr(e),n(void 0)}):(sr(e),n(void 0))})}(()=>{var u,d=n??e.appendChild(ye());return u=e=>{i&&(oe({}),ee.c=i),o&&(r.$$events=o),Nr=l,c=t(e,r)||{},Nr=!0,i&&ie()},new Ve(d,{pending:()=>{}},u),()=>{var t;for(var r of s){e.removeEventListener(r,Or);var o=Rr.get(r);0===--o?(document.removeEventListener(r,Or),Rr.delete(r)):Rr.set(r,o)}kr.delete(a),d!==n&&(null==(t=d.parentNode)||t.removeChild(d))}});return qr.set(c,u),c}(t,e)}const Rr=new Map;let qr=new WeakMap;function Fr(t,e){const n=qr.get(t);return n?(qr.delete(t),n(e)):Promise.resolve()}class Yr{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=Ie;if(ct(this,T).has(t)){var e=ct(this,T).get(t),n=ct(this,L).get(e);if(n)fr(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&&(sr(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();hr(r,e),e.append(ye()),ct(this,A).set(t,{effect:r,fragment:e})}else sr(r);ct(this,L).delete(t)};ct(this,N)||!n?cr(r,o,!1):o()}}}),this.anchor=t,dt(this,N,e)}ensure(t,e){var n=Ie;!e||ct(this,L).has(t)||ct(this,A).has(t)||ct(this,L).set(t,or(()=>e(this.anchor))),ct(this,T).set(n,t),ct(this,z).call(this)}}function Gr(t,e,n=!1){var r=new Yr(t);function o(t,e){r.ensure(t,e)}rr(()=>{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 Hr=null;function Vr(t){Hr=t}function Kr(t,e){return e}function Ur(t,e,n,r,o,i=null){var l=t,s={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(ye()));var a,c,u=null,d=!1,f=new Map,v=Je(()=>{var t=n();return mt(t)?t:null==t?[]:yt(t)});rr(()=>{c??(c=$n);var t=(a=Rn(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&&Xr(m,p,w,l),0!==(m.e.f&Nt)&&(fr(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 O=M[0],I=M[M.length-1];for(E=0;E<M.length;E+=1)Jr(M[E],C,o);for(E=0;E<S.length;E+=1)v.delete(S[E]);Qr(n,O.prev,I.next),Qr(n,_,O),Qr(n,I,C),k=C,_=I,w-=1,M=[],S=[]}else v.delete(m),Jr(m,k,o),Qr(n,m.prev,m.next),Qr(n,m,null===_?n.first:_.next),Qr(n,_,m),_=m;continue}for(M=[],S=[];null!==k&&k.k!==g;)0===(k.e.f&Nt)&&(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;Qr(n,_,W),Qr(n,W,P),Jr(W,P,o),_=W}else _=Zr(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?[]:yt(v);null!==k;)0===(k.e.f&Nt)&&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++)dr(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(),Qr(t,e[0].prev,e[i-1].next)}ur(o,()=>{for(var n=0;n<i;n++){var o=e[n];s||(r.delete(o.k),Qr(t,o.prev,o.next)),sr(o.e,!s)}})}(n,j,L)}}for(var A of(y&&ue(()=>{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()))sr(A.e);r.clear()}(c,a,s,f,l,o,e,r,n),null!==i&&(0===a.length?u?fr(u):u=or(()=>i(l)):null!==u&&cr(u,()=>{u=null})),Rn(v))})}function Xr(t,e,n,r){1&r&&an(t.v,e),2&r?an(t.i,n):t.i=n}function Zr(t,e,n,r,o,i,l,s,a,c,u){var d=Hr,f=1&a?16&a?rn(o):ln(o,!1,!1):o,v=2&a?rn(l):l,h={i:v,v:f,k:i,a:null,e:null,prev:n,next:r};Hr=h;try{return null===t&&document.createDocumentFragment().append(t=ye()),h.e=or(()=>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{Hr=d}}function Jr(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=xe(i);o.before(i),i=l}}function Qr(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 to(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 eo(t,e,...n){var r=new Yr(t);rr(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},Dt)}function no(t,e,n){var r=new Yr(t);rr(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},Dt)}function ro(t,e){var n,r=void 0;rr(()=>{r!==(r=e())&&(n&&(sr(n),n=null),r&&(n=or(()=>{tr(()=>r(t))})))})}function oo(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=oo(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function io(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=oo(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const lo=[..." \t\n\r\f \v\ufeff"];function so(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 ao(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function co(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&&!lo.includes(r[l-1])||s!==r.length&&!lo.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 uo(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 fo(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(ao)),r&&a.push(...Object.keys(r).map(ao));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=ao(t.substring(c,u).trim());a.includes(v)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=so(n)),r&&(o+=so(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)?(uo(t,null==n?void 0:n[0],r[0]),uo(t,null==n?void 0:n[1],r[1],"important")):uo(t,n,r));return r}function vo(t,e,n=!1){if(t.multiple){if(null==e)return;if(!mt(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(ho(r))}else{for(r of t.options)if(he(ho(r),e))return void(r.selected=!0);n&&void 0===e||(t.selectedIndex=-1)}}function ho(t){return"__value"in t?t.__value:t.value}const po=Symbol("class"),go=Symbol("style"),mo=Symbol("is custom element"),wo=Symbol("is html");function yo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function bo(t,e,n,r){var o=$o(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[Vt]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&_o(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function xo(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(rr(()=>{var u=e(...n.map(Rn)),d=function(t,e,n,r){var o=$o(t),i=o[mo],l=!o[wo],s=e||{},a="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=io(n.class):(r||n[po])&&(n.class=null),n[go]&&(n.style??(n.style=null));var u=_o(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=mr(r);if(pr(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,Er([r]);else{let o=function(t){s[g].call(this,t)};s[n]=_r(r,t,o,e)}else v&&(t[`__${r}`]=void 0)}else if("style"===g)bo(t,g,c);else if("autofocus"===g)fn(t,Boolean(c));else if(i||"__value"!==g&&("value"!==g||null==c))if("selected"===g&&a)yo(t,c);else{var h=g;l||(h=yr(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]=te)):"function"!=typeof c&&bo(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 fo(t,c,null==e?void 0:e[go],n[go]),s[g]=c,s[go]=n[go];else co(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,c,r,null==e?void 0:e[po],n[po]),s[g]=c,s[po]=n[po]}return s}(t,r,u,o,i,l);c&&a&&"value"in u&&vo(t,u.value);for(let t of Object.getOwnPropertySymbols(s))u[t]||sr(s[t]);for(let e of Object.getOwnPropertySymbols(u)){var f=u[e];"@attach"!==e.description||r&&f===r[e]||(s[e]&&sr(s[e]),s[e]=or(()=>ro(t,()=>f))),d[e]=f}r=d}),a){var u=t;tr(()=>{var t,e;vo(u,r.value,!0),t=u,(e=new MutationObserver(()=>{vo(t,t.__value)})).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Xn(()=>{e.disconnect()})})}c=!0})}function $o(t){return t.__attributes??(t.__attributes={[mo]:t.nodeName.includes("-"),[wo]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var ko=new Map;function _o(t){var e,n=t.getAttribute("is")||t.nodeName,r=ko.get(n);if(r)return r;ko.set(n,r=[]);for(var o=t,i=Element.prototype;i!==o;){for(var l in e=$t(o))e[l].set&&r.push(l);o=Mt(o)}return r}const Mo={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function So(){const t=Mo.now();Mo.tasks.forEach(e=>{e.c(t)||(Mo.tasks.delete(e),e.f())}),0!==Mo.tasks.size&&Mo.tick(So)}function Eo(t,e){hn(()=>{t.dispatchEvent(new CustomEvent(e))})}function Co(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[Co(t.trim())]=n.trim()}return e}const Io=t=>t;function Wo(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 hn(()=>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(),Eo(e,"introstart"),i=Po(e,v(),l,1,()=>{Eo(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,Eo(e,"outrostart"),l=Po(e,v(),i,0,()=>{Eo(e,"outroend"),null==t||t()})},stop:()=>{null==i||i.abort(),null==l||l.abort()}},p=$n;if((p.transitions??(p.transitions=[])).push(h),s&&Nr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&Dt);)for(;(m=m.parent)&&0===(m.f&jt););g=!m||0!==(m.f&Bt)}g&&tr(()=>{Fn(()=>h.in())})}}function Po(t,e,n,r,o){var i=1===r;if(Et(e)){var l,s=!1;return ue(()=>{if(!s){var a=e({direction:i?"in":"out"});l=Po(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:Ct,deactivate:Ct,reset:Ct,t:()=>r};const{delay:a=0,css:c,tick:u,easing:d=Io}=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===Mo.tasks.size&&Mo.tick(So),new Promise(n=>{Mo.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=Ct)},deactivate:()=>{o=Ct},reset:()=>{0===r&&(null==u||u(1,0))},t:()=>h()}}function jo(t){var e=t.type;return"number"===e||"range"===e}function To(t){return""===t?null:+t}const Lo=class{constructor(t){ut(this,q),ut(this,B,new WeakMap),ut(this,D),ut(this,R),dt(this,R,t)}observe(t,e){var n=ct(this,B).get(t)||new Set;return n.add(e),ct(this,B).set(t,n),ft(this,q,F).call(this).observe(t,ct(this,R)),()=>{var n=ct(this,B).get(t);n.delete(e),0===n.size&&(ct(this,B).delete(t),ct(this,D).unobserve(t))}}};B=new WeakMap,D=new WeakMap,R=new WeakMap,q=new WeakSet,F=function(){return ct(this,D)??dt(this,D,new ResizeObserver(t=>{for(var e of t)for(var n of(Lo.entries.set(e.target,e),ct(this,B).get(e.target)||[]))n(e)}))},st(Lo,"entries",new WeakMap);var Ao=new Lo({box:"border-box"});function No(t,e){return t===e||(null==t?void 0:t[Gt])===e}function zo(t={},e,n,r){return tr(()=>{var r,o;return er(()=>{r=o,o=[],Fn(()=>{t!==n(...o)&&(e(t,...o),r&&No(n(...r),t)&&e(null,...r))})}),()=>{ue(()=>{o&&No(n(...o),t)&&e(null,...o)})}}),t}function Bo(t=!1){const e=ee,n=e.l.u;if(!n)return;let r=()=>Hn(e.s);if(t){let t=0,n={};const o=Xe(()=>{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=()=>Rn(o)}n.b.length&&Qn(()=>{Do(e,r),It(n.b)}),Zn(()=>{const t=Fn(()=>n.m.map(Ot));return()=>{for(const e of t)"function"==typeof e&&e()}}),n.a.length&&Zn(()=>{Do(e,r),It(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)Rn(n);e()}let Ro=!1,qo=Symbol();function Fo(t,e,n){const r=n[e]??(n[e]={store:null,source:ln(void 0),unsubscribe:Ct});if(r.store!==t&&!(qo in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=Ct;else{var o=!0;r.unsubscribe=Qo(t,t=>{o?r.source.v=t:sn(r.source,t)}),o=!1}return t&&qo in n?ni(t):Rn(r.source)}function Yo(t,e){return t.set(e),e}function Go(){const t={};return[t,function(){Xn(()=>{for(var e in t)t[e].unsubscribe();bt(t,qo,{enumerable:!1,value:!0})})}]}const Ho={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 Rn(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,n){if(!(e in t.special)){var r=$n;try{kn(t.parent_effect),t.special[e]=Zo({get[e](){return t.props[e]}},e,4)}finally{kn(r)}}return t.special[e](n),cn(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),cn(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:rn(0),parent_effect:$n},Vo)}const Uo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Et(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];Et(o)&&(o=o());const i=xt(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(Et(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=xt(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===Gt||e===Ht)return!1;for(let n of t.props)if(Et(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Et(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 Xo(...t){return new Proxy({props:t},Uo)}function Zo(t,e,n,r){var o,i,l,s=!Qt||!!(2&n),a=!!(8&n),c=!!(16&n),u=r,d=!0,f=()=>(d&&(d=!1,u=c?Fn(r):r),u);if(a){var v=Gt in t||Ht in t;i=(null==(o=xt(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=Ro;try{return Ro=!1,[t(),Ro]}finally{Ro=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?Xe:Je)(()=>(m=!1,h()));a&&Rn(w);var y=$n;return function(t,e){if(arguments.length>0){const n=e?Rn(w):s&&a?fe(t):t;return sn(w,n),m=!0,void 0!==u&&(u=n),t}return mn&&m||0!==(y.f&zt)?w.v:Rn(w)}}function Jo(t){var e,n;null===ee&&Jt(),Qt&&null!==ee.l?(e=ee,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Zn(()=>{const e=Fn(t);if("function"==typeof e)return e})}function Qo(t,e,n){if(null==t)return e(void 0),Ct;const r=Fn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ti=[];function ei(t,e=Ct){let n=null;const r=new Set;function o(e){if(Xt(t,e)&&(t=e,n)){const e=!ti.length;for(const n of r)n[1](),ti.push(n,t);if(e){for(let t=0;t<ti.length;t+=2)ti[t][0](ti[t+1]);ti.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,s=Ct){const a=[l,s];return r.add(a),1===r.size&&(n=e(o,i)||Ct),l(t),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function ni(t){let e;return Qo(t,t=>e=t)(),e}"undefined"!=typeof window&&((Y=window.__svelte??(window.__svelte={})).v??(Y.v=new Set)).add("5");const ri=Array(12).fill(0);var oi=Pr('<div class="sonner-loading-bar"></div>'),ii=Pr('<div><div class="sonner-spinner"></div></div>');function li(...t){return t.filter(Boolean).join(" ")}const si="undefined"!=typeof document,ai="undefined"!=typeof window?window:void 0;new(V=class{constructor(t={}){ut(this,G),ut(this,H);const{window:e=ai,document:n=(null==e?void 0:e.document)}=t;void 0!==e&&(dt(this,G,n),dt(this,H,He(t=>{const n=Mr(e,"focusin",t),r=Mr(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,V);const ci=new(X=class{constructor(t){ut(this,K),ut(this,U),dt(this,K,t),dt(this,U,Symbol(t))}get key(){return ct(this,U)}exists(){return t=ct(this,U),se().has(t);var t}get(){const t=re(ct(this,U));if(void 0===t)throw new Error(`Context "${ct(this,K)}" not found`);return t}getOr(t){const e=re(ct(this,U));return void 0===e?t:e}set(t){return e=ct(this,U),n=t,se().set(e,n),n;var e,n}},K=new WeakMap,U=new WeakMap,X)("<Toaster/>");let ui=0;const di=new(tt=class{constructor(){ut(this,Z,on(fe([]))),ut(this,J,on(fe([]))),ut(this,Q,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),st(this,"addToast",t=>{si&&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:ui++,i=void 0===t.dismissable||t.dismissable,l=void 0===t.type?"default":t.type;return Fn(()=>{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=>(Fn(()=>{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)||ui++;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 Rn(ct(this,Z))}set toasts(t){sn(ct(this,Z),t,!0)}get heights(){return Rn(ct(this,J))}set heights(t){sn(ct(this,J),t,!0)}},Z=new WeakMap,J=new WeakMap,Q=new WeakMap,tt);class fi{constructor(){ut(this,et,Ze(()=>di.toasts.filter(t=>!t.dismiss)))}get toasts(){return Rn(ct(this,et))}}et=new WeakMap;const vi=Object.assign(function(t,e){return di.create({message:t,...e})},{success:di.success,info:di.info,warning:di.warning,error:di.error,custom:di.custom,message:di.message,promise:di.promise,dismiss:di.dismiss,loading:di.loading,getActiveToasts:()=>di.toasts.filter(t=>!t.dismiss)});function hi(t){return void 0!==t.label}const pi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function gi(t){return 1/(1.5+Math.abs(t)/20)}var mi=Pr("<div><!></div>"),wi=(t,e,n,r,o)=>{var i,l;!Rn(e)&&Rn(n)&&(r(),null==(l=(i=o.toast).onDismiss)||l.call(i,o.toast))},yi=Pr('<button data-close-button=""><!></button>'),bi=Pr('<div data-icon=""><!> <!></div>'),xi=Pr('<div data-description=""><!></div>'),$i=(t,e,n,r)=>{var o,i;hi(e.toast.cancel)&&Rn(n)&&(null==(i=null==(o=e.toast.cancel)?void 0:o.onClick)||i.call(o,t),r())},ki=Pr('<button data-button="" data-cancel=""> </button>'),_i=(t,e,n)=>{var r;hi(e.toast.action)&&(null==(r=e.toast.action)||r.onClick(t),t.defaultPrevented||n())},Mi=Pr('<button data-button=""> </button>'),Si=Pr('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Ei=Pr('<li data-sonner-toast=""><!> <!></li>');function Ci(t,e){oe(e,!0);let n=Zo(e,"cancelButtonStyle",3,""),r=Zo(e,"actionButtonStyle",3,""),o=Zo(e,"descriptionClass",3,""),i=Zo(e,"unstyled",3,!1),l=Zo(e,"defaultRichColors",3,!1);const s={...pi};let a=on(!1),c=on(!1),u=on(!1),d=on(!1),f=on(!1),v=on(0),h=on(0),p=e.toast.duration||e.duration||4e3,g=on(void 0),m=on(null),w=on(null);const y=Ze(()=>0===e.index),b=Ze(()=>e.index+1<=e.visibleToasts),x=Ze(()=>e.toast.type),$=Ze(()=>!1!==e.toast.dismissable),k=Ze(()=>e.toast.class||""),_=Ze(()=>e.toast.descriptionClass||""),M=Ze(()=>di.heights.findIndex(t=>t.toastId===e.toast.id)||0),S=Ze(()=>e.toast.closeButton??e.closeButton),E=Ze(()=>e.toast.duration??e.duration??4e3);let C=null;const O=Ze(()=>e.position.split("-")),I=Ze(()=>di.heights.reduce((t,e,n)=>n>=Rn(M)?t:t+e.height,0)),W=function(){let t=on(fe("undefined"!=typeof document&&document.hidden));return Zn(()=>Mr(document,"visibilitychange",()=>{sn(t,document.hidden,!0)})),{get current(){return Rn(t)}}}(),P=Ze(()=>e.toast.invert||e.invert),j=Ze(()=>"loading"===Rn(x)),T=Ze(()=>({...s,...e.classes})),L=Ze(()=>e.toast.title),A=Ze(()=>e.toast.description);let N=on(0),z=on(0);const B=Ze(()=>Math.round(14*Rn(M)+Rn(I)));function D(){sn(c,!0),sn(v,Rn(B),!0),di.removeHeight(e.toast.id),setTimeout(()=>{di.remove(e.toast.id)},200)}let R;Zn(()=>{let t;Rn(L),Rn(A),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=Fn(()=>Rn(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,sn(h,l,!0),Fn(()=>{di.setHeight({toastId:e.toast.id,height:l})})});const q=Ze(()=>e.toast.promise&&"loading"===Rn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function F(){sn(N,(new Date).getTime(),!0),R=setTimeout(()=>{var t,n;null==(n=(t=e.toast).onAutoClose)||n.call(t,e.toast),D()},p)}Zn(()=>{e.toast.updated&&(clearTimeout(R),p=Rn(E),F())}),Zn(()=>(Rn(q)||(e.expanded||e.interacting||W.current?function(){if(Rn(z)<Rn(N)){const t=(new Date).getTime()-Rn(N);p-=t}sn(z,(new Date).getTime(),!0)}():F()),()=>clearTimeout(R))),Jo(()=>{var t;sn(a,!0);const n=null==(t=Rn(g))?void 0:t.getBoundingClientRect().height;return sn(h,n,!0),di.setHeight({toastId:e.toast.id,height:n}),()=>{di.removeHeight(e.toast.id)}}),Zn(()=>{e.toast.delete&&Fn(()=>{var t,n;D(),null==(n=(t=e.toast).onDismiss)||n.call(t,e.toast)})});const Y=Ze(()=>e.toast.icon?e.toast.icon:"success"===Rn(x)?e.successIcon:"error"===Rn(x)?e.errorIcon:"warning"===Rn(x)?e.warningIcon:"info"===Rn(x)?e.infoIcon:"loading"===Rn(x)?e.loadingIcon:null);var G=Ei();let H;bo(G,"tabindex",0),G.__pointermove=t=>{var n,r,o;if(!C||!Rn($))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);!Rn(m)&&(Math.abs(l)>1||Math.abs(i)>1)&&sn(m,Math.abs(l)>Math.abs(i)?"x":"y",!0);let a={x:0,y:0};if("y"===Rn(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*gi(i);a.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===Rn(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*gi(l);a.x=Math.abs(t)<Math.abs(l)?t:l}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&sn(f,!0),null==(r=Rn(g))||r.style.setProperty("--swipe-amount-x",`${a.x}px`),null==(o=Rn(g))||o.style.setProperty("--swipe-amount-y",`${a.y}px`)},G.__pointerup=()=>{var t,n,r,o,i,l;if(Rn(d)||!Rn($))return;C=null;const s=Number((null==(t=Rn(g))?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(n=Rn(g))?void 0:n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=(new Date).getTime()-0,h="x"===Rn(m)?s:a,p=Math.abs(h)/c;if(Math.abs(h)>=45||p>.11)return sn(v,Rn(B),!0),null==(o=(r=e.toast).onDismiss)||o.call(r,e.toast),"x"===Rn(m)?sn(w,s>0?"right":"left",!0):sn(w,a>0?"down":"up",!0),D(),void sn(d,!0);null==(i=Rn(g))||i.style.setProperty("--swipe-amount-x","0px"),null==(l=Rn(g))||l.style.setProperty("--swipe-amount-y","0px"),sn(f,!1),sn(u,!1),sn(m,null)},G.__pointerdown=t=>{if(Rn(j))return;sn(v,Rn(B),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(sn(u,!0),C={x:t.clientX,y:t.clientY})};var V=$e(G),K=t=>{var n=yi();n.__click=[wi,j,$,D,e],eo($e(n),()=>e.closeIcon??Ct),nr(t=>{bo(n,"aria-label",e.closeButtonAriaLabel),bo(n,"data-disabled",Rn(j)),co(n,1,t)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.closeButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.closeButton))}]),Ar(t,n)};Gr(V,t=>{Rn(S)&&!e.toast.component&&"loading"!==Rn(x)&&null!==e.closeIcon&&t(K)});var U=_e(V,2),X=t=>{const n=Ze(()=>e.toast.component);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps,{closeToast:D}))}),Ar(t,r)},Z=t=>{var i=Si(),l=ke(i),s=t=>{var n=bi(),r=$e(n),o=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{(t=>{var n=Lr(),r=ke(n),o=t=>{var n=mi();eo($e(n),()=>e.loadingIcon),nr(t=>{co(n,1,t),bo(n,"data-visible","loading"===Rn(x))},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.loader,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.loader,"sonner-loader"))}]),Ar(t,n)},i=t=>{{let n=Ze(()=>{var t,n;return li(null==(t=Rn(T))?void 0:t.loader,null==(n=e.toast.classes)?void 0:n.loader)}),r=Ze(()=>"loading"===Rn(x));!function(t,e){oe(e,!0);var n=ii();Ur($e(n),23,()=>ri,(t,e)=>`spinner-bar-${e}`,(t,e)=>{Ar(t,oi())}),nr(t=>{co(n,1,t),bo(n,"data-visible",e.visible)},[()=>io(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),Ar(t,n),ie()}(t,{get class(){return Rn(n)},get visible(){return Rn(r)}})}};Gr(r,t=>{e.loadingIcon?t(o):t(i,!1)}),Ar(t,n)})(t)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(r,t=>{(e.toast.promise||"loading"===Rn(x))&&t(o)});var i=_e(r,2),l=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)};Gr(r,t=>{"info"===Rn(x)&&t(o)},!0),Ar(t,n)};Gr(r,t=>{"warning"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"error"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"success"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(i,t=>{"loading"!==e.toast.type&&t(l)}),nr(t=>co(n,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.icon,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.icon))}]),Ar(t,n)};Gr(l,t=>{(Rn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==Rn(Y)||e.toast.icon)&&t(s)});var a=_e(l,2),c=$e(a),u=$e(c),d=t=>{var n=Lr(),r=ke(n),o=t=>{const n=Ze(()=>e.toast.title);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},i=t=>{var n=Tr();nr(()=>Br(n,e.toast.title)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),Ar(t,n)};Gr(u,t=>{e.toast.title&&t(d)});var f=_e(c,2),v=t=>{var n=xi(),r=$e(n),i=t=>{const n=Ze(()=>e.toast.description);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},l=t=>{var n=Tr();nr(()=>Br(n,e.toast.description)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.description?t(i):t(l,!1)}),nr(t=>co(n,1,t),[()=>{var t,n;return io(li(o(),Rn(_),null==(t=Rn(T))?void 0:t.description,null==(n=e.toast.classes)?void 0:n.description))}]),Ar(t,n)};Gr(f,t=>{e.toast.description&&t(v)});var h=_e(a,2),p=t=>{var r=Lr(),o=ke(r),i=t=>{var n=Lr();no(ke(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var r=Lr(),o=ke(r),i=t=>{var r=ki();r.__click=[$i,e,$,D];var o=$e(r);nr(t=>{fo(r,e.toast.cancelButtonStyle??n()),co(r,1,t),Br(o,e.toast.cancel.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.cancelButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.cancelButton))}]),Ar(t,r)};Gr(o,t=>{hi(e.toast.cancel)&&t(i)},!0),Ar(t,r)};Gr(o,t=>{"function"==typeof e.toast.cancel?t(i):t(l,!1)}),Ar(t,r)};Gr(h,t=>{e.toast.cancel&&t(p)});var g=_e(h,2),m=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Lr();no(ke(n),()=>e.toast.action,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Mi();n.__click=[_i,e,D];var o=$e(n);nr(t=>{fo(n,e.toast.actionButtonStyle??r()),co(n,1,t),Br(o,e.toast.action.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.actionButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.actionButton))}]),Ar(t,n)};Gr(o,t=>{hi(e.toast.action)&&t(i)},!0),Ar(t,n)};Gr(o,t=>{"function"==typeof e.toast.action?t(i):t(l,!1)}),Ar(t,n)};Gr(g,t=>{e.toast.action&&t(m)}),nr(t=>co(c,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.title,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.title))}]),Ar(t,i)};Gr(U,t=>{e.toast.component?t(X):t(Z,!1)}),zo(G,t=>sn(g,t),()=>Rn(g)),nr((t,n,r,o)=>{co(G,1,t),bo(G,"data-rich-colors",e.toast.richColors??l()),bo(G,"data-styled",!(e.toast.component||e.toast.unstyled||i())),bo(G,"data-mounted",Rn(a)),bo(G,"data-promise",n),bo(G,"data-swiped",Rn(f)),bo(G,"data-removed",Rn(c)),bo(G,"data-visible",Rn(b)),bo(G,"data-y-position",Rn(O)[0]),bo(G,"data-x-position",Rn(O)[1]),bo(G,"data-index",e.index),bo(G,"data-front",Rn(y)),bo(G,"data-swiping",Rn(u)),bo(G,"data-dismissable",Rn($)),bo(G,"data-type",Rn(x)),bo(G,"data-invert",Rn(P)),bo(G,"data-swipe-out",Rn(d)),bo(G,"data-swipe-direction",Rn(w)),bo(G,"data-expanded",r),H=fo(G,`${e.style} ${e.toast.style}`,H,o)},[()=>{var t,n,r,o,i,l;return io(li(e.class,Rn(k),null==(t=Rn(T))?void 0:t.toast,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.toast,null==(o=Rn(T))?void 0:o[Rn(x)],null==(l=null==(i=e.toast)?void 0:i.classes)?void 0:l[Rn(x)]))},()=>Boolean(e.toast.promise),()=>Boolean(e.expanded||e.expandByDefault&&Rn(a)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":di.toasts.length-e.index,"--offset":`${Rn(c)?Rn(v):Rn(B)}px`,"--initial-height":e.expandByDefault?"auto":`${Rn(h)}px`})]),Sr("dragend",G,()=>{sn(u,!1),sn(m,null),C=null}),Ar(t,G),ie()}Er(["pointermove","pointerup","pointerdown","click"]),Qt=!0;var Oi=jr('<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>'),Ii=jr('<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>'),Wi=jr('<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>'),Pi=jr('<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>'),ji=jr('<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 Ti="24px",Li="16px",Ai="dark",Ni="light";var zi=Pr("<ol></ol>"),Bi=Pr('<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){vi.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),Ri=new Map;async function qi(t,...e){const n=Ri.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}const Fi=t=>t;function Yi(t){const e=t-1;return e*e*e+1}function Gi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Hi(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=Gi,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]=Hi(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=Fi}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Ui(t,{delay:e=0,duration:n=400,easing:r=Yi,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]=Hi(o),[v,h]=Hi(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 Xi(t,{delay:e=0,duration:n=400,easing:r=Yi,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 Zi(t,{delay:e=0,duration:n=400,easing:r=Yi,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=()=>Te(e)[0],o=(t,n)=>{let r;Ot((()=>r=Wn(t,r,{...Te(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),Ot(((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 jr(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 zr(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 Tr(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 Ir(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 Er(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 Nr=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Or=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(Te(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),j=br(e,"position",9),T=br(e,"visibleToasts",9),I=br(e,"expandByDefault",9),E=br(e,"closeButton",9),N=br(e,"interacting",9),O=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,Te(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()}),Te(nt)))}let ot=lt(void 0,!0);wr((()=>{at(q,!0);const t=Te(K).getBoundingClientRect().height;return at(V,t),k({toastId:C().id,height:t}),()=>$(C().id)})),It((()=>Oe(L())),(()=>{L({...b,...L()})})),It((()=>Oe(S())),(()=>{at(a,0===S())})),It((()=>(Oe(S()),Oe(T()))),(()=>{at(s,S()+1<=T())})),It((()=>Oe(C())),(()=>{at(u,C().title)})),It((()=>Oe(C())),(()=>{at(c,C().description)})),It((()=>Oe(C())),(()=>{at(d,C().type)})),It((()=>Oe(C())),(()=>{at(f,C().class||"")})),It((()=>Oe(C())),(()=>{at(v,C().descriptionClass||"")})),It((()=>(i(),Oe(C()))),(()=>{at(p,i().findIndex((t=>t.toastId===C().id))||0)})),It((()=>Oe(j())),(()=>{at(h,j().split("-"))})),It((()=>(i(),Te(p))),(()=>{at(g,i().reduce(((t,e,n)=>n>=Te(p)?t:t+e.height),0))})),It((()=>(Oe(P()),Oe(C()))),(()=>{P(C().invert||P())})),It((()=>Te(d)),(()=>{at(m,"loading"===Te(d))})),It((()=>(Te(p),Te(g))),(()=>{at(U,Math.round(14*Te(p)+Te(g)))})),It((()=>(Te(u),Te(c))),(()=>{Te(u),Te(c),async function(){if(!Te(q))return;let t;await async function(){await Promise.resolve(),function(){for(Jt();oe.length>0;)Qt=!0,Me(),Jt()}()}(),t=M()||I()?1:1-.05*S(),Te(K).style.setProperty("height","auto");const e=Te(K).offsetHeight,n=Te(K).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;Te(K).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,at(V,o),k({toastId:C().id,height:o})}()})),It((()=>(Oe(C()),Te(et),Oe(B()))),(()=>{C().updated&&(clearTimeout(Te(et)),at(nt,C().duration||B()||4e3),rt())})),It((()=>(Oe(C()),Te(d))),(()=>{at(y,C().promise&&"loading"===Te(d)||C().duration===Number.POSITIVE_INFINITY)})),It((()=>(Te(y),Oe(M()),Oe(N()),Te(et))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=z)}(at(ot,(t=()=>(Te(y)||(M()||N()?function(){if(Z<Y){const t=(new Date).getTime()-Y;at(nt,Te(nt)-t)}Z=(new Date).getTime()}():rt()),()=>clearTimeout(Te(et))),{subscribe:t})),"$effect",r)})),It((()=>l()),(()=>{l()})),It((()=>Oe(C())),(()=>{C().delete&&tt()})),Et(),rr(!0);var it=io();let st;Bn(it,"tabindex",0);var ut=bt(it),ct=t=>{var e=Xr();Ot((t=>{Bn(e,"data-disabled",Te(m)),jn(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=Te(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=>{E()&&!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"!==Te(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"===Te(d)&&t(r)}),n)};vn(t,(t=>{"warning"===Te(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"error"===Te(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"success"===Te(d)?t(r):t(o,!1)}),n)};vn(i,(t=>{C().icon?t(l):t(a,!1)})),ln(t,n)};vn(r,(t=>{("default"!==Te(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();Ot((()=>un(e,C().title))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().title?t(r):t(o,!1)})),Ot((t=>jn(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();Ot((()=>un(e,C().description))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().description?t(r):t(o,!1)})),Ot((t=>jn(e,1,t)),[()=>{var t,e;return Cn(Vr(W(),Te(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);Ot((t=>{Tn(e,O()),jn(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);Ot((t=>{Tn(e,A()),jn(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)),(()=>Te(K))),Ot(((t,e,o)=>{var i;Bn(it,"aria-live",C().important?"assertive":"polite"),jn(it,1,t),Bn(it,"data-styled",!(C().component||(null==(i=C())?void 0:i.unstyled)||D())),Bn(it,"data-mounted",Te(q)),Bn(it,"data-promise",e),Bn(it,"data-removed",Te(G)),Bn(it,"data-visible",Te(s)),Bn(it,"data-y-position",Te(h)[0]),Bn(it,"data-x-position",Te(h)[1]),Bn(it,"data-index",S()),Bn(it,"data-front",Te(a)),Bn(it,"data-swiping",Te(F)),Bn(it,"data-type",Te(d)),Bn(it,"data-invert",P()),Bn(it,"data-swipe-out",Te(H)),Bn(it,"data-expanded",o),st=Tn(it,`${n.style} ${C().style}`,st,{"--index":S(),"--toasts-before":S(),"--z-index":dr(w,"$toasts",r).length-S(),"--offset":`${Te(G)?Te(R):Te(U)}px`,"--initial-height":`${Te(V)}px`})}),[()=>{var t,e,r,o,i,l;return Cn(Vr(n.class,Te(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[Te(d)],null==(l=null==(i=C())?void 0:i.classes)?void 0:l[Te(d)]))},()=>Boolean(C().promise),()=>Boolean(M()||I()&&Te(q))],_t),Ze("pointerdown",it,(function(t){if(Te(m))return;at(R,Te(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(Te(H))return;J=null;const r=Number((null==(t=Te(K))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return at(R,Te(U)),null==(n=(e=C()).onDismiss)||n.call(e,C()),tt(),void at(H,!0);Te(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"===Te(h)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?Te(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),j=lt(!1),z=lt("system"!==(N=v())?N:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),T=lt(),I=null,E=!1;var N;function O(t){E&&!t.currentTarget.contains(t.relatedTarget)&&(E=!1,I&&(I.focus({preventScroll:!0}),I=null))}function A(t){E||(E=!0,I=t.relatedTarget)}!function(t){null===Z&&Y(),wr((()=>()=>Ie(t)))}((()=>{Te(T)&&I&&(I.focus({preventScroll:!0}),I=null,E=!1)})),wr((()=>{M();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(at(P,!0),null==(e=Te(T))||e.focus()),"Escape"!==t.code||document.activeElement!==Te(T)&&!(null==(n=Te(T))?void 0:n.contains(document.activeElement))||at(P,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),It((()=>(Oe(p()),l())),(()=>{at(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),It((()=>Oe(h())),(()=>{at(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),It((()=>l()),(()=>{l().length<=1&&at(P,!1)})),It((()=>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)}})),It((()=>Oe(v())),(()=>{if("system"!==v()&&at(z,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?at(z,u):at(z,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{at(z,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),Et(),rr();var B=on(),W=wt(B),L=t=>{var i=so();Bn(i,"tabindex",-1),mn(i,5,(()=>Te(a)),gn,((t,i,a,s)=>{var u=ao();let c;mn(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===Te(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 Te(r)},get toast(){return Te(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return Te(j)},get position(){return Te(i)},get expandByDefault(){return y()},get expanded(){return Te(P)},get actionButtonStyle(){return Te(l)},get cancelButtonStyle(){return Te(a)},get class(){return Te(s)},get descriptionClass(){return Te(u)},get classes(){return Te(c)},get duration(){return Te(d)},get unstyled(){return Te(v)},$$slots:{"loading-icon":(t,r)=>{var o=on();$n(wt(o),e,"loading-icon",{},(t=>{const e=_t((()=>"loading"===Te(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())})),Ot((()=>Bn(o,"data-visible",n()))),ln(t,o),Q()}(t,{get visible(){return Te(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(T,t)),(()=>Te(T))),Ot(((t,e,i)=>{var l;c=Wn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":Te(z),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r,[En]:{"--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():_(),()=>Te(i).split("-")[0],()=>Te(i).split("-")[1]],_t),Ze("blur",u,O),Ze("focus",u,A),Ze("mouseenter",u,(()=>at(P,!0))),Ze("mousemove",u,(()=>at(P,!0))),Ze("mouseleave",u,(()=>{Te(j)||at(P,!1)})),Ze("pointerdown",u,(()=>at(j,!0))),Ze("pointerup",u,(()=>at(j,!1))),ln(t,u)})),Ot((()=>Bn(i,"aria-label",`${g()} ${Te(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);Ot((t=>{o=jn(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)=>{!Te(e)||Te(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(){Te(l)||Te(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),Te(s)&&e.game.cover_video_url&&Te(s).play().catch((t=>console.error("Video play error:",t)))}function h(){Te(s)&&Te(u)&&Te(s).pause(),at(l,!1),clearTimeout(o),at(a,!1)}var g=yo();Ze("touchstart",ft,(t=>{Te(v)&&!Te(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 Te(l)},text:"Featured"})},b=(t,n)=>{var r=t=>{vo(t,{get isHovered(){return Te(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)),(()=>Te(s))),Ot((t=>{Bn(n,"src",e.game.cover_video_url),r=jn(n,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,t)}),[()=>({"opacity-100":Te(l)&&Te(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=>{Te(f)&&t(s)}));var u=xt(a,2);Ot((()=>{un(i,e.game.name),un(l,e.game.description||"No description."),jn(u,1,`fade-mask bg-background/75 pointer-events-none absolute right-0 ${(Te(f)?"bottom-7":"bottom-0")??""} left-0 h-8`,"svelte-o63m4o")})),Un(3,n,(()=>Ir)),ln(t,n)};vn(_,(t=>{Te(l)&&t(C)}));var S=xt(_,4);let M;nr(g,(t=>at(v,t)),(()=>Te(v))),Ot(((t,n)=>{jn(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 ${(Te(c)?"":"animate-pulse")??""} ${(i()?"h-62":"h-92")??""}`,"svelte-o63m4o"),Bn($,"src",e.game.cover_image_url),k=jn($,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=jn(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":Te(c)&&(!Te(l)||!Te(u)||!e.game.cover_video_url)}),()=>({"opacity-100":Te(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,!Te(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)},jo=en("<button> </button>"),zo=en('<div class="space-y-1 p-1"></div>'),To=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>'),Io=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 Eo(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((()=>Te(a)?r().filter((t=>t.toLowerCase().includes(Te(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=Io();Ze("click",ft,(t=>{var e;!Te(s)||(null==(e=Te(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((()=>Te(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 ${Te(w)??""} transition-transform duration-200`}}),nr(g,(t=>n=t),(()=>n));var x=xt(v,2),$=t=>{var n=To(),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=zo();mn(n,28,(()=>Te(u)),(t=>t),((t,n)=>{var r=jo();r.__click=[Po,o,n,i,e];var l,a,s,u,c,d,f,v,p=bt(r);Ot((()=>{jn(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===Te(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)),(()=>Te(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==Ie(e)&&t.value&&n(Zn(t)?Jn(t.value):t.value),Nt((()=>{var n=e();Zn(t)&&n===Jn(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(f,(()=>Te(a)),(t=>at(a,t))),Un(1,n,(()=>zr),(()=>({duration:150,easing:ko}))),Un(2,n,(()=>zr),(()=>({duration:200,easing:ko}))),ln(t,n)};vn(x,(t=>{Te(i)&&t($)})),Ot((()=>{un(h,Te(d)),un(y,Te(l))})),Un(3,f,(()=>Er),(()=>({easing:wo,start:.95}))),ln(t,f),Q()}Je(["click"]);var No=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 Oo(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=!Te(n);fr(Br,i),at(n,!Te(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=Te(s))?void 0:t.featured_game)&&Te(c)==(null==(e=Te(s))?void 0:e.category)&&Te(d).push({...Te(s).featured_game,featured:!0}),await y()}async function y(){if(Te(l)||Te(a))return;1===Te(f)?at(l,!0):at(a,!0);const t=Te(p)?null:Te(c),e=await co.getSuggestions(t,Te(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter((t=>!Te(d).some((e=>e.id===t.id))));at(d,[...Te(d),...o],!0),n.length<r?!Te(p)&&Te(c)?(at(p,!0),at(f,1)):at(v,!1):at(f,Te(f)+1),at(l,!1),at(a,!1),Te(v)&&Te(h)&&Te(h).getBoundingClientRect().bottom<=window.innerHeight+300&&y()}wr((()=>(i=new IntersectionObserver((t=>{t[0].isIntersecting&&Te(v)&&y()}),{rootMargin:"300px",root:Te(g)}),()=>null==i?void 0:i.disconnect()))),zt((()=>{Te(h)&&i&&i.observe(Te(h))})),wr((async()=>{var t,e,n;at(s,await co.getCurrentGameInfo(),!0),at(u,await co.getCategories(),!0),at(c,(null==(t=Te(s))?void 0:t.category)||(null==(n=Te(u))?void 0:n[(null==(e=Te(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);Eo(bt(k),{get categories(){return Te(u)},onCategoryChange:m,get selectedCategory(){return Te(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(!Te(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(Te(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(){Te(d)&&(at(d,!1),Te(u)<40&&y(Te(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)}()}zt((()=>{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((()=>Te(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 Te(x)},style:"margin-top: -5px;"}),Ot((t=>{var r,l;Tn(n,`transform: translateY(${Te(u)??""}px); opacity: ${Te(c)??""}; cursor: grab;`),Bn(o,"src",null==(r=e.currentGame)?void 0:r.logo_url),a=jn(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()?Te(v)+1:Te(v)),Tn(b,`color: ${(Te(f)?"white !important":"")??""};`),Bn(b,"aria-label",Te(f)?"Unlike game":"Like game")}),[()=>({"animate-pulse":!Te(l)})]),Ze("mouseleave",n,m),Ze("load",o,(()=>{at(l,!0)})),ln(t,n)};vn(w,(t=>{e.currentGame&&Te(a)&&t(x)}));var $=xt(w,2),k=t=>{var e=Wo(),n=bt(e);n.__mousedown=[Oo,s,a,u,c,y],n.__touchstart=[Oo,s,a,u,c,y],Un(3,n,(()=>Tr),(()=>({delay:150,y:30}))),ln(t,e)};vn($,(t=>{e.currentGame&&Te(s)&&t(k)})),ln(t,b),Q(),o()}(_,{get currentGame(){return Te(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,(()=>Te(d)),gn,((t,e,n)=>{var r=Ho();const o=kt((()=>Te(d).findIndex((t=>t.category!==Te(c)&&!t.featured))));var i=wt(r),l=t=>{ln(t,No())};vn(i,(t=>{n==Te(o)&&t(l)})),bo(xt(i,2),{get game(){return Te(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=>{Te(a)&&t(i)})),nr(r,(t=>at(h,t)),(()=>Te(h))),ln(t,e)};vn(t,(t=>{0!==Te(d).length||Te(l)?t(r,!1):t(n)}),e)};vn(S,(t=>{Te(l)&&0===Te(d).length?t(M):t(P,!1)})),nr(C,(t=>at(g,t)),(()=>Te(g)));var j=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(j)),{size:14}),Ot((()=>Bn(x,"src",dr(Wr,"$projectUrl",n)+"/static/images/logo-white-small.png"))),Un(3,b,(()=>jr),(()=>({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=z;At((()=>{i!==(i=e())&&(r&&(Dt(r),r=null),r=Bt((()=>i(o,...n))))}),L)}(bt(n),(()=>e.children??z)),Ot((()=>jn(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"]);var Jo=(t,e)=>{"touch"!==t.pointerType&&e()},Xo=en('<div class="fixed top-0 right-0 left-0 h-4"></div>'),Qo=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>'),ti=en('<div class="ml-3 flex items-center -space-x-2"></div>'),ei=en("More games <!>",1),ni=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>'),ri=en("<!> <!>",1);Je(["pointerover"]);var oi=en("<!> <!> <!> <!>",1);function ii(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?(a=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=a}catch(e){console.error("Failed to toggle body overflow style:",e)}}));var s=oi(),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=Or();r.__click=[Nr,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"}),Ot((()=>jn(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,(()=>jr)),ln(t,r)};vn(i,(t=>{r()&&t(l)})),ln(t,o),Q()}(u,{get position(){return Te(c)},get visible(){return Te(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(Te(s)),at(s,null),o()?null==(t=e.onIntent)||t.call(e):(async function(){const t=await co.getCategories(),e=await co.getCurrentGameInfo();Te(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(Te(d),1);at(f,((null==n?void 0:n.games)||[]).slice(0,3),!0)}(),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=ri();Ze("mousemove",dt,(function(t){var e,o;!r()||(null==(e=Te(i))?void 0:e.contains(t.target))||(null==(o=Te(l))?void 0:o.contains(t.target))||(!Te(s)&&Te(a)&&at(s,setTimeout((()=>at(a,!1)),1500),!0),n=Date.now())}));var p=wt(v),h=t=>{var e=Xo();e.__pointerover=[Jo,u],nr(e,(t=>at(i,t)),(()=>Te(i))),ln(t,e)};vn(p,(t=>{r()&&t(h)}));var g=xt(p,2),m=t=>{var n=ni(),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=ei(),r=xt(wt(n)),o=t=>{var e=ti();mn(e,21,(()=>Te(f)),gn,((t,e,n)=>{var r=Qo();let o;var i=bt(r);Ot((()=>{o=Tn(r,"",o,{"z-index":Te(f).length-n}),Bn(i,"src",Te(e).logo_url)})),ln(t,r)})),Un(3,e,(()=>Ir),(()=>({axis:"x",duration:150}))),ln(t,e)};vn(r,(t=>{var e;(null==(e=Te(f))?void 0:e.length)>=3&&t(o)})),ln(t,n)}}),nr(n,(t=>at(l,t)),(()=>Te(l))),Ot((t=>un(o,t)),[()=>c[Math.floor(Math.random()*c.length)]]),Ze("mouseenter",n,(()=>{clearTimeout(Te(s)),at(s,null)})),Un(3,n,(()=>Tr),(()=>({y:-100,easing:xo,duration:500}))),ln(t,n)};vn(g,(t=>{Te(a)&&t(m)})),ln(t,v),Q()}(p,{get enabled(){return Te(h)},get immediate(){return Te(g)},onIntent:l});var m=xt(p,2),y=t=>{uo(t,{})};vn(m,(t=>{o()&&t(y)})),ln(t,s),Q(),r()}const li={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0,immediate:!1}};let ai={...li};function si(t={}){return ai=ui(li,t),ai}function ui(t,e){const n={...t};return ci(t)&&ci(e)&&Object.keys(e).forEach((r=>{ci(e[r])?r in t?n[r]=ui(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function ci(t){return t&&"object"==typeof t&&!Array.isArray(t)}var di=en('<div class="flex h-62 w-full items-center justify-center"><!></div>'),fi=en('<div class="snap-center px-2"><!></div>'),vi=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),pi=(t,e,n)=>Te(e).scrollBy({left:2*-Te(n),behavior:"smooth"}),hi=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>'),gi=(t,e,n)=>Te(e).scrollBy({left:2*Te(n),behavior:"smooth"}),mi=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>'),yi=en("<!> <!>",1),bi=en('<div class="playlight-sdk-container"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function wi(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(Te(l),1),e=(null==t?void 0:t.games)||[];if(e.length<10&&Te(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)}(),Te(a)){const t=Te(a).scrollWidth-Te(a).clientWidth;f(Te(a).scrollLeft,t-Te(a).scrollLeft)}}));var v=bi(),p=bt(v),h=bt(p),g=t=>{var e=di();_r(bt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),ln(t,e)},m=t=>{var e=vi(),n=wt(e);mn(n,17,(()=>Te(i)),gn,((t,e)=>{var n,r,o,i,l=fi();bo(bt(l),{get game(){return Te(e)},compact:!0}),n=l,r="clientWidth",o=t=>at(s,t),i=tr.observe(n,(()=>o(n[r]))),Tt((()=>(Ie((()=>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=>{Te(o)?t(g):t(m,!1)})),nr(p,(t=>at(a,t)),(()=>Te(a)));var y=xt(p,2),b=t=>{var e=yi(),n=wt(e),r=t=>{var e=hi();e.__click=[pi,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,(()=>jr)),ln(t,e)};vn(n,(t=>{Te(u)&&t(r)}));var o=xt(n,2),i=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-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,(()=>jr)),ln(t,e)};vn(o,(t=>{Te(c)&&t(i)})),ln(t,e)};vn(y,(t=>{Te(i).length>0&&t(b)})),Ot((()=>Tn(p,Te(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 xi(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach((t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",cn(wi,{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),xi(),function(){try{new MutationObserver((()=>{xi()})).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())}setConfig(t={}){var e;null==(e=this.config)||e.set(si(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(ii,{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 Ji={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 Qi=jr("<svg><!><!></svg>");function tl(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=Ko(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);oe(e,!1);let o=Zo(e,"name",8,void 0),i=Zo(e,"color",8,"currentColor"),l=Zo(e,"size",8,24),s=Zo(e,"strokeWidth",8,2),a=Zo(e,"absoluteStrokeWidth",8,!1),c=Zo(e,"iconNode",24,()=>[]);Bo();var u=Qi();xo(u,(t,e)=>({...Ji,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e}),[()=>(Hn(a()),Hn(s()),Hn(l()),Fn(()=>a()?24*Number(s())/Number(l()):s())),()=>(Hn(o()),Hn(n),Fn(()=>((...t)=>t.filter((t,e,n)=>Boolean(t)&&n.indexOf(t)===e).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)))]);var d=$e(u);Ur(d,1,c,Kr,(t,e)=>{var n,r,o,i,l,s,a=Ze(()=>Pt(Rn(e),2)),c=Lr();n=ke(c),r=()=>Rn(a)[0],o=(t,e)=>{xo(t,()=>({...Rn(a)[1]}))},i=null,l=Hr,s=new Yr(n,!1),rr(()=>{const t=r()||null;return null===t?(s.ensure(null,null),void zr(!0)):(s.ensure(t,e=>{var n=Hr;if(Vr(l),t){if(Wr(i=document.createElementNS("http://www.w3.org/2000/svg",t),i),o){var r=i.appendChild(ye());o(i,r)}$n.nodes_end=i,e.before(i)}Vr(n)}),zr(!0),()=>{t&&zr(!1)})},Dt),Xn(()=>{zr(!0)}),Ar(t,c)}),to(_e(d),e,"default",{}),Ar(t,u),ie()}function el(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
+ */tl(t,Xo({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}function nl(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 rl=(t,e=Ct,n=Ct)=>{var r=ol();let o;var i=$e(r),l=$e(i);nr(t=>{o=co(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()})]),Ar(t,r)};var ol=Pr('<div><p class="font-bold text-white uppercase"> </p></div>'),il=(t,e,n,r,o,i)=>{!Rn(e)||Rn(n)||r()?nl(i.game.domain,i.game.id):o()},ll=Pr('<video playsinline="" loop fetchpriority="low"></video>',2),sl=Pr('<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>'),al=Pr('<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>'),cl=Pr('<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),ul=Pr('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');function dl(t,e){oe(e,!0);const[n,r]=Go();let o,i=Zo(e,"compact",3,!1),l=Zo(e,"small",3,!1),s=on(!1),a=on(!1),c=on(!1),u=on(!1),d=on(!1),f=on(void 0),v=on(!1),h=on(void 0);function p(){Rn(s)||Rn(c)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(Fo(Qs,"$projectUrl",n)+"/static/sounds/hover-selection.ogg",.25),sn(s,!0),clearTimeout(o),o=setTimeout(()=>sn(a,!0),300),Rn(f)&&e.game.cover_video_url&&Rn(f).play().catch(t=>console.error("Video error:",t))}function g(){Rn(f)&&Rn(v)&&Rn(f).pause(),sn(s,!1),clearTimeout(o),sn(a,!1)}var m=ul();Sr("touchstart",pe,t=>{Rn(h)&&!Rn(h).contains(t.target)&&g()},void 0,!0),Sr("pointerdown",pe,t=>sn(c,"touch"===t.pointerType)),Sr("pointermove",pe,t=>sn(c,"touch"===t.pointerType)),m.__click=[il,c,a,l,p,e];var w=$e(m),y=t=>{rl(t,()=>Rn(s),()=>"Featured")},b=t=>{var n=Lr(),r=ke(n),o=t=>{rl(t,()=>Rn(s),()=>"New")};Gr(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),Ar(t,n)};Gr(w,t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)});var x=_e(w,2),$=t=>{var n=ll();let r;n.muted=!0,zo(n,t=>sn(f,t),()=>Rn(f)),nr(t=>{bo(n,"src",e.game.cover_video_url),r=co(n,1,"absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 z-1",null,r,t)},[()=>({"opacity-100":Rn(s)&&Rn(v)&&e.game.cover_video_url})]),Sr("loadeddata",n,()=>{sn(v,!0)}),Ar(t,n)};Gr(x,t=>{e.game.cover_video_url&&t($)});var k=_e(x,2);let _;var M=_e(k,2),S=t=>{var n=al(),r=$e(n),o=$e(r),i=$e(o),l=$e(_e(o,2)),s=_e(r,2),a=t=>{var e=sl();!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
+ */tl(t,Xo({name:"info"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:15}),Ar(t,e)};Gr(s,t=>{Rn(c)&&t(a)});var u=_e(s,2);nr(()=>{Br(i,e.game.name),Br(l,e.game.description||"No description."),co(u,1,`bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${Rn(c)?"bottom-7":"bottom-0"} left-0 h-8`)}),Wo(3,n,()=>Xi),Ar(t,n)};Gr(M,t=>{Rn(s)&&!l()&&t(S)});var E=_e(M,2),C=t=>{var n=cl(),r=_e(ke(n),2);let o;nr(t=>{bo(r,"src",e.game.logo_url),o=co(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":Rn(d)})]),Sr("load",r,()=>{sn(d,!0)}),Ar(t,n)};Gr(E,t=>{l()||t(C)}),zo(m,t=>sn(h,t),()=>Rn(h)),nr(t=>{co(m,1,`highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${Rn(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"),bo(k,"src",e.game.cover_image_url),_=co(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":Rn(u)&&(!Rn(s)||!Rn(v)||!e.game.cover_video_url)})]),Sr("mouseenter",m,p),Sr("mouseleave",m,g),Sr("load",k,()=>{sn(u,!0)}),Ar(t,m),ie(),r()}function fl(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 vl(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function hl(t){const e=t-1;return e*e*e+1}function pl(t){return Math.sin(t*Math.PI/2)}function gl(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=hl}=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});`}}Er(["click"]);var ml=(t,e,n)=>{sn(e,""),sn(n,!Rn(n))},wl=Pr('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),yl=Pr('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),bl=(t,e,n,r,o)=>{var i;e(n),sn(r,!1),null==(i=o.onCategoryChange)||i.call(o)},xl=Pr("<button> </button>"),$l=Pr('<div class="space-y-1 p-1"></div>'),kl=Pr('<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>'),_l=Pr('<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 Ml(t,e){oe(e,!0);let n,r=Zo(e,"categories",19,()=>[]),o=Zo(e,"selectedCategory",15),i=on(!1),l=Ze(()=>o()||(r().length>0?r()[0]:"...")),s=on(""),a=on(void 0),c=Ze(()=>Rn(s)?r().filter(t=>t.toLowerCase().includes(Rn(s).toLowerCase())):r());const u=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=on(fe(u[0]));Jo(()=>{sn(d,u[Math.floor(Math.random()*(null==u?void 0:u.length))],!0)});var f=_l();Sr("click",pe,t=>{var e;!Rn(a)||(null==(e=Rn(a))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||sn(i,!1)});var v=$e(f),h=$e(v),p=$e(h),g=_e(h,2);g.__click=[ml,s,i];var m=$e(g),w=$e(m),y=_e(m,2);{let t=Ze(()=>Rn(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
+ */tl(t,Xo({name:"chevron-down"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(y,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${Rn(t)??""} transition-transform duration-200`}})}zo(g,t=>n=t,()=>n);var b=_e(v,2),x=t=>{var n=kl(),l=$e(n),u=$e(l),d=$e(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
+ */tl(t,Xo({name:"search"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=_e(d,2),v=$e(_e(l,2)),h=t=>{Ar(t,wl())},p=t=>{var n=Lr(),r=ke(n),l=t=>{Ar(t,yl())},s=t=>{var n=$l();Ur(n,28,()=>Rn(c),t=>t,(t,n)=>{var r=xl();r.__click=[bl,o,n,i,e];var l,s,a,c,u,d,f,v,h=$e(r);nr(()=>{co(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=()=>gl,a=()=>({duration:150}),v=null,(f=Hr).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=Po(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,Ar(t,r)}),Ar(t,n)};Gr(r,t=>{0===Rn(c).length?t(l):t(s,!1)},!0),Ar(t,n)};Gr(v,t=>{0===r().length?t(h):t(p,!1)}),zo(n,t=>sn(a,t),()=>Rn(a)),function(t,e,n=e){var r=new WeakSet;(function(t,e,n,r=n){t.addEventListener(e,()=>hn(n));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),vn||(vn=!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=jo(t)?To(i):i,n(i),null!==Ie&&r.add(Ie),await async function(){await Promise.resolve(),function(){var t=Ne;Ne=!0;try{for(;;){if(de(),0===Te.length&&(null==Ie||Ie.flush(),0===Te.length))return void(Le=null);Be()}}finally{Ne=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==Fn(e)&&t.value&&(n(jo(t)?To(t.value):t.value),null!==Ie&&r.add(Ie)),er(()=>{var n=e();if(t===document.activeElement){var o=We??Ie;if(r.has(o))return}jo(t)&&n===To(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")})}(f,()=>Rn(s),t=>sn(s,t)),Wo(1,n,()=>Ki,()=>({duration:150,easing:pl})),Wo(2,n,()=>Ki,()=>({duration:200,easing:pl})),Ar(t,n)};Gr(b,t=>{Rn(i)&&t(x)}),nr(()=>{Br(p,Rn(d)),Br(w,Rn(l))}),Wo(3,f,()=>Zi,()=>({easing:fl,start:.95})),Ar(t,f),ie()}async function Sl(t,e,n,r){var o;(null==(o=e.currentGame)?void 0:o.id)&&(Yo(Us,!n()),Yo(Xs,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())||Yo(Xs,r()+(n()?-1:1)))}Er(["click"]);var El=Pr('<img alt="logo"/>'),Cl=Pr('<div class="bg-muted size-5"></div>'),Ol=Pr('<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 Il(t,e){oe(e,!0);const n=()=>Fo(Us,"$currentGameIsLiked",o),r=()=>Fo(Xs,"$currentGameLikeCount",o),[o,i]=Go();let l=on(!1);Zn(()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(Yo(Us,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),Yo(Xs,(null==(n=e.currentGame)?void 0:n.likes)||0))});var s=Ol(),a=_e($e(s),2),c=$e(a),u=t=>{var n=El();let r;nr(t=>{var o;bo(n,"src",null==(o=e.currentGame)?void 0:o.logo_url),r=co(n,1,"bg-muted-foreground/50 size-5 text-[0px]! select-none",null,r,t)},[()=>({"animate-pulse":!Rn(l)})]),Sr("load",n,()=>{sn(l,!0)}),Ar(t,n)},d=t=>{Ar(t,Cl())};Gr(c,t=>{var n;(null==(n=e.currentGame)?void 0:n.logo_url)?t(u):t(d,!1)});var f=_e(c,2);let v;var h=$e(f),p=$e(_e(f,2)),g=$e(p),m=_e(p,2);m.__click=[Sl,e,n,r];var w=$e(m);{let t=Ze(()=>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
+ */tl(t,Xo({name:"thumbs-up"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return Rn(t)},style:"margin-top: -5px;"})}nr(t=>{var o;v=co(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()),fo(m,`color: ${n()?"white !important":""};`),bo(m,"aria-label",n()?"Unlike game":"Like game")},[()=>{var t;return{"opacity-50":!(null==(t=e.currentGame)?void 0:t.name)}}]),Ar(t,s),ie(),i()}function Wl(t,e,n,r,o){sn(e,!1),sn(n,250),sn(r,0),o(250,t=>{sn(n,250*(1-t)),sn(r,t,!0)})}Er(["click"]);var Pl=Pr('<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>'),jl=Pr('<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>'),Tl=Pr("<!> <!>",1);function Ll(t,e){t.target===t.currentTarget&&"touch"!==t.pointerType&&Yo(Ks,!1)}Er(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"]);var Al=Pr('<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>'),Nl=(t,e)=>Yo(Ks,!1),zl=Pr('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Bl=Pr('<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=Pr("<!> <!>",1),Rl=Pr('<div class="flex h-30 items-center"><!></div>'),ql=Pr('<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>'),Fl=Pr('<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 Yl(t,e){oe(e,!0);const n=()=>Fo(Ks,"$discoveryOpen",r),[r,o]=Go();let i,l=on(!0),s=on(!1),a=on(void 0),c=on(fe([])),u=on(void 0),d=on(fe([])),f=on(1),v=on(!0),h=on(!1),p=on(void 0),g=on(void 0);async function m(){var t,e;sn(d,[],!0),sn(f,1),sn(v,!0),sn(h,!1),(null==(t=Rn(a))?void 0:t.featured_game)&&Rn(u)==(null==(e=Rn(a))?void 0:e.category)&&Rn(d).push({...Rn(a).featured_game,featured:!0}),await w()}async function w(){if(Rn(l)||Rn(s))return;1===Rn(f)?sn(l,!0):sn(s,!0);const t=Rn(h)?null:Rn(u),e=await Di.getSuggestions(t,Rn(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter(t=>!Rn(d).some(e=>e.id===t.id));sn(d,[...Rn(d),...o],!0),n.length<r?!Rn(h)&&Rn(u)?(sn(h,!0),sn(f,1)):sn(v,!1):sn(f,Rn(f)+1),sn(l,!1),sn(s,!1),Rn(v)&&Rn(p)&&Rn(p).getBoundingClientRect().bottom<=window.innerHeight+300&&w()}Jo(()=>(i=new IntersectionObserver(t=>{t[0].isIntersecting&&Rn(v)&&w()},{rootMargin:"300px",root:Rn(g)}),()=>null==i?void 0:i.disconnect())),Zn(()=>{Rn(p)&&i&&i.observe(Rn(p))}),Jo(async()=>{var t,e,n;await(async t=>{var e=Pt(t,2);sn(a,e[0],!0),sn(c,e[1],!0)})(await Promise.all([Di.getCurrentGameInfo(),Di.getCategories()])),sn(u,(null==(t=Rn(a))?void 0:t.category)||(null==(n=Rn(c))?void 0:n[(null==(e=Rn(c))?void 0:e.length)-1]),!0),sn(l,!1),await m()});var y=Fl();Sr("keydown",pe,t=>{"Escape"==t.key&&Yo(Ks,!1)}),y.__pointerup=[Ll,n];var b=$e(y),x=$e(b),$=$e(_e(x,2));$.__click=[Nl,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
+ */tl(t,Xo({name:"x"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e($),{size:24,strokeWidth:2.5});var k=_e(b,2);Ml($e(k),{get categories(){return Rn(c)},onCategoryChange:m,get selectedCategory(){return Rn(u)},set selectedCategory(t){sn(u,t,!0)}});var _=_e(k,2),M=t=>{!function(t,e){oe(e,!0);let n=on(!1),r=on(0),o=on(1),i=on(!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){sn(i,!0),l=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function c(t){if(!Rn(i))return;const e=Math.max(0,(t.type.includes("touch")?t.touches[0].clientY:t.clientY)-l);sn(r,e,!0),sn(o,Math.max(0,1-e/150),!0),e>40&&function(){sn(i,!1);const t=Rn(r);s(250,e=>{sn(r,t+(250-t)*e),sn(o,Math.max(0,1-1.5*e),!0),1===e&&sn(n,!0)})}()}function u(){if(Rn(i)&&(sn(i,!1),Rn(r)<40)){const t=Rn(r);s(250,e=>{sn(r,t*(1-e)),sn(o,1)})}}Jo(()=>s(250,t=>sn(o,t,!0)));var d=Tl(),f=ke(d),v=t=>{var n=Pl();n.__mousedown=a,n.__mousemove=c,n.__mouseup=u,n.__touchstart=a,n.__touchmove=c,n.__touchend=u,Il($e(n),{get currentGame(){return e.currentGame}}),nr(()=>fo(n,`transform: translateY(${Rn(r)??""}px); opacity: ${Rn(o)??""}; cursor: grab;`)),Sr("mouseleave",n,u),Ar(t,n)};Gr(f,t=>{e.currentGame&&!Rn(n)&&t(v)});var h=_e(f,2),p=t=>{var e=jl(),i=$e(e);i.__mousedown=[Wl,n,r,o,s],i.__touchstart=[Wl,n,r,o,s],Wo(3,i,()=>Ui,()=>({delay:150,y:30})),Ar(t,e)};Gr(h,t=>{e.currentGame&&Rn(n)&&t(p)}),Ar(t,d),ie()}(t,{get currentGame(){return Rn(a)}})};Gr(_,t=>{Fo(Zs,"$sidebarEnabled",r)&&!Fo(Js,"$sidebarCollapsed",r)||t(M)});var S=_e(_,2);S.__pointerup=[Ll,n];var E=$e(S),C=t=>{var e=zl();el($e(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),Ar(t,e)},O=t=>{var e=Lr(),n=ke(e),r=t=>{Ar(t,Bl())},o=t=>{var e=ql(),n=$e(e);Ur(n,17,()=>Rn(d),Kr,(t,e,n)=>{const r=Ze(()=>Rn(d).findIndex(t=>t.category!==Rn(u)&&!t.featured));var o=Dl(),i=ke(o),l=t=>{Ar(t,Al())};Gr(i,t=>{n==Rn(r)&&t(l)}),dl(_e(i,2),{get game(){return Rn(e)}}),Ar(t,o)});var r=_e(n,2),o=$e(r),i=t=>{var e=Rl();el($e(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),Ar(t,e)};Gr(o,t=>{Rn(s)&&t(i)}),zo(r,t=>sn(p,t),()=>Rn(p)),Ar(t,e)};Gr(n,t=>{0!==Rn(d).length||Rn(l)?t(o,!1):t(r)},!0),Ar(t,e)};Gr(E,t=>{Rn(l)&&0===Rn(d).length?t(C):t(O,!1)}),zo(S,t=>sn(g,t),()=>Rn(g));var I=_e(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
+ */tl(t,Xo({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e($e(I)),{size:14}),nr(()=>bo(x,"src",Fo(Qs,"$projectUrl",r)+"/static/images/logo-white-small.png")),Wo(3,y,()=>Vi,()=>({duration:250})),Ar(t,y),ie(),o()}Er(["pointerup","click"]);var Gl=Pr("<button><!></button>");function Hl(t,e){let n=Zo(e,"disabled",3,!1),r=Zo(e,"variant",3,"primary");var o=Gl();o.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},eo($e(o),()=>e.children??Ct),nr(()=>{o.disabled=n(),co(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??""}`)}),Ar(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)}Er(["click"]);var Kl=(t,e)=>{"touch"!==t.pointerType&&e()},Ul=Pr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Xl=Pr('<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>'),Zl=Pr('<div class="ml-3 flex items-center -space-x-2"></div>'),Jl=Pr("More games <!>",1),Ql=Pr('<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>'),ts=Pr("<!> <!>",1);Er(["pointerover"]);var es=Pr("<!> <!> <!>",1);function ns(t,e){oe(e,!1);const n=()=>Fo(Ks,"$discoveryOpen",o),r=()=>Fo(Hs,"$config",o),[o,i]=Go();Bo();var l=es(),s=ke(l),a=t=>{Yl(t,{})};Gr(s,t=>{n()&&t(a)});var c=_e(s,2);{let t=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.enabled}),e=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.immediate});!function(t,e){oe(e,!0);let n,r=Zo(e,"enabled",3,!0),o=Zo(e,"immediate",3,!1),i=on(void 0),l=on(void 0),s=on(fe([])),a=on(!1),c=on(void 0);function u(){setTimeout(async()=>{var t,r;n<Date.now()-50&&(clearTimeout(Rn(c)),sn(c,null),o()?(qi("exitIntent"),null==(t=e.onIntent)||t.call(e)):(qi("exitIntent"),sn(a,!0),(null==(r=Rn(s))?void 0:r.length)||sn(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=ts();Sr("mousemove",pe,function(t){var e,o;!r()||(null==(e=Rn(i))?void 0:e.contains(t.target))||(null==(o=Rn(l))?void 0:o.contains(t.target))||(!Rn(c)&&Rn(a)&&sn(c,setTimeout(()=>sn(a,!1),1500),!0),n=Date.now())});var v=ke(f),h=t=>{var e=Ul();e.__pointerover=[Kl,u],zo(e,t=>sn(i,t),()=>Rn(i)),Ar(t,e)};Gr(v,t=>{r()&&t(h)});var p=_e(v,2),g=t=>{var n=Ql(),r=$e(n),o=$e(r);Hl(_e(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout(()=>sn(a,!1),150)},children:(t,e)=>{var n=Jl(),r=_e(ke(n)),o=t=>{var e=Zl();Ur(e,21,()=>Rn(s),Kr,(t,e,n)=>{var r=Xl();let o;var i=$e(r);nr(t=>{o=fo(r,"",o,t),bo(i,"src",Rn(e).logo_url)},[()=>({"z-index":Rn(s).length-n})]),Ar(t,r)}),Wo(3,e,()=>Xi,()=>({axis:"x",duration:150})),Ar(t,e)};Gr(r,t=>{var e;(null==(e=Rn(s))?void 0:e.length)>=3&&t(o)}),Ar(t,n)},$$slots:{default:!0}}),zo(n,t=>sn(l,t),()=>Rn(l)),nr(t=>Br(o,t),[()=>d[Math.floor(Math.random()*d.length)]]),Sr("mouseenter",n,()=>{clearTimeout(Rn(c)),sn(c,null)}),Wo(3,n,()=>Ui,()=>({y:-100,easing:vl,duration:500})),Ar(t,n)};Gr(p,t=>{Rn(a)&&t(g)}),Ar(t,f),ie()}(c,{get enabled(){return Rn(t)},get immediate(){return Rn(e)},onIntent:()=>{n()||Yo(Ks,!0)}})}var u=_e(c,2),d=t=>{!function(t,e){oe(e,!0);let n=Zo(e,"invert",3,!1),r=Zo(e,"position",3,"bottom-right"),o=Zo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Zo(e,"expand",3,!1),l=Zo(e,"closeButton",3,!1),s=Zo(e,"offset",3,Ti),a=Zo(e,"mobileOffset",3,Li),c=Zo(e,"theme",3,"light"),u=Zo(e,"richColors",3,!1),d=Zo(e,"duration",3,4e3),f=Zo(e,"visibleToasts",3,3),v=Zo(e,"toastOptions",19,()=>({})),h=Zo(e,"dir",7,"auto"),p=Zo(e,"gap",3,14),g=Zo(e,"containerAriaLabel",3,"Notifications"),m=Zo(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"]},Ho);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?(Fn(()=>h(t)),t):(Fn(()=>h(window.getComputedStyle(document.documentElement).direction??"ltr")),h())}const b=Ze(()=>Array.from(new Set([r(),...di.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=on(!1),$=on(!1),k=on(fe(function(t){return"system"!==t?t:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ai:Ni}(c()))),_=on(void 0),M=on(null),S=on(!1);const E=Ze(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Zn(()=>{di.toasts.length<=1&&sn(x,!1)}),Zn(()=>{const t=di.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=di.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);di.toasts=e}}),Zn(()=>()=>{Rn(_)&&Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null),sn(S,!1))}),Jo(()=>(di.reset(),Mr(document,"keydown",t=>{var e,n;o().every(e=>t[e]||t.code===e)&&(sn(x,!0),null==(e=Rn(_))||e.focus()),"Escape"!==t.code||document.activeElement!==Rn(_)&&!(null==(n=Rn(_))?void 0:n.contains(document.activeElement))||sn(x,!1)}))),Zn(()=>{if("system"!==c()&&sn(k,c()),"undefined"!=typeof window){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?sn(k,Ai):sn(k,Ni));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{sn(k,t?Ai:Ni,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const C=t=>{var n;null==(n=e.onblur)||n.call(e,t),Rn(S)&&!t.currentTarget.contains(t.relatedTarget)&&(sn(S,!1),Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null)))},O=t=>{var n;null==(n=e.onfocus)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||Rn(S)||(sn(S,!0),sn(M,t.relatedTarget,!0))},I=t=>{var n;null==(n=e.onpointerdown)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||sn($,!0)},W=t=>{var n;null==(n=e.onmouseenter)||n.call(e,t),sn(x,!0)},P=t=>{var n;null==(n=e.onmouseleave)||n.call(e,t),Rn($)||sn(x,!1)},j=t=>{var n;null==(n=e.onmousemove)||n.call(e,t),sn(x,!0)},T=t=>{var n;null==(n=e.ondragend)||n.call(e,t),sn(x,!1)},L=t=>{var n;null==(n=e.onpointerup)||n.call(e,t),sn($,!1)};ci.set(new fi);var A=Bi();bo(A,"tabindex",-1);var N=$e(A),z=t=>{var r=Lr();Ur(ke(r),18,()=>Rn(b),t=>t,(t,r,o,c)=>{const h=Ze(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Ze(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Li:Ti;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=zi();xo(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":Rn(k),"data-y-position":Rn(h).y,"data-x-position":Rn(h).x,style:e.style,onblur:C,onfocus:O,onmouseenter:W,onmousemove:j,onmouseleave:P,ondragend:T,onpointerdown:I,onpointerup:L,...w,[go]:n}),[y,()=>{var t;return{"--front-toast-height":`${null==(t=di.heights[0])?void 0:t.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":Rn(g)["--offset-top"],"--offset-right":Rn(g)["--offset-right"],"--offset-bottom":Rn(g)["--offset-bottom"],"--offset-left":Rn(g)["--offset-left"],"--mobile-offset-top":Rn(g)["--mobile-offset-top"],"--mobile-offset-right":Rn(g)["--mobile-offset-right"],"--mobile-offset-bottom":Rn(g)["--mobile-offset-bottom"],"--mobile-offset-left":Rn(g)["--mobile-offset-left"]}}],void 0,"svelte-nbs0zk"),Ur(b,23,()=>di.toasts.filter(t=>!t.position&&0===Rn(o)||t.position===r),t=>t.id,(t,o,s,a)=>{{const a=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Oi())};Gr(r,t=>{null!==e.successIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.successIcon?t(o):t(i,!1)}),Ar(t,n)},c=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Ii())};Gr(r,t=>{null!==e.errorIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.errorIcon?t(o):t(i,!1)}),Ar(t,n)},h=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Wi())};Gr(r,t=>{null!==e.warningIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.warningIcon?t(o):t(i,!1)}),Ar(t,n)},p=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Pi())};Gr(r,t=>{null!==e.infoIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.infoIcon?t(o):t(i,!1)}),Ar(t,n)},g=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.closeIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,ji())};Gr(r,t=>{null!==e.closeIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.closeIcon?t(o):t(i,!1)}),Ar(t,n)};let w=Ze(()=>{var t;return(null==(t=v())?void 0:t.duration)??d()}),y=Ze(()=>{var t;return(null==(t=v())?void 0:t.class)??""}),b=Ze(()=>{var t;return(null==(t=v())?void 0:t.descriptionClass)||""}),k=Ze(()=>{var t;return(null==(t=v())?void 0:t.style)??""}),_=Ze(()=>v().classes||{}),M=Ze(()=>v().unstyled??!1),S=Ze(()=>{var t;return(null==(t=v())?void 0:t.cancelButtonStyle)??""}),E=Ze(()=>{var t;return(null==(t=v())?void 0:t.actionButtonStyle)??""}),C=Ze(()=>{var t;return(null==(t=v())?void 0:t.closeButtonAriaLabel)??m()});Ci(t,{get index(){return Rn(s)},get toast(){return Rn(o)},get defaultRichColors(){return u()},get duration(){return Rn(w)},get class(){return Rn(y)},get descriptionClass(){return Rn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return l()},get interacting(){return Rn($)},get position(){return r},get style(){return Rn(k)},get classes(){return Rn(_)},get unstyled(){return Rn(M)},get cancelButtonStyle(){return Rn(S)},get actionButtonStyle(){return Rn(E)},get closeButtonAriaLabel(){return Rn(C)},get expandByDefault(){return i()},get expanded(){return Rn(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}})}}),zo(b,t=>sn(_,t),()=>Rn(_)),nr(()=>b.dir=b.dir),Ar(t,b)}),Ar(t,r)};Gr(N,t=>{di.toasts.length>0&&t(z)}),nr(()=>bo(A,"aria-label",`${g()??""} ${Rn(E)??""}`)),Ar(t,A),ie()}(t,{})};Gr(u,t=>{(n()||Fo(Zs,"$sidebarEnabled",o))&&t(d)}),Ar(t,l),ie(),i()}var rs=Pr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'),os=Pr('<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>'),is=Pr('<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>'),ls=Pr("View all games <!>",1),ss=Pr("Random game <!>",1),as=(t,e)=>e(t.clientY),cs=(t,e)=>e(t.touches[0].clientY),us=Pr('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'),ds=Pr('<div role="button" tabindex="0"><!> <!></div>'),fs=Pr('<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 vs(t,e){oe(e,!0);const n=()=>Fo(Js,"$sidebarCollapsed",i),r=()=>Fo(Qs,"$projectUrl",i),o=()=>Fo(Ks,"$discoveryOpen",i),[i,l]=Go();let s=on(!1),a=on(void 0),c=on(0),u=on(null),d=on(fe([])),f=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==0))||[]}),v=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==1))||[]});function h(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:Rn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}Qn(()=>{var t;const e=document.documentElement.clientWidth<=768;Yo(Js,e||Boolean(null==(t=p())?void 0:t.collapsed))}),Jo(async()=>{var t;return sn(m,(null==(t=p())?void 0:t.buttonY)??Rn(m),!0),sn(s,!0),sn(d,await Vl(14,!0),!0),sn(a,await Di.getCurrentGameInfo(),!0),sn(s,!1),Mr(window,"touchmove",k,{passive:!1})});let g,m=on(100),w=on(!1),y=on(0),b=on(0),x=on(null);function $(t){sn(w,!0),sn(y,t,!0),sn(b,Rn(m),!0)}function k(t){Rn(w)&&(t.preventDefault(),_(t.touches[0].clientY))}function _(t){var e;if(!Rn(w))return;const n=t-Rn(y),r=Rn(b)+n,o=null==(e=Rn(x))?void 0:e.offsetHeight;sn(m,Math.max(0,Math.min(window.innerHeight-o,r)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(h)}function M(t){if(t.preventDefault(),sn(c,Rn(c)-t.deltaY),Rn(u)){const t=Rn(u).offsetHeight/3;sn(c,(Rn(c)%t+t)%t)}}var S=fs();Sr("mousemove",pe,function(t){Rn(w)&&_(t.clientY)}),Sr("mouseup",pe,()=>sn(w,!1)),Sr("touchend",pe,()=>sn(w,!1)),Sr("resize",pe,()=>{document.documentElement.clientWidth<=768&&Yo(Js,!0)});var E=ke(S),C=$e(E),O=_e(C,2),I=$e(O),W=t=>{var e=rs();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},P=t=>{var e=Lr(),n=ke(e),r=t=>{var e=os(),n=$e(e),r=$e(n);let o;Ur(r,21,()=>[...Rn(f),...Rn(f),...Rn(f)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),zo(r,t=>sn(u,t),()=>Rn(u));var i=$e(_e(n,2));let l;Ur(i,21,()=>[...Rn(v),...Rn(v),...Rn(v)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),nr((t,e)=>{o=fo(r,"",o,t),l=fo(i,"",l,e)},[()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`}),()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`})]),Sr("wheel",e,M),Ar(t,e)},o=t=>{Ar(t,is())};Gr(n,t=>{var e;(null==(e=Rn(d))?void 0:e.length)?t(r):t(o,!1)},!0),Ar(t,e)};Gr(I,t=>{Rn(s)?t(W):t(P,!1)});var j=_e(O,2),T=$e(j);Hl(T,{class:"w-full",onclick:()=>Yo(Ks,!0),get disabled(){return o()},children:(t,e)=>{var n=ls();!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
+ */tl(t,Xo({name:"gamepad-2"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e(ke(n)),{style:"margin-top: -1px;"}),Ar(t,n)},$$slots:{default:!0}}),Hl(_e(T,2),{class:"w-full",variant:"secondary",onclick:()=>{var t,e;const n=Math.floor(Math.random()*(null==(t=Rn(d))?void 0:t.length)),r=null==(e=Rn(d))?void 0:e[n];nl(null==r?void 0:r.domain,null==r?void 0:r.id)},children:(t,e)=>{var n=ss();!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
+ */tl(t,Xo({name:"dices"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e(ke(n)),{style:"margin-top: -2px;"}),Ar(t,n)},$$slots:{default:!0}});var L=$e(_e(j,2));Il($e(L),{get currentGame(){return Rn(a)}}),Hl($e(_e(L,2)),{variant:"secondary",class:"text-muted-foreground border-l outline-none!",onclick:()=>{Yo(Js,!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
+ */tl(t,Xo({name:"chevrons-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(t,{})},$$slots:{default:!0}});var A=_e(E,2),N=t=>{var e=ds();let n;e.__mousedown=[as,$],e.__touchstart=[cs,$];var o=$e(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
+ */tl(t,Xo({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(o,{class:"text-muted-foreground aspect-square"}),Hl(_e(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Yo(Js,!1),h()):Yo(Ks,!0)},children:(t,e)=>{var n=us();nr(()=>bo(n,"src",r()+"/static/images/icon-white-small.png")),Ar(t,n)},$$slots:{default:!0}}),zo(e,t=>sn(x,t),()=>Rn(x)),nr(t=>{co(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border p-2 shadow-xl backdrop-blur-xl "+(Rn(w)?"cursor-grabbing":"cursor-grab"),"svelte-129hoe0"),n=fo(e,"",n,t)},[()=>({top:Rn(m)+"px"})]),Wo(3,e,()=>Vi),Ar(t,e)};Gr(A,t=>{n()&&!o()&&t(N)}),nr(()=>{co(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"),bo(C,"src",r()+"/static/images/logo-white-small.png")}),Ar(t,S),ie(),l()}Er(["mousedown","touchstart"]);let hs=null,ps=null,gs=!1,ms=null,ws=new Map,ys=null;function bs(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=xs(l,n,r,o),t.textContent=l,t.setAttribute("data-playlight-modified","true")}function xs(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 $s,ks=null,_s=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,js=new Map,Ts=null,Ls=null,As=null,Ns=!1,zs=!1,Bs=[],Ds=null,Rs=null,qs=null;function Fs(){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(ns,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(qs),qs=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),Fr(e),Fs())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function Ys(){var t,e,n,r;if(!Ns)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),zs=!0,t};if(!1!==(null==(e=null==(t=ni(Hs))?void 0:t.sidebar)?void 0:e.hasFrameworkRoot)&&s.length>0)if(1===s.length)Ls=s[0],zs=!1;else if(!0===(null==(r=null==(n=ni(Hs))?void 0:n.sidebar)?void 0:r.hasFrameworkRoot)){const t=s.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);Ls=s[t.indexOf(e)],zs=!1}Ls||(Ls=a()),i.classList.add("playlight-sdk-html"),o.classList.add("playlight-sdk-body"),Ls.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{ks=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),Ms=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),Ss=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),Es=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),Cs=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),Os=window.scrollTo,Is=window.scroll,Ws=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),Ps=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",Ps),_s=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=_s||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=xs(e,r,window.innerHeight,o);return n.call(window,i)},r=n();js.has(e)||js.set(e,{listeners:new Set,lastMatches:r.matches});const o=js.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}})},$s||($s=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of js.entries()){const r=window.matchMedia(t);if(r.matches!==n){js.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,Ls),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(ws.has(i))bs(i,ws.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),ws.set(t,{originalCSS:l,originalElement:i}),i.replaceWith(t),bs(t,l,e,n,r)}else ws.set(i,{originalCSS:l,originalElement:null}),bs(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=()=>{gs||(gs=!0,requestAnimationFrame(()=>{gs=!1,e()}))};hs=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;ys!==e&&(ys=e,window.dispatchEvent(new Event("resize")),clearTimeout(ms),ms=setTimeout(n,50))}),hs.observe(t),ps=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}))}}}),ps.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(o),Bs=Array.from(o.classList).filter(t=>!t.startsWith("playlight")),Bs.forEach(t=>{Ls.classList.add(t),o.classList.remove(t)});const c=window.getComputedStyle(Ls);"contents"===c.display&&Ls.style.setProperty("display","block","important"),"visible"===c.overflow&&Ls.style.setProperty("overflow","auto","important"),Ts=document.createElement("div"),Ts.className="playlight-sdk playlight-sdk-container-sidebar",i.appendChild(Ts),As=Dr(vs,{target:Ts}),Ds=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=Ls&&!document.body.contains(Ls),r=Ts&&!document.documentElement.contains(Ts);(t||e||n||r)&&(clearTimeout(Rs),Rs=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Gs(),Ys()},0))}),Ds.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Ds.observe(document.body,{childList:!0}),Ns=!0}catch(o){console.error("Error during sidebar setup:",o)}}function Gs(){if(Ns)try{const t=document.body,e=document.documentElement;null==Ds||Ds.disconnect(),clearTimeout(Rs),As&&Fr(As),(null==Ts?void 0:Ts.parentNode)&&e.removeChild(Ts),zs?(Ls.parentNode===t&&Array.from(Ls.children).forEach(e=>{e.parentNode===Ls&&t.insertBefore(e,Ls)}),Ls.remove()):Ls.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),Ls.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",ks),Object.defineProperty(window,"scrollY",Ms),Object.defineProperty(window,"pageYOffset",Ss),Object.defineProperty(window,"scrollX",Es),Object.defineProperty(window,"pageXOffset",Cs),window.scrollTo=Os,window.scroll=Is,window.scrollBy=Ws,t.removeEventListener("scroll",Ps),window.matchMedia=_s,ks=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,_s=null}catch(e){console.warn("Could not restore window polyfills:",e)}}(Ls),function(){null==hs||hs.disconnect(),window.dispatchEvent(new Event("resize")),null==ps||ps.disconnect(),clearTimeout(ms),hs=ps=ms=ys=null;for(const[t,{originalCSS:e,originalElement:n}]of ws.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ws.clear()}(),Ds=null,Rs=null,Ts=null,As=null,Ls=null,Bs=[],zs=!1,Ns=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Hs=ei(null),Vs=ei(!1),Ks=ei(!1),Us=ei(!1),Xs=ei(0),Zs=ei(!1),Js=ei(!1),Qs=ei("https://sdk.playlight.dev");let ta;Ks.subscribe(t=>{try{t?(Di.trackOpen(),qi("discoveryOpen"),ta=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(qi("discoveryClose"),document.body.style.overflow=ta)}catch(e){console.error("Error in discoveryOpen store subscription:",e)}}),Hs.subscribe(t=>{var e;(null==(e=null==t?void 0:t.sidebar)?void 0:e.forceVisible)||ni(Vs)?Zs.set(!0):Zs.set(!1)}),Vs.subscribe(t=>{t&&Zs.set(!0)}),Zs.subscribe(t=>{t?(Ys(),qi("sidebarEnable")):(Gs(),qi("sidebarDisable"))});var ea=Pr('<div class="flex h-62 w-full items-center justify-center"><!></div>'),na=Pr('<div class="snap-center px-2"><!></div>'),ra=Pr('<!> <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),oa=(t,e,n)=>Rn(e).scrollBy({left:2*-Rn(n),behavior:"smooth"}),ia=Pr('<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>'),la=(t,e,n)=>Rn(e).scrollBy({left:2*Rn(n),behavior:"smooth"}),sa=Pr('<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>'),aa=Pr("<!> <!>",1),ca=Pr('<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 ua(t,e){oe(e,!0);const[n,r]=Go();let o=on(!0),i=on(fe([])),l=on(void 0),s=on(0),a=on(!1),c=on(!0),u=on("");function d(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);sn(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)`)}Jo(async()=>{sn(o,!0),sn(i,await Vl(10,!0),!0),sn(o,!1),requestAnimationFrame(()=>{if(Rn(l)){const t=Rn(l).scrollWidth-Rn(l).clientWidth;d(Rn(l).scrollLeft,t-Rn(l).scrollLeft)}})});var f=ca(),v=$e(f),h=$e(v),p=t=>{var e=ea();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},g=t=>{var e=ra(),n=ke(e);Ur(n,17,()=>Rn(i),Kr,(t,e)=>{var n,r,o,i,l=na();dl($e(l),{get game(){return Rn(e)},compact:!0}),n=l,r="clientWidth",o=t=>sn(s,t),i=Ao.observe(n,()=>o(n[r])),tr(()=>(Fn(()=>o(n[r])),i)),Ar(t,l)});var r=_e(n,2);Hl(_e($e(r),2),{onclick:()=>Yo(Ks,!0),children:(t,e)=>{Ar(t,Tr("See all"))},$$slots:{default:!0}}),Ar(t,e)};Gr(h,t=>{Rn(o)?t(p):t(g,!1)}),zo(v,t=>sn(l,t),()=>Rn(l));var m=_e(v,2),w=t=>{var e=aa(),n=ke(e),r=t=>{var e=ia();e.__click=[oa,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
+ */tl(t,Xo({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:22,strokeWidth:2.75}),Wo(3,e,()=>Vi),Ar(t,e)};Gr(n,t=>{Rn(a)&&t(r)});var o=_e(n,2),i=t=>{var e=sa();e.__click=[la,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
+ */tl(t,Xo({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:22,strokeWidth:2.75}),Wo(3,e,()=>Vi),Ar(t,e)};Gr(o,t=>{Rn(c)&&t(i)}),Ar(t,e)};Gr(m,t=>{Rn(i).length>0&&t(w)}),nr(()=>fo(v,Rn(u))),Sr("scroll",v,t=>{const e=t.target;sn(a,e.scrollLeft>20),sn(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),d(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)}),Ar(t,f),ie(),r()}function da(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach(t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",Dr(ua,{target:t}))})}catch(t){console.error("Error occurred initializing and mounting carousel widget:",t)}}Er(["click"]);const fa=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),Fs(),da(),function(){try{new MutationObserver(()=>{da()}).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"),Vs.set(e||n),window.playlightInitialized=!0}setDiscovery(t=!0){Ks.set(t)}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent","sidebarEnable","sidebarDisable"].includes(t))return console.warn(`Invalid event type "${t}!"`);Ri.has(t)||Ri.set(t,[]),Ri.get(t).push(e)}setConfig(t={}){Hs.set(ht(t))}};return"undefined"!=typeof window&&(window.playlightSDK=fa),fa}();
23
282
  //# sourceMappingURL=playlight-sdk.iife.js.map