!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).RealNameAuthSdk=e()}(this,(function(){"use strict";var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};var e=function(){return(e=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]-1&&t.indexOf("AP")>-1}function a(t){return t=t||window.navigator.userAgent,/AliApp\s?\(BIUBIU\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t)}function u(t){return t=t||window.navigator.userAgent,/AliApp\s?\(BOOM\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t)}function l(){var t="undefined"!=typeof window?window.navigator.userAgent:"";return{isWindVane:/AliApp\s?\([\S]*\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t),isJiaoyimao:/AliApp\s?\(JYM(-APP)?\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t),isAndroid:/Android/i.test(t),isiOS:/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(t),isNG:/ninegameclient/i.test(t),isNgWindVane:/AliApp\s?\(NGGAMEMANAGER\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t),isNGSdk:/ucsdk/i.test(t),isNGAndroid:/ninegameclient\/android/i.test(t),isNGiOS:/ninegameclient\/ios/i.test(t),isBiubiuWindVane:/AliApp\s?\(BIUBIU\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t),isBibiWindVane:/AliApp\s?\(BOOM\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t),isUC:/UCBrowser/i.test(t),isWechat:/MicroMessenger/i.test(t),isWeiBo:/WeiBo/i.test(t),isDingTalk:/DingTalk/i.test(t)}}var h,c={jiaoyimao:function(t){return t=t||window.navigator.userAgent,/AliApp\s?\(JYM(-APP)?\/([\d\.]{3,})\)\s{1,}(WindVane\/[\d\.]{2,})?/i.test(t)},biubiu:a,bibi:u};!function(t){t.biubiu="1010100",t.jiaoyimao="1010100",t.jiuyou="999999999",t.dcgift="999999999",t.ppgame="1010100",t.wandoujia="1010100"}(h||(h={}));var d=["xuanchuan.jiaoyimao.com","cloudauth.alibaba.com","aq.9game.cn","uop-appeal-server-jy-pre-aligames.alibaba-inc.com","jiaoyimao.com","9game.cn","mikasa.ackerman","member.alibaba.net","pre-member.aligames.com","member.aligames.com","localhost","uc.cn","api-daily.game.alibaba-inc.com","id-daily.game.alibaba-inc.com","uop-api-pre.9game.cn","uop-api.9game.cn","api.open.uc.cn","id.uc.cn","pre-uop-api.9game.cn",".alibaba-inc.com",".alibaba.net",".alibaba.com","jiaoyimao.cn",".biubiu001.com","biubiu001.com",".gamexi.cn","gamexi.cn",".bibi2022.com","bibi2022.com",".pp.cn","pp.cn"],f={bizArray:["jiaoyimao","jiuyou","lingxi","biubiu","dcgift","ppgame","bibi","wandoujia"],ieuHost:{jiaoyimao:{project:"http://ieu-member12.game.alibaba-inc.com",daily:"http://member.uc.test",pre:"http://pre-member.jiaoyimao.com",prod:"http://member.jiaoyimao.com"},jiuyou:{project:"http://ieu-member12.game.alibaba-inc.com",daily:"http://member-dcgift.alibaba.net",pre:"http://pre-member.aligames.com",prod:"http://member.aligames.com"},dcgift:{local:"http://member-dcgift.alibaba.net",daily:"http://member-dcgift.alibaba.net",pre:"http://pre-member.gamexi.cn",prod:"http://member.gamexi.cn"},biubiu:{project:"http://member-biubiu.alibaba.net",daily:"http://member.alibaba.net",pre:"http://pre-member.biubiu001.com",prod:"http://member.biubiu001.com"},bibi:{project:"http://member-bibi.alibaba.net",daily:"http://member.alibaba.net",pre:"http://pre-member.bibi2022.com",prod:"http://member.bibi2022.com"},base:{project:"http://member.alibaba.net",daily:"http://member.alibaba.net",pre:"http://pre-member.aligames.com",prod:"http://member.aligames.com"}},loggerHost:{daily:"http://ieu-member-log.alibaba.net",pre:"http://pre-member-log.aligames.com",prod:"http://member-log.aligames.com"},pageInApp:c,envArray:["local","daily","project","pre","prod"],thirdPartySiteArray:["ALIPAY"],iframeElementId:{realName:"ieu-member-sdk-realNameAuthPage"}},p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function v(t,e){return t(e={exports:{}},e.exports),e.exports}var m=v((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e={},i={};function n(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function r(t,e){return t&e}function o(t,e){return t|e}function s(t,e){return t^e}function a(t,e){return t&~e}function u(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function l(t){for(var e=0;0!=t;)t&=t-1,++e;return e}!function(){function n(){function t(t){var e,i,n;for(t||(t=8),e=new Array(t),i=[],n=0;256>n;n++)i[n]=n;for(n=0;n0},this.appendInfo=function(t){return this.infos+=t,""},this.getInfos=function(){return this.infos},this.setDebug=function(t){this.debug=t},this.appendDebug=function(t){return this.debugMsg+=t,""},this.isDebug=function(){return this.debug},this.getAllMessages=function(t){var e,n,r,o,s={lf:"\n",clr_mes:!1,verbose:15};for(e in t||(t=s),s)void 0===t[e]&&(t[e]=s[e]);for(o in n="",r="",this.params){switch(o){case"encryptOut":r=i.toByteArray(this.params[o].toString()),r=i.fragment(r.join(),64,t.lf);break;case"key":case"iv":r=i.formatHex(this.params[o],48);break;default:r=i.fragment(this.params[o].toString(),64,t.lf)}n+="

"+o+":

"+r+"

"}return this.debug&&(n+="debug: "+this.debug+t.lf),this.errors.length>0&&1==(1&t.verbose)&&(n+="Errors:"+t.lf+this.errors+t.lf),this.warnings.length>0&&2==(2&t.verbose)&&(n+="Warnings:"+t.lf+this.warnings+t.lf),this.infos.length>0&&4==(4&t.verbose)&&(n+="Infos:"+t.lf+this.infos+t.lf),this.debug&&8==(8&t.verbose)&&(n+="Debug messages:"+t.lf+this.debugMsg+t.lf),t.clr_mes&&(this.errors=this.infos=this.warnings=this.debug=""),n},this.getRandomBytes=function(e){return t(e)}}i.encodeBase64=function(t,e){var n,r,o,s,a,u,l,h,c,d,f;if(t||(t=""),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=[],f="",(l=(h=(e=void 0!==e&&e)?i.encodeUTF8(t):t).length%3)>0)for(;l++<3;)f+="=",h+="\0";for(l=0;l>18,s=63&r>>12,a=63&r>>6,u=63&r,d[l/3]=n.charAt(o)+n.charAt(s)+n.charAt(a)+n.charAt(u);return(c=d.join("")).slice(0,c.length-f.length)+f},i.decodeBase64=function(t,e){var n,r,o,s,a,u,l,h,c,d,f;for(t||(t=""),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=[],c=(e=void 0!==e&&e)?i.decodeUTF8(t):t,f=0;f>>16,o=255&l>>>8,s=255&l,d[f/4]=String.fromCharCode(r,o,s),64==u&&(d[f/4]=String.fromCharCode(r,o)),64==a&&(d[f/4]=String.fromCharCode(r));return h=d.join(""),e?i.decodeUTF8(h):h},i.encodeUTF8=function(t){return t||(t=""),(t=t.replace(/[\u0080-\u07ff]/g,(function(t){var e=t.charCodeAt(0);return String.fromCharCode(192|e>>6,128|63&e)}))).replace(/[\u0800-\uffff]/g,(function(t){var e=t.charCodeAt(0);return String.fromCharCode(224|e>>12,128|63&e>>6,128|63&e)}))},i.decodeUTF8=function(t){return t||(t=""),(t=t.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,(function(t){var e=(31&t.charCodeAt(0))<<6|63&t.charCodeAt(1);return String.fromCharCode(e)}))).replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,(function(t){var e=(15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2);return String.fromCharCode(e)}))},i.convertToHex=function(t){var e,i,n;for(t||(t=""),e="",i="",n=0;n=t.length)return t;for(i||(i="\n"),n="",r=0;r>>32-e}function i(t,e){var i,n,r,o,s;return r=2147483648&t,o=2147483648&e,s=(1073741823&t)+(1073741823&e),(i=1073741824&t)&(n=1073741824&e)?2147483648^s^r^o:i|n?1073741824&s?3221225472^s^r^o:1073741824^s^r^o:s^r^o}function n(t,n,r,o,s,a,u){return t=i(t,i(i(function(t,e,i){return t&e|~t&i}(n,r,o),s),u)),i(e(t,a),n)}function r(t,n,r,o,s,a,u){return t=i(t,i(i(function(t,e,i){return t&i|e&~i}(n,r,o),s),u)),i(e(t,a),n)}function o(t,n,r,o,s,a,u){return t=i(t,i(i(function(t,e,i){return t^e^i}(n,r,o),s),u)),i(e(t,a),n)}function s(t,n,r,o,s,a,u){return t=i(t,i(i(function(t,e,i){return e^(t|~i)}(n,r,o),s),u)),i(e(t,a),n)}function a(t){var e,i="",n="";for(e=0;3>=e;e++)i+=(n="0"+(255&t>>>8*e).toString(16)).substr(n.length-2,2);return i}var u,l,h,c,d,f,p,g,v,m=Array();for(m=function(t){for(var e,i=t.length,n=i+8,r=16*((n-n%64)/64+1),o=Array(r-1),s=0,a=0;i>a;)s=a%4*8,o[e=(a-a%4)/4]=o[e]|t.charCodeAt(a)<>>29,o}(t),f=1732584193,p=4023233417,g=2562383102,v=271733878,u=0;ut;t++)this.ShiftRowTabInv[this.ShiftRowTab[t]]=t;for(this.xtime=new Array(256),t=0;128>t;t++)this.xtime[t]=t<<1,this.xtime[128+t]=27^t<<1},n.AES.prototype.expandKey=function(t){var e,i,n,r,o=t.slice(),s=o.length,a=1;switch(s){case 16:e=176;break;case 24:e=208;break;case 32:e=240;break;default:alert("AESCore.expandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(i=s;e>i;i+=4)for(n=o.slice(i-4,i),0==i%s?(n=new Array(this.SBox[n[1]]^a,this.SBox[n[2]],this.SBox[n[3]],this.SBox[n[0]]),(a<<=1)>=256&&(a^=283)):s>24&&16==i%s&&(n=new Array(this.SBox[n[0]],this.SBox[n[1]],this.SBox[n[2]],this.SBox[n[3]])),r=0;4>r;r++)o[i+r]=o[i+r-s]^n[r];return o},n.AES.prototype.encrypt=function(t,e){var i,n=e.length,r=t.slice();for(this.addRoundKey(r,e.slice(0,16)),i=16;n-16>i;i+=16)this.subBytes(r),this.shiftRows(r),this.mixColumns(r),this.addRoundKey(r,e.slice(i,i+16));return this.subBytes(r),this.shiftRows(r),this.addRoundKey(r,e.slice(i,n)),r},n.AES.prototype.decrypt=function(t,e){var i,n=e.length,r=t.slice();for(this.addRoundKey(r,e.slice(n-16,n)),this.shiftRows(r,1),this.subBytes(r,1),i=n-32;i>=16;i-=16)this.addRoundKey(r,e.slice(i,i+16)),this.mixColumns_Inv(r),this.shiftRows(r,1),this.subBytes(r,1);return this.addRoundKey(r,e.slice(0,16)),r},n.AES.prototype.subBytes=function(t,e){var i,n=void 0===e?this.SBox.slice():this.SBoxInv.slice();for(i=0;16>i;i++)t[i]=n[t[i]]},n.AES.prototype.addRoundKey=function(t,e){for(var i=0;16>i;i++)t[i]^=e[i]},n.AES.prototype.shiftRows=function(t,e){var i,n=void 0===e?this.ShiftRowTab.slice():this.ShiftRowTabInv.slice(),r=(new Array).concat(t);for(i=0;16>i;i++)t[i]=r[n[i]]},n.AES.prototype.mixColumns=function(t){var e,i,n,r,o,s;for(e=0;16>e;e+=4)s=(i=t[e+0])^(n=t[e+1])^(r=t[e+2])^(o=t[e+3]),t[e+0]^=s^this.xtime[i^n],t[e+1]^=s^this.xtime[n^r],t[e+2]^=s^this.xtime[r^o],t[e+3]^=s^this.xtime[o^i]},n.AES.prototype.mixColumns_Inv=function(t){var e,i,n,r,o,s,a,u,l;for(e=0;16>e;e+=4)s=(i=t[e+0])^(n=t[e+1])^(r=t[e+2])^(o=t[e+3]),a=this.xtime[s],u=this.xtime[this.xtime[a^i^r]]^s,l=this.xtime[this.xtime[a^n^o]]^s,t[e+0]^=u^this.xtime[i^n],t[e+1]^=l^this.xtime[n^r],t[e+2]^=u^this.xtime[r^o],t[e+3]^=l^this.xtime[o^i]},n.AES.prototype.xOr_Array=function(t,e){var i,n=Array();for(i=0;it;t++)e[t]=255&n>>>8*t;for(t=0;4>t;t++)e[t+4]=255&r;return e.slice()}),void 0!==n&&void 0!==n.AES&&void 0!==n.MD5&&(n.AES.CBC=function(){this.pidcrypt=new n,this.aes=new n.AES(this.pidcrypt),this.getOutput=function(){return this.pidcrypt.getOutput()},this.getAllMessages=function(t){return this.pidcrypt.getAllMessages(t)},this.isError=function(){return this.pidcrypt.isError()}},n.AES.CBC.prototype.init=function(t,e){var i,n,r,o;for(r in e||(e={}),(i=this.pidcrypt).setDefaults(),n=this.pidcrypt.getParams(),e)n[r]=e[r];o=this.createKeyAndIv({password:t,salt:n.salt,bits:n.nBits}),n.key=o.key,n.iv=o.iv,n.dataOut="",i.setParams(n),this.aes.init()},n.AES.CBC.prototype.initEncrypt=function(t,e,n){this.init(e,n),this.pidcrypt.setParams({dataIn:t,encryptIn:i.toByteArray(t)})},n.AES.CBC.prototype.initDecrypt=function(t,e,n){var r,o,s;n||(n={}),(r=this.pidcrypt).setParams({dataIn:t}),e||r.appendError("pidCrypt.AES.CBC.initFromEncryption: Sorry, can not crypt or decrypt without password.\n"),0!=(o=i.decodeBase64(t)).indexOf("Salted__")&&r.appendError("pidCrypt.AES.CBC.initFromCrypt: Sorry, unknown encryption method.\n"),s=o.substr(8,8),n.salt=i.convertToHex(s),this.init(e,n),o=o.substr(16),r.setParams({decryptIn:i.toByteArray(o)})},n.AES.CBC.prototype.initByValues=function(t,e,i,n){var r={};this.init("",n),r.dataIn=t,r.key=e,r.iv=i,this.pidcrypt.setParams(r)},n.AES.CBC.prototype.getAllMessages=function(t){return this.pidcrypt.getAllMessages(t)},n.AES.CBC.prototype.createKeyAndIv=function(e){var r,o,s,a,u,l,h,c=this.pidcrypt,d={};for(e||(e={}),e.salt||(e.salt=c.getRandomBytes(8),e.salt=i.convertToHex(i.byteArray2String(e.salt)),c.setParams({salt:e.salt})),r=e.password+i.convertFromHex(e.salt),o="",s="",u=0,(a=[])[u++]=r,l=0;"3">l;l++){for(0==l?s=r:(o=i.convertFromHex(s),s=o+=r),h=0;1>h;h++)s=n.MD5(s);a[u++]=s}switch(e.bits){case 128:d.key=a[1],d.iv=a[2];break;case 192:d.key=a[1]+a[2].substr(0,16),d.iv=a[3];break;case 256:d.key=a[1]+a[2],d.iv=a[3];break;default:c.appendError("pidCrypt.AES.CBC.createKeyAndIv: Sorry, only 128, 192 and 256 bits are supported.\nBits("+t(e.bits)+") = "+e.bits)}return d},n.AES.CBC.prototype.encryptRaw=function(t){var e,n,r,o,s,a,u,l,h,c,d,f,p,g,v=this.pidcrypt,m=this.aes,y=v.getParams();for(t||(t=y.encryptIn),v.setParams({encryptIn:t}),y.dataIn||v.setParams({dataIn:t}),e=i.convertFromHex(y.iv),n=y.blockSize-(t.length+1)%y.blockSize,y.A0_PAD&&(t[t.length]=10),r=0;n>r;r++)t[t.length]=n;for(o=Math.floor(y.nBits/8),s=new Array(o),a=i.convertFromHex(y.key),u=0;o>u;u++)s[u]=isNaN(a.charCodeAt(u))?0:a.charCodeAt(u);for(l=m.expandKey(s),h=Math.ceil(t.length/y.blockSize),c=new Array(h),d=[],f=i.toByteArray(e),p=0;h>p;p++)d=t.slice(p*y.blockSize,p*y.blockSize+y.blockSize),f=m.xOr_Array(f,d),f=m.encrypt(f.slice(),l),c[p]=i.byteArray2String(f);return g=c.join(""),v.setParams({dataOut:g,encryptOut:g}),!v.isDebug()&&v.clear&&v.clearParams(),g||""},n.AES.CBC.prototype.encrypt=function(t){var e,n=this.pidcrypt,r=n.getParams();return t||(t=r.dataIn),r.UTF8&&(t=i.encodeUTF8(t)),n.setParams({dataIn:t,encryptIn:i.toByteArray(t)}),e=this.encryptRaw(),i.convertFromHex(r.salt),e=i.encodeBase64(e),n.setParams({dataOut:e}),!n.isDebug()&&n.clear&&n.clearParams(),e||""},n.AES.CBC.prototype.encryptText=function(t,e,i){return this.initEncrypt(t,e,i),this.encrypt()},n.AES.CBC.prototype.decryptRaw=function(t){var e,n,r,o,s,a,u,l,h,c,d,f,p,g,v,m=this.aes,y=this.pidcrypt,b=y.getParams();if(t||(t=b.decryptIn),y.setParams({decryptIn:t}),b.dataIn||y.setParams({dataIn:t}),b.iv.length/2s;s++)r[s]=isNaN(o.charCodeAt(s))?0:o.charCodeAt(s);for(a=m.expandKey(r),u=Math.ceil(t.length/b.blockSize),l=new Array(u.length),h=i.toByteArray(e),c=[],d=[],f=0;u>f;f++)c=t.slice(f*b.blockSize,f*b.blockSize+b.blockSize),d=m.decrypt(c,a),l[f]=i.byteArray2String(m.xOr_Array(h,d)),h=c.slice();return p=l.join(""),y.isDebug()&&y.appendDebug("Padding after decryption:"+i.convertToHex(p)+":"+p.length+"\n"),g=p.charCodeAt(p.length-1),b.A0_PAD?p=p.substr(0,p.length-(g+1)):(v=p.length-(p.length-g),g==p.charCodeAt(p.length-g)&&g==v&&(p=p.substr(0,p.length-g))),y.setParams({dataOut:p,decryptOut:p}),!y.isDebug()&&y.clear&&y.clearParams(),p||""},n.AES.CBC.prototype.decrypt=function(t){var e,n,r=this.pidcrypt,o=r.getParams();return t&&r.setParams({dataIn:t}),o.decryptIn||(0==(e=i.decodeBase64(o.dataIn)).indexOf("Salted__")&&(e=e.substr(16)),r.setParams({decryptIn:i.toByteArray(e)})),n=this.decryptRaw(),o.UTF8&&(n=i.decodeUTF8(n)),r.isDebug()&&r.appendDebug("Removed Padding after decryption:"+i.convertToHex(n)+":"+n.length+"\n"),r.setParams({dataOut:n}),!r.isDebug()&&r.clear&&r.clearParams(),n||""},n.AES.CBC.prototype.decryptText=function(t,e,i){return this.initDecrypt(t,e,i),this.decrypt()}),e.encrypt=function(t,e){var r,o;return r=e=i.convertToHex(e),(o=new n.AES.CBC).initByValues(t,e,r,{nBits:128}),o.encrypt()},e.decrypt=function(t,e){var r;return r=e=i.convertToHex(e),aes=new n.AES.CBC,aes.initByValues(t,e,r,{nBits:128,A0_PAD:!1}),aes.decrypt()}}();var h,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function d(t){var e,i,n="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),n+=c.charAt(i>>6)+c.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),n+=c.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),n+=c.charAt(i>>2)+c.charAt((3&i)<<4));(3&n.length)>0;)n+="=";return n}function f(t){var e,i="",r=0,o=0;for(e=0;e>2),o=3&s,r=1):1==r?(i+=n(o<<2|s>>4),o=15&s,r=2):2==r?(i+=n(o),i+=n(s>>2),o=3&s,r=3):(i+=n(o<<2|s>>4),i+=n(15&s),r=0))}return 1==r&&(i+=n(o<<2)),i}var g,v=function(t){var e;if(void 0===h){var i="0123456789ABCDEF",n=" \f\n\r\t聽\u2028\u2029";for(h={},e=0;e<16;++e)h[i.charAt(e)]=e;for(i=i.toLowerCase(),e=10;e<16;++e)h[i.charAt(e)]=e;for(e=0;e=2?(r[r.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return r},m={decode:function(t){var e;if(void 0===g){var i="= \f\n\r\t聽\u2028\u2029";for(g=Object.create(null),e=0;e<64;++e)g["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(g["-"]=62,g._=63,e=0;e=4?(n[n.length]=r>>16,n[n.length]=r>>8&255,n[n.length]=255&r,r=0,o=0):r<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=r>>10;break;case 3:n[n.length]=r>>16,n[n.length]=r>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=m.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return m.decode(t)}},y=1e13,b=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var i,n,r=this.buf,o=r.length;for(i=0;i0&&(r[i]=e)},t.prototype.sub=function(t){var e,i,n=this.buf,r=n.length;for(e=0;e=0;--n)i+=(y+e[n]).toString().substring(1);return i},t.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*y+t[i];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),w=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,S=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function A(t,e){return t.length>e&&(t=t.substring(0,e)+"鈥�"),t}var T,E=function(){function t(e,i){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=i)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,i){for(var n="",r=t;r176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var i="",n=t;n191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(n++)):String.fromCharCode((15&r)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return i},t.prototype.parseStringBMP=function(t,e){for(var i,n,r="",o=t;o127,o=r?255:0,s="";n==o&&++t4){for(s=n,i<<=3;0==(128&(+s^o));)s=+s<<1,--i;s="("+i+" bit)\n"}r&&(n-=256);for(var a=new b(n),u=t+1;u=u;--l)o+=a>>l&1?"1":"0";if(o.length>i)return r+A(o,i)}return r+o},t.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return A(this.parseStringISO(t,e),i);var n=e-t,r="("+n+" byte)\n";n>(i/=2)&&(e=t+i);for(var o=t;oi&&(r+="鈥�"),r},t.prototype.parseOID=function(t,e,i){for(var n="",r=new b,o=0,s=t;si)return A(n,i);r=new b,o=0}}return o>0&&(n+=".incomplete"),n},t}(),I=function(){function t(t,e,i,n,r){if(!(n instanceof B))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=n,this.sub=r}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return A(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return A(this.stream.parseStringISO(e,e+i),t);case 30:return A(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var i=0,n=this.sub.length;i6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===i)return null;e=0;for(var n=0;n>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var i=new b;do{e=t.get(),i.mulAdd(128,127&e)}while(128&e);this.tagNumber=i.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],R=(1<<26)/x[x.length-1],P=function(){function t(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<0)for(u>u)>0&&(o=!0,s=n(i));a>=0;)u>(u+=this.DB-e)):(i=this[a]>>(u-=e)&r,u<=0&&(u+=this.DB,--a)),i>0&&(o=!0),o&&(s+=n(i));return o?s:"0"},t.prototype.negate=function(){var e=C();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+z(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var i=C();return this.abs().divRemTo(e,null,i),this.s<0&&i.compareTo(t.ZERO)>0&&e.subTo(i,i),i},t.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new k(e):new N(e),this.exp(t,i)},t.prototype.clone=function(){var t=C();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,n=this.DB-t*this.DB%8,r=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[r++]=i|this.s<=0;)n<8?(i=(this[t]&(1<>(n+=this.DB-8)):(i=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==r&&(128&this.s)!=(128&i)&&++r,(r>0||i!=this.s)&&(e[r++]=i);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=C();return this.bitwiseTo(t,r,e),e},t.prototype.or=function(t){var e=C();return this.bitwiseTo(t,o,e),e},t.prototype.xor=function(t){var e=C();return this.bitwiseTo(t,s,e),e},t.prototype.andNot=function(t){var e=C();return this.bitwiseTo(t,a,e),e},t.prototype.not=function(){for(var t=C(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var h=C();for(n.sqrTo(s[1],h);a<=l;)s[a]=C(),n.mulTo(h,s[a-2],s[a]),a+=2}var c,d,f=t.t-1,p=!0,g=C();for(r=z(t[f])-1;f>=0;){for(r>=u?c=t[f]>>r-u&l:(c=(t[f]&(1<0&&(c|=t[f-1]>>this.DB+r-u)),a=i;0==(1&c);)c>>=1,--a;if((r-=a)<0&&(r+=this.DB,--f),p)s[c].copyTo(o),p=!1;else{for(;a>1;)n.sqrTo(o,g),n.sqrTo(g,o),a-=2;a>0?n.sqrTo(o,g):(d=o,o=g,g=d),n.mulTo(g,s[c],o)}for(;f>=0&&0==(t[f]&1<=0?(n.subTo(r,n),i&&o.subTo(a,o),s.subTo(u,s)):(r.subTo(n,r),i&&a.subTo(o,a),u.subTo(s,u))}return 0!=r.compareTo(t.ONE)?t.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new D)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var n=e;e=i,i=n}var r=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(r0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=i.getLowestSetBit())>0&&i.rShiftTo(r,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},t.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=x[x.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,i){var n;if(16==i)n=4;else if(8==i)n=3;else if(256==i)n=8;else if(2==i)n=1;else if(32==i)n=5;else{if(4!=i)return void this.fromRadix(e,i);n=2}this.t=0,this.s=0;for(var r=e.length,o=!1,s=0;--r>=0;){var a=8==n?255&+e[r]:H(e,r);a<0?"-"==e.charAt(r)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var i=t;i=0;--a)e[a+o+1]=this[a]>>n|s,s=(this[a]&r)<=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var n=t%this.DB,r=this.DB-n,o=(1<>n;for(var s=i+1;s>n;n>0&&(e[this.t-i-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[i++]=this.DV+n:n>0&&(e[i++]=n),e.t=i,e.clamp()},t.prototype.multiplyTo=function(e,i){var n=this.abs(),r=e.abs(),o=n.t;for(i.t=o+r.t;--o>=0;)i[o]=0;for(o=0;o=0;)t[i]=0;for(i=0;i=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,i,n){var r=e.abs();if(!(r.t<=0)){var o=this.abs();if(o.t0?(r.lShiftTo(l,s),o.lShiftTo(l,n)):(r.copyTo(s),o.copyTo(n));var h=s.t,c=s[h-1];if(0!=c){var d=c*(1<1?s[h-2]>>this.F2:0),f=this.FV/d,p=(1<=0&&(n[n.t++]=1,n.subTo(y,n)),t.ONE.dlShiftTo(h,y),y.subTo(s,s);s.t=0;){var b=n[--v]==c?this.DM:Math.floor(n[v]*f+(n[v-1]+g)*p);if((n[v]+=s.am(0,b,n,m,0,h))0&&n.rShiftTo(l,n),a<0&&t.ZERO.subTo(n,n)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,i){if(e>4294967295||e<1)return t.ONE;var n=C(),r=C(),o=i.convert(this),s=z(e)-1;for(o.copyTo(n);--s>=0;)if(i.sqrTo(n,r),(e&1<0)i.mulTo(r,o,n);else{var a=n;n=r,r=a}return i.revert(n)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),n=j(i),r=C(),o=C(),s="";for(this.divRemTo(n,r,o);r.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,r.divRemTo(n,r,o);return o.intValue().toString(t)+s},t.prototype.fromRadix=function(e,i){this.fromInt(0),null==i&&(i=10);for(var n=this.chunkSize(i),r=Math.pow(i,n),o=!1,s=0,a=0,u=0;u=n&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(i,s)),this.dAddOffset(a,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,i,n){if("number"==typeof i)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),o,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(i);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var r=[],s=7&e;r.length=1+(e>>3),i.nextBytes(r),s>0?r[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[i++]=n:n<-1&&(e[i++]=this.DV+n),e.t=i,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,i){var n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(var r=i.t-this.t;n=0;)i[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)i=this[0]%t;else for(var n=this.t-1;n>=0;--n)i=(e*i+this[n])%t;return i},t.prototype.millerRabin=function(e){var i=this.subtract(t.ONE),n=i.getLowestSetBit();if(n<=0)return!1;var r=i.shiftRight(n);(e=e+1>>1)>x.length&&(e=x.length);for(var o=C(),s=0;s0&&(i.rShiftTo(s,i),n.rShiftTo(s,n));var a=function(){(o=i.getLowestSetBit())>0&&i.rShiftTo(o,i),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),i.compareTo(n)>=0?(i.subTo(n,i),i.rShiftTo(1,i)):(n.subTo(i,n),n.rShiftTo(1,n)),i.signum()>0?setTimeout(a,0):(s>0&&n.lShiftTo(s,n),setTimeout((function(){e(n)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,i,n,r){if("number"==typeof i)if(e<2)this.fromInt(1);else{this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),o,this),this.isEven()&&this.dAddOffset(1,0);var s=this,a=function(){s.dAddOffset(2,0),s.bitLength()>e&&s.subTo(t.ONE.shiftLeft(e-1),s),s.isProbablePrime(i)?setTimeout((function(){r()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var u=[],l=7&e;u.length=1+(e>>3),i.nextBytes(u),l>0?u[0]&=(1<=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),N=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=C();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),O=function(){function t(t){this.m=t,this.r2=C(),this.q3=C(),P.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=C();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function C(){return new P(null)}function _(t,e){return new P(t,e)}var U="undefined"!=typeof navigator;U&&"Microsoft Internet Explorer"==navigator.appName?(P.prototype.am=function(t,e,i,n,r,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],l=this[t++]>>15,h=a*u+l*s;r=((u=s*u+((32767&h)<<15)+i[n]+(1073741823&r))>>>30)+(h>>>15)+a*l+(r>>>30),i[n++]=1073741823&u}return r},T=30):U&&"Netscape"!=navigator.appName?(P.prototype.am=function(t,e,i,n,r,o){for(;--o>=0;){var s=e*this[t++]+i[n]+r;r=Math.floor(s/67108864),i[n++]=67108863&s}return r},T=26):(P.prototype.am=function(t,e,i,n,r,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],l=this[t++]>>14,h=a*u+l*s;r=((u=s*u+((16383&h)<<14)+i[n]+r)>>28)+(h>>14)+a*l,i[n++]=268435455&u}return r},T=28),P.prototype.DB=T,P.prototype.DM=(1<>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}P.ZERO=j(0),P.ONE=j(1);var F,q,W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{},K="undefined"!=typeof window?window:void 0!==W?W:"undefined"!=typeof self?self:{},J=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,i,n;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[i],this.S[i]=n;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),G=null;if(null==G){G=[],q=0;var Y=void 0;if(K.crypto&&K.crypto.getRandomValues){var Q=new Uint32Array(256);for(K.crypto.getRandomValues(Q),Y=0;Y=256||q>=256)K.removeEventListener?K.removeEventListener("mousemove",$,!1):K.detachEvent&&K.detachEvent("onmousemove",$);else try{var e=t.x+t.y;G[q++]=255&e,Z+=1}catch(t){}};K.addEventListener?K.addEventListener("mousemove",$,!1):K.attachEvent&&K.attachEvent("onmousemove",$)}function X(){if(null==F){for(F=new J;q<256;){var t=Math.floor(65536*Math.random());G[q++]=255&t}for(F.init(G),q=0;q0&&e.length>0?(this.n=_(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=function(t,e){if(e=0&&e>0;){var r=t.charCodeAt(n--);r<128?i[--e]=r:r>127&&r<2048?(i[--e]=63&r|128,i[--e]=r>>6|192):(i[--e]=63&r|128,i[--e]=r>>6&63|128,i[--e]=r>>12|224)}i[--e]=0;for(var o=new tt,s=[];e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);i[--e]=s[0]}return i[--e]=2,i[--e]=0,new P(i)}(t,e);if(null==i)return null;var n=this.doPublic(i);if(null==n)return null;for(var r=n.toString(16),o=r.length,s=0;s<2*e-o;s++)r="0"+r;return r},t.prototype.setPrivate=function(t,e,i){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=_(t,16),this.e=parseInt(e,16),this.d=_(i,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,i,n,r,o,s,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=_(t,16),this.e=parseInt(e,16),this.d=_(i,16),this.p=_(n,16),this.q=_(r,16),this.dmp1=_(o,16),this.dmq1=_(s,16),this.coeff=_(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var i=new tt,n=t>>1;this.e=parseInt(e,16);for(var r=new P(e,16);;){for(;this.p=new P(t-n,1,i),0!=this.p.subtract(P.ONE).gcd(r).compareTo(P.ONE)||!this.p.isProbablePrime(10););for(;this.q=new P(n,1,i),0!=this.q.subtract(P.ONE).gcd(r).compareTo(P.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(P.ONE),a=this.q.subtract(P.ONE),u=s.multiply(a);if(0==u.gcd(r).compareTo(P.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=_(t,16),i=this.doPrivate(e);return null==i?null:function(t,e){for(var i=t.toByteArray(),n=0;n=i.length)return null;for(var r="";++n191&&o<224?(r+=String.fromCharCode((31&o)<<6|63&i[n+1]),++n):(r+=String.fromCharCode((15&o)<<12|(63&i[n+1])<<6|63&i[n+2]),n+=2)}return r}(i,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,i){var n=new tt,r=t>>1;this.e=parseInt(e,16);var o=new P(e,16),s=this,a=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(P.ONE),n=s.q.subtract(P.ONE),r=e.multiply(n);0==r.gcd(o).compareTo(P.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(r),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(n),s.coeff=s.q.modInverse(s.p),setTimeout((function(){i()}),0)):setTimeout(a,0)},u=function(){s.q=C(),s.q.fromNumberAsync(r,1,n,(function(){s.q.subtract(P.ONE).gcda(o,(function(t){0==t.compareTo(P.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)}))}))},l=function(){s.p=C(),s.p.fromNumberAsync(t-r,1,n,(function(){s.p.subtract(P.ONE).gcda(o,(function(t){0==t.compareTo(P.ONE)&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(l,0)}))}))};setTimeout(l,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,i){var n=function(t,e){if(e15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+i).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},rt.asn1.DERAbstractString=function(t){rt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},nt.lang.extend(rt.asn1.DERAbstractString,rt.asn1.ASN1Object),rt.asn1.DERAbstractTime=function(t){rt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,i){var n=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var s=o+n(String(r.getMonth()+1),2)+n(String(r.getDate()),2)+n(String(r.getHours()),2)+n(String(r.getMinutes()),2)+n(String(r.getSeconds()),2);if(!0===i){var a=r.getMilliseconds();if(0!=a){var u=n(String(a),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,n,r,o){var s=new Date(Date.UTC(t,e-1,i,n,r,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},nt.lang.extend(rt.asn1.DERAbstractTime,rt.asn1.ASN1Object),rt.asn1.DERAbstractStructured=function(t){rt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},nt.lang.extend(rt.asn1.DERAbstractStructured,rt.asn1.ASN1Object),rt.asn1.DERBoolean=function(){rt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},nt.lang.extend(rt.asn1.DERBoolean,rt.asn1.ASN1Object),rt.asn1.DERInteger=function(t){rt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=rt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new P(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},nt.lang.extend(rt.asn1.DERInteger,rt.asn1.ASN1Object),rt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=rt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}rt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||71&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof t&&(t=JSON.stringify(t));var i=ct(),n=e.publicKey||"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCjYYIy9Are9QPRDOVug4e6Fdz8HK2HGyajKR4N8Wb/bB9gwXnieXqj4Mya0nLd6nBcBPN6qUJ0R7p5Cv6aPqQsc7pWfAxPr41GvcOlGixLtpLHLUH9m0093YEBhu4F7pKu0TZTQIPZINWUa1SLjQD/bcBlcaQyWbk6qJhSJFYkwIDAQAB",r=ht(i,n);return{k:r,v:1,d:lt(t,i),i:r}}}()}));var y=function(t){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||""};function b(t,e){var i,n,r,a,u,h,c=(new Date).getTime(),d=y("ieu_member_uid"),p=y("ieu_member_sid"),g=null==t?void 0:t.bizId,v="",m=window.navigator.userAgent;v=(null===(n=(i=f.pageInApp)[g])||void 0===n?void 0:n.call(i))||(null===(r=l())||void 0===r?void 0:r.isNGSdk)||(null===(a=l())||void 0===a?void 0:a.isNGAndroid)?"APP":s(m)?"ALIPAY_MINI":"mobile"===o(m)?"H5":"WEB","desktop"===function(t,e){try{t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}catch(t){return""}}("pageType",window.location.href)&&(v="desktop");var b="",w="",S="",A=window._JYMUAUtil;if(A&&"function"==typeof A.getTraceModelType){var T=A.getTraceModelType(m)||{};b=T.modelType,w=T.channel,S=T.os}var E={ct:c,uid:d,sessionId:p,bizId:g,sceneId:v,jssdkVer:(null==t?void 0:t.version)||"",requestId:""+c+Math.floor(1e3*Math.random()),modelType:b,channel:w,os:S};if((null===(u=l())||void 0===u?void 0:u.isNGSdk)||(null===(h=l())||void 0===h?void 0:h.isNGAndroid)){var I=window.parent===window?window.WindVane:null;if(!I)return e(E);I.call("NgLoginWvBridge","getEnvironmentInfo",{},(function(t){var i,n;E.utdid=(null===(i=t.data)||void 0===i?void 0:i.utdid)||"",E.a10=(null===(n=t.data)||void 0===n?void 0:n.gameId)||"",e(E)}),(function(t){e(E)}))}else e(E)}function w(t,i,n){void 0===n&&(n={logInH5:!1}),t&&b(t,(function(o){var s,a,u=e(e({},o),i),l={data:{logs:[function(t){for(var e in t)""!==t[e]&&null!=t[e]||delete t[e];var i=[];for(var n in t)i.push(n+"="+t[n]);return i.join("`")}(u)],size:1},requestId:null==o?void 0:o.requestId},h=t.loggerHost,c=t.bizId;"daily"!==t.env&&"pre"!==t.env&&"local"!==t.env||console.log("log-------- "+JSON.stringify(l)),n.logInH5?r(h+"/capi/log.a?df=adat&ver=1.0",JSON.stringify(m(l)),(function(t){return t}),{"Content-Type":"application/json"}):(null===(a=(s=f.pageInApp)[c])||void 0===a?void 0:a.call(s))?window.WindVane&&window.WindVane.call("ImeSdkJsBridge","stat",u):r(h+"/capi/log.a?df=adat&ver=1.0",JSON.stringify(m(l)),(function(t){return t}),{"Content-Type":"application/json"})}))}var S=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.URLChecker=void 0;var i=function(){function t(){this.urlWhitelist=[],this.protocolWhitelist=["http:","http:"]}return t.prototype.addProtocolToWhitelist=function(t){this.protocolWhitelist.push(t.endsWith(":")?t:t+":")},t.prototype.addURLWhitelist=function(t){for(var e=0,i=0,n=t;i/g,">")},t.getSafeURL=function(e,i){return t.urlChecker.getSafeURL(e,i)},t.addSingleURLToWhitelist=function(e,i){return void 0===i&&(i="matches"),t.urlChecker.addSingleURLToWhitelist(e,i)},t.addURLWhitelist=function(e){return t.urlChecker.addURLWhitelist(e)},t.addProtocolToWhitelist=function(e){return t.urlChecker.addProtocolToWhitelist(e)},t.urlChecker=new S.URLChecker,t}();e.SecurityUtil=i}));g(A);A.SecurityUtil;var T,E=A.SecurityUtil,I=function(){function t(t){this.bizId=t.bizId,this.env=t.env,this.type="",this.origin="",this.loggerHost="",this.version="1.1.14",this.redirectWhiteList=d,this.init(),this.getRedirectWhiteList()}return t.prototype.init=function(){this.bizId?f.bizArray.includes(this.bizId)?f.envArray.includes(this.env)?(this.currUa(),this.currEnvOrigin()):console.error("env浼犲弬鏈夎"):console.error("bizId鏈帴鍏�"):console.error("蹇呴』鍒濆鍖栧弬鏁癰izId")},t.prototype.currUa=function(){"object"==typeof window?this.type=o(window.navigator.userAgent):this.type="mobile"},t.prototype.currEnvOrigin=function(){var t,e;this.origin=(null===(t=f.ieuHost[this.bizId])||void 0===t?void 0:t[this.env])||"http://localhost:7001",this.loggerHost=(null===(e=f.loggerHost)||void 0===e?void 0:e[this.env])||"http://ieu-member-log.game.alibaba.net"},t.prototype.commonLogger=function(t,e,i,n,r,o){var s=(null==r?void 0:r.success)?"Y":"N",a=Date.now();w(this,{action:e,result:s,code:null==r?void 0:r.code,msg:null==r?void 0:r.msg,duration:a-n},o),w(this,{action:"invoke",result:s,code:null==r?void 0:r.code,msg:null==r?void 0:r.msg,duration:a-n,a1:t,a2:i,a3:r},o)},t.prototype.getRedirectWhiteList=function(){var t,e=this;if(window.__IEU__USER__SDK__WHITELIST__||window.__IEU__USER__SDK__GET__WHITELIST__)this.redirectWhiteList=window.__IEU__USER__SDK__WHITELIST__||d;else{var i=Date.now();r(((null===(t=f.ieuHost.base)||void 0===t?void 0:t[this.env])||"http://member.alibaba.net")+"/api/default/getRedirectWhiteList","",(function(t){var n=Date.now();w(e,{action:"get_redirect_white_list",result:(null==t?void 0:t.success)?"Y":"N",code:null==t?void 0:t.code,msg:null==t?void 0:t.msg,duration:n-i,a10:e.bizId},{logInH5:!0}),e.redirectWhiteList=(null==t?void 0:t.data)||d,window.__IEU__USER__SDK__WHITELIST__=(null==t?void 0:t.data)||d})),window.__IEU__USER__SDK__GET__WHITELIST__=!0}},t.prototype.validRedirectUrl=function(t,e){var i;if("undefined"!=typeof window){var n=null===(i=this.redirectWhiteList)||void 0===i?void 0:i.map((function(t){return[t,"matches"]}));if(E.addURLWhitelist(n),E.getSafeURL(t))return"replace"===(null==e?void 0:e.type)?void window.location.replace(E.getSafeURL(t)):void(window.location.href=E.getSafeURL(t));try{var r=new URL(t),o=null==r?void 0:r.host,s="mobile"===this.type?this.origin+"/m/errPage?errMsg=閲嶅畾鍚戝煙鍚嶉潪娉曪細"+o:this.origin+"/p/errPage?errMsg=閲嶅畾鍚戝煙鍚嶉潪娉曪細"+o;if("replace"===(null==e?void 0:e.type))return void window.location.replace(s);window.location.href=s}catch(i){s="mobile"===this.type?this.origin+"/m/errPage?errMsg=閲嶅畾鍚戝湴鍧€闈炴硶锛�"+encodeURIComponent(t):this.origin+"/p/errPage?errMsg=閲嶅畾鍚戝湴鍧€闈炴硶锛�"+encodeURIComponent(t);if("replace"===(null==e?void 0:e.type))return void window.location.replace(s);window.location.href=s}}},t}();function B(t){var e=t.domId,i=document.getElementById(""+e),n=e+"-iframe";if(i){if(!(null==t?void 0:t.isReload))return void(i.style.display="block");i&&i.parentNode&&i.parentNode.removeChild(i)}var r="\n
\n \n
\n \n \n ",s=document.createElement("div");s.setAttribute("id",e),s.innerHTML=o,document.body.appendChild(s);var a=R((function(e){var i;"close"===e.action&&(s.style.display="none",window.removeEventListener("message",a,!1)),null===(i=null==t?void 0:t.callback)||void 0===i||i.call(t,null==e?void 0:e.data)}));window.addEventListener("message",a,!1);var u=document.getElementById(i);s.addEventListener("click",(function(e){var i;e.target instanceof Node&&(null==u?void 0:u.contains(e.target))||(s.style.display="none",null===(i=null==t?void 0:t.callback)||void 0===i||i.call(t,{success:!1,code:"USER_CLOSE",data:null,msg:null}))}))}function R(t){return function(e){var i;if((null==e?void 0:e.data)&&"string"==typeof(null==e?void 0:e.data))try{var n=JSON.parse(e.data);n.hasOwnProperty("data")&&n.hasOwnProperty("action")&&(null===(i=n.data)||void 0===i?void 0:i.hasOwnProperty("code"))&&t&&t(n,e)}catch(e){console.error(e)}}}function P(t,e){return void 0===e&&(e={crossOrigin:""}),new Promise((function(i,n){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript","anonymous"!==e.crossOrigin&&"use-credentials"!==e.crossOrigin||(o.crossOrigin=e.crossOrigin),o.src=t,o.onload=function(){i()},o.onerror=function(){n(new Error(t+" 鍔犺浇澶辫触"))},r.appendChild(o)}))}function D(t,e){return(T=T||new C).call(t,e)}var k,N,O,C=function(){function t(){this.eventIds=new Map,this.onMessage()}return t.prototype.createEventId=function(){return"xxxxxxxxxxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},t.prototype.call=function(t,e){var i=this;return new Promise((function(n,r){var o=i.createEventId();window.my&&window.my.postMessage({type:t,data:e,eventId:o}),i.eventIds.set(o,[n,r])}))},t.prototype.onMessage=function(){var t=this;window.my.onMessage=function(e){try{var i=e.eventId,n=e.status,r=e.data,o=t.eventIds.get(i);if(i&&o){var s=o[0],a=o[1];"success"===n&&s(r),"fail"===n&&a(r)}}catch(t){console.log(t)}}},t}();return function(t){t[t.need=1]="need",t[t.noNeed=0]="noNeed"}(k||(k={})),function(t){t[t.sms=1]="sms"}(N||(N={})),function(t){t.APP="app",t.H5="mobile",t.PC="pc"}(O||(O={})),function(h){function c(t){var e,i=h.call(this,t)||this;return i.origin=(null===(e=f.ieuHost.base)||void 0===e?void 0:e[i.env])||"http://localhost:7001",i}return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(c,h),c.prototype.realNameAuthPage=function(t){var e=this,i={targetBizId:this.bizId,bizId:this.bizId,targetSid:t.targetSid,gameId:t.gameId,scene:t.scene||"normal"};for(var n in i)if(!i[n])throw new Error(n+" 缂哄け");if(s(window.navigator.userAgent)){var o=Date.now();return this.logger({action:"realname_page_sdk",result:"Y",a2:"realname",a3:"alipay_mini",a10:null==this?void 0:this.bizId}),void D("confirm",{title:"瀹炲悕鐧昏",content:"鏍规嵁鍥藉鏂伴椈鍑虹増缃层€婂叧浜庨槻姝㈡湭鎴愬勾浜烘矇杩风綉缁滄父鎴忕殑閫氱煡銆嬶紝鎵€鏈夌綉缁滄父鎴忕敤鎴峰潎椤讳娇鐢ㄦ湁鏁堣韩浠借瘉淇℃伅杩涜鐧昏銆備俊鎭粎鐢ㄤ簬韬唤楠岃瘉锛屼氦鏄撶尗涓ユ牸淇濇姢浣犵殑淇℃伅瀹夊叏銆�",confirmButtonText:"寮€濮嬪疄鍚嶇櫥璁�",cancelButtonText:"鏆備笉鐧昏"}).then((function(t){if(t.confirm)return e.logger({action:"realname_commit_start_sdk",result:"Y",a2:"realname",a3:"alipay_mini",a10:e.bizId}),D("getAuthCode",{scopes:["auth_user"]})})).then((function(i){var n=i.authCode,s={bizId:e.bizId,sid:t.targetSid,accessToken:n,gameId:t.gameId},a="";for(var u in s)a+=u+"="+s[u]+"&";r(e.origin+"/api/default/applyRealNameForAlipayMiniProgram",a,(function(i){var n=Date.now();e.logger({action:"realname_commit_end_sdk",result:(null==i?void 0:i.success)?"Y":"N",code:null==i?void 0:i.code,msg:null==i?void 0:i.msg,duration:n-o,a2:"realname",a3:"alipay_mini",a4:null==i?void 0:i.code,a10:e.bizId}),null==t||t.callback({success:i.success,code:i.code,msg:i.msg})}))})).catch((function(e){var i;console.log("callback---catch",e),null===(i=null==t?void 0:t.callback)||void 0===i||i.call(t,{success:!1,code:"USER_CLOSE",msg:"鎺堟潈澶辫触",data:null})}))}var l="";for(var n in i)l+=n+"="+i[n]+"&";var h=Date.now();r(this.origin+"/api/realNameAuth/authForApplyRealName",l,(function(n){var r,o,s;if(e.commonLogger("/api/realNameAuth/authForApplyRealName","auth_for_apply_realName",i,h,n,{logInH5:!0}),(null===(o=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.userToken)||void 0===o?void 0:o.length)>0){var l=n.data.userToken,c="",d={userToken:l,bizId:e.bizId,targetBizId:e.bizId,gameId:t.gameId,windowFeature:t.windowFeature||"fullScreen",pageType:"add"};"pc"===e.type&&(d.windowFeature="fullScreen");var f="";for(var p in d)f+=p+"="+d[p]+"&";if("pc"===e.type)c=e.origin+"/p/realNameAuth?"+f,e.realNameAuthPagePC({iframeUrl:c,callback:t.callback});else{if(c=e.origin+"/m/realNameAuth?"+f,a()||u())return void window.WindVane.call("ImeSdkJsBridge","openWindowIeu",{url:c},(function(t){console.log("success:"+JSON.stringify(t))}),(function(t){console.log("fail:"+JSON.stringify(t)),window.location.href=c}));e.realNameAuthPageMobile({iframeUrl:c,callback:t.callback})}}else null===(s=null==t?void 0:t.callback)||void 0===s||s.call(t,{success:!1,code:n.code,msg:n.msg,data:null})}))},c.prototype.realNameAuthPageMobile=function(t){B({domId:"ieu-member-sdk-realNameAuthPage",iframeUrl:null==t?void 0:t.iframeUrl,callback:null==t?void 0:t.callback,isReload:!0})},c.prototype.realNameAuthPagePC=function(t){x({domId:"ieu-member-sdk-realNameAuthPage",iframeUrl:null==t?void 0:t.iframeUrl,callback:null==t?void 0:t.callback,iframeWidth:640,iframeHeight:289,isReload:!0})},c.prototype.realNameUpdate=function(t){var i=this,n={targetBizId:this.bizId,bizId:this.bizId,targetSid:t.targetSid,gameId:t.gameId,scene:t.scene||"normal"};for(var r in n)if(!n[r])throw new Error(r+" 缂哄け");this.isSupportByJS("startQuickRPByJS",(function(r){var o=r?1:0,s=e(e({},n),{rnrpSdkExistFlag:o});1===o?i.getPlatformInfoByJS((function(n){var r,o=e(e({},s),{croStrategy:(null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.croStrategy)||1});if("undefined"!=typeof window){var a=function(t){var e,i,n,r,o,s,u,l=JSON.parse(JSON.stringify(t));if(1===(null===(e=null==l?void 0:l.param)||void 0===e?void 0:e.code)||"1"===(null===(i=null==l?void 0:l.param)||void 0===i?void 0:i.code)){var h=(null===(n=f.iframeElementId)||void 0===n?void 0:n.realName)+"-iframe";if(document.getElementById(h)){var c=document.getElementById(h).contentWindow,d={code:null===(r=null==l?void 0:l.param)||void 0===r?void 0:r.code,msg:null===(o=null==l?void 0:l.param)||void 0===o?void 0:o.msg,success:!0,data:null};c.postMessage(JSON.stringify(d),"*")}document.removeEventListener("onIEURPSdkEventListener",a,!1)}else null==t||t.callback({code:(null===(s=null==l?void 0:l.param)||void 0===s?void 0:s.code)||"USER_CLOSE",msg:(null===(u=null==l?void 0:l.param)||void 0===u?void 0:u.msg)||"鎿嶄綔澶辫触锛岃閲嶈瘯",success:!1,data:null}),document.removeEventListener("onIEURPSdkEventListener",a,!1)};document.addEventListener("onIEURPSdkEventListener",a,!1)}i.realNameUpdateCommit(o,t)})):i.realNameUpdateCommit(s,t)}))},c.prototype.realNameUpdateCommit=function(t,e){var i=this,n="";for(var o in t)n+=o+"="+t[o]+"&";var s=Date.now();r(this.origin+"/api/realNameAuth/authForUpdateRealName",n,(function(n){var r,o,a;if(i.commonLogger("/api/realNameAuth/authForUpdateRealName","auth_for_update_realName",t,s,n,{logInH5:!0}),(null===(o=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.userToken)||void 0===o?void 0:o.length)>0){var u=n.data,l=u.userToken,h=u.realNameAuthPageType;e.userToken=l,e.realNameAuthPageType=h,i.securityManageJudgment({bizId:i.bizId,rnrpSdkExistFlag:null==t?void 0:t.rnrpSdkExistFlag,securityAuthenticateScene:"CHANGE_REAL_NAME",st:e.targetSid,windowFeature:null==e?void 0:e.windowFeatureAuth},(function(t){var n;(null==t?void 0:t.success)?i.openUpdateRealNamePage(e):null===(n=null==e?void 0:e.callback)||void 0===n||n.call(e,{success:!1,code:null==t?void 0:t.code,msg:null==t?void 0:t.msg,data:null})}))}else null===(a=null==e?void 0:e.callback)||void 0===a||a.call(e,{success:!1,code:null==n?void 0:n.code,msg:null==n?void 0:n.msg,data:null})}))},c.prototype.getPlatformInfoByJS=function(t){var e=window.WindVane;null==e||e.call("RNRPJsBridge","getPlatformInfoByJS",{},(function(e){console.log("getPlatformInfoByJS-success:"+JSON.stringify(e)),t(e)}),(function(t){console.log("getPlatformInfoByJS-fail:"+JSON.stringify(t))}))},c.prototype.securityManageJudgment=function(t,e){var i=this,n="";for(var o in t)n+=o+"="+t[o]+"&";var s=Date.now();r(this.origin+"/api/9gameAccount/securityManageJudgment",n,(function(n){if(i.commonLogger("/api/9gameAccount/securityManageJudgment","security_manage_judgment",t,s,n,{logInH5:!0}),null==n?void 0:n.success){var r=n.data||{},o=r.authenticateWay,a=r.needAuthenticateFlag,u=r.token;if(1===a){var l={authenticateWay:o,token:u,windowFeature:null==t?void 0:t.windowFeature,callback:function(t){e(t)}};i.realAuth(l)}else e(n)}else e(n)}))},c.prototype.openUpdateRealNamePage=function(t){var e="",i={userToken:null==t?void 0:t.userToken,bizId:this.bizId,targetBizId:this.bizId,gameId:t.gameId,windowFeature:(null==t?void 0:t.windowFeatureRealName)||"fullScreen",pageType:(null==t?void 0:t.realNameAuthPageType)||"rnUpdate"};"pc"===this.type&&(i.windowFeature="fullScreen");var n="";for(var r in i)n+=r+"="+i[r]+"&";"pc"===this.type?(e=this.origin+"/p/realNameAuth?"+n,this.realNameAuthPagePC({iframeUrl:e,callback:t.callback})):(e=this.origin+"/m/realNameAuth?"+n,this.realNameAuthPageMobile({iframeUrl:e,callback:t.callback}))},c.prototype.realNameAuthQuery=function(t){var e=this,i={targetBizId:this.bizId,bizId:this.bizId,targetSid:t.targetSid};if(!t.targetSid)throw new Error("targetSid 缂哄け");var n="";for(var o in i)n+=o+"="+i[o]+"&";r(this.origin+"/api/realNameAuth/findRealName",n,(function(n){var r,o=new Date;e.commonLogger("/api/realNameAuth/findRealName","find_real_name",i,o,n,{logInH5:!0}),null===(r=null==t?void 0:t.callback)||void 0===r||r.call(t,{success:null==n?void 0:n.success,code:null==n?void 0:n.code,msg:null==n?void 0:n.msg,data:null==n?void 0:n.data})}))},c.prototype.isSupportRealPerson=function(t){function e(){var e;null===(e=null===window||void 0===window?void 0:window.WindVane)||void 0===e||e.call("RNRPJsBridge","startRPByJS",{},(function(e){console.log("success:"+JSON.stringify(e)),t(!0)}),(function(e){console.log("fail:"+JSON.stringify(e)),t(!1)}))}(window||{}).WindVane?e():P("static/js/js3.js").then((function(){e()}))},c.prototype.realPersonAuthPage=function(t){for(var e=this,i=0,n=["uid","croStrategy","authenticateScene","backUrl","redirectUrl","callback"];i-1)i.h5Bind(t);else{var a=Date.now();i.logger({action:"third_bind_end",result:"N",code:null==e?void 0:e.code,msg:null==e?void 0:e.message,uid:s,duration:a-u,a1:null==n?void 0:n.toLowerCase(),a2:o}),console.log("缁戝畾澶辫触",e)}}))}))}else this.h5Bind(t)},c.prototype.h5Bind=function(t){return i(this,void 0,void 0,(function(){var e,i,o,s,a,u,l,h=this;return n(this,(function(n){for(l in e=t.thirdPartySite,i=t.sessionId,o=t.backUrl,s=t.scene,a={bizId:this.bizId,backUrl:encodeURIComponent(o),sessionId:i,scene:s||"normal",thirdPartySite:e},u="",a)u+=l+"="+a[l]+"&";return"ALIPAY"===e&&r(this.origin+"/api/default/thirdBind/getAuthUrl",u,(function(t){var e=new Date;if(h.commonLogger("/api/default/thirdBind/getAuthUrl","getAuthUrl",a,e,t,{logInH5:!0}),null==t?void 0:t.success){var i=null==t?void 0:t.data,n=i.authUrl,r=i.thirdBindToken;window.location.href=h.origin+"/m/defaultPage/thirdBind/alipayAuthMid?scene="+s+"&bizId="+h.bizId+"&thirdBindToken="+r+"&backUrl="+encodeURIComponent(o)+"&authUrl="+encodeURIComponent(n)}else window.location.href=h.origin+"/m/errPage?errMsg="+(t.msg||"鏈嶅姟寮傚父锛岃绋嶅悗閲嶈瘯")})),[2]}))}))},c.prototype.pcBind=function(t){r(this.origin+"/api/default/thirdBind/getAuthUrl",{},(function(t){window.location.href=null==t?void 0:t.url}))},c.prototype.judgeUA=function(){return l().isJiaoyimao||l().isNG?"app":o("undefined"!=typeof window?window.navigator.userAgent:"")},c.prototype.isNeedAuthenticate=function(t){var e=this,i="";for(var n in t)i+=n+"="+t[n]+"&";return new Promise((function(n,o){r(e.origin+"/api/default/thirdBind/thirdPartyBindJudgment",i,(function(i){var r=new Date;e.commonLogger("/api/default/thirdBind/thirdPartyBindJudgment","thirdPartyBindJudgment",t,r,i,{logInH5:!0}),n(i)}))}))},c.prototype.requestUnBindThird=function(t){var e=this,i={bizId:this.bizId,sessionId:(null==t?void 0:t.sessionId)||"",thirdPartySite:null==t?void 0:t.thirdPartySite,scene:(null==t?void 0:t.scene)||"normal",appKey:(null==t?void 0:t.appKey)||""};for(var n in i)if(!i[n]&&"appKey"!==n)throw new Error(n+" 缂哄け");if(!f.thirdPartySiteArray.includes(null==t?void 0:t.thirdPartySite))throw new Error("璇锋眰涓夋柟绫诲瀷涓嶅瓨鍦�");var o="";for(var n in i)o+=n+"="+i[n]+"&";r(this.origin+"/api/default/thirdBind/queryThirdBindRelation",o,(function(n){var r,s,a,u,l=new Date;if(e.commonLogger("/api/default/thirdBind/queryThirdBindRelation","queryThirdBindRelation",i,l,n,{logInH5:!0}),1===(null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.bindStatus)){var h="";e.type,h=e.origin+"/m/defaultPage/thirdBind/unBindThird?"+o,e.unBindThirdPageMobile({iframeUrl:h,callback:t.callback})}else 2===(null===(s=null==n?void 0:n.data)||void 0===s?void 0:s.bindStatus)?null===(a=null==t?void 0:t.callback)||void 0===a||a.call(t,{success:!1,msg:"鐢ㄦ埛鏈粦瀹氱涓夋柟",code:"USER_NO_BIND",data:null}):null===(u=null==t?void 0:t.callback)||void 0===u||u.call(t,{success:null==n?void 0:n.success,code:null==n?void 0:n.code,msg:null==n?void 0:n.msg,data:null==n?void 0:n.data})}))},c.prototype.unBindThirdPageMobile=function(t){B({domId:"ieu-member-sdk-unBindThridPage",iframeUrl:null==t?void 0:t.iframeUrl,callback:null==t?void 0:t.callback,isReload:!0})},c.prototype.queryThirdBindRelation=function(t){var e=this,i={bizId:this.bizId,sessionId:(null==t?void 0:t.sessionId)||"",thirdPartySite:(null==t?void 0:t.thirdPartySite)||"",scene:(null==t?void 0:t.scene)||"normal"};for(var n in i)if(!i[n])throw new Error(n+" 缂哄け");if(!f.thirdPartySiteArray.includes(null==t?void 0:t.thirdPartySite))throw new Error("璇锋眰涓夋柟绫诲瀷涓嶅瓨鍦�");var o="";for(var n in i)o+=n+"="+i[n]+"&";r(this.origin+"/api/default/thirdBind/queryThirdBindRelation",o,(function(n){var r,o=new Date;e.commonLogger("/api/default/thirdBind/queryThirdBindRelation","queryThirdBindRelation",i,o,n,{logInH5:!0}),null===(r=null==t?void 0:t.callback)||void 0===r||r.call(t,{success:null==n?void 0:n.success,code:null==n?void 0:n.code,msg:null==n?void 0:n.msg,data:null==n?void 0:n.data})}))},c.prototype.alipayApVerify=function(t){var e=this;if(!s(window.navigator.userAgent))throw new Error("not in alipay");for(var i={targetBizId:this.bizId,targetSid:t.targetSid,returnUrl:"http://m.jiaoyimao.com"},n=0,o=["targetSid","callback"];n