diff --git a/backend/filesystem/ejemplo/actions/action_1 b/backend/filesystem/ejemplo/actions/action_1 deleted file mode 100644 index e69de29bb..000000000 diff --git a/backend/filesystem/ejemplo/actions/action_2 b/backend/filesystem/ejemplo/actions/action_2 deleted file mode 100644 index e69de29bb..000000000 diff --git a/backend/filesystem/ejemplo/actions/action_3 b/backend/filesystem/ejemplo/actions/action_3 deleted file mode 100644 index e69de29bb..000000000 diff --git a/backend/filesystem/demo/actions/CheckObstacle.py b/backend/filesystem/laser_bump_and_go/actions/CheckObstacle.py similarity index 77% rename from backend/filesystem/demo/actions/CheckObstacle.py rename to backend/filesystem/laser_bump_and_go/actions/CheckObstacle.py index 348560517..bfb49575c 100644 --- a/backend/filesystem/demo/actions/CheckObstacle.py +++ b/backend/filesystem/laser_bump_and_go/actions/CheckObstacle.py @@ -1,6 +1,6 @@ import py_trees import sensor_msgs -from tree_gardener import tree_tools +import tree_tools def check_obstacle_in_laser(laser_measures, amplitude): @@ -44,13 +44,10 @@ def setup(self, **kwargs: int) -> None: self.listener_callback, 10) - self.scan = sensor_msgs.msg.LaserScan() - - # Init the obstacle counter - self.n_obs = 0 + self.last_scan_ = sensor_msgs.msg.LaserScan() def listener_callback(self, msg) -> None: - self.scan = msg + self.last_scan_ = msg def initialise(self) -> None: @@ -64,16 +61,16 @@ def update(self) -> py_trees.common.Status: """ Executed when the action is ticked. Do not block! """ # Check the laser measures - if len(self.scan.ranges) == 0: new_status = py_trees.common.Status.INVALID + if len(self.last_scan_.ranges) == 0: new_status = py_trees.common.Status.INVALID - # Check if there is an obstacle + # Get params from ports amplitude = int(tree_tools.get_port_content(self.ports["amplitude"])) - obstacle = check_obstacle_in_laser(self.scan.ranges, amplitude) - if not obstacle: new_status = py_trees.common.Status.SUCCESS - else: - self.n_obs += 1 - tree_tools.set_port_content(self.ports["obs_port"], self.n_obs) - new_status = py_trees.common.Status.FAILURE + obs_dist = float(tree_tools.get_port_content(self.ports["obs_dist"])) + + # Check if there is an obstacle + obstacle = check_obstacle_in_laser(self.last_scan_.ranges, amplitude) + if obstacle: new_status = py_trees.common.Status.SUCCESS + else: new_status = py_trees.common.Status.FAILURE return new_status @@ -82,4 +79,4 @@ def terminate(self, new_status: py_trees.common.Status) -> None: """ Called whenever the behaviour switches to a non-running state """ # Debugging - self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) + self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) \ No newline at end of file diff --git a/backend/filesystem/demo/actions/Forward.py b/backend/filesystem/laser_bump_and_go/actions/Forward.py similarity index 63% rename from backend/filesystem/demo/actions/Forward.py rename to backend/filesystem/laser_bump_and_go/actions/Forward.py index 1ed7b66a7..0e9b2934e 100644 --- a/backend/filesystem/demo/actions/Forward.py +++ b/backend/filesystem/laser_bump_and_go/actions/Forward.py @@ -1,10 +1,6 @@ import py_trees import geometry_msgs -import std_msgs -from tree_gardener import tree_tools -from cv_bridge import CvBridge -import sensor_msgs -import cv2 +import tree_tools class Forward(py_trees.behaviour.Behaviour): @@ -37,29 +33,6 @@ def setup(self, **kwargs) -> None: qos_profile=10 ) - # Setup the publisher for n_obs - self.publisher2 = self.node.create_publisher( - msg_type=std_msgs.msg.String, - topic="/n_obs", - qos_profile=10 - ) - - # Setup the subscription to camera - self.subscription = self.node.create_subscription( - sensor_msgs.msg.Image, - '/camera/image_raw', - self.listener_callback, - 10 - ) - - self.bridge = CvBridge() - self.img_received = False - - def listener_callback(self, msg): - - self.last_img = self.bridge.imgmsg_to_cv2(msg) - self.img_received = True - def initialise(self) -> None: """ Executed when coming from an idle state """ @@ -76,16 +49,6 @@ def update(self) -> py_trees.common.Status: msg.linear.x = float(tree_tools.get_port_content(self.ports["speed"])) self.publisher.publish(msg) - # Publish the number of obstacles retrieved from the port - nobs = tree_tools.get_port_content(self.ports["obs_port"]) - str_pub = std_msgs.msg.String() - str_pub.data = str(nobs) - self.publisher2.publish(str_pub) - - if self.img_received: - cv2.imshow("Robot img", self.last_img) - cv2.waitKey(1) - return py_trees.common.Status.RUNNING def terminate(self, new_status: py_trees.common.Status) -> None: diff --git a/backend/filesystem/demo/actions/Turn.py b/backend/filesystem/laser_bump_and_go/actions/Turn.py similarity index 90% rename from backend/filesystem/demo/actions/Turn.py rename to backend/filesystem/laser_bump_and_go/actions/Turn.py index d29cd15cd..8f8d3e1d1 100644 --- a/backend/filesystem/demo/actions/Turn.py +++ b/backend/filesystem/laser_bump_and_go/actions/Turn.py @@ -53,6 +53,11 @@ def update(self) -> py_trees.common.Status: def terminate(self, new_status: py_trees.common.Status) -> None: """ Called whenever the behaviour switches to a non-running state """ + + # Stop the robot + msg = geometry_msgs.msg.Twist() + msg.linear.x = 0.0 + self.publisher.publish(msg) # Debugging - self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) + self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) \ No newline at end of file diff --git a/backend/filesystem/demo/graph.json b/backend/filesystem/laser_bump_and_go/graph.json similarity index 51% rename from backend/filesystem/demo/graph.json rename to backend/filesystem/laser_bump_and_go/graph.json index dee3720d8..1088be4bf 100644 --- a/backend/filesystem/demo/graph.json +++ b/backend/filesystem/laser_bump_and_go/graph.json @@ -1,8 +1,8 @@ { "id": "6965f5c5-3788-427f-a066-24494d05dbf4", - "offsetX": -18.413393672464768, - "offsetY": 89.54611778131913, - "zoom": 86.69999999999996, + "offsetX": -7.316475935061135, + "offsetY": -65.04435321446891, + "zoom": 79.09999999999992, "gridSize": 0, "layers": [ { @@ -11,26 +11,27 @@ "isSvg": true, "transformed": true, "models": { - "d46b2574-2a3d-40f1-986e-fcd505dbc105": { - "id": "d46b2574-2a3d-40f1-986e-fcd505dbc105", + "e192eca0-ea20-4596-bb47-4e204c2bab63": { + "id": "e192eca0-ea20-4596-bb47-4e204c2bab63", "type": "default", "selected": false, - "source": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", - "sourcePort": "42be04c1-b9a7-482f-a3ad-14af212d8195", - "target": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", - "targetPort": "b3cffd29-2931-4f11-89fb-ad11e52e02af", + "source": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", + "sourcePort": "178fa7e2-f83f-4ba9-8f57-a11e60db962f", + "target": "55b29236-163f-4c8a-9fc9-441e637ec731", + "targetPort": "7c380a1f-2368-4135-bab5-34d7d03ba015", "points": [ { - "id": "ec98da50-9c52-4915-899d-a4df76f517f7", + "id": "5f0bde8d-f789-4317-93b7-4f6af6b2208b", "type": "point", - "x": 128.48521949070516, - "y": 296.1213376984994 + "x": 788.0423036689654, + "y": 226.34135813684756 }, { - "id": "b9749ac7-ecbe-42ff-9642-50e6c890b35c", + "id": "16135ffb-5cd2-4d8b-8d15-2fde3f759306", "type": "point", - "x": 203.6485800512093, - "y": 296.0060256039925 + "selected": true, + "x": 866.9298090857391, + "y": 146.3792848119423 } ], "labels": [], @@ -39,26 +40,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "ad62412b-1ed3-4886-8256-fa79be274dd3": { - "id": "ad62412b-1ed3-4886-8256-fa79be274dd3", + "27fc7ee9-7612-45dc-ae3b-c3bfe7ba8c85": { + "id": "27fc7ee9-7612-45dc-ae3b-c3bfe7ba8c85", "type": "default", "selected": false, - "source": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", - "sourcePort": "6c1ee280-e21b-4a8d-8377-c2cf716fe87d", - "target": "420703c8-205c-406b-9dcc-878f0ae4d931", - "targetPort": "494c8189-341f-431a-a851-820643c46b6d", + "source": "45584467-28b6-45ce-9f96-6ffeceb57b15", + "sourcePort": "cd2270b0-efb9-47de-94a7-7c524c10b8b0", + "target": "55b29236-163f-4c8a-9fc9-441e637ec731", + "targetPort": "f37432e4-42b2-46bb-8efb-e06b54460eaa", "points": [ { - "id": "f884fe56-8064-45cb-bdcd-e1598ff26a6f", + "id": "c63696cb-ea44-4c43-b306-b79aca03b479", "type": "point", - "x": 356.83978242829994, - "y": 296.0060256039925 + "x": 788.9062096226631, + "y": 277.50023905301384 }, { - "id": "d0a49594-88f5-43d0-8f6a-5bdf2c1d2068", + "id": "fb1d3fd6-c8f8-4587-bbb4-4486e86df61d", "type": "point", - "x": 441.1726280435682, - "y": 223.01487774319367 + "x": 866.9298090857391, + "y": 172.3801263409108 } ], "labels": [], @@ -67,26 +68,27 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "edfd9de8-10c3-4372-a9c3-c968236e67d8": { - "id": "edfd9de8-10c3-4372-a9c3-c968236e67d8", + "c15b87d4-3225-4373-bdba-91f3c375a138": { + "id": "c15b87d4-3225-4373-bdba-91f3c375a138", "type": "default", "selected": false, - "source": "420703c8-205c-406b-9dcc-878f0ae4d931", - "sourcePort": "f289285e-80e0-4621-b2a9-75ebad808cbb", - "target": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", - "targetPort": "e84b4dff-9620-47c1-ad96-50e9938e0ece", + "source": "478c5369-cda7-4146-9d9b-cc755610e152", + "sourcePort": "ade1685e-705c-4fbc-b027-b103b1496d0a", + "target": "55b29236-163f-4c8a-9fc9-441e637ec731", + "targetPort": "038945d3-b1c2-4db8-9741-f7dbe9aa4ad7", "points": [ { - "id": "ec8e6aed-9dbc-42fc-8c1a-cbceb0121606", + "id": "05e0483b-34a0-447f-a887-2bb71e70c173", "type": "point", - "x": 583.3294907886664, - "y": 223.01487774319367 + "x": 726.4958718875968, + "y": 178.7012388567136 }, { - "id": "dd28a3b5-bef7-4cc0-ad8a-8640b188f6c2", + "id": "82d69fb5-25f9-437b-8084-0092ff2dd797", "type": "point", - "x": 690.2884278561406, - "y": 92.33434912664589 + "selected": true, + "x": 865.9395213917846, + "y": 120.37844328297382 } ], "labels": [], @@ -95,26 +97,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "62c15e07-ffb1-4854-aa6d-c548aabe1fc0": { - "id": "62c15e07-ffb1-4854-aa6d-c548aabe1fc0", + "25ac5673-a33a-4962-980f-7fa3fdc646bb": { + "id": "25ac5673-a33a-4962-980f-7fa3fdc646bb", "type": "default", "selected": false, - "source": "420703c8-205c-406b-9dcc-878f0ae4d931", - "sourcePort": "f289285e-80e0-4621-b2a9-75ebad808cbb", - "target": "e1991dbc-3842-4c94-9eac-4a22b0837b94", - "targetPort": "ce913995-2ee2-434f-b0aa-f7253248bb2c", + "source": "8abddf62-30cb-4417-8869-859fc37ccd1b", + "sourcePort": "0221083d-596a-4bba-8f6c-84c00b918db6", + "target": "478c5369-cda7-4146-9d9b-cc755610e152", + "targetPort": "e2cd6528-76ba-4c0d-9f3f-22396a195c92", "points": [ { - "id": "848742f1-d4b7-48e4-b8b9-5525133623ea", + "id": "e200ac8f-1192-41a5-ae33-2b520e1f200f", "type": "point", - "x": 583.3294907886664, - "y": 223.01487774319367 + "x": 570.6804483730581, + "y": 229.2280085212996 }, { - "id": "820bab20-f1f4-4524-8f9d-90a6410d824a", + "id": "44e73609-daf5-4007-9ff9-598b92a37912", "type": "point", - "x": 651.0727415816305, - "y": 282.2997259310902 + "x": 650.0735289771194, + "y": 178.7012388567136 } ], "labels": [], @@ -123,27 +125,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "e6c162dc-d7c0-46a5-9531-843d064600c9": { - "id": "e6c162dc-d7c0-46a5-9531-843d064600c9", + "4872f205-a38f-4d14-9230-304ca3ce2835": { + "id": "4872f205-a38f-4d14-9230-304ca3ce2835", "type": "default", "selected": false, - "source": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", - "sourcePort": "178fa7e2-f83f-4ba9-8f57-a11e60db962f", - "target": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", - "targetPort": "3e13fbe0-a99e-4f48-a5a9-eb1231cf746d", + "source": "8abddf62-30cb-4417-8869-859fc37ccd1b", + "sourcePort": "0221083d-596a-4bba-8f6c-84c00b918db6", + "target": "26f08fa7-c226-42a3-a177-4462b056031c", + "targetPort": "e07050ec-80fe-47a8-8914-a271069971fe", "points": [ { - "id": "ad8ac051-5651-4439-8177-0986f75bf6da", + "id": "be60ca90-eec4-4a0d-b249-0233c23937a0", "type": "point", - "x": 671.5456366219996, - "y": 196.56349411069658 + "x": 570.6804483730581, + "y": 229.2280085212996 }, { - "id": "41e5885c-fa8c-457f-8696-674789b886ed", + "id": "95925c70-424f-4316-a1d8-497fca1f233c", "type": "point", - "selected": true, - "x": 691.2880721345201, - "y": 118.32436998419618 + "x": 645.438097906876, + "y": 358.0101144795656 } ], "labels": [], @@ -152,26 +153,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "a9c3eaaa-cd28-42d0-bd48-24f834fb419f": { - "id": "a9c3eaaa-cd28-42d0-bd48-24f834fb419f", + "396b885c-960f-48c4-af6f-619b7243d3be": { + "id": "396b885c-960f-48c4-af6f-619b7243d3be", "type": "default", "selected": false, - "source": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", - "sourcePort": "d829855c-366f-495f-87c5-60aaee09b180", - "target": "e9a09d02-8343-4a1f-bf75-8f56206278cf", - "targetPort": "5c44f91d-8b75-4aad-969f-54a75491080d", + "source": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", + "sourcePort": "42be04c1-b9a7-482f-a3ad-14af212d8195", + "target": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "targetPort": "36e40ad6-1c14-47b1-84f3-b8e73789312e", "points": [ { - "id": "5aae69f2-6eec-4851-8a91-e2d75991e6a2", + "id": "dd2fad6f-c19e-4da1-8f90-1719569ce20f", "type": "point", - "x": 854.071588179093, - "y": 118.32436998419618 + "x": 110.73509760069666, + "y": 294.50400857191795 }, { - "id": "a734bf9c-627c-48e3-99a4-729ed2749b0b", + "id": "b1eb51c2-fe74-4255-961c-990c011922d9", "type": "point", - "x": 913.8947618692378, - "y": 194.2566890357254 + "x": 222.49238809964453, + "y": 332.9995992255608 } ], "labels": [], @@ -180,26 +181,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "b1e9b725-bd30-4bf0-bf76-230d627d03c3": { - "id": "b1e9b725-bd30-4bf0-bf76-230d627d03c3", + "719acb68-d759-48aa-adce-93fee46efdfc": { + "id": "719acb68-d759-48aa-adce-93fee46efdfc", "type": "default", "selected": false, - "source": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", - "sourcePort": "965ed5ac-1260-4a28-a055-f5f310c316cd", - "target": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", - "targetPort": "6c1ee280-e21b-4a8d-8377-c2cf716fe87d", + "source": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "sourcePort": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "target": "8abddf62-30cb-4417-8869-859fc37ccd1b", + "targetPort": "5ce8bfd9-37ce-4bb0-87a3-d6af9c552ea3", "points": [ { - "id": "338ee89e-1237-48b8-8cac-4cf3bf0b9e92", + "id": "df596725-4545-47e2-b41c-74425700b588", "type": "point", - "x": 646.5551544456732, - "y": 464.5373268538123 + "x": 375.69510568418985, + "y": 332.9995992255609 }, { - "id": "65ea390e-3d71-48a9-bc68-3de6a124be39", + "id": "b0738f8b-071f-4bc9-b15f-11a8acb1a6f5", "type": "point", - "x": 356.83978242829994, - "y": 296.0060256039925 + "x": 428.5185352982317, + "y": 229.2280085212996 } ], "labels": [], @@ -208,26 +209,27 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "aeffaa7a-9fcd-495c-b362-c06f4181b7a4": { - "id": "aeffaa7a-9fcd-495c-b362-c06f4181b7a4", + "7aa184c8-d045-414f-815e-c1145d86c2bd": { + "id": "7aa184c8-d045-414f-815e-c1145d86c2bd", "type": "default", "selected": false, - "source": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", - "sourcePort": "c36b298a-6ca3-4e7a-a81a-606ba64b6109", - "target": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", - "targetPort": "d796bdb7-3426-4a0f-892d-81b6b6dc8cc2", + "source": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "sourcePort": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "target": "cb0af77d-3029-47fd-89ab-c64a248dd6da", + "targetPort": "fedfde51-31f9-4207-b3f6-2f6484aa13ac", "points": [ { - "id": "627585f2-b8cc-45d8-a70a-c1ee72136508", + "id": "8a889d50-0064-415e-866d-2dde8117da91", "type": "point", - "x": 517.81631113721, - "y": 479.473894994108 + "x": 375.69510568418985, + "y": 332.9995992255609 }, { - "id": "43773cce-7110-44ee-b321-d9b37b9113bd", + "id": "8d12a7dd-cf8a-4189-9cb9-5d2c0adb2721", "type": "point", - "x": 647.5548075238162, - "y": 490.5273917101777 + "selected": true, + "x": 437.43136567512806, + "y": 434.263829444923 } ], "labels": [], @@ -236,26 +238,26 @@ "curvyness": 50, "selectedColor": "rgb(0,192,255)" }, - "8ae64583-82c7-4f04-a143-bcf21d341fcc": { - "id": "8ae64583-82c7-4f04-a143-bcf21d341fcc", + "ae73763a-6b60-4350-81c6-c4311a2e5564": { + "id": "ae73763a-6b60-4350-81c6-c4311a2e5564", "type": "default", "selected": false, - "source": "5cfa8c28-381b-43b0-9261-28ab9a5b989c", - "sourcePort": "cf2089d6-c926-4183-a0dc-132e7a37531c", - "target": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", - "targetPort": "137ea818-fe56-4e9f-9912-424f7ae85c8e", + "source": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", + "sourcePort": "c36b298a-6ca3-4e7a-a81a-606ba64b6109", + "target": "cb0af77d-3029-47fd-89ab-c64a248dd6da", + "targetPort": "38ed462d-e857-4794-9698-40337497d94a", "points": [ { - "id": "aa335c3c-abd9-4804-b319-3887a47189ea", + "id": "f7c8cfa7-567b-44fb-98b9-2b1aa9bfa059", "type": "point", - "x": 533.1373321237297, - "y": 579.4739090737294 + "x": 384.08122812611464, + "y": 536.1180404540294 }, { - "id": "9bb19ad8-4e1c-4985-9895-483fa09dc571", + "id": "0c2d0f08-5a39-488b-bba3-581b5e86e6ac", "type": "point", - "x": 647.5548075238162, - "y": 516.5365960510937 + "x": 438.4216630143348, + "y": 460.264690264396 } ], "labels": [], @@ -276,19 +278,19 @@ "id": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", "type": "basic", "selected": false, - "x": 37.39215686274509, - "y": 274.61361014994236, + "x": 19.65022137887409, + "y": 273.0007069241359, "ports": [ { "id": "42be04c1-b9a7-482f-a3ad-14af212d8195", "type": "children", - "x": 123.48714769477633, - "y": 291.12325710280754, + "x": 105.73088031060205, + "y": 289.4997912818233, "name": "children", "alignment": "right", "parentNode": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", "links": [ - "d46b2574-2a3d-40f1-986e-fcd505dbc105" + "396b885c-960f-48c4-af6f-619b7243d3be" ], "in": false, "label": "children" @@ -297,156 +299,151 @@ "name": "Tree Root", "color": "rgb(0,204,0)" }, - "34a6a14a-afc0-4c30-baf4-124ed575b2c8": { - "id": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", - "type": "basic", + "a284a54f-fd9e-4235-8275-5000bdfbaf7d": { + "id": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", + "type": "tag", "selected": false, - "x": 202.64244521337943, - "y": 274.522491349481, + "x": 755.0255637027261, + "y": 209.83614607250408, "ports": [ { - "id": "b3cffd29-2931-4f11-89fb-ad11e52e02af", - "type": "parent", - "x": 198.65049945551743, - "y": 291.0079450083006, - "name": "parent", - "alignment": "left", - "parentNode": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", - "links": [ - "d46b2574-2a3d-40f1-986e-fcd505dbc105" - ], - "in": true, - "label": "parent" - }, - { - "id": "6c1ee280-e21b-4a8d-8377-c2cf716fe87d", - "type": "children", - "x": 351.84170183260807, - "y": 291.0079450083006, - "name": "children", + "id": "178fa7e2-f83f-4ba9-8f57-a11e60db962f", + "type": "tag output", + "x": 783.0380863788707, + "y": 221.33714084675293, + "name": "tag output", "alignment": "right", - "parentNode": "34a6a14a-afc0-4c30-baf4-124ed575b2c8", + "parentNode": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", "links": [ - "ad62412b-1ed3-4886-8256-fa79be274dd3", - "b1e9b725-bd30-4bf0-bf76-230d627d03c3" + "e192eca0-ea20-4596-bb47-4e204c2bab63" ], "in": false, - "label": "children" + "label": "tag output" } ], - "name": "ReactiveSequence", - "color": "rgb(0,128,255)" + "name": "20", + "color": "rgb(255,153,51)" }, - "420703c8-205c-406b-9dcc-878f0ae4d931": { - "id": "420703c8-205c-406b-9dcc-878f0ae4d931", - "type": "basic", - "selected": false, - "x": 440.159169550173, - "y": 201.51672433679357, + "38631cfc-99fa-40ab-acc5-89c9012d4ee7": { + "id": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", + "type": "tag", + "selected": true, + "x": 346.8517346452609, + "y": 518.3570616001435, "ports": [ { - "id": "494c8189-341f-431a-a851-820643c46b6d", - "type": "parent", - "x": 436.1745474478763, - "y": 218.01679714750182, - "name": "parent", - "alignment": "left", - "parentNode": "420703c8-205c-406b-9dcc-878f0ae4d931", - "links": [ - "ad62412b-1ed3-4886-8256-fa79be274dd3" - ], - "in": true, - "label": "parent" - }, - { - "id": "f289285e-80e0-4621-b2a9-75ebad808cbb", - "type": "children", - "x": 578.3314101929744, - "y": 218.01679714750182, - "name": "children", + "id": "c36b298a-6ca3-4e7a-a81a-606ba64b6109", + "type": "tag output", + "x": 379.07702048127226, + "y": 531.113823163935, + "name": "tag output", "alignment": "right", - "parentNode": "420703c8-205c-406b-9dcc-878f0ae4d931", + "parentNode": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", "links": [ - "edfd9de8-10c3-4372-a9c3-c968236e67d8", - "62c15e07-ffb1-4854-aa6d-c548aabe1fc0" + "ae73763a-6b60-4350-81c6-c4311a2e5564" ], "in": false, - "label": "children" + "label": "tag output" } ], - "name": "ReactiveFallback", - "color": "rgb(255,0,0)" + "name": "0.5", + "color": "rgb(255,153,51)" }, - "9ebc6093-69b8-463a-8471-4b2fc1e6b313": { - "id": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", + "55b29236-163f-4c8a-9fc9-441e637ec731": { + "id": "55b29236-163f-4c8a-9fc9-441e637ec731", "type": "basic", "selected": false, - "x": 689.2941176470589, - "y": 70.83621683967694, + "x": 864.9296296880873, + "y": 98.87698685673384, "ports": [ { - "id": "e84b4dff-9620-47c1-ad96-50e9938e0ece", + "id": "038945d3-b1c2-4db8-9741-f7dbe9aa4ad7", "type": "parent", - "x": 685.2903472604486, - "y": 87.33626853095407, + "x": 860.93530410169, + "y": 115.37422599287919, "name": "parent", "alignment": "left", - "parentNode": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", + "parentNode": "55b29236-163f-4c8a-9fc9-441e637ec731", "links": [ - "edfd9de8-10c3-4372-a9c3-c968236e67d8" + "c15b87d4-3225-4373-bdba-91f3c375a138" ], "in": true, "label": "parent" }, { - "id": "3e13fbe0-a99e-4f48-a5a9-eb1231cf746d", + "id": "7c380a1f-2368-4135-bab5-34d7d03ba015", "type": "input", - "x": 686.2900003385913, - "y": 113.32629818826737, + "x": 861.9256014408967, + "y": 141.37506752184768, "name": "amplitude", "alignment": "left", - "parentNode": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", + "parentNode": "55b29236-163f-4c8a-9fc9-441e637ec731", "links": [ - "e6c162dc-d7c0-46a5-9531-843d064600c9" + "e192eca0-ea20-4596-bb47-4e204c2bab63" ], "in": true, "label": "input" }, { - "id": "d829855c-366f-495f-87c5-60aaee09b180", - "type": "output", - "x": 849.0735075834012, - "y": 113.32629818826737, - "name": "obs_port", - "alignment": "right", - "parentNode": "9ebc6093-69b8-463a-8471-4b2fc1e6b313", + "id": "f37432e4-42b2-46bb-8efb-e06b54460eaa", + "type": "input", + "x": 861.9256014408967, + "y": 167.37590905081618, + "name": "obs_dist", + "alignment": "left", + "parentNode": "55b29236-163f-4c8a-9fc9-441e637ec731", "links": [ - "a9c3eaaa-cd28-42d0-bd48-24f834fb419f" + "27fc7ee9-7612-45dc-ae3b-c3bfe7ba8c85" ], - "in": false, - "label": "output" + "in": true, + "label": "input" } ], "name": "CheckObstacle", "color": "rgb(128,0,128)" }, - "e1991dbc-3842-4c94-9eac-4a22b0837b94": { - "id": "e1991dbc-3842-4c94-9eac-4a22b0837b94", + "45584467-28b6-45ce-9f96-6ffeceb57b15": { + "id": "45584467-28b6-45ce-9f96-6ffeceb57b15", + "type": "tag", + "selected": false, + "x": 751.683648026978, + "y": 260.9986006652485, + "ports": [ + { + "id": "cd2270b0-efb9-47de-94a7-7c524c10b8b0", + "type": "tag output", + "x": 783.9019923325685, + "y": 272.4960217629192, + "name": "tag output", + "alignment": "right", + "parentNode": "45584467-28b6-45ce-9f96-6ffeceb57b15", + "links": [ + "27fc7ee9-7612-45dc-ae3b-c3bfe7ba8c85" + ], + "in": false, + "label": "tag output" + } + ], + "name": "1.0", + "color": "rgb(255,153,51)" + }, + "26f08fa7-c226-42a3-a177-4462b056031c": { + "id": "26f08fa7-c226-42a3-a177-4462b056031c", "type": "basic", "selected": false, - "x": 650.0784313725492, - "y": 260.80161476355244, + "x": 644.4390297941185, + "y": 336.49576259997457, "ports": [ { - "id": "ce913995-2ee2-434f-b0aa-f7253248bb2c", + "id": "e07050ec-80fe-47a8-8914-a271069971fe", "type": "parent", - "x": 646.0746609859386, - "y": 277.30164533539835, + "x": 640.4338806167814, + "y": 353.0059068347232, "name": "parent", "alignment": "left", - "parentNode": "e1991dbc-3842-4c94-9eac-4a22b0837b94", + "parentNode": "26f08fa7-c226-42a3-a177-4462b056031c", "links": [ - "62c15e07-ffb1-4854-aa6d-c548aabe1fc0" + "4872f205-a38f-4d14-9230-304ca3ce2835" ], "in": true, "label": "parent" @@ -455,126 +452,156 @@ "name": "Turn", "color": "rgb(128,0,128)" }, - "a284a54f-fd9e-4235-8275-5000bdfbaf7d": { - "id": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", - "type": "tag", + "478c5369-cda7-4146-9d9b-cc755610e152": { + "id": "478c5369-cda7-4146-9d9b-cc755610e152", + "type": "basic", "selected": false, - "x": 638.5444059976933, - "y": 180.06343713956164, + "x": 649.063637273422, + "y": 157.20250376061193, "ports": [ { - "id": "178fa7e2-f83f-4ba9-8f57-a11e60db962f", - "type": "tag output", - "x": 666.5475560263077, - "y": 191.5654135150047, - "name": "tag output", + "id": "e2cd6528-76ba-4c0d-9f3f-22396a195c92", + "type": "parent", + "x": 645.0693116870248, + "y": 173.69702156661896, + "name": "parent", + "alignment": "left", + "parentNode": "478c5369-cda7-4146-9d9b-cc755610e152", + "links": [ + "25ac5673-a33a-4962-980f-7fa3fdc646bb" + ], + "in": true, + "label": "parent" + }, + { + "id": "ade1685e-705c-4fbc-b027-b103b1496d0a", + "type": "children", + "x": 721.4916545975021, + "y": 173.69702156661896, + "name": "children", "alignment": "right", - "parentNode": "a284a54f-fd9e-4235-8275-5000bdfbaf7d", + "parentNode": "478c5369-cda7-4146-9d9b-cc755610e152", "links": [ - "e6c162dc-d7c0-46a5-9531-843d064600c9" + "c15b87d4-3225-4373-bdba-91f3c375a138" ], "in": false, - "label": "tag output" + "label": "children" } ], - "name": "20", + "name": "Inverter", "color": "rgb(255,153,51)" }, - "e9a09d02-8343-4a1f-bf75-8f56206278cf": { - "id": "e9a09d02-8343-4a1f-bf75-8f56206278cf", - "type": "tag", + "8abddf62-30cb-4417-8869-859fc37ccd1b": { + "id": "8abddf62-30cb-4417-8869-859fc37ccd1b", + "type": "basic", "selected": false, - "x": 911.9008073817764, - "y": 177.75663206459043, + "x": 427.5086435945344, + "y": 207.72654437885774, "ports": [ { - "id": "5c44f91d-8b75-4aad-969f-54a75491080d", - "type": "tag input", - "x": 908.896690073309, - "y": 189.25860844003353, - "name": "tag input", + "id": "5ce8bfd9-37ce-4bb0-87a3-d6af9c552ea3", + "type": "parent", + "x": 423.5143180081371, + "y": 224.22379123120498, + "name": "parent", "alignment": "left", - "parentNode": "e9a09d02-8343-4a1f-bf75-8f56206278cf", + "parentNode": "8abddf62-30cb-4417-8869-859fc37ccd1b", "links": [ - "a9c3eaaa-cd28-42d0-bd48-24f834fb419f" + "719acb68-d759-48aa-adce-93fee46efdfc" ], "in": true, - "label": "tag input" - } - ], - "name": "{n_obs}", - "color": "rgb(255,153,51)" - }, - "38631cfc-99fa-40ab-acc5-89c9012d4ee7": { - "id": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", - "type": "tag", - "selected": false, - "x": 480.6124567474049, - "y": 462.98846597462517, - "ports": [ + "label": "parent" + }, { - "id": "c36b298a-6ca3-4e7a-a81a-606ba64b6109", - "type": "tag output", - "x": 512.8182305415182, - "y": 474.47582319817906, - "name": "tag output", + "id": "0221083d-596a-4bba-8f6c-84c00b918db6", + "type": "children", + "x": 565.6762310829635, + "y": 224.22379123120498, + "name": "children", "alignment": "right", - "parentNode": "38631cfc-99fa-40ab-acc5-89c9012d4ee7", + "parentNode": "8abddf62-30cb-4417-8869-859fc37ccd1b", "links": [ - "aeffaa7a-9fcd-495c-b362-c06f4181b7a4" + "25ac5673-a33a-4962-980f-7fa3fdc646bb", + "4872f205-a38f-4d14-9230-304ca3ce2835" ], "in": false, - "label": "tag output" + "label": "children" } ], - "name": "0.3", - "color": "rgb(255,153,51)" + "name": "ReactiveFallback", + "color": "rgb(255,0,0)" }, - "4ef17eb9-1a61-4664-b17b-8f9d9238f403": { - "id": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", + "ac94de35-3590-41a2-9126-2e77c61ee0ca": { + "id": "ac94de35-3590-41a2-9126-2e77c61ee0ca", "type": "basic", "selected": false, - "x": 645.5490196078433, - "y": 443.0346020761246, + "x": 221.49178255372948, + "y": 311.504424778761, "ports": [ { - "id": "965ed5ac-1260-4a28-a055-f5f310c316cd", + "id": "36e40ad6-1c14-47b1-84f3-b8e73789312e", "type": "parent", - "x": 641.5570738499813, - "y": 459.53924625812044, + "x": 217.48818045480226, + "y": 327.9953819354663, "name": "parent", "alignment": "left", - "parentNode": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", + "parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca", "links": [ - "b1e9b725-bd30-4bf0-bf76-230d627d03c3" + "396b885c-960f-48c4-af6f-619b7243d3be" ], "in": true, "label": "parent" }, { - "id": "d796bdb7-3426-4a0f-892d-81b6b6dc8cc2", - "type": "input", - "x": 642.5567269281244, - "y": 485.52931111448584, - "name": "speed", + "id": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "type": "children", + "x": 370.6908980393475, + "y": 327.9953819354663, + "name": "children", + "alignment": "right", + "parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "links": [ + "719acb68-d759-48aa-adce-93fee46efdfc", + "7aa184c8-d045-414f-815e-c1145d86c2bd" + ], + "in": false, + "label": "children" + } + ], + "name": "ReactiveSequence", + "color": "rgb(0,128,255)" + }, + "cb0af77d-3029-47fd-89ab-c64a248dd6da": { + "id": "cb0af77d-3029-47fd-89ab-c64a248dd6da", + "type": "basic", + "selected": false, + "x": 436.4096080910243, + "y": 412.7686472819215, + "ports": [ + { + "id": "fedfde51-31f9-4207-b3f6-2f6484aa13ac", + "type": "parent", + "x": 432.42714838503343, + "y": 429.25961215482835, + "name": "parent", "alignment": "left", - "parentNode": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", + "parentNode": "cb0af77d-3029-47fd-89ab-c64a248dd6da", "links": [ - "aeffaa7a-9fcd-495c-b362-c06f4181b7a4" + "7aa184c8-d045-414f-815e-c1145d86c2bd" ], "in": true, - "label": "input" + "label": "parent" }, { - "id": "137ea818-fe56-4e9f-9912-424f7ae85c8e", + "id": "38ed462d-e857-4794-9698-40337497d94a", "type": "input", - "x": 642.5567269281244, - "y": 511.5385242551649, - "name": "obs_port", + "x": 433.41744572424017, + "y": 455.26047297430136, + "name": "speed", "alignment": "left", - "parentNode": "4ef17eb9-1a61-4664-b17b-8f9d9238f403", + "parentNode": "cb0af77d-3029-47fd-89ab-c64a248dd6da", "links": [ - "8ae64583-82c7-4f04-a143-bcf21d341fcc" + "ae73763a-6b60-4350-81c6-c4311a2e5564" ], "in": true, "label": "input" @@ -582,31 +609,6 @@ ], "name": "Forward", "color": "rgb(128,0,128)" - }, - "5cfa8c28-381b-43b0-9261-28ab9a5b989c": { - "id": "5cfa8c28-381b-43b0-9261-28ab9a5b989c", - "type": "tag", - "selected": true, - "x": 480.6124567474049, - "y": 561.8350634371395, - "ports": [ - { - "id": "cf2089d6-c926-4183-a0dc-132e7a37531c", - "type": "tag output", - "x": 528.1392515280378, - "y": 574.4758372778005, - "name": "tag output", - "alignment": "right", - "parentNode": "5cfa8c28-381b-43b0-9261-28ab9a5b989c", - "links": [ - "8ae64583-82c7-4f04-a143-bcf21d341fcc" - ], - "in": false, - "label": "tag output" - } - ], - "name": "value", - "color": "rgb(255,153,51)" } } } diff --git a/backend/filesystem/visual_follow_person/actions/DetectPerson.py b/backend/filesystem/visual_follow_person/actions/DetectPerson.py new file mode 100644 index 000000000..42688a4d2 --- /dev/null +++ b/backend/filesystem/visual_follow_person/actions/DetectPerson.py @@ -0,0 +1,96 @@ +import py_trees +import sensor_msgs +import tree_tools +import std_msgs +from cv_bridge import CvBridge +import sensor_msgs +import cv2 +import numpy as np + +class DetectPerson(py_trees.behaviour.Behaviour): + + def __init__(self, name, ports = None): + + """ Constructor, executed when the class is instantiated """ + + # Configure the name of the behaviour + super().__init__(name) + self.logger.debug("%s.__init__()" % (self.__class__.__name__)) + + # Get the ports + self.ports = ports + + def setup(self, **kwargs: int) -> None: + + """ Executed when the setup function is called upon the tree """ + + # Get the node passed from the tree (needed for interaction with ROS) + try: + self.node = kwargs['node'] + except KeyError as e: + error_message = "Couldn't find the tree node" + raise KeyError(error_message) from e + + # Setup the subscription to camera + self.subscription = self.node.create_subscription( + sensor_msgs.msg.Image, + '/depth_camera/image_raw', + self.listener_callback, + 10 + ) + + self.bridge = CvBridge() + self.img_received = False + + def listener_callback(self, msg): + self.last_img = self.bridge.imgmsg_to_cv2(msg) + self.img_received = True + + def initialise(self) -> None: + + """ Executed when coming from an idle state """ + + # Debugging + self.logger.debug("%s.initialise()" % (self.__class__.__name__)) + + def update(self) -> py_trees.common.Status: + + """ Executed when the action is ticked. Do not block! """ + new_status = py_trees.common.Status.FAILURE + + if self.img_received: + # It converts the BGR color space of image to HSV color space + img = self.last_img + hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) + + # Threshold of blue in HSV space + lower_blue = np.array([40, 40, 20]) + upper_blue = np.array([70, 255, 255]) + + # preparing the mask to overlay + mask = cv2.inRange(hsv, lower_blue, upper_blue) + + # Apply the mask + result = cv2.bitwise_and(img, img, mask = mask) + + # Calculate green blob center + gray_image = cv2.cvtColor(result, cv2.COLOR_BGR2GRAY) + ret,thresh = cv2.threshold(gray_image,127,255,0) + M = cv2.moments(thresh) + + cX = -1 + if M["m00"] != 0: + cX = int(M["m10"] / M["m00"]) + new_status = py_trees.common.Status.SUCCESS + + # Send the position through the port + tree_tools.set_port_content(self.ports["person_pos"], cX) + + return new_status + + def terminate(self, new_status: py_trees.common.Status) -> None: + + """ Called whenever the behaviour switches to a non-running state """ + + # Debugging + self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) \ No newline at end of file diff --git a/backend/filesystem/visual_follow_person/actions/Move.py b/backend/filesystem/visual_follow_person/actions/Move.py new file mode 100644 index 000000000..37673124d --- /dev/null +++ b/backend/filesystem/visual_follow_person/actions/Move.py @@ -0,0 +1,73 @@ +import py_trees +import geometry_msgs +import tree_tools + +class Move(py_trees.behaviour.Behaviour): + + def __init__(self, name, ports = None): + + """ Constructor, executed when the class is instantiated""" + + # Configure the name of the behaviour + super().__init__(name) + self.logger.debug("%s.__init__()" % (self.__class__.__name__)) + + # Get the ports + self.ports = ports + + def setup(self, **kwargs) -> None: + + """ Executed when the setup function is called upon the tree """ + + # Get the node passed from the tree (needed for interaction with ROS) + try: + self.node = kwargs['node'] + except KeyError as e: + error_message = "Couldn't find the tree node" + raise KeyError(error_message) from e + + # Setup the publisher for the robot speed + self.publisher = self.node.create_publisher( + msg_type=geometry_msgs.msg.Twist, + topic="/cmd_vel", + qos_profile=10 + ) + + self.image_x_center = int(tree_tools.get_port_content(self.ports["image_x_center"])) + + def initialise(self) -> None: + + """ Executed when coming from an idle state """ + + # Debugging + self.logger.debug("%s.initialise()" % (self.__class__.__name__)) + + def update(self) -> py_trees.common.Status: + + """ Executed when the action is ticked. Do not block! """ + + person_pos = int(tree_tools.get_port_content(self.ports["person_pos"])) + error = self.image_x_center - person_pos + print("PERSON POS:" + str(person_pos)) + print("ERROR:" + str(error)) + + # Publish the speed msg + msg = geometry_msgs.msg.Twist() + if abs(error) < 80: msg.linear.x = 0.8 - (0.8 * abs(error) / 80) + else: msg.linear.x = 0.0 + msg.angular.z = error * 0.003 + self.publisher.publish(msg) + + return py_trees.common.Status.RUNNING + + def terminate(self, new_status: py_trees.common.Status) -> None: + + """ Called whenever the behaviour switches to a non-running state """ + + # Stop the robot + msg = geometry_msgs.msg.Twist() + msg.linear.x = 0.0 + self.publisher.publish(msg) + + # Debugging + self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) \ No newline at end of file diff --git a/backend/filesystem/visual_follow_person/actions/Turn.py b/backend/filesystem/visual_follow_person/actions/Turn.py new file mode 100644 index 000000000..93503794b --- /dev/null +++ b/backend/filesystem/visual_follow_person/actions/Turn.py @@ -0,0 +1,63 @@ +import py_trees +import geometry_msgs + +class Turn(py_trees.behaviour.Behaviour): + + def __init__(self, name, ports = None): + + """ Constructor, executed when the class is instantiated """ + + # Configure the name of the behavioure + super().__init__(name) + self.logger.debug("%s.__init__()" % (self.__class__.__name__)) + + # Get the ports + self.ports = ports + + def setup(self, **kwargs: int) -> None: + + """ Executed when the setup function is called upon the tree """ + + # Get the node passed from the tree (needed for interaction with ROS) + try: + self.node = kwargs['node'] + except KeyError as e: + error_message = "Couldn't find the tree node" + raise KeyError(error_message) from e + + # Setup the publisher for the robot speed + self.publisher = self.node.create_publisher( + msg_type=geometry_msgs.msg.Twist, + topic="/cmd_vel", + qos_profile=10 + ) + + def initialise(self) -> None: + + """ Executed when coming from an idle state """ + + # Debugging + self.logger.debug("%s.initialise()" % (self.__class__.__name__)) + + def update(self) -> py_trees.common.Status: + + """ Executed when the action is ticked. Do not block! """ + + # Publish the speed msg + msg = geometry_msgs.msg.Twist() + msg.angular.z = -0.4 + self.publisher.publish(msg) + + return py_trees.common.Status.RUNNING + + def terminate(self, new_status: py_trees.common.Status) -> None: + + """ Called whenever the behaviour switches to a non-running state """ + + # Stop the robot + msg = geometry_msgs.msg.Twist() + msg.angular.z = 0.0 + self.publisher.publish(msg) + + # Debugging + self.logger.debug("%s.terminate()[%s->%s]" % (self.__class__.__name__, self.status, new_status)) \ No newline at end of file diff --git a/backend/filesystem/visual_follow_person/graph.json b/backend/filesystem/visual_follow_person/graph.json new file mode 100644 index 000000000..9f9e24602 --- /dev/null +++ b/backend/filesystem/visual_follow_person/graph.json @@ -0,0 +1,546 @@ +{ + "id": "6965f5c5-3788-427f-a066-24494d05dbf4", + "offsetX": -31.316475935061135, + "offsetY": -111.04435321446891, + "zoom": 79.09999999999992, + "gridSize": 0, + "layers": [ + { + "id": "3c777675-aadf-46eb-9bc1-7772fe191011", + "type": "diagram-links", + "isSvg": true, + "transformed": true, + "models": { + "396b885c-960f-48c4-af6f-619b7243d3be": { + "id": "396b885c-960f-48c4-af6f-619b7243d3be", + "type": "default", + "selected": false, + "source": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", + "sourcePort": "42be04c1-b9a7-482f-a3ad-14af212d8195", + "target": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "targetPort": "36e40ad6-1c14-47b1-84f3-b8e73789312e", + "points": [ + { + "id": "dd2fad6f-c19e-4da1-8f90-1719569ce20f", + "type": "point", + "x": 187.85267029349066, + "y": 278.06913532133524 + }, + { + "id": "b1eb51c2-fe74-4255-961c-990c011922d9", + "type": "point", + "x": 279.38240074187, + "y": 287.50866398795085 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "f6d486ef-4919-4ba6-b12f-449a32ac8a23": { + "id": "f6d486ef-4919-4ba6-b12f-449a32ac8a23", + "type": "default", + "selected": false, + "source": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "sourcePort": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "target": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "targetPort": "6cc9f3ad-6755-431d-9598-619b622c32d1", + "points": [ + { + "id": "29cb329f-75a1-44eb-9b95-98672203bde4", + "type": "point", + "x": 432.585118326415, + "y": 287.50866398795085 + }, + { + "id": "59b7e935-8022-44ff-9352-ef48b49619f4", + "type": "point", + "x": 490.5075587696831, + "y": 229.58619460892604 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "948403d8-d2ec-4155-9a00-e5d7be18dcdf": { + "id": "948403d8-d2ec-4155-9a00-e5d7be18dcdf", + "type": "default", + "selected": false, + "source": "73822b50-af96-4d13-94bf-757f416e1043", + "sourcePort": "20c96d61-e98a-49a9-9fbf-56beeea71e79", + "target": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "targetPort": "d5707c1a-baac-49c2-8c90-9edee7c70a14", + "points": [ + { + "id": "ad947109-2a65-449e-b8df-dfdb7f1c539d", + "type": "point", + "x": 702.8969393006568, + "y": 183.06281227976888 + }, + { + "id": "c00b9779-b578-4673-ab01-43bcc7bc69a4", + "type": "point", + "x": 632.6694814897617, + "y": 229.58619460892604 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "2ffcb481-eca4-48f9-b4f1-073265a4f6e1": { + "id": "2ffcb481-eca4-48f9-b4f1-073265a4f6e1", + "type": "default", + "selected": false, + "source": "8ab1053a-e9ce-4027-bb3b-e13e5a9ce04d", + "sourcePort": "4abb7653-f821-41d7-bfb5-2867d4982c9b", + "target": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "targetPort": "d5707c1a-baac-49c2-8c90-9edee7c70a14", + "points": [ + { + "id": "401c168a-b34c-43f3-a1e6-5e5469d8b0ef", + "type": "point", + "x": 704.1611618038173, + "y": 305.81881540760855 + }, + { + "id": "baa288b9-a7ed-460c-9937-9549573d4916", + "type": "point", + "x": 632.6694814897617, + "y": 229.58619460892604 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "38386e47-6f57-4ae5-866b-d297f0642621": { + "id": "38386e47-6f57-4ae5-866b-d297f0642621", + "type": "default", + "selected": false, + "source": "d297d2e6-60c0-4b37-8ee5-5f45421794ef", + "sourcePort": "698b9aca-20ec-4710-a0c1-293286225843", + "target": "73822b50-af96-4d13-94bf-757f416e1043", + "targetPort": "c26a8347-9953-45c2-9c90-b0bd441937a4", + "points": [ + { + "id": "ce2571bd-09f1-4f80-8e8a-af7e92bca19d", + "type": "point", + "x": 884.6922066300116, + "y": 261.76066310151356 + }, + { + "id": "cf7b46f0-35f3-4c2d-bf9f-e02675cafeed", + "type": "point", + "x": 820.7435669037947, + "y": 209.06365380873734 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "bebffec3-e4cb-4399-9c79-e19affc5b638": { + "id": "bebffec3-e4cb-4399-9c79-e19affc5b638", + "type": "default", + "selected": false, + "source": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "sourcePort": "0bacbebb-9c40-4a17-879b-218a7251b767", + "target": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "targetPort": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "points": [ + { + "id": "deb83a78-bdfa-41df-a96b-05969f2d0261", + "type": "point", + "x": 525.9057888581787, + "y": 440.07926067566336 + }, + { + "id": "26e86902-8331-439d-b418-a84285cc6d31", + "type": "point", + "x": 432.585118326415, + "y": 287.50866398795085 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "8e3fabdd-338b-4734-a17a-c94ffd96e0e9": { + "id": "8e3fabdd-338b-4734-a17a-c94ffd96e0e9", + "type": "default", + "selected": false, + "source": "91bfb59f-2d8f-4d98-b10b-e63dc573c5db", + "sourcePort": "e733b924-4f0c-4b03-91d9-4726f561f187", + "target": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "targetPort": "a93881ea-5273-4c20-be82-6f8b19289222", + "points": [ + { + "id": "4a13e4ba-bb50-4df2-bb97-f8e2dfac604a", + "type": "point", + "x": 419.77438109271657, + "y": 499.6873439834818 + }, + { + "id": "d9b8989c-9cc5-4570-b069-ea9bbb8d7d94", + "type": "point", + "x": 526.8960958426377, + "y": 466.0800732688751 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + }, + "1467b96a-25b9-467c-98cb-a14b7ff3d537": { + "id": "1467b96a-25b9-467c-98cb-a14b7ff3d537", + "type": "default", + "selected": false, + "source": "c3ddb5d3-470b-41bb-bdb6-1dd3f9b40d67", + "sourcePort": "4932da80-3a61-4afc-8fa4-8a16fb257330", + "target": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "targetPort": "43840451-2a2d-4dd3-8cf0-e3cd036b7389", + "points": [ + { + "id": "3a729b9a-873f-42fa-b960-7c0992126b1b", + "type": "point", + "x": 416.46628141111836, + "y": 542.7973390574595 + }, + { + "id": "c1097e7f-2816-4c39-bb1a-9c1a52498b1f", + "type": "point", + "x": 526.8960958426377, + "y": 492.0809340883481 + } + ], + "labels": [], + "width": 3, + "color": "gray", + "curvyness": 50, + "selectedColor": "rgb(0,192,255)" + } + } + }, + { + "id": "96ed375b-efac-45e3-b77b-77040d3ad195", + "type": "diagram-nodes", + "isSvg": false, + "transformed": true, + "models": { + "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c": { + "id": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", + "type": "basic", + "selected": false, + "x": 96.76779407166809, + "y": 256.56581438304863, + "ports": [ + { + "id": "42be04c1-b9a7-482f-a3ad-14af212d8195", + "type": "children", + "x": 182.84845300339603, + "y": 273.0649180312406, + "name": "children", + "alignment": "right", + "parentNode": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c", + "links": [ + "396b885c-960f-48c4-af6f-619b7243d3be" + ], + "in": false, + "label": "children" + } + ], + "name": "Tree Root", + "color": "rgb(0,204,0)" + }, + "ac94de35-3590-41a2-9126-2e77c61ee0ca": { + "id": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "type": "basic", + "selected": false, + "x": 278.38179519595457, + "y": 265.9924146649809, + "ports": [ + { + "id": "36e40ad6-1c14-47b1-84f3-b8e73789312e", + "type": "parent", + "x": 274.37819309702763, + "y": 282.5044563431085, + "name": "parent", + "alignment": "left", + "parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "links": [ + "396b885c-960f-48c4-af6f-619b7243d3be" + ], + "in": true, + "label": "parent" + }, + { + "id": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139", + "type": "children", + "x": 427.5809106815726, + "y": 282.5044563431085, + "name": "children", + "alignment": "right", + "parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca", + "links": [ + "f6d486ef-4919-4ba6-b12f-449a32ac8a23", + "bebffec3-e4cb-4399-9c79-e19affc5b638" + ], + "in": false, + "label": "children" + } + ], + "name": "ReactiveSequence", + "color": "rgb(0,128,255)" + }, + "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7": { + "id": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "type": "basic", + "selected": false, + "x": 489.5069532237677, + "y": 208.09102402022725, + "ports": [ + { + "id": "6cc9f3ad-6755-431d-9598-619b622c32d1", + "type": "parent", + "x": 485.5033511248407, + "y": 224.5819773188314, + "name": "parent", + "alignment": "left", + "parentNode": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "links": [ + "f6d486ef-4919-4ba6-b12f-449a32ac8a23" + ], + "in": true, + "label": "parent" + }, + { + "id": "d5707c1a-baac-49c2-8c90-9edee7c70a14", + "type": "children", + "x": 627.665264199667, + "y": 224.5819773188314, + "name": "children", + "alignment": "right", + "parentNode": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7", + "links": [ + "948403d8-d2ec-4155-9a00-e5d7be18dcdf", + "2ffcb481-eca4-48f9-b4f1-073265a4f6e1" + ], + "in": false, + "label": "children" + } + ], + "name": "ReactiveFallback", + "color": "rgb(255,0,0)" + }, + "73822b50-af96-4d13-94bf-757f416e1043": { + "id": "73822b50-af96-4d13-94bf-757f416e1043", + "type": "basic", + "selected": false, + "x": 701.8963337547415, + "y": 161.56763590391856, + "ports": [ + { + "id": "20c96d61-e98a-49a9-9fbf-56beeea71e79", + "type": "parent", + "x": 697.8927316558144, + "y": 178.0586046349265, + "name": "parent", + "alignment": "left", + "parentNode": "73822b50-af96-4d13-94bf-757f416e1043", + "links": [ + "948403d8-d2ec-4155-9a00-e5d7be18dcdf" + ], + "in": true, + "label": "parent" + }, + { + "id": "c26a8347-9953-45c2-9c90-b0bd441937a4", + "type": "output", + "x": 815.7393496137, + "y": 204.059446163895, + "name": "person_pos", + "alignment": "right", + "parentNode": "73822b50-af96-4d13-94bf-757f416e1043", + "links": [ + "38386e47-6f57-4ae5-866b-d297f0642621" + ], + "in": false, + "label": "output" + } + ], + "name": "DetectPerson", + "color": "rgb(128,0,128)" + }, + "8ab1053a-e9ce-4027-bb3b-e13e5a9ce04d": { + "id": "8ab1053a-e9ce-4027-bb3b-e13e5a9ce04d", + "type": "basic", + "selected": false, + "x": 703.160556257902, + "y": 284.32364096080863, + "ports": [ + { + "id": "4abb7653-f821-41d7-bfb5-2867d4982c9b", + "type": "parent", + "x": 699.1569541589749, + "y": 300.8145981175139, + "name": "parent", + "alignment": "left", + "parentNode": "8ab1053a-e9ce-4027-bb3b-e13e5a9ce04d", + "links": [ + "2ffcb481-eca4-48f9-b4f1-073265a4f6e1" + ], + "in": true, + "label": "parent" + } + ], + "name": "Turn", + "color": "rgb(128,0,128)" + }, + "d297d2e6-60c0-4b37-8ee5-5f45421794ef": { + "id": "d297d2e6-60c0-4b37-8ee5-5f45421794ef", + "type": "tag", + "selected": false, + "x": 882.6801517067012, + "y": 245.2591656131473, + "ports": [ + { + "id": "698b9aca-20ec-4710-a0c1-293286225843", + "type": "tag input", + "x": 879.687989339917, + "y": 256.7564554566712, + "name": "tag input", + "alignment": "left", + "parentNode": "d297d2e6-60c0-4b37-8ee5-5f45421794ef", + "links": [ + "38386e47-6f57-4ae5-866b-d297f0642621" + ], + "in": true, + "label": "tag input" + } + ], + "name": "{person_pos}", + "color": "rgb(255,153,51)" + }, + "3ee01374-0713-4fb6-8da1-eba9e95e5372": { + "id": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "type": "basic", + "selected": false, + "x": 524.9051833122635, + "y": 418.5840707964596, + "ports": [ + { + "id": "0bacbebb-9c40-4a17-879b-218a7251b767", + "type": "parent", + "x": 520.9015812133363, + "y": 435.07504338556873, + "name": "parent", + "alignment": "left", + "parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "links": [ + "bebffec3-e4cb-4399-9c79-e19affc5b638" + ], + "in": true, + "label": "parent" + }, + { + "id": "a93881ea-5273-4c20-be82-6f8b19289222", + "type": "input", + "x": 521.8918785525431, + "y": 461.0758656240327, + "name": "person_pos", + "alignment": "left", + "parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "links": [ + "8e3fabdd-338b-4734-a17a-c94ffd96e0e9" + ], + "in": true, + "label": "input" + }, + { + "id": "43840451-2a2d-4dd3-8cf0-e3cd036b7389", + "type": "input", + "x": 521.8918785525431, + "y": 487.0767264435057, + "name": "image_x_center", + "alignment": "left", + "parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372", + "links": [ + "1467b96a-25b9-467c-98cb-a14b7ff3d537" + ], + "in": true, + "label": "input" + } + ], + "name": "Move", + "color": "rgb(128,0,128)" + }, + "91bfb59f-2d8f-4d98-b10b-e63dc573c5db": { + "id": "91bfb59f-2d8f-4d98-b10b-e63dc573c5db", + "type": "tag", + "selected": false, + "x": 311.2515802781292, + "y": 483.1858407079641, + "ports": [ + { + "id": "e733b924-4f0c-4b03-91d9-4726f561f187", + "type": "tag output", + "x": 414.77016380262194, + "y": 494.6831266933872, + "name": "tag output", + "alignment": "right", + "parentNode": "91bfb59f-2d8f-4d98-b10b-e63dc573c5db", + "links": [ + "8e3fabdd-338b-4734-a17a-c94ffd96e0e9" + ], + "in": false, + "label": "tag output" + } + ], + "name": "{person_pos}", + "color": "rgb(255,153,51)" + }, + "c3ddb5d3-470b-41bb-bdb6-1dd3f9b40d67": { + "id": "c3ddb5d3-470b-41bb-bdb6-1dd3f9b40d67", + "type": "tag", + "selected": true, + "x": 374.4627054361569, + "y": 526.2958280657399, + "ports": [ + { + "id": "4932da80-3a61-4afc-8fa4-8a16fb257330", + "type": "tag output", + "x": 411.4620737662755, + "y": 537.7931217673644, + "name": "tag output", + "alignment": "right", + "parentNode": "c3ddb5d3-470b-41bb-bdb6-1dd3f9b40d67", + "links": [ + "1467b96a-25b9-467c-98cb-a14b7ff3d537" + ], + "in": false, + "label": "tag output" + } + ], + "name": "320", + "color": "rgb(255,153,51)" + } + } + } + ] +} \ No newline at end of file diff --git a/backend/ros_template/ros_template/execute_docker.py b/backend/ros_template/ros_template/execute_docker.py new file mode 100644 index 000000000..90dad38b1 --- /dev/null +++ b/backend/ros_template/ros_template/execute_docker.py @@ -0,0 +1,38 @@ +import rclpy +from rclpy.node import Node +import tree_factory +import os + +class TreeExecutor(Node): + + def __init__(self): + + super().__init__('tree_executor_node') + + # Get the path to the root of the package + ws_path = "/workspace/code" + tree_path = os.path.join(ws_path, 'self_contained_tree.xml') + + factory = tree_factory.TreeFactory() + self.tree = factory.create_tree_from_file(tree_path) + self.tree.tick_tock(period_ms=50) + + def spin_tree(self): + + try: + rclpy.spin(self.tree.node) + except (KeyboardInterrupt, rclpy.executors.ExternalShutdownException): + self.tree.shutdown() + finally: + print("Shutdown completed") + +def main(): + + # Init the components + rclpy.init() + executor = TreeExecutor() + + # Spin the tree + executor.spin_tree() + +main() \ No newline at end of file diff --git a/backend/tree_api/__pycache__/urls.cpython-310.pyc b/backend/tree_api/__pycache__/urls.cpython-310.pyc index e3ad0ae3f..6d2460c1e 100644 Binary files a/backend/tree_api/__pycache__/urls.cpython-310.pyc and b/backend/tree_api/__pycache__/urls.cpython-310.pyc differ diff --git a/backend/tree_api/__pycache__/views.cpython-310.pyc b/backend/tree_api/__pycache__/views.cpython-310.pyc index f23fb2ec6..d61274b8e 100644 Binary files a/backend/tree_api/__pycache__/views.cpython-310.pyc and b/backend/tree_api/__pycache__/views.cpython-310.pyc differ diff --git a/backend/tree_api/urls.py b/backend/tree_api/urls.py index dd64cb4f9..e6e964807 100644 --- a/backend/tree_api/urls.py +++ b/backend/tree_api/urls.py @@ -12,5 +12,6 @@ path('delete_file/', views.delete_file, name='delete_file'), path('save_file/', views.save_file, name='save_file'), path('translate_json/', views.translate_json, name='translate_json'), - path('generate_app/', views.generate_app, name='generate_app') + path('generate_app/', views.generate_app, name='generate_app'), + path('get_simplified_app/', views.get_simplified_app, name='generate_app') ] \ No newline at end of file diff --git a/backend/tree_api/views.py b/backend/tree_api/views.py index eac426419..d2e14df82 100644 --- a/backend/tree_api/views.py +++ b/backend/tree_api/views.py @@ -10,6 +10,8 @@ from django.http import JsonResponse import mimetypes import json +import shutil +import zipfile @api_view(['GET']) def create_project(request): @@ -256,5 +258,62 @@ def generate_app(request): else: return Response({'error': 'app_name parameter is missing'}, status=500) +@api_view(['POST']) +def get_simplified_app(request): + + # Get the app name + app_name = request.data.get('app_name') + tree_graph = request.data.get('content') + + # Make folder path relative to Django app + base_path = os.path.join(settings.BASE_DIR, 'filesystem') + project_path = os.path.join(base_path, app_name) + action_path = os.path.join(project_path, 'actions') + + working_folder = "/tmp/wf" + tree_path = "/tmp/tree.xml" + self_contained_tree_path = os.path.join(working_folder, 'self_contained_tree.xml') + tree_gardener_src = os.path.join(settings.BASE_DIR, 'tree_gardener') + template_path = os.path.join(settings.BASE_DIR, 'ros_template') + + if app_name and tree_graph: + try: + # 1. Create the working folder + if os.path.exists(working_folder): + shutil.rmtree(working_folder) + os.mkdir(working_folder) + + # 2. Generate a basic tree from the JSON definition + json_translator.translate(tree_graph, tree_path) + + # 3. Generate a self-contained tree + tree_generator.generate(tree_path, action_path, self_contained_tree_path) + + # 4. Copy necessary files from tree_gardener and ros_template + factory_location = tree_gardener_src + "/tree_gardener/tree_factory.py" + tools_location = tree_gardener_src + "/tree_gardener/tree_tools.py" + entrypoint_location = template_path + "/ros_template/execute_docker.py" + shutil.copy(factory_location, working_folder) + shutil.copy(tools_location, working_folder) + shutil.copy(entrypoint_location, working_folder) + + # 5. Generate the zip + zip_path = working_folder + ".zip" + with zipfile.ZipFile(zip_path, 'w') as zipf: + for root, dirs, files in os.walk(working_folder): + for file in files: + zipf.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), working_folder)) + + # 6. Return the zip + zip_file = open(zip_path, 'rb') + mime_type, _ = mimetypes.guess_type(zip_path) + response = HttpResponse(zip_file, content_type=mime_type) + response['Content-Disposition'] = f'attachment; filename={os.path.basename(zip_path)}' + + return response + except Exception as e: + return Response({'success': False, 'message': str(e)}, status=400) + else: + return Response({'error': 'app_name parameter is missing'}, status=500) \ No newline at end of file diff --git a/frontend/node_modules/.yarn-integrity b/frontend/node_modules/.yarn-integrity index b1adf3aa6..03fec33e6 100644 --- a/frontend/node_modules/.yarn-integrity +++ b/frontend/node_modules/.yarn-integrity @@ -24,6 +24,7 @@ "react-dom@^18.2.0", "react-resizable@^3.0.5", "react-scripts@5.0.1", + "react-spinners@^0.13.8", "react-split-pane@^0.1.92", "react-treebeard@^3.2.4", "react@^18.2.0", @@ -1425,6 +1426,7 @@ "react-refresh@^0.11.0": "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046", "react-resizable@^3.0.5": "https://registry.yarnpkg.com/react-resizable/-/react-resizable-3.0.5.tgz#362721f2efbd094976f1780ae13f1ad7739786c1", "react-scripts@5.0.1": "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003", + "react-spinners@^0.13.8": "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.13.8.tgz#5262571be0f745d86bbd49a1e6b49f9f9cb19acc", "react-split-pane@^0.1.92": "https://registry.yarnpkg.com/react-split-pane/-/react-split-pane-0.1.92.tgz#68242f72138aed95dd5910eeb9d99822c4fc3a41", "react-style-proptype@^3.2.2": "https://registry.yarnpkg.com/react-style-proptype/-/react-style-proptype-3.2.2.tgz#d8e998e62ce79ec35b087252b90f19f1c33968a0", "react-transition-group@^2.0.0": "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d", diff --git a/frontend/node_modules/react-spinners/.vscode/settings.json b/frontend/node_modules/react-spinners/.vscode/settings.json new file mode 100644 index 000000000..be0758968 --- /dev/null +++ b/frontend/node_modules/react-spinners/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[ruby]": { + "editor.defaultFormatter": "mbessey.vscode-rufo" + } +} diff --git a/frontend/node_modules/react-spinners/.yarnrc.yml b/frontend/node_modules/react-spinners/.yarnrc.yml new file mode 100644 index 000000000..372142960 --- /dev/null +++ b/frontend/node_modules/react-spinners/.yarnrc.yml @@ -0,0 +1,3 @@ +nodeLinker: node-modules + +yarnPath: .yarn/releases/yarn-3.3.0.cjs diff --git a/frontend/node_modules/react-spinners/BarLoader.d.ts b/frontend/node_modules/react-spinners/BarLoader.d.ts new file mode 100644 index 000000000..aefdd89cf --- /dev/null +++ b/frontend/node_modules/react-spinners/BarLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthProps } from "./helpers/props"; +declare function BarLoader({ loading, color, speedMultiplier, cssOverride, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; +export default BarLoader; diff --git a/frontend/node_modules/react-spinners/BarLoader.js b/frontend/node_modules/react-spinners/BarLoader.js new file mode 100644 index 000000000..ccff19813 --- /dev/null +++ b/frontend/node_modules/react-spinners/BarLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var colors_1 = require("./helpers/colors"); +var long = (0, animation_1.createAnimation)("BarLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "long"); +var short = (0, animation_1.createAnimation)("BarLoader", "0% {left: -200%;right: 100%} 60% {left: 107%;right: -8%} 100% {left: 107%;right: -8%}", "short"); +function BarLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(width), height: (0, unitConverter_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, colors_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(height), + overflow: "hidden", + backgroundColor: color, + backgroundClip: "padding-box", + display: "block", + borderRadius: 2, + willChange: "left, right", + animationFillMode: "forwards", + animation: "".concat(i === 1 ? long : short, " ").concat(2.1 / speedMultiplier, "s ").concat(i === 2 ? "".concat(1.15 / speedMultiplier, "s") : "", " ").concat(i === 1 ? "cubic-bezier(0.65, 0.815, 0.735, 0.395)" : "cubic-bezier(0.165, 0.84, 0.44, 1)", " infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = BarLoader; diff --git a/frontend/node_modules/react-spinners/BeatLoader.d.ts b/frontend/node_modules/react-spinners/BeatLoader.d.ts new file mode 100644 index 000000000..acd998f72 --- /dev/null +++ b/frontend/node_modules/react-spinners/BeatLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function BeatLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default BeatLoader; diff --git a/frontend/node_modules/react-spinners/BeatLoader.js b/frontend/node_modules/react-spinners/BeatLoader.js new file mode 100644 index 000000000..4962a079f --- /dev/null +++ b/frontend/node_modules/react-spinners/BeatLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var beat = (0, animation_1.createAnimation)("BeatLoader", "50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}", "beat"); +function BeatLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + display: "inline-block", + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animation: "".concat(beat, " ").concat(0.7 / speedMultiplier, "s ").concat(i % 2 ? "0s" : "".concat(0.35 / speedMultiplier, "s"), " infinite linear"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = BeatLoader; diff --git a/frontend/node_modules/react-spinners/BounceLoader.d.ts b/frontend/node_modules/react-spinners/BounceLoader.d.ts new file mode 100644 index 000000000..16cd11544 --- /dev/null +++ b/frontend/node_modules/react-spinners/BounceLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function BounceLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default BounceLoader; diff --git a/frontend/node_modules/react-spinners/BounceLoader.js b/frontend/node_modules/react-spinners/BounceLoader.js new file mode 100644 index 000000000..d15e3376f --- /dev/null +++ b/frontend/node_modules/react-spinners/BounceLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var bounce = (0, animation_1.createAnimation)("BounceLoader", "0% {transform: scale(0)} 50% {transform: scale(1.0)} 100% {transform: scale(0)}", "bounce"); +function BounceLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = function (i) { + var animationTiming = i === 1 ? "".concat(1 / speedMultiplier, "s") : "0s"; + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + backgroundColor: color, + borderRadius: "100%", + opacity: 0.6, + top: 0, + left: 0, + animationFillMode: "both", + animation: "".concat(bounce, " ").concat(2.1 / speedMultiplier, "s ").concat(animationTiming, " infinite ease-in-out"), + }; + }; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = BounceLoader; diff --git a/frontend/node_modules/react-spinners/CHANGELOG.md b/frontend/node_modules/react-spinners/CHANGELOG.md new file mode 100644 index 000000000..7a052d42a --- /dev/null +++ b/frontend/node_modules/react-spinners/CHANGELOG.md @@ -0,0 +1,660 @@ +# Change Log + +All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## 0.13.8 + +- **bugfix**: Remove Animation Fill Mode from CircieLoader to fix SSR mismatch style error. [#558](https://github.com/davidhu2000/react-spinners/pull/558) + +## 0.13.7 + +- **bugfix**: fix PacmanLoader container height/width to adjust with size prop + +## 0.13.6 + +- Improve formatting of example code to include `data-testid` prop + +## 0.13.5 + +- Improve README to include additional available props via span tag + +## 0.13.4 + +- **bugfix**: fix server side render issue on `HashLoader` + +## 0.13.3 + +- **bugfix**: Fix PuffLoader initial rendering issue + +## 0.13.2 + +- remove next version badge until needed + +## 0.13.1 + +- update homepage in package.json + +## 0.13.0 + +- Rewrite each loader from the ground up using functional components. +- Replaced `@emotion` with vanilla javascript and inline style to reduce component size by 75%. This project now have 0 dependencies, while continuing to support server side rendering. +- Added support for custom props such as `aria-label` +- renamed `css` prop to `cssOverride` to avoid type conflicts with css-in-js libraries. + +## 0.13.0-beta.7 + +- **bugfix**: fix style warnings on ClipLoader and CircleLoader + +## 0.13.0-beta.6 + +- **bugfix**: fix GridLoader rendering issue + +## 0.13.0-beta.5 + +- **BREAKING CHANGE**: `css` prop has been renamed to `cssOverride` to avoid type conflicts with css-in-js libraries such as emotion and styled-components + +## 0.13.0-beta.4 + +- **bugfix**: Fix `document is not defined` when rendering server side + +## 0.13.0-beta.3 + +- update `.npmignore` to ignore `stories` folder, yarn error log + +## 0.13.0-beta.2 + +- **bugfix**: Update `tsconfig.json` to ignore `stories` folder. This caused the outputted files to not be in the root directory and breaking the imports. + +## 0.13.0-beta.1 + +- **bugfix**: Properly assign important tag to `GridLoader` width prop. + +## 0.13.0-alpha.5 + +- **bugfix**: Update `GridLoader` height/width with `important` tag to prevent overwrites from outside css. + +## 0.13.0-alpha.4 + +- **Feature**: Add support for custom props in all loaders. +- **Feature**: Removed `@emotion/react` as a dependency. +- **Feature**: Update `RiseLoader` rise amount of use `size` prop instead of hardcoded as 30px. + +## 0.13.0-alpha.3 + +- **Feature**: Add support for custom props in BarLoader + +## 0.13.0-alpha.2 + +- Added react testing library +- added basic tests for BarLoader +- **bugfix**: add `display: inherit` on barloader to fix issue where nothing shows up on page. + +## 0.13.0-alpha.1 + +- Rewrite BarLoader as functional component. Use vanilla javascript to inject keyframes, and removing emotion from the component. + +## 0.12.0 + +- **Feature**: output commonjs, es module, and umd file types. +- **Feature**: add support for react 18 [#464](https://github.com/davidhu2000/react-spinners/pull/464) + +## 0.12.0-beta.1 + +- reverted devDepencies react back to v17 until tests can be migrated away from enzyme. [#471](https://github.com/davidhu2000/react-spinners/pull/471) + +## 0.12.0-alpha.3 + +- migrate from circle-ci to github actions for lint/jest +- **Feature**: add support for react 18 [#464](https://github.com/davidhu2000/react-spinners/pull/464) + +## 0.12.0-alpha.2 + +- Update pragma to `/** @jsxImportSource @emotion/react */` to fix issue with the new jsx runtime. +- update all dependencies to latest version and rebuild demo site + +## 0.12.0-alpha.1 + +- **Feature**: output commonjs, es module, and umd file types. + +## 0.11.0 + +- **Feature**: added `speedMultiplier` prop to allow controlling the speed of animations. + +## 0.11.0-beta.1 + +- No changes, just promoting to beta + +## 0.11.0-alpha.8 + +- Update readme to include speed multiplier prop + +## 0.11.0-alpha.7 + +- Implemented `speedMultiplier` props to all loaders +- Added feature flag to demo site. adding a url param `speed-multiplier=true` will enable to input + +## 0.11.0-alpha.6 + +- Refactored all the tests using shared specs to reduce maintenance cost. +- Removed unnecessary type in `colors.ts` to let typescript infer. + +## 0.11.0-alpha.5 + +- Implement `speedMultipler` prop to `PulseLoader`. This is done to test the API for a single loader before adding to the rest. + +## 0.11.0-alpha.4 + +- Clean up `BarLoader` by marking the props using `Required` utility to avoid having to do `width || Loader.defaultProps.width`. + +## 0.11.0-alpha.3 + +- Implement `speedMultipler` prop to `BarLoader`. This is done to test the API for a single loader before adding to the rest. + +## 0.11.0-alpha.2 + +- Update readme usage section to use `@emotion` for `.babelrc` plugins + +## 0.11.0-alpha.1 + +- updated emotion to v11. [PR #329](https://github.com/davidhu2000/react-spinners/pull/329) + +## 0.10.6 + +- **bugfix**: Fixed MoonLoader display issue [#342](https://github.com/davidhu2000/react-spinners/pull/342) + +## 0.10.4 + +- Add `.eslintrc.*` to `.npmignore` to reduce packge size. + +## 0.10.3 + +- **bugfix**: Reverted `type:module` change in `package.json` due to [issue #336](https://github.com/davidhu2000/react-spinners/issues/336). This is causing a `Must use import to load ES Module` error. + +## 0.10.2 + +**Note: this release has a critical issue and was deprecated. Please update to 0.10.3 or higher.** + +- **bugfix**: the tsconfig compiler option was not overriding properly, so the outputted files are es2015 (with import syntax) vs commonjs (with require syntax. This could cause similar issues like [#74](https://github.com/davidhu2000/react-spinners/issues/74). + +## 0.10.1 + +**Note: this release has a critical issue and was deprecated. Please update to 0.10.3 or higher.** + +- Update README using react hooks. Move react class example under a summary tag. + +## 0.10.0 + +**Note: this release has a critical issue and was deprecated. Please update to 0.10.3 or higher.** + +- update `div` to `span` to fix `
cannot appear as a descendant of

