function w(){}function U(e){return e()}function z(){return Object.create(null)}function K(e){e.forEach(U)}function re(e){return typeof e=="function"}function se(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function oe(e){return Object.keys(e).length===0}function fe(e,...t){if(e==null)return w;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Ae(e,t,n){e.$$.on_destroy.push(fe(t,n))}function Se(e,t){e.appendChild(t)}function ae(e,t,n){e.insertBefore(t,n||null)}function F(e){e.parentNode.removeChild(e)}function je(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Me(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Le(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Te(e){return e===""?null:+e}function le(e){return Array.from(e.childNodes)}function Be(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function De(e,t){e.value=t==null?"":t}function He(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function Ne(e,t){for(let n=0;n{S.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}function Xe(e){e&&e.c()}function me(e,t,n,i){const{fragment:r,on_mount:c,on_destroy:f,after_update:o}=e.$$;r&&r.m(t,n),i||M(()=>{const s=c.map(U).filter(re);f?f.push(...s):K(s),e.$$.on_mount=[]}),o.forEach(M)}function ge(e,t){const n=e.$$;n.fragment!==null&&(K(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function _e(e,t){e.$$.dirty[0]===-1&&(O.push(e),pe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const m=y.length?y[0]:h;return s.ctx&&r(s.ctx[a],s.ctx[a]=m)&&(!s.skip_bound&&s.bound[a]&&s.bound[a](m),l&&_e(e,a)),h}):[],s.update(),l=!0,K(s.before_update),s.fragment=i?i(s.ctx):!1,t.target){if(t.hydrate){const a=le(t.target);s.fragment&&s.fragment.l(a),a.forEach(F)}else s.fragment&&s.fragment.c();t.intro&&ye(e.$$.fragment),me(e,t.target,t.anchor,t.customElement),X()}C(o)}class Qe{$destroy(){ge(this,1),this.$destroy=w}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!oe(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const x=[];function We(e,t=w){let n;const i=[];function r(o){if(se(e,o)&&(e=o,n)){const s=!x.length;for(let l=0;l{const a=i.indexOf(l);a!==-1&&i.splice(a,1),i.length===0&&(n(),n=null)}}return{set:r,update:c,subscribe:f}}/*! * hotkeys-js v3.8.5 * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. * * Copyright (c) 2021 kenny wong * http://jaywcjlove.github.io/hotkeys * * Licensed under the MIT license. */var B=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function D(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function J(e,t){for(var n=t.slice(0,t.length-1),i=0;i=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function be(e,t){for(var n=e.length>=t.length?e:t,i=e.length>=t.length?t:e,r=!0,c=0;c=0&&u.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&u.splice(0,u.length),(t===93||t===224)&&(t=91),t in p){p[t]=!1;for(var i in v)v[i]===t&&(_[i]=!1)}}function $e(e){if(!e)Object.keys(d).forEach(function(f){return delete d[f]});else if(Array.isArray(e))e.forEach(function(f){f.key&&H(f)});else if(typeof e=="object")e.key&&H(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?J(v,l):[];d[y]=d[y].map(function(g){var ie=r?g.method===r:!0;return ie&&g.scope===i&&be(g.mods,m)?{}:g})}})};function te(e,t,n){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var r in p)Object.prototype.hasOwnProperty.call(p,r)&&(!p[r]&&t.mods.indexOf(+r)>-1||p[r]&&t.mods.indexOf(+r)===-1)&&(i=!1);(t.mods.length===0&&!p[16]&&!p[18]&&!p[17]&&!p[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function ne(e){var t=d["*"],n=e.keyCode||e.which||e.charCode;if(!!_.filter.call(this,e)){if((n===93||n===224)&&(n=91),u.indexOf(n)===-1&&n!==229&&u.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(m){var g=Y[m];e[m]&&u.indexOf(g)===-1?u.push(g):!e[m]&&u.indexOf(g)>-1?u.splice(u.indexOf(g),1):m==="metaKey"&&e[m]&&u.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(u=u.slice(u.indexOf(g))))}),n in p){p[n]=!0;for(var i in v)v[i]===n&&(_[i]=!0);if(!t)return}for(var r in p)Object.prototype.hasOwnProperty.call(p,r)&&(p[r]=e[Y[r]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(u.indexOf(17)===-1&&u.push(17),u.indexOf(18)===-1&&u.push(18),p[17]=!0,p[18]=!0);var c=$();if(t)for(var f=0;f-1}function _(e,t,n){u=[];var i=Q(e),r=[],c="all",f=document,o=0,s=!1,l=!0,a="+";for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(c=t.scope),t.element&&(f=t.element),t.keyup&&(s=t.keyup),t.keydown!==void 0&&(l=t.keydown),typeof t.splitKey=="string"&&(a=t.splitKey)),typeof t=="string"&&(c=t);o1&&(r=J(v,e)),e=e[e.length-1],e=e==="*"?"*":k(e),e in d||(d[e]=[]),d[e].push({keyup:s,keydown:l,scope:c,mods:r,shortcut:i[o],method:n,key:i[o],splitKey:a});typeof f!="undefined"&&!Ee(f)&&window&&(I.push(f),D(f,"keydown",function(h){ne(h)}),D(window,"focus",function(){u=[]}),D(f,"keyup",function(h){ne(h),Oe(h)}))}var N={setScope:ee,getScope:$,deleteScope:Ke,getPressedKeyCodes:ve,isPressed:xe,filter:we,unbind:$e};for(var q in N)Object.prototype.hasOwnProperty.call(N,q)&&(_[q]=N[q]);if(typeof window!="undefined"){var Ce=window.hotkeys;_.noConflict=function(e){return e&&window.hotkeys===_&&(window.hotkeys=Ce),_},window.hotkeys=_}export{Xe as A,me as B,Ve as C,Re as D,ye as E,ge as F,Ge as G,Ue as H,_ as I,Qe as S,ke as a,Le as b,ae as c,Se as d,ue as e,Be as f,F as g,Fe as h,Je as i,De as j,je as k,Pe as l,R as m,w as n,ze as o,Me as p,M as q,K as r,se as s,ce as t,He as u,Ne as v,qe as w,Te as x,Ae as y,We as z};