wodax-login-qrcode.react
Version:
login component with qrcode for WodaX applications
3 lines (2 loc) • 39.8 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).WodaXLoginWithQrCode=t(e.React)}(this,function(e){"use strict";var t="default"in e?e.default:e;function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o(function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new T(n||[]);return i._invoke=function(e,t,r){var n=c;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=L(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===c)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=l(e,t,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c="suspendedStart",f="suspendedYield",h="executing",d="completed",p={};function g(){}function m(){}function y(){}var v={};v[i]=function(){return this};var C=Object.getPrototypeOf,E=C&&C(C(x([])));E&&E!==r&&n.call(E,i)&&(v=E);var b=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e){var t;this._invoke=function(r,o){function i(){return new Promise(function(t,i){!function t(r,o,i,a){var s=l(e[r],e,o);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&n.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(c).then(function(e){u.value=e,i(u)},function(e){return t("throw",e,i,a)})}a(s.arg)}(r,o,t,i)})}return t=t?t.then(i,i):i()}}function L(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function x(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:_}}function _(){return{value:t,done:!0}}return m.prototype=b.constructor=y,y.constructor=m,y[s]=m.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(S.prototype),S.prototype[a]=function(){return this},e.AsyncIterator=S,e.async=function(t,r,n,o){var i=new S(u(t,r,n,o));return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},w(b),b[s]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=x,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:x(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function a(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.fundamental"):60117,v=r?Symbol.for("react.responder"):60118;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case i:case s:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case u:return e;default:return t}}case m:case g:case o:return t}}}function E(e){return C(e)===f}t.typeOf=C,t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=u,t.Element=n,t.ForwardRef=h,t.Fragment=i,t.Lazy=m,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=d,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===s||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===v)},t.isAsyncMode=function(e){return E(e)||C(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return C(e)===h},t.isFragment=function(e){return C(e)===i},t.isLazy=function(e){return C(e)===m},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===o},t.isProfiler=function(e){return C(e)===s},t.isStrictMode=function(e){return C(e)===a},t.isSuspense=function(e){return C(e)===d}});n(u);u.typeOf,u.AsyncMode,u.ConcurrentMode,u.ContextConsumer,u.ContextProvider,u.Element,u.ForwardRef,u.Fragment,u.Lazy,u.Memo,u.Portal,u.Profiler,u.StrictMode,u.Suspense,u.isValidElementType,u.isAsyncMode,u.isConcurrentMode,u.isContextConsumer,u.isContextProvider,u.isElement,u.isForwardRef,u.isFragment,u.isLazy,u.isMemo,u.isPortal,u.isProfiler,u.isStrictMode,u.isSuspense;var l=o(function(e,t){});n(l);l.typeOf,l.AsyncMode,l.ConcurrentMode,l.ContextConsumer,l.ContextProvider,l.Element,l.ForwardRef,l.Fragment,l.Lazy,l.Memo,l.Portal,l.Profiler,l.StrictMode,l.Suspense,l.isValidElementType,l.isAsyncMode,l.isConcurrentMode,l.isContextConsumer,l.isContextProvider,l.isElement,l.isForwardRef,l.isFragment,l.isLazy,l.isMemo,l.isPortal,l.isProfiler,l.isStrictMode,l.isSuspense,o(function(e){e.exports=u});var c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function d(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function p(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}p()&&Object.assign;var g="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function m(){}function y(){}y.resetWarningCache=m;var v=function(){function e(e,t,r,n,o,i){if(i!==g){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:y,resetWarningCache:m};return r.PropTypes=r,r},C=o(function(e){e.exports=v()}),E={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8};function b(e){this.mode=E.MODE_8BIT_BYTE,this.data=e}b.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var w=b,S={L:1,M:0,Q:3,H:2};function L(e,t){this.totalCount=e,this.dataCount=t}L.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],L.getRSBlocks=function(e,t){var r=L.getRsBlockTable(e,t);if(null==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,o=new Array,i=0;i<n;i++)for(var a=r[3*i+0],s=r[3*i+1],u=r[3*i+2],l=0;l<a;l++)o.push(new L(s,u));return o},L.getRsBlockTable=function(e,t){switch(t){case S.L:return L.RS_BLOCK_TABLE[4*(e-1)+0];case S.M:return L.RS_BLOCK_TABLE[4*(e-1)+1];case S.Q:return L.RS_BLOCK_TABLE[4*(e-1)+2];case S.H:return L.RS_BLOCK_TABLE[4*(e-1)+3];default:return}};var P=L;function O(){this.buffer=new Array,this.length=0}O.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};for(var T=O,x={glog:function(e){if(e<1)throw new Error("glog("+e+")");return x.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return x.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},_=0;_<8;_++)x.EXP_TABLE[_]=1<<_;for(_=8;_<256;_++)x.EXP_TABLE[_]=x.EXP_TABLE[_-4]^x.EXP_TABLE[_-5]^x.EXP_TABLE[_-6]^x.EXP_TABLE[_-8];for(_=0;_<255;_++)x.LOG_TABLE[x.EXP_TABLE[_]]=_;var M=x;function B(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&0==e[r];)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}B.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=M.gexp(M.glog(this.get(r))+M.glog(e.get(n)));return new B(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=M.glog(this.get(0))-M.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(n=0;n<e.getLength();n++)r[n]^=M.gexp(M.glog(e.get(n))+t);return new B(r,0).mod(e)}};var k=B,A=0,R=1,j=2,D=3,N=4,F=5,q=6,I=7,G={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;G.getBCHDigit(t)-G.getBCHDigit(G.G15)>=0;)t^=G.G15<<G.getBCHDigit(t)-G.getBCHDigit(G.G15);return(e<<10|t)^G.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;G.getBCHDigit(t)-G.getBCHDigit(G.G18)>=0;)t^=G.G18<<G.getBCHDigit(t)-G.getBCHDigit(G.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return G.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case A:return(t+r)%2==0;case R:return t%2==0;case j:return r%3==0;case D:return(t+r)%3==0;case N:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case F:return t*r%2+t*r%3==0;case q:return(t*r%2+t*r%3)%2==0;case I:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new k([1],0),r=0;r<e;r++)t=t.multiply(new k([1,M.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case E.MODE_NUMBER:return 10;case E.MODE_ALPHA_NUM:return 9;case E.MODE_8BIT_BYTE:case E.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case E.MODE_NUMBER:return 12;case E.MODE_ALPHA_NUM:return 11;case E.MODE_8BIT_BYTE:return 16;case E.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case E.MODE_NUMBER:return 14;case E.MODE_ALPHA_NUM:return 13;case E.MODE_8BIT_BYTE:return 16;case E.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(n,o),s=-1;s<=1;s++)if(!(n+s<0||t<=n+s))for(var u=-1;u<=1;u++)o+u<0||t<=o+u||0==s&&0==u||a==e.isDark(n+s,o+u)&&i++;i>5&&(r+=3+i-5)}for(n=0;n<t-1;n++)for(o=0;o<t-1;o++){var l=0;e.isDark(n,o)&&l++,e.isDark(n+1,o)&&l++,e.isDark(n,o+1)&&l++,e.isDark(n+1,o+1)&&l++,0!=l&&4!=l||(r+=3)}for(n=0;n<t;n++)for(o=0;o<t-6;o++)e.isDark(n,o)&&!e.isDark(n,o+1)&&e.isDark(n,o+2)&&e.isDark(n,o+3)&&e.isDark(n,o+4)&&!e.isDark(n,o+5)&&e.isDark(n,o+6)&&(r+=40);for(o=0;o<t;o++)for(n=0;n<t-6;n++)e.isDark(n,o)&&!e.isDark(n+1,o)&&e.isDark(n+2,o)&&e.isDark(n+3,o)&&e.isDark(n+4,o)&&!e.isDark(n+5,o)&&e.isDark(n+6,o)&&(r+=40);var c=0;for(o=0;o<t;o++)for(n=0;n<t;n++)e.isDark(n,o)&&c++;return r+=10*(Math.abs(100*c/t/t-50)/5)}},H=G;function Q(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var z=Q.prototype;z.addData=function(e){var t=new w(e);this.dataList.push(t),this.dataCache=null},z.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},z.getModuleCount=function(){return this.moduleCount},z.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=P.getRSBlocks(e,this.errorCorrectLevel),r=new T,n=0,o=0;o<t.length;o++)n+=t[o].dataCount;for(o=0;o<this.dataList.length;o++){var i=this.dataList[o];r.put(i.mode,4),r.put(i.getLength(),H.getLengthInBits(i.mode,e)),i.write(r)}if(r.getLengthInBits()<=8*n)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},z.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=Q.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},z.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},z.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=H.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},z.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(n.beginFill(0,100),n.moveTo(s,i),n.lineTo(s+1,i),n.lineTo(s+1,i+1),n.lineTo(s,i+1),n.endFill())}return n},z.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},z.setupPositionAdjustPattern=function(){for(var e=H.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],o=e[r];if(null==this.modules[n][o])for(var i=-2;i<=2;i++)for(var a=-2;a<=2;a++)this.modules[n+i][o+a]=-2==i||2==i||-2==a||2==a||0==i&&0==a}},z.setupTypeNumber=function(e){for(var t=H.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!e&&1==(t>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},z.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=H.getBCHTypeInfo(r),o=0;o<15;o++){var i=!e&&1==(n>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(n>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},z.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,o=7,i=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[n][a-s]){var u=!1;i<e.length&&(u=1==(e[i]>>>o&1)),H.getMask(t,n,a-s)&&(u=!u),this.modules[n][a-s]=u,-1==--o&&(i++,o=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}},Q.PAD0=236,Q.PAD1=17,Q.createData=function(e,t,r){for(var n=P.getRSBlocks(e,t),o=new T,i=0;i<r.length;i++){var a=r[i];o.put(a.mode,4),o.put(a.getLength(),H.getLengthInBits(a.mode,e)),a.write(o)}var s=0;for(i=0;i<n.length;i++)s+=n[i].dataCount;if(o.getLengthInBits()>8*s)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*s+")");for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(Q.PAD0,8),o.getLengthInBits()>=8*s));)o.put(Q.PAD1,8);return Q.createBytes(o,n)},Q.createBytes=function(e,t){for(var r=0,n=0,o=0,i=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s++){var u=t[s].dataCount,l=t[s].totalCount-u;n=Math.max(n,u),o=Math.max(o,l),i[s]=new Array(u);for(var c=0;c<i[s].length;c++)i[s][c]=255&e.buffer[c+r];r+=u;var f=H.getErrorCorrectPolynomial(l),h=new k(i[s],f.getLength()-1).mod(f);a[s]=new Array(f.getLength()-1);for(c=0;c<a[s].length;c++){var d=c+h.getLength()-a[s].length;a[s][c]=d>=0?h.get(d):0}}var p=0;for(c=0;c<t.length;c++)p+=t[c].totalCount;var g=new Array(p),m=0;for(c=0;c<n;c++)for(s=0;s<t.length;s++)c<i[s].length&&(g[m++]=i[s][c]);for(c=0;c<o;c++)for(s=0;s<t.length;s++)c<a[s].length&&(g[m++]=a[s][c]);return g};var $=Q;function W(e){return(W="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})(e)}function U(){return(U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){oe(e,t,r[t])})}return e}function X(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function V(e,t,r){return t&&J(e.prototype,t),r&&J(e,r),e}function Z(e,t){return!t||"object"!==W(t)&&"function"!=typeof t?ne(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n<2048?(t+=String.fromCharCode(192|n>>6),t+=String.fromCharCode(128|63&n)):n<55296||n>=57344?(t+=String.fromCharCode(224|n>>12),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|63&n)):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t+=String.fromCharCode(240|n>>18),t+=String.fromCharCode(128|n>>12&63),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|63&n))}return t}var ae={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},se={value:C.string.isRequired,size:C.number,level:C.oneOf(["L","M","Q","H"]),bgColor:C.string,fgColor:C.string,includeMargin:C.bool};function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[];return e.forEach(function(e,n){var o=null;e.forEach(function(i,a){if(!i&&null!==o)return r.push("M".concat(o+t," ").concat(n+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?r.push("M".concat(a+t,",").concat(n+t," h1v1H").concat(a+t,"z")):r.push("M".concat(o+t,",").concat(n+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}})}),r.join("")}var le=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),ce=function(e){function r(){var e,t;Y(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return oe(ne(ne(t=Z(this,(e=ee(r)).call.apply(e,[this].concat(o))))),"_canvas",void 0),t}return te(r,t.PureComponent),V(r,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,r=e.size,n=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=new $(-1,S[n]);if(s.addData(ie(t)),s.make(),null!=this._canvas){var u=this._canvas,l=u.getContext("2d");if(!l)return;var c=s.modules;if(null===c)return;var f=a?4:0,h=c.length+2*f,d=window.devicePixelRatio||1;u.height=u.width=r*d;var p=r/h*d;l.scale(p,p),l.fillStyle=o,l.fillRect(0,0,h,h),l.fillStyle=i,le?l.fill(new Path2D(ue(c,f))):c.forEach(function(e,t){e.forEach(function(e,r){e&&l.fillRect(r+f,t+f,1,1)})})}}},{key:"render",value:function(){var e=this,r=this.props,n=(r.value,r.size),o=(r.level,r.bgColor,r.fgColor,r.style),i=(r.includeMargin,X(r,["value","size","level","bgColor","fgColor","style","includeMargin"])),a=K({height:n,width:n},o);return t.createElement("canvas",U({style:a,height:n,width:n,ref:function(t){return e._canvas=t}},i))}}]),r}();oe(ce,"defaultProps",ae),oe(ce,"propTypes",se);var fe=function(e){function r(){return Y(this,r),Z(this,ee(r).apply(this,arguments))}return te(r,t.PureComponent),V(r,[{key:"render",value:function(){var e=this.props,r=e.value,n=e.size,o=e.level,i=e.bgColor,a=e.fgColor,s=e.includeMargin,u=X(e,["value","size","level","bgColor","fgColor","includeMargin"]),l=new $(-1,S[o]);l.addData(ie(r)),l.make();var c=l.modules;if(null===c)return null;var f=s?4:0,h=ue(c,f),d=c.length+2*f;return t.createElement("svg",U({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(d," ").concat(d)},u),t.createElement("path",{fill:i,d:"M0,0 h".concat(d,"v").concat(d,"H0z")}),t.createElement("path",{fill:a,d:h}))}}]),r}();oe(fe,"defaultProps",ae),oe(fe,"propTypes",se);var he=function(e){var r=e.renderAs,n=X(e,["renderAs"]),o="svg"===r?fe:ce;return t.createElement(o,n)};he.defaultProps=K({renderAs:"canvas"},ae);var de=he,pe={ready:"ready",loginFailed:"loginFailed",loginSuccess:"loginSuccess",scanComplete:"scanComplete",codeOutWork:"codeOutWork",networkLost:"networkLost",qrCodeGetting:"qrCodeGetting",qrCodeGetSuccess:"qrCodeGetSuccess",qrCodeGetFailed:"qrCodeGetFailed"},ge={eventSourceError:0},me=!1,ye=function(e){try{if(me){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console[e||"log"].apply(console,[" [WODAX_DEBUG]: "].concat(r))}}catch(e){console.error(e)}},ve=function(e){var n,o;function u(){for(var t,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(t=e.call.apply(e,[this].concat(o))||this).state={currentQrLoginState:pe.ready,qrcode:"",sseEvents:[]},t.updateQrCode=function(){var e=t.props,r=e.options,n=e.fetchQrCodeHandler,o=t.state.qrcode,u=r.useEventSourceForFetchQrCode;t.setState({currentQrLoginState:pe.qrCodeGetting},function(){var e;u?(t.uninstallEventSource(),t.installEventSource()):(e=i.mark(function e(){var r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=12;break}return e.prev=1,e.next=4,n(s(t));case 4:r=e.sent,a=r.code,u=r.data,0===a?o===u?t.setState({currentQrLoginState:pe.qrCodeGetSuccess}):(t.uninstallEventSource(),t.setState({currentQrLoginState:pe.qrCodeGetSuccess,qrcode:u},function(){t.installEventSource({qrcode:u})})):(t.uninstallEventSource(),t.setState({currentQrLoginState:pe.qrCodeGetFailed})),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.error(e.t0);case 12:case"end":return e.stop()}},e,null,[[1,9]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function s(e){a(i,n,o,s,u,"next",e)}function u(e){a(i,n,o,s,u,"throw",e)}s(void 0)})})()})},t.installEventSource=function(e){void 0===e&&(e={});var n=u.defaultProps.options,o=t.props,i=o.options,a=o.onReceiveMessageHandler,l=o.debugEnable;me=l;var c=r({},n,{},i).clientEventSource,f=c.url,h=c.params,d=c.messageTypes,p=c.withCredentials,g=c.saveAllEvents,m=Object.entries(r({},h,{},e)).map(function(e){return e[0]+"="+e[1]}).join("&"),y=encodeURI(f+(m.length>0?"?":"")+m);if(ye("log","---\x3e SSE url",y),EventSource){if(t.sse){if(t.sse.url===y)return;t.uninstallEventSource()}ye("log","--\x3e installEventSource"),t.sse=new EventSource(y,{withCredentials:!!p});var v=d||[];(v=v.includes("message")?v:v.concat(["message"])).forEach(function(e){t.sse.addEventListener(e,function(e){t.setState(function(t){return{sseEvents:(g?t.sseEvents:[]).concat(e)}}),a&&a(e,s(t))},!1)}),t.sse.onopen=function(e){ye("log","---\x3e SSE Open"),a&&a(e,s(t))},t.sse.onerror=function(e){var r=e.target.readyState;EventSource.CLOSED===r?ye("log","---\x3e SSE Disconnected"):EventSource.CONNECTING===r&&ye("log","---\x3e SSE Connecting..."),a&&a(e,s(t)),t.onErrorEventHandler({type:ge.eventSourceError,data:e})}}else console.error("Your browser doesn't support SSE")},t.uninstallEventSource=function(){t.props.debugEnable;if(t.sse)try{ye("log","--\x3e uninstallEventSource"),t.sse.close()}catch(e){ye("error","--\x3e uninstallEventSource [error]",e)}},t.onErrorEventHandler=function(e){try{e.type,e.data;ge.eventSourceError}catch(e){console.error(e)}},t}o=e,(n=u).prototype=Object.create(o.prototype),n.prototype.constructor=n,n.__proto__=o;var l=u.prototype;return l.componentDidMount=function(){this.updateQrCode()},l.componentWillUnmount=function(){this.uninstallEventSource()},l.render=function(){var e=this.props,n=e.className,o=e.style,i=e.titleRender,a=e.qrCodeRender,s=e.toolTipRender,u=e.additionLayerRender,l=e.refreshQrCodeRender,c=e.sseMessageRender;return t.createElement("div",{className:n,style:r({display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},o)},i(this),a(this),s(this),u(this),l(this),c(this))},u}(e.PureComponent);ve.getEnumStateQrCodeLogin=function(){return pe};var Ce={titleRender:function(e){var n=r({},ve.defaultProps.options,{},e.props.options),o=n.title,i=n.titleStyle,a=n.titleClassName,s=n.appLogo,u=n.appLogoClassName,l=n.appLogoStyle;return t.createElement("div",{className:a,style:r({padding:"4px"},i),wodaxuiname:"TitleContainer"},t.createElement("span",null,o),""!==s?t.createElement("div",{className:u,style:l,wodaxuiname:"appLogoContainer"},t.createElement("img",{src:s,alt:s})):null)},qrCodeRender:function(e){var n=r({},ve.defaultProps.options,{},e.props.options),o=n.qrCodeContainerClassName,i=n.qrCodeContainerStyle,a=n.qrCodeContainerOpacity,s=n.qrCodeConfig,u=e.state,l=u.qrcode,c=u.currentQrLoginState,f=[pe.loginFailed,pe.loginSuccess,pe.scanComplete,pe.codeOutWork,pe.networkLost,pe.qrCodeGetting,pe.qrCodeGetFailed].includes(c)?a.min:a.max;return t.createElement("div",{className:o,style:r({padding:"4px"},i,{opacity:f}),wodaxuiname:"qrCodeContainer"},""!==l&&t.createElement(de,{value:l,renderAs:s.renderAs,size:s.size,bgColor:s.bgColor,fgColor:s.fgColor,level:s.level,includeMargin:s.includeMargin}))},toolTipRender:function(n){var o=ve.defaultProps.options,i=n.props.options,a=r({},o,{},i),s=a.toolTipContainerClassName,u=a.toolTipContainerStyle,l=a.toolTipContainerProps,c=n.state.currentQrLoginState;return function(){var n={};Object.entries(pe).map(function(e){var t=e[0];e[1];["Text","ClassName","Style"].forEach(function(e){var a;r({},o,{},i).hasOwnProperty(""+t+e)&&(n[t]=n[t]||{},n[t]=r(((a={})[""+e]=r({},o,{},i)[""+t+e],a),n[t]))})});var a=n[c];return a?e.createElement("div",r({className:s,style:u,wodaxuiname:"toolTipContainer"},l),t.createElement("div",{className:a.ClassName,style:r({padding:"4px"},a.Style)},t.createElement("span",null,a.Text))):null}()},additionLayerRender:function(e){return null},refreshQrCodeRender:function(t){var n=r({},ve.defaultProps.options,{},t.props.options),o=n.refreshContainerShowEveryTime,i=n.refreshContainerProps,a=n.refreshButtonCaption,s=n.refreshButtonElement,u=n.refreshButtonProps,l=t.state.currentQrLoginState;return([pe.loginFailed,pe.codeOutWork,pe.qrCodeGetFailed].indexOf(l)>0||o)&&e.createElement("div",r({wodaxuiname:"RefreshContainer"},i),e.createElement(s,r({wodaxuiname:"RefreshButton",onClick:function(){t.updateQrCode()}},u),a))},sseMessageRender:function(e){var n=e.state.sseEvents,o=r({},ve.defaultProps.options,{},e.props.options).showSSEMessage;return e.sse&&n.length>0&&o?t.createElement("div",{wodaxuiname:"sseMessageRender",children:n.map(function(e){return t.createElement("p",null,e.data)})}):null},fetchQrCodeHandler:function(e){return new Promise(function(e,t){e({code:0,data:"http://ops.woda.ink/wodax/umi/"+Date.now()})})},onReceiveMessageHandler:function(e,t){}};return ve.propTypes={className:C.string,Style:C.object,debugEnable:C.bool,options:C.shape({useEventSourceForFetchQrCode:C.bool,clientEventSource:C.shape({url:C.string,params:C.object,messageTypes:C.array,withCredentials:C.bool,saveAllEvents:C.bool}),title:C.string,titleStyle:C.object,titleClassName:C.string,appLogo:C.string,appLogoClassName:C.string,appLogoStyle:C.object,qrCodeConfig:C.shape({renderAs:C.string,size:C.number,bgColor:C.string,fgColor:C.string,level:C.string,includeMargin:C.bool}),qrCodeContainerClassName:C.string,qrCodeContainerStyle:C.object,qrCodeContainerOpacity:C.shape({min:C.number,max:C.number}),toolTipContainerClassName:C.string,toolTipContainerStyle:C.object,toolTipContainerProps:C.object,codeOutWorkText:C.string,codeOutWorkClassName:C.string,codeOutWorkStyle:C.object,loginFailedText:C.string,loginFailedClassName:C.string,loginFailedStyle:C.object,loginSuccessText:C.string,loginSuccessClassName:C.string,loginSuccessStyle:C.object,qrCodeGetFailedText:C.string,qrCodeGetFailedClassName:C.string,qrCodeGetFailedStyle:C.object,scanCompleteText:C.string,scanCompleteClassName:C.string,scanCompleteStyle:C.object,refreshContainerShowEveryTime:C.bool,refreshContainerProps:C.object,refreshButtonCaption:C.string,refreshButtonElement:C.string|C.element|C.elementType|C.func,refreshButtonProps:C.object,showSSEMessage:C.bool}),fetchQrCodeHandler:C.func.isRequired,onReceiveMessageHandler:C.func,titleRender:C.func.isRequired,qrCodeRender:C.func.isRequired,toolTipRender:C.func.isRequired,additionLayerRender:C.func,refreshQrCodeRender:C.func.isRequired,sseMessageRender:C.func.isRequired},ve.defaultProps={className:"wodax-login-with-qrcode",Style:{},debugEnable:!1,options:{useEventSourceForFetchQrCode:!1,clientEventSource:{url:"https://stream.wikimedia.org/v2/stream/recentchange",params:{},messageTypes:["message"],withCredentials:!1,saveAllEvents:!1},title:"打开App,扫码登录",titleClassName:"qr-login-title",appLogo:"",qrCodeConfig:{renderAs:"canvas",size:128,bgColor:"#FFFFFF",fgColor:"#000000",level:"L",includeMargin:!1},qrCodeContainerOpacity:{min:.01,max:1},toolTipContainerClassName:"qr-login-tooltip",toolTipContainerStyle:{padding:"4px",position:"absolute"},codeOutWorkText:"二维码已失效",loginFailedText:"登录失败",loginSuccessText:"登录成功",qrCodeGetFailedText:"获取二维码失败",scanCompleteText:"扫描成功! 请在手机上确认登录",refreshContainerShowEveryTime:!1,refreshContainerProps:{style:{padding:"4px",position:"absolute",marginTop:"40px"}},refreshButtonCaption:"请点击刷新",refreshButtonElement:"button",refreshButtonProps:{style:{padding:"4px"}},showSSEMessage:!1},fetchQrCodeHandler:Ce.fetchQrCodeHandler,onReceiveMessageHandler:Ce.onReceiveMessageHandler,titleRender:Ce.titleRender,qrCodeRender:Ce.qrCodeRender,toolTipRender:Ce.toolTipRender,additionLayerRender:Ce.additionLayerRender,refreshQrCodeRender:Ce.refreshQrCodeRender,sseMessageRender:Ce.sseMessageRender},ve});
//# sourceMappingURL=index-prod.umd.js.map