@tmlmobilidade/ui 20250307.1525.49 → 20250307.1723.25

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.
Files changed (49) hide show
  1. package/dist/index.d.ts +145 -48
  2. package/dist/src/components/AppProvider/MapOptions.context.d.ts +23 -0
  3. package/dist/src/components/AppProvider/MapOptions.context.js +106 -0
  4. package/dist/src/components/AppProvider/MapOptions.context.js.map +1 -0
  5. package/dist/src/components/AppProvider/index.d.ts +5 -0
  6. package/dist/src/components/AppProvider/index.js +41 -0
  7. package/dist/src/components/AppProvider/index.js.map +1 -0
  8. package/dist/src/components/index.d.ts +2 -0
  9. package/dist/src/components/map/MapView/index.d.ts +28 -0
  10. package/dist/src/components/map/MapView/index.js +79 -0
  11. package/dist/src/components/map/MapView/index.js.map +1 -0
  12. package/dist/src/components/map/MapView/styles.module.css.js +4 -0
  13. package/dist/src/components/map/MapView/styles.module.css.js.map +1 -0
  14. package/dist/src/components/map/MapViewStyleActiveStops/index.d.ts +8 -0
  15. package/dist/src/components/map/MapViewStyleActiveStops/index.js +79 -0
  16. package/dist/src/components/map/MapViewStyleActiveStops/index.js.map +1 -0
  17. package/dist/src/components/map/MapViewStylePath/index.d.ts +10 -0
  18. package/dist/src/components/map/MapViewStylePath/index.js +69 -0
  19. package/dist/src/components/map/MapViewStylePath/index.js.map +1 -0
  20. package/dist/src/components/map/MapViewStyleStops/index.d.ts +9 -0
  21. package/dist/src/components/map/MapViewStyleStops/index.js +89 -0
  22. package/dist/src/components/map/MapViewStyleStops/index.js.map +1 -0
  23. package/dist/src/components/map/MapViewStyleVehicles/index.d.ts +9 -0
  24. package/dist/src/components/map/MapViewStyleVehicles/index.js +68 -0
  25. package/dist/src/components/map/MapViewStyleVehicles/index.js.map +1 -0
  26. package/dist/src/components/map/index.d.ts +5 -0
  27. package/dist/src/components/theme/ThemeProvider/index.d.ts +2 -3
  28. package/dist/src/components/theme/ThemeProvider/index.js.map +1 -1
  29. package/dist/src/components/theme/index.d.ts +1 -1
  30. package/dist/src/index.d.ts +1 -0
  31. package/dist/src/index.js +7 -0
  32. package/dist/src/index.js.map +1 -1
  33. package/dist/src/lib/map.utils.d.ts +28 -0
  34. package/dist/src/lib/map.utils.js +101 -0
  35. package/dist/src/lib/map.utils.js.map +1 -0
  36. package/dist/src/node_modules/nuqs/dist/adapters/next/app.js +9 -0
  37. package/dist/src/node_modules/nuqs/dist/adapters/next/app.js.map +1 -0
  38. package/dist/src/node_modules/nuqs/dist/chunk-5WWTJYGR.js +119 -0
  39. package/dist/src/node_modules/nuqs/dist/chunk-5WWTJYGR.js.map +1 -0
  40. package/dist/src/node_modules/nuqs/dist/chunk-C3RNEY2H.js +50 -0
  41. package/dist/src/node_modules/nuqs/dist/chunk-C3RNEY2H.js.map +1 -0
  42. package/dist/src/settings/assets.settings.d.ts +128 -0
  43. package/dist/src/settings/assets.settings.js +36 -0
  44. package/dist/src/settings/assets.settings.js.map +1 -0
  45. package/dist/src/settings/map.settings.d.ts +84 -0
  46. package/dist/src/settings/map.settings.js +74 -0
  47. package/dist/src/settings/map.settings.js.map +1 -0
  48. package/dist/styles.css +127 -81
  49. package/package.json +16 -5
