Kontakt

Wir freuen uns auf Ihre Nachricht!

Rosalie Landhaus Catering und Event GmbH & Co KG

Dorfstraße 21
23881 Breitenfelde
Tel.: 0 45 42-83 60 67
Fax: 0 45 42-83 60 68

info@landhaus-rosalie.de
www.landhaus-rosalie.de

Parkplätze, sowie ein barrierefreier Zugang, sind vorhanden.

Kontaktformular
Hinweis: Sie können Ihre Einwilligung jederzeit für die Zukunft per E-Mail an info@landhaus-rosalie.de widerrufen. Detaillierte Informationen zum Umgang mit Nutzerdaten finden Sie in unserer Datenschutzerklärung.
Hinweis: Sie können Ihre Einwilligung jederzeit für die Zukunft per E-Mail an info@gutshaus-grambek.de widerrufen. Detaillierte Informationen zum Umgang mit Nutzerdaten finden Sie in unserer Datenschutzerklärung.
Wird gesendet
OpenStreetMap

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

Karte laden

ICAgICAgICA8ZGl2IAogICAgICAgICAgICBpZD0ibGVhZmxldC1tYXAtNTljNDhkMDQ4YjAxNyIgCiAgICAgICAgICAgIGNsYXNzPSJsZWFmbGV0LW1hcCIgCiAgICAgICAgICAgIHN0eWxlPSJoZWlnaHQ6NDQwcHg7IHdpZHRoOjEwMCU7Ij48L2Rpdj4KICAgICAgICA8c2NyaXB0PgogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gPSB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luIHx8IFtdOwogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBiYXNlVXJsID0gJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIGJhc2UgPSAoIWJhc2VVcmwgJiYgd2luZG93Lk1RKSA/IAogICAgICAgICAgICAgICAgICAgIE1RLm1hcExheWVyKCkgOiBMLnRpbGVMYXllcihiYXNlVXJsLCB7IAogICAgICAgICAgICAgICAgICAgICAgICBzdWJkb21haW5zOiAnYWJjJwogICAgICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICAgICAgb3B0aW9ucyA9IEwuVXRpbC5leHRlbmQoe30sIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAyMCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAwLAogICAgICAgICAgICAgICAgICAgIGxheWVyczogW2Jhc2VdLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiAxLAogICAgICAgICAgICAgICAgICAgIHNjcm9sbFdoZWVsWm9vbTogMCwKICAgICAgICAgICAgICAgICAgICBkb3VibGVDbGlja1pvb206IDAsCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRpb25Db250cm9sOiBmYWxzZQogICAgICAgICAgICAgICAgfSwgeyJrZXlib2FyZCI6ZmFsc2V9KSwKICAgICAgICAgICAgICAgIG1hcCA9IEwubWFwKCdsZWFmbGV0LW1hcC01OWM0OGQwNDhiMDE3Jywgb3B0aW9ucykKICAgICAgICAgICAgICAgICAgICAuc2V0VmlldyhbNTMuNjA0NTQ0NzUsMTAuNjM2ODE5MTA3MTM2OF0sMTUpOwogICAgICAgICAgICBpZiAoMCkgewogICAgICAgICAgICAgICAgbWFwLl9zaG91bGRGaXRCb3VuZHMgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXR0Q29udHJvbCA9IEwuY29udHJvbC5hdHRyaWJ1dGlvbih7cHJlZml4OmZhbHNlfSkuYWRkVG8obWFwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0Q29udHJvbC5hZGRBdHRyaWJ1dGlvbignPGEgaHJlZj0iaHR0cDovL2xlYWZsZXRqcy5jb20iIHRpdGxlPSJBIEpTIGxpYnJhcnkgZm9yIGludGVyYWN0aXZlIG1hcHMiPkxlYWZsZXQ8L2E+Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dENvbnRyb2wuYWRkQXR0cmlidXRpb24oJ1xyXG7CqSA8YSBocmVmPSJodHRwOi8vd3d3Lm9wZW5zdHJlZXRtYXAub3JnL2NvcHlyaWdodCI+T3BlblN0cmVldE1hcDwvYT4gY29udHJpYnV0b3JzJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luLm1hcHMucHVzaChtYXApOwogICAgICAgIH0pOyAvLyBlbmQgYWRkCiAgICAgICAgPC9zY3JpcHQ+ICAgICAgICA8c2NyaXB0PgogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gPSB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luIHx8IFtdOwogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBtYXJrZXJfb3B0aW9ucyA9IChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICB2YXIgX29wdGlvbnMgPSB7fTsKICAgICAgICAgICAgICAgIHZhciBpY29uQXJyYXlzID0gWwogICAgICAgICAgICAgICAgICAgICdpY29uU2l6ZScsIAogICAgICAgICAgICAgICAgICAgICdpY29uQW5jaG9yJywgCiAgICAgICAgICAgICAgICAgICAgJ3NoYWRvd1NpemUnLCAKICAgICAgICAgICAgICAgICAgICAnc2hhZG93QW5jaG9yJywKICAgICAgICAgICAgICAgICAgICAncG9wdXBBbmNob3InCiAgICAgICAgICAgICAgICBdOwogICAgICAgICAgICAgICAgdmFyIGRlZmF1bHRfaWNvbiA9IEwuSWNvbi5EZWZhdWx0LnByb3RvdHlwZS5vcHRpb25zOwogICAgICAgICAgICAgICAgaWYgKF9vcHRpb25zLmljb25VcmwpIHsKICAgICAgICAgICAgICAgICAgICAvLyBhcnJheXMgYXJlIHN0cmluZ3MsIHVuZm9ydHVuYXRlbHkuLi4KICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gaWNvbkFycmF5cy5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3B0aW9uX25hbWUgPSBpY29uQXJyYXlzW2ldLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uID0gX29wdGlvbnNbIG9wdGlvbl9uYW1lIF07CiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnZlcnQgIjEsMiIgdG8gWzEsIDJdOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9uKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXJyID0gb3B0aW9uLmpvaW4oJycpLnNwbGl0KCcsJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhcnJheS5tYXAgZm9yIGllPDkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwLCBsZW5KID0gYXJyLmxlbmd0aDsgaiA8IGxlbko7IGorKykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycltqXSA9IE51bWJlcihhcnJbal0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgX29wdGlvbnNbIG9wdGlvbl9uYW1lIF0gPSBhcnI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgLy8gZGVmYXVsdCBwb3B1cEFuY2hvcgogICAgICAgICAgICAgICAgICAgIGlmICghX29wdGlvbnMucG9wdXBBbmNob3IpIHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2V0IChyb3VnaGx5KSB0byBzaXplIG9mIGljb24KICAgICAgICAgICAgICAgICAgICAgICAgX29wdGlvbnMucG9wdXBBbmNob3IgPSAoZnVuY3Rpb24gKGlfc2l6ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29weSBhcnJheQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaV9zaXplID0gaV9zaXplLnNsaWNlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGludmVyc2UgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlfc2l6ZVswXSA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpX3NpemVbMV0gKj0gLTE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBib3R0b20gcG9zaXRpb24gb24gcG9wdXAgaXMgN3B4CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpX3NpemVbMV0gLT0gMzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpX3NpemU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pKF9vcHRpb25zLmljb25TaXplIHx8IGRlZmF1bHRfaWNvbi5pY29uU2l6ZSk7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBfb3B0aW9ucy5pY29uID0gbmV3IEwuSWNvbiggX29wdGlvbnMgKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBfb3B0aW9uczsKICAgICAgICAgICAgfSkoKTsKICAgICAgICAgICAgdmFyIGRyYWdnYWJsZSA9IG1hcmtlcl9vcHRpb25zLmRyYWdnYWJsZTsKICAgICAgICAgICAgdmFyIG1hcmtlciA9IEwubWFya2VyKAogICAgICAgICAgICAgICAgWzAsMF0sIAogICAgICAgICAgICAgICAgbWFya2VyX29wdGlvbnMKICAgICAgICAgICAgKTsKICAgICAgICAgICAgdmFyIG1hcCA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4uZ2V0Q3VycmVudE1hcCgpOwogICAgICAgICAgICB2YXIgaXNfaW1hZ2UgPSBtYXAuaXNfaW1hZ2VfbWFwOwogICAgICAgICAgICB2YXIgZ3JvdXAgPSB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luLmdldEN1cnJlbnRHcm91cCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc19pbWFnZSkgewogICAgICAgICAgICAgICAgICAgIG1hcmtlci5zZXRMYXRMbmcoIG1hcC5nZXRDZW50ZXIoKSApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBtYXJrZXIuc2V0TGF0TG5nKCBbMCwgMF0gKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRyYWdnYWJsZSkgewogICAgICAgICAgICAgICAgbWFya2VyLm9uKCdkcmFnZW5kJywgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHZhciBsYXRsbmcgPSB0aGlzLmdldExhdExuZygpLAogICAgICAgICAgICAgICAgICAgICAgICBsYXQgPSBsYXRsbmcubGF0LAogICAgICAgICAgICAgICAgICAgICAgICBsbmcgPSBsYXRsbmcubG5nOwogICAgICAgICAgICAgICAgICAgIGlmIChpc19pbWFnZSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnbGVhZmxldC1tYXJrZXIgeT0nICsgbGF0ICsgJyB4PScgKyBsbmcpOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdsZWFmbGV0LW1hcmtlciBsYXQ9JyArIGxhdCArICcgbG5nPScgKyBsbmcpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG1hcmtlci5hZGRUbyggZ3JvdXAgKTsKICAgICAgICAgICAgbWFya2VyLmJpbmRQb3B1cCh3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luLnVuZXNjYXBlKCdEb3Jmc3RyYcOfZSAyMSwgMjM4ODEgQnJlaXRlbmZlbGRlLCBHZXJtYW55JykpOyAgICAgICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ubWFya2Vycy5wdXNoKCBtYXJrZXIgKTsKICAgICAgICB9KTsgLy8gZW5kIGFkZCBmdW5jdGlvbgogICAgICAgIDwvc2NyaXB0PgogICAgICAgIA==
OpenStreetMap

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

