(self.webpackChunkmobile_bg_newer=self.webpackChunkmobile_bg_newer||[]).push([[673],{5078:function(e){e.exports={wrapper:"wrapper-37VAF",picture:"picture-do3MV","picture-text":"picture-text-2Alt0","has-error":"has-error-3B7cM",red:"red-14pPF",blue:"blue-30VOA",yellow:"yellow-17lhC",green:"green-4cZ0b","picture-img":"picture-img-1fsu8","red-point":"red-point-1oDPK"}},38184:function(e,t,r){"use strict";r.r(t);r(82586);var n=r(14242),a=r(61877),i=r(74533),o=r(22751),c=r(29659),l=r(45516),s=r(67464),u=r(1007),d=(r(54913),r(4040),r(95853),r(11286)),h=r.n(d),p=r(33514),f=r(32485),m=r.n(f),g=r(88916),v=r.n(g),y=r(34477),x=r(43754),A=r(40230),E=r(65453),w=r(1485),k=r(5078),R=r.n(k);function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var C=E.QT?"onTouchStart":"onMouseDown",D=function(e){function t(e){var r,n,a,c,u,d,f,m;(0,o.A)(this,t),d=this,f=t,m=[e],f=(0,s.A)(f),(u=(0,l.A)(d,b()?Reflect.construct(f,m||[],(0,s.A)(d).constructor):f.apply(d,m))).imgSrc="",u.correctRadius=10,u.imgRef=p.createRef(),u.isSubmiting=!1,u.clickRed=function(e){if(!u.isSubmiting){var t=u.state.locationArr;t.length&&e===t.length-1&&(t.pop(),u.setState({locationArr:t}))}},u.recordLoc=function(e){if(!u.isSubmiting){var t=u.state.locationArr,r=(0,E.Uz)(e),n=r.x,a=r.y,i=u.imgProperty||{},o=i.offsetX,c=i.offsetY;if(o&&c){var l=n-o,s=a-c;if(!(l=u.redDotMaxX||s>=u.redDotMaxY||u.state.hasError))if(!t.length||t.length&&t.length=u.textCount){var d=u.props.t;(0,A.pq)(d("picture.tip",{val:u.textCount}))}}}},u.handleValid=(0,i.A)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u.isSubmiting=!0,t=u.state.locationArr,e.prev=2,e.next=5,u.props.onValid(JSON.stringify(t));case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:case"end":return e.stop()}}),e,null,[[2,7]])}))),u.handleImageError=function(){var e;((0,y.fL)(new Error("verification-dialog: picture-imgError")),void 0===u.imageLoad)&&(u.imageLoad=!1,null===(e=u.props)||void 0===e||e.refreshCaptcha({cdd:!0}))},u.handleImageLoad=function(){u.imageLoad=!0,v().setImageClick({captcha:"captchaImg"}),u.correctRadius=Math.min(Math.round(window.innerWidth/375*12),22);var e=u.imgRef.current||{};u.redDotMaxX=(e.width||e.offsetWidth)-u.correctRadius,u.redDotMaxY=(e.height||e.offsetHeight)-u.correctRadius;var t=e.getBoundingClientRect();u.imgProperty={offsetX:Math.round(t.left),offsetY:Math.round(t.top)}};var g=null!==(r=null===(n=e.captchatData)||void 0===n?void 0:n.pictures)&&void 0!==r?r:[],w=null!==(a=null===(c=e.captchatData)||void 0===c?void 0:c.semantics)&&void 0!==a?a:[];return u.state={locationArr:[],hasError:!1},u.textCount=w[1]?+(0,x.D)(v().decode(w[1])):0,u.imgSrc=(0,E.Ri)({imageSrc:g[0],positions:w[2],partialEncryption:e.partialEncryption}),u}return(0,u.A)(t,e),(0,c.A)(t,[{key:"redDom",value:function(){var e=this,t=this.state.locationArr;return t.length?t.map((function(t,r){var i=(0,a.A)({},C,(function(){return e.clickRed(r)}));return p.createElement("div",(0,n.A)({className:R()["red-point"],key:r,style:{top:t.y-10,left:t.x-10}},i),r+1)})):null}},{key:"renderText",value:function(e){return e.match(/(@(.*?)@|#(.*?)#|\$(.*?)\$|&(.*?)&|[^@#\$&]+)/gi).map((function(e,t){var r=e.slice(0,1),n=e.slice(1,e.length-1);switch(r){case"@":return p.createElement("i",{key:t,className:R().red},n);case"#":return p.createElement("i",{key:t,className:R().blue},n);case"$":return p.createElement("i",{key:t,className:R().yellow},n);case"&":return p.createElement("i",{key:t,className:R().green},n);default:return e}}))}},{key:"render",value:function(){var e=((this.props||{}).captchatData||{}).semantics,t=m()(R()["picture-text"],(0,a.A)({},R()["has-error"],this.state.hasError)),r=(0,a.A)({},C,this.recordLoc);return p.createElement("div",{className:R().wrapper},p.createElement("div",{className:R().picture},p.createElement("img",(0,n.A)({ref:this.imgRef,className:R()["picture-img"],id:"captchaImg",src:this.imgSrc,onLoad:this.handleImageLoad,onError:this.handleImageError},r)),this.redDom(),p.createElement(w.A,null)),(null==e?void 0:e.length)>=1&&p.createElement("div",{className:t},this.renderText((0,x.D)(v().decode(e[0])))))}}])}(p.Component);t.default=D}}]); //# sourceMappingURL=http://temudebug.com/sourcemaps/assets/js/picture_verify_a86f6c03ca06d2e5af17.js.map