using System.Linq;

using Turbo.Plugins.Default;

using SharpDX.DirectInput;
using System.Collections.Generic;

namespace Turbo.Plugins.User
{

    public class MobsOnMapColorsPlugin : BasePlugin, IInGameWorldPainter, IKeyEventHandler
	{
	      public WorldDecoratorCollection Decorator0 { get; set; }
        public WorldDecoratorCollection Decorator1 { get; set; }
        public WorldDecoratorCollection Decorator2 { get; set; }
        public WorldDecoratorCollection Decorator3 { get; set; }
        public WorldDecoratorCollection Decorator4 { get; set; }
        public WorldDecoratorCollection Decorator5 { get; set; }
        
        public WorldDecoratorCollection BullsChargersDecorator { get; set; }
        public WorldDecoratorCollection UnpulledDecorator { get; set; }
        public WorldDecoratorCollection LickerDecorator { get; set; }
        public WorldDecoratorCollection FallenDecorator { get; set; }
        public WorldDecoratorCollection GrotesqueDecorator { get; set; }
        public WorldDecoratorCollection SkeletonSummonerDecorator { get; set; }
        public WorldDecoratorCollection DangerRangeDecorator { get; set; }
        public WorldDecoratorCollection EjDecorator { get; set; }
        public WorldDecoratorCollection CoockieDecorator { get; set; }
        public WorldDecoratorCollection SmolderingDecorator { get; set; }
        public WorldDecoratorCollection SuccubDecorator { get; set; }
        public WorldDecoratorCollection UnijenDecorator { get; set; }
        public WorldDecoratorCollection ShamanDecorator { get; set; }
        public WorldDecoratorCollection SwarmDecorator { get; set; }
        public WorldDecoratorCollection BoganDecorator { get; set; }
        public WorldDecoratorCollection MaidenDecorator { get; set; }
        public WorldDecoratorCollection ThrallDecorator { get; set; }
        public WorldDecoratorCollection LegionerDecorator { get; set; }
        public WorldDecoratorCollection BabkaDecorator { get; set; }
        public WorldDecoratorCollection CarrotDecorator { get; set; }        
        public WorldDecoratorCollection NightmareDecorator { get; set; }
        public WorldDecoratorCollection TrapperDecorator { get; set; }
        public WorldDecoratorCollection MaggotDecorator { get; set; }
        public WorldDecoratorCollection BersDecorator { get; set; }
        public WorldDecoratorCollection HellionDecorator { get; set; }
        public WorldDecoratorCollection SummonerDecorator { get; set; }
        public WorldDecoratorCollection CultistDecorator { get; set; }
        public WorldDecoratorCollection MalletDecorator { get; set; }
        public WorldDecoratorCollection DervishDecorator { get; set; }
        public WorldDecoratorCollection WyattChengDecorator { get; set; }
        public WorldDecoratorCollection CadaverDecorator { get; set; }
                
        public double DisplayLimit { get; set; }
        public IKeyEvent ToggleKeyEvent { get; set; }
        public bool TurnedOn { get; set; }
                

        public MobsOnMapColorsPlugin()
		{
            Enabled = true;

Order = 29000;
		}
        //Circle, Cross, Door, Plus, Rectangle, Rotating Rectangle, Triangle, and Well
        public override void Load(IController hud)
        {
            base.Load(hud);
 ToggleKeyEvent = Hud.Input.CreateKeyEvent(true, Key.F8, false, false, false);
            TurnedOn = false;
            DisplayLimit = 0.0;
            
            var shadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1);

