index-legacy.c9442d18.js 23 KB

12345678
  1. ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML=":root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 .02667rem .02667rem var(--van-gray-8);--van-image-preview-overlay-background-color: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: .58667rem;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;transition-property:transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:.96rem}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background-color)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}._swipeItemImg_7rstw_1,._swipe_7rstw_1{width:100%;height:10rem;vertical-align:middle}._custom-indicator_7rstw_7{position:absolute;right:.13333rem;bottom:.13333rem;padding:.10667rem .21333rem;font-size:.37333rem;color:#fff;background:rgba(0,0,0,.5);border-radius:.32rem}._goodsHead_7rstw_17{padding:.21333rem 0}._goodsHead_7rstw_17 .van-cell{padding-top:.13333rem;padding-bottom:.13333rem}._priceGroup_7rstw_24{display:flex;align-items:center}._priceGroup_7rstw_24 ._price_7rstw_24{color:#ff4e19;font-size:.64rem;font-weight:700}._priceGroup_7rstw_24 ._price_7rstw_24 i{font-size:.42667rem;font-style:normal}._priceGroup_7rstw_24 ._delPrice_7rstw_37{font-size:.37333rem;color:#999;margin-left:.32rem;line-height:.53333rem}._priceGroup_7rstw_24 ._stock_7rstw_43{font-size:.37333rem;color:#999}._goodsName_7rstw_47{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._row_7rstw_53{background-color:#fff;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._row_7rstw_53 ._col_7rstw_57{font-size:.42667rem;color:#333}._radio-group_7rstw_61{display:flex;flex-wrap:wrap}._radio_7rstw_61{margin-right:.21333rem;margin-bottom:.21333rem;min-width:1.6rem}._radio_7rstw_61 .van-radio__label--disabled{opacity:.5}._radio_7rstw_61 .van-radio__icon{display:none}._radio_7rstw_61 .van-tag--large{height:.72rem;font-size:.34667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_7rstw_61 .van-tag{box-sizing:border-box}._radio_7rstw_61 .van-tag--default{color:#999}._radio_7rstw_61 .van-tag--primary{background-color:#f7f8f9}._radio_7rstw_61 .van-radio__label{margin-left:0}._badge_7rstw_96 .van-badge{border-radius:.16rem 0;font-size:.32rem}._section_7rstw_100{background:#fff;padding:.32rem 0 0}._detail_7rstw_104{display:flex;align-items:center;justify-content:center;font-size:.37333rem;color:#999;line-height:.53333rem;margin-bottom:.32rem}._detail_7rstw_104 span{padding:0 .26667rem}._detail_7rstw_104:before,._detail_7rstw_104:after{display:inline-block;content:\" \";width:1.06667rem;height:.08rem}._detail_7rstw_104:before{background:linear-gradient(90deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._detail_7rstw_104:after{background:linear-gradient(270deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._photoDetail_7rstw_129 img{width:100%;vertical-align:middle}._goodsDetail_7rstw_133{margin-bottom:var(--van-action-bar-height)}._actionBar_7rstw_136{padding-left:.42667rem;padding-right:.42667rem;justify-content:space-between;box-shadow:0 -.26667rem .26667rem var(--box-shadow-color);box-sizing:border-box}._actionBar_7rstw_136 .van-submit-bar__bar{justify-content:space-between;padding:0;height:1.81333rem}._actionBar_7rstw_136 .van-action-bar-icon{align-items:center}._actionBar_7rstw_136 .van-action-bar-icon__icon{margin-bottom:0;line-height:0}._actionBar_7rstw_136 .van-badge{background:#ff4e19}._actionBar_7rstw_136 ._text_7rstw_158{font-size:.32rem;color:#333;text-align:center}._addCertBtn_7rstw_163{background:linear-gradient(180deg,#ffce00 0%,#ffa000 100%);color:#fff}._buyGroupBtn_7rstw_167{background:linear-gradient(180deg,#ff8636 0%,#ff4e19 100%);color:#fff}._buyGroup_7rstw_167{flex-basis:60%;display:flex;justify-content:center;overflow:hidden;box-sizing:border-box}._buyGroup_7rstw_167 ._addCertBtn_7rstw_163{margin-right:.26667rem}._buyGroup_7rstw_167 ._addCertBtn_7rstw_163,._buyGroup_7rstw_167 ._buyGroupBtn_7rstw_167{border-radius:.53333rem}._selectWrap_7rstw_185{padding-top:.04rem;font-size:.37333rem;color:#666;padding-bottom:.32rem}._shareBtn_7rstw_191{display:flex;align-items:center;font-size:.37333rem;color:#666}._shareWrap_7rstw_197{display:flex;border-radius:.26667rem;border:.02667rem solid var(--van-primary);overflow:hidden;padding:.37333rem;align-items:center;background-color:#fff;margin-top:.42667rem}._shareWrap_7rstw_197 ._sharePic_7rstw_207{width:2.66667rem;height:2.66667rem;border-radius:.21333rem}._shareWrap_7rstw_197 ._shareLeft_7rstw_212{margin-right:.26667rem}._shareWrap_7rstw_197 ._shareRight_7rstw_215{flex:1;overflow:hidden}._shareWrap_7rstw_197 ._shareShopTitle_7rstw_219{font-size:.42667rem;font-weight:400;color:#333;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}._shareWrap_7rstw_197 ._shareShopDes_7rstw_229{font-size:.37333rem;font-weight:400;color:#999;margin:.26667rem 0 .53333rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._shareWrap_7rstw_197 ._shareShopValue_7rstw_238{font-size:.42667rem;color:#ff4e19}._shareWrap_7rstw_197 ._shareShopOldPrice_7rstw_242{color:#e5e5e5;margin-left:.13333rem}._shareWrap_7rstw_197 .van-card{background:transparent}._imagesOverlayWrap_7rstw_249 .van-badge__wrapper,._imagesOverlayWrap_7rstw_249 .van-image-preview__index{top:1.06667rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.890d473e.js','./vendor-legacy.73abbe39.js','./index-legacy.637f35562.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a2.js','./index-legacy.637f35563.js','./index-legacy.f25f109a8.js','./index-legacy.f25f109a10.js','./index-legacy.637f3556.js','./index-legacy.f25f109a12.js','./index-legacy.213ffd93.js','./index-legacy.372e7f90.js','./index-legacy.f25f109a9.js','./shop-mall-legacy.e5bca19b.js'],function(exports){'use strict';var request,moneyFormat,defineComponent,ImagePreview,Toast,createVNode,Swipe,SwipeItem,Image,createTextVNode,CellGroup,Cell,Row,Col,RadioGroup,Badge,Radio,Tag,isVNode,Fragment,SubmitBar,Icon,ActionBarButton,Popup,AddGoodsCart,ColHeader;return{setters:[function(module){request=module.r;moneyFormat=module.m;},function(module){defineComponent=module.d;ImagePreview=module.$;Toast=module.T;createVNode=module.b;Swipe=module.Q;SwipeItem=module.O;Image=module.I;createTextVNode=module.j;CellGroup=module.m;Cell=module.p;Row=module.k;Col=module.C;RadioGroup=module.H;Badge=module.U;Radio=module.J;Tag=module.X;isVNode=module.v;Fragment=module.F;SubmitBar=module.a0;Icon=module.q;ActionBarButton=module.a1;Popup=module.P;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(module){AddGoodsCart=module.A;},function(module){ColHeader=module.C;},function(){},function(){}],execute:function execute(){var iconHome="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAeFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVyEiIAAAAJ3RSTlMAXXf78+MT1MBCjQ8J+Lap8ODdkHJcLR4Y6YiASTGtmGtlPDjYzWJYX2XLAAABFklEQVRIx+2U23KDIBRFdySggjHxEmOMzbUt//+HHaAzDvFo8KkPzXoRZs7WzXIGUKiuXH99I5hHoQ3JAWHUTDt2ewQgcj2wFXjFndvJo9zYJ08xT8Rc/RZNbFesyl7XYSezyaQLxx+YIuW/Nfz9JgLNyb0xb4cvbvW04DZxdfzX7XdTgtOjq3OHzyEZBFN1BCFuEDyqU4OAENy7OsUDNFnlC+7c9iwwhhKcuzVZZyT4DER2UVK/kxJc49NKUxhDCo5hDtAhiMq4gom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Acj2spdApHSZ6URMNKxXzqQmC0RZqNsOK4zs1TWG0kZqNsHSUTpdgIrKQojAClgLOkbwVDDNzc8icOShGqYHzhpaHuaDpU4Pg9gc859M9U5VeagAAAABJRU5ErkJggg==";var index$1='';var swipeItemImg="_swipeItemImg_7rstw_1";var swipe="_swipe_7rstw_1";var goodsHead="_goodsHead_7rstw_17";var priceGroup="_priceGroup_7rstw_24";var price="_price_7rstw_24";var delPrice="_delPrice_7rstw_37";var stock="_stock_7rstw_43";var goodsName="_goodsName_7rstw_47";var row="_row_7rstw_53";var col="_col_7rstw_57";var radio="_radio_7rstw_61";var badge="_badge_7rstw_96";var section="_section_7rstw_100";var detail="_detail_7rstw_104";var photoDetail="_photoDetail_7rstw_129";var goodsDetail="_goodsDetail_7rstw_133";var actionBar="_actionBar_7rstw_136";var text="_text_7rstw_158";var addCertBtn="_addCertBtn_7rstw_163";var buyGroupBtn="_buyGroupBtn_7rstw_167";var buyGroup="_buyGroup_7rstw_167";var selectWrap="_selectWrap_7rstw_185";var shareBtn="_shareBtn_7rstw_191";var shareWrap="_shareWrap_7rstw_197";var sharePic="_sharePic_7rstw_207";var shareLeft="_shareLeft_7rstw_212";var shareRight="_shareRight_7rstw_215";var shareShopTitle="_shareShopTitle_7rstw_219";var shareShopDes="_shareShopDes_7rstw_229";var shareShopValue="_shareShopValue_7rstw_238";var shareShopOldPrice="_shareShopOldPrice_7rstw_242";var imagesOverlayWrap="_imagesOverlayWrap_7rstw_249";var styles={swipeItemImg:swipeItemImg,swipe:swipe,"custom-indicator":"_custom-indicator_7rstw_7",goodsHead:goodsHead,priceGroup:priceGroup,price:price,delPrice:delPrice,stock:stock,goodsName:goodsName,row:row,col:col,"radio-group":"_radio-group_7rstw_61",radio:radio,badge:badge,section:section,detail:detail,photoDetail:photoDetail,goodsDetail:goodsDetail,actionBar:actionBar,text:text,addCertBtn:addCertBtn,buyGroupBtn:buyGroupBtn,buyGroup:buyGroup,selectWrap:selectWrap,shareBtn:shareBtn,shareWrap:shareWrap,sharePic:sharePic,shareLeft:shareLeft,shareRight:shareRight,shareShopTitle:shareShopTitle,shareShopDes:shareShopDes,shareShopValue:shareShopValue,shareShopOldPrice:shareShopOldPrice,imagesOverlayWrap:imagesOverlayWrap};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var index=exports('default',defineComponent({name:'goods-detail',data:function data(){var query=this.$route.query;return{id:query.id,albumPics:[],product:{},radio:0,skuStockListTemp:[],detailMobileHtml:'',loading:false,addGoodsShow:false,selectGoodsItem:{},cartCount:0,showType:'cart',shareShow:false// 分享弹窗
  2. };},computed:{skuStockList:function skuStockList(){// 处理规格
  3. var product=this.product;var skuStockList=this.skuStockListTemp.length>0?this.skuStockListTemp:[{id:-1,price:product.price,pic:product.pic,stock:product.stock,spData:null}];skuStockList.forEach(function(item){if(item.spData){var spData=JSON.parse(item.spData);item.spDataJson=spData.reduce(function(spDataJson,value){spDataJson+=value.value;return spDataJson;},'');item.sku=spData.reduce(function(sku,value){sku.push("".concat(value.key,": ").concat(value.value));return sku;},[]).join(',');}else{item.spDataJson='默认';}});return skuStockList;},getPrice:function getPrice(){var _this=this;var item=this.skuStockList.filter(function(n){return n.id==_this.radio;});if(item&&Array.isArray(item)&&item.length){return item[0].price;}return 0;}},mounted:function mounted(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,result,len,i,item;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_this2.loading=true;_context.next=4;return request.get("/api-mall-portal/product/detail/".concat(_this2.id));case 4:res=_context.sent;_this2.loading=false;result=res.data||{};_this2.albumPics=[result.product.pic].concat(result.product.albumPics.split(',')).filter(function(n){return n;});_this2.product=result.product;_this2.skuStockListTemp=result.skuStockList||[];if(!_this2.skuStockListTemp.length){_context.next=21;break;}len=_this2.skuStockListTemp.length;i=0;case 13:if(!(i<len)){_context.next=21;break;}item=_this2.skuStockListTemp[i];if(!(item.stock>=0)){_context.next=18;break;}_this2.radio=item.id;return _context.abrupt("break",21);case 18:i++;_context.next=13;break;case 21:_this2.detailMobileHtml=result.product.detailMobileHtml;_context.next=26;break;case 24:_context.prev=24;_context.t0=_context["catch"](0);case 26:_this2.getCartCount();case 27:case"end":return _context.stop();}}},_callee,null,[[0,24]]);}))();},methods:{onPreview:function onPreview(index){// 图片预览
  4. ImagePreview({images:this.albumPics,startPosition:index,closeable:true,className:styles.imagesOverlayWrap});},onShowImg:function onShowImg(target){var localName=target.srcElement.localName;if(localName!=='img'){return;}var startPosition=0;var domList=document.querySelectorAll('.msgWrap img');var imgList=Array.from(domList).map(function(item,index){if(target.srcElement==item){startPosition=index;}return item.src;});ImagePreview({images:imgList,startPosition:startPosition,closeable:true,className:styles.imagesOverlayWrap});},onShowCart:function onShowCart(){var type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'cart';this.selectGoodsItem={price:this.product.pic,stock:this.product.stock,skuStockList:this.skuStockListTemp.length?this.skuStockListTemp:undefined,brandName:this.product.brandName,productCategoryId:this.product.productCategoryId,name:this.product.name,productSn:this.product.productSn,productSubTitle:this.product.subTitle,id:this.product.id};this.showType=type;// 打开购物弹框
  5. this.addGoodsShow=true;},onBuy:function onBuy(){// 购买
  6. if(!this.radio){return Toast('请选择规格');}console.log(true);},getCartCount:function getCartCount(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var _yield$request$get,code,data;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-mall-portal/cart/list');case 3:_yield$request$get=_context2.sent;code=_yield$request$get.code;data=_yield$request$get.data;if(code===200){_this3.cartCount=data.length;}_context2.next=11;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](0);case 11:case"end":return _context2.stop();}}},_callee2,null,[[0,9]]);}))();}},render:function render(){var _this4=this;var _slot;var product=this.product;var selectSku=this.skuStockList.find(function(n){return n.id===_this4.radio;});return createVNode("div",{"class":styles.goodsDetail},[createVNode(ColHeader,null,null),createVNode(Swipe,{"class":styles.swipe,"lazyRender":true},{default:function _default(){return[_this4.albumPics.map(function(item,index){return createVNode(SwipeItem,null,{default:function _default(){return[createVNode(Image,{"class":styles.swipeItemImg,"src":item,"onClick":function onClick(){return _this4.onPreview(index);},"fit":"cover"},null)];}});})];},indicator:function indicator(item){return item.total>1&&createVNode("div",{"class":styles['custom-indicator']},[(item.active||0)+1,createTextVNode(" / "),item.total]);}}),createVNode(CellGroup,{"border":false,"class":[styles.goodsHead,'mb12']},{default:function _default(){return[createVNode(Cell,{"center":true,"border":false},{title:function title(){return createVNode("div",{"class":styles.priceGroup},[createVNode("span",{"class":styles.price},[createVNode("i",null,[createTextVNode("\xA5")]),moneyFormat(_this4.getPrice)])]);}// default: () => <div class={styles.stock}>销量4件</div>
  7. }),createVNode(Cell,{"center":true,"border":false,"title":product.name,"titleClass":[styles.goodsName,'van-ellipsis']},null)];}}),createVNode(Row,{"class":[styles.row,'mb12']},{default:function _default(){return[createVNode(Col,{"span":4,"class":styles.col},{default:function _default(){return[createTextVNode("\u89C4\u683C")];}}),createVNode(Col,{"span":20},{default:function _default(){return[selectSku?createVNode("div",{"class":styles.selectWrap},[createTextVNode("\u5DF2\u9009\u62E9 "),selectSku.spDataJson]):createVNode("div",null,[createTextVNode("\u8BF7\u9009\u62E9 \u89C4\u683C")]),createVNode(RadioGroup,{"class":styles['radio-group'],"modelValue":_this4.radio,"onUpdate:modelValue":function onUpdateModelValue(val){return _this4.radio=val;}},_isSlot(_slot=_this4.skuStockList.map(function(item){var isActive=item.id===_this4.radio;var type=isActive?'primary':'default';return createVNode(Badge,{"position":"top-right","color":'#999999',"class":styles.badge,"offset":[-20,0]},{default:function _default(){return[createVNode(Radio,{"class":styles.radio,"name":item.id,"onClick":function onClick(){// 判断是否有库存
  8. if(item.stock<=0){return;}_this4.radio=item.id;}},{default:function _default(){return[createVNode(Tag,{"size":"large","plain":isActive,"type":type},{default:function _default(){return[item.spDataJson];}})];}})];}});}))?_slot:{default:function _default(){return[_slot];}})];}})];}}),this.detailMobileHtml&&createVNode("div",{"class":[styles.section]},[createVNode("div",{"class":styles.detail},[createVNode("span",null,[createTextVNode("\u56FE\u6587\u8BE6\u60C5")])]),createVNode("div",{"class":[styles.photoDetail,'msgWrap'],"onClick":this.onShowImg,"innerHTML":this.detailMobileHtml},null)]),!this.loading&&createVNode(Fragment,null,[createVNode(SubmitBar,{"class":styles.actionBar,"safe-area-inset-bottom":true},{default:function _default(){return[createVNode("div",{"style":{display:'flex',alignItems:'center'}},[createVNode(Badge,{"content":_this4.cartCount,"showZero":false,"onClick":function onClick(){_this4.$router.push('/cart');}},{default:function _default(){return[createVNode(Image,{"src":iconShopCart,"style":{width:'30px',height:'24px'}},null),createVNode("div",{"class":styles.text},[createTextVNode("\u8D2D\u7269\u8F66")])];}}),createVNode(Badge,{"content":0,"showZero":false,"style":{marginLeft:'32px'},"onClick":function onClick(){_this4.$router.push('/');}},{default:function _default(){return[createVNode(Icon,{"name":iconHome,"size":24},null),createVNode("div",{"class":styles.text},[createTextVNode("\u9996\u9875")])];}})])];},button:function button(){return createVNode("div",{"class":styles.buyGroup},[createVNode(ActionBarButton,{"type":"primary","class":styles.addCertBtn,"text":"加入购物车","onClick":function onClick(){return _this4.onShowCart();}},null),createVNode(ActionBarButton,{"type":"primary","class":styles.buyGroupBtn,"text":"立即购买","onClick":function onClick(){return _this4.onShowCart('cartConfirm');}},null)]);}})]),createVNode(Popup,{"show":this.addGoodsShow,"closeable":true,"position":"bottom","round":true,"onClose":function onClose(){_this4.addGoodsShow=false;}},{default:function _default(){return[createVNode(AddGoodsCart,{"show":_this4.addGoodsShow,"onGetCartCount":function onGetCartCount(){return _this4.getCartCount();},"item":_this4.selectGoodsItem,"defaultRadio":_this4.radio,"showType":_this4.showType},null)];}})]);}}));}};});})();