utopia-ui 3.0.34 → 3.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { DomEvent, divIcon, Point, control, marker, LatLng, LatLngBounds } from 'leaflet';
3
+ import { useMap, useMapEvents, TileLayer, GeoJSON, MapContainer, Popup, Marker, Tooltip } from 'react-leaflet';
2
4
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
3
5
  import { createContext, useContext, useState, useCallback, useReducer, useEffect, createRef, useRef, memo, Children, isValidElement, cloneElement, forwardRef } from 'react';
4
6
  import { useNavigate, useLocation, BrowserRouter, Link, Outlet, NavLink } from 'react-router-dom';
5
7
  import { toast, ToastContainer } from 'react-toastify';
6
- import { DomEvent, divIcon, Point, control, marker, LatLng, LatLngBounds } from 'leaflet';
7
- import { useMap, useMapEvents, MapContainer, TileLayer, GeoJSON, Popup, Marker, Tooltip } from 'react-leaflet';
8
8
  import 'leaflet/dist/leaflet.css';
9
9
  import MarkerClusterGroup from 'react-leaflet-cluster';
10
10
  import axios from 'axios';
@@ -1394,9 +1394,14 @@ var Wrappers = function (_a) {
1394
1394
  return (jsx(PermissionsProvider, __assign({ initialPermissions: [] }, { children: jsx(TagsProvider, __assign({ initialTags: [] }, { children: jsx(LayersProvider, __assign({ initialLayers: [] }, { children: jsx(FilterProvider, __assign({ initialTags: [] }, { children: jsx(ItemsProvider, __assign({ initialItems: [] }, { children: jsx(SelectPositionProvider, { children: jsx(LeafletRefsProvider, __assign({ initialLeafletRefs: {} }, { children: jsx(QueryClientProvider, __assign({ client: queryClient }, { children: jsx(AppStateProvider, { children: jsx(ClusterRefProvider, { children: jsxs(QuestsProvider, __assign({ initialOpen: true }, { children: [jsx(ToastContainer, { position: 'top-right', autoClose: 2000, hideProgressBar: true, newestOnTop: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: 'light' }), children] })) }) }) })) })) }) })) })) })) })) })));
1395
1395
  };
1396
1396
 
1397
- var css_248z$1 = ".leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%; \n }\n \n input {\n box-sizing: border-box;\n }\n \n textarea {\n box-sizing: border-box;\n }\n \n .leaflet-control-attribution {\n display: none;\n }\n \n .leaflet-control-locate {\n display: none;\n }\n\n .leaflet-data-marker {\n \n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n }\n \n .crosshair-cursor-enabled {\n cursor: crosshair;\n }\n \n .leaflet-container {\n cursor: inherit;\n }\n \n .calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n }\n \n .user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n }\n\n .fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n .music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n \n .compass-icon {\n position: relative;\n top: -36.5px;\n left: 4px;\n width: 24px;\n }\n\n .group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n }\n\n .liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n \n .network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n \n .leaflet-popup-scrolled {\n overflow-x: hidden;\n }\n\n .leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n\n }\n\n .leaflet-tooltip {\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n border-width: 0px;\n border-radius: 1em;\n transition: opacity 500ms;\n transition-delay: 50ms;\n }\n\n .leaflet-tooltip-top::before {\n border-top-color: var(--fallback-b1,oklch(var(--b1)/1));\n }\n\n .marker-cluster span {\n color: #000;\n }";
1397
+ var css_248z$1 = ".leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%; \n }\n \n input {\n box-sizing: border-box;\n }\n \n textarea {\n box-sizing: border-box;\n }\n \n .leaflet-control-attribution {\n display: none;\n }\n \n .leaflet-control-locate {\n display: none;\n }\n\n .leaflet-data-marker {\n \n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n }\n \n .crosshair-cursor-enabled {\n cursor: crosshair;\n }\n \n .leaflet-container {\n cursor: inherit;\n }\n \n .calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n }\n \n .user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n }\n\n .fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n }\n\n .tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n .music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n }\n\n \n .compass-icon {\n position: relative;\n top: -36.5px;\n left: 4px;\n width: 24px;\n }\n\n .group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n }\n\n .liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n \n .network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n }\n\n .shop-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .plant-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n }\n\n .circle-dot-icon {\n position: relative;\n top: -36px;\n left: 4px;\n width: 24px;\n }\n \n .leaflet-popup-scrolled {\n overflow-x: hidden;\n }\n\n .leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n\n }\n\n .leaflet-tooltip {\n background-color: var(--fallback-b1,oklch(var(--b1)/1));\n color: var(--fallback-bc,oklch(var(--bc)/1));\n border-width: 0px;\n border-radius: 1em;\n transition: opacity 500ms;\n transition-delay: 50ms;\n }\n\n .leaflet-tooltip-top::before {\n border-top-color: var(--fallback-b1,oklch(var(--b1)/1));\n }\n\n .marker-cluster span {\n color: #000;\n }";
1398
1398
  styleInject(css_248z$1);
1399
1399
 
1400
+ function containsUUID(str) {
1401
+ var uuidRegex = /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i;
1402
+ return uuidRegex.test(str);
1403
+ }
1404
+
1400
1405
  function AddButton(_a) {
1401
1406
  var triggerAction = _a.triggerAction;
1402
1407
  var layers = useLayers();
@@ -1781,6 +1786,14 @@ var addIcon = function (icon) {
1781
1786
  return '<svg class="flower-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 256 256" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M210.35,129.36c-.81-.47-1.7-.92-2.62-1.36.92-.44,1.81-.89,2.62-1.36a40,40,0,1,0-40-69.28c-.81.47-1.65,1-2.48,1.59.08-1,.13-2,.13-3a40,40,0,0,0-80,0c0,.94,0,1.94.13,3-.83-.57-1.67-1.12-2.48-1.59a40,40,0,1,0-40,69.28c.81.47,1.7.92,2.62,1.36-.92.44-1.81.89-2.62,1.36a40,40,0,1,0,40,69.28c.81-.47,1.65-1,2.48-1.59-.08,1-.13,2-.13,2.95a40,40,0,0,0,80,0c0-.94-.05-1.94-.13-2.95.83.57,1.67,1.12,2.48,1.59A39.79,39.79,0,0,0,190.29,204a40.43,40.43,0,0,0,10.42-1.38,40,40,0,0,0,9.64-73.28ZM104,128a24,24,0,1,1,24,24A24,24,0,0,1,104,128Zm74.35-56.79a24,24,0,1,1,24,41.57c-6.27,3.63-18.61,6.13-35.16,7.19A40,40,0,0,0,154.53,98.1C163.73,84.28,172.08,74.84,178.35,71.21ZM128,32a24,24,0,0,1,24,24c0,7.24-4,19.19-11.36,34.06a39.81,39.81,0,0,0-25.28,0C108,75.19,104,63.24,104,56A24,24,0,0,1,128,32ZM44.86,80a24,24,0,0,1,32.79-8.79c6.27,3.63,14.62,13.07,23.82,26.89A40,40,0,0,0,88.81,120c-16.55-1.06-28.89-3.56-35.16-7.18A24,24,0,0,1,44.86,80ZM77.65,184.79a24,24,0,1,1-24-41.57c6.27-3.63,18.61-6.13,35.16-7.19a40,40,0,0,0,12.66,21.87C92.27,171.72,83.92,181.16,77.65,184.79ZM128,224a24,24,0,0,1-24-24c0-7.24,4-19.19,11.36-34.06a39.81,39.81,0,0,0,25.28,0C148,180.81,152,192.76,152,200A24,24,0,0,1,128,224Zm83.14-48a24,24,0,0,1-32.79,8.79c-6.27-3.63-14.62-13.07-23.82-26.89A40,40,0,0,0,167.19,136c16.55,1.06,28.89,3.56,35.16,7.18A24,24,0,0,1,211.14,176Z"></path></svg>';
1782
1787
  case 'network':
1783
1788
  return '<svg class="network-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 256 256" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M212,200a36,36,0,1,1-69.85-12.25l-53-34.05a36,36,0,1,1,0-51.4l53-34a36.09,36.09,0,1,1,8.67,13.45l-53,34.05a36,36,0,0,1,0,24.5l53,34.05A36,36,0,0,1,212,200Z"></path></svg>';
1789
+ case 'crosshair':
1790
+ return '<svg class="network-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 512 512" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M256 0c17.7 0 32 14.3 32 32l0 10.4c93.7 13.9 167.7 88 181.6 181.6l10.4 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-10.4 0c-13.9 93.7-88 167.7-181.6 181.6l0 10.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-10.4C130.3 455.7 56.3 381.7 42.4 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l10.4 0C56.3 130.3 130.3 56.3 224 42.4L224 32c0-17.7 14.3-32 32-32zM107.4 288c12.5 58.3 58.4 104.1 116.6 116.6l0-20.6c0-17.7 14.3-32 32-32s32 14.3 32 32l0 20.6c58.3-12.5 104.1-58.4 116.6-116.6L384 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l20.6 0C392.1 165.7 346.3 119.9 288 107.4l0 20.6c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-20.6C165.7 119.9 119.9 165.7 107.4 224l20.6 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-20.6 0zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg>';
1791
+ case 'shop':
1792
+ return '<svg class="shop-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 640 512" height="1.25em" width="1.25em" xmlns="http://www.w3.org/2000/svg"><path d="M36.8 192l566.3 0c20.3 0 36.8-16.5 36.8-36.8c0-7.3-2.2-14.4-6.2-20.4L558.2 21.4C549.3 8 534.4 0 518.3 0L121.7 0c-16 0-31 8-39.9 21.4L6.2 134.7c-4 6.1-6.2 13.2-6.2 20.4C0 175.5 16.5 192 36.8 192zM64 224l0 160 0 80c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-80 0-160-64 0 0 160-192 0 0-160-64 0zm448 0l0 256c0 17.7 14.3 32 32 32s32-14.3 32-32l0-256-64 0z"></path></svg>';
1793
+ case 'plant':
1794
+ return '<svg class="plant-icon" stroke="currentColor" stroke-width="0" fill="#fff" viewBox="0 0 256 256" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M205.41,159.07a60.9,60.9,0,0,1-31.83,8.86,71.71,71.71,0,0,1-27.36-5.66A55.55,55.55,0,0,0,136,194.51V224a8,8,0,0,1-8.53,8,8.18,8.18,0,0,1-7.47-8.25V211.31L81.38,172.69A52.5,52.5,0,0,1,63.44,176a45.82,45.82,0,0,1-23.92-6.67C17.73,156.09,6,125.62,8.27,87.79a8,8,0,0,1,7.52-7.52c37.83-2.23,68.3,9.46,81.5,31.25A46,46,0,0,1,103.74,140a4,4,0,0,1-6.89,2.43l-19.2-20.1a8,8,0,0,0-11.31,11.31l53.88,55.25c.06-.78.13-1.56.21-2.33a68.56,68.56,0,0,1,18.64-39.46l50.59-53.46a8,8,0,0,0-11.31-11.32l-49,51.82a4,4,0,0,1-6.78-1.74c-4.74-17.48-2.65-34.88,6.4-49.82,17.86-29.48,59.42-45.26,111.18-42.22a8,8,0,0,1,7.52,7.52C250.67,99.65,234.89,141.21,205.41,159.07Z"></path></svg>';
1795
+ case 'circle-dot':
1796
+ return '<svg class="circle-dot-icon" stroke="#fff" fill="transparent" stroke-width="2.5" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1.55em" width="1.55em" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="1"></circle></svg>';
1784
1797
  default:
1785
1798
  return '';
1786
1799
  }
@@ -3149,18 +3162,19 @@ var SelectPosition = function (_a) {
3149
3162
  } }, { children: jsx("p", __assign({ className: 'tw-text-center ' }, { children: "\u2715" })) })), jsx("div", __assign({ className: 'tw-alert tw-bg-base-100 tw-text-base-content' }, { children: jsx("div", { children: jsx("span", __assign({ className: 'tw-text-lg' }, { children: "Select position on the map!" })) }) }))] })));