            Decorator0 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                }
                );
            Decorator1 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(128, 200, 200, 200, 0),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 2,
                }
                );
            Decorator2 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 200, 0, 0),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 4,
                }
                );
            Decorator3 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 125, 0, 0),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 5,
                }
                );
            Decorator4 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 200, 0, 0),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 6,
                },
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 55, 0, 2),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 6,
                }
                );
            Decorator5 = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 125, 0, 0),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 7,
                },
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(180, 0, 55, 0, 2),
                    ShadowBrush = shadowBrush,
                    ShapePainter = new CircleShapePainter(Hud),
                    Radius = 7,
                }
                );
                
           BullsChargersDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            UnpulledDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 0, 255, 0),
                    Radius = 5,
                    ShapePainter = new RectangleShapePainter(Hud),
                }
            );
            
            LickerDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 140, 20, 2.3f),
                    Radius = 2,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            FallenDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 3),
                    Radius = 2.5f,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            GrotesqueDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2),
                    Radius = 3.5f,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            SkeletonSummonerDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 2),
                    Radius = 3,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            DangerRangeDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2),
                    Radius = 3,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );            
            
            EjDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            CoockieDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 0, 255, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            SmolderingDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            SuccubDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 140, 20, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );                         
            
            UnijenDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 1),
                    Radius = 1,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            ShamanDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            SwarmDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            BoganDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 40, 125, 40, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            MaidenDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 100, 255, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
                        
            ThrallDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 2),
                    Radius = 3.5f,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            LegionerDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 140, 20, 1),
                    Radius = 1,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            BabkaDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 1),
                    Radius = 1,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            CarrotDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            NightmareDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 255, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            TrapperDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 40, 125, 40, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            MaggotDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            BersDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            HellionDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 2),
                    Radius = 2,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            SummonerDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 2),
                    Radius = 3,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            CultistDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 1),
                    Radius = 1,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );
            
            MalletDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 0, 0, 255, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            DervishDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2),
                    Radius = 7,
                    ShapePainter = new CrossShapePainter(Hud),
                }
            );
            
            WyattChengDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2.4f),
                    Radius = 6,
                    ShapePainter = new TriangleShapePainter(Hud),
                }
            );
            
            CadaverDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 100, 255, 2),
                    Radius = 3,
                    ShapePainter = new CircleShapePainter(Hud),
                }
            );                                                                                                                                                
        }
        
    public WorldDecoratorCollection GetDecoratorByProgression(float progression)
        {
            if (progression <= 1.0) return Decorator1;
            if (progression <= 2.0) return Decorator2;
            if (progression <= 3.0) return Decorator3;
            if (progression <= 4.0) return Decorator4;
            return Decorator0; // in theory there is no monster with >10 progression
        }