` per [#159](https://github.com/davidhu2000/react-spinners/issues/159). [PR #325](https://github.com/davidhu2000/react-spinners/pull/325) +- Using [lodash-es](https://github.com/lodash/lodash/blob/4.17.20-es/package.json#L10-L14) as a reference, added `type: module` to `package.json` as an attempt to implement tree shaking via [PR #327](https://github.com/davidhu2000/react-spinners/pull/327). +- replaced tslint with eslint, and npm with yarn. + +## 0.10.0-beta.3 + +- Update `.npmignore` to ignore the `.cjs` files so they are not included in the published build. +- Add `.yarn` and `.yarnrc` to `.npmignore`. + +Old: + +``` +npm notice version: 0.10.0-beta.2 +npm notice package size: 1.2 MB +npm notice unpacked size: 5.3 MB +npm notice total files: 69 +``` + +New: + +``` +npm notice version: 0.10.0-beta.3 +npm notice package size: 21.3 kB +npm notice unpacked size: 167.1 kB +npm notice total files: 65 +``` + +## 0.10.0-beta.2 + +- Using [lodash-es](https://github.com/lodash/lodash/blob/4.17.20-es/package.json#L10-L14) as a reference, added `type: module` to `package.json` as an attempt to fix tree shaking via [PR #327](https://github.com/davidhu2000/react-spinners/pull/327). +- Renamed relevant `.js` files to `.cjs` so they are treated as CommonJs. Otherwise we get errors like `ReferenceError: module is not defined` when running certain commands, like `yarn`. + +## 0.10.0-beta.1 + +- No changes here. Upgrading alpha to beta. + +## 0.10.0-alpha.3 + +- add `react ^17.0.0` and `react-dom ^17.0.0` into peerDependencies to fix [#321](https://github.com/davidhu2000/react-spinners/issues/321) +- update `div` to `span` to fix `

