shorter-js
Advanced tools
Comparing version 0.3.0-alpha13 to 0.3.0-alpha14
/*! | ||
* shorter-js v0.3.0alpha13 (https://github.com/thednp/shorter-js) | ||
* shorter-js v0.3.0alpha14 (https://github.com/thednp/shorter-js) | ||
* Copyright 2019-2022 © dnp_theme | ||
@@ -61,55 +61,2 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE) | ||
/** | ||
* A global namespace for all browser native events. | ||
* @type {string[]} | ||
*/ | ||
const nativeEvents = [ | ||
'click', | ||
'dblclick', | ||
'mouseup', | ||
'mousedown', | ||
'contextmenu', | ||
'mousewheel', | ||
'DOMMouseScroll', | ||
'mouseover', | ||
'mouseout', | ||
'mousemove', | ||
'selectstart', | ||
'selectend', | ||
'keydown', | ||
'keypress', | ||
'keyup', | ||
'orientationchange', | ||
'touchstart', | ||
'touchmove', | ||
'touchend', | ||
'touchcancel', | ||
'pointercancel', | ||
'pointerdown', | ||
'pointerleave', | ||
'pointermove', | ||
'pointerup', | ||
'gesturestart', | ||
'gesturechange', | ||
'gestureend', | ||
'focus', | ||
'blur', | ||
'change', | ||
'reset', | ||
'select', | ||
'submit', | ||
'focusin', | ||
'focusout', | ||
'load', | ||
'unload', | ||
'beforeunload', | ||
'resize', | ||
'move', | ||
'DOMContentLoaded', | ||
'readystatechange', | ||
'error', | ||
'abort', | ||
'scroll', | ||
]; | ||
/** | ||
* A global namespace for `abort` event. | ||
@@ -121,12 +68,12 @@ * @type {string} | ||
/** | ||
* A global namespace for `blur` event. | ||
* A global namespace for `beforeunload` event. | ||
* @type {string} | ||
*/ | ||
const blurEvent = 'blur'; | ||
const beforeunloadEvent = 'beforeunload'; | ||
/** | ||
* A global namespace for `move` event. | ||
* A global namespace for `blur` event. | ||
* @type {string} | ||
*/ | ||
const moveEvent = 'move'; | ||
const blurEvent = 'blur'; | ||
@@ -140,112 +87,86 @@ /** | ||
/** | ||
* A global namespace for `error` event. | ||
* A global namespace for `contextmenu` event. | ||
* @type {string} | ||
*/ | ||
const errorEvent = 'error'; | ||
const contextmenuEvent = 'contextmenu'; | ||
/** | ||
* A global namespace for `reset` event. | ||
* A global namespace for `DOMContentLoaded` event. | ||
* @type {string} | ||
*/ | ||
const resetEvent = 'reset'; | ||
const DOMContentLoadedEvent = 'DOMContentLoaded'; | ||
/** | ||
* A global namespace for `resize` event. | ||
* A global namespace for `DOMMouseScroll` event. | ||
* @type {string} | ||
*/ | ||
const resizeEvent = 'resize'; | ||
const DOMMouseScrollEvent = 'DOMMouseScroll'; | ||
/** | ||
* A global namespace for `scroll` event. | ||
* A global namespace for `error` event. | ||
* @type {string} | ||
*/ | ||
const scrollEvent = 'scroll'; | ||
const errorEvent = 'error'; | ||
/** | ||
* A global namespace for `submit` event. | ||
* A global namespace for `focus` event. | ||
* @type {string} | ||
*/ | ||
const submitEvent = 'submit'; | ||
const focusEvent = 'focus'; | ||
/** | ||
* A global namespace for `load` event. | ||
* A global namespace for `focusin` event. | ||
* @type {string} | ||
*/ | ||
const loadEvent = 'load'; | ||
const focusinEvent = 'focusin'; | ||
/** | ||
* A global namespace for `unload` event. | ||
* A global namespace for `focusout` event. | ||
* @type {string} | ||
*/ | ||
const unloadEvent = 'unload'; | ||
const focusoutEvent = 'focusout'; | ||
/** | ||
* A global namespace for `readystatechange` event. | ||
* A global namespace for `gesturechange` event. | ||
* @type {string} | ||
*/ | ||
const readystatechangeEvent = 'readystatechange'; | ||
const gesturechangeEvent = 'gesturechange'; | ||
/** | ||
* A global namespace for `beforeunload` event. | ||
* A global namespace for `gestureend` event. | ||
* @type {string} | ||
*/ | ||
const beforeunloadEvent = 'beforeunload'; | ||
const gestureendEvent = 'gestureend'; | ||
/** | ||
* A global namespace for `orientationchange` event. | ||
* A global namespace for `gesturestart` event. | ||
* @type {string} | ||
*/ | ||
const orientationchangeEvent = 'orientationchange'; | ||
const gesturestartEvent = 'gesturestart'; | ||
/** | ||
* A global namespace for `contextmenu` event. | ||
* A global namespace for `keydown` event. | ||
* @type {string} | ||
*/ | ||
const contextmenuEvent = 'contextmenu'; | ||
const keydownEvent = 'keydown'; | ||
/** | ||
* A global namespace for `DOMContentLoaded` event. | ||
* A global namespace for `keypress` event. | ||
* @type {string} | ||
*/ | ||
const DOMContentLoadedEvent = 'DOMContentLoaded'; | ||
const keypressEvent = 'keypress'; | ||
/** | ||
* A global namespace for `DOMMouseScroll` event. | ||
* A global namespace for `keyup` event. | ||
* @type {string} | ||
*/ | ||
const DOMMouseScrollEvent = 'DOMMouseScroll'; | ||
const keyupEvent = 'keyup'; | ||
/** | ||
* A global namespace for `select` event. | ||
* A global namespace for `load` event. | ||
* @type {string} | ||
*/ | ||
const selectEvent = 'select'; | ||
const loadEvent = 'load'; | ||
/** | ||
* A global namespace for the `selectend` event. | ||
* @type {string} | ||
*/ | ||
const selectendEvent = 'selectend'; | ||
/** | ||
* A global namespace for the `selectstart` event. | ||
* @type {string} | ||
*/ | ||
const selectstartEvent = 'selectstart'; | ||
/** | ||
* A global namespace for mouse events equivalent to touch events. | ||
* @type {Record<string, string>} | ||
*/ | ||
const mouseSwipeEvents = { | ||
start: 'mousedown', end: 'mouseup', move: 'mousemove', cancel: 'mouseleave', | ||
}; | ||
/** | ||
* A global namespace for mouse click events. | ||
* @type {Record<string, string>} | ||
*/ | ||
const mouseClickEvents = { down: 'mousedown', up: 'mouseup' }; | ||
/** | ||
* A global namespace for `click` event. | ||
@@ -281,8 +202,2 @@ * @type {string} | ||
/** | ||
* A global namespace for mouse hover events. | ||
* @type {[string, string]} | ||
*/ | ||
const mouseHoverEvents = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout']; | ||
/** | ||
* A global namespace for `mouseenter` event. | ||
@@ -312,2 +227,8 @@ * @type {string} | ||
/** | ||
* A global namespace for `mouseover` event. | ||
* @type {string} | ||
*/ | ||
const mouseoverEvent = 'mouseover'; | ||
/** | ||
* A global namespace for `mousemove` event. | ||
@@ -325,106 +246,212 @@ * @type {string} | ||
/** | ||
* A global namespace for touch events. | ||
* @type {Record<string, string>} | ||
* A global namespace for `move` event. | ||
* @type {string} | ||
*/ | ||
const touchEvents = { | ||
start: 'touchstart', end: 'touchend', move: 'touchmove', cancel: 'touchcancel', | ||
}; | ||
const moveEvent = 'move'; | ||
/** | ||
* A global namespace for `touchstart` event. | ||
* A global namespace for `orientationchange` event. | ||
* @type {string} | ||
*/ | ||
const touchstartEvent = 'touchstart'; | ||
const orientationchangeEvent = 'orientationchange'; | ||
/** | ||
* A global namespace for `touchmove` event. | ||
* A global namespace for `pointercancel` event. | ||
* @type {string} | ||
*/ | ||
const touchmoveEvent = 'touchmove'; | ||
const pointercancelEvent = 'pointercancel'; | ||
/** | ||
* A global namespace for `touchcancel` event. | ||
* A global namespace for `pointerdown` event. | ||
* @type {string} | ||
*/ | ||
const touchcancelEvent = 'touchcancel'; | ||
const pointerdownEvent = 'pointerdown'; | ||
/** | ||
* A global namespace for `touchend` event. | ||
* A global namespace for `pointerleave` event. | ||
* @type {string} | ||
*/ | ||
const touchendEvent = 'touchend'; | ||
const pointerleaveEvent = 'pointerleave'; | ||
/** | ||
* A global namespace for `pointercancel` event. | ||
* A global namespace for `pointermove` event. | ||
* @type {string} | ||
*/ | ||
const pointercancelEvent = 'pointercancel'; | ||
const pointermoveEvent = 'pointermove'; | ||
/** | ||
* A global namespace for `pointerdown` event. | ||
* A global namespace for `pointerup` event. | ||
* @type {string} | ||
*/ | ||
const pointerdownEvent = 'pointerdown'; | ||
const pointerupEvent = 'pointerup'; | ||
/** | ||
* A global namespace for `pointerleave` event. | ||
* A global namespace for `readystatechange` event. | ||
* @type {string} | ||
*/ | ||
const pointerleaveEvent = 'pointerleave'; | ||
const readystatechangeEvent = 'readystatechange'; | ||
/** | ||
* A global namespace for `pointermove` event. | ||
* A global namespace for `reset` event. | ||
* @type {string} | ||
*/ | ||
const pointermoveEvent = 'pointermove'; | ||
const resetEvent = 'reset'; | ||
/** | ||
* A global namespace for `pointerup` event. | ||
* A global namespace for `resize` event. | ||
* @type {string} | ||
*/ | ||
const pointerupEvent = 'pointerup'; | ||
const resizeEvent = 'resize'; | ||
/** | ||
* A global namespace for focus event names. | ||
* @type {{in: string, out: string}} | ||
* A global namespace for `select` event. | ||
* @type {string} | ||
*/ | ||
const focusEvents = { in: 'focusin', out: 'focusout' }; | ||
const selectEvent = 'select'; | ||
/** | ||
* A global namespace for `focus` event. | ||
* A global namespace for the `selectend` event. | ||
* @type {string} | ||
*/ | ||
const focusEvent = 'focus'; | ||
const selectendEvent = 'selectend'; | ||
/** | ||
* A global namespace for `focusin` event. | ||
* A global namespace for the `selectstart` event. | ||
* @type {string} | ||
*/ | ||
const focusinEvent = 'focusin'; | ||
const selectstartEvent = 'selectstart'; | ||
/** | ||
* A global namespace for `focusout` event. | ||
* A global namespace for `scroll` event. | ||
* @type {string} | ||
*/ | ||
const focusoutEvent = 'focusout'; | ||
const scrollEvent = 'scroll'; | ||
/** | ||
* A global namespace for `gesturechange` event. | ||
* A global namespace for `submit` event. | ||
* @type {string} | ||
*/ | ||
const gesturechangeEvent = 'gesturechange'; | ||
const submitEvent = 'submit'; | ||
/** | ||
* A global namespace for `gestureend` event. | ||
* A global namespace for `touchstart` event. | ||
* @type {string} | ||
*/ | ||
const gestureendEvent = 'gestureend'; | ||
const touchstartEvent = 'touchstart'; | ||
/** | ||
* A global namespace for `gesturestart` event. | ||
* A global namespace for `touchmove` event. | ||
* @type {string} | ||
*/ | ||
const gesturestartEvent = 'gesturestart'; | ||
const touchmoveEvent = 'touchmove'; | ||
/** | ||
* A global namespace for `touchcancel` event. | ||
* @type {string} | ||
*/ | ||
const touchcancelEvent = 'touchcancel'; | ||
/** | ||
* A global namespace for `touchend` event. | ||
* @type {string} | ||
*/ | ||
const touchendEvent = 'touchend'; | ||
/** | ||
* A global namespace for `unload` event. | ||
* @type {string} | ||
*/ | ||
const unloadEvent = 'unload'; | ||
/** | ||
* A global namespace for all browser native events. | ||
*/ | ||
const nativeEvents = { | ||
DOMContentLoaded: DOMContentLoadedEvent, | ||
DOMMouseScroll: DOMMouseScrollEvent, | ||
abort: abortEvent, | ||
beforeunload: beforeunloadEvent, | ||
blur: blurEvent, | ||
change: changeEvent, | ||
click: mouseclickEvent, | ||
contextmenu: contextmenuEvent, | ||
dblclick: mousedblclickEvent, | ||
error: errorEvent, | ||
focus: focusEvent, | ||
focusin: focusinEvent, | ||
focusout: focusoutEvent, | ||
gesturechange: gesturechangeEvent, | ||
gestureend: gestureendEvent, | ||
gesturestart: gesturestartEvent, | ||
hover: mousehoverEvent, | ||
keydown: keydownEvent, | ||
keypress: keypressEvent, | ||
keyup: keyupEvent, | ||
load: loadEvent, | ||
mousedown: mousedownEvent, | ||
mousemove: mousemoveEvent, | ||
mousein: mouseinEvent, | ||
mouseout: mouseoutEvent, | ||
mouseenter: mouseenterEvent, | ||
mouseleave: mouseleaveEvent, | ||
mouseover: mouseoverEvent, | ||
mouseup: mouseupEvent, | ||
mousewheel: mousewheelEvent, | ||
move: moveEvent, | ||
orientationchange: orientationchangeEvent, | ||
pointercancel: pointercancelEvent, | ||
pointerdown: pointerdownEvent, | ||
pointerleave: pointerleaveEvent, | ||
pointermove: pointermoveEvent, | ||
pointerup: pointerupEvent, | ||
readystatechange: readystatechangeEvent, | ||
reset: resetEvent, | ||
resize: resizeEvent, | ||
scroll: scrollEvent, | ||
select: selectEvent, | ||
selectend: selectendEvent, | ||
selectstart: selectstartEvent, | ||
submit: submitEvent, | ||
touchcancel: touchcancelEvent, | ||
touchend: touchendEvent, | ||
touchmove: touchmoveEvent, | ||
touchstart: touchstartEvent, | ||
unload: unloadEvent, | ||
}; | ||
/** | ||
* A global namespace for mouse events equivalent to touch events. | ||
* @type {Record<string, string>} | ||
*/ | ||
const mouseSwipeEvents = { | ||
start: 'mousedown', end: 'mouseup', move: 'mousemove', cancel: 'mouseleave', | ||
}; | ||
/** | ||
* A global namespace for mouse click events. | ||
* @type {Record<string, string>} | ||
*/ | ||
const mouseClickEvents = { down: 'mousedown', up: 'mouseup' }; | ||
/** | ||
* A global namespace for mouse hover events. | ||
* @type {[string, string]} | ||
*/ | ||
const mouseHoverEvents = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout']; | ||
/** | ||
* A global namespace for touch events. | ||
* @type {Record<string, string>} | ||
*/ | ||
const touchEvents = { | ||
start: 'touchstart', end: 'touchend', move: 'touchmove', cancel: 'touchcancel', | ||
}; | ||
/** | ||
* A global namespace for focus event names. | ||
* @type {{in: string, out: string}} | ||
*/ | ||
const focusEvents = { in: 'focusin', out: 'focusout' }; | ||
/** | ||
* A global namespace for keyboard event keys. | ||
@@ -456,20 +483,2 @@ * @type {Record<string, string>} | ||
/** | ||
* A global namespace for `keydown` event. | ||
* @type {string} | ||
*/ | ||
const keydownEvent = 'keydown'; | ||
/** | ||
* A global namespace for `keyup` event. | ||
* @type {string} | ||
*/ | ||
const keyupEvent = 'keyup'; | ||
/** | ||
* A global namespace for `keypress` event. | ||
* @type {string} | ||
*/ | ||
const keypressEvent = 'keypress'; | ||
/** | ||
* A global namespace for `Alt` key. | ||
@@ -754,8 +763,8 @@ * @type {string} e.which = 18 | ||
// @ts-ignore | ||
const { userAgentData: userAgentDATA } = navigator; | ||
const { userAgentData: uaDATA } = navigator; | ||
/** | ||
* A global namespace for `userAgentData` event. | ||
* A global namespace for `userAgentData` object. | ||
*/ | ||
const userAgentData = userAgentDATA; | ||
const userAgentData = uaDATA; | ||
@@ -814,6 +823,6 @@ const { userAgent: userAgentString } = navigator; | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -826,8 +835,8 @@ function on(element, eventName, handler, options) { | ||
/** | ||
* Remove eventListener from an `Element` | `HTMLElement` | `Document` target. | ||
* Remove eventListener from an `Element` | `HTMLElement` | `Document` | `Window` target. | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -840,9 +849,9 @@ function off(element, eventName, handler, options) { | ||
/** | ||
* Add an `eventListener` to an `Element` | `HTMLElement` | `Document` target | ||
* and remove it once callback is called. | ||
* Add an `eventListener` to an `Element` | `HTMLElement` | `Document` | `Window` | ||
* target and remove it once callback is called. | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -852,5 +861,5 @@ function one(element, eventName, handler, options) { | ||
* Wrap the handler for easy on -> off | ||
* @param {Event} e the Event object | ||
* @type {EventListenerObject['handleEvent']} | ||
*/ | ||
function handlerWrapper(e) { | ||
const handlerWrapper = (e) => { | ||
if (e.target === element) { | ||
@@ -860,3 +869,3 @@ handler.apply(element, [e]); | ||
} | ||
} | ||
}; | ||
on(element, eventName, handlerWrapper, options); | ||
@@ -1565,2 +1574,3 @@ } | ||
* A global namespace for most scroll event listeners. | ||
* @type {Partial<AddEventListenerOptions>} | ||
*/ | ||
@@ -1571,2 +1581,3 @@ const passiveHandler$1 = { passive: true }; | ||
* A global namespace for most scroll event listeners in legacy browsers. | ||
* @type {Partial<AddEventListenerOptions> | boolean} | ||
*/ | ||
@@ -2094,3 +2105,3 @@ const passiveHandler = supportPassive ? { passive: true } : false; | ||
var version = "0.3.0alpha13"; | ||
var version = "0.3.0alpha14"; | ||
@@ -2149,2 +2160,3 @@ // @ts-ignore | ||
mouseoutEvent, | ||
mouseoverEvent, | ||
mousemoveEvent, | ||
@@ -2151,0 +2163,0 @@ mousewheelEvent, |
@@ -1,2 +0,2 @@ | ||
// shorter-js v0.3.0alpha13 | dnp_theme © 2022 | MIT-License | ||
const e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",o="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",i="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",a="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",r="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",c="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:u}=navigator,l=u,{userAgent:m}=navigator,d=m,g=/iPhone|iPad|iPod|Android/i;let E=!1;E=l?l.brands.some(e=>g.test(e.brand)):g.test(d);const f=E,p=/(iPhone|iPod|iPad)/,y=l?l.brands.some(e=>p.test(e.brand)):p.test(d),v=!!d&&d.includes("Firefox"),{head:b}=document,h="webkitPerspective"in b.style||"perspective"in b.style;function w(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function A(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function k(e,t,n,o){w(e,t,(function i(a){a.target===e&&(n.apply(e,[a]),A(e,t,i,o))}),o)}const L=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});k(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),D="webkitTransform"in b.style||"transform"in b.style,T="ontouchstart"in window||"msMaxTouchPoints"in navigator,N="webkitAnimation"in b.style||"animation"in b.style,S="webkitTransition"in b.style||"transition"in b.style;function M(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const C=[Document,Node,Element,HTMLElement],O=[Element,HTMLElement];function z(e,t){const n="string"==typeof e,o=t&&C.some(e=>t instanceof e)?t:M();return!n&&[...O].some(t=>e instanceof t)?e:n?o.querySelector(e):null}const H=new Map,I={set:(e,t,n)=>{const o=z(e);if(!o)return;H.has(t)||H.set(t,new Map);H.get(t).set(o,n)},getAllFor:e=>H.get(e)||null,get:(e,t)=>{const n=z(e),o=I.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=z(e),o=H.get(t);o&&n&&(o.delete(n),0===o.size&&H.delete(t))}};function P(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function x(e){const t=P(e,"animationName"),n=P(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function F(e){const t=P(e,"animationName"),n=P(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function B(e){const t=P(e,o),i=P(e,n),a=i.includes("ms")?1:1e3,r=N&&t&&"none"!==t?parseFloat(i)*a:0;return Number.isNaN(r)?0:r}function R(e){const n=P(e,o),i=P(e,t),a=i.includes("ms")?1:1e3,r=N&&n&&"none"!==n?parseFloat(i)*a:0;return Number.isNaN(r)?0:r}function W(e){const t=P(e,"transitionProperty"),n=P(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Q(e){const t=P(e,"transitionProperty"),n=P(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function V(e){const t=P(e,c),n=P(e,r),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){const t=P(e,c),n=P(e,a),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const U=e=>Object.keys(e);const G=(e,t)=>Object.assign(e,t),K=!!L&&{passive:!0},X=new Map;function $(e,t){const{width:n,height:o,top:i,right:a,bottom:r,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:r/u,left:s/c,x:s/c,y:i/u}}function Y(e){return M(e).documentElement}function Z(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const J=e=>e instanceof Z(e).ShadowRoot||e instanceof ShadowRoot;function _(e){const{width:t,height:n}=$(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}const ee=e=>e&&!!e.shadowRoot;const te={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:t,animationDelay:"animationDelay",animationDelayLegacy:n,animationName:"animationName",animationNameLegacy:o,animationEndEvent:"animationend",animationEndEventLegacy:i,transitionDuration:"transitionDuration",transitionDurationLegacy:a,transitionDelay:"transitionDelay",transitionDelayLegacy:r,transitionEndEvent:"transitionend",transitionEndEventLegacy:s,transitionProperty:"transitionProperty",transitionPropertyLegacy:c,isMobile:f,isApple:y,isFirefox:v,support3DTransform:h,supportPassive:L,supportTransform:D,supportTouch:T,supportAnimation:N,supportTransition:S,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:l,userAgent:d,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:w,off:A,one:k,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:I,Timer:{set:(e,t,n,o)=>{const i=z(e);if(i)if(o&&o.length){X.has(i)||X.set(i,new Map);X.get(i).set(o,setTimeout(t,n))}else X.set(i,setTimeout(t,n))},get:(e,t)=>{const n=z(e);if(!n)return null;const o=X.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=z(e);if(n)if(t&&t.length){const e=X.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&X.delete(n))}else clearTimeout(X.get(n)),X.delete(n)}},getInstance:(e,t)=>I.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=F(e),a=x(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",r),n=1)};e.addEventListener("animationend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(i),a=R(e),r=B(e);if(N&&a){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(i,s),n=1)};e.addEventListener(i,s),setTimeout(()=>{n||e.dispatchEvent(o)},a+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=Q(e),a=W(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",r),n=1)};e.addEventListener("transitionend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(s),i=j(e),a=V(e);if(S&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,r),n=1)};e.addEventListener(s,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=$(e),{clientHeight:o}=Y(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=$(e,!0),{clientWidth:a,clientHeight:r}=Y(e);return t>=0&&n>=0&&o<=r&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:K,getElementAnimationDuration:F,getElementAnimationDurationLegacy:R,getElementAnimationDelay:x,getElementAnimationDelayLegacy:B,getElementTransitionDuration:Q,getElementTransitionDurationLegacy:j,getElementTransitionDelay:W,getElementTransitionDelayLegacy:V,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(J(e)?e.host:null)||Y(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=$(e,o&&_(t)),a={x:0,y:0};if(o){const e=$(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:Z,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:ee,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:_,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:J,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===Y(e).dir,elementNodes:O,parentNodes:C,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:z,getCustomElements:function(e){return[...(e&&C.some(t=>e instanceof t)?e:M()).querySelectorAll("*")].filter(ee)},querySelectorAll:function(e,t){return(t&&C.some(e=>t instanceof e)?t:M()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&C.some(e=>t instanceof e)?t:M()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&C.some(e=>t instanceof e)?t:M()).getElementsByTagName(e)},normalizeValue:q,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},r={};return U(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;r[t]=q(i[e])}),U(n).forEach(e=>{n[e]=q(n[e])}),U(t).forEach(e=>{a[e]=e in n?n[e]:e in r?r[e]:t[e]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:G,ObjectKeys:U,ObjectValues:e=>Object.values(e),getBoundingClientRect:$,getDocument:M,getDocumentBody:function(e){return M(e).body},getDocumentElement:Y,getDocumentHead:function(e){return M(e).head},getElementStyle:P,setElementStyle:(e,t)=>{G(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>e.hasAttributeNS(n||null,t),getAttribute:(e,t)=>e.getAttribute(t),getAttributeNS:(e,t,n)=>e.getAttributeNS(n||null,t),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>e.setAttributeNS(o||null,t,n),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>e.removeAttributeNS(n||null,t),Version:"0.3.0alpha13"};export{te as default}; | ||
// shorter-js v0.3.0alpha14 | dnp_theme © 2022 | MIT-License | ||
const e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",o="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",a="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",s="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",c="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",u="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:l}=navigator,m=l,{userAgent:d}=navigator,g=d,f=/iPhone|iPad|iPod|Android/i;let v=!1;v=m?m.brands.some(e=>f.test(e.brand)):f.test(g);const E=v,p=/(iPhone|iPod|iPad)/,y=m?m.brands.some(e=>p.test(e.brand)):p.test(g),b=!!g&&g.includes("Firefox"),{head:h}=document,w="webkitPerspective"in h.style||"perspective"in h.style;function A(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function k(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=a=>{a.target===e&&(n.apply(e,[a]),k(e,t,i,o))};A(e,t,i,o)}const D=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});L(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),T="webkitTransform"in h.style||"transform"in h.style,N="ontouchstart"in window||"msMaxTouchPoints"in navigator,S="webkitAnimation"in h.style||"animation"in h.style,M="webkitTransition"in h.style||"transition"in h.style;function C(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const O=[Document,Node,Element,HTMLElement],z=[Element,HTMLElement];function H(e,t){const n="string"==typeof e,o=t&&O.some(e=>t instanceof e)?t:C();return!n&&[...z].some(t=>e instanceof t)?e:n?o.querySelector(e):null}const I=new Map,P={set:(e,t,n)=>{const o=H(e);if(!o)return;I.has(t)||I.set(t,new Map);I.get(t).set(o,n)},getAllFor:e=>I.get(e)||null,get:(e,t)=>{const n=H(e),o=P.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=H(e),o=I.get(t);o&&n&&(o.delete(n),0===o.size&&I.delete(t))}};function x(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function F(e){const t=x(e,"animationName"),n=x(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function B(e){const t=x(e,"animationName"),n=x(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){const t=x(e,i),n=x(e,o),a=n.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(n)*a:0;return Number.isNaN(r)?0:r}function W(e){const t=x(e,i),o=x(e,n),a=o.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(o)*a:0;return Number.isNaN(r)?0:r}function Q(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function V(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){const t=x(e,u),n=x(e,s),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=x(e,u),n=x(e,r),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function U(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const G=e=>Object.keys(e);const K=(e,t)=>Object.assign(e,t),X=!!D&&{passive:!0},$=new Map;function Y(e,t){const{width:n,height:o,top:i,right:a,bottom:r,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:r/u,left:s/c,x:s/c,y:i/u}}function Z(e){return C(e).documentElement}function J(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const _=e=>e instanceof J(e).ShadowRoot||e instanceof ShadowRoot;function ee(e){const{width:t,height:n}=Y(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}const te=e=>e&&!!e.shadowRoot;const ne={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:n,animationDelay:"animationDelay",animationDelayLegacy:o,animationName:"animationName",animationNameLegacy:i,animationEndEvent:"animationend",animationEndEventLegacy:a,transitionDuration:"transitionDuration",transitionDurationLegacy:r,transitionDelay:"transitionDelay",transitionDelayLegacy:s,transitionEndEvent:"transitionend",transitionEndEventLegacy:c,transitionProperty:"transitionProperty",transitionPropertyLegacy:u,isMobile:E,isApple:y,isFirefox:b,support3DTransform:w,supportPassive:D,supportTransform:T,supportTouch:N,supportAnimation:S,supportTransition:M,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:m,userAgent:g,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:A,off:k,one:L,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:P,Timer:{set:(e,t,n,o)=>{const i=H(e);if(i)if(o&&o.length){$.has(i)||$.set(i,new Map);$.get(i).set(o,setTimeout(t,n))}else $.set(i,setTimeout(t,n))},get:(e,t)=>{const n=H(e);if(!n)return null;const o=$.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=H(e);if(n)if(t&&t.length){const e=$.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&$.delete(n))}else clearTimeout($.get(n)),$.delete(n)}},getInstance:(e,t)=>P.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=B(e),a=F(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",r),n=1)};e.addEventListener("animationend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(a),i=W(e),r=R(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,s),n=1)};e.addEventListener(a,s),setTimeout(()=>{n||e.dispatchEvent(o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=V(e),a=Q(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",r),n=1)};e.addEventListener("transitionend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(c),i=q(e),a=j(e);if(M&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(c,r),n=1)};e.addEventListener(c,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=Y(e),{clientHeight:o}=Z(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=Y(e,!0),{clientWidth:a,clientHeight:r}=Z(e);return t>=0&&n>=0&&o<=r&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:X,getElementAnimationDuration:B,getElementAnimationDurationLegacy:W,getElementAnimationDelay:F,getElementAnimationDelayLegacy:R,getElementTransitionDuration:V,getElementTransitionDurationLegacy:q,getElementTransitionDelay:Q,getElementTransitionDelayLegacy:j,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(_(e)?e.host:null)||Z(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=Y(e,o&&ee(t)),a={x:0,y:0};if(o){const e=Y(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:J,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:te,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:ee,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:_,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===Z(e).dir,elementNodes:z,parentNodes:O,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:H,getCustomElements:function(e){return[...(e&&O.some(t=>e instanceof t)?e:C()).querySelectorAll("*")].filter(te)},querySelectorAll:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByTagName(e)},normalizeValue:U,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},r={};return G(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;r[t]=U(i[e])}),G(n).forEach(e=>{n[e]=U(n[e])}),G(t).forEach(e=>{a[e]=e in n?n[e]:e in r?r[e]:t[e]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:K,ObjectKeys:G,ObjectValues:e=>Object.values(e),getBoundingClientRect:Y,getDocument:C,getDocumentBody:function(e){return C(e).body},getDocumentElement:Z,getDocumentHead:function(e){return C(e).head},getElementStyle:x,setElementStyle:(e,t)=>{K(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>e.hasAttributeNS(n||null,t),getAttribute:(e,t)=>e.getAttribute(t),getAttributeNS:(e,t,n)=>e.getAttributeNS(n||null,t),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>e.setAttributeNS(o||null,t,n),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>e.removeAttributeNS(n||null,t),Version:"0.3.0alpha14"};export{ne as default}; |
@@ -1,2 +0,2 @@ | ||
// shorter-js v0.3.0alpha13 | dnp_theme © 2022 | MIT-License | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",o="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",a="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",u="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",s="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",c=navigator.userAgentData,l=navigator.userAgent,m=/iPhone|iPad|iPod|Android/i,d=c?c.brands.some((function(e){return m.test(e.brand)})):m.test(l),f=/(iPhone|iPod|iPad)/,v=c?c.brands.some((function(e){return f.test(e.brand)})):f.test(l),g=!!l&&l.includes("Firefox"),E=document.head,p="webkitPerspective"in E.style||"perspective"in E.style;function y(e,t,n,i){var o=i||!1;e.addEventListener(t,n,o)}function b(e,t,n,i){var o=i||!1;e.removeEventListener(t,n,o)}function h(e,t,n,i){y(e,t,(function o(r){r.target===e&&(n.apply(e,[r]),b(e,t,o,i))}),i)}var w=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});h(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),A="webkitTransform"in E.style||"transform"in E.style,k="ontouchstart"in window||"msMaxTouchPoints"in navigator,L="webkitAnimation"in E.style||"animation"in E.style,T="webkitTransition"in E.style||"transition"in E.style;function D(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var N=[Document,Node,Element,HTMLElement],S=[Element,HTMLElement];function M(e,t){var n="string"==typeof e,i=t&&N.some((function(e){return t instanceof e}))?t:D();return!n&&[].concat(S).some((function(t){return e instanceof t}))?e:n?i.querySelector(e):null}var C=new Map,O={set:function(e,t,n){var i=M(e);i&&(C.has(t)||C.set(t,new Map),C.get(t).set(i,n))},getAllFor:function(e){return C.get(e)||null},get:function(e,t){var n=M(e),i=O.getAllFor(t);return n&&i&&i.get(n)||null},remove:function(e,t){var n=M(e),i=C.get(t);i&&n&&(i.delete(n),0===i.size&&C.delete(t))}};function z(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function H(e){var t=z(e,"animationName"),n=z(e,"animationDelay"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function I(e){var t=z(e,"animationName"),n=z(e,"animationDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function P(e){var t=z(e,i),o=z(e,n),r=o.includes("ms")?1:1e3,a=L&&t&&"none"!==t?parseFloat(o)*r:0;return Number.isNaN(a)?0:a}function x(e){var n=z(e,i),o=z(e,t),r=o.includes("ms")?1:1e3,a=L&&n&&"none"!==n?parseFloat(o)*r:0;return Number.isNaN(a)?0:a}function F(e){var t=z(e,"transitionProperty"),n=z(e,"transitionDelay"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function B(e){var t=z(e,"transitionProperty"),n=z(e,"transitionDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function R(e){var t=z(e,s),n=z(e,a),i=n.includes("ms")?1:1e3,o=T&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function W(e){var t=z(e,s),n=z(e,r),i=n.includes("ms")?1:1e3,o=T&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function j(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var Q=function(e){return Object.keys(e)};var V=function(e,t){return Object.assign(e,t)},q=!!w&&{passive:!0},U=new Map;function G(e,t){var n=e.getBoundingClientRect(),i=n.width,o=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,d=e.offsetHeight;c=m>0&&Math.round(i)/m||1,l=d>0&&Math.round(o)/d||1}return{width:i/c,height:o/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function K(e){return D(e).documentElement}function X(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var Y=function(e){return e instanceof X(e).ShadowRoot||e instanceof ShadowRoot};function Z(e){var t=G(e),n=t.width,i=t.height,o=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==o||Math.round(i)!==r}var J=function(e){return e&&!!e.shadowRoot};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:t,animationDelay:"animationDelay",animationDelayLegacy:n,animationName:"animationName",animationNameLegacy:i,animationEndEvent:"animationend",animationEndEventLegacy:o,transitionDuration:"transitionDuration",transitionDurationLegacy:r,transitionDelay:"transitionDelay",transitionDelayLegacy:a,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:s,isMobile:d,isApple:v,isFirefox:g,support3DTransform:p,supportPassive:w,supportTransform:A,supportTouch:k,supportAnimation:L,supportTransition:T,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:c,userAgent:l,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:y,off:b,one:h,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:O,Timer:{set:function(e,t,n,i){var o=M(e);o&&(i&&i.length?(U.has(o)||U.set(o,new Map),U.get(o).set(i,setTimeout(t,n))):U.set(o,setTimeout(t,n)))},get:function(e,t){var n=M(e);if(!n)return null;var i=U.get(n);return t&&t.length&&i&&i.get?i.get(t)||null:i||null},clear:function(e,t){var n=M(e);if(n)if(t&&t.length){var i=U.get(n);i&&i.get&&(clearTimeout(i.get(t)),i.delete(t),0===i.size&&U.delete(n))}else clearTimeout(U.get(n)),U.delete(n)}},getInstance:function(e,t){return O.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,i=new Event("animationend"),o=I(e),r=H(e);if(o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},emulateAnimationEndLegacy:function(e,t){var n=0,i=new Event(o),r=x(e),a=P(e);if(L&&r){var u=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(o,u),n=1)};e.addEventListener(o,u),setTimeout((function(){n||e.dispatchEvent(i)}),r+a+17)}else t.apply(e,[i])},emulateTransitionEnd:function(e,t){var n=0,i=new Event("transitionend"),o=B(e),r=F(e);if(o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},emulateTransitionEndLegacy:function(e,t){var n=0,i=new Event(u),o=W(e),r=R(e);if(T&&o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(u,a),n=1)};e.addEventListener(u,a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},isElementInScrollRange:function(e){var t=G(e),n=t.top,i=t.bottom;return n<=K(e).clientHeight&&i>=0},isElementInViewport:function(e){var t=G(e,!0),n=t.top,i=t.left,o=t.bottom,r=t.right,a=K(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&i>=0&&o<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:q,getElementAnimationDuration:I,getElementAnimationDurationLegacy:x,getElementAnimationDelay:H,getElementAnimationDelayLegacy:P,getElementTransitionDuration:B,getElementTransitionDurationLegacy:W,getElementTransitionDelay:F,getElementTransitionDelayLegacy:R,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(Y(e)?e.host:null)||K(e)},getRectRelativeToOffsetParent:function(e,t,n){var i=t instanceof HTMLElement,o=G(e,i&&Z(t)),r={x:0,y:0};if(i){var a=G(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:o.left+n.x-r.x,y:o.top+n.y-r.y,width:o.width,height:o.height}},getWindow:X,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:J,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:Z,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:Y,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===K(e).dir},elementNodes:S,parentNodes:N,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:M,getCustomElements:function(e){var t=e&&N.some((function(t){return e instanceof t}))?e:D();return[].concat(t.querySelectorAll("*")).filter(J)},querySelectorAll:function(e,t){return(t&&N.some((function(e){return t instanceof e}))?t:D()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&N.some((function(e){return t instanceof e}))?t:D()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&N.some((function(e){return t instanceof e}))?t:D()).getElementsByTagName(e)},normalizeValue:j,normalizeOptions:function(e,t,n,i){var o=Object.assign({},e.dataset),r={},a={};return Q(o).forEach((function(e){var t=i&&e.includes(i)?e.replace(i,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=j(o[e])})),Q(n).forEach((function(e){n[e]=j(n[e])})),Q(t).forEach((function(e){r[e]=e in n?n[e]:e in a?a[e]:t[e]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:V,ObjectKeys:Q,ObjectValues:function(e){return Object.values(e)},getBoundingClientRect:G,getDocument:D,getDocumentBody:function(e){return D(e).body},getDocumentElement:K,getDocumentHead:function(e){return D(e).head},getElementStyle:z,setElementStyle:function(e,t){V(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return e.hasAttributeNS(n||null,t)},getAttribute:function(e,t){return e.getAttribute(t)},getAttributeNS:function(e,t,n){return e.getAttributeNS(n||null,t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,i){return e.setAttributeNS(i||null,t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return e.removeAttributeNS(n||null,t)},Version:"0.3.0alpha13"}})); | ||
// shorter-js v0.3.0alpha14 | dnp_theme © 2022 | MIT-License | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",o="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",r="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",a="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",u="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",c="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",l=navigator.userAgentData,m=navigator.userAgent,d=/iPhone|iPad|iPod|Android/i,f=l?l.brands.some((function(e){return d.test(e.brand)})):d.test(m),v=/(iPhone|iPod|iPad)/,g=l?l.brands.some((function(e){return v.test(e.brand)})):v.test(m),p=!!m&&m.includes("Firefox"),E=document.head,y="webkitPerspective"in E.style||"perspective"in E.style;function b(e,t,n,o){var i=o||!1;e.addEventListener(t,n,i)}function h(e,t,n,o){var i=o||!1;e.removeEventListener(t,n,i)}function w(e,t,n,o){var i=function(r){r.target===e&&(n.apply(e,[r]),h(e,t,i,o))};b(e,t,i,o)}var A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),k="webkitTransform"in E.style||"transform"in E.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,D="webkitAnimation"in E.style||"animation"in E.style,T="webkitTransition"in E.style||"transition"in E.style;function N(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var S=[Document,Node,Element,HTMLElement],M=[Element,HTMLElement];function O(e,t){var n="string"==typeof e,o=t&&S.some((function(e){return t instanceof e}))?t:N();return!n&&[].concat(M).some((function(t){return e instanceof t}))?e:n?o.querySelector(e):null}var C=new Map,z={set:function(e,t,n){var o=O(e);o&&(C.has(t)||C.set(t,new Map),C.get(t).set(o,n))},getAllFor:function(e){return C.get(e)||null},get:function(e,t){var n=O(e),o=z.getAllFor(t);return n&&o&&o.get(n)||null},remove:function(e,t){var n=O(e),o=C.get(t);o&&n&&(o.delete(n),0===o.size&&C.delete(t))}};function H(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function I(e){var t=H(e,"animationName"),n=H(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function x(e){var t=H(e,"animationName"),n=H(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function P(e){var t=H(e,i),n=H(e,o),r=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(a)?0:a}function F(e){var t=H(e,i),o=H(e,n),r=o.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(o)*r:0;return Number.isNaN(a)?0:a}function B(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){var t=H(e,c),n=H(e,u),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){var t=H(e,c),n=H(e,a),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var V=function(e){return Object.keys(e)};var q=function(e,t){return Object.assign(e,t)},U=!!A&&{passive:!0},G=new Map;function K(e,t){var n=e.getBoundingClientRect(),o=n.width,i=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,d=e.offsetHeight;c=m>0&&Math.round(o)/m||1,l=d>0&&Math.round(i)/d||1}return{width:o/c,height:i/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function X(e){return N(e).documentElement}function Y(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var Z=function(e){return e instanceof Y(e).ShadowRoot||e instanceof ShadowRoot};function J(e){var t=K(e),n=t.width,o=t.height,i=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==i||Math.round(o)!==r}var $=function(e){return e&&!!e.shadowRoot};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:n,animationDelay:"animationDelay",animationDelayLegacy:o,animationName:"animationName",animationNameLegacy:i,animationEndEvent:"animationend",animationEndEventLegacy:r,transitionDuration:"transitionDuration",transitionDurationLegacy:a,transitionDelay:"transitionDelay",transitionDelayLegacy:u,transitionEndEvent:"transitionend",transitionEndEventLegacy:s,transitionProperty:"transitionProperty",transitionPropertyLegacy:c,isMobile:f,isApple:g,isFirefox:p,support3DTransform:y,supportPassive:A,supportTransform:k,supportTouch:L,supportAnimation:D,supportTransition:T,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:l,userAgent:m,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:b,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:z,Timer:{set:function(e,t,n,o){var i=O(e);i&&(o&&o.length?(G.has(i)||G.set(i,new Map),G.get(i).set(o,setTimeout(t,n))):G.set(i,setTimeout(t,n)))},get:function(e,t){var n=O(e);if(!n)return null;var o=G.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:function(e,t){var n=O(e);if(n)if(t&&t.length){var o=G.get(n);o&&o.get&&(clearTimeout(o.get(t)),o.delete(t),0===o.size&&G.delete(n))}else clearTimeout(G.get(n)),G.delete(n)}},getInstance:function(e,t){return z.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,o=new Event("animationend"),i=x(e),r=I(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){var n=0,o=new Event(r),i=F(e),a=P(e);if(D&&i){var u=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(r,u),n=1)};e.addEventListener(r,u),setTimeout((function(){n||e.dispatchEvent(o)}),i+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){var n=0,o=new Event("transitionend"),i=R(e),r=B(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){var n=0,o=new Event(s),i=j(e),r=W(e);if(T&&i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,a),n=1)};e.addEventListener(s,a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){var t=K(e),n=t.top,o=t.bottom;return n<=X(e).clientHeight&&o>=0},isElementInViewport:function(e){var t=K(e,!0),n=t.top,o=t.left,i=t.bottom,r=t.right,a=X(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&o>=0&&i<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:U,getElementAnimationDuration:x,getElementAnimationDurationLegacy:F,getElementAnimationDelay:I,getElementAnimationDelayLegacy:P,getElementTransitionDuration:R,getElementTransitionDurationLegacy:j,getElementTransitionDelay:B,getElementTransitionDelayLegacy:W,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(Z(e)?e.host:null)||X(e)},getRectRelativeToOffsetParent:function(e,t,n){var o=t instanceof HTMLElement,i=K(e,o&&J(t)),r={x:0,y:0};if(o){var a=K(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:i.left+n.x-r.x,y:i.top+n.y-r.y,width:i.width,height:i.height}},getWindow:Y,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:$,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:J,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:Z,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===X(e).dir},elementNodes:M,parentNodes:S,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:O,getCustomElements:function(e){var t=e&&S.some((function(t){return e instanceof t}))?e:N();return[].concat(t.querySelectorAll("*")).filter($)},querySelectorAll:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByTagName(e)},normalizeValue:Q,normalizeOptions:function(e,t,n,o){var i=Object.assign({},e.dataset),r={},a={};return V(i).forEach((function(e){var t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=Q(i[e])})),V(n).forEach((function(e){n[e]=Q(n[e])})),V(t).forEach((function(e){r[e]=e in n?n[e]:e in a?a[e]:t[e]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:q,ObjectKeys:V,ObjectValues:function(e){return Object.values(e)},getBoundingClientRect:K,getDocument:N,getDocumentBody:function(e){return N(e).body},getDocumentElement:X,getDocumentHead:function(e){return N(e).head},getElementStyle:H,setElementStyle:function(e,t){q(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return e.hasAttributeNS(n||null,t)},getAttribute:function(e,t){return e.getAttribute(t)},getAttributeNS:function(e,t,n){return e.getAttributeNS(n||null,t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,o){return e.setAttributeNS(o||null,t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return e.removeAttributeNS(n||null,t)},Version:"0.3.0alpha14"}})); |
{ | ||
"name": "shorter-js", | ||
"version": "0.3.0alpha13", | ||
"version": "0.3.0alpha14", | ||
"description": "A small ES6+ library with various JavaScript tools useful for creating light libraries.", | ||
@@ -5,0 +5,0 @@ "main": "dist/shorter-js.min.js", |
/** | ||
* Remove eventListener from an `Element` | `HTMLElement` | `Document` target. | ||
* Remove eventListener from an `Element` | `HTMLElement` | `Document` | `Window` target. | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -9,0 +9,0 @@ export default function off(element, eventName, handler, options) { |
/** | ||
* Add eventListener to an `Element` | `HTMLElement` | `Document` target. | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -9,0 +9,0 @@ export default function on(element, eventName, handler, options) { |
@@ -5,9 +5,9 @@ import on from './on'; | ||
/** | ||
* Add an `eventListener` to an `Element` | `HTMLElement` | `Document` target | ||
* and remove it once callback is called. | ||
* Add an `eventListener` to an `Element` | `HTMLElement` | `Document` | `Window` | ||
* target and remove it once callback is called. | ||
* | ||
* @param {HTMLElement | Element | Document} element event.target | ||
* @param {HTMLElement | Element | Document | Window} element event.target | ||
* @param {string} eventName event.type | ||
* @param {EventListener} handler callback | ||
* @param {EventListenerOptions | boolean | undefined} options other event options | ||
* @param {EventListenerObject['handleEvent']} handler callback | ||
* @param {(EventListenerOptions | boolean)=} options other event options | ||
*/ | ||
@@ -17,5 +17,5 @@ export default function one(element, eventName, handler, options) { | ||
* Wrap the handler for easy on -> off | ||
* @param {Event} e the Event object | ||
* @type {EventListenerObject['handleEvent']} | ||
*/ | ||
function handlerWrapper(e) { | ||
const handlerWrapper = (e) => { | ||
if (e.target === element) { | ||
@@ -25,4 +25,4 @@ handler.apply(element, [e]); | ||
} | ||
} | ||
}; | ||
on(element, eventName, handlerWrapper, options); | ||
} |
@@ -47,2 +47,3 @@ // strings | ||
import mouseoutEvent from './strings/mouseoutEvent'; | ||
import mouseoverEvent from './strings/mouseoverEvent'; | ||
import mousemoveEvent from './strings/mousemoveEvent'; | ||
@@ -277,2 +278,3 @@ import mousewheelEvent from './strings/mousewheelEvent'; | ||
mouseoutEvent, | ||
mouseoverEvent, | ||
mousemoveEvent, | ||
@@ -279,0 +281,0 @@ mousewheelEvent, |
/** | ||
* A global namespace for most scroll event listeners. | ||
* @type {Partial<AddEventListenerOptions>} | ||
*/ | ||
@@ -4,0 +5,0 @@ const passiveHandler = { passive: true }; |
@@ -5,2 +5,3 @@ import supportPassive from '../boolean/supportPassive'; | ||
* A global namespace for most scroll event listeners in legacy browsers. | ||
* @type {Partial<AddEventListenerOptions> | boolean} | ||
*/ | ||
@@ -7,0 +8,0 @@ const passiveHandler = supportPassive ? { passive: true } : false; |
@@ -0,54 +1,108 @@ | ||
import abort from './abortEvent'; | ||
import beforeunload from './beforeunloadEvent'; | ||
import blur from './blurEvent'; | ||
import change from './changeEvent'; | ||
import contextmenu from './contextmenuEvent'; | ||
import DOMContentLoaded from './DOMContentLoadedEvent'; | ||
import DOMMouseScroll from './DOMMouseScrollEvent'; | ||
import error from './errorEvent'; | ||
import focus from './focusEvent'; | ||
import focusin from './focusinEvent'; | ||
import focusout from './focusoutEvent'; | ||
import gesturechange from './gesturechangeEvent'; | ||
import gestureend from './gestureendEvent'; | ||
import gesturestart from './gesturestartEvent'; | ||
import keydown from './keydownEvent'; | ||
import keypress from './keypressEvent'; | ||
import keyup from './keyupEvent'; | ||
import load from './loadEvent'; | ||
import click from './mouseclickEvent'; | ||
import dblclick from './mousedblclickEvent'; | ||
import mousedown from './mousedownEvent'; | ||
import mouseup from './mouseupEvent'; | ||
import hover from './mousehoverEvent'; | ||
import mouseenter from './mouseenterEvent'; | ||
import mouseleave from './mouseleaveEvent'; | ||
import mousein from './mouseinEvent'; | ||
import mouseout from './mouseoutEvent'; | ||
import mouseover from './mouseoverEvent'; | ||
import mousemove from './mousemoveEvent'; | ||
import mousewheel from './mousewheelEvent'; | ||
import move from './moveEvent'; | ||
import orientationchange from './orientationchangeEvent'; | ||
import pointercancel from './pointercancelEvent'; | ||
import pointerdown from './pointerdownEvent'; | ||
import pointerleave from './pointerleaveEvent'; | ||
import pointermove from './pointermoveEvent'; | ||
import pointerup from './pointerupEvent'; | ||
import readystatechange from './readystatechangeEvent'; | ||
import reset from './resetEvent'; | ||
import resize from './resizeEvent'; | ||
import select from './selectEvent'; | ||
import selectend from './selectendEvent'; | ||
import selectstart from './selectstartEvent'; | ||
import scroll from './scrollEvent'; | ||
import submit from './submitEvent'; | ||
import touchstart from './touchstartEvent'; | ||
import touchmove from './touchmoveEvent'; | ||
import touchcancel from './touchcancelEvent'; | ||
import touchend from './touchendEvent'; | ||
import unload from './unloadEvent'; | ||
/** | ||
* A global namespace for all browser native events. | ||
* @type {string[]} | ||
*/ | ||
const nativeEvents = [ | ||
'click', | ||
'dblclick', | ||
'mouseup', | ||
'mousedown', | ||
'contextmenu', | ||
'mousewheel', | ||
'DOMMouseScroll', | ||
'mouseover', | ||
'mouseout', | ||
'mousemove', | ||
'selectstart', | ||
'selectend', | ||
'keydown', | ||
'keypress', | ||
'keyup', | ||
'orientationchange', | ||
'touchstart', | ||
'touchmove', | ||
'touchend', | ||
'touchcancel', | ||
'pointercancel', | ||
'pointerdown', | ||
'pointerleave', | ||
'pointermove', | ||
'pointerup', | ||
'gesturestart', | ||
'gesturechange', | ||
'gestureend', | ||
'focus', | ||
'blur', | ||
'change', | ||
'reset', | ||
'select', | ||
'submit', | ||
'focusin', | ||
'focusout', | ||
'load', | ||
'unload', | ||
'beforeunload', | ||
'resize', | ||
'move', | ||
'DOMContentLoaded', | ||
'readystatechange', | ||
'error', | ||
'abort', | ||
'scroll', | ||
]; | ||
const nativeEvents = { | ||
DOMContentLoaded, | ||
DOMMouseScroll, | ||
abort, | ||
beforeunload, | ||
blur, | ||
change, | ||
click, | ||
contextmenu, | ||
dblclick, | ||
error, | ||
focus, | ||
focusin, | ||
focusout, | ||
gesturechange, | ||
gestureend, | ||
gesturestart, | ||
hover, | ||
keydown, | ||
keypress, | ||
keyup, | ||
load, | ||
mousedown, | ||
mousemove, | ||
mousein, | ||
mouseout, | ||
mouseenter, | ||
mouseleave, | ||
mouseover, | ||
mouseup, | ||
mousewheel, | ||
move, | ||
orientationchange, | ||
pointercancel, | ||
pointerdown, | ||
pointerleave, | ||
pointermove, | ||
pointerup, | ||
readystatechange, | ||
reset, | ||
resize, | ||
scroll, | ||
select, | ||
selectend, | ||
selectstart, | ||
submit, | ||
touchcancel, | ||
touchend, | ||
touchmove, | ||
touchstart, | ||
unload, | ||
}; | ||
export default nativeEvents; |
// @ts-ignore | ||
const { userAgentData: userAgentDATA } = navigator; | ||
const { userAgentData: uaDATA } = navigator; | ||
/** | ||
* A global namespace for `userAgentData` event. | ||
* A global namespace for `userAgentData` object. | ||
*/ | ||
const userAgentData = userAgentDATA; | ||
const userAgentData = uaDATA; | ||
export default userAgentData; |
@@ -13,24 +13,23 @@ export as namespace SHORTER; | ||
export { default as ariaSelected } from 'shorter-js/src/strings/ariaSelected'; | ||
export { default as nativeEvents } from 'shorter-js/src/strings/nativeEvents'; | ||
export { default as abortEvent } from 'shorter-js/src/strings/abortEvent'; | ||
export { default as beforeunloadEvent } from 'shorter-js/src/strings/beforeunloadEvent'; | ||
export { default as blurEvent } from 'shorter-js/src/strings/blurEvent'; | ||
export { default as moveEvent } from 'shorter-js/src/strings/moveEvent'; | ||
export { default as changeEvent } from 'shorter-js/src/strings/changeEvent'; | ||
export { default as errorEvent } from 'shorter-js/src/strings/errorEvent'; | ||
export { default as resetEvent } from 'shorter-js/src/strings/resetEvent'; | ||
export { default as resizeEvent } from 'shorter-js/src/strings/resizeEvent'; | ||
export { default as scrollEvent } from 'shorter-js/src/strings/scrollEvent'; | ||
export { default as submitEvent } from 'shorter-js/src/strings/submitEvent'; | ||
export { default as loadEvent } from 'shorter-js/src/strings/loadEvent'; | ||
export { default as unloadEvent } from 'shorter-js/src/strings/unloadEvent'; | ||
export { default as readystatechangeEvent } from 'shorter-js/src/strings/readystatechangeEvent'; | ||
export { default as beforeunloadEvent } from 'shorter-js/src/strings/beforeunloadEvent'; | ||
export { default as orientationchangeEvent } from 'shorter-js/src/strings/orientationchangeEvent'; | ||
export { default as contextmenuEvent } from 'shorter-js/src/strings/contextmenuEvent'; | ||
export { default as DOMContentLoadedEvent } from 'shorter-js/src/strings/DOMContentLoadedEvent'; | ||
export { default as DOMMouseScrollEvent } from 'shorter-js/src/strings/DOMMouseScrollEvent'; | ||
export { default as selectEvent } from 'shorter-js/src/strings/selectEvent'; | ||
export { default as selectendEvent } from 'shorter-js/src/strings/selectendEvent'; | ||
export { default as selectstartEvent } from 'shorter-js/src/strings/selectstartEvent'; | ||
export { default as mouseSwipeEvents } from 'shorter-js/src/strings/mouseSwipeEvents'; | ||
export { default as errorEvent } from 'shorter-js/src/strings/errorEvent'; | ||
export { default as focusEvents } from 'shorter-js/src/strings/focusEvents'; | ||
export { default as focusEvent } from 'shorter-js/src/strings/focusEvent'; | ||
export { default as focusinEvent } from 'shorter-js/src/strings/focusinEvent'; | ||
export { default as focusoutEvent } from 'shorter-js/src/strings/focusoutEvent'; | ||
export { default as gesturechangeEvent } from 'shorter-js/src/strings/gesturechangeEvent'; | ||
export { default as gestureendEvent } from 'shorter-js/src/strings/gestureendEvent'; | ||
export { default as gesturestartEvent } from 'shorter-js/src/strings/gesturestartEvent'; | ||
export { default as keydownEvent } from 'shorter-js/src/strings/keydownEvent'; | ||
export { default as keypressEvent } from 'shorter-js/src/strings/keypressEvent'; | ||
export { default as keyupEvent } from 'shorter-js/src/strings/keyupEvent'; | ||
export { default as loadEvent } from 'shorter-js/src/strings/loadEvent'; | ||
export { default as mouseClickEvents } from 'shorter-js/src/strings/mouseClickEvents'; | ||
@@ -47,4 +46,21 @@ export { default as mouseclickEvent } from 'shorter-js/src/strings/mouseclickEvent'; | ||
export { default as mouseoutEvent } from 'shorter-js/src/strings/mouseoutEvent'; | ||
export { default as mouseoverEvent } from 'shorter-js/src/strings/mouseoverEvent'; | ||
export { default as mousemoveEvent } from 'shorter-js/src/strings/mousemoveEvent'; | ||
export { default as mousewheelEvent } from 'shorter-js/src/strings/mousewheelEvent'; | ||
export { default as mouseSwipeEvents } from 'shorter-js/src/strings/mouseSwipeEvents'; | ||
export { default as moveEvent } from 'shorter-js/src/strings/moveEvent'; | ||
export { default as orientationchangeEvent } from 'shorter-js/src/strings/orientationchangeEvent'; | ||
export { default as pointercancelEvent } from 'shorter-js/src/strings/pointercancelEvent'; | ||
export { default as pointerdownEvent } from 'shorter-js/src/strings/pointerdownEvent'; | ||
export { default as pointerleaveEvent } from 'shorter-js/src/strings/pointerleaveEvent'; | ||
export { default as pointermoveEvent } from 'shorter-js/src/strings/pointermoveEvent'; | ||
export { default as pointerupEvent } from 'shorter-js/src/strings/pointerupEvent'; | ||
export { default as readystatechangeEvent } from 'shorter-js/src/strings/readystatechangeEvent'; | ||
export { default as resetEvent } from 'shorter-js/src/strings/resetEvent'; | ||
export { default as resizeEvent } from 'shorter-js/src/strings/resizeEvent'; | ||
export { default as selectEvent } from 'shorter-js/src/strings/selectEvent'; | ||
export { default as selectendEvent } from 'shorter-js/src/strings/selectendEvent'; | ||
export { default as selectstartEvent } from 'shorter-js/src/strings/selectstartEvent'; | ||
export { default as scrollEvent } from 'shorter-js/src/strings/scrollEvent'; | ||
export { default as submitEvent } from 'shorter-js/src/strings/submitEvent'; | ||
export { default as touchEvents } from 'shorter-js/src/strings/touchEvents'; | ||
@@ -55,18 +71,5 @@ export { default as touchstartEvent } from 'shorter-js/src/strings/touchstartEvent'; | ||
export { default as touchendEvent } from 'shorter-js/src/strings/touchendEvent'; | ||
export { default as pointercancelEvent } from 'shorter-js/src/strings/pointercancelEvent'; | ||
export { default as pointerdownEvent } from 'shorter-js/src/strings/pointerdownEvent'; | ||
export { default as pointerleaveEvent } from 'shorter-js/src/strings/pointerleaveEvent'; | ||
export { default as pointermoveEvent } from 'shorter-js/src/strings/pointermoveEvent'; | ||
export { default as pointerupEvent } from 'shorter-js/src/strings/pointerupEvent'; | ||
export { default as focusEvents } from 'shorter-js/src/strings/focusEvents'; | ||
export { default as focusEvent } from 'shorter-js/src/strings/focusEvent'; | ||
export { default as focusinEvent } from 'shorter-js/src/strings/focusinEvent'; | ||
export { default as focusoutEvent } from 'shorter-js/src/strings/focusoutEvent'; | ||
export { default as gesturechangeEvent } from 'shorter-js/src/strings/gesturechangeEvent'; | ||
export { default as gestureendEvent } from 'shorter-js/src/strings/gestureendEvent'; | ||
export { default as gesturestartEvent } from 'shorter-js/src/strings/gesturestartEvent'; | ||
export { default as unloadEvent } from 'shorter-js/src/strings/unloadEvent'; | ||
export { default as keyboardEventKeys } from 'shorter-js/src/strings/keyboardEventKeys'; | ||
export { default as keydownEvent } from 'shorter-js/src/strings/keydownEvent'; | ||
export { default as keyupEvent } from 'shorter-js/src/strings/keyupEvent'; | ||
export { default as keypressEvent } from 'shorter-js/src/strings/keypressEvent'; | ||
export { default as keyAlt } from 'shorter-js/src/strings/keyAlt'; | ||
@@ -230,2 +233,3 @@ export { default as keyArrowDown } from 'shorter-js/src/strings/keyArrowDown'; | ||
export type ElementNodes = HTMLElement | Element; | ||
export type ParentNodes = Document | HTMLElement | Element | Node; // ShadowRoot is a Node too | ||
export type ParentNodes = Document | HTMLElement | Element | Node; // ShadowRoot is a Node too | ||
@@ -14,24 +14,20 @@ // strings | ||
export { default as abortEvent } from '../../src/strings/abortEvent'; | ||
export { default as beforeunloadEvent } from '../../src/strings/beforeunloadEvent'; | ||
export { default as blurEvent } from '../../src/strings/blurEvent'; | ||
export { default as moveEvent } from '../../src/strings/moveEvent'; | ||
export { default as changeEvent } from '../../src/strings/changeEvent'; | ||
export { default as errorEvent } from '../../src/strings/errorEvent'; | ||
export { default as resetEvent } from '../../src/strings/resetEvent'; | ||
export { default as resizeEvent } from '../../src/strings/resizeEvent'; | ||
export { default as scrollEvent } from '../../src/strings/scrollEvent'; | ||
export { default as submitEvent } from '../../src/strings/submitEvent'; | ||
export { default as loadEvent } from '../../src/strings/loadEvent'; | ||
export { default as unloadEvent } from '../../src/strings/unloadEvent'; | ||
export { default as readystatechangeEvent } from '../../src/strings/readystatechangeEvent'; | ||
export { default as beforeunloadEvent } from '../../src/strings/beforeunloadEvent'; | ||
export { default as orientationchangeEvent } from '../../src/strings/orientationchangeEvent'; | ||
export { default as contextmenuEvent } from '../../src/strings/contextmenuEvent'; | ||
export { default as DOMContentLoadedEvent } from '../../src/strings/DOMContentLoadedEvent'; | ||
export { default as DOMMouseScrollEvent } from '../../src/strings/DOMMouseScrollEvent'; | ||
export { default as selectEvent } from '../../src/strings/selectEvent'; | ||
export { default as selectendEvent } from '../../src/strings/selectendEvent'; | ||
export { default as selectstartEvent } from '../../src/strings/selectstartEvent'; | ||
export { default as mouseSwipeEvents } from '../../src/strings/mouseSwipeEvents'; | ||
export { default as errorEvent } from '../../src/strings/errorEvent'; | ||
export { default as focusEvents } from '../../src/strings/focusEvents'; | ||
export { default as focusEvent } from '../../src/strings/focusEvent'; | ||
export { default as focusinEvent } from '../../src/strings/focusinEvent'; | ||
export { default as focusoutEvent } from '../../src/strings/focusoutEvent'; | ||
export { default as gesturechangeEvent } from '../../src/strings/gesturechangeEvent'; | ||
export { default as gestureendEvent } from '../../src/strings/gestureendEvent'; | ||
export { default as gesturestartEvent } from '../../src/strings/gesturestartEvent'; | ||
export { default as keydownEvent } from '../../src/strings/keydownEvent'; | ||
export { default as keyupEvent } from '../../src/strings/keyupEvent'; | ||
export { default as keypressEvent } from '../../src/strings/keypressEvent'; | ||
export { default as loadEvent } from '../../src/strings/loadEvent'; | ||
export { default as mouseClickEvents } from '../../src/strings/mouseClickEvents'; | ||
@@ -48,5 +44,21 @@ export { default as mouseclickEvent } from '../../src/strings/mouseclickEvent'; | ||
export { default as mouseoutEvent } from '../../src/strings/mouseoutEvent'; | ||
export { default as mouseoverEvent } from '../../src/strings/mouseoverEvent'; | ||
export { default as mousemoveEvent } from '../../src/strings/mousemoveEvent'; | ||
export { default as mouseSwipeEvents } from '../../src/strings/mouseSwipeEvents'; | ||
export { default as mousewheelEvent } from '../../src/strings/mousewheelEvent'; | ||
export { default as moveEvent } from '../../src/strings/moveEvent'; | ||
export { default as orientationchangeEvent } from '../../src/strings/orientationchangeEvent'; | ||
export { default as pointercancelEvent } from '../../src/strings/pointercancelEvent'; | ||
export { default as pointerdownEvent } from '../../src/strings/pointerdownEvent'; | ||
export { default as pointerleaveEvent } from '../../src/strings/pointerleaveEvent'; | ||
export { default as pointermoveEvent } from '../../src/strings/pointermoveEvent'; | ||
export { default as pointerupEvent } from '../../src/strings/pointerupEvent'; | ||
export { default as readystatechangeEvent } from '../../src/strings/readystatechangeEvent'; | ||
export { default as resetEvent } from '../../src/strings/resetEvent'; | ||
export { default as resizeEvent } from '../../src/strings/resizeEvent'; | ||
export { default as selectEvent } from '../../src/strings/selectEvent'; | ||
export { default as selectendEvent } from '../../src/strings/selectendEvent'; | ||
export { default as selectstartEvent } from '../../src/strings/selectstartEvent'; | ||
export { default as scrollEvent } from '../../src/strings/scrollEvent'; | ||
export { default as submitEvent } from '../../src/strings/submitEvent'; | ||
export { default as touchEvents } from '../../src/strings/touchEvents'; | ||
@@ -57,22 +69,5 @@ export { default as touchstartEvent } from '../../src/strings/touchstartEvent'; | ||
export { default as touchendEvent } from '../../src/strings/touchendEvent'; | ||
export { default as unloadEvent } from '../../src/strings/unloadEvent'; | ||
export { default as pointercancelEvent } from '../../src/strings/pointercancelEvent'; | ||
export { default as pointerdownEvent } from '../../src/strings/pointerdownEvent'; | ||
export { default as pointerleaveEvent } from '../../src/strings/pointerleaveEvent'; | ||
export { default as pointermoveEvent } from '../../src/strings/pointermoveEvent'; | ||
export { default as pointerupEvent } from '../../src/strings/pointerupEvent'; | ||
export { default as focusEvents } from '../../src/strings/focusEvents'; | ||
export { default as focusEvent } from '../../src/strings/focusEvent'; | ||
export { default as focusinEvent } from '../../src/strings/focusinEvent'; | ||
export { default as focusoutEvent } from '../../src/strings/focusoutEvent'; | ||
export { default as gesturechangeEvent } from '../../src/strings/gesturechangeEvent'; | ||
export { default as gestureendEvent } from '../../src/strings/gestureendEvent'; | ||
export { default as gesturestartEvent } from '../../src/strings/gesturestartEvent'; | ||
export { default as keyboardEventKeys } from '../../src/strings/keyboardEventKeys'; | ||
export { default as keydownEvent } from '../../src/strings/keydownEvent'; | ||
export { default as keyupEvent } from '../../src/strings/keyupEvent'; | ||
export { default as keypressEvent } from '../../src/strings/keypressEvent'; | ||
export { default as keyAlt } from '../../src/strings/keyAlt'; | ||
@@ -238,2 +233,2 @@ export { default as keyArrowDown } from '../../src/strings/keyArrowDown'; | ||
export { default as Version } from '../../src/misc/version'; | ||
export { default as Version } from '../../src/misc/version'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
375828
9362