public void OnKeyEvent(IKeyEvent keyEvent)
        {
            if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent))
            {
                TurnedOn = !TurnedOn;
            }
        } 

		public void PaintWorld(WorldLayer layer)
		{
  var inRift = Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.GreaterRift;
            var monsters = Hud.Game.AliveMonsters.Where(x => !x.IsElite);
			if (!TurnedOn) return;
            if (!inRift) return;
            foreach (var monster in monsters)
            {
                var decorator = GetDecoratorByProgression(monster.SnoMonster.RiftProgression);
                decorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            
            var Set = Hud.Game.AliveMonsters.Where(x => !x.IsElite);
            foreach (var actor in Set)
            {
                switch ((uint)actor.SnoActor.Sno)
                {
                    case 3337: // Savage Beast 3337, Horned Charger 3338, Wooly Beast 3339, Great Horned Goliath 3342, Skeletal Beast 288691
                    case 3338:          
                    case 3339:
                    case 3342:
                    case 288691:          
                BullsChargersDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 147328: // WoodWalker ??, Executioner 332679, Golgor 5581 189852 192850, Punisher 258678, Tremor 60722 205767, 
                    case 5581:
                    case 189852:
                    case 192850:
                    case 258678:
                    case 60722:
                    case 205767:
                    case 332679:           
                UnpulledDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
            
                    case 5436: // SoulRipper 5436, Soul Lasher 169615, Soul Devourer 222096
                    case 169615:
                    case 222096:
                LickerDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 4070: // Fallen Master 4071, Fallen Overlord 4072, Fallen Slavelord 4073, Fallen Overseer 4070  x => x.Sno == 4071 || (x.Sno == 4072) || (x.Sno == 4073) || (x.Sno == 4070)
                    case 4071:
                    case 4072:
                    case 4073:
                FallenDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 5372: // Smoldering Construct 5372, Blazing Guardian 5371
                    case 5371:           
                SmolderingDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 3847: // Grotesque 3847, Harvester 3848, Horror 3849, Abomination 3850, Possessed 191592
                    case 3848:
                    case 3849:
                    case 3850:
                    case 191592:            
                GrotesqueDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 5387: // Tomb Guardian 5387, Returned Summoner 5388, Tortured Summoner 5389, Vengeful Summoner 5390, Skull Summoner 182279
                    case 5388:
                    case 5389:
                    case 5390:
                    case 182279:            
                SkeletonSummonerDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 241288: // Anarch 241288, Lacuni Female 4541 4542 4548, Morlu Incinerator 4760 4761 4763, Exarch 305579, Ghost 370 4196 4197 4196 4198 309114 418911 418918 418922 418923, Exorcist 272330, Corrupted Angel 106711, WingedAssasin 304307
                    case 4541:
                    case 4542:
                    case 4548:
                    case 305579:
                    case 370:
                    case 4196:
                    case 4197:
                    case 4198:
                    case 309114:
                    case 418911:
                    case 418918:
                    case 418922:
                    case 418923:
                    case 272330:
                    case 106711:
                    case 304307:
                    case 4760:
                    case 4761:
                    case 4763:       
                DangerRangeDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6356: // Exhumed 6358, Uninterred 6360, Unburied 6356, Disentombed Hulk 6359
                    case 6357:
                    case 6358:
                    case 6359:           
                EjDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                  //  case 5191:  Sand Dweller sandMonster
                  //  case 5192:
                  //  case 5193:
                  //  case 5194:            
              // CoockieDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
              // break;
                
                    case 5508:  // Succubus 5508 152679 219673
                    case 152679:
                    case 219673:           
                SuccubDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 4104: // Betrayed 4104, Accursed 4105, Reviled 4106
                    case 4105:
                    case 4106:           
                UnijenDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 365: // Fallen Conjurer 4099, Fallen Firemage 365, Fallen Prophet 4100, Fallen Shaman 4098
                    case 4098:
                    case 4099:
                    case 4100:           
                ShamanDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 5512: // Stinging Swarm 5512, Vile Swarm 5513, Plague Swarm 5514, Death Swarm 5515
                    case 5513:
                    case 5514:
                    case 5515:
                SwarmDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 237876:  // Tusked Bogan
                BoganDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 373145: // Death Maiden
                MaidenDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6042: // Unholy Thrall
                ThrallDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 4755: // Morlu Legion 4755 4757 4758
                    case 4757:
                    case 4758:
                LegionerDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6046: // Dark Vessel 6046, Dark Great Vessel 6047, Corrupt Vessel 6048
                    case 6047:
                    case 6048:
                BabkaDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 4303: // Blood Clan Sorcerer 4303, Blood Clan Occultist 4304
                    case 4304:
                CarrotDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 106710: // Enslaved Nightmare
                NightmareDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 239014: // Bogan Trapper
                TrapperDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 418902: // Maggot Brood
                    case 246343:
                MaggotDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6052: // Dark Berserker 6052, Pain Monger 6053, Vicious Mangler 6054, Hell Basher 6055
                    case 6053:
                    case 6054:
                    case 6055:
                BersDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6059: // Dark Hellion, Vicious Hellion, Accursed Hellion, Frenzied Hellion
                HellionDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                    case 6038: // Foul Conjurer
                SummonerDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                   case 6028: // Crazed Cultist
                CultistDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                
                   case 106709: // Mallet Lord
                MalletDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                   case 379519: // WyattCheng
                WyattChengDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                   case 6638:   // Deathspitter, Retching Cadaver, Spewing Horror, Dust Retcher
                   case 6639:
                   case 6640:
                   case 6641:
                   case 373017:
                CadaverDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;          
              }
            }
            
            var Drvsh = Hud.Game.AliveMonsters;
            foreach (var actor in Drvsh)
            {
                switch ((uint)actor.SnoActor.Sno)
                {
                    case 3980: // Sand Dervish, Dune Dervish, Vicious Magewrath + Uniques
                    case 3981:          
                    case 3982:
                    case 111868:
                    case 140947:
                    case 367011:
                    case 222180:
                    case 256022:
                    case 5191: // Sand Dweller sandMonster
            	    case 5192:
                    case 5193:
                    case 5194:
                    case 418900:
                    case 226849:
                    case 116076:
                    case 116299:
                    case 164502:
                    case 219832:
                    case 222413:
                    case 222523:
                    case 300737:
                DervishDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
				
				case 106710: // Enslaved Nightmare, HoodedNightmare + Uniques
                    case 219949: 
                    case 219960:
                    case 409612:
                    case 225574:
                    case 225586:
                    case 276508:
                    case 197493:
                NightmareDecorator.Paint(layer, actor, actor.FloorCoordinate, "");
                break;
                }
            }                                                                                                                                    
        }

    }
  
}