Karte laden

ICAgICAgICA8ZGl2IAogICAgICAgICAgICBpZD0ibGVhZmxldC1tYXAtYzJmN2RkNjYyZTViYiIgCiAgICAgICAgICAgIGNsYXNzPSJsZWFmbGV0LW1hcCIgCiAgICAgICAgICAgIHN0eWxlPSJoZWlnaHQ6NDQwcHg7IHdpZHRoOjEwMCU7Ij48L2Rpdj4KICAgICAgICA8c2NyaXB0PgogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gPSB3aW5kb3cuV1BMZWFmbGV0TWFwUGx1Z2luIHx8IFtdOwogICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ucHVzaChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgIHZhciBiYXNlVXJsID0gJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIGJhc2UgPSAoIWJhc2VVcmwgJiYgd2luZG93Lk1RKSA/IAogICAgICAgICAgICAgICAgICAgIE1RLm1hcExheWVyKCkgOiBMLnRpbGVMYXllcihiYXNlVXJsLCB7IAogICAgICAgICAgICAgICAgICAgICAgICBzdWJkb21haW5zOiAnYWJjJwogICAgICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICAgICAgb3B0aW9ucyA9IEwuVXRpbC5leHRlbmQoe30sIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAyMCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAwLAogICAgICAgICAgICAgICAgICAgIGxheWVyczogW2Jhc2VdLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiAxLAogICAgICAgICAgICAgICAgICAgIHNjcm9sbFdoZWVsWm9vbTogMCwKICAgICAgICAgICAgICAgICAgICBkb3VibGVDbGlja1pvb206IDAsCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRpb25Db250cm9sOiBmYWxzZQogICAgICAgICAgICAgICAgfSwgeyJrZXlib2FyZCI6ZmFsc2V9KSwKICAgICAgICAgICAgICAgIG1hcCA9IEwubWFwKCdsZWFmbGV0LW1hcC1jMmY3ZGQ2NjJlNWJiJywgb3B0aW9ucykKICAgICAgICAgICAgICAgICAgICAuc2V0VmlldyhbNTMuNTc0MTA5MSwxMC42ODA2ODQ4XSwxNSk7CiAgICAgICAgICAgIGlmICgwKSB7CiAgICAgICAgICAgICAgICBtYXAuX3Nob3VsZEZpdEJvdW5kcyA9IHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHRDb250cm9sID0gTC5jb250cm9sLmF0dHJpYnV0aW9uKHtwcmVmaXg6ZmFsc2V9KS5hZGRUbyhtYXApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRDb250cm9sLmFkZEF0dHJpYnV0aW9uKCc8YSBocmVmPSJodHRwOi8vbGVhZmxldGpzLmNvbSIgdGl0bGU9IkEgSlMgbGlicmFyeSBmb3IgaW50ZXJhY3RpdmUgbWFwcyI+TGVhZmxldDwvYT4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0Q29udHJvbC5hZGRBdHRyaWJ1dGlvbignXHJcbsKpIDxhIGhyZWY9Imh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0Ij5PcGVuU3RyZWV0TWFwPC9hPiBjb250cmlidXRvcnMnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ubWFwcy5wdXNoKG1hcCk7CiAgICAgICAgfSk7IC8vIGVuZCBhZGQKICAgICAgICA8L3NjcmlwdD4gICAgICAgIDxzY3JpcHQ+CiAgICAgICAgd2luZG93LldQTGVhZmxldE1hcFBsdWdpbiA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4gfHwgW107CiAgICAgICAgd2luZG93LldQTGVhZmxldE1hcFBsdWdpbi5wdXNoKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIG1hcmtlcl9vcHRpb25zID0gKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHZhciBfb3B0aW9ucyA9IHt9OwogICAgICAgICAgICAgICAgdmFyIGljb25BcnJheXMgPSBbCiAgICAgICAgICAgICAgICAgICAgJ2ljb25TaXplJywgCiAgICAgICAgICAgICAgICAgICAgJ2ljb25BbmNob3InLCAKICAgICAgICAgICAgICAgICAgICAnc2hhZG93U2l6ZScsIAogICAgICAgICAgICAgICAgICAgICdzaGFkb3dBbmNob3InLAogICAgICAgICAgICAgICAgICAgICdwb3B1cEFuY2hvcicKICAgICAgICAgICAgICAgIF07CiAgICAgICAgICAgICAgICB2YXIgZGVmYXVsdF9pY29uID0gTC5JY29uLkRlZmF1bHQucHJvdG90eXBlLm9wdGlvbnM7CiAgICAgICAgICAgICAgICBpZiAoX29wdGlvbnMuaWNvblVybCkgewogICAgICAgICAgICAgICAgICAgIC8vIGFycmF5cyBhcmUgc3RyaW5ncywgdW5mb3J0dW5hdGVseS4uLgogICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBpY29uQXJyYXlzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvcHRpb25fbmFtZSA9IGljb25BcnJheXNbaV0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24gPSBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXTsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udmVydCAiMSwyIiB0byBbMSwgMl07CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb24pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhcnIgPSBvcHRpb24uam9pbignJykuc3BsaXQoJywnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFycmF5Lm1hcCBmb3IgaWU8OQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDAsIGxlbkogPSBhcnIubGVuZ3RoOyBqIDwgbGVuSjsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyW2pdID0gTnVtYmVyKGFycltqXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfb3B0aW9uc1sgb3B0aW9uX25hbWUgXSA9IGFycjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAvLyBkZWZhdWx0IHBvcHVwQW5jaG9yCiAgICAgICAgICAgICAgICAgICAgaWYgKCFfb3B0aW9ucy5wb3B1cEFuY2hvcikgewogICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgKHJvdWdobHkpIHRvIHNpemUgb2YgaWNvbgogICAgICAgICAgICAgICAgICAgICAgICBfb3B0aW9ucy5wb3B1cEFuY2hvciA9IChmdW5jdGlvbiAoaV9zaXplKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb3B5IGFycmF5CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpX3NpemUgPSBpX3NpemUuc2xpY2UoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW52ZXJzZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaV9zaXplWzBdID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAqPSAtMTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJvdHRvbSBwb3NpdGlvbiBvbiBwb3B1cCBpcyA3cHgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlfc2l6ZVsxXSAtPSAzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlfc2l6ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfSkoX29wdGlvbnMuaWNvblNpemUgfHwgZGVmYXVsdF9pY29uLmljb25TaXplKTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIF9vcHRpb25zLmljb24gPSBuZXcgTC5JY29uKCBfb3B0aW9ucyApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuIF9vcHRpb25zOwogICAgICAgICAgICB9KSgpOwogICAgICAgICAgICB2YXIgZHJhZ2dhYmxlID0gbWFya2VyX29wdGlvbnMuZHJhZ2dhYmxlOwogICAgICAgICAgICB2YXIgbWFya2VyID0gTC5tYXJrZXIoCiAgICAgICAgICAgICAgICBbMCwwXSwgCiAgICAgICAgICAgICAgICBtYXJrZXJfb3B0aW9ucwogICAgICAgICAgICApOwogICAgICAgICAgICB2YXIgbWFwID0gd2luZG93LldQTGVhZmxldE1hcFBsdWdpbi5nZXRDdXJyZW50TWFwKCk7CiAgICAgICAgICAgIHZhciBpc19pbWFnZSA9IG1hcC5pc19pbWFnZV9tYXA7CiAgICAgICAgICAgIHZhciBncm91cCA9IHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4uZ2V0Q3VycmVudEdyb3VwKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzX2ltYWdlKSB7CiAgICAgICAgICAgICAgICAgICAgbWFya2VyLnNldExhdExuZyggbWFwLmdldENlbnRlcigpICk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIG1hcmtlci5zZXRMYXRMbmcoIFswLCAwXSApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZHJhZ2dhYmxlKSB7CiAgICAgICAgICAgICAgICBtYXJrZXIub24oJ2RyYWdlbmQnLCBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGxhdGxuZyA9IHRoaXMuZ2V0TGF0TG5nKCksCiAgICAgICAgICAgICAgICAgICAgICAgIGxhdCA9IGxhdGxuZy5sYXQsCiAgICAgICAgICAgICAgICAgICAgICAgIGxuZyA9IGxhdGxuZy5sbmc7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzX2ltYWdlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdsZWFmbGV0LW1hcmtlciB5PScgKyBsYXQgKyAnIHg9JyArIGxuZyk7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2xlYWZsZXQtbWFya2VyIGxhdD0nICsgbGF0ICsgJyBsbmc9JyArIGxuZyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbWFya2VyLmFkZFRvKCBncm91cCApOwogICAgICAgICAgICBtYXJrZXIuYmluZFBvcHVwKHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4udW5lc2NhcGUoJ1NjaGxvw59zdHJhw59lIDIxLCAyMzg4MyBHcmFtYmVrJykpOyAgICAgICAgICAgIHdpbmRvdy5XUExlYWZsZXRNYXBQbHVnaW4ubWFya2Vycy5wdXNoKCBtYXJrZXIgKTsKICAgICAgICB9KTsgLy8gZW5kIGFkZCBmdW5jdGlvbgogICAgICAgIDwvc2NyaXB0PgogICAgICAgIA==