"use strict";const e=require("./Toggle-r0neBlcF.cjs"),c=require("./jsx-runtime-evvPGacs.cjs"),l=require("react"),i=require("./css-SuMNMmEe.cjs"),M=require("./Center-7mG_M7Co.cjs");require("./aggregator-Plx04vqJ.cjs");require("react-hook-form");const R=require("./Keyboard-kjYoVB1G.cjs"),S=t=>{const{listen:o}=e.useContext$1(),[d,u]=l.useState([]);return l.useEffect(()=>o(({next:[r]})=>u(r??[])),[o,u]),c.jsxRuntimeExports.jsx(e.Text,{...t,children:d.join(" ")})},x=({onDrag:t,triggers:o=[["MouseLeft"],["MouseRight"]],bound:d,loose:u=!1})=>{const r=l.useRef(null),s=l.useRef(i.Ru.ZERO),f=l.useCallback(n=>{const g=i.Ru.construct(n);if(r.current===null)return;const{triggers:a}=r.current;t({box:i.Mu.construct(s.current,g),cursor:g,triggers:a,stage:"during"})},[t]),E=l.useCallback(n=>{const{stage:g,cursor:a}=n;g==="start"?(t({box:i.Mu.construct(a),...n}),window.addEventListener("mousemove",f),r.current=n,s.current=a):g==="end"&&r.current!=null&&(t({box:i.Mu.construct(s.current,a),...n}),window.removeEventListener("mousemove",f),r.current=null,s.current=i.Ru.ZERO)},[t]);e.use$2({triggers:o,callback:E,region:d,loose:u})},m=({className:t,style:o,trigger:d,...u})=>{const r={Control:c.jsxRuntimeExports.jsx(e.Symbols.Meta,{}),Alt:c.jsxRuntimeExports.jsx(e.Symbols.Alt,{}),Shift:c.jsxRuntimeExports.jsx(e.u0.Keyboard.Shift,{}),MouseLeft:"Left Click",MouseRight:"Right Click",MouseMiddle:"Middle Click"};return c.jsxRuntimeExports.jsx(M.Space,{className:t,style:o,direction:"x",children:d.map(s=>c.jsxRuntimeExports.jsx(R.Keyboard,{...u,children:r[s]??s},s))})},C=Object.freeze(Object.defineProperty({__proto__:null,ALPHANUMERIC_KEYS:e.ALPHANUMERIC_KEYS,ALPHANUMERIC_KEYS_SET:e.ALPHANUMERIC_KEYS_SET,KEYS:e.KEYS,MOUSE_KEYS:e.MOUSE_KEYS,Provider:e.Provider$1,Status:S,Text:m,compareModeConfigs:e.compareModeConfigs,determineMode:e.determineMode,diff:e.diff,eventKey:e.eventKey,filter:e.filter,flattenConfig:e.flattenConfig,keyZ:e.keyZ,keyboardKey:e.keyboardKey,match:e.match,mouseKey:e.mouseKey,mouseKeyZ:e.mouseKeyZ,purge:e.purge,purgeMouse:e.purgeMouse,triggerZ:e.triggerZ,use:e.use$2,useContext:e.useContext$1,useDrag:x,useFlattenedMemoConfig:e.useFlattenedMemoConfig,useHeld:e.useHeld,useHeldRef:e.useHeldRef},Symbol.toStringTag,{value:"Module"}));exports.Text=m;exports.external=C;exports.useDrag=x;
//# sourceMappingURL=external-eKVIWkSA.cjs.map
