Socket
Socket
Sign inDemoInstall

@interactjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/utils - npm Package Compare versions

Comparing version 1.10.26 to 1.10.27

2

arr.js
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
const contains=(e,n)=>-1!==e.indexOf(n),remove=(e,n)=>e.splice(e.indexOf(n),1),merge=(e,n)=>{for(const r of n)e.push(r);return e},from=e=>merge([],e),findIndex=(e,n)=>{for(let r=0;r<e.length;r++)if(n(e[r],r,e))return r;return-1},find=(e,n)=>e[findIndex(e,n)];export{contains,find,findIndex,from,merge,remove};
//# sourceMappingURL=arr.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import domObjects from"./domObjects.prod.js";import is from"./is.prod.js";import"./isWindow.prod.js";import"./window.prod.js";const browser={init:init,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function init(e){const o=domObjects.Element,t=e.navigator||{};browser.supportsTouch="ontouchstart"in e||is.func(e.DocumentTouch)&&domObjects.document instanceof e.DocumentTouch,browser.supportsPointerEvent=!1!==t.pointerEnabled&&!!domObjects.PointerEvent,browser.isIOS=/iP(hone|od|ad)/.test(t.platform),browser.isIOS7=/iP(hone|od|ad)/.test(t.platform)&&/OS 7[^\d]/.test(t.appVersion),browser.isIe9=/MSIE 9/.test(t.userAgent),browser.isOperaMobile="Opera"===t.appName&&browser.supportsTouch&&/Presto/.test(t.userAgent),browser.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",browser.pEventTypes=browser.supportsPointerEvent?domObjects.PointerEvent===e.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,browser.wheelEvent=domObjects.document&&"onmousewheel"in domObjects.document?"mousewheel":"wheel"}export{browser as default};
//# sourceMappingURL=browser.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var center=t=>({x:t.left+(t.right-t.left)/2,y:t.top+(t.bottom-t.top)/2});export{center as default};
//# sourceMappingURL=center.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import{from}from"./arr.prod.js";import is from"./is.prod.js";import"./isWindow.prod.js";import"./window.prod.js";function clone(o){const r={};for(const i in o){const n=o[i];is.plainObject(n)?r[i]=clone(n):is.array(n)?r[i]=from(n):r[i]=n}return r}export{clone as default};
//# sourceMappingURL=clone.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var displace={};export{displace as default};
//# sourceMappingURL=displace.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var displace_stub={};export{displace_stub as default};
//# sourceMappingURL=displace.stub.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
const domObjects={init:init,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function blank(){}function init(e){const n=e;domObjects.document=n.document,domObjects.DocumentFragment=n.DocumentFragment||blank,domObjects.SVGElement=n.SVGElement||blank,domObjects.SVGSVGElement=n.SVGSVGElement||blank,domObjects.SVGElementInstance=n.SVGElementInstance||blank,domObjects.Element=n.Element||blank,domObjects.HTMLElement=n.HTMLElement||domObjects.Element,domObjects.Event=n.Event,domObjects.Touch=n.Touch||blank,domObjects.PointerEvent=n.PointerEvent||n.MSPointerEvent}export{domObjects as default};
//# sourceMappingURL=domObjects.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import browser from"./browser.prod.js";import domObjects from"./domObjects.prod.js";import is from"./is.prod.js";import{window as win,realWindow,getWindow}from"./window.prod.js";import"./isWindow.prod.js";function nodeContains(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function closest(e,t){for(;is.element(e);){if(matchesSelector(e,t))return e;e=parentNode(e)}return null}function parentNode(e){let t=e.parentNode;if(is.docFrag(t)){for(;(t=t.host)&&is.docFrag(t););return t}return t}function matchesSelector(e,t){return win!==realWindow&&(t=t.replace(/\/deep\//g," ")),e[browser.prefixedMatchesSelector](t)}const getParent=e=>e.parentNode||e.host;function indexOfDeepestElement(e){let t,n=[];for(let o=0;o<e.length;o++){const r=e[o],i=e[t];if(!r||o===t)continue;if(!i){t=o;continue}const c=getParent(r),s=getParent(i);if(c===r.ownerDocument)continue;if(s===r.ownerDocument){t=o;continue}if(c===s){zIndexIsHigherThan(r,i)&&(t=o);continue}let l;if(n=n.length?n:getNodeParents(i),i instanceof domObjects.HTMLElement&&r instanceof domObjects.SVGElement&&!(r instanceof domObjects.SVGSVGElement)){if(r===s)continue;l=r.ownerSVGElement}else l=r;const u=getNodeParents(l,i.ownerDocument);let f=0;for(;u[f]&&u[f]===n[f];)f++;const m=[u[f-1],u[f],n[f]];if(m[0]){let e=m[0].lastChild;for(;e;){if(e===m[1]){t=o,n=u;break}if(e===m[2])break;e=e.previousSibling}}}return t}function getNodeParents(e,t){const n=[];let o,r=e;for(;(o=getParent(r))&&r!==t&&o!==r.ownerDocument;)n.unshift(r),r=o;return n}function zIndexIsHigherThan(e,t){return(parseInt(getWindow(e).getComputedStyle(e).zIndex,10)||0)>=(parseInt(getWindow(t).getComputedStyle(t).zIndex,10)||0)}function matchesUpTo(e,t,n){for(;is.element(e);){if(matchesSelector(e,t))return!0;if((e=parentNode(e))===n)return matchesSelector(e,t)}return!1}function getActualElement(e){return e.correspondingUseElement||e}function getScrollXY(e){return{x:(e=e||win).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}function getElementClientRect(e){const t=e instanceof domObjects.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function getElementRect(e){const t=getElementClientRect(e);if(!browser.isIOS7&&t){const n=getScrollXY(getWindow(e));t.left+=n.x,t.right+=n.x,t.top+=n.y,t.bottom+=n.y}return t}function getPath(e){const t=[];for(;e;)t.push(e),e=parentNode(e);return t}function trySelector(e){return!!is.string(e)&&(domObjects.document.querySelector(e),!0)}export{closest,getActualElement,getElementClientRect,getElementRect,getPath,getScrollXY,indexOfDeepestElement,matchesSelector,matchesUpTo,nodeContains,parentNode,trySelector};
//# sourceMappingURL=domUtils.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var ElementState={};export{ElementState as default};
//# sourceMappingURL=ElementState.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var ElementState_stub={};export{ElementState_stub as default};
//# sourceMappingURL=ElementState.stub.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var exchange={};export{exchange as default};
//# sourceMappingURL=exchange.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var exchange_stub={};export{exchange_stub as default};
//# sourceMappingURL=exchange.stub.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
function extend(e,n){for(const t in n)e[t]=n[t];return e}export{extend as default};
//# sourceMappingURL=extend.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import{resolveRectLike,rectToXY}from"./rect.prod.js";import"./domUtils.prod.js";import"./browser.prod.js";import"./domObjects.prod.js";import"./is.prod.js";import"./isWindow.prod.js";import"./window.prod.js";import"./extend.prod.js";function getOriginXY(o,r,i){const t=i&&o.options[i],e=t&&t.origin||o.options.origin,p=resolveRectLike(e,o,r,[o&&r]);return rectToXY(p)||{x:0,y:0}}export{getOriginXY as default};
//# sourceMappingURL=getOriginXY.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var hypot=(t,a)=>Math.sqrt(t*t+a*a);export{hypot as default};
//# sourceMappingURL=hypot.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import isWindow from"./isWindow.prod.js";import{window as win,getWindow}from"./window.prod.js";const window=o=>o===win||isWindow(o),docFrag=o=>object(o)&&11===o.nodeType,object=o=>!!o&&"object"==typeof o,func=o=>"function"==typeof o,number=o=>"number"==typeof o,bool=o=>"boolean"==typeof o,string=o=>"string"==typeof o,element=o=>{if(!o||"object"!=typeof o)return!1;const e=getWindow(o)||win;return/object|function/.test(typeof Element)?o instanceof Element||o instanceof e.Element:1===o.nodeType&&"string"==typeof o.nodeName},plainObject=o=>object(o)&&!!o.constructor&&/function Object\b/.test(o.constructor.toString()),array=o=>object(o)&&void 0!==o.length&&func(o.splice);var is={window:window,docFrag:docFrag,object:object,func:func,number:number,bool:bool,string:string,element:element,plainObject:plainObject,array:array};export{is as default};
//# sourceMappingURL=is.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
function isNonNativeEvent(e,n){if(n.phaselessTypes[e])return!0;for(const t in n.map)if(0===e.indexOf(t)&&e.substr(t.length)in n.phases)return!0;return!1}export{isNonNativeEvent as default};
//# sourceMappingURL=isNonNativeEvent.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
var isWindow=i=>!(!i||!i.Window)&&i instanceof i.Window;export{isWindow as default};
//# sourceMappingURL=isWindow.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import{window as win}from"./window.prod.js";import"./isWindow.prod.js";function warnOnce(n,o){let i=!1;return function(){return i||(win.console.warn(o),i=!0),n.apply(this,arguments)}}function copyAction(n,o){return n.name=o.name,n.axis=o.axis,n.edges=o.edges,n}const sign=n=>n>=0?1:-1;export{copyAction,sign,warnOnce};
//# sourceMappingURL=misc.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import is from"./is.prod.js";import"./isWindow.prod.js";import"./window.prod.js";function normalize(i,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i=>!0,s=arguments.length>3?arguments[3]:void 0;if(s=s||{},is.string(i)&&-1!==i.search(" ")&&(i=split(i)),is.array(i))return i.forEach((i=>normalize(i,r,o,s))),s;if(is.object(i)&&(r=i,i=""),is.func(r)&&o(i))s[i]=s[i]||[],s[i].push(r);else if(is.array(r))for(const t of r)normalize(i,t,o,s);else if(is.object(r))for(const t in r){normalize(split(t).map((r=>`${i}${r}`)),r[t],o,s)}return s}function split(i){return i.trim().split(/ +/)}export{normalize as default};
//# sourceMappingURL=normalizeListeners.prod.js.map
{
"name": "@interactjs/utils",
"version": "1.10.26",
"version": "1.10.27",
"type": "module",

@@ -16,3 +16,3 @@ "repository": {

"license": "MIT",
"gitHead": "6e7a136f"
"gitHead": "3ace1cad"
}
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
const VENDOR_PREFIXES=["webkit","moz"];function pointerExtend(e,t){e.__set||(e.__set={});for(const n in t)VENDOR_PREFIXES.some((e=>0===n.indexOf(e)))||"function"!=typeof e[n]&&"__set"!==n&&Object.defineProperty(e,n,{get:()=>n in e.__set?e.__set[n]:e.__set[n]=t[n],set(t){e.__set[n]=t},configurable:!0});return e}export{pointerExtend as default};
//# sourceMappingURL=pointerExtend.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import browser from"./browser.prod.js";import domObjects from"./domObjects.prod.js";import{getActualElement}from"./domUtils.prod.js";import hypot from"./hypot.prod.js";import is from"./is.prod.js";export{default as pointerExtend}from"./pointerExtend.prod.js";import"./window.prod.js";import"./isWindow.prod.js";function copyCoords(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function setCoordDeltas(t,e,o){t.page.x=o.page.x-e.page.x,t.page.y=o.page.y-e.page.y,t.client.x=o.client.x-e.client.x,t.client.y=o.client.y-e.client.y,t.timeStamp=o.timeStamp-e.timeStamp}function setCoordVelocity(t,e){const o=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/o,t.page.y=e.page.y/o,t.client.x=e.client.x/o,t.client.y=e.client.y/o,t.timeStamp=o}function setZeroCoords(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function isNativePointer(t){return t instanceof domObjects.Event||t instanceof domObjects.Touch}function getXY(t,e,o){return t=t||"page",(o=o||{}).x=e[t+"X"],o.y=e[t+"Y"],o}function getPageXY(t,e){return e=e||{x:0,y:0},browser.isOperaMobile&&isNativePointer(t)?(getXY("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):getXY("page",t,e),e}function getClientXY(t,e){return e=e||{},browser.isOperaMobile&&isNativePointer(t)?getXY("screen",t,e):getXY("client",t,e),e}function getPointerId(t){return is.number(t.pointerId)?t.pointerId:t.identifier}function setCoords(t,e,o){const n=e.length>1?pointerAverage(e):e[0];getPageXY(n,t.page),getClientXY(n,t.client),t.timeStamp=o}function getTouchPair(t){const e=[];return is.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function pointerAverage(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const o of t)for(const t in e)e[t]+=o[t];for(const o in e)e[o]/=t.length;return e}function touchBBox(t){if(!t.length)return null;const e=getTouchPair(t),o=Math.min(e[0].pageX,e[1].pageX),n=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:o,y:n,left:o,top:n,right:r,bottom:i,width:r-o,height:i-n}}function touchDistance(t,e){const o=e+"X",n=e+"Y",r=getTouchPair(t),i=r[0][o]-r[1][o],c=r[0][n]-r[1][n];return hypot(i,c)}function touchAngle(t,e){const o=e+"X",n=e+"Y",r=getTouchPair(t),i=r[1][o]-r[0][o],c=r[1][n]-r[0][n];return 180*Math.atan2(c,i)/Math.PI}function getPointerType(t){return is.string(t.pointerType)?t.pointerType:is.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof domObjects.Touch?"touch":"mouse"}function getEventTargets(t){const e=is.func(t.composedPath)?t.composedPath():t.path;return[getActualElement(e?e[0]:t.target),getActualElement(t.currentTarget)]}function newCoords(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function coordsToEvent(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault(){}}}export{coordsToEvent,copyCoords,getClientXY,getEventTargets,getPageXY,getPointerId,getPointerType,getTouchPair,getXY,isNativePointer,newCoords,pointerAverage,setCoordDeltas,setCoordVelocity,setCoords,setZeroCoords,touchAngle,touchBBox,touchDistance};
//# sourceMappingURL=pointerUtils.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
let request,cancel,lastTime=0;function init(e){if(request=e.requestAnimationFrame,cancel=e.cancelAnimationFrame,!request){const t=["ms","moz","webkit","o"];for(const n of t)request=e[n+"RequestAnimationFrame"],cancel=e[n+"CancelAnimationFrame"]||e[n+"CancelRequestAnimationFrame"]}request=request&&request.bind(e),cancel=cancel&&cancel.bind(e),request||(request=t=>{const n=Date.now(),a=Math.max(0,16-(n-lastTime)),r=e.setTimeout((()=>{t(n+a)}),a);return lastTime=n+a,r},cancel=e=>clearTimeout(e))}var raf={request(e){return request(e)},cancel(e){return cancel(e)},init:init};export{raf as default};
//# sourceMappingURL=raf.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import{parentNode,closest,getElementRect}from"./domUtils.prod.js";import extend from"./extend.prod.js";import is from"./is.prod.js";import"./browser.prod.js";import"./domObjects.prod.js";import"./window.prod.js";import"./isWindow.prod.js";function getStringOptionResult(t,o,e){return"parent"===t?parentNode(e):"self"===t?o.getRect(e):closest(e,t)}function resolveRectLike(t,o,e,i){let r=t;return is.string(r)?r=getStringOptionResult(r,o,e):is.func(r)&&(r=r(...i)),is.element(r)&&(r=getElementRect(r)),r}function toFullRect(t){var o,e;const{top:i,left:r,bottom:n,right:l}=t;return{top:i,left:r,bottom:n,right:l,width:null!=(o=t.width)?o:t.right-t.left,height:null!=(e=t.height)?e:t.bottom-t.top}}function rectToXY(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function xywhToTlbr(t){return!t||"left"in t&&"top"in t||((t=extend({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t}function tlbrToXywh(t){return!t||"x"in t&&"y"in t||((t=extend({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function addEdges(t,o,e){t.left&&(o.left+=e.x),t.right&&(o.right+=e.x),t.top&&(o.top+=e.y),t.bottom&&(o.bottom+=e.y),o.width=o.right-o.left,o.height=o.bottom-o.top}export{addEdges,getStringOptionResult,rectToXY,resolveRectLike,tlbrToXywh,toFullRect,xywhToTlbr};
//# sourceMappingURL=rect.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
function shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(const n of r)if(t[n]!==e[n])return!1;return!0}export{shallowEqual as default};
//# sourceMappingURL=shallowEqual.prod.js.map
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import isWindow from"./isWindow.prod.js";let realWindow,win;function init(n){realWindow=n;const i=n.document.createTextNode("");i.ownerDocument!==n.document&&"function"==typeof n.wrap&&n.wrap(i)===i&&(n=n.wrap(n)),win=n}function getWindow(n){if(isWindow(n))return n;return(n.ownerDocument||n).defaultView||win.window}"undefined"!=typeof window&&window&&init(window);export{getWindow,init,realWindow,win as window};
//# sourceMappingURL=window.prod.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc