Medau Therapy Services GmbH | Schloss Hohenfels | 96450 Coburg
Medau Therapy Services GmbH | Schloss Hohenfels | 96450 Coburg
FFP2 Maskenpflicht 2021 01 18 V1.4

Medau Therapy Services GmbH

Profitieren Sie von 90 Jahren Know-How und einem hochqualifizierten Fachpersonal

Die Medau Therapy Services GmbH betreibt Logopädie- und Physiotherapiepraxen, stellt die logopädische Versorgung von Kliniken sicher und bietet betriebliche Gesundheitsvorsorge an. Wir bieten gebündelte Kompetenz nach aktuellen therapeutischen Leitlinien an verschiedenen Standorten in Bayern an.

MEDAUtherapie Hygiene neu
Web corona warn app1 MT

Coburg – Stadt 

Medau physio escopark

OpenStreetMap

Mit dem Laden der Karte akzeptieren Sie die Datenschutzerklärung von OpenStreetMap Foundation.
Mehr erfahren

Karte laden

PGRpdiBjbGFzcz0ibGVhZmxldC1tYXAgV1BMZWFmbGV0TWFwIiBzdHlsZT0iaGVpZ2h0OjUwMHB4OyB3aWR0aDoxMDAlOyI+PC9kaXY+PHNjcmlwdD4Kd2luZG93LldQTGVhZmxldE1hcFBsdWdpbiA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gfHwgW107CndpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiBXUExlYWZsZXRNYXBTaG9ydGNvZGUoKSB7Lyo8c2NyaXB0PiovCnZhciBiYXNlVXJsID0gJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJzsKdmFyIGJhc2UgPSAoIWJhc2VVcmwgJiYgd2luZG93Lk1RKSA/IAogICAgd2luZG93Lk1RLm1hcExheWVyKCkgOiBMLnRpbGVMYXllcihiYXNlVXJsLCAKICAgICAgICBMLlV0aWwuZXh0ZW5kKHt9LCB7CiAgICAgICAgICAgIGRldGVjdFJldGluYTogMCwKICAgICAgICAgICAgbWluWm9vbTogMCwKICAgICAgICAgICAgbWF4Wm9vbTogMjAsCiAgICAgICAgfSw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cCgpOwp2YXIgZ3JvdXAgPSB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luLmdldEN1cnJlbnRHcm91cCgpOwp2YXIgbWFya2VyX29wdGlvbnMgPSAoZnVuY3Rpb24gKCkgewogICAgdmFyIF9vcHRpb25zID0geyJpY29uVXJsIjoiXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDE3XC8xMFwvbWFya2VyLWZtdy1waHlzaW8ucG5nIiwiaWNvblNpemUiOlsiNTEsNTEiXSwiaWNvbkFuY2hvciI6WyIyNS41LDUxIl19OwogICAgdmFyIGljb25BcnJheXMgPSBbCiAgICAgICAgJ2ljb25TaXplJywgCiAgICAgICAgJ2ljb25BbmNob3InLCAKICAgICAgICAnc2hhZG93U2l6ZScsIAogICAgICAgICdzaGFkb3dBbmNob3InLAogICAgICAgICdwb3B1cEFuY2hvcicKICAgIF07CiAgICB2YXIgZGVmYXVsdF9pY29uID0gTC5JY29uLkRlZmF1bHQucHJvdG90eXBlLm9wdGlvbnM7CiAgICBpZiAoX29wdGlvbnMuaWNvblVybCkgewogICAgICAgIC8vIGFycmF5cyBhcmUgc3RyaW5ncywgdW5mb3J0dW5hdGVseS4uLgogICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBpY29uQXJyYXlzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgIHZhciBvcHRpb25fbmFtZSA9IGljb25BcnJheXNbaV07CiAgICAgICAgICAgIHZhciBvcHRpb24gPSBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXTsKICAgICAgICAgICAgLy8gY29udmVydCAiMSwyIiB0byBbMSwgMl07CiAgICAgICAgICAgIGlmIChvcHRpb24pIHsKICAgICAgICAgICAgICAgIHZhciBhcnIgPSBvcHRpb24uam9pbignJykuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgIC8vIGFycmF5Lm1hcCBmb3IgaWU8OQogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDAsIGxlbkogPSBhcnIubGVuZ3RoOyBqIDwgbGVuSjsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyW2pdID0gTnVtYmVyKGFycltqXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXSA9IGFycjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBkZWZhdWx0IHBvcHVwQW5jaG9yCiAgICAgICAgaWYgKCFfb3B0aW9ucy5wb3B1cEFuY2hvcikgewogICAgICAgICAgICAvLyBzZXQgKHJvdWdobHkpIHRvIHNpemUgb2YgaWNvbgogICAgICAgICAgICBfb3B0aW9ucy5wb3B1cEFuY2hvciA9IChmdW5jdGlvbiAoaV9zaXplKSB7CiAgICAgICAgICAgICAgICAvLyBjb3B5IGFycmF5CiAgICAgICAgICAgICAgICBpX3NpemUgPSBpX3NpemUuc2xpY2UoKTsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLy8gaW52ZXJzZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgaV9zaXplWzBdID0gMDsKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAqPSAtMTsKICAgICAgICAgICAgICAgIC8vIGJvdHRvbSBwb3NpdGlvbiBvbiBwb3B1cCBpcyA3cHgKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAtPSAzOwogICAgICAgICAgICAgICAgcmV0dXJuIGlfc2l6ZTsKICAgICAgICAgICAgfSkoX29wdGlvbnMuaWNvblNpemUgfHwgZGVmYXVsdF9pY29uLmljb25TaXplKTsKICAgICAgICB9CiAgICAgICAgX29wdGlvbnMuaWNvbiA9IG5ldyBMLkljb24oIF9vcHRpb25zICk7CiAgICB9CiAgICByZXR1cm4gX29wdGlvbnM7Cn0pKCk7CnZhciBtYXJrZXIgPSBMLm1hcmtlcigKICAgIFs1MC4yNTUwMTcsMTAuOTYyMjM2XSwgCiAgICBtYXJrZXJfb3B0aW9ucwopOwp2YXIg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gb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAgICAgICAgIHJldHVybiBpX3NpemU7CiAgICAgICAgICAgIH0pKF9vcHRpb25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Nob3InLAogICAgICAgICdwb3B1cEFuY2hvcicKICAgIF07CiAgICB2YXIgZGVmYXVsdF9pY29uID0gTC5JY29uLkRlZmF1bHQucHJvdG90eXBlLm9wdGlvbnM7CiAgICBpZiAoX29wdGlvbnMuaWNvblVybCkgewogICAgICAgIC8vIGFycmF5cyBhcmUgc3RyaW5ncywgdW5mb3J0dW5hdGVseS4uLgogICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBpY29uQXJyYXlzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgIHZhciBvcHRpb25fbmFtZSA9IGljb25BcnJheXNbaV07CiAgICAgICAgICAgIHZhciBvcHRpb24gPSBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXTsKICAgICAgICAgICAgLy8gY29udmVydCAiMSwyIiB0byBbMSwgMl07CiAgICAgICAgICAgIGlmIChvcHRpb24pIHsKICAgICAgICAgICAgICAgIHZhciBhcnIgPSBvcHRpb24uam9pbignJykuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgIC8vIGFycmF5Lm1hcCBmb3IgaWU8OQogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDAsIGxlbkogPSBhcnIubGVuZ3RoOyBqIDwgbGVuSjsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyW2pdID0gTnVtYmVyKGFycltqXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXSA9IGFycjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBkZWZhdWx0IHBvcHVwQW5jaG9yCiAgICAgICAgaWYgKCFfb3B0aW9ucy5wb3B1cEFuY2hvcikgewogICAgICAgICAgICAvLyBzZXQgKHJvdWdobHkpIHRvIHNpemUgb2YgaWNvbgogICAgICAgICAgICBfb3B0aW9ucy5wb3B1cEFuY2hvciA9IChmdW5jdGlvbiAoaV9zaXplKSB7CiAgICAgICAgICAgICAgICAv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hciBqID0gMCwgbGVuSiA9IGFyci5sZW5ndGg7IGogPCBsZW5KOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICBhcnJbal0gPSBOdW1iZXIoYXJyW2pdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF9vcHRpb25zWyBvcHRpb25fbmFtZSBdID0gYXJyOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIGRlZmF1bHQgcG9wdXBBbmNob3IKICAgICAgICBpZiAoIV9vcHRpb25zLnBvcHVwQW5jaG9yKSB7CiAgICAgICAgICAgIC8vIHNldCAocm91Z2hseSkgdG8gc2l6ZSBvZiBpY29uCiAgICAgICAgICAgIF9vcHRpb25zLnBvcHVwQW5jaG9yID0gKGZ1bmN0aW9uIChpX3NpemUpIHsKICAgICAgICAgICAgICAgIC8vIGNvcHkgYXJyYXkKICAgICAgICAgICAgICAgIGlfc2l6ZSA9IGlfc2l6ZS5zbGljZSgpOwogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAvLyBpbnZlcnNlIGNvb3JkaW5hdGVzCiAgICAgICAgICAgICAgICBpX3NpemVbMF0gPSAwOwogICAgICAgICAgICAgICAgaV9zaXplWzFdICo9IC0xOwogICAgICAgICAgICAgICAgLy8gYm90dG9tIHBvc2l0aW9uIG9uIHBvcHVwIGlzIDdweAogICAgICAgICAgICAgICAgaV9zaXplWzFdIC09IDM7CiAgICAgICAgICAgICAgICByZXR1cm4gaV9zaXplOwogICAgICAgICAgICB9KShfb3B0aW9ucy5pY29uU2l6ZSB8fCBkZWZhdWx0X2ljb24uaWNvblNpemUpOwogICAgICAgIH0KICAgICAgICBfb3B0aW9ucy5pY29uID0gbmV3IEwuSWNvbiggX29wdGlvbnMgKTsKICAgIH0KICAgIHJldHVybiBfb3B0aW9uczsKfSkoKTsKdmFyIG1hcmtlciA9IEwubWFya2VyKAogICAgWzUwLjI0Nzk0OTIsMTAuOTQ3NjE2OV0sIAogICAgbWFya2VyX29wdGlv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B0aW9uX25hbWUgPSBpY29uQXJyYXlzW2ldOwogICAgICAgICAgICB2YXIgb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAg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vbiA9IEwuSWNvbi5EZWZhdWx0LnByb3RvdHlwZS5vcHRpb25zOwogICAgaWYgKF9vcHRpb25zLmljb25VcmwpIHsKICAgICAgICAvLyBhcnJheXMgYXJlIHN0cmluZ3MsIHVuZm9ydHVuYXRlbHkuLi4KICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gaWNvbkFycmF5cy5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICB2YXIgb3B0aW9uX25hbWUgPSBpY29uQXJyYXlzW2ldOwogICAgICAgICAgICB2YXIgb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAgICAgICAgIHJldHVybiBpX3NpemU7CiAgICAgICAgICAgIH0pKF9vcHRpb25zLmljb25TaXplIHx8IGRlZmF1bHRfaWNvbi5pY29uU2l6ZSk7CiAgICAgICAgfQogICAgICAgIF9vcHRpb25zLmljb24gPSBuZXcgTC5JY29uKCBfb3B0aW9ucyApOwogICAgfQogICAgcmV0dXJuIF9vcHRpb25zOwp9KSgpOwp2YXIgbWFya2VyID0gTC5tYXJrZXIoCiAgICBbNTAuMjY3MDkxMTI3NzMyLDEwLjk1Mzk4NDE1NDUyM10sIAogICAgbWFya2VyX29wdGlvbnMKKTsKdmFyIGlzX2ltYWdlID0gbWFwLmlzX2ltYWdlX21hcDsKaWYgKG1hcmtlcl9vcHRpb25zLmRyYWdnYWJsZSkgewogICAgbWFya2VyLm9uKCdkcmFnZW5kJywgZnVuY3Rpb24gKCkgewogICAgICAgIHZhciBsYXRsbmcgPSB0aGlzLmdldExhdExuZygpOwogICAgICAgIHZhciBsYXQgPSBsYXRsbmcubGF0OwogICAgICAgIHZhciBsbmcgPSBsYXRsbmcubG5nOwogICAgICAgIGlmIChpc19pbWFnZSkgewogICAgICAgICAgICBjb25zb2xlLmxvZygnbGVhZmxldC1tYXJrZXIgeT0nICsgbGF0ICsgJyB4PScgKyBsbmcpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCdsZWFmbGV0LW1hcmtlciBsYXQ9JyArIGxhdCArICcgbG5nPScgKyBsbmcpOwogICAgICAgIH0KICAgIH0pOwp9Cm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KSB7CiAgICB2YXIgX29wdGlvbnMgPSB7Imljb25VcmwiOiJcL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMTdcLzA4XC9tYXJrZXIucG5nIiwiaWNvblNpemUiOlsiNTEsNTgiXSwiaWNvbkFuY2hvciI6WyIyNS41LDU4Il19OwogICAgdmFyIGljb25BcnJheXMgPSBbCiAgICAgICAgJ2ljb25TaXplJywgCiAgICAgICAgJ2ljb25BbmNob3InLCAKICAgICAgICAnc2hhZG93U2l6ZScsIAogICAgICAgICdzaGFkb3dBbmNob3InLAogICAgICAgICdwb3B1cEFuY2hvcicKICAgIF07CiAgICB2YXIgZGVmYXVsdF9pY29uID0gTC5JY29uLkRlZmF1bHQucHJvdG90eXBlLm9wdGlvbnM7CiAgICBpZiAoX29wdGlvbnMuaWNvblVybCkgewogICAgICAgIC8vIGFycmF5cyBhcmUgc3RyaW5ncywgdW5mb3J0dW5hdGVseS4uLgogICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBpY29uQXJyYXlzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgIHZhciBvcHRpb25fbmFtZSA9IGljb25BcnJheXNbaV07CiAgICAgICAgICAgIHZhciBvcHRpb24gPSBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXTsKICAgICAgICAgICAgLy8gY29udmVydCAiMSwyIiB0byBbMSwgMl07CiAgICAgICAgICAgIGlmIChvcHRpb24pIHsKICAgICAgICAgICAgICAgIHZhciBhcnIgPSBvcHRpb24uam9pbignJykuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgIC8vIGFycmF5Lm1hcCBmb3IgaWU8OQogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDAsIGxlbkogPSBhcnIubGVuZ3RoOyBqIDwgbGVuSjsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyW2pdID0gTnVtYmVyKGFycltqXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXSA9IGFycjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBkZWZhdWx0IHBvcHVwQW5jaG9yCiAgICAgICAgaWYgKCFfb3B0aW9ucy5wb3B1cEFuY2hvcikgewogICAgICAgICAgICAvLyBzZXQgKHJvdWdobHkpIHRvIHNpemUgb2YgaWNvbgogICAgICAgICAgICBfb3B0aW9ucy5wb3B1cEFuY2hvciA9IChmdW5jdGlvbiAoaV9zaXplKSB7CiAgICAgICAgICAgICAgICAvLyBjb3B5IGFycmF5CiAgICAgICAgICAgICAgICBpX3NpemUgPSBpX3NpemUuc2xpY2UoKTsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLy8gaW52ZXJzZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgaV9zaXplWzBdID0gMDsKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAqPSAtMTsKICAgICAgICAgICAgICAgIC8vIGJvdHRvbSBwb3NpdGlvbiBvbiBwb3B1cCBpcyA3cHgKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAtPSAzOwogICAgICAgICAgICAgICAgcmV0dXJuIGlfc2l6ZTsKICAgICAgICAgICAgfSkoX29wdGlvbnMuaWNvblNpemUgfHwgZGVmYXVsdF9pY29uLmljb25TaXplKTsKICAgICAgICB9CiAgICAgICAgX29wdGlvbnMuaWNvbiA9IG5ldyBMLkljb24oIF9vcHRpb25zICk7CiAgICB9CiAgICByZXR1cm4gX29wdGlvbnM7Cn0pKCk7CnZhciBtYXJrZXIgPSBMLm1hcmtlcigKICAgIFs1MC4yNjY5MzQ0LDEwLjk1MDc3MzVdLCAKICAgIG1hcmtlcl9vcHRpb25zCik7CnZhciBpc19pbWFnZSA9IG1hcC5pc19pbWFnZV9tYXA7CmlmIChtYXJrZXJfb3B0aW9ucy5kcmFnZ2FibGUpIHsKICAgIG1hcmtlci5vbignZHJhZ2VuZCcsIGZ1bmN0aW9uICgpIHsK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os MEDAUlogo Sonnefeld farbe

Logos MEDAUfit Sonnefeld farbe

OpenStreetMap

Mit dem Laden der Karte akzeptieren Sie die Datenschutzerklärung von OpenStreetMap Foundation.
Mehr erfahren

Karte laden

PGRpdiBjbGFzcz0ibGVhZmxldC1tYXAgV1BMZWFmbGV0TWFwIiBzdHlsZT0iaGVpZ2h0OjUwMHB4OyB3aWR0aDoxMDAlOyI+PC9kaXY+PHNjcmlwdD4Kd2luZG93LldQTGVhZmxldE1hcFBsdWdpbiA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gfHwgW107CndpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiBXUExlYWZsZXRNYXBTaG9ydGNvZGUoKSB7Lyo8c2NyaXB0PiovCnZhciBiYXNlVXJsID0gJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJzsKdmFyIGJhc2UgPSAoIWJhc2VVcmwgJiYgd2luZG93Lk1RKSA/IAogICAgd2luZG93Lk1RLm1hcExheWVyKCkgOiBMLnRpbGVMYXllcihiYXNlVXJsLCAKICAgICAgICBMLlV0aWwuZXh0ZW5kKHt9LCB7CiAgICAgICAgICAgIGRldGVjdFJldGluYTogMCwKICAgICAgICAgICAgbWluWm9vbTogMCwKICAgICAgICAgICAgbWF4Wm9vbTogMjAsCiAgICAgICAgfSwgCiAgICAgICAgeyJzdWJkb21haW5zIjoiYWJjIiwibm9XcmFwIjpmYWxzZX0gICAgICAgICkKICAgICk7CiAgICB2YXIgb3B0aW9ucyA9IEwuVXRpbC5leHRlbmQoe30sIHsKICAgICAgICBsYXllcnM6IFtiYXNlXSwKICAgICAgICBhdHRyaWJ1dGlvbkNvbnRyb2w6IGZhbHNlCiAgICB9LCAKICAgIHsiem9vbUNvbnRyb2wiOnRydWUsInNjcm9sbFdoZWVsWm9vbSI6ZmFsc2UsImRvdWJsZUNsaWNrWm9vbSI6ZmFsc2U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wogICAgdmFyIGljb25BcnJheXMgPSBbCiAgICAgICAgJ2ljb25TaXplJywgCiAgICAgICAgJ2ljb25BbmNob3InLCAKICAgICAgICAnc2hhZG93U2l6ZScsIAogICAgICAgICdzaGFkb3dBbmNob3InLAogICAgICAgICdwb3B1cEFuY2hvcicKICAgIF07CiAgICB2YXIgZGVmYXVsdF9pY29uID0gTC5JY29uLkRlZmF1bHQucHJvdG90eXBlLm9wdGlvbnM7CiAgICBpZiAoX29wdGlvbnMuaWNvblVybCkgewogICAgICAgIC8vIGFycmF5cyBhcmUgc3RyaW5ncywgdW5mb3J0dW5hdGVseS4uLgogICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBpY29uQXJyYXlzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgIHZhciBvcHRpb25fbmFtZSA9IGljb25BcnJheXNbaV07CiAgICAgICAgICAgIHZhciBvcHRpb24gPSBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXTsKICAgICAgICAgICAgLy8gY29udmVydCAiMSwyIiB0byBbMSwgMl07CiAgICAgICAgICAgIGlmIChvcHRpb24pIHsKICAgICAgICAgICAgICAgIHZhciBhcnIgPSBvcHRpb24uam9pbignJykuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgIC8vIGFycmF5Lm1hcCBmb3IgaWU8OQogICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDAsIGxlbkogPSBhcnIubGVuZ3RoOyBqIDwgbGVuSjsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyW2pdID0gTnVtYmVyKGFycltqXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXSA9IGFycjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAvLyBkZWZhdWx0IHBvcHVwQW5jaG9yCiAgICAgICAgaWYgKCFfb3B0aW9ucy5wb3B1cEFuY2hvcikgewogICAgICAgICAgICAvLyBzZXQgKHJvdWdobHkpIHRvIHNpemUgb2YgaWNvbgogICAgICAgICAgICBfb3B0aW9ucy5wb3B1cEFuY2hvciA9IChmdW5jdGlvbiAoaV9zaXplKSB7CiAgICAgICAgICAgICAgICAvLyBjb3B5IGFycmF5CiAgICAgICAgICAgICAgICBpX3NpemUgPSBpX3NpemUuc2xpY2UoKTsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLy8gaW52ZXJzZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgaV9zaXplWzBdID0gMDsKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAqPSAtMTsKICAgICAgICAgICAgICAgIC8vIGJvdHRvbSBwb3NpdGlvbiBvbiBwb3B1cCBpcyA3cHgKICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAtPSAzOwogICAgICAgICAgICAgICAgcmV0dXJuIGlfc2l6ZTsKICAgICAgICAgICAgfSkoX29wdGlvbnMuaWNvblNpemUgfHwgZGVmYXVsdF9pY29uLmljb25TaXplKTsKICAgICAgICB9CiAgICAgICAgX29wdGlvbnMuaWNvbiA9IG5ldyBMLkljb24oIF9vcHRpb25zICk7CiAgICB9CiAgICByZXR1cm4gX29wdGlvbnM7Cn0pKCk7CnZhciBtYXJrZXIgPSBMLm1hcmtlcigKICAgIFs1MC4yMTc3NDgxLDExLjE0MTU5NThdLCAKICAgIG1hcmtlcl9vcHRpb25zCik7CnZhciBpc19pbWFnZSA9IG1hcC5pc19pbWFnZV9tYXA7CmlmIChtYXJrZXJfb3B0aW9ucy5kcmFnZ2FibGUpIHsKICAgIG1hcmtlci5vbignZHJhZ2VuZCcsIGZ1bmN0aW9uICgpIHsKICAgICAgICB2YXIgbGF0bG5nID0gdGhpcy5nZXRMYXRMbmcoKTsKICAgICAgICB2YXIgbGF0ID0gbGF0bG5nLmxhdDsKICAgICAgICB2YXIgbG5nID0gbGF0bG5nLmxuZzsKICAgICAgICBpZiAoaXNfaW1hZ2UpIHsKICAgICAgICAgICAgY29uc29sZS5sb2coJ2xlYWZsZXQtbWFya2VyIHk9JyArIGxhdCArICcgeD0nICsgbG5nKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBjb25zb2xlLmxvZygnbGVhZmxldC1tYXJrZXIgbGF0PScgKyBsYXQgKyAnIGxuZz0nICsgbG5nKTsKICAgICAgICB9CiAgICB9KTsKfQptYXJrZXIuYWRkVG8oIGdyb3VwICk7Cm1hcmtlci5iaW5kUG9wdXAod2luZG93LldQTGVhZmxldE1hcFBsdWdpbi51bmVzY2FwZSgnJmx0O3N0cm9uZyZndDtNRURBVXBoeXNpbyBTb25uZWZlbGQmbHQ7L3N0cm9uZyZndDsmbHQ7YnIgLyZndDsmbHQ7YnImZ3Q7V2VpZGjDpHVzZXIgU3RyLiAxMCZsdDticiAvJmd0OyZsdDticiZndDs5NjI0MiBTb25uZWZlbGQmbHQ7YnIgLyZndDsmbHQ7YnImZ3Q7VGVsZWZvbjogMDk1NjItODUyMiZsdDticiAvJmd0OyZsdDticiZndDsmbHQ7YSBocmVmPVwmcXVvdDttYWlsdG86cHJheGlzLXNvbm5lZmVsZEBtZWRhdS1waHlzaW8uZGVcJnF1b3Q7Jmd0O3ByYXhpcy1zb25uZWZlbGRAbWVkYXUtcGh5c2lvLmRlJmx0Oy9hJmd0OycpKTt3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luLm1hcmtlcnMucHVzaCggbWFya2VyICk7CiAgICAgICAgfSk7PC9zY3JpcHQ+

Bamberg

OpenStreetMap

Mit dem Laden der Karte akzeptieren Sie die Datenschutzerklärung von OpenStreetMap Foundation.
Mehr erfahren

Karte laden

PGRpdiBjbGFzcz0ibGVhZmxldC1tYXAgV1BMZWFmbGV0TWFwIiBzdHlsZT0iaGVpZ2h0OjUwMHB4OyB3aWR0aDoxMDAlOyI+PC9kaXY+PHNjcmlwdD4Kd2luZG93LldQTGVhZmxldE1hcFBsdWdpbiA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4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uYXRlbHkuLi4KICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gaWNvbkFycmF5cy5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICB2YXIgb3B0aW9uX25hbWUgPSBpY29uQXJyYXlzW2ldOwogICAgICAgICAgICB2YXIgb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLT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EsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAgICAgICAgIHJldHVybiBpX3NpemU7CiAgICAgICAgICAgIH0pKF9vcHRpb25zLmljb25TaXplIHx8IGRlZmF1bHRfaWNvbi5pY29uU2l6ZSk7CiAgICAgICAgfQogICAgICAgIF9vcHRp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IC8mZ3Q7RmF4OiAwOTExIDkzNzcxOTc1MCZsdDticiAvJmd0O0UtTWFpbDogJmx0O2EgaHJlZj1cJnF1b3Q7bWFpbHRvOnByYXhpcy1yb2xsbmVyc3RyYXNzZUBtZWRhdS1sb2dvLmRlXCZxdW90OyZndDtwcmF4aXMtcm9sbG5lcnN0cmFzc2VAbWVkYXUtbG9nby5kZSZsdDsvYSZndDsnKSk7d2luZG93LldQTGVhZmxldE1hcFBsdWdpbi5tYXJrZXJzLnB1c2goIG1hcmtlciApOwogICAgICAgIH0pOzwvc2NyaXB0Pg==

