@scratch/scratch-vm 13.4.0-test.5 → 13.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,13 @@
1
+ /*!
2
+ * decimal.js v10.6.0
3
+ * An arbitrary-precision Decimal type for JavaScript.
4
+ * https://github.com/MikeMcl/decimal.js
5
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
6
+ * MIT Licence
7
+ */
8
+
9
+ /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
10
+
1
11
  /*! @source http://purl.eligrey.com/github/canvas-toBlob.js/blob/master/canvas-toBlob.js */
2
12
 
3
13
  /*! exports provided: Adler32 */
@@ -60,8 +70,12 @@
60
70
 
61
71
  /*! exports provided: toSb2Json */
62
72
 
73
+ /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
74
+
63
75
  /*! no static exports found */
64
76
 
77
+ /*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
78
+
65
79
  /*!******************!*\
66
80
  !*** ./index.js ***!
67
81
  \******************/
@@ -219,6 +233,17 @@
219
233
  * =============================================================================
220
234
  */
221
235
 
236
+ /**
237
+ * @description Calculate deltaE OK which is the simple root sum of squares
238
+ * @param {number[]} reference - Array of OKLab values: L as 0..1, a and b as -1..1
239
+ * @param {number[]} sample - Array of OKLab values: L as 0..1, a and b as -1..1
240
+ * @return {number} How different a color sample is from reference
241
+ *
242
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
243
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
244
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js
245
+ */
246
+
222
247
  /**
223
248
  * @license
224
249
  * Copyright 2017 Google LLC. All Rights Reserved.
@@ -441,4 +466,287 @@
441
466
  * =============================================================================
442
467
  */
443
468
 
