// index.js
let myPro = require("../../utils/wxRequest.js");
let util = require("../../utils/util.js");
// 点击计时器
let clickScrollTimer;	

Page({
    data: {
		customTop: getApp().globalData.customTop,
		setBgHeight: getApp().globalData.setBgHeight, // 导航条高度
		imgUrl: getApp().globalData.imgUrl,
		keywords: '',
		showGoodsSpec: false, // 规格弹层
		showShopCar: false, // 购物车弹层
		store: null, // 所在门店
		loading: false, // 全局loading
		fare_type: 1, // 0外卖 1自提   默认自提
		showOpenLocation: false, // 开启定位提醒
		good_list: null,
		cartList: null,
		// showSelectFare: false, // 配送方式弹层
		showTopCate: false,
		toViewErji: null,
		totalNums: 0,
		totalPrice: 0,
		totalMemberPrice: 0,
		activeErjiId: 0,
		checkedSpecNums: 0,
		isClickToScroll: false, // 通过点击滚动产品列表 true 滚动事件中不赋值，false 时赋值
		activeCateId: '',
		toViewErji: '',
		activeErjiId: '',
		toView: '',
		currentCate: '',
		showErjiCate: false,
		tableId: null
    },
    onLoad: function (options) {
        // Do some initialize when page load.
		let that = this;
		if (options.tableId) {
			that.setData({
				tableId: options.tableId
			})
		}
    },
    onShow: function () {
        // Do something when page show.
		let that = this;
		that.setData({
			showGoodsSpec: false, // 规格弹层
			showShopCar: false, // 购物车弹层
		});
		// 获取配送方式
		if(wx.getStorageSync('fare_type')){
			that.setData({
				fare_type: wx.getStorageSync('fare_type')
			})
		}else{
			// 未获取到,需主动存一下,默认自提
			wx.setStorage({
				key: "fare_type",
				data: '1'
			})
		};
		// 单店开是否开定位,都需要把商品调出来
		getApp().getLocal(function(){
			that.afterAuthLocation();
			// 拒绝定位时,提醒去开启
			if(getApp().globalData.location_auth == -1){
				console.log('拒绝定位');
				that.setData({
					showOpenLocation: true
				});
			}
		});
    },
    onReady: function () {
        // Do something when page ready.
		let that = this;
		// 滚动区域高度计算
		wx.getSystemInfo({
			success: function(res){
				let height = res.windowHeight;
				// console.log('总height',height)
				const query = wx.createSelectorQuery();
				query.select('.store_wrap').boundingClientRect();
				query.select('.heji_wrap').boundingClientRect();
				// query.select('.erji_cate').boundingClientRect();
				query.exec((res) =>{
					// 分别取出节点的高度
					let storeWrapH = res[0].height; // 门店选择的高度 px
					let hejiWrapH = res[1].height; // 底部合计的高度 px
					// let erjiCateH = res[2].height; // 顶部分类固定宽
					// let scrollH = height - storeWrapH - hejiWrapH - erjiCateH;
					let scrollH = height - storeWrapH - hejiWrapH;
					that.setData({
						storeWrapH: storeWrapH,
						scrollH: scrollH,
						guigeH: height*0.5
					});
					// console.log('scrollH',scrollH)
					// console.log('门店高度',that.data.storeWrapH);
				});
			}
		});
    },
    onHide: function () {
        // Do something when page hide.
		// console.log('hide')
		let that = this;
		// return;
		// 主动模拟selectClassesClick
		clearTimeout(clickScrollTimer);
		let item = that.data.good_cate[0];
		that.setData({
			isClickToScroll: true,
			activeCateId: item.id,
			toView: 'erji' + (item.children && item.children.length != 0 ? item.children[0].id : item.id), //不能数字开头，所以开头加了productItem
			activeErjiId: item.children && item.children.length != 0 ? item.children[0].id : item.id,
			toViewYiji: 'yijicate'+item.id
		});
		// console.log('toView',that.data.toView);
		// console.log('activeErjiId',that.data.activeErjiId);
		let good_cate = that.data.good_cate;
		// 循环当前分类
		for(let i in good_cate){
			if(good_cate[i].id == item.id){
				that.setData({
					currentCate: good_cate[i]
				})
			}
		}
    },
    onUnload: function () {
        // Do something when page close.
    },
    onPullDownRefresh: function () {
        // Do something when pull down.
		
    },
    onReachBottom: function () {
        // Do something when page reach bottom.
    },
    onPageScroll: function () {
        // Do something when page scroll		
    },
    onResize: function () {
        // Do something when page resize
    },
	// 获取购物车商品
	getCartsList(){
		let that = this;
		myPro.wxRequest("user/v3/carts/list","GET",{}).then(res=>{
			// 在首页只体现普通商品
			let list = res.result.list;
			that.setData({
				cartGoods: list,
				totalNums: res.result.total_num,
				totalPrice: res.result.money
			});
			// 同步商品列表
			that.updateTotalGoods();
		}).catch(err=>{
			console.log('报错信息',err);
			wx.showToast({
				title: err,
				icon: "none"
			});
		})
	},
	// 店铺列表(只拿最近的)
	getStoreList(lat,lng){
		let that = this;
		let data = {
			lat: lat ? lat : getApp().globalData.lat,
			lng: lng ? lng : getApp().globalData.lng,
			page: 1,
			size: 10
		};
		myPro.wxRequest("user/store/list","GET",data,true).then(res=>{
			let storeList = res.result;
			// 有门店
			if(storeList && storeList.length != 0){
				let currentStore = storeList[0];
				that.setData({
					store: currentStore
				});
				// 营业时间的判断
				// that.checkBusinessTime();
				// 存下门店
				wx.setStorage({
					key: "store",
					data: JSON.stringify(that.data.store),
				});
				// 获取店内商品
				that.getGoodsList(function(){
					// 登录状态
					if(getApp().globalData.token){
						getApp().globalData.loadingCount = 0; // 主动关
						that.getCartsList();
					}
				});
			}else{
				wx.showToast({
					title: "门店暂未营业",
					icon: "none"
				});
			}
		}).catch(err=>{
			console.log('报错信息',err);
			wx.showToast({
				title: err,
				icon: "none",
			});
		});
	},
	// 拨打店铺电话
	onMakePhone(){
		let that = this;
		wx.makePhoneCall({
			phoneNumber: that.data.store.phone
		});
	},
	// 获取商品分类及商品
	getGoodsList(callback){
		let that = this;
		let params = {
			store_id: that.data.store.id
		};
		myPro.wxRequest("user/v3/index","GET",params).then(res=>{
			let list = res.result.good;
			// 回调
			if(callback){
				callback();
			};
			that.setData({
				good_cate: res.result.good_cate,
				good_list: list,
				activeCateId: res.result.good_cate[0].id, //默认左侧第一个选中
				currentCate: res.result.good_cate[0], // 当前分类(结构为一级分类+二级分类)
				toView: 'erji' + res.result.good_cate[0].id
			});
			// console.log('左侧第一个分类',that.data.activeCateId);
			// console.log('右侧第一个内容',that.data.toView);
			// 一级节点
			that.data.good_list.forEach(item=>{
				// 添加节点的布局位置的查询请求
				wx.createSelectorQuery().select('#yiji' + item.good_cate_id).boundingClientRect(rect => {
					item.offsetTop = rect.top;
					item.height = rect.height;
					// console.log('rect',rect)
					// console.log('item',item);
				}).exec()
				// 二级节点
				if(item.children){
					item.children.forEach(erjiItem=>{
						wx.createSelectorQuery().select('#erji' + erjiItem.good_cate_id).boundingClientRect(rect => {
							erjiItem.offsetTop = rect.top;
							erjiItem.height = rect.height;
							// console.log('rect',rect)
							// console.log('item',item);
						}).exec()
					})
				}
			});
			// console.log('商品列表带节点',that.data.good_list);
		}).catch(err=>{
			console.log('报错信息',err)
			wx.showToast({
				title: err,
				icon: "none",
			});
		});
	},
	// 左侧菜单栏切换事件
	selectClassesClick: function(e) {
		let that = this
		// return;
		console.log('e===',e);
		clearTimeout(clickScrollTimer);
		let item = e.currentTarget.dataset.item;
		that.setData({
			isClickToScroll: true,
			activeCateId: item.id,
			toView: 'erji' + (item.children && item.children.length != 0 ? item.children[0].id : item.id), //不能数字开头，所以开头加了productItem
			activeErjiId: item.children && item.children.length != 0 ? item.children[0].id : item.id,
			toViewYiji: 'yijicate'+ item.id
		});
		// console.log('toView',that.data.toView);
		// console.log('activeErjiId',that.data.activeErjiId);
		let good_cate = that.data.good_cate;
		// 循环当前分类
		for(let i in good_cate){
			if(good_cate[i].id == item.id){
				that.setData({
					currentCate: good_cate[i]
				})
			}
		}
		// console.log('当前fenlei',that.data.currentCate);
	},
	// 监听右边商品列表滑动
	scrollProductList(e){
		let that = this;
		let good_cate = that.data.good_cate;
		let scrollTop = e.detail.scrollTop;
		if(scrollTop!=0){
			that.setData({
				showErjiCate: true
			})
		}
		// return;
		// console.log('isClickToScroll',that.data.isClickToScroll);
		// console.log('e.detail.scrollTop',scrollTop);
		if(!that.data.isClickToScroll){
			that.data.good_list.forEach(item=>{
				// console.log('item',item);
				// console.log('item.offsetTop',item.offsetTop );
				// console.log('item.height',item.height);
				if (scrollTop >= (item.offsetTop - that.data.storeWrapH) && e.detail.scrollTop <= (item.offsetTop - that.data.storeWrapH + item.height)){
					that.setData({
						activeCateId: item.good_cate_id,
						toViewYiji: 'yijicate'+item.good_cate_id
					});
					// console.log('左侧分类1111',item.good_cate_id)
					good_cate.forEach(cateItem=>{
						if(cateItem.id == item.good_cate_id){
							that.setData({
								currentCate: cateItem
							})
						}
					});
					// console.log('当前分类',that.data.currentCate);
					if(item.children){
						item.children.forEach(erjiItem=>{
							if(scrollTop >= erjiItem.offsetTop-180 && scrollTop<= erjiItem.offsetTop+erjiItem.height-180){
								that.setData({
									activeErjiId: erjiItem.good_cate_id,
									toViewErji: 'erjiCate'+erjiItem.good_cate_id
								})
							}
						})
					};
					return;
				}
			})
		}
		else{
			clickScrollTimer = setTimeout(function() {
				that.setData({
					isClickToScroll: false
				});
			},300)
		}
		// console.log('当前分类',that.data.currentCate)
		// console.log('左侧分类',that.data.activeCateId);
		// console.log('二级分类',that.data.activeErjiId);
		// console.log('右侧分类',that.data.toView);
	},
	// 点击某个二级菜单
	onErjiCate(event){
		// console.log('二级event',event)
		let that = this;
		let good_cate = that.data.good_cate;
		let item = event.currentTarget.dataset.item;
		// console.log('item',item);
		// return;
		that.setData({
			toView: 'erji'+item.id,
			activeErjiId: item.id,
			activeCateId: item.parentid,
			toViewErji: 'erjiCate'+item.id
		});
		// 循环当前分类
		// for(let i in good_cate){
		// 	if(good_cate[i].id == item.parentid){
		// 		that.setData({
		// 			currentCate: good_cate[i]
		// 		})
		// 	}
		// }
		// console.log('toView',that.data.toView);
		// console.log('当前的一级分类',that.data.currentCate)
	},
	// 查看规格
	onGoodsSpec(event){
		let that = this;
		let item = event.currentTarget.dataset.item;
		if(item.status != 1){
			// 如果商品售罄
			wx.showToast({
				title: "此商品已售罄",
				icon: "none"
			})
			return;
		};
		let checkedSpec = null;
		// 有规格
		if(item.good_specs && item.good_specs.length != 0){
			let specsArr = item.good_specs;
			for(let i in specsArr){
				if(i == 0){
					specsArr[i].is_checked = true; // 规格默认选中第一项
					checkedSpec = specsArr[i];
				}else{
					specsArr[i].is_checked = false;
				}
			}
		}else{
			// 无规格
			item['member_price'] = item.base_member_price;
			checkedSpec = item;
		}
		// console.log('当前商品',item);
		// console.log('当前选中规格',checkedSpec);
		that.setData({
			showGoodsSpec: true,
			currentGoods: item, // 当前商品
			checkedSpec: checkedSpec, // 当前选中规格
			checkedSpecNums: checkedSpec.nums ? checkedSpec.nums : 0
		});
	},
	// 更改商品规格弹层的商品数量
	onChangeSpecNum(event){
		let that = this;
		let nums = event.detail;
		that.setData({
			checkedSpecNums: nums
		});
		// 更新购物车
		let oldCartGoods = that.data.cartGoods;
		let item = event.currentTarget.dataset.item;
		// console.log('item',item);
		// console.log('购物车',oldCartGoods);
		if(that.isAddCart(item)){
			console.log('在')
			// 在购物车
			// return;
			let params = {};
			// 有规格id
			if(item.good_id){
				for(let i in oldCartGoods){
					if(oldCartGoods[i].good_id == item.good_id && oldCartGoods[i].good_specs_id == item.id){
						params.id = oldCartGoods[i].id; // 购物车ID
						break;
					}
				};
			}else{
				// 无规格id
				for(let i in oldCartGoods){
					if( oldCartGoods[i].good_id == item.id && !oldCartGoods[i].good_specs_id){
						params.id = oldCartGoods[i].id; // 购物车ID
						break;
					}
				}
			};
			if(nums != 0){
				params.nums = nums;
				// 修改数量
				myPro.wxRequest("user/v3/carts/editnum","POST",params).then(res=>{
					that.getCartsList();
				}).catch(err=>{
					console.log('报错信息',err);
					wx.showToast({
						title: err,
						icon: "none"
					})
				})
			}else{
				// 删除
				myPro.wxRequest("user/v3/carts/remove","POST",params).then(res=>{
					that.getCartsList();
				}).catch(err=>{
					console.log('报错信息',err);
					wx.showToast({
						title: err,
						icon: "none"
					})
				})
			}
		}else{
			console.log('不在');
			// return;
			let params = {
				good_id: item.good_id ? item.good_id : item.id,
				nums: nums,
				is_add: 0 // 是否为活动加购商品(1是 0否)
			};
			// 有规格id(加一个无规格的看看)
			if(item.good_id){
				params.good_specs_id = item.id;
			};
			// 添加购物车
			myPro.wxRequest("user/v3/carts/create","POST",params).then(res=>{
				that.getCartsList();
			}).catch(err=>{
				console.log('报错信息',err);
				wx.showToast({
					title: err,
					icon: "none"
				})
			})
		}
	},
	// 切换规格
	onChangeSpecGoods(event){
		let that = this;
		// console.log('event====',event);
		let currentSpecs = event.currentTarget.dataset.specs;
		let oldCartGoods = that.data.cartGoods;
		let checkedSpec = null;
		let checkedSpecNums = 0;
		// 同步选中状态
		let currentGoods = that.data.currentGoods;
		let specsArr = currentGoods.good_specs;
		for(let j in specsArr){
			if(specsArr[j].id == currentSpecs.id){
				specsArr[j].is_checked = true;
				if(that.isAddCart(specsArr[j])){
					// 同步购物车
					for(let i in oldCartGoods){
						if(oldCartGoods[i].good_id == currentSpecs.good_id && oldCartGoods[i].good_specs_id == currentSpecs.id){
							specsArr[j].nums = oldCartGoods[i].nums;
							checkedSpecNums = oldCartGoods[i].nums;
							// console.log('进来了==')
							break;
						}
					};
				}else{
					specsArr[j].nums = 0;
					checkedSpecNums = 0;
				};
				checkedSpec = specsArr[j];
				// break;
			}else{
				specsArr[j].is_checked = false;
			}
		};
		that.setData({
			currentGoods: currentGoods,
			checkedSpec: checkedSpec,
			checkedSpecNums: checkedSpecNums
		});
		// console.log('全规格',specsArr);
		// console.log('当前规格',checkedSpec);
	},
	// 关闭规格
	closeGoodsSpec(){
		let that = this;
		that.setData({
			showGoodsSpec: false
		});
	},
	// 计算价格和数量
	computedGoods(){
		let that = this;
		let list = that.data.cartGoods;
		let totalNums = 0;
		let totalPrice = 0;
		let totalMemberPrice = 0;
		for(let i in list){
			if(list[i].nums != 0){
				totalNums += parseInt(list[i].nums);
				totalPrice += parseFloat(list[i].total_prices);
				totalMemberPrice += parseFloat(list[i].total_member_prices);
			}
		};
		that.setData({
			totalNums: totalNums,
			totalPrice: totalPrice,
			totalMemberPrice: totalMemberPrice
		});
		// 同步商品列表
		// that.updateTotalGoods();
	},
	// 去结算
	toPay(){
		let that = this;
		// 未开启 不允许进入下一步
		if(getApp().globalData.location_auth == -1){
			wx.showToast({
				title: "地理位置未授权,请您授权定位后重试",
				icon: "none"
			})
			return;
		};
		// 验证登录
		getApp().verifyLogin(function(loginStatus){
			// console.log('登录状态',loginStatus)
			if(loginStatus){
				if(!that.data.totalNums){
					wx.showToast({
						title: "请先选择商品",
						icon: "none"
					});
					return;
				};
				// 验证是否能下单,如果不能给提示并进购物车(因为可能是购物车有商品,但未勾选)
				let params = {
					token: getApp().globalData.token
				};
				wx.request({
					url: getApp().globalData.api + "user/v3/order/createlist",
					data: params,
					success: function(res) {
						if(res.data.code != 200){
							wx.showToast({
								title: res.data.msg,
								icon: "none",
								duration: 3000
							});
							setTimeout(function(){
								wx.navigateTo({
									url: "/pages/shopcart/index"
								});	
							},1000)
						}else{
							wx.navigateTo({
								url: "/pages/create-order/index"
							});	
						}
					}
				});
			};
		})
	},
	// 取消授权提醒
	onCloseLocation(){
		let that = this;
		that.setData({
			showOpenLocation: false
		});
	},
	// 同意去打开地理位置
	onConfirmLocation(){
		// console.log('触发====');
		let that = this;
		wx.openSetting({
			success: function (res) {
				console.log(res)
				let authSetting = res.authSetting;
				if(authSetting["scope.userLocation"]){
					// 开启
					getApp().getLocal(function(){
						that.afterAuthLocation();
					});
				}
			}
		})
	},
	// 允许定位后的操作(或 拒绝定位,但选了默认店铺)
	afterAuthLocation(lat,lng){
		let that = this;
		// 外卖流程,需要验证是否登录
		if(that.data.fare_type == 0){
			getApp().verifyLogin(function(loginstatus){
				if(loginstatus){
					console.log('登录状态',loginstatus)
					try {
						wx.getStorage({
							key: 'checkedAddress',
							success: function(res){
								// console.log('res.data',res.data);
								let checkedAddress = JSON.parse(res.data);
								that.setData({
									checkedAddress: checkedAddress
								});
								// 按地址算
								that.getStoreList(that.data.checkedAddress.lat,that.data.checkedAddress.lnt);
							},
							fail: function(){
								wx.showToast({
									title: "请先选择收货地址",
									icon: "none",
								});
								setTimeout(function(){
									wx.navigateTo({
										url: '/pages/user/address/list/index'
									});
								},1000)
							}
						})
					}
					catch(err){
						console.log('报错信息',err)
					}
				}
			})
		}else{
			that.getStoreList();
		}
		console.log('定位成功');
	},
	// 切换配送方式
	changeFareType(event){
		// console.log(event);
		let that = this;
		let fare_type = event.currentTarget.dataset.type; // 0外卖 1自提
		let store = that.data.store;
		// 判断门店是否支持此配送方式
		if(fare_type == 0 && store.is_delivery != 1){
			wx.showToast({
				title: '门店暂不支持外卖',
				icon: 'none'
			});
			return;
		};
		if(fare_type == 1 && store.is_ziti != 1){
			wx.showToast({
				title: '门店暂不支持自提',
				icon: 'none'
			});
			return;
		};
		// 支持
		// if(that.data.showSelectFare){
		// 	that.setData({
		// 		showSelectFare: false
		// 	})
		// };
		// 切换时实现: 自取选门店，外卖选地址
		// 为每次选外卖时重选地址,清掉checkedAddress
		wx.removeStorageSync('checkedAddress');
		// 更新
		that.setData({
			fare_type: fare_type
		});
		wx.setStorage({
			key: "fare_type",
			data: that.data.fare_type
		});
		// 切到外卖
		if(fare_type == 0){
			// 选地址
			wx.navigateTo({
				url: '/pages/user/address/list/index'
			});
		};
	},
	// 关闭提醒
	closeShowTips(){
		let that = this;
		that.setData({
			showTips: false
		})
	},
	// 关闭选配送方式(用不到了)
	closeSelectFare(){
		let that = this;
		that.setData({
			showSelectFare: false
		})
	},
	// 计算每个商品的总数量
	updateTotalGoods(){
		let that = this;
		let oldCartGoods = that.data.cartGoods;
		// console.log('购物车',oldCartGoods);
		let list = that.data.good_list;
		list.forEach( item=> {
			if(item.children){
				// 有二级
				let erjiGoods = item.children;
				erjiGoods.forEach(erjiItem => {
					let goodsList = erjiItem.goodList;
					goodsList.forEach(goods=>{
						goods.cartNums = 0;
						oldCartGoods.forEach(oldGoods=>{
							if(!oldGoods.is_add){
								// 有规格
								if(goods.good_specs && goods.good_specs.length != 0){
									let specsArr = goods.good_specs;
									specsArr.forEach(goodsSpec=>{
										if(oldGoods.good_id == goodsSpec.good_id && oldGoods.good_specs_id == goodsSpec.id){
											goodsSpec.nums = oldGoods.nums;
											goods.cartNums += oldGoods.nums;
										}
									})
								}else{
									// 无规格
									if(oldGoods.good_id == goods.id){
										goods.nums = oldGoods.nums;
									}
								}
							}
						})
					})
				})
			}else{
				// 无二级
				let goodsList = item.goodList;
				goodsList.forEach(goods=>{
					goods.cartNums = 0
					oldCartGoods.forEach(oldGoods=>{
						if(!oldGoods.is_add){
							// 有规格
							if(goods.good_specs && goods.good_specs.length != 0){
								let specsArr = goods.good_specs;
								specsArr.forEach(goodsSpec=>{
									if(oldGoods.good_id == goodsSpec.good_id && oldGoods.good_specs_id == goodsSpec.id){
										goodsSpec.nums = oldGoods.nums;
										goods.cartNums += oldGoods.nums;
									}
								})
							}else{
								// 无规格
								if(oldGoods.good_id == goods.id){
									goods.nums = oldGoods.nums;
								}
							}
						}
					})
				})
			}
		})
		that.setData({
			good_list: list
		});
		// console.log('重组商品',list);
	},
	// 核实商品是否存在于购物车
	isAddCart(item){
		let that = this;
		let oldCartGoods = that.data.cartGoods;
		let is_have = false;
		// console.log('购物车',oldCartGoods);
		// console.log('操作商品',item);
		// 检测购物车是否有此商品
		for(let i in oldCartGoods){
			if(item.good_id){
				// 有规格
				console.log(item.id,oldCartGoods[i].good_specs_id);
				if(item.id == oldCartGoods[i].good_specs_id && !oldCartGoods[i].is_add){
					is_have = true;
					break;
				}
			}else{
				if(item.id == oldCartGoods[i].good_id && !oldCartGoods[i].is_add){
					is_have = true;
					break;
				}
			}
		};
		return is_have;
	},
	// 进入购物车页面
	goShopCart(){
		let that = this;
		wx.navigateTo({
			url: '/pages/shopcart/index'
		})
	},
	// 营业时间判断(弃用  改成多段时间了, 前端判断没意义了)
	checkBusinessTime(){
		let that = this;
		let store = that.data.store;
		// console.log('store',that.data.store,store.status);
		if(store.status != 1){
			wx.showToast({
				title: "门店暂未营业",
				icon: "none",
				duration: 3000
			});
			return;
		};
		let currentTime = new Date();
		let year = currentTime.getFullYear();
		let month = currentTime.getMonth()+1;
		let day = currentTime.getDate();
		let endDay = currentTime.getDate();
		if(store.end_at.split(":")[0] < store.begin_at.split(":")[0]){
			endDay = endDay+1;
		};
		let storeBeginAt = new Date(year+'/'+month+'/'+day+' '+store.begin_at);
		let storeEndAt = new Date(year+'/'+month+'/'+endDay+' '+store.end_at);
		if(storeBeginAt.getTime() > currentTime.getTime() || storeEndAt.getTime() < currentTime.getTime()){
			wx.showToast({
				title: "门店暂未营业",
				icon: "none",
				duration: 3000
			});
		};
	}
});
