playlight-sdk 0.0.6 → 0.0.7
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=Array.isArray,e=Array.prototype.indexOf,n=Array.from,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,l=Object.prototype,a=Array.prototype,s=Object.getPrototypeOf;function u(t){return"function"==typeof t}const c=()=>{};function d(t){return t()}function f(t){for(var e=0;e<t.length;e++)t[e]()}const v=256,p=1024,h=2048,g=4096,m=8192,y=16384,b=65536,w=Symbol("$state"),x=Symbol("legacy props"),_=Symbol("");function $(t){return t===this.v}function k(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function C(t){return!k(t,this.v)}let S=!1;const P=Symbol(),I="http://www.w3.org/2000/svg";function M(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let j=null;function E(t){j=t}function N(t,e=!1,n){j={p:j,c:null,e:null,m:!1,s:t,x:null,l:null},S&&!e&&(j.l={s:null,u:null,r1:[],r2:B(!1)})}function O(t){const e=j;if(null!==e){const t=e.e;if(null!==t){var n=Ft,r=qt;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];Rt(i.effect),Wt(i.reaction),dt(i.fn)}}finally{Rt(n),Wt(r)}}j=e.p,e.m=!0}return{}}function T(){return!S||null!==j&&null===j.l}function B(t,e){return{f:0,v:t,reactions:null,equals:$,rv:0,wv:0}}function z(t){return q(B(t))}function A(t,e=!1){var n;const r=B(t);return e||(r.equals=C),S&&null!==j&&null!==j.l&&((n=j.l).s??(n.s=[])).push(r),r}function D(t,e=!1){return q(A(t,e))}function q(t){return null!==qt&&!Lt&&2&qt.f&&(null===Ht?Ht=[t]:Ht.push(t)),t}function L(t,e){return null!==qt&&!Lt&&T()&&18&qt.f&&(null===Ht||!Ht.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),W(t,e)}function W(t,e){return t.equals(e)||(t.v,t.v=e,t.wv=Jt(),R(t,h),T()&&null!==Ft&&Ft.f&p&&!(96&Ft.f)&&(null===Kt?Kt=[t]:Kt.push(t))),e}function F(t,e=1){var n=ce(t),r=1===e?n++:n--;return L(t,n),r}function R(t,e){var n=t.reactions;if(null!==n)for(var r=T(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&h||(r||l!==Ft)&&(ve(l,e),1280&a&&(2&a?R(l,g):se(l)))}}function H(e,n=null,r){if("object"!=typeof e||null===e||w in e)return e;const i=s(e);if(i!==l&&i!==a)return e;var u,c=new Map,d=t(e),f=B(0);return d&&c.set("length",B(e.length)),new Proxy(e,{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 r=c.get(e);return void 0===r?(r=B(n.value),c.set(e,r)):L(r,H(n.value,u)),!0},deleteProperty(t,e){var n=c.get(e);if(void 0===n)e in t&&c.set(e,B(P));else{if(d&&"string"==typeof e){var r=c.get("length"),o=Number(e);Number.isInteger(o)&&o<r.v&&L(r,o)}L(n,P),V(f)}return!0},get(t,n,r){var i;if(n===w)return e;var l=c.get(n),a=n in t;if(void 0!==l||a&&!(null==(i=o(t,n))?void 0:i.writable)||(l=B(H(a?t[n]:P,u)),c.set(n,l)),void 0!==l){var s=ce(l);return s===P?void 0:s}return Reflect.get(t,n,r)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var r=c.get(e);r&&(n.value=ce(r))}else if(void 0===n){var o=c.get(e),i=null==o?void 0:o.v;if(void 0!==o&&i!==P)return{enumerable:!0,configurable:!0,value:i,writable:!0}}return n},has(t,e){var n;if(e===w)return!0;var r=c.get(e),i=void 0!==r&&r.v!==P||Reflect.has(t,e);return!((void 0!==r||null!==Ft&&(!i||(null==(n=o(t,e))?void 0:n.writable)))&&(void 0===r&&(r=B(i?H(t[e],u):P),c.set(e,r)),ce(r)===P))&&i},set(t,e,n,r){var i,l=c.get(e),a=e in t;if(d&&"length"===e)for(var s=n;s<l.v;s+=1){var v=c.get(s+"");void 0!==v?L(v,P):s in t&&(v=B(P),c.set(s+"",v))}void 0===l?a&&!(null==(i=o(t,e))?void 0:i.writable)||(L(l=B(void 0),H(n,u)),c.set(e,l)):(a=l.v!==P,L(l,H(n,u)));var p=Reflect.getOwnPropertyDescriptor(t,e);if((null==p?void 0:p.set)&&p.set.call(r,n),!a){if(d&&"string"==typeof e){var h=c.get("length"),g=Number(e);Number.isInteger(g)&&g>=h.v&&L(h,g+1)}V(f)}return!0},ownKeys(t){ce(f);var e=Reflect.ownKeys(t).filter((t=>{var e=c.get(t);return void 0===e||e.v!==P}));for(var[n,r]of c)r.v===P||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function V(t,e=1){L(t,t.v+e)}var G,K,U,Z,Y;function J(t=""){return document.createTextNode(t)}function X(t){return Z.call(t)}function Q(t){return Y.call(t)}function tt(t,e){return X(t)}function et(t,e){var n=X(t);return n instanceof Comment&&""===n.data?Q(n):n}function nt(t,e=1,n=!1){let r=t;for(;e--;)r=Q(r);return r}function rt(t){var e=2050,n=null!==qt&&2&qt.f?qt:null;return null===Ft||null!==n&&n.f&v?e|=v:Ft.f|=1048576,{ctx:j,deps:null,effects:null,equals:$,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??Ft}}function ot(t){const e=rt(t);return e.equals=C,e}function it(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)wt(e[n])}}function lt(t){var e=function(t){var e,n=Ft;Rt(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{it(t),e=ee(t)}finally{Rt(n)}return e}(t);ve(t,(Yt||t.f&v)&&null!==t.deps?g:p),t.equals(e)||(t.v=e,t.wv=Jt())}function at(t){null===Ft&&null===qt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==qt&&qt.f&v&&null===Ft&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),zt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function st(t,e,n,r=!0){var o,i,l,a=!!(64&t),s=Ft,u={ctx:j,deps:null,nodes_start:null,nodes_end:null,f:t|h,first:null,fn:e,last:null,next:null,parent:a?null:s,prev:null,teardown:null,transitions:null,wv:0};if(n)try{oe(u),u.f|=32768}catch(o){throw wt(u),o}else null!==e&&se(u);if((!n||null!==u.deps||null!==u.first||null!==u.nodes_start||null!==u.teardown||1048704&u.f)&&!a&&r&&(null!==s&&(o=u,null===(l=(i=s).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==qt&&2&qt.f)){var c=qt;(c.effects??(c.effects=[])).push(u)}return u}function ut(t){const e=st(8,null,!1);return ve(e,p),e.teardown=t,e}function ct(t){if(at(),!(null!==Ft&&32&Ft.f&&null!==j)||j.m)return dt(t);var e=j;(e.e??(e.e=[])).push({fn:t,effect:Ft,reaction:qt})}function dt(t){return st(4,t,!1)}function ft(t,e){var n=j,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=pt((()=>{t(),r.ran||(r.ran=!0,L(n.l.r2,!0),de(e))}))}function vt(){var t=j;pt((()=>{if(ce(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&p&&ve(n,g),Xt(n)&&oe(n),e.ran=!1}t.l.r2.v=!1}}))}function pt(t){return st(8,t,!0)}function ht(t,e=[],n=rt){const r=e.map(n);return gt((()=>t(...r.map(ce))))}function gt(t,e=0){return st(24|e,t,!0)}function mt(t,e=!0){return st(40,t,!0,e)}function yt(t){var e=t.teardown;if(null!==e){const t=zt,n=qt;At(!0),Wt(null);try{e.call(null)}finally{At(t),Wt(n)}}}function bt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;wt(n,e),n=r}}function wt(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:Q(r);r.remove(),r=i}n=!0}bt(t,e&&!n),re(t,0),ve(t,y);var l=t.transitions;if(null!==l)for(const s of l)s.stop();yt(t);var a=t.parent;null!==a&&null!==a.first&&xt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function xt(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 _t(t,e){var n=[];kt(t,n,!0),$t(n,(()=>{wt(t),e&&e()}))}function $t(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function kt(t,e,n){if(!(t.f&m)){if(t.f^=m,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;kt(r,e,!!(r.f&b||32&r.f)&&n),r=o}}}function Ct(t){St(t,!0)}function St(t,e){if(t.f&m){t.f^=m,t.f&p||(t.f^=p),Xt(t)&&(ve(t,h),se(t));for(var n=t.first;null!==n;){var r=n.next;St(n,!!(n.f&b||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let Pt=[],It=[];function Mt(){var t=Pt;Pt=[],f(t)}function jt(t){0===Pt.length&&queueMicrotask(Mt),Pt.push(t)}function Et(){var t;Pt.length>0&&Mt(),It.length>0&&(t=It,It=[],f(t))}let Nt=!1,Ot=!1,Tt=null,Bt=!1,zt=!1;function At(t){zt=t}let Dt=[],qt=null,Lt=!1;function Wt(t){qt=t}let Ft=null;function Rt(t){Ft=t}let Ht=null,Vt=null,Gt=0,Kt=null,Ut=1,Zt=0,Yt=!1;function Jt(){return++Ut}function Xt(t){var e,n=t.f;if(n&h)return!0;if(n&g){var r=t.deps,o=!!(n&v);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==Ft&&!Yt,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&v||(c.f^=v)}for(i=0;i<u;i++)if(Xt(l=r[i])&<(l),l.wv>t.wv)return!0}o&&(null===Ft||Yt)||ve(t,p)}return!1}function Qt(t,e,n,r){if(Nt){if(null===n&&(Nt=!1),!((o=e).f&y||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(Nt=!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 Nt=!1,t}(t,e);var o}function te(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];2&i.f?te(i,e,!1):e===i&&(n?ve(i,h):i.f&p&&ve(i,g),se(i))}}function ee(t){var e,n=Vt,r=Gt,o=Kt,i=qt,l=Yt,a=Ht,s=j,u=Lt,c=t.f;Vt=null,Gt=0,Kt=null,Yt=!!(c&v)&&(Lt||!Bt||null===qt),qt=96&c?null:t,Ht=null,E(t.ctx),Lt=!1,Zt++;try{var d=(0,t.fn)(),f=t.deps;if(null!==Vt){var p;if(re(t,Gt),null!==f&&Gt>0)for(f.length=Gt+Vt.length,p=0;p<Vt.length;p++)f[Gt+p]=Vt[p];else t.deps=f=Vt;if(!Yt)for(p=Gt;p<f.length;p++)((e=f[p]).reactions??(e.reactions=[])).push(t)}else null!==f&&Gt<f.length&&(re(t,Gt),f.length=Gt);if(T()&&null!==Kt&&!Lt&&null!==f&&!(6146&t.f))for(p=0;p<Kt.length;p++)te(Kt[p],t);return null!==i&&Zt++,d}finally{Vt=n,Gt=r,Kt=o,qt=i,Yt=l,Ht=a,E(s),Lt=u}}function ne(t,n){let r=n.reactions;if(null!==r){var o=e.call(r,t);if(-1!==o){var i=r.length-1;0===i?r=n.reactions=null:(r[o]=r[i],r.pop())}}null===r&&2&n.f&&(null===Vt||!Vt.includes(n))&&(ve(n,g),768&n.f||(n.f^=512),it(n),re(n,0))}function re(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)ne(t,n[r])}function oe(t){var e=t.f;if(!(e&y)){ve(t,p);var n=Ft,r=j,o=Bt;Ft=t,Bt=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||wt(e),e=n}}(t):bt(t),yt(t);var i=ee(t);t.teardown="function"==typeof i?i:null,t.wv=Ut,t.deps}catch(l){Qt(l,t,n,r||t.ctx)}finally{Bt=o,Ft=n}}}function ie(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===Tt)throw t;Qt(t,Tt,null)}}function le(){try{for(var t=0;Dt.length>0;){t++>1e3&&ie();var e=Dt,n=e.length;Dt=[];for(var r=0;r<n;r++){var o=e[r];o.f&p||(o.f^=p),ae(ue(o))}}}finally{Ot=!1,Tt=null}}function ae(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{Xt(r)&&(oe(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?xt(r):r.fn=null))}catch(o){Qt(o,r,null,r.ctx)}}}function se(t){Ot||(Ot=!0,queueMicrotask(le));for(var e=Tt=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&p))return;e.f^=p}}Dt.push(e)}function ue(t){for(var e=[],n=t.first;null!==n;){var r=n.f,o=!!(32&r);if(!(o&&r&p||r&m)){if(4&r)e.push(n);else if(o)n.f^=p;else{var i=qt;try{qt=n,Xt(n)&&oe(n)}catch(s){Qt(s,n,null,n.ctx)}finally{qt=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 ce(t){var e=!!(2&t.f);if(null===qt||Lt){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&v||(n.f^=v)}}else{null!==Ht&&Ht.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}();var o=qt.deps;t.rv<Zt&&(t.rv=Zt,null===Vt&&null!==o&&o[Gt]===t?Gt++:null===Vt?Vt=[t]:Yt&&Vt.includes(t)||Vt.push(t))}return e&&Xt(n=t)&<(n),t.v}function de(t){var e=Lt;try{return Lt=!0,t()}finally{Lt=e}}const fe=-7169;function ve(t,e){t.f=t.f&fe|e}function pe(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(w in t)he(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&w in n&&he(n)}}function he(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{he(t[o],e)}catch(n){}const r=s(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=i(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function ge(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const me=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ye(t){return me.includes(t)}const be={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 we(t){return t=t.toLowerCase(),be[t]??t}const xe=["touchstart","touchmove"];function _e(t){return xe.includes(t)}function $e(t,e){if(e){const e=document.body;t.autofocus=!0,jt((()=>{document.activeElement===e&&t.focus()}))}}let ke=!1;function Ce(t){var e=qt,n=Ft;Wt(null),Rt(null);try{return t()}finally{Wt(e),Rt(n)}}const Se=new Set,Pe=new Set;function Ie(t,e,n,r={}){function o(t){if(r.capture||Ee.call(e,t),!t.cancelBubble)return Ce((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?jt((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Me(t,e,n,r,o){var i={capture:r,passive:o},l=Ie(t,e,n,i);e!==document.body&&e!==window&&e!==document||ut((()=>{e.removeEventListener(t,l,i)}))}function je(t){for(var e=0;e<t.length;e++)Se.add(t[e]);for(var n of Pe)n(t)}function Ee(e){var n,o=this,i=o.ownerDocument,l=e.type,a=(null==(n=e.composedPath)?void 0:n.call(e))||[],s=a[0]||e.target,u=0,c=e.__root;if(c){var d=a.indexOf(c);if(-1!==d&&(o===document||o===window))return void(e.__root=o);var f=a.indexOf(o);if(-1===f)return;d<=f&&(u=d)}if((s=a[u]||e.target)!==o){r(e,"currentTarget",{configurable:!0,get:()=>s||i});var v=qt,p=Ft;Wt(null),Rt(null);try{for(var h,g=[];null!==s;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+l];if(void 0!==y&&(!s.disabled||e.target===s))if(t(y)){var[b,...w]=y;b.apply(s,[e,...w])}else y.call(s,e)}catch(x){h?g.push(x):h=x}if(e.cancelBubble||m===o||null===m)break;s=m}if(h){for(let t of g)queueMicrotask((()=>{throw t}));throw h}}finally{e.__root=o,delete e.currentTarget,Wt(v),Rt(p)}}}function Ne(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function Oe(t,e){var n=Ft;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Te(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ne(i?t:"<!>"+t),r||(n=X(n)));var e=o||U?document.importNode(n,!0):n.cloneNode(!0);return r?Oe(X(e),e.lastChild):Oe(e,e),e}}function Be(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=X(Ne(o));r=X(t)}var e=r.cloneNode(!0);return Oe(e,e),e}}function ze(t=""){var e=J(t+"");return Oe(e,e),e}function Ae(){var t=document.createDocumentFragment(),e=document.createComment(""),n=J();return t.append(e,n),Oe(e,n),t}function De(t,e){null!==t&&t.before(e)}let qe=!0;function Le(t){qe=t}function We(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}const Fe=new Map;let Re=new WeakMap;function He(t,e,n=!1){var r=t,o=null,i=null,l=P,a=!1;const s=(t,e=!0)=>{a=!0,u(e,t)},u=(t,e)=>{l!==(l=t)&&(l?(o?Ct(o):e&&(o=mt((()=>e(r)))),i&&_t(i,(()=>{i=null}))):(i?Ct(i):e&&(i=mt((()=>e(r)))),o&&_t(o,(()=>{o=null}))))};gt((()=>{a=!1,e(s),a||u(null,null)}),n?b:0)}let Ve=null;function Ge(t){Ve=t}function Ke(t,e){return e}function Ue(e,r,o,i,l,a=null){var s=e,u={flags:r,items:new Map,first:null};!(4&r)||(s=e.appendChild(J()));var c=null,d=!1,f=ot((()=>{var e=o();return t(e)?e:null==e?[]:n(e)}));gt((()=>{var t=ce(f),e=t.length;d&&0===e||(d=0===e,function(t,e,r,o,i,l,a){var s,u,c,d,f,v,p,h,g,y,b=!!(8&i),w=!!(3&i),x=t.length,_=e.items,$=e.first,k=null,C=[],S=[];if(b)for(y=0;y<x;y+=1)h=l(p=t[y],y),void 0!==(g=_.get(h))&&(null==(s=g.a)||s.measure(),(v??(v=new Set)).add(g));for(y=0;y<x;y+=1)if(h=l(p=t[y],y),void 0!==(g=_.get(h))){if(w&&Ze(g,p,y,i),g.e.f&m&&(Ct(g.e),b&&(null==(u=g.a)||u.unfix(),(v??(v=new Set)).delete(g))),g!==$){if(void 0!==f&&f.has(g)){if(C.length<S.length){var P,I=S[0];k=I.prev;var M=C[0],j=C[C.length-1];for(P=0;P<C.length;P+=1)Je(C[P],I,r);for(P=0;P<S.length;P+=1)f.delete(S[P]);Xe(e,M.prev,j.next),Xe(e,k,M),Xe(e,j,I),$=I,k=j,y-=1,C=[],S=[]}else f.delete(g),Je(g,$,r),Xe(e,g.prev,g.next),Xe(e,g,null===k?e.first:k.next),Xe(e,k,g),k=g;continue}for(C=[],S=[];null!==$&&$.k!==h;)$.e.f&m||(f??(f=new Set)).add($),S.push($),$=$.next;if(null===$)continue;g=$}C.push(g),k=g,$=g.next}else k=Ye($?$.e.nodes_start:r,e,k,null===k?e.first:k.next,p,h,y,o,i,a),_.set(h,k),C=[],S=[],$=k.next;if(null!==$||void 0!==f){for(var E=void 0===f?[]:n(f);null!==$;)$.e.f&m||E.push($),$=$.next;var N=E.length;if(N>0){var O=4&i&&0===x?r:null;if(b){for(y=0;y<N;y+=1)null==(c=E[y].a)||c.measure();for(y=0;y<N;y+=1)null==(d=E[y].a)||d.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)kt(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(),Xe(t,e[0].prev,e[i-1].next)}$t(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),Xe(t,o.prev,o.next)),wt(o.e,!a)}}))}(e,E,O,_)}}b&&jt((()=>{var t;if(void 0!==v)for(g of v)null==(t=g.a)||t.apply()})),Ft.first=e.first&&e.first.e,Ft.last=k&&k.e}(t,u,s,l,r,i,o),null!==a&&(0===e?c?Ct(c):c=mt((()=>a(s))):null!==c&&_t(c,(()=>{c=null}))),ce(f))}))}function Ze(t,e,n,r){1&r&&W(t.v,e),2&r?W(t.i,n):t.i=n}function Ye(t,e,n,r,o,i,l,a,s,u){var c=Ve,d=1&s?16&s?B(o):A(o):o,f=2&s?B(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};Ve=v;try{return v.e=mt((()=>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{Ve=c}}function Je(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=Q(i);o.before(i),i=l}}function Xe(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 Qe(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 tn(t,e,n){var r,o,i=t;gt((()=>{r!==(r=e())&&(o&&(_t(o),o=null),r&&(o=mt((()=>n(i,r)))))}),b)}function en(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=en(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function nn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=en(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const rn=[..." \t\n\r\f \v\ufeff"];function on(t,e,n,r,o,i){if(t.__className!==n){var l=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&&!rn.includes(r[l-1])||a!==r.length&&!rn.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==l?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l),t.__className=n}else if(i)for(var a in i){var s=!!i[a];null!=o&&s===!!o[a]||t.classList.toggle(a,s)}return i}const ln=Symbol("class");function an(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function sn(t,e,n,r){var o=t.__attributes??(t.__attributes={});o[e]!==(o[e]=n)&&("style"===e&&"__styles"in t&&(t.__styles={}),"loading"===e&&(t[_]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&dn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function un(t,e,n,r,o=!1,i=!1,l=!1){var a=e||{},s="OPTION"===t.tagName;for(var u in e)u in n||(n[u]=null);n.class?n.class=nn(n.class):(r||n[ln])&&(n.class=null);var c=dn(t),d=t.__attributes??(t.__attributes={});for(const m in n){let l=n[m];if(s&&"value"===m&&null==l)t.value=t.__value="",a[m]=l;else if("class"!==m){var f=a[m];if(l!==f){a[m]=l;var v=m[0]+m[1];if("$$"!==v){if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=ye(r);if(ge(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=l)continue;t.removeEventListener(r,a[n],e),a[n]=null}if(null!=l)if(p)t[`__${r}`]=l,je([r]);else{let o=function(t){a[m].call(this,t)};a[n]=Ie(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m&&null!=l)t.style.cssText=l+"";else if("autofocus"===m)$e(t,Boolean(l));else if(i||"__value"!==m&&("value"!==m||null==l))if("selected"===m&&s)an(t,l);else{var h=m;o||(h=we(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=l||i||g)g||c.includes(h)&&(i||"string"!=typeof l)?t[h]=l:"function"!=typeof l&&sn(t,h,l);else if(d[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=l;"style"===m&&"__styles"in t&&(t.__styles={})}}}else on(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,l,r,null==e?void 0:e[ln],n[ln]),a[m]=l,a[ln]=n[ln]}return a}var cn=new Map;function dn(t){var e,n=cn.get(t.nodeName);if(n)return n;cn.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var l in e=i(r))e[l].set&&n.push(l);r=s(r)}return n}function fn(t,e,n,r){var o=t.__styles??(t.__styles={});o[e]!==n&&(o[e]=n,null==n?t.style.removeProperty(e):t.style.setProperty(e,n,""))}const vn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function pn(){const t=vn.now();vn.tasks.forEach((e=>{e.c(t)||(vn.tasks.delete(e),e.f())})),0!==vn.tasks.size&&vn.tick(pn)}function hn(t,e){Ce((()=>{t.dispatchEvent(new CustomEvent(e))}))}function gn(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 mn(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[gn(t.trim())]=n.trim()}return e}const yn=t=>t;function bn(t,e,n,r){var o,i,l,a=!!(4&t),s=e.inert,u=e.style.overflow;function c(){var t=qt,i=Ft;Wt(null),Rt(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:"both"}))}finally{Wt(t),Rt(i)}}var d={is_global:a,in(){e.inert=s,hn(e,"introstart"),i=wn(e,c(),l,1,(()=>{hn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=u}))},out(t){e.inert=!0,hn(e,"outrostart"),l=wn(e,c(),i,0,(()=>{hn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},f=Ft;if((f.transitions??(f.transitions=[])).push(d),qe){var v=a;if(!v){for(var p=f.parent;p&&p.f&b;)for(;(p=p.parent)&&!(16&p.f););v=!p||!!(32768&p.f)}v&&dt((()=>{de((()=>d.in()))}))}}function wn(t,e,n,r,o){var i=1===r;if(u(e)){var l,a=!1;return jt((()=>{if(!a){var s=e({direction:i?"in":"out"});l=wn(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:c,deactivate:c,reset:c,t:()=>r};const{delay:s=0,css:d,tick:f,easing:v=yn}=e;var p=[];if(i&&void 0===n&&(f&&f(0,1),d)){var h=mn(d(0,1));p.push(h,h)}var g=()=>1-r,m=t.animate(p,{duration:s});return m.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 u=!1;if(d)for(var c=Math.ceil(a/(1e3/60)),p=0;p<=c;p+=1){var h=i+l*v(p/c),y=mn(d(h,1-h));s.push(y),u||(u="hidden"===y.overflow)}u&&(t.style.overflow="hidden"),g=()=>{var t=m.currentTime;return i+l*v(t/a)},f&&function(t){let e;0===vn.tasks.size&&vn.tick(pn),new Promise((n=>{vn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==m.playState)return!1;var t=g();return f(t,1-t),!0}))}(m=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{g=()=>r,null==f||f(r,1-r),o()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=c)},deactivate:()=>{o=c},reset:()=>{0===r&&(null==f||f(1,0))},t:()=>g()}}function xn(t){var e=t.type;return"number"===e||"range"===e}function _n(t){return""===t?null:+t}function $n(t,e){return t===e||(null==t?void 0:t[w])===e}function kn(t={},e,n,r){return dt((()=>{var r,o;return pt((()=>{r=o,o=[],de((()=>{t!==n(...o)&&(e(t,...o),r&&$n(n(...r),t)&&e(null,...r))}))})),()=>{jt((()=>{o&&$n(n(...o),t)&&e(null,...o)}))}})),t}function Cn(t=!1){const e=j,n=e.l.u;if(!n)return;let r=()=>pe(e.s);if(t){let t=0,n={};const o=rt((()=>{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=()=>ce(o)}var o;n.b.length&&(o=()=>{Sn(e,r),f(n.b)},at(),pt(o)),ct((()=>{const t=de((()=>n.m.map(d)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&ct((()=>{Sn(e,r),f(n.a)}))}function Sn(t,e){if(t.l.s)for(const n of t.l.s)ce(n);e()}function Pn(t,e,n){if(null==t)return e(void 0),c;const r=de((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const In=[];function Mn(t,e=c){let n=null;const r=new Set;function o(e){if(k(t,e)&&(t=e,n)){const e=!In.length;for(const n of r)n[1](),In.push(n,t);if(e){for(let t=0;t<In.length;t+=2)In[t][0](In[t+1]);In.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=c){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||c),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function jn(t){let e;return Pn(t,(t=>e=t))(),e}let En=!1,Nn=Symbol();function On(t,e,n){const r=n[e]??(n[e]={store:null,source:A(void 0),unsubscribe:c});if(r.store!==t&&!(Nn in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=c;else{var o=!0;r.unsubscribe=Pn(t,(t=>{o?r.source.v=t:L(r.source,t)})),o=!1}return t&&Nn in n?jn(t):ce(r.source)}function Tn(t,e){return t.set(e),e}function Bn(){const t={};return[t,function(){ut((()=>{for(var e in t)t[e].unsubscribe();r(t,Nn,{enumerable:!1,value:!0})}))}]}const zn={get(t,e){if(!t.exclude.includes(e))return ce(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=Ln({get[e](){return t.props[e]}},e,4)),t.special[e](n),F(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),F(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 An(t,e){return new Proxy({props:t,exclude:e,special:{},version:B(0)},zn)}const Dn={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(u(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 i=t.props[r];u(i)&&(i=i());const l=o(i,e);if(l&&l.set)return l.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(u(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=o(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===w||e===x)return!1;for(let n of t.props)if(u(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){u(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function qn(...t){return new Proxy({props:t},Dn)}function Ln(t,e,n,r){var i,l,a=!!(1&n),s=!S||!!(2&n),u=!!(8&n),c=!!(16&n),d=!1;u?[l,d]=function(t){var e=En;try{return En=!1,[t(),En]}finally{En=e}}((()=>t[e])):l=t[e];var f,v=w in t||x in t,p=u&&((null==(i=o(t,e))?void 0:i.set)??(v&&e in t&&(n=>t[e]=n)))||void 0,h=r,g=!0,m=!1,y=()=>(m=!0,g&&(g=!1,h=c?de(r):r),h);if(void 0===l&&void 0!==r&&(p&&s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),l=y(),p&&p(l)),s)f=()=>{var n=t[e];return void 0===n?y():(g=!0,m=!1,n)};else{var b=(a?rt:ot)((()=>t[e]));b.f|=131072,f=()=>{var t=ce(b);return void 0!==t&&(h=void 0),void 0===t?h:t}}if(!(4&n))return f;if(p){var _=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!_&&!d||p(e?f():t),t):f()}}var $=!1,k=A(l),P=rt((()=>{var t=f(),e=ce(k);return $?($=!1,e):k.v=t}));return a||(P.equals=C),function(t,e){if(arguments.length>0){const n=e?ce(P):s&&u?H(t):t;return P.equals(n)||($=!0,L(k,n),m&&void 0!==h&&(h=n),de((()=>ce(P)))),t}return ce(P)}}function Wn(t){var e,n;null===j&&M(),S&&null!==j.l?(e=j,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):ct((()=>{const e=de(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("5"),S=!0;
|
|
1
|
+
var PlaylightSDK=function(){"use strict";var t,e,n,r=t=>{throw TypeError(t)},o=(t,e,n)=>(((t,e,n)=>{e.has(t)||r("Cannot "+n)})(t,e,"access private method"),n);var i=Array.isArray,l=Array.prototype.indexOf,a=Array.from,s=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,d=Object.prototype,f=Array.prototype,v=Object.getPrototypeOf;function p(t){return"function"==typeof t}const h=()=>{};function g(t){return t()}function m(t){for(var e=0;e<t.length;e++)t[e]()}const y=256,b=1024,w=2048,x=4096,_=8192,$=16384,k=65536,C=Symbol("$state"),S=Symbol("legacy props"),P=Symbol("");function I(t){return t===this.v}function M(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function E(t){return!M(t,this.v)}let j=!1;const N=Symbol(),O="http://www.w3.org/2000/svg";function T(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let B=null;function z(t){B=t}function A(t,e=!1,n){B={p:B,c:null,e:null,m:!1,s:t,x:null,l:null},j&&!e&&(B.l={s:null,u:null,r1:[],r2:L(!1)})}function D(t){const e=B;if(null!==e){const t=e.e;if(null!==t){var n=Kt,r=Ht;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];Ut(i.effect),Gt(i.reaction),gt(i.fn)}}finally{Ut(n),Gt(r)}}B=e.p,e.m=!0}return{}}function q(){return!j||null!==B&&null===B.l}function L(t,e){return{f:0,v:t,reactions:null,equals:I,rv:0,wv:0}}function W(t){return H(L(t))}function F(t,e=!1){var n;const r=L(t);return e||(r.equals=E),j&&null!==B&&null!==B.l&&((n=B.l).s??(n.s=[])).push(r),r}function R(t,e=!1){return H(F(t,e))}function H(t){return null!==Ht&&!Vt&&2&Ht.f&&(null===Zt?Zt=[t]:Zt.push(t)),t}function V(t,e){return null!==Ht&&!Vt&&q()&&18&Ht.f&&(null===Zt||!Zt.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),G(t,e)}function G(t,e){return t.equals(e)||(t.v,t.v=e,t.wv=ne(),U(t,w),q()&&null!==Kt&&Kt.f&b&&!(96&Kt.f)&&(null===Xt?Xt=[t]:Xt.push(t))),e}function K(t,e=1){var n=he(t),r=1===e?n++:n--;return V(t,n),r}function U(t,e){var n=t.reactions;if(null!==n)for(var r=q(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&w||(r||l!==Kt)&&(ye(l,e),1280&a&&(2&a?U(l,x):ve(l)))}}function Z(t,e=null,n){if("object"!=typeof t||null===t||C in t)return t;const r=v(t);if(r!==d&&r!==f)return t;var o,l=new Map,a=i(t),s=L(0);return a&&l.set("length",L(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 r=l.get(e);return void 0===r?(r=L(n.value),l.set(e,r)):V(r,Z(n.value,o)),!0},deleteProperty(t,e){var n=l.get(e);if(void 0===n)e in t&&l.set(e,L(N));else{if(a&&"string"==typeof e){var r=l.get("length"),o=Number(e);Number.isInteger(o)&&o<r.v&&V(r,o)}V(n,N),Y(s)}return!0},get(e,n,r){var i;if(n===C)return t;var a=l.get(n),s=n in e;if(void 0!==a||s&&!(null==(i=u(e,n))?void 0:i.writable)||(a=L(Z(s?e[n]:N,o)),l.set(n,a)),void 0!==a){var c=he(a);return c===N?void 0:c}return Reflect.get(e,n,r)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var r=l.get(e);r&&(n.value=he(r))}else if(void 0===n){var o=l.get(e),i=null==o?void 0:o.v;if(void 0!==o&&i!==N)return{enumerable:!0,configurable:!0,value:i,writable:!0}}return n},has(t,e){var n;if(e===C)return!0;var r=l.get(e),i=void 0!==r&&r.v!==N||Reflect.has(t,e);return!((void 0!==r||null!==Kt&&(!i||(null==(n=u(t,e))?void 0:n.writable)))&&(void 0===r&&(r=L(i?Z(t[e],o):N),l.set(e,r)),he(r)===N))&&i},set(t,e,n,r){var i,c=l.get(e),d=e in t;if(a&&"length"===e)for(var f=n;f<c.v;f+=1){var v=l.get(f+"");void 0!==v?V(v,N):f in t&&(v=L(N),l.set(f+"",v))}void 0===c?d&&!(null==(i=u(t,e))?void 0:i.writable)||(V(c=L(void 0),Z(n,o)),l.set(e,c)):(d=c.v!==N,V(c,Z(n,o)));var p=Reflect.getOwnPropertyDescriptor(t,e);if((null==p?void 0:p.set)&&p.set.call(r,n),!d){if(a&&"string"==typeof e){var h=l.get("length"),g=Number(e);Number.isInteger(g)&&g>=h.v&&V(h,g+1)}Y(s)}return!0},ownKeys(t){he(s);var e=Reflect.ownKeys(t).filter((t=>{var e=l.get(t);return void 0===e||e.v!==N}));for(var[n,r]of l)r.v===N||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function Y(t,e=1){V(t,t.v+e)}var J,X,Q,tt,et;function nt(t=""){return document.createTextNode(t)}function rt(t){return tt.call(t)}function ot(t){return et.call(t)}function it(t,e){return rt(t)}function lt(t,e){var n=rt(t);return n instanceof Comment&&""===n.data?ot(n):n}function at(t,e=1,n=!1){let r=t;for(;e--;)r=ot(r);return r}function st(t){var e=2050,n=null!==Ht&&2&Ht.f?Ht:null;return null===Kt||null!==n&&n.f&y?e|=y:Kt.f|=1048576,{ctx:B,deps:null,effects:null,equals:I,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??Kt}}function ut(t){const e=st(t);return e.equals=E,e}function ct(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)Ct(e[n])}}function dt(t){var e=function(t){var e,n=Kt;Ut(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=le(t)}finally{Ut(n)}return e}(t);ye(t,(ee||t.f&y)&&null!==t.deps?x:b),t.equals(e)||(t.v=e,t.wv=ne())}function ft(t){null===Kt&&null===Ht&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Ht&&Ht.f&y&&null===Kt&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),Wt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function vt(t,e,n,r=!0){var o,i,l,a=!!(64&t),s=Kt,u={ctx:B,deps:null,nodes_start:null,nodes_end:null,f:t|w,first:null,fn:e,last:null,next:null,parent:a?null:s,prev:null,teardown:null,transitions:null,wv:0};if(n)try{ue(u),u.f|=32768}catch(o){throw Ct(u),o}else null!==e&&ve(u);if((!n||null!==u.deps||null!==u.first||null!==u.nodes_start||null!==u.teardown||1048704&u.f)&&!a&&r&&(null!==s&&(o=u,null===(l=(i=s).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==Ht&&2&Ht.f)){var c=Ht;(c.effects??(c.effects=[])).push(u)}return u}function pt(t){const e=vt(8,null,!1);return ye(e,b),e.teardown=t,e}function ht(t){if(ft(),!(null!==Kt&&32&Kt.f&&null!==B)||B.m)return gt(t);var e=B;(e.e??(e.e=[])).push({fn:t,effect:Kt,reaction:Ht})}function gt(t){return vt(4,t,!1)}function mt(t,e){var n=B,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=bt((()=>{t(),r.ran||(r.ran=!0,V(n.l.r2,!0),ge(e))}))}function yt(){var t=B;bt((()=>{if(he(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&b&&ye(n,x),re(n)&&ue(n),e.ran=!1}t.l.r2.v=!1}}))}function bt(t){return vt(8,t,!0)}function wt(t,e=[],n=st){const r=e.map(n);return xt((()=>t(...r.map(he))))}function xt(t,e=0){return vt(24|e,t,!0)}function _t(t,e=!0){return vt(40,t,!0,e)}function $t(t){var e=t.teardown;if(null!==e){const t=Wt,n=Ht;Ft(!0),Gt(null);try{e.call(null)}finally{Ft(t),Gt(n)}}}function kt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;Ct(n,e),n=r}}function Ct(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:ot(r);r.remove(),r=i}n=!0}kt(t,e&&!n),se(t,0),ye(t,$);var l=t.transitions;if(null!==l)for(const s of l)s.stop();$t(t);var a=t.parent;null!==a&&null!==a.first&&St(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function St(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 Pt(t,e){var n=[];Mt(t,n,!0),It(n,(()=>{Ct(t),e&&e()}))}function It(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function Mt(t,e,n){if(!(t.f&_)){if(t.f^=_,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;Mt(r,e,!!(r.f&k||32&r.f)&&n),r=o}}}function Et(t){jt(t,!0)}function jt(t,e){if(t.f&_){t.f^=_,t.f&b||(t.f^=b),re(t)&&(ye(t,w),ve(t));for(var n=t.first;null!==n;){var r=n.next;jt(n,!!(n.f&k||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let Nt=[],Ot=[];function Tt(){var t=Nt;Nt=[],m(t)}function Bt(t){0===Nt.length&&queueMicrotask(Tt),Nt.push(t)}function zt(){var t;Nt.length>0&&Tt(),Ot.length>0&&(t=Ot,Ot=[],m(t))}let At=!1,Dt=!1,qt=null,Lt=!1,Wt=!1;function Ft(t){Wt=t}let Rt=[],Ht=null,Vt=!1;function Gt(t){Ht=t}let Kt=null;function Ut(t){Kt=t}let Zt=null,Yt=null,Jt=0,Xt=null,Qt=1,te=0,ee=!1;function ne(){return++Qt}function re(t){var e,n=t.f;if(n&w)return!0;if(n&x){var r=t.deps,o=!!(n&y);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==Kt&&!ee,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&y||(c.f^=y)}for(i=0;i<u;i++)if(re(l=r[i])&&dt(l),l.wv>t.wv)return!0}o&&(null===Kt||ee)||ye(t,b)}return!1}function oe(t,e,n,r){if(At){if(null===n&&(At=!1),!((o=e).f&$||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(At=!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 At=!1,t}(t,e);var o}function ie(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];2&i.f?ie(i,e,!1):e===i&&(n?ye(i,w):i.f&b&&ye(i,x),ve(i))}}function le(t){var e,n=Yt,r=Jt,o=Xt,i=Ht,l=ee,a=Zt,s=B,u=Vt,c=t.f;Yt=null,Jt=0,Xt=null,ee=!!(c&y)&&(Vt||!Lt||null===Ht),Ht=96&c?null:t,Zt=null,z(t.ctx),Vt=!1,te++;try{var d=(0,t.fn)(),f=t.deps;if(null!==Yt){var v;if(se(t,Jt),null!==f&&Jt>0)for(f.length=Jt+Yt.length,v=0;v<Yt.length;v++)f[Jt+v]=Yt[v];else t.deps=f=Yt;if(!ee)for(v=Jt;v<f.length;v++)((e=f[v]).reactions??(e.reactions=[])).push(t)}else null!==f&&Jt<f.length&&(se(t,Jt),f.length=Jt);if(q()&&null!==Xt&&!Vt&&null!==f&&!(6146&t.f))for(v=0;v<Xt.length;v++)ie(Xt[v],t);return null!==i&&te++,d}finally{Yt=n,Jt=r,Xt=o,Ht=i,ee=l,Zt=a,z(s),Vt=u}}function ae(t,e){let n=e.reactions;if(null!==n){var r=l.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===Yt||!Yt.includes(e))&&(ye(e,x),768&e.f||(e.f^=512),ct(e),se(e,0))}function se(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)ae(t,n[r])}function ue(t){var e=t.f;if(!(e&$)){ye(t,b);var n=Kt,r=B,o=Lt;Kt=t,Lt=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||Ct(e),e=n}}(t):kt(t),$t(t);var i=le(t);t.teardown="function"==typeof i?i:null,t.wv=Qt,t.deps}catch(l){oe(l,t,n,r||t.ctx)}finally{Lt=o,Kt=n}}}function ce(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===qt)throw t;oe(t,qt,null)}}function de(){try{for(var t=0;Rt.length>0;){t++>1e3&&ce();var e=Rt,n=e.length;Rt=[];for(var r=0;r<n;r++){var o=e[r];o.f&b||(o.f^=b),fe(pe(o))}}}finally{Dt=!1,qt=null}}function fe(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{re(r)&&(ue(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?St(r):r.fn=null))}catch(o){oe(o,r,null,r.ctx)}}}function ve(t){Dt||(Dt=!0,queueMicrotask(de));for(var e=qt=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&b))return;e.f^=b}}Rt.push(e)}function pe(t){for(var e=[],n=t.first;null!==n;){var r=n.f,o=!!(32&r);if(!(o&&r&b||r&_)){if(4&r)e.push(n);else if(o)n.f^=b;else{var i=Ht;try{Ht=n,re(n)&&ue(n)}catch(s){oe(s,n,null,n.ctx)}finally{Ht=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 he(t){var e=!!(2&t.f);if(null===Ht||Vt){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&y||(n.f^=y)}}else{null!==Zt&&Zt.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}();var o=Ht.deps;t.rv<te&&(t.rv=te,null===Yt&&null!==o&&o[Jt]===t?Jt++:null===Yt?Yt=[t]:ee&&Yt.includes(t)||Yt.push(t))}return e&&re(n=t)&&dt(n),t.v}function ge(t){var e=Vt;try{return Vt=!0,t()}finally{Vt=e}}const me=-7169;function ye(t,e){t.f=t.f&me|e}function be(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(C in t)we(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&C in n&&we(n)}}function we(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{we(t[o],e)}catch(n){}const r=v(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=c(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function xe(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const _e=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function $e(t){return _e.includes(t)}const ke={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 Ce(t){return t=t.toLowerCase(),ke[t]??t}const Se=["touchstart","touchmove"];function Pe(t){return Se.includes(t)}function Ie(t,e){if(e){const e=document.body;t.autofocus=!0,Bt((()=>{document.activeElement===e&&t.focus()}))}}let Me=!1;function Ee(t){var e=Ht,n=Kt;Gt(null),Ut(null);try{return t()}finally{Gt(e),Ut(n)}}const je=new Set,Ne=new Set;function Oe(t,e,n,r={}){function o(t){if(r.capture||ze.call(e,t),!t.cancelBubble)return Ee((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?Bt((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Te(t,e,n,r,o){var i={capture:r,passive:o},l=Oe(t,e,n,i);e!==document.body&&e!==window&&e!==document||pt((()=>{e.removeEventListener(t,l,i)}))}function Be(t){for(var e=0;e<t.length;e++)je.add(t[e]);for(var n of Ne)n(t)}function ze(t){var e,n=this,r=n.ownerDocument,o=t.type,l=(null==(e=t.composedPath)?void 0:e.call(t))||[],a=l[0]||t.target,u=0,c=t.__root;if(c){var d=l.indexOf(c);if(-1!==d&&(n===document||n===window))return void(t.__root=n);var f=l.indexOf(n);if(-1===f)return;d<=f&&(u=d)}if((a=l[u]||t.target)!==n){s(t,"currentTarget",{configurable:!0,get:()=>a||r});var v=Ht,p=Kt;Gt(null),Ut(null);try{for(var h,g=[];null!==a;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+o];if(void 0!==y&&(!a.disabled||t.target===a))if(i(y)){var[b,...w]=y;b.apply(a,[t,...w])}else y.call(a,t)}catch(x){h?g.push(x):h=x}if(t.cancelBubble||m===n||null===m)break;a=m}if(h){for(let t of g)queueMicrotask((()=>{throw t}));throw h}}finally{t.__root=n,delete t.currentTarget,Gt(v),Ut(p)}}}function Ae(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function De(t,e){var n=Kt;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function qe(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ae(i?t:"<!>"+t),r||(n=rt(n)));var e=o||Q?document.importNode(n,!0):n.cloneNode(!0);return r?De(rt(e),e.lastChild):De(e,e),e}}function Le(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=rt(Ae(o));r=rt(t)}var e=r.cloneNode(!0);return De(e,e),e}}function We(t=""){var e=nt(t+"");return De(e,e),e}function Fe(){var t=document.createDocumentFragment(),e=document.createComment(""),n=nt();return t.append(e,n),De(e,n),t}function Re(t,e){null!==t&&t.before(e)}let He=!0;function Ve(t){He=t}function Ge(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}const Ke=new Map;let Ue=new WeakMap;function Ze(t,e,n=!1){var r=t,o=null,i=null,l=N,a=!1;const s=(t,e=!0)=>{a=!0,u(e,t)},u=(t,e)=>{l!==(l=t)&&(l?(o?Et(o):e&&(o=_t((()=>e(r)))),i&&Pt(i,(()=>{i=null}))):(i?Et(i):e&&(i=_t((()=>e(r)))),o&&Pt(o,(()=>{o=null}))))};xt((()=>{a=!1,e(s),a||u(null,null)}),n?k:0)}let Ye=null;function Je(t){Ye=t}function Xe(t,e){return e}function Qe(t,e,n,r,o,l=null){var s=t,u={flags:e,items:new Map,first:null};!(4&e)||(s=t.appendChild(nt()));var c=null,d=!1,f=ut((()=>{var t=n();return i(t)?t:null==t?[]:a(t)}));xt((()=>{var t=he(f),i=t.length;d&&0===i||(d=0===i,function(t,e,n,r,o,i,l){var s,u,c,d,f,v,p,h,g,m,y=!!(8&o),b=!!(3&o),w=t.length,x=e.items,$=e.first,k=null,C=[],S=[];if(y)for(m=0;m<w;m+=1)h=i(p=t[m],m),void 0!==(g=x.get(h))&&(null==(s=g.a)||s.measure(),(v??(v=new Set)).add(g));for(m=0;m<w;m+=1)if(h=i(p=t[m],m),void 0!==(g=x.get(h))){if(b&&tn(g,p,m,o),g.e.f&_&&(Et(g.e),y&&(null==(u=g.a)||u.unfix(),(v??(v=new Set)).delete(g))),g!==$){if(void 0!==f&&f.has(g)){if(C.length<S.length){var P,I=S[0];k=I.prev;var M=C[0],E=C[C.length-1];for(P=0;P<C.length;P+=1)nn(C[P],I,n);for(P=0;P<S.length;P+=1)f.delete(S[P]);rn(e,M.prev,E.next),rn(e,k,M),rn(e,E,I),$=I,k=E,m-=1,C=[],S=[]}else f.delete(g),nn(g,$,n),rn(e,g.prev,g.next),rn(e,g,null===k?e.first:k.next),rn(e,k,g),k=g;continue}for(C=[],S=[];null!==$&&$.k!==h;)$.e.f&_||(f??(f=new Set)).add($),S.push($),$=$.next;if(null===$)continue;g=$}C.push(g),k=g,$=g.next}else k=en($?$.e.nodes_start:n,e,k,null===k?e.first:k.next,p,h,m,r,o,l),x.set(h,k),C=[],S=[],$=k.next;if(null!==$||void 0!==f){for(var j=void 0===f?[]:a(f);null!==$;)$.e.f&_||j.push($),$=$.next;var N=j.length;if(N>0){var O=4&o&&0===w?n:null;if(y){for(m=0;m<N;m+=1)null==(c=j[m].a)||c.measure();for(m=0;m<N;m+=1)null==(d=j[m].a)||d.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)Mt(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(),rn(t,e[0].prev,e[i-1].next)}It(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),rn(t,o.prev,o.next)),Ct(o.e,!a)}}))}(e,j,O,x)}}y&&Bt((()=>{var t;if(void 0!==v)for(g of v)null==(t=g.a)||t.apply()})),Kt.first=e.first&&e.first.e,Kt.last=k&&k.e}(t,u,s,o,e,r,n),null!==l&&(0===i?c?Et(c):c=_t((()=>l(s))):null!==c&&Pt(c,(()=>{c=null}))),he(f))}))}function tn(t,e,n,r){1&r&&G(t.v,e),2&r?G(t.i,n):t.i=n}function en(t,e,n,r,o,i,l,a,s,u){var c=Ye,d=1&s?16&s?L(o):F(o):o,f=2&s?L(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};Ye=v;try{return v.e=_t((()=>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{Ye=c}}function nn(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=ot(i);o.before(i),i=l}}function rn(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 on(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 ln(t,e,n){var r,o,i=t;xt((()=>{r!==(r=e())&&(o&&(Pt(o),o=null),r&&(o=_t((()=>n(i,r)))))}),k)}function an(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=an(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function sn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=an(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const un=[..." \t\n\r\f \v\ufeff"];function cn(t,e,n,r,o,i){if(t.__className!==n){var l=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&&!un.includes(r[l-1])||a!==r.length&&!un.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==l?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l),t.__className=n}else if(i)for(var a in i){var s=!!i[a];null!=o&&s===!!o[a]||t.classList.toggle(a,s)}return i}const dn=Symbol("class");function fn(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function vn(t,e,n,r){var o=t.__attributes??(t.__attributes={});o[e]!==(o[e]=n)&&("style"===e&&"__styles"in t&&(t.__styles={}),"loading"===e&&(t[P]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&gn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function pn(t,e,n,r,o=!1,i=!1,l=!1){var a=e||{},s="OPTION"===t.tagName;for(var u in e)u in n||(n[u]=null);n.class?n.class=sn(n.class):(r||n[dn])&&(n.class=null);var c=gn(t),d=t.__attributes??(t.__attributes={});for(const m in n){let l=n[m];if(s&&"value"===m&&null==l)t.value=t.__value="",a[m]=l;else if("class"!==m){var f=a[m];if(l!==f){a[m]=l;var v=m[0]+m[1];if("$$"!==v){if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=$e(r);if(xe(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=l)continue;t.removeEventListener(r,a[n],e),a[n]=null}if(null!=l)if(p)t[`__${r}`]=l,Be([r]);else{let o=function(t){a[m].call(this,t)};a[n]=Oe(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m&&null!=l)t.style.cssText=l+"";else if("autofocus"===m)Ie(t,Boolean(l));else if(i||"__value"!==m&&("value"!==m||null==l))if("selected"===m&&s)fn(t,l);else{var h=m;o||(h=Ce(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=l||i||g)g||c.includes(h)&&(i||"string"!=typeof l)?t[h]=l:"function"!=typeof l&&vn(t,h,l);else if(d[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=l;"style"===m&&"__styles"in t&&(t.__styles={})}}}else cn(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,l,r,null==e?void 0:e[dn],n[dn]),a[m]=l,a[dn]=n[dn]}return a}var hn=new Map;function gn(t){var e,n=hn.get(t.nodeName);if(n)return n;hn.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var i in e=c(r))e[i].set&&n.push(i);r=v(r)}return n}function mn(t,e,n,r){var o=t.__styles??(t.__styles={});o[e]!==n&&(o[e]=n,null==n?t.style.removeProperty(e):t.style.setProperty(e,n,""))}const yn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function bn(){const t=yn.now();yn.tasks.forEach((e=>{e.c(t)||(yn.tasks.delete(e),e.f())})),0!==yn.tasks.size&&yn.tick(bn)}function wn(t,e){Ee((()=>{t.dispatchEvent(new CustomEvent(e))}))}function xn(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 _n(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[xn(t.trim())]=n.trim()}return e}const $n=t=>t;function kn(t,e,n,r){var o,i,l,a=!!(4&t),s=e.inert,u=e.style.overflow;function c(){var t=Ht,i=Kt;Gt(null),Ut(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:"both"}))}finally{Gt(t),Ut(i)}}var d={is_global:a,in(){e.inert=s,wn(e,"introstart"),i=Cn(e,c(),l,1,(()=>{wn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=u}))},out(t){e.inert=!0,wn(e,"outrostart"),l=Cn(e,c(),i,0,(()=>{wn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},f=Kt;if((f.transitions??(f.transitions=[])).push(d),He){var v=a;if(!v){for(var p=f.parent;p&&p.f&k;)for(;(p=p.parent)&&!(16&p.f););v=!p||!!(32768&p.f)}v&>((()=>{ge((()=>d.in()))}))}}function Cn(t,e,n,r,o){var i=1===r;if(p(e)){var l,a=!1;return Bt((()=>{if(!a){var s=e({direction:i?"in":"out"});l=Cn(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:h,deactivate:h,reset:h,t:()=>r};const{delay:s=0,css:u,tick:c,easing:d=$n}=e;var f=[];if(i&&void 0===n&&(c&&c(0,1),u)){var v=_n(u(0,1));f.push(v,v)}var g=()=>1-r,m=t.animate(f,{duration:s});return m.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)),p=0;p<=v;p+=1){var h=i+l*d(p/v),y=_n(u(h,1-h));s.push(y),f||(f="hidden"===y.overflow)}f&&(t.style.overflow="hidden"),g=()=>{var t=m.currentTime;return i+l*d(t/a)},c&&function(t){let e;0===yn.tasks.size&&yn.tick(bn),new Promise((n=>{yn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==m.playState)return!1;var t=g();return c(t,1-t),!0}))}(m=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{g=()=>r,null==c||c(r,1-r),o()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=h)},deactivate:()=>{o=h},reset:()=>{0===r&&(null==c||c(1,0))},t:()=>g()}}function Sn(t){var e=t.type;return"number"===e||"range"===e}function Pn(t){return""===t?null:+t}function In(t,e){return t===e||(null==t?void 0:t[C])===e}function Mn(t={},e,n,r){return gt((()=>{var r,o;return bt((()=>{r=o,o=[],ge((()=>{t!==n(...o)&&(e(t,...o),r&&In(n(...r),t)&&e(null,...r))}))})),()=>{Bt((()=>{o&&In(n(...o),t)&&e(null,...o)}))}})),t}function En(t=!1){const e=B,n=e.l.u;if(!n)return;let r=()=>be(e.s);if(t){let t=0,n={};const o=st((()=>{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=()=>he(o)}var o;n.b.length&&(o=()=>{jn(e,r),m(n.b)},ft(),bt(o)),ht((()=>{const t=ge((()=>n.m.map(g)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&ht((()=>{jn(e,r),m(n.a)}))}function jn(t,e){if(t.l.s)for(const n of t.l.s)he(n);e()}function Nn(t,e,n){if(null==t)return e(void 0),h;const r=ge((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const On=[];function Tn(t,e=h){let n=null;const r=new Set;function o(e){if(M(t,e)&&(t=e,n)){const e=!On.length;for(const n of r)n[1](),On.push(n,t);if(e){for(let t=0;t<On.length;t+=2)On[t][0](On[t+1]);On.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=h){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||h),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function Bn(t){let e;return Nn(t,(t=>e=t))(),e}let zn=!1,An=Symbol();function Dn(t,e,n){const r=n[e]??(n[e]={store:null,source:F(void 0),unsubscribe:h});if(r.store!==t&&!(An in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=h;else{var o=!0;r.unsubscribe=Nn(t,(t=>{o?r.source.v=t:V(r.source,t)})),o=!1}return t&&An in n?Bn(t):he(r.source)}function qn(t,e){return t.set(e),e}function Ln(){const t={};return[t,function(){pt((()=>{for(var e in t)t[e].unsubscribe();s(t,An,{enumerable:!1,value:!0})}))}]}const Wn={get(t,e){if(!t.exclude.includes(e))return he(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=Vn({get[e](){return t.props[e]}},e,4)),t.special[e](n),K(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),K(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 Fn(t,e){return new Proxy({props:t,exclude:e,special:{},version:L(0)},Wn)}const Rn={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(p(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];p(o)&&(o=o());const i=u(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(p(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=u(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===C||e===S)return!1;for(let n of t.props)if(p(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){p(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function Hn(...t){return new Proxy({props:t},Rn)}function Vn(t,e,n,r){var o,i,l=!!(1&n),a=!j||!!(2&n),s=!!(8&n),c=!!(16&n),d=!1;s?[i,d]=function(t){var e=zn;try{return zn=!1,[t(),zn]}finally{zn=e}}((()=>t[e])):i=t[e];var f,v=C in t||S in t,p=s&&((null==(o=u(t,e))?void 0:o.set)??(v&&e in t&&(n=>t[e]=n)))||void 0,h=r,g=!0,m=!1,y=()=>(m=!0,g&&(g=!1,h=c?ge(r):r),h);if(void 0===i&&void 0!==r&&(p&&a&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i=y(),p&&p(i)),a)f=()=>{var n=t[e];return void 0===n?y():(g=!0,m=!1,n)};else{var b=(l?st:ut)((()=>t[e]));b.f|=131072,f=()=>{var t=he(b);return void 0!==t&&(h=void 0),void 0===t?h:t}}if(!(4&n))return f;if(p){var w=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!w&&!d||p(e?f():t),t):f()}}var x=!1,_=F(i),$=st((()=>{var t=f(),e=he(_);return x?(x=!1,e):_.v=t}));return l||($.equals=E),function(t,e){if(arguments.length>0){const n=e?he($):a&&s?Z(t):t;return $.equals(n)||(x=!0,V(_,n),m&&void 0!==h&&(h=n),ge((()=>he($)))),t}return he($)}}function Gn(t){var e,n;null===B&&T(),j&&null!==B.l?(e=B,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):ht((()=>{const e=ge(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("5"),j=!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=Array.isArray,e=Array.prototype.i
|
|
|
19
19
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
const Fn={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 Rn=Be("<svg><!><!></svg>");function Hn(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]),r=An(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);N(e,!1);let o=Ln(e,"name",8,void 0),i=Ln(e,"color",8,"currentColor"),l=Ln(e,"size",8,24),a=Ln(e,"strokeWidth",8,2),s=Ln(e,"absoluteStrokeWidth",8,!1),u=Ln(e,"iconNode",24,(()=>[]));Cn();var c=Rn();let d;var f=tt(c);Ue(f,1,u,Ke,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=Ae();n=et(d),r=()=>ce(e)[0],o=(t,n)=>{let r;ht((()=>r=un(t,r,{...ce(e)[1]},void 0,t.namespaceURI===I,t.nodeName.includes("-"))))},s=null,u=n,c=Ve,gt((()=>{const t=r()||null;var e=I;if(t!==i){var n=Ve;Ge(c),a&&(null===t?_t(a,(()=>{a=null,l=null})):t===l?Ct(a):(wt(a),Le(!1))),t&&t!==l&&(a=mt((()=>{if(Oe(s=document.createElementNS(e,t),s),o){var n=s.appendChild(J());o(s,n)}Ft.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),Le(!0),Ge(n)}}),b),De(t,d)})),Qe(nt(f),e,"default",{},null),ht(((t,e)=>d=un(c,d,{...Fn,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e},void 0,!0)),[()=>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)],ot),De(t,c),O()}function Vn(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}var Gn=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Kn=Te('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');function Un(t){const e=t-1;return e*e*e+1}function Zn(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Yn(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Jn(t,{delay:e=0,duration:n=400,easing:r=Zn,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]=Yn(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function Xn(t,{delay:e=0,duration:n=400,easing:r=Un,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]=Yn(o),[v,p]=Yn(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 Qn(t,{delay:e=0,duration:n=400,easing:r=Un,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 tr(t,{delay:e=0,duration:n=400,easing:r=Un,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`}}je(["click"]);var er=Be('<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>'),nr=Be('<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>'),rr=Be('<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>'),or=Be('<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 ir(t,e){let n=Ln(e,"type",8,"success");var r=Ae(),o=et(r),i=t=>{De(t,er())},l=t=>{var e=Ae(),r=et(e),o=t=>{De(t,nr())},i=t=>{var e=Ae(),r=et(e),o=t=>{De(t,rr())},i=t=>{var e=Ae(),r=et(e),o=t=>{De(t,or())},i=t=>{};He(r,(t=>{"warning"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(r,(t=>{"info"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(r,(t=>{"error"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(o,(t=>{"success"===n()?t(i):t(l,!1)})),De(t,r)}var lr=Te('<div class="sonner-loading-bar"></div>'),ar=Te('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function sr(...t){return t.filter(Boolean).join(" ")}const ur="undefined"!=typeof document;function cr(t){const e=Mn(t);return{subscribe:e.subscribe,set:function(t){ur&&e.set(t)},update:function(t){ur&&e.update(t)}}}let dr=0;const fr=function(){const t=cr([]),e=cr([]);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:dr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return jn(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)||dr++;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!==jn(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}}(),vr=Object.assign((function(t,e){return fr.create({message:t,...e})}),{success:fr.success,info:fr.info,warning:fr.warning,error:fr.error,custom:fr.custom,message:fr.message,promise:fr.promise,dismiss:fr.dismiss,loading:fr.loading});var pr=Te('<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>'),hr=Te('<div data-icon=""><!> <!></div>'),gr=Te('<div data-title=""><!></div>'),mr=Te('<div data-description=""><!></div>'),yr=Te('<button data-button="" data-cancel=""> </button>'),br=Te('<button data-button=""> </button>'),wr=Te('<!> <div data-content=""><!> <!></div> <!> <!>',1),xr=Te('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function _r(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);N(e,!1);const[r,o]=Bn(),i=()=>On(_,"$heights",r),l=()=>On(ce(ct),"$effect",r),a=D(void 0,!0),s=D(void 0,!0),u=D(void 0,!0),d=D(void 0,!0),f=D(void 0,!0),v=D(void 0,!0),p=D(void 0,!0),h=D(void 0,!0),g=D(void 0,!0),m=D(void 0,!0),y=D(void 0,!0),b=D(void 0,!0),w={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:x,heights:_,removeHeight:$,setHeight:k,remove:C}=fr;let S=Ln(e,"toast",9),P=Ln(e,"index",9),I=Ln(e,"expanded",9),M=Ln(e,"invert",13),j=Ln(e,"position",9),E=Ln(e,"visibleToasts",9),T=Ln(e,"expandByDefault",9),B=Ln(e,"closeButton",9),z=Ln(e,"interacting",9),A=Ln(e,"cancelButtonStyle",9,""),q=Ln(e,"actionButtonStyle",9,""),W=Ln(e,"duration",9,4e3),F=Ln(e,"descriptionClass",9,""),R=Ln(e,"classes",29,(()=>({}))),H=Ln(e,"unstyled",9,!1),V=D(!1,!0),G=D(!1,!0),K=D(!1,!0),U=D(!1,!0),Z=D(0,!0),Y=D(0,!0),J=D(void 0,!0),X=D(0,!0),Q=0,rt=0,it=null;function lt(){L(G,!0),L(Z,ce(X)),$(S().id),setTimeout((()=>{C(S().id)}),200)}let at=D(void 0,!0),st=D(S().duration||W()||4e3,!0);function ut(){Q=(new Date).getTime(),L(at,setTimeout((()=>{var t,e;null==(e=(t=S()).onAutoClose)||e.call(t,S()),lt()}),ce(st)))}let ct=D(void 0,!0);Wn((()=>{L(V,!0);const t=ce(J).getBoundingClientRect().height;return L(Y,t),k({toastId:S().id,height:t}),()=>$(S().id)})),ft((()=>pe(R())),(()=>{R({...w,...R()})})),ft((()=>pe(P())),(()=>{L(a,0===P())})),ft((()=>(pe(P()),pe(E()))),(()=>{L(s,P()+1<=E())})),ft((()=>pe(S())),(()=>{L(u,S().title)})),ft((()=>pe(S())),(()=>{L(d,S().description)})),ft((()=>pe(S())),(()=>{L(f,S().type)})),ft((()=>pe(S())),(()=>{L(v,S().class||"")})),ft((()=>pe(S())),(()=>{L(p,S().descriptionClass||"")})),ft((()=>(i(),pe(S()))),(()=>{L(h,i().findIndex((t=>t.toastId===S().id))||0)})),ft((()=>pe(j())),(()=>{L(g,j().split("-"))})),ft((()=>(i(),ce(h))),(()=>{L(m,i().reduce(((t,e,n)=>n>=ce(h)?t:t+e.height),0))})),ft((()=>(pe(M()),pe(S()))),(()=>{M(S().invert||M())})),ft((()=>ce(f)),(()=>{L(y,"loading"===ce(f))})),ft((()=>(ce(h),ce(m))),(()=>{L(X,Math.round(14*ce(h)+ce(m)))})),ft((()=>(ce(u),ce(d))),(()=>{ce(u),ce(d),async function(){if(!ce(V))return;let t;await async function(){await Promise.resolve(),function(){for(Et();Dt.length>0;)Ot=!0,le(),Et()}()}(),t=I()||T()?1:1-.05*P(),ce(J).style.setProperty("height","auto");const e=ce(J).offsetHeight,n=ce(J).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;ce(J).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,L(Y,o),k({toastId:S().id,height:o})}()})),ft((()=>(pe(S()),ce(at),pe(W()))),(()=>{S().updated&&(clearTimeout(ce(at)),L(st,S().duration||W()||4e3),ut())})),ft((()=>(pe(S()),ce(f))),(()=>{L(b,S().promise&&"loading"===ce(f)||S().duration===Number.POSITIVE_INFINITY)})),ft((()=>(ce(b),pe(I()),pe(z()),ce(at))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=c)}(L(ct,(t=()=>(ce(b)||(I()||z()?function(){if(rt<Q){const t=(new Date).getTime()-Q;L(st,ce(st)-t)}rt=(new Date).getTime()}():ut()),()=>clearTimeout(ce(at))),{subscribe:t})),"$effect",r)})),ft((()=>l()),(()=>{l()})),ft((()=>pe(S())),(()=>{S().delete&<()})),vt(),Cn(!0);var dt=xr();sn(dt,"tabindex",0);var pt=tt(dt),gt=t=>{var e=pr();ht((t=>{sn(e,"data-disabled",ce(y)),on(e,1,nn(t))}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.closeButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.closeButton)}],ot),Me("click",e,(function(...t){var e;null==(e=ce(y)?void 0:()=>{var t,e;lt(),null==(e=(t=S()).onDismiss)||e.call(t,S())})||e.apply(this,t)})),De(t,e)};He(pt,(t=>{B()&&!S().component&&t(gt)}));var mt=nt(pt,2),yt=t=>{var e=Ae();tn(et(e),(()=>S().component),((t,e)=>{e(t,qn((()=>S().componentProps),{$$events:{closeToast:lt}}))})),De(t,e)},bt=t=>{var n=wr(),r=et(n),o=t=>{var n=hr(),r=tt(n),o=t=>{var n=Ae();Qe(et(n),e,"loading-icon",{},null),De(t,n)};He(r,(t=>{!S().promise&&"loading"!==ce(f)||S().icon||t(o)}));var i=nt(r,2),l=t=>{var e=Ae();tn(et(e),(()=>S().icon),((t,e)=>{e(t,{})})),De(t,e)},a=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"success-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"error-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"warning-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"info-icon",{},null),De(t,n)};He(r,(t=>{"info"===ce(f)&&t(o)}),!0),De(t,n)};He(r,(t=>{"warning"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(r,(t=>{"error"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(r,(t=>{"success"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(i,(t=>{S().icon?t(l):t(a,!1)})),De(t,n)};He(r,(t=>{("default"!==ce(f)||S().icon||S().promise)&&t(o)}));var i=nt(r,2),l=tt(i),a=t=>{var e=gr(),n=tt(e),r=t=>{var e=Ae();tn(et(e),(()=>S().title),((t,e)=>{e(t,qn((()=>S().componentProps)))})),De(t,e)},o=t=>{var e=ze();ht((()=>We(e,S().title))),De(t,e)};He(n,(t=>{"string"!=typeof S().title?t(r):t(o,!1)})),ht((t=>on(e,1,nn(t))),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.title,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.title)}],ot),De(t,e)};He(l,(t=>{S().title&&t(a)}));var s=nt(l,2),u=t=>{var e=mr(),n=tt(e),r=t=>{var e=Ae();tn(et(e),(()=>S().description),((t,e)=>{e(t,qn((()=>S().componentProps)))})),De(t,e)},o=t=>{var e=ze();ht((()=>We(e,S().description))),De(t,e)};He(n,(t=>{"string"!=typeof S().description?t(r):t(o,!1)})),ht((t=>on(e,1,nn(t))),[()=>{var t,e;return sr(F(),ce(p),null==(t=R())?void 0:t.description,null==(e=S().classes)?void 0:e.description)}],ot),De(t,e)};He(s,(t=>{S().description&&t(u)}));var c=nt(i,2),d=t=>{var e=yr(),n=tt(e);ht((t=>{sn(e,"style",A()),on(e,1,nn(t)),We(n,S().cancel.label)}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.cancelButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.cancelButton)}],ot),Me("click",e,(()=>{var t;lt(),(null==(t=S().cancel)?void 0:t.onClick)&&S().cancel.onClick()})),De(t,e)};He(c,(t=>{S().cancel&&t(d)}));var v=nt(c,2),h=t=>{var e=br(),n=tt(e);ht((t=>{sn(e,"style",q()),on(e,1,nn(t)),We(n,S().action.label)}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.actionButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.actionButton)}],ot),Me("click",e,(t=>{var e;null==(e=S().action)||e.onClick(t),t.defaultPrevented||lt()})),De(t,e)};He(v,(t=>{S().action&&t(h)})),De(t,n)};He(mt,(t=>{S().component?t(yt):t(bt,!1)})),kn(dt,(t=>L(J,t)),(()=>ce(J))),ht(((t,e,o)=>{var i;sn(dt,"aria-live",S().important?"assertive":"polite"),on(dt,1,nn(t)),sn(dt,"data-styled",!(S().component||(null==(i=S())?void 0:i.unstyled)||H())),sn(dt,"data-mounted",ce(V)),sn(dt,"data-promise",e),sn(dt,"data-removed",ce(G)),sn(dt,"data-visible",ce(s)),sn(dt,"data-y-position",ce(g)[0]),sn(dt,"data-x-position",ce(g)[1]),sn(dt,"data-index",P()),sn(dt,"data-front",ce(a)),sn(dt,"data-swiping",ce(K)),sn(dt,"data-type",ce(f)),sn(dt,"data-invert",M()),sn(dt,"data-swipe-out",ce(U)),sn(dt,"data-expanded",o),sn(dt,"style",`${n.style} ${S().style}`),fn(dt,"--index",P()),fn(dt,"--toasts-before",P()),fn(dt,"--z-index",On(x,"$toasts",r).length-P()),fn(dt,"--offset",`${ce(G)?ce(Z):ce(X)}px`),fn(dt,"--initial-height",`${ce(Y)}px`)}),[()=>{var t,e,r,o,i,l;return sr(n.class,ce(v),null==(t=R())?void 0:t.toast,null==(r=null==(e=S())?void 0:e.classes)?void 0:r.toast,null==(o=R())?void 0:o[ce(f)],null==(l=null==(i=S())?void 0:i.classes)?void 0:l[ce(f)])},()=>Boolean(S().promise),()=>Boolean(I()||T()&&ce(V))],ot),Me("pointerdown",dt,(function(t){if(ce(y))return;L(Z,ce(X));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(L(K,!0),it={x:t.clientX,y:t.clientY})})),Me("pointerup",dt,(function(){var t,e,n;if(ce(U))return;it=null;const r=Number((null==(t=ce(J))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return L(Z,ce(X)),null==(n=(e=S()).onDismiss)||n.call(e,S()),lt(),void L(U,!0);ce(J).style.setProperty("--swipe-amount","0px"),L(K,!1)})),Me("pointermove",dt,(function(t){if(!it)return;const e=t.clientY-it.y,n=t.clientX-it.x,r=("top"===ce(g)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?ce(J).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(it=null)})),De(t,dt),O(),o()}var $r=Te("<ol></ol>"),kr=Te('<section class="svelte-1fo5d1m"></section>');function Cr(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]),r=An(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);N(e,!1);const[o,i]=Bn(),l=()=>On(C,"$toasts",o),a=D(),s=D(),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=Ln(e,"invert",8,!1),v=Ln(e,"theme",8,"light"),p=Ln(e,"position",8,"bottom-right"),h=Ln(e,"hotkey",24,(()=>["altKey","KeyT"])),g=Ln(e,"containerAriaLabel",8,"Notifications"),m=Ln(e,"richColors",8,!1),y=Ln(e,"expand",8,!1),b=Ln(e,"duration",8,4e3),w=Ln(e,"visibleToasts",8,3),x=Ln(e,"closeButton",8,!1),_=Ln(e,"toastOptions",24,(()=>({}))),$=Ln(e,"offset",8,null),k=Ln(e,"dir",24,d);const{toasts:C,heights:S,reset:P}=fr;let I=D(!1),E=D(!1),T=D("system"!==(q=v())?q:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),B=D(),z=null,A=!1;var q;function W(t){A&&!t.currentTarget.contains(t.relatedTarget)&&(A=!1,z&&(z.focus({preventScroll:!0}),z=null))}function F(t){A||(A=!0,z=t.relatedTarget)}!function(t){null===j&&M(),Wn((()=>()=>de(t)))}((()=>{ce(B)&&z&&(z.focus({preventScroll:!0}),z=null,A=!1)})),Wn((()=>{P();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(L(I,!0),null==(e=ce(B))||e.focus()),"Escape"!==t.code||document.activeElement!==ce(B)&&!(null==(n=ce(B))?void 0:n.contains(document.activeElement))||L(I,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),ft((()=>(pe(p()),l())),(()=>{L(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),ft((()=>pe(h())),(()=>{L(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),ft((()=>l()),(()=>{l().length<=1&&L(I,!1)})),ft((()=>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)}})),ft((()=>pe(v())),(()=>{if("system"!==v()&&L(T,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L(T,u):L(T,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{L(T,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),vt(),Cn();var R=Ae(),H=et(R),V=t=>{var i=kr();sn(i,"tabindex",-1),Ue(i,5,(()=>ce(a)),Ke,((t,i,a,s)=>{var u=$r();let c;Ue(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===ce(i)))),(t=>t.id),((t,n,r,o)=>{const l=ot((()=>{var t;return(null==(t=_())?void 0:t.actionButtonStyle)||""})),a=ot((()=>{var t;return(null==(t=_())?void 0:t.cancelButtonStyle)||""})),s=ot((()=>{var t;return(null==(t=_())?void 0:t.class)||""})),u=ot((()=>{var t;return(null==(t=_())?void 0:t.descriptionClass)||""})),c=ot((()=>_().classes||{})),d=ot((()=>{var t;return(null==(t=_())?void 0:t.duration)??b()})),v=ot((()=>_().unstyled||!1));_r(t,{get index(){return ce(r)},get toast(){return ce(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return ce(E)},get position(){return ce(i)},get expandByDefault(){return y()},get expanded(){return ce(I)},get actionButtonStyle(){return ce(l)},get cancelButtonStyle(){return ce(a)},get class(){return ce(s)},get descriptionClass(){return ce(u)},get classes(){return ce(c)},get duration(){return ce(d)},get unstyled(){return ce(v)},$$slots:{"loading-icon":(t,r)=>{var o=Ae();Qe(et(o),e,"loading-icon",{},(t=>{const e=ot((()=>"loading"===ce(n).type));!function(t,e){N(e,!1);let n=Ln(e,"visible",8);const r=Array(12).fill(0);Cn();var o=ar();Ue(tt(o),5,(()=>r),Ke,((t,e)=>{De(t,lr())})),ht((()=>sn(o,"data-visible",n()))),De(t,o),O()}(t,{get visible(){return ce(e)}})})),De(t,o)},"success-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"success-icon",{},(t=>{ir(t,{type:"success"})})),De(t,r)},"error-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"error-icon",{},(t=>{ir(t,{type:"error"})})),De(t,r)},"warning-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"warning-icon",{},(t=>{ir(t,{type:"warning"})})),De(t,r)},"info-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"info-icon",{},(t=>{ir(t,{type:"info"})})),De(t,r)}}})})),kn(u,(t=>L(B,t)),(()=>ce(B))),ht(((t,e,i)=>{var l;c=un(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":ce(T),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r},"svelte-1fo5d1m"),fn(u,"--front-toast-height",`${null==(l=On(S,"$heights",o)[0])?void 0:l.height}px`),fn(u,"--offset","number"==typeof $()?`${$()}px`:$()||"32px"),fn(u,"--width","356px"),fn(u,"--gap","14px"),u.dir=u.dir}),[()=>"auto"===k()?d():k(),()=>ce(i).split("-")[0],()=>ce(i).split("-")[1]],ot),Me("blur",u,W),Me("focus",u,F),Me("mouseenter",u,(()=>L(I,!0))),Me("mousemove",u,(()=>L(I,!0))),Me("mouseleave",u,(()=>{ce(E)||L(I,!1)})),Me("pointerdown",u,(()=>L(E,!0))),Me("pointerup",u,(()=>L(E,!1))),De(t,u)})),ht((()=>sn(i,"aria-label",`${g()} ${ce(s)}`))),De(t,i)};He(H,(t=>{l().length>0&&t(V)})),De(t,R),O(),i()}const Sr=Mn(!1),Pr=Mn("https://sdk.playlight.dev");function Ir(t,e,n){var r;ce(e)?t.preventDefault():(null==(r=n.onClick)||r.call(n,n.game.id),window.open("https://"+n.game.domain,"_blank","noopener"))}function Mr(t,e){var n;t.stopPropagation(),t.preventDefault(),null==(n=e.onClick)||n.call(e,e.game.id),window.open("https://"+e.game.domain,"_blank","noopener")}var jr=Te('<div><p class="text-primary font-bold uppercase">New</p></div>'),Er=Te('<video playsinline="" loop preload="auto"></video>',2),Nr=Te("<button>Play</button>"),Or=Te('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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 class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'),Tr=Te('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');je(["touchstart","click"]);const Br=new class{constructor(){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){vr.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,n){let r="/suggestions";return t&&(r+="/"+t),e&&(r+="?page="+e),n&&(r+="&without="+n),await this.request(r)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+window.location.hostname;return this.currentGame=await this.request(t),{...this.currentGame}}async trackOpen(){const t=window.location.hostname;await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=window.location.hostname;await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}};function zr(t){const e=t-1;return e*e*e+1}function Ar(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}function Dr(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=zr}=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});`}}var qr=(t,e,n)=>{L(e,""),L(n,!ce(n))},Lr=Te('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),Wr=Te('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),Fr=(t,e,n,r)=>{e(n),L(r,!1)},Rr=Te("<button> </button>"),Hr=Te('<div class="space-y-1 p-1"></div>'),Vr=Te('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><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>'),Gr=Te('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg: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="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Kr(t,e){N(e,!0);let n,r=Ln(e,"categories",19,(()=>[])),o=Ln(e,"selectedCategory",15),i=z(!1),l=rt((()=>o()||(r().length>0?r()[0]:"..."))),a=z(""),s=z(void 0),u=rt((()=>ce(a)?r().filter((t=>t.toLowerCase().includes(ce(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d,f=z(H(c[0]));Wn((function(){let t;for(t=Math.floor(Math.random()*(null==c?void 0:c.length));t==d;)t=Math.floor(Math.random()*(null==c?void 0:c.length));L(f,H(c[t])),d=t}));var v=Gr();Me("click",K,(function(t){ce(s)&&!ce(s).contains(t.target)&&n&&!n.contains(t.target)&&L(i,!1)}));var p=tt(v),h=tt(p),g=tt(h),m=nt(h,2);m.__click=[qr,a,i];var y=tt(m),b=tt(y),w=nt(y,2);const x=rt((()=>ce(i)?"rotate-180 transform":""));!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(w,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${ce(x)??""} transition-transform duration-200`}}),kn(m,(t=>n=t),(()=>n));var _=nt(p,2),$=t=>{var e=Vr(),n=tt(e),l=tt(n),c=tt(l);!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(c),{size:18,class:"text-muted-foreground"});var d=nt(c,2),f=tt(nt(n,2)),v=t=>{De(t,Lr())},p=t=>{var e=Ae(),n=et(e),r=t=>{De(t,Wr())},l=t=>{var e=Hr();Ue(e,28,(()=>ce(u)),(t=>t),((t,e)=>{var n=Rr();n.__click=[Fr,o,e,i];var r,l,a,s,u,c,d,f,v=tt(n);ht((()=>{on(n,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=e?"hover:bg-muted-foreground/20":"")??""} ${(o()==e?"bg-white text-black":"text-white")??""}`),We(v,e)})),r=n,l=()=>Dr,a=()=>({duration:150}),f=null,(d=Ve).a??(d.a={element:r,measure(){s=this.element.getBoundingClientRect()},apply(){if(null==c||c.abort(),u=this.element.getBoundingClientRect(),s.left!==u.left||s.right!==u.right||s.top!==u.top||s.bottom!==u.bottom){const t=l()(this.element,{from:s,to:u},null==a?void 0:a());c=wn(this.element,t,void 0,1,(()=>{null==c||c.abort(),c=void 0}))}},fix(){if(!r.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(r);if("absolute"!==t&&"fixed"!==t){var o=r.style;f={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=e,o.height=n;var i=r.getBoundingClientRect();if(s.left!==i.left||s.top!==i.top){var l=`translate(${s.left-i.left}px, ${s.top-i.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(f){var t=r.style;t.position=f.position,t.width=f.width,t.height=f.height,t.transform=f.transform}}}),d.a.element=r,De(t,n)})),De(t,e)};He(n,(t=>{0===ce(u).length?t(r):t(l,!1)}),!0),De(t,e)};He(f,(t=>{0===r().length?t(v):t(p,!1)})),kn(e,(t=>L(s,t)),(()=>ce(s))),function(t,e,n=e){var r=T();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ce(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),ke||(ke=!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=xn(t)?_n(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==de(e)&&t.value&&n(xn(t)?_n(t.value):t.value),pt((()=>{var n=e();xn(t)&&n===_n(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(d,(()=>ce(a)),(t=>L(a,t))),bn(3,e,(()=>Xn),(()=>({y:-5,duration:250}))),De(t,e)};He(_,(t=>{ce(i)&&t($)})),ht((()=>{We(g,ce(f)),We(b,ce(l))})),bn(3,v,(()=>tr),(()=>({duration:600,delay:50,easing:Ar,start:.95}))),De(t,v),O()}je(["click"]);var Ur=(t,e)=>{localStorage.getItem("playlight_exit_intent_disabled_by_user")?localStorage.removeItem("playlight_exit_intent_disabled_by_user"):localStorage.setItem("playlight_exit_intent_disabled_by_user",!0),L(e,!ce(e))},Zr=Te('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 p-1 px-2 text-primary text-sm"> </p></button>'),Yr=(t,e)=>Tn(Sr,!1),Jr=Te('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Xr=Te('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'),Qr=Te('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'),to=Te('<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"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');function eo(t,e){N(e,!0);const[n,r]=Bn();let o,i=Ln(e,"showIntentToggle",3,!0),l=z(void 0),a=z(!0),s=z(!1),u=z(void 0),c=z(H([])),d=z(H([])),f=z(!0),v=z(1),p=z(!0),h=z(void 0),g=z(!1);async function m(){if(!(ce(a)&&ce(v)>1||ce(s)))try{1===ce(v)?L(a,!0):L(s,!0);const t=ce(g)?null:ce(l),e=await Br.getSuggestions(t,ce(v),window.location.hostname),n=(null==e?void 0:e.games)||[],r=n.filter((t=>!ce(c).some((e=>e.id===t.id))));L(c,H([...ce(c),...r])),n.length<10?!ce(g)&&ce(l)?(L(g,!0),L(v,1),setTimeout((()=>m()),100)):L(p,!1):L(v,ce(v)+1)}catch(t){console.error(t),vr.error("Failed to load games: "+t)}finally{L(a,!1),L(s,!1),ce(p)&&ce(h)&&setTimeout((()=>{const t=ce(h).getBoundingClientRect();!(t.top>=-200&&t.left>=0&&t.bottom<=window.innerHeight+200&&t.right<=window.innerWidth)||ce(a)||ce(s)||m()}),150)}}Wn((()=>(L(f,!Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))),o=new IntersectionObserver((t=>{t[0].isIntersecting&&ce(p)&&!ce(a)&&!ce(s)&&m()}),{rootMargin:"200px"}),()=>null==o?void 0:o.disconnect()))),Wn((async()=>{const t=await Br.getCurrentGameInfo();L(u,H(null==t?void 0:t.category)),await async function(){var t,e,n,r;L(d,H(await Br.getCategories())),!ce(l)&&(null==(t=ce(d))?void 0:t.length)>0&&L(l,H(ce(u)&&(null==(e=ce(d))?void 0:e.includes(ce(u)))?ce(u):null==(r=ce(d))?void 0:r[(null==(n=ce(d))?void 0:n.length)-1]))}()})),ct((()=>{ce(l)&&(L(c,H([])),L(v,1),L(p,!0),L(g,!1),L(a,!0),setTimeout((async()=>{await m(),ce(c).length<10&&await m()}),100))})),ct((()=>{ce(h)&&o&&o.observe(ce(h))}));var y=to();Me("keydown",K,(t=>{"Escape"==t.key&&Tn(Sr,!1)}));var b=tt(y),w=tt(b),x=tt(w),_=tt(nt(w,2)),$=t=>{var e=Zr();e.__click=[Ur,f];var n=tt(e),r=tt(n);ht((()=>We(r,ce(f)?"Ignore exit intent":"Trigger on exit intent"))),De(t,e)};He(_,(t=>{i()&&t($)}));var k=nt(_,2);k.__click=[Yr,()=>On(Sr,"$discoveryOpen",n)],function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(k),{size:24});var C=nt(b,2);Kr(tt(C),{get categories(){return ce(d)},get selectedCategory(){return ce(l)},set selectedCategory(t){L(l,H(t))}});var S=nt(C,2),P=tt(S),I=t=>{var e=Jr();Vn(tt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.5}),De(t,e)},M=t=>{var e=Ae(),n=et(e),r=t=>{De(t,Xr())},o=t=>{var e=Qr(),n=tt(e);Ue(n,17,(()=>ce(c)),Ke,((e,n)=>{!function(e,n){N(n,!0);const[r,o]=Bn();let i=z(!1),l=z(void 0),a=z(!1),s=z(!1),u=z(!1),c=z(!1),d=z(void 0);function f(){ce(i)||ce(c)||function(e,n=1){try{const t=new Audio(e);t.volume=n,t.play()}catch(t){console.error("Error playing sound:",t)}}(On(Pr,"$projectUrl",r)+"/static/sounds/hover-selection.ogg",.25),L(i,!0),ce(l)&&n.game.cover_video_url&&ce(l).play().catch((t=>console.error("Video play error:",t)))}function v(){ce(c)||(L(i,!1),ce(l)&&ce(a)&&ce(l).pause())}ct((()=>{L(c,"ontouchstart"in window)}));var p=Tr();Me("touchstart",G,(()=>L(c,!0)),void 0,!0),Me("touchstart",K,(function(t){ce(d)&&!ce(d).contains(t.target)&&L(i,!1)}),void 0,!0),p.__touchstart=f,p.__click=[Ir,c,n];var h=tt(p),g=t=>{var e=jr();let n;ht((()=>n=on(e,1,"bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity",null,n,{"opacity-0":ce(i)}))),De(t,e)};He(h,(t=>{var e;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(e=n.game)?void 0:e.created_at)&&t(g)}));var m=nt(h,2),y=t=>{var e=Er();let r;e.muted=!0,kn(e,(t=>L(l,t)),(()=>ce(l))),ht((()=>{sn(e,"src",n.game.cover_video_url),r=on(e,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,{"opacity-100":ce(i)&&ce(a)&&n.game.cover_video_url})})),Me("loadeddata",e,(()=>{L(a,!0)})),De(t,e)};He(m,(t=>{n.game.cover_video_url&&t(y)}));var b=nt(m,2);let w;var x=nt(b,2),_=t=>{var e=Nr();let r;e.__click=[Mr,n],ht((()=>r=on(e,1,"bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all",null,r,{"opacity-0":ce(i)}))),De(t,e)};He(x,(t=>{ce(c)&&t(_)}));var $=nt(x,2),k=t=>{var e=Or(),r=tt(e),o=tt(r),i=tt(o),l=tt(nt(o,2));ht((()=>{We(i,n.game.name),We(l,n.game.description||"No description.")})),bn(3,e,(()=>Qn)),De(t,e)};He($,(t=>{ce(i)&&t(k)}));var C=nt($,2);let S;kn(p,(t=>L(d,t)),(()=>ce(d))),ht((()=>{on(p,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(ce(s)?"":"animate-pulse")??""}`,"svelte-rulnq9"),sn(b,"src",n.game.cover_image_url),w=on(b,1,"prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9",null,w,{"opacity-100":ce(s)&&(!ce(i)||!ce(a)||!n.game.cover_video_url)}),sn(C,"src",n.game.logo_url),S=on(C,1,"absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9",null,S,{"opacity-100":ce(u)})})),Me("mouseenter",p,f),Me("focus",p,f),Me("mouseleave",p,v),Me("blur",p,v),Me("load",b,(()=>{L(s,!0)})),Me("load",C,(()=>{L(u,!0)})),De(e,p),O(),o()}(e,{get game(){return ce(n)},onClick:()=>Br.trackClick(ce(n).id)})}));var r=nt(n,2),o=tt(r),i=t=>{Vn(t,{class:"animate-spin opacity-75",size:30,strokeWidth:2.5})};He(o,(t=>{ce(s)&&t(i)})),kn(r,(t=>L(h,t)),(()=>ce(h))),De(t,e)};He(n,(t=>{0!==ce(c).length||ce(a)?t(o,!1):t(r)}),!0),De(t,e)};He(P,(t=>{ce(a)&&0===ce(c).length?t(I):t(M,!1)}));var j=tt(nt(S,2));!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({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=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(nt(tt(j)),{size:14,style:"margin-top: 1px;"}),ht((()=>sn(x,"src",On(Pr,"$projectUrl",n)+"/static/images/logo-white-small.png"))),bn(3,y,(()=>Jn),(()=>({duration:250}))),De(t,y),O(),r()}je(["click"]);var no=Te('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');je(["mouseover"]);var ro=Te("<!> <!> <!> <!>",1);function oo(t,e){var n,r,o,i;N(e,!0);const[l,a]=Bn(),s=()=>On(Sr,"$discoveryOpen",l);let u=H(null==(r=null==(n=e.config)?void 0:n.button)?void 0:r.position),c=H(null==(i=null==(o=e.config)?void 0:o.button)?void 0:i.visible);function d(){Tn(Sr,!0),Br.trackOpen()}var f=ro(),v=et(f);!function(t,e){N(e,!0);let n=Ln(e,"position",3,"bottom-right"),r=Ln(e,"visible",3,!0);var o=Ae(),i=et(o),l=t=>{var r=Kn();r.__click=[Gn,e];var o=tt(r);!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,qn({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=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),ht((()=>on(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),De(t,r)};He(i,(t=>{r()&&t(l)})),De(t,o),O()}(v,{get position(){return u},get visible(){return c},onClick:d});var p=nt(v,2),h=t=>{const n=rt((()=>{var t,n;return null==(n=null==(t=e.config)?void 0:t.exitIntent)?void 0:n.enabled}));eo(t,{get showIntentToggle(){return ce(n)}})};He(p,(t=>{s()&&t(h)}));var g=nt(p,2);const m=rt((()=>{var t,n;return null==(n=null==(t=e.config)?void 0:t.exitIntent)?void 0:n.enabled}));!function(t,e){N(e,!0);let n,r=Ln(e,"enabled",3,!0),o=!1;Wn((()=>{"undefined"!=typeof window&&(n=window.innerHeight)}));var i=no();Me("mouseleave",K,(()=>{o=!1})),Me("mousemove",K,(t=>{const e=t.clientY;if(!o)return o=!0,void(n=e);n=e})),i.__mouseover=t=>{var i;const l=t.clientY;l<n&&o&&r()&&!localStorage.getItem("playlight_exit_intent_disabled_by_user")&&(null==(i=e.onIntent)||i.call(e)),n=l},De(t,i),O()}(g,{get enabled(){return ce(m)},onIntent:()=>{s()||d()}}),Cr(nt(g,2),{}),De(t,f),O(),a()}const io={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0}};let lo={...io};function ao(t={}){return lo=so(io,t),lo}function so(t,e){const n={...t};return uo(t)&&uo(e)&&Object.keys(e).forEach((r=>{uo(e[r])?r in t?n[r]=so(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function uo(t){return t&&"object"==typeof t&&!Array.isArray(t)}const co=new class{constructor(){this.container=null,this.app=null,this.isInitialized=!1,this.config=null,this.api=Br}async init(t={}){if(!this.isInitialized)return"undefined"==typeof window?console.error("Playlight cannot run on the server, as it depends browser APIs."):(this.config=ao(t),this.container=document.createElement("div"),this.container.id="playlight-sdk-container",this.container.className="playlight-sdk-container",document.body.appendChild(this.container),this.app=function(t,e){return function(t,{target:e,anchor:r,props:i={},events:l,context:a,intro:s=!0}){!function(){if(void 0===G){G=window,K=document,U=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype;Z=o(e,"firstChild").get,Y=o(e,"nextSibling").get,t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}();var u=new Set,c=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!u.has(r)){u.add(r);var o=_e(r);e.addEventListener(r,Ee,{passive:o});var i=Fe.get(r);void 0===i?(document.addEventListener(r,Ee,{passive:o}),Fe.set(r,1)):Fe.set(r,i+1)}}};c(n(Se)),Pe.add(c);var d=void 0,f=function(t){const e=st(64,t,!0);return(t={})=>new Promise((n=>{t.outro?_t(e,(()=>{wt(e),n(void 0)})):(wt(e),n(void 0))}))}((()=>{var n=r??e.appendChild(J());return mt((()=>{a&&(N({}),j.c=a),l&&(i.$$events=l),qe=s,d=t(n,i)||{},qe=!0,a&&O()})),()=>{var t;for(var o of u){e.removeEventListener(o,Ee);var i=Fe.get(o);0==--i?(document.removeEventListener(o,Ee),Fe.delete(o)):Fe.set(o,i)}Pe.delete(c),n!==r&&(null==(t=n.parentNode)||t.removeChild(n))}}));return Re.set(d,f),d}(t,e)}(oo,{target:this.container,props:{config:this.config}}),await this.api.getCurrentGameInfo(),this.isInitialized=!0,this)}setDiscovery(t){this.isInitialized&&(Sr.set(t),jn(Sr)&&Br.trackOpen())}};return"undefined"!=typeof window&&(window.playlightSDK=co),co}();
|
|
22
|
+
const Kn={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 Un=Le("<svg><!><!></svg>");function Zn(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]),r=Fn(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);A(e,!1);let o=Vn(e,"name",8,void 0),i=Vn(e,"color",8,"currentColor"),l=Vn(e,"size",8,24),a=Vn(e,"strokeWidth",8,2),s=Vn(e,"absoluteStrokeWidth",8,!1),u=Vn(e,"iconNode",24,(()=>[]));En();var c=Un();let d;var f=it(c);Qe(f,1,u,Xe,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=Fe();n=lt(d),r=()=>he(e)[0],o=(t,n)=>{let r;wt((()=>r=pn(t,r,{...he(e)[1]},void 0,t.namespaceURI===O,t.nodeName.includes("-"))))},s=null,u=n,c=Ye,xt((()=>{const t=r()||null;var e=O;if(t!==i){var n=Ye;Je(c),a&&(null===t?Pt(a,(()=>{a=null,l=null})):t===l?Et(a):(Ct(a),Ve(!1))),t&&t!==l&&(a=_t((()=>{if(De(s=document.createElementNS(e,t),s),o){var n=s.appendChild(nt());o(s,n)}Kt.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),Ve(!0),Je(n)}}),k),Re(t,d)})),on(at(f),e,"default",{},null),wt(((t,e)=>d=pn(c,d,{...Kn,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e},void 0,!0)),[()=>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)],ut),Re(t,c),D()}function Yn(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}var Jn=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Xn=qe('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');function Qn(t){const e=t-1;return e*e*e+1}function tr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function er(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function nr(t,{delay:e=0,duration:n=400,easing:r=tr,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]=er(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function rr(t,{delay:e=0,duration:n=400,easing:r=Qn,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]=er(o),[v,p]=er(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 or(t,{delay:e=0,duration:n=400,easing:r=Qn,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 ir(t,{delay:e=0,duration:n=400,easing:r=Qn,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`}}Be(["click"]);var lr=Le('<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>'),ar=Le('<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>'),sr=Le('<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>'),ur=Le('<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 cr(t,e){let n=Vn(e,"type",8,"success");var r=Fe(),o=lt(r),i=t=>{Re(t,lr())},l=t=>{var e=Fe(),r=lt(e),o=t=>{Re(t,ar())},i=t=>{var e=Fe(),r=lt(e),o=t=>{Re(t,sr())},i=t=>{var e=Fe(),r=lt(e),o=t=>{Re(t,ur())},i=t=>{};Ze(r,(t=>{"warning"===n()?t(o):t(i,!1)}),!0),Re(t,e)};Ze(r,(t=>{"info"===n()?t(o):t(i,!1)}),!0),Re(t,e)};Ze(r,(t=>{"error"===n()?t(o):t(i,!1)}),!0),Re(t,e)};Ze(o,(t=>{"success"===n()?t(i):t(l,!1)})),Re(t,r)}var dr=qe('<div class="sonner-loading-bar"></div>'),fr=qe('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function vr(...t){return t.filter(Boolean).join(" ")}const pr="undefined"!=typeof document;function hr(t){const e=Tn(t);return{subscribe:e.subscribe,set:function(t){pr&&e.set(t)},update:function(t){pr&&e.update(t)}}}let gr=0;const mr=function(){const t=hr([]),e=hr([]);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:gr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return Bn(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)||gr++;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!==Bn(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}}(),yr=Object.assign((function(t,e){return mr.create({message:t,...e})}),{success:mr.success,info:mr.info,warning:mr.warning,error:mr.error,custom:mr.custom,message:mr.message,promise:mr.promise,dismiss:mr.dismiss,loading:mr.loading});var br=qe('<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>'),wr=qe('<div data-icon=""><!> <!></div>'),xr=qe('<div data-title=""><!></div>'),_r=qe('<div data-description=""><!></div>'),$r=qe('<button data-button="" data-cancel=""> </button>'),kr=qe('<button data-button=""> </button>'),Cr=qe('<!> <div data-content=""><!> <!></div> <!> <!>',1),Sr=qe('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function Pr(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);A(e,!1);const[r,o]=Ln(),i=()=>Dn(_,"$heights",r),l=()=>Dn(he(ct),"$effect",r),a=R(void 0,!0),s=R(void 0,!0),u=R(void 0,!0),c=R(void 0,!0),d=R(void 0,!0),f=R(void 0,!0),v=R(void 0,!0),p=R(void 0,!0),g=R(void 0,!0),m=R(void 0,!0),y=R(void 0,!0),b=R(void 0,!0),w={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:x,heights:_,removeHeight:$,setHeight:k,remove:C}=mr;let S=Vn(e,"toast",9),P=Vn(e,"index",9),I=Vn(e,"expanded",9),M=Vn(e,"invert",13),E=Vn(e,"position",9),j=Vn(e,"visibleToasts",9),N=Vn(e,"expandByDefault",9),O=Vn(e,"closeButton",9),T=Vn(e,"interacting",9),B=Vn(e,"cancelButtonStyle",9,""),z=Vn(e,"actionButtonStyle",9,""),q=Vn(e,"duration",9,4e3),L=Vn(e,"descriptionClass",9,""),W=Vn(e,"classes",29,(()=>({}))),F=Vn(e,"unstyled",9,!1),H=R(!1,!0),G=R(!1,!0),K=R(!1,!0),U=R(!1,!0),Z=R(0,!0),Y=R(0,!0),J=R(void 0,!0),X=R(0,!0),Q=0,tt=0,et=null;function nt(){V(G,!0),V(Z,he(X)),$(S().id),setTimeout((()=>{C(S().id)}),200)}let rt=R(void 0,!0),ot=R(S().duration||q()||4e3,!0);function st(){Q=(new Date).getTime(),V(rt,setTimeout((()=>{var t,e;null==(e=(t=S()).onAutoClose)||e.call(t,S()),nt()}),he(ot)))}let ct=R(void 0,!0);Gn((()=>{V(H,!0);const t=he(J).getBoundingClientRect().height;return V(Y,t),k({toastId:S().id,height:t}),()=>$(S().id)})),mt((()=>be(W())),(()=>{W({...w,...W()})})),mt((()=>be(P())),(()=>{V(a,0===P())})),mt((()=>(be(P()),be(j()))),(()=>{V(s,P()+1<=j())})),mt((()=>be(S())),(()=>{V(u,S().title)})),mt((()=>be(S())),(()=>{V(c,S().description)})),mt((()=>be(S())),(()=>{V(d,S().type)})),mt((()=>be(S())),(()=>{V(f,S().class||"")})),mt((()=>be(S())),(()=>{V(v,S().descriptionClass||"")})),mt((()=>(i(),be(S()))),(()=>{V(p,i().findIndex((t=>t.toastId===S().id))||0)})),mt((()=>be(E())),(()=>{V(g,E().split("-"))})),mt((()=>(i(),he(p))),(()=>{V(m,i().reduce(((t,e,n)=>n>=he(p)?t:t+e.height),0))})),mt((()=>(be(M()),be(S()))),(()=>{M(S().invert||M())})),mt((()=>he(d)),(()=>{V(y,"loading"===he(d))})),mt((()=>(he(p),he(m))),(()=>{V(X,Math.round(14*he(p)+he(m)))})),mt((()=>(he(u),he(c))),(()=>{he(u),he(c),async function(){if(!he(H))return;let t;await async function(){await Promise.resolve(),function(){for(zt();Rt.length>0;)Dt=!0,de(),zt()}()}(),t=I()||N()?1:1-.05*P(),he(J).style.setProperty("height","auto");const e=he(J).offsetHeight,n=he(J).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;he(J).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,V(Y,o),k({toastId:S().id,height:o})}()})),mt((()=>(be(S()),he(rt),be(q()))),(()=>{S().updated&&(clearTimeout(he(rt)),V(ot,S().duration||q()||4e3),st())})),mt((()=>(be(S()),he(d))),(()=>{V(b,S().promise&&"loading"===he(d)||S().duration===Number.POSITIVE_INFINITY)})),mt((()=>(he(b),be(I()),be(T()),he(rt))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=h)}(V(ct,(t=()=>(he(b)||(I()||T()?function(){if(tt<Q){const t=(new Date).getTime()-Q;V(ot,he(ot)-t)}tt=(new Date).getTime()}():st()),()=>clearTimeout(he(rt))),{subscribe:t})),"$effect",r)})),mt((()=>l()),(()=>{l()})),mt((()=>be(S())),(()=>{S().delete&&nt()})),yt(),En(!0);var dt=Sr();vn(dt,"tabindex",0);var ft=it(dt),vt=t=>{var e=br();wt((t=>{vn(e,"data-disabled",he(y)),cn(e,1,sn(t))}),[()=>{var t,e,n;return vr(null==(t=W())?void 0:t.closeButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.closeButton)}],ut),Te("click",e,(function(...t){var e;null==(e=he(y)?void 0:()=>{var t,e;nt(),null==(e=(t=S()).onDismiss)||e.call(t,S())})||e.apply(this,t)})),Re(t,e)};Ze(ft,(t=>{O()&&!S().component&&t(vt)}));var pt=at(ft,2),ht=t=>{var e=Fe();ln(lt(e),(()=>S().component),((t,e)=>{e(t,Hn((()=>S().componentProps),{$$events:{closeToast:nt}}))})),Re(t,e)},gt=t=>{var n=Cr(),r=lt(n),o=t=>{var n=wr(),r=it(n),o=t=>{var n=Fe();on(lt(n),e,"loading-icon",{},null),Re(t,n)};Ze(r,(t=>{!S().promise&&"loading"!==he(d)||S().icon||t(o)}));var i=at(r,2),l=t=>{var e=Fe();ln(lt(e),(()=>S().icon),((t,e)=>{e(t,{})})),Re(t,e)},a=t=>{var n=Fe(),r=lt(n),o=t=>{var n=Fe();on(lt(n),e,"success-icon",{},null),Re(t,n)},i=t=>{var n=Fe(),r=lt(n),o=t=>{var n=Fe();on(lt(n),e,"error-icon",{},null),Re(t,n)},i=t=>{var n=Fe(),r=lt(n),o=t=>{var n=Fe();on(lt(n),e,"warning-icon",{},null),Re(t,n)},i=t=>{var n=Fe(),r=lt(n),o=t=>{var n=Fe();on(lt(n),e,"info-icon",{},null),Re(t,n)};Ze(r,(t=>{"info"===he(d)&&t(o)}),!0),Re(t,n)};Ze(r,(t=>{"warning"===he(d)?t(o):t(i,!1)}),!0),Re(t,n)};Ze(r,(t=>{"error"===he(d)?t(o):t(i,!1)}),!0),Re(t,n)};Ze(r,(t=>{"success"===he(d)?t(o):t(i,!1)}),!0),Re(t,n)};Ze(i,(t=>{S().icon?t(l):t(a,!1)})),Re(t,n)};Ze(r,(t=>{("default"!==he(d)||S().icon||S().promise)&&t(o)}));var i=at(r,2),l=it(i),a=t=>{var e=xr(),n=it(e),r=t=>{var e=Fe();ln(lt(e),(()=>S().title),((t,e)=>{e(t,Hn((()=>S().componentProps)))})),Re(t,e)},o=t=>{var e=We();wt((()=>Ge(e,S().title))),Re(t,e)};Ze(n,(t=>{"string"!=typeof S().title?t(r):t(o,!1)})),wt((t=>cn(e,1,sn(t))),[()=>{var t,e,n;return vr(null==(t=W())?void 0:t.title,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.title)}],ut),Re(t,e)};Ze(l,(t=>{S().title&&t(a)}));var s=at(l,2),u=t=>{var e=_r(),n=it(e),r=t=>{var e=Fe();ln(lt(e),(()=>S().description),((t,e)=>{e(t,Hn((()=>S().componentProps)))})),Re(t,e)},o=t=>{var e=We();wt((()=>Ge(e,S().description))),Re(t,e)};Ze(n,(t=>{"string"!=typeof S().description?t(r):t(o,!1)})),wt((t=>cn(e,1,sn(t))),[()=>{var t,e;return vr(L(),he(v),null==(t=W())?void 0:t.description,null==(e=S().classes)?void 0:e.description)}],ut),Re(t,e)};Ze(s,(t=>{S().description&&t(u)}));var c=at(i,2),f=t=>{var e=$r(),n=it(e);wt((t=>{vn(e,"style",B()),cn(e,1,sn(t)),Ge(n,S().cancel.label)}),[()=>{var t,e,n;return vr(null==(t=W())?void 0:t.cancelButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.cancelButton)}],ut),Te("click",e,(()=>{var t;nt(),(null==(t=S().cancel)?void 0:t.onClick)&&S().cancel.onClick()})),Re(t,e)};Ze(c,(t=>{S().cancel&&t(f)}));var p=at(c,2),h=t=>{var e=kr(),n=it(e);wt((t=>{vn(e,"style",z()),cn(e,1,sn(t)),Ge(n,S().action.label)}),[()=>{var t,e,n;return vr(null==(t=W())?void 0:t.actionButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.actionButton)}],ut),Te("click",e,(t=>{var e;null==(e=S().action)||e.onClick(t),t.defaultPrevented||nt()})),Re(t,e)};Ze(p,(t=>{S().action&&t(h)})),Re(t,n)};Ze(pt,(t=>{S().component?t(ht):t(gt,!1)})),Mn(dt,(t=>V(J,t)),(()=>he(J))),wt(((t,e,o)=>{var i;vn(dt,"aria-live",S().important?"assertive":"polite"),cn(dt,1,sn(t)),vn(dt,"data-styled",!(S().component||(null==(i=S())?void 0:i.unstyled)||F())),vn(dt,"data-mounted",he(H)),vn(dt,"data-promise",e),vn(dt,"data-removed",he(G)),vn(dt,"data-visible",he(s)),vn(dt,"data-y-position",he(g)[0]),vn(dt,"data-x-position",he(g)[1]),vn(dt,"data-index",P()),vn(dt,"data-front",he(a)),vn(dt,"data-swiping",he(K)),vn(dt,"data-type",he(d)),vn(dt,"data-invert",M()),vn(dt,"data-swipe-out",he(U)),vn(dt,"data-expanded",o),vn(dt,"style",`${n.style} ${S().style}`),mn(dt,"--index",P()),mn(dt,"--toasts-before",P()),mn(dt,"--z-index",Dn(x,"$toasts",r).length-P()),mn(dt,"--offset",`${he(G)?he(Z):he(X)}px`),mn(dt,"--initial-height",`${he(Y)}px`)}),[()=>{var t,e,r,o,i,l;return vr(n.class,he(f),null==(t=W())?void 0:t.toast,null==(r=null==(e=S())?void 0:e.classes)?void 0:r.toast,null==(o=W())?void 0:o[he(d)],null==(l=null==(i=S())?void 0:i.classes)?void 0:l[he(d)])},()=>Boolean(S().promise),()=>Boolean(I()||N()&&he(H))],ut),Te("pointerdown",dt,(function(t){if(he(y))return;V(Z,he(X));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(V(K,!0),et={x:t.clientX,y:t.clientY})})),Te("pointerup",dt,(function(){var t,e,n;if(he(U))return;et=null;const r=Number((null==(t=he(J))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return V(Z,he(X)),null==(n=(e=S()).onDismiss)||n.call(e,S()),nt(),void V(U,!0);he(J).style.setProperty("--swipe-amount","0px"),V(K,!1)})),Te("pointermove",dt,(function(t){if(!et)return;const e=t.clientY-et.y,n=t.clientX-et.x,r=("top"===he(g)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?he(J).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(et=null)})),Re(t,dt),D(),o()}var Ir=qe("<ol></ol>"),Mr=qe('<section class="svelte-1fo5d1m"></section>');function Er(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]),r=Fn(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);A(e,!1);const[o,i]=Ln(),l=()=>Dn(C,"$toasts",o),a=R(),s=R(),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=Vn(e,"invert",8,!1),v=Vn(e,"theme",8,"light"),p=Vn(e,"position",8,"bottom-right"),h=Vn(e,"hotkey",24,(()=>["altKey","KeyT"])),g=Vn(e,"containerAriaLabel",8,"Notifications"),m=Vn(e,"richColors",8,!1),y=Vn(e,"expand",8,!1),b=Vn(e,"duration",8,4e3),w=Vn(e,"visibleToasts",8,3),x=Vn(e,"closeButton",8,!1),_=Vn(e,"toastOptions",24,(()=>({}))),$=Vn(e,"offset",8,null),k=Vn(e,"dir",24,d);const{toasts:C,heights:S,reset:P}=mr;let I=R(!1),M=R(!1),E=R("system"!==(z=v())?z:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),j=R(),N=null,O=!1;var z;function q(t){O&&!t.currentTarget.contains(t.relatedTarget)&&(O=!1,N&&(N.focus({preventScroll:!0}),N=null))}function L(t){O||(O=!0,N=t.relatedTarget)}!function(t){null===B&&T(),Gn((()=>()=>ge(t)))}((()=>{he(j)&&N&&(N.focus({preventScroll:!0}),N=null,O=!1)})),Gn((()=>{P();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(V(I,!0),null==(e=he(j))||e.focus()),"Escape"!==t.code||document.activeElement!==he(j)&&!(null==(n=he(j))?void 0:n.contains(document.activeElement))||V(I,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),mt((()=>(be(p()),l())),(()=>{V(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),mt((()=>be(h())),(()=>{V(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),mt((()=>l()),(()=>{l().length<=1&&V(I,!1)})),mt((()=>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)}})),mt((()=>be(v())),(()=>{if("system"!==v()&&V(E,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V(E,u):V(E,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{V(E,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),yt(),En();var W=Fe(),F=lt(W),H=t=>{var i=Mr();vn(i,"tabindex",-1),Qe(i,5,(()=>he(a)),Xe,((t,i,a,s)=>{var u=Ir();let c;Qe(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===he(i)))),(t=>t.id),((t,n,r,o)=>{const l=ut((()=>{var t;return(null==(t=_())?void 0:t.actionButtonStyle)||""})),a=ut((()=>{var t;return(null==(t=_())?void 0:t.cancelButtonStyle)||""})),s=ut((()=>{var t;return(null==(t=_())?void 0:t.class)||""})),u=ut((()=>{var t;return(null==(t=_())?void 0:t.descriptionClass)||""})),c=ut((()=>_().classes||{})),d=ut((()=>{var t;return(null==(t=_())?void 0:t.duration)??b()})),v=ut((()=>_().unstyled||!1));Pr(t,{get index(){return he(r)},get toast(){return he(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return he(M)},get position(){return he(i)},get expandByDefault(){return y()},get expanded(){return he(I)},get actionButtonStyle(){return he(l)},get cancelButtonStyle(){return he(a)},get class(){return he(s)},get descriptionClass(){return he(u)},get classes(){return he(c)},get duration(){return he(d)},get unstyled(){return he(v)},$$slots:{"loading-icon":(t,r)=>{var o=Fe();on(lt(o),e,"loading-icon",{},(t=>{const e=ut((()=>"loading"===he(n).type));!function(t,e){A(e,!1);let n=Vn(e,"visible",8);const r=Array(12).fill(0);En();var o=fr();Qe(it(o),5,(()=>r),Xe,((t,e)=>{Re(t,dr())})),wt((()=>vn(o,"data-visible",n()))),Re(t,o),D()}(t,{get visible(){return he(e)}})})),Re(t,o)},"success-icon":(t,n)=>{var r=Fe();on(lt(r),e,"success-icon",{},(t=>{cr(t,{type:"success"})})),Re(t,r)},"error-icon":(t,n)=>{var r=Fe();on(lt(r),e,"error-icon",{},(t=>{cr(t,{type:"error"})})),Re(t,r)},"warning-icon":(t,n)=>{var r=Fe();on(lt(r),e,"warning-icon",{},(t=>{cr(t,{type:"warning"})})),Re(t,r)},"info-icon":(t,n)=>{var r=Fe();on(lt(r),e,"info-icon",{},(t=>{cr(t,{type:"info"})})),Re(t,r)}}})})),Mn(u,(t=>V(j,t)),(()=>he(j))),wt(((t,e,i)=>{var l;c=pn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":he(E),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r},"svelte-1fo5d1m"),mn(u,"--front-toast-height",`${null==(l=Dn(S,"$heights",o)[0])?void 0:l.height}px`),mn(u,"--offset","number"==typeof $()?`${$()}px`:$()||"32px"),mn(u,"--width","356px"),mn(u,"--gap","14px"),u.dir=u.dir}),[()=>"auto"===k()?d():k(),()=>he(i).split("-")[0],()=>he(i).split("-")[1]],ut),Te("blur",u,q),Te("focus",u,L),Te("mouseenter",u,(()=>V(I,!0))),Te("mousemove",u,(()=>V(I,!0))),Te("mouseleave",u,(()=>{he(M)||V(I,!1)})),Te("pointerdown",u,(()=>V(M,!0))),Te("pointerup",u,(()=>V(M,!1))),Re(t,u)})),wt((()=>vn(i,"aria-label",`${g()} ${he(s)}`))),Re(t,i)};Ze(F,(t=>{l().length>0&&t(H)})),Re(t,W),D(),i()}const jr=Tn(!1),Nr=Tn("https://sdk.playlight.dev");function Or(t,e,n){var r;he(e)?t.preventDefault():(null==(r=n.onClick)||r.call(n,n.game.id),window.open("https://"+n.game.domain,"_blank","noopener"))}function Tr(t,e){var n;t.stopPropagation(),t.preventDefault(),null==(n=e.onClick)||n.call(e,e.game.id),window.open("https://"+e.game.domain,"_blank","noopener")}var Br=qe('<div><p class="text-primary font-bold uppercase">New</p></div>'),zr=qe('<video playsinline="" loop preload="auto"></video>',2),Ar=qe("<button>Play</button>"),Dr=qe('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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 class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'),qr=qe('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');Be(["touchstart","click"]);const Lr=new(n=class{constructor(){var e,n,o;e=this,(n=t).has(e)?r("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,o),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){yr.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(n=null,r=1){let i="/suggestions";return n&&(i+="/"+n),r&&(i+="?page="+r),i+="&without="+o(this,t,e).call(this),await this.request(i)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let n="/game-by-domain/"+o(this,t,e).call(this);return this.currentGame=await this.request(n),{...this.currentGame}}async trackOpen(){const n=o(this,t,e).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:n})})}async trackClick(n){const r=o(this,t,e).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:r,gameId:n})})}},t=new WeakSet,e=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},n);function Wr(t){const e=t-1;return e*e*e+1}function Fr(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}function Rr(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=Wr}=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});`}}var Hr=(t,e,n)=>{V(e,""),V(n,!he(n))},Vr=qe('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),Gr=qe('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),Kr=(t,e,n,r)=>{e(n),V(r,!1)},Ur=qe("<button> </button>"),Zr=qe('<div class="space-y-1 p-1"></div>'),Yr=qe('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><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>'),Jr=qe('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg: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="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Xr(t,e){A(e,!0);let n,r=Vn(e,"categories",19,(()=>[])),o=Vn(e,"selectedCategory",15),i=W(!1),l=st((()=>o()||(r().length>0?r()[0]:"..."))),a=W(""),s=W(void 0),u=st((()=>he(a)?r().filter((t=>t.toLowerCase().includes(he(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d,f=W(Z(c[0]));Gn((function(){let t;for(t=Math.floor(Math.random()*(null==c?void 0:c.length));t==d;)t=Math.floor(Math.random()*(null==c?void 0:c.length));V(f,Z(c[t])),d=t}));var v=Jr();Te("click",X,(function(t){he(s)&&!he(s).contains(t.target)&&n&&!n.contains(t.target)&&V(i,!1)}));var p=it(v),h=it(p),g=it(h),m=at(h,2);m.__click=[Hr,a,i];var y=it(m),b=it(y),w=at(y,2);const x=st((()=>he(i)?"rotate-180 transform":""));!function(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}(w,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${he(x)??""} transition-transform duration-200`}}),Mn(m,(t=>n=t),(()=>n));var _=at(p,2),$=t=>{var e=Yr(),n=it(e),l=it(n),c=it(l);!function(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}(it(c),{size:18,class:"text-muted-foreground"});var d=at(c,2),f=it(at(n,2)),v=t=>{Re(t,Vr())},p=t=>{var e=Fe(),n=lt(e),r=t=>{Re(t,Gr())},l=t=>{var e=Zr();Qe(e,28,(()=>he(u)),(t=>t),((t,e)=>{var n=Ur();n.__click=[Kr,o,e,i];var r,l,a,s,u,c,d,f,v=it(n);wt((()=>{cn(n,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=e?"hover:bg-muted-foreground/20":"")??""} ${(o()==e?"bg-white text-black":"text-white")??""}`),Ge(v,e)})),r=n,l=()=>Rr,a=()=>({duration:150}),f=null,(d=Ye).a??(d.a={element:r,measure(){s=this.element.getBoundingClientRect()},apply(){if(null==c||c.abort(),u=this.element.getBoundingClientRect(),s.left!==u.left||s.right!==u.right||s.top!==u.top||s.bottom!==u.bottom){const t=l()(this.element,{from:s,to:u},null==a?void 0:a());c=Cn(this.element,t,void 0,1,(()=>{null==c||c.abort(),c=void 0}))}},fix(){if(!r.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(r);if("absolute"!==t&&"fixed"!==t){var o=r.style;f={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=e,o.height=n;var i=r.getBoundingClientRect();if(s.left!==i.left||s.top!==i.top){var l=`translate(${s.left-i.left}px, ${s.top-i.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(f){var t=r.style;t.position=f.position,t.width=f.width,t.height=f.height,t.transform=f.transform}}}),d.a.element=r,Re(t,n)})),Re(t,e)};Ze(n,(t=>{0===he(u).length?t(r):t(l,!1)}),!0),Re(t,e)};Ze(f,(t=>{0===r().length?t(v):t(p,!1)})),Mn(e,(t=>V(s,t)),(()=>he(s))),function(t,e,n=e){var r=q();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ee(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),Me||(Me=!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=Sn(t)?Pn(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==ge(e)&&t.value&&n(Sn(t)?Pn(t.value):t.value),bt((()=>{var n=e();Sn(t)&&n===Pn(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(d,(()=>he(a)),(t=>V(a,t))),kn(3,e,(()=>rr),(()=>({y:-5,duration:250}))),Re(t,e)};Ze(_,(t=>{he(i)&&t($)})),wt((()=>{Ge(g,he(f)),Ge(b,he(l))})),kn(3,v,(()=>ir),(()=>({duration:600,delay:50,easing:Fr,start:.95}))),Re(t,v),D()}Be(["click"]);var Qr=(t,e)=>{localStorage.getItem("playlight_exit_intent_disabled_by_user")?localStorage.removeItem("playlight_exit_intent_disabled_by_user"):localStorage.setItem("playlight_exit_intent_disabled_by_user",!0),V(e,!he(e))},to=qe('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'),eo=(t,e)=>qn(jr,!1),no=qe('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),ro=qe('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'),oo=qe('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'),io=qe('<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"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');function lo(t,e){A(e,!0);const[n,r]=Ln();let o,i=Vn(e,"showIntentToggle",3,!0),l=W(void 0),a=W(!0),s=W(!1),u=W(void 0),c=W(Z([])),d=W(Z([])),f=W(!0),v=W(1),p=W(!0),h=W(void 0),g=W(!1);async function m(){if(!(he(a)&&he(v)>1||he(s)))try{1===he(v)?V(a,!0):V(s,!0);const t=he(g)?null:he(l),e=await Lr.getSuggestions(t,he(v)),n=(null==e?void 0:e.games)||[],r=n.filter((t=>!he(c).some((e=>e.id===t.id))));V(c,Z([...he(c),...r])),n.length<10?!he(g)&&he(l)?(V(g,!0),V(v,1),setTimeout((()=>m()),100)):V(p,!1):V(v,he(v)+1)}catch(t){console.error(t),yr.error("Failed to load games: "+t)}finally{V(a,!1),V(s,!1),he(p)&&he(h)&&setTimeout((()=>{const t=he(h).getBoundingClientRect();!(t.top>=-200&&t.left>=0&&t.bottom<=window.innerHeight+200&&t.right<=window.innerWidth)||he(a)||he(s)||m()}),150)}}Gn((()=>(V(f,!Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))),o=new IntersectionObserver((t=>{t[0].isIntersecting&&he(p)&&!he(a)&&!he(s)&&m()}),{rootMargin:"200px"}),()=>null==o?void 0:o.disconnect()))),Gn((async()=>{const t=await Lr.getCurrentGameInfo();V(u,Z(null==t?void 0:t.category)),await async function(){var t,e,n,r;V(d,Z(await Lr.getCategories())),!he(l)&&(null==(t=he(d))?void 0:t.length)>0&&V(l,Z(he(u)&&(null==(e=he(d))?void 0:e.includes(he(u)))?he(u):null==(r=he(d))?void 0:r[(null==(n=he(d))?void 0:n.length)-1]))}()})),ht((()=>{he(l)&&(V(c,Z([])),V(v,1),V(p,!0),V(g,!1),V(a,!0),setTimeout((async()=>{await m(),he(c).length<10&&await m()}),100))})),ht((()=>{he(h)&&o&&o.observe(he(h))}));var y=io();Te("keydown",X,(t=>{"Escape"==t.key&&qn(jr,!1)}));var b=it(y),w=it(b),x=it(w),_=it(at(w,2)),$=t=>{var e=to();e.__click=[Qr,f];var n=it(e),r=it(n);wt((()=>Ge(r,he(f)?"Ignore exit intent":"Trigger on exit intent"))),Re(t,e)};Ze(_,(t=>{i()&&t($)}));var k=at(_,2);k.__click=[eo,()=>Dn(jr,"$discoveryOpen",n)],function(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}(it(k),{size:24});var C=at(b,2);Xr(it(C),{get categories(){return he(d)},get selectedCategory(){return he(l)},set selectedCategory(t){V(l,Z(t))}});var S=at(C,2),P=it(S),I=t=>{var e=no();Yn(it(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.5}),Re(t,e)},M=t=>{var e=Fe(),n=lt(e),r=t=>{Re(t,ro())},o=t=>{var e=oo(),n=it(e);Qe(n,17,(()=>he(c)),Xe,((e,n)=>{!function(e,n){A(n,!0);const[r,o]=Ln();let i=W(!1),l=W(void 0),a=W(!1),s=W(!1),u=W(!1),c=W(!1),d=W(void 0);function f(){he(i)||he(c)||function(e,n=1){try{const t=new Audio(e);t.volume=n,t.play()}catch(t){console.error("Error playing sound:",t)}}(Dn(Nr,"$projectUrl",r)+"/static/sounds/hover-selection.ogg",.25),V(i,!0),he(l)&&n.game.cover_video_url&&he(l).play().catch((t=>console.error("Video play error:",t)))}function v(){he(c)||(V(i,!1),he(l)&&he(a)&&he(l).pause())}ht((()=>{V(c,"ontouchstart"in window)}));var p=qr();Te("touchstart",J,(()=>V(c,!0)),void 0,!0),Te("touchstart",X,(function(t){he(d)&&!he(d).contains(t.target)&&V(i,!1)}),void 0,!0),p.__touchstart=f,p.__click=[Or,c,n];var h=it(p),g=t=>{var e=Br();let n;wt((()=>n=cn(e,1,"bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity",null,n,{"opacity-0":he(i)}))),Re(t,e)};Ze(h,(t=>{var e;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(e=n.game)?void 0:e.created_at)&&t(g)}));var m=at(h,2),y=t=>{var e=zr();let r;e.muted=!0,Mn(e,(t=>V(l,t)),(()=>he(l))),wt((()=>{vn(e,"src",n.game.cover_video_url),r=cn(e,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,{"opacity-100":he(i)&&he(a)&&n.game.cover_video_url})})),Te("loadeddata",e,(()=>{V(a,!0)})),Re(t,e)};Ze(m,(t=>{n.game.cover_video_url&&t(y)}));var b=at(m,2);let w;var x=at(b,2),_=t=>{var e=Ar();let r;e.__click=[Tr,n],wt((()=>r=cn(e,1,"bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all",null,r,{"opacity-0":he(i)}))),Re(t,e)};Ze(x,(t=>{he(c)&&t(_)}));var $=at(x,2),k=t=>{var e=Dr(),r=it(e),o=it(r),i=it(o),l=it(at(o,2));wt((()=>{Ge(i,n.game.name),Ge(l,n.game.description||"No description.")})),kn(3,e,(()=>or)),Re(t,e)};Ze($,(t=>{he(i)&&t(k)}));var C=at($,2);let S;Mn(p,(t=>V(d,t)),(()=>he(d))),wt((()=>{cn(p,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(he(s)?"":"animate-pulse")??""}`,"svelte-rulnq9"),vn(b,"src",n.game.cover_image_url),w=cn(b,1,"prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9",null,w,{"opacity-100":he(s)&&(!he(i)||!he(a)||!n.game.cover_video_url)}),vn(C,"src",n.game.logo_url),S=cn(C,1,"absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9",null,S,{"opacity-100":he(u)})})),Te("mouseenter",p,f),Te("focus",p,f),Te("mouseleave",p,v),Te("blur",p,v),Te("load",b,(()=>{V(s,!0)})),Te("load",C,(()=>{V(u,!0)})),Re(e,p),D(),o()}(e,{get game(){return he(n)},onClick:()=>Lr.trackClick(he(n).id)})}));var r=at(n,2),o=it(r),i=t=>{Yn(t,{class:"animate-spin opacity-75",size:30,strokeWidth:2.5})};Ze(o,(t=>{he(s)&&t(i)})),Mn(r,(t=>V(h,t)),(()=>he(h))),Re(t,e)};Ze(n,(t=>{0!==he(c).length||he(a)?t(o,!1):t(r)}),!0),Re(t,e)};Ze(P,(t=>{he(a)&&0===he(c).length?t(I):t(M,!1)}));var E=it(at(S,2));!function(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({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=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}(at(it(E)),{size:14,style:"margin-top: 1px;"}),wt((()=>vn(x,"src",Dn(Nr,"$projectUrl",n)+"/static/images/logo-white-small.png"))),kn(3,y,(()=>nr),(()=>({duration:250}))),Re(t,y),D(),r()}Be(["click"]);var ao=qe('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');Be(["mouseover"]);var so=qe("<!> <!> <!> <!>",1);function uo(t,e){var n,r,o,i;A(e,!0);const[l,a]=Ln(),s=()=>Dn(jr,"$discoveryOpen",l);let u=Z(null==(r=null==(n=e.config)?void 0:n.button)?void 0:r.position),c=Z(null==(i=null==(o=e.config)?void 0:o.button)?void 0:i.visible);function d(){qn(jr,!0),Lr.trackOpen()}var f=so(),v=lt(f);!function(t,e){A(e,!0);let n=Vn(e,"position",3,"bottom-right"),r=Vn(e,"visible",3,!0);var o=Fe(),i=lt(o),l=t=>{var r=Xn();r.__click=[Jn,e];var o=it(r);!function(t,e){const n=Fn(e,["children","$$slots","$$events","$$legacy"]);Zn(t,Hn({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=Fe();on(lt(r),e,"default",{},null),Re(t,r)},$$slots:{default:!0}}))}(it(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),wt((()=>cn(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),Re(t,r)};Ze(i,(t=>{r()&&t(l)})),Re(t,o),D()}(v,{get position(){return u},get visible(){return c},onClick:d});var p=at(v,2),h=t=>{const n=st((()=>{var t,n;return null==(n=null==(t=e.config)?void 0:t.exitIntent)?void 0:n.enabled}));lo(t,{get showIntentToggle(){return he(n)}})};Ze(p,(t=>{s()&&t(h)}));var g=at(p,2);const m=st((()=>{var t,n;return null==(n=null==(t=e.config)?void 0:t.exitIntent)?void 0:n.enabled}));!function(t,e){A(e,!0);let n,r=Vn(e,"enabled",3,!0),o=!1;Gn((()=>{"undefined"!=typeof window&&(n=window.innerHeight)}));var i=ao();Te("mouseleave",X,(()=>{o=!1})),Te("mousemove",X,(t=>{const e=t.clientY;if(!o)return o=!0,void(n=e);n=e})),i.__mouseover=t=>{var i;const l=t.clientY;l<n&&o&&r()&&!localStorage.getItem("playlight_exit_intent_disabled_by_user")&&(null==(i=e.onIntent)||i.call(e)),n=l},Re(t,i),D()}(g,{get enabled(){return he(m)},onIntent:()=>{s()||d()}}),Er(at(g,2),{}),Re(t,f),D(),a()}const co={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0}};let fo={...co};function vo(t={}){return fo=po(co,t),fo}function po(t,e){const n={...t};return ho(t)&&ho(e)&&Object.keys(e).forEach((r=>{ho(e[r])?r in t?n[r]=po(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function ho(t){return t&&"object"==typeof t&&!Array.isArray(t)}const go=new class{constructor(){this.container=null,this.app=null,this.isInitialized=!1,this.config=null,this.api=Lr}async init(t={}){if(!this.isInitialized)return"undefined"==typeof window?console.error("Playlight cannot run on the server, as it depends browser APIs."):(this.config=vo(t),this.container=document.createElement("div"),this.container.id="playlight-sdk-container",this.container.className="playlight-sdk-container",document.body.appendChild(this.container),this.app=function(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===J){J=window,X=document,Q=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype;tt=u(e,"firstChild").get,et=u(e,"nextSibling").get,t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}();var s=new Set,c=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!s.has(r)){s.add(r);var o=Pe(r);e.addEventListener(r,ze,{passive:o});var i=Ke.get(r);void 0===i?(document.addEventListener(r,ze,{passive:o}),Ke.set(r,1)):Ke.set(r,i+1)}}};c(a(je)),Ne.add(c);var d=void 0,f=function(t){const e=vt(64,t,!0);return(t={})=>new Promise((n=>{t.outro?Pt(e,(()=>{Ct(e),n(void 0)})):(Ct(e),n(void 0))}))}((()=>{var a=n??e.appendChild(nt());return _t((()=>{i&&(A({}),B.c=i),o&&(r.$$events=o),He=l,d=t(a,r)||{},He=!0,i&&D()})),()=>{var t;for(var r of s){e.removeEventListener(r,ze);var o=Ke.get(r);0==--o?(document.removeEventListener(r,ze),Ke.delete(r)):Ke.set(r,o)}Ne.delete(c),a!==n&&(null==(t=a.parentNode)||t.removeChild(a))}}));return Ue.set(d,f),d}(t,e)}(uo,{target:this.container,props:{config:this.config}}),await this.api.getCurrentGameInfo(),this.isInitialized=!0,this)}setDiscovery(t){this.isInitialized&&(jr.set(t),Bn(jr)&&Lr.trackOpen())}};return"undefined"!=typeof window&&(window.playlightSDK=go),go}();
|
|
23
23
|
//# sourceMappingURL=playlight-sdk.iife.js.map
|