cannot appear as a descendant of

` per [#159](https://github.com/davidhu2000/react-spinners/issues/159). [PR #325](https://github.com/davidhu2000/react-spinners/pull/325) +- removed `Keyframes` typing to allow for inferring [PR #326](https://github.com/davidhu2000/react-spinners/pull/326) +- another round of update for all devDependencies to the latest version except for `react-color`, `react`, `react-dom`, and `@motion/core`. These 4 packages have caused issues during the update and will save them for another time. + +## 0.10.0-alpha.2 + +- add `sideEffects` property to `package.json` to fix tree shaking + +## 0.10.0-alpha.1 + +- updated all dependencies to the latest version. +- switched from using npm to yarn +- deprecated ts-lint in favor of eslint +- updated how loaders are exported to support tree shaking + +## 0.9.0 + +- Added a new loader: `PuffLoader`. Thanks to @dsaw via [PR #200](https://github.com/davidhu2000/react-spinners/pull/200) +- Update docs site with new loader + +## 0.8.3 + +- **Security**: Bump acorn from 5.7.3 to 5.7.4 due to `Regular Expression Denial of Service`. Details [here](https://github.com/advisories/GHSA-6chw-6frg-f759) + +## 0.8.2 + +- Add `box-sizing: content-box;` to MoonLoader. See [PR](https://github.com/davidhu2000/react-spinners/pull/162) for more details. + +## 0.8.1 + +- clean up README example: removed unrecommended import, removed comment out size prop, and bolded text for size prop being string and number + +## 0.8.0 + +- Added a new loader: `ClockLoader` +- No other functionality changes +- Fix default value table in README to alphabetize correctly + +## 0.7.2 + +- update README demo site url + +## 0.7.1 + +- run `npm audit fix` to fix vulnerability in `serialslize-javascript` package +- update README to showcase number and string input for size prop + +## 0.7.0 + +- **BREAKING CHANGE**: all unit props have been removed to simplify the component API. See change log for `0.7.0-alpha.1` for more details + +## 0.7.0-beta.1 + +- Update readme to include yarn installation + +## 0.7.0-alpha.5 + +- clean up readme. break up prop section with individual prop headers + +## 0.7.0-alpha.4 + +- update default value for `css` prop on README to be `""` instead of `{}` +- add list of available color words that the `color` prop accepts +- run prettier to format readme + +## 0.7.0-alpha.3 + +- **bugfix**: Fix [issue #140](https://github.com/davidhu2000/react-spinners/issues/140). The margin prop on `FadeLoader` does what we expect it to do, expand the spacing between the lines + +## 0.7.0-alpha.2 + +- **bugfix**: Fix [issue #139](https://github.com/davidhu2000/react-spinners/issues/139). The margin prop on `RotateLoader` does what we expect it to do, expand the spacing between the dots +- updated webpack config to split up npm files to avoid brower having to reload them on each change + +## 0.7.0-alpha.1 + +- **BREAKING CHANGE**: all unit props are deprecated, including `sizeUnit`, `heightUnit`, `widthUnit`, and `radiusUnit`. The `size`, `height`, `width`, and `radius` props now accepts `number` and `string` + - If value is number, default to `px` + - If value is string with valid css unit, return the input value + - If value is string with invalid css unit, output warning console log and default to `px` +- `margin` prop now work the same way as other length props. Can accept `number` and `string` +- `css` prop default is now `""`. No functionality change here + +## 0.6.1 + +- **bugfix**: Fix [issue 109](https://github.com/davidhu2000/react-spinners/issues/109) where `Math.random` is stubbed out in the `GridLoader` component instead in the tests, causing `Math.random` to not work properly if `GridLoader` is used + +## 0.6.0 + +- Offical release for the TypeScript rewrite! +- Major changes: + - Add support for types for individual loader imports + - Add support for using basic color name as props instead of only color hashes + - Reduced total package size from around 850kb to 135gb + - Fix `main` key value in `package.json` to point to the correct `index.js` + - Removed `prop-types` and `recompose` from dependencies + - Added tests to get to 100% code coverage + +## 0.6.0-beta.1 + +- updated `devDependencies` to latest versions + +## 0.6.0-alpha.10 + +- Removed `recompose` from the list of dependencies. We currently wants the component to update for all prop changes, so the `onlyUpdateForKeys` was passed in all the props anyways, so it wasn't doing much + +## 0.6.0-alpha.9 + +- **bugfix**: Fix issue where `PacmanLoader` `top` css property does not respect the `sizeUnit` prop. It was hardcoded to be `px` instead of using `sizeUnit` prop +- update javascript bundle files for demo site + +## 0.6.0-alpha.8 + +- updated rgba conversion function to handle basic colors. Now supports these basically colors + - maroon, red, orange, yellow, olive, green, purple, fuchsia, lime, teal, aqua, blue, navy, black, gray, silver, white + +## 0.6.0-alpha.7 + +- update readme to include `radius` and `radiusUnit` prop description +- update all the tests to use default variables +- add the following to `.npmignore` to further reduce package size + +``` +tslint.json +jest.config.js +CODEOWNERS +CODE_OF_CONDUCT.md +CONTRIBUTING.md +CHANGELOG.md +``` + +Old: + +``` +npm notice version: 0.6.0-alpha.6 +npm notice package size: 19.8 kB +npm notice unpacked size: 138.5 kB +``` + +New: + +``` +npm notice version: 0.6.0-alpha.7 +npm notice package size: 16.7 kB +npm notice unpacked size: 132.1 kB +``` + +## 0.6.0-alpha.6 + +- add `src` folder to `npmignore`. Previous version wasn't ruthless enough in saving data + +Old: + +``` +npm notice version: 0.6.0-alpha.5 +npm notice package size: 26.1 kB +npm notice unpacked size: 191.2 kB +``` + +New: + +``` +npm notice version: 0.6.0-alpha.6 +npm notice package size: 19.8 kB +npm notice unpacked size: 138.5 kB +``` + +## 0.6.0-alpha.5 + +- update `npmignore` to include `__tests__`, `.github`, `.circleci`, `coverage`. This helped to reduce package size. Help to save some data + +Old: + +``` +npm notice version: 0.6.0-alpha.4 +npm notice package size: 85.6 kB +npm notice unpacked size: 850.4 kB +``` + +New: + +``` +npm notice version: 0.6.0-alpha.5 +npm notice package size: 26.1 kB +npm notice unpacked size: 191.2 kB +``` + +## 0.6.0-alpha.4 + +- **bugfix**: update `package.json` `main` value from `dist/index.js` to `index.js` to fix codeSandbox import issue +- **bugfix**: add missing `transform` key to the `25%` keyframe in RiseLoader. It was just `25% {translateY(-${riseAmount}px)}` before. Now it is corrected +- add tests for all the loaders. Fixed up a few tests using default variables, namely the first 3 letters in the alphabet + +## 0.6.0-alpha.3 + +- fix missing `"` from `.babelrc` in readme per [PR #77](https://github.com/davidhu2000/react-spinners/pull/77) +- add tests for `ClipLoader`, `DotLoader`, `FadeLoader`, `GridLoader`, `HashLoader`, and `MoonLoader` + +## 0.6.0-alpha.2 + +- **bugfix**: update `tsconfig.json` `module` property to `commonjs` instead of `esnext`. This caused import errors as seen in [issue 74](https://github.com/davidhu2000/react-spinners/issues/74) +- added tests for `BarLoader`, `BeatLoader`, `BounceLoader`, `CircleLoader`, and `ClimbingBoxLoader` + +## 0.6.0-alpha.1 + +- This is a complete rewrite of the package. 100% of the code is now in TypeScript. This will show inidividual type definitions for each loader +- `prop-types` has been removed as a dependency. This is now handled by typings +- set up `ts-lint` and `prettier` to help ensure code consistency + +## 0.5.13 + +**Note: this release has a critical [issue](https://github.com/davidhu2000/react-spinners/issues/74) and was deprecated. Please use <= 0.5.12 or > 0.6.0.** + +- fix readme props table formatting. It got a little messy for some reason + +## 0.5.12 + +- fix version glitch. No code changes here + +## 0.5.11 + +- this version should be 0.5.10, but internet issues causesa weird version glitch. Update to 0.5.12 so everything matches + +## 0.5.10 + +- update readme to include explanation of css prop can be string as well as css function from @emotion/core + +## 0.5.9 + +- **bugfix**: Fix [issue 61](https://github.com/davidhu2000/react-spinners/issues/61) where css overrides are not applied properly. Updated how the override workings using [emotion composition](https://emotion.sh/docs/composition) + +## 0.5.8 + +- **bugfix**: Fix [issue 66](https://github.com/davidhu2000/react-spinners/issues/66) where destructuring import no longer works. Updated how components are exported, changed from `export default` to `export const` + +## 0.5.7 + +- update README.md `.babelrc` example to use `@babel/` syntax in accordance to latest babel packages + +## 0.5.6 + +- big update for outdated devDependencies. This version should not affect any existing functionalities. + - removed eslint related packages. Will be moving to use `tslint` as part of the typescript conversion. + - updated babel plus plugins/presets to latest versions + - updated `index.js` import from `module.exports = {...}` to `export default {...}` + - webpack changes + - added development configuration for easier debugging + - add `html-webpack-plugin` to inject the script tags to `index.html` + +## 0.5.5 + +- **bugfix**: update `CommonProps` interface `css` prop to used `PrecompiledCss` and `string`. Update PropTypes helper to be able to accept both `PrecompiledCss` and `string`. This is to fix the validation error for the `css` prop + +## 0.5.4 + +- refactored proptypes into helper functions. No functionality change here, just some cleanups + +## 0.5.3 + +- **bugfix**: update default value for `css` prop to `{}` instead of `""` to fix console error + +## 0.5.2 + +- **bugfix**: change `css` proptype to `PropTypes.shape({ ... })` instead of `PropTypes.string` to fix console error. +- Fix a few console warnings on the demo site + +## 0.5.1 + +- Update demo page link to `https://www.react-spinners.com` + +## 0.5.0 + +- Update emotion package to emotion 10 +- **Breaking change**: replaced `className` prop with `css` prop to match Emotion 10 + +## 0.4.8 + +- update `package.json` to include wider range of version for `recompose` + +## 0.4.7 + +- add `loaders` and `spinners` keyword to package.json + +## 0.4.6 + +- update how `onlyUpdateForKeys` is imported from `recompose`. Reduced import cost from `26kb` to `19kb` + +## 0.4.5 + +- update README `.babelrc` to use `env` preset + +## 0.4.4 + +- fix README example import to using correct loader +- add default value for unit props to README + +## 0.4.3 + +- update readme to include unit props for each loader + +## 0.4.2 + +- fix single loader import +- add `className` to `index.d.ts` +- update readme to include single loader import + +## 0.4.1 + +- Remove second import method from readme. Add deprecation warning to 0.4.0 + +## 0.4.0 + +**Note: this release has a critical issue and was deprecated. Please update to 0.4.1 or higher.** + +- Add `className` prop to loaders +- Deprecated `loaderStyle` prop for loaders to follow Emotion module standard + +## 0.3.3 + +**Note: this release was deprecated through removing `loaderStyle` prop. Please update to 0.4.1 or higher.** + +- Add `loaderStyle` prop to loaders to allow more customized loader + +## 0.3.2 + +- **bugfix**: fixed rendering issue for FadeLoader, SyncLoader, RotateLoader, and MoonLoader + +## 0.3.1 + +- Moved `babel-plugin-emotion` to devDependencies and updates to 9.1.0 + +## 0.3.0 + +- Added `unit` props to each loader to allow `%` units on css +- **bugfix**: fixed string concatenation on some loaders that prevented the correct rendering + +## 0.2.6 + +- **bugfix**: add missing `px` for `border-radius` in `ScaleLoader` styling +- add `minor` and `major` versioning scripts to `package.json` + +## 0.2.5 + +- add `ISSUE_TEMPLATE.md` and `PULL_REQUEST_TEMPLATE.MD` + +## 0.2.4 + +- removed codesponsers from readme + +## 0.2.3 + +- updated devDendencies to latest stable versions +- removed unused npm scripts from `package.json` +- minor linting fixes after update +- add `^16.0.0` to `react` and `react-dom` peerDependencies + +## 0.2.2 + +- **bugfix**: change `borderRadius` to `border-radius` in `RingLoader` so the browser will recognize the css + +## 0.2.1 + +- **bugfix**: moved `prop-types` to from devDependencies to dependencies. This fixes the `Package not found` error for projects that do not include `prop-types` as a dependency + +## 0.2.0 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- add TypeScript typings + +## 0.1.9 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- **bugfix**: moved `emotion` from devDependency to dependency. This fixed the `Package not found` error + +## 0.1.8 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- update `emotion` package version from `7.2.0` to `8.0.6` + +## 0.1.7 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- update dependencies versions + +## 0.1.6 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- fixed some typo in readme + +## 0.1.5 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- updated readme + +## 0.1.4 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- **bugfix**: fixed `PulseLoader` size default prop to be the correct type + +## 0.1.3 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- **bugfix**: moved `recompose` from devDependency to dependency +- update author field in `package.json` + +## 0.1.2 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- update margin column in readme proptype table +- update contributors list in `package.json` + +## 0.1.1 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- update readme to include note about `react-emotion` plugin for babel +- fixed circleci badge to go to circle ci instead of npm +- removed flow from test script + +## 0.1.0 + +**Note: this release has a critical issue and was deprecated. Please update to 0.2.1 or higher.** + +- removed `domkit` as a dependency and replaced it with `emotion`. This package now officially supports `Server Side Rendering diff --git a/frontend/node_modules/react-spinners/CircleLoader.d.ts b/frontend/node_modules/react-spinners/CircleLoader.d.ts new file mode 100644 index 000000000..12ec8925f --- /dev/null +++ b/frontend/node_modules/react-spinners/CircleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function CircleLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default CircleLoader; diff --git a/frontend/node_modules/react-spinners/CircleLoader.js b/frontend/node_modules/react-spinners/CircleLoader.js new file mode 100644 index 000000000..d305db899 --- /dev/null +++ b/frontend/node_modules/react-spinners/CircleLoader.js @@ -0,0 +1,82 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var circle = (0, animation_1.createAnimation)("CircleLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "circle"); +function CircleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + height: "".concat(value * (1 - i / 10)).concat(unit), + width: "".concat(value * (1 - i / 10)).concat(unit), + borderTop: "1px solid ".concat(color), + borderBottom: "none", + borderLeft: "1px solid ".concat(color), + borderRight: "none", + borderRadius: "100%", + transition: "2s", + top: "".concat(i * 0.7 * 2.5, "%"), + left: "".concat(i * 0.35 * 2.5, "%"), + animation: "".concat(circle, " ").concat(1 / speedMultiplier, "s ").concat((i * 0.2) / speedMultiplier, "s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }))); +} +exports.default = CircleLoader; diff --git a/frontend/node_modules/react-spinners/ClimbingBoxLoader.d.ts b/frontend/node_modules/react-spinners/ClimbingBoxLoader.d.ts new file mode 100644 index 000000000..12660b80d --- /dev/null +++ b/frontend/node_modules/react-spinners/ClimbingBoxLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClimbingBoxLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/ClimbingBoxLoader.js b/frontend/node_modules/react-spinners/ClimbingBoxLoader.js new file mode 100644 index 000000000..3488acf70 --- /dev/null +++ b/frontend/node_modules/react-spinners/ClimbingBoxLoader.js @@ -0,0 +1,95 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var climbingBox = (0, animation_1.createAnimation)("ClimbingBoxLoader", "0% {transform:translate(0, -1em) rotate(-45deg)}\n 5% {transform:translate(0, -1em) rotate(-50deg)}\n 20% {transform:translate(1em, -2em) rotate(47deg)}\n 25% {transform:translate(1em, -2em) rotate(45deg)}\n 30% {transform:translate(1em, -2em) rotate(40deg)}\n 45% {transform:translate(2em, -3em) rotate(137deg)}\n 50% {transform:translate(2em, -3em) rotate(135deg)}\n 55% {transform:translate(2em, -3em) rotate(130deg)}\n 70% {transform:translate(3em, -4em) rotate(217deg)}\n 75% {transform:translate(3em, -4em) rotate(220deg)}\n 100% {transform:translate(0, -1em) rotate(-225deg)}", "climbingBox"); +function ClimbingBoxLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var container = __assign({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride); + var wrapper = { + position: "absolute", + top: "50%", + left: "50%", + marginTop: "-2.7em", + marginLeft: "-2.7em", + width: "5.4em", + height: "5.4em", + fontSize: (0, unitConverter_1.cssValue)(size), + }; + var style = { + position: "absolute", + left: "0", + bottom: "-0.1em", + height: "1em", + width: "1em", + backgroundColor: "transparent", + borderRadius: "15%", + border: "0.25em solid ".concat(color), + transform: "translate(0, -1em) rotate(-45deg)", + animationFillMode: "both", + animation: "".concat(climbingBox, " ").concat(2.5 / speedMultiplier, "s infinite cubic-bezier(0.79, 0, 0.47, 0.97)"), + }; + var hill = { + position: "absolute", + width: "7.1em", + height: "7.1em", + top: "1.7em", + left: "1.7em", + borderLeft: "0.25em solid ".concat(color), + transform: "rotate(45deg)", + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: container }, additionalprops), + React.createElement("span", { style: wrapper }, + React.createElement("span", { style: style }), + React.createElement("span", { style: hill })))); +} +exports.default = ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/ClipLoader.d.ts b/frontend/node_modules/react-spinners/ClipLoader.d.ts new file mode 100644 index 000000000..336d685c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/ClipLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClipLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClipLoader; diff --git a/frontend/node_modules/react-spinners/ClipLoader.js b/frontend/node_modules/react-spinners/ClipLoader.js new file mode 100644 index 000000000..2fae13765 --- /dev/null +++ b/frontend/node_modules/react-spinners/ClipLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var clip = (0, animation_1.createAnimation)("ClipLoader", "0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}", "clip"); +function ClipLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ background: "transparent !important", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = ClipLoader; diff --git a/frontend/node_modules/react-spinners/ClockLoader.d.ts b/frontend/node_modules/react-spinners/ClockLoader.d.ts new file mode 100644 index 000000000..57785be37 --- /dev/null +++ b/frontend/node_modules/react-spinners/ClockLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClockLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClockLoader; diff --git a/frontend/node_modules/react-spinners/ClockLoader.js b/frontend/node_modules/react-spinners/ClockLoader.js new file mode 100644 index 000000000..367b7a5ad --- /dev/null +++ b/frontend/node_modules/react-spinners/ClockLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("ClockLoader", "100% { transform: rotate(360deg) }", "rotate"); +function ClockLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride); + var minute = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 3, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(8 / speedMultiplier, "s linear infinite"), + }; + var hour = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 2.4, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s linear infinite"), + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: hour }), + React.createElement("span", { style: minute }))); +} +exports.default = ClockLoader; diff --git a/frontend/node_modules/react-spinners/DotLoader.d.ts b/frontend/node_modules/react-spinners/DotLoader.d.ts new file mode 100644 index 000000000..f3cd003ad --- /dev/null +++ b/frontend/node_modules/react-spinners/DotLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function DotLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default DotLoader; diff --git a/frontend/node_modules/react-spinners/DotLoader.js b/frontend/node_modules/react-spinners/DotLoader.js new file mode 100644 index 000000000..18081c262 --- /dev/null +++ b/frontend/node_modules/react-spinners/DotLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("DotLoader", "100% {transform: rotate(360deg)}", "rotate"); +var bounce = (0, animation_1.createAnimation)("DotLoader", "0%, 100% {transform: scale(0)} 50% {transform: scale(1.0)}", "bounce"); +function DotLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), animationFillMode: "forwards", animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + top: i % 2 ? "0" : "auto", + bottom: i % 2 ? "auto" : "0", + height: "".concat(value / 2).concat(unit), + width: "".concat(value / 2).concat(unit), + backgroundColor: color, + borderRadius: "100%", + animationFillMode: "forwards", + animation: "".concat(bounce, " ").concat(2 / speedMultiplier, "s ").concat(i === 2 ? "1s" : "0s", " infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = DotLoader; diff --git a/frontend/node_modules/react-spinners/FadeLoader.d.ts b/frontend/node_modules/react-spinners/FadeLoader.d.ts new file mode 100644 index 000000000..98053e8e4 --- /dev/null +++ b/frontend/node_modules/react-spinners/FadeLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function FadeLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default FadeLoader; diff --git a/frontend/node_modules/react-spinners/FadeLoader.js b/frontend/node_modules/react-spinners/FadeLoader.js new file mode 100644 index 000000000..38f96db1f --- /dev/null +++ b/frontend/node_modules/react-spinners/FadeLoader.js @@ -0,0 +1,92 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var fade = (0, animation_1.createAnimation)("FadeLoader", "50% {opacity: 0.3} 100% {opacity: 1}", "fade"); +function FadeLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 15 : _f, _g = _a.width, width = _g === void 0 ? 5 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var value = (0, unitConverter_1.parseLengthAndUnit)(margin).value; + var radiusValue = value + 18; + var quarter = radiusValue / 2 + radiusValue / 5.5; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: "0", top: radiusValue, left: radiusValue, width: "".concat(radiusValue * 3, "px"), height: "".concat(radiusValue * 3, "px") }, cssOverride); + var style = function (i) { + return { + position: "absolute", + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + backgroundColor: color, + borderRadius: (0, unitConverter_1.cssValue)(radius), + transition: "2s", + animationFillMode: "both", + animation: "".concat(fade, " ").concat(1.2 / speedMultiplier, "s ").concat(i * 0.12, "s infinite ease-in-out"), + }; + }; + var a = __assign(__assign({}, style(1)), { top: "".concat(radiusValue, "px"), left: "0" }); + var b = __assign(__assign({}, style(2)), { top: "".concat(quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(-45deg)" }); + var c = __assign(__assign({}, style(3)), { top: "0", left: "".concat(radiusValue, "px"), transform: "rotate(90deg)" }); + var d = __assign(__assign({}, style(4)), { top: "".concat(-1 * quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(45deg)" }); + var e = __assign(__assign({}, style(5)), { top: "".concat(-1 * radiusValue, "px"), left: "0" }); + var f = __assign(__assign({}, style(6)), { top: "".concat(-1 * quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(-45deg)" }); + var g = __assign(__assign({}, style(7)), { top: "0", left: "".concat(-1 * radiusValue, "px"), transform: "rotate(90deg)" }); + var h = __assign(__assign({}, style(8)), { top: "".concat(quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(45deg)" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: a }), + React.createElement("span", { style: b }), + React.createElement("span", { style: c }), + React.createElement("span", { style: d }), + React.createElement("span", { style: e }), + React.createElement("span", { style: f }), + React.createElement("span", { style: g }), + React.createElement("span", { style: h }))); +} +exports.default = FadeLoader; diff --git a/frontend/node_modules/react-spinners/GridLoader.d.ts b/frontend/node_modules/react-spinners/GridLoader.d.ts new file mode 100644 index 000000000..06fa46b8c --- /dev/null +++ b/frontend/node_modules/react-spinners/GridLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function GridLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default GridLoader; diff --git a/frontend/node_modules/react-spinners/GridLoader.js b/frontend/node_modules/react-spinners/GridLoader.js new file mode 100644 index 000000000..f3a67bcb7 --- /dev/null +++ b/frontend/node_modules/react-spinners/GridLoader.js @@ -0,0 +1,89 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var grid = (0, animation_1.createAnimation)("GridLoader", "0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}", "grid"); +var random = function (top) { return Math.random() * top; }; +function GridLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var sizeWithUnit = (0, unitConverter_1.parseLengthAndUnit)(size); + var marginWithUnit = (0, unitConverter_1.parseLengthAndUnit)(margin); + var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6; + var wrapper = __assign({ width: "".concat(width).concat(sizeWithUnit.unit), fontSize: 0, display: "inline-block" }, cssOverride); + var style = function (rand) { + return { + display: "inline-block", + backgroundColor: color, + width: "".concat((0, unitConverter_1.cssValue)(size)), + height: "".concat((0, unitConverter_1.cssValue)(size)), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animationFillMode: "both", + animation: "".concat(grid, " ").concat((rand / 100 + 0.6) / speedMultiplier, "s ").concat(rand / 100 - 0.2, "s infinite ease"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops, { ref: function (node) { + if (node) { + node.style.setProperty("width", "".concat(width).concat(sizeWithUnit.unit), "important"); + } + } }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }))); +} +exports.default = GridLoader; diff --git a/frontend/node_modules/react-spinners/HashLoader.d.ts b/frontend/node_modules/react-spinners/HashLoader.d.ts new file mode 100644 index 000000000..ca1763ff3 --- /dev/null +++ b/frontend/node_modules/react-spinners/HashLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function HashLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default HashLoader; diff --git a/frontend/node_modules/react-spinners/HashLoader.js b/frontend/node_modules/react-spinners/HashLoader.js new file mode 100644 index 000000000..55d43683f --- /dev/null +++ b/frontend/node_modules/react-spinners/HashLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var colors_1 = require("./helpers/colors"); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +function HashLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), transform: "rotate(165deg)" }, cssOverride); + var thickness = value / 5; + var lat = (value - thickness) / 2; + var offset = lat - thickness; + var colorValue = (0, colors_1.calculateRgba)(color, 0.75); + var before = (0, animation_1.createAnimation)("HashLoader", "0% {width: ".concat(thickness, "px; box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 35% {width: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: 0 ").concat(-offset, "px ").concat(colorValue, ", 0 ").concat(offset, "px ").concat(colorValue, "}\n 70% {width: ").concat(thickness, "px; box-shadow: ").concat(-lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 100% {box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}"), "before"); + var after = (0, animation_1.createAnimation)("HashLoader", "0% {height: ".concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}\n 35% {height: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: ").concat(offset, "px 0 ").concat(color, ", ").concat(-offset, "px 0 ").concat(color, "}\n 70% {height: ").concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(-lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(lat, "px ").concat(color, "}\n 100% {box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}"), "after"); + var style = function (i) { + return { + position: "absolute", + top: "50%", + left: "50%", + display: "block", + width: "".concat(value / 5).concat(unit), + height: "".concat(value / 5).concat(unit), + borderRadius: "".concat(value / 10).concat(unit), + transform: "translate(-50%, -50%)", + animationFillMode: "none", + animation: "".concat(i === 1 ? before : after, " ").concat(2 / speedMultiplier, "s infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = HashLoader; diff --git a/frontend/node_modules/react-spinners/LICENSE b/frontend/node_modules/react-spinners/LICENSE new file mode 100644 index 000000000..acf32ef43 --- /dev/null +++ b/frontend/node_modules/react-spinners/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 David Hu + +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. \ No newline at end of file diff --git a/frontend/node_modules/react-spinners/MoonLoader.d.ts b/frontend/node_modules/react-spinners/MoonLoader.d.ts new file mode 100644 index 000000000..2cf77a2c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/MoonLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function MoonLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default MoonLoader; diff --git a/frontend/node_modules/react-spinners/MoonLoader.js b/frontend/node_modules/react-spinners/MoonLoader.js new file mode 100644 index 000000000..a0e850123 --- /dev/null +++ b/frontend/node_modules/react-spinners/MoonLoader.js @@ -0,0 +1,73 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var moon = (0, animation_1.createAnimation)("MoonLoader", "100% {transform: rotate(360deg)}", "moon"); +function MoonLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var moonSize = value / 7; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride); + var ballStyle = function (size) { + return { + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + }; + var ball = __assign(__assign({}, ballStyle(moonSize)), { backgroundColor: "".concat(color), opacity: "0.8", position: "absolute", top: "".concat("".concat(value / 2 - moonSize / 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }); + var circle = __assign(__assign({}, ballStyle(value)), { border: "".concat(moonSize, "px solid ").concat(color), opacity: "0.1", boxSizing: "content-box", position: "absolute" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: ball }), + React.createElement("span", { style: circle }))); +} +exports.default = MoonLoader; diff --git a/frontend/node_modules/react-spinners/PacmanLoader.d.ts b/frontend/node_modules/react-spinners/PacmanLoader.d.ts new file mode 100644 index 000000000..e8ad135e3 --- /dev/null +++ b/frontend/node_modules/react-spinners/PacmanLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PacmanLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PacmanLoader; diff --git a/frontend/node_modules/react-spinners/PacmanLoader.js b/frontend/node_modules/react-spinners/PacmanLoader.js new file mode 100644 index 000000000..5417b20c3 --- /dev/null +++ b/frontend/node_modules/react-spinners/PacmanLoader.js @@ -0,0 +1,104 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var pacman = [ + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(-44deg)}", "pacman-1"), + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(44deg)}", "pacman-2"), +]; +function PacmanLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 25 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(size), value = _h.value, unit = _h.unit; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride); + var ball = (0, animation_1.createAnimation)("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball"); + var ballStyle = function (i) { + return { + width: "".concat(value / 3).concat(unit), + height: "".concat(value / 3).concat(unit), + backgroundColor: color, + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + transform: "translate(0, ".concat("".concat(-value / 4).concat(unit), ")"), + position: "absolute", + top: "".concat(value).concat(unit), + left: "".concat(value * 4).concat(unit), + animation: "".concat(ball, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.25, "s infinite linear"), + animationFillMode: "both", + }; + }; + var s1 = "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"); + var s2 = "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color); + var pacmanStyle = function (i) { + return { + width: 0, + height: 0, + borderRight: s1, + borderTop: i === 0 ? s1 : s2, + borderLeft: s2, + borderBottom: i === 0 ? s2 : s1, + borderRadius: (0, unitConverter_1.cssValue)(size), + position: "absolute", + animation: "".concat(pacman[i], " ").concat(0.8 / speedMultiplier, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + var pac = pacmanStyle(0); + var man = pacmanStyle(1); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: pac }), + React.createElement("span", { style: man }), + React.createElement("span", { style: ballStyle(2) }), + React.createElement("span", { style: ballStyle(3) }), + React.createElement("span", { style: ballStyle(4) }), + React.createElement("span", { style: ballStyle(5) }))); +} +exports.default = PacmanLoader; diff --git a/frontend/node_modules/react-spinners/PropagateLoader.d.ts b/frontend/node_modules/react-spinners/PropagateLoader.d.ts new file mode 100644 index 000000000..ff39bb03e --- /dev/null +++ b/frontend/node_modules/react-spinners/PropagateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PropagateLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PropagateLoader; diff --git a/frontend/node_modules/react-spinners/PropagateLoader.js b/frontend/node_modules/react-spinners/PropagateLoader.js new file mode 100644 index 000000000..f7b955ae9 --- /dev/null +++ b/frontend/node_modules/react-spinners/PropagateLoader.js @@ -0,0 +1,88 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +// 1.5 4.5 7.5 +var distance = [1, 3, 5]; +var propagate = [ + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-0"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-1"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(-").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-2"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-3"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-4"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-5"), +]; +function PropagateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + fontSize: "".concat(value / 3).concat(unit), + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + background: color, + borderRadius: "50%", + animation: "".concat(propagate[i], " ").concat(1.5 / speedMultiplier, "s infinite"), + animationFillMode: "forwards", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = PropagateLoader; diff --git a/frontend/node_modules/react-spinners/PuffLoader.d.ts b/frontend/node_modules/react-spinners/PuffLoader.d.ts new file mode 100644 index 000000000..e6ae1d0c8 --- /dev/null +++ b/frontend/node_modules/react-spinners/PuffLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PuffLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PuffLoader; diff --git a/frontend/node_modules/react-spinners/PuffLoader.js b/frontend/node_modules/react-spinners/PuffLoader.js new file mode 100644 index 000000000..de121956a --- /dev/null +++ b/frontend/node_modules/react-spinners/PuffLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var puff = [ + (0, animation_1.createAnimation)("PuffLoader", "0% {transform: scale(0)} 100% {transform: scale(1.0)}", "puff-1"), + (0, animation_1.createAnimation)("PuffLoader", "0% {opacity: 1} 100% {opacity: 0}", "puff-2"), +]; +function PuffLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + border: "thick solid ".concat(color), + borderRadius: "50%", + opacity: "1", + top: "0", + left: "0", + animationFillMode: "both", + animation: "".concat(puff[0], ", ").concat(puff[1]), + animationDuration: "".concat(2 / speedMultiplier, "s"), + animationIterationCount: "infinite", + animationTimingFunction: "cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)", + animationDelay: i === 1 ? "-1s" : "0s", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = PuffLoader; diff --git a/frontend/node_modules/react-spinners/PulseLoader.d.ts b/frontend/node_modules/react-spinners/PulseLoader.d.ts new file mode 100644 index 000000000..abf34d4c5 --- /dev/null +++ b/frontend/node_modules/react-spinners/PulseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PulseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PulseLoader; diff --git a/frontend/node_modules/react-spinners/PulseLoader.js b/frontend/node_modules/react-spinners/PulseLoader.js new file mode 100644 index 000000000..a0823a526 --- /dev/null +++ b/frontend/node_modules/react-spinners/PulseLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var pulse = (0, animation_1.createAnimation)("PulseLoader", "0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}", "pulse"); +function PulseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(pulse, " ").concat(0.75 / speedMultiplier, "s ").concat((i * 0.12) / speedMultiplier, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = PulseLoader; diff --git a/frontend/node_modules/react-spinners/README.md b/frontend/node_modules/react-spinners/README.md new file mode 100644 index 000000000..fb0a00a91 --- /dev/null +++ b/frontend/node_modules/react-spinners/README.md @@ -0,0 +1,179 @@ +# React Spinners + +[![npm version](https://badge.fury.io/js/react-spinners.svg)][npm_url] +[![downloads](https://img.shields.io/npm/dt/react-spinners.svg)][npm_url] +[![license](https://img.shields.io/npm/l/react-spinners.svg)][npm_url] + + + +[![Coverage Status](https://coveralls.io/repos/github/davidhu2000/react-spinners/badge.svg?branch=main)](https://coveralls.io/github/davidhu2000/react-spinners?branch=master) +![Dependency Count](https://badgen.net/bundlephobia/dependency-count/react-spinners) +![Types Included](https://badgen.net/npm/types/react-spinners) +![Tree Shaking Supported](https://badgen.net/bundlephobia/tree-shaking/react-spinners) + +[npm_url]: https://www.npmjs.org/package/react-spinners + +A collection of loading spinners with React.js based on [Halogen](https://github.com/yuanyan/halogen). + +This package is bootstraped using [react-npm-boilerplate](https://github.com/juliancwirko/react-npm-boilerplate) + +## Demo + +[Demo Page](https://www.davidhu.io/react-spinners) + +[Storybook](https://www.davidhu.io/react-spinners/storybook/) + +## Installation + +With Yarn: + +```bash +yarn add react-spinners +``` + +With npm: + +```bash +npm install --save react-spinners +``` + +## Usage + +Each loader has their own default properties. You can overwrite the defaults by passing props into the loaders. + +Each loader accepts a `loading` prop as a boolean. The loader will render `null` if `loading` is `false`. + +### Example + +```tsx +import { useState, CSSProperties } from "react"; +import ClipLoader from "react-spinners/ClipLoader"; + +const override: CSSProperties = { + display: "block", + margin: "0 auto", + borderColor: "red", +}; + +function App() { + let [loading, setLoading] = useState(true); + let [color, setColor] = useState("#ffffff"); + + return ( +

+ + setColor(input.target.value)} placeholder="Color of the loader" /> + + +
+ ); +} + +export default App; +``` + +
Example using React Class + +```tsx +import React from "react"; +import ClipLoader from "react-spinners/ClipLoader"; + +const override: React.CSSProperties = { + display: "block", + margin: "0 auto", + borderColor: "red", +}; + +class AwesomeComponent extends React.Component { + constructor(props) { + super(props); + this.state = { + loading: true, + }; + } + + render() { + return ( +
+ +
+ ); + } +} +``` + +
+ +## Available Loaders, PropTypes, and Default Values + +Common default props for all loaders: + +``` +loading: true; +color: "#000000"; +cssOverride: {} +speedMultiplier: 1; +``` + +All valid HTML props such as `aria-*` and `data-*` props are fully supported. + +### `color` prop + +`color` prop accepts a color hash in the format of `#XXXXXX` or `#XXX`. It also accepts basic colors listed below: + +> maroon, red, orange, yellow, olive, green, purple, white, +> fuchsia, lime, teal, aqua, blue, navy, black, gray, silver + +### `cssOverride` prop + +The `cssOverride` prop is an object of camelCase styles used to create inline styles on the loaders. Any html css property is valid here. + +### `size`, `height`, `width`, and `radius` props + +The input to these props can be _number_ or _string_. + +- If value is number, the loader will default to css unit `px`. +- If value is string, the loader will verify the unit against valid css units. + - If unit is valid, return the original value + - If unit is invalid, output warning console log and default to `px`. + +The table below has the default values for each loader. + +| Loader | size | height | width | radius | margin | +| ----------------: | :--: | :----: | :---: | :----: | :----: | +| BarLoader | | `4` | `100` | | +| BeatLoader | `15` | | | | `2` | +| BounceLoader | `60` | | | | +| CircleLoader | `50` | | | | +| ClimbingBoxLoader | `15` | | | | +| ClipLoader | `35` | | | | +| ClockLoader | `50` | | | | +| DotLoader | `60` | | | | `2` | +| FadeLoader | | `15` | `5` | `2` | `2` | +| GridLoader | `15` | | | | +| HashLoader | `50` | | | | `2` | +| MoonLoader | `60` | | | | `2` | +| PacmanLoader | `25` | | | | `2` | +| PropagateLoader | `15` | | | | +| PuffLoader | `60` | | | | +| PulseLoader | `15` | | | | `2` | +| RingLoader | `60` | | | | `2` | +| RiseLoader | `15` | | | | `2` | +| RotateLoader | `15` | | | | `2` | +| ScaleLoader | | `35` | `4` | `2` | `2` | +| SyncLoader | `15` | | | | `2` | diff --git a/frontend/node_modules/react-spinners/RingLoader.d.ts b/frontend/node_modules/react-spinners/RingLoader.d.ts new file mode 100644 index 000000000..ebf7a62cb --- /dev/null +++ b/frontend/node_modules/react-spinners/RingLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function RingLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default RingLoader; diff --git a/frontend/node_modules/react-spinners/RingLoader.js b/frontend/node_modules/react-spinners/RingLoader.js new file mode 100644 index 000000000..2aea521d7 --- /dev/null +++ b/frontend/node_modules/react-spinners/RingLoader.js @@ -0,0 +1,79 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var right = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(180deg) rotateY(360deg) rotateZ(360deg)}", "right"); +var left = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg)}", "left"); +function RingLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + top: "0", + left: "0", + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + border: "".concat(value / 10).concat(unit, " solid ").concat(color), + opacity: "0.4", + borderRadius: "100%", + animationFillMode: "forwards", + perspective: "800px", + animation: "".concat(i === 1 ? right : left, " ").concat(2 / speedMultiplier, "s 0s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = RingLoader; diff --git a/frontend/node_modules/react-spinners/RiseLoader.d.ts b/frontend/node_modules/react-spinners/RiseLoader.d.ts new file mode 100644 index 000000000..7ed595882 --- /dev/null +++ b/frontend/node_modules/react-spinners/RiseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RiseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RiseLoader; diff --git a/frontend/node_modules/react-spinners/RiseLoader.js b/frontend/node_modules/react-spinners/RiseLoader.js new file mode 100644 index 000000000..7961f4fb3 --- /dev/null +++ b/frontend/node_modules/react-spinners/RiseLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +function RiseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var even = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even"); + var odd = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd"); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(i % 2 === 0 ? even : odd, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.15, 0.46, 0.9, 0.6)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = RiseLoader; diff --git a/frontend/node_modules/react-spinners/RotateLoader.d.ts b/frontend/node_modules/react-spinners/RotateLoader.d.ts new file mode 100644 index 000000000..9577c1805 --- /dev/null +++ b/frontend/node_modules/react-spinners/RotateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RotateLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RotateLoader; diff --git a/frontend/node_modules/react-spinners/RotateLoader.js b/frontend/node_modules/react-spinners/RotateLoader.js new file mode 100644 index 000000000..8a06338fc --- /dev/null +++ b/frontend/node_modules/react-spinners/RotateLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("RotateLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "rotate"); +function RotateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(margin), value = _h.value, unit = _h.unit; + var ball = { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + var wrapper = __assign(__assign(__assign({}, ball), { display: "inline-block", position: "relative", animationFillMode: "both", animation: "".concat(rotate, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.7, -0.13, 0.22, 0.86)") }), cssOverride); + var style = function (i) { + var left = (i % 2 ? -1 : 1) * (26 + value); + return { + opacity: "0.8", + position: "absolute", + top: "0", + left: "".concat(left).concat(unit), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: __assign(__assign({}, ball), style(1)) }), + React.createElement("span", { style: __assign(__assign({}, ball), style(2)) }))); +} +exports.default = RotateLoader; diff --git a/frontend/node_modules/react-spinners/ScaleLoader.d.ts b/frontend/node_modules/react-spinners/ScaleLoader.d.ts new file mode 100644 index 000000000..23f085479 --- /dev/null +++ b/frontend/node_modules/react-spinners/ScaleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function ScaleLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default ScaleLoader; diff --git a/frontend/node_modules/react-spinners/ScaleLoader.js b/frontend/node_modules/react-spinners/ScaleLoader.js new file mode 100644 index 000000000..5516963fc --- /dev/null +++ b/frontend/node_modules/react-spinners/ScaleLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var scale = (0, animation_1.createAnimation)("ScaleLoader", "0% {transform: scaley(1.0)} 50% {transform: scaley(0.4)} 100% {transform: scaley(1.0)}", "scale"); +function ScaleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 35 : _f, _g = _a.width, width = _g === void 0 ? 4 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: (0, unitConverter_1.cssValue)(radius), + display: "inline-block", + animation: "".concat(scale, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.1, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = ScaleLoader; diff --git a/frontend/node_modules/react-spinners/SkewLoader.d.ts b/frontend/node_modules/react-spinners/SkewLoader.d.ts new file mode 100644 index 000000000..98cd30f0f --- /dev/null +++ b/frontend/node_modules/react-spinners/SkewLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SkewLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SkewLoader; diff --git a/frontend/node_modules/react-spinners/SkewLoader.js b/frontend/node_modules/react-spinners/SkewLoader.js new file mode 100644 index 000000000..dce6d3d8e --- /dev/null +++ b/frontend/node_modules/react-spinners/SkewLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var skew = (0, animation_1.createAnimation)("SkewLoader", "25% {transform: perspective(100px) rotateX(180deg) rotateY(0)} 50% {transform: perspective(100px) rotateX(180deg) rotateY(180deg)} 75% {transform: perspective(100px) rotateX(0) rotateY(180deg)} 100% {transform: perspective(100px) rotateX(0) rotateY(0)}", "skew"); +function SkewLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ width: "0", height: "0", borderLeft: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderRight: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderBottom: "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = SkewLoader; diff --git a/frontend/node_modules/react-spinners/SquareLoader.d.ts b/frontend/node_modules/react-spinners/SquareLoader.d.ts new file mode 100644 index 000000000..2fa2e689d --- /dev/null +++ b/frontend/node_modules/react-spinners/SquareLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SquareLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SquareLoader; diff --git a/frontend/node_modules/react-spinners/SquareLoader.js b/frontend/node_modules/react-spinners/SquareLoader.js new file mode 100644 index 000000000..3db507706 --- /dev/null +++ b/frontend/node_modules/react-spinners/SquareLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var square = (0, animation_1.createAnimation)("SquareLoader", "25% {transform: rotateX(180deg) rotateY(0)}\n 50% {transform: rotateX(180deg) rotateY(180deg)} \n 75% {transform: rotateX(0) rotateY(180deg)} \n 100% {transform: rotateX(0) rotateY(0)}", "square"); +function SquareLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ backgroundColor: color, width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = SquareLoader; diff --git a/frontend/node_modules/react-spinners/SyncLoader.d.ts b/frontend/node_modules/react-spinners/SyncLoader.d.ts new file mode 100644 index 000000000..252c84820 --- /dev/null +++ b/frontend/node_modules/react-spinners/SyncLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function SyncLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default SyncLoader; diff --git a/frontend/node_modules/react-spinners/SyncLoader.js b/frontend/node_modules/react-spinners/SyncLoader.js new file mode 100644 index 000000000..4152fea14 --- /dev/null +++ b/frontend/node_modules/react-spinners/SyncLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var animation_1 = require("./helpers/animation"); +var unitConverter_1 = require("./helpers/unitConverter"); +var sync = (0, animation_1.createAnimation)("SyncLoader", "33% {transform: translateY(10px)}\n 66% {transform: translateY(-10px)}\n 100% {transform: translateY(0)}", "sync"); +function SyncLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(sync, " ").concat(0.6 / speedMultiplier, "s ").concat(i * 0.07, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = SyncLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BarLoader.d.ts b/frontend/node_modules/react-spinners/cjs/BarLoader.d.ts new file mode 100644 index 000000000..aefdd89cf --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BarLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthProps } from "./helpers/props"; +declare function BarLoader({ loading, color, speedMultiplier, cssOverride, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; +export default BarLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BarLoader.js b/frontend/node_modules/react-spinners/cjs/BarLoader.js new file mode 100644 index 000000000..ccff19813 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BarLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var colors_1 = require("./helpers/colors"); +var long = (0, animation_1.createAnimation)("BarLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "long"); +var short = (0, animation_1.createAnimation)("BarLoader", "0% {left: -200%;right: 100%} 60% {left: 107%;right: -8%} 100% {left: 107%;right: -8%}", "short"); +function BarLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(width), height: (0, unitConverter_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, colors_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(height), + overflow: "hidden", + backgroundColor: color, + backgroundClip: "padding-box", + display: "block", + borderRadius: 2, + willChange: "left, right", + animationFillMode: "forwards", + animation: "".concat(i === 1 ? long : short, " ").concat(2.1 / speedMultiplier, "s ").concat(i === 2 ? "".concat(1.15 / speedMultiplier, "s") : "", " ").concat(i === 1 ? "cubic-bezier(0.65, 0.815, 0.735, 0.395)" : "cubic-bezier(0.165, 0.84, 0.44, 1)", " infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = BarLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BeatLoader.d.ts b/frontend/node_modules/react-spinners/cjs/BeatLoader.d.ts new file mode 100644 index 000000000..acd998f72 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BeatLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function BeatLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default BeatLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BeatLoader.js b/frontend/node_modules/react-spinners/cjs/BeatLoader.js new file mode 100644 index 000000000..4962a079f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BeatLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var beat = (0, animation_1.createAnimation)("BeatLoader", "50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}", "beat"); +function BeatLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + display: "inline-block", + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animation: "".concat(beat, " ").concat(0.7 / speedMultiplier, "s ").concat(i % 2 ? "0s" : "".concat(0.35 / speedMultiplier, "s"), " infinite linear"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = BeatLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BounceLoader.d.ts b/frontend/node_modules/react-spinners/cjs/BounceLoader.d.ts new file mode 100644 index 000000000..16cd11544 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BounceLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function BounceLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default BounceLoader; diff --git a/frontend/node_modules/react-spinners/cjs/BounceLoader.js b/frontend/node_modules/react-spinners/cjs/BounceLoader.js new file mode 100644 index 000000000..d15e3376f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/BounceLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var bounce = (0, animation_1.createAnimation)("BounceLoader", "0% {transform: scale(0)} 50% {transform: scale(1.0)} 100% {transform: scale(0)}", "bounce"); +function BounceLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = function (i) { + var animationTiming = i === 1 ? "".concat(1 / speedMultiplier, "s") : "0s"; + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + backgroundColor: color, + borderRadius: "100%", + opacity: 0.6, + top: 0, + left: 0, + animationFillMode: "both", + animation: "".concat(bounce, " ").concat(2.1 / speedMultiplier, "s ").concat(animationTiming, " infinite ease-in-out"), + }; + }; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = BounceLoader; diff --git a/frontend/node_modules/react-spinners/cjs/CircleLoader.d.ts b/frontend/node_modules/react-spinners/cjs/CircleLoader.d.ts new file mode 100644 index 000000000..12ec8925f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/CircleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function CircleLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default CircleLoader; diff --git a/frontend/node_modules/react-spinners/cjs/CircleLoader.js b/frontend/node_modules/react-spinners/cjs/CircleLoader.js new file mode 100644 index 000000000..d305db899 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/CircleLoader.js @@ -0,0 +1,82 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var circle = (0, animation_1.createAnimation)("CircleLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "circle"); +function CircleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + height: "".concat(value * (1 - i / 10)).concat(unit), + width: "".concat(value * (1 - i / 10)).concat(unit), + borderTop: "1px solid ".concat(color), + borderBottom: "none", + borderLeft: "1px solid ".concat(color), + borderRight: "none", + borderRadius: "100%", + transition: "2s", + top: "".concat(i * 0.7 * 2.5, "%"), + left: "".concat(i * 0.35 * 2.5, "%"), + animation: "".concat(circle, " ").concat(1 / speedMultiplier, "s ").concat((i * 0.2) / speedMultiplier, "s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }))); +} +exports.default = CircleLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.d.ts b/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.d.ts new file mode 100644 index 000000000..12660b80d --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClimbingBoxLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.js b/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.js new file mode 100644 index 000000000..3488acf70 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClimbingBoxLoader.js @@ -0,0 +1,95 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var climbingBox = (0, animation_1.createAnimation)("ClimbingBoxLoader", "0% {transform:translate(0, -1em) rotate(-45deg)}\n 5% {transform:translate(0, -1em) rotate(-50deg)}\n 20% {transform:translate(1em, -2em) rotate(47deg)}\n 25% {transform:translate(1em, -2em) rotate(45deg)}\n 30% {transform:translate(1em, -2em) rotate(40deg)}\n 45% {transform:translate(2em, -3em) rotate(137deg)}\n 50% {transform:translate(2em, -3em) rotate(135deg)}\n 55% {transform:translate(2em, -3em) rotate(130deg)}\n 70% {transform:translate(3em, -4em) rotate(217deg)}\n 75% {transform:translate(3em, -4em) rotate(220deg)}\n 100% {transform:translate(0, -1em) rotate(-225deg)}", "climbingBox"); +function ClimbingBoxLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var container = __assign({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride); + var wrapper = { + position: "absolute", + top: "50%", + left: "50%", + marginTop: "-2.7em", + marginLeft: "-2.7em", + width: "5.4em", + height: "5.4em", + fontSize: (0, unitConverter_1.cssValue)(size), + }; + var style = { + position: "absolute", + left: "0", + bottom: "-0.1em", + height: "1em", + width: "1em", + backgroundColor: "transparent", + borderRadius: "15%", + border: "0.25em solid ".concat(color), + transform: "translate(0, -1em) rotate(-45deg)", + animationFillMode: "both", + animation: "".concat(climbingBox, " ").concat(2.5 / speedMultiplier, "s infinite cubic-bezier(0.79, 0, 0.47, 0.97)"), + }; + var hill = { + position: "absolute", + width: "7.1em", + height: "7.1em", + top: "1.7em", + left: "1.7em", + borderLeft: "0.25em solid ".concat(color), + transform: "rotate(45deg)", + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: container }, additionalprops), + React.createElement("span", { style: wrapper }, + React.createElement("span", { style: style }), + React.createElement("span", { style: hill })))); +} +exports.default = ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClipLoader.d.ts b/frontend/node_modules/react-spinners/cjs/ClipLoader.d.ts new file mode 100644 index 000000000..336d685c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClipLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClipLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClipLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClipLoader.js b/frontend/node_modules/react-spinners/cjs/ClipLoader.js new file mode 100644 index 000000000..2fae13765 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClipLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var clip = (0, animation_1.createAnimation)("ClipLoader", "0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}", "clip"); +function ClipLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ background: "transparent !important", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = ClipLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClockLoader.d.ts b/frontend/node_modules/react-spinners/cjs/ClockLoader.d.ts new file mode 100644 index 000000000..57785be37 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClockLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClockLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClockLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ClockLoader.js b/frontend/node_modules/react-spinners/cjs/ClockLoader.js new file mode 100644 index 000000000..367b7a5ad --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ClockLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("ClockLoader", "100% { transform: rotate(360deg) }", "rotate"); +function ClockLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride); + var minute = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 3, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(8 / speedMultiplier, "s linear infinite"), + }; + var hour = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 2.4, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s linear infinite"), + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: hour }), + React.createElement("span", { style: minute }))); +} +exports.default = ClockLoader; diff --git a/frontend/node_modules/react-spinners/cjs/DotLoader.d.ts b/frontend/node_modules/react-spinners/cjs/DotLoader.d.ts new file mode 100644 index 000000000..f3cd003ad --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/DotLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function DotLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default DotLoader; diff --git a/frontend/node_modules/react-spinners/cjs/DotLoader.js b/frontend/node_modules/react-spinners/cjs/DotLoader.js new file mode 100644 index 000000000..18081c262 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/DotLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("DotLoader", "100% {transform: rotate(360deg)}", "rotate"); +var bounce = (0, animation_1.createAnimation)("DotLoader", "0%, 100% {transform: scale(0)} 50% {transform: scale(1.0)}", "bounce"); +function DotLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), animationFillMode: "forwards", animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + top: i % 2 ? "0" : "auto", + bottom: i % 2 ? "auto" : "0", + height: "".concat(value / 2).concat(unit), + width: "".concat(value / 2).concat(unit), + backgroundColor: color, + borderRadius: "100%", + animationFillMode: "forwards", + animation: "".concat(bounce, " ").concat(2 / speedMultiplier, "s ").concat(i === 2 ? "1s" : "0s", " infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = DotLoader; diff --git a/frontend/node_modules/react-spinners/cjs/FadeLoader.d.ts b/frontend/node_modules/react-spinners/cjs/FadeLoader.d.ts new file mode 100644 index 000000000..98053e8e4 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/FadeLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function FadeLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default FadeLoader; diff --git a/frontend/node_modules/react-spinners/cjs/FadeLoader.js b/frontend/node_modules/react-spinners/cjs/FadeLoader.js new file mode 100644 index 000000000..38f96db1f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/FadeLoader.js @@ -0,0 +1,92 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var fade = (0, animation_1.createAnimation)("FadeLoader", "50% {opacity: 0.3} 100% {opacity: 1}", "fade"); +function FadeLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 15 : _f, _g = _a.width, width = _g === void 0 ? 5 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var value = (0, unitConverter_1.parseLengthAndUnit)(margin).value; + var radiusValue = value + 18; + var quarter = radiusValue / 2 + radiusValue / 5.5; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: "0", top: radiusValue, left: radiusValue, width: "".concat(radiusValue * 3, "px"), height: "".concat(radiusValue * 3, "px") }, cssOverride); + var style = function (i) { + return { + position: "absolute", + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + backgroundColor: color, + borderRadius: (0, unitConverter_1.cssValue)(radius), + transition: "2s", + animationFillMode: "both", + animation: "".concat(fade, " ").concat(1.2 / speedMultiplier, "s ").concat(i * 0.12, "s infinite ease-in-out"), + }; + }; + var a = __assign(__assign({}, style(1)), { top: "".concat(radiusValue, "px"), left: "0" }); + var b = __assign(__assign({}, style(2)), { top: "".concat(quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(-45deg)" }); + var c = __assign(__assign({}, style(3)), { top: "0", left: "".concat(radiusValue, "px"), transform: "rotate(90deg)" }); + var d = __assign(__assign({}, style(4)), { top: "".concat(-1 * quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(45deg)" }); + var e = __assign(__assign({}, style(5)), { top: "".concat(-1 * radiusValue, "px"), left: "0" }); + var f = __assign(__assign({}, style(6)), { top: "".concat(-1 * quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(-45deg)" }); + var g = __assign(__assign({}, style(7)), { top: "0", left: "".concat(-1 * radiusValue, "px"), transform: "rotate(90deg)" }); + var h = __assign(__assign({}, style(8)), { top: "".concat(quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(45deg)" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: a }), + React.createElement("span", { style: b }), + React.createElement("span", { style: c }), + React.createElement("span", { style: d }), + React.createElement("span", { style: e }), + React.createElement("span", { style: f }), + React.createElement("span", { style: g }), + React.createElement("span", { style: h }))); +} +exports.default = FadeLoader; diff --git a/frontend/node_modules/react-spinners/cjs/GridLoader.d.ts b/frontend/node_modules/react-spinners/cjs/GridLoader.d.ts new file mode 100644 index 000000000..06fa46b8c --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/GridLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function GridLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default GridLoader; diff --git a/frontend/node_modules/react-spinners/cjs/GridLoader.js b/frontend/node_modules/react-spinners/cjs/GridLoader.js new file mode 100644 index 000000000..f3a67bcb7 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/GridLoader.js @@ -0,0 +1,89 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var grid = (0, animation_1.createAnimation)("GridLoader", "0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}", "grid"); +var random = function (top) { return Math.random() * top; }; +function GridLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var sizeWithUnit = (0, unitConverter_1.parseLengthAndUnit)(size); + var marginWithUnit = (0, unitConverter_1.parseLengthAndUnit)(margin); + var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6; + var wrapper = __assign({ width: "".concat(width).concat(sizeWithUnit.unit), fontSize: 0, display: "inline-block" }, cssOverride); + var style = function (rand) { + return { + display: "inline-block", + backgroundColor: color, + width: "".concat((0, unitConverter_1.cssValue)(size)), + height: "".concat((0, unitConverter_1.cssValue)(size)), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animationFillMode: "both", + animation: "".concat(grid, " ").concat((rand / 100 + 0.6) / speedMultiplier, "s ").concat(rand / 100 - 0.2, "s infinite ease"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops, { ref: function (node) { + if (node) { + node.style.setProperty("width", "".concat(width).concat(sizeWithUnit.unit), "important"); + } + } }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }))); +} +exports.default = GridLoader; diff --git a/frontend/node_modules/react-spinners/cjs/HashLoader.d.ts b/frontend/node_modules/react-spinners/cjs/HashLoader.d.ts new file mode 100644 index 000000000..ca1763ff3 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/HashLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function HashLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default HashLoader; diff --git a/frontend/node_modules/react-spinners/cjs/HashLoader.js b/frontend/node_modules/react-spinners/cjs/HashLoader.js new file mode 100644 index 000000000..55d43683f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/HashLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var colors_1 = require("./helpers/colors"); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +function HashLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), transform: "rotate(165deg)" }, cssOverride); + var thickness = value / 5; + var lat = (value - thickness) / 2; + var offset = lat - thickness; + var colorValue = (0, colors_1.calculateRgba)(color, 0.75); + var before = (0, animation_1.createAnimation)("HashLoader", "0% {width: ".concat(thickness, "px; box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 35% {width: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: 0 ").concat(-offset, "px ").concat(colorValue, ", 0 ").concat(offset, "px ").concat(colorValue, "}\n 70% {width: ").concat(thickness, "px; box-shadow: ").concat(-lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 100% {box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}"), "before"); + var after = (0, animation_1.createAnimation)("HashLoader", "0% {height: ".concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}\n 35% {height: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: ").concat(offset, "px 0 ").concat(color, ", ").concat(-offset, "px 0 ").concat(color, "}\n 70% {height: ").concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(-lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(lat, "px ").concat(color, "}\n 100% {box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}"), "after"); + var style = function (i) { + return { + position: "absolute", + top: "50%", + left: "50%", + display: "block", + width: "".concat(value / 5).concat(unit), + height: "".concat(value / 5).concat(unit), + borderRadius: "".concat(value / 10).concat(unit), + transform: "translate(-50%, -50%)", + animationFillMode: "none", + animation: "".concat(i === 1 ? before : after, " ").concat(2 / speedMultiplier, "s infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = HashLoader; diff --git a/frontend/node_modules/react-spinners/cjs/MoonLoader.d.ts b/frontend/node_modules/react-spinners/cjs/MoonLoader.d.ts new file mode 100644 index 000000000..2cf77a2c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/MoonLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function MoonLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default MoonLoader; diff --git a/frontend/node_modules/react-spinners/cjs/MoonLoader.js b/frontend/node_modules/react-spinners/cjs/MoonLoader.js new file mode 100644 index 000000000..a0e850123 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/MoonLoader.js @@ -0,0 +1,73 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var moon = (0, animation_1.createAnimation)("MoonLoader", "100% {transform: rotate(360deg)}", "moon"); +function MoonLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var moonSize = value / 7; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride); + var ballStyle = function (size) { + return { + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + }; + var ball = __assign(__assign({}, ballStyle(moonSize)), { backgroundColor: "".concat(color), opacity: "0.8", position: "absolute", top: "".concat("".concat(value / 2 - moonSize / 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }); + var circle = __assign(__assign({}, ballStyle(value)), { border: "".concat(moonSize, "px solid ").concat(color), opacity: "0.1", boxSizing: "content-box", position: "absolute" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: ball }), + React.createElement("span", { style: circle }))); +} +exports.default = MoonLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PacmanLoader.d.ts b/frontend/node_modules/react-spinners/cjs/PacmanLoader.d.ts new file mode 100644 index 000000000..e8ad135e3 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PacmanLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PacmanLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PacmanLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PacmanLoader.js b/frontend/node_modules/react-spinners/cjs/PacmanLoader.js new file mode 100644 index 000000000..5417b20c3 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PacmanLoader.js @@ -0,0 +1,104 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var pacman = [ + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(-44deg)}", "pacman-1"), + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(44deg)}", "pacman-2"), +]; +function PacmanLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 25 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(size), value = _h.value, unit = _h.unit; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride); + var ball = (0, animation_1.createAnimation)("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball"); + var ballStyle = function (i) { + return { + width: "".concat(value / 3).concat(unit), + height: "".concat(value / 3).concat(unit), + backgroundColor: color, + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + transform: "translate(0, ".concat("".concat(-value / 4).concat(unit), ")"), + position: "absolute", + top: "".concat(value).concat(unit), + left: "".concat(value * 4).concat(unit), + animation: "".concat(ball, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.25, "s infinite linear"), + animationFillMode: "both", + }; + }; + var s1 = "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"); + var s2 = "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color); + var pacmanStyle = function (i) { + return { + width: 0, + height: 0, + borderRight: s1, + borderTop: i === 0 ? s1 : s2, + borderLeft: s2, + borderBottom: i === 0 ? s2 : s1, + borderRadius: (0, unitConverter_1.cssValue)(size), + position: "absolute", + animation: "".concat(pacman[i], " ").concat(0.8 / speedMultiplier, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + var pac = pacmanStyle(0); + var man = pacmanStyle(1); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: pac }), + React.createElement("span", { style: man }), + React.createElement("span", { style: ballStyle(2) }), + React.createElement("span", { style: ballStyle(3) }), + React.createElement("span", { style: ballStyle(4) }), + React.createElement("span", { style: ballStyle(5) }))); +} +exports.default = PacmanLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PropagateLoader.d.ts b/frontend/node_modules/react-spinners/cjs/PropagateLoader.d.ts new file mode 100644 index 000000000..ff39bb03e --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PropagateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PropagateLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PropagateLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PropagateLoader.js b/frontend/node_modules/react-spinners/cjs/PropagateLoader.js new file mode 100644 index 000000000..f7b955ae9 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PropagateLoader.js @@ -0,0 +1,88 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +// 1.5 4.5 7.5 +var distance = [1, 3, 5]; +var propagate = [ + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-0"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-1"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(-").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-2"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-3"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-4"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-5"), +]; +function PropagateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + fontSize: "".concat(value / 3).concat(unit), + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + background: color, + borderRadius: "50%", + animation: "".concat(propagate[i], " ").concat(1.5 / speedMultiplier, "s infinite"), + animationFillMode: "forwards", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = PropagateLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PuffLoader.d.ts b/frontend/node_modules/react-spinners/cjs/PuffLoader.d.ts new file mode 100644 index 000000000..e6ae1d0c8 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PuffLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PuffLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PuffLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PuffLoader.js b/frontend/node_modules/react-spinners/cjs/PuffLoader.js new file mode 100644 index 000000000..de121956a --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PuffLoader.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var puff = [ + (0, animation_1.createAnimation)("PuffLoader", "0% {transform: scale(0)} 100% {transform: scale(1.0)}", "puff-1"), + (0, animation_1.createAnimation)("PuffLoader", "0% {opacity: 1} 100% {opacity: 0}", "puff-2"), +]; +function PuffLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + border: "thick solid ".concat(color), + borderRadius: "50%", + opacity: "1", + top: "0", + left: "0", + animationFillMode: "both", + animation: "".concat(puff[0], ", ").concat(puff[1]), + animationDuration: "".concat(2 / speedMultiplier, "s"), + animationIterationCount: "infinite", + animationTimingFunction: "cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)", + animationDelay: i === 1 ? "-1s" : "0s", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = PuffLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PulseLoader.d.ts b/frontend/node_modules/react-spinners/cjs/PulseLoader.d.ts new file mode 100644 index 000000000..abf34d4c5 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PulseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PulseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PulseLoader; diff --git a/frontend/node_modules/react-spinners/cjs/PulseLoader.js b/frontend/node_modules/react-spinners/cjs/PulseLoader.js new file mode 100644 index 000000000..a0823a526 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/PulseLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var pulse = (0, animation_1.createAnimation)("PulseLoader", "0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}", "pulse"); +function PulseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(pulse, " ").concat(0.75 / speedMultiplier, "s ").concat((i * 0.12) / speedMultiplier, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = PulseLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RingLoader.d.ts b/frontend/node_modules/react-spinners/cjs/RingLoader.d.ts new file mode 100644 index 000000000..ebf7a62cb --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RingLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function RingLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default RingLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RingLoader.js b/frontend/node_modules/react-spinners/cjs/RingLoader.js new file mode 100644 index 000000000..2aea521d7 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RingLoader.js @@ -0,0 +1,79 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var right = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(180deg) rotateY(360deg) rotateZ(360deg)}", "right"); +var left = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg)}", "left"); +function RingLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + top: "0", + left: "0", + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + border: "".concat(value / 10).concat(unit, " solid ").concat(color), + opacity: "0.4", + borderRadius: "100%", + animationFillMode: "forwards", + perspective: "800px", + animation: "".concat(i === 1 ? right : left, " ").concat(2 / speedMultiplier, "s 0s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +exports.default = RingLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RiseLoader.d.ts b/frontend/node_modules/react-spinners/cjs/RiseLoader.d.ts new file mode 100644 index 000000000..7ed595882 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RiseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RiseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RiseLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RiseLoader.js b/frontend/node_modules/react-spinners/cjs/RiseLoader.js new file mode 100644 index 000000000..7961f4fb3 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RiseLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +function RiseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var even = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even"); + var odd = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd"); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(i % 2 === 0 ? even : odd, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.15, 0.46, 0.9, 0.6)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = RiseLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RotateLoader.d.ts b/frontend/node_modules/react-spinners/cjs/RotateLoader.d.ts new file mode 100644 index 000000000..9577c1805 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RotateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RotateLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RotateLoader; diff --git a/frontend/node_modules/react-spinners/cjs/RotateLoader.js b/frontend/node_modules/react-spinners/cjs/RotateLoader.js new file mode 100644 index 000000000..8a06338fc --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/RotateLoader.js @@ -0,0 +1,78 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var rotate = (0, animation_1.createAnimation)("RotateLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "rotate"); +function RotateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(margin), value = _h.value, unit = _h.unit; + var ball = { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + var wrapper = __assign(__assign(__assign({}, ball), { display: "inline-block", position: "relative", animationFillMode: "both", animation: "".concat(rotate, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.7, -0.13, 0.22, 0.86)") }), cssOverride); + var style = function (i) { + var left = (i % 2 ? -1 : 1) * (26 + value); + return { + opacity: "0.8", + position: "absolute", + top: "0", + left: "".concat(left).concat(unit), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: __assign(__assign({}, ball), style(1)) }), + React.createElement("span", { style: __assign(__assign({}, ball), style(2)) }))); +} +exports.default = RotateLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ScaleLoader.d.ts b/frontend/node_modules/react-spinners/cjs/ScaleLoader.d.ts new file mode 100644 index 000000000..23f085479 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ScaleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function ScaleLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default ScaleLoader; diff --git a/frontend/node_modules/react-spinners/cjs/ScaleLoader.js b/frontend/node_modules/react-spinners/cjs/ScaleLoader.js new file mode 100644 index 000000000..5516963fc --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/ScaleLoader.js @@ -0,0 +1,77 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var scale = (0, animation_1.createAnimation)("ScaleLoader", "0% {transform: scaley(1.0)} 50% {transform: scaley(0.4)} 100% {transform: scaley(1.0)}", "scale"); +function ScaleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 35 : _f, _g = _a.width, width = _g === void 0 ? 4 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: (0, unitConverter_1.cssValue)(radius), + display: "inline-block", + animation: "".concat(scale, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.1, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +exports.default = ScaleLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SkewLoader.d.ts b/frontend/node_modules/react-spinners/cjs/SkewLoader.d.ts new file mode 100644 index 000000000..98cd30f0f --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SkewLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SkewLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SkewLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SkewLoader.js b/frontend/node_modules/react-spinners/cjs/SkewLoader.js new file mode 100644 index 000000000..dce6d3d8e --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SkewLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var skew = (0, animation_1.createAnimation)("SkewLoader", "25% {transform: perspective(100px) rotateX(180deg) rotateY(0)} 50% {transform: perspective(100px) rotateX(180deg) rotateY(180deg)} 75% {transform: perspective(100px) rotateX(0) rotateY(180deg)} 100% {transform: perspective(100px) rotateX(0) rotateY(0)}", "skew"); +function SkewLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ width: "0", height: "0", borderLeft: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderRight: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderBottom: "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = SkewLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SquareLoader.d.ts b/frontend/node_modules/react-spinners/cjs/SquareLoader.d.ts new file mode 100644 index 000000000..2fa2e689d --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SquareLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SquareLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SquareLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SquareLoader.js b/frontend/node_modules/react-spinners/cjs/SquareLoader.js new file mode 100644 index 000000000..3db507706 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SquareLoader.js @@ -0,0 +1,60 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var unitConverter_1 = require("./helpers/unitConverter"); +var animation_1 = require("./helpers/animation"); +var square = (0, animation_1.createAnimation)("SquareLoader", "25% {transform: rotateX(180deg) rotateY(0)}\n 50% {transform: rotateX(180deg) rotateY(180deg)} \n 75% {transform: rotateX(0) rotateY(180deg)} \n 100% {transform: rotateX(0) rotateY(0)}", "square"); +function SquareLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ backgroundColor: color, width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +exports.default = SquareLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SyncLoader.d.ts b/frontend/node_modules/react-spinners/cjs/SyncLoader.d.ts new file mode 100644 index 000000000..252c84820 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SyncLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function SyncLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default SyncLoader; diff --git a/frontend/node_modules/react-spinners/cjs/SyncLoader.js b/frontend/node_modules/react-spinners/cjs/SyncLoader.js new file mode 100644 index 000000000..4152fea14 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/SyncLoader.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var React = __importStar(require("react")); +var animation_1 = require("./helpers/animation"); +var unitConverter_1 = require("./helpers/unitConverter"); +var sync = (0, animation_1.createAnimation)("SyncLoader", "33% {transform: translateY(10px)}\n 66% {transform: translateY(-10px)}\n 100% {transform: translateY(0)}", "sync"); +function SyncLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(sync, " ").concat(0.6 / speedMultiplier, "s ").concat(i * 0.07, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +exports.default = SyncLoader; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/animation.d.ts new file mode 100644 index 000000000..196a3bd20 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.d.ts @@ -0,0 +1 @@ +export declare const createAnimation: (loaderName: string, frames: string, suffix: string) => string; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.js b/frontend/node_modules/react-spinners/cjs/helpers/animation.js new file mode 100644 index 000000000..7626dfdf9 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createAnimation = void 0; +var createAnimation = function (loaderName, frames, suffix) { + var animationName = "react-spinners-".concat(loaderName, "-").concat(suffix); + if (typeof window == "undefined" || !window.document) { + return animationName; + } + var styleEl = document.createElement("style"); + document.head.appendChild(styleEl); + var styleSheet = styleEl.sheet; + var keyFrames = "\n @keyframes ".concat(animationName, " {\n ").concat(frames, "\n }\n "); + if (styleSheet) { + styleSheet.insertRule(keyFrames, 0); + } + return animationName; +}; +exports.createAnimation = createAnimation; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.d.ts new file mode 100644 index 000000000..3275561ce --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.d.ts @@ -0,0 +1,4 @@ +/** + * @jest-environment node + */ +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.js b/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.js new file mode 100644 index 000000000..4357f5381 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.server.test.js @@ -0,0 +1,12 @@ +"use strict"; +/** + * @jest-environment node + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var animation_1 = require("./animation"); +describe("animation", function () { + it("should not throw an error on server side", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.test.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/animation.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/animation.test.js b/frontend/node_modules/react-spinners/cjs/helpers/animation.test.js new file mode 100644 index 000000000..e0db580f1 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/animation.test.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var animation_1 = require("./animation"); +describe("createAnimation", function () { + it("should return name with suffix if passed in", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/cjs/helpers/colors.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/colors.d.ts new file mode 100644 index 000000000..e6115a944 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/colors.d.ts @@ -0,0 +1 @@ +export declare const calculateRgba: (color: string, opacity: number) => string; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/colors.js b/frontend/node_modules/react-spinners/cjs/helpers/colors.js new file mode 100644 index 000000000..b5fce3b00 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/colors.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateRgba = void 0; +var BasicColors; +(function (BasicColors) { + BasicColors["maroon"] = "#800000"; + BasicColors["red"] = "#FF0000"; + BasicColors["orange"] = "#FFA500"; + BasicColors["yellow"] = "#FFFF00"; + BasicColors["olive"] = "#808000"; + BasicColors["green"] = "#008000"; + BasicColors["purple"] = "#800080"; + BasicColors["fuchsia"] = "#FF00FF"; + BasicColors["lime"] = "#00FF00"; + BasicColors["teal"] = "#008080"; + BasicColors["aqua"] = "#00FFFF"; + BasicColors["blue"] = "#0000FF"; + BasicColors["navy"] = "#000080"; + BasicColors["black"] = "#000000"; + BasicColors["gray"] = "#808080"; + BasicColors["silver"] = "#C0C0C0"; + BasicColors["white"] = "#FFFFFF"; +})(BasicColors || (BasicColors = {})); +var calculateRgba = function (color, opacity) { + if (Object.keys(BasicColors).includes(color)) { + color = BasicColors[color]; + } + if (color[0] === "#") { + color = color.slice(1); + } + if (color.length === 3) { + var res_1 = ""; + color.split("").forEach(function (c) { + res_1 += c; + res_1 += c; + }); + color = res_1; + } + var rgbValues = (color.match(/.{2}/g) || []).map(function (hex) { return parseInt(hex, 16); }).join(", "); + return "rgba(".concat(rgbValues, ", ").concat(opacity, ")"); +}; +exports.calculateRgba = calculateRgba; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/colors.test.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/colors.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/colors.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/colors.test.js b/frontend/node_modules/react-spinners/cjs/helpers/colors.test.js new file mode 100644 index 000000000..d29127da0 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/colors.test.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var colors_1 = require("./colors"); +describe("calculateRgba", function () { + it("is a function", function () { + expect(typeof colors_1.calculateRgba).toEqual("function"); + }); + it("converts hash values to rgb", function () { + expect((0, colors_1.calculateRgba)("#ffffff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates 3 character hash value to the correct rgba", function () { + expect((0, colors_1.calculateRgba)("#fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("returns the passed in opacity as the part of the rgba value", function () { + expect((0, colors_1.calculateRgba)("#fff", 0.5)).toEqual("rgba(255, 255, 255, 0.5)"); + }); + it("calculated the correct rgba value without the starting # passed in", function () { + expect((0, colors_1.calculateRgba)("fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates the correct rgba using basic color names", function () { + expect((0, colors_1.calculateRgba)("maroon", 0.7)).toEqual("rgba(128, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("red", 0.7)).toEqual("rgba(255, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("orange", 0.7)).toEqual("rgba(255, 165, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("yellow", 0.7)).toEqual("rgba(255, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("olive", 0.7)).toEqual("rgba(128, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("green", 0.7)).toEqual("rgba(0, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("purple", 0.7)).toEqual("rgba(128, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("fuchsia", 0.7)).toEqual("rgba(255, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("lime", 0.7)).toEqual("rgba(0, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("teal", 0.7)).toEqual("rgba(0, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("aqua", 0.7)).toEqual("rgba(0, 255, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("blue", 0.7)).toEqual("rgba(0, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("navy", 0.7)).toEqual("rgba(0, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("black", 0.7)).toEqual("rgba(0, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("gray", 0.7)).toEqual("rgba(128, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("silver", 0.7)).toEqual("rgba(192, 192, 192, 0.7)"); + expect((0, colors_1.calculateRgba)("white", 0.7)).toEqual("rgba(255, 255, 255, 0.7)"); + }); +}); diff --git a/frontend/node_modules/react-spinners/cjs/helpers/props.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/props.d.ts new file mode 100644 index 000000000..62830656b --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/props.d.ts @@ -0,0 +1,26 @@ +import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; +export type LengthType = number | string; +interface CommonProps extends DetailedHTMLProps, HTMLSpanElement> { + color?: string; + loading?: boolean; + cssOverride?: CSSProperties; + speedMultiplier?: number; +} +export interface LoaderHeightWidthProps extends CommonProps { + height?: LengthType; + width?: LengthType; +} +export interface LoaderSizeProps extends CommonProps { + size?: LengthType; +} +export interface LoaderSizeMarginProps extends CommonProps { + size?: LengthType; + margin?: LengthType; +} +export interface LoaderHeightWidthRadiusProps extends CommonProps { + height?: LengthType; + width?: LengthType; + radius?: LengthType; + margin?: LengthType; +} +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/props.js b/frontend/node_modules/react-spinners/cjs/helpers/props.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/props.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.d.ts new file mode 100644 index 000000000..771955ed8 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.d.ts @@ -0,0 +1,22 @@ +interface LengthObject { + value: number; + unit: string; +} +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +export declare function parseLengthAndUnit(size: number | string): LengthObject; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +export declare function cssValue(value: number | string): string; +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.js b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.js new file mode 100644 index 000000000..24d8ed34d --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cssValue = exports.parseLengthAndUnit = void 0; +var cssUnit = { + cm: true, + mm: true, + in: true, + px: true, + pt: true, + pc: true, + em: true, + ex: true, + ch: true, + rem: true, + vw: true, + vh: true, + vmin: true, + vmax: true, + "%": true, +}; +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +function parseLengthAndUnit(size) { + if (typeof size === "number") { + return { + value: size, + unit: "px", + }; + } + var value; + var valueString = (size.match(/^[0-9.]*/) || "").toString(); + if (valueString.includes(".")) { + value = parseFloat(valueString); + } + else { + value = parseInt(valueString, 10); + } + var unit = (size.match(/[^0-9]*$/) || "").toString(); + if (cssUnit[unit]) { + return { + value: value, + unit: unit, + }; + } + console.warn("React Spinners: ".concat(size, " is not a valid css value. Defaulting to ").concat(value, "px.")); + return { + value: value, + unit: "px", + }; +} +exports.parseLengthAndUnit = parseLengthAndUnit; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +function cssValue(value) { + var lengthWithunit = parseLengthAndUnit(value); + return "".concat(lengthWithunit.value).concat(lengthWithunit.unit); +} +exports.cssValue = cssValue; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.d.ts b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.js b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.js new file mode 100644 index 000000000..3402db00b --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/helpers/unitConverter.test.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var unitConverter_1 = require("./unitConverter"); +describe("unitConverter", function () { + describe("parseLengthAndUnit", function () { + var spy = jest.spyOn(console, "warn").mockImplementation(); + var output = { + value: 12, + unit: "px", + }; + it("is a function", function () { + expect(typeof unitConverter_1.parseLengthAndUnit).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.parseLengthAndUnit)(12)).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid integer css unit and return an object with value and unit", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid css float unit and return an object with value and unit", function () { + var output = { + value: 12.5, + unit: "px", + }; + expect((0, unitConverter_1.parseLengthAndUnit)("12.5px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("takes an invalid css unit and default the value to px", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12fd")).toEqual(output); + expect(spy).toBeCalled(); + }); + }); + describe("cssValue", function () { + it("is a function", function () { + expect(typeof unitConverter_1.cssValue).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.cssValue)(12)).toEqual("12px"); + }); + it("takes a string with valid css unit as the input and return the value", function () { + expect((0, unitConverter_1.cssValue)("12%")).toEqual("12%"); + expect((0, unitConverter_1.cssValue)("12em")).toEqual("12em"); + }); + it("takes a string with invalid css unit as the input and default to px", function () { + expect((0, unitConverter_1.cssValue)("12qw")).toEqual("12px"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/cjs/index.d.ts b/frontend/node_modules/react-spinners/cjs/index.d.ts new file mode 100644 index 000000000..478f2b91d --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/index.d.ts @@ -0,0 +1,23 @@ +export { default as BarLoader } from "./BarLoader"; +export { default as BeatLoader } from "./BeatLoader"; +export { default as BounceLoader } from "./BounceLoader"; +export { default as CircleLoader } from "./CircleLoader"; +export { default as ClimbingBoxLoader } from "./ClimbingBoxLoader"; +export { default as ClipLoader } from "./ClipLoader"; +export { default as ClockLoader } from "./ClockLoader"; +export { default as DotLoader } from "./DotLoader"; +export { default as FadeLoader } from "./FadeLoader"; +export { default as GridLoader } from "./GridLoader"; +export { default as HashLoader } from "./HashLoader"; +export { default as MoonLoader } from "./MoonLoader"; +export { default as PacmanLoader } from "./PacmanLoader"; +export { default as PropagateLoader } from "./PropagateLoader"; +export { default as PulseLoader } from "./PulseLoader"; +export { default as PuffLoader } from "./PuffLoader"; +export { default as RingLoader } from "./RingLoader"; +export { default as RiseLoader } from "./RiseLoader"; +export { default as RotateLoader } from "./RotateLoader"; +export { default as ScaleLoader } from "./ScaleLoader"; +export { default as SkewLoader } from "./SkewLoader"; +export { default as SquareLoader } from "./SquareLoader"; +export { default as SyncLoader } from "./SyncLoader"; diff --git a/frontend/node_modules/react-spinners/cjs/index.js b/frontend/node_modules/react-spinners/cjs/index.js new file mode 100644 index 000000000..184a2be56 --- /dev/null +++ b/frontend/node_modules/react-spinners/cjs/index.js @@ -0,0 +1,52 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncLoader = exports.SquareLoader = exports.SkewLoader = exports.ScaleLoader = exports.RotateLoader = exports.RiseLoader = exports.RingLoader = exports.PuffLoader = exports.PulseLoader = exports.PropagateLoader = exports.PacmanLoader = exports.MoonLoader = exports.HashLoader = exports.GridLoader = exports.FadeLoader = exports.DotLoader = exports.ClockLoader = exports.ClipLoader = exports.ClimbingBoxLoader = exports.CircleLoader = exports.BounceLoader = exports.BeatLoader = exports.BarLoader = void 0; +var BarLoader_1 = require("./BarLoader"); +Object.defineProperty(exports, "BarLoader", { enumerable: true, get: function () { return __importDefault(BarLoader_1).default; } }); +var BeatLoader_1 = require("./BeatLoader"); +Object.defineProperty(exports, "BeatLoader", { enumerable: true, get: function () { return __importDefault(BeatLoader_1).default; } }); +var BounceLoader_1 = require("./BounceLoader"); +Object.defineProperty(exports, "BounceLoader", { enumerable: true, get: function () { return __importDefault(BounceLoader_1).default; } }); +var CircleLoader_1 = require("./CircleLoader"); +Object.defineProperty(exports, "CircleLoader", { enumerable: true, get: function () { return __importDefault(CircleLoader_1).default; } }); +var ClimbingBoxLoader_1 = require("./ClimbingBoxLoader"); +Object.defineProperty(exports, "ClimbingBoxLoader", { enumerable: true, get: function () { return __importDefault(ClimbingBoxLoader_1).default; } }); +var ClipLoader_1 = require("./ClipLoader"); +Object.defineProperty(exports, "ClipLoader", { enumerable: true, get: function () { return __importDefault(ClipLoader_1).default; } }); +var ClockLoader_1 = require("./ClockLoader"); +Object.defineProperty(exports, "ClockLoader", { enumerable: true, get: function () { return __importDefault(ClockLoader_1).default; } }); +var DotLoader_1 = require("./DotLoader"); +Object.defineProperty(exports, "DotLoader", { enumerable: true, get: function () { return __importDefault(DotLoader_1).default; } }); +var FadeLoader_1 = require("./FadeLoader"); +Object.defineProperty(exports, "FadeLoader", { enumerable: true, get: function () { return __importDefault(FadeLoader_1).default; } }); +var GridLoader_1 = require("./GridLoader"); +Object.defineProperty(exports, "GridLoader", { enumerable: true, get: function () { return __importDefault(GridLoader_1).default; } }); +var HashLoader_1 = require("./HashLoader"); +Object.defineProperty(exports, "HashLoader", { enumerable: true, get: function () { return __importDefault(HashLoader_1).default; } }); +var MoonLoader_1 = require("./MoonLoader"); +Object.defineProperty(exports, "MoonLoader", { enumerable: true, get: function () { return __importDefault(MoonLoader_1).default; } }); +var PacmanLoader_1 = require("./PacmanLoader"); +Object.defineProperty(exports, "PacmanLoader", { enumerable: true, get: function () { return __importDefault(PacmanLoader_1).default; } }); +var PropagateLoader_1 = require("./PropagateLoader"); +Object.defineProperty(exports, "PropagateLoader", { enumerable: true, get: function () { return __importDefault(PropagateLoader_1).default; } }); +var PulseLoader_1 = require("./PulseLoader"); +Object.defineProperty(exports, "PulseLoader", { enumerable: true, get: function () { return __importDefault(PulseLoader_1).default; } }); +var PuffLoader_1 = require("./PuffLoader"); +Object.defineProperty(exports, "PuffLoader", { enumerable: true, get: function () { return __importDefault(PuffLoader_1).default; } }); +var RingLoader_1 = require("./RingLoader"); +Object.defineProperty(exports, "RingLoader", { enumerable: true, get: function () { return __importDefault(RingLoader_1).default; } }); +var RiseLoader_1 = require("./RiseLoader"); +Object.defineProperty(exports, "RiseLoader", { enumerable: true, get: function () { return __importDefault(RiseLoader_1).default; } }); +var RotateLoader_1 = require("./RotateLoader"); +Object.defineProperty(exports, "RotateLoader", { enumerable: true, get: function () { return __importDefault(RotateLoader_1).default; } }); +var ScaleLoader_1 = require("./ScaleLoader"); +Object.defineProperty(exports, "ScaleLoader", { enumerable: true, get: function () { return __importDefault(ScaleLoader_1).default; } }); +var SkewLoader_1 = require("./SkewLoader"); +Object.defineProperty(exports, "SkewLoader", { enumerable: true, get: function () { return __importDefault(SkewLoader_1).default; } }); +var SquareLoader_1 = require("./SquareLoader"); +Object.defineProperty(exports, "SquareLoader", { enumerable: true, get: function () { return __importDefault(SquareLoader_1).default; } }); +var SyncLoader_1 = require("./SyncLoader"); +Object.defineProperty(exports, "SyncLoader", { enumerable: true, get: function () { return __importDefault(SyncLoader_1).default; } }); diff --git a/frontend/node_modules/react-spinners/esm/BarLoader.d.ts b/frontend/node_modules/react-spinners/esm/BarLoader.d.ts new file mode 100644 index 000000000..aefdd89cf --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BarLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthProps } from "./helpers/props"; +declare function BarLoader({ loading, color, speedMultiplier, cssOverride, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; +export default BarLoader; diff --git a/frontend/node_modules/react-spinners/esm/BarLoader.js b/frontend/node_modules/react-spinners/esm/BarLoader.js new file mode 100644 index 000000000..8b414c3b3 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BarLoader.js @@ -0,0 +1,53 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +import { calculateRgba } from "./helpers/colors"; +var long = createAnimation("BarLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "long"); +var short = createAnimation("BarLoader", "0% {left: -200%;right: 100%} 60% {left: 107%;right: -8%} 100% {left: 107%;right: -8%}", "short"); +function BarLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(width), height: cssValue(height), overflow: "hidden", backgroundColor: calculateRgba(color, 0.2), backgroundClip: "padding-box" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: cssValue(height), + overflow: "hidden", + backgroundColor: color, + backgroundClip: "padding-box", + display: "block", + borderRadius: 2, + willChange: "left, right", + animationFillMode: "forwards", + animation: "".concat(i === 1 ? long : short, " ").concat(2.1 / speedMultiplier, "s ").concat(i === 2 ? "".concat(1.15 / speedMultiplier, "s") : "", " ").concat(i === 1 ? "cubic-bezier(0.65, 0.815, 0.735, 0.395)" : "cubic-bezier(0.165, 0.84, 0.44, 1)", " infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default BarLoader; diff --git a/frontend/node_modules/react-spinners/esm/BeatLoader.d.ts b/frontend/node_modules/react-spinners/esm/BeatLoader.d.ts new file mode 100644 index 000000000..acd998f72 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BeatLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function BeatLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default BeatLoader; diff --git a/frontend/node_modules/react-spinners/esm/BeatLoader.js b/frontend/node_modules/react-spinners/esm/BeatLoader.js new file mode 100644 index 000000000..3690d74dd --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BeatLoader.js @@ -0,0 +1,50 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var beat = createAnimation("BeatLoader", "50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}", "beat"); +function BeatLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + display: "inline-block", + backgroundColor: color, + width: cssValue(size), + height: cssValue(size), + margin: cssValue(margin), + borderRadius: "100%", + animation: "".concat(beat, " ").concat(0.7 / speedMultiplier, "s ").concat(i % 2 ? "0s" : "".concat(0.35 / speedMultiplier, "s"), " infinite linear"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +export default BeatLoader; diff --git a/frontend/node_modules/react-spinners/esm/BounceLoader.d.ts b/frontend/node_modules/react-spinners/esm/BounceLoader.d.ts new file mode 100644 index 000000000..16cd11544 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BounceLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function BounceLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default BounceLoader; diff --git a/frontend/node_modules/react-spinners/esm/BounceLoader.js b/frontend/node_modules/react-spinners/esm/BounceLoader.js new file mode 100644 index 000000000..b26c3419d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/BounceLoader.js @@ -0,0 +1,52 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var bounce = createAnimation("BounceLoader", "0% {transform: scale(0)} 50% {transform: scale(1.0)} 100% {transform: scale(0)}", "bounce"); +function BounceLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = function (i) { + var animationTiming = i === 1 ? "".concat(1 / speedMultiplier, "s") : "0s"; + return { + position: "absolute", + height: cssValue(size), + width: cssValue(size), + backgroundColor: color, + borderRadius: "100%", + opacity: 0.6, + top: 0, + left: 0, + animationFillMode: "both", + animation: "".concat(bounce, " ").concat(2.1 / speedMultiplier, "s ").concat(animationTiming, " infinite ease-in-out"), + }; + }; + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default BounceLoader; diff --git a/frontend/node_modules/react-spinners/esm/CircleLoader.d.ts b/frontend/node_modules/react-spinners/esm/CircleLoader.d.ts new file mode 100644 index 000000000..12ec8925f --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/CircleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function CircleLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default CircleLoader; diff --git a/frontend/node_modules/react-spinners/esm/CircleLoader.js b/frontend/node_modules/react-spinners/esm/CircleLoader.js new file mode 100644 index 000000000..0bdd84771 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/CircleLoader.js @@ -0,0 +1,57 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue, parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var circle = createAnimation("CircleLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "circle"); +function CircleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride); + var style = function (i) { + var _a = parseLengthAndUnit(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + height: "".concat(value * (1 - i / 10)).concat(unit), + width: "".concat(value * (1 - i / 10)).concat(unit), + borderTop: "1px solid ".concat(color), + borderBottom: "none", + borderLeft: "1px solid ".concat(color), + borderRight: "none", + borderRadius: "100%", + transition: "2s", + top: "".concat(i * 0.7 * 2.5, "%"), + left: "".concat(i * 0.35 * 2.5, "%"), + animation: "".concat(circle, " ").concat(1 / speedMultiplier, "s ").concat((i * 0.2) / speedMultiplier, "s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }))); +} +export default CircleLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.d.ts b/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.d.ts new file mode 100644 index 000000000..12660b80d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClimbingBoxLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.js b/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.js new file mode 100644 index 000000000..7e08fddaa --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClimbingBoxLoader.js @@ -0,0 +1,70 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var climbingBox = createAnimation("ClimbingBoxLoader", "0% {transform:translate(0, -1em) rotate(-45deg)}\n 5% {transform:translate(0, -1em) rotate(-50deg)}\n 20% {transform:translate(1em, -2em) rotate(47deg)}\n 25% {transform:translate(1em, -2em) rotate(45deg)}\n 30% {transform:translate(1em, -2em) rotate(40deg)}\n 45% {transform:translate(2em, -3em) rotate(137deg)}\n 50% {transform:translate(2em, -3em) rotate(135deg)}\n 55% {transform:translate(2em, -3em) rotate(130deg)}\n 70% {transform:translate(3em, -4em) rotate(217deg)}\n 75% {transform:translate(3em, -4em) rotate(220deg)}\n 100% {transform:translate(0, -1em) rotate(-225deg)}", "climbingBox"); +function ClimbingBoxLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var container = __assign({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride); + var wrapper = { + position: "absolute", + top: "50%", + left: "50%", + marginTop: "-2.7em", + marginLeft: "-2.7em", + width: "5.4em", + height: "5.4em", + fontSize: cssValue(size), + }; + var style = { + position: "absolute", + left: "0", + bottom: "-0.1em", + height: "1em", + width: "1em", + backgroundColor: "transparent", + borderRadius: "15%", + border: "0.25em solid ".concat(color), + transform: "translate(0, -1em) rotate(-45deg)", + animationFillMode: "both", + animation: "".concat(climbingBox, " ").concat(2.5 / speedMultiplier, "s infinite cubic-bezier(0.79, 0, 0.47, 0.97)"), + }; + var hill = { + position: "absolute", + width: "7.1em", + height: "7.1em", + top: "1.7em", + left: "1.7em", + borderLeft: "0.25em solid ".concat(color), + transform: "rotate(45deg)", + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: container }, additionalprops), + React.createElement("span", { style: wrapper }, + React.createElement("span", { style: style }), + React.createElement("span", { style: hill })))); +} +export default ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClipLoader.d.ts b/frontend/node_modules/react-spinners/esm/ClipLoader.d.ts new file mode 100644 index 000000000..336d685c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClipLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClipLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClipLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClipLoader.js b/frontend/node_modules/react-spinners/esm/ClipLoader.js new file mode 100644 index 000000000..a26277b15 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClipLoader.js @@ -0,0 +1,35 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var clip = createAnimation("ClipLoader", "0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}", "clip"); +function ClipLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ background: "transparent !important", width: cssValue(size), height: cssValue(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +export default ClipLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClockLoader.d.ts b/frontend/node_modules/react-spinners/esm/ClockLoader.d.ts new file mode 100644 index 000000000..57785be37 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClockLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClockLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClockLoader; diff --git a/frontend/node_modules/react-spinners/esm/ClockLoader.js b/frontend/node_modules/react-spinners/esm/ClockLoader.js new file mode 100644 index 000000000..f20c5cb03 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ClockLoader.js @@ -0,0 +1,58 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var rotate = createAnimation("ClockLoader", "100% { transform: rotate(360deg) }", "rotate"); +function ClockLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride); + var minute = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 3, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(8 / speedMultiplier, "s linear infinite"), + }; + var hour = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 2.4, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s linear infinite"), + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: hour }), + React.createElement("span", { style: minute }))); +} +export default ClockLoader; diff --git a/frontend/node_modules/react-spinners/esm/DotLoader.d.ts b/frontend/node_modules/react-spinners/esm/DotLoader.d.ts new file mode 100644 index 000000000..f3cd003ad --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/DotLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function DotLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default DotLoader; diff --git a/frontend/node_modules/react-spinners/esm/DotLoader.js b/frontend/node_modules/react-spinners/esm/DotLoader.js new file mode 100644 index 000000000..9a7ba1c51 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/DotLoader.js @@ -0,0 +1,52 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit, cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var rotate = createAnimation("DotLoader", "100% {transform: rotate(360deg)}", "rotate"); +var bounce = createAnimation("DotLoader", "0%, 100% {transform: scale(0)} 50% {transform: scale(1.0)}", "bounce"); +function DotLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), animationFillMode: "forwards", animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride); + var style = function (i) { + var _a = parseLengthAndUnit(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + top: i % 2 ? "0" : "auto", + bottom: i % 2 ? "auto" : "0", + height: "".concat(value / 2).concat(unit), + width: "".concat(value / 2).concat(unit), + backgroundColor: color, + borderRadius: "100%", + animationFillMode: "forwards", + animation: "".concat(bounce, " ").concat(2 / speedMultiplier, "s ").concat(i === 2 ? "1s" : "0s", " infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default DotLoader; diff --git a/frontend/node_modules/react-spinners/esm/FadeLoader.d.ts b/frontend/node_modules/react-spinners/esm/FadeLoader.d.ts new file mode 100644 index 000000000..98053e8e4 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/FadeLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function FadeLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default FadeLoader; diff --git a/frontend/node_modules/react-spinners/esm/FadeLoader.js b/frontend/node_modules/react-spinners/esm/FadeLoader.js new file mode 100644 index 000000000..1cf28066d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/FadeLoader.js @@ -0,0 +1,67 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue, parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var fade = createAnimation("FadeLoader", "50% {opacity: 0.3} 100% {opacity: 1}", "fade"); +function FadeLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 15 : _f, _g = _a.width, width = _g === void 0 ? 5 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var value = parseLengthAndUnit(margin).value; + var radiusValue = value + 18; + var quarter = radiusValue / 2 + radiusValue / 5.5; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: "0", top: radiusValue, left: radiusValue, width: "".concat(radiusValue * 3, "px"), height: "".concat(radiusValue * 3, "px") }, cssOverride); + var style = function (i) { + return { + position: "absolute", + width: cssValue(width), + height: cssValue(height), + margin: cssValue(margin), + backgroundColor: color, + borderRadius: cssValue(radius), + transition: "2s", + animationFillMode: "both", + animation: "".concat(fade, " ").concat(1.2 / speedMultiplier, "s ").concat(i * 0.12, "s infinite ease-in-out"), + }; + }; + var a = __assign(__assign({}, style(1)), { top: "".concat(radiusValue, "px"), left: "0" }); + var b = __assign(__assign({}, style(2)), { top: "".concat(quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(-45deg)" }); + var c = __assign(__assign({}, style(3)), { top: "0", left: "".concat(radiusValue, "px"), transform: "rotate(90deg)" }); + var d = __assign(__assign({}, style(4)), { top: "".concat(-1 * quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(45deg)" }); + var e = __assign(__assign({}, style(5)), { top: "".concat(-1 * radiusValue, "px"), left: "0" }); + var f = __assign(__assign({}, style(6)), { top: "".concat(-1 * quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(-45deg)" }); + var g = __assign(__assign({}, style(7)), { top: "0", left: "".concat(-1 * radiusValue, "px"), transform: "rotate(90deg)" }); + var h = __assign(__assign({}, style(8)), { top: "".concat(quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(45deg)" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: a }), + React.createElement("span", { style: b }), + React.createElement("span", { style: c }), + React.createElement("span", { style: d }), + React.createElement("span", { style: e }), + React.createElement("span", { style: f }), + React.createElement("span", { style: g }), + React.createElement("span", { style: h }))); +} +export default FadeLoader; diff --git a/frontend/node_modules/react-spinners/esm/GridLoader.d.ts b/frontend/node_modules/react-spinners/esm/GridLoader.d.ts new file mode 100644 index 000000000..06fa46b8c --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/GridLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function GridLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default GridLoader; diff --git a/frontend/node_modules/react-spinners/esm/GridLoader.js b/frontend/node_modules/react-spinners/esm/GridLoader.js new file mode 100644 index 000000000..3fd77dad0 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/GridLoader.js @@ -0,0 +1,64 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue, parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var grid = createAnimation("GridLoader", "0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}", "grid"); +var random = function (top) { return Math.random() * top; }; +function GridLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var sizeWithUnit = parseLengthAndUnit(size); + var marginWithUnit = parseLengthAndUnit(margin); + var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6; + var wrapper = __assign({ width: "".concat(width).concat(sizeWithUnit.unit), fontSize: 0, display: "inline-block" }, cssOverride); + var style = function (rand) { + return { + display: "inline-block", + backgroundColor: color, + width: "".concat(cssValue(size)), + height: "".concat(cssValue(size)), + margin: cssValue(margin), + borderRadius: "100%", + animationFillMode: "both", + animation: "".concat(grid, " ").concat((rand / 100 + 0.6) / speedMultiplier, "s ").concat(rand / 100 - 0.2, "s infinite ease"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops, { ref: function (node) { + if (node) { + node.style.setProperty("width", "".concat(width).concat(sizeWithUnit.unit), "important"); + } + } }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }))); +} +export default GridLoader; diff --git a/frontend/node_modules/react-spinners/esm/HashLoader.d.ts b/frontend/node_modules/react-spinners/esm/HashLoader.d.ts new file mode 100644 index 000000000..ca1763ff3 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/HashLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function HashLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default HashLoader; diff --git a/frontend/node_modules/react-spinners/esm/HashLoader.js b/frontend/node_modules/react-spinners/esm/HashLoader.js new file mode 100644 index 000000000..61fe2ea19 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/HashLoader.js @@ -0,0 +1,58 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { calculateRgba } from "./helpers/colors"; +import { parseLengthAndUnit, cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +function HashLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size), transform: "rotate(165deg)" }, cssOverride); + var thickness = value / 5; + var lat = (value - thickness) / 2; + var offset = lat - thickness; + var colorValue = calculateRgba(color, 0.75); + var before = createAnimation("HashLoader", "0% {width: ".concat(thickness, "px; box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 35% {width: ").concat(cssValue(size), "; box-shadow: 0 ").concat(-offset, "px ").concat(colorValue, ", 0 ").concat(offset, "px ").concat(colorValue, "}\n 70% {width: ").concat(thickness, "px; box-shadow: ").concat(-lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 100% {box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}"), "before"); + var after = createAnimation("HashLoader", "0% {height: ".concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}\n 35% {height: ").concat(cssValue(size), "; box-shadow: ").concat(offset, "px 0 ").concat(color, ", ").concat(-offset, "px 0 ").concat(color, "}\n 70% {height: ").concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(-lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(lat, "px ").concat(color, "}\n 100% {box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}"), "after"); + var style = function (i) { + return { + position: "absolute", + top: "50%", + left: "50%", + display: "block", + width: "".concat(value / 5).concat(unit), + height: "".concat(value / 5).concat(unit), + borderRadius: "".concat(value / 10).concat(unit), + transform: "translate(-50%, -50%)", + animationFillMode: "none", + animation: "".concat(i === 1 ? before : after, " ").concat(2 / speedMultiplier, "s infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default HashLoader; diff --git a/frontend/node_modules/react-spinners/esm/MoonLoader.d.ts b/frontend/node_modules/react-spinners/esm/MoonLoader.d.ts new file mode 100644 index 000000000..2cf77a2c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/MoonLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function MoonLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default MoonLoader; diff --git a/frontend/node_modules/react-spinners/esm/MoonLoader.js b/frontend/node_modules/react-spinners/esm/MoonLoader.js new file mode 100644 index 000000000..5ab9a63a1 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/MoonLoader.js @@ -0,0 +1,48 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit, cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var moon = createAnimation("MoonLoader", "100% {transform: rotate(360deg)}", "moon"); +function MoonLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit; + var moonSize = value / 7; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride); + var ballStyle = function (size) { + return { + width: cssValue(size), + height: cssValue(size), + borderRadius: "100%", + }; + }; + var ball = __assign(__assign({}, ballStyle(moonSize)), { backgroundColor: "".concat(color), opacity: "0.8", position: "absolute", top: "".concat("".concat(value / 2 - moonSize / 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }); + var circle = __assign(__assign({}, ballStyle(value)), { border: "".concat(moonSize, "px solid ").concat(color), opacity: "0.1", boxSizing: "content-box", position: "absolute" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: ball }), + React.createElement("span", { style: circle }))); +} +export default MoonLoader; diff --git a/frontend/node_modules/react-spinners/esm/PacmanLoader.d.ts b/frontend/node_modules/react-spinners/esm/PacmanLoader.d.ts new file mode 100644 index 000000000..e8ad135e3 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PacmanLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PacmanLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PacmanLoader; diff --git a/frontend/node_modules/react-spinners/esm/PacmanLoader.js b/frontend/node_modules/react-spinners/esm/PacmanLoader.js new file mode 100644 index 000000000..f409eb9ac --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PacmanLoader.js @@ -0,0 +1,79 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit, cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var pacman = [ + createAnimation("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(-44deg)}", "pacman-1"), + createAnimation("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(44deg)}", "pacman-2"), +]; +function PacmanLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 25 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = parseLengthAndUnit(size), value = _h.value, unit = _h.unit; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride); + var ball = createAnimation("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball"); + var ballStyle = function (i) { + return { + width: "".concat(value / 3).concat(unit), + height: "".concat(value / 3).concat(unit), + backgroundColor: color, + margin: cssValue(margin), + borderRadius: "100%", + transform: "translate(0, ".concat("".concat(-value / 4).concat(unit), ")"), + position: "absolute", + top: "".concat(value).concat(unit), + left: "".concat(value * 4).concat(unit), + animation: "".concat(ball, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.25, "s infinite linear"), + animationFillMode: "both", + }; + }; + var s1 = "".concat(cssValue(size), " solid transparent"); + var s2 = "".concat(cssValue(size), " solid ").concat(color); + var pacmanStyle = function (i) { + return { + width: 0, + height: 0, + borderRight: s1, + borderTop: i === 0 ? s1 : s2, + borderLeft: s2, + borderBottom: i === 0 ? s2 : s1, + borderRadius: cssValue(size), + position: "absolute", + animation: "".concat(pacman[i], " ").concat(0.8 / speedMultiplier, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + var pac = pacmanStyle(0); + var man = pacmanStyle(1); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: pac }), + React.createElement("span", { style: man }), + React.createElement("span", { style: ballStyle(2) }), + React.createElement("span", { style: ballStyle(3) }), + React.createElement("span", { style: ballStyle(4) }), + React.createElement("span", { style: ballStyle(5) }))); +} +export default PacmanLoader; diff --git a/frontend/node_modules/react-spinners/esm/PropagateLoader.d.ts b/frontend/node_modules/react-spinners/esm/PropagateLoader.d.ts new file mode 100644 index 000000000..ff39bb03e --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PropagateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PropagateLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PropagateLoader; diff --git a/frontend/node_modules/react-spinners/esm/PropagateLoader.js b/frontend/node_modules/react-spinners/esm/PropagateLoader.js new file mode 100644 index 000000000..9d45f3496 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PropagateLoader.js @@ -0,0 +1,63 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +// 1.5 4.5 7.5 +var distance = [1, 3, 5]; +var propagate = [ + createAnimation("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-0"), + createAnimation("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-1"), + createAnimation("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(-").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-2"), + createAnimation("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-3"), + createAnimation("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-4"), + createAnimation("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-5"), +]; +function PropagateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + fontSize: "".concat(value / 3).concat(unit), + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + background: color, + borderRadius: "50%", + animation: "".concat(propagate[i], " ").concat(1.5 / speedMultiplier, "s infinite"), + animationFillMode: "forwards", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +export default PropagateLoader; diff --git a/frontend/node_modules/react-spinners/esm/PuffLoader.d.ts b/frontend/node_modules/react-spinners/esm/PuffLoader.d.ts new file mode 100644 index 000000000..e6ae1d0c8 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PuffLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PuffLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PuffLoader; diff --git a/frontend/node_modules/react-spinners/esm/PuffLoader.js b/frontend/node_modules/react-spinners/esm/PuffLoader.js new file mode 100644 index 000000000..1fde72b01 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PuffLoader.js @@ -0,0 +1,58 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var puff = [ + createAnimation("PuffLoader", "0% {transform: scale(0)} 100% {transform: scale(1.0)}", "puff-1"), + createAnimation("PuffLoader", "0% {opacity: 1} 100% {opacity: 0}", "puff-2"), +]; +function PuffLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(size), height: cssValue(size) }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: cssValue(size), + width: cssValue(size), + border: "thick solid ".concat(color), + borderRadius: "50%", + opacity: "1", + top: "0", + left: "0", + animationFillMode: "both", + animation: "".concat(puff[0], ", ").concat(puff[1]), + animationDuration: "".concat(2 / speedMultiplier, "s"), + animationIterationCount: "infinite", + animationTimingFunction: "cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)", + animationDelay: i === 1 ? "-1s" : "0s", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default PuffLoader; diff --git a/frontend/node_modules/react-spinners/esm/PulseLoader.d.ts b/frontend/node_modules/react-spinners/esm/PulseLoader.d.ts new file mode 100644 index 000000000..abf34d4c5 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PulseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PulseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PulseLoader; diff --git a/frontend/node_modules/react-spinners/esm/PulseLoader.js b/frontend/node_modules/react-spinners/esm/PulseLoader.js new file mode 100644 index 000000000..9ef79c8ff --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/PulseLoader.js @@ -0,0 +1,50 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var pulse = createAnimation("PulseLoader", "0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}", "pulse"); +function PulseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: cssValue(size), + height: cssValue(size), + margin: cssValue(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(pulse, " ").concat(0.75 / speedMultiplier, "s ").concat((i * 0.12) / speedMultiplier, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +export default PulseLoader; diff --git a/frontend/node_modules/react-spinners/esm/RingLoader.d.ts b/frontend/node_modules/react-spinners/esm/RingLoader.d.ts new file mode 100644 index 000000000..ebf7a62cb --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RingLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function RingLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default RingLoader; diff --git a/frontend/node_modules/react-spinners/esm/RingLoader.js b/frontend/node_modules/react-spinners/esm/RingLoader.js new file mode 100644 index 000000000..246098743 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RingLoader.js @@ -0,0 +1,54 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { parseLengthAndUnit, cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var right = createAnimation("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(180deg) rotateY(360deg) rotateZ(360deg)}", "right"); +var left = createAnimation("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg)}", "left"); +function RingLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = parseLengthAndUnit(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", width: cssValue(size), height: cssValue(size), position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + top: "0", + left: "0", + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + border: "".concat(value / 10).concat(unit, " solid ").concat(color), + opacity: "0.4", + borderRadius: "100%", + animationFillMode: "forwards", + perspective: "800px", + animation: "".concat(i === 1 ? right : left, " ").concat(2 / speedMultiplier, "s 0s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); +} +export default RingLoader; diff --git a/frontend/node_modules/react-spinners/esm/RiseLoader.d.ts b/frontend/node_modules/react-spinners/esm/RiseLoader.d.ts new file mode 100644 index 000000000..7ed595882 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RiseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RiseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RiseLoader; diff --git a/frontend/node_modules/react-spinners/esm/RiseLoader.js b/frontend/node_modules/react-spinners/esm/RiseLoader.js new file mode 100644 index 000000000..03a72fe9e --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RiseLoader.js @@ -0,0 +1,53 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +function RiseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var even = createAnimation("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even"); + var odd = createAnimation("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd"); + var style = function (i) { + return { + backgroundColor: color, + width: cssValue(size), + height: cssValue(size), + margin: cssValue(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(i % 2 === 0 ? even : odd, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.15, 0.46, 0.9, 0.6)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +export default RiseLoader; diff --git a/frontend/node_modules/react-spinners/esm/RotateLoader.d.ts b/frontend/node_modules/react-spinners/esm/RotateLoader.d.ts new file mode 100644 index 000000000..9577c1805 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RotateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RotateLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RotateLoader; diff --git a/frontend/node_modules/react-spinners/esm/RotateLoader.js b/frontend/node_modules/react-spinners/esm/RotateLoader.js new file mode 100644 index 000000000..d7739f40e --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/RotateLoader.js @@ -0,0 +1,53 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue, parseLengthAndUnit } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var rotate = createAnimation("RotateLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "rotate"); +function RotateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = parseLengthAndUnit(margin), value = _h.value, unit = _h.unit; + var ball = { + backgroundColor: color, + width: cssValue(size), + height: cssValue(size), + borderRadius: "100%", + }; + var wrapper = __assign(__assign(__assign({}, ball), { display: "inline-block", position: "relative", animationFillMode: "both", animation: "".concat(rotate, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.7, -0.13, 0.22, 0.86)") }), cssOverride); + var style = function (i) { + var left = (i % 2 ? -1 : 1) * (26 + value); + return { + opacity: "0.8", + position: "absolute", + top: "0", + left: "".concat(left).concat(unit), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: __assign(__assign({}, ball), style(1)) }), + React.createElement("span", { style: __assign(__assign({}, ball), style(2)) }))); +} +export default RotateLoader; diff --git a/frontend/node_modules/react-spinners/esm/ScaleLoader.d.ts b/frontend/node_modules/react-spinners/esm/ScaleLoader.d.ts new file mode 100644 index 000000000..23f085479 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ScaleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function ScaleLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default ScaleLoader; diff --git a/frontend/node_modules/react-spinners/esm/ScaleLoader.js b/frontend/node_modules/react-spinners/esm/ScaleLoader.js new file mode 100644 index 000000000..33560446f --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/ScaleLoader.js @@ -0,0 +1,52 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var scale = createAnimation("ScaleLoader", "0% {transform: scaley(1.0)} 50% {transform: scaley(0.4)} 100% {transform: scaley(1.0)}", "scale"); +function ScaleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 35 : _f, _g = _a.width, width = _g === void 0 ? 4 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: cssValue(width), + height: cssValue(height), + margin: cssValue(margin), + borderRadius: cssValue(radius), + display: "inline-block", + animation: "".concat(scale, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.1, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); +} +export default ScaleLoader; diff --git a/frontend/node_modules/react-spinners/esm/SkewLoader.d.ts b/frontend/node_modules/react-spinners/esm/SkewLoader.d.ts new file mode 100644 index 000000000..98cd30f0f --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SkewLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SkewLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SkewLoader; diff --git a/frontend/node_modules/react-spinners/esm/SkewLoader.js b/frontend/node_modules/react-spinners/esm/SkewLoader.js new file mode 100644 index 000000000..1d049116a --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SkewLoader.js @@ -0,0 +1,35 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var skew = createAnimation("SkewLoader", "25% {transform: perspective(100px) rotateX(180deg) rotateY(0)} 50% {transform: perspective(100px) rotateX(180deg) rotateY(180deg)} 75% {transform: perspective(100px) rotateX(0) rotateY(180deg)} 100% {transform: perspective(100px) rotateX(0) rotateY(0)}", "skew"); +function SkewLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ width: "0", height: "0", borderLeft: "".concat(cssValue(size), " solid transparent"), borderRight: "".concat(cssValue(size), " solid transparent"), borderBottom: "".concat(cssValue(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +export default SkewLoader; diff --git a/frontend/node_modules/react-spinners/esm/SquareLoader.d.ts b/frontend/node_modules/react-spinners/esm/SquareLoader.d.ts new file mode 100644 index 000000000..2fa2e689d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SquareLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SquareLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SquareLoader; diff --git a/frontend/node_modules/react-spinners/esm/SquareLoader.js b/frontend/node_modules/react-spinners/esm/SquareLoader.js new file mode 100644 index 000000000..b021df890 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SquareLoader.js @@ -0,0 +1,35 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { cssValue } from "./helpers/unitConverter"; +import { createAnimation } from "./helpers/animation"; +var square = createAnimation("SquareLoader", "25% {transform: rotateX(180deg) rotateY(0)}\n 50% {transform: rotateX(180deg) rotateY(180deg)} \n 75% {transform: rotateX(0) rotateY(180deg)} \n 100% {transform: rotateX(0) rotateY(0)}", "square"); +function SquareLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ backgroundColor: color, width: cssValue(size), height: cssValue(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); +} +export default SquareLoader; diff --git a/frontend/node_modules/react-spinners/esm/SyncLoader.d.ts b/frontend/node_modules/react-spinners/esm/SyncLoader.d.ts new file mode 100644 index 000000000..252c84820 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SyncLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function SyncLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default SyncLoader; diff --git a/frontend/node_modules/react-spinners/esm/SyncLoader.js b/frontend/node_modules/react-spinners/esm/SyncLoader.js new file mode 100644 index 000000000..4c4b567e6 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/SyncLoader.js @@ -0,0 +1,50 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import * as React from "react"; +import { createAnimation } from "./helpers/animation"; +import { cssValue } from "./helpers/unitConverter"; +var sync = createAnimation("SyncLoader", "33% {transform: translateY(10px)}\n 66% {transform: translateY(-10px)}\n 100% {transform: translateY(0)}", "sync"); +function SyncLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: cssValue(size), + height: cssValue(size), + margin: cssValue(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(sync, " ").concat(0.6 / speedMultiplier, "s ").concat(i * 0.07, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); +} +export default SyncLoader; diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.d.ts b/frontend/node_modules/react-spinners/esm/helpers/animation.d.ts new file mode 100644 index 000000000..196a3bd20 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.d.ts @@ -0,0 +1 @@ +export declare const createAnimation: (loaderName: string, frames: string, suffix: string) => string; diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.js b/frontend/node_modules/react-spinners/esm/helpers/animation.js new file mode 100644 index 000000000..dec73c0ba --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.js @@ -0,0 +1,14 @@ +export var createAnimation = function (loaderName, frames, suffix) { + var animationName = "react-spinners-".concat(loaderName, "-").concat(suffix); + if (typeof window == "undefined" || !window.document) { + return animationName; + } + var styleEl = document.createElement("style"); + document.head.appendChild(styleEl); + var styleSheet = styleEl.sheet; + var keyFrames = "\n @keyframes ".concat(animationName, " {\n ").concat(frames, "\n }\n "); + if (styleSheet) { + styleSheet.insertRule(keyFrames, 0); + } + return animationName; +}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.d.ts b/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.d.ts new file mode 100644 index 000000000..3275561ce --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.d.ts @@ -0,0 +1,4 @@ +/** + * @jest-environment node + */ +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.js b/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.js new file mode 100644 index 000000000..611c4d125 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.server.test.js @@ -0,0 +1,10 @@ +/** + * @jest-environment node + */ +import { createAnimation } from "./animation"; +describe("animation", function () { + it("should not throw an error on server side", function () { + var name = createAnimation("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.test.d.ts b/frontend/node_modules/react-spinners/esm/helpers/animation.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/animation.test.js b/frontend/node_modules/react-spinners/esm/helpers/animation.test.js new file mode 100644 index 000000000..fc44d3077 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/animation.test.js @@ -0,0 +1,7 @@ +import { createAnimation } from "./animation"; +describe("createAnimation", function () { + it("should return name with suffix if passed in", function () { + var name = createAnimation("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/esm/helpers/colors.d.ts b/frontend/node_modules/react-spinners/esm/helpers/colors.d.ts new file mode 100644 index 000000000..e6115a944 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/colors.d.ts @@ -0,0 +1 @@ +export declare const calculateRgba: (color: string, opacity: number) => string; diff --git a/frontend/node_modules/react-spinners/esm/helpers/colors.js b/frontend/node_modules/react-spinners/esm/helpers/colors.js new file mode 100644 index 000000000..75249f28f --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/colors.js @@ -0,0 +1,38 @@ +var BasicColors; +(function (BasicColors) { + BasicColors["maroon"] = "#800000"; + BasicColors["red"] = "#FF0000"; + BasicColors["orange"] = "#FFA500"; + BasicColors["yellow"] = "#FFFF00"; + BasicColors["olive"] = "#808000"; + BasicColors["green"] = "#008000"; + BasicColors["purple"] = "#800080"; + BasicColors["fuchsia"] = "#FF00FF"; + BasicColors["lime"] = "#00FF00"; + BasicColors["teal"] = "#008080"; + BasicColors["aqua"] = "#00FFFF"; + BasicColors["blue"] = "#0000FF"; + BasicColors["navy"] = "#000080"; + BasicColors["black"] = "#000000"; + BasicColors["gray"] = "#808080"; + BasicColors["silver"] = "#C0C0C0"; + BasicColors["white"] = "#FFFFFF"; +})(BasicColors || (BasicColors = {})); +export var calculateRgba = function (color, opacity) { + if (Object.keys(BasicColors).includes(color)) { + color = BasicColors[color]; + } + if (color[0] === "#") { + color = color.slice(1); + } + if (color.length === 3) { + var res_1 = ""; + color.split("").forEach(function (c) { + res_1 += c; + res_1 += c; + }); + color = res_1; + } + var rgbValues = (color.match(/.{2}/g) || []).map(function (hex) { return parseInt(hex, 16); }).join(", "); + return "rgba(".concat(rgbValues, ", ").concat(opacity, ")"); +}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/colors.test.d.ts b/frontend/node_modules/react-spinners/esm/helpers/colors.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/colors.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/colors.test.js b/frontend/node_modules/react-spinners/esm/helpers/colors.test.js new file mode 100644 index 000000000..fa3fe2799 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/colors.test.js @@ -0,0 +1,37 @@ +import { calculateRgba } from "./colors"; +describe("calculateRgba", function () { + it("is a function", function () { + expect(typeof calculateRgba).toEqual("function"); + }); + it("converts hash values to rgb", function () { + expect(calculateRgba("#ffffff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates 3 character hash value to the correct rgba", function () { + expect(calculateRgba("#fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("returns the passed in opacity as the part of the rgba value", function () { + expect(calculateRgba("#fff", 0.5)).toEqual("rgba(255, 255, 255, 0.5)"); + }); + it("calculated the correct rgba value without the starting # passed in", function () { + expect(calculateRgba("fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates the correct rgba using basic color names", function () { + expect(calculateRgba("maroon", 0.7)).toEqual("rgba(128, 0, 0, 0.7)"); + expect(calculateRgba("red", 0.7)).toEqual("rgba(255, 0, 0, 0.7)"); + expect(calculateRgba("orange", 0.7)).toEqual("rgba(255, 165, 0, 0.7)"); + expect(calculateRgba("yellow", 0.7)).toEqual("rgba(255, 255, 0, 0.7)"); + expect(calculateRgba("olive", 0.7)).toEqual("rgba(128, 128, 0, 0.7)"); + expect(calculateRgba("green", 0.7)).toEqual("rgba(0, 128, 0, 0.7)"); + expect(calculateRgba("purple", 0.7)).toEqual("rgba(128, 0, 128, 0.7)"); + expect(calculateRgba("fuchsia", 0.7)).toEqual("rgba(255, 0, 255, 0.7)"); + expect(calculateRgba("lime", 0.7)).toEqual("rgba(0, 255, 0, 0.7)"); + expect(calculateRgba("teal", 0.7)).toEqual("rgba(0, 128, 128, 0.7)"); + expect(calculateRgba("aqua", 0.7)).toEqual("rgba(0, 255, 255, 0.7)"); + expect(calculateRgba("blue", 0.7)).toEqual("rgba(0, 0, 255, 0.7)"); + expect(calculateRgba("navy", 0.7)).toEqual("rgba(0, 0, 128, 0.7)"); + expect(calculateRgba("black", 0.7)).toEqual("rgba(0, 0, 0, 0.7)"); + expect(calculateRgba("gray", 0.7)).toEqual("rgba(128, 128, 128, 0.7)"); + expect(calculateRgba("silver", 0.7)).toEqual("rgba(192, 192, 192, 0.7)"); + expect(calculateRgba("white", 0.7)).toEqual("rgba(255, 255, 255, 0.7)"); + }); +}); diff --git a/frontend/node_modules/react-spinners/esm/helpers/props.d.ts b/frontend/node_modules/react-spinners/esm/helpers/props.d.ts new file mode 100644 index 000000000..62830656b --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/props.d.ts @@ -0,0 +1,26 @@ +import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; +export type LengthType = number | string; +interface CommonProps extends DetailedHTMLProps, HTMLSpanElement> { + color?: string; + loading?: boolean; + cssOverride?: CSSProperties; + speedMultiplier?: number; +} +export interface LoaderHeightWidthProps extends CommonProps { + height?: LengthType; + width?: LengthType; +} +export interface LoaderSizeProps extends CommonProps { + size?: LengthType; +} +export interface LoaderSizeMarginProps extends CommonProps { + size?: LengthType; + margin?: LengthType; +} +export interface LoaderHeightWidthRadiusProps extends CommonProps { + height?: LengthType; + width?: LengthType; + radius?: LengthType; + margin?: LengthType; +} +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/props.js b/frontend/node_modules/react-spinners/esm/helpers/props.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/props.js @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/unitConverter.d.ts b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.d.ts new file mode 100644 index 000000000..771955ed8 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.d.ts @@ -0,0 +1,22 @@ +interface LengthObject { + value: number; + unit: string; +} +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +export declare function parseLengthAndUnit(size: number | string): LengthObject; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +export declare function cssValue(value: number | string): string; +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/unitConverter.js b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.js new file mode 100644 index 000000000..c6a896094 --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.js @@ -0,0 +1,64 @@ +var cssUnit = { + cm: true, + mm: true, + in: true, + px: true, + pt: true, + pc: true, + em: true, + ex: true, + ch: true, + rem: true, + vw: true, + vh: true, + vmin: true, + vmax: true, + "%": true, +}; +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +export function parseLengthAndUnit(size) { + if (typeof size === "number") { + return { + value: size, + unit: "px", + }; + } + var value; + var valueString = (size.match(/^[0-9.]*/) || "").toString(); + if (valueString.includes(".")) { + value = parseFloat(valueString); + } + else { + value = parseInt(valueString, 10); + } + var unit = (size.match(/[^0-9]*$/) || "").toString(); + if (cssUnit[unit]) { + return { + value: value, + unit: unit, + }; + } + console.warn("React Spinners: ".concat(size, " is not a valid css value. Defaulting to ").concat(value, "px.")); + return { + value: value, + unit: "px", + }; +} +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +export function cssValue(value) { + var lengthWithunit = parseLengthAndUnit(value); + return "".concat(lengthWithunit.value).concat(lengthWithunit.unit); +} diff --git a/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.d.ts b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.js b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.js new file mode 100644 index 000000000..9ae92267d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/helpers/unitConverter.test.js @@ -0,0 +1,48 @@ +import { parseLengthAndUnit, cssValue } from "./unitConverter"; +describe("unitConverter", function () { + describe("parseLengthAndUnit", function () { + var spy = jest.spyOn(console, "warn").mockImplementation(); + var output = { + value: 12, + unit: "px", + }; + it("is a function", function () { + expect(typeof parseLengthAndUnit).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect(parseLengthAndUnit(12)).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid integer css unit and return an object with value and unit", function () { + expect(parseLengthAndUnit("12px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid css float unit and return an object with value and unit", function () { + var output = { + value: 12.5, + unit: "px", + }; + expect(parseLengthAndUnit("12.5px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("takes an invalid css unit and default the value to px", function () { + expect(parseLengthAndUnit("12fd")).toEqual(output); + expect(spy).toBeCalled(); + }); + }); + describe("cssValue", function () { + it("is a function", function () { + expect(typeof cssValue).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect(cssValue(12)).toEqual("12px"); + }); + it("takes a string with valid css unit as the input and return the value", function () { + expect(cssValue("12%")).toEqual("12%"); + expect(cssValue("12em")).toEqual("12em"); + }); + it("takes a string with invalid css unit as the input and default to px", function () { + expect(cssValue("12qw")).toEqual("12px"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/esm/index.d.ts b/frontend/node_modules/react-spinners/esm/index.d.ts new file mode 100644 index 000000000..478f2b91d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/index.d.ts @@ -0,0 +1,23 @@ +export { default as BarLoader } from "./BarLoader"; +export { default as BeatLoader } from "./BeatLoader"; +export { default as BounceLoader } from "./BounceLoader"; +export { default as CircleLoader } from "./CircleLoader"; +export { default as ClimbingBoxLoader } from "./ClimbingBoxLoader"; +export { default as ClipLoader } from "./ClipLoader"; +export { default as ClockLoader } from "./ClockLoader"; +export { default as DotLoader } from "./DotLoader"; +export { default as FadeLoader } from "./FadeLoader"; +export { default as GridLoader } from "./GridLoader"; +export { default as HashLoader } from "./HashLoader"; +export { default as MoonLoader } from "./MoonLoader"; +export { default as PacmanLoader } from "./PacmanLoader"; +export { default as PropagateLoader } from "./PropagateLoader"; +export { default as PulseLoader } from "./PulseLoader"; +export { default as PuffLoader } from "./PuffLoader"; +export { default as RingLoader } from "./RingLoader"; +export { default as RiseLoader } from "./RiseLoader"; +export { default as RotateLoader } from "./RotateLoader"; +export { default as ScaleLoader } from "./ScaleLoader"; +export { default as SkewLoader } from "./SkewLoader"; +export { default as SquareLoader } from "./SquareLoader"; +export { default as SyncLoader } from "./SyncLoader"; diff --git a/frontend/node_modules/react-spinners/esm/index.js b/frontend/node_modules/react-spinners/esm/index.js new file mode 100644 index 000000000..478f2b91d --- /dev/null +++ b/frontend/node_modules/react-spinners/esm/index.js @@ -0,0 +1,23 @@ +export { default as BarLoader } from "./BarLoader"; +export { default as BeatLoader } from "./BeatLoader"; +export { default as BounceLoader } from "./BounceLoader"; +export { default as CircleLoader } from "./CircleLoader"; +export { default as ClimbingBoxLoader } from "./ClimbingBoxLoader"; +export { default as ClipLoader } from "./ClipLoader"; +export { default as ClockLoader } from "./ClockLoader"; +export { default as DotLoader } from "./DotLoader"; +export { default as FadeLoader } from "./FadeLoader"; +export { default as GridLoader } from "./GridLoader"; +export { default as HashLoader } from "./HashLoader"; +export { default as MoonLoader } from "./MoonLoader"; +export { default as PacmanLoader } from "./PacmanLoader"; +export { default as PropagateLoader } from "./PropagateLoader"; +export { default as PulseLoader } from "./PulseLoader"; +export { default as PuffLoader } from "./PuffLoader"; +export { default as RingLoader } from "./RingLoader"; +export { default as RiseLoader } from "./RiseLoader"; +export { default as RotateLoader } from "./RotateLoader"; +export { default as ScaleLoader } from "./ScaleLoader"; +export { default as SkewLoader } from "./SkewLoader"; +export { default as SquareLoader } from "./SquareLoader"; +export { default as SyncLoader } from "./SyncLoader"; diff --git a/frontend/node_modules/react-spinners/helpers/animation.d.ts b/frontend/node_modules/react-spinners/helpers/animation.d.ts new file mode 100644 index 000000000..196a3bd20 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.d.ts @@ -0,0 +1 @@ +export declare const createAnimation: (loaderName: string, frames: string, suffix: string) => string; diff --git a/frontend/node_modules/react-spinners/helpers/animation.js b/frontend/node_modules/react-spinners/helpers/animation.js new file mode 100644 index 000000000..7626dfdf9 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createAnimation = void 0; +var createAnimation = function (loaderName, frames, suffix) { + var animationName = "react-spinners-".concat(loaderName, "-").concat(suffix); + if (typeof window == "undefined" || !window.document) { + return animationName; + } + var styleEl = document.createElement("style"); + document.head.appendChild(styleEl); + var styleSheet = styleEl.sheet; + var keyFrames = "\n @keyframes ".concat(animationName, " {\n ").concat(frames, "\n }\n "); + if (styleSheet) { + styleSheet.insertRule(keyFrames, 0); + } + return animationName; +}; +exports.createAnimation = createAnimation; diff --git a/frontend/node_modules/react-spinners/helpers/animation.server.test.d.ts b/frontend/node_modules/react-spinners/helpers/animation.server.test.d.ts new file mode 100644 index 000000000..3275561ce --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.server.test.d.ts @@ -0,0 +1,4 @@ +/** + * @jest-environment node + */ +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/animation.server.test.js b/frontend/node_modules/react-spinners/helpers/animation.server.test.js new file mode 100644 index 000000000..4357f5381 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.server.test.js @@ -0,0 +1,12 @@ +"use strict"; +/** + * @jest-environment node + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var animation_1 = require("./animation"); +describe("animation", function () { + it("should not throw an error on server side", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/helpers/animation.test.d.ts b/frontend/node_modules/react-spinners/helpers/animation.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/animation.test.js b/frontend/node_modules/react-spinners/helpers/animation.test.js new file mode 100644 index 000000000..e0db580f1 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/animation.test.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var animation_1 = require("./animation"); +describe("createAnimation", function () { + it("should return name with suffix if passed in", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); +}); diff --git a/frontend/node_modules/react-spinners/helpers/colors.d.ts b/frontend/node_modules/react-spinners/helpers/colors.d.ts new file mode 100644 index 000000000..e6115a944 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/colors.d.ts @@ -0,0 +1 @@ +export declare const calculateRgba: (color: string, opacity: number) => string; diff --git a/frontend/node_modules/react-spinners/helpers/colors.js b/frontend/node_modules/react-spinners/helpers/colors.js new file mode 100644 index 000000000..b5fce3b00 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/colors.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateRgba = void 0; +var BasicColors; +(function (BasicColors) { + BasicColors["maroon"] = "#800000"; + BasicColors["red"] = "#FF0000"; + BasicColors["orange"] = "#FFA500"; + BasicColors["yellow"] = "#FFFF00"; + BasicColors["olive"] = "#808000"; + BasicColors["green"] = "#008000"; + BasicColors["purple"] = "#800080"; + BasicColors["fuchsia"] = "#FF00FF"; + BasicColors["lime"] = "#00FF00"; + BasicColors["teal"] = "#008080"; + BasicColors["aqua"] = "#00FFFF"; + BasicColors["blue"] = "#0000FF"; + BasicColors["navy"] = "#000080"; + BasicColors["black"] = "#000000"; + BasicColors["gray"] = "#808080"; + BasicColors["silver"] = "#C0C0C0"; + BasicColors["white"] = "#FFFFFF"; +})(BasicColors || (BasicColors = {})); +var calculateRgba = function (color, opacity) { + if (Object.keys(BasicColors).includes(color)) { + color = BasicColors[color]; + } + if (color[0] === "#") { + color = color.slice(1); + } + if (color.length === 3) { + var res_1 = ""; + color.split("").forEach(function (c) { + res_1 += c; + res_1 += c; + }); + color = res_1; + } + var rgbValues = (color.match(/.{2}/g) || []).map(function (hex) { return parseInt(hex, 16); }).join(", "); + return "rgba(".concat(rgbValues, ", ").concat(opacity, ")"); +}; +exports.calculateRgba = calculateRgba; diff --git a/frontend/node_modules/react-spinners/helpers/colors.test.d.ts b/frontend/node_modules/react-spinners/helpers/colors.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/colors.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/colors.test.js b/frontend/node_modules/react-spinners/helpers/colors.test.js new file mode 100644 index 000000000..d29127da0 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/colors.test.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var colors_1 = require("./colors"); +describe("calculateRgba", function () { + it("is a function", function () { + expect(typeof colors_1.calculateRgba).toEqual("function"); + }); + it("converts hash values to rgb", function () { + expect((0, colors_1.calculateRgba)("#ffffff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates 3 character hash value to the correct rgba", function () { + expect((0, colors_1.calculateRgba)("#fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("returns the passed in opacity as the part of the rgba value", function () { + expect((0, colors_1.calculateRgba)("#fff", 0.5)).toEqual("rgba(255, 255, 255, 0.5)"); + }); + it("calculated the correct rgba value without the starting # passed in", function () { + expect((0, colors_1.calculateRgba)("fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates the correct rgba using basic color names", function () { + expect((0, colors_1.calculateRgba)("maroon", 0.7)).toEqual("rgba(128, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("red", 0.7)).toEqual("rgba(255, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("orange", 0.7)).toEqual("rgba(255, 165, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("yellow", 0.7)).toEqual("rgba(255, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("olive", 0.7)).toEqual("rgba(128, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("green", 0.7)).toEqual("rgba(0, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("purple", 0.7)).toEqual("rgba(128, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("fuchsia", 0.7)).toEqual("rgba(255, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("lime", 0.7)).toEqual("rgba(0, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("teal", 0.7)).toEqual("rgba(0, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("aqua", 0.7)).toEqual("rgba(0, 255, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("blue", 0.7)).toEqual("rgba(0, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("navy", 0.7)).toEqual("rgba(0, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("black", 0.7)).toEqual("rgba(0, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("gray", 0.7)).toEqual("rgba(128, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("silver", 0.7)).toEqual("rgba(192, 192, 192, 0.7)"); + expect((0, colors_1.calculateRgba)("white", 0.7)).toEqual("rgba(255, 255, 255, 0.7)"); + }); +}); diff --git a/frontend/node_modules/react-spinners/helpers/props.d.ts b/frontend/node_modules/react-spinners/helpers/props.d.ts new file mode 100644 index 000000000..62830656b --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/props.d.ts @@ -0,0 +1,26 @@ +import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; +export type LengthType = number | string; +interface CommonProps extends DetailedHTMLProps, HTMLSpanElement> { + color?: string; + loading?: boolean; + cssOverride?: CSSProperties; + speedMultiplier?: number; +} +export interface LoaderHeightWidthProps extends CommonProps { + height?: LengthType; + width?: LengthType; +} +export interface LoaderSizeProps extends CommonProps { + size?: LengthType; +} +export interface LoaderSizeMarginProps extends CommonProps { + size?: LengthType; + margin?: LengthType; +} +export interface LoaderHeightWidthRadiusProps extends CommonProps { + height?: LengthType; + width?: LengthType; + radius?: LengthType; + margin?: LengthType; +} +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/props.js b/frontend/node_modules/react-spinners/helpers/props.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/props.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/frontend/node_modules/react-spinners/helpers/unitConverter.d.ts b/frontend/node_modules/react-spinners/helpers/unitConverter.d.ts new file mode 100644 index 000000000..771955ed8 --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/unitConverter.d.ts @@ -0,0 +1,22 @@ +interface LengthObject { + value: number; + unit: string; +} +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +export declare function parseLengthAndUnit(size: number | string): LengthObject; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +export declare function cssValue(value: number | string): string; +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/unitConverter.js b/frontend/node_modules/react-spinners/helpers/unitConverter.js new file mode 100644 index 000000000..24d8ed34d --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/unitConverter.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cssValue = exports.parseLengthAndUnit = void 0; +var cssUnit = { + cm: true, + mm: true, + in: true, + px: true, + pt: true, + pc: true, + em: true, + ex: true, + ch: true, + rem: true, + vw: true, + vh: true, + vmin: true, + vmax: true, + "%": true, +}; +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +function parseLengthAndUnit(size) { + if (typeof size === "number") { + return { + value: size, + unit: "px", + }; + } + var value; + var valueString = (size.match(/^[0-9.]*/) || "").toString(); + if (valueString.includes(".")) { + value = parseFloat(valueString); + } + else { + value = parseInt(valueString, 10); + } + var unit = (size.match(/[^0-9]*$/) || "").toString(); + if (cssUnit[unit]) { + return { + value: value, + unit: unit, + }; + } + console.warn("React Spinners: ".concat(size, " is not a valid css value. Defaulting to ").concat(value, "px.")); + return { + value: value, + unit: "px", + }; +} +exports.parseLengthAndUnit = parseLengthAndUnit; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +function cssValue(value) { + var lengthWithunit = parseLengthAndUnit(value); + return "".concat(lengthWithunit.value).concat(lengthWithunit.unit); +} +exports.cssValue = cssValue; diff --git a/frontend/node_modules/react-spinners/helpers/unitConverter.test.d.ts b/frontend/node_modules/react-spinners/helpers/unitConverter.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/unitConverter.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/helpers/unitConverter.test.js b/frontend/node_modules/react-spinners/helpers/unitConverter.test.js new file mode 100644 index 000000000..3402db00b --- /dev/null +++ b/frontend/node_modules/react-spinners/helpers/unitConverter.test.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var unitConverter_1 = require("./unitConverter"); +describe("unitConverter", function () { + describe("parseLengthAndUnit", function () { + var spy = jest.spyOn(console, "warn").mockImplementation(); + var output = { + value: 12, + unit: "px", + }; + it("is a function", function () { + expect(typeof unitConverter_1.parseLengthAndUnit).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.parseLengthAndUnit)(12)).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid integer css unit and return an object with value and unit", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid css float unit and return an object with value and unit", function () { + var output = { + value: 12.5, + unit: "px", + }; + expect((0, unitConverter_1.parseLengthAndUnit)("12.5px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("takes an invalid css unit and default the value to px", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12fd")).toEqual(output); + expect(spy).toBeCalled(); + }); + }); + describe("cssValue", function () { + it("is a function", function () { + expect(typeof unitConverter_1.cssValue).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.cssValue)(12)).toEqual("12px"); + }); + it("takes a string with valid css unit as the input and return the value", function () { + expect((0, unitConverter_1.cssValue)("12%")).toEqual("12%"); + expect((0, unitConverter_1.cssValue)("12em")).toEqual("12em"); + }); + it("takes a string with invalid css unit as the input and default to px", function () { + expect((0, unitConverter_1.cssValue)("12qw")).toEqual("12px"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/index.d.ts b/frontend/node_modules/react-spinners/index.d.ts new file mode 100644 index 000000000..478f2b91d --- /dev/null +++ b/frontend/node_modules/react-spinners/index.d.ts @@ -0,0 +1,23 @@ +export { default as BarLoader } from "./BarLoader"; +export { default as BeatLoader } from "./BeatLoader"; +export { default as BounceLoader } from "./BounceLoader"; +export { default as CircleLoader } from "./CircleLoader"; +export { default as ClimbingBoxLoader } from "./ClimbingBoxLoader"; +export { default as ClipLoader } from "./ClipLoader"; +export { default as ClockLoader } from "./ClockLoader"; +export { default as DotLoader } from "./DotLoader"; +export { default as FadeLoader } from "./FadeLoader"; +export { default as GridLoader } from "./GridLoader"; +export { default as HashLoader } from "./HashLoader"; +export { default as MoonLoader } from "./MoonLoader"; +export { default as PacmanLoader } from "./PacmanLoader"; +export { default as PropagateLoader } from "./PropagateLoader"; +export { default as PulseLoader } from "./PulseLoader"; +export { default as PuffLoader } from "./PuffLoader"; +export { default as RingLoader } from "./RingLoader"; +export { default as RiseLoader } from "./RiseLoader"; +export { default as RotateLoader } from "./RotateLoader"; +export { default as ScaleLoader } from "./ScaleLoader"; +export { default as SkewLoader } from "./SkewLoader"; +export { default as SquareLoader } from "./SquareLoader"; +export { default as SyncLoader } from "./SyncLoader"; diff --git a/frontend/node_modules/react-spinners/index.js b/frontend/node_modules/react-spinners/index.js new file mode 100644 index 000000000..184a2be56 --- /dev/null +++ b/frontend/node_modules/react-spinners/index.js @@ -0,0 +1,52 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncLoader = exports.SquareLoader = exports.SkewLoader = exports.ScaleLoader = exports.RotateLoader = exports.RiseLoader = exports.RingLoader = exports.PuffLoader = exports.PulseLoader = exports.PropagateLoader = exports.PacmanLoader = exports.MoonLoader = exports.HashLoader = exports.GridLoader = exports.FadeLoader = exports.DotLoader = exports.ClockLoader = exports.ClipLoader = exports.ClimbingBoxLoader = exports.CircleLoader = exports.BounceLoader = exports.BeatLoader = exports.BarLoader = void 0; +var BarLoader_1 = require("./BarLoader"); +Object.defineProperty(exports, "BarLoader", { enumerable: true, get: function () { return __importDefault(BarLoader_1).default; } }); +var BeatLoader_1 = require("./BeatLoader"); +Object.defineProperty(exports, "BeatLoader", { enumerable: true, get: function () { return __importDefault(BeatLoader_1).default; } }); +var BounceLoader_1 = require("./BounceLoader"); +Object.defineProperty(exports, "BounceLoader", { enumerable: true, get: function () { return __importDefault(BounceLoader_1).default; } }); +var CircleLoader_1 = require("./CircleLoader"); +Object.defineProperty(exports, "CircleLoader", { enumerable: true, get: function () { return __importDefault(CircleLoader_1).default; } }); +var ClimbingBoxLoader_1 = require("./ClimbingBoxLoader"); +Object.defineProperty(exports, "ClimbingBoxLoader", { enumerable: true, get: function () { return __importDefault(ClimbingBoxLoader_1).default; } }); +var ClipLoader_1 = require("./ClipLoader"); +Object.defineProperty(exports, "ClipLoader", { enumerable: true, get: function () { return __importDefault(ClipLoader_1).default; } }); +var ClockLoader_1 = require("./ClockLoader"); +Object.defineProperty(exports, "ClockLoader", { enumerable: true, get: function () { return __importDefault(ClockLoader_1).default; } }); +var DotLoader_1 = require("./DotLoader"); +Object.defineProperty(exports, "DotLoader", { enumerable: true, get: function () { return __importDefault(DotLoader_1).default; } }); +var FadeLoader_1 = require("./FadeLoader"); +Object.defineProperty(exports, "FadeLoader", { enumerable: true, get: function () { return __importDefault(FadeLoader_1).default; } }); +var GridLoader_1 = require("./GridLoader"); +Object.defineProperty(exports, "GridLoader", { enumerable: true, get: function () { return __importDefault(GridLoader_1).default; } }); +var HashLoader_1 = require("./HashLoader"); +Object.defineProperty(exports, "HashLoader", { enumerable: true, get: function () { return __importDefault(HashLoader_1).default; } }); +var MoonLoader_1 = require("./MoonLoader"); +Object.defineProperty(exports, "MoonLoader", { enumerable: true, get: function () { return __importDefault(MoonLoader_1).default; } }); +var PacmanLoader_1 = require("./PacmanLoader"); +Object.defineProperty(exports, "PacmanLoader", { enumerable: true, get: function () { return __importDefault(PacmanLoader_1).default; } }); +var PropagateLoader_1 = require("./PropagateLoader"); +Object.defineProperty(exports, "PropagateLoader", { enumerable: true, get: function () { return __importDefault(PropagateLoader_1).default; } }); +var PulseLoader_1 = require("./PulseLoader"); +Object.defineProperty(exports, "PulseLoader", { enumerable: true, get: function () { return __importDefault(PulseLoader_1).default; } }); +var PuffLoader_1 = require("./PuffLoader"); +Object.defineProperty(exports, "PuffLoader", { enumerable: true, get: function () { return __importDefault(PuffLoader_1).default; } }); +var RingLoader_1 = require("./RingLoader"); +Object.defineProperty(exports, "RingLoader", { enumerable: true, get: function () { return __importDefault(RingLoader_1).default; } }); +var RiseLoader_1 = require("./RiseLoader"); +Object.defineProperty(exports, "RiseLoader", { enumerable: true, get: function () { return __importDefault(RiseLoader_1).default; } }); +var RotateLoader_1 = require("./RotateLoader"); +Object.defineProperty(exports, "RotateLoader", { enumerable: true, get: function () { return __importDefault(RotateLoader_1).default; } }); +var ScaleLoader_1 = require("./ScaleLoader"); +Object.defineProperty(exports, "ScaleLoader", { enumerable: true, get: function () { return __importDefault(ScaleLoader_1).default; } }); +var SkewLoader_1 = require("./SkewLoader"); +Object.defineProperty(exports, "SkewLoader", { enumerable: true, get: function () { return __importDefault(SkewLoader_1).default; } }); +var SquareLoader_1 = require("./SquareLoader"); +Object.defineProperty(exports, "SquareLoader", { enumerable: true, get: function () { return __importDefault(SquareLoader_1).default; } }); +var SyncLoader_1 = require("./SyncLoader"); +Object.defineProperty(exports, "SyncLoader", { enumerable: true, get: function () { return __importDefault(SyncLoader_1).default; } }); diff --git a/frontend/node_modules/react-spinners/package.json b/frontend/node_modules/react-spinners/package.json new file mode 100644 index 000000000..4daa6d66f --- /dev/null +++ b/frontend/node_modules/react-spinners/package.json @@ -0,0 +1,113 @@ +{ + "name": "react-spinners", + "version": "0.13.8", + "description": "A collection of react loading spinners", + "repository": { + "type": "git", + "url": "https://github.com/davidhu2000/react-spinners.git" + }, + "author": "David Hu (https://www.davidhu.io)", + "license": "MIT", + "bugs": { + "url": "https://github.com/davidhu2000/react-spinners/issues" + }, + "homepage": "https://www.davidhu.io/react-spinners/", + "contributors": [ + "Cisco Guillaume (https://github.com/GuillaumeCisco)" + ], + "keywords": [ + "react-spinners", + "react-spinner", + "react", + "reactjs", + "loader", + "loaders", + "loading", + "spinner", + "spinners", + "halogen", + "progress", + "activity" + ], + "main": "index.js", + "module": "esm/index.js", + "scripts": { + "prepare": "$npm_execpath run build:cjs & $npm_execpath run build:esm & $npm_execpath run build:umd && $npm_execpath run build", + "build": "tsc --project tsconfig.cjs.json", + "build:cjs": "tsc --project tsconfig.cjs.json --outDir cjs", + "build:esm": "tsc --project tsconfig.esm.json --outDir esm", + "build:umd": "tsc --project tsconfig.umd.json --outDir umd", + "build:demo": "npm run remove:demo; babel-node ./node_modules/.bin/webpack --config ./webpack.config.js", + "remove:demo": "rm docs/index.html; rm docs/javascripts/*", + "patch": "npm version patch && npm publish && npm run clean", + "minor": "npm version minor && npm publish && npm run clean", + "major": "npm version major && npm publish && npm run clean", + "watch": "babel-node ./node_modules/.bin/webpack --watch --config ./webpack.config.dev.js & open docs/index.html", + "clean": "rm -rf helpers/; rm -f *Loader.js; rm -f *Loader.d.ts; rm -f index.js; rm -f index.d.ts; rm -rf docs/js; rm -rf cjs; rm -rf esm; rm -rf umd", + "lint": "./node_modules/.bin/eslint src examples", + "test": "jest", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls", + "remove:tag": "npm dist-tag rm react-spinners next", + "publish:next": "npm publish --tag next && npm run clean", + "storybook": "start-storybook --docs -p 6006", + "build-storybook": "build-storybook --docs -o ./docs/storybook" + }, + "devDependencies": { + "@babel/cli": "^7.19.3", + "@babel/core": "^7.20.5", + "@babel/node": "^7.20.5", + "@babel/preset-env": "^7.20.2", + "@babel/preset-react": "^7.18.6", + "@mdx-js/react": "^2.1.5", + "@storybook/addon-actions": "^6.5.14", + "@storybook/addon-docs": "^6.5.14", + "@storybook/addon-essentials": "^6.5.14", + "@storybook/addon-google-analytics": "^6.2.9", + "@storybook/addon-interactions": "^6.5.14", + "@storybook/addon-links": "^6.5.14", + "@storybook/builder-webpack5": "^6.5.14", + "@storybook/manager-webpack5": "^6.5.14", + "@storybook/react": "^6.5.14", + "@storybook/testing-library": "^0.0.13", + "@testing-library/jest-dom": "^5.16.5", + "@testing-library/react": "^13.4.0", + "@types/jest": "^29.2.3", + "@types/react": "^18.0.26", + "@types/react-click-outside": "^3.0.3", + "@types/react-dom": "^18.0.9", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "babel-loader": "^9.1.0", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "coveralls": "^3.1.1", + "eslint": "^8.29.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-jest-dom": "^4.0.3", + "eslint-plugin-react": "^7.31.11", + "eslint-plugin-storybook": "^0.6.7", + "eslint-plugin-testing-library": "^5.9.1", + "eslint-plugin-unicorn": "^45.0.1", + "fork-ts-checker-webpack-plugin": "^7.2.13", + "html-webpack-plugin": "^5.5.0", + "jest": "^29.3.1", + "jest-environment-jsdom": "^29.3.1", + "prettier": "^2.8.0", + "react": "^18.2.0", + "react-click-outside": "^3.0.1", + "react-colorful": "^5.6.1", + "react-dom": "^18.2.0", + "react-ga4": "^1.4.1", + "storybook-dark-mode": "^1.1.2", + "ts-jest": "^29.0.3", + "ts-loader": "^9.4.2", + "typescript": "^4.9.3", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.0" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + }, + "sideEffects": false, + "packageManager": "yarn@3.3.0" +} diff --git a/frontend/node_modules/react-spinners/scripts/build-docs.sh b/frontend/node_modules/react-spinners/scripts/build-docs.sh new file mode 100644 index 000000000..9fb2ad083 --- /dev/null +++ b/frontend/node_modules/react-spinners/scripts/build-docs.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +ruby scripts/stories.rb +yarn run build-storybook --docs diff --git a/frontend/node_modules/react-spinners/scripts/mod.rb b/frontend/node_modules/react-spinners/scripts/mod.rb new file mode 100644 index 000000000..68f7fbf73 --- /dev/null +++ b/frontend/node_modules/react-spinners/scripts/mod.rb @@ -0,0 +1,79 @@ +filename = ARGV[0] + "Loader" + +path = "./src/#{filename}.tsx" +file = File.open(path) + +`rm __tests__/#{filename}-tests.tsx` +`rm __tests__/__snapshots__/#{filename}-tests.tsx.snap` + +def camelize(string) + string.split("-").map do |part, index| + return part if index == 0 + part.capitalize + end.join("") +end + +content = file.read + +puts "updating imports" +content.sub!("/** @jsxImportSource @emotion/react */", "") +content.sub!(/import .+ from "@emotion\/react";/, "") +content.sub!("\"./interfaces\"", "\"./helpers/props\"; import { createAnimation } from \"./helpers/animation\"") + +puts "updating keyframes" +content.gsub!(/keyframes`/, "createAnimation\(\"#{filename}\",`") +content.sub!("`;", "`);") + +default = content.match(/public static defaultProps = (?.+)Defaults\((?.+)\);/) + +if default[:type] == "size" + props = "size = #{default[:values]}," +elsif default[:type] == "heightWidthRadius" + values = default[:values].split(/\s*,\s*/) + props = "height = #{values[0]}, width = #{values[1]}, radius = #{values[2]}," +end + +content.sub!(/class Loader extends React.PureComponent> {/) do + ["function #{filename}({", + " loading = true,", + ' color = "#000000",', + " speedMultiplier = 1,", + " css = {},", + " #{props}", + " ...additionalprops", + "}: #{$1}): JSX.Element | null {"].join("\n") +end + +content.sub!(/public static defaultProps = .+;/, "") + +content.gsub!(/const.+this.props;/, "") + +content.sub!(/public style = \((.*)\): SerializedStyles => {\n.+$/) do + "const style = \(#{$1}\): React.CSSProperties => {" +end + +content.gsub!("return css`", "return {") +content.gsub!("`;", "};") + +content.gsub!(/public (\w+) = \(\): SerializedStyles => {\n\s+return {/) do + "const #{$1}: React.CSSProperties = {" +end +content.gsub!(/};\n\s+};/, "};") + +content.gsub!(/(.+):\s*(.+);/) do + "#{camelize($1)}: `#{$2}`," +end + +content.gsub!("css=", "style=") +content.gsub!("{this.", "{") + +content.gsub!("public render(): JSX.Element | null {", "") +content.gsub!(/}\n\s+}/, "}") + +content.gsub!("return loading ? (", "if (!loading) { return null; }\n\n return (") +content.gsub!(") : `null`,", ");") + +content.gsub!("default Loader", "default #{filename}") + +# puts content +File.write(path, content) diff --git a/frontend/node_modules/react-spinners/scripts/stories.rb b/frontend/node_modules/react-spinners/scripts/stories.rb new file mode 100644 index 000000000..e52202ab5 --- /dev/null +++ b/frontend/node_modules/react-spinners/scripts/stories.rb @@ -0,0 +1,35 @@ +paths = Dir.glob("./src/*.tsx").filter do |path| + !path.include?("stories") && !path.include?("test") +end + +template = File.open("./scripts/stories.template").read + +def get_args(content) + args = [] + + description = "Can be number or string. When number, unit is assumed as px. When string, a unit is expected to be passed in" + + ["size", "height", "width", "margin", "radius"].each do |arg| + if content.include?("#{arg} =") + args << " #{arg}: { description: \"#{description}\", control: { type: \"number\" } }," + end + end + + args.join("\n") +end + +paths.sort.each do |path| + puts "creating story for #{path}" + file = File.open(path) + loader = path.match(/\w+Loader/).to_s + + arg_types = get_args(file.read) + + story_path = path.sub(".tsx", ".stories.tsx").sub("./src", "./stories") + + story = template.gsub("LOADER_NAME", loader).gsub("ARG_TYPES", arg_types) + + File.write(story_path, story) +end + +puts "done creating stories" diff --git a/frontend/node_modules/react-spinners/scripts/stories.template b/frontend/node_modules/react-spinners/scripts/stories.template new file mode 100644 index 000000000..afd0e975a --- /dev/null +++ b/frontend/node_modules/react-spinners/scripts/stories.template @@ -0,0 +1,17 @@ +import * as React from "react"; +import { ComponentStory, ComponentMeta } from "@storybook/react"; + +import LOADER_NAME from "../src/LOADER_NAME"; + +const argTypes = { +ARG_TYPES +} + +export default { + component: LOADER_NAME, + argTypes +} as ComponentMeta; + +const Template: ComponentStory = (args) => ; + +export const Main = Template.bind({}); diff --git a/frontend/node_modules/react-spinners/tests/AllLoaders.test.tsx b/frontend/node_modules/react-spinners/tests/AllLoaders.test.tsx new file mode 100644 index 000000000..4c21f83d9 --- /dev/null +++ b/frontend/node_modules/react-spinners/tests/AllLoaders.test.tsx @@ -0,0 +1,30 @@ +import * as React from "react"; +import { render, screen } from "@testing-library/react"; +import "@testing-library/jest-dom"; + +import * as Loaders from "../src"; +import { LoaderHeightWidthRadiusProps, LoaderSizeMarginProps } from "../src/helpers/props"; + +Object.entries(Loaders).forEach((loader) => { + const name = loader[0]; + + const Loader = loader[1] as React.ComponentType; + + describe(name, () => { + it("should render nothing is loading prop is false", () => { + const { container } = render(); + expect(container.firstChild).toBeNull(); + }); + + it("should have allow style override on wrapper", () => { + const style = { overflow: "scroll" }; + const { container } = render(); + expect(container.firstChild).toHaveStyle(style); + }); + + it("should have allow custom html props", () => { + render(); + expect(screen.queryByLabelText("aria-label")).toBeTruthy(); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/tsconfig.cjs.json b/frontend/node_modules/react-spinners/tsconfig.cjs.json new file mode 100644 index 000000000..2c7b28416 --- /dev/null +++ b/frontend/node_modules/react-spinners/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs" + } +} diff --git a/frontend/node_modules/react-spinners/tsconfig.esm.json b/frontend/node_modules/react-spinners/tsconfig.esm.json new file mode 100644 index 000000000..7c02501fa --- /dev/null +++ b/frontend/node_modules/react-spinners/tsconfig.esm.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "es2015" + } +} diff --git a/frontend/node_modules/react-spinners/tsconfig.json b/frontend/node_modules/react-spinners/tsconfig.json new file mode 100644 index 000000000..6cee576f9 --- /dev/null +++ b/frontend/node_modules/react-spinners/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "sourceMap": false, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictPropertyInitialization": true, + "strictBindCallApply": true, + "module": "es2015", + "jsx": "react", + "target": "es5", + "moduleResolution": "node", + "experimentalDecorators": true, + "esModuleInterop": true, + "declaration": true, + "lib": ["dom", "es2017", "es5", "es6", "es7"], + "outDir": ".", + "strict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noImplicitReturns": true, + "skipLibCheck": true + }, + "exclude": ["docs/*", "webpack.config.*", "*.js", "tests", "examples", "src/*.test.tsx", "stories"] +} diff --git a/frontend/node_modules/react-spinners/tsconfig.umd.json b/frontend/node_modules/react-spinners/tsconfig.umd.json new file mode 100644 index 000000000..5f97025a6 --- /dev/null +++ b/frontend/node_modules/react-spinners/tsconfig.umd.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "umd" + } +} diff --git a/frontend/node_modules/react-spinners/umd/BarLoader.d.ts b/frontend/node_modules/react-spinners/umd/BarLoader.d.ts new file mode 100644 index 000000000..aefdd89cf --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BarLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthProps } from "./helpers/props"; +declare function BarLoader({ loading, color, speedMultiplier, cssOverride, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; +export default BarLoader; diff --git a/frontend/node_modules/react-spinners/umd/BarLoader.js b/frontend/node_modules/react-spinners/umd/BarLoader.js new file mode 100644 index 000000000..888f88976 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BarLoader.js @@ -0,0 +1,88 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation", "./helpers/colors"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var colors_1 = require("./helpers/colors"); + var long = (0, animation_1.createAnimation)("BarLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "long"); + var short = (0, animation_1.createAnimation)("BarLoader", "0% {left: -200%;right: 100%} 60% {left: 107%;right: -8%} 100% {left: 107%;right: -8%}", "short"); + function BarLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(width), height: (0, unitConverter_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, colors_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(height), + overflow: "hidden", + backgroundColor: color, + backgroundClip: "padding-box", + display: "block", + borderRadius: 2, + willChange: "left, right", + animationFillMode: "forwards", + animation: "".concat(i === 1 ? long : short, " ").concat(2.1 / speedMultiplier, "s ").concat(i === 2 ? "".concat(1.15 / speedMultiplier, "s") : "", " ").concat(i === 1 ? "cubic-bezier(0.65, 0.815, 0.735, 0.395)" : "cubic-bezier(0.165, 0.84, 0.44, 1)", " infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = BarLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/BeatLoader.d.ts b/frontend/node_modules/react-spinners/umd/BeatLoader.d.ts new file mode 100644 index 000000000..acd998f72 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BeatLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function BeatLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default BeatLoader; diff --git a/frontend/node_modules/react-spinners/umd/BeatLoader.js b/frontend/node_modules/react-spinners/umd/BeatLoader.js new file mode 100644 index 000000000..3188f65a2 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BeatLoader.js @@ -0,0 +1,85 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var beat = (0, animation_1.createAnimation)("BeatLoader", "50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}", "beat"); + function BeatLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + display: "inline-block", + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animation: "".concat(beat, " ").concat(0.7 / speedMultiplier, "s ").concat(i % 2 ? "0s" : "".concat(0.35 / speedMultiplier, "s"), " infinite linear"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); + } + exports.default = BeatLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/BounceLoader.d.ts b/frontend/node_modules/react-spinners/umd/BounceLoader.d.ts new file mode 100644 index 000000000..16cd11544 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BounceLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function BounceLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default BounceLoader; diff --git a/frontend/node_modules/react-spinners/umd/BounceLoader.js b/frontend/node_modules/react-spinners/umd/BounceLoader.js new file mode 100644 index 000000000..85c6a8fec --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/BounceLoader.js @@ -0,0 +1,87 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var bounce = (0, animation_1.createAnimation)("BounceLoader", "0% {transform: scale(0)} 50% {transform: scale(1.0)} 100% {transform: scale(0)}", "bounce"); + function BounceLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = function (i) { + var animationTiming = i === 1 ? "".concat(1 / speedMultiplier, "s") : "0s"; + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + backgroundColor: color, + borderRadius: "100%", + opacity: 0.6, + top: 0, + left: 0, + animationFillMode: "both", + animation: "".concat(bounce, " ").concat(2.1 / speedMultiplier, "s ").concat(animationTiming, " infinite ease-in-out"), + }; + }; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = BounceLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/CircleLoader.d.ts b/frontend/node_modules/react-spinners/umd/CircleLoader.d.ts new file mode 100644 index 000000000..12ec8925f --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/CircleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function CircleLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default CircleLoader; diff --git a/frontend/node_modules/react-spinners/umd/CircleLoader.js b/frontend/node_modules/react-spinners/umd/CircleLoader.js new file mode 100644 index 000000000..a2353ea5b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/CircleLoader.js @@ -0,0 +1,92 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var circle = (0, animation_1.createAnimation)("CircleLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "circle"); + function CircleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + height: "".concat(value * (1 - i / 10)).concat(unit), + width: "".concat(value * (1 - i / 10)).concat(unit), + borderTop: "1px solid ".concat(color), + borderBottom: "none", + borderLeft: "1px solid ".concat(color), + borderRight: "none", + borderRadius: "100%", + transition: "2s", + top: "".concat(i * 0.7 * 2.5, "%"), + left: "".concat(i * 0.35 * 2.5, "%"), + animation: "".concat(circle, " ").concat(1 / speedMultiplier, "s ").concat((i * 0.2) / speedMultiplier, "s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }))); + } + exports.default = CircleLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.d.ts b/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.d.ts new file mode 100644 index 000000000..12660b80d --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClimbingBoxLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClimbingBoxLoader; diff --git a/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.js b/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.js new file mode 100644 index 000000000..ee7ad57b2 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClimbingBoxLoader.js @@ -0,0 +1,105 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var climbingBox = (0, animation_1.createAnimation)("ClimbingBoxLoader", "0% {transform:translate(0, -1em) rotate(-45deg)}\n 5% {transform:translate(0, -1em) rotate(-50deg)}\n 20% {transform:translate(1em, -2em) rotate(47deg)}\n 25% {transform:translate(1em, -2em) rotate(45deg)}\n 30% {transform:translate(1em, -2em) rotate(40deg)}\n 45% {transform:translate(2em, -3em) rotate(137deg)}\n 50% {transform:translate(2em, -3em) rotate(135deg)}\n 55% {transform:translate(2em, -3em) rotate(130deg)}\n 70% {transform:translate(3em, -4em) rotate(217deg)}\n 75% {transform:translate(3em, -4em) rotate(220deg)}\n 100% {transform:translate(0, -1em) rotate(-225deg)}", "climbingBox"); + function ClimbingBoxLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var container = __assign({ display: "inherit", position: "relative", width: "7.1em", height: "7.1em" }, cssOverride); + var wrapper = { + position: "absolute", + top: "50%", + left: "50%", + marginTop: "-2.7em", + marginLeft: "-2.7em", + width: "5.4em", + height: "5.4em", + fontSize: (0, unitConverter_1.cssValue)(size), + }; + var style = { + position: "absolute", + left: "0", + bottom: "-0.1em", + height: "1em", + width: "1em", + backgroundColor: "transparent", + borderRadius: "15%", + border: "0.25em solid ".concat(color), + transform: "translate(0, -1em) rotate(-45deg)", + animationFillMode: "both", + animation: "".concat(climbingBox, " ").concat(2.5 / speedMultiplier, "s infinite cubic-bezier(0.79, 0, 0.47, 0.97)"), + }; + var hill = { + position: "absolute", + width: "7.1em", + height: "7.1em", + top: "1.7em", + left: "1.7em", + borderLeft: "0.25em solid ".concat(color), + transform: "rotate(45deg)", + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: container }, additionalprops), + React.createElement("span", { style: wrapper }, + React.createElement("span", { style: style }), + React.createElement("span", { style: hill })))); + } + exports.default = ClimbingBoxLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/ClipLoader.d.ts b/frontend/node_modules/react-spinners/umd/ClipLoader.d.ts new file mode 100644 index 000000000..336d685c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClipLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClipLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClipLoader; diff --git a/frontend/node_modules/react-spinners/umd/ClipLoader.js b/frontend/node_modules/react-spinners/umd/ClipLoader.js new file mode 100644 index 000000000..fd6df2ca1 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClipLoader.js @@ -0,0 +1,70 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var clip = (0, animation_1.createAnimation)("ClipLoader", "0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}", "clip"); + function ClipLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ background: "transparent !important", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); + } + exports.default = ClipLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/ClockLoader.d.ts b/frontend/node_modules/react-spinners/umd/ClockLoader.d.ts new file mode 100644 index 000000000..57785be37 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClockLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function ClockLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default ClockLoader; diff --git a/frontend/node_modules/react-spinners/umd/ClockLoader.js b/frontend/node_modules/react-spinners/umd/ClockLoader.js new file mode 100644 index 000000000..78bc53e99 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ClockLoader.js @@ -0,0 +1,93 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var rotate = (0, animation_1.createAnimation)("ClockLoader", "100% { transform: rotate(360deg) }", "rotate"); + function ClockLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat(value).concat(unit), height: "".concat(value).concat(unit), backgroundColor: "transparent", boxShadow: "inset 0px 0px 0px 2px ".concat(color), borderRadius: "50%" }, cssOverride); + var minute = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 3, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(8 / speedMultiplier, "s linear infinite"), + }; + var hour = { + position: "absolute", + backgroundColor: color, + width: "".concat(value / 2.4, "px"), + height: "2px", + top: "".concat(value / 2 - 1, "px"), + left: "".concat(value / 2 - 1, "px"), + transformOrigin: "1px 1px", + animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s linear infinite"), + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: hour }), + React.createElement("span", { style: minute }))); + } + exports.default = ClockLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/DotLoader.d.ts b/frontend/node_modules/react-spinners/umd/DotLoader.d.ts new file mode 100644 index 000000000..f3cd003ad --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/DotLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function DotLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default DotLoader; diff --git a/frontend/node_modules/react-spinners/umd/DotLoader.js b/frontend/node_modules/react-spinners/umd/DotLoader.js new file mode 100644 index 000000000..c79a8e593 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/DotLoader.js @@ -0,0 +1,87 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var rotate = (0, animation_1.createAnimation)("DotLoader", "100% {transform: rotate(360deg)}", "rotate"); + var bounce = (0, animation_1.createAnimation)("DotLoader", "0%, 100% {transform: scale(0)} 50% {transform: scale(1.0)}", "bounce"); + function DotLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), animationFillMode: "forwards", animation: "".concat(rotate, " ").concat(2 / speedMultiplier, "s 0s infinite linear") }, cssOverride); + var style = function (i) { + var _a = (0, unitConverter_1.parseLengthAndUnit)(size), value = _a.value, unit = _a.unit; + return { + position: "absolute", + top: i % 2 ? "0" : "auto", + bottom: i % 2 ? "auto" : "0", + height: "".concat(value / 2).concat(unit), + width: "".concat(value / 2).concat(unit), + backgroundColor: color, + borderRadius: "100%", + animationFillMode: "forwards", + animation: "".concat(bounce, " ").concat(2 / speedMultiplier, "s ").concat(i === 2 ? "1s" : "0s", " infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = DotLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/FadeLoader.d.ts b/frontend/node_modules/react-spinners/umd/FadeLoader.d.ts new file mode 100644 index 000000000..98053e8e4 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/FadeLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function FadeLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default FadeLoader; diff --git a/frontend/node_modules/react-spinners/umd/FadeLoader.js b/frontend/node_modules/react-spinners/umd/FadeLoader.js new file mode 100644 index 000000000..80221ef58 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/FadeLoader.js @@ -0,0 +1,102 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var fade = (0, animation_1.createAnimation)("FadeLoader", "50% {opacity: 0.3} 100% {opacity: 1}", "fade"); + function FadeLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 15 : _f, _g = _a.width, width = _g === void 0 ? 5 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var value = (0, unitConverter_1.parseLengthAndUnit)(margin).value; + var radiusValue = value + 18; + var quarter = radiusValue / 2 + radiusValue / 5.5; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: "0", top: radiusValue, left: radiusValue, width: "".concat(radiusValue * 3, "px"), height: "".concat(radiusValue * 3, "px") }, cssOverride); + var style = function (i) { + return { + position: "absolute", + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + backgroundColor: color, + borderRadius: (0, unitConverter_1.cssValue)(radius), + transition: "2s", + animationFillMode: "both", + animation: "".concat(fade, " ").concat(1.2 / speedMultiplier, "s ").concat(i * 0.12, "s infinite ease-in-out"), + }; + }; + var a = __assign(__assign({}, style(1)), { top: "".concat(radiusValue, "px"), left: "0" }); + var b = __assign(__assign({}, style(2)), { top: "".concat(quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(-45deg)" }); + var c = __assign(__assign({}, style(3)), { top: "0", left: "".concat(radiusValue, "px"), transform: "rotate(90deg)" }); + var d = __assign(__assign({}, style(4)), { top: "".concat(-1 * quarter, "px"), left: "".concat(quarter, "px"), transform: "rotate(45deg)" }); + var e = __assign(__assign({}, style(5)), { top: "".concat(-1 * radiusValue, "px"), left: "0" }); + var f = __assign(__assign({}, style(6)), { top: "".concat(-1 * quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(-45deg)" }); + var g = __assign(__assign({}, style(7)), { top: "0", left: "".concat(-1 * radiusValue, "px"), transform: "rotate(90deg)" }); + var h = __assign(__assign({}, style(8)), { top: "".concat(quarter, "px"), left: "".concat(-1 * quarter, "px"), transform: "rotate(45deg)" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: a }), + React.createElement("span", { style: b }), + React.createElement("span", { style: c }), + React.createElement("span", { style: d }), + React.createElement("span", { style: e }), + React.createElement("span", { style: f }), + React.createElement("span", { style: g }), + React.createElement("span", { style: h }))); + } + exports.default = FadeLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/GridLoader.d.ts b/frontend/node_modules/react-spinners/umd/GridLoader.d.ts new file mode 100644 index 000000000..06fa46b8c --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/GridLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function GridLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default GridLoader; diff --git a/frontend/node_modules/react-spinners/umd/GridLoader.js b/frontend/node_modules/react-spinners/umd/GridLoader.js new file mode 100644 index 000000000..3ad7c184d --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/GridLoader.js @@ -0,0 +1,99 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var grid = (0, animation_1.createAnimation)("GridLoader", "0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}", "grid"); + var random = function (top) { return Math.random() * top; }; + function GridLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var sizeWithUnit = (0, unitConverter_1.parseLengthAndUnit)(size); + var marginWithUnit = (0, unitConverter_1.parseLengthAndUnit)(margin); + var width = parseFloat(sizeWithUnit.value.toString()) * 3 + parseFloat(marginWithUnit.value.toString()) * 6; + var wrapper = __assign({ width: "".concat(width).concat(sizeWithUnit.unit), fontSize: 0, display: "inline-block" }, cssOverride); + var style = function (rand) { + return { + display: "inline-block", + backgroundColor: color, + width: "".concat((0, unitConverter_1.cssValue)(size)), + height: "".concat((0, unitConverter_1.cssValue)(size)), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + animationFillMode: "both", + animation: "".concat(grid, " ").concat((rand / 100 + 0.6) / speedMultiplier, "s ").concat(rand / 100 - 0.2, "s infinite ease"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops, { ref: function (node) { + if (node) { + node.style.setProperty("width", "".concat(width).concat(sizeWithUnit.unit), "important"); + } + } }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }), + React.createElement("span", { style: style(random(100)) }))); + } + exports.default = GridLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/HashLoader.d.ts b/frontend/node_modules/react-spinners/umd/HashLoader.d.ts new file mode 100644 index 000000000..ca1763ff3 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/HashLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function HashLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default HashLoader; diff --git a/frontend/node_modules/react-spinners/umd/HashLoader.js b/frontend/node_modules/react-spinners/umd/HashLoader.js new file mode 100644 index 000000000..73a698dc1 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/HashLoader.js @@ -0,0 +1,93 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/colors", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var colors_1 = require("./helpers/colors"); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + function HashLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), transform: "rotate(165deg)" }, cssOverride); + var thickness = value / 5; + var lat = (value - thickness) / 2; + var offset = lat - thickness; + var colorValue = (0, colors_1.calculateRgba)(color, 0.75); + var before = (0, animation_1.createAnimation)("HashLoader", "0% {width: ".concat(thickness, "px; box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 35% {width: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: 0 ").concat(-offset, "px ").concat(colorValue, ", 0 ").concat(offset, "px ").concat(colorValue, "}\n 70% {width: ").concat(thickness, "px; box-shadow: ").concat(-lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(lat, "px ").concat(offset, "px ").concat(colorValue, "}\n 100% {box-shadow: ").concat(lat, "px ").concat(-offset, "px ").concat(colorValue, ", ").concat(-lat, "px ").concat(offset, "px ").concat(colorValue, "}"), "before"); + var after = (0, animation_1.createAnimation)("HashLoader", "0% {height: ".concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}\n 35% {height: ").concat((0, unitConverter_1.cssValue)(size), "; box-shadow: ").concat(offset, "px 0 ").concat(color, ", ").concat(-offset, "px 0 ").concat(color, "}\n 70% {height: ").concat(thickness, "px; box-shadow: ").concat(offset, "px ").concat(-lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(lat, "px ").concat(color, "}\n 100% {box-shadow: ").concat(offset, "px ").concat(lat, "px ").concat(color, ", ").concat(-offset, "px ").concat(-lat, "px ").concat(color, "}"), "after"); + var style = function (i) { + return { + position: "absolute", + top: "50%", + left: "50%", + display: "block", + width: "".concat(value / 5).concat(unit), + height: "".concat(value / 5).concat(unit), + borderRadius: "".concat(value / 10).concat(unit), + transform: "translate(-50%, -50%)", + animationFillMode: "none", + animation: "".concat(i === 1 ? before : after, " ").concat(2 / speedMultiplier, "s infinite"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = HashLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/MoonLoader.d.ts b/frontend/node_modules/react-spinners/umd/MoonLoader.d.ts new file mode 100644 index 000000000..2cf77a2c2 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/MoonLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function MoonLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default MoonLoader; diff --git a/frontend/node_modules/react-spinners/umd/MoonLoader.js b/frontend/node_modules/react-spinners/umd/MoonLoader.js new file mode 100644 index 000000000..cd7e52661 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/MoonLoader.js @@ -0,0 +1,83 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var moon = (0, animation_1.createAnimation)("MoonLoader", "100% {transform: rotate(360deg)}", "moon"); + function MoonLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var moonSize = value / 7; + var wrapper = __assign({ display: "inherit", position: "relative", width: "".concat("".concat(value + moonSize * 2).concat(unit)), height: "".concat("".concat(value + moonSize * 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }, cssOverride); + var ballStyle = function (size) { + return { + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + }; + var ball = __assign(__assign({}, ballStyle(moonSize)), { backgroundColor: "".concat(color), opacity: "0.8", position: "absolute", top: "".concat("".concat(value / 2 - moonSize / 2).concat(unit)), animation: "".concat(moon, " ").concat(0.6 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "forwards" }); + var circle = __assign(__assign({}, ballStyle(value)), { border: "".concat(moonSize, "px solid ").concat(color), opacity: "0.1", boxSizing: "content-box", position: "absolute" }); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: ball }), + React.createElement("span", { style: circle }))); + } + exports.default = MoonLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/PacmanLoader.d.ts b/frontend/node_modules/react-spinners/umd/PacmanLoader.d.ts new file mode 100644 index 000000000..e8ad135e3 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PacmanLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PacmanLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PacmanLoader; diff --git a/frontend/node_modules/react-spinners/umd/PacmanLoader.js b/frontend/node_modules/react-spinners/umd/PacmanLoader.js new file mode 100644 index 000000000..01e76c87f --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PacmanLoader.js @@ -0,0 +1,114 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var pacman = [ + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(-44deg)}", "pacman-1"), + (0, animation_1.createAnimation)("PacmanLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(44deg)}", "pacman-2"), + ]; + function PacmanLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 25 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(size), value = _h.value, unit = _h.unit; + var wrapper = __assign({ display: "inherit", position: "relative", fontSize: 0, height: "".concat(value * 2).concat(unit), width: "".concat(value * 2).concat(unit) }, cssOverride); + var ball = (0, animation_1.createAnimation)("PacmanLoader", "75% {opacity: 0.7}\n 100% {transform: translate(".concat("".concat(-4 * value).concat(unit), ", ").concat("".concat(-value / 4).concat(unit), ")}"), "ball"); + var ballStyle = function (i) { + return { + width: "".concat(value / 3).concat(unit), + height: "".concat(value / 3).concat(unit), + backgroundColor: color, + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + transform: "translate(0, ".concat("".concat(-value / 4).concat(unit), ")"), + position: "absolute", + top: "".concat(value).concat(unit), + left: "".concat(value * 4).concat(unit), + animation: "".concat(ball, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.25, "s infinite linear"), + animationFillMode: "both", + }; + }; + var s1 = "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"); + var s2 = "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color); + var pacmanStyle = function (i) { + return { + width: 0, + height: 0, + borderRight: s1, + borderTop: i === 0 ? s1 : s2, + borderLeft: s2, + borderBottom: i === 0 ? s2 : s1, + borderRadius: (0, unitConverter_1.cssValue)(size), + position: "absolute", + animation: "".concat(pacman[i], " ").concat(0.8 / speedMultiplier, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + var pac = pacmanStyle(0); + var man = pacmanStyle(1); + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: pac }), + React.createElement("span", { style: man }), + React.createElement("span", { style: ballStyle(2) }), + React.createElement("span", { style: ballStyle(3) }), + React.createElement("span", { style: ballStyle(4) }), + React.createElement("span", { style: ballStyle(5) }))); + } + exports.default = PacmanLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/PropagateLoader.d.ts b/frontend/node_modules/react-spinners/umd/PropagateLoader.d.ts new file mode 100644 index 000000000..ff39bb03e --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PropagateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PropagateLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PropagateLoader; diff --git a/frontend/node_modules/react-spinners/umd/PropagateLoader.js b/frontend/node_modules/react-spinners/umd/PropagateLoader.js new file mode 100644 index 000000000..982aea349 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PropagateLoader.js @@ -0,0 +1,98 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + // 1.5 4.5 7.5 + var distance = [1, 3, 5]; + var propagate = [ + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-0"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(-").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-1"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(-".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(-").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-2"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 75% {transform: translateX(").concat(distance[0], "rem) scale(0.75)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-3"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-4"), + (0, animation_1.createAnimation)("PropagateLoader", "25% {transform: translateX(".concat(distance[0], "rem) scale(0.75)}\n 50% {transform: translateX(").concat(distance[1], "rem) scale(0.6)}\n 75% {transform: translateX(").concat(distance[2], "rem) scale(0.5)}\n 95% {transform: translateX(0rem) scale(1)}"), "propogate-5"), + ]; + function PropagateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + fontSize: "".concat(value / 3).concat(unit), + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + background: color, + borderRadius: "50%", + animation: "".concat(propagate[i], " ").concat(1.5 / speedMultiplier, "s infinite"), + animationFillMode: "forwards", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(0) }), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); + } + exports.default = PropagateLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/PuffLoader.d.ts b/frontend/node_modules/react-spinners/umd/PuffLoader.d.ts new file mode 100644 index 000000000..e6ae1d0c8 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PuffLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function PuffLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default PuffLoader; diff --git a/frontend/node_modules/react-spinners/umd/PuffLoader.js b/frontend/node_modules/react-spinners/umd/PuffLoader.js new file mode 100644 index 000000000..9395e2f11 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PuffLoader.js @@ -0,0 +1,93 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var puff = [ + (0, animation_1.createAnimation)("PuffLoader", "0% {transform: scale(0)} 100% {transform: scale(1.0)}", "puff-1"), + (0, animation_1.createAnimation)("PuffLoader", "0% {opacity: 1} 100% {opacity: 0}", "puff-2"), + ]; + function PuffLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var wrapper = __assign({ display: "inherit", position: "relative", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size) }, cssOverride); + var style = function (i) { + return { + position: "absolute", + height: (0, unitConverter_1.cssValue)(size), + width: (0, unitConverter_1.cssValue)(size), + border: "thick solid ".concat(color), + borderRadius: "50%", + opacity: "1", + top: "0", + left: "0", + animationFillMode: "both", + animation: "".concat(puff[0], ", ").concat(puff[1]), + animationDuration: "".concat(2 / speedMultiplier, "s"), + animationIterationCount: "infinite", + animationTimingFunction: "cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)", + animationDelay: i === 1 ? "-1s" : "0s", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = PuffLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/PulseLoader.d.ts b/frontend/node_modules/react-spinners/umd/PulseLoader.d.ts new file mode 100644 index 000000000..abf34d4c5 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PulseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function PulseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default PulseLoader; diff --git a/frontend/node_modules/react-spinners/umd/PulseLoader.js b/frontend/node_modules/react-spinners/umd/PulseLoader.js new file mode 100644 index 000000000..7f83d0424 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/PulseLoader.js @@ -0,0 +1,85 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var pulse = (0, animation_1.createAnimation)("PulseLoader", "0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}", "pulse"); + function PulseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(pulse, " ").concat(0.75 / speedMultiplier, "s ").concat((i * 0.12) / speedMultiplier, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); + } + exports.default = PulseLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/RingLoader.d.ts b/frontend/node_modules/react-spinners/umd/RingLoader.d.ts new file mode 100644 index 000000000..ebf7a62cb --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RingLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function RingLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default RingLoader; diff --git a/frontend/node_modules/react-spinners/umd/RingLoader.js b/frontend/node_modules/react-spinners/umd/RingLoader.js new file mode 100644 index 000000000..6acaa9829 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RingLoader.js @@ -0,0 +1,89 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var right = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(180deg) rotateY(360deg) rotateZ(360deg)}", "right"); + var left = (0, animation_1.createAnimation)("RingLoader", "0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg)}", "left"); + function RingLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var _g = (0, unitConverter_1.parseLengthAndUnit)(size), value = _g.value, unit = _g.unit; + var wrapper = __assign({ display: "inherit", width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), position: "relative" }, cssOverride); + var style = function (i) { + return { + position: "absolute", + top: "0", + left: "0", + width: "".concat(value).concat(unit), + height: "".concat(value).concat(unit), + border: "".concat(value / 10).concat(unit, " solid ").concat(color), + opacity: "0.4", + borderRadius: "100%", + animationFillMode: "forwards", + perspective: "800px", + animation: "".concat(i === 1 ? right : left, " ").concat(2 / speedMultiplier, "s 0s infinite linear"), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }))); + } + exports.default = RingLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/RiseLoader.d.ts b/frontend/node_modules/react-spinners/umd/RiseLoader.d.ts new file mode 100644 index 000000000..7ed595882 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RiseLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RiseLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RiseLoader; diff --git a/frontend/node_modules/react-spinners/umd/RiseLoader.js b/frontend/node_modules/react-spinners/umd/RiseLoader.js new file mode 100644 index 000000000..498a9af84 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RiseLoader.js @@ -0,0 +1,88 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + function RiseLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var even = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(1.1)}\n 25% {transform: translateY(-".concat(size, "px)}\n 50% {transform: scale(0.4)}\n 75% {transform: translateY(").concat(size, "px)}\n 100% {transform: translateY(0) scale(1.0)}"), "even"); + var odd = (0, animation_1.createAnimation)("RiseLoader", "0% {transform: scale(0.4)}\n 25% {transform: translateY(".concat(size, "px)}\n 50% {transform: scale(1.1)}\n 75% {transform: translateY(").concat(-size, "px)}\n 100% {transform: translateY(0) scale(0.75)}"), "odd"); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(i % 2 === 0 ? even : odd, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.15, 0.46, 0.9, 0.6)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); + } + exports.default = RiseLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/RotateLoader.d.ts b/frontend/node_modules/react-spinners/umd/RotateLoader.d.ts new file mode 100644 index 000000000..9577c1805 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RotateLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function RotateLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default RotateLoader; diff --git a/frontend/node_modules/react-spinners/umd/RotateLoader.js b/frontend/node_modules/react-spinners/umd/RotateLoader.js new file mode 100644 index 000000000..c95b200e6 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/RotateLoader.js @@ -0,0 +1,88 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var rotate = (0, animation_1.createAnimation)("RotateLoader", "0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}", "rotate"); + function RotateLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var _h = (0, unitConverter_1.parseLengthAndUnit)(margin), value = _h.value, unit = _h.unit; + var ball = { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + borderRadius: "100%", + }; + var wrapper = __assign(__assign(__assign({}, ball), { display: "inline-block", position: "relative", animationFillMode: "both", animation: "".concat(rotate, " ").concat(1 / speedMultiplier, "s 0s infinite cubic-bezier(0.7, -0.13, 0.22, 0.86)") }), cssOverride); + var style = function (i) { + var left = (i % 2 ? -1 : 1) * (26 + value); + return { + opacity: "0.8", + position: "absolute", + top: "0", + left: "".concat(left).concat(unit), + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: __assign(__assign({}, ball), style(1)) }), + React.createElement("span", { style: __assign(__assign({}, ball), style(2)) }))); + } + exports.default = RotateLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/ScaleLoader.d.ts b/frontend/node_modules/react-spinners/umd/ScaleLoader.d.ts new file mode 100644 index 000000000..23f085479 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ScaleLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderHeightWidthRadiusProps } from "./helpers/props"; +declare function ScaleLoader({ loading, color, speedMultiplier, cssOverride, height, width, radius, margin, ...additionalprops }: LoaderHeightWidthRadiusProps): JSX.Element | null; +export default ScaleLoader; diff --git a/frontend/node_modules/react-spinners/umd/ScaleLoader.js b/frontend/node_modules/react-spinners/umd/ScaleLoader.js new file mode 100644 index 000000000..877bf53f6 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/ScaleLoader.js @@ -0,0 +1,87 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var scale = (0, animation_1.createAnimation)("ScaleLoader", "0% {transform: scaley(1.0)} 50% {transform: scaley(0.4)} 100% {transform: scaley(1.0)}", "scale"); + function ScaleLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 35 : _f, _g = _a.width, width = _g === void 0 ? 4 : _g, _h = _a.radius, radius = _h === void 0 ? 2 : _h, _j = _a.margin, margin = _j === void 0 ? 2 : _j, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "height", "width", "radius", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(width), + height: (0, unitConverter_1.cssValue)(height), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: (0, unitConverter_1.cssValue)(radius), + display: "inline-block", + animation: "".concat(scale, " ").concat(1 / speedMultiplier, "s ").concat(i * 0.1, "s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }), + React.createElement("span", { style: style(4) }), + React.createElement("span", { style: style(5) }))); + } + exports.default = ScaleLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/SkewLoader.d.ts b/frontend/node_modules/react-spinners/umd/SkewLoader.d.ts new file mode 100644 index 000000000..98cd30f0f --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SkewLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SkewLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SkewLoader; diff --git a/frontend/node_modules/react-spinners/umd/SkewLoader.js b/frontend/node_modules/react-spinners/umd/SkewLoader.js new file mode 100644 index 000000000..90ad43753 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SkewLoader.js @@ -0,0 +1,70 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var skew = (0, animation_1.createAnimation)("SkewLoader", "25% {transform: perspective(100px) rotateX(180deg) rotateY(0)} 50% {transform: perspective(100px) rotateX(180deg) rotateY(180deg)} 75% {transform: perspective(100px) rotateX(0) rotateY(180deg)} 100% {transform: perspective(100px) rotateX(0) rotateY(0)}", "skew"); + function SkewLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 20 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ width: "0", height: "0", borderLeft: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderRight: "".concat((0, unitConverter_1.cssValue)(size), " solid transparent"), borderBottom: "".concat((0, unitConverter_1.cssValue)(size), " solid ").concat(color), display: "inline-block", animation: "".concat(skew, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); + } + exports.default = SkewLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/SquareLoader.d.ts b/frontend/node_modules/react-spinners/umd/SquareLoader.d.ts new file mode 100644 index 000000000..2fa2e689d --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SquareLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeProps } from "./helpers/props"; +declare function SquareLoader({ loading, color, speedMultiplier, cssOverride, size, ...additionalprops }: LoaderSizeProps): JSX.Element | null; +export default SquareLoader; diff --git a/frontend/node_modules/react-spinners/umd/SquareLoader.js b/frontend/node_modules/react-spinners/umd/SquareLoader.js new file mode 100644 index 000000000..75154107d --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SquareLoader.js @@ -0,0 +1,70 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/unitConverter", "./helpers/animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var unitConverter_1 = require("./helpers/unitConverter"); + var animation_1 = require("./helpers/animation"); + var square = (0, animation_1.createAnimation)("SquareLoader", "25% {transform: rotateX(180deg) rotateY(0)}\n 50% {transform: rotateX(180deg) rotateY(180deg)} \n 75% {transform: rotateX(0) rotateY(180deg)} \n 100% {transform: rotateX(0) rotateY(0)}", "square"); + function SquareLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 50 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]); + var style = __assign({ backgroundColor: color, width: (0, unitConverter_1.cssValue)(size), height: (0, unitConverter_1.cssValue)(size), display: "inline-block", animation: "".concat(square, " ").concat(3 / speedMultiplier, "s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"), animationFillMode: "both" }, cssOverride); + if (!loading) { + return null; + } + return React.createElement("span", __assign({ style: style }, additionalprops)); + } + exports.default = SquareLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/SyncLoader.d.ts b/frontend/node_modules/react-spinners/umd/SyncLoader.d.ts new file mode 100644 index 000000000..252c84820 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SyncLoader.d.ts @@ -0,0 +1,4 @@ +/// +import { LoaderSizeMarginProps } from "./helpers/props"; +declare function SyncLoader({ loading, color, speedMultiplier, cssOverride, size, margin, ...additionalprops }: LoaderSizeMarginProps): JSX.Element | null; +export default SyncLoader; diff --git a/frontend/node_modules/react-spinners/umd/SyncLoader.js b/frontend/node_modules/react-spinners/umd/SyncLoader.js new file mode 100644 index 000000000..787ae8290 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/SyncLoader.js @@ -0,0 +1,85 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "react", "./helpers/animation", "./helpers/unitConverter"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var React = __importStar(require("react")); + var animation_1 = require("./helpers/animation"); + var unitConverter_1 = require("./helpers/unitConverter"); + var sync = (0, animation_1.createAnimation)("SyncLoader", "33% {transform: translateY(10px)}\n 66% {transform: translateY(-10px)}\n 100% {transform: translateY(0)}", "sync"); + function SyncLoader(_a) { + var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 15 : _f, _g = _a.margin, margin = _g === void 0 ? 2 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size", "margin"]); + var wrapper = __assign({ display: "inherit" }, cssOverride); + var style = function (i) { + return { + backgroundColor: color, + width: (0, unitConverter_1.cssValue)(size), + height: (0, unitConverter_1.cssValue)(size), + margin: (0, unitConverter_1.cssValue)(margin), + borderRadius: "100%", + display: "inline-block", + animation: "".concat(sync, " ").concat(0.6 / speedMultiplier, "s ").concat(i * 0.07, "s infinite ease-in-out"), + animationFillMode: "both", + }; + }; + if (!loading) { + return null; + } + return (React.createElement("span", __assign({ style: wrapper }, additionalprops), + React.createElement("span", { style: style(1) }), + React.createElement("span", { style: style(2) }), + React.createElement("span", { style: style(3) }))); + } + exports.default = SyncLoader; +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.d.ts b/frontend/node_modules/react-spinners/umd/helpers/animation.d.ts new file mode 100644 index 000000000..196a3bd20 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.d.ts @@ -0,0 +1 @@ +export declare const createAnimation: (loaderName: string, frames: string, suffix: string) => string; diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.js b/frontend/node_modules/react-spinners/umd/helpers/animation.js new file mode 100644 index 000000000..d253185ff --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.js @@ -0,0 +1,28 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createAnimation = void 0; + var createAnimation = function (loaderName, frames, suffix) { + var animationName = "react-spinners-".concat(loaderName, "-").concat(suffix); + if (typeof window == "undefined" || !window.document) { + return animationName; + } + var styleEl = document.createElement("style"); + document.head.appendChild(styleEl); + var styleSheet = styleEl.sheet; + var keyFrames = "\n @keyframes ".concat(animationName, " {\n ").concat(frames, "\n }\n "); + if (styleSheet) { + styleSheet.insertRule(keyFrames, 0); + } + return animationName; + }; + exports.createAnimation = createAnimation; +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.d.ts b/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.d.ts new file mode 100644 index 000000000..3275561ce --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.d.ts @@ -0,0 +1,4 @@ +/** + * @jest-environment node + */ +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.js b/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.js new file mode 100644 index 000000000..7d5595256 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.server.test.js @@ -0,0 +1,22 @@ +/** + * @jest-environment node + */ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var animation_1 = require("./animation"); + describe("animation", function () { + it("should not throw an error on server side", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.test.d.ts b/frontend/node_modules/react-spinners/umd/helpers/animation.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/animation.test.js b/frontend/node_modules/react-spinners/umd/helpers/animation.test.js new file mode 100644 index 000000000..57b9cef85 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/animation.test.js @@ -0,0 +1,19 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./animation"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var animation_1 = require("./animation"); + describe("createAnimation", function () { + it("should return name with suffix if passed in", function () { + var name = (0, animation_1.createAnimation)("TestLoader", "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix"); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/colors.d.ts b/frontend/node_modules/react-spinners/umd/helpers/colors.d.ts new file mode 100644 index 000000000..e6115a944 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/colors.d.ts @@ -0,0 +1 @@ +export declare const calculateRgba: (color: string, opacity: number) => string; diff --git a/frontend/node_modules/react-spinners/umd/helpers/colors.js b/frontend/node_modules/react-spinners/umd/helpers/colors.js new file mode 100644 index 000000000..56fd4e20a --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/colors.js @@ -0,0 +1,52 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.calculateRgba = void 0; + var BasicColors; + (function (BasicColors) { + BasicColors["maroon"] = "#800000"; + BasicColors["red"] = "#FF0000"; + BasicColors["orange"] = "#FFA500"; + BasicColors["yellow"] = "#FFFF00"; + BasicColors["olive"] = "#808000"; + BasicColors["green"] = "#008000"; + BasicColors["purple"] = "#800080"; + BasicColors["fuchsia"] = "#FF00FF"; + BasicColors["lime"] = "#00FF00"; + BasicColors["teal"] = "#008080"; + BasicColors["aqua"] = "#00FFFF"; + BasicColors["blue"] = "#0000FF"; + BasicColors["navy"] = "#000080"; + BasicColors["black"] = "#000000"; + BasicColors["gray"] = "#808080"; + BasicColors["silver"] = "#C0C0C0"; + BasicColors["white"] = "#FFFFFF"; + })(BasicColors || (BasicColors = {})); + var calculateRgba = function (color, opacity) { + if (Object.keys(BasicColors).includes(color)) { + color = BasicColors[color]; + } + if (color[0] === "#") { + color = color.slice(1); + } + if (color.length === 3) { + var res_1 = ""; + color.split("").forEach(function (c) { + res_1 += c; + res_1 += c; + }); + color = res_1; + } + var rgbValues = (color.match(/.{2}/g) || []).map(function (hex) { return parseInt(hex, 16); }).join(", "); + return "rgba(".concat(rgbValues, ", ").concat(opacity, ")"); + }; + exports.calculateRgba = calculateRgba; +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/colors.test.d.ts b/frontend/node_modules/react-spinners/umd/helpers/colors.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/colors.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/colors.test.js b/frontend/node_modules/react-spinners/umd/helpers/colors.test.js new file mode 100644 index 000000000..629cbe070 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/colors.test.js @@ -0,0 +1,49 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./colors"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var colors_1 = require("./colors"); + describe("calculateRgba", function () { + it("is a function", function () { + expect(typeof colors_1.calculateRgba).toEqual("function"); + }); + it("converts hash values to rgb", function () { + expect((0, colors_1.calculateRgba)("#ffffff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates 3 character hash value to the correct rgba", function () { + expect((0, colors_1.calculateRgba)("#fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("returns the passed in opacity as the part of the rgba value", function () { + expect((0, colors_1.calculateRgba)("#fff", 0.5)).toEqual("rgba(255, 255, 255, 0.5)"); + }); + it("calculated the correct rgba value without the starting # passed in", function () { + expect((0, colors_1.calculateRgba)("fff", 1)).toEqual("rgba(255, 255, 255, 1)"); + }); + it("calculates the correct rgba using basic color names", function () { + expect((0, colors_1.calculateRgba)("maroon", 0.7)).toEqual("rgba(128, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("red", 0.7)).toEqual("rgba(255, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("orange", 0.7)).toEqual("rgba(255, 165, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("yellow", 0.7)).toEqual("rgba(255, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("olive", 0.7)).toEqual("rgba(128, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("green", 0.7)).toEqual("rgba(0, 128, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("purple", 0.7)).toEqual("rgba(128, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("fuchsia", 0.7)).toEqual("rgba(255, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("lime", 0.7)).toEqual("rgba(0, 255, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("teal", 0.7)).toEqual("rgba(0, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("aqua", 0.7)).toEqual("rgba(0, 255, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("blue", 0.7)).toEqual("rgba(0, 0, 255, 0.7)"); + expect((0, colors_1.calculateRgba)("navy", 0.7)).toEqual("rgba(0, 0, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("black", 0.7)).toEqual("rgba(0, 0, 0, 0.7)"); + expect((0, colors_1.calculateRgba)("gray", 0.7)).toEqual("rgba(128, 128, 128, 0.7)"); + expect((0, colors_1.calculateRgba)("silver", 0.7)).toEqual("rgba(192, 192, 192, 0.7)"); + expect((0, colors_1.calculateRgba)("white", 0.7)).toEqual("rgba(255, 255, 255, 0.7)"); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/props.d.ts b/frontend/node_modules/react-spinners/umd/helpers/props.d.ts new file mode 100644 index 000000000..62830656b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/props.d.ts @@ -0,0 +1,26 @@ +import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; +export type LengthType = number | string; +interface CommonProps extends DetailedHTMLProps, HTMLSpanElement> { + color?: string; + loading?: boolean; + cssOverride?: CSSProperties; + speedMultiplier?: number; +} +export interface LoaderHeightWidthProps extends CommonProps { + height?: LengthType; + width?: LengthType; +} +export interface LoaderSizeProps extends CommonProps { + size?: LengthType; +} +export interface LoaderSizeMarginProps extends CommonProps { + size?: LengthType; + margin?: LengthType; +} +export interface LoaderHeightWidthRadiusProps extends CommonProps { + height?: LengthType; + width?: LengthType; + radius?: LengthType; + margin?: LengthType; +} +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/props.js b/frontend/node_modules/react-spinners/umd/helpers/props.js new file mode 100644 index 000000000..273e12fe0 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/props.js @@ -0,0 +1,12 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/unitConverter.d.ts b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.d.ts new file mode 100644 index 000000000..771955ed8 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.d.ts @@ -0,0 +1,22 @@ +interface LengthObject { + value: number; + unit: string; +} +/** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ +export declare function parseLengthAndUnit(size: number | string): LengthObject; +/** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ +export declare function cssValue(value: number | string): string; +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/unitConverter.js b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.js new file mode 100644 index 000000000..075d7b52b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.js @@ -0,0 +1,79 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.cssValue = exports.parseLengthAndUnit = void 0; + var cssUnit = { + cm: true, + mm: true, + in: true, + px: true, + pt: true, + pc: true, + em: true, + ex: true, + ch: true, + rem: true, + vw: true, + vh: true, + vmin: true, + vmax: true, + "%": true, + }; + /** + * If size is a number, append px to the value as default unit. + * If size is a string, validate against list of valid units. + * If unit is valid, return size as is. + * If unit is invalid, console warn issue, replace with px as the unit. + * + * @param {(number | string)} size + * @return {LengthObject} LengthObject + */ + function parseLengthAndUnit(size) { + if (typeof size === "number") { + return { + value: size, + unit: "px", + }; + } + var value; + var valueString = (size.match(/^[0-9.]*/) || "").toString(); + if (valueString.includes(".")) { + value = parseFloat(valueString); + } + else { + value = parseInt(valueString, 10); + } + var unit = (size.match(/[^0-9]*$/) || "").toString(); + if (cssUnit[unit]) { + return { + value: value, + unit: unit, + }; + } + console.warn("React Spinners: ".concat(size, " is not a valid css value. Defaulting to ").concat(value, "px.")); + return { + value: value, + unit: "px", + }; + } + exports.parseLengthAndUnit = parseLengthAndUnit; + /** + * Take value as an input and return valid css value + * + * @param {(number | string)} value + * @return {string} valid css value + */ + function cssValue(value) { + var lengthWithunit = parseLengthAndUnit(value); + return "".concat(lengthWithunit.value).concat(lengthWithunit.unit); + } + exports.cssValue = cssValue; +}); diff --git a/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.d.ts b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.js b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.js new file mode 100644 index 000000000..763ac0152 --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/helpers/unitConverter.test.js @@ -0,0 +1,60 @@ +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./unitConverter"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var unitConverter_1 = require("./unitConverter"); + describe("unitConverter", function () { + describe("parseLengthAndUnit", function () { + var spy = jest.spyOn(console, "warn").mockImplementation(); + var output = { + value: 12, + unit: "px", + }; + it("is a function", function () { + expect(typeof unitConverter_1.parseLengthAndUnit).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.parseLengthAndUnit)(12)).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid integer css unit and return an object with value and unit", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("take a string with valid css float unit and return an object with value and unit", function () { + var output = { + value: 12.5, + unit: "px", + }; + expect((0, unitConverter_1.parseLengthAndUnit)("12.5px")).toEqual(output); + expect(spy).not.toBeCalled(); + }); + it("takes an invalid css unit and default the value to px", function () { + expect((0, unitConverter_1.parseLengthAndUnit)("12fd")).toEqual(output); + expect(spy).toBeCalled(); + }); + }); + describe("cssValue", function () { + it("is a function", function () { + expect(typeof unitConverter_1.cssValue).toEqual("function"); + }); + it("takes a number as the input and append px to the value", function () { + expect((0, unitConverter_1.cssValue)(12)).toEqual("12px"); + }); + it("takes a string with valid css unit as the input and return the value", function () { + expect((0, unitConverter_1.cssValue)("12%")).toEqual("12%"); + expect((0, unitConverter_1.cssValue)("12em")).toEqual("12em"); + }); + it("takes a string with invalid css unit as the input and default to px", function () { + expect((0, unitConverter_1.cssValue)("12qw")).toEqual("12px"); + }); + }); + }); +}); diff --git a/frontend/node_modules/react-spinners/umd/index.d.ts b/frontend/node_modules/react-spinners/umd/index.d.ts new file mode 100644 index 000000000..478f2b91d --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/index.d.ts @@ -0,0 +1,23 @@ +export { default as BarLoader } from "./BarLoader"; +export { default as BeatLoader } from "./BeatLoader"; +export { default as BounceLoader } from "./BounceLoader"; +export { default as CircleLoader } from "./CircleLoader"; +export { default as ClimbingBoxLoader } from "./ClimbingBoxLoader"; +export { default as ClipLoader } from "./ClipLoader"; +export { default as ClockLoader } from "./ClockLoader"; +export { default as DotLoader } from "./DotLoader"; +export { default as FadeLoader } from "./FadeLoader"; +export { default as GridLoader } from "./GridLoader"; +export { default as HashLoader } from "./HashLoader"; +export { default as MoonLoader } from "./MoonLoader"; +export { default as PacmanLoader } from "./PacmanLoader"; +export { default as PropagateLoader } from "./PropagateLoader"; +export { default as PulseLoader } from "./PulseLoader"; +export { default as PuffLoader } from "./PuffLoader"; +export { default as RingLoader } from "./RingLoader"; +export { default as RiseLoader } from "./RiseLoader"; +export { default as RotateLoader } from "./RotateLoader"; +export { default as ScaleLoader } from "./ScaleLoader"; +export { default as SkewLoader } from "./SkewLoader"; +export { default as SquareLoader } from "./SquareLoader"; +export { default as SyncLoader } from "./SyncLoader"; diff --git a/frontend/node_modules/react-spinners/umd/index.js b/frontend/node_modules/react-spinners/umd/index.js new file mode 100644 index 000000000..05feabbeb --- /dev/null +++ b/frontend/node_modules/react-spinners/umd/index.js @@ -0,0 +1,62 @@ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./BarLoader", "./BeatLoader", "./BounceLoader", "./CircleLoader", "./ClimbingBoxLoader", "./ClipLoader", "./ClockLoader", "./DotLoader", "./FadeLoader", "./GridLoader", "./HashLoader", "./MoonLoader", "./PacmanLoader", "./PropagateLoader", "./PulseLoader", "./PuffLoader", "./RingLoader", "./RiseLoader", "./RotateLoader", "./ScaleLoader", "./SkewLoader", "./SquareLoader", "./SyncLoader"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SyncLoader = exports.SquareLoader = exports.SkewLoader = exports.ScaleLoader = exports.RotateLoader = exports.RiseLoader = exports.RingLoader = exports.PuffLoader = exports.PulseLoader = exports.PropagateLoader = exports.PacmanLoader = exports.MoonLoader = exports.HashLoader = exports.GridLoader = exports.FadeLoader = exports.DotLoader = exports.ClockLoader = exports.ClipLoader = exports.ClimbingBoxLoader = exports.CircleLoader = exports.BounceLoader = exports.BeatLoader = exports.BarLoader = void 0; + var BarLoader_1 = require("./BarLoader"); + Object.defineProperty(exports, "BarLoader", { enumerable: true, get: function () { return __importDefault(BarLoader_1).default; } }); + var BeatLoader_1 = require("./BeatLoader"); + Object.defineProperty(exports, "BeatLoader", { enumerable: true, get: function () { return __importDefault(BeatLoader_1).default; } }); + var BounceLoader_1 = require("./BounceLoader"); + Object.defineProperty(exports, "BounceLoader", { enumerable: true, get: function () { return __importDefault(BounceLoader_1).default; } }); + var CircleLoader_1 = require("./CircleLoader"); + Object.defineProperty(exports, "CircleLoader", { enumerable: true, get: function () { return __importDefault(CircleLoader_1).default; } }); + var ClimbingBoxLoader_1 = require("./ClimbingBoxLoader"); + Object.defineProperty(exports, "ClimbingBoxLoader", { enumerable: true, get: function () { return __importDefault(ClimbingBoxLoader_1).default; } }); + var ClipLoader_1 = require("./ClipLoader"); + Object.defineProperty(exports, "ClipLoader", { enumerable: true, get: function () { return __importDefault(ClipLoader_1).default; } }); + var ClockLoader_1 = require("./ClockLoader"); + Object.defineProperty(exports, "ClockLoader", { enumerable: true, get: function () { return __importDefault(ClockLoader_1).default; } }); + var DotLoader_1 = require("./DotLoader"); + Object.defineProperty(exports, "DotLoader", { enumerable: true, get: function () { return __importDefault(DotLoader_1).default; } }); + var FadeLoader_1 = require("./FadeLoader"); + Object.defineProperty(exports, "FadeLoader", { enumerable: true, get: function () { return __importDefault(FadeLoader_1).default; } }); + var GridLoader_1 = require("./GridLoader"); + Object.defineProperty(exports, "GridLoader", { enumerable: true, get: function () { return __importDefault(GridLoader_1).default; } }); + var HashLoader_1 = require("./HashLoader"); + Object.defineProperty(exports, "HashLoader", { enumerable: true, get: function () { return __importDefault(HashLoader_1).default; } }); + var MoonLoader_1 = require("./MoonLoader"); + Object.defineProperty(exports, "MoonLoader", { enumerable: true, get: function () { return __importDefault(MoonLoader_1).default; } }); + var PacmanLoader_1 = require("./PacmanLoader"); + Object.defineProperty(exports, "PacmanLoader", { enumerable: true, get: function () { return __importDefault(PacmanLoader_1).default; } }); + var PropagateLoader_1 = require("./PropagateLoader"); + Object.defineProperty(exports, "PropagateLoader", { enumerable: true, get: function () { return __importDefault(PropagateLoader_1).default; } }); + var PulseLoader_1 = require("./PulseLoader"); + Object.defineProperty(exports, "PulseLoader", { enumerable: true, get: function () { return __importDefault(PulseLoader_1).default; } }); + var PuffLoader_1 = require("./PuffLoader"); + Object.defineProperty(exports, "PuffLoader", { enumerable: true, get: function () { return __importDefault(PuffLoader_1).default; } }); + var RingLoader_1 = require("./RingLoader"); + Object.defineProperty(exports, "RingLoader", { enumerable: true, get: function () { return __importDefault(RingLoader_1).default; } }); + var RiseLoader_1 = require("./RiseLoader"); + Object.defineProperty(exports, "RiseLoader", { enumerable: true, get: function () { return __importDefault(RiseLoader_1).default; } }); + var RotateLoader_1 = require("./RotateLoader"); + Object.defineProperty(exports, "RotateLoader", { enumerable: true, get: function () { return __importDefault(RotateLoader_1).default; } }); + var ScaleLoader_1 = require("./ScaleLoader"); + Object.defineProperty(exports, "ScaleLoader", { enumerable: true, get: function () { return __importDefault(ScaleLoader_1).default; } }); + var SkewLoader_1 = require("./SkewLoader"); + Object.defineProperty(exports, "SkewLoader", { enumerable: true, get: function () { return __importDefault(SkewLoader_1).default; } }); + var SquareLoader_1 = require("./SquareLoader"); + Object.defineProperty(exports, "SquareLoader", { enumerable: true, get: function () { return __importDefault(SquareLoader_1).default; } }); + var SyncLoader_1 = require("./SyncLoader"); + Object.defineProperty(exports, "SyncLoader", { enumerable: true, get: function () { return __importDefault(SyncLoader_1).default; } }); +}); diff --git a/frontend/package.json b/frontend/package.json index e00eb5221..b86461cec 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,6 +23,7 @@ "react-dom": "^18.2.0", "react-resizable": "^3.0.5", "react-scripts": "5.0.1", + "react-spinners": "^0.13.8", "react-split-pane": "^0.1.92", "react-treebeard": "^3.2.4", "typescript": "^5.2.2", diff --git a/frontend/src/App.js b/frontend/src/App.js index 38a7d51e8..3a3bb031d 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,19 +1,71 @@ // App.js -import React, { useState } from 'react'; +import React, { useMemo, useState, useEffect } from 'react'; +import { useUnload } from './components/comms_manager/useUnload'; import { Resizable } from 'react-resizable'; import HeaderMenu from './components/header_menu/HeaderMenu'; import FileBrowser from './components/file_browser/FileBrowser'; import FileEditor from './components/file_editor/FileEditor'; import './App.css'; import DiagramEditor from './components/diagram_editor/DiagramEditor'; +import VncViewer from './components/vnc_viewer/VncViewer' +import CommsManager from './components/comms_manager/CommsManager'; const App = () => { - const [editorWidth, setEditorWidth] = useState(700); + const [editorWidth, setEditorWidth] = useState(807); const [currentFilename, setCurrentFilename] = useState(''); - const [currentProjectname, setCurrentProjectname] = useState(''); + const [currentProjectname, setCurrentProjectname] = useState('visual_follow_person'); const [modelJson, setModelJson] = useState(''); const [projectChanges, setProjectChanges] = useState(false); + const [gazeboEnabled, setGazeboEnabled] = useState(false); + const [manager, setManager] = useState(null); + + var universe_config = { + "name": "follow_person_ros2", + "launch_file_path": "/opt/jderobot/Launchers/follow_person.launch.py", + "ros_version": "ROS2", + "visualization": "gazebo_rae", + "world": "gazebo", + "template": "RoboticsAcademy/exercises/static/exercises/follow_person_newmanager/python_template/", + "exercise_id": "follow_person_newmanager" + } + + useEffect(() => { + const newManager = CommsManager("ws://127.0.0.1:7163"); + setManager(newManager); + }, []); + + useUnload(() => { + manager.disconnect(); + }); + + const connectWithRetry = () => { + console.log("The manager is up!"); + manager.connect() + .then(() => { + console.log("Connected!"); + manager.launchWorld(universe_config) + .then(() => { + console.log("World launched!") + manager.prepareVisualization(universe_config.visualization) + .then(() => { + console.log("Viz ready!") + setGazeboEnabled(true); + }) + }) + }) + .catch((e) => { + // Connection failed, try again after a delay + console.log("Connection failed, trying again!") + setTimeout(connectWithRetry, 1000); + }); + } + + useEffect(() => { + if (manager) { + connectWithRetry(); + } + }, [manager]); // Re-run if the manager instance changes const onResize = (key, size) => { switch (key) { @@ -63,11 +115,16 @@ const App = () => {
-
+
+
diff --git a/frontend/src/components/comms_manager/CommsManager.js b/frontend/src/components/comms_manager/CommsManager.js new file mode 100644 index 000000000..42d5add6a --- /dev/null +++ b/frontend/src/components/comms_manager/CommsManager.js @@ -0,0 +1,166 @@ +import { v4 as uuidv4 } from "uuid"; + +const CommsManager = (address) => { + + //region Observer pattern methods + // TODO: Maybe move to it's own class? + const observers = {}; + + const subscribe = (events, callback) => { + if (typeof events === "string") { + events = [events]; + } + for (let i = 0, length = events.length; i < length; i++) { + observers[events[i]] = observers[events[i]] || []; + observers[events[i]].push(callback); + } + }; + + const unsubscribe = (events, callback) => { + if (typeof events === "string") { + events = [events]; + } + for (let i = 0, length = events.length; i < length; i++) { + observers[events[i]] = observers[events[i]] || []; + observers[events[i]].splice(observers[events[i]].indexOf(callback)); + } + }; + + const unsuscribeAll = () => { + for (const event in observers) { + observers[event].length = 0; + } + }; + + const subscribeOnce = (event, callback) => { + subscribe(event, (response) => { + callback(response); + unsubscribe(event, callback); + }); + }; + + const dispatch = (message) => { + const subscriptions = observers[message.command] || []; + let length = subscriptions.length; + while (length--) { + subscriptions[length](message); + } + }; + //endregion + + //region Websocket handling, connect, send, receive + let websocket = null; + + const connect = () => { + return new Promise((resolve, reject) => { + websocket = new WebSocket(address); + + websocket.onopen = () => { + console.log(`Connection with ${address} opened`); + send("connect") + .then(() => { + resolve(); + }) + .catch(() => { + reject(); + }); + }; + + websocket.onclose = (e) => { + // TODO: Rethink what to do when connection is interrupted, + // maybe try to reconnect and not clear the suscribers? + //unsuscribeAll(); + if (e.wasClean) { + console.log( + `Connection with ${address} closed, all suscribers cleared` + ); + } else { + console.log(`Connection with ${address} interrupted`); + } + }; + + websocket.onerror = (e) => { + console.log(`Error received from websocket: ${e.type}`); + reject(); + }; + + websocket.onmessage = (e) => { + const message = JSON.parse(e.data); + dispatch(message); + }; + }); + }; + + const send = (message, data) => { + + // Sending messages to remote manager + return new Promise((resolve, reject) => { + const id = uuidv4(); + + if (!websocket) { + console.log("websocket problem"); + reject({ + id: "", + command: "error", + data: { + message: "Websocket not connected", + }, + }); + } + + subscribeOnce(["ack", "error"], (response) => { + if (id === response.id) { + if (response.command === "ack") { + resolve(response); + } else { + reject(response); + } + } + }); + + const msg = JSON.stringify({ + id: id, + command: message, + data: data, + }); + websocket.send(msg); + }); + }; + //endregion + + // Events and commands + const events = { + RESPONSES: ["ack", "error"], + UPDATE: "update", + STATE_CHANGED: "state-changed", + INTROSPECTION: "introspection", + }; + + const commands = { + connect: connect, + launchWorld: (configuration) => send("launch_world", configuration), + prepareVisualization: (visualization) => send("prepare_visualization", visualization), + run: (code) => send("run_application", code), + stop: () => send("stop"), + pause: () => send("pause"), + resume: () => send("resume"), + reset: () => send("reset"), + terminate_application: () => send("terminate_application"), + terminate_visualization: () => send("terminate_visualization"), + terminate_universe: () => send("terminate_universe"), + disconnect: () => send("disconnect"), + }; + + return { + ...commands, + + events: events, + send: send, + + subscribe: subscribe, + unsubscribe: unsubscribe, + suscribreOnce: subscribeOnce, + }; +}; + +export default CommsManager; diff --git a/frontend/src/components/comms_manager/useUnload.js b/frontend/src/components/comms_manager/useUnload.js new file mode 100644 index 000000000..d9f082ffb --- /dev/null +++ b/frontend/src/components/comms_manager/useUnload.js @@ -0,0 +1,13 @@ +import { useEffect, useRef } from "react"; + +export const useUnload = (fn) => { + const cb = useRef(fn); + + useEffect(() => { + const onUnload = cb.current; + window.addEventListener("beforeunload", onUnload); + return () => { + window.removeEventListener("beforeunload", onUnload); + }; + }, [cb]); +}; diff --git a/frontend/src/components/diagram_editor/DiagramEditor.css b/frontend/src/components/diagram_editor/DiagramEditor.css index 504a1ac7d..e8a28dfc2 100644 --- a/frontend/src/components/diagram_editor/DiagramEditor.css +++ b/frontend/src/components/diagram_editor/DiagramEditor.css @@ -1,5 +1,5 @@ .canvas { - height: 80vh; + height: 40vh; width: 100%; background-color: #e0e0d1; } diff --git a/frontend/src/components/diagram_editor/DiagramEditor.tsx b/frontend/src/components/diagram_editor/DiagramEditor.tsx index a52fd9c50..b78625771 100644 --- a/frontend/src/components/diagram_editor/DiagramEditor.tsx +++ b/frontend/src/components/diagram_editor/DiagramEditor.tsx @@ -28,9 +28,10 @@ import { InputPortModel } from './nodes/basic_node/ports/input_port/InputPortMod import { TagInputPortModel } from './nodes/tag_node/ports/input_port/TagInputPortModel'; import { TagOutputPortModel } from './nodes/tag_node/ports/output_port/TagOutputPortModel'; -const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges} : {currentProjectname : any, setModelJson : any, setProjectChanges:any}) => { +const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges, gazeboEnabled, manager} : {currentProjectname : any, setModelJson : any, setProjectChanges:any, gazeboEnabled:any, manager:any}) => { const [graphJson, setGraphJson] = useState(null); + const [appRunning, setAppRunning] = useState(false); // Initial node position let lastMovedNodePosition = { x: 200, y: 200 }; @@ -143,7 +144,6 @@ const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges} : { console.log("Adding default ports"); var nodeName = node.getName(); - console.log(nodeName); if (nodeName == "RetryUntilSuccessful") node.addInputPort("num_attempts"); else if (nodeName == "Repeat") node.addInputPort("num_cycles"); else if (nodeName == "Delay") node.addInputPort("delay_ms"); @@ -334,6 +334,7 @@ const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges} : { return response.blob(); }) .then((blob) => { + // Get the application const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.style.display = 'none'; @@ -348,6 +349,65 @@ const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges} : { }); } }; + + const runApp = () => { + if(gazeboEnabled) + { + if(!appRunning) + { + const tree_graph = JSON.stringify(model.serialize()); + fetch("/tree_api/get_simplified_app/", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ app_name: currentProjectname, content: tree_graph }), + }) + .then((response) => { + if (!response.ok) { + return response.json().then((data) => { + throw new Error(data.message || "An error occurred."); + }); + } + return response.blob(); + }) + .then((blob) => { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = function() { + var base64data = reader.result; + console.log(base64data); + + // Send the zip + manager + .run({type: "bt-studio", code: base64data}) + .then(() => { + console.log("App running!"); + setAppRunning(true); + }) + .catch((response:any) => { + let linterMessage = JSON.stringify(response.data.message).split("\\n"); + alert(`Received linter message: ${linterMessage}`); + }); + } + }) + .catch((error) => { + console.error("Error:", error); + }); + } + else { + manager + .terminate_application() + .then(() => { + console.log("App terminated!"); + setAppRunning(false); + }) + } + } + else { + console.log("Gazebo is not up!"); + } + } return (
@@ -357,6 +417,7 @@ const DiagramEditor = ({currentProjectname, setModelJson, setProjectChanges} : { onAddInputPort={addInputPort} onAddOutputPort={addOutputPort} onGenerateApp={generateApp} + onRunApp={runApp} currentProjectname={currentProjectname} /> diff --git a/frontend/src/components/diagram_editor/NodeHeader.js b/frontend/src/components/diagram_editor/NodeHeader.js index dec0539c2..547e02dec 100644 --- a/frontend/src/components/diagram_editor/NodeHeader.js +++ b/frontend/src/components/diagram_editor/NodeHeader.js @@ -11,8 +11,10 @@ import del_img from './img/del_node.svg' import add_input_img from './img/add_input.svg' import add_output_img from './img/add_output.svg' import download_img from './img/download.svg' +import run_img from './img/run.svg' -const NodeHeader = ({ onNodeTypeSelected, onDeleteNode, onAddInputPort, onAddOutputPort, onGenerateApp, currentProjectname }) => { +const NodeHeader = ({ onNodeTypeSelected, onDeleteNode, + onAddInputPort, onAddOutputPort, onGenerateApp, onRunApp, currentProjectname }) => { const [anchorEl, setAnchorEl] = useState(null); const [menuLabel, setMenuLabel] = useState(""); @@ -122,6 +124,9 @@ const NodeHeader = ({ onNodeTypeSelected, onDeleteNode, onAddInputPort, onAddOut +
diff --git a/frontend/src/components/diagram_editor/img/run.svg b/frontend/src/components/diagram_editor/img/run.svg new file mode 100644 index 000000000..bad5918f1 --- /dev/null +++ b/frontend/src/components/diagram_editor/img/run.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/components/diagram_editor/img/stop.svg b/frontend/src/components/diagram_editor/img/stop.svg new file mode 100644 index 000000000..2786bd227 --- /dev/null +++ b/frontend/src/components/diagram_editor/img/stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/components/vnc_viewer/VncViewer.css b/frontend/src/components/vnc_viewer/VncViewer.css new file mode 100644 index 000000000..e2bddeaab --- /dev/null +++ b/frontend/src/components/vnc_viewer/VncViewer.css @@ -0,0 +1,11 @@ +.viewer { + height: 40vh; + width: 100%; +} + +.loader { + display: flex; + align-items: center; + justify-content: center; + height: 40vh; +} \ No newline at end of file diff --git a/frontend/src/components/vnc_viewer/VncViewer.js b/frontend/src/components/vnc_viewer/VncViewer.js new file mode 100644 index 000000000..f335bed3d --- /dev/null +++ b/frontend/src/components/vnc_viewer/VncViewer.js @@ -0,0 +1,28 @@ +import './VncViewer.css'; +import BounceLoader from "react-spinners/BounceLoader"; + +const VncViewer = ({gazeboEnabled}) => { + + return ( +
+ {gazeboEnabled ? ( +