'.concat($("
").text(i).html(),"
")),n.txtError.html(o),this.changeOperationStatus("error")},e.prototype.showErrorNoteByWording=function(e){var t=this.languageMgr.getWord(e);this.showErrorNote(t)},e.prototype.showErrorNote=function(e){var t=this;this.errorTimeout&&clearTimeout(this.errorTimeout);var r=(0,u.get$Dom)();r.instructionText.text(e),r.instruction.addClass("error"),"embed"===this.showType&&r.embedStatus.addClass("hide"),this.errorTimeout=window.setTimeout(function(){r.instructionText.text(t.instruction),r.instruction.removeClass("error"),"embed"===t.showType&&r.embedStatus.removeClass("hide")},1500)},e.prototype.shakeEls=function(e){(0,d.shakeEl)(this.operationDom,e)},e.prototype.addEmbedTip=function(){this.addHoverDom($("#e_showFB"),"aria-feedback"),this.addHoverDom($("#e_reload"),"aria-refresh"),this.addHoverDom($(".tcaptcha-embed .aged-icon"),"frame-simple"),this.addHoverDom($(".tcaptcha-embed .normal-verify-icon"),"frame-standard")},e.prototype.addHoverDom=function(e,t){var r=this;(0,d.isTouchEventSupported)()||e.on("mouseenter",function(){e.css("border-color","#007AFF"),e.children(".status-normal").removeClass("show"),e.children(".status-hover").addClass("show");var i=document.createElement("div");$(i).text(r.languageMgr.getWord(t)).addClass("hover-tip").appendTo($("body")),e.on("mousemove",function(e){$(i).css({left:"".concat(e.clientX-10,"px"),top:"".concat(e.clientY+20,"px")})}),e.on("mouseleave",function(){e.css("border-color","#999"),e.children(".status-hover").removeClass("show"),e.children(".status-normal").addClass("show"),$(i).remove(),$(i).off("mousemove mouseleave")})})},e}();t.DomManager=g},function(e,t,r){"use strict";t.__esModule=!0,t.CaptchaEls=void 0;var i=r(94),n=r(96),o=r(97);t.CaptchaEls=[{dataCheck:function(e){return!!e.bg_elem_cfg},el:n.BgEl},{dataCheck:function(e){return!!e.fg_elem_list},el:i.DragEl},{dataCheck:function(e){var t;return!!(null===(t=e.bg_elem_cfg)||void 0===t?void 0:t.click_cfg)},el:o.ClickEl}]},function(e,t,r){"use strict";var i,n=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o["return"])&&r.call(o)}finally{if(n)throw n.error}}return a},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n
0)try{for(var k=a(h),T=k.next();!T.done;T=k.next()){var C=T.value,A=this.els["".concat(C.master)],O=this.els["".concat(C.slave)];A&&O&&A.bindSlave(O)}}catch(D){r={error:D}}finally{try{T&&!T.done&&(i=k["return"])&&i.call(k)}finally{if(r)throw r.error}}$.when.apply($,s([],o(y),!1)).then(function(){t()},function(e){t(e)})}else t()}},e.prototype.reInit=function(){for(var e in this.els){if(Object.prototype.hasOwnProperty.call(this.els,e))this.els[e].reInit()}},e.prototype.resize=function(){for(var e in this.els)Object.prototype.hasOwnProperty.call(this.els,e)&&this.els[e].resize(this.getRate())},e.prototype.destroy=function(){for(var e in this.els)Object.prototype.hasOwnProperty.call(this.els,e)&&this.els[e].destroy();this.els={}},e}();t.DragEl=h;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slaves=[],t.startPos=null,t.acting=!1,t.movePoints=[],t.boundEventStartFn=null,t.boundEventMoveFn=null,t.boundEventEndFn=null,t}return n(t,e),t.prototype.init=function(t){var r=this;e.prototype.init.call(this,function(e){e?t(e):(r.option.fgItemData.move_cfg&&(r.addDragCss(),r.initStatusWithRate(r.option.rate),r.bindEvt()),t(null))})},t.prototype.addDragCss=function(){(0,u.setCss)(this.el,{cursor:"pointer"})},t.prototype.initStatusWithRate=function(e){var t=this.option,r=t.fgItemData,i=t.operationSize,n=r.init_pos[0]*e,a=r.init_pos[1]*e;this.initCSSPosition=[n,a],this.curCSSPositoon=[n,a],this.startCSSPosition=[n,a];var s=o(r.size_2d,2),c=s[0],u=s[1],d=[i[0]-c,i[1]-u],l=[d[0]*e,d[1]*e];this.boundary=l},t.prototype.bindEvt=function(){var e=this;this.boundEventStartFn=function(t){var r;null===(r=t.preventDefault)||void 0===r||r.call(t),e.onEventStart(t)},this.boundEventMoveFn=function(t){var r;null===(r=t.preventDefault)||void 0===r||r.call(t),e.onEventMove(t)},this.boundEventEndFn=function(t){e.onEventEnd(t)},this.captcha.userEvent.on(this.el,"mousedown touchstart",this.boundEventStartFn),this.captcha.userEvent.on(this.option.wrapper,"mousemove touchmove",this.boundEventMoveFn),this.captcha.userEvent.on(this.option.wrapper,"mouseup touchend",this.boundEventEndFn)},t.prototype.onEventStart=function(e){var t=(0,d.getPosition)(e);t&&void 0!==(null===t||void 0===t?void 0:t.x)&&void 0!==(null===t||void 0===t?void 0:t.y)?this.startPos||this.acting||(this.startPos=[t.x,t.y],this.startCSSPosition=this.curCSSPositoon):this.captcha.errorHandler.send({errorType:p.ErrorTypes.DY_JS_ERROR,reason:"errorMsg:unable to get touch/drag start pos;errorPos:drag-el/DragItem/onEventStart"})},t.prototype.onEventMove=function(e){if(this.startPos){var t=(0,d.getPosition)(e);if(t&&void 0!==(null===t||void 0===t?void 0:t.x)&&void 0!==(null===t||void 0===t?void 0:t.y)){var r=o(this.startPos,2),i=r[0],n=r[1],a=t.x-i,s=t.y-n;this.onMove([a,s])}}},t.prototype.onEventEnd=function(e){var t,r;if(this.startPos){this.startPos=null,this.endAct();try{for(var i=a(this.slaves),n=i.next();!n.done;n=i.next()){n.value.endAct()}}catch(o){t={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(t)throw t.error}}}},t.prototype.reInit=function(){if(this.initCSSPosition&&this.curCSSPositoon){this.curCSSPositoon=this.initCSSPosition,this.startCSSPosition=this.initCSSPosition;var e=o(this.curCSSPositoon,2),t=e[0],r=e[1];(0,u.setCss)(this.el,{left:"".concat(t,"px"),top:"".concat(r,"px")})}},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.initStatusWithRate(t)},t.prototype.onMove=function(e){var t,r,i,n,c=this.checkBoundary(s([],o(e),!1));this.act(c);try{for(var u=a(this.slaves),d=u.next();!d.done;d=u.next())for(var l=d.value.checkBoundary(c),p=0;pa)&&(u[0]=undefined),(i<0||i>c)&&(u[1]=undefined),u},t}(l.BaseEl)},function(e,t,r){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o["return"])&&r.call(o)}finally{if(n)throw n.error}}return a};t.__esModule=!0,t.BaseEl=void 0;var o=r(39),a=r(0),s=r(57),c=r(3),u=function(){function e(e,t){this.el=null,this.spriteSize=[0,0],this.imgSize=[0,0],this.rate=1,this.index=1,this.captcha=e,this.option=t,this.id=t.fgItemData.id,this.rate=t.rate,t.index&&(this.index=t.index)}return e.prototype.init=function(e){this.createEl(e)},e.prototype.createEl=function(e){var t=this,r=this.option,n=r.wrapper,u=r.fgItemData,d=r.rate,l=r.spriteUrl,p=u.type,f=u.size_2d,h=u.init_pos,m=u.sprite_pos,g=u.img_url;if("slider"===p)this.captcha.asyncAction.action(function(r){if(!r()){var i=t.option.colorScheme,o=document.createElement("div");$(o).addClass("tc-fg-item"),(0,a.setCss)(o,{left:"".concat(h[0]*d,"px"),top:"".concat(h[1]*d,"px"),zIndex:String(t.index)});var u=document.createElement("img");if(u.alt="slider",u.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAcAgMAAABuexVFAAAACVBMVEUAAADCwsL9/f1P0DqbAAAAAXRSTlMAQObYZgAAAB1JREFUGNNjCGVgYGANABKhyMwoEHMBkIgaZWIwAdyJJQnaJRg5AAAAAElFTkSuQmCC",(0,c.isLowIE)()){$(o).addClass("tc-slider-ie"),u.className="tc-slider-bg unselectable";var l=document.createElement("div");l.className="tc-iconfont-btn",l.innerHTML="",(0,a.setCss)(l,{color:i}),o.appendChild(l)}else{$(o).addClass("tc-slider-normal"),(0,a.setCss)(o,{width:"".concat(f[0]*d,"px"),height:"".concat(f[1]*d,"px"),lineHeight:"".concat(f[1]*d,"px"),backgroundColor:i,boxShadow:"0 0 ".concat(10*d,"px ").concat(d,"px rgb(").concat((0,s.hexToRgb)(i)," / 0.5)")}),u.className="tc-slider-bg unselectable",(0,a.setCss)(u,{width:"".concat(f[0]/3.5*d,"px"),height:"".concat(f[0]/3.5*d/10*7,"px")});var p=document.createElement("i");p.className="tc-blank-text",p.innerText=" ",o.appendChild(p)}o.appendChild(u),n.appendChild(o),t.el=o,e(null)}});else if(l&&m)this.captcha.asyncAction.action(function(r){(0,o.loadImg)({id:t.id,src:l,onError:function(){r()||e("reason:load img ".concat(l," fail,pos:base-el/BaseEl/createEl/this.captcha.asyncAction.action/loadImg"))},onSuccess:function(o){if(!r()){var a=[o.width,o.height];t.spriteSize=a;var c=(0,s.getSpriteEl)({data:i(i({spriteSize:a},u),{sprite_pos:m}),rate:d,spriteUrl:l,zIndex:t.index});$(c).addClass("tc-fg-item"),t.el=c,n.appendChild(c),e(null)}}})});else if(g&&h){var v=document.createElement("img");this.el=v,this.captcha.asyncAction.action(function(r){(0,o.loadImg)({id:t.id,src:g+"",el:v,onError:function(){r()||e("reason:load img ".concat(g," fail,pos:base-el/BaseEl/createEl/this.captcha.asyncAction.action/loadImg"))},onSuccess:function(i){if(!r()){var o=i.width,s=i.height;t.imgSize=[o,s],(0,a.setCss)(v,{position:"absolute",width:"".concat(o*d,"px"),height:"".concat(s*d,"px"),left:"".concat(h[0]*d,"px"),top:"".concat(h[1]*d,"px"),zIndex:String(t.index)}),$(v).addClass("tc-fg-item"),n.appendChild(v),e(null)}}})})}else e("\u540e\u53f0\u53c2\u6570\u9519\u8bef")},e.prototype.resize=function(e){this.rate=e,"slider"===this.option.fgItemData.type?this.setSliderStyle(e):(this.setElBgStyle(e),this.setImgStyle(e))},e.prototype.setImgStyle=function(e){var t=this.option.fgItemData,r=t.img_url,i=t.init_pos;if(r&&i&&this.el){var o=n(this.imgSize,2),s=o[0],c=o[1];(0,a.setCss)(this.el,{width:"".concat(s*e,"px"),height:"".concat(c*e,"px"),left:"".concat(i[0]*e,"px"),top:"".concat(i[1]*e,"px")})}},e.prototype.setElBgStyle=function(e){var t=this.option,r=t.fgItemData,n=t.spriteUrl,o=r.sprite_pos;n&&o&&(0,s.setSpriteUrl)({el:this.el,data:i(i({spriteSize:this.spriteSize},r),{sprite_pos:o}),rate:e,spriteUrl:n})},e.prototype.setSliderStyle=function(e){var t=this.option.fgItemData,r=t.type,i=t.size_2d,n=t.init_pos;if("slider"===r&&this.el&&((0,a.setCss)(this.el,{left:"".concat(n[0]*e,"px"),top:"".concat(n[1]*e,"px")}),!(0,c.isLowIE)())){var o=this.option.colorScheme;(0,a.setCss)(this.el,{width:"".concat(i[0]*e,"px"),height:"".concat(i[1]*e,"px"),lineHeight:"".concat(i[1]*e,"px"),boxShadow:"0 0 ".concat(10*e,"px ").concat(e,"px rgb(").concat((0,s.hexToRgb)(o)," / 0.5)")}),(0,a.setCss)($(this.el).children("img")[0],{width:"".concat(i[0]/3.5*e,"px"),height:"".concat(i[0]/3.5*e/10*7,"px")})}},e}();t.BaseEl=u},function(e,t,r){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};t.__esModule=!0,t.ClickEl=void 0;var n=r(0),o=r(43),a=function(){function e(){this.marks=[],this.markClassName="tc-click-mark",this.markSize=24,this.standardWidth=360,this.getRate=function(){return 1}}return e.prototype.init=function(e,t){var r=this;try{this.clickCfg=e.showInfo.bg_elem_cfg.click_cfg,this.captcha=e.captcha,this.bgSize=e.bgSize,this.targetNode=$(e.operationDom),this.targetNode.addClass("pointer"),this.getRate=function(){return Number(r.targetNode.css("width").slice(0,-2))/r.standardWidth},this.captcha.userEvent.on("click",function(e){var t,n,a=e.target,s=r.getMarkIndex(a);if(-1!==s){try{for(var c=i(r.marks.splice(s,r.marks.length-s)),u=c.next();!u.done;u=c.next()){var d=u.value;$(d).remove()}}catch(p){t={error:p}}finally{try{u&&!u.done&&(n=c["return"])&&n.call(c)}finally{if(t)throw t.error}}r.addData()}else if(a===(0,o.get$Dom)().slideBg[0]||a.parentNode===(0,o.get$Dom)().slideBg[0]){var l=void 0;"inc_number"===r.clickCfg.mark_style?l=String(r.marks.length+1):"icon"===r.clickCfg.mark_style||(l=undefined),r.addNewMark(l,e.offsetX,e.offsetY),r.addData()}}),t()}catch(n){t("reason:".concat(n.message,";pos:click-el/ClickEl/init"))}},e.prototype.getMarkIndex=function(e){for(var t=e;t!==this.targetNode[0];){var r=$.inArray(t,this.marks);if(-1!==r)return r;t=t.parentNode}return-1},e.prototype.addNewMark=function(e,t,r){var i,o,a=$("")),s=this.getRate(),c=this.markSize*s;if((0,n.setCss)(a[0],{width:" ".concat(c,"px"),height:" ".concat(c,"px"),border:"".concat(c/10,"px solid #fff"),top:"".concat((r-c/2)/Number(null===(i=this.targetNode.css("height"))||void 0===i?void 0:i.slice(0,-2))*100,"%"),left:"".concat((t-c/2)/Number(null===(o=this.targetNode.css("width"))||void 0===o?void 0:o.slice(0,-2))*100,"%")}),"string"==typeof e){var u=$("").concat(e,"
"));u.attr("unselectable","on"),(0,n.setCss)(u[0],{fontSize:"".concat(c/1.5,"px"),lineHeight:"".concat(c,"px")}),a.append(u)}this.targetNode.append(a),this.marks.push(a[0])},e.prototype.addData=function(){var e,t,r=this.clickCfg.data_type;if(r)try{for(var n=i(r),o=n.next();!o.done;o=n.next()){if("DynAnswerType_POS"===o.value){for(var a=[],s=this.markSize,c=0;c0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o["return"])&&r.call(o)}finally{if(n)throw n.error}}return a},n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n=this.samplingRate)){var e=this.data,t=e.isVisible,r=e.isPreload,i=e.speedList,n={is_visible:t?1:0,is_preload:r?1:0,speed_list:i};(new Image).src="".concat(this.baseURL,"&data=").concat(JSON.stringify(n)),this.data.speedList=[]}},e}();t.Monitor=s},function(e,t,r){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r