München

OpenStreetMap

Mit dem Laden der Karte akzeptieren Sie die Datenschutzerklärung von OpenStreetMap Foundation.
Mehr erfahren

Karte laden

PGRpdiBjbGFzcz0ibGVhZmxldC1tYXAgV1BMZWFmbGV0TWFwIiBzdHlsZT0iaGVpZ2h0OjUwMHB4OyB3aWR0aDoxMDAlOyI+PC9kaXY+PHNjcmlwdD4Kd2luZG93LldQTGVhZmxldE1hcFBsdWdpbiA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gfHwgW107CndpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiBXUExlYWZsZXRNYXBTaG9ydGNvZGUoKSB7Lyo8c2NyaXB0PiovCnZhciBiYXNlVXJsID0gJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJzsKdmFyIGJhc2UgPSAoIWJhc2VVcmwgJiYgd2luZG93Lk1RKSA/IAogICAgd2luZG93Lk1RLm1hcExheWVyKCkgOiBMLnRpbGVMYXllcihiYXNlVXJsLCAKICAgICAgICBMLlV0aWwuZXh0ZW5kKHt9LCB7CiAgICAgICAgICAgIGRldGVjdFJldGluYTogMCwKICAgICAgICAgICAgbWluWm9vbTogMCwKICAgICAgICAgICAgbWF4Wm9vbTogMjAsCiAgICAgICAgfSwgCiAgICAgICAgeyJzdWJkb21haW5zIjoiYW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cuV1BMZWFmbGV0TWFwUGx1Z2luLmdldEN1cnJlbnRHcm91cCgpOwp2YXIgbWFya2VyX29wdGlvbnMgPSAoZnVuY3Rpb24gKCkgewogICAgdmFyIF9vcHRpb25zID0geyJpY29uVXJsIjoiXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDE3XC8wOFwvbWFya2VyLnBuZyIsImljb25TaXplIjpbIjUxLDU4Il0sImljb25BbmNob3IiOlsiMjUuNSw1OCJdfTsKICAgIHZhciBpY29uQXJyYXlzID0gWwogICAgICAgICdpY29uU2l6ZScsIAogICAgICAgICdpY29uQW5jaG9yJywgCiAgICAgICAgJ3NoYWRvd1NpemUnLCAKICAgICAgICAnc2hhZG93QW5jaG9yJywKICAgICAgICAncG9wdXBBbmNob3InCiAgICBdOwogICAgdmFyIGRlZmF1bHRfaWNvbiA9IEwuSWNvbi5EZWZhdWx0LnByb3RvdHlwZS5vcHRpb25zOwogICAgaWYgKF9vcHRpb25zLmljb25VcmwpIHsKICAgICAgICAvLyBhcnJheXMgYXJlIHN0cmluZ3MsIHVuZm9ydHVuYXRlbHkuLi4KICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gaWNvbkFycmF5cy5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICB2YXIgb3B0aW9uX25hbWUgPSBpY29uQXJyYXlzW2ldOwogICAgICAgICAgICB2YXIgb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAgICAgICAgIHJldHVybiBpX3NpemU7CiAgICAgICAgICAgIH0pKF9vcHRpb25zLmljb25TaXplIHx8IGRlZmF1bHRfaWNvbi5pY29uU2l6ZSk7CiAgICAgICAgfQogICAgICAgIF9vcHRpb25zLmljb24gPSBuZXcgTC5JY29uKCBfb3B0aW9ucyApOwogICAgfQogICAgcmV0dXJuIF9vcHRpb25zOwp9KSgpOwp2YXIgbWFya2VyID0gTC5tYXJrZXIoCiAgICBbNDguMTI2MzU0MiwxMS41NTE1NzU4XSwgCiAgICBtYXJrZXJfb3B0aW9ucwopOwp2YXIgaXNfaW1hZ2UgPSBtYXAuaXNfaW1hZ2VfbWFwOwppZiAobWFya2VyX29wdGlvb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