469
+ /**
470
+ * @license MIT https://github.com/facelessuser/coloraide/blob/main/LICENSE.md
471
+ */
472
+
473
+ /**
474
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
475
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
476
+ *
477
+ * XYZ <-> LMS matrices recalculated for consistent reference white
478
+ * @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
479
+ */
480
+
481
+ /**
482
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
483
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
484
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
485
+ */
486
+
487
+ /**
488
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
489
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
490
+ */
491
+
492
+ /**
493
+ * @param {number} hue - Hue as degrees 0..360
494
+ * @param {number} white - Whiteness as percentage 0..100
495
+ * @param {number} black - Blackness as percentage 0..100
496
+ * @return {number[]} Array of RGB components 0..1
497
+ *
498
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
499
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
500
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js
501
+ */
502
+
503
+ /**
504
+ * @param {number} hue - Hue as degrees 0..360
505
+ * @param {number} sat - Saturation as percentage 0..100
506
+ * @param {number} light - Lightness as percentage 0..100
507
+ * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1]
508
+ *
509
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
510
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
511
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js
512
+ */
513
+
514
+ /**
515
+ * Assuming XYZ is relative to D50, convert to CIE Lab
516
+ * from CIE standard, which now defines these as a rational fraction
517
+ *
518
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
519
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
520
+ */
521
+
522
+ /**
523
+ * Bradford chromatic adaptation from D50 to D65
524
+ *
525
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
526
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
527
+ */
528
+
529
+ /**
530
+ * Bradford chromatic adaptation from D65 to D50
531
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
532
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
533
+ * @see http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
534
+ */
535
+
536
+ /**
537
+ * Character class utilities for XML NS 1.0 edition 3.
538
+ *
539
+ * @author Louis-Dominique Dubeau
540
+ * @license MIT
541
+ * @copyright Louis-Dominique Dubeau
542
+ */
543
+
544
+ /**
545
+ * Character classes and associated utilities for the 2nd edition of XML 1.1.
546
+ *
547
+ * @author Louis-Dominique Dubeau
548
+ * @license MIT
549
+ * @copyright Louis-Dominique Dubeau
550
+ */
551
+
552
+ /**
553
+ * Character classes and associated utilities for the 5th edition of XML 1.0.
554
+ *
555
+ * @author Louis-Dominique Dubeau
556
+ * @license MIT
557
+ * @copyright Louis-Dominique Dubeau
558
+ */
559
+
560
+ /**
561
+ * Convert D50 XYZ to linear-light prophoto-rgb
562
+ *
563
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
564
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
565
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
566
+ */
567
+
568
+ /**
569
+ * Convert Lab to D50-adapted XYZ
570
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
571
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
572
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
573
+ */
574
+
575
+ /**
576
+ * Convert XYZ to linear-light P3
577
+ *
578
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
579
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
580
+ */
581
+
582
+ /**
583
+ * Convert XYZ to linear-light rec2020
584
+ *
585
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
586
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
587
+ */
588
+
589
+ /**
590
+ * Convert an array of a98-rgb values in the range 0.0 - 1.0
591
+ * to linear light (un-companded) form. Negative values are also now accepted
592
+ *
593
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
594
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
595
+ */
596
+
597
+ /**
598
+ * Convert an array of display-p3 RGB values in the range 0.0 - 1.0
599
+ * to linear light (un-companded) form.
600
+ *
601
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
602
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
603
+ */
604
+
605
+ /**
606
+ * Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL.
607
+ *
608
+ * @param {Color} RGB [r, g, b]
609
+ * - Red component 0..1
610
+ * - Green component 0..1
611
+ * - Blue component 0..1
612
+ * @return {number[]} Array of HSL values: Hue as degrees 0..360, Saturation and Lightness as percentages 0..100
613
+ *
614
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
615
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/utilities.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
616
+ *
617
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/better-rgbToHsl.js
618
+ */
619
+
620
+ /**
621
+ * Convert an array of linear-light a98-rgb in the range 0.0-1.0
622
+ * to gamma corrected form. Negative values are also now accepted
623
+ *
624
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
625
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
626
+ */
627
+
628
+ /**
629
+ * Convert an array of linear-light a98-rgb values to CIE XYZ
630
+ * http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
631
+ * has greater numerical precision than section 4.3.5.3 of
632
+ * https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
633
+ * but the values below were calculated from first principles
634
+ * from the chromaticity coordinates of R G B W
635
+ *
636
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
637
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
638
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
639
+ * @see https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
640
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/matrixmaker.html
641
+ */
642
+
643
+ /**
644
+ * Convert an array of linear-light display-p3 RGB in the range 0.0-1.0
645
+ * to gamma corrected form
646
+ *
647
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
648
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
649
+ */
650
+
651
+ /**
652
+ * Convert an array of linear-light display-p3 values to CIE XYZ
653
+ * using D65 (no chromatic adaptation)
654
+ *
655
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
656
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
657
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
658
+ */
659
+
660
+ /**
661
+ * Convert an array of linear-light prophoto-rgb in the range 0.0-1.0
662
+ * to gamma corrected form.
663
+ * Transfer curve is gamma 1.8 with a small linear portion.
664
+ *
665
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
666
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
667
+ */
668
+
669
+ /**
670
+ * Convert an array of linear-light prophoto-rgb values to CIE D50 XYZ.
671
+ * Matrix cannot be expressed in rational form, but is calculated to 64 bit accuracy.
672
+ *
673
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
674
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
675
+ * @see see https://github.com/w3c/csswg-drafts/issues/7675
676
+ */
677
+
678
+ /**
679
+ * Convert an array of linear-light rec2020 RGB in the range 0.0-1.0
680
+ * to gamma corrected form ITU-R BT.2020-2 p.4
681
+ *
682
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
683
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
684
+ */
685
+
686
+ /**
687
+ * Convert an array of linear-light rec2020 values to CIE XYZ
688
+ * using D65 (no chromatic adaptation)
689
+ *
690
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
691
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
692
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
693
+ */
694
+
695
+ /**
696
+ * Convert an array of linear-light sRGB values in the range 0.0-1.0 to gamma corrected form
697
+ * Extended transfer function:
698
+ * For negative values, linear portion extends on reflection
699
+ * of axis, then uses reflected pow below that
700
+ *
701
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
702
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
703
+ * @see https://en.wikipedia.org/wiki/SRGB
704
+ */
705
+
706
+ /**
707
+ * Convert an array of linear-light sRGB values to CIE XYZ
708
+ * using sRGB's own white, D65 (no chromatic adaptation)
709
+ *
710
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
711
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
712
+ */
713
+
714
+ /**
715
+ * Convert an array of of sRGB values where in-gamut values are in the range
716
+ * [0 - 1] to linear light (un-companded) form.
717
+ * Extended transfer function:
718
+ * For negative values, linear portion is extended on reflection of axis,
719
+ * then reflected power function is used.
720
+ *
721
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
722
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
723
+ * @see https://en.wikipedia.org/wiki/SRGB
724
+ */
725
+
726
+ /**
727
+ * Convert an array of prophoto-rgb values where in-gamut Colors are in the
728
+ * range [0.0 - 1.0] to linear light (un-companded) form. Transfer curve is
729
+ * gamma 1.8 with a small linear portion. Extended transfer function
730
+ *
731
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
732
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
733
+ */
734
+
735
+ /**
736
+ * Convert an array of rec2020 RGB values in the range 0.0 - 1.0
737
+ * to linear light (un-companded) form.
738
+ * ITU-R BT.2020-2 p.4
739
+ *
740
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
741
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
742
+ */
743
+
744
+ /**
745
+ * Given OKLab, convert to XYZ relative to D65
746
+ *
747
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
748
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
749
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
750
+ */
751
+
444
752
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */