package com.ningdatech.pmapi.performance.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.performance.enumration.PerformanceTemplateTypeEnum;
import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorAppIndexSaveDTO;
import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectIndexSaveDTO;
import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectTemplateSaveDTO;
import com.ningdatech.pmapi.performance.model.dto.ProjectTemplateDetailDTO;
import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalAppIndicator;
import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProjectIndicator;
import com.ningdatech.pmapi.performance.model.entity.PerformanceIndicatorProjectTemplate;
import com.ningdatech.pmapi.performance.model.entity.PerformanceIndicatorProjectTemplateDetail;
import com.ningdatech.pmapi.performance.model.req.PerformanceAppraisalListReq;
import com.ningdatech.pmapi.performance.model.vo.AppIndexVO;
import com.ningdatech.pmapi.performance.model.vo.ProjectIndexTemplateVO;
import com.ningdatech.pmapi.performance.model.vo.ProjectIndexVO;
import com.ningdatech.pmapi.performance.model.vo.ProjectTemplateDetailVO;
import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalAppIndicatorService;
import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalProjectIndicatorService;
import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemplateDetailService;
import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemplateService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
 * @Classname IndicatorTemplateManage
 * @Description
 * @Date 2023/6/26 14:15
 * @Author PoffyZhang
 */
@Slf4j
@Component
@AllArgsConstructor
public class IndicatorConfigManage {
    private final IPerformanceIndicatorProjectTemplateService indicatorProjectTemplateService;
    private final IPerformanceIndicatorProjectTemplateDetailService indicatorProjectTemplateDetailService;
    private final IPerformanceAppraisalProjectIndicatorService projectIndicatorService;
    private final IPerformanceAppraisalAppIndicatorService appIndicatorService;

    /**
     * 模板列表
     * @param req
     * @return
     */
    public PageVo<ProjectIndexTemplateVO> projectIndexTemplateList(PerformanceAppraisalListReq req) {
        Page<PerformanceIndicatorProjectTemplate> page = req.page();
        LambdaQueryWrapper<PerformanceIndicatorProjectTemplate> wrapper = Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplate.class)
                .like(StringUtils.isNotBlank(req.getTemplateName()), PerformanceIndicatorProjectTemplate::getName, req.getTemplateName())
                .eq(StringUtils.isNotBlank(req.getRegionCode()), PerformanceIndicatorProjectTemplate::getRegionCode,req.getRegionCode())
                .orderByDesc(PerformanceIndicatorProjectTemplate::getCreateOn);
        indicatorProjectTemplateService.page(page,wrapper);

        if(0L == page.getTotal()){
            return PageVo.empty();
        }

        List<ProjectIndexTemplateVO> res = page.getRecords().stream()
                .map(p -> BeanUtil.copyProperties(p, ProjectIndexTemplateVO.class))
                .collect(Collectors.toList());

        return PageVo.of(res,page.getTotal());
    }

    /**
     * 查询项目模板详情
     * @param id
     * @return
     */
    public ProjectIndexTemplateVO projectDetail(Long id) {
        PerformanceIndicatorProjectTemplate template = indicatorProjectTemplateService.getById(id);
        if(Objects.isNull(template)){
            return null;
        }
        ProjectIndexTemplateVO vo = BeanUtil.copyProperties(template,
                ProjectIndexTemplateVO.class);
        // 获取模版绩效指标详情
        List<PerformanceIndicatorProjectTemplateDetail> templateDetails = indicatorProjectTemplateDetailService.list(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId, id));
        // 获取模版附加绩效指标详情
        List<PerformanceIndicatorProjectTemplateDetail> additionalTemplateDetails = indicatorProjectTemplateDetailService.list(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId, id)
                .eq(PerformanceIndicatorProjectTemplateDetail::getIsAdditional,Boolean.TRUE));
        if(CollUtil.isNotEmpty(templateDetails)){
            vo.setTemplateDetails(buildTemplateDetail(templateDetails));
        }

        if (CollUtil.isNotEmpty(additionalTemplateDetails)){
            vo.setAdditionalIndexDetails(buildTemplateDetail(additionalTemplateDetails));
        }
        return vo;
    }

    /**
     * 项目指标 模板保存
     * @param dto
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public String projectTemplateSave(PerformanceIndicatorProjectTemplateSaveDTO dto) {
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        PerformanceIndicatorProjectTemplate template = BeanUtil.copyProperties(dto, PerformanceIndicatorProjectTemplate.class);
        if(Objects.nonNull(dto.getId())){
            PerformanceIndicatorProjectTemplate old = indicatorProjectTemplateService.getById(dto.getId());
            VUtils.isTrue(Objects.isNull(old)).throwMessage("该模板不存在!");
            template.setId(old.getId());
        }else{
            template.setId(null);
            template.setCreateOn(LocalDateTime.now());
            template.setCreateBy(user.getUsername());
        }
        template.setUpdateOn(LocalDateTime.now());
        template.setUpdateBy(user.getUsername());
        if(indicatorProjectTemplateService.saveOrUpdate(template)){
            //保存 模板指标的详情
            if(CollUtil.isNotEmpty(dto.getTemplateDetails())){
                //先删除
                indicatorProjectTemplateDetailService.remove(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                        .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId,dto.getId()));
                //校检 所有3级指标（不包括附加指标） 总分是不是100
                List<PerformanceIndicatorProjectTemplateDetail> indexList = indicatorProjectTemplateDetailService.list(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                        .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId, template.getId())
                        .eq(PerformanceIndicatorProjectTemplateDetail::getType,PerformanceTemplateTypeEnum.THIRD_INDEX.getCode()));
                if(CollUtil.isNotEmpty(indexList)){
                    BigDecimal sum = indexList.stream()
                            .map(PerformanceIndicatorProjectTemplateDetail::getIndexScore)
                            .filter(Objects::nonNull)
                            .reduce(BigDecimal.ZERO, BigDecimal::add);
                    boolean score = (BigDecimal.valueOf(100)).equals(sum);
                    VUtils.isTrue(Boolean.FALSE.equals(score)).throwMessage("总分不是100 操作失败!");
                }
                analysisTemplateDetails(dto.getTemplateDetails(),template.getId());
            }
            // 保存 模版附加指标详情
            if (CollUtil.isNotEmpty(dto.getAdditionalIndexDetails())){
                indicatorProjectTemplateDetailService.remove(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                        .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId,dto.getId())
                        .eq(PerformanceIndicatorProjectTemplateDetail::getIsAdditional,Boolean.TRUE));
                analysisAdditionalTemplateDetails(dto.getAdditionalIndexDetails(),template.getId());
            }
            return "保存成功";
        }
        throw new BizException("保存失败!");
    }

    /**
     * 解析 项目考核指标
     * @param templateDetails
     * @return
     */
    public void analysisTemplateDetails(
            List<ProjectTemplateDetailDTO> templateDetails,Long templateId) {
        if(CollUtil.isEmpty(templateDetails)){
            return;
        }
        analysisTemplateDetailsInner(templateDetails,templateId,null);
    }

    /**
     * 解析 项目附加考核指标
     * @param additionalTemplateDetails
     * @return
     */
    public void analysisAdditionalTemplateDetails(
            List<ProjectTemplateDetailDTO> additionalTemplateDetails,Long templateId) {
        if(CollUtil.isEmpty(additionalTemplateDetails)){
            return;
        }
        analysisAdditionalTemplateDetailsInner(additionalTemplateDetails,templateId,null);
    }

    public void analysisTemplateDetailsInner(List<ProjectTemplateDetailDTO> templateDetails,
                                              Long templateId,Long parentId) {
        if(CollUtil.isEmpty(templateDetails)){
            return;
        }
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        for(ProjectTemplateDetailDTO detail : templateDetails){
            //计算阶段的
            PerformanceIndicatorProjectTemplateDetail templateDetail = BeanUtil.copyProperties(detail, PerformanceIndicatorProjectTemplateDetail.class);
            templateDetail.setCreateBy(user.getUsername());
            templateDetail.setCreateOn(LocalDateTime.now());
            templateDetail.setUpdateBy(user.getUsername());
            templateDetail.setUpdateOn(LocalDateTime.now());
            templateDetail.setTemplateId(templateId);
            // 一级指标的父ID为null
            templateDetail.setParentId(parentId);

            indicatorProjectTemplateDetailService.save(templateDetail);

            if(CollUtil.isNotEmpty(detail.getChildren())){
                analysisTemplateDetailsInner(detail.getChildren(),templateId,templateDetail.getId());
            }
        }
    }

    public void analysisAdditionalTemplateDetailsInner(List<ProjectTemplateDetailDTO> templateDetails,
                                             Long templateId,Long parentId) {
        if(CollUtil.isEmpty(templateDetails)){
            return;
        }
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        for(ProjectTemplateDetailDTO detail : templateDetails){
            //计算阶段的
            PerformanceIndicatorProjectTemplateDetail templateDetail = BeanUtil.copyProperties(detail, PerformanceIndicatorProjectTemplateDetail.class);
            templateDetail.setCreateBy(user.getUsername());
            templateDetail.setCreateOn(LocalDateTime.now());
            templateDetail.setUpdateBy(user.getUsername());
            templateDetail.setUpdateOn(LocalDateTime.now());
            templateDetail.setTemplateId(templateId);
            // 标记为附加指标
            templateDetail.setIsAdditional(Boolean.TRUE);
            // 一级指标的父ID为null
            templateDetail.setParentId(parentId);

            indicatorProjectTemplateDetailService.save(templateDetail);

            if(CollUtil.isNotEmpty(detail.getChildren())){
                analysisAdditionalTemplateDetailsInner(detail.getChildren(),templateId,templateDetail.getId());
            }
        }
    }

    /**
     * 装配 模板详情
     * @param templateDetails
     * @return
     */
    private List<ProjectTemplateDetailVO> buildTemplateDetail(List<PerformanceIndicatorProjectTemplateDetail> templateDetails) {
        List<ProjectTemplateDetailVO> res = Lists.newArrayList();
        //第一层是 一级的
        for (PerformanceIndicatorProjectTemplateDetail templateDetailFirst : templateDetails) {
            if (PerformanceTemplateTypeEnum.FIRST_INDEX.getCode().equals(templateDetailFirst.getType())) {
                ProjectTemplateDetailVO detailFirstVo = BeanUtil.copyProperties(templateDetailFirst, ProjectTemplateDetailVO.class);
                List<ProjectTemplateDetailVO> firstList = Lists.newArrayList();
                for (PerformanceIndicatorProjectTemplateDetail templateDetailSecond : templateDetails) {
                    if (Objects.nonNull(templateDetailSecond.getParentId()) &&
                            templateDetailSecond.getParentId().equals(templateDetailFirst.getId())) {
                        ProjectTemplateDetailVO detailSecondVo = BeanUtil.copyProperties(templateDetailSecond, ProjectTemplateDetailVO.class);
                        List<ProjectTemplateDetailVO> secondList = Lists.newArrayList();
                        for (PerformanceIndicatorProjectTemplateDetail templateDetailThird : templateDetails) {
                            if (Objects.nonNull(templateDetailThird.getParentId()) &&
                                    templateDetailThird.getParentId().equals(templateDetailSecond.getId())) {
                                ProjectTemplateDetailVO detailThirdVo = BeanUtil.copyProperties(templateDetailThird, ProjectTemplateDetailVO.class);
                                List<ProjectTemplateDetailVO> thirdList = Lists.newArrayList();
                                for (PerformanceIndicatorProjectTemplateDetail templateDetailFour : templateDetails) {
                                    if (Objects.nonNull(templateDetailFour.getParentId()) &&
                                            templateDetailFour.getParentId().equals(templateDetailThird.getId())) {
                                        ProjectTemplateDetailVO detailFourVo = BeanUtil.copyProperties(templateDetailFour, ProjectTemplateDetailVO.class);
                                        thirdList.add(detailFourVo);
                                    }
                                }
                                detailThirdVo.setChildren(thirdList);
                                secondList.add(detailThirdVo);
                            }
                        }
                        detailSecondVo.setChildren(secondList);
                        firstList.add(detailSecondVo);
                    }
                }
                detailFirstVo.setChildren(firstList);
                res.add(detailFirstVo);

            }
        }
        return res;
    }
        

    /**
     * 删除项目模板
     * 
     * @param id
     * @return
     */
    public String projectTemplateDelete(Long id) {
        PerformanceIndicatorProjectTemplate projectTemplate = indicatorProjectTemplateService.getById(id);
        VUtils.isTrue(Objects.isNull(projectTemplate)).throwMessage("该模板不存在!");

        if (CommonEnum.YES.getCode().equals(projectTemplate.getStatus())) {
            throw new BizException("操作失败 该模板 是启用状态!");
        }

        if (indicatorProjectTemplateService.removeById(id)) {
            indicatorProjectTemplateDetailService
                .remove(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                    .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId, id));
            return "删除成功";
        }
        return "操作失败";
    }

    public Boolean enOrDisProjectIndexTemplate(Long templateId, boolean active) {
        PerformanceIndicatorProjectTemplate projectTemplate = indicatorProjectTemplateService.getById(templateId);
        if (Boolean.TRUE.equals(active)){
            projectTemplate.setStatus(CommonEnum.YES.getCode());
        }else {
            projectTemplate.setStatus(CommonEnum.NO.getCode());
        }
        return indicatorProjectTemplateService.updateById(projectTemplate);
    }

    @Transactional(rollbackFor = Exception.class)
    public String projectTemplateCopy(Long templateId) {
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        PerformanceIndicatorProjectTemplate projectTemplate = indicatorProjectTemplateService.getById(templateId);
        PerformanceIndicatorProjectTemplate newTemplate = new PerformanceIndicatorProjectTemplate();
        BeanUtils.copyProperties(projectTemplate,newTemplate);
        // 复制后，项目模版名称变更为xxx副本，状态为禁用
        newTemplate.setName(projectTemplate.getName() + CommonConst.COPY);
        newTemplate.setStatus(CommonEnum.NO.getCode());
        newTemplate.setCreateOn(LocalDateTime.now());
        newTemplate.setCreateBy(user.getUsername());
        newTemplate.setUpdateOn(LocalDateTime.now());
        newTemplate.setUpdateBy(user.getUsername());
        // 副本ID要置空
        newTemplate.setId(null);
        if (indicatorProjectTemplateService.save(newTemplate)) {
            // 新增指标详情
            List<PerformanceIndicatorProjectTemplateDetail> projectTemplateDetails = indicatorProjectTemplateDetailService.list(Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplateDetail.class)
                    .eq(PerformanceIndicatorProjectTemplateDetail::getTemplateId, templateId));
            // 逐个新增并保存各指标
            for (PerformanceIndicatorProjectTemplateDetail projectTemplateDetail : projectTemplateDetails) {
                PerformanceIndicatorProjectTemplateDetail newProjectTemplateDetail = new PerformanceIndicatorProjectTemplateDetail();
                BeanUtils.copyProperties(projectTemplateDetail, newProjectTemplateDetail);
                newProjectTemplateDetail.setTemplateId(newTemplate.getId());
                newProjectTemplateDetail.setCreateOn(LocalDateTime.now());
                newProjectTemplateDetail.setCreateBy(user.getUsername());
                newProjectTemplateDetail.setUpdateOn(LocalDateTime.now());
                newProjectTemplateDetail.setUpdateBy(user.getUsername());
                // 新的指标ID要置空
                newProjectTemplateDetail.setId(null);
                indicatorProjectTemplateDetailService.save(newProjectTemplateDetail);
            }
            return "模版复制成功";
        }
        return "模版复制失败";
    }

    public PageVo<ProjectIndexVO> projectIndexList(PerformanceAppraisalListReq req) {
        Page<PerformanceAppraisalProjectIndicator> page = req.page();
        LambdaQueryWrapper<PerformanceAppraisalProjectIndicator> wrapper = Wrappers.lambdaQuery(PerformanceAppraisalProjectIndicator.class)
                .like(StringUtils.isNotBlank(req.getIndexName()), PerformanceAppraisalProjectIndicator::getIndexName, req.getIndexName())
                .eq(Objects.nonNull(req.getIndexLevel()), PerformanceAppraisalProjectIndicator::getIndexLevel, req.getIndexLevel())
                .eq(StringUtils.isNotBlank(req.getRegionCode()), PerformanceAppraisalProjectIndicator::getRegionCode, req.getRegionCode())
                .orderByDesc(PerformanceAppraisalProjectIndicator::getCreateOn);
        projectIndicatorService.page(page,wrapper);

        if (CollUtil.isEmpty(page.getRecords())){
            return PageVo.empty();
        }
        List<ProjectIndexVO> result = page.getRecords().stream()
                .map(i -> BeanUtil.copyProperties(i, ProjectIndexVO.class))
                .collect(Collectors.toList());
        return PageVo.of(result,page.getTotal());
    }

    public String projectIndexSave(PerformanceIndicatorProjectIndexSaveDTO dto) {
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        PerformanceAppraisalProjectIndicator projectIndicator = BeanUtil.copyProperties(dto, PerformanceAppraisalProjectIndicator.class);
        if(Objects.nonNull(dto.getId())){
            PerformanceAppraisalProjectIndicator old = projectIndicatorService.getById(dto.getId());
            VUtils.isTrue(Objects.isNull(old)).throwMessage("该项目指标不存在!");
            projectIndicator.setId(old.getId());
        }else{
            projectIndicator.setId(null);
            projectIndicator.setCreateOn(LocalDateTime.now());
            projectIndicator.setCreateBy(user.getUsername());
        }
        projectIndicator.setUpdateOn(LocalDateTime.now());
        projectIndicator.setUpdateBy(user.getUsername());
        if(projectIndicatorService.saveOrUpdate(projectIndicator)){
            return "指标新增成功";
        }
        return "指标新增失败";
    }

    public String projectIndexDelete(Long id) {
        PerformanceAppraisalProjectIndicator projectIndicator = projectIndicatorService.getById(id);
        VUtils.isTrue(Objects.isNull(projectIndicator)).throwMessage("该项目指标不存在!");
        if (projectIndicatorService.removeById(id)) {
            return "删除成功";
        }
        return "操作失败";
    }

    public ProjectIndexVO projectIndexDetail(Long id) {
        PerformanceAppraisalProjectIndicator projectIndex = projectIndicatorService.getById(id);
        if(Objects.isNull(projectIndex)){
            return null;
        }
        return BeanUtil.copyProperties(projectIndex, ProjectIndexVO.class);
    }

    public PageVo<AppIndexVO> appIndexList(PerformanceAppraisalListReq req) {
        Page<PerformanceAppraisalAppIndicator> page = req.page();
        LambdaQueryWrapper<PerformanceAppraisalAppIndicator> wrapper = Wrappers.lambdaQuery(PerformanceAppraisalAppIndicator.class)
                .like(StringUtils.isNotBlank(req.getIndexName()), PerformanceAppraisalAppIndicator::getIndexName, req.getIndexName())
                .orderBy(Boolean.FALSE,Boolean.TRUE, PerformanceAppraisalAppIndicator::getSort);
        appIndicatorService.page(page,wrapper);

        if (CollUtil.isEmpty(page.getRecords())){
            return PageVo.empty();
        }
        List<AppIndexVO> result = page.getRecords().stream()
                .map(i -> BeanUtil.copyProperties(i, AppIndexVO.class))
                .collect(Collectors.toList());
        return PageVo.of(result,page.getTotal());
    }

    public String appIndexSave(PerformanceIndicatorAppIndexSaveDTO dto) {
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        PerformanceAppraisalAppIndicator appIndicator = BeanUtil.copyProperties(dto, PerformanceAppraisalAppIndicator.class);
        if(Objects.nonNull(dto.getId())){
            PerformanceAppraisalAppIndicator old = appIndicatorService.getById(dto.getId());
            VUtils.isTrue(Objects.isNull(old)).throwMessage("该项目指标不存在!");
            appIndicator.setId(old.getId());
        }else{
            appIndicator.setId(null);
            appIndicator.setCreateOn(LocalDateTime.now());
            appIndicator.setCreateBy(user.getUsername());
        }
        appIndicator.setUpdateOn(LocalDateTime.now());
        appIndicator.setUpdateBy(user.getUsername());
        if(appIndicatorService.saveOrUpdate(appIndicator)){
            return "指标新增成功";
        }
        return "指标新增失败";
    }

    public String appIndexDelete(Long id) {
        PerformanceAppraisalAppIndicator appIndicator = appIndicatorService.getById(id);
        VUtils.isTrue(Objects.isNull(appIndicator)).throwMessage("该应用指标不存在!");
        if (appIndicatorService.removeById(id)) {
            return "删除成功";
        }
        return "操作失败";
    }

    public AppIndexVO appIndexDetail(Long id) {
        PerformanceAppraisalAppIndicator appIndex = appIndicatorService.getById(id);
        if(Objects.isNull(appIndex)){
            return null;
        }
        return BeanUtil.copyProperties(appIndex, AppIndexVO.class);
    }

    public Boolean enOrDisAppIndex(Long appId, Boolean state) {
        PerformanceAppraisalAppIndicator appIndicator = appIndicatorService.getById(appId);
        if (Boolean.TRUE.equals(state)){
            appIndicator.setIsDisplay(Boolean.TRUE);
        }else {
            appIndicator.setIsDisplay(Boolean.FALSE);
        }
        return appIndicatorService.updateById(appIndicator);
    }
}
