@htmlbricks/hb-pad-joystick 0.61.50 → 0.61.52

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.
package/main.iife.js CHANGED
@@ -1,6 +1,5 @@
1
- (function(oe){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const wr=2,le="[",ue="[!",fe="]",ot={},E=Symbol(),ce=!1;var he=Array.isArray,yr=Array.prototype.indexOf,kr=Array.from,Ct=Object.keys,lt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,$r=Object.prototype,Er=Array.prototype,Sr=Object.getPrototypeOf,de=Object.isExtensible;function ve(t){for(var e=0;e<t.length;e++)t[e]()}function xr(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const P=2,It=4,Cr=8,ft=16,X=32,G=64,_e=128,M=256,Tt=512,S=1024,D=2048,H=4096,V=8192,ct=16384,Wt=32768,qt=65536,pe=1<<17,Tr=1<<18,yt=1<<19,Rr=1<<20,Gt=1<<21,be=1<<22,Rt=1<<23,Ht=Symbol("$state"),Pr=Symbol("legacy props"),me=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Nr=3,Pt=8;function Lr(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Mr(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Dr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Or(t){throw new Error("https://svelte.dev/e/effect_orphan")}function jr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Yr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ar(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Fr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Nt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let x=!1;function ht(t){x=t}let $;function Z(t){if(t===null)throw Nt(),ot;return $=t}function Vt(){return Z(rt($))}function ge(t){if(x){if(rt($)!==null)throw Nt(),ot;$=t}}function Ir(){for(var t=0,e=$;;){if(e.nodeType===Pt){var r=e.data;if(r===fe){if(t===0)return e;t-=1}else(r===le||r===ue)&&(t+=1)}var n=rt(e);e.remove(),e=n}}function Wr(t){if(!t||t.nodeType!==Pt)throw Nt(),ot;return t.data}function we(t){return t===this.v}function qr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Gr(t){return!qr(t,this.v)}let Hr=!1,j=null;function ye(t){j=t}function ke(t,e=!1,r){j={p:j,c:null,e:null,s:t,x:null,l:null}}function $e(t){var e=j,r=e.e;if(r!==null){e.e=null;for(var n of r)qe(n)}return t!==void 0&&(e.x=t),j=e.p,t??{}}function Ee(){return!0}const Vr=new WeakMap;function zr(t){var e=m;if(e===null)return b.f|=Rt,t;if((e.f&Wt)===0){if((e.f&_e)===0)throw!e.parent&&t instanceof Error&&xe(t),t;e.b.error(t)}else Se(t,e)}function Se(t,e){for(;e!==null;){if((e.f&_e)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&xe(t),t}function xe(t){const e=Vr.get(t);e&&(lt(t,"message",{value:e.message}),lt(t,"stack",{value:e.stack}))}let zt=[],Ut=[];function Ur(){var t=zt;zt=[],ve(t)}function Br(){var t=Ut;Ut=[],ve(t)}function Jr(){zt.length>0&&Ur(),Ut.length>0&&Br()}function Kr(t){var e=P|D,r=b!==null&&(b.f&P)!==0?b:null;return m===null||r!==null&&(r.f&M)!==0?e|=M:m.f|=yt,{ctx:j,deps:null,effects:null,equals:we,f:e,fn:t,reactions:null,rv:0,v:E,wv:0,parent:r??m,ac:null}}function Ce(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)U(e[r])}}function Zr(t){for(var e=t.parent;e!==null;){if((e.f&P)===0)return e;e=e.parent}return null}function Bt(t){var e,r=m;pt(Zr(t));try{Ce(t),e=rr(t)}finally{pt(r)}return e}function Te(t){var e=Bt(t);if(t.equals(e)||(t.v=e,t.wv=tr()),!it){var r=(J||(t.f&M)!==0)&&t.deps!==null?H:S;L(t,r)}}const Jt=new Set;let R=null,Re=new Set,Lt=[];function Pe(){const t=Lt.shift();Lt.length>0&&queueMicrotask(Pe),t()}let Q=[],Mt=null,Kt=!1,Dt=!1;class tt{current=new Map;#e=new Map;#t=new Set;#r=0;#u=null;#f=!1;#i=[];#a=[];#s=[];#n=[];#o=[];#c=[];#h=[];skipped_effects=new Set;process(e){Q=[];for(const i of e)this.#v(i);if(this.#i.length===0&&this.#r===0){this.#d();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#o=[],R=null,Le(r),Le(n),R===null?R=this:Jt.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#n),this.#l(this.#o);for(const i of this.#i)bt(i);for(const i of this.#a)bt(i);this.#i=[],this.#a=[]}#v(e){e.f^=S;for(var r=e.first;r!==null;){var n=r.f,i=(n&(X|G))!==0,s=i&&(n&S)!==0,a=s||(n&V)!==0||this.skipped_effects.has(r);if(!a&&r.fn!==null){if(i)r.f^=S;else if((n&It)!==0)this.#n.push(r);else if((n&S)===0)if((n&be)!==0){var o=r.b?.is_pending()?this.#a:this.#i;o.push(r)}else jt(r)&&((r.f&ft)!==0&&this.#o.push(r),bt(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#l(e){for(const r of e)((r.f&D)!==0?this.#c:this.#h).push(r),L(r,S);e.length=0}capture(e,r){this.#e.has(e)||this.#e.set(e,r),this.current.set(e,e.v)}activate(){R=this}deactivate(){R=null;for(const e of Re)if(Re.delete(e),e(),R!==null)break}neuter(){this.#f=!0}flush(){Q.length>0?Ne():this.#d(),R===this&&(this.#r===0&&Jt.delete(this),this.deactivate())}#d(){if(!this.#f)for(const e of this.#t)e();this.#t.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#c)L(e,D),dt(e);for(const e of this.#h)L(e,H),dt(e);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#u??=xr()).promise}static ensure(){if(R===null){const e=R=new tt;Jt.add(R),Dt||tt.enqueue(()=>{R===e&&e.flush()})}return R}static enqueue(e){Lt.length===0&&queueMicrotask(Pe),Lt.unshift(e)}}function Ot(t){var e=Dt;Dt=!0;try{for(var r;;){if(Jr(),Q.length===0&&(R?.flush(),Q.length===0))return Mt=null,r;Ne()}}finally{Dt=e}}function Ne(){var t=_t;Kt=!0;try{var e=0;for(Je(!0);Q.length>0;){var r=tt.ensure();if(e++>1e3){var n,i;Qr()}r.process(Q),z.clear()}}finally{Kt=!1,Je(t),Mt=null}}function Qr(){try{jr()}catch(t){Se(t,Mt)}}let et=null;function Le(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(ct|V))===0&&jt(n)&&(et=[],bt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Ve(n):n.fn=null),et?.length>0)){z.clear();for(const i of et)bt(i);et=[]}}et=null}}function dt(t){for(var e=Mt=t;e.parent!==null;){e=e.parent;var r=e.f;if(Kt&&e===m&&(r&ft)!==0)return;if((r&(G|X))!==0){if((r&S)===0)return;e.f^=S}}Q.push(e)}const z=new Map;function Me(t,e){var r={f:0,v:t,reactions:null,equals:we,rv:0,wv:0};return r}function I(t,e){const r=Me(t);return pn(r),r}function tn(t,e=!1,r=!0){const n=Me(t);return e||(n.equals=Gr),n}function W(t,e,r=!1){b!==null&&(!F||(b.f&pe)!==0)&&Ee()&&(b.f&(P|ft|be|pe))!==0&&!q?.includes(t)&&Xr();let n=r?vt(e):e;return en(t,n)}function en(t,e){if(!t.equals(e)){var r=t.v;it?z.set(t,e):z.set(t,r),t.v=e;var n=tt.ensure();n.capture(t,r),(t.f&P)!==0&&((t.f&D)!==0&&Bt(t),L(t,(t.f&M)===0?S:H)),t.wv=tr(),De(t,D),m!==null&&(m.f&S)!==0&&(m.f&(X|G))===0&&(O===null?bn([t]):O.push(t))}return e}function Zt(t){W(t,t.v+1)}function De(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&D)===0;o&&L(s,e),(a&P)!==0?De(s,H):o&&((a&ft)!==0&&et!==null&&et.push(s),dt(s))}}function vt(t){if(typeof t!="object"||t===null||Ht in t)return t;const e=Sr(t);if(e!==$r&&e!==Er)return t;var r=new Map,n=he(t),i=I(0),s=st,a=o=>{if(st===s)return o();var l=b,u=st;B(null),Qe(s);var c=o();return B(l),Qe(u),c};return n&&r.set("length",I(t.length)),new Proxy(t,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ar();var c=r.get(l);return c===void 0?c=a(()=>{var d=I(u.value);return r.set(l,d),d}):W(c,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const c=a(()=>I(E));r.set(l,c),Zt(i)}}else W(u,E),Zt(i);return!0},get(o,l,u){if(l===Ht)return t;var c=r.get(l),d=l in o;if(c===void 0&&(!d||ut(o,l)?.writable)&&(c=a(()=>{var v=vt(d?o[l]:E),f=I(v);return f}),r.set(l,c)),c!==void 0){var h=K(c);return h===E?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=K(c))}else if(u===void 0){var d=r.get(l),h=d?.v;if(d!==void 0&&h!==E)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){if(l===Ht)return!0;var u=r.get(l),c=u!==void 0&&u.v!==E||Reflect.has(o,l);if(u!==void 0||m!==null&&(!c||ut(o,l)?.writable)){u===void 0&&(u=a(()=>{var h=c?vt(o[l]):E,v=I(h);return v}),r.set(l,u));var d=K(u);if(d===E)return!1}return c},set(o,l,u,c){var d=r.get(l),h=l in o;if(n&&l==="length")for(var v=u;v<d.v;v+=1){var f=r.get(v+"");f!==void 0?W(f,E):v in o&&(f=a(()=>I(E)),r.set(v+"",f))}if(d===void 0)(!h||ut(o,l)?.writable)&&(d=a(()=>I(void 0)),W(d,vt(u)),r.set(l,d));else{h=d.v!==E;var _=a(()=>vt(u));W(d,_)}var y=Reflect.getOwnPropertyDescriptor(o,l);if(y?.set&&y.set.call(c,u),!h){if(n&&typeof l=="string"){var k=r.get("length"),g=Number(l);Number.isInteger(g)&&g>=k.v&&W(k,g+1)}Zt(i)}return!0},ownKeys(o){K(i);var l=Reflect.ownKeys(o).filter(d=>{var h=r.get(d);return h===void 0||h.v!==E});for(var[u,c]of r)c.v!==E&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Fr()}})}var Oe,je,Ye,Ae;function Qt(){if(Oe===void 0){Oe=window,je=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Ye=ut(e,"firstChild").get,Ae=ut(e,"nextSibling").get,de(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),de(r)&&(r.__t=void 0)}}function kt(t=""){return document.createTextNode(t)}function $t(t){return Ye.call(t)}function rt(t){return Ae.call(t)}function Fe(t,e){if(!x)return $t(t);var r=$t($);return r===null&&(r=$.appendChild(kt())),Z(r),r}function Xe(t,e){if(!x){var r=$t(t);return r instanceof Comment&&r.data===""?rt(r):r}return $}function te(t,e=1,r=!1){let n=x?$:t;for(var i;e--;)i=n,n=rt(n);if(!x)return n;if(r&&n?.nodeType!==Nr){var s=kt();return n===null?i?.after(s):n.before(s),Z(s),s}return Z(n),n}function rn(t){t.textContent=""}function nn(){return!1}function Ie(t){var e=b,r=m;B(null),pt(null);try{return t()}finally{B(e),pt(r)}}function sn(t){m===null&&b===null&&Or(),b!==null&&(b.f&M)!==0&&m===null&&Dr(),it&&Mr()}function an(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function nt(t,e,r,n=!0){var i=m;i!==null&&(i.f&V)!==0&&(t|=V);var s={ctx:j,deps:null,nodes_start:null,nodes_end:null,f:t|D,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{bt(s),s.f|=Wt}catch(l){throw U(s),l}else e!==null&&dt(s);if(n){var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&yt)===0&&(a=a.first),a!==null&&(a.parent=i,i!==null&&an(a,i),b!==null&&(b.f&P)!==0&&(t&G)===0)){var o=b;(o.effects??=[]).push(a)}}return s}function We(t){sn();var e=m.f,r=!b&&(e&X)!==0&&(e&Wt)===0;if(r){var n=j;(n.e??=[]).push(t)}else return qe(t)}function qe(t){return nt(It|Rr,t,!1)}function on(t){tt.ensure();const e=nt(G|yt,t,!0);return()=>{U(e)}}function ln(t){tt.ensure();const e=nt(G|yt,t,!0);return(r={})=>new Promise(n=>{r.outro?ze(e,()=>{U(e),n(void 0)}):(U(e),n(void 0))})}function un(t){return nt(It,t,!1)}function fn(t,e=0){return nt(Cr|e,t,!0)}function cn(t,e=0){var r=nt(ft|e,t,!0);return r}function ee(t,e=!0){return nt(X|yt,t,!0,e)}function Ge(t){var e=t.teardown;if(e!==null){const r=it,n=b;Ke(!0),B(null);try{e.call(null)}finally{Ke(r),B(n)}}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Ie(()=>{i.abort(me)});var n=r.next;(r.f&G)!==0?r.parent=null:U(r,e),r=n}}function hn(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&X)===0&&U(e),e=r}}function U(t,e=!0){var r=!1;(e||(t.f&Tr)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(dn(t.nodes_start,t.nodes_end),r=!0),He(t,e&&!r),Yt(t,0),L(t,ct);var n=t.transitions;if(n!==null)for(const s of n)s.stop();Ge(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function dn(t,e){for(;t!==null;){var r=t===e?null:rt(t);t.remove(),t=r}}function Ve(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function ze(t,e){var r=[];Ue(t,r,!0),vn(r,()=>{U(t),e&&e()})}function vn(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Ue(t,e,r){if((t.f&V)===0){if(t.f^=V,t.transitions!==null)for(const a of t.transitions)(a.is_global||r)&&e.push(a);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&qt)!==0||(n.f&X)!==0;Ue(n,e,s?r:!1),n=i}}}function _n(t){Be(t,!0)}function Be(t,e){if((t.f&V)!==0){t.f^=V,(t.f&S)===0&&(L(t,D),dt(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&qt)!==0||(r.f&X)!==0;Be(r,i?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}let _t=!1;function Je(t){_t=t}let it=!1;function Ke(t){it=t}let b=null,F=!1;function B(t){b=t}let m=null;function pt(t){m=t}let q=null;function pn(t){b!==null&&(q===null?q=[t]:q.push(t))}let C=null,N=0,O=null;function bn(t){O=t}let Ze=1,Et=0,st=Et;function Qe(t){st=t}let J=!1;function tr(){return++Ze}function jt(t){var e=t.f;if((e&D)!==0)return!0;if((e&H)!==0){var r=t.deps,n=(e&M)!==0;if(r!==null){var i,s,a=(e&Tt)!==0,o=n&&m!==null&&!J,l=r.length;if((a||o)&&(m===null||(m.f&ct)===0)){var u=t,c=u.parent;for(i=0;i<l;i++)s=r[i],(a||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);a&&(u.f^=Tt),o&&c!==null&&(c.f&M)===0&&(u.f^=M)}for(i=0;i<l;i++)if(s=r[i],jt(s)&&Te(s),s.wv>t.wv)return!0}(!n||m!==null&&!J)&&L(t,S)}return!1}function er(t,e,r=!0){var n=t.reactions;if(n!==null&&!q?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&P)!==0?er(s,e,!1):e===s&&(r?L(s,D):(s.f&S)!==0&&L(s,H),dt(s))}}function rr(t){var e=C,r=N,n=O,i=b,s=J,a=q,o=j,l=F,u=st,c=t.f;C=null,N=0,O=null,J=(c&M)!==0&&(F||!_t||b===null),b=(c&(X|G))===0?t:null,q=null,ye(t.ctx),F=!1,st=++Et,t.ac!==null&&(Ie(()=>{t.ac.abort(me)}),t.ac=null);try{t.f|=Gt;var d=t.fn,h=d(),v=t.deps;if(C!==null){var f;if(Yt(t,N),v!==null&&N>0)for(v.length=N+C.length,f=0;f<C.length;f++)v[N+f]=C[f];else t.deps=v=C;if(!J||(c&P)!==0&&t.reactions!==null)for(f=N;f<v.length;f++)(v[f].reactions??=[]).push(t)}else v!==null&&N<v.length&&(Yt(t,N),v.length=N);if(Ee()&&O!==null&&!F&&v!==null&&(t.f&(P|H|D))===0)for(f=0;f<O.length;f++)er(O[f],t);return i!==null&&i!==t&&(Et++,O!==null&&(n===null?n=O:n.push(...O))),(t.f&Rt)!==0&&(t.f^=Rt),h}catch(_){return zr(_)}finally{t.f^=Gt,C=e,N=r,O=n,b=i,J=s,q=a,ye(o),F=l,st=u}}function mn(t,e){let r=e.reactions;if(r!==null){var n=yr.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&P)!==0&&(C===null||!C.includes(e))&&(L(e,H),(e.f&(M|Tt))===0&&(e.f^=Tt),Ce(e),Yt(e,0))}function Yt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)mn(t,r[n])}function bt(t){var e=t.f;if((e&ct)===0){L(t,S);var r=m,n=_t;m=t,_t=!0;try{(e&ft)!==0?hn(t):He(t),Ge(t);var i=rr(t);t.teardown=typeof i=="function"?i:null,t.wv=Ze;var s;ce&&Hr&&(t.f&D)!==0&&t.deps}finally{_t=n,m=r}}}function K(t){var e=t.f,r=(e&P)!==0;if(b!==null&&!F){var n=m!==null&&(m.f&ct)!==0;if(!n&&!q?.includes(t)){var i=b.deps;if((b.f&Gt)!==0)t.rv<Et&&(t.rv=Et,C===null&&i!==null&&i[N]===t?N++:C===null?C=[t]:(!J||!C.includes(t))&&C.push(t));else{(b.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[b]:s.includes(b)||s.push(b)}}}else if(r&&t.deps===null&&t.effects===null){var a=t,o=a.parent;o!==null&&(o.f&M)===0&&(a.f^=M)}if(it){if(z.has(t))return z.get(t);if(r){a=t;var l=a.v;return((a.f&S)===0&&a.reactions!==null||nr(a))&&(l=Bt(a)),z.set(a,l),l}}else r&&(a=t,jt(a)&&Te(a));if((t.f&Rt)!==0)throw t.v;return t.v}function nr(t){if(t.v===E)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(z.has(e)||(e.f&P)!==0&&nr(e))return!0;return!1}function gn(t){var e=F;try{return F=!0,t()}finally{F=e}}const wn=-7169;function L(t,e){t.f=t.f&wn|e}const ir=new Set,re=new Set;function yn(t){for(var e=0;e<t.length;e++)ir.add(t[e]);for(var r of re)r(t)}let sr=null;function At(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;sr=t;var a=0,o=sr===t&&t.__root;if(o){var l=i.indexOf(o);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||t.target,s!==e){lt(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=b,d=m;B(null),pt(null);try{for(var h,v=[];s!==null;){var f=s.assignedSlot||s.parentNode||s.host||null;try{var _=s["__"+n];if(_!=null&&(!s.disabled||t.target===s))if(he(_)){var[y,...k]=_;y.apply(s,[t,...k])}else _.call(s,t)}catch(g){h?v.push(g):h=g}if(t.cancelBubble||f===e||f===null)break;s=f}if(h){for(let g of v)queueMicrotask(()=>{throw g});throw h}}finally{t.__root=e,delete t.currentTarget,B(c),pt(d)}}}function kn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function St(t,e){var r=m;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function ne(t,e){var r=(e&wr)!==0,n,i=!t.startsWith("<!>");return()=>{if(x)return St($,null),$;n===void 0&&(n=kn(i?t:"<!>"+t),n=$t(n));var s=r||je?document.importNode(n,!0):n.cloneNode(!0);return St(s,s),s}}function ar(){if(x)return St($,null),$;var t=document.createDocumentFragment(),e=document.createComment(""),r=kt();return t.append(e,r),St(e,r),t}function mt(t,e){if(x){m.nodes_end=$,Vt();return}t!==null&&t.before(e)}const $n=["touchstart","touchmove"];function En(t){return $n.includes(t)}function or(t,e){return lr(t,e)}function Sn(t,e){Qt(),e.intro=e.intro??!1;const r=e.target,n=x,i=$;try{for(var s=$t(r);s&&(s.nodeType!==Pt||s.data!==le);)s=rt(s);if(!s)throw ot;ht(!0),Z(s),Vt();const a=lr(t,{...e,anchor:s});if($===null||$.nodeType!==Pt||$.data!==fe)throw Nt(),ot;return ht(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==ot&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Yr(),Qt(),rn(r),ht(!1),or(t,e)}finally{ht(n),Z(i)}}const gt=new Map;function lr(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:a=!0}){Qt();var o=new Set,l=d=>{for(var h=0;h<d.length;h++){var v=d[h];if(!o.has(v)){o.add(v);var f=En(v);e.addEventListener(v,At,{passive:f});var _=gt.get(v);_===void 0?(document.addEventListener(v,At,{passive:f}),gt.set(v,1)):gt.set(v,_+1)}}};l(kr(ir)),re.add(l);var u=void 0,c=ln(()=>{var d=r??e.appendChild(kt());return ee(()=>{if(s){ke({});var h=j;h.c=s}i&&(n.$$events=i),x&&St(d,null),u=t(d,n)||{},x&&(m.nodes_end=$),s&&$e()}),()=>{for(var h of o){e.removeEventListener(h,At);var v=gt.get(h);--v===0?(document.removeEventListener(h,At),gt.delete(h)):gt.set(h,v)}re.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return ie.set(u,c),u}let ie=new WeakMap;function xn(t,e){const r=ie.get(t);return r?(ie.delete(t),r(e)):Promise.resolve()}function Cn(t){j===null&&Lr(),We(()=>{const e=gn(t);if(typeof e=="function")return e})}function ur(t,e,r=!1){x&&Vt();var n=t,i=null,s=null,a=E,o=r?qt:0,l=!1;const u=(v,f=!0)=>{l=!0,h(f,v)};var c=null;function d(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var v=a?i:s,f=a?s:i;v&&_n(v),f&&ze(f,()=>{a?s=null:i=null})}const h=(v,f)=>{if(a===(a=v))return;let _=!1;if(x){const Xt=Wr(n)===ue;!!a===Xt&&(n=Ir(),Z(n),ht(!1),_=!0)}var y=nn(),k=n;if(y&&(c=document.createDocumentFragment(),c.append(k=kt())),a?i??=f&&ee(()=>f(k)):s??=f&&ee(()=>f(k)),y){var g=R,T=a?i:s,Y=a?s:i;T&&g.skipped_effects.delete(T),Y&&g.skipped_effects.add(Y),g.add_callback(d)}else d();_&&ht(!0)};cn(()=>{l=!1,e(u),l||h(null,null)},o),x&&(n=$)}function Tn(t,e){un(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function se(t,e,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=t[e],o===void 0&&n!==void 0&&(o=a());var l;l=()=>{var h=t[e];return h===void 0?a():(s=!0,h)};var u=!1,c=Kr(()=>(u=!1,l())),d=m;return(function(h,v){if(arguments.length>0){const f=v?K(c):h;return W(c,f),u=!0,i!==void 0&&(i=f),h}return it&&u||(d.f&ct)!==0?c.v:K(c)})}function Rn(t){return new Pn(t)}class Pn{#e;#t;constructor(e){var r=new Map,n=(s,a)=>{var o=tn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...e.props||{},$$events:{}},{get(s,a){return K(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===Pr?!0:(K(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return W(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(e.hydrate?Sn:or)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Ot(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||lt(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{xn(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let fr;typeof HTMLElement=="function"&&(fr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),mt(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Nn(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ft(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Rn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=on(()=>{fn(()=>{this.$$r=!0;for(const n of Ct(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ft(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ft(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Ct(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ft(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Nn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Ln(t,e,r,n,i,s){let a=class extends fr{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(o=>(e[o].attribute||o).toLowerCase())}};return Ct(e).forEach(o=>{lt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ft(o,l,e),this.$$d[o]=l;var u=this.$$c;if(u){var c=ut(u,o)?.get;c?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{lt(a.prototype,o,{get(){return this.$$c?.[o]}})}),t.element=a,a}function Mn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wt={},ae,cr;function Dn(){if(cr)return ae;cr=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
3
- `,u="/",c="*",d="",h="comment",v="declaration";ae=function(_,y){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];y=y||{};var k=1,g=1;function T(w){var p=w.match(e);p&&(k+=p.length);var A=w.lastIndexOf(l);g=~A?w.length-A:g+w.length}function Y(){var w={line:k,column:g};return function(p){return p.position=new Xt(w),br(),p}}function Xt(w){this.start=w,this.end={line:k,column:g},this.source=y.source}Xt.prototype.content=_;function pr(w){var p=new Error(y.source+":"+k+":"+g+": "+w);if(p.reason=w,p.filename=y.source,p.line=k,p.column=g,p.source=_,!y.silent)throw p}function xt(w){var p=w.exec(_);if(p){var A=p[0];return T(A),_=_.slice(A.length),p}}function br(){xt(r)}function mr(w){var p;for(w=w||[];p=gr();)p!==!1&&w.push(p);return w}function gr(){var w=Y();if(!(u!=_.charAt(0)||c!=_.charAt(1))){for(var p=2;d!=_.charAt(p)&&(c!=_.charAt(p)||u!=_.charAt(p+1));)++p;if(p+=2,d===_.charAt(p-1))return pr("End of comment missing");var A=_.slice(2,p-2);return g+=2,T(A),_=_.slice(p),g+=2,w({type:h,comment:A})}}function zn(){var w=Y(),p=xt(n);if(p){if(gr(),!xt(i))return pr("property missing ':'");var A=xt(s),Bn=w({type:v,property:f(p[0].replace(t,d)),value:A?f(A[0].replace(t,d)):d});return xt(a),Bn}}function Un(){var w=[];mr(w);for(var p;p=zn();)p!==!1&&(w.push(p),mr(w));return w}return br(),Un()};function f(_){return _?_.replace(o,d):d}return ae}var hr;function On(){if(hr)return wt;hr=1;var t=wt&&wt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.default=r;var e=t(Dn());function r(n,i){var s=null;if(!n||typeof n!="string")return s;var a=(0,e.default)(n),o=typeof i=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,c=l.value;o?i(u,c,l):c&&(s=s||{},s[u]=c)}}),s}return wt}var jn=On();const dr=Mn(jn);dr.default;class Yn{constructor(e,r){this.StickStatus={xPosition:0,yPosition:0,x:0,y:0,cardinalDirection:"C"},this.parameters=r?.parameters||{};const n={title:"joystick",width:0,height:0,internalFillColor:"#00AA00",internalLineWidth:2,internalStrokeColor:"#003300",externalLineWidth:2,externalStrokeColor:"#008000",autoReturnToCenter:!0,callback:function(s){}};this.callback=r?.callback||n.callback,this.title=r?.parameters?.title||n.title,this.width=r?.parameters?.width||n.width,this.height=r?.parameters?.height||n.height,this.internalFillColor=r?.parameters?.internalFillColor||n.internalFillColor,this.internalLineWidth=r?.parameters?.internalLineWidth||n.internalLineWidth,this.internalStrokeColor=r?.parameters?.internalStrokeColor||n.internalStrokeColor,this.externalLineWidth=r?.parameters?.externalLineWidth||n.externalLineWidth,this.externalStrokeColor=r?.parameters?.externalStrokeColor||n.externalStrokeColor,this.autoReturnToCenter=r?.parameters?.autoReturnToCenter||n.autoReturnToCenter,console.log("stttt",e.style),e.style.touchAction="none",this.canvas=document.createElement("canvas"),this.canvas.id=this.title,this.width===0&&(this.width=e.clientWidth),this.height===0&&(this.height=e.clientHeight),this.canvas.width=this.width,this.canvas.height=this.height,e.appendChild(this.canvas);const i=this.canvas.getContext("2d");console.log("canvas",i),this.context=i,this.pressed=!1,this.circumference=2*Math.PI,this.internalRadius=(this.canvas.width-(this.canvas.width/2+10))/2,this.maxMoveStick=this.internalRadius*1.1,this.externalRadius=this.internalRadius*1.6,this.centerX=this.canvas.width/2,this.centerY=this.canvas.height/2,this.directionHorizontalLimitPos=this.canvas.width/10,this.directionHorizontalLimitNeg=this.directionHorizontalLimitPos*-1,this.directionVerticalLimitPos=this.canvas.height/10,this.directionVerticalLimitNeg=this.directionVerticalLimitPos*-1,this.movedX=this.centerX,this.movedY=this.centerY,"ontouchstart"in document.documentElement?(this.canvas.addEventListener("touchstart",s=>this._onTouchStart(s),!1),document.addEventListener("touchmove",s=>this._onTouchMove(s),!1),document.addEventListener("touchend",s=>this._onTouchEnd(s),!1)):(this.canvas.addEventListener("mousedown",s=>this._onMouseDown(s),!1),document.addEventListener("mousemove",s=>this._onMouseMove(s),!1),document.addEventListener("mouseup",s=>this._onMouseUp(s),!1)),this._drawExternal(),this._drawInternal()}_drawExternal(){this.context.beginPath(),this.context.arc(this.centerX,this.centerY,this.externalRadius,0,this.circumference,!1),this.context.lineWidth=this.externalLineWidth,this.context.strokeStyle=this.externalStrokeColor,this.context.stroke()}_drawInternal(){this.context.beginPath(),this.movedX<this.internalRadius&&(this.movedX=this.maxMoveStick),this.movedX+this.internalRadius>this.canvas.width&&(this.movedX=this.canvas.width-this.maxMoveStick),this.movedY<this.internalRadius&&(this.movedY=this.maxMoveStick),this.movedY+this.internalRadius>this.canvas.height&&(this.movedY=this.canvas.height-this.maxMoveStick),this.context.arc(this.movedX,this.movedY,this.internalRadius,0,this.circumference,!1);const e=this.context.createRadialGradient(this.centerX,this.centerY,5,this.centerX,this.centerY,200);e.addColorStop(0,this.internalFillColor),e.addColorStop(1,this.internalStrokeColor),this.context.fillStyle=e,this.context.fill(),this.context.lineWidth=this.internalLineWidth,this.context.strokeStyle=this.internalStrokeColor,this.context.stroke()}_onTouchStart(e){this.pressed=!0}_onTouchMove(e){this.pressed&&e.targetTouches[0].target===this.canvas&&(this.movedX=e.targetTouches[0].pageX,this.movedY=e.targetTouches[0].pageY,this.canvas.offsetParent.tagName.toUpperCase()==="BODY"?(this.movedX-=this.canvas.offsetLeft,this.movedY-=this.canvas.offsetTop):(this.movedX-=this.canvas.offsetParent.offsetLeft,this.movedY-=this.canvas.offsetParent.offsetTop),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus))}_onTouchEnd(e){this.pressed=!1,this.autoReturnToCenter&&(this.movedX=this.centerX,this.movedY=this.centerY),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus)}_onMouseDown(e){this.pressed=!0}_onMouseMove(e){this.pressed&&(this.movedX=e.pageX,this.movedY=e.pageY,this.canvas.offsetParent.tagName.toUpperCase()==="BODY"?(this.movedX-=this.canvas.offsetLeft,this.movedY-=this.canvas.offsetTop):(this.movedX-=this.canvas.offsetParent.offsetLeft,this.movedY-=this.canvas.offsetParent.offsetTop),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus))}_onMouseUp(e){this.pressed=!1,this.autoReturnToCenter&&(this.movedX=this.centerX,this.movedY=this.centerY),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus)}_getCardinalDirection(){let e="",r=this.movedX-this.centerX,n=this.movedY-this.centerY;return n>=this.directionVerticalLimitNeg&&n<=this.directionVerticalLimitPos&&(e="C"),n<this.directionVerticalLimitNeg&&(e="N"),n>this.directionVerticalLimitPos&&(e="S"),r<this.directionHorizontalLimitNeg&&(e==="C"?e="W":e+="W"),r>this.directionHorizontalLimitPos&&(e==="C"?e="E":e+="E"),e}GetWidth(){return this.canvas.width}GetHeight(){return this.canvas.height}GetPosX(){return this.movedX}GetPosY(){return this.movedY}GetX(){return(100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()}GetY(){return(100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()}GetDir(){return this._getCardinalDirection()}}var at={},vr;function An(){if(vr)return at;vr=1,Object.defineProperty(at,"__esModule",{value:!0}),at.LanguageTranslator=void 0,at.getChildStyleToPass=t,at.addComponent=e;function t(n,i){var s,a,o="";try{if(n&&i?.length&&(!((s=Object.keys(n))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(h){return Object.keys(n).includes(h.name)}))===null||a===void 0)&&a.length))for(var l=function(h){var v=i?.filter(function(f){return f.name===h&&f.defaultValue!==n[h]});v&&(o+="".concat(h,":").concat(n[h],";"))},u=0,c=Object.keys(n);u<c.length;u++){var d=c[u];l(d)}}catch(h){console.error("error getting child style to pass",h)}finally{return o}}function e(n){var i,s=((i=n?.repoName.split("/"))===null||i===void 0?void 0:i[1])||n?.repoName;if(!s)throw new Error("wrong componentPath "+n?.repoName);if(!n?.version)throw new Error("wrong version "+n?.version);var a=n?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(n.repoName,"@").concat(n.version,"/").concat(a),n?.local)o.src="".concat(n.local);else if(location.href.includes("localhost:6006")){var l=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(l+"-",""),"/").concat(a)}document.head.appendChild(o)}catch(u){console.warn(u)}}var r=(function(){function n(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return n.prototype.setLang=function(i){i||(i=n.getDefaultLang()),this.lang=i},n.prototype.translateWord=function(i,s){return n.getDictionaryWord(i,this.dictionary,s||this.lang)},n.prototype.translateDate=function(i,s,a){return n.formatDate(i,s,a||this.lang)},n.getDefaultLang=function(){var i,s,a,o,l,u="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(u=(l=(o=navigator.languages[0])===null||o===void 0?void 0:o.split("-")[0])===null||l===void 0?void 0:l.toLowerCase()),u},n.getDictionaryWord=function(i,s,a){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((o=s[a])===null||o===void 0)&&o[i]))return s[a][i];var l="",u=n.getDefaultLang();if(!a||u!==a){var c=s?.[u];c?.[i]&&(l=c[i])}return l},n.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(a||n.getDefaultLang(),s);return o.format(i)},n})();return at.LanguageTranslator=r,at}An();var Fn=(t,e)=>e("up"),Xn=(t,e)=>e("right"),In=(t,e)=>e("down"),Wn=(t,e)=>e("left"),qn=ne('<div class="set svelte-1hlpbb9"><nav class="d-pad svelte-1hlpbb9"><button class="up svelte-1hlpbb9" aria-label="Move up"></button> <button class="right svelte-1hlpbb9" aria-label="Move right"></button> <button class="down svelte-1hlpbb9" aria-label="Move down"></button> <button class="left svelte-1hlpbb9" aria-label="Move left"></button></nav></div>'),Gn=ne('<div id="joystick" class="svelte-1hlpbb9"></div>'),Hn=ne("<div>Unknown type</div>");const Vn={hash:"svelte-1hlpbb9",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;--hb-pad-joystick-size: 200px;--dpad-radius: 17%;--dpad-radius-in: 20%;--dpad-fg: #ddd;--dpad-fg-hover: #eee;--dpad-bg: #fff;--arrowcolor: #aaa;--tri-sml-a: calc(var(--hb-pad-joystick-size) / 9);--tri-sml-b: calc(var(--hb-pad-joystick-size) / 6);--tri-lrg-a: calc(var(--hb-pad-joystick-size) / 9);--tri-lrg-b: calc(var(--hb-pad-joystick-size) / 6);--dpad-arrow-shift: 5px;--dpad-arrow-move: 35%;}#joystick.svelte-1hlpbb9 {width:var(--hb-pad-joystick-size);height:var(--hb-pad-joystick-size);margin:auto;}.set.svelte-1hlpbb9 {overflow:hidden;}.set.svelte-1hlpbb9 .d-pad:where(.svelte-1hlpbb9) {display:inline-block;}.d-pad.svelte-1hlpbb9 {position:relative;width:var(--hb-pad-joystick-size);height:var(--hb-pad-joystick-size);border-radius:48%;overflow:hidden;}.d-pad.svelte-1hlpbb9:before {content:"";position:absolute;top:50%;left:50%;border-radius:5%;transform:translate(-50%, -50%);width:66.6%;height:66.6%;background:var(--dpad-fg);}.d-pad.svelte-1hlpbb9:after {content:"";position:absolute;display:none;z-index:2;width:20%;height:20%;top:50%;left:50%;background:var(--dpad-fg);border-radius:50%;transform:translate(-50%, -50%);transition:all 0.25s;cursor:pointer;}.d-pad.svelte-1hlpbb9:hover:after {width:30%;height:30%;}.d-pad.svelte-1hlpbb9 button:where(.svelte-1hlpbb9) {cursor:pointer;border:none;display:block;position:absolute;-webkit-tap-highlight-color:rgba(255, 255, 255, 0);width:33.3%;height:43%;line-height:40%;color:#fff;background:var(--dpad-fg);text-align:center;}.d-pad.svelte-1hlpbb9 button:where(.svelte-1hlpbb9):hover {background:var(--dpad-fg-hover);}.d-pad.svelte-1hlpbb9 button:where(.svelte-1hlpbb9):before {content:"";position:absolute;width:0;height:0;border-radius:5px;border-style:solid;transition:all 0.25s;}.d-pad.svelte-1hlpbb9 button:where(.svelte-1hlpbb9):after {content:"";position:absolute;width:102%;height:78%;background:var(--dpad-bg);border-radius:var(--dpad-radius-in);}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9),
4
- .d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9) {width:43%;height:33%;}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):after,
5
- .d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):after {width:78%;height:102%;}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9) {top:0;left:50%;transform:translate(-50%, 0);border-radius:var(--dpad-radius) var(--dpad-radius) 50% 50%;}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9):hover {background:linear-gradient(0deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9):after {left:0;top:0;transform:translate(-100%, 0);border-top-left-radius:50%;pointer-events:none;}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9):before {top:40%;left:50%;transform:translate(-50%, -50%);border-width:0 var(--tri-sml-a) var(--tri-sml-b) var(--tri-sml-a);border-color:transparent transparent var(--arrowcolor) transparent;}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9):active:before {border-bottom-color:#333;}.d-pad.svelte-1hlpbb9 button.up:where(.svelte-1hlpbb9):hover:before {top:var(--dpad-arrow-move);}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9) {bottom:0;left:50%;transform:translate(-50%, 0);border-radius:50% 50% var(--dpad-radius) var(--dpad-radius);}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9):hover {background:linear-gradient(180deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9):after {right:0;bottom:0;transform:translate(100%, 0);border-bottom-right-radius:50%;pointer-events:none;}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9):before {bottom:40%;left:50%;transform:translate(-50%, 50%);border-width:var(--tri-sml-b) var(--tri-sml-a) 0px var(--tri-sml-a);border-color:var(--arrowcolor) transparent transparent transparent;}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9):active:before {border-top-color:#333;}.d-pad.svelte-1hlpbb9 button.down:where(.svelte-1hlpbb9):hover:before {bottom:var(--dpad-arrow-move);}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9) {top:50%;left:0;transform:translate(0, -50%);border-radius:var(--dpad-radius) 50% 50% var(--dpad-radius);}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):hover {background:linear-gradient(-90deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):after {left:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:50%;pointer-events:none;}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):before {left:40%;top:50%;transform:translate(-50%, -50%);border-width:var(--tri-sml-a) var(--tri-sml-b) var(--tri-sml-a) 0;border-color:transparent var(--arrowcolor) transparent transparent;}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):active:before {border-right-color:#333;}.d-pad.svelte-1hlpbb9 button.left:where(.svelte-1hlpbb9):hover:before {left:var(--dpad-arrow-move);}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9) {top:50%;right:0;transform:translate(0, -50%);border-radius:50% var(--dpad-radius) var(--dpad-radius) 50%;}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):hover {background:linear-gradient(90deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):after {right:0;top:0;transform:translate(0, -100%);border-top-right-radius:50%;pointer-events:none;}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):before {right:40%;top:50%;transform:translate(50%, -50%);border-width:var(--tri-sml-a) 0 var(--tri-sml-a) var(--tri-sml-b);border-color:transparent transparent transparent var(--arrowcolor);}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):active:before {border-left-color:#333;}.d-pad.svelte-1hlpbb9 button.right:where(.svelte-1hlpbb9):hover:before {right:var(--dpad-arrow-move);}`};function _r(t,e){ke(e,!0),Tn(t,Vn);function r(f,_){e.$$host.dispatchEvent(new CustomEvent(f,{detail:_}))}let n=se(e,"id",7,""),i=se(e,"pad_or_joystick",7,"dpad"),s=se(e,"joystick_parameters",7,void 0),a;vt({}),We(()=>{}),Cn(()=>{const f=e.$$host?.shadowRoot?.querySelector("#joystick");if(i()==="joystick"&&!a&&f?.style){const _="#F2eef6",y="#Ece2f7",k="silver";a=new Yn(f,{parameters:{internalFillColor:s()?.internalFillColor||_,internalStrokeColor:s()?.internalStrokeColor||y,externalStrokeColor:s()?.externalStrokeColor||k},callback:g=>{l({x:g.x,y:g.y,cardinalDirection:g.cardinalDirection})}})}});function o(f){r("sendDirection",{id:n(),direction:f})}function l(f){r("sendJoystickPosition",Object.assign({id:n()},f))}var u={get id(){return n()},set id(f=""){n(f),Ot()},get pad_or_joystick(){return i()},set pad_or_joystick(f="dpad"){i(f),Ot()},get joystick_parameters(){return s()},set joystick_parameters(f=void 0){s(f),Ot()}},c=ar(),d=Xe(c);{var h=f=>{var _=qn(),y=Fe(_),k=Fe(y);k.__click=[Fn,o];var g=te(k,2);g.__click=[Xn,o];var T=te(g,2);T.__click=[In,o];var Y=te(T,2);Y.__click=[Wn,o],ge(y),ge(_),mt(f,_)},v=f=>{var _=ar(),y=Xe(_);{var k=T=>{var Y=Gn();mt(T,Y)},g=T=>{var Y=Hn();mt(T,Y)};ur(y,T=>{i()==="joystick"?T(k):T(g,!1)},!0)}mt(f,_)};ur(d,f=>{i()==="dpad"?f(h):f(v,!1)})}return mt(t,c),$e(u)}yn(["click"]),customElements.define("hb-pad-joystick",Ln(_r,{id:{},pad_or_joystick:{},joystick_parameters:{}},[],[],!0)),oe.Component=_r,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})})(this["pad-joystick"]=this["pad-joystick"]||{});
1
+ (function(oe){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const pr=2,le="[",Vt="[!",ue="]",ct={},k=Symbol(),fe=!1;var mr=Array.isArray,gr=Array.prototype.indexOf,br=Array.from,Pt=Object.keys,Nt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,wr=Object.prototype,kr=Array.prototype,yr=Object.getPrototypeOf,ce=Object.isExtensible;function $r(t){for(var e=0;e<t.length;e++)t[e]()}function xr(){var t,e,r=new Promise((i,n)=>{t=i,e=n});return{promise:r,resolve:t,reject:e}}const w=2,Ht=4,Sr=8,W=16,z=32,Q=64,Dt=128,Y=512,y=1024,E=2048,q=4096,F=8192,it=16384,Bt=32768,dt=65536,he=1<<17,de=1<<18,vt=1<<19,Er=1<<20,bt=32768,Ut=1<<21,ve=1<<22,wt=1<<23,Gt=Symbol("$state"),Cr=Symbol("legacy props"),_e=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},pe=3,kt=8;function Tr(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Rr(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Lr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Pr(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Dr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Yr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Mt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function jr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let g=!1;function _t(t){g=t}let m;function j(t){if(t===null)throw Mt(),ct;return m=t}function Jt(){return j(U(m))}function me(t){if(g){if(U(m)!==null)throw Mt(),ct;m=t}}function Or(t=1){if(g){for(var e=t,r=m;e--;)r=U(r);m=r}}function ge(t=!0){for(var e=0,r=m;;){if(r.nodeType===kt){var i=r.data;if(i===ue){if(e===0)return r;e-=1}else(i===le||i===Vt)&&(e+=1)}var n=U(r);t&&r.remove(),r=n}}function Xr(t){if(!t||t.nodeType!==kt)throw Mt(),ct;return t.data}function be(t){return t===this.v}function Ir(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Wr(t){return!Ir(t,this.v)}let zr=!1,P=null;function Yt(t){P=t}function we(t,e=!1,r){P={p:P,i:!1,c:null,e:null,s:t,x:null,l:null}}function ke(t){var e=P,r=e.e;if(r!==null){e.e=null;for(var i of r)We(i)}return t!==void 0&&(e.x=t),e.i=!0,P=e.p,t??{}}function ye(){return!0}let nt=[];function $e(){var t=nt;nt=[],$r(t)}function Kt(t){if(nt.length===0&&!yt){var e=nt;queueMicrotask(()=>{e===nt&&$e()})}nt.push(t)}function qr(){for(;nt.length>0;)$e()}function xe(t){var e=p;if(e===null)return _.f|=wt,t;if((e.f&Bt)===0){if((e.f&Dt)===0)throw t;e.b.error(t)}else At(t,e)}function At(t,e){for(;e!==null;){if((e.f&Dt)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const Ft=new Set;let $=null,R=null,O=[],jt=null,Zt=!1,yt=!1;class A{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#i=0;#l=null;#a=[];#o=[];skipped_effects=new Set;is_fork=!1;process(e){O=[],this.apply();var r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of e)this.#n(i,r);this.is_fork||this.#u(),this.#i>0||this.is_fork?(this.#s(r.effects),this.#s(r.render_effects),this.#s(r.block_effects)):($=null,Ee(r.render_effects),Ee(r.effects),this.#l?.resolve()),R=null}#n(e,r){e.f^=y;for(var i=e.first;i!==null;){var n=i.f,s=(n&(z|Q))!==0,a=s&&(n&y)!==0,o=a||(n&F)!==0||this.skipped_effects.has(i);if((i.f&Dt)!==0&&i.b?.is_pending()&&(r={parent:r,effect:i,effects:[],render_effects:[],block_effects:[]}),!o&&i.fn!==null){s?i.f^=y:(n&Ht)!==0?r.effects.push(i):Ct(i)&&((i.f&W)!==0&&r.block_effects.push(i),Tt(i));var l=i.first;if(l!==null){i=l;continue}}var u=i.parent;for(i=i.next;i===null&&u!==null;)u===r.effect&&(this.#s(r.effects),this.#s(r.render_effects),this.#s(r.block_effects),r=r.parent),i=u.next,u=u.parent}}#s(e){for(const r of e)((r.f&E)!==0?this.#a:this.#o).push(r),S(r,y)}capture(e,r){this.previous.has(e)||this.previous.set(e,r),(e.f&wt)===0&&(this.current.set(e,e.v),R?.set(e,e.v))}activate(){$=this,this.apply()}deactivate(){$=null,R=null}flush(){if(this.activate(),O.length>0){if(Se(),$!==null&&$!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#u(){if(this.#i===0){for(const e of this.#e)e();this.#e.clear()}this.#r===0&&this.#f()}#f(){if(Ft.size>1){this.previous.clear();var e=R,r=!0,i={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of Ft){if(n===this){r=!1;continue}const s=[];for(const[o,l]of this.current){if(n.current.has(o))if(r&&l!==n.current.get(o))n.current.set(o,l);else continue;s.push(o)}if(s.length===0)continue;const a=[...n.current.keys()].filter(o=>!this.current.has(o));if(a.length>0){const o=new Set,l=new Map;for(const u of s)Ce(u,a,o,l);if(O.length>0){$=n,n.apply();for(const u of O)n.#n(u,i);O=[],n.deactivate()}}}$=null,R=e}this.committed=!0,Ft.delete(this)}increment(e){this.#r+=1,e&&(this.#i+=1)}decrement(e){this.#r-=1,e&&(this.#i-=1),this.revive()}revive(){for(const e of this.#a)S(e,E),st(e);for(const e of this.#o)S(e,q),st(e);this.#a=[],this.#o=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#l??=xr()).promise}static ensure(){if($===null){const e=$=new A;Ft.add($),yt||A.enqueue(()=>{$===e&&e.flush()})}return $}static enqueue(e){Kt(e)}apply(){}}function Ot(t){var e=yt;yt=!0;try{for(var r;;){if(qr(),O.length===0&&($?.flush(),O.length===0))return jt=null,r;Se()}}finally{yt=e}}function Se(){var t=ot;Zt=!0;try{var e=0;for(Ke(!0);O.length>0;){var r=A.ensure();if(e++>1e3){var i,n;Vr()}r.process(O),tt.clear()}}finally{Zt=!1,Ke(t),jt=null}}function Vr(){try{Nr()}catch(t){At(t,jt)}}let V=null;function Ee(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var i=t[r++];if((i.f&(it|F))===0&&Ct(i)&&(V=new Set,Tt(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null&&i.ac===null?Be(i):i.fn=null),V?.size>0)){tt.clear();for(const n of V){if((n.f&(it|F))!==0)continue;const s=[n];let a=n.parent;for(;a!==null;)V.has(a)&&(V.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(it|F))===0&&Tt(l)}}V.clear()}}V=null}}function Ce(t,e,r,i){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const n of t.reactions){const s=n.f;(s&w)!==0?Ce(n,e,r,i):(s&(ve|W))!==0&&(s&E)===0&&Te(n,e,i)&&(S(n,E),st(n))}}function Te(t,e,r){const i=r.get(t);if(i!==void 0)return i;if(t.deps!==null)for(const n of t.deps){if(e.includes(n))return!0;if((n.f&w)!==0&&Te(n,e,r))return r.set(n,!0),!0}return r.set(t,!1),!1}function st(t){for(var e=jt=t;e.parent!==null;){e=e.parent;var r=e.f;if(Zt&&e===p&&(r&W)!==0&&(r&de)===0)return;if((r&(Q|z))!==0){if((r&y)===0)return;e.f^=y}}O.push(e)}function Hr(t){let e=0,r=Xt(0),i;return()=>{It()&&(I(r),ze(()=>(e===0&&(i=ar(()=>t(()=>$t(r)))),e+=1,()=>{Kt(()=>{e-=1,e===0&&(i?.(),i=void 0,$t(r))})})))}}var Br=dt|vt|Dt;function Ur(t,e,r){new Gr(t,e,r)}class Gr{parent;#e=!1;#t;#r=g?m:null;#i;#l;#a;#o=null;#n=null;#s=null;#u=null;#f=null;#d=0;#c=0;#v=!1;#h=null;#b=Hr(()=>(this.#h=Xt(this.#d),()=>{this.#h=null}));constructor(e,r,i){this.#t=e,this.#i=r,this.#l=i,this.parent=p.b,this.#e=!!this.#i.pending,this.#a=qe(()=>{if(p.b=this,g){const s=this.#r;Jt(),s.nodeType===kt&&s.data===Vt?this.#k():this.#w()}else{var n=this.#m();try{this.#o=G(()=>i(n))}catch(s){this.error(s)}this.#c>0?this.#p():this.#e=!1}return()=>{this.#f?.remove()}},Br),g&&(this.#t=m)}#w(){try{this.#o=G(()=>this.#l(this.#t))}catch(e){this.error(e)}this.#e=!1}#k(){const e=this.#i.pending;e&&(this.#n=G(()=>e(this.#t)),A.enqueue(()=>{var r=this.#m();this.#o=this.#_(()=>(A.ensure(),G(()=>this.#l(r)))),this.#c>0?this.#p():(St(this.#n,()=>{this.#n=null}),this.#e=!1)}))}#m(){var e=this.#t;return this.#e&&(this.#f=et(),this.#t.before(this.#f),e=this.#f),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#_(e){var r=p,i=_,n=P;rt(this.#a),N(this.#a),Yt(this.#a.ctx);try{return e()}catch(s){return xe(s),null}finally{rt(r),N(i),Yt(n)}}#p(){const e=this.#i.pending;this.#o!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#f),Je(this.#o,this.#u)),this.#n===null&&(this.#n=G(()=>e(this.#t)))}#g(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(e);return}this.#c+=e,this.#c===0&&(this.#e=!1,this.#n&&St(this.#n,()=>{this.#n=null}),this.#u&&(this.#t.before(this.#u),this.#u=null))}update_pending_count(e){this.#g(e),this.#d+=e,this.#h&&Ne(this.#h,this.#d)}get_effect_pending(){return this.#b(),I(this.#h)}error(e){var r=this.#i.onerror;let i=this.#i.failed;if(this.#v||!r&&!i)throw e;this.#o&&(C(this.#o),this.#o=null),this.#n&&(C(this.#n),this.#n=null),this.#s&&(C(this.#s),this.#s=null),g&&(j(this.#r),Or(),j(ge()));var n=!1,s=!1;const a=()=>{if(n){jr();return}n=!0,s&&Fr(),A.ensure(),this.#d=0,this.#s!==null&&St(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#o=this.#_(()=>(this.#v=!1,G(()=>this.#l(this.#t)))),this.#c>0?this.#p():this.#e=!1};var o=_;try{N(null),s=!0,r?.(e,a),s=!1}catch(l){At(l,this.#a&&this.#a.parent)}finally{N(o)}i&&Kt(()=>{this.#s=this.#_(()=>{A.ensure(),this.#v=!0;try{return G(()=>{i(this.#t,()=>e,()=>a)})}catch(l){return At(l,this.#a.parent),null}finally{this.#v=!1}})})}}function Jr(t){var e=w|E,r=_!==null&&(_.f&w)!==0?_:null;return p!==null&&(p.f|=vt),{ctx:P,deps:null,effects:null,equals:be,f:e,fn:t,reactions:null,rv:0,v:k,wv:0,parent:r??p,ac:null}}function Re(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)C(e[r])}}function Kr(t){for(var e=t.parent;e!==null;){if((e.f&w)===0)return e;e=e.parent}return null}function Qt(t){var e,r=p;rt(Kr(t));try{t.f&=~bt,Re(t),e=ir(t)}finally{rt(r)}return e}function Le(t){var e=Qt(t);if(t.equals(e)||(t.v=e,t.wv=er()),!lt)if(R!==null)It()&&R.set(t,t.v);else{var r=(t.f&Y)===0?q:y;S(t,r)}}let te=new Set;const tt=new Map;let Pe=!1;function Xt(t,e){var r={f:0,v:t,reactions:null,equals:be,rv:0,wv:0};return r}function H(t,e){const r=Xt(t);return ci(r),r}function Zr(t,e=!1,r=!0){const i=Xt(t);return e||(i.equals=Wr),i}function B(t,e,r=!1){_!==null&&(!X||(_.f&he)!==0)&&ye()&&(_.f&(w|W|ve|he))!==0&&!J?.includes(t)&&Ar();let i=r?pt(e):e;return Ne(t,i)}function Ne(t,e){if(!t.equals(e)){var r=t.v;lt?tt.set(t,e):tt.set(t,r),t.v=e;var i=A.ensure();i.capture(t,r),(t.f&w)!==0&&((t.f&E)!==0&&Qt(t),S(t,(t.f&Y)!==0?y:q)),t.wv=er(),De(t,E),p!==null&&(p.f&y)!==0&&(p.f&(z|Q))===0&&(D===null?hi([t]):D.push(t)),!i.is_fork&&te.size>0&&!Pe&&Qr()}return e}function Qr(){Pe=!1;const t=Array.from(te);for(const e of t)(e.f&y)!==0&&S(e,q),Ct(e)&&Tt(e);te.clear()}function $t(t){B(t,t.v+1)}function De(t,e){var r=t.reactions;if(r!==null)for(var i=r.length,n=0;n<i;n++){var s=r[n],a=s.f,o=(a&E)===0;if(o&&S(s,e),(a&w)!==0){var l=s;R?.delete(l),(a&bt)===0&&(a&Y&&(s.f|=bt),De(l,q))}else o&&((a&W)!==0&&V!==null&&V.add(s),st(s))}}function pt(t){if(typeof t!="object"||t===null||Gt in t)return t;const e=yr(t);if(e!==wr&&e!==kr)return t;var r=new Map,i=mr(t),n=H(0),s=ut,a=o=>{if(ut===s)return o();var l=_,u=ut;N(null),tr(s);var c=o();return N(l),tr(u),c};return i&&r.set("length",H(t.length)),new Proxy(t,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Mr();var c=r.get(l);return c===void 0?c=a(()=>{var v=H(u.value);return r.set(l,v),v}):B(c,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const c=a(()=>H(k));r.set(l,c),$t(n)}}else B(u,k),$t(n);return!0},get(o,l,u){if(l===Gt)return t;var c=r.get(l),v=l in o;if(c===void 0&&(!v||ht(o,l)?.writable)&&(c=a(()=>{var h=pt(v?o[l]:k),d=H(h);return d}),r.set(l,c)),c!==void 0){var f=I(c);return f===k?void 0:f}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=I(c))}else if(u===void 0){var v=r.get(l),f=v?.v;if(v!==void 0&&f!==k)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(o,l){if(l===Gt)return!0;var u=r.get(l),c=u!==void 0&&u.v!==k||Reflect.has(o,l);if(u!==void 0||p!==null&&(!c||ht(o,l)?.writable)){u===void 0&&(u=a(()=>{var f=c?pt(o[l]):k,h=H(f);return h}),r.set(l,u));var v=I(u);if(v===k)return!1}return c},set(o,l,u,c){var v=r.get(l),f=l in o;if(i&&l==="length")for(var h=u;h<v.v;h+=1){var d=r.get(h+"");d!==void 0?B(d,k):h in o&&(d=a(()=>H(k)),r.set(h+"",d))}if(v===void 0)(!f||ht(o,l)?.writable)&&(v=a(()=>H(void 0)),B(v,pt(u)),r.set(l,v));else{f=v.v!==k;var b=a(()=>pt(u));B(v,b)}var T=Reflect.getOwnPropertyDescriptor(o,l);if(T?.set&&T.set.call(c,u),!f){if(i&&typeof l=="string"){var K=r.get("length"),M=Number(l);Number.isInteger(M)&&M>=K.v&&B(K,M+1)}$t(n)}return!0},ownKeys(o){I(n);var l=Reflect.ownKeys(o).filter(v=>{var f=r.get(v);return f===void 0||f.v!==k});for(var[u,c]of r)c.v!==k&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Yr()}})}var Me,Ye,Ae,Fe;function ee(){if(Me===void 0){Me=window,Ye=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Ae=ht(e,"firstChild").get,Fe=ht(e,"nextSibling").get,ce(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ce(r)&&(r.__t=void 0)}}function et(t=""){return document.createTextNode(t)}function xt(t){return Ae.call(t)}function U(t){return Fe.call(t)}function je(t,e){if(!g)return xt(t);var r=xt(m);return r===null&&(r=m.appendChild(et())),j(r),r}function Oe(t,e=!1){if(!g){var r=xt(t);return r instanceof Comment&&r.data===""?U(r):r}if(e&&m?.nodeType!==pe){var i=et();return m?.before(i),j(i),i}return m}function re(t,e=1,r=!1){let i=g?m:t;for(var n;e--;)n=i,i=U(i);if(!g)return i;if(r&&i?.nodeType!==pe){var s=et();return i===null?n?.after(s):i.before(s),j(s),s}return j(i),i}function ti(t){t.textContent=""}function ei(){return!1}function Xe(t){var e=_,r=p;N(null),rt(null);try{return t()}finally{N(e),rt(r)}}function ri(t){p===null&&(_===null&&Pr(),Lr()),lt&&Rr()}function ii(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function at(t,e,r,i=!0){var n=p;n!==null&&(n.f&F)!==0&&(t|=F);var s={ctx:P,deps:null,nodes_start:null,nodes_end:null,f:t|E|Y,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Tt(s),s.f|=Bt}catch(l){throw C(s),l}else e!==null&&st(s);if(i){var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&vt)===0&&(a=a.first,(t&W)!==0&&(t&dt)!==0&&a!==null&&(a.f|=dt)),a!==null&&(a.parent=n,n!==null&&ii(a,n),_!==null&&(_.f&w)!==0&&(t&Q)===0)){var o=_;(o.effects??=[]).push(a)}}return s}function It(){return _!==null&&!X}function Ie(t){ri();var e=p.f,r=!_&&(e&z)!==0&&(e&Bt)===0;if(r){var i=P;(i.e??=[]).push(t)}else return We(t)}function We(t){return at(Ht|Er,t,!1)}function ni(t){A.ensure();const e=at(Q|vt,t,!0);return()=>{C(e)}}function si(t){A.ensure();const e=at(Q|vt,t,!0);return(r={})=>new Promise(i=>{r.outro?St(e,()=>{C(e),i(void 0)}):(C(e),i(void 0))})}function ai(t){return at(Ht,t,!1)}function ze(t,e=0){return at(Sr|e,t,!0)}function qe(t,e=0){var r=at(W|e,t,!0);return r}function G(t,e=!0){return at(z|vt,t,!0,e)}function Ve(t){var e=t.teardown;if(e!==null){const r=lt,i=_;Ze(!0),N(null);try{e.call(null)}finally{Ze(r),N(i)}}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const n=r.ac;n!==null&&Xe(()=>{n.abort(_e)});var i=r.next;(r.f&Q)!==0?r.parent=null:C(r,e),r=i}}function oi(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&z)===0&&C(e),e=r}}function C(t,e=!0){var r=!1;(e||(t.f&de)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(li(t.nodes_start,t.nodes_end),r=!0),He(t,e&&!r),Wt(t,0),S(t,it);var i=t.transitions;if(i!==null)for(const s of i)s.stop();Ve(t);var n=t.parent;n!==null&&n.first!==null&&Be(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function li(t,e){for(;t!==null;){var r=t===e?null:U(t);t.remove(),t=r}}function Be(t){var e=t.parent,r=t.prev,i=t.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),e!==null&&(e.first===t&&(e.first=i),e.last===t&&(e.last=r))}function St(t,e,r=!0){var i=[];Ue(t,i,!0),ui(i,()=>{r&&C(t),e&&e()})}function ui(t,e){var r=t.length;if(r>0){var i=()=>--r||e();for(var n of t)n.out(i)}else e()}function Ue(t,e,r){if((t.f&F)===0){if(t.f^=F,t.transitions!==null)for(const a of t.transitions)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var n=i.next,s=(i.f&dt)!==0||(i.f&z)!==0&&(t.f&W)!==0;Ue(i,e,s?r:!1),i=n}}}function fi(t){Ge(t,!0)}function Ge(t,e){if((t.f&F)!==0){t.f^=F,(t.f&y)===0&&(S(t,E),st(t));for(var r=t.first;r!==null;){var i=r.next,n=(r.f&dt)!==0||(r.f&z)!==0;Ge(r,n?e:!1),r=i}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}function Je(t,e){for(var r=t.nodes_start,i=t.nodes_end;r!==null;){var n=r===i?null:U(r);e.append(r),r=n}}let ot=!1;function Ke(t){ot=t}let lt=!1;function Ze(t){lt=t}let _=null,X=!1;function N(t){_=t}let p=null;function rt(t){p=t}let J=null;function ci(t){_!==null&&(J===null?J=[t]:J.push(t))}let x=null,L=0,D=null;function hi(t){D=t}let Qe=1,Et=0,ut=Et;function tr(t){ut=t}function er(){return++Qe}function Ct(t){var e=t.f;if((e&E)!==0)return!0;if(e&w&&(t.f&=~bt),(e&q)!==0){var r=t.deps;if(r!==null)for(var i=r.length,n=0;n<i;n++){var s=r[n];if(Ct(s)&&Le(s),s.wv>t.wv)return!0}(e&Y)!==0&&R===null&&S(t,y)}return!1}function rr(t,e,r=!0){var i=t.reactions;if(i!==null&&!J?.includes(t))for(var n=0;n<i.length;n++){var s=i[n];(s.f&w)!==0?rr(s,e,!1):e===s&&(r?S(s,E):(s.f&y)!==0&&S(s,q),st(s))}}function ir(t){var e=x,r=L,i=D,n=_,s=J,a=P,o=X,l=ut,u=t.f;x=null,L=0,D=null,_=(u&(z|Q))===0?t:null,J=null,Yt(t.ctx),X=!1,ut=++Et,t.ac!==null&&(Xe(()=>{t.ac.abort(_e)}),t.ac=null);try{t.f|=Ut;var c=t.fn,v=c(),f=t.deps;if(x!==null){var h;if(Wt(t,L),f!==null&&L>0)for(f.length=L+x.length,h=0;h<x.length;h++)f[L+h]=x[h];else t.deps=f=x;if(ot&&It()&&(t.f&Y)!==0)for(h=L;h<f.length;h++)(f[h].reactions??=[]).push(t)}else f!==null&&L<f.length&&(Wt(t,L),f.length=L);if(ye()&&D!==null&&!X&&f!==null&&(t.f&(w|q|E))===0)for(h=0;h<D.length;h++)rr(D[h],t);return n!==null&&n!==t&&(Et++,D!==null&&(i===null?i=D:i.push(...D))),(t.f&wt)!==0&&(t.f^=wt),v}catch(d){return xe(d)}finally{t.f^=Ut,x=e,L=r,D=i,_=n,J=s,Yt(a),X=o,ut=l}}function di(t,e){let r=e.reactions;if(r!==null){var i=gr.call(r,t);if(i!==-1){var n=r.length-1;n===0?r=e.reactions=null:(r[i]=r[n],r.pop())}}r===null&&(e.f&w)!==0&&(x===null||!x.includes(e))&&(S(e,q),(e.f&Y)!==0&&(e.f^=Y,e.f&=~bt),Re(e),Wt(e,0))}function Wt(t,e){var r=t.deps;if(r!==null)for(var i=e;i<r.length;i++)di(t,r[i])}function Tt(t){var e=t.f;if((e&it)===0){S(t,y);var r=p,i=ot;p=t,ot=!0;try{(e&W)!==0?oi(t):He(t),Ve(t);var n=ir(t);t.teardown=typeof n=="function"?n:null,t.wv=Qe;var s;fe&&zr&&(t.f&E)!==0&&t.deps}finally{ot=i,p=r}}}function I(t){var e=t.f,r=(e&w)!==0;if(_!==null&&!X){var i=p!==null&&(p.f&it)!==0;if(!i&&!J?.includes(t)){var n=_.deps;if((_.f&Ut)!==0)t.rv<Et&&(t.rv=Et,x===null&&n!==null&&n[L]===t?L++:x===null?x=[t]:x.includes(t)||x.push(t));else{(_.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[_]:s.includes(_)||s.push(_)}}}if(lt){if(tt.has(t))return tt.get(t);if(r){var a=t,o=a.v;return((a.f&y)===0&&a.reactions!==null||sr(a))&&(o=Qt(a)),tt.set(a,o),o}}else if(r){if(a=t,R?.has(a))return R.get(a);Ct(a)&&Le(a),ot&&It()&&(a.f&Y)===0&&nr(a)}else if(R?.has(t))return R.get(t);if((t.f&wt)!==0)throw t.v;return t.v}function nr(t){if(t.deps!==null){t.f^=Y;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&w)!==0&&(e.f&Y)===0&&nr(e)}}function sr(t){if(t.v===k)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(tt.has(e)||(e.f&w)!==0&&sr(e))return!0;return!1}function ar(t){var e=X;try{return X=!0,t()}finally{X=e}}const vi=-7169;function S(t,e){t.f=t.f&vi|e}const or=new Set,ie=new Set;function _i(t){for(var e=0;e<t.length;e++)or.add(t[e]);for(var r of ie)r(t)}let lr=null;function zt(t){var e=this,r=e.ownerDocument,i=t.type,n=t.composedPath?.()||[],s=n[0]||t.target;lr=t;var a=0,o=lr===t&&t.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=n.indexOf(e);if(u===-1)return;l<=u&&(a=l)}if(s=n[a]||t.target,s!==e){Nt(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=_,v=p;N(null),rt(null);try{for(var f,h=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+i];b!=null&&(!s.disabled||t.target===s)&&b.call(s,t)}catch(T){f?h.push(T):f=T}if(t.cancelBubble||d===e||d===null)break;s=d}if(f){for(let T of h)queueMicrotask(()=>{throw T});throw f}}finally{t.__root=e,delete t.currentTarget,N(c),rt(v)}}}function pi(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Rt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function ne(t,e){var r=(e&pr)!==0,i,n=!t.startsWith("<!>");return()=>{if(g)return Rt(m,null),m;i===void 0&&(i=pi(n?t:"<!>"+t),i=xt(i));var s=r||Ye?document.importNode(i,!0):i.cloneNode(!0);return Rt(s,s),s}}function ur(){if(g)return Rt(m,null),m;var t=document.createDocumentFragment(),e=document.createComment(""),r=et();return t.append(e,r),Rt(e,r),t}function mt(t,e){if(g){p.nodes_end=m,Jt();return}t!==null&&t.before(e)}const mi=["touchstart","touchmove"];function gi(t){return mi.includes(t)}function fr(t,e){return cr(t,e)}function bi(t,e){ee(),e.intro=e.intro??!1;const r=e.target,i=g,n=m;try{for(var s=xt(r);s&&(s.nodeType!==kt||s.data!==le);)s=U(s);if(!s)throw ct;_t(!0),j(s);const a=cr(t,{...e,anchor:s});return _t(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==ct&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Dr(),ee(),ti(r),_t(!1),fr(t,e)}finally{_t(i),j(n)}}const gt=new Map;function cr(t,{target:e,anchor:r,props:i={},events:n,context:s,intro:a=!0}){ee();var o=new Set,l=v=>{for(var f=0;f<v.length;f++){var h=v[f];if(!o.has(h)){o.add(h);var d=gi(h);e.addEventListener(h,zt,{passive:d});var b=gt.get(h);b===void 0?(document.addEventListener(h,zt,{passive:d}),gt.set(h,1)):gt.set(h,b+1)}}};l(br(or)),ie.add(l);var u=void 0,c=si(()=>{var v=r??e.appendChild(et());return Ur(v,{pending:()=>{}},f=>{if(s){we({});var h=P;h.c=s}if(n&&(i.$$events=n),g&&Rt(f,null),u=t(f,i)||{},g&&(p.nodes_end=m,m===null||m.nodeType!==kt||m.data!==ue))throw Mt(),ct;s&&ke()}),()=>{for(var f of o){e.removeEventListener(f,zt);var h=gt.get(f);--h===0?(document.removeEventListener(f,zt),gt.delete(f)):gt.set(f,h)}ie.delete(l),v!==r&&v.parentNode?.removeChild(v)}});return se.set(u,c),u}let se=new WeakMap;function wi(t,e){const r=se.get(t);return r?(se.delete(t),r(e)):Promise.resolve()}class ki{anchor;#e=new Map;#t=new Map;#r=new Map;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#l=()=>{var e=$;if(this.#e.has(e)){var r=this.#e.get(e),i=this.#t.get(r);if(i)fi(i);else{var n=this.#r.get(r);n&&(this.#t.set(r,n.effect),this.#r.delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===e)break;const o=this.#r.get(a);o&&(C(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===r)continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();Je(a,u),u.append(et()),this.#r.set(s,{effect:a,fragment:u})}else C(a);this.#t.delete(s)};this.#i||!i?St(a,o,!1):o()}}};#a=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[i,n]of this.#r)r.includes(i)||(C(n.effect),this.#r.delete(i))};ensure(e,r){var i=$,n=ei();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(n){var s=document.createDocumentFragment(),a=et();s.append(a),this.#r.set(e,{effect:G(()=>r(a)),fragment:s})}else this.#t.set(e,G(()=>r(this.anchor)));if(this.#e.set(i,e),n){for(const[o,l]of this.#t)o===e?i.skipped_effects.delete(l):i.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?i.skipped_effects.delete(l.effect):i.skipped_effects.add(l.effect);i.oncommit(this.#l),i.ondiscard(this.#a)}else g&&(this.anchor=m),this.#l()}}function yi(t){P===null&&Tr(),Ie(()=>{const e=ar(t);if(typeof e=="function")return e})}function hr(t,e,r=!1){g&&Jt();var i=new ki(t),n=r?dt:0;function s(a,o){if(g){const u=Xr(t)===Vt;if(a===u){var l=ge();j(l),i.anchor=l,_t(!1),i.ensure(a,o),_t(!0);return}}i.ensure(a,o)}qe(()=>{var a=!1;e((o,l=!0)=>{a=!0,s(l,o)}),a||s(!1,null)},n)}function $i(t,e){ai(()=>{var r=t.getRootNode(),i=r.host?r:r.head??r.ownerDocument.head;if(!i.querySelector("#"+e.hash)){const n=document.createElement("style");n.id=e.hash,n.textContent=e.code,i.appendChild(n)}})}function ae(t,e,r,i){var n=i,s=!0,a=()=>(s&&(s=!1,n=i),n),o;o=t[e],o===void 0&&i!==void 0&&(o=a());var l;l=()=>{var f=t[e];return f===void 0?a():(s=!0,f)};var u=!1,c=Jr(()=>(u=!1,l())),v=p;return(function(f,h){if(arguments.length>0){const d=h?I(c):f;return B(c,d),u=!0,n!==void 0&&(n=d),f}return lt&&u||(v.f&it)!==0?c.v:I(c)})}function xi(t){return new Si(t)}class Si{#e;#t;constructor(e){var r=new Map,i=(s,a)=>{var o=Zr(a,!1,!1);return r.set(s,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(s,a){return I(r.get(a)??i(a,Reflect.get(s,a)))},has(s,a){return a===Cr?!0:(I(r.get(a)??i(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return B(r.get(a)??i(a,o),o),Reflect.set(s,a,o)}});this.#t=(e.hydrate?bi:fr)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Ot(),this.#e=n.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Nt(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(n,s)},this.#t.$destroy=()=>{wi(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const i=(...n)=>r.call(this,...n);return this.#e[e].push(i),()=>{this.#e[e]=this.#e[e].filter(n=>n!==i)}}$destroy(){this.#t.$destroy()}}let dr;typeof HTMLElement=="function"&&(dr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const i=this.$$c.$on(t,e);this.$$l_u.set(e,i)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const i=this.$$l_u.get(e);i&&(i(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return n=>{const s=document.createElement("slot");i!=="default"&&(s.name=i),mt(n,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Ei(this);for(const i of this.$$s)i in r&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),e.default=!0):e[i]=t(i));for(const i of this.attributes){const n=this.$$g_p(i.name);n in this.$$d||(this.$$d[n]=qt(n,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=xi({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=ni(()=>{ze(()=>{this.$$r=!0;for(const i of Pt(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const n=qt(i,this.$$d[i],this.$$p_d,"toAttribute");n==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,n)}this.$$r=!1})});for(const i in this.$$l)for(const n of this.$$l[i]){const s=this.$$c.$on(i,n);this.$$l_u.set(n,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=qt(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Pt(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function qt(t,e,r,i){const n=r[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!i||!r[t])return e;if(i==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Ei(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Ci(t,e,r,i,n,s){let a=class extends dr{constructor(){super(t,r,n),this.$$p_d=e}static get observedAttributes(){return Pt(e).map(o=>(e[o].attribute||o).toLowerCase())}};return Pt(e).forEach(o=>{Nt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=qt(o,l,e),this.$$d[o]=l;var u=this.$$c;if(u){var c=ht(u,o)?.get;c?u[o]=l:u.$set({[o]:l})}}})}),i.forEach(o=>{Nt(a.prototype,o,{get(){return this.$$c?.[o]}})}),t.element=a,a}class Ti{constructor(e,r){this.StickStatus={xPosition:0,yPosition:0,x:0,y:0,cardinalDirection:"C"},this.parameters=r?.parameters||{};const i={title:"joystick",width:0,height:0,internalFillColor:"#00AA00",internalLineWidth:2,internalStrokeColor:"#003300",externalLineWidth:2,externalStrokeColor:"#008000",autoReturnToCenter:!0,callback:function(s){}};this.callback=r?.callback||i.callback,this.title=r?.parameters?.title||i.title,this.width=r?.parameters?.width||i.width,this.height=r?.parameters?.height||i.height,this.internalFillColor=r?.parameters?.internalFillColor||i.internalFillColor,this.internalLineWidth=r?.parameters?.internalLineWidth||i.internalLineWidth,this.internalStrokeColor=r?.parameters?.internalStrokeColor||i.internalStrokeColor,this.externalLineWidth=r?.parameters?.externalLineWidth||i.externalLineWidth,this.externalStrokeColor=r?.parameters?.externalStrokeColor||i.externalStrokeColor,this.autoReturnToCenter=r?.parameters?.autoReturnToCenter||i.autoReturnToCenter,console.log("stttt",e.style),e.style.touchAction="none",this.canvas=document.createElement("canvas"),this.canvas.id=this.title,this.width===0&&(this.width=e.clientWidth),this.height===0&&(this.height=e.clientHeight),this.canvas.width=this.width,this.canvas.height=this.height,e.appendChild(this.canvas);const n=this.canvas.getContext("2d");console.log("canvas",n),this.context=n,this.pressed=!1,this.circumference=2*Math.PI,this.internalRadius=(this.canvas.width-(this.canvas.width/2+10))/2,this.maxMoveStick=this.internalRadius*1.1,this.externalRadius=this.internalRadius*1.6,this.centerX=this.canvas.width/2,this.centerY=this.canvas.height/2,this.directionHorizontalLimitPos=this.canvas.width/10,this.directionHorizontalLimitNeg=this.directionHorizontalLimitPos*-1,this.directionVerticalLimitPos=this.canvas.height/10,this.directionVerticalLimitNeg=this.directionVerticalLimitPos*-1,this.movedX=this.centerX,this.movedY=this.centerY,"ontouchstart"in document.documentElement?(this.canvas.addEventListener("touchstart",s=>this._onTouchStart(s),!1),document.addEventListener("touchmove",s=>this._onTouchMove(s),!1),document.addEventListener("touchend",s=>this._onTouchEnd(s),!1)):(this.canvas.addEventListener("mousedown",s=>this._onMouseDown(s),!1),document.addEventListener("mousemove",s=>this._onMouseMove(s),!1),document.addEventListener("mouseup",s=>this._onMouseUp(s),!1)),this._drawExternal(),this._drawInternal()}_drawExternal(){this.context.beginPath(),this.context.arc(this.centerX,this.centerY,this.externalRadius,0,this.circumference,!1),this.context.lineWidth=this.externalLineWidth,this.context.strokeStyle=this.externalStrokeColor,this.context.stroke()}_drawInternal(){this.context.beginPath(),this.movedX<this.internalRadius&&(this.movedX=this.maxMoveStick),this.movedX+this.internalRadius>this.canvas.width&&(this.movedX=this.canvas.width-this.maxMoveStick),this.movedY<this.internalRadius&&(this.movedY=this.maxMoveStick),this.movedY+this.internalRadius>this.canvas.height&&(this.movedY=this.canvas.height-this.maxMoveStick),this.context.arc(this.movedX,this.movedY,this.internalRadius,0,this.circumference,!1);const e=this.context.createRadialGradient(this.centerX,this.centerY,5,this.centerX,this.centerY,200);e.addColorStop(0,this.internalFillColor),e.addColorStop(1,this.internalStrokeColor),this.context.fillStyle=e,this.context.fill(),this.context.lineWidth=this.internalLineWidth,this.context.strokeStyle=this.internalStrokeColor,this.context.stroke()}_onTouchStart(e){this.pressed=!0}_onTouchMove(e){this.pressed&&e.targetTouches[0].target===this.canvas&&(this.movedX=e.targetTouches[0].pageX,this.movedY=e.targetTouches[0].pageY,this.canvas.offsetParent.tagName.toUpperCase()==="BODY"?(this.movedX-=this.canvas.offsetLeft,this.movedY-=this.canvas.offsetTop):(this.movedX-=this.canvas.offsetParent.offsetLeft,this.movedY-=this.canvas.offsetParent.offsetTop),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus))}_onTouchEnd(e){this.pressed=!1,this.autoReturnToCenter&&(this.movedX=this.centerX,this.movedY=this.centerY),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus)}_onMouseDown(e){this.pressed=!0}_onMouseMove(e){this.pressed&&(this.movedX=e.pageX,this.movedY=e.pageY,this.canvas.offsetParent.tagName.toUpperCase()==="BODY"?(this.movedX-=this.canvas.offsetLeft,this.movedY-=this.canvas.offsetTop):(this.movedX-=this.canvas.offsetParent.offsetLeft,this.movedY-=this.canvas.offsetParent.offsetTop),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus))}_onMouseUp(e){this.pressed=!1,this.autoReturnToCenter&&(this.movedX=this.centerX,this.movedY=this.centerY),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._drawExternal(),this._drawInternal(),this.StickStatus.xPosition=this.movedX,this.StickStatus.yPosition=this.movedY,this.StickStatus.x=Number((100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()),this.StickStatus.y=Number((100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()),this.StickStatus.cardinalDirection=this._getCardinalDirection(),this.callback(this.StickStatus)}_getCardinalDirection(){let e="",r=this.movedX-this.centerX,i=this.movedY-this.centerY;return i>=this.directionVerticalLimitNeg&&i<=this.directionVerticalLimitPos&&(e="C"),i<this.directionVerticalLimitNeg&&(e="N"),i>this.directionVerticalLimitPos&&(e="S"),r<this.directionHorizontalLimitNeg&&(e==="C"?e="W":e+="W"),r>this.directionHorizontalLimitPos&&(e==="C"?e="E":e+="E"),e}GetWidth(){return this.canvas.width}GetHeight(){return this.canvas.height}GetPosX(){return this.movedX}GetPosY(){return this.movedY}GetX(){return(100*((this.movedX-this.centerX)/this.maxMoveStick)).toFixed()}GetY(){return(100*((this.movedY-this.centerY)/this.maxMoveStick)*-1).toFixed()}GetDir(){return this._getCardinalDirection()}}var ft={},vr;function Ri(){if(vr)return ft;vr=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.LanguageTranslator=void 0,ft.getChildStyleToPass=t,ft.addComponent=e;function t(i,n){var s,a,o="";try{if(i&&n?.length&&(!((s=Object.keys(i))===null||s===void 0)&&s.length)&&(!((a=n?.filter(function(f){return Object.keys(i).includes(f.name)}))===null||a===void 0)&&a.length))for(var l=function(f){var h=n?.filter(function(d){return d.name===f&&d.defaultValue!==i[f]});h&&(o+="".concat(f,":").concat(i[f],";"))},u=0,c=Object.keys(i);u<c.length;u++){var v=c[u];l(v)}}catch(f){console.error("error getting child style to pass",f)}finally{return o}}function e(i){var n,s=((n=i?.repoName.split("/"))===null||n===void 0?void 0:n[1])||i?.repoName;if(!s)throw new Error("wrong componentPath "+i?.repoName);if(!i?.version)throw new Error("wrong version "+i?.version);var a=i?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(i.repoName,"@").concat(i.version,"/").concat(a),i?.local)o.src="".concat(i.local);else if(location.href.includes("localhost:6006")){var l=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(l+"-",""),"/").concat(a)}document.head.appendChild(o)}catch(u){console.warn(u)}}var r=(function(){function i(n){if(this.lang="",!n?.dictionary)throw new Error("no dictionary provided");this.dictionary=n.dictionary,this.setLang(n?.lang)}return i.prototype.setLang=function(n){n||(n=i.getDefaultLang()),this.lang=n},i.prototype.translateWord=function(n,s){return i.getDictionaryWord(n,this.dictionary,s||this.lang)},i.prototype.translateDate=function(n,s,a){return i.formatDate(n,s,a||this.lang)},i.getDefaultLang=function(){var n,s,a,o="en";return navigator?.languages&&(!((a=(s=(n=navigator.languages[0])===null||n===void 0?void 0:n.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},i.getDictionaryWord=function(n,s,a){var o;if(!n)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((o=s[a])===null||o===void 0)&&o[n]))return s[a][n];var l="",u=i.getDefaultLang();if(!a||u!==a){var c=s?.[u];c?.[n]&&(l=c[n])}return l},i.formatDate=function(n,s,a){if(!n)throw new Error("no date provided");if(typeof n.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(a||i.getDefaultLang(),s);return o.format(n)},i})();return ft.LanguageTranslator=r,ft}Ri();var Li=ne('<div class="set svelte-k03ui8"><nav class="d-pad svelte-k03ui8"><button class="up svelte-k03ui8" aria-label="Move up"></button> <button class="right svelte-k03ui8" aria-label="Move right"></button> <button class="down svelte-k03ui8" aria-label="Move down"></button> <button class="left svelte-k03ui8" aria-label="Move left"></button></nav></div>'),Pi=ne('<div id="joystick" class="svelte-k03ui8"></div>'),Ni=ne("<div>Unknown type</div>");const Di={hash:"svelte-k03ui8",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;--hb-pad-joystick-size: 200px;--dpad-radius: 17%;--dpad-radius-in: 20%;--dpad-fg: #ddd;--dpad-fg-hover: #eee;--dpad-bg: #fff;--arrowcolor: #aaa;--tri-sml-a: calc(var(--hb-pad-joystick-size) / 9);--tri-sml-b: calc(var(--hb-pad-joystick-size) / 6);--tri-lrg-a: calc(var(--hb-pad-joystick-size) / 9);--tri-lrg-b: calc(var(--hb-pad-joystick-size) / 6);--dpad-arrow-shift: 5px;--dpad-arrow-move: 35%;}#joystick.svelte-k03ui8 {width:var(--hb-pad-joystick-size);height:var(--hb-pad-joystick-size);margin:auto;}.set.svelte-k03ui8 {overflow:hidden;}.set.svelte-k03ui8 .d-pad:where(.svelte-k03ui8) {display:inline-block;}.d-pad.svelte-k03ui8 {position:relative;width:var(--hb-pad-joystick-size);height:var(--hb-pad-joystick-size);border-radius:48%;overflow:hidden;}.d-pad.svelte-k03ui8:before {content:"";position:absolute;top:50%;left:50%;border-radius:5%;transform:translate(-50%, -50%);width:66.6%;height:66.6%;background:var(--dpad-fg);}.d-pad.svelte-k03ui8:after {content:"";position:absolute;display:none;z-index:2;width:20%;height:20%;top:50%;left:50%;background:var(--dpad-fg);border-radius:50%;transform:translate(-50%, -50%);transition:all 0.25s;cursor:pointer;}.d-pad.svelte-k03ui8:hover:after {width:30%;height:30%;}.d-pad.svelte-k03ui8 button:where(.svelte-k03ui8) {cursor:pointer;border:none;display:block;position:absolute;-webkit-tap-highlight-color:rgba(255, 255, 255, 0);width:33.3%;height:43%;line-height:40%;color:#fff;background:var(--dpad-fg);text-align:center;}.d-pad.svelte-k03ui8 button:where(.svelte-k03ui8):hover {background:var(--dpad-fg-hover);}.d-pad.svelte-k03ui8 button:where(.svelte-k03ui8):before {content:"";position:absolute;width:0;height:0;border-radius:5px;border-style:solid;transition:all 0.25s;}.d-pad.svelte-k03ui8 button:where(.svelte-k03ui8):after {content:"";position:absolute;width:102%;height:78%;background:var(--dpad-bg);border-radius:var(--dpad-radius-in);}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8),
3
+ .d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8) {width:43%;height:33%;}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):after,
4
+ .d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):after {width:78%;height:102%;}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8) {top:0;left:50%;transform:translate(-50%, 0);border-radius:var(--dpad-radius) var(--dpad-radius) 50% 50%;}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8):hover {background:linear-gradient(0deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8):after {left:0;top:0;transform:translate(-100%, 0);border-top-left-radius:50%;pointer-events:none;}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8):before {top:40%;left:50%;transform:translate(-50%, -50%);border-width:0 var(--tri-sml-a) var(--tri-sml-b) var(--tri-sml-a);border-color:transparent transparent var(--arrowcolor) transparent;}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8):active:before {border-bottom-color:#333;}.d-pad.svelte-k03ui8 button.up:where(.svelte-k03ui8):hover:before {top:var(--dpad-arrow-move);}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8) {bottom:0;left:50%;transform:translate(-50%, 0);border-radius:50% 50% var(--dpad-radius) var(--dpad-radius);}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8):hover {background:linear-gradient(180deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8):after {right:0;bottom:0;transform:translate(100%, 0);border-bottom-right-radius:50%;pointer-events:none;}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8):before {bottom:40%;left:50%;transform:translate(-50%, 50%);border-width:var(--tri-sml-b) var(--tri-sml-a) 0px var(--tri-sml-a);border-color:var(--arrowcolor) transparent transparent transparent;}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8):active:before {border-top-color:#333;}.d-pad.svelte-k03ui8 button.down:where(.svelte-k03ui8):hover:before {bottom:var(--dpad-arrow-move);}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8) {top:50%;left:0;transform:translate(0, -50%);border-radius:var(--dpad-radius) 50% 50% var(--dpad-radius);}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):hover {background:linear-gradient(-90deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):after {left:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:50%;pointer-events:none;}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):before {left:40%;top:50%;transform:translate(-50%, -50%);border-width:var(--tri-sml-a) var(--tri-sml-b) var(--tri-sml-a) 0;border-color:transparent var(--arrowcolor) transparent transparent;}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):active:before {border-right-color:#333;}.d-pad.svelte-k03ui8 button.left:where(.svelte-k03ui8):hover:before {left:var(--dpad-arrow-move);}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8) {top:50%;right:0;transform:translate(0, -50%);border-radius:50% var(--dpad-radius) var(--dpad-radius) 50%;}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):hover {background:linear-gradient(90deg, var(--dpad-fg) 0%, var(--dpad-fg-hover) 50%);}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):after {right:0;top:0;transform:translate(0, -100%);border-top-right-radius:50%;pointer-events:none;}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):before {right:40%;top:50%;transform:translate(50%, -50%);border-width:var(--tri-sml-a) 0 var(--tri-sml-a) var(--tri-sml-b);border-color:transparent transparent transparent var(--arrowcolor);}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):active:before {border-left-color:#333;}.d-pad.svelte-k03ui8 button.right:where(.svelte-k03ui8):hover:before {right:var(--dpad-arrow-move);}`};function _r(t,e){we(e,!0),$i(t,Di);function r(d,b){e.$$host.dispatchEvent(new CustomEvent(d,{detail:b}))}let i=ae(e,"id",7,""),n=ae(e,"pad_or_joystick",7,"dpad"),s=ae(e,"joystick_parameters",7,void 0),a;pt({}),Ie(()=>{}),yi(()=>{const d=e.$$host?.shadowRoot?.querySelector("#joystick");if(n()==="joystick"&&!a&&d?.style){const b="#F2eef6",T="#Ece2f7",K="silver";a=new Ti(d,{parameters:{internalFillColor:s()?.internalFillColor||b,internalStrokeColor:s()?.internalStrokeColor||T,externalStrokeColor:s()?.externalStrokeColor||K},callback:M=>{l({x:M.x,y:M.y,cardinalDirection:M.cardinalDirection})}})}});function o(d){r("sendDirection",{id:i(),direction:d})}function l(d){r("sendJoystickPosition",Object.assign({id:i()},d))}var u={get id(){return i()},set id(d=""){i(d),Ot()},get pad_or_joystick(){return n()},set pad_or_joystick(d="dpad"){n(d),Ot()},get joystick_parameters(){return s()},set joystick_parameters(d=void 0){s(d),Ot()}},c=ur(),v=Oe(c);{var f=d=>{var b=Li(),T=je(b),K=je(T);K.__click=()=>o("up");var M=re(K,2);M.__click=()=>o("right");var Z=re(M,2);Z.__click=()=>o("down");var Lt=re(Z,2);Lt.__click=()=>o("left"),me(T),me(b),mt(d,b)},h=d=>{var b=ur(),T=Oe(b);{var K=Z=>{var Lt=Pi();mt(Z,Lt)},M=Z=>{var Lt=Ni();mt(Z,Lt)};hr(T,Z=>{n()==="joystick"?Z(K):Z(M,!1)},!0)}mt(d,b)};hr(v,d=>{n()==="dpad"?d(f):d(h,!1)})}return mt(t,c),ke(u)}_i(["click"]),customElements.define("hb-pad-joystick",Ci(_r,{id:{},pad_or_joystick:{},joystick_parameters:{}},[],[],!0)),oe.Component=_r,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})})(this["pad-joystick"]=this["pad-joystick"]||{});
6
5
  //# sourceMappingURL=main.iife.js.map