diff --git a/_app/immutable/nodes/15.DaIuBLCP.js b/_app/immutable/nodes/15.DaIuBLCP.js
new file mode 100644
index 00000000..3b53541b
--- /dev/null
+++ b/_app/immutable/nodes/15.DaIuBLCP.js
@@ -0,0 +1,318 @@
+var Xe=Object.defineProperty;var Te=a=>{throw TypeError(a)};var Ye=(a,t,e)=>t in a?Xe(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var dt=(a,t,e)=>Ye(a,typeof t!="symbol"?t+"":t,e),me=(a,t,e)=>t.has(a)||Te("Cannot "+e);var P=(a,t,e)=>(me(a,t,"read from private field"),e?e.call(a):t.get(a)),V=(a,t,e)=>t.has(a)?Te("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),ve=(a,t,e,r)=>(me(a,t,"write to private field"),r?r.call(a,e):t.set(a,e),e),Ie=(a,t,e)=>(me(a,t,"access private method"),e);import{a as s,t as S,p as be,c as rt,k as A,x as qe,B as Ge,C as Ke}from"../chunks/disclose-version.CNjwL26W.js";import{m as je,u as Ze,f as N,s as v,c as k,a4 as E,r as y,a6 as z,g as n,G as m,a as lt,t as j,p as ut,d as W,X as Ot,aw as kt,a3 as ie}from"../chunks/runtime.B-gUiV1I.js";import{T as Je}from"../chunks/Tome_Content.xpXiVQfR.js";import{g as Qe}from"../chunks/tome.siBNfEyl.js";import{M as se}from"../chunks/Mdn_Link.DkcqrsCv.js";import{T as Ct,a as Tt}from"../chunks/Tome_Section_Header.DDYC-MNe.js";import{p as R,i as L}from"../chunks/if.DNsq1zR9.js";import{c as ye,e as Nt}from"../chunks/context_helpers.mn64om0Y.js";import{t as Et,a as Pe,c as tn,s as en}from"../chunks/index.BTflLVjk.js";import{C as Dt}from"../chunks/Code.6WAVxGbz.js";import{s as _t,b as ce,r as nn}from"../chunks/attributes.C4-PK8QZ.js";import{a as ct}from"../chunks/intersect.BIOnSgs1.js";import{s as ae}from"../chunks/style.PwPRnE0L.js";import{b as we}from"../chunks/this.B1Rg4b_C.js";import{p as Q,s as Se}from"../chunks/props.Cy-UtRwa.js";import{a as on,s as Pt,b as he,c as Ae,D as sn}from"../chunks/Dialog.DixKc0OY.js";import{o as ze}from"../chunks/index-client.BtWieJN8.js";import{s as mt}from"../chunks/render.Dvbgo3Ck.js";import{a as pe}from"../chunks/string.ZJuK4sHN.js";import{t as pt}from"../chunks/class.BHrBxz3m.js";import{P as an}from"../chunks/Pending_Animation.DkktiTx1.js";import{D as rn,b as Ee}from"../chunks/Details.BXAtmSrO.js";import{S as cn,g as ln}from"../chunks/logos.Bui5YFwi.js";import{C as un,T as dn}from"../chunks/Theme_Input.whmyojYa.js";import{b as Oe}from"../chunks/input.4AtqOfsH.js";var bt,St,Mt,ue,Fe;const de=class de{constructor(t){V(this,ue);V(this,bt,new WeakMap);V(this,St);V(this,Mt);ve(this,Mt,t)}observe(t,e){var r=P(this,bt).get(t)||new Set;return r.add(e),P(this,bt).set(t,r),Ie(this,ue,Fe).call(this).observe(t,P(this,Mt)),()=>{var o=P(this,bt).get(t);o.delete(e),o.size===0&&(P(this,bt).delete(t),P(this,St).unobserve(t))}}};bt=new WeakMap,St=new WeakMap,Mt=new WeakMap,ue=new WeakSet,Fe=function(){return P(this,St)??ve(this,St,new ResizeObserver(t=>{for(var e of t){de.entries.set(e.target,e);for(var r of P(this,bt).get(e.target)||[])r(e)}}))},dt(de,"entries",new WeakMap);let ge=de;var _n=new ge({box:"border-box"});function Ne(a,t,e){var r=_n.observe(a,()=>e(a[t]));je(()=>(Ze(()=>e(a[t])),r))}var mn=S('contextmenu event',1),vn=S('navigator.vibrate'),hn=S('navigator.vibrate'),pn=S(` The Contextmenu
overrides the system contextmenu to provide capabilities specific
+ to your app. The motivation docs explain why Fuz breaks web platform expectations.
On touch devices, we detect tap-and-hold (aka longpress) instead of simply overriding the web's because iOS does not support this web standard as of July 2023 as described in this WebKit bug report. The Fuz
+ implementation therefore has hacks that may cause corner case bugs on various devices and
+ browsers, and it breaks on all mobile browsers that I've tested because it triggers the gesture on a timeout, not a user
+ action.
When you rightclick or longpress inside a Contextmenu_Root
, it searches for
+ behaviors defined with Contextmenu
starting from the target element up to the root.
+ If any behaviors are found, the Fuz contextmenu opens, with the caveats below. The contextmenu displays
+ the available behaviors which you can then activate. If no behaviors are found, the system contextmenu
+ opens.
Devices with a mouse
- rightclick opens the Fuz contextmenu and not the system contextmenu except on
+ input/textarea/contenteditable
- rightclick on the Fuz contextmenu opens the system contextmenu
- rightclick while holding Shift opens the system contextmenu
- keyboard navigation and activation should work similarly to the W3C APG menubar pattern
Touch devices
- longpress opens the Fuz contextmenu and not the system contextmenu
- longpress on the Fuz contextmenu (two longpresses) opens the system contextmenu
- double-tap-and-hold (aka tap-then-longpress) opens the system contextmenu or performs other
+ default behavior like selecting text - does not work for cases where the first tap performs
+ some action on an element, like links - use two longpresses for those cases (this may need
+ more design work, possibly adding a different gesture or a contextmenu entry for touch devices
+ that triggers the system conextmenu on the next longpress)
- a longpress is canceled if you move the touch past a threshold before it triggers
- the contextmenu closes if you move past a threshold without lifting the longpress touch that
+ opened it
- gives haptic feedback on open with (currently broken, may remain so due to the iOS longpress workaround)
`,1),fn=S(` Fuz takes two things very seriously, in no particular order:
- giving users a powerful and customizable UX
- aligning with the web platform and not breaking its standard behaviors
For #1, Fuz includes a custom contextmenu. Like Google Docs, when you right-click or
+ tap-and-hold (aka longpress) on an element inside Fuz's Contextmenu
, you'll see app-specific options and actions for your current context.
This is a powerful UX pattern, but it violates #2. The Fuz contextmenu breaks the normal browser
+ behavior of showing the system contextmenu and device-specific behaviors like selecting text on
+ a longpress.
Balancing these two concerns is going to be an ongoing challenge, and my current belief is that
+ the contextmenu is too useful and powerful to ignore. I'm open to critical feedback, and I'll do
+ what I can to minimize the harmful effects of choices like this.
Mitigations:
- The Fuz contextmenu does not open on elements that allow clipboard pasting like inputs,
+ textareas, and contenteditables.
- To bypass the Fuz contextmenu on a device with a keyboard, hold the Shift key.
- To bypass the Fuz contextmenu on a touch device, like to select text, tap one extra time
+ before your longpress. This means double-tap-and-hold should behave the same as tap-and-hold
+ on standard web pages.
- Triggering the contextmenu inside of the Fuz contextmenu shows your system contextmenu. This
+ means you can either double-right-click or longpress twice to access your system contextmenu
+ as an alternative to holding Shift or double-tap-and-hold, However a caveat is that the target
+ of your action will be some element inside the Fuz contextmenu, so to select text or access a
+ link's system contextmenu on a touch device, you must use double-tap-and-hold. When you open
+ the Fuz contextmenu on a link, you'll see the link again in the menu under your pointer by
+ default, so to access your system's functionality on links, tap-and-hold twice.
`,1),gn=S(" ",1);function xn(a){var t=gn(),e=N(t);Ct(e,{children:(o,c)=>{var i=pn(),h=N(i);Tt(h,{text:"Expected behaviors"});var w=v(h,4),C=v(k(w));se(C,{path:"Web/API/Element/contextmenu_event",children:(u,l)=>{var x=mn();E(),s(u,x)},$$slots:{default:!0}});var f=v(C,4);se(f,{path:"Web/API/Navigator/vibrate",children:(u,l)=>{var x=vn();s(u,x)},$$slots:{default:!0}}),E(),y(w);var p=v(w,10),d=v(k(p),10),g=v(k(d));se(g,{path:"Web/API/Navigator/vibrate",children:(u,l)=>{var x=hn();s(u,x)},$$slots:{default:!0}}),E(),y(d),y(p),s(o,i)},$$slots:{default:!0}});var r=v(e,2);Ct(r,{children:(o,c)=>{var i=fn(),h=N(i);Tt(h,{text:"Motivation"}),E(14),s(o,i)},$$slots:{default:!0}}),s(a,t)}function bn(a){const t=a-1;return t*t*t+1}function yn(a){return--a*a*a*a*a+1}function De(a,{from:t,to:e},r={}){var o=getComputedStyle(a),c=wn(a),i=o.transform==="none"?"":o.transform,[h,w]=o.transformOrigin.split(" ").map(parseFloat),C=t.width/e.width,f=t.height/e.height,p=(t.left+C*h-(e.left+h))/c,d=(t.top+f*w-(e.top+w))/c,{delay:g=0,duration:u=x=>Math.sqrt(x)*120,easing:l=bn}=r;return{delay:g,duration:typeof u=="function"?u(Math.sqrt(p*p+d*d)):u,easing:l,css:(x,$)=>{var T=$*p,O=$*d,F=x+$*C,H=x+$*f;return`transform: ${i} scale(${F}, ${H}) translate(${T}px, ${O}px);`}}}function wn(a){if("currentCSSZoom"in a)return a.currentCSSZoom;for(var t=a,e=1;t!==null;)e*=+getComputedStyle(t).zoom,t=t.parentElement;return e}var Rt,qt;class He{constructor(){V(this,Rt,z(0));V(this,qt,z(0))}get width(){return n(P(this,Rt))}set width(t){m(P(this,Rt),R(t))}get height(){return n(P(this,qt))}set height(t){m(P(this,qt),R(t))}}Rt=new WeakMap,qt=new WeakMap;var Ft,Ht,Lt,Wt,Bt;class $n{constructor(t,e){dt(this,"is_menu",!1);dt(this,"menu");V(this,Ft,z(!1));V(this,Ht,z());V(this,Lt,z(!1));V(this,Wt,z(null));V(this,Bt,z(null));this.menu=t,this.run=e}get selected(){return n(P(this,Ft))}set selected(t){m(P(this,Ft),R(t))}get run(){return n(P(this,Ht))}set run(t){m(P(this,Ht),R(t))}get pending(){return n(P(this,Lt))}set pending(t){m(P(this,Lt),R(t))}get error_message(){return n(P(this,Wt))}set error_message(t){m(P(this,Wt),R(t))}get promise(){return n(P(this,Bt))}set promise(t){m(P(this,Bt),R(t))}}Ft=new WeakMap,Ht=new WeakMap,Lt=new WeakMap,Wt=new WeakMap,Bt=new WeakMap;var Ut,Vt;class kn{constructor(t,e){dt(this,"is_menu",!0);dt(this,"menu");dt(this,"depth");V(this,Ut,z(!1));V(this,Vt,z(R([])));this.menu=t,this.depth=e}get selected(){return n(P(this,Ut))}set selected(t){m(P(this,Ut),R(t))}get items(){return n(P(this,Vt))}set items(t){m(P(this,Vt),R(t))}}Ut=new WeakMap,Vt=new WeakMap;var Xt;class Cn{constructor(){dt(this,"is_menu",!0);dt(this,"menu",null);dt(this,"depth",1);V(this,Xt,z(R([])))}get items(){return n(P(this,Xt))}set items(t){m(P(this,Xt),R(t))}}Xt=new WeakMap;var Yt,Gt,Kt,jt,Zt,Jt,Qt;class $e{constructor(t){dt(this,"layout");dt(this,"initial_layout");V(this,Yt,z(!1));V(this,Gt,z(0));V(this,Kt,z(0));V(this,jt,z(R([])));V(this,Zt,z());V(this,Jt,z(R(new Cn)));V(this,Qt,z(R([])));this.initial_layout=t==null?void 0:t.layout,this.layout=this.initial_layout??new He}get opened(){return n(P(this,Yt))}set opened(t){m(P(this,Yt),R(t))}get x(){return n(P(this,Gt))}set x(t){m(P(this,Gt),R(t))}get y(){return n(P(this,Kt))}set y(t){m(P(this,Kt),R(t))}get params(){return n(P(this,jt))}set params(t){m(P(this,jt),R(t))}get error(){return n(P(this,Zt))}set error(t){m(P(this,Zt),R(t))}get root_menu(){return n(P(this,Jt))}set root_menu(t){m(P(this,Jt),R(t))}get selections(){return n(P(this,Qt))}set selections(t){m(P(this,Qt),R(t))}open(t,e,r){this.selections.length=0,this.opened=!0,this.x=e,this.y=r,this.params=t}close(){this.opened&&(this.reset_items(this.root_menu.items),this.opened=!1)}reset_items(t){for(const e of t)e.is_menu?this.reset_items(e.items):(e.promise!==null&&(e.promise=null),e.error_message!==null&&(e.error_message=null))}activate(t){if(t.is_menu)this.expand_selected();else{let e;try{e=t.run()}catch(r){const o=typeof(r==null?void 0:r.message)=="string"?r.message:void 0;t.error_message=o??"unknown error",this.error=o}if(on(e)){t.pending=!0,t.error_message=null;const r=t.promise=e.then(o=>{if(r===t.promise){if(typeof(o==null?void 0:o.ok)=="boolean")if(o.ok)this.close();else{const c=typeof o.message=="string"?o.message:void 0;t.error_message=c??"unknown error",this.error=c}else this.close();return o}},o=>{if(r!==t.promise)return;const c=typeof(o==null?void 0:o.message)=="string"?o.message:void 0;t.error_message=c??"unknown error",this.error=c}).finally(()=>{r===t.promise&&(t.pending=!1,t.promise=null)});return t.promise}this.close()}return!0}activate_selected(){const t=this.selections.at(-1);if(t)return this.activate(t);this.select_first()}select(t){if(this.selections.at(-1)===t)return;for(const r of this.selections)r.selected=!1;this.selections.length=0;let e=t;do e.selected=!0,this.selections.unshift(e);while((e=e.menu)&&e.menu)}collapse_selected(){if(this.selections.length<=1)return;const t=this.selections.pop();t.selected=!1}expand_selected(){const t=this.selections.at(-1);if(!(t!=null&&t.is_menu))return;const e=t.items[0];e.selected=!0,this.selections.push(e)}select_next(){if(!this.selections.length){this.select_first();return}const t=this.selections.at(-1),e=t.menu.items.indexOf(t);this.select(t.menu.items[e===t.menu.items.length-1?0:e+1])}select_previous(){if(!this.selections.length){this.select_last();return}const t=this.selections.at(-1),e=t.menu.items.indexOf(t);this.select(t.menu.items[e===0?t.menu.items.length-1:e-1])}select_first(){var t;this.select((((t=this.selections.at(-1))==null?void 0:t.menu)??this.root_menu).items[0])}select_last(){var e;const{items:t}=((e=this.selections.at(-1))==null?void 0:e.menu)??this.root_menu;this.select(t.at(-1))}add_entry(t){const e=fe.maybe_get()??this.root_menu,r=new $n(e,t);return e.items.push(r),ze(()=>{e.items.length=0}),r}add_submenu(){const t=fe.maybe_get()??this.root_menu,e=new kn(t,t.depth+1);return t.items.push(e),fe.set(e),ze(()=>{t.items.length=0}),e}}Yt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;const ke="contextmenu",Tn=`a,[data-${ke}]`,re=new Map;let In=0;const Pn=(a,t)=>{if(t==null)return;const e=(In+=1)-1+"";return a.dataset[ke]=e,re.set(e,t),{update:r=>{re.set(e,r)},destroy:()=>{re.delete(e)}}},Sn=17,Me=(a,t,e,r)=>{const o=An(a);return o!=null&&o.length?(r.open(o,t,e),navigator.vibrate&&navigator.vibrate(Sn),!0):!1},An=a=>{var c;let t=null,e=a,r,o;for(;e=e==null?void 0:e.closest(Tn);){if(r=e.dataset[ke]){if(t??(t=[]),o=re.get(r),o===void 0)continue;Array.isArray(o)?(t??(t=[])).push(...o):(t??(t=[])).push(o)}e.tagName==="A"&&(t??(t=[])).push({snippet:"link",props:{href:e.href}}),e=e.parentElement}if(t){const i=(c=window.getSelection())==null?void 0:c.toString();i&&t.unshift({snippet:"text",props:{content:"Copy text",icon:"๐",run:()=>void navigator.clipboard.writeText(i)}})}return t},_e=ye(),fe=ye(),xe=ye(()=>new He);var zn=(a,t)=>t.close(),En=S('');function Le(a,t){lt(t,!0);const e="๐",r=Q(t,"icon",3,e),o=_e.get(),c=($,T=location.host)=>{const O=pe(pe($,"https://"),"http://");return O.startsWith(T+"/")?pe(O,T):O},i=W(()=>c(t.href)),h=W(()=>!(n(i)[0]==="."||n(i)[0]==="/"&&n(i)[1]!=="/")),w=W(()=>n(h)?"noreferrer":void 0);var C=En(),f=k(C);f.__click=[zn,o];var p=k(f),d=k(p),g=k(d);L(g,()=>typeof r()=="string",$=>{var T=A();j(()=>mt(T,r())),s($,T)},$=>{var T=rt(),O=N(T);_t(O,r,()=>e),s($,T)}),y(d);var u=v(d,2),l=k(u),x=k(l);L(x,()=>t.children,$=>{var T=rt(),O=N(T);_t(O,()=>t.children),s($,T)},$=>{var T=A();j(()=>mt(T,n(i))),s($,T)}),y(l),y(u),y(p),y(f),y(C),j(()=>{ce(f,"href",t.href),ce(f,"rel",n(w))}),s(a,C),ut()}be(["click"]);var On=S('');function at(a,t){lt(t,!0);const e=_e.get(),r=e.add_entry(t.run);Ot(()=>{r.run=t.run});const o=W(()=>r.selected),c=W(()=>r.pending),i=W(()=>r.error_message);var h=On();h.__click=()=>{setTimeout(()=>e.activate(r))};var w=k(h),C=k(w),f=k(C);L(f,()=>typeof t.icon=="string",u=>{var l=A();j(()=>mt(l,t.icon)),s(u,l)},u=>{var l=rt(),x=N(l);L(x,()=>t.icon,$=>{var T=rt(),O=N(T);_t(O,()=>t.icon),s($,T)},null,!0),s(u,l)}),y(C);var p=v(C,2),d=k(p);_t(d,()=>t.children),y(p);var g=v(p,2);L(g,()=>n(c),u=>{an(u,{})},u=>{var l=rt(),x=N(l);L(x,()=>n(i),$=>{var T=A("โ ๏ธ");s($,T)},null,!0),s(u,l)}),y(w),y(h),j(()=>{ce(h,"title",n(i)?`Error: ${n(i)}`:void 0),pt(h,"selected",n(o))}),qe("mouseenter",h,u=>{Pt(u),e.select(r)}),s(a,h),ut()}be(["click"]);function We(a,t){at(a,{get run(){return t.run},icon:r=>{E();var o=A();j(()=>mt(o,t.icon)),s(r,o)},children:(r,o)=>{E();var c=A();j(()=>mt(c,t.content)),s(r,c)},$$slots:{icon:!0,default:!0}})}var Nn=S(''),Dn=S(''),Mn=S(''),Rn=S(" ",1);function te(a,t){lt(t,!0);const e=(b,_=ie)=>{Le(b,Se(_))},r=(b,_=ie)=>{We(b,Se(_))},o=Q(t,"contextmenu",19,()=>new $e),c=Q(t,"longpress_move_tolerance",3,21),i=Q(t,"longpress_duration",3,633),h=Q(t,"bypass_with_tap_then_longpress",3,!0),w=Q(t,"tap_then_longpress_duration",3,660),C=Q(t,"tap_then_longpress_move_tolerance",3,7),f=Q(t,"open_offset_x",19,()=>-2),p=Q(t,"open_offset_y",19,()=>-2),d=Q(t,"scoped",3,!1);_e.set(o());let g=z(void 0);const u=W(()=>o().layout),l=W(()=>o().initial_layout),x=W(()=>n(u)===n(l));let $=z(void 0),T=z(void 0);Ot(()=>{!n(x)&&n($)!==void 0&&(n(u).width=n($))}),Ot(()=>{!n(x)&&n(T)!==void 0&&(n(u).height=n(T))});const O=xe.set();Ot(()=>{if(n(g)){const b=n(g).getBoundingClientRect();O.width=b.width,O.height=b.height}});const F=W(()=>o().x+Math.min(0,n(u).width-(o().x+O.width))),H=W(()=>o().y+Math.min(0,n(u).height-(o().y+O.height)));let U=z(void 0),Z=z(void 0),J=z(void 0),X=z(void 0),q=z(void 0),tt=z(void 0);const Y=()=>{n(q)&&m(q,!1),n(X)!=null&&(clearTimeout(n(X)),m(X,null))},G=b=>{var I;if(n(tt)){m(tt,!1);return}if(n(q)){Y(),Pt(b);return}const{target:_}=b;b.shiftKey||!(_ instanceof HTMLElement||_ instanceof SVGElement)||(I=n(g))!=null&&I.contains(_)||he(_)||Ae(_)||Me(_,b.clientX+f(),b.clientY+p(),o())&&(Pt(b),Y())},B=b=>{n(q)&&m(q,!1);const{touches:_,target:I}=b;if(o().opened||_.length!==1||b.shiftKey||!(I instanceof HTMLElement||I instanceof SVGElement)||he(I)||Ae(I))return;const{clientX:M,clientY:D}=_[0];if(h()){if(n(J)!=null&&performance.now()-n(J){m(q,!0),Me(I,n(U)+f(),n(Z)+p(),o())},i())))},it=b=>{if(n(X)==null)return;const{touches:_}=b;if(_.length!==1)return;const{clientX:I,clientY:M}=_[0];Math.hypot(I-n(U),M-n(Z))>c()&&(o().opened&&o().close(),Y())},vt=b=>{n(X)!=null&&(n(q)&&Pt(b),Y())},ee=b=>{n(g)&&!n(g).contains(b.target)&&o().close()},et=new Map([["Escape",()=>o().close()],["ArrowLeft",()=>o().collapse_selected()],["ArrowRight",()=>o().expand_selected()],["ArrowDown",()=>o().select_next()],["PageDown",()=>o().select_next()],["ArrowUp",()=>o().select_previous()],["PageUp",()=>o().select_previous()],["Home",()=>o().select_first()],["End",()=>o().select_last()],[" ",()=>o().activate_selected()],["Enter",()=>o().activate_selected()]]),At=b=>{const _=et.get(b.key);!_||he(b.target)||(Pt(b),_())},K=(b,_)=>{let I=null;const M=D=>{I&&(I(),I=null),D.disabled||(I=Ge(b,D.event,D.cb,{capture:!0,passive:D.passive}))};return M(_),{update:D=>{M(D)},destroy:()=>{I==null||I()}}};var gt=Rn();ct(kt,(b,_)=>K(b,_),()=>({event:"contextmenu",passive:!1,cb:G,disabled:d()})),ct(kt,(b,_)=>K(b,_),()=>({event:"touchstart",passive:!0,cb:B,disabled:d()})),ct(kt,(b,_)=>K(b,_),()=>({event:"touchmove",passive:!0,cb:it,disabled:d()})),ct(kt,(b,_)=>K(b,_),()=>({event:"touchend",passive:!1,cb:vt,disabled:d()})),ct(kt,(b,_)=>K(b,_),()=>({event:"touchcancel",passive:!1,cb:vt,disabled:d()})),ct(kt,(b,_)=>K(b,_),()=>({event:"mousedown",passive:!0,cb:ee,disabled:!o().opened})),ct(kt,(b,_)=>K(b,_),()=>({event:"keydown",passive:!1,cb:At,disabled:!o().opened}));var yt=N(gt);L(yt,d,b=>{var _=Nn(),I=k(_);_t(I,()=>t.children),y(_),ct(_,(M,D)=>K(M,D),()=>({event:"contextmenu",passive:!1,cb:G})),ct(_,(M,D)=>K(M,D),()=>({event:"touchstart",passive:!0,cb:B})),ct(_,(M,D)=>K(M,D),()=>({event:"touchmove",passive:!0,cb:it})),ct(_,(M,D)=>K(M,D),()=>({event:"touchend",passive:!1,cb:vt})),ct(_,(M,D)=>K(M,D),()=>({event:"touchcancel",passive:!1,cb:vt})),s(b,_)},b=>{var _=rt(),I=N(_);_t(I,()=>t.children),s(b,_)});var ne=v(yt,2);L(ne,()=>!n(x),b=>{var _=Dn();Ne(_,"clientHeight",I=>m(T,I)),Ne(_,"clientWidth",I=>m($,I)),s(b,_)});var oe=v(ne,2);L(oe,()=>o().opened,b=>{var _=Mn();Nt(_,20,()=>o().params,I=>I,(I,M)=>{var D=rt(),wt=N(D);L(wt,()=>typeof M=="function",ht=>{var nt=rt(),ot=N(nt);_t(ot,()=>M),s(ht,nt)},ht=>{var nt=rt(),ot=N(nt);L(ot,()=>M.snippet==="link",ft=>{e(ft,()=>M.props)},ft=>{var It=rt(),st=N(It);L(st,()=>M.snippet==="text",zt=>{r(zt,()=>M.props)},null,!0),s(ft,It)},!0),s(ht,nt)}),s(I,D)}),y(_),we(_,I=>m(g,I),()=>n(g)),j(()=>ae(_,"transform",`translate3d(${n(F)??""}px, ${n(H)??""}px, 0)`)),s(b,_)}),s(a,gt),ut()}var qn=S('');function xt(a,t){lt(t,!0);var e=qn(),r=k(e);_t(r,()=>t.children),y(e),ct(e,(o,c)=>Pn(o,c),()=>t.entries),s(a,e),ut()}var Fn=S(''),Hn=S(' ');function Ce(a,t){lt(t,!0);const e=_e.get(),r=e.add_submenu(),{layout:o}=e,c=W(()=>r.selected);let i=z(void 0);const h=xe.get(),w=xe.set();let C=z(0),f=z(0);Ot(()=>{n(i)&&p(n(i),o,h)});const p=(F,H,U)=>{const{x:Z,y:J,width:X,height:q}=F.getBoundingClientRect();w.width=X,w.height=q;const tt=Z-n(C),Y=J-n(f),G=tt+X+U.width-H.width;if(G<=0)m(C,R(U.width));else{const B=X-tt;B<=0?m(C,-X):B>G?m(C,U.width-G):m(C,B-X)}m(f,R(Math.min(0,H.height-(Y+q))))};var d=Hn(),g=k(d),u=k(g),l=k(u),x=k(l);_t(x,()=>t.icon??ie),y(l);var $=v(l,2),T=k($);_t(T,()=>t.children),y($),y(u),E(2),y(g);var O=v(g,2);L(O,()=>n(c),F=>{var H=Fn(),U=k(H);_t(U,()=>t.menu),y(H),we(H,Z=>m(i,Z),()=>n(i)),j(()=>{ae(H,"transform",`translate3d(${n(C)??""}px, ${n(f)??""}px, 0)`),ae(H,"max-height",`${o.height??""}px`)}),s(F,H)}),y(d),j(()=>{ae(d,"--contextmenu_depth",r.depth),ce(g,"aria-expanded",n(c)),pt(g,"selected",n(c))}),qe("mouseenter",g,F=>{Pt(F),setTimeout(()=>e.select(r))}),s(a,d),ut()}var Ln=S(" ",1);function le(a,t){lt(t,!0);const e=Q(t,"name",3,"Cat"),r=Q(t,"icon",3,"๐บ");Ce(a,{icon:i=>{E();var h=A();j(()=>mt(h,r())),s(i,h)},menu:i=>{var h=Ln(),w=N(h);at(w,{run:()=>t.act({type:t.position==="adventure"?"cat_go_home":"cat_go_adventure",name:e()}),icon:p=>{var d=rt(),g=N(d);L(g,()=>t.position==="adventure",u=>{var l=A("๐ ");s(u,l)},u=>{var l=A("๐");s(u,l)}),s(p,d)},children:(p,d)=>{var g=rt(),u=N(g);L(u,()=>t.position==="adventure",l=>{var x=A("go home");s(l,x)},l=>{var x=A("go adventure");s(l,x)}),s(p,g)},$$slots:{icon:!0,default:!0}});var C=v(w,2);at(C,{run:()=>t.act({type:"cat_be_or_do",name:e(),position:t.position}),icon:p=>{var d=rt(),g=N(d);L(g,()=>t.position==="adventure",u=>{var l=A("๐");s(u,l)},u=>{var l=A("๐ ");s(u,l)}),s(p,d)},children:(p,d)=>{var g=rt(),u=N(g);L(u,()=>t.position==="adventure",l=>{var x=A("do adventure");s(l,x)},l=>{var x=A("be home");s(l,x)}),s(p,g)},$$slots:{icon:!0,default:!0}}),s(i,h)},children:(i,h)=>{E();var w=A();j(()=>mt(w,e())),s(i,w)},$$slots:{icon:!0,menu:!0,default:!0}}),ut()}var Wn=S(" ",1);function Bn(a,t){var e=Wn(),r=N(e);Le(r,{href:"https://github.com/ryanatkn/fuz",icon:i=>{cn(i,{data:ln,size:"var(--icon_size_xs)"})},children:(i,h)=>{E();var w=A("Source code");s(i,w)},$$slots:{icon:!0,default:!0}});var o=v(r,2);at(o,{get run(){return t.toggle_about_dialog},icon:i=>{E();var h=A("?");s(i,h)},children:(i,h)=>{E();var w=A("About");s(i,w)},$$slots:{icon:!0,default:!0}}),s(a,e)}const Be=a=>{const t=a.length;if(t===2)return"cats";if(t===0)return null;const e=a[0];return e.icon+e.name};var Un=S(" ",1),Vn=S(" ",1);function Xn(a,t){lt(t,!0);const e=W(()=>Be(t.adventure_cats));Ce(a,{icon:c=>{E();var i=A("๐ ");s(c,i)},menu:c=>{var i=Vn(),h=N(i);L(h,()=>n(e),f=>{at(f,{run:()=>t.act({type:"call_cats_home"}),icon:d=>{E();var g=A("๐โโฌ");s(d,g)},children:(d,g)=>{E();var u=A("call");s(d,u)},$$slots:{icon:!0,default:!0}})});var w=v(h,2);Nt(w,17,()=>t.home_cats,f=>f.name,(f,p)=>{le(f,{get name(){return n(p).name},get icon(){return n(p).icon},get position(){return n(p).position},get act(){return t.act}})});var C=v(w,2);L(C,()=>!n(e),f=>{var p=Un(),d=N(p);at(d,{run:()=>t.act({type:"cat_be_or_do",name:null,position:"home"}),icon:l=>{E();var x=A("๐ ");s(l,x)},children:(l,x)=>{E();var $=A("be");s(l,$)},$$slots:{icon:!0,default:!0}});var g=v(d,2);at(g,{run:()=>t.act({type:"call_cats_adventure"}),icon:l=>{E();var x=A("๐ฆ");s(l,x)},children:(l,x)=>{E();var $=A("leave");s(l,$)},$$slots:{icon:!0,default:!0}}),s(f,p)}),s(c,i)},children:(c,i)=>{E();var h=A("home");s(c,h)},$$slots:{icon:!0,menu:!0,default:!0}}),ut()}var Yn=S(" ",1),Gn=S(" ",1);function Kn(a,t){lt(t,!0);const e=W(()=>Be(t.home_cats));Ce(a,{icon:c=>{E();var i=A("๐");s(c,i)},menu:c=>{var i=Gn(),h=N(i);L(h,()=>n(e),f=>{at(f,{run:()=>t.act({type:"call_cats_adventure"}),icon:d=>{E();var g=A("๐ฆ");s(d,g)},children:(d,g)=>{E();var u=A("call");s(d,u)},$$slots:{icon:!0,default:!0}})});var w=v(h,2);Nt(w,17,()=>t.adventure_cats,f=>f.name,(f,p)=>{le(f,{get name(){return n(p).name},get icon(){return n(p).icon},get position(){return n(p).position},get act(){return t.act}})});var C=v(w,2);L(C,()=>!n(e),f=>{var p=Yn(),d=N(p);at(d,{run:()=>t.act({type:"cat_be_or_do",name:null,position:"adventure"}),icon:l=>{E();var x=A("๐");s(l,x)},children:(l,x)=>{E();var $=A("do");s(l,$)},$$slots:{icon:!0,default:!0}});var g=v(d,2);at(g,{run:()=>t.act({type:"call_cats_home"}),icon:l=>{E();var x=A("๐โโฌ");s(l,x)},children:(l,x)=>{E();var $=A("leave");s(l,$)},$$slots:{icon:!0,default:!0}}),s(f,p)}),s(c,i)},children:(c,i)=>{E();var h=A("adventure");s(c,h)},$$slots:{icon:!0,menu:!0,default:!0}}),ut()}var jn=S(' '),Zn=S(' '),Jn=S('');function Re(a,t){lt(t,!0);const e=Q(t,"name",3,"Cat"),r=Q(t,"icon",3,"๐บ"),o=Q(t,"show_name",3,!0),c=Q(t,"show_icon",3,!0);var i=Jn(),h=k(i);L(h,c,C=>{var f=jn(),p=k(f,!0);y(f),j(()=>mt(p,r())),s(C,f)});var w=v(h);L(w,o,C=>{var f=Zn(),p=k(f);_t(p,()=>t.children??ie);var d=v(p,1,!0);y(f),j(()=>mt(d,e())),s(C,f)}),y(i),j(()=>pt(i,"has-icon",c())),s(a,i),ut()}const Qn=`