// {"framework" : "Rax"}
!function(e){if("function"==typeof define)define("aemod/ae-wl-shopCoupon/index.web",["npm/@ali/universal-alienv/index","rax","rax-view","rax-text","rax-picture","@weex-module/userTrack","universal-toast","@weex-module/broadcast","@weex-module/dom","npm/@ali/universal-goldlog/index","rax-scrollview","@weex-module/aeAbTest"],function(require,exports,module){module.exports=e(require("npm/@ali/universal-alienv/index"),require("rax"),require("rax-view"),require("rax-text"),require("rax-picture"),require("universal-toast"),require("npm/@ali/universal-goldlog/index"),require("rax-scrollview"))});else if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("npm/@ali/universal-alienv/index"),require("rax"),require("rax-view"),require("rax-text"),require("rax-picture"),require("universal-toast"),require("npm/@ali/universal-goldlog/index"),require("rax-scrollview"));else{var t;(t="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this).AeWlShopCoupon=e(t["npm/@ali/universal-alienv/index"],t.rax,t["rax-view"],t["rax-text"],t["rax-picture"],t["universal-toast"],t["npm/@ali/universal-goldlog/index"],t["rax-scrollview"])}}(function(e,t,r,o,n,i,a,s){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var module=t[o]={i:o,l:!1,exports:{}};return e[o].call(module.exports,module,module.exports,r),module.l=!0,module.exports}return r.m=e,r.c=t,r.d=function(exports,e,t){r.o(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:t})},r.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(module){var e=module&&module.__esModule?function(){return module.default}:function(){return module};return r.d(e,"a",e),e},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=27)}([function(module,exports){module.exports=e},function(module,exports){module.exports=t},function(module,exports){module.exports=r},function(module,exports){module.exports=o},function(module,exports){module.exports=n},function(module,exports){var e=[{reg:/www.aliexpress.com/,originDomain:"www.aliexpress.com",targetDomain:"www.aliexpress.ru"},{reg:/tmall.aliexpress.com/,originDomain:"tmall.aliexpress.com",targetDomain:"tmall.ru"},{reg:/login.tmall.com/,originDomain:"login.tmall.com",targetDomain:"login.tmall.ru"},{reg:/login.aliexpress.com/,originDomain:"login.aliexpress.com",targetDomain:"login.aliexpress.ru"},{reg:/accounts.tmall.com/,originDomain:"accounts.tmall.com",targetDomain:"accounts.tmall.ru"},{reg:/accounts.aliexpress.com/,originDomain:"accounts.aliexpress.com",targetDomain:"accounts.aliexpress.ru"},{reg:/passport.aliexpress.com/,originDomain:"passport.aliexpress.com",targetDomain:"passport.aliexpress.ru"},{reg:/msg.aliexpress.com/,originDomain:"msg.aliexpress.com",targetDomain:"msg.aliexpress.ru"},{reg:/message.aliexpress.com/,originDomain:"message.aliexpress.com",targetDomain:"message.aliexpress.ru"},{reg:/trade.aliexpress.com/,originDomain:"trade.aliexpress.com",targetDomain:"trade.aliexpress.ru"},{reg:/home.aliexpress.com/,originDomain:"home.aliexpress.com",targetDomain:"home.aliexpress.ru"},{reg:/feedback.aliexpress.com/,originDomain:"feedback.aliexpress.com",targetDomain:"feedback.aliexpress.ru"},{reg:/coupon.aliexpress.com/,originDomain:"coupon.aliexpress.com",targetDomain:"coupon.aliexpress.ru"},{reg:/report.aliexpress.com/,originDomain:"report.aliexpress.com",targetDomain:"report.aliexpress.ru"},{reg:/ilogisticsaddress.aliexpress.com/,originDomain:"ilogisticsaddress.aliexpress.com",targetDomain:"ilogisticsaddress.aliexpress.ru"},{reg:/my.aliexpress.com/,originDomain:"my.aliexpress.com",targetDomain:"my.aliexpress.ru"},{reg:/best.aliexpress.com/,originDomain:"best.aliexpress.com",targetDomain:"best.aliexpress.ru"},{reg:/mbest.aliexpress.com/,originDomain:"mbest.aliexpress.com",targetDomain:"mbest.aliexpress.ru"},{reg:/s.click.aliexpress.com/,originDomain:"s.click.aliexpress.com",targetDomain:"s.click.aliexpress.ru"},{reg:/sale.aliexpress.com/,originDomain:"sale.aliexpress.com",targetDomain:"sale.aliexpress.ru"},{reg:/ilogisticsaddress.tmall.com/,originDomain:"ilogisticsaddress.tmall.com",targetDomain:"ilogisticsaddress.tmall.ru"},{reg:/freight.aliexpress.com/,originDomain:"freight.aliexpress.com",targetDomain:"freight.aliexpress.ru"},{reg:/m.aliexpress.com/,originDomain:"m.aliexpress.com",targetDomain:"m.aliexpress.ru"},{reg:/shoppingcart.aliexpress.com/,originDomain:"shoppingcart.aliexpress.com",targetDomain:"shoppingcart.aliexpress.ru"}],t=[{reg:/gpsfront.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/cdp.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/sale.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/ilogisticsaddress.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/freight.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/feedback.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/ru.aliexpress.com/,originDomain:"ru.aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/my.aliexpress.com\/wishlist/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/promotion.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/connectkeyword.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"},{reg:/best.aliexpress.com/,originDomain:"aliexpress.com",targetDomain:"aliexpress.ru"}];function r(){return!!/aliexpress.ru/.test(window.location.host)}function o(t,o){for(var n,i=t,a=!1,s=o||e,u=0;u<s.length;u++)if(s[u].reg.test(t)){a=!0,n=s[u];break}return r()&&a&&(i=function(e,t,r){if("string"!=typeof e)return e;if(-1!==e.split("?")[0].indexOf("aliexpress.ru"))return e;if(-1!==e.split("?")[0].indexOf("pg-ru.aliexpress.com"))return e;var o=new RegExp("(.*?)(".concat(t,")(.*\\?)?(.*)"));return e.replace(o,function(e,o,n,i,a){return o+(r||t)+(i||"")+a})}(t,n.originDomain,n.targetDomain)),i}module.exports={switchRequestURL:function(e){return o(e,t)},switchLinkURL:function(e){return o(e)},switchUrl:o,isRU:r}},function(module,exports){module.exports=require("@weex-module/userTrack")},function(module,exports,e){Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(0),o=e(15),n=(t=o)&&t.__esModule?t:{default:t};var i=r.isWeex&&e(6),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spm",t="";return((location.href||"").split("?")[1]||"").split("&").forEach(function(r){0===r.indexOf(e+"=")&&(t=r.substr(e.length+1))}),t};exports.default={sendClickUT:function(e,t,o,s,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c="a1z65.store_weex_home."+e,p=Object.assign(l,{spm:c,"spm-cnt":c,"spm-url":a("spm")||"0.0.0.0",shop_id:a("shopId")||"",seller_id:a("sellerId")||"",sellerAdminSeq:a("sellerId")||""});p[e+"region"]="",p.scene=180220,r.isWeex?(i.commit&&i.commit("click",s||"Page_Store_Home",u||"Page_AEshop_Seller_Clk",p),i.updateNextPageUtparam&&i.updateNextPageUtparam()):n.default.record("/tbwmdd.66.1","CLK","ae_project_id=180220&ae_page_type=Page_AEshop&ae_page_area="+e+"&ae_button_type=Seller&ae_object_type=Seller&spm="+c,"GET")}},module.exports=exports.default},function(module,exports){module.exports=i},function(module,exports,e){var t=e(20),r=e(21),o=e(22),n=e(23);module.exports=t.create({Implements:[r,o,n],initialize:function(e){this.initAttrs(e),function(e,t){for(var r in t)if(t.hasOwnProperty(r)){var o="_onChange"+((n=r).charAt(0).toUpperCase()+n.substring(1));e[o]&&e.on("change:"+r,e[o])}var n}(this,this.attrs)},destroy:function(){for(var e in this.off(),this)this.hasOwnProperty(e)&&delete this[e];this.destroy=function(){}}})},function(module,exports){var e=exports,t=decodeURIComponent,r=encodeURIComponent;function o(e){return"string"==typeof e}function n(e){return o(e)&&""!==e}function i(e){if(!n(e))throw new TypeError("Cookie name must be a non-empty string")}function a(e){return e}e.get=function(e,r){i(e),r="function"==typeof r?{converter:r}:r||{};var n=function(e,r){var n={};if(o(e)&&e.length>0)for(var i,s,u,l=r?t:a,c=e.split(/;\s/g),p=0,f=c.length;p<f;p++){if((u=c[p].match(/([^=]+)=/i))instanceof Array)try{i=t(u[1]),s=l(c[p].substring(u[1].length+1))}catch(e){}else i=t(c[p]),s="";i&&(n[i]=s)}return n}(document.cookie,!r.raw);return(r.converter||a)(n[e])},e.set=function(e,t,o){i(e);var a=(o=o||{}).expires,s=o.domain,u=o.path;o.raw||(t=r(t+""));var l=e+"="+t,c=a;return"number"==typeof c&&(c=new Date).setDate(c.getDate()+a),c instanceof Date&&(l+="; expires="+c.toUTCString()),n(s)&&(l+="; domain="+s),n(u)&&(l+="; path="+u),o.secure&&(l+="; secure"),document.cookie=l,l},e.remove=function(e,t){return(t=t||{}).expires=new Date(0),this.set(e,"",t)}},function(module,exports,e){module.exports=e(12)},function(module,exports,e){Object.defineProperty(exports,"__esModule",{value:!0});var t,r=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o=function(){function e(e,t){for(var r,o=0;o<t.length;o++)(r=t[o]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),n=e(1),i=e(2),a=(t=i)&&t.__esModule?t:{default:t},s=e(0);var u=function(t){function i(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return o.sendExpose=function(){var e=o.props,t=e.gdc,r=void 0===t?{}:t,n=e.mds,i=void 0===n?{}:n,a=e.extParams,s=i.moduleName,u=void 0===s?"default":s;o.isExp||(o.sendExpUT(r,u,"",a),o.isExp=!0)},o.sendExpUT=function(t,o,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.sellerId,u=t.spm_cnt,l=t.sellerAdminSeq,c=t.pageId,p=t.shopId,f=t.pageName,g=t.spmb,d=n||o+"_Exposure_Event",m=r({seller_id:a,spm_cnt:u+"."+o,sellerAdminSeq:l,pageId:c,shop_id:p,spm:"a1z65."+g+"."+o},i);if(s.isWeex){var h=e(6);h.commitut?h.commitut("expose",2201,f,"",d,"","",m):h.commit("expose",f,d,m)}},o.isExp=!1,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,n.Component),o(i,[{key:"componentDidMount",value:function(){var t=this;if(s.isWeex){var r=this.props.gdc.pagePath,o=void 0===r?"":r,i=this.props.mds,a=i.widgetId,u=void 0===a?"":a,l=i.moduleName,c=void 0===l?"":l,p=e(13),f="instanceId_"+c+"_"+u+"_expose";p.createChannel({name:"switchTabbar",instanceId:f}),p.onMessage({instanceId:f},function(r){r.isChangeTab&&(t.isExp=!1),r.pagePath===o&&s.isWeex&&setTimeout(function(){var r=e(14),o=(0,n.findDOMNode)(t.refs[c+"-"+u]),i=0;r.getComponentRect("viewport",function(e){i=e.size.height}),r.getComponentRect(o,function(e){var r=e.size.top;r>0&&r<=i&&t.sendExpose()})},60)})}}},{key:"render",value:function(){var e=this.props.mds,t=void 0===e?{}:e,r=t.widgetId,o=void 0===r?"":r,i=t.moduleName,u=void 0===i?"default":i;return s.isWeb?null:(0,n.createElement)(a.default,{ref:u+"-"+o,onAppear:this.sendExpose})}}]),i}();exports.default=u,module.exports=exports.default},function(module,exports){module.exports=require("@weex-module/broadcast")},function(module,exports){module.exports=require("@weex-module/dom")},function(module,exports){module.exports=a},function(module,exports,e){Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r=function(){function e(e,t){for(var r,o=0;o<t.length;o++)(r=t[o]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),o=e(1),n=f(e(2)),i=f(e(3)),a=f(e(8)),s=f(e(17)),u=e(0),l=e(5),c=f(e(18)),p=f(e(7));f(e(4));function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(f){function d(){var r,s,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);for(var m=arguments.length,h=Array(m),y=0;y<m;y++)h[y]=arguments[y];return s=f=g(this,(r=d.__proto__||Object.getPrototypeOf(d)).call.apply(r,[this].concat(h))),f.receiveCoupon=function(e){if(!e.collectible)return!1;var r=f.props,o=r.couponList,n=r.mds,i=void 0===n?{}:n,s=r.pageUtils,l=r.gdc,c=void 0===l?{}:l,g=c.translate,d=void 0===g?{}:g,m=c.translation,h=void 0===m?{}:m,y=c.locale,v=void 0===y?"en_US":y,x=c.currency,_=void 0===x?"USD":x,b=h["module.mobile.shopCode.toastText"]||d["module.mobile.shopCode.toastText"]||"successfully",w=e.campaignDetails&&e.campaignDetails[0]&&e.campaignDetails[0].features&&e.campaignDetails[0].features.encryptedString,C={};u.isWeb&&(C={_lang:v,_currency:_});var O=t({asac:e.asac,bizExtension:JSON.stringify({encryptedString:w,bizIdentity:"shop",sourceChannel:"shop_homepage"})},C),D={clk_obj:{clk_behavior:"getCoupon",couponId:e.campaignCode}};p.default.sendClickUT(i.moduleName,"","","",i.moduleName+"GetCoupon","",D),s.Mtop.request({api:"mtop.ae.ump.piggybank.couponCode.send",v:"1.0",dataType:"originaljsonp",data:O},function(t){if(t&&t.data&&t.data.resultFlag){a.default.show(b);var r=o.map(function(r){return e.campaignCode===r.campaignCode&&(r.collected=!0,r.collectible=!1,r.bizExtension&&t.data.module&&t.data.module.couponCode&&(r.bizExtension.couponCode=t.data.module.couponCode,r.bizExtension.codeScope="public")),r});f.props.updateCouponData(r)}else a.default.show(t.data&&t.data.resultMSG)},function(e){if(u.isWeb){var t=(e.ret&&e.ret[0]).split("::");a.default.show(t&&t[1]||"system error")}else{var r=e.data&&e.data.resultMSG||"Oops!The system is currently busy.Please try again later.";a.default.show(r)}})},f.checkLogin=function(t,r){if(!t)return!1;var o=f.props.updateCouponData,n=f.props.pageUtils.User;if(u.isWeex)n.getUserInfo(function(e){var t=!!e.isLogin&&e.isLogin.toString();"true"===t||!0===t?r(e.info.userId):n.login(function(t){("true"===t.isLogin||!0===t.isLogin)&&(r(e.info.userId),o("isLogin"))})});else{var i=e(19);if(i.isLoggedIn()){var a=i.getXUserObj();r(a.memberSeq)}else window.location.href=(0,l.switchLinkURL)("//m.aliexpress.com/login.html?return_url="+encodeURIComponent(window.location.href))}},f.getCouponItem=function(e,r){var a=f.props.couponList,s=0,u=560,l=312,p=496;e.bizExtension&&"public"===e.bizExtension.codeScope&&(p=258),r===a.length-1&&(s=24),1===a.length&&(u=702,l=456);var g=e.newTips;return(0,o.createElement)(n.default,{style:t({},c.default.couponContainer,{marginRight:s,width:u})},(0,o.createElement)(n.default,{style:c.default.couponTitle},(0,o.createElement)(i.default,{numberOfLines:1,style:t({},c.default.couponItemTitle,{width:p})},g.sellerCouponDenominationInfo),e.bizExtension&&"public"===e.bizExtension.codeScope?(0,o.createElement)(i.default,{style:c.default.couponCode},e.bizExtension.couponCode):null),(0,o.createElement)(n.default,{style:t({},c.default.couponItemLeft)},(0,o.createElement)(n.default,{style:{width:l}},(0,o.createElement)(i.default,{style:c.default.couponItemDes,numberOfLines:2},g.sellerCouponInfoCopy,g.sellerCouponExplainCopy)),e.collectible?(0,o.createElement)(n.default,{style:c.default.getItNowTextWrap,onClick:function(){f.checkLogin(e.collectible,f.receiveCoupon.bind(f,e))}},(0,o.createElement)(i.default,{style:c.default.getItNowText,numberOfLines:1},g.sellerCouponActionCopy)):(0,o.createElement)(i.default,{style:c.default.copyCollected,numberOfLines:1},g.sellerCouponActionCopyCollected)))},g(f,s)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(d,o.Component),r(d,[{key:"render",value:function(){var e=this,r=this.props.couponList;return(0,o.createElement)(s.default,{style:t({},c.default.couponList,{paddingRight:0}),horizontal:!0,onEndReachedThreshold:10,showsHorizontalScrollIndicator:!1},r.map(function(t,r){return e.getCouponItem(t,r)}))}}]),d}();exports.default=d,module.exports=exports.default},function(module,exports){module.exports=s},function(module,exports){module.exports={couponContainer:{width:600,paddingTop:16,paddingRight:32,paddingBottom:16,paddingLeft:32,borderRadius:"8px",backgroundColor:"rgb(255,244,229)",marginLeft:16,position:"relative",display:"flex",flexDirection:"column"},couponList:{paddingLeft:8,paddingBottom:16,position:"relative"},couponTitle:{display:"flex",flexDirection:"row",height:52,justifyContent:"space-between"},couponItemTitle:{fontFamily:"OpenSans-Bold",fontWeight:"bold",fontSize:36,color:"rgb(0,0,0)",line:1,overflow:"hidden",textOverflow:"ellipsis"},couponItemLeft:{display:"flex",flexDirection:"row",justifyContent:"space-between",position:"relative"},couponItemDes:{marginTop:2,fontFamily:"OpenSans",fontSize:28,opacity:.9,color:"rgb(0,0,0)",overflow:"hidden",textOverflow:"ellipsis"},couponItemTime:{marginTop:11,fontFamily:"OpenSans",fontSize:22,color:"rgb(0,0,0)",lineHeight:24},getItNow:{width:192,justifyContent:"center",alignItems:"center"},getItNowTextWrap:{display:"flex",position:"absolute",bottom:0,right:0,height:48,width:166,overflow:"hidden",paddingTop:0,paddingRight:12,paddingBottom:0,paddingLeft:12,borderRadius:24,backgroundColor:"rgb(248,47,46)"},getItNowText:{fontFamily:"OpenSans",textAlign:"center",fontWeight:"700",fontSize:24,lineHeight:48,overflow:"hidden",textOverflow:"ellipsis",color:"rgb(255,255,255)"},copyCollected:{position:"absolute",color:"rgb(0,0,0)",fontSize:24,opacity:.5,bottom:0,right:0,fontWeight:"700"},couponCode:{height:38,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,lineHeight:37,fontSize:24,fontWeight:"700",color:"rgba(0,0,0,0.9)",textAlign:"center",backgroundColor:"rgb(255,255,255)",borderWidth:1,borderStyle:"dashed",borderColor:"rgb(127,121,114)",borderRadius:4},privateImg:{width:248,height:62,position:"absolute",right:0}}},function(module,exports,e){var t=e(9),r=e(10),o=e(24),n=t.extend({attrs:{siteFormat:/^[a-z]{3}(_[a-z]{1})?$/,x_localeFormat:/^[a-z]{2}_[A-Z]{2}$/,s_localeFormat:/^[a-z]{2}_[A-Z]{2}$/,b_localeFormat:/^[a-z]{2}_[A-Z]{2}$/,c_tpFormat:/^[A-Z]{3}$/,regionFormat:/^[A-Z]{2,3}$/,provinceFormat:/^[0-9]{18}$/,cityFormat:/^[0-9]{18}$/,siFormat:/^(glo|rus|bra|esp|idn|fra|deu|ita)$/,signFormat:/^(y|n)$/,x_userFormat:/^.*$/,issFormat:/^(y)$/,isbFormat:/^(y)$/,ispmFormat:/^(y)$/,isksFormat:/^(y)$/,isgclFormat:/^(y)$/,reg_verFormat:/^(new|old)$/,x_lFormat:/^[01]{1}$/,ber_lFormat:/^A\d$/,zero_orderFormat:/^(y)$/,ae_u_p_sFormat:/^[012]{1}$/,ups_u_tFormat:/^[0-9]{13,}$/},_setcookie:function(e,t,o){if(!this.validate(t,o))return!1;var n=r.get(e,{domain:"aliexpress.com",path:"/",raw:!0})||"";n=new RegExp("(.*&?"+t+"=)(.*?)(&.*|$)").test(n)?RegExp.$1+o+RegExp.$3:(n?n+"&":"")+t+"="+o,r.set(e,n,{domain:"aliexpress.com",path:"/",expires:3650,raw:!0})},_getCookie:function(e,t){var o=r.get(e,{domain:"aliexpress.com",path:"/",raw:!0})||"",n=new RegExp("(.*&?"+t+"=)(.*?)(&.*|$)");o.match(n);var i=RegExp.$2;return n.test(o)&&this.validate(t,i)?i:""},validate:function(e,t){return!/(&|=)/.test(t)&&!!(t&&this.get(e+"Format")&&this.get(e+"Format").test(t))},getMSite:function(e,t){var o=r.get(e,{domain:"m.aliexpress.com",path:"/",raw:!0})||"",n=new RegExp("(.*&?"+t+"=)(.*?)(&.*|$)");o.match(n);var i=RegExp.$2;return n.test(o)&&this.validate(t,i)?i:""},setSite:function(e){this._setcookie("aep_usuc_f","site",e)},getSite:function(){return this._getCookie("aep_usuc_f","site")},getZeroOrder:function(){return this._getCookie("xman_us_f","zero_order")},isZeroOrderUser:function(){return!("y"!==this.getZeroOrder())},setRegion:function(e){this._setcookie("aep_usuc_f","region",e)},getRegion:function(){return this._getCookie("aep_usuc_f","region")},setProvince:function(e){this._setcookie("aep_usuc_f","province",e)},getProvince:function(){return this._getCookie("aep_usuc_f","province")},setCity:function(e){this._setcookie("aep_usuc_f","city",e)},getCity:function(){return this._getCookie("aep_usuc_f","city")},setCurrency:function(e){this._setcookie("aep_usuc_f","c_tp",e)},getCurrency:function(){return this._getCookie("aep_usuc_f","c_tp")},setLocale:function(e){this._setcookie("xman_us_f","x_locale",e)},getLocale:function(){return this._getCookie("xman_us_f","x_locale")},setSellerLocale:function(e){r.set("intl_locale",e,{domain:"aliexpress.com",path:"/",expires:365,raw:!0}),this.setLocale(e),this._setcookie("aep_usuc_f","s_locale",e)},getSellerLocale:function(){return this._getCookie("aep_usuc_f","s_locale")},setBuyerLocale:function(e){this.setLocale(e),this._setcookie("aep_usuc_f","b_locale",e)},getBuyerLocale:function(){return this._getCookie("aep_usuc_f","b_locale")},getSign:function(){return this._getCookie("xman_us_t","sign")},isLoggedIn:function(){return!("y"!=this.getSign())},getIss:function(){return this._getCookie("aep_usuc_f","iss")},isSeller:function(){return!("y"!==this.getIss())},getIsb:function(){return this._getCookie("aep_usuc_f","isb")},isBuyer:function(){return!("y"!==this.getIsb())},getIsks:function(){return this._getCookie("aep_usuc_f","isks")},isKaSeller:function(){return!("y"!==this.getIsks())},getIsgcl:function(){return this._getCookie("aep_usuc_f","isgcl")},isGreenChannel:function(){return!("y"!==this.getIsgcl())},getIspm:function(){return this._getCookie("aep_usuc_f","ispm")},isPremiumMember:function(){return!("y"!==this.getIspm())},getIsfm:function(){return this._getCookie("aep_usuc_f","isfm")},isFreeMember:function(){return!("y"!==this.getIsfm())},getRegVer:function(){return this._getCookie("aep_usuc_f","reg_ver")},getOversea:function(){return this._getCookie("xman_us_f","x_l")},isOversea:function(){return"1"!==this.getOversea()},_getXUserRaw:function(){return this._getCookie("xman_us_f","x_user")},getXUserObj:function(){var e={country:"",firstName:"",lastName:"",memberSeq:""},t=(this._getXUserRaw()||"").split("|");return t.length>=5&&(e.country=t[0],e.firstName=t[1].replace(/</g,"&lt;").replace(/>/g,"&gt;"),e.lastName=t[2].replace(/</g,"&lt;").replace(/>/g,"&gt;"),e.memberSeq=t[4]),e},isNewUser:function(){return!(""!==this.getXUserObj().memberSeq)},setHistory:function(e){e&&o.logProduct({id:e})},getHistory:function(){return o.getProducts()},setAETest:function(){},getAETest:function(){return""},getBerL:function(){return this._getCookie("aep_usuc_t","ber_l")},getAeUps:function(){return this._getCookie("aep_usuc_f","ae_u_p_s")},setAeUps:function(e){return this._setcookie("aep_usuc_f","ae_u_p_s",e)},getAeUpsTime:function(){return this._getCookie("aep_usuc_f","ups_u_t")},setAeUpsTime:function(e){return this._setcookie("aep_usuc_f","ups_u_t",e)}});module.exports=new n},function(module,exports){function e(t){if(!(this instanceof e)&&u(t))return r(t)}function t(t){var r,o;for(r in t)o=t[r],e.Mutators.hasOwnProperty(r)?e.Mutators[r].call(this,o):this.prototype[r]=o}function r(r){return r.extend=e.extend,r.implement=t,r}function o(){}e.create=function(o,n){function a(){o.apply(this,arguments),this.constructor===a&&this.initialize&&this.initialize.apply(this,arguments)}return u(o)||(n=o,o=null),n||(n={}),o||(o=n.Extends||e),n.Extends=o,o!==e&&i(a,o,o.StaticsWhiteList),t.call(a,n),r(a)},e.extend=function(t){return t||(t={}),t.Extends=this,e.create(t)},e.Mutators={Extends:function(e){var t=this.prototype,r=n(e.prototype);i(r,t),r.constructor=this,this.prototype=r,this.superclass=e.prototype},Implements:function(e){s(e)||(e=[e]);for(var t,r=this.prototype;t=e.shift();)i(r,t.prototype||t)},Statics:function(e){i(this,e)}};var n=Object.__proto__?function(e){return{__proto__:e}}:function(e){return o.prototype=e,new o};function i(e,t,r){for(var o in t)if(t.hasOwnProperty(o)){if(r&&-1===l(r,o))continue;"prototype"!==o&&(e[o]=t[o])}}var a=Object.prototype.toString,s=Array.isArray||function(e){return"[object Array]"===a.call(e)},u=function(e){return"[object Function]"===a.call(e)},l=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var r=0,o=e.length;r<o;r++)if(e[r]===t)return r;return-1};module.exports=e},function(module,exports){var e=/\s+/;function t(){}t.prototype.on=function(t,r,o){var n,i;if(!r)return this;for(n=this.__events||(this.__events={}),t=t.split(e);i=t.shift();)(n[i]||(n[i]=[])).push(r,o);return this},t.prototype.once=function(e,t,r){var o=this,n=function(){o.off(e,n),t.apply(this,arguments)};this.on(e,n,r)},t.prototype.off=function(t,o,n){var i,a,s,u;if(!(i=this.__events))return this;if(!(t||o||n))return delete this.__events,this;for(t=t?t.split(e):r(i);a=t.shift();)if(s=i[a]){if(!o&&!n){delete i[a];continue}for(u=s.length-2;u>=0;u-=2)o&&s[u]!==o||n&&s[u+1]!==n||s.splice(u,2)}return this},t.prototype.trigger=function(t){var r,n,i,a,s,u,l=[],c=!0;if(!(r=this.__events))return this;for(t=t.split(e),s=1,u=arguments.length;s<u;s++)l[s-1]=arguments[s];for(;n=t.shift();)(i=r.all)&&(i=i.slice()),(a=r[n])&&(a=a.slice()),c=o(a,l,this)&&c,c=o(i,[n].concat(l),this)&&c;return c},t.prototype.emit=t.prototype.trigger,t.mixTo=function(e){var r;r=e,e="[object Function]"===Object.prototype.toString.call(r)?e.prototype:e;var o=t.prototype;for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])};var r=Object.keys;function o(e,t,r){var o=!0;if(e){var n=0,i=e.length,a=t[0],s=t[1],u=t[2];switch(t.length){case 0:for(;n<i;n+=2)o=!1!==e[n].call(e[n+1]||r)&&o;break;case 1:for(;n<i;n+=2)o=!1!==e[n].call(e[n+1]||r,a)&&o;break;case 2:for(;n<i;n+=2)o=!1!==e[n].call(e[n+1]||r,a,s)&&o;break;case 3:for(;n<i;n+=2)o=!1!==e[n].call(e[n+1]||r,a,s,u)&&o;break;default:for(;n<i;n+=2)o=!1!==e[n].apply(e[n+1]||r,t)&&o}}return o}r||(r=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}),module.exports=t},function(module,exports){var e=/\s+/;function t(t,n,i,a){for(var s,u=n.split(e);s=u.shift();)r(this,s).__isAspected||o.call(this,s),this.on(t+":"+s,i,a);return this}function r(e,t){var r=e[t];if(!r)throw new Error("Invalid method name: "+t);return r}function o(e){var t=this[e];this[e]=function(){var r=Array.prototype.slice.call(arguments),o=["before:"+e].concat(r);if(!1!==this.trigger.apply(this,o)){var n=t.apply(this,arguments),i=["after:"+e,n].concat(r);return this.trigger.apply(this,i),n}},this[e].__isAspected=!0}exports.before=function(e,r,o){return t.call(this,"before",e,r,o)},exports.after=function(e,r,o){return t.call(this,"after",e,r,o)}},function(module,exports){var e,t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=Object.prototype.toString,o=Object.prototype.hasOwnProperty;!function(){function t(){this.x=1}var r=[];for(var o in t.prototype={valueOf:1,y:1},new t)r.push(o);e="x"!==r[0]}();var n=Array.isArray||function(e){return"[object Array]"===r.call(e)};function i(e){return"[object String]"===r.call(e)}function a(e){return null!=e&&e==e.window}var s=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:"object"==t("test".__proto__)?function(e){return e.__proto__}:function(){return!1};function u(t){if(!t||"[object Object]"!==r.call(t)||t.nodeType||a(t))return!1;var n=s(t),i=Function.prototype.toString,u=i.call(Object);if(null===n)return!0;if(!1===n){if(e)for(var l in t)return o.call(t,l);for(l in t);return null==l||o.call(t,l)}var c=o.call(n,"constructor")&&n.constructor;return"function"==typeof c&&c instanceof c&&i.call(c)==u}function l(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||a(e)||!e.hasOwnProperty)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function c(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=p(t[r],e[r]));return e}function p(e,t){return n(e)?e=e.slice():u(e)&&(u(t)||(t={}),e=c(t,e)),e}var f=Object.keys;function g(e,t,r,o){for(var n,i=0,a=e.length;i<a;i++)n=e[i],r.hasOwnProperty(n)&&(t[n]=o?t.get(n):r[n])}f||(f=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t});var d=/^(on|before|after)([A-Z].*)$/,m=/^(Change)?([A-Z])(.*)/;function h(e){var t=e.match(m),r=t[1]?"change:":"";return r+=t[2].toLowerCase()+t[3]}var y=["value","getter","setter","readOnly"];function v(e,t){var r={};for(var o in e){var n=e[o];!t&&u(n)&&b(n,y)?r[o]=n:r[o]={value:n}}return r}var x=["setter","getter","readOnly"];function _(e,t,r){var o,n,i;for(o in t)if(t.hasOwnProperty(o)){if(n=t[o],(i=e[o])||(i=e[o]={}),void 0!==n.value&&(i.value=p(n.value,i.value)),r)continue;for(var a in x){var s=x[a];void 0!==n[s]&&(i[s]=n[s])}}return e}function b(e,t){for(var r=0,o=t.length;r<o;r++)if(e.hasOwnProperty(t[r]))return!0;return!1}function w(e){return null==e||(i(e)||n(e))&&0===e.length||l(e)}function C(e,o){if(e===o)return!0;if(w(e)&&w(o))return!0;var n=r.call(e);if(n!=r.call(o))return!1;switch(n){case"[object String]":return e==o+"";case"[object Number]":return e==+e?0==e?1/e==1/o:e==+o:o!=+o;case"[object Date]":case"[object Boolean]":return+e==+o;case"[object RegExp]":return e.source==o.source&&e.global==o.global&&e.multiline==o.multiline&&e.ignoreCase==o.ignoreCase;case"[object Array]":var i=e.toString(),a=o.toString();return-1===i.indexOf("[object")&&-1===a.indexOf("[object")&&i===a}if("object"!=(void 0===e?"undefined":t(e))||"object"!=(void 0===o?"undefined":t(o)))return!1;if(u(e)&&u(o)){if(!C(f(e),f(o)))return!1;for(var s in e)if(e[s]!==o[s])return!1;return!0}return!1}exports._isPlainObject=u,exports.initAttrs=function(e){var t=this.attrs={},o=this.propsInAttrs||[];(function(e,t,r){for(var o=[],n=t.constructor.prototype;n;)n.hasOwnProperty("attrs")||(n.attrs={}),g(r,n.attrs,n),l(n.attrs)||o.unshift(n.attrs),n=n.constructor.superclass;for(var i=0,a=o.length;i<a;i++)_(e,v(o[i]))})(t,this,o),e&&function(e,t){_(e,v(t,!0),!0)}(t,e),function(e,t,r){var o={silent:!0};for(var n in e.__initializingAttrs=!0,r)r.hasOwnProperty(n)&&t[n].setter&&e.set(n,r[n],o);delete e.__initializingAttrs}(this,t,e),function(e,t){for(var o in t)if(t.hasOwnProperty(o)){var n,i=t[o].value;a=i,"[object Function]"===r.call(a)&&(n=o.match(d))&&(e[n[1]](h(n[2]),i),delete t[o])}var a}(this,t),g(o,this,t,!0)},exports.get=function(e){var t=this.attrs[e]||{},r=t.value;return t.getter?t.getter.call(this,r,e):r},exports.set=function(e,t,r){var o={};i(e)?o[e]=t:(o=e,r=t),r||(r={});var n=r.silent,a=r.override,s=this.attrs,l=this.__changedAttrs||(this.__changedAttrs={});for(e in o)if(o.hasOwnProperty(e)){var p=s[e]||(s[e]={});if(t=o[e],p.readOnly)throw new Error("This attribute is readOnly: "+e);p.setter&&(t=p.setter.call(this,t,e));var f=this.get(e);!a&&u(f)&&u(t)&&(t=c(c({},f),t)),s[e].value=t,this.__initializingAttrs||C(f,t)||(n?l[e]=[t,f]:this.trigger("change:"+e,t,f,e))}return this},exports.change=function(){var e=this.__changedAttrs;if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];this.trigger("change:"+t,r[0],r[1],t)}delete this.__changedAttrs}return this}},function(module,exports,e){var t=e(9),r=e(10),o=t.extend({attrs:{keywordsSize:{value:8},productsSize:{value:8}},groups:{},initialize:function(){this.refresh()},getKeywords:function(e){if(!this.groups||!this.groups.keywords)return[];var t=(e=e||{}).limit||0;return this._sliceArray(this.groups.keywords,t).slice(0)},getProducts:function(e){if(!this.groups||!this.groups.product_selloffer)return[];for(var t,r=(e=e||{}).limit||0,o=this._sliceArray(this.groups.product_selloffer,r),n=[],i=0,a=o.length;i<a;i++)t=o[i].replace(/^http(s)?:\/\/.*\/(\d+_)?|\.html.*$/gi,""),/^\d+$/.test(t)&&n.push(t);return n},logProduct:function(e){if(e&&e.id){var t=this._addItem({array:this.getProducts(),item:e.id,maxSize:this.get("productsSize")}),o=this._buildWholeCookie({keywordArray:this.getKeywords(),productArray:t});r.set("aep_history",o,{domain:"aliexpress.com",path:"/",expires:365}),this.refresh()}},refresh:function(){this.groups=this._parseGroups()},_buildWholeCookie:function(e){var t=e.keywordArray||[],r=e.productArray||[];return this._buildGroup({group:"keywords",array:t.reverse()})+"\n\n"+this._buildGroup({group:"product_selloffer",array:r.reverse()})},_buildGroup:function(e){var t=e.group||"",r=e.array||[];return!t||t.length<=0?"":t+"^\n"+t+"\t"+r.join("\t")},_addItem:function(e){var t=e.array||[],r=e.item||"",o=e.maxSize||"";if(!r||r.length<=0)return t;var n=t.slice(0);return n=n.reverse(),this._appendToArray(r,n),n=n.reverse().splice(0,o)},_appendToArray:function(e,t){if(Array.isArray(t)){var r=t.indexOf(e);r>=0&&t.splice(r,1),t.push(e)}},_sliceArray:function(e,t){return t>0?e.splice(0,t):e},_parseGroups:function(){var e={},t=r.get("aep_history",{domain:"aliexpress.com",path:"/"});if(t)for(var o=t.split("\n\n"),n=0,i=o.length;n<i;n++){var a=o[n].split("^\n"),s=a[0],u=a[1],l=this._parseGroupContent(s,u);e[s]=l}return e},_parseGroupContent:function(e,t){if(!t||0===t.length)return[];var r=t.indexOf(e);r>=0&&(t=t.substring(r+e.length+"\t".length));var o=t.split("\t");return o=o.reverse(),o=this._uniqueArray(o)},_uniqueArray:function(e){for(var t=e,r=1;r<t.length;r++)t[r]===t[r-1]&&t.splice(r--,1);return t}});module.exports=new o},function(module,exports){module.exports={wrapper:{width:750,height:90,backgroundColor:"rgb(255,255,255)",display:"flex",flexDirection:"row",justifyContent:"space-between",paddingLeft:32,paddingRight:32},container:{width:750,height:90,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},loading:{margin:"auto"},title:{fontFamily:"OpenSans",fontSize:28,color:"rgb(0,0,0)",lineHeight:42,marginTop:24,marginBottom:24},iconGroup:{width:236,display:"flex",flexDirection:"row-reverse"},pic:{width:60,height:36,marginRight:12,marginTop:27,marginBottom:27},enter:{width:16,height:29,marginTop:30,marginBottom:30,marginLeft:4},defaultImage:{width:750},couponWrapper:{display:"flex",width:750,backgroundColor:"rgb(255,255,255)",paddingBottom:8},couponTitleWrapper:{display:"flex",justifyContent:"space-between",flexWrap:"nowrap",flexDirection:"row",paddingTop:24,paddingRight:24,paddingBottom:16,paddingLeft:24},couponTitle:{fontFamily:"OpenSans-ExtraBold",fontWeight:"900",fontSize:32,color:"rgb(0,0,0)"},viewMore:{height:40,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundImage:"linear-gradient(to right, #FF640E, #FF3000)",borderRadius:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16},viewMoreText:{fontSize:24,lineHeight:40,color:"rgb(255,255,255)",fontWeight:"700",textAlign:"center",alignItems:"center",justifyContent:"center",fontFamily:"OpenSans"},nextIcon:{width:24,height:20},getNextIcon:{width:40,height:41}}},function(module,exports){module.exports=require("@weex-module/aeAbTest")},function(module,exports,e){Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r=function(){function e(e,t){for(var r,o=0;o<t.length;o++)(r=t[o]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),o=e(1),n=g(e(2)),i=g(e(3)),a=g(e(4)),s=e(0),u=(e(5),g(e(11))),l=g(e(7)),c=g(e(16)),p=g(e(8)),f=g(e(25));function g(e){return e&&e.__esModule?e:{default:e}}var d={autoWebp:!1,autoScaling:!1,autoCompress:!1,autoReplaceDomain:!1},m=function(g){function m(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,r));return o.getMockData=function(){fetch("./data.json").then(function(e){return e.json()}).then(function(e){var t=e.mobileSellerCouponWrapInfo;o.setState({couponList:t&&t.sellerCouponList,showNoDataStatus:!0,showDataStatus:!0})}).catch(function(e){console.error(e)})},o.getList=function(){var e=o.state,r=e.gdc,n=e.mds,i=r.sellerId,a=void 0===i?"":i,u=r.locale,l=void 0===u?"en_US":u,c=r.currency,p=void 0===c?"USD":c,f=r.country,g=void 0===f?"US":f,d=n.moduleData,m=void 0===d?{}:d,h={};if(s.isWeb&&(h={_lang:l,_currency:p}),"custom"===m.shopSignSelected&&m.shopCouponDefine&&m.shopCouponDefine.length>0)o.getShowByActivityId(a,m.shopCouponDefine,h,g);else{var y=t({itemClusters:JSON.stringify([{seller:{id:a}}]),returnAsac:!0,returnEncryptId:!1,appType:s.isWeex?6:4,displayScenes:JSON.stringify([{scene:"common",subScene:"common"}]),checkRuleOptions:JSON.stringify({checkUnAcquirableCoupon:!1,shipTo:g}),bizIdentity:"shop",sourceChannel:"shop_homepage"},h);o.pageUtils.Mtop.request({api:"mtop.alibaba.ae.ump.display.business.client.show4MultiScenes",v:"1.0",data:y,dataType:"originaljsonp"},function(e){if(e&&e.data&&e.data.module&&e.data.module.shopCampaignClusterMap){var t=e.data.module.shopCampaignClusterMap,r=[];Object.keys(t).forEach(function(e){return r=t[e]}),r=o.getNewData(r.campaigns||[]),o.setState({couponList:r,showDataStatus:!0})}},function(e){console.error(JSON.stringify(e))})}},o.getShowByActivityId=function(e,r,n,i){var a=t({itemCluster:JSON.stringify({seller:{id:e}}),activityIds:r,bizIdentity:"shop",sourceChannel:"shop_homepage",returnAsac:!0,appType:s.isWeex?6:4},n);o.pageUtils.Mtop.request({api:"mtop.alibaba.ae.ump.display.business.client.showById4All",v:"1.0",data:a,dataType:"originaljsonp"},function(e){if(e&&e.data&&e.data.module&&e.data.module.campaigns){var t=e.data.module.campaigns||[];t=o.getSortNewList(t,r,i),t=o.getNewData(t),o.setState({couponList:t,showDataStatus:!0})}},function(e){console.error(JSON.stringify(e))})},o.getSortNewList=function(e,t,r){var o=[];return t.split(",").forEach(function(t){e.forEach(function(e){if(e.campaignId+""==t+""){var n=(new Date).getTime(),i=(e.effectiveTime&&e.effectiveTime.endTimeTimestamp)>n,a=(e.effectiveTime&&e.effectiveTime.startTimeTimestamp)>n,s=e.campaignDetails&&e.campaignDetails[0]&&e.campaignDetails[0].conditions,u=null,l=[];s&&s.map(function(e){"b_countryRangeType"===e.operationKey&&(u=e.countryRangeType),"ae_countryList"===e.operationKey&&(l=e.countries)});var c=!0;u&&"shipTo"===u?c=-1!==l.indexOf(r):"notin_shipTo"===u&&(c=-1===l.indexOf(r)),i&&!a&&c&&o.push(e)}})}),o},o.goTargetUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=o.props,n=r.mds,i=void 0===n?{}:n,a=r.pageUtils,s=void 0===a?{}:a,u={url:e,nid:t||0,widgetId:i.widgetId,moduleName:i.moduleName};"function"==typeof s.goTargetUrl&&s.goTargetUrl(u)},o.aeAbTestCallBack=function(e){var t=o.state.gdc;if("true"===e||!0===e){var r="https://m.aliexpress.com/app/uni_promotion.htm?sellerId="+t.sellerId+"&scene=shop&showNiceCoupon=true&usingNewCouponApi=true";o.goTargetUrl(r,0)}else o.goTargetUrl("aecmd://getCoupon?sellerAdminSeq="+t.sellerAdminSeq+"&_login=true&scene=Store",0)},o.onPressHandler=function(){var t=o.state,r=t.mds,n=void 0===r?{}:r,i=t.gdc,a=i.translate,u=void 0===a?{}:a,c=i.translation,f=(void 0===c?{}:c)["module.shop.ShopPromotionWindowTitle"]||u["module.shop.ShopPromotionWindowTitle"]||"Discounts & Coupons";if(s.isWeex)if(l.default.sendClickUT(n.moduleName,"","","",n.moduleName+"ViewMore",""),(s.isWeex&&e(26)).valueForComponent){var g="https://m.aliexpress.com/app/uni_promotion.htm?sellerId="+i.sellerId+"&scene=shop&showNiceCoupon=true&usingNewCouponApi=true";o.goTargetUrl(g,0)}else o.goTargetUrl("aecmd://getCoupon?sellerAdminSeq="+i.sellerAdminSeq+"&_login=true&scene=Store",0);else window.MarketingDrawerDialog.openMarketingDrawer({title:f,requestParams:{scene:"shop_pc",sellerId:i.sellerId},scene:"shop",drawerParams:{style:{minHeight:"90vh"}},needAssign:!0,needCode:!0,isM:!0,awsc:!0,onAssign:function(e){var t=e||{},r=t.success,o=t.message;p.default.show(r?o:o||"Oops, something went wrong. Please try again.")}})},o.updateCouponData=function(e){"isLogin"===e?o.getList():o.setState({couponList:e})},o.getNewData=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(function(e){return 1==+(e.bizExtension&&e.bizExtension.status)});return e&&e.map(function(e){var t={};return e.tips&&e.tips.forEach(function(e){t[e.key]=e.tips}),e.newTips=t,e})},o.pageUtils=r.pageUtils,o.state={showDataStatus:!1,showNoDataStatus:!0===r.gdc.preView||"true"===r.gdc.preView,data:null,gdc:r.gdc||{},mds:r.mds||{},couponList:[]},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(m,o.Component),r(m,[{key:"componentDidMount",value:function(){this.state.mds.moduleData;this.getList()}},{key:"render",value:function(){var e=this.state,r=e.showDataStatus,s=e.showNoDataStatus,l=this.state,p=l.mds,g=void 0===p?{}:p,m=l.gdc,h=void 0===m?{}:m,y=l.couponList,v=void 0===y?[]:y,x=g.moduleName,_=void 0===x?"":x,b=h.translate,w=void 0===b?{}:b,C=h.translation,O=(void 0===C?{}:C)["module.mobile.shopCoupon.title"]||w["module.mobile.shopCoupon.title"]||"Collect all coupons";if(void 0!==r&&r&&v.length>0){var D=1==h.preView||"true"==h.preView,S={exp_trigger:"",st_page_id:window.dmtrack_pageid,exp_type:_+"_Exposure_Event",exp_attribute:""};return(0,o.createElement)(n.default,{style:t({},f.default.couponWrapper)},(0,o.createElement)(u.default,{gdc:h,mds:g}),(0,o.createElement)(n.default,t({},S,{style:f.default.couponTitleWrapper,onClick:this.onPressHandler}),(0,o.createElement)(i.default,{style:f.default.couponTitle},O),(0,o.createElement)(a.default,t({style:f.default.getNextIcon,resizeMode:"contain"},d,{source:{uri:"https://ae01.alicdn.com/kf/S5eeef3ae85c64d6581c9c99a683230995/64x64.png"},lazyload:!D}))),v&&v.length>0?(0,o.createElement)(c.default,{gdc:h,mds:g,couponList:v,callLayer:this.onPressHandler,updateCouponData:this.updateCouponData,pageUtils:this.pageUtils}):null)}return void 0!==s&&s?(0,o.createElement)(a.default,t({},d,{style:t({},f.default.defaultImage),source:{uri:g.defaultImage},lazyload:!1})):null}}]),m}();exports.default=m,module.exports=exports.default}])});