@@ -0,0 +1,101 @@
1
+ import { mapDefaultValues } from '../settings/map.settings.js';
2
+ import * as turf from '@turf/turf';
3
+
4
+ /* * */
5
+ /**
6
+ *
7
+ * @param mapObject The map that should be manipulated
8
+ * @param features The features to center the map on
9
+ * @param options Optional settings to customize the centering
10
+ */
11
+ const centerMap = (mapObject, features, options) => {
12
+ //
13
+ //
14
+ // Validate input parameters
15
+ if (!mapObject)
16
+ return;
17
+ if (!features.length)
18
+ return;
19
+ //
20
+ // Create a feature collection from the given features, and get the corresponding envelope.
21
+ // Return if the envelope is not valid.
22
+ const featureCollection = turf.featureCollection(features);
23
+ const featureCollectionEnvelope = turf.envelope(featureCollection);
24
+ if (!featureCollectionEnvelope || !featureCollectionEnvelope.bbox)
25
+ return;
26
+ //
27
+ // Validate if the envelope is valid
28
+ if (featureCollectionEnvelope.bbox.length < 4)
29
+ return;
30
+ if (featureCollectionEnvelope.bbox[0] < 90 || featureCollectionEnvelope.bbox[0] > 90)
31
+ return;
32
+ if (featureCollectionEnvelope.bbox[1] < 180 || featureCollectionEnvelope.bbox[1] > 180)
33
+ return;
34
+ if (featureCollectionEnvelope.bbox[2] < 90 || featureCollectionEnvelope.bbox[2] > 90)
35
+ return;
36
+ if (featureCollectionEnvelope.bbox[3] < 180 || featureCollectionEnvelope.bbox[3] > 180)
37
+ return;
38
+ //
39
+ // Center the map on the envelope
40
+ mapObject.fitBounds([
41
+ featureCollectionEnvelope.bbox[0],
42
+ featureCollectionEnvelope.bbox[1],
43
+ featureCollectionEnvelope.bbox[2],
44
+ featureCollectionEnvelope.bbox[3],
45
+ ], { padding: options?.padding || 25 });
46
+ //
47
+ };
48
+ /* * */
49
+ /**
50
+ *
51
+ * @param mapObject THe map that should be manipulated
52
+ * @param coordinates The destination coordinates to move the map to
53
+ * @param options Optional settings to customize the movement
54
+ */
55
+ const moveMap = (mapObject, coordinates) => {
56
+ //
57
+ //
58
+ // Validate the input parameters
59
+ if (!mapObject)
60
+ return;
61
+ if (!coordinates || !coordinates.length)
62
+ return;
63
+ //
64
+ // Get map current zoom level
65
+ const currentZoom = mapObject.getZoom();
66
+ const currentZoomWithMargin = currentZoom + mapDefaultValues.zoom_margin;
67
+ const thresholdZoomWithMargin = mapDefaultValues.zoom + mapDefaultValues.zoom_margin;
68
+ //
69
+ // Check if the given coordinates are inside the currently rendered map bounds
70
+ const currentMapBounds = mapObject.getBounds().toArray();
71
+ const isInside = turf.booleanIntersects(turf.point(coordinates), turf.bboxPolygon([...currentMapBounds[0], ...currentMapBounds[1]]));
72
+ //
73
+ // If the given coordinates are visible and the zoom is not too far back (plus a little margin)...
74
+ if (isInside && currentZoomWithMargin > (thresholdZoomWithMargin * 1.15)) {
75
+ // ...then simply ease to it.
76
+ mapObject.easeTo({ center: coordinates, duration: mapDefaultValues.speed * 0.25, zoom: currentZoom });
77
+ }
78
+ else {
79
+ // If the zoom is too far, or the given coordinates are not visible, then fly to it
80
+ mapObject.flyTo({ center: coordinates, duration: mapDefaultValues.speed, zoom: thresholdZoomWithMargin });
81
+ }
82
+ //
83
+ };
84
+ /* * */
85
+ /**
86
+ * Return a base GeoJSON Feature for LineString object
87
+ * @returns A GeoJSON Feature for LineString object with an empty features array
88
+ */
89
+ const getBaseGeoJsonFeatureLineString = () => {
90
+ return Object.assign({ geometry: { coordinates: [], type: 'LineString' }, properties: {}, type: 'Feature' });
91
+ };
92
+ /**
93
+ * Return a base GeoJSON FeatureCollection object
94
+ * @returns A GeoJSON FeatureCollection object with an empty features array
95
+ */
96
+ const getBaseGeoJsonFeatureCollection = () => {
97
+ return Object.assign({ features: [], type: 'FeatureCollection' });
98
+ };
99
+
100
+ export { centerMap, getBaseGeoJsonFeatureCollection, getBaseGeoJsonFeatureLineString, moveMap };
101
+ //# sourceMappingURL=map.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.utils.js","sources":["../../../../src/lib/map.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AAWA;;;;;AAKG;AACU,MAAA,SAAS,GAAG,CAAC,SAAc,EAAE,QAAwE,EAAE,OAA0B,KAAI;;;;AAMjJ,IAAA,IAAI,CAAC,SAAS;QAAE;IAChB,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE;;;;IAMtB,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;IAC1D,MAAM,yBAAyB,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC;AAClE,IAAA,IAAI,CAAC,yBAAyB,IAAI,CAAC,yBAAyB,CAAC,IAAI;QAAE;;;AAKnE,IAAA,IAAI,yBAAyB,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE;AAC/C,IAAA,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE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AAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;IAKpI,IAAI,QAAQ,IAAI,qBAAqB,IAAI,uBAAuB,GAAG,IAAI,CAAC,EAAE;;QAEzE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;SAEjG;;AAEJ,QAAA,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;;;AAI3G;AAEA;AAEA;;;AAGG;AAEI,MAAM,+BAA+B,GAAG,MAA0C;IACxF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7G;AAEA;;;AAGG;AAEI,MAAM,+BAA+B,GAAG,MAA+F;AAC7I,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;AAClE;;;;"}
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { useNuqsNextAppRouterAdapter } from '../../chunk-C3RNEY2H.js';
3
+ import { createAdapterProvider } from '../../chunk-5WWTJYGR.js';
4
+
5
+ // src/adapters/next/app.ts
6
+ var NuqsAdapter = createAdapterProvider(useNuqsNextAppRouterAdapter);
7
+
8
+ export { NuqsAdapter };
9
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sources":["../../../../../../../node_modules/nuqs/dist/adapters/next/app.js"],"sourcesContent":["'use client';\n\nimport { useNuqsNextAppRouterAdapter } from '../../chunk-C3RNEY2H.js';\nimport { createAdapterProvider } from '../../chunk-5WWTJYGR.js';\n\n// src/adapters/next/app.ts\nvar NuqsAdapter = createAdapterProvider(useNuqsNextAppRouterAdapter);\n\nexport { NuqsAdapter };\n"],"names":[],"mappings":";;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACG,CAAA,CAAA,CAAA,CAAC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;","x_google_ignoreList":[0]}
@@ -0,0 +1,119 @@
1
+ import { createElement, createContext } from 'react';
2
+
3
+ // src/errors.ts
4
+ var errors = {
5
+ 303: "Multiple adapter contexts detected. This might happen in monorepos.",
6
+ 404: "nuqs requires an adapter to work with your framework.",
7
+ 409: "Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",
8
+ 414: "Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",
9
+ 429: "URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",
10
+ 500: "Empty search params cache. Search params can't be accessed in Layouts.",
11
+ 501: "Search params cache already populated. Have you called `parse` twice?"
12
+ };
13
+ function error(code) {
14
+ return `[nuqs] ${errors[code]}
15
+ See https://err.47ng.com/NUQS-${code}`;
16
+ }
17
+
18
+ // src/url-encoding.ts
19
+ function renderQueryString(search) {
20
+ if (search.size === 0) {
21
+ return "";
22
+ }
23
+ const query = [];
24
+ for (const [key, value] of search.entries()) {
25
+ const safeKey = key.replace(/#/g, "%23").replace(/&/g, "%26").replace(/\+/g, "%2B").replace(/=/g, "%3D").replace(/\?/g, "%3F");
26
+ query.push(`${safeKey}=${encodeQueryValue(value)}`);
27
+ }
28
+ const queryString = "?" + query.join("&");
29
+ warnIfURLIsTooLong(queryString);
30
+ return queryString;
31
+ }
32
+ function encodeQueryValue(input) {
33
+ return input.replace(/%/g, "%25").replace(/\+/g, "%2B").replace(/ /g, "+").replace(/#/g, "%23").replace(/&/g, "%26").replace(/"/g, "%22").replace(/'/g, "%27").replace(/`/g, "%60").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/[\x00-\x1F]/g, (char) => encodeURIComponent(char));
34
+ }
35
+ var URL_MAX_LENGTH = 2e3;
36
+ function warnIfURLIsTooLong(queryString) {
37
+ if (process.env.NODE_ENV === "production") {
38
+ return;
39
+ }
40
+ if (typeof location === "undefined") {
41
+ return;
42
+ }
43
+ const url = new URL(location.href);
44
+ url.search = queryString;
45
+ if (url.href.length > URL_MAX_LENGTH) {
46
+ console.warn(error(414));
47
+ }
48
+ }
49
+
50
+ // src/debug.ts
51
+ var debugEnabled = isDebugEnabled();
52
+ function debug(message, ...args) {
53
+ if (!debugEnabled) {
54
+ return;
55
+ }
56
+ const msg = sprintf(message, ...args);
57
+ performance.mark(msg);
58
+ try {
59
+ console.log(message, ...args);
60
+ } catch (error2) {
61
+ console.log(msg);
62
+ }
63
+ }
64
+ function sprintf(base, ...args) {
65
+ return base.replace(/%[sfdO]/g, (match) => {
66
+ const arg = args.shift();
67
+ if (match === "%O" && arg) {
68
+ return JSON.stringify(arg).replace(/"([^"]+)":/g, "$1:");
69
+ } else {
70
+ return String(arg);
71
+ }
72
+ });
73
+ }
74
+ function isDebugEnabled() {
75
+ try {
76
+ if (typeof localStorage === "undefined") {
77
+ return false;
78
+ }
79
+ const test = "nuqs-localStorage-test";
80
+ localStorage.setItem(test, test);
81
+ const isStorageAvailable = localStorage.getItem(test) === test;
82
+ localStorage.removeItem(test);
83
+ if (!isStorageAvailable) {
84
+ return false;
85
+ }
86
+ } catch (error2) {
87
+ console.error(
88
+ "[nuqs]: debug mode is disabled (localStorage unavailable).",
89
+ error2
90
+ );
91
+ return false;
92
+ }
93
+ const debug2 = localStorage.getItem("debug") ?? "";
94
+ return debug2.includes("nuqs");
95
+ }
96
+
97
+ // src/adapters/lib/context.ts
98
+ var context = createContext({
99
+ useAdapter() {
100
+ throw new Error(error(404));
101
+ }
102
+ });
103
+ context.displayName = "NuqsAdapterContext";
104
+ if (debugEnabled && typeof window !== "undefined") {
105
+ if (window.__NuqsAdapterContext && window.__NuqsAdapterContext !== context) {
106
+ console.error(error(303));
107
+ }
108
+ window.__NuqsAdapterContext = context;
109
+ }
110
+ function createAdapterProvider(useAdapter2) {
111
+ return ({ children, ...props }) => createElement(
112
+ context.Provider,
113
+ { ...props, value: { useAdapter: useAdapter2 } },
114
+ children
115
+ );
116
+ }
117
+
118
+ export { context, createAdapterProvider, debug, error, renderQueryString };
119
+ //# sourceMappingURL=chunk-5WWTJYGR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-5WWTJYGR.js","sources":["../../../../../node_modules/nuqs/dist/chunk-5WWTJYGR.js"],"sourcesContent":["import { createContext, createElement, useContext } from 'react';\n\n// src/errors.ts\nvar errors = {\n 303: \"Multiple adapter contexts detected. This might happen in monorepos.\",\n 404: \"nuqs requires an adapter to work with your framework.\",\n 409: \"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.\",\n 414: \"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.\",\n 429: \"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O\",\n 500: \"Empty search params cache. Search params can't be accessed in Layouts.\",\n 501: \"Search params cache already populated. Have you called `parse` twice?\"\n};\nfunction error(code) {\n return `[nuqs] ${errors[code]}\n See https://err.47ng.com/NUQS-${code}`;\n}\n\n// src/url-encoding.ts\nfunction renderQueryString(search) {\n if (search.size === 0) {\n return \"\";\n }\n const query = [];\n for (const [key, value] of search.entries()) {\n const safeKey = key.replace(/#/g, \"%23\").replace(/&/g, \"%26\").replace(/\\+/g, \"%2B\").replace(/=/g, \"%3D\").replace(/\\?/g, \"%3F\");\n query.push(`${safeKey}=${encodeQueryValue(value)}`);\n }\n const queryString = \"?\" + query.join(\"&\");\n warnIfURLIsTooLong(queryString);\n return queryString;\n}\nfunction encodeQueryValue(input) {\n return input.replace(/%/g, \"%25\").replace(/\\+/g, \"%2B\").replace(/ /g, \"+\").replace(/#/g, \"%23\").replace(/&/g, \"%26\").replace(/\"/g, \"%22\").replace(/'/g, \"%27\").replace(/`/g, \"%60\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/[\\x00-\\x1F]/g, (char) => encodeURIComponent(char));\n}\nvar URL_MAX_LENGTH = 2e3;\nfunction warnIfURLIsTooLong(queryString) {\n if (process.env.NODE_ENV === \"production\") {\n return;\n }\n if (typeof location === \"undefined\") {\n return;\n }\n const url = new URL(location.href);\n url.search = queryString;\n if (url.href.length > URL_MAX_LENGTH) {\n console.warn(error(414));\n }\n}\n\n// src/debug.ts\nvar debugEnabled = isDebugEnabled();\nfunction debug(message, ...args) {\n if (!debugEnabled) {\n return;\n }\n const msg = sprintf(message, ...args);\n performance.mark(msg);\n try {\n console.log(message, ...args);\n } catch (error2) {\n console.log(msg);\n }\n}\nfunction warn(message, ...args) {\n if (!debugEnabled) {\n return;\n }\n console.warn(message, ...args);\n}\nfunction sprintf(base, ...args) {\n return base.replace(/%[sfdO]/g, (match) => {\n const arg = args.shift();\n if (match === \"%O\" && arg) {\n return JSON.stringify(arg).replace(/\"([^\"]+)\":/g, \"$1:\");\n } else {\n return String(arg);\n }\n });\n}\nfunction isDebugEnabled() {\n try {\n if (typeof localStorage === \"undefined\") {\n return false;\n }\n const test = \"nuqs-localStorage-test\";\n localStorage.setItem(test, test);\n const isStorageAvailable = localStorage.getItem(test) === test;\n localStorage.removeItem(test);\n if (!isStorageAvailable) {\n return false;\n }\n } catch (error2) {\n console.error(\n \"[nuqs]: debug mode is disabled (localStorage unavailable).\",\n error2\n );\n return false;\n }\n const debug2 = localStorage.getItem(\"debug\") ?? \"\";\n return debug2.includes(\"nuqs\");\n}\n\n// src/adapters/lib/context.ts\nvar context = createContext({\n useAdapter() {\n throw new Error(error(404));\n }\n});\ncontext.displayName = \"NuqsAdapterContext\";\nif (debugEnabled && typeof window !== \"undefined\") {\n if (window.__NuqsAdapterContext && window.__NuqsAdapterContext !== context) {\n console.error(error(303));\n }\n window.__NuqsAdapterContext = context;\n}\nfunction createAdapterProvider(useAdapter2) {\n return ({ children, ...props }) => createElement(\n context.Provider,\n { ...props, value: { useAdapter: useAdapter2 } },\n children\n );\n}\nfunction useAdapter() {\n const value = useContext(context);\n if (!(\"useAdapter\" in value)) {\n throw new Error(error(404));\n }\n return value.useAdapter();\n}\n\nexport { context, createAdapterProvider, debug, error, renderQueryString, useAdapter, warn };\n"],"names":[],"mappings":";;AAEA;AACA,IAAI,MAAM,GAAG;AACb,EAAE,GAAG,EAAE,qEAAqE;AAC5E,EAAE,GAAG,EAAE,uDAAuD;AAC9D,EAAE,GAAG,EAAE,kKAAkK;AACzK,EAAE,GAAG,EAAE,0IAA0I;AACjJ,EAAE,GAAG,EAAE,8FAA8F;AACrG,EAAE,GAAG,EAAE,wEAAwE;AAC/E,EAAE,GAAG,EAAE;AACP,CAAC;AACD,SAAS,KAAK,CAAC,IAA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I,YAAY,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACnD,EAAE,IAAI,MAAM,CAAC,oBAAoB,IAAI,MAAM,CAAC,oBAAoB,KAAK,OAAO,EAAE;AAC9E,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7B;AACA,EAAE,MAAM,CAAC,oBAAoB,GAAG,OAAO;AACvC;AACA,SAAS,qBAAqB,CAAC,WAAW,EAAE;AAC5C,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAAK,aAAa;AAClD,IAAI,OAAO,CAAC,QAAQ;AACpB,IAAI,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE;AACpD,IAAI;AACJ,GAAG;AACH;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,50 @@
1
+ import { debug, renderQueryString } from './chunk-5WWTJYGR.js';
2
+ import { useRouter, useSearchParams } from 'next/navigation';
3
+ import { useOptimistic, useCallback, startTransition } from 'react';
4
+
5
+ function useNuqsNextAppRouterAdapter() {
6
+ const router = useRouter();
7
+ const searchParams = useSearchParams();
8
+ const [optimisticSearchParams, setOptimisticSearchParams] = useOptimistic(searchParams);
9
+ const updateUrl = useCallback((search, options) => {
10
+ startTransition(() => {
11
+ if (!options.shallow) {
12
+ setOptimisticSearchParams(search);
13
+ }
14
+ const url = renderURL(location.origin + location.pathname, search);
15
+ debug("[nuqs queue (app)] Updating url: %s", url);
16
+ const updateMethod = options.history === "push" ? history.pushState : history.replaceState;
17
+ updateMethod.call(
18
+ history,
19
+ // In next@14.1.0, useSearchParams becomes reactive to shallow updates,
20
+ // but only if passing `null` as the history state.
21
+ null,
22
+ "",
23
+ url
24
+ );
25
+ if (options.scroll) {
26
+ window.scrollTo(0, 0);
27
+ }
28
+ if (!options.shallow) {
29
+ router.replace(url, {
30
+ scroll: false
31
+ });
32
+ }
33
+ });
34
+ }, []);
35
+ return {
36
+ searchParams: optimisticSearchParams,
37
+ updateUrl,
38
+ // See: https://github.com/47ng/nuqs/issues/603#issuecomment-2317057128
39
+ rateLimitFactor: 2
40
+ };
41
+ }
42
+ function renderURL(base, search) {
43
+ const hashlessBase = base.split("#")[0] ?? "";
44
+ const query = renderQueryString(search);
45
+ const hash = location.hash;
46
+ return hashlessBase + query + hash;
47
+ }
48
+
49
+ export { useNuqsNextAppRouterAdapter };
50
+ //# sourceMappingURL=chunk-C3RNEY2H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-C3RNEY2H.js","sources":["../../../../../node_modules/nuqs/dist/chunk-C3RNEY2H.js"],"sourcesContent":["import { debug, renderQueryString } from './chunk-5WWTJYGR.js';\nimport { useRouter, useSearchParams } from 'next/navigation';\nimport { useOptimistic, useCallback, startTransition } from 'react';\n\nfunction useNuqsNextAppRouterAdapter() {\n const router = useRouter();\n const searchParams = useSearchParams();\n const [optimisticSearchParams, setOptimisticSearchParams] = useOptimistic(searchParams);\n const updateUrl = useCallback((search, options) => {\n startTransition(() => {\n if (!options.shallow) {\n setOptimisticSearchParams(search);\n }\n const url = renderURL(location.origin + location.pathname, search);\n debug(\"[nuqs queue (app)] Updating url: %s\", url);\n const updateMethod = options.history === \"push\" ? history.pushState : history.replaceState;\n updateMethod.call(\n history,\n // In next@14.1.0, useSearchParams becomes reactive to shallow updates,\n // but only if passing `null` as the history state.\n null,\n \"\",\n url\n );\n if (options.scroll) {\n window.scrollTo(0, 0);\n }\n if (!options.shallow) {\n router.replace(url, {\n scroll: false\n });\n }\n });\n }, []);\n return {\n searchParams: optimisticSearchParams,\n updateUrl,\n // See: https://github.com/47ng/nuqs/issues/603#issuecomment-2317057128\n rateLimitFactor: 2\n };\n}\nfunction renderURL(base, search) {\n const hashlessBase = base.split(\"#\")[0] ?? \"\";\n const query = renderQueryString(search);\n const hash = location.hash;\n return hashlessBase + query + hash;\n}\n\nexport { useNuqsNextAppRouterAdapter };\n"],"names":[],"mappings":";;;;A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AE;AACjC,EAAE,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;AAC/C,EAAE,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC;AACzC,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI;AAC5B,EAAE,OAAO,YAAY,GAAG,KAAK,GAAG,IAAI;AACpC;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,128 @@
1
+ export declare const BrandsCmet: Readonly<{
2
+ cmet_dark: "/brands/cmet/cmet_dark.svg";
3
+ cmet_light: "/brands/cmet/cmet_light.svg";
4
+ }>;
5
+ export declare const BrandsMunicipalities: Readonly<{
6
+ alcochete: "/brands/municipalities/alcochete.jpg";
7
+ alenquer: "/brands/municipalities/alenquer.jpg";
8
+ almada: "/brands/municipalities/almada.jpg";
9
+ amadora: "/brands/municipalities/amadora.jpg";
10
+ arruda_vinhos: "/brands/municipalities/arruda_vinhos.jpg";
11
+ barreiro: "/brands/municipalities/barreiro.jpg";
12
+ cascais: "/brands/municipalities/cascais.jpg";
13
+ lisboa: "/brands/municipalities/lisboa.jpg";
14
+ loures: "/brands/municipalities/loures.jpg";
15
+ mafra: "/brands/municipalities/mafra.jpg";
16
+ moita: "/brands/municipalities/moita.jpg";
17
+ montijo: "/brands/municipalities/montijo.jpg";
18
+ odivelas: "/brands/municipalities/odivelas.jpg";
19
+ oeiras: "/brands/municipalities/oeiras.jpg";
20
+ palmela: "/brands/municipalities/palmela.jpg";
21
+ seixal: "/brands/municipalities/seixal.jpg";
22
+ sesimbra: "/brands/municipalities/sesimbra.jpg";
23
+ setubal: "/brands/municipalities/setubal.jpg";
24
+ sintra: "/brands/municipalities/sintra.jpg";
25
+ sobral_monte_agraco: "/brands/municipalities/sobral_monte_agraco.jpg";
26
+ torres_vedras: "/brands/municipalities/torres_vedras.jpg";
27
+ vendas_novas: "/brands/municipalities/vendas_novas.jpg";
28
+ vila_franca_xira: "/brands/municipalities/vila_franca_xira.jpg";
29
+ }>;
30
+ export declare const BrandsOperators: Readonly<{
31
+ atlantic_ferries: "/icons/operators/atlantic_ferries.svg";
32
+ ccfl: "/icons/operators/ccfl.svg";
33
+ cmet: "/icons/operators/cmet.svg";
34
+ cp: "/icons/operators/cp.svg";
35
+ fertagus: "/icons/operators/fertagus.svg";
36
+ metro: "/icons/operators/metro.svg";
37
+ mobi_cascais: "/icons/operators/mobi_cascais.svg";
38
+ mts: "/icons/operators/mts.svg";
39
+ tcb: "/icons/operators/tcb.svg";
40
+ ttsl: "/icons/operators/ttsl.svg";
41
+ }>;
42
+ /**
43
+ * Icons used by alerts
44
+ */
45
+ export declare const IconsSocial: Readonly<{
46
+ facebook: "/icons/social/social-facebook.svg";
47
+ instagram: "/icons/social/social-instagram.svg";
48
+ whatsapp: "/icons/social/social-whatsapp.svg";
49
+ x: "/icons/social/social-twitter.svg";
50
+ }>;
51
+ export declare const IconsFacilities: Readonly<{
52
+ court: "/icons/facilities/court.svg";
53
+ fire_station: "/icons/facilities/fire_station.svg";
54
+ health_center: "/icons/facilities/health_center.svg";
55
+ hospital: "/icons/facilities/hospital.svg";
56
+ park: "/icons/facilities/park.svg";
57
+ police_station: "/icons/facilities/police_station.svg";
58
+ school: "/icons/facilities/school.svg";
59
+ transit_office: "/icons/facilities/transit_office.svg";
60
+ university: "/icons/facilities/university.svg";
61
+ }>;
62
+ export declare const IconsConnections: Readonly<{
63
+ bike_parking: "/icons/connections/bike_parking.svg";
64
+ boat: "/icons/connections/boat.svg";
65
+ bus: "/icons/connections/bus.svg";
66
+ car_parking: "/icons/connections/car_parking.svg";
67
+ light_rail: "/icons/connections/light_rail.svg";
68
+ subway: "/icons/connections/subway.svg";
69
+ train: "/icons/connections/train.svg";
70
+ }>;
71
+ export declare const IconsMap: Readonly<{
72
+ bus_delay: "/icons/map/bus_delay.png";
73
+ bus_error: "/icons/map/bus_error.png";
74
+ bus_regular: "/icons/map/bus_regular.png";
75
+ pin: "/icons/map/pin.png";
76
+ shape_direction: "/icons/map/shape_direction.png";
77
+ stop_selected: "/icons/map/stop_selected.png";
78
+ store_busy: "/icons/map/store_busy.png";
79
+ store_closed: "/icons/map/store_closed.png";
80
+ store_open: "/icons/map/store_open.png";
81
+ }>;
82
+ export declare const IconsCommon: Readonly<{
83
+ AML_MAP: "/icons/common/aml-map.svg";
84
+ AML_MAP_OPERATORS: "/icons/common/aml-map-with-operators.svg";
85
+ AML_MAP_SINGLE: "/icons/common/aml-map-single.svg";
86
+ LINE_BADGE_BASE: "/icons/common/line-badge-base.svg";
87
+ LIVRO_RECLAMACOES: "/icons/common/livro-de-reclamacoes.svg";
88
+ MULTIBANCO_DARK: "/icons/common/multibanco-dark.svg";
89
+ MULTIBANCO_LIGHT: "/icons/common/multibanco-light.svg";
90
+ NAVEGANTE_APP: "/icons/common/app-navegante.svg";
91
+ NAVEGANTE_POINT: "/icons/common/espaco-navegante.svg";
92
+ PAYSHOP: "/icons/common/payshop.png";
93
+ QUESTION: "/icons/common/question.svg";
94
+ RECEIPT: "/icons/common/receipt.svg";
95
+ SAFARI_PINNED_TAB: "/icons/common/safari-pinned-tab.svg";
96
+ TICKET: "/icons/common/ticket.svg";
97
+ }>;
98
+ export declare const IconsMobile: Readonly<{
99
+ MOBILE_ANDROID_192: "/icons/mobile/android-chrome-192x192.png";
100
+ MOBILE_ANDROID_512: "/icons/mobile/android-chrome-512x512.png";
101
+ MOBILE_APPLE: "/icons/mobile/apple-touch-icon.pmg";
102
+ }>;
103
+ export declare const ImagesCommon: Readonly<{
104
+ AREA1: "/images/common/area1.svg";
105
+ AREA2: "/images/common/area2.svg";
106
+ AREA3: "/images/common/area3.svg";
107
+ AREA4: "/images/common/area4.svg";
108
+ COINS: "/images/common/coins.svg";
109
+ NAVEGANTE_CARD: "/images/common/navegante-card.png";
110
+ NAVEGANTE_OCASIONAL: "/images/common/navegante-occasional.png";
111
+ PLACEHOLDER: "/images/common/placeholder.png";
112
+ }>;
113
+ export declare const ImagesHome: Readonly<{
114
+ CASO_DE_ESTUDO_LOURES: "/images/home/caso-de-estudo-loures.png";
115
+ DRIVERS: "/images/home/drivers.png";
116
+ }>;
117
+ export declare const Images: Readonly<{
118
+ CASO_DE_ESTUDO_LOURES: "/images/home/caso-de-estudo-loures.png";
119
+ DRIVERS: "/images/home/drivers.png";
120
+ AREA1: "/images/common/area1.svg";
121
+ AREA2: "/images/common/area2.svg";
122
+ AREA3: "/images/common/area3.svg";
123
+ AREA4: "/images/common/area4.svg";
124
+ COINS: "/images/common/coins.svg";
125
+ NAVEGANTE_CARD: "/images/common/navegante-card.png";
126
+ NAVEGANTE_OCASIONAL: "/images/common/navegante-occasional.png";
127
+ PLACEHOLDER: "/images/common/placeholder.png";
128
+ }>;
@@ -0,0 +1,36 @@
1
+ /* * */
2
+ /* * */
3
+ const IconsMap = Object.freeze({
4
+ bus_delay: '/icons/map/bus_delay.png',
5
+ bus_error: '/icons/map/bus_error.png',
6
+ bus_regular: '/icons/map/bus_regular.png',
7
+ pin: '/icons/map/pin.png',
8
+ shape_direction: '/icons/map/shape_direction.png',
9
+ stop_selected: '/icons/map/stop_selected.png',
10
+ store_busy: '/icons/map/store_busy.png',
11
+ store_closed: '/icons/map/store_closed.png',
12
+ store_open: '/icons/map/store_open.png',
13
+ });
14
+ /* * */
15
+ // Images
16
+ const ImagesCommon = Object.freeze({
17
+ AREA1: '/images/common/area1.svg',
18
+ AREA2: '/images/common/area2.svg',
19
+ AREA3: '/images/common/area3.svg',
20
+ AREA4: '/images/common/area4.svg',
21
+ COINS: '/images/common/coins.svg',
22
+ NAVEGANTE_CARD: '/images/common/navegante-card.png',
23
+ NAVEGANTE_OCASIONAL: '/images/common/navegante-occasional.png',
24
+ PLACEHOLDER: '/images/common/placeholder.png',
25
+ });
26
+ const ImagesHome = Object.freeze({
27
+ CASO_DE_ESTUDO_LOURES: '/images/home/caso-de-estudo-loures.png',
28
+ DRIVERS: '/images/home/drivers.png',
29
+ });
30
+ Object.freeze({
31
+ ...ImagesCommon,
32
+ ...ImagesHome,
33
+ });
34
+
35
+ export { IconsMap, ImagesCommon, ImagesHome };
36
+ //# sourceMappingURL=assets.settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.settings.js","sources":["../../../../src/settings/assets.settings.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AAiFA;AAEa,MAAA,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;AACrC,IAAA,SAAS,EAAE,0BAA0B;AACrC,IAAA,SAAS,EAAE,0BAA0B;AACrC,IAAA,WAAW,EAAE,4BAA4B;AACzC,IAAA,GAAG,EAAE,oBAAoB;AACzB,IAAA,eAAe,EAAE,gCAAgC;AACjD,IAAA,aAAa,EAAE,8BAA8B;AAC7C,IAAA,UAAU,EAAE,2BAA2B;AACvC,IAAA,YAAY,EAAE,6BAA6B;AAC3C,IAAA,UAAU,EAAE,2BAA2B;AACvC,CAAA;AAyBD;AAEA;AAEa,MAAA,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;AACzC,IAAA,KAAK,EAAE,0BAA0B;AACjC,IAAA,KAAK,EAAE,0BAA0B;AACjC,IAAA,KAAK,EAAE,0BAA0B;AACjC,IAAA,KAAK,EAAE,0BAA0B;AACjC,IAAA,KAAK,EAAE,0BAA0B;AACjC,IAAA,cAAc,EAAE,mCAAmC;AACnD,IAAA,mBAAmB,EAAE,yCAAyC;AAC9D,IAAA,WAAW,EAAE,gCAAgC;AAC7C,CAAA;AAEY,MAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;AACvC,IAAA,qBAAqB,EAAE,wCAAwC;AAC/D,IAAA,OAAO,EAAE,0BAA0B;AACnC,CAAA;AAEqB,MAAM,CAAC,MAAM,CAAC;AACnC,IAAA,GAAG,YAAY;AACf,IAAA,GAAG,UAAU;AACb,CAAA;;;;"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * The default values for the map.
3
+ */
4
+ export declare const mapDefaultValues: Readonly<{
5
+ bearing: 0;
6
+ duration: 1800;
7
+ latitude: 38.7;
8
+ longitude: -9;
9
+ picth: 0;
10
+ speed: 4000;
11
+ zoom: 12;
12
+ zoom_margin: 3;
13
+ zoom_max: 20;
14
+ zoom_min: 5;
15
+ }>;
16
+ /**
17
+ * The available styles for the map.
18
+ */
19
+ export declare const mapDefaultStyles: Readonly<{
20
+ map: "https://maps.carrismetropolitana.pt/styles/default/style.json";
21
+ satellite: {
22
+ glyphs: string;
23
+ layers: {
24
+ id: string;
25
+ source: string;
26
+ type: string;
27
+ }[];
28
+ maxZoom: number;
29
+ minZoom: number;
30
+ sources: {
31
+ 'raster-tiles': {
32
+ attribution: string;
33
+ tiles: string[];
34
+ tileSize: number;
35
+ type: string;
36
+ };
37
+ };
38
+ version: number;
39
+ };
40
+ }>;
41
+ /**
42
+ * The configuration object for the map.
43
+ */
44
+ export declare const mapDefaultConfig: Readonly<{
45
+ center: (38.7 | -9)[];
46
+ initialViewState: {
47
+ bearing: 0;
48
+ latitude: 38.7;
49
+ longitude: -9;
50
+ pitch: 0;
51
+ zoom: 12;
52
+ };
53
+ maxZoom: 20;
54
+ minZoom: 5;
55
+ styles: {
56
+ default: "https://maps.carrismetropolitana.pt/styles/default/style.json";
57
+ map: "https://maps.carrismetropolitana.pt/styles/default/style.json";
58
+ satellite: {
59
+ glyphs: string;
60
+ layers: {
61
+ id: string;
62
+ source: string;
63
+ type: string;
64
+ }[];
65
+ maxZoom: number;
66
+ minZoom: number;
67
+ sources: {
68
+ 'raster-tiles': {
69
+ attribution: string;
70
+ tiles: string[];
71
+ tileSize: number;
72
+ type: string;
73
+ };
74
+ };
75
+ version: number;
76
+ };
77
+ };
78
+ viewport: {
79
+ bearing: 0;
80
+ center: (38.7 | -9)[];
81
+ pitch: 0;
82
+ zoom: 12;
83
+ };
84
+ }>;
@@ -0,0 +1,74 @@
1
+ /* * */
2
+ /**
3
+ * The default values for the map.
4
+ */
5
+ const mapDefaultValues = Object.freeze({
6
+ bearing: 0,
7
+ duration: 1800,
8
+ latitude: 38.7,
9
+ longitude: -9,
10
+ picth: 0,
11
+ speed: 4000,
12
+ zoom: 12,
13
+ zoom_margin: 3,
14
+ zoom_max: 20,
15
+ zoom_min: 5,
16
+ });
17
+ /* * */
18
+ /**
19
+ * The available styles for the map.
20
+ */
21
+ const mapDefaultStyles = Object.freeze({
22
+ map: 'https://maps.carrismetropolitana.pt/styles/default/style.json',
23
+ satellite: {
24
+ glyphs: '{fontstack}/{range}.pbf',
25
+ layers: [
26
+ {
27
+ id: 'simple-tiles',
28
+ source: 'raster-tiles',
29
+ type: 'raster',
30
+ },
31
+ ],
32
+ maxZoom: 18,
33
+ minZoom: 5,
34
+ sources: {
35
+ 'raster-tiles': {
36
+ attribution: 'Esri, Maxar, Earthstar Geographics, and the GIS User Community',
37
+ tiles: ['https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'],
38
+ tileSize: 256,
39
+ type: 'raster',
40
+ },
41
+ },
42
+ version: 8,
43
+ },
44
+ });
45
+ /* * */
46
+ /**
47
+ * The configuration object for the map.
48
+ */
49
+ const mapDefaultConfig = Object.freeze({
50
+ center: [mapDefaultValues.longitude, mapDefaultValues.latitude],
51
+ initialViewState: {
52
+ bearing: mapDefaultValues.bearing,
53
+ latitude: mapDefaultValues.latitude,
54
+ longitude: mapDefaultValues.longitude,
55
+ pitch: mapDefaultValues.picth,
56
+ zoom: mapDefaultValues.zoom,
57
+ },
58
+ maxZoom: mapDefaultValues.zoom_max,
59
+ minZoom: mapDefaultValues.zoom_min,
60
+ styles: {
61
+ default: mapDefaultStyles.map,
62
+ map: mapDefaultStyles.map,
63
+ satellite: mapDefaultStyles.satellite,
64
+ },
65
+ viewport: {
66
+ bearing: mapDefaultValues.bearing,
67
+ center: [mapDefaultValues.longitude, mapDefaultValues.latitude],
68
+ pitch: mapDefaultValues.picth,
69
+ zoom: mapDefaultValues.zoom,
70
+ },
71
+ });
72
+
73
+ export { mapDefaultConfig, mapDefaultStyles, mapDefaultValues };
74
+ //# sourceMappingURL=map.settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.settings.js","sources":["../../../../src/settings/map.settings.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AAEA;;AAEG;AAEU,MAAA,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7C,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,EAAI;AACf,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,WAAW,EAAE,CAAC;AACd,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,QAAQ,EAAE,CAAC;AACX,CAAA;AAED;AAEA;;AAEG;AAEU,MAAA,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7C,IAAA,GAAG,EAAE,+DAA+D;AACpE,IAAA,SAAS,EAAE;AACV,QAAA,MAAM,EAAE,yBAAyB;AACjC,QAAA,MAAM,EAAE;AACP,YAAA;AACC,gBAAA,EAAE,EAAE,cAAc;AAClB,gBAAA,MAAM,EAAE,cAAc;AACtB,gBAAA,IAAI,EAAE,QAAQ;AACd,aAAA;AACD,SAAA;AACD,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,OAAO,EAAE;AACR,YAAA,cAAc,EAAE;AACf,gBAAA,WAAW,EAAE,gEAAgE;gBAC7E,KAAK,EAAE,CAAC,+FAA+F,CAAC;AACxG,gBAAA,QAAQ,EAAE,GAAG;AACb,gBAAA,IAAI,EAAE,QAAQ;AACd,aAAA;AACD,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;AACV,KAAA;AACD,CAAA;AAED;AAEA;;AAEG;AAEU,MAAA,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,CAAC,gBAA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