Add yet-another-react-lightbox package and update .gitignore to exclude node_modules
This commit is contained in:
68
frontend/node_modules/@react-dnd/asap/CHANGES.md
generated
vendored
68
frontend/node_modules/@react-dnd/asap/CHANGES.md
generated
vendored
@@ -1,68 +0,0 @@
|
||||
## 2.0.6
|
||||
|
||||
Version 2.0.4 adds support for React Native by clarifying in package.json that
|
||||
the browser environment does not support Node.js domains.
|
||||
Why this is necessary, we leave as an exercise for the user.
|
||||
|
||||
## 2.0.3
|
||||
|
||||
Version 2.0.3 fixes a bug when adjusting the capacity of the task queue.
|
||||
|
||||
## 2.0.1-2.02
|
||||
|
||||
Version 2.0.1 fixes a bug in the way redirects were expressed that affected the
|
||||
function of Browserify, but which Mr would tolerate.
|
||||
|
||||
## 2.0.0
|
||||
|
||||
Version 2 of ASAP is a full rewrite with a few salient changes.
|
||||
First, the ASAP source is CommonJS only and designed with [Browserify][] and
|
||||
[Browserify-compatible][mr] module loaders in mind.
|
||||
|
||||
[browserify]: https://github.com/substack/node-browserify
|
||||
[mr]: https://github.com/montagejs/mr
|
||||
|
||||
The new version has been refactored in two dimensions.
|
||||
Support for Node.js and browsers have been separated, using Browserify
|
||||
redirects and ASAP has been divided into two modules.
|
||||
The "raw" layer depends on the tasks to catch thrown exceptions and unravel
|
||||
Node.js domains.
|
||||
|
||||
The full implementation of ASAP is loadable as `require("asap")` in both Node.js
|
||||
and browsers.
|
||||
|
||||
The raw layer that lacks exception handling overhead is loadable as
|
||||
`require("asap/raw")`.
|
||||
The interface is the same for both layers.
|
||||
|
||||
Tasks are no longer required to be functions, but can rather be any object that
|
||||
implements `task.call()`.
|
||||
With this feature you can recycle task objects to avoid garbage collector churn
|
||||
and avoid closures in general.
|
||||
|
||||
The implementation has been rigorously documented so that our successors can
|
||||
understand the scope of the problem that this module solves and all of its
|
||||
nuances, ensuring that the next generation of implementations know what details
|
||||
are essential.
|
||||
|
||||
- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js)
|
||||
- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js)
|
||||
- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js)
|
||||
- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js)
|
||||
|
||||
The new version has also been rigorously tested across a broad spectrum of
|
||||
browsers, in both the window and worker context.
|
||||
The following charts capture the browser test results for the most recent
|
||||
release.
|
||||
The first chart shows test results for ASAP running in the main window context.
|
||||
The second chart shows test results for ASAP running in a web worker context.
|
||||
Test results are inconclusive (grey) on browsers that do not support web
|
||||
workers.
|
||||
These data are captured automatically by [Continuous
|
||||
Integration][].
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
[continuous integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
|
||||
19
frontend/node_modules/@react-dnd/asap/LICENSE.md
generated
vendored
19
frontend/node_modules/@react-dnd/asap/LICENSE.md
generated
vendored
@@ -1,19 +0,0 @@
|
||||
Copyright 2009–2014 Contributors. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
233
frontend/node_modules/@react-dnd/asap/README.md
generated
vendored
233
frontend/node_modules/@react-dnd/asap/README.md
generated
vendored
@@ -1,233 +0,0 @@
|
||||
# ASAP
|
||||
|
||||
[](https://travis-ci.org/kriskowal/asap)
|
||||
|
||||
Promise and asynchronous observer libraries, as well as hand-rolled callback
|
||||
programs and libraries, often need a mechanism to postpone the running of a
|
||||
callback until the next available event.
|
||||
(See [Designing API’s for Asynchrony][zalgo].)
|
||||
The `asap` function runs a task **as soon as possible** but not before it
|
||||
returns, waiting only for the completion of the current event and previously
|
||||
scheduled tasks.
|
||||
|
||||
```javascript
|
||||
asap(function () {
|
||||
// ...
|
||||
})
|
||||
```
|
||||
|
||||
[zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
|
||||
|
||||
This CommonJS package provides an `asap` module that exports a function that
|
||||
ruts a task function _as soon as possible_.
|
||||
|
||||
ASAP strives to schedule events to occur before yielding for IO, reflow,
|
||||
or redrawing.
|
||||
Each event receives an independent stack, with only platform code in parent
|
||||
frames and the events run in the order they are scheduled.
|
||||
|
||||
ASAP provides a fast event queue that will run tasks until it is
|
||||
empty before yielding to the JavaScript engine's underlying event-loop.
|
||||
When a task gets added to a previously empty event queue, ASAP schedules a flush
|
||||
event, preferring for that event to occur before the JavaScript engine has an
|
||||
opportunity to perform IO tasks or rendering, thus making the first task and
|
||||
subsequent tasks semantically indistinguishable.
|
||||
ASAP uses a variety of techniques to preserve this invariant on different
|
||||
versions of browsers and Node.js.
|
||||
|
||||
By design, ASAP prevents input events from being handled until the task
|
||||
queue is empty.
|
||||
If the process is busy enough, this may cause incoming connection requests to be
|
||||
dropped, and may cause existing connections to inform the sender to reduce the
|
||||
transmission rate or stall.
|
||||
ASAP allows this on the theory that, if there is enough work to do, there is no
|
||||
sense in looking for trouble.
|
||||
As a consequence, ASAP can interfere with smooth animation.
|
||||
If your task should be tied to the rendering loop, consider using
|
||||
`requestAnimationFrame` instead.
|
||||
A long sequence of tasks can also effect the long running script dialog.
|
||||
If this is a problem, you may be able to use ASAP’s cousin `setImmediate` to
|
||||
break long processes into shorter intervals and periodically allow the browser
|
||||
to breathe.
|
||||
`setImmediate` will yield for IO, reflow, and repaint events.
|
||||
It also returns a handler and can be canceled.
|
||||
For a `setImmediate` shim, consider [YuzuJS setImmediate][setimmediate].
|
||||
|
||||
[setimmediate]: https://github.com/YuzuJS/setImmediate
|
||||
|
||||
Take care.
|
||||
ASAP can sustain infinite recursive calls without warning.
|
||||
It will not halt from a stack overflow, and it will not consume unbounded
|
||||
memory.
|
||||
This is behaviorally equivalent to an infinite loop.
|
||||
As with infinite loops, you can monitor a Node.js process for this behavior
|
||||
with a heart-beat signal.
|
||||
As with infinite loops, a very small amount of caution goes a long way to
|
||||
avoiding problems.
|
||||
|
||||
```javascript
|
||||
function loop() {
|
||||
asap(loop)
|
||||
}
|
||||
loop()
|
||||
```
|
||||
|
||||
In browsers, if a task throws an exception, it will not interrupt the flushing
|
||||
of high-priority tasks.
|
||||
The exception will be postponed to a later, low-priority event to avoid
|
||||
slow-downs.
|
||||
In Node.js, if a task throws an exception, ASAP will resume flushing only if—and
|
||||
only after—the error is handled by `domain.on("error")` or
|
||||
`process.on("uncaughtException")`.
|
||||
|
||||
## Raw ASAP
|
||||
|
||||
Checking for exceptions comes at a cost.
|
||||
The package also provides an `asap/raw` module that exports the underlying
|
||||
implementation which is faster but stalls if a task throws an exception.
|
||||
This internal version of the ASAP function does not check for errors.
|
||||
If a task does throw an error, it will stall the event queue unless you manually
|
||||
call `rawAsap.requestFlush()` before throwing the error, or any time after.
|
||||
|
||||
In Node.js, `asap/raw` also runs all tasks outside any domain.
|
||||
If you need a task to be bound to your domain, you will have to do it manually.
|
||||
|
||||
```js
|
||||
if (process.domain) {
|
||||
task = process.domain.bind(task)
|
||||
}
|
||||
rawAsap(task)
|
||||
```
|
||||
|
||||
## Tasks
|
||||
|
||||
A task may be any object that implements `call()`.
|
||||
A function will suffice, but closures tend not to be reusable and can cause
|
||||
garbage collector churn.
|
||||
Both `asap` and `rawAsap` accept task objects to give you the option of
|
||||
recycling task objects or using higher callable object abstractions.
|
||||
See the `asap` source for an illustration.
|
||||
|
||||
## Compatibility
|
||||
|
||||
ASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.
|
||||
The following charts capture the browser test results for the most recent
|
||||
release.
|
||||
The first chart shows test results for ASAP running in the main window context.
|
||||
The second chart shows test results for ASAP running in a web worker context.
|
||||
Test results are inconclusive (grey) on browsers that do not support web
|
||||
workers.
|
||||
These data are captured automatically by [Continuous
|
||||
Integration][].
|
||||
|
||||
[continuous integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Caveats
|
||||
|
||||
When a task is added to an empty event queue, it is not always possible to
|
||||
guarantee that the task queue will begin flushing immediately after the current
|
||||
event.
|
||||
However, once the task queue begins flushing, it will not yield until the queue
|
||||
is empty, even if the queue grows while running tasks.
|
||||
|
||||
The following browsers allow the use of [DOM mutation observers][] to access
|
||||
the HTML [microtask queue][], and thus begin flushing ASAP's task queue
|
||||
immediately at the end of the current event loop turn, before any rendering or
|
||||
IO:
|
||||
|
||||
[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue
|
||||
[dom mutation observers]: http://dom.spec.whatwg.org/#mutation-observers
|
||||
|
||||
- Android 4–4.3
|
||||
- Chrome 26–34
|
||||
- Firefox 14–29
|
||||
- Internet Explorer 11
|
||||
- iPad Safari 6–7.1
|
||||
- iPhone Safari 7–7.1
|
||||
- Safari 6–7
|
||||
|
||||
In the absense of mutation observers, there are a few browsers, and situations
|
||||
like web workers in some of the above browsers, where [message channels][]
|
||||
would be a useful way to avoid falling back to timers.
|
||||
Message channels give direct access to the HTML [task queue][], so the ASAP
|
||||
task queue would flush after any already queued rendering and IO tasks, but
|
||||
without having the minimum delay imposed by timers.
|
||||
However, among these browsers, Internet Explorer 10 and Safari do not reliably
|
||||
dispatch messages, so they are not worth the trouble to implement.
|
||||
|
||||
[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels
|
||||
[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task
|
||||
|
||||
- Internet Explorer 10
|
||||
- Safair 5.0-1
|
||||
- Opera 11-12
|
||||
|
||||
In the absense of mutation observers, these browsers and the following browsers
|
||||
all fall back to using `setTimeout` and `setInterval` to ensure that a `flush`
|
||||
occurs.
|
||||
The implementation uses both and cancels whatever handler loses the race, since
|
||||
`setTimeout` tends to occasionally skip tasks in unisolated circumstances.
|
||||
Timers generally delay the flushing of ASAP's task queue for four milliseconds.
|
||||
|
||||
- Firefox 3–13
|
||||
- Internet Explorer 6–10
|
||||
- iPad Safari 4.3
|
||||
- Lynx 2.8.7
|
||||
|
||||
## Heritage
|
||||
|
||||
ASAP has been factored out of the [Q][] asynchronous promise library.
|
||||
It originally had a naïve implementation in terms of `setTimeout`, but
|
||||
[Malte Ubl][nonblocking] provided an insight that `postMessage` might be
|
||||
useful for creating a high-priority, no-delay event dispatch hack.
|
||||
Since then, Internet Explorer proposed and implemented `setImmediate`.
|
||||
Robert Katić began contributing to Q by measuring the performance of
|
||||
the internal implementation of `asap`, paying particular attention to
|
||||
error recovery.
|
||||
Domenic, Robert, and Kris Kowal collectively settled on the current strategy of
|
||||
unrolling the high-priority event queue internally regardless of what strategy
|
||||
we used to dispatch the potentially lower-priority flush event.
|
||||
Domenic went on to make ASAP cooperate with Node.js domains.
|
||||
|
||||
[q]: https://github.com/kriskowal/q
|
||||
[nonblocking]: http://www.nonblocking.io/2011/06/windownexttick.html
|
||||
|
||||
For further reading, Nicholas Zakas provided a thorough article on [The
|
||||
Case for setImmediate][ncz].
|
||||
|
||||
[ncz]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
|
||||
|
||||
Ember’s RSVP promise implementation later [adopted][rsvp asap] the name ASAP but
|
||||
further developed the implentation.
|
||||
Particularly, The `MessagePort` implementation was abandoned due to interaction
|
||||
[problems with Mobile Internet Explorer][ie problems] in favor of an
|
||||
implementation backed on the newer and more reliable DOM `MutationObserver`
|
||||
interface.
|
||||
These changes were back-ported into this library.
|
||||
|
||||
[ie problems]: https://github.com/cujojs/when/issues/197
|
||||
[rsvp asap]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
|
||||
|
||||
In addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained
|
||||
exception-safe, but `asap/raw` provided a tight kernel that could be used for
|
||||
tasks that guaranteed that they would not throw exceptions.
|
||||
This core is useful for promise implementations that capture thrown errors in
|
||||
rejected promises and do not need a second safety net.
|
||||
At the same time, the exception handling in `asap` was factored into separate
|
||||
implementations for Node.js and browsers, using the the [Browserify][browser config] `browser` property in `package.json` to instruct browser module loaders
|
||||
and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the
|
||||
browser-only implementation.
|
||||
|
||||
[browser config]: https://gist.github.com/defunctzombie/4339901
|
||||
[browserify]: https://github.com/substack/node-browserify
|
||||
[mr]: https://github.com/montagejs/mr
|
||||
[mop]: https://github.com/montagejs/mop
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2009-2014 by Contributors
|
||||
MIT License (enclosed)
|
||||
14
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.d.ts
generated
vendored
14
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.d.ts
generated
vendored
@@ -1,14 +0,0 @@
|
||||
import type { Task } from './types.js';
|
||||
export declare class AsapQueue {
|
||||
private queue;
|
||||
private pendingErrors;
|
||||
private flushing;
|
||||
private requestFlush;
|
||||
private requestErrorThrow;
|
||||
private index;
|
||||
private capacity;
|
||||
constructor();
|
||||
enqueueTask(task: Task): void;
|
||||
private flush;
|
||||
registerPendingError: (err: any) => void;
|
||||
}
|
||||
139
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.js
generated
vendored
139
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.js
generated
vendored
@@ -1,139 +0,0 @@
|
||||
/* eslint-disable no-restricted-globals, @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-non-null-assertion */ import { makeRequestCall, makeRequestCallFromTimer } from './makeRequestCall.js';
|
||||
export class AsapQueue {
|
||||
// Use the fastest means possible to execute a task in its own turn, with
|
||||
// priority over other events including IO, animation, reflow, and redraw
|
||||
// events in browsers.
|
||||
//
|
||||
// An exception thrown by a task will permanently interrupt the processing of
|
||||
// subsequent tasks. The higher level `asap` function ensures that if an
|
||||
// exception is thrown by a task, that the task queue will continue flushing as
|
||||
// soon as possible, but if you use `rawAsap` directly, you are responsible to
|
||||
// either ensure that no exceptions are thrown from your task, or to manually
|
||||
// call `rawAsap.requestFlush` if an exception is thrown.
|
||||
enqueueTask(task) {
|
||||
const { queue: q , requestFlush } = this;
|
||||
if (!q.length) {
|
||||
requestFlush();
|
||||
this.flushing = true;
|
||||
}
|
||||
// Equivalent to push, but avoids a function call.
|
||||
q[q.length] = task;
|
||||
}
|
||||
constructor(){
|
||||
this.queue = [];
|
||||
// We queue errors to ensure they are thrown in right order (FIFO).
|
||||
// Array-as-queue is good enough here, since we are just dealing with exceptions.
|
||||
this.pendingErrors = [];
|
||||
// Once a flush has been requested, no further calls to `requestFlush` are
|
||||
// necessary until the next `flush` completes.
|
||||
// @ts-ignore
|
||||
this.flushing = false;
|
||||
// The position of the next task to execute in the task queue. This is
|
||||
// preserved between calls to `flush` so that it can be resumed if
|
||||
// a task throws an exception.
|
||||
this.index = 0;
|
||||
// If a task schedules additional tasks recursively, the task queue can grow
|
||||
// unbounded. To prevent memory exhaustion, the task queue will periodically
|
||||
// truncate already-completed tasks.
|
||||
this.capacity = 1024;
|
||||
// The flush function processes all tasks that have been scheduled with
|
||||
// `rawAsap` unless and until one of those tasks throws an exception.
|
||||
// If a task throws an exception, `flush` ensures that its state will remain
|
||||
// consistent and will resume where it left off when called again.
|
||||
// However, `flush` does not make any arrangements to be called again if an
|
||||
// exception is thrown.
|
||||
this.flush = ()=>{
|
||||
const { queue: q } = this;
|
||||
while(this.index < q.length){
|
||||
const currentIndex = this.index;
|
||||
// Advance the index before calling the task. This ensures that we will
|
||||
// begin flushing on the next task the task throws an error.
|
||||
this.index++;
|
||||
q[currentIndex].call();
|
||||
// Prevent leaking memory for long chains of recursive calls to `asap`.
|
||||
// If we call `asap` within tasks scheduled by `asap`, the queue will
|
||||
// grow, but to avoid an O(n) walk for every task we execute, we don't
|
||||
// shift tasks off the queue after they have been executed.
|
||||
// Instead, we periodically shift 1024 tasks off the queue.
|
||||
if (this.index > this.capacity) {
|
||||
// Manually shift all values starting at the index back to the
|
||||
// beginning of the queue.
|
||||
for(let scan = 0, newLength = q.length - this.index; scan < newLength; scan++){
|
||||
q[scan] = q[scan + this.index];
|
||||
}
|
||||
q.length -= this.index;
|
||||
this.index = 0;
|
||||
}
|
||||
}
|
||||
q.length = 0;
|
||||
this.index = 0;
|
||||
this.flushing = false;
|
||||
};
|
||||
// In a web browser, exceptions are not fatal. However, to avoid
|
||||
// slowing down the queue of pending tasks, we rethrow the error in a
|
||||
// lower priority turn.
|
||||
this.registerPendingError = (err)=>{
|
||||
this.pendingErrors.push(err);
|
||||
this.requestErrorThrow();
|
||||
};
|
||||
// `requestFlush` requests that the high priority event queue be flushed as
|
||||
// soon as possible.
|
||||
// This is useful to prevent an error thrown in a task from stalling the event
|
||||
// queue if the exception handled by Node.js’s
|
||||
// `process.on("uncaughtException")` or by a domain.
|
||||
// `requestFlush` is implemented using a strategy based on data collected from
|
||||
// every available SauceLabs Selenium web driver worker at time of writing.
|
||||
// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
|
||||
this.requestFlush = makeRequestCall(this.flush);
|
||||
this.requestErrorThrow = makeRequestCallFromTimer(()=>{
|
||||
// Throw first error
|
||||
if (this.pendingErrors.length) {
|
||||
throw this.pendingErrors.shift();
|
||||
}
|
||||
});
|
||||
}
|
||||
} // The message channel technique was discovered by Malte Ubl and was the
|
||||
// original foundation for this library.
|
||||
// http://www.nonblocking.io/2011/06/windownexttick.html
|
||||
// Safari 6.0.5 (at least) intermittently fails to create message ports on a
|
||||
// page's first load. Thankfully, this version of Safari supports
|
||||
// MutationObservers, so we don't need to fall back in that case.
|
||||
// function makeRequestCallFromMessageChannel(callback) {
|
||||
// var channel = new MessageChannel();
|
||||
// channel.port1.onmessage = callback;
|
||||
// return function requestCall() {
|
||||
// channel.port2.postMessage(0);
|
||||
// };
|
||||
// }
|
||||
// For reasons explained above, we are also unable to use `setImmediate`
|
||||
// under any circumstances.
|
||||
// Even if we were, there is another bug in Internet Explorer 10.
|
||||
// It is not sufficient to assign `setImmediate` to `requestFlush` because
|
||||
// `setImmediate` must be called *by name* and therefore must be wrapped in a
|
||||
// closure.
|
||||
// Never forget.
|
||||
// function makeRequestCallFromSetImmediate(callback) {
|
||||
// return function requestCall() {
|
||||
// setImmediate(callback);
|
||||
// };
|
||||
// }
|
||||
// Safari 6.0 has a problem where timers will get lost while the user is
|
||||
// scrolling. This problem does not impact ASAP because Safari 6.0 supports
|
||||
// mutation observers, so that implementation is used instead.
|
||||
// However, if we ever elect to use timers in Safari, the prevalent work-around
|
||||
// is to add a scroll event listener that calls for a flush.
|
||||
// `setTimeout` does not call the passed callback if the delay is less than
|
||||
// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
|
||||
// even then.
|
||||
// This is for `asap.js` only.
|
||||
// Its name will be periodically randomized to break any code that depends on
|
||||
// // its existence.
|
||||
// rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer
|
||||
// ASAP was originally a nextTick shim included in Q. This was factored out
|
||||
// into this ASAP package. It was later adapted to RSVP which made further
|
||||
// amendments. These decisions, particularly to marginalize MessageChannel and
|
||||
// to capture the MutationObserver implementation in a closure, were integrated
|
||||
// back into ASAP proper.
|
||||
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
|
||||
|
||||
//# sourceMappingURL=AsapQueue.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/AsapQueue.js.map
generated
vendored
File diff suppressed because one or more lines are too long
8
frontend/node_modules/@react-dnd/asap/dist/RawTask.d.ts
generated
vendored
8
frontend/node_modules/@react-dnd/asap/dist/RawTask.d.ts
generated
vendored
@@ -1,8 +0,0 @@
|
||||
import type { Task, TaskFn } from 'types';
|
||||
export declare class RawTask implements Task {
|
||||
private onError;
|
||||
private release;
|
||||
task: TaskFn | null;
|
||||
constructor(onError: (err: any) => void, release: (t: RawTask) => void);
|
||||
call(): void;
|
||||
}
|
||||
20
frontend/node_modules/@react-dnd/asap/dist/RawTask.js
generated
vendored
20
frontend/node_modules/@react-dnd/asap/dist/RawTask.js
generated
vendored
@@ -1,20 +0,0 @@
|
||||
// `call`, just like a function.
|
||||
export class RawTask {
|
||||
call() {
|
||||
try {
|
||||
this.task && this.task();
|
||||
} catch (error) {
|
||||
this.onError(error);
|
||||
} finally{
|
||||
this.task = null;
|
||||
this.release(this);
|
||||
}
|
||||
}
|
||||
constructor(onError, release){
|
||||
this.onError = onError;
|
||||
this.release = release;
|
||||
this.task = null;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=RawTask.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/RawTask.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/RawTask.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/RawTask.ts"],"sourcesContent":["// We wrap tasks with recyclable task objects. A task object implements\n\nimport type { Task, TaskFn } from 'types'\n\n// `call`, just like a function.\nexport class RawTask implements Task {\n\tpublic task: TaskFn | null = null\n\n\tpublic constructor(\n\t\tprivate onError: (err: any) => void,\n\t\tprivate release: (t: RawTask) => void,\n\t) {}\n\n\tpublic call() {\n\t\ttry {\n\t\t\tthis.task && this.task()\n\t\t} catch (error) {\n\t\t\tthis.onError(error)\n\t\t} finally {\n\t\t\tthis.task = null\n\t\t\tthis.release(this)\n\t\t}\n\t}\n}\n"],"names":["RawTask","call","task","error","onError","release"],"mappings":"AAIA,gCAAgC;AAChC,OAAO,MAAMA,OAAO;IAQnB,AAAOC,IAAI,GAAG;QACb,IAAI;YACH,IAAI,CAACC,IAAI,IAAI,IAAI,CAACA,IAAI,EAAE;SACxB,CAAC,OAAOC,KAAK,EAAE;YACf,IAAI,CAACC,OAAO,CAACD,KAAK,CAAC;SACnB,QAAS;YACT,IAAI,CAACD,IAAI,GAAG,IAAI;YAChB,IAAI,CAACG,OAAO,CAAC,IAAI,CAAC;SAClB;KACD;IAdD,YACSD,OAA2B,EAC3BC,OAA6B,CACpC;aAFOD,OAA2B,GAA3BA,OAA2B;aAC3BC,OAA6B,GAA7BA,OAA6B;aAJ/BH,IAAI,GAAkB,IAAI;KAK7B;CAYJ"}
|
||||
7
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.d.ts
generated
vendored
7
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.d.ts
generated
vendored
@@ -1,7 +0,0 @@
|
||||
import type { Task } from './types.js';
|
||||
export declare class TaskFactory {
|
||||
private onError;
|
||||
private freeTasks;
|
||||
constructor(onError: (err: any) => void);
|
||||
create(task: () => void): Task;
|
||||
}
|
||||
16
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.js
generated
vendored
16
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.js
generated
vendored
@@ -1,16 +0,0 @@
|
||||
import { RawTask } from './RawTask.js';
|
||||
export class TaskFactory {
|
||||
create(task) {
|
||||
const tasks = this.freeTasks;
|
||||
const t1 = tasks.length ? tasks.pop() : new RawTask(this.onError, (t)=>tasks[tasks.length] = t
|
||||
);
|
||||
t1.task = task;
|
||||
return t1;
|
||||
}
|
||||
constructor(onError){
|
||||
this.onError = onError;
|
||||
this.freeTasks = [];
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=TaskFactory.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/TaskFactory.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/TaskFactory.ts"],"sourcesContent":["import { RawTask } from './RawTask.js'\nimport type { Task } from './types.js'\n\nexport class TaskFactory {\n\tprivate freeTasks: RawTask[] = []\n\n\tpublic constructor(private onError: (err: any) => void) {}\n\n\tpublic create(task: () => void): Task {\n\t\tconst tasks = this.freeTasks\n\t\tconst t = tasks.length\n\t\t\t? (tasks.pop() as RawTask)\n\t\t\t: new RawTask(this.onError, (t) => (tasks[tasks.length] = t))\n\t\tt.task = task\n\t\treturn t\n\t}\n}\n"],"names":["RawTask","TaskFactory","create","task","tasks","freeTasks","t","length","pop","onError"],"mappings":"AAAA,SAASA,OAAO,QAAQ,cAAc,CAAA;AAGtC,OAAO,MAAMC,WAAW;IAKvB,AAAOC,MAAM,CAACC,IAAgB,EAAQ;QACrC,MAAMC,KAAK,GAAG,IAAI,CAACC,SAAS;QAC5B,MAAMC,EAAC,GAAGF,KAAK,CAACG,MAAM,GAClBH,KAAK,CAACI,GAAG,EAAE,GACZ,IAAIR,OAAO,CAAC,IAAI,CAACS,OAAO,EAAE,CAACH,CAAC,GAAMF,KAAK,CAACA,KAAK,CAACG,MAAM,CAAC,GAAGD,CAAC;QAAC,CAAC;QAC9DA,EAAC,CAACH,IAAI,GAAGA,IAAI;QACb,OAAOG,EAAC,CAAA;KACR;IATD,YAA2BG,OAA2B,CAAE;aAA7BA,OAA2B,GAA3BA,OAA2B;aAF9CJ,SAAS,GAAc,EAAE;KAEyB;CAU1D"}
|
||||
10
frontend/node_modules/@react-dnd/asap/dist/asap.d.ts
generated
vendored
10
frontend/node_modules/@react-dnd/asap/dist/asap.d.ts
generated
vendored
@@ -1,10 +0,0 @@
|
||||
import type { TaskFn } from './types.js';
|
||||
/**
|
||||
* Calls a task as soon as possible after returning, in its own event, with priority
|
||||
* over other events like animation, reflow, and repaint. An error thrown from an
|
||||
* event will not interrupt, nor even substantially slow down the processing of
|
||||
* other events, but will be rather postponed to a lower priority event.
|
||||
* @param {{call}} task A callable object, typically a function that takes no
|
||||
* arguments.
|
||||
*/
|
||||
export declare function asap(task: TaskFn): void;
|
||||
16
frontend/node_modules/@react-dnd/asap/dist/asap.js
generated
vendored
16
frontend/node_modules/@react-dnd/asap/dist/asap.js
generated
vendored
@@ -1,16 +0,0 @@
|
||||
import { AsapQueue } from './AsapQueue.js';
|
||||
import { TaskFactory } from './TaskFactory.js';
|
||||
const asapQueue = new AsapQueue();
|
||||
const taskFactory = new TaskFactory(asapQueue.registerPendingError);
|
||||
/**
|
||||
* Calls a task as soon as possible after returning, in its own event, with priority
|
||||
* over other events like animation, reflow, and repaint. An error thrown from an
|
||||
* event will not interrupt, nor even substantially slow down the processing of
|
||||
* other events, but will be rather postponed to a lower priority event.
|
||||
* @param {{call}} task A callable object, typically a function that takes no
|
||||
* arguments.
|
||||
*/ export function asap(task) {
|
||||
asapQueue.enqueueTask(taskFactory.create(task));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=asap.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/asap.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/asap.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/asap.ts"],"sourcesContent":["import { AsapQueue } from './AsapQueue.js'\nimport { TaskFactory } from './TaskFactory.js'\nimport type { TaskFn } from './types.js'\n\nconst asapQueue = new AsapQueue()\nconst taskFactory = new TaskFactory(asapQueue.registerPendingError)\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nexport function asap(task: TaskFn) {\n\tasapQueue.enqueueTask(taskFactory.create(task))\n}\n"],"names":["AsapQueue","TaskFactory","asapQueue","taskFactory","registerPendingError","asap","task","enqueueTask","create"],"mappings":"AAAA,SAASA,SAAS,QAAQ,gBAAgB,CAAA;AAC1C,SAASC,WAAW,QAAQ,kBAAkB,CAAA;AAG9C,MAAMC,SAAS,GAAG,IAAIF,SAAS,EAAE;AACjC,MAAMG,WAAW,GAAG,IAAIF,WAAW,CAACC,SAAS,CAACE,oBAAoB,CAAC;AAEnE;;;;;;;GAOG,CACH,OAAO,SAASC,IAAI,CAACC,IAAY,EAAE;IAClCJ,SAAS,CAACK,WAAW,CAACJ,WAAW,CAACK,MAAM,CAACF,IAAI,CAAC,CAAC;CAC/C"}
|
||||
4
frontend/node_modules/@react-dnd/asap/dist/index.d.ts
generated
vendored
4
frontend/node_modules/@react-dnd/asap/dist/index.d.ts
generated
vendored
@@ -1,4 +0,0 @@
|
||||
export * from './asap.js';
|
||||
export * from './AsapQueue.js';
|
||||
export * from './TaskFactory.js';
|
||||
export * from './types.js';
|
||||
6
frontend/node_modules/@react-dnd/asap/dist/index.js
generated
vendored
6
frontend/node_modules/@react-dnd/asap/dist/index.js
generated
vendored
@@ -1,6 +0,0 @@
|
||||
export * from './asap.js';
|
||||
export * from './AsapQueue.js';
|
||||
export * from './TaskFactory.js';
|
||||
export * from './types.js';
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/index.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './asap.js'\nexport * from './AsapQueue.js'\nexport * from './TaskFactory.js'\nexport * from './types.js'\n"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
|
||||
3
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.d.ts
generated
vendored
3
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.d.ts
generated
vendored
@@ -1,3 +0,0 @@
|
||||
export declare function makeRequestCallFromTimer(callback: () => void): () => void;
|
||||
export declare function makeRequestCallFromMutationObserver(callback: () => void): () => void;
|
||||
export declare const makeRequestCall: typeof makeRequestCallFromMutationObserver;
|
||||
77
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.js
generated
vendored
77
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.js
generated
vendored
@@ -1,77 +0,0 @@
|
||||
// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
|
||||
// have WebKitMutationObserver but not un-prefixed MutationObserver.
|
||||
// Must use `global` or `self` instead of `window` to work in both frames and web
|
||||
// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
|
||||
/* globals self */ const scope = typeof global !== 'undefined' ? global : self;
|
||||
const BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
|
||||
export function makeRequestCallFromTimer(callback) {
|
||||
return function requestCall() {
|
||||
// We dispatch a timeout with a specified delay of 0 for engines that
|
||||
// can reliably accommodate that request. This will usually be snapped
|
||||
// to a 4 milisecond delay, but once we're flushing, there's no delay
|
||||
// between events.
|
||||
const timeoutHandle = setTimeout(handleTimer, 0);
|
||||
// However, since this timer gets frequently dropped in Firefox
|
||||
// workers, we enlist an interval handle that will try to fire
|
||||
// an event 20 times per second until it succeeds.
|
||||
const intervalHandle = setInterval(handleTimer, 50);
|
||||
function handleTimer() {
|
||||
// Whichever timer succeeds will cancel both timers and
|
||||
// execute the callback.
|
||||
clearTimeout(timeoutHandle);
|
||||
clearInterval(intervalHandle);
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}
|
||||
// To request a high priority event, we induce a mutation observer by toggling
|
||||
// the text of a text node between "1" and "-1".
|
||||
export function makeRequestCallFromMutationObserver(callback) {
|
||||
let toggle = 1;
|
||||
const observer = new BrowserMutationObserver(callback);
|
||||
const node = document.createTextNode('');
|
||||
observer.observe(node, {
|
||||
characterData: true
|
||||
});
|
||||
return function requestCall() {
|
||||
toggle = -toggle;
|
||||
node.data = toggle;
|
||||
};
|
||||
}
|
||||
export const makeRequestCall = typeof BrowserMutationObserver === 'function' ? // reliably everywhere they are implemented.
|
||||
// They are implemented in all modern browsers.
|
||||
//
|
||||
// - Android 4-4.3
|
||||
// - Chrome 26-34
|
||||
// - Firefox 14-29
|
||||
// - Internet Explorer 11
|
||||
// - iPad Safari 6-7.1
|
||||
// - iPhone Safari 7-7.1
|
||||
// - Safari 6-7
|
||||
makeRequestCallFromMutationObserver : // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
||||
// 11-12, and in web workers in many engines.
|
||||
// Although message channels yield to any queued rendering and IO tasks, they
|
||||
// would be better than imposing the 4ms delay of timers.
|
||||
// However, they do not work reliably in Internet Explorer or Safari.
|
||||
// Internet Explorer 10 is the only browser that has setImmediate but does
|
||||
// not have MutationObservers.
|
||||
// Although setImmediate yields to the browser's renderer, it would be
|
||||
// preferrable to falling back to setTimeout since it does not have
|
||||
// the minimum 4ms penalty.
|
||||
// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
|
||||
// Desktop to a lesser extent) that renders both setImmediate and
|
||||
// MessageChannel useless for the purposes of ASAP.
|
||||
// https://github.com/kriskowal/q/issues/396
|
||||
// Timers are implemented universally.
|
||||
// We fall back to timers in workers in most engines, and in foreground
|
||||
// contexts in the following browsers.
|
||||
// However, note that even this simple case requires nuances to operate in a
|
||||
// broad spectrum of browsers.
|
||||
//
|
||||
// - Firefox 3-13
|
||||
// - Internet Explorer 6-9
|
||||
// - iPad Safari 4.3
|
||||
// - Lynx 2.8.7
|
||||
makeRequestCallFromTimer;
|
||||
|
||||
//# sourceMappingURL=makeRequestCall.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4
frontend/node_modules/@react-dnd/asap/dist/types.d.ts
generated
vendored
4
frontend/node_modules/@react-dnd/asap/dist/types.d.ts
generated
vendored
@@ -1,4 +0,0 @@
|
||||
export interface Task {
|
||||
call(): void;
|
||||
}
|
||||
export declare type TaskFn = () => void;
|
||||
3
frontend/node_modules/@react-dnd/asap/dist/types.js
generated
vendored
3
frontend/node_modules/@react-dnd/asap/dist/types.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
frontend/node_modules/@react-dnd/asap/dist/types.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/asap/dist/types.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["export interface Task {\n\tcall(): void\n}\nexport type TaskFn = () => void\n"],"names":[],"mappings":"AAAA,WAG+B"}
|
||||
33
frontend/node_modules/@react-dnd/asap/package.json
generated
vendored
33
frontend/node_modules/@react-dnd/asap/package.json
generated
vendored
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "@react-dnd/asap",
|
||||
"version": "5.0.2",
|
||||
"description": "High-priority task queue for Node.js and browsers",
|
||||
"keywords": [
|
||||
"event",
|
||||
"task",
|
||||
"queue"
|
||||
],
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"clean": "shx rm -rf dist/",
|
||||
"build_types": "tsc -b .",
|
||||
"build_esm": "swc -C module.type=es6 -d dist src/",
|
||||
"build": "run-s build_types build_esm"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/react-dnd/react-dnd"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "^0.1.57",
|
||||
"@swc/core": "^1.2.168",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^17.0.25",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"shx": "^0.3.4",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
165
frontend/node_modules/@react-dnd/asap/src/AsapQueue.ts
generated
vendored
165
frontend/node_modules/@react-dnd/asap/src/AsapQueue.ts
generated
vendored
@@ -1,165 +0,0 @@
|
||||
/* eslint-disable no-restricted-globals, @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-non-null-assertion */
|
||||
import { makeRequestCall, makeRequestCallFromTimer } from './makeRequestCall.js'
|
||||
import type { Task } from './types.js'
|
||||
|
||||
export class AsapQueue {
|
||||
private queue: Task[] = []
|
||||
// We queue errors to ensure they are thrown in right order (FIFO).
|
||||
// Array-as-queue is good enough here, since we are just dealing with exceptions.
|
||||
private pendingErrors: any[] = []
|
||||
// Once a flush has been requested, no further calls to `requestFlush` are
|
||||
// necessary until the next `flush` completes.
|
||||
// @ts-ignore
|
||||
private flushing = false
|
||||
// `requestFlush` is an implementation-specific method that attempts to kick
|
||||
// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
|
||||
// the event queue before yielding to the browser's own event loop.
|
||||
private requestFlush: () => void
|
||||
|
||||
private requestErrorThrow: () => void
|
||||
// The position of the next task to execute in the task queue. This is
|
||||
// preserved between calls to `flush` so that it can be resumed if
|
||||
// a task throws an exception.
|
||||
private index = 0
|
||||
// If a task schedules additional tasks recursively, the task queue can grow
|
||||
// unbounded. To prevent memory exhaustion, the task queue will periodically
|
||||
// truncate already-completed tasks.
|
||||
private capacity = 1024
|
||||
|
||||
public constructor() {
|
||||
// `requestFlush` requests that the high priority event queue be flushed as
|
||||
// soon as possible.
|
||||
// This is useful to prevent an error thrown in a task from stalling the event
|
||||
// queue if the exception handled by Node.js’s
|
||||
// `process.on("uncaughtException")` or by a domain.
|
||||
|
||||
// `requestFlush` is implemented using a strategy based on data collected from
|
||||
// every available SauceLabs Selenium web driver worker at time of writing.
|
||||
// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
|
||||
this.requestFlush = makeRequestCall(this.flush)
|
||||
this.requestErrorThrow = makeRequestCallFromTimer(() => {
|
||||
// Throw first error
|
||||
if (this.pendingErrors.length) {
|
||||
throw this.pendingErrors.shift()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Use the fastest means possible to execute a task in its own turn, with
|
||||
// priority over other events including IO, animation, reflow, and redraw
|
||||
// events in browsers.
|
||||
//
|
||||
// An exception thrown by a task will permanently interrupt the processing of
|
||||
// subsequent tasks. The higher level `asap` function ensures that if an
|
||||
// exception is thrown by a task, that the task queue will continue flushing as
|
||||
// soon as possible, but if you use `rawAsap` directly, you are responsible to
|
||||
// either ensure that no exceptions are thrown from your task, or to manually
|
||||
// call `rawAsap.requestFlush` if an exception is thrown.
|
||||
public enqueueTask(task: Task): void {
|
||||
const { queue: q, requestFlush } = this
|
||||
if (!q.length) {
|
||||
requestFlush()
|
||||
this.flushing = true
|
||||
}
|
||||
// Equivalent to push, but avoids a function call.
|
||||
q[q.length] = task
|
||||
}
|
||||
|
||||
// The flush function processes all tasks that have been scheduled with
|
||||
// `rawAsap` unless and until one of those tasks throws an exception.
|
||||
// If a task throws an exception, `flush` ensures that its state will remain
|
||||
// consistent and will resume where it left off when called again.
|
||||
// However, `flush` does not make any arrangements to be called again if an
|
||||
// exception is thrown.
|
||||
private flush = () => {
|
||||
const { queue: q } = this
|
||||
while (this.index < q.length) {
|
||||
const currentIndex = this.index
|
||||
// Advance the index before calling the task. This ensures that we will
|
||||
// begin flushing on the next task the task throws an error.
|
||||
this.index++
|
||||
q[currentIndex]!.call()
|
||||
// Prevent leaking memory for long chains of recursive calls to `asap`.
|
||||
// If we call `asap` within tasks scheduled by `asap`, the queue will
|
||||
// grow, but to avoid an O(n) walk for every task we execute, we don't
|
||||
// shift tasks off the queue after they have been executed.
|
||||
// Instead, we periodically shift 1024 tasks off the queue.
|
||||
if (this.index > this.capacity) {
|
||||
// Manually shift all values starting at the index back to the
|
||||
// beginning of the queue.
|
||||
for (
|
||||
let scan = 0, newLength = q.length - this.index;
|
||||
scan < newLength;
|
||||
scan++
|
||||
) {
|
||||
q[scan] = q[scan + this.index]!
|
||||
}
|
||||
q.length -= this.index
|
||||
this.index = 0
|
||||
}
|
||||
}
|
||||
q.length = 0
|
||||
this.index = 0
|
||||
this.flushing = false
|
||||
}
|
||||
|
||||
// In a web browser, exceptions are not fatal. However, to avoid
|
||||
// slowing down the queue of pending tasks, we rethrow the error in a
|
||||
// lower priority turn.
|
||||
public registerPendingError = (err: any) => {
|
||||
this.pendingErrors.push(err)
|
||||
this.requestErrorThrow()
|
||||
}
|
||||
}
|
||||
|
||||
// The message channel technique was discovered by Malte Ubl and was the
|
||||
// original foundation for this library.
|
||||
// http://www.nonblocking.io/2011/06/windownexttick.html
|
||||
|
||||
// Safari 6.0.5 (at least) intermittently fails to create message ports on a
|
||||
// page's first load. Thankfully, this version of Safari supports
|
||||
// MutationObservers, so we don't need to fall back in that case.
|
||||
|
||||
// function makeRequestCallFromMessageChannel(callback) {
|
||||
// var channel = new MessageChannel();
|
||||
// channel.port1.onmessage = callback;
|
||||
// return function requestCall() {
|
||||
// channel.port2.postMessage(0);
|
||||
// };
|
||||
// }
|
||||
|
||||
// For reasons explained above, we are also unable to use `setImmediate`
|
||||
// under any circumstances.
|
||||
// Even if we were, there is another bug in Internet Explorer 10.
|
||||
// It is not sufficient to assign `setImmediate` to `requestFlush` because
|
||||
// `setImmediate` must be called *by name* and therefore must be wrapped in a
|
||||
// closure.
|
||||
// Never forget.
|
||||
|
||||
// function makeRequestCallFromSetImmediate(callback) {
|
||||
// return function requestCall() {
|
||||
// setImmediate(callback);
|
||||
// };
|
||||
// }
|
||||
|
||||
// Safari 6.0 has a problem where timers will get lost while the user is
|
||||
// scrolling. This problem does not impact ASAP because Safari 6.0 supports
|
||||
// mutation observers, so that implementation is used instead.
|
||||
// However, if we ever elect to use timers in Safari, the prevalent work-around
|
||||
// is to add a scroll event listener that calls for a flush.
|
||||
|
||||
// `setTimeout` does not call the passed callback if the delay is less than
|
||||
// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
|
||||
// even then.
|
||||
|
||||
// This is for `asap.js` only.
|
||||
// Its name will be periodically randomized to break any code that depends on
|
||||
// // its existence.
|
||||
// rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer
|
||||
|
||||
// ASAP was originally a nextTick shim included in Q. This was factored out
|
||||
// into this ASAP package. It was later adapted to RSVP which made further
|
||||
// amendments. These decisions, particularly to marginalize MessageChannel and
|
||||
// to capture the MutationObserver implementation in a closure, were integrated
|
||||
// back into ASAP proper.
|
||||
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
|
||||
24
frontend/node_modules/@react-dnd/asap/src/RawTask.ts
generated
vendored
24
frontend/node_modules/@react-dnd/asap/src/RawTask.ts
generated
vendored
@@ -1,24 +0,0 @@
|
||||
// We wrap tasks with recyclable task objects. A task object implements
|
||||
|
||||
import type { Task, TaskFn } from 'types'
|
||||
|
||||
// `call`, just like a function.
|
||||
export class RawTask implements Task {
|
||||
public task: TaskFn | null = null
|
||||
|
||||
public constructor(
|
||||
private onError: (err: any) => void,
|
||||
private release: (t: RawTask) => void,
|
||||
) {}
|
||||
|
||||
public call() {
|
||||
try {
|
||||
this.task && this.task()
|
||||
} catch (error) {
|
||||
this.onError(error)
|
||||
} finally {
|
||||
this.task = null
|
||||
this.release(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
17
frontend/node_modules/@react-dnd/asap/src/TaskFactory.ts
generated
vendored
17
frontend/node_modules/@react-dnd/asap/src/TaskFactory.ts
generated
vendored
@@ -1,17 +0,0 @@
|
||||
import { RawTask } from './RawTask.js'
|
||||
import type { Task } from './types.js'
|
||||
|
||||
export class TaskFactory {
|
||||
private freeTasks: RawTask[] = []
|
||||
|
||||
public constructor(private onError: (err: any) => void) {}
|
||||
|
||||
public create(task: () => void): Task {
|
||||
const tasks = this.freeTasks
|
||||
const t = tasks.length
|
||||
? (tasks.pop() as RawTask)
|
||||
: new RawTask(this.onError, (t) => (tasks[tasks.length] = t))
|
||||
t.task = task
|
||||
return t
|
||||
}
|
||||
}
|
||||
18
frontend/node_modules/@react-dnd/asap/src/asap.ts
generated
vendored
18
frontend/node_modules/@react-dnd/asap/src/asap.ts
generated
vendored
@@ -1,18 +0,0 @@
|
||||
import { AsapQueue } from './AsapQueue.js'
|
||||
import { TaskFactory } from './TaskFactory.js'
|
||||
import type { TaskFn } from './types.js'
|
||||
|
||||
const asapQueue = new AsapQueue()
|
||||
const taskFactory = new TaskFactory(asapQueue.registerPendingError)
|
||||
|
||||
/**
|
||||
* Calls a task as soon as possible after returning, in its own event, with priority
|
||||
* over other events like animation, reflow, and repaint. An error thrown from an
|
||||
* event will not interrupt, nor even substantially slow down the processing of
|
||||
* other events, but will be rather postponed to a lower priority event.
|
||||
* @param {{call}} task A callable object, typically a function that takes no
|
||||
* arguments.
|
||||
*/
|
||||
export function asap(task: TaskFn) {
|
||||
asapQueue.enqueueTask(taskFactory.create(task))
|
||||
}
|
||||
4
frontend/node_modules/@react-dnd/asap/src/index.ts
generated
vendored
4
frontend/node_modules/@react-dnd/asap/src/index.ts
generated
vendored
@@ -1,4 +0,0 @@
|
||||
export * from './asap.js'
|
||||
export * from './AsapQueue.js'
|
||||
export * from './TaskFactory.js'
|
||||
export * from './types.js'
|
||||
87
frontend/node_modules/@react-dnd/asap/src/makeRequestCall.ts
generated
vendored
87
frontend/node_modules/@react-dnd/asap/src/makeRequestCall.ts
generated
vendored
@@ -1,87 +0,0 @@
|
||||
// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
|
||||
// have WebKitMutationObserver but not un-prefixed MutationObserver.
|
||||
// Must use `global` or `self` instead of `window` to work in both frames and web
|
||||
// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
|
||||
|
||||
/* globals self */
|
||||
const scope = typeof global !== 'undefined' ? global : self
|
||||
const BrowserMutationObserver =
|
||||
(scope as any).MutationObserver || (scope as any).WebKitMutationObserver
|
||||
|
||||
export function makeRequestCallFromTimer(callback: () => void) {
|
||||
return function requestCall() {
|
||||
// We dispatch a timeout with a specified delay of 0 for engines that
|
||||
// can reliably accommodate that request. This will usually be snapped
|
||||
// to a 4 milisecond delay, but once we're flushing, there's no delay
|
||||
// between events.
|
||||
const timeoutHandle = setTimeout(handleTimer, 0)
|
||||
// However, since this timer gets frequently dropped in Firefox
|
||||
// workers, we enlist an interval handle that will try to fire
|
||||
// an event 20 times per second until it succeeds.
|
||||
const intervalHandle = setInterval(handleTimer, 50)
|
||||
|
||||
function handleTimer() {
|
||||
// Whichever timer succeeds will cancel both timers and
|
||||
// execute the callback.
|
||||
clearTimeout(timeoutHandle)
|
||||
clearInterval(intervalHandle)
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// To request a high priority event, we induce a mutation observer by toggling
|
||||
// the text of a text node between "1" and "-1".
|
||||
export function makeRequestCallFromMutationObserver(callback: () => void) {
|
||||
let toggle = 1
|
||||
const observer = new BrowserMutationObserver(callback)
|
||||
const node = document.createTextNode('')
|
||||
observer.observe(node, { characterData: true })
|
||||
return function requestCall() {
|
||||
toggle = -toggle
|
||||
;(node as any).data = toggle
|
||||
}
|
||||
}
|
||||
|
||||
export const makeRequestCall =
|
||||
typeof BrowserMutationObserver === 'function'
|
||||
? // MutationObservers are desirable because they have high priority and work
|
||||
// reliably everywhere they are implemented.
|
||||
// They are implemented in all modern browsers.
|
||||
//
|
||||
// - Android 4-4.3
|
||||
// - Chrome 26-34
|
||||
// - Firefox 14-29
|
||||
// - Internet Explorer 11
|
||||
// - iPad Safari 6-7.1
|
||||
// - iPhone Safari 7-7.1
|
||||
// - Safari 6-7
|
||||
makeRequestCallFromMutationObserver
|
||||
: // MessageChannels are desirable because they give direct access to the HTML
|
||||
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
||||
// 11-12, and in web workers in many engines.
|
||||
// Although message channels yield to any queued rendering and IO tasks, they
|
||||
// would be better than imposing the 4ms delay of timers.
|
||||
// However, they do not work reliably in Internet Explorer or Safari.
|
||||
|
||||
// Internet Explorer 10 is the only browser that has setImmediate but does
|
||||
// not have MutationObservers.
|
||||
// Although setImmediate yields to the browser's renderer, it would be
|
||||
// preferrable to falling back to setTimeout since it does not have
|
||||
// the minimum 4ms penalty.
|
||||
// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
|
||||
// Desktop to a lesser extent) that renders both setImmediate and
|
||||
// MessageChannel useless for the purposes of ASAP.
|
||||
// https://github.com/kriskowal/q/issues/396
|
||||
|
||||
// Timers are implemented universally.
|
||||
// We fall back to timers in workers in most engines, and in foreground
|
||||
// contexts in the following browsers.
|
||||
// However, note that even this simple case requires nuances to operate in a
|
||||
// broad spectrum of browsers.
|
||||
//
|
||||
// - Firefox 3-13
|
||||
// - Internet Explorer 6-9
|
||||
// - iPad Safari 4.3
|
||||
// - Lynx 2.8.7
|
||||
makeRequestCallFromTimer
|
||||
4
frontend/node_modules/@react-dnd/asap/src/types.ts
generated
vendored
4
frontend/node_modules/@react-dnd/asap/src/types.ts
generated
vendored
@@ -1,4 +0,0 @@
|
||||
export interface Task {
|
||||
call(): void
|
||||
}
|
||||
export type TaskFn = () => void
|
||||
11
frontend/node_modules/@react-dnd/invariant/dist/index.d.ts
generated
vendored
11
frontend/node_modules/@react-dnd/invariant/dist/index.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Use invariant() to assert state which your program assumes to be true.
|
||||
*
|
||||
* Provide sprintf-style format (only %s is supported) and arguments
|
||||
* to provide information about what broke and what you were
|
||||
* expecting.
|
||||
*
|
||||
* The invariant message will be stripped in production, but the invariant
|
||||
* will remain to ensure logic does not differ in production.
|
||||
*/
|
||||
export declare function invariant(condition: any, format: string, ...args: any[]): void;
|
||||
36
frontend/node_modules/@react-dnd/invariant/dist/index.js
generated
vendored
36
frontend/node_modules/@react-dnd/invariant/dist/index.js
generated
vendored
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Use invariant() to assert state which your program assumes to be true.
|
||||
*
|
||||
* Provide sprintf-style format (only %s is supported) and arguments
|
||||
* to provide information about what broke and what you were
|
||||
* expecting.
|
||||
*
|
||||
* The invariant message will be stripped in production, but the invariant
|
||||
* will remain to ensure logic does not differ in production.
|
||||
*/ export function invariant(condition, format, ...args) {
|
||||
if (isProduction()) {
|
||||
if (format === undefined) {
|
||||
throw new Error('invariant requires an error message argument');
|
||||
}
|
||||
}
|
||||
if (!condition) {
|
||||
let error;
|
||||
if (format === undefined) {
|
||||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
||||
} else {
|
||||
let argIndex = 0;
|
||||
error = new Error(format.replace(/%s/g, function() {
|
||||
return args[argIndex++];
|
||||
}));
|
||||
error.name = 'Invariant Violation';
|
||||
}
|
||||
error.framesToPop = 1 // we don't care about invariant's own frame
|
||||
;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
function isProduction() {
|
||||
return typeof process !== 'undefined' && process.env['NODE_ENV'] === 'production';
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@react-dnd/invariant/dist/index.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/invariant/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nexport function invariant(condition: any, format: string, ...args: any[]) {\n\tif (isProduction()) {\n\t\tif (format === undefined) {\n\t\t\tthrow new Error('invariant requires an error message argument')\n\t\t}\n\t}\n\n\tif (!condition) {\n\t\tlet error\n\t\tif (format === undefined) {\n\t\t\terror = new Error(\n\t\t\t\t'Minified exception occurred; use the non-minified dev environment ' +\n\t\t\t\t\t'for the full error message and additional helpful warnings.',\n\t\t\t)\n\t\t} else {\n\t\t\tlet argIndex = 0\n\t\t\terror = new Error(\n\t\t\t\tformat.replace(/%s/g, function () {\n\t\t\t\t\treturn args[argIndex++]\n\t\t\t\t}),\n\t\t\t)\n\t\t\terror.name = 'Invariant Violation'\n\t\t}\n\n\t\t;(error as any).framesToPop = 1 // we don't care about invariant's own frame\n\t\tthrow error\n\t}\n}\n\nfunction isProduction() {\n\treturn (\n\t\ttypeof process !== 'undefined' && process.env['NODE_ENV'] === 'production'\n\t)\n}\n"],"names":["invariant","condition","format","args","isProduction","undefined","Error","error","argIndex","replace","name","framesToPop","process","env"],"mappings":"AAAA;;;;;;;;;GASG,CAEH,OAAO,SAASA,SAAS,CAACC,SAAc,EAAEC,MAAc,EAAE,GAAGC,IAAI,AAAO,EAAE;IACzE,IAAIC,YAAY,EAAE,EAAE;QACnB,IAAIF,MAAM,KAAKG,SAAS,EAAE;YACzB,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC,CAAA;SAC/D;KACD;IAED,IAAI,CAACL,SAAS,EAAE;QACf,IAAIM,KAAK;QACT,IAAIL,MAAM,KAAKG,SAAS,EAAE;YACzBE,KAAK,GAAG,IAAID,KAAK,CAChB,oEAAoE,GACnE,6DAA6D,CAC9D;SACD,MAAM;YACN,IAAIE,QAAQ,GAAG,CAAC;YAChBD,KAAK,GAAG,IAAID,KAAK,CAChBJ,MAAM,CAACO,OAAO,QAAQ,WAAY;gBACjC,OAAON,IAAI,CAACK,QAAQ,EAAE,CAAC,CAAA;aACvB,CAAC,CACF;YACDD,KAAK,CAACG,IAAI,GAAG,qBAAqB;SAClC;QAEA,AAACH,KAAK,CAASI,WAAW,GAAG,CAAC,CAAC,4CAA4C;QAA7C;QAC/B,MAAMJ,KAAK,CAAA;KACX;CACD;AAED,SAASH,YAAY,GAAG;IACvB,OACC,OAAOQ,OAAO,KAAK,WAAW,IAAIA,OAAO,CAACC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY,CAC1E;CACD"}
|
||||
30
frontend/node_modules/@react-dnd/invariant/package.json
generated
vendored
30
frontend/node_modules/@react-dnd/invariant/package.json
generated
vendored
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "@react-dnd/invariant",
|
||||
"version": "4.0.2",
|
||||
"description": "invariantx",
|
||||
"keywords": [
|
||||
"test",
|
||||
"invariant"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": "Andres Suarez <zertosh@gmail.com>",
|
||||
"repository": "https://github.com/react-dnd/react-dnd",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"clean": "shx rm -rf dist/",
|
||||
"build_types": "tsc -b .",
|
||||
"build_esm": "swc -C module.type=es6 -d dist src/",
|
||||
"build": "run-s build_types build_esm"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "^0.1.57",
|
||||
"@swc/core": "^1.2.168",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^17.0.25",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"shx": "^0.3.4",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
45
frontend/node_modules/@react-dnd/invariant/src/index.ts
generated
vendored
45
frontend/node_modules/@react-dnd/invariant/src/index.ts
generated
vendored
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* Use invariant() to assert state which your program assumes to be true.
|
||||
*
|
||||
* Provide sprintf-style format (only %s is supported) and arguments
|
||||
* to provide information about what broke and what you were
|
||||
* expecting.
|
||||
*
|
||||
* The invariant message will be stripped in production, but the invariant
|
||||
* will remain to ensure logic does not differ in production.
|
||||
*/
|
||||
|
||||
export function invariant(condition: any, format: string, ...args: any[]) {
|
||||
if (isProduction()) {
|
||||
if (format === undefined) {
|
||||
throw new Error('invariant requires an error message argument')
|
||||
}
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
let error
|
||||
if (format === undefined) {
|
||||
error = new Error(
|
||||
'Minified exception occurred; use the non-minified dev environment ' +
|
||||
'for the full error message and additional helpful warnings.',
|
||||
)
|
||||
} else {
|
||||
let argIndex = 0
|
||||
error = new Error(
|
||||
format.replace(/%s/g, function () {
|
||||
return args[argIndex++]
|
||||
}),
|
||||
)
|
||||
error.name = 'Invariant Violation'
|
||||
}
|
||||
|
||||
;(error as any).framesToPop = 1 // we don't care about invariant's own frame
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
function isProduction() {
|
||||
return (
|
||||
typeof process !== 'undefined' && process.env['NODE_ENV'] === 'production'
|
||||
)
|
||||
}
|
||||
1
frontend/node_modules/@react-dnd/shallowequal/dist/index.d.ts
generated
vendored
1
frontend/node_modules/@react-dnd/shallowequal/dist/index.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export declare function shallowEqual<T>(objA: T, objB: T, compare?: (a: T, b: T, key?: string) => boolean | void, compareContext?: any): boolean;
|
||||
34
frontend/node_modules/@react-dnd/shallowequal/dist/index.js
generated
vendored
34
frontend/node_modules/@react-dnd/shallowequal/dist/index.js
generated
vendored
@@ -1,34 +0,0 @@
|
||||
export function shallowEqual(objA, objB, compare, compareContext) {
|
||||
let compareResult = compare ? compare.call(compareContext, objA, objB) : void 0;
|
||||
if (compareResult !== void 0) {
|
||||
return !!compareResult;
|
||||
}
|
||||
if (objA === objB) {
|
||||
return true;
|
||||
}
|
||||
if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) {
|
||||
return false;
|
||||
}
|
||||
const keysA = Object.keys(objA);
|
||||
const keysB = Object.keys(objB);
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false;
|
||||
}
|
||||
const bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
||||
// Test for A's keys different from B.
|
||||
for(let idx = 0; idx < keysA.length; idx++){
|
||||
const key = keysA[idx];
|
||||
if (!bHasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
const valueA = objA[key];
|
||||
const valueB = objB[key];
|
||||
compareResult = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
||||
if (compareResult === false || compareResult === void 0 && valueA !== valueB) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@react-dnd/shallowequal/dist/index.js.map
generated
vendored
1
frontend/node_modules/@react-dnd/shallowequal/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export function shallowEqual<T>(\n\tobjA: T,\n\tobjB: T,\n\tcompare?: (a: T, b: T, key?: string) => boolean | void,\n\tcompareContext?: any,\n) {\n\tlet compareResult = compare\n\t\t? compare.call(compareContext, objA, objB)\n\t\t: void 0\n\tif (compareResult !== void 0) {\n\t\treturn !!compareResult\n\t}\n\n\tif (objA === objB) {\n\t\treturn true\n\t}\n\n\tif (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) {\n\t\treturn false\n\t}\n\n\tconst keysA = Object.keys(objA)\n\tconst keysB = Object.keys(objB)\n\n\tif (keysA.length !== keysB.length) {\n\t\treturn false\n\t}\n\n\tconst bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB)\n\n\t// Test for A's keys different from B.\n\tfor (let idx = 0; idx < keysA.length; idx++) {\n\t\tconst key = keysA[idx] as string\n\n\t\tif (!bHasOwnProperty(key)) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst valueA = (objA as any)[key]\n\t\tconst valueB = (objB as any)[key]\n\n\t\tcompareResult = compare\n\t\t\t? compare.call(compareContext, valueA, valueB, key)\n\t\t\t: void 0\n\n\t\tif (\n\t\t\tcompareResult === false ||\n\t\t\t(compareResult === void 0 && valueA !== valueB)\n\t\t) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n"],"names":["shallowEqual","objA","objB","compare","compareContext","compareResult","call","keysA","Object","keys","keysB","length","bHasOwnProperty","prototype","hasOwnProperty","bind","idx","key","valueA","valueB"],"mappings":"AAAA,OAAO,SAASA,YAAY,CAC3BC,IAAO,EACPC,IAAO,EACPC,OAAsD,EACtDC,cAAoB,EACnB;IACD,IAAIC,aAAa,GAAGF,OAAO,GACxBA,OAAO,CAACG,IAAI,CAACF,cAAc,EAAEH,IAAI,EAAEC,IAAI,CAAC,GACxC,KAAK,CAAC;IACT,IAAIG,aAAa,KAAK,KAAK,CAAC,EAAE;QAC7B,OAAO,CAAC,CAACA,aAAa,CAAA;KACtB;IAED,IAAIJ,IAAI,KAAKC,IAAI,EAAE;QAClB,OAAO,IAAI,CAAA;KACX;IAED,IAAI,OAAOD,IAAI,KAAK,QAAQ,IAAI,CAACA,IAAI,IAAI,OAAOC,IAAI,KAAK,QAAQ,IAAI,CAACA,IAAI,EAAE;QAC3E,OAAO,KAAK,CAAA;KACZ;IAED,MAAMK,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACR,IAAI,CAAC;IAC/B,MAAMS,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACP,IAAI,CAAC;IAE/B,IAAIK,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;QAClC,OAAO,KAAK,CAAA;KACZ;IAED,MAAMC,eAAe,GAAGJ,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACb,IAAI,CAAC;IAElE,sCAAsC;IACtC,IAAK,IAAIc,GAAG,GAAG,CAAC,EAAEA,GAAG,GAAGT,KAAK,CAACI,MAAM,EAAEK,GAAG,EAAE,CAAE;QAC5C,MAAMC,GAAG,GAAGV,KAAK,CAACS,GAAG,CAAC,AAAU;QAEhC,IAAI,CAACJ,eAAe,CAACK,GAAG,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAA;SACZ;QAED,MAAMC,MAAM,GAAG,AAACjB,IAAI,AAAQ,CAACgB,GAAG,CAAC;QACjC,MAAME,MAAM,GAAG,AAACjB,IAAI,AAAQ,CAACe,GAAG,CAAC;QAEjCZ,aAAa,GAAGF,OAAO,GACpBA,OAAO,CAACG,IAAI,CAACF,cAAc,EAAEc,MAAM,EAAEC,MAAM,EAAEF,GAAG,CAAC,GACjD,KAAK,CAAC;QAET,IACCZ,aAAa,KAAK,KAAK,IACtBA,aAAa,KAAK,KAAK,CAAC,IAAIa,MAAM,KAAKC,MAAM,AAAC,EAC9C;YACD,OAAO,KAAK,CAAA;SACZ;KACD;IAED,OAAO,IAAI,CAAA;CACX"}
|
||||
38
frontend/node_modules/@react-dnd/shallowequal/package.json
generated
vendored
38
frontend/node_modules/@react-dnd/shallowequal/package.json
generated
vendored
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"name": "@react-dnd/shallowequal",
|
||||
"version": "4.0.2",
|
||||
"description": "Like lodash isEqualWith but for shallow equal.",
|
||||
"keywords": [
|
||||
"shallowequal",
|
||||
"shallow",
|
||||
"equal",
|
||||
"isequal",
|
||||
"compare",
|
||||
"isequalwith"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Alberto Leal",
|
||||
"email": "mailforalberto@gmail.com",
|
||||
"url": "https://github.com/dashed"
|
||||
},
|
||||
"repository": "https://github.com/react-dnd/react-dnd",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"clean": "shx rm -rf dist/",
|
||||
"build_types": "tsc -b .",
|
||||
"build_esm": "swc -C module.type=es6 -d dist src/",
|
||||
"build": "run-s build_types build_esm"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "^0.1.57",
|
||||
"@swc/core": "^1.2.168",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^17.0.25",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"shx": "^0.3.4",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
55
frontend/node_modules/@react-dnd/shallowequal/src/index.ts
generated
vendored
55
frontend/node_modules/@react-dnd/shallowequal/src/index.ts
generated
vendored
@@ -1,55 +0,0 @@
|
||||
export function shallowEqual<T>(
|
||||
objA: T,
|
||||
objB: T,
|
||||
compare?: (a: T, b: T, key?: string) => boolean | void,
|
||||
compareContext?: any,
|
||||
) {
|
||||
let compareResult = compare
|
||||
? compare.call(compareContext, objA, objB)
|
||||
: void 0
|
||||
if (compareResult !== void 0) {
|
||||
return !!compareResult
|
||||
}
|
||||
|
||||
if (objA === objB) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) {
|
||||
return false
|
||||
}
|
||||
|
||||
const keysA = Object.keys(objA)
|
||||
const keysB = Object.keys(objB)
|
||||
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false
|
||||
}
|
||||
|
||||
const bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB)
|
||||
|
||||
// Test for A's keys different from B.
|
||||
for (let idx = 0; idx < keysA.length; idx++) {
|
||||
const key = keysA[idx] as string
|
||||
|
||||
if (!bHasOwnProperty(key)) {
|
||||
return false
|
||||
}
|
||||
|
||||
const valueA = (objA as any)[key]
|
||||
const valueB = (objB as any)[key]
|
||||
|
||||
compareResult = compare
|
||||
? compare.call(compareContext, valueA, valueB, key)
|
||||
: void 0
|
||||
|
||||
if (
|
||||
compareResult === false ||
|
||||
(compareResult === void 0 && valueA !== valueB)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user