3150
3163
  };
3151
3164
 
3152
- var mapDivRef = createRef();
3153
3165
  function UtopiaMapInner(_a) {
3154
- var _b = _a.height, height = _b === void 0 ? '500px' : _b, _c = _a.width, width = _c === void 0 ? '100%' : _c, _d = _a.center, center = _d === void 0 ? [50.6, 9.5] : _d, _e = _a.zoom, zoom = _e === void 0 ? 10 : _e, children = _a.children, geo = _a.geo, _f = _a.showFilterControl, showFilterControl = _f === void 0 ? false : _f, _g = _a.showGratitudeControl, showGratitudeControl = _g === void 0 ? false : _g, _h = _a.showLayerControl, showLayerControl = _h === void 0 ? true : _h, infoText = _a.infoText;
3155
- // Hooks that rely on contexts, called after ContextWrapper is provided
3166
+ var children = _a.children, geo = _a.geo, _b = _a.showFilterControl, showFilterControl = _b === void 0 ? false : _b, _c = _a.showGratitudeControl, showGratitudeControl = _c === void 0 ? false : _c, _d = _a.showLayerControl, showLayerControl = _d === void 0 ? true : _d, infoText = _a.infoText;
3156
3167
  var selectNewItemPosition = useSelectPosition();
3157
3168
  var setSelectNewItemPosition = useSetSelectPosition();
3158
3169
  var setClusterRef = useSetClusterRef();
3159
3170
  var clusterRef = useClusterRef();
3160
3171
  var setMapClicked = useSetMapClicked();
3161
- var _j = useState(null), itemFormPopup = _j[0], setItemFormPopup = _j[1];
3172
+ var _e = useState(null), itemFormPopup = _e[0], setItemFormPopup = _e[1];
3162
3173
  var layers = useLayers();
3163
3174
  var addVisibleLayer = useAddVisibleLayer();
3175
+ var leafletRefs = useLeafletRefs();
3176
+ var location = useLocation();
3177
+ var map = useMap();
3164
3178
  useEffect(function () {
3165
3179
  layers.forEach(function (layer) { return addVisibleLayer(layer); });
3166
3180
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -3190,10 +3204,62 @@ function UtopiaMapInner(_a) {
3190
3204
  });
3191
3205
  return null;
3192
3206
  }
3207
+ useMapEvents({
3208
+ popupopen: function (e) {
3209
+ var _a, _b;
3210
+ var item = (_a = Object.entries(leafletRefs).find(function (r) { return r[1].popup === e.popup; })) === null || _a === void 0 ? void 0 : _a[1].item;
3211
+ if (window.location.pathname.split('/')[1] !== (item === null || item === void 0 ? void 0 : item.id)) {
3212
+ var params = new URLSearchParams(window.location.search);
3213
+ if (!location.pathname.includes('/item/')) {
3214
+ window.history.pushState({}, '', "/".concat(item === null || item === void 0 ? void 0 : item.id) + "".concat(params.toString() !== '' ? "?".concat(params) : ''));
3215
+ }
3216
+ var title = '';
3217
+ if (item === null || item === void 0 ? void 0 : item.name)
3218
+ title = item.name;
3219
+ else if ((_b = item === null || item === void 0 ? void 0 : item.layer) === null || _b === void 0 ? void 0 : _b.itemNameField)
3220
+ title = getValue(item, item.layer.itemNameField);
3221
+ document.title = "".concat(document.title.split('-')[0], " - ").concat(title);
3222
+ }
3223
+ },
3224
+ });
3225
+ var openPopup = function () {
3226
+ var _a, _b, _c;
3227
+ if (!containsUUID(window.location.pathname)) {
3228
+ map.closePopup();
3229
+ }
3230
+ else {
3231
+ if (window.location.pathname.split('/')[1]) {
3232
+ var id = window.location.pathname.split('/')[1];
3233
+ // eslint-disable-next-line security/detect-object-injection
3234
+ var ref_1 = leafletRefs[id];
3235
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3236
+ if (ref_1) {
3237
+ clusterRef.hasLayer(ref_1.marker) &&
3238
+ (clusterRef === null || clusterRef === void 0 ? void 0 : clusterRef.zoomToShowLayer(ref_1.marker, function () {
3239
+ ref_1.marker.openPopup();
3240
+ }));
3241
+ var title = '';
3242
+ if (ref_1.item.name)
3243
+ title = ref_1.item.name;
3244
+ else if ((_a = ref_1.item.layer) === null || _a === void 0 ? void 0 : _a.itemNameField)
3245
+ title = getValue(ref_1.item.name, ref_1.item.layer.itemNameField);
3246
+ document.title = "".concat(document.title.split('-')[0], " - ").concat(title);
3247
+ (_b = document
3248
+ .querySelector('meta[property="og:title"]')) === null || _b === void 0 ? void 0 : _b.setAttribute('content', ref_1.item.name);
3249
+ (_c = document
3250
+ .querySelector('meta[property="og:description"]')) === null || _c === void 0 ? void 0 : _c.setAttribute('content', ref_1.item.text);
3251
+ }
3252
+ }
3253
+ }
3254
+ };
3255
+ useEffect(function () {
3256
+ openPopup();
3257
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3258
+ }, [leafletRefs, location]);
3193
3259
  var resetMetaTags = function () {
3194
3260
  var _a, _b, _c;
3195
3261
  var params = new URLSearchParams(window.location.search);
3196
- if (!window.location.pathname.includes('/item/')) {
3262
+ if (!containsUUID(window.location.pathname)) {
3197
3263
  window.history.pushState({}, '', '/' + "".concat(params.toString() !== '' ? "?".concat(params) : ''));
3198
3264
  }
3199
3265
  document.title = document.title.split('-')[0];
@@ -3206,22 +3272,23 @@ function UtopiaMapInner(_a) {
3206
3272
  layer.bindPopup(feature.properties.name);
3207
3273
  }
3208
3274
  };
3209
- return (jsxs("div", __assign({ className: "tw-h-full ".concat(selectNewItemPosition != null ? 'crosshair-cursor-enabled' : undefined) }, { children: [jsxs(MapContainer, __assign({ ref: mapDivRef, style: { height: height, width: width }, center: new LatLng(center[0], center[1]), zoom: zoom, zoomControl: false, maxZoom: 19 }, { children: [jsx(Outlet, {}), jsxs(Control, __assign({ position: 'topLeft', zIndex: '1000', absolute: true }, { children: [jsx(SearchControl, {}), jsx(TagsControl, {})] })), jsxs(Control, __assign({ position: 'bottomLeft', zIndex: '999', absolute: true }, { children: [showFilterControl && jsx(FilterControl, {}), showLayerControl && jsx(LayerControl, {}), showGratitudeControl && jsx(GratitudeControl, {})] })), jsx(TileLayer, { maxZoom: 19, attribution: '\u00A9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', url: 'https://tile.osmand.net/hd/{z}/{x}/{y}.png' }), jsx(MarkerClusterGroup, __assign({ ref: function (r) { return setClusterRef(r); }, showCoverageOnHover: true, chunkedLoading: true, maxClusterRadius: 50, removeOutsideVisibleBounds: false }, { children: Children.toArray(children).map(function (child) {
3210
- return isValidElement(child)
3211
- ? cloneElement(child, { setItemFormPopup: setItemFormPopup, itemFormPopup: itemFormPopup, clusterRef: clusterRef })
3212
- : child;
3213
- }) })), geo && (jsx(GeoJSON, { data: geo, onEachFeature: onEachFeature, eventHandlers: {
3214
- click: function (e) {
3215
- if (selectNewItemPosition) {
3216
- e.layer.closePopup();
3217
- setMapClicked({ position: e.latlng, setItemFormPopup: setItemFormPopup });
3218
- }
3219
- },
3220
- } })), jsx(MapEventListener, {})] })), jsx(AddButton, { triggerAction: setSelectNewItemPosition }), selectNewItemPosition != null && (jsx(SelectPosition, { setSelectNewItemPosition: setSelectNewItemPosition }))] })));
3275
+ return (jsxs("div", __assign({ className: "tw-h-full ".concat(selectNewItemPosition != null ? 'crosshair-cursor-enabled' : undefined) }, { children: [jsx(Outlet, {}), jsxs(Control, __assign({ position: 'topLeft', zIndex: '1000', absolute: true }, { children: [jsx(SearchControl, {}), jsx(TagsControl, {})] })), jsxs(Control, __assign({ position: 'bottomLeft', zIndex: '999', absolute: true }, { children: [showFilterControl && jsx(FilterControl, {}), showLayerControl && jsx(LayerControl, {}), showGratitudeControl && jsx(GratitudeControl, {})] })), jsx(TileLayer, { maxZoom: 19, attribution: '\u00A9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', url: 'https://tile.osmand.net/hd/{z}/{x}/{y}.png' }), jsx(MarkerClusterGroup, __assign({ ref: function (r) { return setClusterRef(r); }, showCoverageOnHover: true, chunkedLoading: true, maxClusterRadius: 50, removeOutsideVisibleBounds: false }, { children: Children.toArray(children).map(function (child) {
3276
+ return isValidElement(child)
3277
+ ? cloneElement(child, { setItemFormPopup: setItemFormPopup, itemFormPopup: itemFormPopup, clusterRef: clusterRef })
3278
+ : child;
3279
+ }) })), geo && (jsx(GeoJSON, { data: geo, onEachFeature: onEachFeature, eventHandlers: {
3280
+ click: function (e) {
3281
+ if (selectNewItemPosition) {
3282
+ e.layer.closePopup();
3283
+ setMapClicked({ position: e.latlng, setItemFormPopup: setItemFormPopup });
3284
+ }
3285
+ },
3286
+ } })), jsx(MapEventListener, {}), jsx(AddButton, { triggerAction: setSelectNewItemPosition }), selectNewItemPosition != null && (jsx(SelectPosition, { setSelectNewItemPosition: setSelectNewItemPosition }))] })));
3221
3287
  }
3222
3288
 
3223
- function UtopiaMap(props) {
3224
- return (jsx(ContextWrapper, { children: jsx(UtopiaMapInner, __assign({}, props)) }));
3289
+ function UtopiaMap(_a) {
3290
+ var _b = _a.height, height = _b === void 0 ? '500px' : _b, _c = _a.width, width = _c === void 0 ? '100%' : _c, _d = _a.center, center = _d === void 0 ? [50.6, 9.5] : _d, _e = _a.zoom, zoom = _e === void 0 ? 10 : _e, children = _a.children, geo = _a.geo, _f = _a.showFilterControl, showFilterControl = _f === void 0 ? false : _f, _g = _a.showGratitudeControl, showGratitudeControl = _g === void 0 ? false : _g, _h = _a.showLayerControl, showLayerControl = _h === void 0 ? true : _h, infoText = _a.infoText;
3291
+ return (jsx(ContextWrapper, { children: jsx(MapContainer, __assign({ style: { height: height, width: width }, center: new LatLng(center[0], center[1]), zoom: zoom, zoomControl: false, maxZoom: 19 }, { children: jsx(UtopiaMapInner, __assign({ geo: geo, showFilterControl: showFilterControl, showGratitudeControl: showGratitudeControl, showLayerControl: showLayerControl, infoText: infoText }, { children: children })) })) }));
3225
3292
  }
3226
3293
 
3227
3294
  /* eslint-disable @typescript-eslint/restrict-template-expressions */
@@ -3691,7 +3758,6 @@ var Layer = function (_a) {
3691
3758
  var addMarker = useAddMarker();
3692
3759
  var addPopup = useAddPopup();
3693
3760
  var leafletRefs = useLeafletRefs();
3694
- var location = useLocation();
3695
3761
  var allTagsLoaded = useAllTagsLoaded();
3696
3762
  var allItemsLoaded = useAllItemsLoaded();
3697
3763
  var setMarkerClicked = useSetMarkerClicked();
@@ -3700,7 +3766,6 @@ var Layer = function (_a) {
3700
3766
  var addTag = useAddTag();
3701
3767
  var _r = useState([]), newTagsToAdd = _r[0], setNewTagsToAdd = _r[1];
3702
3768
  var _s = useState(false), tagsReady = _s[0], setTagsReady = _s[1];
3703
- var map = useMap();
3704
3769
  var isLayerVisible = useIsLayerVisible();
3705
3770
  var isGroupTypeVisible = useIsGroupTypeVisible();
3706
3771
  var visibleGroupTypes = useVisibleGroupType();
@@ -3773,59 +3838,6 @@ var Layer = function (_a) {
3773
3838
  });
3774
3839
  // eslint-disable-next-line react-hooks/exhaustive-deps
3775
3840
  }, [data, api]);
3776
- useMapEvents({
3777
- popupopen: function (e) {
3778
- var _a, _b;
3779
- var item = (_a = Object.entries(leafletRefs).find(function (r) { return r[1].popup === e.popup; })) === null || _a === void 0 ? void 0 : _a[1].item;
3780
- if (((_b = item === null || item === void 0 ? void 0 : item.layer) === null || _b === void 0 ? void 0 : _b.name) === name && window.location.pathname.split('/')[1] !== item.id) {
3781
- var params = new URLSearchParams(window.location.search);
3782
- if (!location.pathname.includes('/item/')) {
3783
- window.history.pushState({}, '', "/".concat(item.id) + "".concat(params.toString() !== '' ? "?".concat(params) : ''));
3784
- }
3785
- var title = '';
3786
- if (item.name)
3787
- title = item.name;
3788
- else if (item.layer.itemNameField)
3789
- title = getValue(item, item.layer.itemNameField);
3790
- document.title = "".concat(document.title.split('-')[0], " - ").concat(title);
3791
- }
3792
- },
3793
- });
3794
- var openPopup = function () {
3795
- var _a, _b, _c;
3796
- if (window.location.pathname.split('/').length <= 1 ||
3797
- window.location.pathname.split('/')[1] === '') {
3798
- map.closePopup();
3799
- }
3800
- else {
3801
- if (window.location.pathname.split('/')[1]) {
3802
- var id = window.location.pathname.split('/')[1];
3803
- // eslint-disable-next-line security/detect-object-injection
3804
- var ref_1 = leafletRefs[id];
3805
- if ((ref_1 === null || ref_1 === void 0 ? void 0 : ref_1.marker) && ((_a = ref_1.item.layer) === null || _a === void 0 ? void 0 : _a.name) === name) {
3806
- ref_1.marker &&
3807
- clusterRef.hasLayer(ref_1.marker) &&
3808
- (clusterRef === null || clusterRef === void 0 ? void 0 : clusterRef.zoomToShowLayer(ref_1.marker, function () {
3809
- ref_1.marker.openPopup();
3810
- }));
3811
- var title = '';
3812
- if (ref_1.item.name)
3813
- title = ref_1.item.name;
3814
- else if (ref_1.item.layer.itemNameField)
3815
- title = getValue(ref_1.item.name, ref_1.item.layer.itemNameField);
3816
- document.title = "".concat(document.title.split('-')[0], " - ").concat(title);
3817
- (_b = document
3818
- .querySelector('meta[property="og:title"]')) === null || _b === void 0 ? void 0 : _b.setAttribute('content', ref_1.item.name);
3819
- (_c = document
3820
- .querySelector('meta[property="og:description"]')) === null || _c === void 0 ? void 0 : _c.setAttribute('content', ref_1.item.text);
3821
- }
3822
- }
3823
- }
3824
- };
3825
- useEffect(function () {
3826
- openPopup();
3827
- // eslint-disable-next-line react-hooks/exhaustive-deps
3828
- }, [leafletRefs, location]);
3829
3841
  useEffect(function () {
3830
3842
  if (tagsReady) {
3831
3843
  var processedTags_1 = {};
@@ -4519,19 +4531,7 @@ var OverlayItemsIndexPage = function (_a) {
4519
4531
  };
4520
4532
 
4521
4533
  var EmojiPicker = function (_a) {
4522
- var
4523
- // eslint-disable-next-line react/prop-types
4524
- selectedEmoji = _a.selectedEmoji,
4525
- // eslint-disable-next-line react/prop-types
4526
- selectedColor = _a.selectedColor,
4527
- // eslint-disable-next-line react/prop-types
4528
- selectedShape = _a.selectedShape,
4529
- // eslint-disable-next-line react/prop-types
4530
- setSelectedEmoji = _a.setSelectedEmoji,
4531
- // eslint-disable-next-line react/prop-types
4532
- setSelectedColor = _a.setSelectedColor,
4533
- // eslint-disable-next-line react/prop-types
4534
- setSelectedShape = _a.setSelectedShape;
4534
+ var selectedEmoji = _a.selectedEmoji, selectedColor = _a.selectedColor, selectedShape = _a.selectedShape, setSelectedEmoji = _a.setSelectedEmoji, setSelectedColor = _a.setSelectedColor, setSelectedShape = _a.setSelectedShape;
4535
4535
  var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
4536
4536
  var emojis = [
4537
4537
  '❤️',
@@ -4627,47 +4627,48 @@ var AttestationForm = function (_a) {
4627
4627
  var handleChange = function (event) {
4628
4628
  setInputValue(event.target.value);
4629
4629
  };
4630
- var sendAttestation = function () { return __awaiter(void 0, void 0, void 0, function () {
4631
- var to;
4632
- return __generator(this, function (_a) {
4633
- to = [];
4634
- users === null || users === void 0 ? void 0 : users.map(function (u) { var _a; return to.push({ directus_users_id: (_a = u.user_created) === null || _a === void 0 ? void 0 : _a.id }); });
4635
- (api === null || api === void 0 ? void 0 : api.createItem) &&
4636
- toast
4637
- .promise(api.createItem({
4638
- text: inputValue,
4639
- emoji: selectedEmoji,
4640
- color: selectedColor,
4641
- shape: selectedShape,
4642
- to: to,
4643
- }), {
4644
- pending: 'creating attestation ...',
4645
- success: 'Attestation created',
4646
- error: {
4647
- render: function (_a) {
4648
- var data = _a.data;
4649
- return "".concat(data);
4650
- },
4630
+ var sendAttestation = function () {
4631
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4632
+ var to = [];
4633
+ users === null || users === void 0 ? void 0 : users.map(function (u) { var _a; return to.push({ directus_users_id: (_a = u.user_created) === null || _a === void 0 ? void 0 : _a.id }); });
4634
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
4635
+ (api === null || api === void 0 ? void 0 : api.createItem) &&
4636
+ toast
4637
+ .promise(api.createItem({
4638
+ text: inputValue,
4639
+ emoji: selectedEmoji,
4640
+ color: selectedColor,
4641
+ shape: selectedShape,
4642
+ to: to,
4643
+ }), {
4644
+ pending: 'creating attestation ...',
4645
+ success: 'Attestation created',
4646
+ error: {
4647
+ render: function (_a) {
4648
+ var data = _a.data;
4649
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
4650
+ return "".concat(data);
4651
4651
  },
4652
- })
4653
- .then(function () {
4654
- var _a;
4655
- return navigate('/item/' +
4656
- ((_a = items.find(function (i) {
4657
- var _a, _b;
4658
- return ((_a = i.user_created) === null || _a === void 0 ? void 0 : _a.id) === to[0].directus_users_id &&
4659
- ((_b = i.layer) === null || _b === void 0 ? void 0 : _b.itemType.name) === 'player';
4660
- })) === null || _a === void 0 ? void 0 : _a.id) +
4661
- '?tab=2');
4662
- });
4663
- return [2 /*return*/];
4664
- });
4665
- }); };
4652
+ },
4653
+ })
4654
+ .then(function () {
4655
+ var _a;
4656
+ return navigate('/item/' +
4657
+ (
4658
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
4659
+ (_a = items.find(function (i) {
4660
+ var _a, _b;
4661
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4662
+ return ((_a = i.user_created) === null || _a === void 0 ? void 0 : _a.id) === to[0].directus_users_id &&
4663
+ ((_b = i.layer) === null || _b === void 0 ? void 0 : _b.itemType.name) === 'player';
4664
+ })) === null || _a === void 0 ? void 0 : _a.id) +
4665
+ '?tab=2');
4666
+ });
4667
+ };
4666
4668
  var _d = useState('select badge'), selectedEmoji = _d[0], setSelectedEmoji = _d[1];
4667
4669
  var _e = useState('circle'), selectedShape = _e[0], setSelectedShape = _e[1];
4668
4670
  var _f = useState('#fff0d6'), selectedColor = _f[0], setSelectedColor = _f[1];
4669
- return (jsxs(MapOverlayPage, __assign({ backdrop: true, className: 'tw-h-fit tw-min-h-56 tw-w-96' }, { children: [jsx("div", __assign({ className: 'tw-text-center tw-text-xl tw-font-bold' }, { children: "Gratitude" })), jsx("div", __assign({ className: 'tw-text-center tw-text-base tw-text-gray-400' }, { children: "to" })), jsx("div", __assign({ className: 'tw-flex tw-flex-row tw-justify-center tw-items-center tw-flex-wrap' }, { children: users &&
4670
- users.map(function (u, k) { return (jsxs("div", __assign({ className: 'tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1' }, { children: [u.image ? (jsx("div", __assign({ className: 'tw-avatar' }, { children: jsx("div", __assign({ className: 'tw-mask tw-mask-circle tw-w-8 tw-h-8' }, { children: jsx("img", { src: appState.assetsApi.url + u.image + '?width=40&heigth=40', alt: 'Avatar' }) })) }))) : (jsx("div", { className: 'tw-mask tw-mask-circle tw-text-xl md:tw-text-2xl tw-bg-slate-200 tw-rounded-full tw-w-8 tw-h-8' })), jsx("div", { children: jsx("div", __assign({ className: 'tw-font-bold' }, { children: u.name })) })] }), k)); }, ', ') })), jsxs("div", __assign({ className: 'tw-w-full' }, { children: [jsx("div", __assign({ className: 'tw-flex tw-justify-center tw-items-center' }, { children: jsx("div", __assign({ className: ' tw-flex tw-justify-center tw-items-center tw-w-28 tw-h-28 tw-m-4' }, { children: jsx(EmojiPicker, { selectedEmoji: selectedEmoji, selectedColor: selectedColor, selectedShape: selectedShape, setSelectedEmoji: setSelectedEmoji, setSelectedColor: setSelectedColor, setSelectedShape: setSelectedShape }) })) })), jsx("div", __assign({ className: 'tw-flex tw-justify-center tw-items-center' }, { children: jsx("input", { ref: inputRef, value: inputValue, onChange: handleChange, type: 'text', placeholder: '... and say some words', className: 'tw-input tw-min-w-0 tw-w-fit tw-resize-none tw-overflow-hidden tw-text-center ' }) }))] })), jsx("div", __assign({ className: 'tw-w-full tw-grid tw-mt-4' }, { children: jsx("button", __assign({ onClick: sendAttestation, className: 'tw-btn tw-place-self-center tw-px-8' }, { children: "Next" })) }))] })));
4671
+ return (jsxs(MapOverlayPage, __assign({ backdrop: true, className: 'tw-h-fit tw-min-h-56 tw-w-96' }, { children: [jsx("div", __assign({ className: 'tw-text-center tw-text-xl tw-font-bold' }, { children: "Gratitude" })), jsx("div", __assign({ className: 'tw-text-center tw-text-base tw-text-gray-400' }, { children: "to" })), jsx("div", __assign({ className: 'tw-flex tw-flex-row tw-justify-center tw-items-center tw-flex-wrap' }, { children: users === null || users === void 0 ? void 0 : users.map(function (u, k) { return (jsxs("div", __assign({ className: 'tw-flex tw-items-center tw-space-x-3 tw-mx-2 tw-my-1' }, { children: [u.image ? (jsx("div", __assign({ className: 'tw-avatar' }, { children: jsx("div", __assign({ className: 'tw-mask tw-mask-circle tw-w-8 tw-h-8' }, { children: jsx("img", { src: appState.assetsApi.url + u.image + '?width=40&heigth=40', alt: 'Avatar' }) })) }))) : (jsx("div", { className: 'tw-mask tw-mask-circle tw-text-xl md:tw-text-2xl tw-bg-slate-200 tw-rounded-full tw-w-8 tw-h-8' })), jsx("div", { children: jsx("div", __assign({ className: 'tw-font-bold' }, { children: u.name })) })] }), k)); }, ', ') })), jsxs("div", __assign({ className: 'tw-w-full' }, { children: [jsx("div", __assign({ className: 'tw-flex tw-justify-center tw-items-center' }, { children: jsx("div", __assign({ className: ' tw-flex tw-justify-center tw-items-center tw-w-28 tw-h-28 tw-m-4' }, { children: jsx(EmojiPicker, { selectedEmoji: selectedEmoji, selectedColor: selectedColor, selectedShape: selectedShape, setSelectedEmoji: setSelectedEmoji, setSelectedColor: setSelectedColor, setSelectedShape: setSelectedShape }) })) })), jsx("div", __assign({ className: 'tw-flex tw-justify-center tw-items-center' }, { children: jsx("input", { ref: inputRef, value: inputValue, onChange: handleChange, type: 'text', placeholder: '... and say some words', className: 'tw-input tw-min-w-0 tw-w-fit tw-resize-none tw-overflow-hidden tw-text-center ' }) }))] })), jsx("div", __assign({ className: 'tw-w-full tw-grid tw-mt-4' }, { children: jsx("button", __assign({ onClick: sendAttestation, className: 'tw-btn tw-place-self-center tw-px-8' }, { children: "Next" })) }))] })));
4671
4672
  };
4672
4673
 
4673
4674
  var TagView = function (_a) {
@@ -6007,5 +6008,5 @@ function Quests() {
6007
6008
  return (jsx(Fragment, { children: questsOpen ? (jsx("div", __assign({ className: 'tw-card tw-w-48 tw-bg-base-100 tw-shadow-xl tw-absolute tw-bottom-4 tw-left-4 tw-z-[2000]' }, { children: jsxs("div", __assign({ className: 'tw-card-body tw-p-4 tw-pt-0' }, { children: [jsx("div", __assign({ className: 'tw-card-actions tw-justify-end' }, { children: jsx("label", __assign({ className: 'tw-btn tw-btn-sm tw-btn-circle tw-btn-ghost tw-absolute tw-right-1 tw-top-1', onClick: function () { return setQuestsOpen(false); } }, { children: "\u2715" })) })), jsxs("h2", __assign({ className: 'tw-card-title tw-m-auto ' }, { children: ["Level 1", jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24', strokeWidth: 1.5, stroke: '#aaa', className: 'tw-w-5 tw-h-5 tw-cursor-pointer' }, { children: jsx("path", { strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z' }) }))] })), jsxs("ul", __assign({ className: 'tw-flex-row' }, { children: [jsx("li", { children: jsxs("label", __assign({ className: 'tw-label tw-justify-normal tw-pt-1 tw-pb-0' }, { children: [jsx("input", { type: 'checkbox', readOnly: true, className: 'tw-checkbox tw-checkbox-xs tw-checkbox-success', checked: isAuthenticated || false }), jsx("span", __assign({ className: 'tw-text-sm tw-label-text tw-mx-2' }, { children: "Sign Up" }))] })) }), jsx("li", { children: jsxs("label", __assign({ className: 'tw-label tw-justify-normal tw-pt-1 tw-pb-0' }, { children: [jsx("input", { type: 'checkbox', readOnly: true, className: 'tw-checkbox tw-checkbox-xs tw-checkbox-success', checked: !!(profile === null || profile === void 0 ? void 0 : profile.text) }), jsx("span", __assign({ className: 'tw-text-sm tw-label-text tw-mx-2' }, { children: "Fill Profile" }))] })) }), jsx("li", { children: jsxs("label", __assign({ className: 'tw-label tw-justify-normal tw-pt-1 tw-pb-0' }, { children: [jsx("input", { type: 'checkbox', readOnly: true, className: 'tw-checkbox tw-checkbox-xs tw-checkbox-success', checked: !!(profile === null || profile === void 0 ? void 0 : profile.image) }), jsx("span", __assign({ className: 'tw-text-sm tw-label-text tw-mx-2' }, { children: "Upload Avatar" }))] })) })] })), ' '] })) }))) : ('') }));
6008
6009
  }
6009
6010
 
6010
- export { AppShell, AttestationForm, AuthProvider, CardPage, Content, ItemForm, ItemView, Layer, LoginPage, MapOverlayPage, MarketView, Modal, MoonCalendar, OverlayItemsIndexPage, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectBox, SelectUser, SetNewPasswordPage, SideBar, SignupPage, Sitemap, StartEndView, Tags, TextAreaInput, TextInput, TextView, TitleCard, UserSettings, UtopiaMap, useAuth };
6011
+ export { AppShell, AttestationForm, AuthProvider, CardPage, Content, ItemForm, ItemView, Layer, LoginPage, MapOverlayPage, MarketView, Modal, MoonCalendar, OverlayItemsIndexPage, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectBox, SelectUser, SetNewPasswordPage, SideBar, SignupPage, Sitemap, StartEndView, Tags, TextAreaInput, TextInput, TextView, TitleCard, UserSettings, UtopiaMap };
6011
6012
  //# sourceMappingURL=index.js.map