1
0
Fork 0

Added Statistics calculation

Statistics now show calculated values
This commit is contained in:
Techognito 2025-09-04 17:30:00 +02:00
parent fe87374e47
commit fc0f69dacb
2147 changed files with 141321 additions and 39 deletions

1
node_modules/@mui/x-internals/rafThrottle/index.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export * from "./rafThrottle.js";

16
node_modules/@mui/x-internals/rafThrottle/index.js generated vendored Normal file
View file

@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rafThrottle = require("./rafThrottle");
Object.keys(_rafThrottle).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _rafThrottle[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _rafThrottle[key];
}
});
});

View file

@ -0,0 +1,16 @@
export interface Cancelable {
clear(): void;
}
/**
* Creates a throttled function that only invokes `fn` at most once per animation frame.
*
* @example
* ```ts
* const throttled = rafThrottle((value: number) => console.log(value));
* window.addEventListener('scroll', (e) => throttled(e.target.scrollTop));
* ```
*
* @param fn Callback function
* @return The `requestAnimationFrame` throttled function
*/
export declare function rafThrottle<T extends (...args: any[]) => any>(fn: T): T & Cancelable;

View file

@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.rafThrottle = rafThrottle;
/**
* Creates a throttled function that only invokes `fn` at most once per animation frame.
*
* @example
* ```ts
* const throttled = rafThrottle((value: number) => console.log(value));
* window.addEventListener('scroll', (e) => throttled(e.target.scrollTop));
* ```
*
* @param fn Callback function
* @return The `requestAnimationFrame` throttled function
*/
function rafThrottle(fn) {
let lastArgs;
let rafRef;
const later = () => {
rafRef = null;
fn(...lastArgs);
};
function throttled(...args) {
lastArgs = args;
if (!rafRef) {
rafRef = requestAnimationFrame(later);
}
}
throttled.clear = () => {
if (rafRef) {
cancelAnimationFrame(rafRef);
rafRef = null;
}
};
return throttled;
}