: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
bindFunction('pointer', 'leave', this.moveEnd.bind(this));
const moveConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
mouseOnly: (value = true) => value
class ScrollEngine extends CoordinatesEngine {
_defineProperty(this, "ingKey", 'scrolling');
if (!this.state._active) this.start(event);
this.scrollChange(event);
this.timeoutStore.add('scrollEnd', this.scrollEnd.bind(this));
if (event.cancelable) event.preventDefault();
const state = this.state;
const values = scrollValues(event);
state._delta = V.sub(values, state._values);
V.addTo(state._movement, state._delta);
this.computeValues(values);
if (!this.state._active) return;
this.state._active = false;
bindFunction('scroll', '', this.scroll.bind(this));
const scrollConfigResolver = coordinatesConfigResolver;
class WheelEngine extends CoordinatesEngine {
_defineProperty(this, "ingKey", 'wheeling');
if (!this.state._active) this.start(event);
this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this));
const state = this.state;
state._delta = wheelValues(event);
V.addTo(state._movement, state._delta);
clampStateInternalMovementToBounds(state);
if (!this.state._active) return;
this.state._active = false;
bindFunction('wheel', '', this.wheel.bind(this));
const wheelConfigResolver = coordinatesConfigResolver;
class HoverEngine extends CoordinatesEngine {
_defineProperty(this, "ingKey", 'hovering');
if (this.config.mouseOnly && event.pointerType !== 'mouse') return;
this.computeValues(pointerValues(event));
if (this.config.mouseOnly && event.pointerType !== 'mouse') return;
const state = this.state;
if (!state._active) return;
const values = pointerValues(event);
state._movement = state._delta = V.sub(values, state._values);
this.computeValues(values);
state.delta = state.movement;
bindFunction('pointer', 'enter', this.enter.bind(this));
bindFunction('pointer', 'leave', this.leave.bind(this));
const hoverConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
mouseOnly: (value = true) => value
const actions_fe213e88_esm_EngineMap = new Map();
const ConfigResolverMap = new Map();
function actions_fe213e88_esm_registerAction(action) {
actions_fe213e88_esm_EngineMap.set(action.key, action.engine);
ConfigResolverMap.set(action.key, action.resolver);
const actions_fe213e88_esm_dragAction = {
resolver: dragConfigResolver
const actions_fe213e88_esm_hoverAction = {
resolver: hoverConfigResolver
const actions_fe213e88_esm_moveAction = {
resolver: moveConfigResolver
const actions_fe213e88_esm_pinchAction = {
resolver: pinchConfigResolver
const actions_fe213e88_esm_scrollAction = {
resolver: scrollConfigResolver
const actions_fe213e88_esm_wheelAction = {
resolver: wheelConfigResolver
;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/use-gesture-core.esm.js
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var sourceKeys = Object.keys(source);
for (i = 0; i < sourceKeys.length; i++) {
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
const sharedConfigResolver = {
return () => 'current' in value ? value.current : value;
window(value = SUPPORT.isBrowser ? window : undefined) {
const _excluded = ["target", "eventOptions", "window", "enabled", "transform"];
function resolveWith(config = {}, resolvers) {
for (const [key, resolver] of Object.entries(resolvers)) {
switch (typeof resolver) {
result[key] = resolver.call(result, config[key], key, config);
result[key] = resolveWith(config[key], resolver);
if (resolver) result[key] = config[key];
function use_gesture_core_esm_parse(newConfig, gestureKey, _config = {}) {
rest = _objectWithoutProperties(_ref, _excluded);
_config.shared = resolveWith({
}, sharedConfigResolver);
const resolver = ConfigResolverMap.get(gestureKey);
_config[gestureKey] = resolveWith(_objectSpread2({
for (const key in rest) {
const resolver = ConfigResolverMap.get(key);
_config[key] = resolveWith(_objectSpread2({
}, rest[key]), resolver);
constructor(ctrl, gestureKey) {
_defineProperty(this, "_listeners", new Set());
this._gestureKey = gestureKey;
add(element, device, action, handler, options) {
const listeners = this._listeners;
const type = toDomEventType(device, action);
const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
const eventOptions = _objectSpread2(_objectSpread2({}, _options), options);
element.addEventListener(type, handler, eventOptions);
element.removeEventListener(type, handler, eventOptions);
listeners.delete(remove);
this._listeners.forEach(remove => remove());
_defineProperty(this, "_timeouts", new Map());
add(key, callback, ms = 140, ...args) {
this._timeouts.set(key, window.setTimeout(callback, ms, ...args));
const timeout = this._timeouts.get(key);
if (timeout) window.clearTimeout(timeout);
this._timeouts.forEach(timeout => void window.clearTimeout(timeout));
_defineProperty(this, "gestures", new Set());
_defineProperty(this, "_targetEventStore", new EventStore(this));
_defineProperty(this, "gestureEventStores", {});
_defineProperty(this, "gestureTimeoutStores", {});
_defineProperty(this, "handlers", {});
_defineProperty(this, "config", {});
_defineProperty(this, "pointerIds", new Set());
_defineProperty(this, "touchIds", new Set());
_defineProperty(this, "state", {
resolveGestures(this, handlers);
this.touchIds = new Set(touchIds(event));
} else if ('pointerId' in event) {
if (event.type === 'pointerup' || event.type === 'pointercancel') this.pointerIds.delete(event.pointerId);else if (event.type === 'pointerdown') this.pointerIds.add(event.pointerId);
applyHandlers(handlers, nativeHandlers) {
this.handlers = handlers;
this.nativeHandlers = nativeHandlers;
applyConfig(config, gestureKey) {
this.config = use_gesture_core_esm_parse(config, gestureKey, this.config);
this._targetEventStore.clean();
for (const key of this.gestures) {
this.gestureEventStores[key].clean();
this.gestureTimeoutStores[key].clean();
if (this.config.shared.target) this.bind();
return () => this._targetEventStore.clean();
const sharedConfig = this.config.shared;
if (sharedConfig.target) {
target = sharedConfig.target();
if (sharedConfig.enabled) {
for (const gestureKey of this.gestures) {
const gestureConfig = this.config[gestureKey];
const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);
if (gestureConfig.enabled) {
const Engine = actions_fe213e88_esm_EngineMap.get(gestureKey);
new Engine(this, args, gestureKey).bind(bindFunction);
const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
for (const eventKey in this.nativeHandlers) {
nativeBindFunction(eventKey, '', event => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
for (const handlerProp in props) {
props[handlerProp] = actions_fe213e88_esm_chain(...props[handlerProp]);
if (!target) return props;
for (const handlerProp in props) {
} = parseProp(handlerProp);
this._targetEventStore.add(target, device, '', props[handlerProp], {
function setupGesture(ctrl, gestureKey) {
ctrl.gestures.add(gestureKey);
ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
function resolveGestures(ctrl, internalHandlers) {
if (internalHandlers.drag) setupGesture(ctrl, 'drag');
if (internalHandlers.wheel) setupGesture(ctrl, 'wheel');
if (internalHandlers.scroll) setupGesture(ctrl, 'scroll');
if (internalHandlers.move) setupGesture(ctrl, 'move');
if (internalHandlers.pinch) setupGesture(ctrl, 'pinch');
if (internalHandlers.hover) setupGesture(ctrl, 'hover');
const bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => {
var _options$capture, _options$passive;
const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;
const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;
let handlerProp = isNative ? device : toHandlerProp(device, action, capture);
if (withPassiveOption && passive) handlerProp += 'Passive';
props[handlerProp] = props[handlerProp] || [];
props[handlerProp].push(handler);
const RE_NOT_NATIVE = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;
function sortHandlers(_handlers) {
const actions = new Set();
for (let key in _handlers) {
if (RE_NOT_NATIVE.test(key)) {
actions.add(RegExp.lastMatch);
handlers[key] = _handlers[key];
native[key] = _handlers[key];
return [handlers, native, actions];
function registerGesture(actions, handlers, handlerKey, key, internalHandlers, config) {
if (!actions.has(handlerKey)) return;
if (!EngineMap.has(key)) {
const startKey = handlerKey + 'Start';
const endKey = handlerKey + 'End';
if (state.first && startKey in handlers) handlers[startKey](state);
if (handlerKey in handlers) memo = handlers[handlerKey](state);
if (state.last && endKey in handlers) handlers[endKey](state);
internalHandlers[key] = fn;
config[key] = config[key] || {};
function use_gesture_core_esm_parseMergedHandlers(mergedHandlers, mergedConfig) {
const [handlers, nativeHandlers, actions] = sortHandlers(mergedHandlers);
const internalHandlers = {};
registerGesture(actions, handlers, 'onDrag', 'drag', internalHandlers, mergedConfig);
registerGesture(actions, handlers, 'onWheel', 'wheel', internalHandlers, mergedConfig);
registerGesture(actions, handlers, 'onScroll', 'scroll', internalHandlers, mergedConfig);
registerGesture(actions, handlers, 'onPinch', 'pinch', internalHandlers, mergedConfig);
registerGesture(actions, handlers, 'onMove', 'move', internalHandlers, mergedConfig);
registerGesture(actions, handlers, 'onHover', 'hover', internalHandlers, mergedConfig);
handlers: internalHandlers,
;// CONCATENATED MODULE: ./node_modules/@use-gesture/react/dist/use-gesture-react.esm.js
function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {
const ctrl = external_React_default().useMemo(() => new Controller(handlers), []);
ctrl.applyHandlers(handlers, nativeHandlers);
ctrl.applyConfig(config, gestureKey);
external_React_default().useEffect(ctrl.effect.bind(ctrl));
external_React_default().useEffect(() => {
return ctrl.clean.bind(ctrl);
if (config.target === undefined) {
return ctrl.bind.bind(ctrl);
function useDrag(handler, config) {
actions_fe213e88_esm_registerAction(actions_fe213e88_esm_dragAction);
}, config || {}, 'drag');
function usePinch(handler, config) {
registerAction(pinchAction);
}, config || {}, 'pinch');