playlight-sdk 0.2.9 → 0.2.10
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 T=()=>{};function z(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),zt(i.fn)}}finally{ue(n),ae(r)}}Z=e.p,e.m=!0}return{}}function tt(){return!K||null!==Z&&null===Z.l}function et(t,e){if("object"!=typeof t||null===t||q in t)return t;const n=M(t);if(n!==C&&n!==S)return t;var r=new Map,o=b(t),i=it(0),l=ie,a=t=>{var e,n=ie;return ae(l),e=t(),ae(n),e};return o&&r.set("length",it(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=r.get(e);return void 0===o?(o=a((()=>it(n.value))),r.set(e,o)):at(o,a((()=>et(n.value)))),!0},deleteProperty(t,e){var n=r.get(e);if(void 0===n)e in t&&r.set(e,a((()=>it(U))));else{if(o&&"string"==typeof e){var l=r.get("length"),s=Number(e);Number.isInteger(s)&&s<l.v&&at(l,s)}at(n,U),nt(i)}return!0},get(e,n,o){var i;if(n===q)return t;var l=r.get(n),s=n in e;if(void 0!==l||s&&!(null==(i=k(e,n))?void 0:i.writable)||(l=a((()=>it(et(s?e[n]:U)))),r.set(n,l)),void 0!==l){var u=ze(l);return u===U?void 0:u}return Reflect.get(e,n,o)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var o=r.get(e);o&&(n.value=ze(o))}else if(void 0===n){var i=r.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==U)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){var n;if(e===q)return!0;var o=r.get(e),i=void 0!==o&&o.v!==U||Reflect.has(t,e);return!((void 0!==o||null!==se&&(!i||(null==(n=k(t,e))?void 0:n.writable)))&&(void 0===o&&(o=a((()=>it(i?et(t[e]):U))),r.set(e,o)),ze(o)===U))&&i},set(t,e,n,l){var s,u=r.get(e),c=e in t;if(o&&"length"===e)for(var d=n;d<u.v;d+=1){var f=r.get(d+"");void 0!==f?at(f,U):d in t&&(f=a((()=>it(U))),r.set(d+"",f))}void 0===u?c&&!(null==(s=k(t,e))?void 0:s.writable)||(at(u=a((()=>it(void 0))),a((()=>et(n)))),r.set(e,u)):(c=u.v!==U,at(u,a((()=>et(n)))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(l,n),!c){if(o&&"string"==typeof e){var p=r.get("length"),h=Number(e);Number.isInteger(h)&&h>=p.v&&at(p,h+1)}nt(i)}return!0},ownKeys(t){ze(i);var e=Reflect.ownKeys(t).filter((t=>{var e=r.get(t);return void 0===e||e.v!==U}));for(var[n,o]of r)o.v===U||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function nt(t,e=1){at(t,t.v+e)}const rt=new Map;function ot(t,e){return{f:0,v:t,reactions:null,equals:H,rv:0,wv:0}}function it(t,e){const n=ot(t);return de(n),n}function lt(t,e=!1){var n;const r=ot(t);return e||(r.equals=V),K&&null!==Z&&null!==Z.l&&((n=Z.l).s??(n.s=[])).push(r),r}function at(t,e,n=!1){return null!==ie&&!le&&tt()&&18&ie.f&&!(null==ce?void 0:ce.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),st(t,n?et(e):e)}function st(t,e){if(!t.equals(e)){var n=t.v;ne?rt.set(t,e):rt.set(t,n),t.v=e,t.wv=ye(),ct(t,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=ze(t),r=1===e?n++:n--;return at(t,n),r}function ct(t,e){var n=t.reactions;if(null!==n)for(var r=tt(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&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 Tt(t){if(Mt(),!(null!==se&&32&se.f&&null!==Z)||Z.m)return zt(t);var e=Z;(e.e??(e.e=[])).push({fn:t,effect:se,reaction:ie})}function zt(t){return Pt(4,t,!1)}function 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(ze(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(ze))))}function At(t,e=0){return Pt(24|e,t,!0)}function Bt(t,e=!0){return Pt(40,t,!0,e)}function Wt(t){var e=t.teardown;if(null!==e){const t=ne,n=ie;re(!0),ae(null);try{e.call(null)}finally{re(t),ae(n)}}}function Lt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;64&n.f?n.parent=null:Dt(n,e),n=r}}function Dt(t,e=!0){var n=!1;if((e||524288&t.f)&&null!==t.nodes_start){for(var r=t.nodes_start,o=t.nodes_end;null!==r;){var i=r===o?null:yt(r);r.remove(),r=i}n=!0}Lt(t,e&&!n),_e(t,0),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(Te(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 Te(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 ze(t){var e=!!(2&t.f);if(null===ie||le){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&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=ze(c),d=t.length;u&&0===d||(u=0===d,function(t,e,n,r,o,i,l){var a,s,u,c,d,f,v,p,h,g,m=!!(8&o),y=!!(3&o),b=t.length,w=e.items,$=e.first,k=null,_=[],C=[];if(m)for(g=0;g<b;g+=1)p=i(v=t[g],g),void 0!==(h=w.get(p))&&(null==(a=h.a)||a.measure(),(f??(f=new Set)).add(h));for(g=0;g<b;g+=1)if(p=i(v=t[g],g),void 0!==(h=w.get(p))){if(y&&yn(h,v,g,o),h.e.f&B&&(Rt(h.e),m&&(null==(s=h.a)||s.unfix(),(f??(f=new Set)).delete(h))),h!==$){if(void 0!==d&&d.has(h)){if(_.length<C.length){var S,M=C[0];k=M.prev;var P=_[0],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 T=void 0===d?[]:x(d);null!==$;)$.e.f&B||T.push($),$=$.next;var z=T.length;if(z>0){var I=4&o&&0===b?n:null;if(m){for(g=0;g<z;g+=1)null==(u=T[g].a)||u.measure();for(g=0;g<z;g+=1)null==(c=T[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,T,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}))),ze(c))}))}function yn(t,e,n,r){1&r&&st(t.v,e),2&r?st(t.i,n):t.i=n}function bn(t,e,n,r,o,i,l,a,s,u){var c=pn,d=1&s?16&s?ot(o):lt(o):o,f=2&s?ot(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};pn=v;try{return v.e=Bt((()=>a(t,d,f,u)),!1),v.e.prev=n&&n.e,v.e.next=r&&r.e,null===n?e.first=v:(n.next=v,n.e.next=v.e),null!==r&&(r.prev=v,r.e.prev=v.e),v}finally{pn=c}}function wn(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var l=yt(i);o.before(i),i=l}}function xn(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}function $n(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],a=!1;!0===l&&(l=e["default"===n?"children":n],a=!0),void 0===l?null!==o&&o(t):l(t,a?()=>r:r)}function kn(t,e,n){var r,o,i=t;At((()=>{r!==(r=e())&&(o&&(Gt(o),o=null),r&&(o=Bt((()=>n(i,r)))))}),L)}function _n(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=_n(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Cn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=_n(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const Sn=[..." \t\n\r\f \v\ufeff"];function Mn(t,e=!1){var n=e?" !important;":";",r="";for(var o in t){var i=t[o];null!=i&&""!==i&&(r+=" "+o+": "+i+n)}return r}function Pn(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function 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 Tn(t,e={},n,r){for(var o in n){var i=n[o];e[o]!==i&&(null==n[o]?t.style.removeProperty(o):t.style.setProperty(o,i,r))}}function zn(t,e,n,r){if(t.__style!==e){var o=function(t,e){if(e){var n,r,o="";if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,l=0,a=!1,s=[];n&&s.push(...Object.keys(n).map(Pn)),r&&s.push(...Object.keys(r).map(Pn));var u=0,c=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(a?"/"===f&&"*"===t[d-1]&&(a=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?a=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!a&&!1===i&&0===l)if(":"===f&&-1===c)c=d;else if(";"===f||d===e-1){if(-1!==c){var v=Pn(t.substring(u,c).trim());s.includes(v)||(";"!==f&&d++,o+=" "+t.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(o+=Mn(n)),r&&(o+=Mn(r,!0)),""===(o=o.trim())?null:o}return null==t?null:String(t)}(e,r);null==o?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(Tn(t,null==n?void 0:n[0],r[0]),Tn(t,null==n?void 0:n[1],r[1],"important")):Tn(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 zn(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&&zt((()=>{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:T,deactivate:T,reset:T,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=T)},deactivate:()=>{o=T},reset:()=>{0===r&&(null==c||c(1,0))},t:()=>p()}}function Zn(t){var e=t.type;return"number"===e||"range"===e}function Jn(t){return""===t?null:+t}const Xn=class{constructor(o){g(this,r),g(this,t,new WeakMap),g(this,e),g(this,n),m(this,n,o)}observe(i,l){var a=h(this,t).get(i)||new Set;return a.add(l),h(this,t).set(i,a),y(this,r,o).call(this).observe(i,h(this,n)),()=>{var n=h(this,t).get(i);n.delete(l),0===n.size&&(h(this,t).delete(i),h(this,e).unobserve(i))}}};var Qn;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakSet,o=function(){return h(this,e)??m(this,e,new ResizeObserver((e=>{for(var n of e)for(var r of(Xn.entries.set(n.target,n),h(this,t).get(n.target)||[]))r(n)})))},((t,e,n)=>{e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(Xn,"symbol"!=typeof(Qn="entries")?Qn+"":Qn,new WeakMap);var tr=new Xn({box:"border-box"});function er(t,e){return t===e||(null==t?void 0:t[q])===e}function nr(t={},e,n,r){return zt((()=>{var r,o;return 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=()=>ze(o)}var o;n.b.length&&(o=()=>{or(e,r),I(n.b)},Mt(),Nt(o)),Tt((()=>{const t=Ie((()=>n.m.map(z)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&Tt((()=>{or(e,r),I(n.a)}))}function or(t,e){if(t.l.s)for(const n of t.l.s)ze(n);e()}function ir(t,e,n){if(null==t)return e(void 0),T;const r=Ie((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const lr=[];function ar(t,e=T){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=T){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||T),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:T});if(r.store!==t&&!(cr in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=T;else{var o=!0;r.unsubscribe=ir(t,(t=>{o?r.source.v=t:at(r.source,t)})),o=!1}return t&&cr in n?sr(t):ze(r.source)}function fr(t,e){return t.set(e),e}function vr(){const t={};return[t,function(){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 ze(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=br({get[e](){return t.props[e]}},e,4)),t.special[e](n),ut(t.version),!0),getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),ut(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter((e=>!t.exclude.includes(e)))};function hr(t,e){return new Proxy({props:t,exclude:e,special:{},version:ot(0)},pr)}const gr={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(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=ze(y);return void 0!==t&&(p=void 0),void 0===t?p:t}}if(!(4&n))return d;if(v){var b=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!b&&!c||v(e?d():t),t):d()}}var w=!1,x=lt(i),$=$t((()=>{var t=d(),e=ze(x);return w?(w=!1,e):x.v=t}));return s&&ze($),l||($.equals=V),function(t,e){if(arguments.length>0){const n=e?ze($):a&&s?et(t):t;if(!$.equals(n)){if(w=!0,at(x,n),g&&void 0!==p&&(p=n),yr($))return t;Ie((()=>ze($)))}return t}return yr($)?$.v:ze($)}}function wr(t){var e,n;null===Z&&Y(),K&&null!==Z.l?(e=Z,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Tt((()=>{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,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;
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-svelte v0.476.0 - ISC
|
|
4
4
|
*
|
|
@@ -19,5 +19,5 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.de
|
|
|
19
19
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
const xr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var $r=nn("<svg><!><!></svg>");function kr(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);X(e,!1);let o=br(e,"name",8,void 0),i=br(e,"color",8,"currentColor"),l=br(e,"size",8,24),a=br(e,"strokeWidth",8,2),s=br(e,"absoluteStrokeWidth",8,!1),u=br(e,"iconNode",24,(()=>[]));rr();var c=$r();let d;var f=bt(c);mn(f,1,u,gn,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=on();n=wt(d),r=()=>ze(e)[0],o=(t,n)=>{let r;Ot((()=>r=Wn(t,r,{...ze(e)[1]})))},s=null,u=n,c=pn,At((()=>{const t=r()||null;if(t!==i){var e=pn;hn(c),a&&(null===t?Gt(a,(()=>{a=null,l=null})):t===l?Rt(a):(Dt(a),sn(!1))),t&&t!==l&&(a=Bt((()=>{if(tn(s=document.createElementNS("http://www.w3.org/2000/svg",t),s),o){var e=s.appendChild(gt());o(s,e)}se.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),sn(!0),hn(e)}}),L),ln(t,d)})),$n(xt(f),e,"default",{},null),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 Tr(t,{delay:e=0,duration:n=400,easing:r=Cr}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function zr(t,{delay:e=0,duration:n=400,easing:r=Sr,x:o=0,y:i=0,opacity:l=0}={}){const a=getComputedStyle(t),s=+a.opacity,u="none"===a.transform?"":a.transform,c=s*(1-l),[d,f]=Pr(o),[v,p]=Pr(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*d}${f}, ${(1-t)*v}${p});\n\t\t\topacity: ${s-c*e}`}}function 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(ze(ot),"$effect",r),a=lt(void 0,!0),s=lt(void 0,!0),u=lt(void 0,!0),c=lt(void 0,!0),d=lt(void 0,!0),f=lt(void 0,!0),v=lt(void 0,!0),p=lt(void 0,!0),h=lt(void 0,!0),g=lt(void 0,!0),m=lt(void 0,!0),y=lt(void 0,!0),b={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:w,heights:x,removeHeight:$,setHeight:k,remove:_}=Zr;let C=br(e,"toast",9),S=br(e,"index",9),M=br(e,"expanded",9),P=br(e,"invert",13),j=br(e,"position",9),z=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,ze(U)),$(C().id),setTimeout((()=>{_(C().id)}),200)}let et=lt(void 0,!0),nt=lt(C().duration||B()||4e3,!0);function rt(){Y=(new Date).getTime(),at(et,setTimeout((()=>{var t,e;null==(e=(t=C()).onAutoClose)||e.call(t,C()),tt()}),ze(nt)))}let ot=lt(void 0,!0);wr((()=>{at(q,!0);const t=ze(K).getBoundingClientRect().height;return at(V,t),k({toastId:C().id,height:t}),()=>$(C().id)})),It((()=>Oe(L())),(()=>{L({...b,...L()})})),It((()=>Oe(S())),(()=>{at(a,0===S())})),It((()=>(Oe(S()),Oe(z()))),(()=>{at(s,S()+1<=z())})),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(),ze(p))),(()=>{at(g,i().reduce(((t,e,n)=>n>=ze(p)?t:t+e.height),0))})),It((()=>(Oe(P()),Oe(C()))),(()=>{P(C().invert||P())})),It((()=>ze(d)),(()=>{at(m,"loading"===ze(d))})),It((()=>(ze(p),ze(g))),(()=>{at(U,Math.round(14*ze(p)+ze(g)))})),It((()=>(ze(u),ze(c))),(()=>{ze(u),ze(c),async function(){if(!ze(q))return;let t;await async function(){await Promise.resolve(),function(){for(Jt();oe.length>0;)Qt=!0,Me(),Jt()}()}(),t=M()||I()?1:1-.05*S(),ze(K).style.setProperty("height","auto");const e=ze(K).offsetHeight,n=ze(K).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;ze(K).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,at(V,o),k({toastId:C().id,height:o})}()})),It((()=>(Oe(C()),ze(et),Oe(B()))),(()=>{C().updated&&(clearTimeout(ze(et)),at(nt,C().duration||B()||4e3),rt())})),It((()=>(Oe(C()),ze(d))),(()=>{at(y,C().promise&&"loading"===ze(d)||C().duration===Number.POSITIVE_INFINITY)})),It((()=>(ze(y),Oe(M()),Oe(N()),ze(et))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=T)}(at(ot,(t=()=>(ze(y)||(M()||N()?function(){if(Z<Y){const t=(new Date).getTime()-Y;at(nt,ze(nt)-t)}Z=(new Date).getTime()}():rt()),()=>clearTimeout(ze(et))),{subscribe:t})),"$effect",r)})),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",ze(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=ze(m)?void 0:()=>{var t,e;tt(),null==(e=(t=C()).onDismiss)||e.call(t,C())})||e.apply(this,t)})),ln(t,e)};vn(ut,(t=>{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"!==ze(d)||C().icon||t(o)}));var i=xt(r,2),l=t=>{var e=on();kn(wt(e),(()=>C().icon),((t,e)=>{e(t,{})})),ln(t,e)},a=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"success-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"error-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"warning-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"info-icon",{},null),ln(t,n)};vn(t,(t=>{"info"===ze(d)&&t(r)}),n)};vn(t,(t=>{"warning"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"error"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"success"===ze(d)?t(r):t(o,!1)}),n)};vn(i,(t=>{C().icon?t(l):t(a,!1)})),ln(t,n)};vn(r,(t=>{("default"!==ze(d)||C().icon||C().promise)&&t(o)}));var i=xt(r,2),l=bt(i),a=t=>{var e=to(),n=bt(e),r=t=>{var e=on();kn(wt(e),(()=>C().title),((t,e)=>{e(t,mr((()=>C().componentProps)))})),ln(t,e)},o=t=>{var e=rn();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(),ze(v),null==(t=L())?void 0:t.description,null==(e=C().classes)?void 0:e.description))}],_t),ln(t,e)};vn(s,(t=>{C().description&&t(u)}));var c=xt(i,2),f=t=>{var e=no(),n=bt(e);Ot((t=>{zn(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=>{zn(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)),(()=>ze(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",ze(q)),Bn(it,"data-promise",e),Bn(it,"data-removed",ze(G)),Bn(it,"data-visible",ze(s)),Bn(it,"data-y-position",ze(h)[0]),Bn(it,"data-x-position",ze(h)[1]),Bn(it,"data-index",S()),Bn(it,"data-front",ze(a)),Bn(it,"data-swiping",ze(F)),Bn(it,"data-type",ze(d)),Bn(it,"data-invert",P()),Bn(it,"data-swipe-out",ze(H)),Bn(it,"data-expanded",o),st=zn(it,`${n.style} ${C().style}`,st,{"--index":S(),"--toasts-before":S(),"--z-index":dr(w,"$toasts",r).length-S(),"--offset":`${ze(G)?ze(R):ze(U)}px`,"--initial-height":`${ze(V)}px`})}),[()=>{var t,e,r,o,i,l;return Cn(Vr(n.class,ze(f),null==(t=L())?void 0:t.toast,null==(r=null==(e=C())?void 0:e.classes)?void 0:r.toast,null==(o=L())?void 0:o[ze(d)],null==(l=null==(i=C())?void 0:i.classes)?void 0:l[ze(d)]))},()=>Boolean(C().promise),()=>Boolean(M()||I()&&ze(q))],_t),Ze("pointerdown",it,(function(t){if(ze(m))return;at(R,ze(U));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(at(F,!0),J={x:t.clientX,y:t.clientY})})),Ze("pointerup",it,(function(){var t,e,n;if(ze(H))return;J=null;const r=Number((null==(t=ze(K))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return at(R,ze(U)),null==(n=(e=C()).onDismiss)||n.call(e,C()),tt(),void at(H,!0);ze(K).style.setProperty("--swipe-amount","0px"),at(F,!1)})),Ze("pointermove",it,(function(t){if(!J)return;const e=t.clientY-J.y,n=t.clientX-J.x,r=("top"===ze(h)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?ze(K).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(J=null)})),ln(t,it),Q(),o()}var ao=en("<ol></ol>"),so=en('<section class="svelte-1fo5d1m"></section>');function uo(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);X(e,!1);const[o,i]=vr(),l=()=>dr(C,"$toasts",o),a=lt(),s=lt(),u="dark",c="light";function d(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let f=br(e,"invert",8,!1),v=br(e,"theme",8,"light"),p=br(e,"position",8,"bottom-right"),h=br(e,"hotkey",24,(()=>["altKey","KeyT"])),g=br(e,"containerAriaLabel",8,"Notifications"),m=br(e,"richColors",8,!1),y=br(e,"expand",8,!1),b=br(e,"duration",8,4e3),w=br(e,"visibleToasts",8,3),x=br(e,"closeButton",8,!1),$=br(e,"toastOptions",24,(()=>({}))),k=br(e,"offset",8,null),_=br(e,"dir",24,d);const{toasts:C,heights:S,reset:M}=Zr;let P=lt(!1),j=lt(!1),T=lt("system"!==(N=v())?N:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),z=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)))}((()=>{ze(z)&&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=ze(z))||e.focus()),"Escape"!==t.code||document.activeElement!==ze(z)&&!(null==(n=ze(z))?void 0:n.contains(document.activeElement))||at(P,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),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(T,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?at(T,u):at(T,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{at(T,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,(()=>ze(a)),gn,((t,i,a,s)=>{var u=ao();let c;mn(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===ze(i)))),(t=>t.id),((t,n,r,o)=>{const l=_t((()=>{var t;return(null==(t=$())?void 0:t.actionButtonStyle)||""})),a=_t((()=>{var t;return(null==(t=$())?void 0:t.cancelButtonStyle)||""})),s=_t((()=>{var t;return(null==(t=$())?void 0:t.class)||""})),u=_t((()=>{var t;return(null==(t=$())?void 0:t.descriptionClass)||""})),c=_t((()=>$().classes||{})),d=_t((()=>{var t;return(null==(t=$())?void 0:t.duration)??b()})),v=_t((()=>$().unstyled||!1));lo(t,{get index(){return ze(r)},get toast(){return ze(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return ze(j)},get position(){return ze(i)},get expandByDefault(){return y()},get expanded(){return ze(P)},get actionButtonStyle(){return ze(l)},get cancelButtonStyle(){return ze(a)},get class(){return ze(s)},get descriptionClass(){return ze(u)},get classes(){return ze(c)},get duration(){return ze(d)},get unstyled(){return ze(v)},$$slots:{"loading-icon":(t,r)=>{var o=on();$n(wt(o),e,"loading-icon",{},(t=>{const e=_t((()=>"loading"===ze(n).type));!function(t,e){X(e,!1);let n=br(e,"visible",8);const r=Array(12).fill(0);rr();var o=Rr();mn(bt(o),5,(()=>r),gn,((t,e)=>{ln(t,Hr())})),Ot((()=>Bn(o,"data-visible",n()))),ln(t,o),Q()}(t,{get visible(){return ze(e)}})})),ln(t,o)},"success-icon":(t,n)=>{var r=on();$n(wt(r),e,"success-icon",{},(t=>{Fr(t,{type:"success"})})),ln(t,r)},"error-icon":(t,n)=>{var r=on();$n(wt(r),e,"error-icon",{},(t=>{Fr(t,{type:"error"})})),ln(t,r)},"warning-icon":(t,n)=>{var r=on();$n(wt(r),e,"warning-icon",{},(t=>{Fr(t,{type:"warning"})})),ln(t,r)},"info-icon":(t,n)=>{var r=on();$n(wt(r),e,"info-icon",{},(t=>{Fr(t,{type:"info"})})),ln(t,r)}}})})),nr(u,(t=>at(z,t)),(()=>ze(z))),Ot(((t,e,i)=>{var l;c=Wn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":ze(T),"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():_(),()=>ze(i).split("-")[0],()=>ze(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,(()=>{ze(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()} ${ze(s)}`))),ln(t,i)};vn(W,(t=>{l().length>0&&t(L)})),ln(t,B),Q(),i()}const co=new(s=class{constructor(){g(this,l),this.baseUrl="https://api.playlight.dev/platform",this.cachedCategories=null,this.currentGame=null}async request(t,e={}){try{const n=`${this.baseUrl}${t}`,r=await fetch(n,{...e,headers:{"Content-Type":"application/json",...e.headers}});if(!r.ok){let t;try{t=await r.json()}catch{}finally{if(429!==r.status&&404!==r.status)throw new Error(`API request failed: ${(null==t?void 0:t.error)||(null==t?void 0:t.message)||r.status}`);return 429===r.status?console.warn("Playlight request didn't go through due to rate limiting."):console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.")}}return await r.json()}catch(n){Jr.error("Error: "+n),console.error("Playlight API error:",n)}}async getCategories(){if(this.cachedCategories)return this.cachedCategories;const t=await this.request("/categories");return this.cachedCategories=t,t}async getSuggestions(t=null,e=1){let n="/suggestions";return t&&(n+="/"+t),e&&(n+="?page="+e),n+="&without="+y(this,l,a).call(this),await this.request(n)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+y(this,l,a).call(this);return this.currentGame=await this.request(t),this.currentGame?{...this.currentGame}:void 0}async trackOpen(){const t=y(this,l,a).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=y(this,l,a).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},l=new WeakSet,a=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},s);var fo=en('<div><p class="font-bold text-white uppercase"> </p></div>');function vo(t,e){let n=br(e,"isHovered",3,!1);var r=fo();let o;var i=bt(r),l=bt(i);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)=>{!ze(e)||ze(n)?(co.trackClick(o.game.id),window.open("https://"+o.game.domain+"?utm_source=playlight","_blank","noopener")):r()},ho=en('<video playsinline="" loop preload="auto"></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" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');function bo(t,e){X(e,!0);const[n,r]=vr();let o,i=br(e,"compact",3,!1),l=it(!1),a=it(!1),s=it(void 0),u=it(!1),c=it(!1),d=it(!1),f=it(!1),v=it(void 0);function p(){ze(l)||ze(f)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(dr(Wr,"$projectUrl",n)+"/static/sounds/hover-selection.ogg",.25),at(l,!0),clearTimeout(o),o=setTimeout((()=>at(a,!0)),300),ze(s)&&e.game.cover_video_url&&ze(s).play().catch((t=>console.error("Video play error:",t)))}function h(){ze(s)&&ze(u)&&ze(s).pause(),at(l,!1),clearTimeout(o),at(a,!1)}var g=yo();Ze("touchstart",ft,(t=>{ze(v)&&!ze(v).contains(t.target)&&h()}),void 0,!0),Ze("pointerdown",ft,(t=>at(f,"touch"===t.pointerType))),Ze("pointermove",ft,(t=>at(f,"touch"===t.pointerType))),g.__click=[po,f,a,p,e];var m=bt(g),y=t=>{vo(t,{get isHovered(){return ze(l)},text:"Featured"})},b=(t,n)=>{var r=t=>{vo(t,{get isHovered(){return ze(l)},text:"New"})};vn(t,(t=>{var n;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(n=e.game)?void 0:n.created_at)&&t(r)}),n)};vn(m,(t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)}));var w=xt(m,2),x=t=>{var n=ho();let r;n.muted=!0,nr(n,(t=>at(s,t)),(()=>ze(s))),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":ze(l)&&ze(u)&&e.game.cover_video_url})]),Ze("loadeddata",n,(()=>{at(u,!0)})),ln(t,n)};vn(w,(t=>{e.game.cover_video_url&&t(x)}));var $=xt(w,2);let k;var _=xt($,2),C=t=>{var n=mo(),r=bt(n),o=bt(r),i=bt(o),l=bt(xt(o,2)),a=xt(r,2),s=t=>{var e=go();!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"info"},(()=>n),{iconNode:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:15}),ln(t,e)};vn(a,(t=>{ze(f)&&t(s)}));var u=xt(a,2);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 ${(ze(f)?"bottom-7":"bottom-0")??""} left-0 h-8`,"svelte-o63m4o")})),Un(3,n,(()=>Ir)),ln(t,n)};vn(_,(t=>{ze(l)&&t(C)}));var S=xt(_,2);let M;nr(g,(t=>at(v,t)),(()=>ze(v))),Ot(((t,n)=>{jn(g,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(ze(c)?"":"animate-pulse")??""} ${(i()?"min-h-62":"min-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 shadow-xl transition group-hover:outline-2 svelte-o63m4o",null,M,n)}),[()=>({"opacity-100":ze(c)&&(!ze(l)||!ze(u)||!e.game.cover_video_url)}),()=>({"opacity-100":ze(d)})]),Ze("mouseenter",g,p),Ze("mouseleave",g,h),Ze("load",$,(()=>{at(c,!0)})),Ze("load",S,(()=>{at(d,!0)})),ln(t,g),Q(),r()}function wo(t){const e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}function xo(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function $o(t){const e=t-1;return e*e*e+1}function ko(t){return Math.sin(t*Math.PI/2)}function _o(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=$o}=r,a=getComputedStyle(t),s="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,c/=t.clientHeight;var d=function(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;null!==e;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}(t),f=t.clientWidth/n.width/d,v=t.clientHeight/n.height/d,p=e.left+e.width*u,h=e.top+e.height*c,g=n.left+n.width*u,m=n.top+n.height*c,y=(p-g)*f,b=(h-m)*v,w=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(y*y+b*b)):i,easing:l,css:(t,e)=>`transform: ${s} translate(${e*y}px, ${e*b}px) scale(${t+e*w}, ${t+e*x});`}}Je(["click"]);var Co=(t,e,n)=>{at(e,""),at(n,!ze(n))},So=en('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),Mo=en('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),Po=(t,e,n,r,o)=>{var i;e(n),at(r,!1),null==(i=o.onCategoryChange)||i.call(o)},jo=en("<button> </button>"),To=en('<div class="space-y-1 p-1"></div>'),zo=en('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),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((()=>ze(a)?r().filter((t=>t.toLowerCase().includes(ze(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=it(et(c[0]));wr((()=>{at(d,c[Math.floor(Math.random()*(null==c?void 0:c.length))],!0)}));var f=Io();Ze("click",ft,(t=>{var e;!ze(s)||(null==(e=ze(s))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||at(i,!1)}));var v=bt(f),p=bt(v),h=bt(p),g=xt(p,2);g.__click=[Co,a,i];var m=bt(g),y=bt(m),b=xt(m,2);const w=kt((()=>ze(i)?"rotate-180 transform":""));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(b,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${ze(w)??""} transition-transform duration-200`}}),nr(g,(t=>n=t),(()=>n));var x=xt(v,2),$=t=>{var n=zo(),l=bt(n),c=bt(l),d=bt(c);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=xt(d,2),v=bt(xt(l,2)),p=t=>{ln(t,So())},h=(t,n)=>{var r=t=>{ln(t,Mo())},l=t=>{var n=To();mn(n,28,(()=>ze(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===ze(u).length?t(r):t(l,!1)}),n)};vn(v,(t=>{0===r().length?t(p):t(h,!1)})),nr(n,(t=>at(s,t)),(()=>ze(s))),function(t,e,n=e){var r=tt();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ve(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),Re||(Re=!0,document.addEventListener("reset",(t=>{Promise.resolve().then((()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)null==(e=n.__on_r)||e.call(n)}))}),{capture:!0}))})(t,"input",(o=>{var i=o?t.defaultValue:t.value;if(i=Zn(t)?Jn(i):i,n(i),r&&i!==(i=e())){var l=t.selectionStart,a=t.selectionEnd;t.value=i??"",null!==a&&(t.selectionStart=l,t.selectionEnd=Math.min(a,t.value.length))}})),null==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,(()=>ze(a)),(t=>at(a,t))),Un(1,n,(()=>Tr),(()=>({duration:150,easing:ko}))),Un(2,n,(()=>Tr),(()=>({duration:200,easing:ko}))),ln(t,n)};vn(x,(t=>{ze(i)&&t($)})),Ot((()=>{un(h,ze(d)),un(y,ze(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-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><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=!ze(n);fr(Br,i),at(n,!ze(n)),i?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await co.toggleLike(e.currentGame.id,i)||fr(Br,!i)}var Bo=en('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="max-w-2/3 truncate text-lg font-bold text-white"> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>'),Wo=en('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),Lo=en("<!> <!>",1);function Do(t,e){t.target===t.currentTarget&&fr(Ar,!1)}Je(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","click"]);var qo=(t,e)=>fr(Ar,!1),Go=en('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Fo=en('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'),Ho=en("<!> <!>",1),Ro=en('<div class="flex h-30 items-center"><!></div>'),Vo=en('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex min-h-10 w-full justify-center"><!></div></div>'),Ko=en('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 max-sm:w-40"> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-44gflq"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');function Uo(t,e){X(e,!0);const[n,r]=vr(),o=()=>dr(Ar,"$discoveryOpen",n);let i,l=it(!0),a=it(!1),s=it(void 0),u=it(et([])),c=it(void 0),d=it(et([])),f=it(1),v=it(!0),p=it(!1),h=it(void 0),g=it(void 0);async function m(){var t,e;at(d,[],!0),at(f,1),at(v,!0),at(p,!1),(null==(t=ze(s))?void 0:t.featured_game)&&ze(c)==(null==(e=ze(s))?void 0:e.category)&&ze(d).push({...ze(s).featured_game,featured:!0}),await y()}async function y(){if(ze(l)||ze(a))return;1===ze(f)?at(l,!0):at(a,!0);const t=ze(p)?null:ze(c),e=await co.getSuggestions(t,ze(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter((t=>!ze(d).some((e=>e.id===t.id))));at(d,[...ze(d),...o],!0),n.length<r?!ze(p)&&ze(c)?(at(p,!0),at(f,1)):at(v,!1):at(f,ze(f)+1),at(l,!1),at(a,!1),ze(v)&&ze(h)&&ze(h).getBoundingClientRect().bottom<=window.innerHeight+300&&y()}wr((()=>(i=new IntersectionObserver((t=>{t[0].isIntersecting&&ze(v)&&y()}),{rootMargin:"300px",root:ze(g)}),()=>null==i?void 0:i.disconnect()))),Tt((()=>{ze(h)&&i&&i.observe(ze(h))})),wr((async()=>{var t,e,n;at(s,await co.getCurrentGameInfo(),!0),at(u,await co.getCategories(),!0),at(c,(null==(t=ze(s))?void 0:t.category)||(null==(n=ze(u))?void 0:n[(null==(e=ze(u))?void 0:e.length)-1]),!0),at(l,!1),await m()}));var b=Ko();Ze("keydown",ft,(t=>{"Escape"==t.key&&fr(Ar,!1)})),b.__click=[Do,o];var w=bt(b),x=bt(w),$=bt(xt(x,2));$.__click=[qo,o],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt($),{size:24,strokeWidth:2.5});var k=xt(w,2);Eo(bt(k),{get categories(){return ze(u)},onCategoryChange:m,get selectedCategory(){return ze(c)},set selectedCategory(t){at(c,t,!0)}});var _=xt(k,2);!function(t,e){var n;X(e,!0);const[r,o]=vr(),i=()=>dr(Br,"$likedInThisSession",r);let l=it(!1),a=it(!0),s=it(!1),u=it(0),c=it(1),d=it(!1),f=it(!1),v=it(et((null==(n=e.currentGame)?void 0:n.likes)||0)),p=0;function h(t){at(d,!0),p=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function g(t){if(!ze(d))return;const e=t.type.includes("touch")?t.touches[0].clientY:t.clientY,n=Math.max(0,e-p);at(u,n,!0),at(c,Math.max(0,1-n/150),!0),n>40&&(at(d,!1),y(ze(u),250,250,((t,e,n)=>{at(u,t+(e-t)*n),at(c,Math.max(0,1-1.5*n),!0),1===n&&(at(a,!1),at(s,!0))})))}function m(){ze(d)&&(at(d,!1),ze(u)<40&&y(ze(u),0,250,((t,e,n)=>{at(u,t*(1-n)),at(c,1)})))}function y(t,e,n,r){const o=Date.now();!function i(){const l=Math.min((Date.now()-o)/n,1);r(t,e,l),l<1&&requestAnimationFrame(i)}()}Tt((()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(at(f,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),at(v,(null==(n=e.currentGame)?void 0:n.likes)||0,!0))}));var b=Lo(),w=wt(b),x=t=>{var n=Bo();n.__mousedown=h,n.__mousemove=g,n.__mouseup=m,n.__touchstart=h,n.__touchmove=g,n.__touchend=m;var r=xt(bt(n),2),o=bt(r);let a;var s=xt(o,2),d=bt(s),p=bt(xt(s,2)),y=bt(p),b=xt(p,2);b.__click=[Ao,e,f,i];var w=bt(b);const x=kt((()=>ze(f)?"currentColor":"none"));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"thumbs-up"},(()=>n),{iconNode:[["path",{d:"M7 10v12"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return ze(x)},style:"margin-top: -5px;"}),Ot((t=>{var r,l;zn(n,`transform: translateY(${ze(u)??""}px); opacity: ${ze(c)??""}; cursor: grab;`),Bn(o,"src",null==(r=e.currentGame)?void 0:r.logo_url),a=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()?ze(v)+1:ze(v)),zn(b,`color: ${(ze(f)?"white !important":"")??""};`),Bn(b,"aria-label",ze(f)?"Unlike game":"Like game")}),[()=>({"animate-pulse":!ze(l)})]),Ze("mouseleave",n,m),Ze("load",o,(()=>{at(l,!0)})),ln(t,n)};vn(w,(t=>{e.currentGame&&ze(a)&&t(x)}));var $=xt(w,2),k=t=>{var e=Wo(),n=bt(e);n.__mousedown=[Oo,s,a,u,c,y],n.__touchstart=[Oo,s,a,u,c,y],Un(3,n,(()=>zr),(()=>({delay:150,y:30}))),ln(t,e)};vn($,(t=>{e.currentGame&&ze(s)&&t(k)})),ln(t,b),Q(),o()}(_,{get currentGame(){return ze(s)}});var C=xt(_,2);C.__click=[Do,o];var S=bt(C),M=t=>{var e=Go();_r(bt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),ln(t,e)},P=(t,e)=>{var n=t=>{ln(t,Fo())},r=t=>{var e=Vo(),n=bt(e);mn(n,17,(()=>ze(d)),gn,((t,e,n)=>{var r=Ho();const o=kt((()=>ze(d).findIndex((t=>t.category!==ze(c)&&!t.featured))));var i=wt(r),l=t=>{ln(t,No())};vn(i,(t=>{n==ze(o)&&t(l)})),bo(xt(i,2),{get game(){return ze(e)}}),ln(t,r)}));var r=xt(n,2),o=bt(r),i=t=>{var e=Ro();_r(bt(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),ln(t,e)};vn(o,(t=>{ze(a)&&t(i)})),nr(r,(t=>at(h,t)),(()=>ze(h))),ln(t,e)};vn(t,(t=>{0!==ze(d).length||ze(l)?t(r,!1):t(n)}),e)};vn(S,(t=>{ze(l)&&0===ze(d).length?t(M):t(P,!1)})),nr(C,(t=>at(g,t)),(()=>ze(g)));var 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=T;At((()=>{i!==(i=e())&&(r&&(Dt(r),r=null),r=Bt((()=>i(o,...n))))}),L)}(bt(n),(()=>e.children??T)),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 ze(c)},get visible(){return ze(d)},onClick:l});var f=xt(u,2),v=t=>{Uo(t,{})};vn(f,(t=>{o()&&t(v)}));var p=xt(f,2);const h=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled})),g=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.immediate}));!function(t,e){X(e,!0);let n,r=br(e,"enabled",3,!0),o=br(e,"immediate",3,!1),i=it(void 0),l=it(void 0),a=it(!1),s=it(void 0);function u(){setTimeout((()=>{var t;n<Date.now()-50&&(clearTimeout(ze(s)),at(s,null),o()?null==(t=e.onIntent)||t.call(e):(async function(){const t=await co.getCategories(),e=await co.getCurrentGameInfo();ze(d)||at(d,(null==e?void 0:e.category)||(null==t?void 0:t[(null==t?void 0:t.length)-1]),!0);let n=await co.getSuggestions(ze(d),1);at(f,((null==n?void 0:n.games)||[]).slice(0,3),!0)}(),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=ze(i))?void 0:e.contains(t.target))||(null==(o=ze(l))?void 0:o.contains(t.target))||(!ze(s)&&ze(a)&&at(s,setTimeout((()=>at(a,!1)),1500),!0),n=Date.now())}));var p=wt(v),h=t=>{var e=Xo();e.__pointerover=[Jo,u],nr(e,(t=>at(i,t)),(()=>ze(i))),ln(t,e)};vn(p,(t=>{r()&&t(h)}));var g=xt(p,2),m=t=>{var n=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,(()=>ze(f)),gn,((t,e,n)=>{var r=Qo();let o;var i=bt(r);Ot((()=>{o=zn(r,"",o,{"z-index":ze(f).length-n}),Bn(i,"src",ze(e).logo_url)})),ln(t,r)})),Un(3,e,(()=>Ir),(()=>({axis:"x",duration:150}))),ln(t,e)};vn(r,(t=>{var e;(null==(e=ze(f))?void 0:e.length)>=3&&t(o)})),ln(t,n)}}),nr(n,(t=>at(l,t)),(()=>ze(l))),Ot((t=>un(o,t)),[()=>c[Math.floor(Math.random()*c.length)]]),Ze("mouseenter",n,(()=>{clearTimeout(ze(s)),at(s,null)})),Un(3,n,(()=>zr),(()=>({y:-100,easing:xo,duration:500}))),ln(t,n)};vn(g,(t=>{ze(a)&&t(m)})),ln(t,v),Q()}(p,{get enabled(){return ze(h)},get immediate(){return ze(g)},onIntent:l});var m=xt(p,2),y=t=>{uo(t,{})};vn(m,(t=>{o()&&t(y)})),ln(t,s),Q(),r()}const 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)=>ze(e).scrollBy({left:2*-ze(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)=>ze(e).scrollBy({left:2*ze(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(ze(l),1),e=(null==t?void 0:t.games)||[];if(e.length<10&&ze(l)){const t=await co.getSuggestions(null,1),n=((null==t?void 0:t.games)||[]).filter((t=>!e.some((e=>e.id===t.id))));e=[...e,...n]}at(i,e.slice(0,10),!0),at(o,!1)}(),ze(a)){const t=ze(a).scrollWidth-ze(a).clientWidth;f(ze(a).scrollLeft,t-ze(a).scrollLeft)}}));var v=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,(()=>ze(i)),gn,((t,e)=>{var n,r,o,i,l=fi();bo(bt(l),{get game(){return ze(e)},compact:!0}),n=l,r="clientWidth",o=t=>at(s,t),i=tr.observe(n,(()=>o(n[r]))),zt((()=>(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=>{ze(o)?t(g):t(m,!1)})),nr(p,(t=>at(a,t)),(()=>ze(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=>{ze(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=>{ze(c)&&t(i)})),ln(t,e)};vn(y,(t=>{ze(i).length>0&&t(b)})),Ot((()=>zn(p,ze(d)))),Ze("scroll",p,(t=>{const e=t.target;at(u,e.scrollLeft>20),at(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),f(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)})),ln(t,v),Q(),r()}function 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}();
|
|
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}();
|
|
23
23
|
//# sourceMappingURL=playlight-sdk.iife.js.map
|