Benutzer:Nw520/vCaTA.js

Aus Wikivoyage
Zur Navigation springen Zur Suche springen

Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen sehen zu können.

  • Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
  • Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
  • Internet Explorer: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Gehe zu Menü → Einstellungen (Opera → Einstellungen auf dem Mac) und dann auf Datenschutz & Sicherheit → Browserdaten löschen → Gespeicherte Bilder und Dateien.
$.when(mw.loader.using('mediawiki.util'), $.ready).then(function () { 
	// Constants, see https://de.wikivoyage.org/wiki/MediaWiki:ListingEditor.js
	var GROUP_PROPERTIES = [
		{ group: 'other', label: 'Anderes', color: '#228B22' }, // forestgreen
		{ group: 'go', label: 'Anreise', color: '#A52A2A' }, // brown
		{ group: 'do', label: 'Aktivität', color: '#808080' }, // grey
		{ group: 'view', label: 'Aussicht', color: '#4169E1' }, // royalblue
		{ group: 'populated', label: 'Besiedeltes Gebiet', color: '#0000FF' }, // blue
		{ group: 'buy', label: 'Einkaufen', color: '#008080' }, // teal
		{ group: 'eat', label: 'Essen', color: '#D2691E' }, // chocolate
		{ group: 'area', label: 'Gebiet', color: '#0000FF' }, // maroon
		{ group: 'see', label: 'Sehenswürdigkeit', color: '#4682B4' }, // steelblue
		{ group: 'drink', label: 'Trinken', color: '#000000' }, //black
		{ group: 'sleep', label: 'Unterkunft', color: '#000080' }, // dark blue

		{ group: 'mediumaquamarine', label: 'Aquamarinblau', color: '#66CDAA' },
		{ group: 'blue', label: 'Blau', color: '#0000FF' },
		{ group: 'teal', label: 'Blaugrün', color: '#008080' },
		{ group: 'brown', label: 'Braun', color: '#A52A2A' },
		{ group: 'cosmos', label: 'Cosmos', color: '#FFCFCF' },
		{ group: 'gold', label: 'Gold', color: '#FFD700' },
		{ group: 'grey', label: 'Grau', color: '#808080' },
		{ group: 'lime', label: 'Hellgrün', color: '#BFFF00' },
		{ group: 'royalblue', label: 'Königsblau', color: '#4169E1' },
		{ group: 'magenta', label: 'Magentarot', color: '#FF00FF' },
		{ group: 'navy', label: 'Marineblau', color: '#000080' },
		{ group: 'orange', label: 'Orange', color: '#FFA500' },
		{ group: 'plum', label: 'Pflaumenblau', color: '#DDA0DD' },
		{ group: 'fuchsia', label: 'Purpurrot', color: '#FF00FF' },
		{ group: 'red', label: 'Rot', color: '#FF0000' },
		{ group: 'maroon', label: 'Rotbraun', color: '#800000' },
		{ group: 'chocolate', label: 'Schokobraun', color: '#D2691E' },
		{ group: 'black', label: 'Schwarz', color: '#000000' },
		{ group: 'silver', label: 'Silber', color: '#C0C0C0' },
		{ group: 'steelblue', label: 'Stahlblau', color: '#4682B4' },
		{ group: 'purple', label: 'Violett', color: '#800080' },
		{ group: 'forestgreen', label: 'Waldgrün', color: '#228B22' }
	];
	
	var LISTING_TYPE_OPTIONS = [
		// journey and mobility
		
		{ 'type': 'aerialway', group: 'go', label: 'Seilbahn' },
		{ 'type': 'airline', group: 'go', label: 'Fluggesellschaft' },
		{ 'type': 'airport', group: 'go', label: 'Flughafen' },
		{ 'type': 'airport_service', group: 'go', label: 'Flughafendienste' },
		{ 'type': 'bicycle_parking', group: 'go', label: 'Fahrradparkplatz' },
		{ 'type': 'boat_sharing', group: 'go', label: 'Boot-Sharing/Charter' },
		{ 'type': 'border_control', group: 'go', label: 'Grenzkontrolle' },
		{ 'type': 'bus', group: 'go', label: 'Bus' },
		{ 'type': 'car_rental', group: 'go', label: 'Autoverleih' },
		{ 'type': 'car_repair', group: 'go', label: 'Autowerkstatt' },
		{ 'type': 'car_sharing', group: 'go', label: 'Car Sharing' },
		{ 'type': 'ferry', group: 'go', label: 'Fähre' },
		{ 'type': 'fuel', group: 'go', label: 'Tankstelle' },
		{ 'type': 'landing_site', group: 'go', label: 'Landeplatz' },
		{ 'type': 'left_luggage', group: 'go', label: 'Gepäckaufbewahrung' },
		{ 'type': 'marina', group: 'go', label: 'Yachthafen' },
		{ 'type': 'motorbike_rental', group: 'go', label: 'Motorradverleih' },
		{ 'type': 'motorway_junction', group: 'go', label: 'Ausfahrt' },
		{ 'type': 'parking', group: 'go', label: 'Parkplatz' },
		{ 'type': 'pier', group: 'go', label: 'Pier, Schiffsanleger' },
		{ 'type': 'port', group: 'go', label: 'Hafen' },
		{ 'type': 'public_transport', group: 'go', label: 'Öffentliche Verkehrsmittel' },
		{ 'type': 'quay', group: 'go', label: 'Kai, Schiffsanleger' },
		{ 'type': 'service_area', group: 'go', label: 'Raststätte, Autohof' },
		{ 'type': 'shipping_company', group: 'go', label: 'Schiffahrtsgesellschaft' },
		{ 'type': 'shuttle_bus_service', group: 'go', label: 'Shuttlebus-Service' },
		{ 'type': 'station', group: 'go', label: 'Station' },
		{ 'type': 'subway', group: 'go', label: 'U-Bahn' },
		{ 'type': 'taxi', group: 'go', label: 'Taxistand' },
		{ 'type': 'terminal', group: 'go', label: 'Terminal' },
		{ 'type': 'train', group: 'go', label: 'Bahnhof, Haltepunkt' },
		{ 'type': 'tram', group: 'go', label: 'Straßenbahn' },
		{ 'type': 'tunnel', group: 'go', label: 'Tunnel' },
		{ 'type': 'waiting_room', group: 'go', label: 'Warteraum' },
		{ 'type': 'waypoint', group: 'go', label: 'Wegpunkt' },
		{ 'type': 'go', group: 'go', label: 'Anreise' },

		// sights

		{ 'type': 'aquarium', group: 'see', label: 'Aquarium' },
		{ 'type': 'archaeological_site', group: 'see', label: 'Archäologische Stätte' },
		{ 'type': 'artwork', group: 'see', label: 'Kunstwerk' },
		{ 'type': 'barracks', group: 'see', label: 'Kaserne' },
		{ 'type': 'bay', group: 'see', label: 'Bucht' },
		{ 'type': 'botanical_garden', group: 'see', label: 'Botanischer Garten' },
		{ 'type': 'bridge', group: 'see', label: 'Brücke' },
		{ 'type': 'building', group: 'see', label: 'Gebäude' },
		{ 'type': 'bunker', group: 'see', label: 'Bunker' },
		{ 'type': 'canal', group: 'see', label: 'Kanal' },
		{ 'type': 'cannon', group: 'see', label: 'Kanone' },
		{ 'type': 'canyon', group: 'see', label: 'Canyon' },
		{ 'type': 'cape', group: 'see', label: 'Kap' },
		{ 'type': 'castle', group: 'see', label: 'Burg' },
		{ 'type': 'cathedral', group: 'see', label: 'Kathedrale' },
		{ 'type': 'cave', group: 'see', label: 'Höhle' },
		{ 'type': 'cemetery', group: 'see', label: 'Friedhof' },
		{ 'type': 'château', group: 'see', label: 'Schloss' },
		{ 'type': 'church', group: 'see', label: 'Kirche' },
		{ 'type': 'city_center', group: 'see', label: 'Stadtzentrum' },
		{ 'type': 'city_wall', group: 'see', label: 'Stadtmauer' },
		{ 'type': 'crocodile_farm', group: 'see', label: 'Krokodilfarm' },
		{ 'type': 'depression', group: 'see', label: 'Senke' },
		{ 'type': 'desert', group: 'see', label: 'Wüste' },
		{ 'type': 'dune', group: 'see', label: 'Düne' },
		{ 'type': 'dyke', group: 'see', label: 'Deich' },
		{ 'type': 'exhibition', group: 'see', label: 'Ausstellung' },
		{ 'type': 'factory', group: 'see', label: 'Fabrik' },
		{ 'type': 'farm', group: 'see', label: 'Bauernhof' },
		{ 'type': 'fjord', group: 'see', label: 'Fjord' },
		{ 'type': 'forest', group: 'see', label: 'Wald' },
		{ 'type': 'fort', group: 'see', label: 'Festung' },
		{ 'type': 'gallery', group: 'see', label: 'Galerie' },
		{ 'type': 'garden', group: 'see', label: 'Garten' },
		{ 'type': 'gate', group: 'see', label: 'Tor' },
		{ 'type': 'geyser', group: 'see', label: 'Geysir' },
		{ 'type': 'ghost_town', group: 'see', label: 'Geisterstadt' },
		{ 'type': 'glacier', group: 'see', label: 'Gletscher' },
		{ 'type': 'graduation_tower', group: 'see', label: 'Gradierwerk' },
		{ 'type': 'gulf', group: 'see', label: 'Golf (Bucht)' },
		{ 'type': 'habitat', group: 'see', label: 'Habitat' },
		{ 'type': 'hill', group: 'see', label: 'Hügel' },
		{ 'type': 'historic_district', group: 'see', label: 'historisches Viertel, Altstadt' },
		{ 'type': 'hot_spring', group: 'see', label: 'heiße Quelle' },
		{ 'type': 'house', group: 'see', label: 'Haus' },
		{ 'type': 'hydraulic_structure', group: 'see', label: 'Wasserbauwerk' },
		{ 'type': 'island', group: 'see', label: 'Insel' },
		{ 'type': 'lagoon', group: 'see', label: 'Lagune' },
		{ 'type': 'lake', group: 'see', label: 'See' },
		{ 'type': 'landmark', group: 'see', label: 'Wahrzeichen' },
		{ 'type': 'landscape', group: 'see', label: 'Landschaft' },
		{ 'type': 'lighthouse', group: 'see', label: 'Leuchtturm' },
		{ 'type': 'mangroves', group: 'see', label: 'Mangroven' },
		{ 'type': 'mausoleum', group: 'see', label: 'Mausoleum' },
		{ 'type': 'memorial', group: 'see', label: 'Denkmal' },
		{ 'type': 'mill', group: 'see', label: 'Mühle' },
		{ 'type': 'mine', group: 'see', label: 'Bergwerk' }, // including surface mining
		{ 'type': 'mining_museum', group: 'see', label: 'Bergbaumuseum' },
		{ 'type': 'monastery', group: 'see', label: 'Kloster' },
		{ 'type': 'monument', group: 'see', label: 'Monument' },
		{ 'type': 'mosque', group: 'see', label: 'Moschee' },
		{ 'type': 'mountain', group: 'see', label: 'Berg' },
		{ 'type': 'mountain_pass', group: 'see', label: 'Gebirgspass' },
		{ 'type': 'mountain_range', group: 'see', label: 'Gebirge' },
		{ 'type': 'museum', group: 'see', label: 'Museum' },
		{ 'type': 'museum_ship', group: 'see', label: 'Museumsschiff' },
		{ 'type': 'national_park', group: 'see', label: 'Nationalpark' },
		{ 'type': 'nature_reserve', group: 'see', label: 'Naturschutzgebiet' },
		{ 'type': 'nunnery', group: 'see', label: 'Nonnenkloster' },
		{ 'type': 'oasis', group: 'see', label: 'Oase' },
		{ 'type': 'observatory', group: 'see', label: 'Sternwarte' },
		{ 'type': 'open_air_museum', group: 'see', label: 'Freilichtmuseum' },
		{ 'type': 'pagoda', group: 'see', label: 'Pagode' },
		{ 'type': 'palace', group: 'see', label: 'Palast' },
		{ 'type': 'palaeontological_site', group: 'see', label: 'Paläontologische Stätte' },
		{ 'type': 'park', group: 'see', label: 'Park' },
		{ 'type': 'pedestrian', group: 'see', label: 'Fußgängerzone' },
		{ 'type': 'peninsula', group: 'see', label: 'Halbinsel' },
		{ 'type': 'planetarium', group: 'see', label: 'Planetarium' },
		{ 'type': 'plantation', group: 'see', label: 'Plantage' },
		{ 'type': 'power', group: 'see', label: 'Kraftwerk, Energie' }, // power station, transformers, towers etc.
		{ 'type': 'promenade', group: 'see', label: 'Promenade' },
		{ 'type': 'pyramid', group: 'see', label: 'Pyramide' },
		{ 'type': 'quarry', group: 'see', label: 'Steinbruch' },
		{ 'type': 'road', group: 'see', label: 'Straße' }, // including street and lane
		{ 'type': 'reef', group: 'see', label: 'Riff' },
		{ 'type': 'religious_site', group: 'see', label: 'Religiöse Stätte' },
		{ 'type': 'reservoir', group: 'see', label: 'Stausee' },
		{ 'type': 'river', group: 'see', label: 'Fluss' },
		{ 'type': 'river_mouth', group: 'see', label: 'Flussmündung' },
		{ 'type': 'rock', group: 'see', label: 'Felsen' },
		{ 'type': 'rock_art', group: 'see', label: 'Felsbild' },
		{ 'type': 'ruins', group: 'see', label: 'Ruinen' },
		{ 'type': 'shipyard', group: 'see', label: 'Werft' },
		{ 'type': 'spring', group: 'see', label: 'Quelle' },
		{ 'type': 'square', group: 'see', label: 'Platz' },
		{ 'type': 'strait', group: 'see', label: 'Meerenge' },
		{ 'type': 'stream', group: 'see', label: 'Bach' },
		{ 'type': 'stud', group: 'see', label: 'Gestüt' },
		{ 'type': 'summit', group: 'see', label: 'Gipfel' },
		{ 'type': 'synagogue', group: 'see', label: 'Synagoge' },
		{ 'type': 'temple', group: 'see', label: 'Tempel' },
		{ 'type': 'tomb', group: 'see', label: 'Grab' },
		{ 'type': 'tower', group: 'see', label: 'Turm' },
		{ 'type': 'town_hall', group: 'see', label: 'Rathaus' },
		{ 'type': 'tree', group: 'see', label: 'Baum' },
		{ 'type': 'tumulus', group: 'see', label: 'Tumulus' },
		{ 'type': 'valley', group: 'see', label: 'Tal' },
		{ 'type': 'volcano', group: 'see', label: 'Vulkan' },
		{ 'type': 'war_grave', group: 'see', label: 'Kriegsgrab' },
		{ 'type': 'waterfall', group: 'see', label: 'Wasserfall, Katarakt' },
		{ 'type': 'weather_station', group: 'see', label: 'Wetterstation' },
		{ 'type': 'well', group: 'see', label: 'Brunnen' },
		{ 'type': 'wetland', group: 'see', label: 'Feuchtgebiet' },
		{ 'type': 'wreck', group: 'see', label: 'Wrack' },
		{ 'type': 'zoo', group: 'see', label: 'Zoo, Tierpark' },
		{ 'type': 'see', group: 'see', label: 'Sehenswürdigkeit' },

		// culture

		{ 'type': 'arts_centre', group: 'do', label: 'Kulturzentrum' },
		{ 'type': 'bird_watching', group: 'do', label: 'Vogelbeobachtung' },
		{ 'type': 'cabaret', group: 'do', label: 'Cabaret' },
		{ 'type': 'cinema', group: 'do', label: 'Kino' },
		{ 'type': 'circus', group: 'do', label: 'Zirkus' },
		{ 'type': 'concert_hall', group: 'do', label: 'Konzerthaus' },
		{ 'type': 'edutainment', group: 'do', label: 'Edutainment' },
		{ 'type': 'event_venue', group: 'do', label: 'Veranstaltungszentrum' },
		{ 'type': 'fair', group: 'do', label: 'Messe' },
		{ 'type': 'festival', group: 'do', label: 'Festspiele' },
		{ 'type': 'music', group: 'do', label: 'Musikdarbietung' }, // different types of music theaters
		{ 'type': 'opera_house', group: 'do', label: 'Opernhaus' },
		{ 'type': 'puppet_theater', group: 'do', label: 'Puppentheater' },
		{ 'type': 'theater', group: 'do', label: 'Theater' }, // speech theater, theater in general
		{ 'type': 'themed_travel', group: 'do', label: 'Themenreisen' },
		{ 'type': 'wildlife_observation', group: 'do', label: 'Tierbeobachtung' },

		// recreation

		{ 'type': 'amusement_park', group: 'do', label: 'Vergnügungspark' },
		{ 'type': 'attraction', group: 'do', label: 'Attraktion' },
		{ 'type': 'ballooning', group: 'do', label: 'Ballonfahren' },
		{ 'type': 'casino', group: 'do', label: 'Spielbank, Casino' },
		{ 'type': 'conference_center', group: 'do', label: 'Tagungs- oder Konferenzzentrum' },
		{ 'type': 'dolphinarium', group: 'do', label: 'Delfinarium' },
		{ 'type': 'entertainment', group: 'do', label: 'Unterhaltung' },
		{ 'type': 'escape_game', group: 'do', label: 'Fluchtspiel, Escape Game' },
		{ 'type': 'horsecar', group: 'do', label: 'Pferdewagen' },
		{ 'type': 'massage', group: 'do', label: 'Massagesalon' },
		{ 'type': 'playground', group: 'do', label: 'Spielplatz' },
		{ 'type': 'ropes_course', group: 'do', label: 'Seilgarten' },
		{ 'type': 'sauna', group: 'do', label: 'Sauna' },
		{ 'type': 'spa', group: 'do', label: 'Heilbad' },
		{ 'type': 'theme_park', group: 'do', label: 'Themenpark' },
		{ 'type': 'youth_center', group: 'do', label: 'Jugendzentrum' },

		// sports and fitness

		{ 'type': '9pin', group: 'do', label: 'Kegeln' },
		{ 'type': '10pin', group: 'do', label: 'Bowling' },
		{ 'type': 'badminton', group: 'do', label: 'Badminton' },
		{ 'type': 'beach', group: 'do', label: 'Strand' },
		{ 'type': 'beachvolleyball', group: 'do', label: 'Beachvolleyball' },
		{ 'type': 'bicycle_rental', group: 'do', label: 'Fahrradverleih' },
		{ 'type': 'bicycle_route', group: 'do', label: 'Radwanderweg' },
		{ 'type': 'billiards', group: 'do', label: 'Billiard' },
		{ 'type': 'bmx', group: 'do', label: 'BMX' },
		{ 'type': 'boat_rental', group: 'do', label: 'Bootsverleih' },
		{ 'type': 'bobsleigh', group: 'do', label: 'Bobsport' },
		{ 'type': 'boules', group: 'do', label: 'Boules' },
		{ 'type': 'bungee_jumping', group: 'do', label: 'Bungeespringen' },
		{ 'type': 'canoe', group: 'do', label: 'Bootssport' }, // Kanu, Kayak
		{ 'type': 'canyoning', group: 'do', label: 'Canyoning' },
		{ 'type': 'city_beach', group: 'do', label: 'Stadtstrand' }, // incl. beach club
		{ 'type': 'climbing', group: 'do', label: 'Bergsteigen' },
		{ 'type': 'cricket', group: 'do', label: 'Cricket' },
		{ 'type': 'dive_center', group: 'do', label: 'Tauchzentrum' },
		{ 'type': 'downhill', group: 'do', label: 'Schi Alpin, Abfahrt' },
		{ 'type': 'equestrian', group: 'do', label: 'Reitsport' },
		{ 'type': 'extreme_sports', group: 'do', label: 'Extremsport' },
		{ 'type': 'fishing', group: 'do', label: 'Fischen, Angeln' },
		{ 'type': 'fitness_centre', group: 'do', label: 'Fitnessstudio' }, // including gym
		{ 'type': 'gliding', group: 'do', label: 'Segelflug' },
		{ 'type': 'golf', group: 'do', label: 'Golf (Sport)' },
		{ 'type': 'hiking', group: 'do', label: 'Wandern' }, // including trekking
		{ 'type': 'hillwalking', group: 'do', label: 'Bergwandern' },
		{ 'type': 'horse_racing', group: 'do', label: 'Pferderennen' },
		{ 'type': 'hunting', group: 'do', label: 'Jagd' },
		{ 'type': 'ice_hockey', group: 'do', label: 'Eishockey' },
		{ 'type': 'ice_skating', group: 'do', label: 'Eislauf' },
		{ 'type': 'karting', group: 'do', label: 'Kartsport' },
		{ 'type': 'kitesurfing', group: 'do', label: 'Kitesurfen' },
		{ 'type': 'minigolf', group: 'do', label: 'Minigolf' },
		{ 'type': 'motocross', group: 'do', label: 'Motocross' },
		{ 'type': 'nordic', group: 'do', label: 'Schi Nordisch' }, // nordic/cross country ski trail
		{ 'type': 'orienteering', group: 'do', label: 'Orientierungslauf' },
		{ 'type': 'parachuting', group: 'do', label: 'Fallschirmspringen' }, // including skydiving
		{ 'type': 'paragliding', group: 'do', label: 'Paragliding' },
		{ 'type': 'polo', group: 'do', label: 'Polo' },
		{ 'type': 'quad_bike', group: 'do', label: 'Quad-Bike' },
		{ 'type': 'racetrack', group: 'do', label: 'Rennbahn' },
		{ 'type': 'rafting', group: 'do', label: 'Rafting' }, // including whitewater rafting
		{ 'type': 'roller_skating', group: 'do', label: 'Rollsport' }, // including inline roller skating
		{ 'type': 'rowing', group: 'do', label: 'Rudern' },
		{ 'type': 'running', group: 'do', label: 'Laufsport' },
		{ 'type': 'sailing', group: 'do', label: 'Segeln' },
		{ 'type': 'sandboarding', group: 'do', label: 'Sandboarding' },
		{ 'type': 'scuba_diving', group: 'do', label: 'Tauchen' },
		{ 'type': 'ski_jumping', group: 'do', label: 'Schi-Springen' },
		{ 'type': 'ski_school', group: 'do', label: 'Schischule' },
		{ 'type': 'skitour', group: 'do', label: 'Schi-Touren' },
		{ 'type': 'sled', group: 'do', label: 'Schlittensport' },
		{ 'type': 'snorkeling', group: 'do', label: 'Schnorcheln' },
		{ 'type': 'snow_park', group: 'do', label: 'Snowpark' },
		{ 'type': 'soccer', group: 'do', label: 'Fußball' },
		{ 'type': 'summer_toboggan', group: 'do', label: 'Sommerrodelbahn' },
		{ 'type': 'sports', group: 'do', label: 'Sport' },
		{ 'type': 'stadium', group: 'do', label: 'Stadion' },
		{ 'type': 'surfing', group: 'do', label: 'Surfen' },
		{ 'type': 'swimming', group: 'do', label: 'Schwimmen' },
		{ 'type': 'swimming_pool', group: 'do', label: 'Schwimmbad' },
		{ 'type': 'tennis', group: 'do', label: 'Tennis' },
		{ 'type': 'triathlon', group: 'do', label: 'Triathlon' },
		{ 'type': 'wakeboarding', group: 'do', label: 'Wakeboarding' },
		{ 'type': 'water_ski', group: 'do', label: 'Wasserski' },
		{ 'type': 'water_sports', group: 'do', label: 'Wassersport' },
		{ 'type': 'winter_sports', group: 'do', label: 'Wintersport' },
		{ 'type': 'do', group: 'do', label: 'Aktivität' },

		// shopping

		{ 'type': 'antiquarian', group: 'buy', label: 'Antiquariat' },
		{ 'type': 'atm', group: 'buy', label: 'Geldautomat' },
		{ 'type': 'bakery', group: 'buy', label: 'Bäckerei' },
		{ 'type': 'bank', group: 'buy', label: 'Bank, Geldwesen' },
		{ 'type': 'beverages', group: 'buy', label: 'Getränkegeschäft' },
		{ 'type': 'bike_shop', group: 'buy', label: 'Fahrradladen' },
		{ 'type': 'book_seller', group: 'buy', label: 'Buchladen' },
		{ 'type': 'boutique', group: 'buy', label: 'Boutique' },
		{ 'type': 'business_park', group: 'buy', label: 'Gewerbepark' },
		{ 'type': 'butchery', group: 'buy', label: 'Metzgerei, Fleischerei' },
		{ 'type': 'carpet_shop', group: 'buy', label: 'Teppichgeschäft' },
		{ 'type': 'chemist', group: 'buy', label: 'Drogerie' },
		{ 'type': 'collector_shop', group: 'buy', label: 'Sammlergeschäft' },
		{ 'type': 'cosmetics_shop', group: 'buy', label: 'Kosmetik' },
		{ 'type': 'crafts_shop', group: 'buy', label: 'Handwerksgeschäft' },
		{ 'type': 'delicatessen', group: 'buy', label: 'Spezialitätengeschäft' },
		{ 'type': 'department_store', group: 'buy', label: 'Kaufhaus' },
		{ 'type': 'duty-free_shop', group: 'buy', label: 'Duty-Free-Geschäft' },
		{ 'type': 'fashion_store', group: 'buy', label: 'Modegeschäft' },
		{ 'type': 'flea_market', group: 'buy', label: 'Flohmarkt' },
		{ 'type': 'hairdresser', group: 'buy', label: 'Friseur' },
		{ 'type': 'industrial_park', group: 'buy', label: 'Industriepark' },
		{ 'type': 'jewellery', group: 'buy', label: 'Juwelier' },
		{ 'type': 'kiosk', group: 'buy', label: 'Kiosk' },
		{ 'type': 'mall', group: 'buy', label: 'Einkaufszentrum, Mall' },
		{ 'type': 'market', group: 'buy', label: 'Markt' },
		{ 'type': 'music_shop', group: 'buy', label: 'Musikgeschäft' },
		{ 'type': 'optician', group: 'buy', label: 'Optiker' },
		{ 'type': 'outdoor_retailer', group: 'buy', label: 'Outdoor-Händler' },
		{ 'type': 'pastry_shop', group: 'buy', label: 'Konditorei' },
		{ 'type': 'photo_store', group: 'buy', label: 'Fotogeschäft' },
		{ 'type': 'second_hand', group: 'buy', label: 'Gebrauchtwarenhändler' },
		{ 'type': 'shop', group: 'buy', label: 'Geschäft' },
		{ 'type': 'shopping_district', group: 'buy', label: 'Einkaufsviertel' },
		{ 'type': 'shopping_street', group: 'buy', label: 'Einkaufsstraße' },
		{ 'type': 'souvenir_shop', group: 'buy', label: 'Souvenirgeschäft' },
		{ 'type': 'sports_shop', group: 'buy', label: 'Sportgeschäft' },
		{ 'type': 'supermarket', group: 'buy', label: 'Supermarkt' },
		{ 'type': 'ticket_shop', group: 'buy', label: 'Ticketverkauf' },
		{ 'type': 'watersports_shop', group: 'buy', label: 'Wassersportgeschäft' },
		{ 'type': 'buy', group: 'buy', label: 'Einkaufen' },

		{ 'type': 'bistro', group: 'eat', label: 'Bistro' },
		{ 'type': 'brasserie', group: 'eat', label: 'Brasserie' },
		{ 'type': 'brewery', group: 'eat', label: 'Brauerei' },
		{ 'type': 'cafe', group: 'eat', label: 'Café' },
		{ 'type': 'cafeteria', group: 'eat', label: 'Cafeteria' },
		{ 'type': 'canteen', group: 'eat', label: 'Kantine' }, // auch für Mensa
		{ 'type': 'coffee_shop', group: 'eat', label: 'Kaffeegeschäft' },
		{ 'type': 'fast_food', group: 'eat', label: 'Fastfood' },
		{ 'type': 'ice_cream', group: 'eat', label: 'Eisdiele' },
		{ 'type': 'picnic', group: 'eat', label: 'Picknick' },
		{ 'type': 'restaurant', group: 'eat', label: 'Restaurant' },
		{ 'type': 'restaurant_and_bar', group: 'eat', label: 'Restaurant und Bar' },
		{ 'type': 'snack_bar', group: 'eat', label: 'Imbiss' },
		{ 'type': 'steak_house', group: 'eat', label: 'Steakhaus' },
		{ 'type': 'eat', group: 'eat', label: 'Küche, Essen' },

		{ 'type': 'bar', group: 'drink', label: 'Bar' },
		{ 'type': 'beer_garden', group: 'drink', label: 'Biergarten' },
		{ 'type': 'club', group: 'drink', label: 'Club' },
		{ 'type': 'discotheque', group: 'drink', label: 'Diskothek' },
		{ 'type': 'distillery', group: 'drink', label: 'Brennerei' },
		{ 'type': 'nightclub', group: 'drink', label: 'Nachtclub' },
		{ 'type': 'pub', group: 'drink', label: 'Kneipe' },
		{ 'type': 'vineyard', group: 'drink', label: 'Weingut' },
		{ 'type': 'drink', group: 'drink', label: 'Trinken' },

		{ 'type': 'appartment', group: 'sleep', label: 'Appartements' },
		{ 'type': 'alpine_hut', group: 'sleep', label: 'Berghütte' },
		{ 'type': 'bed_and_bike', group: 'sleep', label: 'Bett und Bike' },
		{ 'type': 'boarding_house', group: 'sleep', label: 'Pension' },
		{ 'type': 'campsite', group: 'sleep', label: 'Campingplatz' },
		{ 'type': 'caravan_site', group: 'sleep', label: 'Caravan-Campingplatz' },
		{ 'type': 'chalet', group: 'sleep', label: 'Chalet, Ferienhaus' },
		{ 'type': 'guest_house', group: 'sleep', label: 'Gästehaus' },
		{ 'type': 'holiday_flat', group: 'sleep', label: 'Ferienwohnung' },
		{ 'type': 'hostel', group: 'sleep', label: 'Herberge' },
		{ 'type': 'hotel', group: 'sleep', label: 'Hotel' },
		{ 'type': 'hotel_garni', group: 'sleep', label: 'Hotel Garni' },
		{ 'type': 'motel', group: 'sleep', label: 'Motel' },
		{ 'type': 'resort', group: 'sleep', label: 'Resort' },
		{ 'type': 'wilderness_hut', group: 'sleep', label: 'Wildnishütte' },
		{ 'type': 'youth_hostel', group: 'sleep', label: 'Jugendherberge' },
		{ 'type': 'sleep', group: 'sleep', label: 'Unterkunft' },

		// health

		{ 'type': 'clinic', group: 'other', label: 'Klinik' },
		{ 'type': 'dentist', group: 'other', label: 'Zahnarzt' },
		{ 'type': 'health', group: 'other', label: 'Gesundheit' },
		{ 'type': 'health_centre', group: 'other', label: 'Ärztehaus' },
		{ 'type': 'hospital', group: 'other', label: 'Krankenhaus' },
		{ 'type': 'laboratory', group: 'other', label: 'Labor' },
		{ 'type': 'naturopathy', group: 'other', label: 'Naturheilkunde' },
		{ 'type': 'nursing_home', group: 'other', label: 'Pflegeheim' },
		{ 'type': 'pharmacy', group: 'other', label: 'Apotheke' },
		{ 'type': 'practice', group: 'other', label: 'Praxis' },
		{ 'type': 'rehabilitation', group: 'other', label: 'Rehabilitation' },
		{ 'type': 'rescue_center', group: 'other', label: 'Rettungsstation' },
		{ 'type': 'surgery', group: 'other', label: 'Arztpraxis' },
		{ 'type': 'veterinary', group: 'other', label: 'Tierarzt' },

		// teaching & learning

		{ 'type': 'academy', group: 'other', label: 'Akademie' },
		{ 'type': 'bookcase', group: 'other', label: 'Bücherschrank' },
		{ 'type': 'college', group: 'other', label: 'Hochschule' },
		{ 'type': 'cooking_class', group: 'other', label: 'Kochkurse' },
		{ 'type': 'education', group: 'other', label: 'Ausbildung' },
		{ 'type': 'kindergarten', group: 'other', label: 'Kindergarten' },
		{ 'type': 'language_school', group: 'other', label: 'Sprachschule' },
		{ 'type': 'library', group: 'other', label: 'Bücherei' },
		{ 'type': 'nursery', group: 'other', label: 'Kinderkrippe' },
		{ 'type': 'school', group: 'other', label: 'Schule' },
		{ 'type': 'university', group: 'other', label: 'Universität' },

		// administration and uncategorized

		{ 'type': 'administration', group: 'other', label: 'Verwaltung' },
		{ 'type': 'checkpoint', group: 'other', label: 'Kontrollpunkt' },
		{ 'type': 'company', group: 'other', label: 'Unternehmen' },
		{ 'type': 'consulate', group: 'other', label: 'Konsulat' },
		{ 'type': 'coworking_space', group: 'other', label: 'Coworking Space' },
		{ 'type': 'customs', group: 'other', label: 'Zoll' },
		{ 'type': 'cultural_organisation', group: 'other', label: 'Kulturorganisation' },
		{ 'type': 'embassy', group: 'other', label: 'Botschaft' },
		{ 'type': 'fire_brigade', group: 'other', label: 'Feuerwehr' },
		{ 'type': 'government', group: 'other', label: 'Regierungsgebäude' },
		{ 'type': 'guide', group: 'other', label: 'Fremdenführer' },
		{ 'type': 'internet_cafe', group: 'other', label: 'Internetcafé' },
		{ 'type': 'laundry', group: 'other', label: 'Wäscherei' },
		{ 'type': 'listing', group: 'other', label: 'Listung' },
		{ 'type': 'lost_and_found', group: 'other', label: 'Fundbüro' },
		{ 'type': 'military', group: 'other', label: 'Militär' },
		{ 'type': 'mobile_telephony', group: 'other', label: 'Mobilfunkgeschäft' },
		{ 'type': 'office', group: 'other', label: 'Büro' },
		{ 'type': 'organisation', group: 'other', label: 'Organisation' },
		{ 'type': 'passport_office', group: 'other', label: 'Passstelle' },
		{ 'type': 'phone', group: 'other', label: 'Telefon' },
		{ 'type': 'police', group: 'other', label: 'Polizei' },
		{ 'type': 'post', group: 'other', label: 'Post' },
		{ 'type': 'relief_organisation', group: 'other', label: 'Wohltätigkeitsorganisation' },
		{ 'type': 'shelter', group: 'other', label: 'Unterstand' },
		{ 'type': 'toilet', group: 'other', label: 'Toiletten' },
		{ 'type': 'tour_operator', group: 'other', label: 'Ausflugsveranstalter' },
		{ 'type': 'tourism_authority', group: 'other', label: 'Tourismusbehörde' },
		{ 'type': 'tourist_information', group: 'other', label: 'Touristinformation' },
		{ 'type': 'travel_agency', group: 'other', label: 'Reisebüro' },
		{ 'type': 'wlan', group: 'other', label: 'WLAN-Hotspot' },
		{ 'type': 'other', group: 'other', label: 'Anderes' },

		// settlements
		
		{ 'type': 'city', group: 'populated', label: 'Stadt' },
		{ 'type': 'holiday_resort', group: 'populated', label: 'Feriensiedlung' },
		{ 'type': 'municipality', group: 'populated', label: 'Gemeinde' },
		{ 'type': 'quarter', group: 'populated', label: 'Stadtteil' },
		{ 'type': 'settlement', group: 'populated', label: 'Siedlung' },
		{ 'type': 'town', group: 'populated', label: 'Kleinstadt' },
		{ 'type': 'village', group: 'populated', label: 'Dorf' },
		
		// view
		
		{ 'type': 'scenic_view', group: 'view', label: 'Bildmotiv' },
		{ 'type': 'viewpoint', group: 'view', label: 'Aussichtspunkt' },

		// areas

		{ 'type': 'adm1st', group: 'area', label: 'Verwaltungseinheit 1. Ebene' },
		{ 'type': 'adm2nd', group: 'area', label: 'Verwaltungseinheit 2. Ebene' },
		{ 'type': 'adm3rd', group: 'area', label: 'Verwaltungseinheit 3. Ebene' },
		{ 'type': 'region', group: 'area', label: 'Region' },
	];
	// Functions
	function getGroup(group) {
		return GROUP_PROPERTIES.find(function(element) {
			return element.group == group;
		});
	}
	function getTypesTable() {
		var out = `<table>
			<thead>
				<th>Typ</th>
				<th>Bezeichnung</th>
				<th>Gruppe</th>
				<th>Gruppenbezeichnung</th>
			</thead>`;
		$(LISTING_TYPE_OPTIONS).each(function(i, typedef) {
			var groupDef = getGroup(typedef.group);
			out += `
				<tr class="vcata-item" style="${groupDef !== null ? `background-color:${groupDef.color};color:#fff` : ""}">
					<td class="vcata-item-type"><input class="vcata-pseudo-input" type="text" value="${typedef.type.replace(/_/, " ")}" readonly /></td>
					<td class="vcata-item-label">${typedef.label}</td>
					<td class="vcata-item-group">${typedef.group}</td>
					<td class="vcata-item-group-label">${groupDef !== null ? groupDef.label : "&mdash;"}</td>
				</tr>`;
		});
		out += `</table>`;
		return out;
	}
	function search(q) {
		q = q.toLowerCase();
		if(q === "") {
			$(".vcata-item").each(function(i, row) {
				$(row).show();
			});
		} else {
			$(".vcata-item").each(function(i, row) {
				$i = $(row);
				if($i.find(".vcata-item-type input").val().toLowerCase().includes(q) || $i.find(".vcata-item-label").text().toLowerCase().includes(q) || $i.find(".vcata-item-group").text().toLowerCase().includes(q) || $i.find(".vcata-item-group-label").text().toLowerCase().includes(q)) {
					$i.show();
				} else {
					$i.hide();
				}
			});
		}
	}
	function setup() {
		mw.util.addCSS(`
			.vcata-abbr {
				color: #006699;
			}
			.vcata-pseudo-input {
				background: transparent;
				border: none;
				color: inherit;
				font: inherit;
				padding: unset;
				width: auto;
			}
			#vcata {
				background-color: rgba(255,255,255,.9);
				bottom: 0;
				box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.5);
				height: auto;
				left: 0;
				position: fixed !important;
				width: auto;
			}
			#vcata, #vcata * {
				box-sizing: border-box;
			}
			#vcata[style*=left] {
				bottom: unset;
				right: unset;
			}
			#vcata h3 {
				padding: 0;
			}
			#vcata table {
				border-collapse: collapse;
				min-width: 100%;
			}
			#vcata td, #vcata th {
				border-left: 1px solid #888;
				border-right: 1px solid #888;
				padding: .2em .1em;
			}
			#vcata th {
				border-bottom: 1px solid #888;
			}
			#vcata-close {
				cursor: pointer;
				font-size: 1.5em;
				position: absolute;
				right: .1em;
				top: .1em;
			}
			#vcata-close:hover {
				opacity: .75;
			}
			#vcata-content-wrapper {
				padding: .5em;
			}
			#vcata-resize-wrapper {
				height: 50vh;
				left: 0 !important;
				overflow: auto;
				top: 0 !important;
				width: 50vw;
			}
		`);
		var portletLink = mw.util.addPortletLink('p-tb', '#vcata','vCaTA','p-vcata','vCard-Typen-Assistenten aufrufen');
		$(portletLink).click(function(e) {
			e.preventDefault();
			if($("#vcata").length > 0) {
				$("#vcata").remove();
			} else {
				var $wrapper = $(`
					<div id="vcata">
						<div id="vcata-resize-wrapper">
							<div id="vcata-content-wrapper">
								<div id="vcata-close">x</div>
								<h3><span class="vcata-abbr">vC</span>ard-<span class="vcata-abbr">T</span>ypen-<span class="vcata-abbr">A</span>ssistent</h3>
								<input placeholder="Suche" type="text" style="width:100%" />
								<div style="margin-top:1em">
									${getTypesTable()}
								</div>
							</div>
						</div>
					</div>
				`).draggable().children().resizable({handles: "n, ne, e"}).parent().appendTo("body");
				$("input[placeholder=Suche][type=text]").focus();
				$wrapper.find("input[placeholder=Suche][type=text]").keyup(function(e) {
					e.preventDefault();
					search($(this).val());
				});
				$wrapper.find(".vcata-pseudo-input").click(function(e) {
					e.preventDefault();
					$(this).select();
					try {
						document.execCommand('copy');
						mw.notify($('<span>Typ in Zwischenablage kopiert. Einfügen mit <kbd>STRG</kbd>+<kbd>V</kbd></span>'), {tag: 'vcata'});
					} catch(err) {
						mw.notify($('<span>Fehler beim Kopieren in die Zwischenablage. Bitte <kbd>STRG</kbd>+<kbd>C</kbd> drücken</span>'), {tag: 'vcata'});
					}
				});
				$wrapper.find("#vcata-close").click(function(e) {
					e.preventDefault();
					$("#vcata").remove();
				});
			}
		});
	}
	setup();
} );