@streamlayer/react 1.22.2 → 1.22.3

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 +1 @@
1
- "use strict";const ms=require("react");var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fs(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var Xi={exports:{}},He,Tn;function de(){if(Tn)return He;Tn=1;function e(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}return He=e,He}var Ge,xn;function Ji(){if(xn)return Ge;xn=1;var e=typeof ve=="object"&&ve&&ve.Object===Object&&ve;return Ge=e,Ge}var $e,On;function ie(){if(On)return $e;On=1;var e=Ji(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return $e=t,$e}var ke,Kn;function qs(){if(Kn)return ke;Kn=1;var e=ie(),r=function(){return e.Date.now()};return ke=r,ke}var Ue,Sn;function Rs(){if(Sn)return Ue;Sn=1;var e=/\s/;function r(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return Ue=r,Ue}var ze,En;function ws(){if(En)return ze;En=1;var e=Rs(),r=/^\s+/;function t(n){return n&&n.slice(0,e(n)+1).replace(r,"")}return ze=t,ze}var We,Pn;function we(){if(Pn)return We;Pn=1;var e=ie(),r=e.Symbol;return We=r,We}var Ye,Mn;function As(){if(Mn)return Ye;Mn=1;var e=we(),r=Object.prototype,t=r.hasOwnProperty,n=r.toString,a=e?e.toStringTag:void 0;function i(o){var u=t.call(o,a),v=o[a];try{o[a]=void 0;var h=!0}catch{}var m=n.call(o);return h&&(u?o[a]=v:delete o[a]),m}return Ye=i,Ye}var Xe,In;function Ts(){if(In)return Xe;In=1;var e=Object.prototype,r=e.toString;function t(n){return r.call(n)}return Xe=t,Xe}var Je,Dn;function Ae(){if(Dn)return Je;Dn=1;var e=we(),r=As(),t=Ts(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?a:n:i&&i in Object(u)?r(u):t(u)}return Je=o,Je}var Ze,Ln;function pe(){if(Ln)return Ze;Ln=1;function e(r){return r!=null&&typeof r=="object"}return Ze=e,Ze}var Qe,Nn;function Te(){if(Nn)return Qe;Nn=1;var e=Ae(),r=pe(),t="[object Symbol]";function n(a){return typeof a=="symbol"||r(a)&&e(a)==t}return Qe=n,Qe}var Ve,Bn;function xs(){if(Bn)return Ve;Bn=1;var e=ws(),r=de(),t=Te(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function v(h){if(typeof h=="number")return h;if(t(h))return n;if(r(h)){var m=typeof h.valueOf=="function"?h.valueOf():h;h=r(m)?m+"":m}if(typeof h!="string")return h===0?h:+h;h=e(h);var _=i.test(h);return _||o.test(h)?u(h.slice(2),_?2:8):a.test(h)?n:+h}return Ve=v,Ve}var er,jn;function Zi(){if(jn)return er;jn=1;var e=de(),r=qs(),t=xs(),n="Expected a function",a=Math.max,i=Math.min;function o(u,v,h){var m,_,I,P,N,K,b=0,l=!1,g=!1,C=!0;if(typeof u!="function")throw new TypeError(n);v=t(v)||0,e(h)&&(l=!!h.leading,g="maxWait"in h,I=g?a(t(h.maxWait)||0,v):I,C="trailing"in h?!!h.trailing:C);function y(A){var k=m,X=_;return m=_=void 0,b=A,P=u.apply(X,k),P}function S(A){return b=A,N=setTimeout(L,v),l?y(A):P}function x(A){var k=A-K,X=A-b,te=v-k;return g?i(te,I-X):te}function q(A){var k=A-K,X=A-b;return K===void 0||k>=v||k<0||g&&X>=I}function L(){var A=r();if(q(A))return R(A);N=setTimeout(L,x(A))}function R(A){return N=void 0,C&&m?y(A):(m=_=void 0,P)}function O(){N!==void 0&&clearTimeout(N),b=0,m=K=_=N=void 0}function E(){return N===void 0?P:R(r())}function G(){var A=r(),k=q(A);if(m=arguments,_=this,K=A,k){if(N===void 0)return S(K);if(g)return clearTimeout(N),N=setTimeout(L,v),y(K)}return N===void 0&&(N=setTimeout(L,v)),P}return G.cancel=O,G.flush=E,G}return er=o,er}var rr,Hn;function Qi(){if(Hn)return rr;Hn=1;var e=Ae(),r=de(),t="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(u){if(!r(u))return!1;var v=e(u);return v==n||v==a||v==t||v==i}return rr=o,rr}var Os=ie(),Ks=Os["__core-js_shared__"],Ss=Ks,tr=Ss,Gn=function(){var e=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Es(e){return!!Gn&&Gn in e}var Ps=Es,Ms=Function.prototype,Is=Ms.toString;function Ds(e){if(e!=null){try{return Is.call(e)}catch{}try{return e+""}catch{}}return""}var Vi=Ds,Ls=Qi(),Ns=Ps,Bs=de(),js=Vi,Hs=/[\\^$.*+?()[\]{}|]/g,Gs=/^\[object .+?Constructor\]$/,$s=Function.prototype,ks=Object.prototype,Us=$s.toString,zs=ks.hasOwnProperty,Ws=RegExp("^"+Us.call(zs).replace(Hs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ys(e){if(!Bs(e)||Ns(e))return!1;var r=Ls(e)?Ws:Gs;return r.test(js(e))}var Xs=Ys;function Js(e,r){return e==null?void 0:e[r]}var Zs=Js,Qs=Xs,Vs=Zs;function eo(e,r){var t=Vs(e,r);return Qs(t)?t:void 0}var he=eo,nr,$n;function Ie(){if($n)return nr;$n=1;var e=he,r=e(Object,"create");return nr=r,nr}var ar,kn;function ro(){if(kn)return ar;kn=1;var e=Ie();function r(){this.__data__=e?e(null):{},this.size=0}return ar=r,ar}var ir,Un;function to(){if(Un)return ir;Un=1;function e(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}return ir=e,ir}var sr,zn;function no(){if(zn)return sr;zn=1;var e=Ie(),r="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function a(i){var o=this.__data__;if(e){var u=o[i];return u===r?void 0:u}return n.call(o,i)?o[i]:void 0}return sr=a,sr}var or,Wn;function ao(){if(Wn)return or;Wn=1;var e=Ie(),r=Object.prototype,t=r.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:t.call(i,a)}return or=n,or}var ur,Yn;function io(){if(Yn)return ur;Yn=1;var e=Ie(),r="__lodash_hash_undefined__";function t(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?r:a,this}return ur=t,ur}var cr,Xn;function so(){if(Xn)return cr;Xn=1;var e=ro(),r=to(),t=no(),n=ao(),a=io();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,cr=i,cr}function oo(){this.__data__=[],this.size=0}var uo=oo,fr,Jn;function cn(){if(Jn)return fr;Jn=1;function e(r,t){return r===t||r!==r&&t!==t}return fr=e,fr}var co=cn();function fo(e,r){for(var t=e.length;t--;)if(co(e[t][0],r))return t;return-1}var De=fo,lo=De,ho=Array.prototype,vo=ho.splice;function po(e){var r=this.__data__,t=lo(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():vo.call(r,t,1),--this.size,!0}var yo=po,go=De;function bo(e){var r=this.__data__,t=go(r,e);return t<0?void 0:r[t][1]}var _o=bo,mo=De;function Co(e){return mo(this.__data__,e)>-1}var Fo=Co,qo=De;function Ro(e,r){var t=this.__data__,n=qo(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var wo=Ro,Ao=uo,To=yo,xo=_o,Oo=Fo,Ko=wo;function ye(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ye.prototype.clear=Ao;ye.prototype.delete=To;ye.prototype.get=xo;ye.prototype.has=Oo;ye.prototype.set=Ko;var Le=ye,So=he,Eo=ie(),Po=So(Eo,"Map"),fn=Po,lr,Zn;function Mo(){if(Zn)return lr;Zn=1;var e=so(),r=Le,t=fn;function n(){this.size=0,this.__data__={hash:new e,map:new(t||r),string:new e}}return lr=n,lr}var dr,Qn;function Io(){if(Qn)return dr;Qn=1;function e(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}return dr=e,dr}var hr,Vn;function Ne(){if(Vn)return hr;Vn=1;var e=Io();function r(t,n){var a=t.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return hr=r,hr}var vr,ea;function Do(){if(ea)return vr;ea=1;var e=Ne();function r(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}return vr=r,vr}var pr,ra;function Lo(){if(ra)return pr;ra=1;var e=Ne();function r(t){return e(this,t).get(t)}return pr=r,pr}var yr,ta;function No(){if(ta)return yr;ta=1;var e=Ne();function r(t){return e(this,t).has(t)}return yr=r,yr}var gr,na;function Bo(){if(na)return gr;na=1;var e=Ne();function r(t,n){var a=e(this,t),i=a.size;return a.set(t,n),this.size+=a.size==i?0:1,this}return gr=r,gr}var br,aa;function ln(){if(aa)return br;aa=1;var e=Mo(),r=Do(),t=Lo(),n=No(),a=Bo();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,br=i,br}var _r,ia;function jo(){if(ia)return _r;ia=1;var e="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,e),this}return _r=r,_r}var mr,sa;function Ho(){if(sa)return mr;sa=1;function e(r){return this.__data__.has(r)}return mr=e,mr}var Cr,oa;function es(){if(oa)return Cr;oa=1;var e=ln(),r=jo(),t=Ho();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=r,n.prototype.has=t,Cr=n,Cr}var Fr,ua;function Go(){if(ua)return Fr;ua=1;function e(r,t,n,a){for(var i=r.length,o=n+(a?1:-1);a?o--:++o<i;)if(t(r[o],o,r))return o;return-1}return Fr=e,Fr}var qr,ca;function $o(){if(ca)return qr;ca=1;function e(r){return r!==r}return qr=e,qr}var Rr,fa;function ko(){if(fa)return Rr;fa=1;function e(r,t,n){for(var a=n-1,i=r.length;++a<i;)if(r[a]===t)return a;return-1}return Rr=e,Rr}var wr,la;function Uo(){if(la)return wr;la=1;var e=Go(),r=$o(),t=ko();function n(a,i,o){return i===i?t(a,i,o):e(a,r,o)}return wr=n,wr}var Ar,da;function zo(){if(da)return Ar;da=1;var e=Uo();function r(t,n){var a=t==null?0:t.length;return!!a&&e(t,n,0)>-1}return Ar=r,Ar}var Tr,ha;function Wo(){if(ha)return Tr;ha=1;function e(r,t,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(t,r[a]))return!0;return!1}return Tr=e,Tr}var xr,va;function dn(){if(va)return xr;va=1;function e(r,t){for(var n=-1,a=r==null?0:r.length,i=Array(a);++n<a;)i[n]=t(r[n],n,r);return i}return xr=e,xr}var Or,pa;function hn(){if(pa)return Or;pa=1;function e(r){return function(t){return r(t)}}return Or=e,Or}var Kr,ya;function rs(){if(ya)return Kr;ya=1;function e(r,t){return r.has(t)}return Kr=e,Kr}var Sr,ga;function Yo(){if(ga)return Sr;ga=1;var e=es(),r=zo(),t=Wo(),n=dn(),a=hn(),i=rs(),o=200;function u(v,h,m,_){var I=-1,P=r,N=!0,K=v.length,b=[],l=h.length;if(!K)return b;m&&(h=n(h,a(m))),_?(P=t,N=!1):h.length>=o&&(P=i,N=!1,h=new e(h));e:for(;++I<K;){var g=v[I],C=m==null?g:m(g);if(g=_||g!==0?g:0,N&&C===C){for(var y=l;y--;)if(h[y]===C)continue e;b.push(g)}else P(h,C,_)||b.push(g)}return b}return Sr=u,Sr}var Er,ba;function ts(){if(ba)return Er;ba=1;function e(r,t){for(var n=-1,a=t.length,i=r.length;++n<a;)r[i+n]=t[n];return r}return Er=e,Er}var Pr,_a;function Xo(){if(_a)return Pr;_a=1;var e=Ae(),r=pe(),t="[object Arguments]";function n(a){return r(a)&&e(a)==t}return Pr=n,Pr}var Mr,ma;function vn(){if(ma)return Mr;ma=1;var e=Xo(),r=pe(),t=Object.prototype,n=t.hasOwnProperty,a=t.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(o){return r(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Mr=i,Mr}var Ir,Ca;function re(){if(Ca)return Ir;Ca=1;var e=Array.isArray;return Ir=e,Ir}var Dr,Fa;function Jo(){if(Fa)return Dr;Fa=1;var e=we(),r=vn(),t=re(),n=e?e.isConcatSpreadable:void 0;function a(i){return t(i)||r(i)||!!(n&&i&&i[n])}return Dr=a,Dr}var Lr,qa;function ns(){if(qa)return Lr;qa=1;var e=ts(),r=Jo();function t(n,a,i,o,u){var v=-1,h=n.length;for(i||(i=r),u||(u=[]);++v<h;){var m=n[v];a>0&&i(m)?a>1?t(m,a-1,i,o,u):e(u,m):o||(u[u.length]=m)}return u}return Lr=t,Lr}var Nr,Ra;function xe(){if(Ra)return Nr;Ra=1;function e(r){return r}return Nr=e,Nr}var Br,wa;function Zo(){if(wa)return Br;wa=1;function e(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}return Br=e,Br}var jr,Aa;function Qo(){if(Aa)return jr;Aa=1;var e=Zo(),r=Math.max;function t(n,a,i){return a=r(a===void 0?n.length-1:a,0),function(){for(var o=arguments,u=-1,v=r(o.length-a,0),h=Array(v);++u<v;)h[u]=o[a+u];u=-1;for(var m=Array(a+1);++u<a;)m[u]=o[u];return m[a]=i(h),e(n,this,m)}}return jr=t,jr}var Hr,Ta;function Vo(){if(Ta)return Hr;Ta=1;function e(r){return function(){return r}}return Hr=e,Hr}var Gr,xa;function eu(){if(xa)return Gr;xa=1;var e=he,r=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Gr=r,Gr}var $r,Oa;function ru(){if(Oa)return $r;Oa=1;var e=Vo(),r=eu(),t=xe(),n=r?function(a,i){return r(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:t;return $r=n,$r}var kr,Ka;function tu(){if(Ka)return kr;Ka=1;var e=800,r=16,t=Date.now;function n(a){var i=0,o=0;return function(){var u=t(),v=r-(u-o);if(o=u,v>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return kr=n,kr}var Ur,Sa;function nu(){if(Sa)return Ur;Sa=1;var e=ru(),r=tu(),t=r(e);return Ur=t,Ur}var zr,Ea;function as(){if(Ea)return zr;Ea=1;var e=xe(),r=Qo(),t=nu();function n(a,i){return t(r(a,i,e),a+"")}return zr=n,zr}var Wr,Pa;function pn(){if(Pa)return Wr;Pa=1;var e=9007199254740991;function r(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return Wr=r,Wr}var Yr,Ma;function Oe(){if(Ma)return Yr;Ma=1;var e=Qi(),r=pn();function t(n){return n!=null&&r(n.length)&&!e(n)}return Yr=t,Yr}var Xr,Ia;function au(){if(Ia)return Xr;Ia=1;var e=Oe(),r=pe();function t(n){return r(n)&&e(n)}return Xr=t,Xr}var Jr,Da;function iu(){if(Da)return Jr;Da=1;var e=Yo(),r=ns(),t=as(),n=au(),a=t(function(i,o){return n(i)?e(i,r(o,1,n,!0)):[]});return Jr=a,Jr}var Zr,La;function is(){if(La)return Zr;La=1;function e(r,t){for(var n=-1,a=r==null?0:r.length,i=0,o=[];++n<a;){var u=r[n];t(u,n,r)&&(o[i++]=u)}return o}return Zr=e,Zr}var Qr,Na;function su(){if(Na)return Qr;Na=1;function e(r){return function(t,n,a){for(var i=-1,o=Object(t),u=a(t),v=u.length;v--;){var h=u[r?v:++i];if(n(o[h],h,o)===!1)break}return t}}return Qr=e,Qr}var Vr,Ba;function ou(){if(Ba)return Vr;Ba=1;var e=su(),r=e();return Vr=r,Vr}var et,ja;function uu(){if(ja)return et;ja=1;function e(r,t){for(var n=-1,a=Array(r);++n<r;)a[n]=t(n);return a}return et=e,et}var Pe={exports:{}};function cu(){return!1}var fu=cu;Pe.exports;(function(e,r){var t=ie(),n=fu,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?t.Buffer:void 0,v=u?u.isBuffer:void 0,h=v||n;e.exports=h})(Pe,Pe.exports);var ss=Pe.exports,rt,Ha;function yn(){if(Ha)return rt;Ha=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function t(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&r.test(n))&&n>-1&&n%1==0&&n<a}return rt=t,rt}var tt,Ga;function lu(){if(Ga)return tt;Ga=1;var e=Ae(),r=pn(),t=pe(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",u="[object Error]",v="[object Function]",h="[object Map]",m="[object Number]",_="[object Object]",I="[object RegExp]",P="[object Set]",N="[object String]",K="[object WeakMap]",b="[object ArrayBuffer]",l="[object DataView]",g="[object Float32Array]",C="[object Float64Array]",y="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",q="[object Uint8Array]",L="[object Uint8ClampedArray]",R="[object Uint16Array]",O="[object Uint32Array]",E={};E[g]=E[C]=E[y]=E[S]=E[x]=E[q]=E[L]=E[R]=E[O]=!0,E[n]=E[a]=E[b]=E[i]=E[l]=E[o]=E[u]=E[v]=E[h]=E[m]=E[_]=E[I]=E[P]=E[N]=E[K]=!1;function G(A){return t(A)&&r(A.length)&&!!E[e(A)]}return tt=G,tt}var Me={exports:{}};Me.exports;(function(e,r){var t=Ji(),n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&t.process,u=function(){try{var v=a&&a.require&&a.require("util").types;return v||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u})(Me,Me.exports);var du=Me.exports,nt,$a;function os(){if($a)return nt;$a=1;var e=lu(),r=hn(),t=du,n=t&&t.isTypedArray,a=n?r(n):e;return nt=a,nt}var at,ka;function hu(){if(ka)return at;ka=1;var e=uu(),r=vn(),t=re(),n=ss,a=yn(),i=os(),o=Object.prototype,u=o.hasOwnProperty;function v(h,m){var _=t(h),I=!_&&r(h),P=!_&&!I&&n(h),N=!_&&!I&&!P&&i(h),K=_||I||P||N,b=K?e(h.length,String):[],l=b.length;for(var g in h)(m||u.call(h,g))&&!(K&&(g=="length"||P&&(g=="offset"||g=="parent")||N&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||a(g,l)))&&b.push(g);return b}return at=v,at}var vu=Object.prototype;function pu(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||vu;return e===t}var yu=pu;function gu(e,r){return function(t){return e(r(t))}}var bu=gu,it,Ua;function _u(){if(Ua)return it;Ua=1;var e=bu,r=e(Object.keys,Object);return it=r,it}var st,za;function mu(){if(za)return st;za=1;var e=yu,r=_u(),t=Object.prototype,n=t.hasOwnProperty;function a(i){if(!e(i))return r(i);var o=[];for(var u in Object(i))n.call(i,u)&&u!="constructor"&&o.push(u);return o}return st=a,st}var ot,Wa;function gn(){if(Wa)return ot;Wa=1;var e=hu(),r=mu(),t=Oe();function n(a){return t(a)?e(a):r(a)}return ot=n,ot}var ut,Ya;function bn(){if(Ya)return ut;Ya=1;var e=ou(),r=gn();function t(n,a){return n&&e(n,a,r)}return ut=t,ut}var ct,Xa;function Cu(){if(Xa)return ct;Xa=1;var e=Oe();function r(t,n){return function(a,i){if(a==null)return a;if(!e(a))return t(a,i);for(var o=a.length,u=n?o:-1,v=Object(a);(n?u--:++u<o)&&i(v[u],u,v)!==!1;);return a}}return ct=r,ct}var ft,Ja;function _n(){if(Ja)return ft;Ja=1;var e=bn(),r=Cu(),t=r(e);return ft=t,ft}var lt,Za;function Fu(){if(Za)return lt;Za=1;var e=_n();function r(t,n){var a=[];return e(t,function(i,o,u){n(i,o,u)&&a.push(i)}),a}return lt=r,lt}var qu=Le;function Ru(){this.__data__=new qu,this.size=0}var wu=Ru;function Au(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Tu=Au;function xu(e){return this.__data__.get(e)}var Ou=xu;function Ku(e){return this.__data__.has(e)}var Su=Ku,Eu=Le,Pu=fn,Mu=ln(),Iu=200;function Du(e,r){var t=this.__data__;if(t instanceof Eu){var n=t.__data__;if(!Pu||n.length<Iu-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Mu(n)}return t.set(e,r),this.size=t.size,this}var Lu=Du,Nu=Le,Bu=wu,ju=Tu,Hu=Ou,Gu=Su,$u=Lu;function ge(e){var r=this.__data__=new Nu(e);this.size=r.size}ge.prototype.clear=Bu;ge.prototype.delete=ju;ge.prototype.get=Hu;ge.prototype.has=Gu;ge.prototype.set=$u;var us=ge,dt,Qa;function ku(){if(Qa)return dt;Qa=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a;)if(t(r[n],n,r))return!0;return!1}return dt=e,dt}var ht,Va;function cs(){if(Va)return ht;Va=1;var e=es(),r=ku(),t=rs(),n=1,a=2;function i(o,u,v,h,m,_){var I=v&n,P=o.length,N=u.length;if(P!=N&&!(I&&N>P))return!1;var K=_.get(o),b=_.get(u);if(K&&b)return K==u&&b==o;var l=-1,g=!0,C=v&a?new e:void 0;for(_.set(o,u),_.set(u,o);++l<P;){var y=o[l],S=u[l];if(h)var x=I?h(S,y,l,u,o,_):h(y,S,l,o,u,_);if(x!==void 0){if(x)continue;g=!1;break}if(C){if(!r(u,function(q,L){if(!t(C,L)&&(y===q||m(y,q,v,h,_)))return C.push(L)})){g=!1;break}}else if(!(y===S||m(y,S,v,h,_))){g=!1;break}}return _.delete(o),_.delete(u),g}return ht=i,ht}var Uu=ie(),zu=Uu.Uint8Array,Wu=zu,vt,ei;function Yu(){if(ei)return vt;ei=1;function e(r){var t=-1,n=Array(r.size);return r.forEach(function(a,i){n[++t]=[i,a]}),n}return vt=e,vt}function Xu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Ju=Xu,pt,ri;function Zu(){if(ri)return pt;ri=1;var e=we(),r=Wu,t=cn(),n=cs(),a=Yu(),i=Ju,o=1,u=2,v="[object Boolean]",h="[object Date]",m="[object Error]",_="[object Map]",I="[object Number]",P="[object RegExp]",N="[object Set]",K="[object String]",b="[object Symbol]",l="[object ArrayBuffer]",g="[object DataView]",C=e?e.prototype:void 0,y=C?C.valueOf:void 0;function S(x,q,L,R,O,E,G){switch(L){case g:if(x.byteLength!=q.byteLength||x.byteOffset!=q.byteOffset)return!1;x=x.buffer,q=q.buffer;case l:return!(x.byteLength!=q.byteLength||!E(new r(x),new r(q)));case v:case h:case I:return t(+x,+q);case m:return x.name==q.name&&x.message==q.message;case P:case K:return x==q+"";case _:var A=a;case N:var k=R&o;if(A||(A=i),x.size!=q.size&&!k)return!1;var X=G.get(x);if(X)return X==q;R|=u,G.set(x,q);var te=n(A(x),A(q),R,O,E,G);return G.delete(x),te;case b:if(y)return y.call(x)==y.call(q)}return!1}return pt=S,pt}var Qu=ts(),Vu=re();function ec(e,r,t){var n=r(e);return Vu(e)?n:Qu(n,t(e))}var rc=ec;function tc(){return[]}var nc=tc,ac=is(),ic=nc,sc=Object.prototype,oc=sc.propertyIsEnumerable,ti=Object.getOwnPropertySymbols,uc=ti?function(e){return e==null?[]:(e=Object(e),ac(ti(e),function(r){return oc.call(e,r)}))}:ic,cc=uc,fc=rc,lc=cc,dc=gn();function hc(e){return fc(e,dc,lc)}var vc=hc,yt,ni;function pc(){if(ni)return yt;ni=1;var e=vc,r=1,t=Object.prototype,n=t.hasOwnProperty;function a(i,o,u,v,h,m){var _=u&r,I=e(i),P=I.length,N=e(o),K=N.length;if(P!=K&&!_)return!1;for(var b=P;b--;){var l=I[b];if(!(_?l in o:n.call(o,l)))return!1}var g=m.get(i),C=m.get(o);if(g&&C)return g==o&&C==i;var y=!0;m.set(i,o),m.set(o,i);for(var S=_;++b<P;){l=I[b];var x=i[l],q=o[l];if(v)var L=_?v(q,x,l,o,i,m):v(x,q,l,i,o,m);if(!(L===void 0?x===q||h(x,q,u,v,m):L)){y=!1;break}S||(S=l=="constructor")}if(y&&!S){var R=i.constructor,O=o.constructor;R!=O&&"constructor"in i&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof O=="function"&&O instanceof O)&&(y=!1)}return m.delete(i),m.delete(o),y}return yt=a,yt}var yc=he,gc=ie(),bc=yc(gc,"DataView"),_c=bc,mc=he,Cc=ie(),Fc=mc(Cc,"Promise"),qc=Fc,Rc=he,wc=ie(),Ac=Rc(wc,"Set"),Tc=Ac,xc=he,Oc=ie(),Kc=xc(Oc,"WeakMap"),Sc=Kc,nn=_c,an=fn,sn=qc,on=Tc,un=Sc,fs=Ae(),be=Vi,ai="[object Map]",Ec="[object Object]",ii="[object Promise]",si="[object Set]",oi="[object WeakMap]",ui="[object DataView]",Pc=be(nn),Mc=be(an),Ic=be(sn),Dc=be(on),Lc=be(un),le=fs;(nn&&le(new nn(new ArrayBuffer(1)))!=ui||an&&le(new an)!=ai||sn&&le(sn.resolve())!=ii||on&&le(new on)!=si||un&&le(new un)!=oi)&&(le=function(e){var r=fs(e),t=r==Ec?e.constructor:void 0,n=t?be(t):"";if(n)switch(n){case Pc:return ui;case Mc:return ai;case Ic:return ii;case Dc:return si;case Lc:return oi}return r});var Nc=le,gt,ci;function Bc(){if(ci)return gt;ci=1;var e=us,r=cs(),t=Zu(),n=pc(),a=Nc,i=re(),o=ss,u=os(),v=1,h="[object Arguments]",m="[object Array]",_="[object Object]",I=Object.prototype,P=I.hasOwnProperty;function N(K,b,l,g,C,y){var S=i(K),x=i(b),q=S?m:a(K),L=x?m:a(b);q=q==h?_:q,L=L==h?_:L;var R=q==_,O=L==_,E=q==L;if(E&&o(K)){if(!o(b))return!1;S=!0,R=!1}if(E&&!R)return y||(y=new e),S||u(K)?r(K,b,l,g,C,y):t(K,b,q,l,g,C,y);if(!(l&v)){var G=R&&P.call(K,"__wrapped__"),A=O&&P.call(b,"__wrapped__");if(G||A){var k=G?K.value():K,X=A?b.value():b;return y||(y=new e),C(k,X,l,g,y)}}return E?(y||(y=new e),n(K,b,l,g,C,y)):!1}return gt=N,gt}var bt,fi;function ls(){if(fi)return bt;fi=1;var e=Bc(),r=pe();function t(n,a,i,o,u){return n===a?!0:n==null||a==null||!r(n)&&!r(a)?n!==n&&a!==a:e(n,a,i,o,t,u)}return bt=t,bt}var _t,li;function jc(){if(li)return _t;li=1;var e=us,r=ls(),t=1,n=2;function a(i,o,u,v){var h=u.length,m=h,_=!v;if(i==null)return!m;for(i=Object(i);h--;){var I=u[h];if(_&&I[2]?I[1]!==i[I[0]]:!(I[0]in i))return!1}for(;++h<m;){I=u[h];var P=I[0],N=i[P],K=I[1];if(_&&I[2]){if(N===void 0&&!(P in i))return!1}else{var b=new e;if(v)var l=v(N,K,P,i,o,b);if(!(l===void 0?r(K,N,t|n,v,b):l))return!1}}return!0}return _t=a,_t}var mt,di;function ds(){if(di)return mt;di=1;var e=de();function r(t){return t===t&&!e(t)}return mt=r,mt}var Ct,hi;function Hc(){if(hi)return Ct;hi=1;var e=ds(),r=gn();function t(n){for(var a=r(n),i=a.length;i--;){var o=a[i],u=n[o];a[i]=[o,u,e(u)]}return a}return Ct=t,Ct}var Ft,vi;function hs(){if(vi)return Ft;vi=1;function e(r,t){return function(n){return n==null?!1:n[r]===t&&(t!==void 0||r in Object(n))}}return Ft=e,Ft}var qt,pi;function Gc(){if(pi)return qt;pi=1;var e=jc(),r=Hc(),t=hs();function n(a){var i=r(a);return i.length==1&&i[0][2]?t(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return qt=n,qt}var Rt,yi;function mn(){if(yi)return Rt;yi=1;var e=re(),r=Te(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(e(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||r(i)?!0:n.test(i)||!t.test(i)||o!=null&&i in Object(o)}return Rt=a,Rt}var vs=ln(),$c="Expected a function";function Cn(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError($c);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(Cn.Cache||vs),t}Cn.Cache=vs;var kc=Cn,Uc=kc,zc=500;function Wc(e){var r=Uc(e,function(n){return t.size===zc&&t.clear(),n}),t=r.cache;return r}var Yc=Wc,Xc=Yc,Jc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zc=/\\(\\)?/g,Qc=Xc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Jc,function(t,n,a,i){r.push(a?i.replace(Zc,"$1"):n||t)}),r}),Vc=Qc,wt,gi;function ef(){if(gi)return wt;gi=1;var e=we(),r=dn(),t=re(),n=Te(),a=1/0,i=e?e.prototype:void 0,o=i?i.toString:void 0;function u(v){if(typeof v=="string")return v;if(t(v))return r(v,u)+"";if(n(v))return o?o.call(v):"";var h=v+"";return h=="0"&&1/v==-a?"-0":h}return wt=u,wt}var At,bi;function ps(){if(bi)return At;bi=1;var e=ef();function r(t){return t==null?"":e(t)}return At=r,At}var rf=re(),tf=mn(),nf=Vc,af=ps();function sf(e,r){return rf(e)?e:tf(e,r)?[e]:nf(af(e))}var ys=sf,Tt,_i;function Be(){if(_i)return Tt;_i=1;var e=Te(),r=1/0;function t(n){if(typeof n=="string"||e(n))return n;var a=n+"";return a=="0"&&1/n==-r?"-0":a}return Tt=t,Tt}var xt,mi;function Fn(){if(mi)return xt;mi=1;var e=ys,r=Be();function t(n,a){a=e(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[r(a[i++])];return i&&i==o?n:void 0}return xt=t,xt}var Ot,Ci;function of(){if(Ci)return Ot;Ci=1;var e=Fn();function r(t,n,a){var i=t==null?void 0:e(t,n);return i===void 0?a:i}return Ot=r,Ot}var Kt,Fi;function uf(){if(Fi)return Kt;Fi=1;function e(r,t){return r!=null&&t in Object(r)}return Kt=e,Kt}var St,qi;function cf(){if(qi)return St;qi=1;var e=ys,r=vn(),t=re(),n=yn(),a=pn(),i=Be();function o(u,v,h){v=e(v,u);for(var m=-1,_=v.length,I=!1;++m<_;){var P=i(v[m]);if(!(I=u!=null&&h(u,P)))break;u=u[P]}return I||++m!=_?I:(_=u==null?0:u.length,!!_&&a(_)&&n(P,_)&&(t(u)||r(u)))}return St=o,St}var Et,Ri;function ff(){if(Ri)return Et;Ri=1;var e=uf(),r=cf();function t(n,a){return n!=null&&r(n,a,e)}return Et=t,Et}var Pt,wi;function lf(){if(wi)return Pt;wi=1;var e=ls(),r=of(),t=ff(),n=mn(),a=ds(),i=hs(),o=Be(),u=1,v=2;function h(m,_){return n(m)&&a(_)?i(o(m),_):function(I){var P=r(I,m);return P===void 0&&P===_?t(I,m):e(_,P,u|v)}}return Pt=h,Pt}var Mt,Ai;function df(){if(Ai)return Mt;Ai=1;function e(r){return function(t){return t==null?void 0:t[r]}}return Mt=e,Mt}var It,Ti;function hf(){if(Ti)return It;Ti=1;var e=Fn();function r(t){return function(n){return e(n,t)}}return It=r,It}var Dt,xi;function vf(){if(xi)return Dt;xi=1;var e=df(),r=hf(),t=mn(),n=Be();function a(i){return t(i)?e(n(i)):r(i)}return Dt=a,Dt}var Lt,Oi;function qn(){if(Oi)return Lt;Oi=1;var e=Gc(),r=lf(),t=xe(),n=re(),a=vf();function i(o){return typeof o=="function"?o:o==null?t:typeof o=="object"?n(o)?r(o[0],o[1]):e(o):a(o)}return Lt=i,Lt}var Nt,Ki;function pf(){if(Ki)return Nt;Ki=1;var e=is(),r=Fu(),t=qn(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o,3))}return Nt=a,Nt}var Bt,Si;function yf(){if(Si)return Bt;Si=1;function e(r,t,n){var a;return n(r,function(i,o,u){if(t(i,o,u))return a=o,!1}),a}return Bt=e,Bt}var jt,Ei;function gf(){if(Ei)return jt;Ei=1;var e=yf(),r=bn(),t=qn();function n(a,i){return e(a,t(i,3),r)}return jt=n,jt}var Ht,Pi;function bf(){if(Pi)return Ht;Pi=1;function e(r){return r&&r.length?r[0]:void 0}return Ht=e,Ht}var Gt,Mi;function _f(){return Mi||(Mi=1,Gt=bf()),Gt}var $t,Ii;function mf(){if(Ii)return $t;Ii=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a&&t(r[n],n,r)!==!1;);return r}return $t=e,$t}var kt,Di;function gs(){if(Di)return kt;Di=1;var e=xe();function r(t){return typeof t=="function"?t:e}return kt=r,kt}var Ut,Li;function Cf(){if(Li)return Ut;Li=1;var e=mf(),r=_n(),t=gs(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o))}return Ut=a,Ut}var zt,Ni;function Ff(){if(Ni)return zt;Ni=1;var e=bn(),r=gs();function t(n,a){return n&&e(n,r(a))}return zt=t,zt}var Wt,Bi;function qf(){if(Bi)return Wt;Bi=1;function e(){}return Wt=e,Wt}var Yt,ji;function Rf(){if(ji)return Yt;ji=1;var e=_n(),r=Oe();function t(n,a){var i=-1,o=r(n)?Array(n.length):[];return e(n,function(u,v,h){o[++i]=a(u,v,h)}),o}return Yt=t,Yt}var Xt,Hi;function wf(){if(Hi)return Xt;Hi=1;function e(r,t){var n=r.length;for(r.sort(t);n--;)r[n]=r[n].value;return r}return Xt=e,Xt}var Jt,Gi;function Af(){if(Gi)return Jt;Gi=1;var e=Te();function r(t,n){if(t!==n){var a=t!==void 0,i=t===null,o=t===t,u=e(t),v=n!==void 0,h=n===null,m=n===n,_=e(n);if(!h&&!_&&!u&&t>n||u&&v&&m&&!h&&!_||i&&v&&m||!a&&m||!o)return 1;if(!i&&!u&&!_&&t<n||_&&a&&o&&!i&&!u||h&&a&&o||!v&&o||!m)return-1}return 0}return Jt=r,Jt}var Zt,$i;function Tf(){if($i)return Zt;$i=1;var e=Af();function r(t,n,a){for(var i=-1,o=t.criteria,u=n.criteria,v=o.length,h=a.length;++i<v;){var m=e(o[i],u[i]);if(m){if(i>=h)return m;var _=a[i];return m*(_=="desc"?-1:1)}}return t.index-n.index}return Zt=r,Zt}var Qt,ki;function xf(){if(ki)return Qt;ki=1;var e=dn(),r=Fn(),t=qn(),n=Rf(),a=wf(),i=hn(),o=Tf(),u=xe(),v=re();function h(m,_,I){_.length?_=e(_,function(K){return v(K)?function(b){return r(b,K.length===1?K[0]:K)}:K}):_=[u];var P=-1;_=e(_,i(t));var N=n(m,function(K,b,l){var g=e(_,function(C){return C(K)});return{criteria:g,index:++P,value:K}});return a(N,function(K,b){return o(K,b,I)})}return Qt=h,Qt}var Vt,Ui;function Of(){if(Ui)return Vt;Ui=1;var e=cn(),r=Oe(),t=yn(),n=de();function a(i,o,u){if(!n(u))return!1;var v=typeof o;return(v=="number"?r(u)&&t(o,u.length):v=="string"&&o in u)?e(u[o],i):!1}return Vt=a,Vt}var en,zi;function Kf(){if(zi)return en;zi=1;var e=ns(),r=xf(),t=as(),n=Of(),a=t(function(i,o){if(i==null)return[];var u=o.length;return u>1&&n(i,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),r(i,e(o,1),[])});return en=a,en}var rn,Wi;function Sf(){if(Wi)return rn;Wi=1;var e=Zi(),r=de(),t="Expected a function";function n(a,i,o){var u=!0,v=!0;if(typeof a!="function")throw new TypeError(t);return r(o)&&(u="leading"in o?!!o.leading:u,v="trailing"in o?!!o.trailing:v),e(a,i,{leading:u,maxWait:i,trailing:v})}return rn=n,rn}var tn,Yi;function Ef(){if(Yi)return tn;Yi=1;var e=ps(),r=0;function t(n){var a=++r;return e(n)+a}return tn=t,tn}(function(e,r){(function(t,n){e.exports=n(Zi(),iu(),pf(),gf(),_f(),Cf(),Ff(),qf(),Kf(),Sf(),Ef(),ms)})(ve,function(t,n,a,i,o,u,v,h,m,_,I,P){return function(){var N={654:function(b,l,g){var C,y=this&&this.__assign||function(){return y=Object.assign||function(p){for(var s,c=1,f=arguments.length;c<f;c++)for(var d in s=arguments[c])Object.prototype.hasOwnProperty.call(s,d)&&(p[d]=s[d]);return p},y.apply(this,arguments)},S=this&&this.__createBinding||(Object.create?function(p,s,c,f){f===void 0&&(f=c);var d=Object.getOwnPropertyDescriptor(s,c);d&&!("get"in d?!s.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(p,f,d)}:function(p,s,c,f){f===void 0&&(f=c),p[f]=s[c]}),x=this&&this.__setModuleDefault||(Object.create?function(p,s){Object.defineProperty(p,"default",{enumerable:!0,value:s})}:function(p,s){p.default=s}),q=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var s={};if(p!=null)for(var c in p)c!=="default"&&Object.prototype.hasOwnProperty.call(p,c)&&S(s,p,c);return x(s,p),s},L=this&&this.__spreadArray||function(p,s,c){if(c||arguments.length===2)for(var f,d=0,F=s.length;d<F;d++)!f&&d in s||(f||(f=Array.prototype.slice.call(s,0,d)),f[d]=s[d]);return p.concat(f||Array.prototype.slice.call(s))},R=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.updateRtl=l.doesFocusableExist=l.getCurrentFocusKey=l.updateAllLayouts=l.resume=l.pause=l.navigateByDirection=l.setFocus=l.setKeyMap=l.destroy=l.setThrottle=l.init=l.SpatialNavigation=l.ROOT_FOCUS_KEY=void 0;var O=R(g(150)),E=R(g(117)),G=R(g(747)),A=R(g(23)),k=R(g(842)),X=R(g(682)),te=R(g(784)),_e=R(g(432)),je=R(g(67)),Ke=R(g(35)),Q=R(g(119)),me=q(g(964)),oe="left",ue="right",ce="up",ne="down",Ce="enter",Fe=((C={}).left=[37,"ArrowLeft"],C.up=[38,"ArrowUp"],C.right=[39,"ArrowRight"],C.down=[40,"ArrowDown"],C.enter=[13,"Enter"],C);l.ROOT_FOCUS_KEY="SN:ROOT";var qe=["#0FF","#FF0","#F0F"],Se={leading:!0,trailing:!1},Ee=function(){function p(){this.focusableComponents={},this.focusKey=null,this.parentsHavingFocusedChild=[],this.domNodeFocusOptions={},this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.useGetBoundingClientRect=!1,this.shouldFocusDOMNode=!1,this.shouldUseNativeEvents=!1,this.writingDirection=Q.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=Fe,this.pause=this.pause.bind(this),this.resume=this.resume.bind(this),this.setFocus=this.setFocus.bind(this),this.updateAllLayouts=this.updateAllLayouts.bind(this),this.navigateByDirection=this.navigateByDirection.bind(this),this.init=this.init.bind(this),this.setThrottle=this.setThrottle.bind(this),this.destroy=this.destroy.bind(this),this.setKeyMap=this.setKeyMap.bind(this),this.getCurrentFocusKey=this.getCurrentFocusKey.bind(this),this.doesFocusableExist=this.doesFocusableExist.bind(this),this.updateRtl=this.updateRtl.bind(this),this.setFocusDebounced=(0,O.default)(this.setFocus,300,{leading:!1,trailing:!0}),this.debug=!1,this.visualDebugger=null,this.logIndex=0,this.distanceCalculationMethod="corners"}return p.getCutoffCoordinate=function(s,c,f,d,F){var w=s?d.top:F===Q.default.LTR?d.left:d.right,T=s?d.bottom:F===Q.default.LTR?d.right:d.left;return c?f?w:T:f?T:w},p.getRefCorners=function(s,c,f){var d={a:{x:0,y:0},b:{x:0,y:0}};switch(s){case ce:var F=c?f.bottom:f.top;d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case ne:F=c?f.top:f.bottom,d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case oe:var w=c?f.right:f.left;d.a={x:w,y:f.top},d.b={x:w,y:f.bottom};break;case ue:w=c?f.left:f.right,d.a={x:w,y:f.top},d.b={x:w,y:f.bottom}}return d},p.isAdjacentSlice=function(s,c,f){var d=s.a,F=s.b,w=c.a,T=c.b,M=f?"x":"y",$=d[M],H=F[M],j=w[M],B=T[M],D=.2*(H-$);return Math.max(0,Math.min(H,B)-Math.max($,j))>=D},p.getPrimaryAxisDistance=function(s,c,f){var d=s.a,F=c.a,w=f?"y":"x";return Math.abs(F[w]-d[w])},p.getSecondaryAxisDistance=function(s,c,f,d,F){if(F)return F(s,c,f,d);var w=s.a,T=s.b,M=c.a,$=c.b,H=f?"x":"y",j=w[H],B=T[H],D=M[H],Y=$[H];if(d==="center"){var z=(j+B)/2,J=(D+Y)/2;return Math.abs(z-J)}if(d==="edges"){var se=Math.min(j,B),U=Math.min(D,Y),V=Math.max(j,B),fe=Math.max(D,Y),ae=Math.abs(se-U),ee=Math.abs(V-fe);return Math.min(ae,ee)}var Re=[Math.abs(D-j),Math.abs(D-B),Math.abs(Y-j),Math.abs(Y-B)];return Math.min.apply(Math,Re)},p.prototype.sortSiblingsByPriority=function(s,c,f,d){var F=this,w=f===ne||f===ce,T=p.getRefCorners(f,!1,c);return(0,_e.default)(s,function(M){var $=p.getRefCorners(f,!0,M.layout),H=p.isAdjacentSlice(T,$,w),j=H?p.getPrimaryAxisDistance:p.getSecondaryAxisDistance,B=H?p.getSecondaryAxisDistance:p.getPrimaryAxisDistance,D=j(T,$,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),Y=B(T,$,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),z=5*D+Y,J=(z+1)/(H?5:1);return F.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(M.focusKey," relative to ").concat(d," is"),D,Y,z),F.log("smartNavigate","priority for ".concat(M.focusKey," relative to ").concat(d," is"),J),F.visualDebugger&&(F.visualDebugger.drawPoint($.a.x,$.a.y,"yellow",6),F.visualDebugger.drawPoint($.b.x,$.b.y,"yellow",6)),J})},p.prototype.init=function(s){var c=this,f=s===void 0?{}:s,d=f.debug,F=d!==void 0&&d,w=f.visualDebug,T=w!==void 0&&w,M=f.nativeMode,$=M!==void 0&&M,H=f.throttle,j=H===void 0?0:H,B=f.throttleKeypresses,D=B!==void 0&&B,Y=f.useGetBoundingClientRect,z=Y!==void 0&&Y,J=f.shouldFocusDOMNode,se=J!==void 0&&J,U=f.domNodeFocusOptions,V=U===void 0?{}:U,fe=f.shouldUseNativeEvents,ae=fe!==void 0&&fe,ee=f.rtl,Re=ee!==void 0&&ee,W=f.distanceCalculationMethod,Z=W===void 0?"corners":W,Rn=f.customDistanceCalculationFunction,bs=Rn===void 0?void 0:Rn;if(!this.enabled&&(this.domNodeFocusOptions=V,this.enabled=!0,this.nativeMode=$,this.throttleKeypresses=D,this.useGetBoundingClientRect=z,this.shouldFocusDOMNode=se&&!$,this.shouldUseNativeEvents=ae,this.writingDirection=Re?Q.default.RTL:Q.default.LTR,this.distanceCalculationMethod=Z,this.customDistanceCalculationFunction=bs,this.debug=F,!this.nativeMode&&(Number.isInteger(j)&&j>0&&(this.throttle=j),this.bindEventHandlers(),T))){this.visualDebugger=new Ke.default(this.writingDirection);var wn=function(){requestAnimationFrame(function(){c.visualDebugger.clearLayouts(),(0,te.default)(c.focusableComponents,function(An,_s){c.visualDebugger.drawLayout(An.layout,_s,An.parentFocusKey)}),wn()})};wn()}},p.prototype.setThrottle=function(s){var c=s===void 0?{}:s,f=c.throttle,d=f===void 0?0:f,F=c.throttleKeypresses,w=F!==void 0&&F;this.throttleKeypresses=w,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(d)&&(this.throttle=d),this.bindEventHandlers())},p.prototype.destroy=function(){this.enabled&&(this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.focusKey=null,this.parentsHavingFocusedChild=[],this.focusableComponents={},this.paused=!1,this.keyMap=Fe,this.unbindEventHandlers())},p.prototype.getEventType=function(s){return(0,A.default)(this.getKeyMap(),function(c){return c.includes(s)})},p.getKeyCode=function(s){return s.keyCode||s.code||s.key},p.prototype.bindEventHandlers=function(){var s=this;typeof window<"u"&&window.addEventListener&&(this.keyDownEventListener=function(c){if(s.paused!==!0){s.debug&&(s.logIndex+=1);var f=p.getKeyCode(c),d=s.getEventType(f);if(d){s.pressedKeys[d]=s.pressedKeys[d]?s.pressedKeys[d]+1:1,s.shouldUseNativeEvents||(c.preventDefault(),c.stopPropagation());var F={pressedKeys:s.pressedKeys};if(d===Ce&&s.focusKey)s.onEnterPress(F);else{var w=s.onArrowPress(d,F)===!1;if(s.visualDebugger&&s.visualDebugger.clear(),w)s.log("keyDownEventListener","default navigation prevented");else{var T=(0,A.default)(s.getKeyMap(),function(M){return M.includes(f)});s.smartNavigate(T,null,{event:c})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,je.default)(this.keyDownEventListener.bind(this),this.throttle,Se)),this.keyUpEventListener=function(c){var f=p.getKeyCode(c),d=s.getEventType(f);delete s.pressedKeys[d],s.throttle&&!s.throttleKeypresses&&s.keyDownEventListenerThrottled.cancel(),d===Ce&&s.focusKey&&s.onEnterRelease(),!s.focusKey||d!==oe&&d!==ue&&d!==ce&&d!==ne||s.onArrowRelease(d)},window.addEventListener("keyup",this.keyUpEventListener),window.addEventListener("keydown",this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener))},p.prototype.unbindEventHandlers=function(){if(typeof window<"u"&&window.removeEventListener){window.removeEventListener("keyup",this.keyUpEventListener),this.keyUpEventListener=null;var s=this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener;window.removeEventListener("keydown",s),this.keyDownEventListener=null}},p.prototype.onEnterPress=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onEnterPress&&c.onEnterPress(s):this.log("onEnterPress","componentNotFocusable"):this.log("onEnterPress","noComponent")},p.prototype.onEnterRelease=function(){var s=this.focusableComponents[this.focusKey];s?s.focusable?s.onEnterRelease&&s.onEnterRelease():this.log("onEnterRelease","componentNotFocusable"):this.log("onEnterRelease","noComponent")},p.prototype.onArrowPress=function(s,c){var f=this.focusableComponents[this.focusKey];if(f)return f&&f.onArrowPress&&f.onArrowPress(s,c);this.log("onArrowPress","noComponent")},p.prototype.onArrowRelease=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onArrowRelease&&c.onArrowRelease(s):this.log("onArrowRelease","componentNotFocusable"):this.log("onArrowRelease","noComponent")},p.prototype.navigateByDirection=function(s,c){if(this.paused!==!0&&this.enabled&&!this.nativeMode){var f=[ne,ce,oe,ue];f.includes(s)?(this.log("navigateByDirection","direction",s),this.smartNavigate(s,null,c)):this.log("navigateByDirection","Invalid direction. You passed: `".concat(s,"`, but you can use only these: "),f)}},p.prototype.smartNavigate=function(s,c,f){var d=this;if(!this.nativeMode){var F=s===ne||s===ce,w=s===ne||(this.writingDirection===Q.default.LTR?s===ue:s===oe);this.log("smartNavigate","direction",s),this.log("smartNavigate","fromParentFocusKey",c),this.log("smartNavigate","this.focusKey",this.focusKey),c||(0,te.default)(this.focusableComponents,function(U){U.layoutUpdated=!1});var T=this.focusableComponents[c||this.focusKey];if(c||T){if(this.log("smartNavigate","currentComponent",T?T.focusKey:void 0,T?T.node:void 0,T),T){this.updateLayout(T.focusKey);var M=T.parentFocusKey,$=T.focusKey,H=T.layout,j=p.getCutoffCoordinate(F,w,!1,H,this.writingDirection),B=(0,G.default)(this.focusableComponents,function(U){if(U.parentFocusKey===M&&U.focusable){d.updateLayout(U.focusKey);var V=p.getCutoffCoordinate(F,w,!0,U.layout,d.writingDirection);return F||d.writingDirection===Q.default.LTR?w?V>=j:V<=j:w?V<=j:V>=j}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",j),this.log("smartNavigate","siblings","".concat(B.length," elements:"),B.map(function(U){return U.focusKey}).join(", "),B.map(function(U){return U.node}),B.map(function(U){return U}))),this.visualDebugger){var D=p.getRefCorners(s,!1,H);this.visualDebugger.drawPoint(D.a.x,D.a.y),this.visualDebugger.drawPoint(D.b.x,D.b.y)}var Y=this.sortSiblingsByPriority(B,H,s,$),z=(0,k.default)(Y);if(this.log("smartNavigate","nextComponent",z?z.focusKey:void 0,z?z.node:void 0,z),z)this.setFocus(z.focusKey,f);else{var J=this.focusableComponents[M],se=J!=null&&J.isFocusBoundary?J.focusBoundaryDirections||[s]:[];J&&se.includes(s)||this.smartNavigate(s,M,f)}}}else this.setFocus(this.getForcedFocusKey())}},p.prototype.saveLastFocusedChildKey=function(s,c){s&&(this.log("saveLastFocusedChildKey","".concat(s.focusKey," lastFocusedChildKey set"),c),s.lastFocusedChildKey=c)},p.prototype.log=function(s,c){for(var f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];this.debug&&console.log.apply(console,L(["%c".concat(s,"%c").concat(c),"background: ".concat(qe[this.logIndex%qe.length],"; color: black; padding: 1px 5px;"),"background: #333; color: #BADA55; padding: 1px 5px;"],f,!1))},p.prototype.getCurrentFocusKey=function(){return this.focusKey},p.prototype.getForcedFocusKey=function(){var s,c=(0,G.default)(this.focusableComponents,function(d){return d.focusable&&d.forceFocus}),f=this.sortSiblingsByPriority(c,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",l.ROOT_FOCUS_KEY);return(s=(0,k.default)(f))===null||s===void 0?void 0:s.focusKey},p.prototype.getNextFocusKey=function(s){var c=this,f=this.focusableComponents[s];if(!f||this.nativeMode)return s;var d=(0,G.default)(this.focusableComponents,function(M){return M.parentFocusKey===s&&M.focusable});if(d.length>0){var F=f.lastFocusedChildKey,w=f.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",F),this.log("getNextFocusKey","preferredChildFocusKey is",w),F&&f.saveLastFocusedChild&&this.isParticipatingFocusableComponent(F))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",F),this.getNextFocusKey(F);if(w&&this.isParticipatingFocusableComponent(w))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",w),this.getNextFocusKey(w);d.forEach(function(M){return c.updateLayout(M.focusKey)});var T=function(M,$){var H=$===Q.default.LTR?function(B){var D=B.layout;return Math.abs(D.left)+Math.abs(D.top)}:function(B){var D=B.layout;return Math.abs(window.innerWidth-D.right)+Math.abs(D.top)},j=(0,_e.default)(M,H);return(0,k.default)(j)}(d,this.writingDirection).focusKey;return this.log("getNextFocusKey","childKey will be focused",T),this.getNextFocusKey(T)}return this.log("getNextFocusKey","targetFocusKey",s),s},p.prototype.addFocusable=function(s){var c=s.focusKey,f=s.node,d=s.parentFocusKey,F=s.onEnterPress,w=s.onEnterRelease,T=s.onArrowPress,M=s.onArrowRelease,$=s.onFocus,H=s.onBlur,j=s.saveLastFocusedChild,B=s.trackChildren,D=s.onUpdateFocus,Y=s.onUpdateHasFocusedChild,z=s.preferredChildFocusKey,J=s.autoRestoreFocus,se=s.forceFocus,U=s.focusable,V=s.isFocusBoundary,fe=s.focusBoundaryDirections;if(this.focusableComponents[c]={focusKey:c,node:f,parentFocusKey:d,onEnterPress:F,onEnterRelease:w,onArrowPress:T,onArrowRelease:M,onFocus:$,onBlur:H,onUpdateFocus:D,onUpdateHasFocusedChild:Y,saveLastFocusedChild:j,trackChildren:B,preferredChildFocusKey:z,focusable:U,isFocusBoundary:V,focusBoundaryDirections:fe,autoRestoreFocus:J,forceFocus:se,lastFocusedChildKey:null,layout:{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:f},layoutUpdated:!1},f||console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ',this.focusableComponents[c]),!this.nativeMode){this.updateLayout(c),this.log("addFocusable","Component added: ",this.focusableComponents[c]),c===this.focusKey&&this.setFocus(z||c);for(var ae=this.focusableComponents[this.focusKey];ae;){if(ae.parentFocusKey===c){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}ae=this.focusableComponents[ae.parentFocusKey]}}},p.prototype.removeFocusable=function(s){var c=s.focusKey,f=this.focusableComponents[c];if(f){var d=f.parentFocusKey;(0,f.onUpdateFocus)(!1),this.log("removeFocusable","Component removed: ",f),delete this.focusableComponents[c];var F=this.parentsHavingFocusedChild.includes(c);this.parentsHavingFocusedChild=this.parentsHavingFocusedChild.filter(function(M){return M!==c});var w=this.focusableComponents[d],T=c===this.focusKey;if(w&&w.lastFocusedChildKey===c&&(w.lastFocusedChildKey=null),this.nativeMode)return;(T||F)&&w&&w.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",T?"Leaf component":"Container component","Auto restoring focus to: ",d),this.setFocusDebounced(d))}},p.prototype.getNodeLayoutByFocusKey=function(s){var c=this.focusableComponents[s];return c?(this.updateLayout(c.focusKey),c.layout):null},p.prototype.setCurrentFocusedKey=function(s,c){var f,d,F,w;if(this.isFocusableComponent(this.focusKey)&&s!==this.focusKey){var T=this.focusableComponents[this.focusKey];T.onUpdateFocus(!1),T.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),c),(d=(f=T.node)===null||f===void 0?void 0:f.removeAttribute)===null||d===void 0||d.call(f,"data-focused"),this.log("setCurrentFocusedKey","onBlur",T)}if(this.focusKey=s,this.isFocusableComponent(this.focusKey)){var M=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&M.node&&M.node.focus(this.domNodeFocusOptions),(w=(F=M.node)===null||F===void 0?void 0:F.setAttribute)===null||w===void 0||w.call(F,"data-focused","true"),M.onUpdateFocus(!0),M.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),c),this.log("setCurrentFocusedKey","onFocus",M)}},p.prototype.updateParentsHasFocusedChild=function(s,c){for(var f=this,d=[],F=this.focusableComponents[s];F;){var w=F.parentFocusKey,T=this.focusableComponents[w];if(T){var M=T.focusKey;d.push(M)}F=T}var $=(0,E.default)(this.parentsHavingFocusedChild,d),H=(0,E.default)(d,this.parentsHavingFocusedChild);(0,X.default)($,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!1),f.onIntermediateNodeBecameBlurred(j,c)}),(0,X.default)(H,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!0),f.onIntermediateNodeBecameFocused(j,c)}),this.parentsHavingFocusedChild=d},p.prototype.updateParentsLastFocusedChild=function(s){for(var c=this.focusableComponents[s];c;){var f=c.parentFocusKey,d=this.focusableComponents[f];d&&this.saveLastFocusedChildKey(d,c.focusKey),c=d}},p.prototype.getKeyMap=function(){return this.keyMap},p.prototype.setKeyMap=function(s){this.keyMap=y(y({},this.getKeyMap()),function(c){var f={};return Object.entries(c).forEach(function(d){var F=d[0],w=d[1];f[F]=Array.isArray(w)?w:[w]}),f}(s))},p.prototype.isFocusableComponent=function(s){return!!this.focusableComponents[s]},p.prototype.isParticipatingFocusableComponent=function(s){return this.isFocusableComponent(s)&&this.focusableComponents[s].focusable},p.prototype.onIntermediateNodeBecameFocused=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onFocus(this.getNodeLayoutByFocusKey(s),c)},p.prototype.onIntermediateNodeBecameBlurred=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onBlur(this.getNodeLayoutByFocusKey(s),c)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1},p.prototype.setFocus=function(s,c){if(c===void 0&&(c={}),this.setFocusDebounced.cancel(),this.enabled){this.log("setFocus","focusKey",s),s&&s!==l.ROOT_FOCUS_KEY||(s=this.getForcedFocusKey());var f=this.getNextFocusKey(s);this.log("setFocus","newFocusKey",f),this.setCurrentFocusedKey(f,c),this.updateParentsHasFocusedChild(f,c),this.updateParentsLastFocusedChild(f)}},p.prototype.updateAllLayouts=function(){var s=this;this.enabled&&!this.nativeMode&&(0,te.default)(this.focusableComponents,function(c,f){s.updateLayout(f)})},p.prototype.updateLayout=function(s){var c=this.focusableComponents[s];if(c&&!this.nativeMode&&!c.layoutUpdated){var f=c.node,d=this.useGetBoundingClientRect?(0,me.getBoundingClientRect)(f):(0,me.default)(f);c.layout=y(y({},d),{node:f})}},p.prototype.updateFocusable=function(s,c){var f=c.node,d=c.preferredChildFocusKey,F=c.focusable,w=c.isFocusBoundary,T=c.focusBoundaryDirections,M=c.onEnterPress,$=c.onEnterRelease,H=c.onArrowPress,j=c.onFocus,B=c.onBlur;if(!this.nativeMode){var D=this.focusableComponents[s];D&&(D.preferredChildFocusKey=d,D.focusable=F,D.isFocusBoundary=w,D.focusBoundaryDirections=T,D.onEnterPress=M,D.onEnterRelease=$,D.onArrowPress=H,D.onFocus=j,D.onBlur=B,f&&(D.node=f))}},p.prototype.isNativeMode=function(){return this.nativeMode},p.prototype.doesFocusableExist=function(s){return!!this.focusableComponents[s]},p.prototype.updateRtl=function(s){this.writingDirection=s?Q.default.RTL:Q.default.LTR},p}();l.SpatialNavigation=new Ee,l.init=l.SpatialNavigation.init,l.setThrottle=l.SpatialNavigation.setThrottle,l.destroy=l.SpatialNavigation.destroy,l.setKeyMap=l.SpatialNavigation.setKeyMap,l.setFocus=l.SpatialNavigation.setFocus,l.navigateByDirection=l.SpatialNavigation.navigateByDirection,l.pause=l.SpatialNavigation.pause,l.resume=l.SpatialNavigation.resume,l.updateAllLayouts=l.SpatialNavigation.updateAllLayouts,l.getCurrentFocusKey=l.SpatialNavigation.getCurrentFocusKey,l.doesFocusableExist=l.SpatialNavigation.doesFocusableExist,l.updateRtl=l.SpatialNavigation.updateRtl},35:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0});var y=C(g(119)),S=typeof window<"u"&&window.document,x=S?window.innerWidth:0,q=S?window.innerHeight:0,L=function(){function R(O){S&&(this.debugCtx=R.createCanvas("sn-debug","1010",O),this.layoutsCtx=R.createCanvas("sn-layouts","1000",O),this.writingDirection=O)}return R.createCanvas=function(O,E,G){var A=document.querySelector("#".concat(O))||document.createElement("canvas");A.setAttribute("id",O),A.setAttribute("dir",G===y.default.LTR?"ltr":"rtl");var k=A.getContext("2d");return A.style.zIndex=E,A.style.position="fixed",A.style.top="0",A.style.left="0",document.body.appendChild(A),A.width=x,A.height=q,k},R.prototype.clear=function(){S&&this.debugCtx.clearRect(0,0,x,q)},R.prototype.clearLayouts=function(){S&&this.layoutsCtx.clearRect(0,0,x,q)},R.prototype.drawLayout=function(O,E,G){if(S){this.layoutsCtx.strokeStyle="green",this.layoutsCtx.strokeRect(O.left,O.top,O.width,O.height),this.layoutsCtx.font="8px monospace",this.layoutsCtx.fillStyle="red";var A=this.writingDirection===y.default.LTR?"left":"right",k=O[A];this.layoutsCtx.fillText(E,k,O.top+10),this.layoutsCtx.fillText(G,k,O.top+25),this.layoutsCtx.fillText("".concat(A,": ").concat(k),k,O.top+40),this.layoutsCtx.fillText("top: ".concat(O.top),k,O.top+55)}},R.prototype.drawPoint=function(O,E,G,A){G===void 0&&(G="blue"),A===void 0&&(A=10),S&&(this.debugCtx.strokeStyle=G,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(O-A/2,E-A/2,A,A))},R}();l.default=L},119:function(b,l){var g;Object.defineProperty(l,"__esModule",{value:!0}),function(C){C[C.LTR=0]="LTR",C[C.RTL=1]="RTL"}(g||(g={})),l.default=g},607:function(b,l,g){var C=this&&this.__createBinding||(Object.create?function(S,x,q,L){L===void 0&&(L=q);var R=Object.getOwnPropertyDescriptor(x,q);R&&!("get"in R?!x.__esModule:R.writable||R.configurable)||(R={enumerable:!0,get:function(){return x[q]}}),Object.defineProperty(S,L,R)}:function(S,x,q,L){L===void 0&&(L=q),S[L]=x[q]}),y=this&&this.__exportStar||function(S,x){for(var q in S)q==="default"||Object.prototype.hasOwnProperty.call(x,q)||C(x,S,q)};Object.defineProperty(l,"__esModule",{value:!0}),y(g(79),l),y(g(445),l),y(g(654),l)},964:function(b,l){Object.defineProperty(l,"__esModule",{value:!0}),l.getBoundingClientRect=void 0;var g=function(C){for(var y=C.offsetParent,S=C.offsetHeight,x=C.offsetWidth,q=C.offsetLeft,L=C.offsetTop;y&&y.nodeType===1;)q+=y.offsetLeft-y.scrollLeft,L+=y.offsetTop-y.scrollTop,y=y.offsetParent;return{height:S,left:q,top:L,width:x}};l.default=function(C){var y=C&&C.parentElement;if(C&&y){var S=g(y),x=g(C),q=x.height,L=x.left,R=x.top,O=x.width;return{x:L-S.left,y:R-S.top,width:O,height:q,left:L,top:R,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}},l.getBoundingClientRect=function(C){if(C&&C.getBoundingClientRect){var y=C.getBoundingClientRect();return{x:y.x,y:y.y,width:y.width,height:y.height,left:y.left,top:y.top,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}}},445:function(b,l,g){Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusContext=l.FocusContext=void 0;var C=g(156),y=g(654);l.FocusContext=(0,C.createContext)(y.ROOT_FOCUS_KEY),l.FocusContext.displayName="FocusContext",l.useFocusContext=function(){return(0,C.useContext)(l.FocusContext)}},79:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusable=void 0;var y=g(156),S=C(g(604)),x=C(g(461)),q=g(654),L=g(445);l.useFocusable=function(R){var O=R===void 0?{}:R,E=O.focusable,G=E===void 0||E,A=O.saveLastFocusedChild,k=A===void 0||A,X=O.trackChildren,te=X!==void 0&&X,_e=O.autoRestoreFocus,je=_e===void 0||_e,Ke=O.forceFocus,Q=Ke!==void 0&&Ke,me=O.isFocusBoundary,oe=me!==void 0&&me,ue=O.focusBoundaryDirections,ce=O.focusKey,ne=O.preferredChildFocusKey,Ce=O.onEnterPress,Fe=Ce===void 0?S.default:Ce,qe=O.onEnterRelease,Se=qe===void 0?S.default:qe,Ee=O.onArrowPress,p=Ee===void 0?function(){return!0}:Ee,s=O.onArrowRelease,c=s===void 0?S.default:s,f=O.onFocus,d=f===void 0?S.default:f,F=O.onBlur,w=F===void 0?S.default:F,T=O.extraProps,M=(0,y.useCallback)(function(W){Fe(T,W)},[Fe,T]),$=(0,y.useCallback)(function(){Se(T)},[Se,T]),H=(0,y.useCallback)(function(W,Z){return p(W,T,Z)},[T,p]),j=(0,y.useCallback)(function(W){c(W,T)},[c,T]),B=(0,y.useCallback)(function(W,Z){d(W,T,Z)},[T,d]),D=(0,y.useCallback)(function(W,Z){w(W,T,Z)},[T,w]),Y=(0,y.useRef)(null),z=(0,y.useState)(!1),J=z[0],se=z[1],U=(0,y.useState)(!1),V=U[0],fe=U[1],ae=(0,L.useFocusContext)(),ee=(0,y.useMemo)(function(){return ce||(0,x.default)("sn:focusable-item-")},[ce]),Re=(0,y.useCallback)(function(W){W===void 0&&(W={}),q.SpatialNavigation.setFocus(ee,W)},[ee]);return(0,y.useEffect)(function(){var W=Y.current;return q.SpatialNavigation.addFocusable({focusKey:ee,node:W,parentFocusKey:ae,preferredChildFocusKey:ne,onEnterPress:M,onEnterRelease:$,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D,onUpdateFocus:function(Z){return Z===void 0&&(Z=!1),se(Z)},onUpdateHasFocusedChild:function(Z){return Z===void 0&&(Z=!1),fe(Z)},saveLastFocusedChild:k,trackChildren:te,isFocusBoundary:oe,focusBoundaryDirections:ue,autoRestoreFocus:je,forceFocus:Q,focusable:G}),function(){q.SpatialNavigation.removeFocusable({focusKey:ee})}},[]),(0,y.useEffect)(function(){var W=Y.current;q.SpatialNavigation.updateFocusable(ee,{node:W,preferredChildFocusKey:ne,focusable:G,isFocusBoundary:oe,focusBoundaryDirections:ue,onEnterPress:M,onEnterRelease:$,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D})},[ee,ne,G,oe,ue,M,$,H,j,B,D]),{ref:Y,focusSelf:Re,focused:J,hasFocusedChild:V,focusKey:ee}}},150:function(b){b.exports=t},117:function(b){b.exports=n},747:function(b){b.exports=a},23:function(b){b.exports=i},842:function(b){b.exports=o},682:function(b){b.exports=u},784:function(b){b.exports=v},604:function(b){b.exports=h},432:function(b){b.exports=m},67:function(b){b.exports=_},461:function(b){b.exports=I},156:function(b){b.exports=P}},K={};return function b(l){var g=K[l];if(g!==void 0)return g.exports;var C=K[l]={exports:{}};return N[l].call(C.exports,C,C.exports,b),C.exports}(607)}()})})(Xi);var Pf=Xi.exports;exports.commonjsGlobal=ve;exports.distExports=Pf;exports.getAugmentedNamespace=Fs;exports.getDefaultExportFromCjs=Cs;
1
+ "use strict";const vs=require("react");var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ys(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var ki={exports:{}},He,Rn;function de(){if(Rn)return He;Rn=1;function e(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}return He=e,He}var $e,wn;function Gi(){if(wn)return $e;wn=1;var e=typeof ve=="object"&&ve&&ve.Object===Object&&ve;return $e=e,$e}var ke,An;function ie(){if(An)return ke;An=1;var e=Gi(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return ke=t,ke}var Ge,Tn;function gs(){if(Tn)return Ge;Tn=1;var e=ie(),r=function(){return e.Date.now()};return Ge=r,Ge}var Ue,xn;function bs(){if(xn)return Ue;xn=1;var e=/\s/;function r(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return Ue=r,Ue}var ze,On;function _s(){if(On)return ze;On=1;var e=bs(),r=/^\s+/;function t(n){return n&&n.slice(0,e(n)+1).replace(r,"")}return ze=t,ze}var We,Kn;function we(){if(Kn)return We;Kn=1;var e=ie(),r=e.Symbol;return We=r,We}var Ye,Sn;function ms(){if(Sn)return Ye;Sn=1;var e=we(),r=Object.prototype,t=r.hasOwnProperty,n=r.toString,a=e?e.toStringTag:void 0;function i(o){var u=t.call(o,a),v=o[a];try{o[a]=void 0;var h=!0}catch{}var m=n.call(o);return h&&(u?o[a]=v:delete o[a]),m}return Ye=i,Ye}var Xe,En;function Cs(){if(En)return Xe;En=1;var e=Object.prototype,r=e.toString;function t(n){return r.call(n)}return Xe=t,Xe}var Je,Pn;function Ae(){if(Pn)return Je;Pn=1;var e=we(),r=ms(),t=Cs(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?a:n:i&&i in Object(u)?r(u):t(u)}return Je=o,Je}var Ze,Mn;function pe(){if(Mn)return Ze;Mn=1;function e(r){return r!=null&&typeof r=="object"}return Ze=e,Ze}var Qe,In;function Te(){if(In)return Qe;In=1;var e=Ae(),r=pe(),t="[object Symbol]";function n(a){return typeof a=="symbol"||r(a)&&e(a)==t}return Qe=n,Qe}var Ve,Dn;function Fs(){if(Dn)return Ve;Dn=1;var e=_s(),r=de(),t=Te(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function v(h){if(typeof h=="number")return h;if(t(h))return n;if(r(h)){var m=typeof h.valueOf=="function"?h.valueOf():h;h=r(m)?m+"":m}if(typeof h!="string")return h===0?h:+h;h=e(h);var _=i.test(h);return _||o.test(h)?u(h.slice(2),_?2:8):a.test(h)?n:+h}return Ve=v,Ve}var er,Ln;function Ui(){if(Ln)return er;Ln=1;var e=de(),r=gs(),t=Fs(),n="Expected a function",a=Math.max,i=Math.min;function o(u,v,h){var m,_,I,P,N,K,b=0,l=!1,g=!1,C=!0;if(typeof u!="function")throw new TypeError(n);v=t(v)||0,e(h)&&(l=!!h.leading,g="maxWait"in h,I=g?a(t(h.maxWait)||0,v):I,C="trailing"in h?!!h.trailing:C);function y(A){var G=m,X=_;return m=_=void 0,b=A,P=u.apply(X,G),P}function S(A){return b=A,N=setTimeout(L,v),l?y(A):P}function x(A){var G=A-K,X=A-b,te=v-G;return g?i(te,I-X):te}function q(A){var G=A-K,X=A-b;return K===void 0||G>=v||G<0||g&&X>=I}function L(){var A=r();if(q(A))return R(A);N=setTimeout(L,x(A))}function R(A){return N=void 0,C&&m?y(A):(m=_=void 0,P)}function O(){N!==void 0&&clearTimeout(N),b=0,m=K=_=N=void 0}function E(){return N===void 0?P:R(r())}function $(){var A=r(),G=q(A);if(m=arguments,_=this,K=A,G){if(N===void 0)return S(K);if(g)return clearTimeout(N),N=setTimeout(L,v),y(K)}return N===void 0&&(N=setTimeout(L,v)),P}return $.cancel=O,$.flush=E,$}return er=o,er}var rr,Nn;function zi(){if(Nn)return rr;Nn=1;var e=Ae(),r=de(),t="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(u){if(!r(u))return!1;var v=e(u);return v==n||v==a||v==t||v==i}return rr=o,rr}var qs=ie(),Rs=qs["__core-js_shared__"],ws=Rs,tr=ws,Bn=function(){var e=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function As(e){return!!Bn&&Bn in e}var Ts=As,xs=Function.prototype,Os=xs.toString;function Ks(e){if(e!=null){try{return Os.call(e)}catch{}try{return e+""}catch{}}return""}var Wi=Ks,Ss=zi(),Es=Ts,Ps=de(),Ms=Wi,Is=/[\\^$.*+?()[\]{}|]/g,Ds=/^\[object .+?Constructor\]$/,Ls=Function.prototype,Ns=Object.prototype,Bs=Ls.toString,js=Ns.hasOwnProperty,Hs=RegExp("^"+Bs.call(js).replace(Is,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $s(e){if(!Ps(e)||Es(e))return!1;var r=Ss(e)?Hs:Ds;return r.test(Ms(e))}var ks=$s;function Gs(e,r){return e==null?void 0:e[r]}var Us=Gs,zs=ks,Ws=Us;function Ys(e,r){var t=Ws(e,r);return zs(t)?t:void 0}var he=Ys,nr,jn;function Ie(){if(jn)return nr;jn=1;var e=he,r=e(Object,"create");return nr=r,nr}var ar,Hn;function Xs(){if(Hn)return ar;Hn=1;var e=Ie();function r(){this.__data__=e?e(null):{},this.size=0}return ar=r,ar}var ir,$n;function Js(){if($n)return ir;$n=1;function e(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}return ir=e,ir}var sr,kn;function Zs(){if(kn)return sr;kn=1;var e=Ie(),r="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function a(i){var o=this.__data__;if(e){var u=o[i];return u===r?void 0:u}return n.call(o,i)?o[i]:void 0}return sr=a,sr}var or,Gn;function Qs(){if(Gn)return or;Gn=1;var e=Ie(),r=Object.prototype,t=r.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:t.call(i,a)}return or=n,or}var ur,Un;function Vs(){if(Un)return ur;Un=1;var e=Ie(),r="__lodash_hash_undefined__";function t(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?r:a,this}return ur=t,ur}var cr,zn;function eo(){if(zn)return cr;zn=1;var e=Xs(),r=Js(),t=Zs(),n=Qs(),a=Vs();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,cr=i,cr}function ro(){this.__data__=[],this.size=0}var to=ro,fr,Wn;function sn(){if(Wn)return fr;Wn=1;function e(r,t){return r===t||r!==r&&t!==t}return fr=e,fr}var no=sn();function ao(e,r){for(var t=e.length;t--;)if(no(e[t][0],r))return t;return-1}var De=ao,io=De,so=Array.prototype,oo=so.splice;function uo(e){var r=this.__data__,t=io(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():oo.call(r,t,1),--this.size,!0}var co=uo,fo=De;function lo(e){var r=this.__data__,t=fo(r,e);return t<0?void 0:r[t][1]}var ho=lo,vo=De;function po(e){return vo(this.__data__,e)>-1}var yo=po,go=De;function bo(e,r){var t=this.__data__,n=go(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var _o=bo,mo=to,Co=co,Fo=ho,qo=yo,Ro=_o;function ye(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ye.prototype.clear=mo;ye.prototype.delete=Co;ye.prototype.get=Fo;ye.prototype.has=qo;ye.prototype.set=Ro;var Le=ye,wo=he,Ao=ie(),To=wo(Ao,"Map"),on=To,lr,Yn;function xo(){if(Yn)return lr;Yn=1;var e=eo(),r=Le,t=on;function n(){this.size=0,this.__data__={hash:new e,map:new(t||r),string:new e}}return lr=n,lr}var dr,Xn;function Oo(){if(Xn)return dr;Xn=1;function e(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}return dr=e,dr}var hr,Jn;function Ne(){if(Jn)return hr;Jn=1;var e=Oo();function r(t,n){var a=t.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return hr=r,hr}var vr,Zn;function Ko(){if(Zn)return vr;Zn=1;var e=Ne();function r(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}return vr=r,vr}var pr,Qn;function So(){if(Qn)return pr;Qn=1;var e=Ne();function r(t){return e(this,t).get(t)}return pr=r,pr}var yr,Vn;function Eo(){if(Vn)return yr;Vn=1;var e=Ne();function r(t){return e(this,t).has(t)}return yr=r,yr}var gr,ea;function Po(){if(ea)return gr;ea=1;var e=Ne();function r(t,n){var a=e(this,t),i=a.size;return a.set(t,n),this.size+=a.size==i?0:1,this}return gr=r,gr}var br,ra;function un(){if(ra)return br;ra=1;var e=xo(),r=Ko(),t=So(),n=Eo(),a=Po();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,br=i,br}var _r,ta;function Mo(){if(ta)return _r;ta=1;var e="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,e),this}return _r=r,_r}var mr,na;function Io(){if(na)return mr;na=1;function e(r){return this.__data__.has(r)}return mr=e,mr}var Cr,aa;function Yi(){if(aa)return Cr;aa=1;var e=un(),r=Mo(),t=Io();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=r,n.prototype.has=t,Cr=n,Cr}var Fr,ia;function Do(){if(ia)return Fr;ia=1;function e(r,t,n,a){for(var i=r.length,o=n+(a?1:-1);a?o--:++o<i;)if(t(r[o],o,r))return o;return-1}return Fr=e,Fr}var qr,sa;function Lo(){if(sa)return qr;sa=1;function e(r){return r!==r}return qr=e,qr}var Rr,oa;function No(){if(oa)return Rr;oa=1;function e(r,t,n){for(var a=n-1,i=r.length;++a<i;)if(r[a]===t)return a;return-1}return Rr=e,Rr}var wr,ua;function Bo(){if(ua)return wr;ua=1;var e=Do(),r=Lo(),t=No();function n(a,i,o){return i===i?t(a,i,o):e(a,r,o)}return wr=n,wr}var Ar,ca;function jo(){if(ca)return Ar;ca=1;var e=Bo();function r(t,n){var a=t==null?0:t.length;return!!a&&e(t,n,0)>-1}return Ar=r,Ar}var Tr,fa;function Ho(){if(fa)return Tr;fa=1;function e(r,t,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(t,r[a]))return!0;return!1}return Tr=e,Tr}function $o(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var cn=$o,xr,la;function fn(){if(la)return xr;la=1;function e(r){return function(t){return r(t)}}return xr=e,xr}var Or,da;function Xi(){if(da)return Or;da=1;function e(r,t){return r.has(t)}return Or=e,Or}var Kr,ha;function ko(){if(ha)return Kr;ha=1;var e=Yi(),r=jo(),t=Ho(),n=cn,a=fn(),i=Xi(),o=200;function u(v,h,m,_){var I=-1,P=r,N=!0,K=v.length,b=[],l=h.length;if(!K)return b;m&&(h=n(h,a(m))),_?(P=t,N=!1):h.length>=o&&(P=i,N=!1,h=new e(h));e:for(;++I<K;){var g=v[I],C=m==null?g:m(g);if(g=_||g!==0?g:0,N&&C===C){for(var y=l;y--;)if(h[y]===C)continue e;b.push(g)}else P(h,C,_)||b.push(g)}return b}return Kr=u,Kr}var Sr,va;function Ji(){if(va)return Sr;va=1;function e(r,t){for(var n=-1,a=t.length,i=r.length;++n<a;)r[i+n]=t[n];return r}return Sr=e,Sr}var Er,pa;function Go(){if(pa)return Er;pa=1;var e=Ae(),r=pe(),t="[object Arguments]";function n(a){return r(a)&&e(a)==t}return Er=n,Er}var Pr,ya;function ln(){if(ya)return Pr;ya=1;var e=Go(),r=pe(),t=Object.prototype,n=t.hasOwnProperty,a=t.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(o){return r(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Pr=i,Pr}var Mr,ga;function re(){if(ga)return Mr;ga=1;var e=Array.isArray;return Mr=e,Mr}var Ir,ba;function Uo(){if(ba)return Ir;ba=1;var e=we(),r=ln(),t=re(),n=e?e.isConcatSpreadable:void 0;function a(i){return t(i)||r(i)||!!(n&&i&&i[n])}return Ir=a,Ir}var Dr,_a;function Zi(){if(_a)return Dr;_a=1;var e=Ji(),r=Uo();function t(n,a,i,o,u){var v=-1,h=n.length;for(i||(i=r),u||(u=[]);++v<h;){var m=n[v];a>0&&i(m)?a>1?t(m,a-1,i,o,u):e(u,m):o||(u[u.length]=m)}return u}return Dr=t,Dr}var Lr,ma;function xe(){if(ma)return Lr;ma=1;function e(r){return r}return Lr=e,Lr}var Nr,Ca;function zo(){if(Ca)return Nr;Ca=1;function e(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}return Nr=e,Nr}var Br,Fa;function Wo(){if(Fa)return Br;Fa=1;var e=zo(),r=Math.max;function t(n,a,i){return a=r(a===void 0?n.length-1:a,0),function(){for(var o=arguments,u=-1,v=r(o.length-a,0),h=Array(v);++u<v;)h[u]=o[a+u];u=-1;for(var m=Array(a+1);++u<a;)m[u]=o[u];return m[a]=i(h),e(n,this,m)}}return Br=t,Br}var jr,qa;function Yo(){if(qa)return jr;qa=1;function e(r){return function(){return r}}return jr=e,jr}var Hr,Ra;function Xo(){if(Ra)return Hr;Ra=1;var e=he,r=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Hr=r,Hr}var $r,wa;function Jo(){if(wa)return $r;wa=1;var e=Yo(),r=Xo(),t=xe(),n=r?function(a,i){return r(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:t;return $r=n,$r}var kr,Aa;function Zo(){if(Aa)return kr;Aa=1;var e=800,r=16,t=Date.now;function n(a){var i=0,o=0;return function(){var u=t(),v=r-(u-o);if(o=u,v>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return kr=n,kr}var Gr,Ta;function Qo(){if(Ta)return Gr;Ta=1;var e=Jo(),r=Zo(),t=r(e);return Gr=t,Gr}var Ur,xa;function Qi(){if(xa)return Ur;xa=1;var e=xe(),r=Wo(),t=Qo();function n(a,i){return t(r(a,i,e),a+"")}return Ur=n,Ur}var zr,Oa;function dn(){if(Oa)return zr;Oa=1;var e=9007199254740991;function r(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return zr=r,zr}var Wr,Ka;function Oe(){if(Ka)return Wr;Ka=1;var e=zi(),r=dn();function t(n){return n!=null&&r(n.length)&&!e(n)}return Wr=t,Wr}var Yr,Sa;function Vo(){if(Sa)return Yr;Sa=1;var e=Oe(),r=pe();function t(n){return r(n)&&e(n)}return Yr=t,Yr}var Xr,Ea;function eu(){if(Ea)return Xr;Ea=1;var e=ko(),r=Zi(),t=Qi(),n=Vo(),a=t(function(i,o){return n(i)?e(i,r(o,1,n,!0)):[]});return Xr=a,Xr}var Jr,Pa;function Vi(){if(Pa)return Jr;Pa=1;function e(r,t){for(var n=-1,a=r==null?0:r.length,i=0,o=[];++n<a;){var u=r[n];t(u,n,r)&&(o[i++]=u)}return o}return Jr=e,Jr}var Zr,Ma;function ru(){if(Ma)return Zr;Ma=1;function e(r){return function(t,n,a){for(var i=-1,o=Object(t),u=a(t),v=u.length;v--;){var h=u[r?v:++i];if(n(o[h],h,o)===!1)break}return t}}return Zr=e,Zr}var Qr,Ia;function tu(){if(Ia)return Qr;Ia=1;var e=ru(),r=e();return Qr=r,Qr}var Vr,Da;function nu(){if(Da)return Vr;Da=1;function e(r,t){for(var n=-1,a=Array(r);++n<r;)a[n]=t(n);return a}return Vr=e,Vr}var Pe={exports:{}};function au(){return!1}var iu=au;Pe.exports;(function(e,r){var t=ie(),n=iu,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?t.Buffer:void 0,v=u?u.isBuffer:void 0,h=v||n;e.exports=h})(Pe,Pe.exports);var es=Pe.exports,et,La;function hn(){if(La)return et;La=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function t(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&r.test(n))&&n>-1&&n%1==0&&n<a}return et=t,et}var rt,Na;function su(){if(Na)return rt;Na=1;var e=Ae(),r=dn(),t=pe(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",u="[object Error]",v="[object Function]",h="[object Map]",m="[object Number]",_="[object Object]",I="[object RegExp]",P="[object Set]",N="[object String]",K="[object WeakMap]",b="[object ArrayBuffer]",l="[object DataView]",g="[object Float32Array]",C="[object Float64Array]",y="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",q="[object Uint8Array]",L="[object Uint8ClampedArray]",R="[object Uint16Array]",O="[object Uint32Array]",E={};E[g]=E[C]=E[y]=E[S]=E[x]=E[q]=E[L]=E[R]=E[O]=!0,E[n]=E[a]=E[b]=E[i]=E[l]=E[o]=E[u]=E[v]=E[h]=E[m]=E[_]=E[I]=E[P]=E[N]=E[K]=!1;function $(A){return t(A)&&r(A.length)&&!!E[e(A)]}return rt=$,rt}var Me={exports:{}};Me.exports;(function(e,r){var t=Gi(),n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&t.process,u=function(){try{var v=a&&a.require&&a.require("util").types;return v||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u})(Me,Me.exports);var ou=Me.exports,tt,Ba;function rs(){if(Ba)return tt;Ba=1;var e=su(),r=fn(),t=ou,n=t&&t.isTypedArray,a=n?r(n):e;return tt=a,tt}var nt,ja;function uu(){if(ja)return nt;ja=1;var e=nu(),r=ln(),t=re(),n=es,a=hn(),i=rs(),o=Object.prototype,u=o.hasOwnProperty;function v(h,m){var _=t(h),I=!_&&r(h),P=!_&&!I&&n(h),N=!_&&!I&&!P&&i(h),K=_||I||P||N,b=K?e(h.length,String):[],l=b.length;for(var g in h)(m||u.call(h,g))&&!(K&&(g=="length"||P&&(g=="offset"||g=="parent")||N&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||a(g,l)))&&b.push(g);return b}return nt=v,nt}var cu=Object.prototype;function fu(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||cu;return e===t}var lu=fu;function du(e,r){return function(t){return e(r(t))}}var hu=du,at,Ha;function vu(){if(Ha)return at;Ha=1;var e=hu,r=e(Object.keys,Object);return at=r,at}var it,$a;function pu(){if($a)return it;$a=1;var e=lu,r=vu(),t=Object.prototype,n=t.hasOwnProperty;function a(i){if(!e(i))return r(i);var o=[];for(var u in Object(i))n.call(i,u)&&u!="constructor"&&o.push(u);return o}return it=a,it}var st,ka;function vn(){if(ka)return st;ka=1;var e=uu(),r=pu(),t=Oe();function n(a){return t(a)?e(a):r(a)}return st=n,st}var ot,Ga;function pn(){if(Ga)return ot;Ga=1;var e=tu(),r=vn();function t(n,a){return n&&e(n,a,r)}return ot=t,ot}var ut,Ua;function yu(){if(Ua)return ut;Ua=1;var e=Oe();function r(t,n){return function(a,i){if(a==null)return a;if(!e(a))return t(a,i);for(var o=a.length,u=n?o:-1,v=Object(a);(n?u--:++u<o)&&i(v[u],u,v)!==!1;);return a}}return ut=r,ut}var ct,za;function yn(){if(za)return ct;za=1;var e=pn(),r=yu(),t=r(e);return ct=t,ct}var ft,Wa;function gu(){if(Wa)return ft;Wa=1;var e=yn();function r(t,n){var a=[];return e(t,function(i,o,u){n(i,o,u)&&a.push(i)}),a}return ft=r,ft}var bu=Le;function _u(){this.__data__=new bu,this.size=0}var mu=_u;function Cu(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Fu=Cu;function qu(e){return this.__data__.get(e)}var Ru=qu;function wu(e){return this.__data__.has(e)}var Au=wu,Tu=Le,xu=on,Ou=un(),Ku=200;function Su(e,r){var t=this.__data__;if(t instanceof Tu){var n=t.__data__;if(!xu||n.length<Ku-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Ou(n)}return t.set(e,r),this.size=t.size,this}var Eu=Su,Pu=Le,Mu=mu,Iu=Fu,Du=Ru,Lu=Au,Nu=Eu;function ge(e){var r=this.__data__=new Pu(e);this.size=r.size}ge.prototype.clear=Mu;ge.prototype.delete=Iu;ge.prototype.get=Du;ge.prototype.has=Lu;ge.prototype.set=Nu;var ts=ge,lt,Ya;function Bu(){if(Ya)return lt;Ya=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a;)if(t(r[n],n,r))return!0;return!1}return lt=e,lt}var dt,Xa;function ns(){if(Xa)return dt;Xa=1;var e=Yi(),r=Bu(),t=Xi(),n=1,a=2;function i(o,u,v,h,m,_){var I=v&n,P=o.length,N=u.length;if(P!=N&&!(I&&N>P))return!1;var K=_.get(o),b=_.get(u);if(K&&b)return K==u&&b==o;var l=-1,g=!0,C=v&a?new e:void 0;for(_.set(o,u),_.set(u,o);++l<P;){var y=o[l],S=u[l];if(h)var x=I?h(S,y,l,u,o,_):h(y,S,l,o,u,_);if(x!==void 0){if(x)continue;g=!1;break}if(C){if(!r(u,function(q,L){if(!t(C,L)&&(y===q||m(y,q,v,h,_)))return C.push(L)})){g=!1;break}}else if(!(y===S||m(y,S,v,h,_))){g=!1;break}}return _.delete(o),_.delete(u),g}return dt=i,dt}var ju=ie(),Hu=ju.Uint8Array,$u=Hu,ht,Ja;function ku(){if(Ja)return ht;Ja=1;function e(r){var t=-1,n=Array(r.size);return r.forEach(function(a,i){n[++t]=[i,a]}),n}return ht=e,ht}function Gu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Uu=Gu,vt,Za;function zu(){if(Za)return vt;Za=1;var e=we(),r=$u,t=sn(),n=ns(),a=ku(),i=Uu,o=1,u=2,v="[object Boolean]",h="[object Date]",m="[object Error]",_="[object Map]",I="[object Number]",P="[object RegExp]",N="[object Set]",K="[object String]",b="[object Symbol]",l="[object ArrayBuffer]",g="[object DataView]",C=e?e.prototype:void 0,y=C?C.valueOf:void 0;function S(x,q,L,R,O,E,$){switch(L){case g:if(x.byteLength!=q.byteLength||x.byteOffset!=q.byteOffset)return!1;x=x.buffer,q=q.buffer;case l:return!(x.byteLength!=q.byteLength||!E(new r(x),new r(q)));case v:case h:case I:return t(+x,+q);case m:return x.name==q.name&&x.message==q.message;case P:case K:return x==q+"";case _:var A=a;case N:var G=R&o;if(A||(A=i),x.size!=q.size&&!G)return!1;var X=$.get(x);if(X)return X==q;R|=u,$.set(x,q);var te=n(A(x),A(q),R,O,E,$);return $.delete(x),te;case b:if(y)return y.call(x)==y.call(q)}return!1}return vt=S,vt}var Wu=Ji(),Yu=re();function Xu(e,r,t){var n=r(e);return Yu(e)?n:Wu(n,t(e))}var Ju=Xu;function Zu(){return[]}var Qu=Zu,Vu=Vi(),ec=Qu,rc=Object.prototype,tc=rc.propertyIsEnumerable,Qa=Object.getOwnPropertySymbols,nc=Qa?function(e){return e==null?[]:(e=Object(e),Vu(Qa(e),function(r){return tc.call(e,r)}))}:ec,ac=nc,ic=Ju,sc=ac,oc=vn();function uc(e){return ic(e,oc,sc)}var cc=uc,pt,Va;function fc(){if(Va)return pt;Va=1;var e=cc,r=1,t=Object.prototype,n=t.hasOwnProperty;function a(i,o,u,v,h,m){var _=u&r,I=e(i),P=I.length,N=e(o),K=N.length;if(P!=K&&!_)return!1;for(var b=P;b--;){var l=I[b];if(!(_?l in o:n.call(o,l)))return!1}var g=m.get(i),C=m.get(o);if(g&&C)return g==o&&C==i;var y=!0;m.set(i,o),m.set(o,i);for(var S=_;++b<P;){l=I[b];var x=i[l],q=o[l];if(v)var L=_?v(q,x,l,o,i,m):v(x,q,l,i,o,m);if(!(L===void 0?x===q||h(x,q,u,v,m):L)){y=!1;break}S||(S=l=="constructor")}if(y&&!S){var R=i.constructor,O=o.constructor;R!=O&&"constructor"in i&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof O=="function"&&O instanceof O)&&(y=!1)}return m.delete(i),m.delete(o),y}return pt=a,pt}var lc=he,dc=ie(),hc=lc(dc,"DataView"),vc=hc,pc=he,yc=ie(),gc=pc(yc,"Promise"),bc=gc,_c=he,mc=ie(),Cc=_c(mc,"Set"),Fc=Cc,qc=he,Rc=ie(),wc=qc(Rc,"WeakMap"),Ac=wc,en=vc,rn=on,tn=bc,nn=Fc,an=Ac,as=Ae(),be=Wi,ei="[object Map]",Tc="[object Object]",ri="[object Promise]",ti="[object Set]",ni="[object WeakMap]",ai="[object DataView]",xc=be(en),Oc=be(rn),Kc=be(tn),Sc=be(nn),Ec=be(an),le=as;(en&&le(new en(new ArrayBuffer(1)))!=ai||rn&&le(new rn)!=ei||tn&&le(tn.resolve())!=ri||nn&&le(new nn)!=ti||an&&le(new an)!=ni)&&(le=function(e){var r=as(e),t=r==Tc?e.constructor:void 0,n=t?be(t):"";if(n)switch(n){case xc:return ai;case Oc:return ei;case Kc:return ri;case Sc:return ti;case Ec:return ni}return r});var Pc=le,yt,ii;function Mc(){if(ii)return yt;ii=1;var e=ts,r=ns(),t=zu(),n=fc(),a=Pc,i=re(),o=es,u=rs(),v=1,h="[object Arguments]",m="[object Array]",_="[object Object]",I=Object.prototype,P=I.hasOwnProperty;function N(K,b,l,g,C,y){var S=i(K),x=i(b),q=S?m:a(K),L=x?m:a(b);q=q==h?_:q,L=L==h?_:L;var R=q==_,O=L==_,E=q==L;if(E&&o(K)){if(!o(b))return!1;S=!0,R=!1}if(E&&!R)return y||(y=new e),S||u(K)?r(K,b,l,g,C,y):t(K,b,q,l,g,C,y);if(!(l&v)){var $=R&&P.call(K,"__wrapped__"),A=O&&P.call(b,"__wrapped__");if($||A){var G=$?K.value():K,X=A?b.value():b;return y||(y=new e),C(G,X,l,g,y)}}return E?(y||(y=new e),n(K,b,l,g,C,y)):!1}return yt=N,yt}var gt,si;function is(){if(si)return gt;si=1;var e=Mc(),r=pe();function t(n,a,i,o,u){return n===a?!0:n==null||a==null||!r(n)&&!r(a)?n!==n&&a!==a:e(n,a,i,o,t,u)}return gt=t,gt}var bt,oi;function Ic(){if(oi)return bt;oi=1;var e=ts,r=is(),t=1,n=2;function a(i,o,u,v){var h=u.length,m=h,_=!v;if(i==null)return!m;for(i=Object(i);h--;){var I=u[h];if(_&&I[2]?I[1]!==i[I[0]]:!(I[0]in i))return!1}for(;++h<m;){I=u[h];var P=I[0],N=i[P],K=I[1];if(_&&I[2]){if(N===void 0&&!(P in i))return!1}else{var b=new e;if(v)var l=v(N,K,P,i,o,b);if(!(l===void 0?r(K,N,t|n,v,b):l))return!1}}return!0}return bt=a,bt}var _t,ui;function ss(){if(ui)return _t;ui=1;var e=de();function r(t){return t===t&&!e(t)}return _t=r,_t}var mt,ci;function Dc(){if(ci)return mt;ci=1;var e=ss(),r=vn();function t(n){for(var a=r(n),i=a.length;i--;){var o=a[i],u=n[o];a[i]=[o,u,e(u)]}return a}return mt=t,mt}var Ct,fi;function os(){if(fi)return Ct;fi=1;function e(r,t){return function(n){return n==null?!1:n[r]===t&&(t!==void 0||r in Object(n))}}return Ct=e,Ct}var Ft,li;function Lc(){if(li)return Ft;li=1;var e=Ic(),r=Dc(),t=os();function n(a){var i=r(a);return i.length==1&&i[0][2]?t(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return Ft=n,Ft}var qt,di;function gn(){if(di)return qt;di=1;var e=re(),r=Te(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(e(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||r(i)?!0:n.test(i)||!t.test(i)||o!=null&&i in Object(o)}return qt=a,qt}var us=un(),Nc="Expected a function";function bn(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Nc);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(bn.Cache||us),t}bn.Cache=us;var Bc=bn,jc=Bc,Hc=500;function $c(e){var r=jc(e,function(n){return t.size===Hc&&t.clear(),n}),t=r.cache;return r}var kc=$c,Gc=kc,Uc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zc=/\\(\\)?/g,Wc=Gc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Uc,function(t,n,a,i){r.push(a?i.replace(zc,"$1"):n||t)}),r}),Yc=Wc,Rt,hi;function Xc(){if(hi)return Rt;hi=1;var e=we(),r=cn,t=re(),n=Te(),a=1/0,i=e?e.prototype:void 0,o=i?i.toString:void 0;function u(v){if(typeof v=="string")return v;if(t(v))return r(v,u)+"";if(n(v))return o?o.call(v):"";var h=v+"";return h=="0"&&1/v==-a?"-0":h}return Rt=u,Rt}var wt,vi;function cs(){if(vi)return wt;vi=1;var e=Xc();function r(t){return t==null?"":e(t)}return wt=r,wt}var Jc=re(),Zc=gn(),Qc=Yc,Vc=cs();function ef(e,r){return Jc(e)?e:Zc(e,r)?[e]:Qc(Vc(e))}var fs=ef,rf=Te(),tf=1/0;function nf(e){if(typeof e=="string"||rf(e))return e;var r=e+"";return r=="0"&&1/e==-tf?"-0":r}var Be=nf,af=fs,sf=Be;function of(e,r){r=af(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[sf(r[t++])];return t&&t==n?e:void 0}var _n=of,At,pi;function uf(){if(pi)return At;pi=1;var e=_n;function r(t,n,a){var i=t==null?void 0:e(t,n);return i===void 0?a:i}return At=r,At}var Tt,yi;function cf(){if(yi)return Tt;yi=1;function e(r,t){return r!=null&&t in Object(r)}return Tt=e,Tt}var xt,gi;function ff(){if(gi)return xt;gi=1;var e=fs,r=ln(),t=re(),n=hn(),a=dn(),i=Be;function o(u,v,h){v=e(v,u);for(var m=-1,_=v.length,I=!1;++m<_;){var P=i(v[m]);if(!(I=u!=null&&h(u,P)))break;u=u[P]}return I||++m!=_?I:(_=u==null?0:u.length,!!_&&a(_)&&n(P,_)&&(t(u)||r(u)))}return xt=o,xt}var Ot,bi;function lf(){if(bi)return Ot;bi=1;var e=cf(),r=ff();function t(n,a){return n!=null&&r(n,a,e)}return Ot=t,Ot}var Kt,_i;function df(){if(_i)return Kt;_i=1;var e=is(),r=uf(),t=lf(),n=gn(),a=ss(),i=os(),o=Be,u=1,v=2;function h(m,_){return n(m)&&a(_)?i(o(m),_):function(I){var P=r(I,m);return P===void 0&&P===_?t(I,m):e(_,P,u|v)}}return Kt=h,Kt}var St,mi;function hf(){if(mi)return St;mi=1;function e(r){return function(t){return t==null?void 0:t[r]}}return St=e,St}var Et,Ci;function vf(){if(Ci)return Et;Ci=1;var e=_n;function r(t){return function(n){return e(n,t)}}return Et=r,Et}var Pt,Fi;function pf(){if(Fi)return Pt;Fi=1;var e=hf(),r=vf(),t=gn(),n=Be;function a(i){return t(i)?e(n(i)):r(i)}return Pt=a,Pt}var Mt,qi;function mn(){if(qi)return Mt;qi=1;var e=Lc(),r=df(),t=xe(),n=re(),a=pf();function i(o){return typeof o=="function"?o:o==null?t:typeof o=="object"?n(o)?r(o[0],o[1]):e(o):a(o)}return Mt=i,Mt}var It,Ri;function yf(){if(Ri)return It;Ri=1;var e=Vi(),r=gu(),t=mn(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o,3))}return It=a,It}var Dt,wi;function gf(){if(wi)return Dt;wi=1;function e(r,t,n){var a;return n(r,function(i,o,u){if(t(i,o,u))return a=o,!1}),a}return Dt=e,Dt}var Lt,Ai;function bf(){if(Ai)return Lt;Ai=1;var e=gf(),r=pn(),t=mn();function n(a,i){return e(a,t(i,3),r)}return Lt=n,Lt}var Nt,Ti;function _f(){if(Ti)return Nt;Ti=1;function e(r){return r&&r.length?r[0]:void 0}return Nt=e,Nt}var Bt,xi;function mf(){return xi||(xi=1,Bt=_f()),Bt}var jt,Oi;function Cf(){if(Oi)return jt;Oi=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a&&t(r[n],n,r)!==!1;);return r}return jt=e,jt}var Ht,Ki;function ls(){if(Ki)return Ht;Ki=1;var e=xe();function r(t){return typeof t=="function"?t:e}return Ht=r,Ht}var $t,Si;function Ff(){if(Si)return $t;Si=1;var e=Cf(),r=yn(),t=ls(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o))}return $t=a,$t}var kt,Ei;function qf(){if(Ei)return kt;Ei=1;var e=pn(),r=ls();function t(n,a){return n&&e(n,r(a))}return kt=t,kt}var Gt,Pi;function Rf(){if(Pi)return Gt;Pi=1;function e(){}return Gt=e,Gt}var Ut,Mi;function wf(){if(Mi)return Ut;Mi=1;var e=yn(),r=Oe();function t(n,a){var i=-1,o=r(n)?Array(n.length):[];return e(n,function(u,v,h){o[++i]=a(u,v,h)}),o}return Ut=t,Ut}var zt,Ii;function Af(){if(Ii)return zt;Ii=1;function e(r,t){var n=r.length;for(r.sort(t);n--;)r[n]=r[n].value;return r}return zt=e,zt}var Wt,Di;function Tf(){if(Di)return Wt;Di=1;var e=Te();function r(t,n){if(t!==n){var a=t!==void 0,i=t===null,o=t===t,u=e(t),v=n!==void 0,h=n===null,m=n===n,_=e(n);if(!h&&!_&&!u&&t>n||u&&v&&m&&!h&&!_||i&&v&&m||!a&&m||!o)return 1;if(!i&&!u&&!_&&t<n||_&&a&&o&&!i&&!u||h&&a&&o||!v&&o||!m)return-1}return 0}return Wt=r,Wt}var Yt,Li;function xf(){if(Li)return Yt;Li=1;var e=Tf();function r(t,n,a){for(var i=-1,o=t.criteria,u=n.criteria,v=o.length,h=a.length;++i<v;){var m=e(o[i],u[i]);if(m){if(i>=h)return m;var _=a[i];return m*(_=="desc"?-1:1)}}return t.index-n.index}return Yt=r,Yt}var Xt,Ni;function Of(){if(Ni)return Xt;Ni=1;var e=cn,r=_n,t=mn(),n=wf(),a=Af(),i=fn(),o=xf(),u=xe(),v=re();function h(m,_,I){_.length?_=e(_,function(K){return v(K)?function(b){return r(b,K.length===1?K[0]:K)}:K}):_=[u];var P=-1;_=e(_,i(t));var N=n(m,function(K,b,l){var g=e(_,function(C){return C(K)});return{criteria:g,index:++P,value:K}});return a(N,function(K,b){return o(K,b,I)})}return Xt=h,Xt}var Jt,Bi;function Kf(){if(Bi)return Jt;Bi=1;var e=sn(),r=Oe(),t=hn(),n=de();function a(i,o,u){if(!n(u))return!1;var v=typeof o;return(v=="number"?r(u)&&t(o,u.length):v=="string"&&o in u)?e(u[o],i):!1}return Jt=a,Jt}var Zt,ji;function Sf(){if(ji)return Zt;ji=1;var e=Zi(),r=Of(),t=Qi(),n=Kf(),a=t(function(i,o){if(i==null)return[];var u=o.length;return u>1&&n(i,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),r(i,e(o,1),[])});return Zt=a,Zt}var Qt,Hi;function Ef(){if(Hi)return Qt;Hi=1;var e=Ui(),r=de(),t="Expected a function";function n(a,i,o){var u=!0,v=!0;if(typeof a!="function")throw new TypeError(t);return r(o)&&(u="leading"in o?!!o.leading:u,v="trailing"in o?!!o.trailing:v),e(a,i,{leading:u,maxWait:i,trailing:v})}return Qt=n,Qt}var Vt,$i;function Pf(){if($i)return Vt;$i=1;var e=cs(),r=0;function t(n){var a=++r;return e(n)+a}return Vt=t,Vt}(function(e,r){(function(t,n){e.exports=n(Ui(),eu(),yf(),bf(),mf(),Ff(),qf(),Rf(),Sf(),Ef(),Pf(),vs)})(ve,function(t,n,a,i,o,u,v,h,m,_,I,P){return function(){var N={654:function(b,l,g){var C,y=this&&this.__assign||function(){return y=Object.assign||function(p){for(var s,c=1,f=arguments.length;c<f;c++)for(var d in s=arguments[c])Object.prototype.hasOwnProperty.call(s,d)&&(p[d]=s[d]);return p},y.apply(this,arguments)},S=this&&this.__createBinding||(Object.create?function(p,s,c,f){f===void 0&&(f=c);var d=Object.getOwnPropertyDescriptor(s,c);d&&!("get"in d?!s.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(p,f,d)}:function(p,s,c,f){f===void 0&&(f=c),p[f]=s[c]}),x=this&&this.__setModuleDefault||(Object.create?function(p,s){Object.defineProperty(p,"default",{enumerable:!0,value:s})}:function(p,s){p.default=s}),q=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var s={};if(p!=null)for(var c in p)c!=="default"&&Object.prototype.hasOwnProperty.call(p,c)&&S(s,p,c);return x(s,p),s},L=this&&this.__spreadArray||function(p,s,c){if(c||arguments.length===2)for(var f,d=0,F=s.length;d<F;d++)!f&&d in s||(f||(f=Array.prototype.slice.call(s,0,d)),f[d]=s[d]);return p.concat(f||Array.prototype.slice.call(s))},R=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.updateRtl=l.doesFocusableExist=l.getCurrentFocusKey=l.updateAllLayouts=l.resume=l.pause=l.navigateByDirection=l.setFocus=l.setKeyMap=l.destroy=l.setThrottle=l.init=l.SpatialNavigation=l.ROOT_FOCUS_KEY=void 0;var O=R(g(150)),E=R(g(117)),$=R(g(747)),A=R(g(23)),G=R(g(842)),X=R(g(682)),te=R(g(784)),_e=R(g(432)),je=R(g(67)),Ke=R(g(35)),Q=R(g(119)),me=q(g(964)),oe="left",ue="right",ce="up",ne="down",Ce="enter",Fe=((C={}).left=[37,"ArrowLeft"],C.up=[38,"ArrowUp"],C.right=[39,"ArrowRight"],C.down=[40,"ArrowDown"],C.enter=[13,"Enter"],C);l.ROOT_FOCUS_KEY="SN:ROOT";var qe=["#0FF","#FF0","#F0F"],Se={leading:!0,trailing:!1},Ee=function(){function p(){this.focusableComponents={},this.focusKey=null,this.parentsHavingFocusedChild=[],this.domNodeFocusOptions={},this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.useGetBoundingClientRect=!1,this.shouldFocusDOMNode=!1,this.shouldUseNativeEvents=!1,this.writingDirection=Q.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=Fe,this.pause=this.pause.bind(this),this.resume=this.resume.bind(this),this.setFocus=this.setFocus.bind(this),this.updateAllLayouts=this.updateAllLayouts.bind(this),this.navigateByDirection=this.navigateByDirection.bind(this),this.init=this.init.bind(this),this.setThrottle=this.setThrottle.bind(this),this.destroy=this.destroy.bind(this),this.setKeyMap=this.setKeyMap.bind(this),this.getCurrentFocusKey=this.getCurrentFocusKey.bind(this),this.doesFocusableExist=this.doesFocusableExist.bind(this),this.updateRtl=this.updateRtl.bind(this),this.setFocusDebounced=(0,O.default)(this.setFocus,300,{leading:!1,trailing:!0}),this.debug=!1,this.visualDebugger=null,this.logIndex=0,this.distanceCalculationMethod="corners"}return p.getCutoffCoordinate=function(s,c,f,d,F){var w=s?d.top:F===Q.default.LTR?d.left:d.right,T=s?d.bottom:F===Q.default.LTR?d.right:d.left;return c?f?w:T:f?T:w},p.getRefCorners=function(s,c,f){var d={a:{x:0,y:0},b:{x:0,y:0}};switch(s){case ce:var F=c?f.bottom:f.top;d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case ne:F=c?f.top:f.bottom,d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case oe:var w=c?f.right:f.left;d.a={x:w,y:f.top},d.b={x:w,y:f.bottom};break;case ue:w=c?f.left:f.right,d.a={x:w,y:f.top},d.b={x:w,y:f.bottom}}return d},p.isAdjacentSlice=function(s,c,f){var d=s.a,F=s.b,w=c.a,T=c.b,M=f?"x":"y",k=d[M],H=F[M],j=w[M],B=T[M],D=.2*(H-k);return Math.max(0,Math.min(H,B)-Math.max(k,j))>=D},p.getPrimaryAxisDistance=function(s,c,f){var d=s.a,F=c.a,w=f?"y":"x";return Math.abs(F[w]-d[w])},p.getSecondaryAxisDistance=function(s,c,f,d,F){if(F)return F(s,c,f,d);var w=s.a,T=s.b,M=c.a,k=c.b,H=f?"x":"y",j=w[H],B=T[H],D=M[H],Y=k[H];if(d==="center"){var z=(j+B)/2,J=(D+Y)/2;return Math.abs(z-J)}if(d==="edges"){var se=Math.min(j,B),U=Math.min(D,Y),V=Math.max(j,B),fe=Math.max(D,Y),ae=Math.abs(se-U),ee=Math.abs(V-fe);return Math.min(ae,ee)}var Re=[Math.abs(D-j),Math.abs(D-B),Math.abs(Y-j),Math.abs(Y-B)];return Math.min.apply(Math,Re)},p.prototype.sortSiblingsByPriority=function(s,c,f,d){var F=this,w=f===ne||f===ce,T=p.getRefCorners(f,!1,c);return(0,_e.default)(s,function(M){var k=p.getRefCorners(f,!0,M.layout),H=p.isAdjacentSlice(T,k,w),j=H?p.getPrimaryAxisDistance:p.getSecondaryAxisDistance,B=H?p.getSecondaryAxisDistance:p.getPrimaryAxisDistance,D=j(T,k,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),Y=B(T,k,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),z=5*D+Y,J=(z+1)/(H?5:1);return F.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(M.focusKey," relative to ").concat(d," is"),D,Y,z),F.log("smartNavigate","priority for ".concat(M.focusKey," relative to ").concat(d," is"),J),F.visualDebugger&&(F.visualDebugger.drawPoint(k.a.x,k.a.y,"yellow",6),F.visualDebugger.drawPoint(k.b.x,k.b.y,"yellow",6)),J})},p.prototype.init=function(s){var c=this,f=s===void 0?{}:s,d=f.debug,F=d!==void 0&&d,w=f.visualDebug,T=w!==void 0&&w,M=f.nativeMode,k=M!==void 0&&M,H=f.throttle,j=H===void 0?0:H,B=f.throttleKeypresses,D=B!==void 0&&B,Y=f.useGetBoundingClientRect,z=Y!==void 0&&Y,J=f.shouldFocusDOMNode,se=J!==void 0&&J,U=f.domNodeFocusOptions,V=U===void 0?{}:U,fe=f.shouldUseNativeEvents,ae=fe!==void 0&&fe,ee=f.rtl,Re=ee!==void 0&&ee,W=f.distanceCalculationMethod,Z=W===void 0?"corners":W,Cn=f.customDistanceCalculationFunction,ds=Cn===void 0?void 0:Cn;if(!this.enabled&&(this.domNodeFocusOptions=V,this.enabled=!0,this.nativeMode=k,this.throttleKeypresses=D,this.useGetBoundingClientRect=z,this.shouldFocusDOMNode=se&&!k,this.shouldUseNativeEvents=ae,this.writingDirection=Re?Q.default.RTL:Q.default.LTR,this.distanceCalculationMethod=Z,this.customDistanceCalculationFunction=ds,this.debug=F,!this.nativeMode&&(Number.isInteger(j)&&j>0&&(this.throttle=j),this.bindEventHandlers(),T))){this.visualDebugger=new Ke.default(this.writingDirection);var Fn=function(){requestAnimationFrame(function(){c.visualDebugger.clearLayouts(),(0,te.default)(c.focusableComponents,function(qn,hs){c.visualDebugger.drawLayout(qn.layout,hs,qn.parentFocusKey)}),Fn()})};Fn()}},p.prototype.setThrottle=function(s){var c=s===void 0?{}:s,f=c.throttle,d=f===void 0?0:f,F=c.throttleKeypresses,w=F!==void 0&&F;this.throttleKeypresses=w,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(d)&&(this.throttle=d),this.bindEventHandlers())},p.prototype.destroy=function(){this.enabled&&(this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.focusKey=null,this.parentsHavingFocusedChild=[],this.focusableComponents={},this.paused=!1,this.keyMap=Fe,this.unbindEventHandlers())},p.prototype.getEventType=function(s){return(0,A.default)(this.getKeyMap(),function(c){return c.includes(s)})},p.getKeyCode=function(s){return s.keyCode||s.code||s.key},p.prototype.bindEventHandlers=function(){var s=this;typeof window<"u"&&window.addEventListener&&(this.keyDownEventListener=function(c){if(s.paused!==!0){s.debug&&(s.logIndex+=1);var f=p.getKeyCode(c),d=s.getEventType(f);if(d){s.pressedKeys[d]=s.pressedKeys[d]?s.pressedKeys[d]+1:1,s.shouldUseNativeEvents||(c.preventDefault(),c.stopPropagation());var F={pressedKeys:s.pressedKeys};if(d===Ce&&s.focusKey)s.onEnterPress(F);else{var w=s.onArrowPress(d,F)===!1;if(s.visualDebugger&&s.visualDebugger.clear(),w)s.log("keyDownEventListener","default navigation prevented");else{var T=(0,A.default)(s.getKeyMap(),function(M){return M.includes(f)});s.smartNavigate(T,null,{event:c})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,je.default)(this.keyDownEventListener.bind(this),this.throttle,Se)),this.keyUpEventListener=function(c){var f=p.getKeyCode(c),d=s.getEventType(f);delete s.pressedKeys[d],s.throttle&&!s.throttleKeypresses&&s.keyDownEventListenerThrottled.cancel(),d===Ce&&s.focusKey&&s.onEnterRelease(),!s.focusKey||d!==oe&&d!==ue&&d!==ce&&d!==ne||s.onArrowRelease(d)},window.addEventListener("keyup",this.keyUpEventListener),window.addEventListener("keydown",this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener))},p.prototype.unbindEventHandlers=function(){if(typeof window<"u"&&window.removeEventListener){window.removeEventListener("keyup",this.keyUpEventListener),this.keyUpEventListener=null;var s=this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener;window.removeEventListener("keydown",s),this.keyDownEventListener=null}},p.prototype.onEnterPress=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onEnterPress&&c.onEnterPress(s):this.log("onEnterPress","componentNotFocusable"):this.log("onEnterPress","noComponent")},p.prototype.onEnterRelease=function(){var s=this.focusableComponents[this.focusKey];s?s.focusable?s.onEnterRelease&&s.onEnterRelease():this.log("onEnterRelease","componentNotFocusable"):this.log("onEnterRelease","noComponent")},p.prototype.onArrowPress=function(s,c){var f=this.focusableComponents[this.focusKey];if(f)return f&&f.onArrowPress&&f.onArrowPress(s,c);this.log("onArrowPress","noComponent")},p.prototype.onArrowRelease=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onArrowRelease&&c.onArrowRelease(s):this.log("onArrowRelease","componentNotFocusable"):this.log("onArrowRelease","noComponent")},p.prototype.navigateByDirection=function(s,c){if(this.paused!==!0&&this.enabled&&!this.nativeMode){var f=[ne,ce,oe,ue];f.includes(s)?(this.log("navigateByDirection","direction",s),this.smartNavigate(s,null,c)):this.log("navigateByDirection","Invalid direction. You passed: `".concat(s,"`, but you can use only these: "),f)}},p.prototype.smartNavigate=function(s,c,f){var d=this;if(!this.nativeMode){var F=s===ne||s===ce,w=s===ne||(this.writingDirection===Q.default.LTR?s===ue:s===oe);this.log("smartNavigate","direction",s),this.log("smartNavigate","fromParentFocusKey",c),this.log("smartNavigate","this.focusKey",this.focusKey),c||(0,te.default)(this.focusableComponents,function(U){U.layoutUpdated=!1});var T=this.focusableComponents[c||this.focusKey];if(c||T){if(this.log("smartNavigate","currentComponent",T?T.focusKey:void 0,T?T.node:void 0,T),T){this.updateLayout(T.focusKey);var M=T.parentFocusKey,k=T.focusKey,H=T.layout,j=p.getCutoffCoordinate(F,w,!1,H,this.writingDirection),B=(0,$.default)(this.focusableComponents,function(U){if(U.parentFocusKey===M&&U.focusable){d.updateLayout(U.focusKey);var V=p.getCutoffCoordinate(F,w,!0,U.layout,d.writingDirection);return F||d.writingDirection===Q.default.LTR?w?V>=j:V<=j:w?V<=j:V>=j}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",j),this.log("smartNavigate","siblings","".concat(B.length," elements:"),B.map(function(U){return U.focusKey}).join(", "),B.map(function(U){return U.node}),B.map(function(U){return U}))),this.visualDebugger){var D=p.getRefCorners(s,!1,H);this.visualDebugger.drawPoint(D.a.x,D.a.y),this.visualDebugger.drawPoint(D.b.x,D.b.y)}var Y=this.sortSiblingsByPriority(B,H,s,k),z=(0,G.default)(Y);if(this.log("smartNavigate","nextComponent",z?z.focusKey:void 0,z?z.node:void 0,z),z)this.setFocus(z.focusKey,f);else{var J=this.focusableComponents[M],se=J!=null&&J.isFocusBoundary?J.focusBoundaryDirections||[s]:[];J&&se.includes(s)||this.smartNavigate(s,M,f)}}}else this.setFocus(this.getForcedFocusKey())}},p.prototype.saveLastFocusedChildKey=function(s,c){s&&(this.log("saveLastFocusedChildKey","".concat(s.focusKey," lastFocusedChildKey set"),c),s.lastFocusedChildKey=c)},p.prototype.log=function(s,c){for(var f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];this.debug&&console.log.apply(console,L(["%c".concat(s,"%c").concat(c),"background: ".concat(qe[this.logIndex%qe.length],"; color: black; padding: 1px 5px;"),"background: #333; color: #BADA55; padding: 1px 5px;"],f,!1))},p.prototype.getCurrentFocusKey=function(){return this.focusKey},p.prototype.getForcedFocusKey=function(){var s,c=(0,$.default)(this.focusableComponents,function(d){return d.focusable&&d.forceFocus}),f=this.sortSiblingsByPriority(c,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",l.ROOT_FOCUS_KEY);return(s=(0,G.default)(f))===null||s===void 0?void 0:s.focusKey},p.prototype.getNextFocusKey=function(s){var c=this,f=this.focusableComponents[s];if(!f||this.nativeMode)return s;var d=(0,$.default)(this.focusableComponents,function(M){return M.parentFocusKey===s&&M.focusable});if(d.length>0){var F=f.lastFocusedChildKey,w=f.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",F),this.log("getNextFocusKey","preferredChildFocusKey is",w),F&&f.saveLastFocusedChild&&this.isParticipatingFocusableComponent(F))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",F),this.getNextFocusKey(F);if(w&&this.isParticipatingFocusableComponent(w))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",w),this.getNextFocusKey(w);d.forEach(function(M){return c.updateLayout(M.focusKey)});var T=function(M,k){var H=k===Q.default.LTR?function(B){var D=B.layout;return Math.abs(D.left)+Math.abs(D.top)}:function(B){var D=B.layout;return Math.abs(window.innerWidth-D.right)+Math.abs(D.top)},j=(0,_e.default)(M,H);return(0,G.default)(j)}(d,this.writingDirection).focusKey;return this.log("getNextFocusKey","childKey will be focused",T),this.getNextFocusKey(T)}return this.log("getNextFocusKey","targetFocusKey",s),s},p.prototype.addFocusable=function(s){var c=s.focusKey,f=s.node,d=s.parentFocusKey,F=s.onEnterPress,w=s.onEnterRelease,T=s.onArrowPress,M=s.onArrowRelease,k=s.onFocus,H=s.onBlur,j=s.saveLastFocusedChild,B=s.trackChildren,D=s.onUpdateFocus,Y=s.onUpdateHasFocusedChild,z=s.preferredChildFocusKey,J=s.autoRestoreFocus,se=s.forceFocus,U=s.focusable,V=s.isFocusBoundary,fe=s.focusBoundaryDirections;if(this.focusableComponents[c]={focusKey:c,node:f,parentFocusKey:d,onEnterPress:F,onEnterRelease:w,onArrowPress:T,onArrowRelease:M,onFocus:k,onBlur:H,onUpdateFocus:D,onUpdateHasFocusedChild:Y,saveLastFocusedChild:j,trackChildren:B,preferredChildFocusKey:z,focusable:U,isFocusBoundary:V,focusBoundaryDirections:fe,autoRestoreFocus:J,forceFocus:se,lastFocusedChildKey:null,layout:{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:f},layoutUpdated:!1},f||console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ',this.focusableComponents[c]),!this.nativeMode){this.updateLayout(c),this.log("addFocusable","Component added: ",this.focusableComponents[c]),c===this.focusKey&&this.setFocus(z||c);for(var ae=this.focusableComponents[this.focusKey];ae;){if(ae.parentFocusKey===c){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}ae=this.focusableComponents[ae.parentFocusKey]}}},p.prototype.removeFocusable=function(s){var c=s.focusKey,f=this.focusableComponents[c];if(f){var d=f.parentFocusKey;(0,f.onUpdateFocus)(!1),this.log("removeFocusable","Component removed: ",f),delete this.focusableComponents[c];var F=this.parentsHavingFocusedChild.includes(c);this.parentsHavingFocusedChild=this.parentsHavingFocusedChild.filter(function(M){return M!==c});var w=this.focusableComponents[d],T=c===this.focusKey;if(w&&w.lastFocusedChildKey===c&&(w.lastFocusedChildKey=null),this.nativeMode)return;(T||F)&&w&&w.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",T?"Leaf component":"Container component","Auto restoring focus to: ",d),this.setFocusDebounced(d))}},p.prototype.getNodeLayoutByFocusKey=function(s){var c=this.focusableComponents[s];return c?(this.updateLayout(c.focusKey),c.layout):null},p.prototype.setCurrentFocusedKey=function(s,c){var f,d,F,w;if(this.isFocusableComponent(this.focusKey)&&s!==this.focusKey){var T=this.focusableComponents[this.focusKey];T.onUpdateFocus(!1),T.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),c),(d=(f=T.node)===null||f===void 0?void 0:f.removeAttribute)===null||d===void 0||d.call(f,"data-focused"),this.log("setCurrentFocusedKey","onBlur",T)}if(this.focusKey=s,this.isFocusableComponent(this.focusKey)){var M=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&M.node&&M.node.focus(this.domNodeFocusOptions),(w=(F=M.node)===null||F===void 0?void 0:F.setAttribute)===null||w===void 0||w.call(F,"data-focused","true"),M.onUpdateFocus(!0),M.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),c),this.log("setCurrentFocusedKey","onFocus",M)}},p.prototype.updateParentsHasFocusedChild=function(s,c){for(var f=this,d=[],F=this.focusableComponents[s];F;){var w=F.parentFocusKey,T=this.focusableComponents[w];if(T){var M=T.focusKey;d.push(M)}F=T}var k=(0,E.default)(this.parentsHavingFocusedChild,d),H=(0,E.default)(d,this.parentsHavingFocusedChild);(0,X.default)(k,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!1),f.onIntermediateNodeBecameBlurred(j,c)}),(0,X.default)(H,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!0),f.onIntermediateNodeBecameFocused(j,c)}),this.parentsHavingFocusedChild=d},p.prototype.updateParentsLastFocusedChild=function(s){for(var c=this.focusableComponents[s];c;){var f=c.parentFocusKey,d=this.focusableComponents[f];d&&this.saveLastFocusedChildKey(d,c.focusKey),c=d}},p.prototype.getKeyMap=function(){return this.keyMap},p.prototype.setKeyMap=function(s){this.keyMap=y(y({},this.getKeyMap()),function(c){var f={};return Object.entries(c).forEach(function(d){var F=d[0],w=d[1];f[F]=Array.isArray(w)?w:[w]}),f}(s))},p.prototype.isFocusableComponent=function(s){return!!this.focusableComponents[s]},p.prototype.isParticipatingFocusableComponent=function(s){return this.isFocusableComponent(s)&&this.focusableComponents[s].focusable},p.prototype.onIntermediateNodeBecameFocused=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onFocus(this.getNodeLayoutByFocusKey(s),c)},p.prototype.onIntermediateNodeBecameBlurred=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onBlur(this.getNodeLayoutByFocusKey(s),c)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1},p.prototype.setFocus=function(s,c){if(c===void 0&&(c={}),this.setFocusDebounced.cancel(),this.enabled){this.log("setFocus","focusKey",s),s&&s!==l.ROOT_FOCUS_KEY||(s=this.getForcedFocusKey());var f=this.getNextFocusKey(s);this.log("setFocus","newFocusKey",f),this.setCurrentFocusedKey(f,c),this.updateParentsHasFocusedChild(f,c),this.updateParentsLastFocusedChild(f)}},p.prototype.updateAllLayouts=function(){var s=this;this.enabled&&!this.nativeMode&&(0,te.default)(this.focusableComponents,function(c,f){s.updateLayout(f)})},p.prototype.updateLayout=function(s){var c=this.focusableComponents[s];if(c&&!this.nativeMode&&!c.layoutUpdated){var f=c.node,d=this.useGetBoundingClientRect?(0,me.getBoundingClientRect)(f):(0,me.default)(f);c.layout=y(y({},d),{node:f})}},p.prototype.updateFocusable=function(s,c){var f=c.node,d=c.preferredChildFocusKey,F=c.focusable,w=c.isFocusBoundary,T=c.focusBoundaryDirections,M=c.onEnterPress,k=c.onEnterRelease,H=c.onArrowPress,j=c.onFocus,B=c.onBlur;if(!this.nativeMode){var D=this.focusableComponents[s];D&&(D.preferredChildFocusKey=d,D.focusable=F,D.isFocusBoundary=w,D.focusBoundaryDirections=T,D.onEnterPress=M,D.onEnterRelease=k,D.onArrowPress=H,D.onFocus=j,D.onBlur=B,f&&(D.node=f))}},p.prototype.isNativeMode=function(){return this.nativeMode},p.prototype.doesFocusableExist=function(s){return!!this.focusableComponents[s]},p.prototype.updateRtl=function(s){this.writingDirection=s?Q.default.RTL:Q.default.LTR},p}();l.SpatialNavigation=new Ee,l.init=l.SpatialNavigation.init,l.setThrottle=l.SpatialNavigation.setThrottle,l.destroy=l.SpatialNavigation.destroy,l.setKeyMap=l.SpatialNavigation.setKeyMap,l.setFocus=l.SpatialNavigation.setFocus,l.navigateByDirection=l.SpatialNavigation.navigateByDirection,l.pause=l.SpatialNavigation.pause,l.resume=l.SpatialNavigation.resume,l.updateAllLayouts=l.SpatialNavigation.updateAllLayouts,l.getCurrentFocusKey=l.SpatialNavigation.getCurrentFocusKey,l.doesFocusableExist=l.SpatialNavigation.doesFocusableExist,l.updateRtl=l.SpatialNavigation.updateRtl},35:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0});var y=C(g(119)),S=typeof window<"u"&&window.document,x=S?window.innerWidth:0,q=S?window.innerHeight:0,L=function(){function R(O){S&&(this.debugCtx=R.createCanvas("sn-debug","1010",O),this.layoutsCtx=R.createCanvas("sn-layouts","1000",O),this.writingDirection=O)}return R.createCanvas=function(O,E,$){var A=document.querySelector("#".concat(O))||document.createElement("canvas");A.setAttribute("id",O),A.setAttribute("dir",$===y.default.LTR?"ltr":"rtl");var G=A.getContext("2d");return A.style.zIndex=E,A.style.position="fixed",A.style.top="0",A.style.left="0",document.body.appendChild(A),A.width=x,A.height=q,G},R.prototype.clear=function(){S&&this.debugCtx.clearRect(0,0,x,q)},R.prototype.clearLayouts=function(){S&&this.layoutsCtx.clearRect(0,0,x,q)},R.prototype.drawLayout=function(O,E,$){if(S){this.layoutsCtx.strokeStyle="green",this.layoutsCtx.strokeRect(O.left,O.top,O.width,O.height),this.layoutsCtx.font="8px monospace",this.layoutsCtx.fillStyle="red";var A=this.writingDirection===y.default.LTR?"left":"right",G=O[A];this.layoutsCtx.fillText(E,G,O.top+10),this.layoutsCtx.fillText($,G,O.top+25),this.layoutsCtx.fillText("".concat(A,": ").concat(G),G,O.top+40),this.layoutsCtx.fillText("top: ".concat(O.top),G,O.top+55)}},R.prototype.drawPoint=function(O,E,$,A){$===void 0&&($="blue"),A===void 0&&(A=10),S&&(this.debugCtx.strokeStyle=$,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(O-A/2,E-A/2,A,A))},R}();l.default=L},119:function(b,l){var g;Object.defineProperty(l,"__esModule",{value:!0}),function(C){C[C.LTR=0]="LTR",C[C.RTL=1]="RTL"}(g||(g={})),l.default=g},607:function(b,l,g){var C=this&&this.__createBinding||(Object.create?function(S,x,q,L){L===void 0&&(L=q);var R=Object.getOwnPropertyDescriptor(x,q);R&&!("get"in R?!x.__esModule:R.writable||R.configurable)||(R={enumerable:!0,get:function(){return x[q]}}),Object.defineProperty(S,L,R)}:function(S,x,q,L){L===void 0&&(L=q),S[L]=x[q]}),y=this&&this.__exportStar||function(S,x){for(var q in S)q==="default"||Object.prototype.hasOwnProperty.call(x,q)||C(x,S,q)};Object.defineProperty(l,"__esModule",{value:!0}),y(g(79),l),y(g(445),l),y(g(654),l)},964:function(b,l){Object.defineProperty(l,"__esModule",{value:!0}),l.getBoundingClientRect=void 0;var g=function(C){for(var y=C.offsetParent,S=C.offsetHeight,x=C.offsetWidth,q=C.offsetLeft,L=C.offsetTop;y&&y.nodeType===1;)q+=y.offsetLeft-y.scrollLeft,L+=y.offsetTop-y.scrollTop,y=y.offsetParent;return{height:S,left:q,top:L,width:x}};l.default=function(C){var y=C&&C.parentElement;if(C&&y){var S=g(y),x=g(C),q=x.height,L=x.left,R=x.top,O=x.width;return{x:L-S.left,y:R-S.top,width:O,height:q,left:L,top:R,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}},l.getBoundingClientRect=function(C){if(C&&C.getBoundingClientRect){var y=C.getBoundingClientRect();return{x:y.x,y:y.y,width:y.width,height:y.height,left:y.left,top:y.top,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}}},445:function(b,l,g){Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusContext=l.FocusContext=void 0;var C=g(156),y=g(654);l.FocusContext=(0,C.createContext)(y.ROOT_FOCUS_KEY),l.FocusContext.displayName="FocusContext",l.useFocusContext=function(){return(0,C.useContext)(l.FocusContext)}},79:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusable=void 0;var y=g(156),S=C(g(604)),x=C(g(461)),q=g(654),L=g(445);l.useFocusable=function(R){var O=R===void 0?{}:R,E=O.focusable,$=E===void 0||E,A=O.saveLastFocusedChild,G=A===void 0||A,X=O.trackChildren,te=X!==void 0&&X,_e=O.autoRestoreFocus,je=_e===void 0||_e,Ke=O.forceFocus,Q=Ke!==void 0&&Ke,me=O.isFocusBoundary,oe=me!==void 0&&me,ue=O.focusBoundaryDirections,ce=O.focusKey,ne=O.preferredChildFocusKey,Ce=O.onEnterPress,Fe=Ce===void 0?S.default:Ce,qe=O.onEnterRelease,Se=qe===void 0?S.default:qe,Ee=O.onArrowPress,p=Ee===void 0?function(){return!0}:Ee,s=O.onArrowRelease,c=s===void 0?S.default:s,f=O.onFocus,d=f===void 0?S.default:f,F=O.onBlur,w=F===void 0?S.default:F,T=O.extraProps,M=(0,y.useCallback)(function(W){Fe(T,W)},[Fe,T]),k=(0,y.useCallback)(function(){Se(T)},[Se,T]),H=(0,y.useCallback)(function(W,Z){return p(W,T,Z)},[T,p]),j=(0,y.useCallback)(function(W){c(W,T)},[c,T]),B=(0,y.useCallback)(function(W,Z){d(W,T,Z)},[T,d]),D=(0,y.useCallback)(function(W,Z){w(W,T,Z)},[T,w]),Y=(0,y.useRef)(null),z=(0,y.useState)(!1),J=z[0],se=z[1],U=(0,y.useState)(!1),V=U[0],fe=U[1],ae=(0,L.useFocusContext)(),ee=(0,y.useMemo)(function(){return ce||(0,x.default)("sn:focusable-item-")},[ce]),Re=(0,y.useCallback)(function(W){W===void 0&&(W={}),q.SpatialNavigation.setFocus(ee,W)},[ee]);return(0,y.useEffect)(function(){var W=Y.current;return q.SpatialNavigation.addFocusable({focusKey:ee,node:W,parentFocusKey:ae,preferredChildFocusKey:ne,onEnterPress:M,onEnterRelease:k,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D,onUpdateFocus:function(Z){return Z===void 0&&(Z=!1),se(Z)},onUpdateHasFocusedChild:function(Z){return Z===void 0&&(Z=!1),fe(Z)},saveLastFocusedChild:G,trackChildren:te,isFocusBoundary:oe,focusBoundaryDirections:ue,autoRestoreFocus:je,forceFocus:Q,focusable:$}),function(){q.SpatialNavigation.removeFocusable({focusKey:ee})}},[]),(0,y.useEffect)(function(){var W=Y.current;q.SpatialNavigation.updateFocusable(ee,{node:W,preferredChildFocusKey:ne,focusable:$,isFocusBoundary:oe,focusBoundaryDirections:ue,onEnterPress:M,onEnterRelease:k,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D})},[ee,ne,$,oe,ue,M,k,H,j,B,D]),{ref:Y,focusSelf:Re,focused:J,hasFocusedChild:V,focusKey:ee}}},150:function(b){b.exports=t},117:function(b){b.exports=n},747:function(b){b.exports=a},23:function(b){b.exports=i},842:function(b){b.exports=o},682:function(b){b.exports=u},784:function(b){b.exports=v},604:function(b){b.exports=h},432:function(b){b.exports=m},67:function(b){b.exports=_},461:function(b){b.exports=I},156:function(b){b.exports=P}},K={};return function b(l){var g=K[l];if(g!==void 0)return g.exports;var C=K[l]={exports:{}};return N[l].call(C.exports,C,C.exports,b),C.exports}(607)}()})})(ki);var Mf=ki.exports;exports.commonjsGlobal=ve;exports.distExports=Mf;exports.getAugmentedNamespace=ys;exports.getDefaultExportFromCjs=ps;