diff --git a/demo.html b/demo.html
index 3d535e1..49d0239 100644
--- a/demo.html
+++ b/demo.html
@@ -1,113 +1,298 @@
-
+
+
- Demo
-
+ IScan Demo
- IScan
-
-
-
-
-
-
-
-
-
diff --git a/dist/index.html b/dist/index.html
index 1f0ff8d..bc8ea40 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1,85 +1,228 @@
-DemoIScan
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
index 5cd3767..3293b32 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1 +1 @@
-!function(A){var n={};function t(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return A[e].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=A,t.c=n,t.d=function(A,n,e){t.o(A,n)||Object.defineProperty(A,n,{enumerable:!0,get:e})},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},t.t=function(A,n){if(1&n&&(A=t(A)),8&n)return A;if(4&n&&"object"==typeof A&&A&&A.__esModule)return A;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:A}),2&n&&"string"!=typeof A)for(var r in A)t.d(e,r,function(n){return A[n]}.bind(null,r));return e},t.n=function(A){var n=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(n,"a",n),n},t.o=function(A,n){return Object.prototype.hasOwnProperty.call(A,n)},t.p="",t(t.s=7)}([function(A,n,t){"use strict";n.__esModule=!0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};n.getVersion=function(){return r.version},n.getConfig=function(A){return Object.prototype.hasOwnProperty.call(i,A)?i[A]:Object.prototype.hasOwnProperty.call(o,A)?o[A]:void 0},n.setConfig=function(A){A&&"object"==(void 0===A?"undefined":e(A))&&Object.assign(i,A)};var r={version:"0.0.1.0430.1515"},o={},i={}},function(A,n,t){"use strict";n.__esModule=!0;var e;e="undefined"!=typeof GameGlobal?Object.assign({},GameGlobal):"undefined"==typeof window?{setTimeout:function(A){function n(){return A.apply(this,arguments)}return n.toString=function(){return A.toString()},n}((function(){return setTimeout.apply(void 0,arguments)})),setInterval:function(A){function n(){return A.apply(this,arguments)}return n.toString=function(){return A.toString()},n}((function(){return setInterval.apply(void 0,arguments)})),clearTimeout:function(A){function n(){return A.apply(this,arguments)}return n.toString=function(){return A.toString()},n}((function(){return clearTimeout.apply(void 0,arguments)})),clearInterval:function(A){function n(){return A.apply(this,arguments)}return n.toString=function(){return A.toString()},n}((function(){return clearInterval.apply(void 0,arguments)}))}:window,n.default=e},function(A,n,t){"use strict";n.__esModule=!0,n.createUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(A){var n=16*Math.random()|0;return("x"==A?n:3&n|8).toString(16)}))}},function(A,n,t){"use strict";n.__esModule=!0,n.isReadyCalled=function(){return c},t(8);var e=t(0),r=t(13),o=t(6),i=t(5),u=null,c=!1;n.default=Object.assign({},{config:function(A){return A&&(0,e.setConfig)(A),u||(u=Promise.resolve().then((function(){return(0,i.printDebug)("-------------------------------------"),(0,i.printDebug)("sdk_version:",(0,e.getVersion)()),(0,i.printDebug)("-------------------------------------"),(0,o.initWxJssdk)(),Promise.resolve().then((function(){c=!0})).catch((function(A){throw u=null,A}))})))},onScanListener:r.onScanListener,offScanListener:r.offScanListener,setStatusListener:r.setStatusListener,getStatus:r.getStatus,startScan:r.startScan,stopScan:r.stopScan,clear:r.clear})},function(A,n,t){"use strict";n.__esModule=!0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};n.toAny=function(A,n){if(null==A)return n;var t=function(A){if("string"!=typeof A)return void 0===A?"undefined":e(A);try{var n=JSON.parse(A);return void 0===n?"undefined":e(n)}catch(n){var t=parseFloat(A);return isNaN(t)||""+t!==A?"string":"number"}}(A);switch(null!=n&&(t=void 0===n?"undefined":e(n)),t){case"number":return function(A){try{return JSON.parse(A)}catch(n){return parseFloat(A)}}(A);case"boolean":return function(A){return!!A&&"false"!=A&&"0"!=A}(A);case"object":return function(A,n){if("object"===(void 0===A?"undefined":e(A)))return A;try{return JSON.parse(A)}catch(A){}return n}(A,n);case"string":return function(A,n){try{var t=void 0===A?"undefined":e(A);if("string"===t)return A;if("boolean"===t)return A?"true":"false";if("number"===t)return""+A;if("object"===t)return JSON.stringify(A)}catch(A){}return n}(A,n)}return n}},function(A,n,t){"use strict";n.__esModule=!0,n.printError=function(A){for(var n,t=arguments.length,e=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1)for(var t=1;t0?(0,i.startScanner)((function(A){!function(A){if(function(A){for(var n=0;n=0&&t.splice(e,1)}},n.bridgeSync=f,n.bridgeAsync=function(A,n,t){return new Promise((function(e,r){if(s()){var i=!1,c=null;t>0&&(c=setTimeout((function(){i=!0,c=null,r("bridgeAsync timeout")}),t));var a=(0,o.createUUID)()+"_"+Date.now();!function(A,n){n&&(u[A]=n)}(a,(function(A,n){i||(c&&clearTimeout(c),0==A?e(n):r(n))})),f(A,Object.assign({request_id:a},n))}else r("Can't bridgeAsync, because not in runtime")})).then((function(t){var e=[A];return n&&(e.push("params:"),e.push(n)),t&&(e.push("resp:"),e.push(t)),r.printDebug.apply(void 0,["bridge resp >>>"].concat(e)),t})).catch((function(t){throw n?(0,r.printWarn)("bridge err >>>",A,"params:",n,t):(0,r.printWarn)("bridge err >>>",A,t),t}))};var e=t(4),r=t(5),o=t(2),i={},u={},c="__bridge_client__";function a(){var A=c+"_handle_callback";window[A]||(window[A]=function(A){var n=(0,e.toAny)(A,{}),t=n.method,r=n.payload,o=n.code,c=n.request_id,a=(0,e.toAny)(r,{});c?u[c]&&u[c](o,a):i[t]&&i[t].forEach((function(A){A&&A(a)}))})}function s(){return!!window[c]}function f(A,n){a();var t=(0,e.toAny)(function(A){for(var n=A.split("."),t=window;n.length>1;)t=t[n.shift()];if(t&&1==n.length&&t.hasOwnProperty(n[0])){for(var e,r=arguments.length,o=Array(r>1?r-1:0),i=1;i>>"].concat(o)),t}},function(A,n,t){"use strict";n.__esModule=!0,n.isSupportWebScan=function(){return"undefined"!=typeof navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&"undefined"!=typeof BarcodeDetector},n.isSupportImageScan=function(){return"undefined"!=typeof document&&"undefined"!=typeof BarcodeDetector&&"undefined"!=typeof URL&&URL.createObjectURL},n.stopScanForWeb=function(){return Promise.resolve().then((function(){o.uuid=null}))},n.startScanForImage=function(){return s((0,r.getConfig)("webScanType")).then((function(A){return new Promise((function(A){var n=document.createElement("input");n.type="file",n.accept="image/*",n.style.display="none";var t=!1,e=function(n){t||(t=!0,u("__webscan_image_input__"),A(n))};n.id="__webscan_image_input__",n.onchange=function(){e(n.files&&n.files[0])},n.oncancel=function(){e(null)},document.body.appendChild(n),n.click()})).then((function(n){return function(A,n){return n?"undefined"!=typeof createImageBitmap?createImageBitmap(n).then((function(n){return A.detect(n).then((function(A){return n.close&&n.close(),A&&A[0]})).catch((function(A){throw n.close&&n.close(),A}))})):new Promise((function(t,e){var r=new Image,o=URL.createObjectURL(n);r.onload=function(){A.detect(r).then((function(A){URL.revokeObjectURL(o),t(A&&A[0])})).catch((function(A){URL.revokeObjectURL(o),e(A)}))},r.onerror=function(A){URL.revokeObjectURL(o),e(A)},r.src=o})):Promise.resolve(null)}(A,n)}))})).then((function(A){return A&&A.rawValue?{result:A.rawValue}:{success:!1,error:"未识别到二维码或条形码"}}))},n.startScanForWeb=function(A,n){return new Promise((function(t,u){try{o.uuid=(0,e.createUUID)(),o.finish=!1;var f,l=c("video","__webscan_video__","display: none",!1),g=!1!==(0,r.getConfig)("webCanvasEnabled"),d=A||"position: fixed; width: 300px; height: 240px; top: 0; left: 0; z-index: 9999;",p=c("canvas","__webscan_canvas__",d+" display: none;",!0);p.style.display,p.style.cssText=d,f=p.style.display,p.style.display="none";var C=p.getContext("2d"),h=o.uuid;l.width=300,l.height=300,l.uuid=o.uuid,s((0,r.getConfig)("webScanType")).then((function(A){return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(n){return{detector:A,stream:n}}))})).then((function(A){var e=A.detector,c=A.stream;l.srcObject=c,l.setAttribute("playsinline",!0),l.play(),p.style.display="none";var s=!1,d=!1,w=!1,v=function(){if(!w){w=!0;try{c.getTracks()[0].stop()}catch(A){}}};requestAnimationFrame((function(){!function A(){try{l.readyState!==l.HAVE_ENOUGH_DATA||s||(p.height=l.videoHeight,p.width=l.videoWidth,C.setTransform(-1,0,0,1,p.width,0),C.drawImage(l,0,0,p.width,p.height),C.setTransform(1,0,0,1,0,0),g&&!d&&(d=!0,p.style.display=f||""),s=!0,e.detect(l).then((function(A){var e=A&&A[0];if(e&&e.rawValue&&o.uuid==h){if(!n||!n(e.rawValue))return;!function(A,n,t){var e=t.cornerPoints;if(e&&e.length)for(var r=0;r1&&(t[n[0]]=n[1])}})),a.status>=200&&a.status<300){var e={errMsg:"request:ok"};try{var r=JSON.parse(a.response);e.data=r}catch(A){e.data=a.response}e.header=t,e.statusCode=a.status,A.success&&A.success(e)}else A.fail&&A.fail({errMsg:"request:fail",data:a.response,header:t})}},a.send(n)}(Object.assign({},{url:n,method:t,data:s,headers:u,json:c,timeout:a},{success:A,fail:e}))})).then((function(A){if(A.statusCode&&200!=A.statusCode)throw A;return A}))};var e=t(2),r=t(18),o=t(19)},function(A,n,t){"use strict";n.__esModule=!0,n.hex_md5=function(A){return d(r(l(A),A.length*e))},n.b64_md5=function(A){return p(r(l(A),A.length*e))},n.str_md5=function(A){return g(r(l(A),A.length*e))},n.hex_hmac_md5=function(A,n){return d(s(A,n))},n.b64_hmac_md5=function(A,n){return p(s(A,n))},n.str_hmac_md5=function(A,n){return g(s(A,n))};var e=8;function r(A,n){A[n>>5]|=128<>>9<<4)]=n;for(var t=1732584193,e=-271733879,r=-1732584194,o=271733878,s=0;s>>32-n}(f(f(n,A),f(e,o)),r),t)}function i(A,n,t,e,r,i,u){return o(n&t|~n&e,A,n,r,i,u)}function u(A,n,t,e,r,i,u){return o(n&e|t&~e,A,n,r,i,u)}function c(A,n,t,e,r,i,u){return o(n^t^e,A,n,r,i,u)}function a(A,n,t,e,r,i,u){return o(t^(n|~e),A,n,r,i,u)}function s(A,n){var t=l(A);t.length>16&&(t=r(t,A.length*e));for(var o=Array(16),i=Array(16),u=0;u<16;u++)o[u]=909522486^t[u],i[u]=1549556828^t[u];var c=r(o.concat(l(n)),512+n.length*e);return r(i.concat(c),640)}function f(A,n){var t=(65535&A)+(65535&n);return(A>>16)+(n>>16)+(t>>16)<<16|65535&t}function l(A){for(var n=Array(),t=(1<>5]|=(A.charCodeAt(r/e)&t)<>5]>>>r%32&t);return n}function d(A){for(var n="0123456789abcdef",t="",e=0;e<4*A.length;e++)t+=n.charAt(A[e>>2]>>e%4*8+4&15)+n.charAt(A[e>>2]>>e%4*8&15);return t}function p(A){for(var n="",t=0;t<4*A.length;t+=3)for(var e=(A[t>>2]>>t%4*8&255)<<16|(A[t+1>>2]>>(t+1)%4*8&255)<<8|A[t+2>>2]>>(t+2)%4*8&255,r=0;r<4;r++)8*t+6*r>32*A.length?n+="":n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>6*(3-r)&63);return n}},function(A,n,t){"use strict";n.__esModule=!0,n.stringifyQuery=function(A){return Object.keys(A).map((function(n){var t=A[n];return n+"="+encodeURIComponent(t)})).join("&")},n.decodeQuery=function(A){return Object.keys(A).reduce((function(n,t){var e=A[t];return n[t]=decodeURIComponent(e),n}),{})},n.parseQueryParams=r,n.appendQueryParams=function(A){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(A),e=t.url,o=t.params;Object.keys(n).forEach((function(A){var t=n[A];null!=t?o[A]=t:delete o[A]}));var i=Object.keys(o).map((function(A){var n=o[A];return A+"="+encodeURIComponent(n)})).join("&");return e?i?e+"?"+i:e:i},n.getQueryString=function(A,n){var t=e.default.location.search,r=new RegExp("(^|&)"+A+"=([^&]*)(&|$)"),o=t.substr(1).match(r);return null!=o?decodeURIComponent(unescape(o[2])):n};var e=function(A){return A&&A.__esModule?A:{default:A}}(t(1));function r(A){var n="",t={};if(!A||"string"!=typeof A)return{url:n,params:t};var e="",r=A.indexOf("?"),o=A.indexOf("#"),i=A.indexOf("=");return r>=0?(n=A.substring(0,r),e=A.substring(r+1,o>0?o:A.length)):i>=0?(n="",e=A):(n=A,e=""),e.split("&").map((function(A){var n=A.indexOf("=");if(n>0){var e=A.substring(0,n),r=A.substring(n+1);t[e]=decodeURIComponent(r)}})),{url:n,params:t}}},function(A,n,t){"use strict";n.__esModule=!0,n.startScanner=function(A){A&&"function"==typeof A&&(e=A,"scanning"!==r&&(r="scanning",c(),window.addEventListener("keydown",a)))},n.stopScanner=function(){"scanning"===r&&(r="closed",e=null,c(),window.removeEventListener("keydown",a))};var e=null,r="closed",o="",i=null,u=0;function c(){o="",u=0,i&&(clearTimeout(i),i=null)}function a(A){if("scanning"===r&&!(A.ctrlKey||A.metaKey||A.altKey)){if("Enter"===A.key){var n=function(A){return A.replace(/[\uFF01-\uFF5E]/g,(function(A){return String.fromCharCode(A.charCodeAt(0)-65248)})).replace(/\u3002/g,".")}(o);return n&&function(A){A.preventDefault&&A.preventDefault(),A.stopPropagation&&A.stopPropagation()}(A),c(),void(n&&e&&e(n))}if(A.key&&1===A.key.length){var t=Date.now();u&&t-u>100&&c(),u=t,o+=A.key,i&&clearTimeout(i),i=setTimeout((function(){c()}),100)}}}},function(A,n,t){"use strict";n.__esModule=!0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};n.exportSDK=function(A,n){for(var t=arguments.length,o=Array(t>2?t-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:"",r={};return Object.keys(n).forEach((function(o){var i=n[o];if("object"===(void 0===i?"undefined":e(i)))Object.assign(r,A(i,""+t+o+"."));else if("function"==typeof i){var u,c=""+t+o;Object.assign(r,((u={})[c]=c,u))}})),r}(A);var c={};return Object.keys(u).forEach((function(n){var t=u[n],e=t&&t.method||n;!function(A,n,t){var e=n.split(".");e.forEach((function(n,r){r==e.length-1?A[n]=t:A[n]||(A[n]={}),A=A[n]}))}(c,n,(function(){for(var t=arguments.length,i=Array(t),u=0;u1;)t=t[e.shift()];if(t&&1==e.length&&t.hasOwnProperty(e[0])){for(var r,o=arguments.length,i=Array(o>2?o-2:0),u=2;u1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1)for(var t=1;t0?(0,i.startScanner)((function(A){!function(A){if(function(A){for(var n=0;n=0&&t.splice(e,1)}},n.bridgeSync=f,n.bridgeAsync=function(A,n,t){return new Promise((function(e,r){if(s()){var i=!1,c=null;t>0&&(c=setTimeout((function(){i=!0,c=null,r("bridgeAsync timeout")}),t));var a=(0,o.createUUID)()+"_"+Date.now();!function(A,n){n&&(u[A]=n)}(a,(function(A,n){i||(c&&clearTimeout(c),0==A?e(n):r(n))})),f(A,Object.assign({request_id:a},n))}else r("Can't bridgeAsync, because not in runtime")})).then((function(t){var e=[A];return n&&(e.push("params:"),e.push(n)),t&&(e.push("resp:"),e.push(t)),r.printDebug.apply(void 0,["bridge resp >>>"].concat(e)),t})).catch((function(t){throw n?(0,r.printWarn)("bridge err >>>",A,"params:",n,t):(0,r.printWarn)("bridge err >>>",A,t),t}))};var e=t(4),r=t(5),o=t(2),i={},u={},c="__bridge_client__";function a(){var A=c+"_handle_callback";window[A]||(window[A]=function(A){var n=(0,e.toAny)(A,{}),t=n.method,r=n.payload,o=n.code,c=n.request_id,a=(0,e.toAny)(r,{});c?u[c]&&u[c](o,a):i[t]&&i[t].forEach((function(A){A&&A(a)}))})}function s(){return!!window[c]}function f(A,n){a();var t=(0,e.toAny)(function(A){for(var n=A.split("."),t=window;n.length>1;)t=t[n.shift()];if(t&&1==n.length&&t.hasOwnProperty(n[0])){for(var e,r=arguments.length,o=Array(r>1?r-1:0),i=1;i>>"].concat(o)),t}},function(A,n,t){"use strict";n.__esModule=!0,n.isSupportWebScan=function(){return"undefined"!=typeof navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&"undefined"!=typeof BarcodeDetector},n.isSupportImageScan=function(){return"undefined"!=typeof document&&"undefined"!=typeof BarcodeDetector&&"undefined"!=typeof URL&&URL.createObjectURL},n.stopScanForWeb=function(){return Promise.resolve().then((function(){o.uuid=null}))},n.startScanForImage=function(){return s((0,r.getConfig)("webScanType")).then((function(A){return new Promise((function(A){var n=document.createElement("input");n.type="file",n.accept="image/*",n.style.display="none";var t=!1,e=function(n){t||(t=!0,u("__webscan_image_input__"),A(n))};n.id="__webscan_image_input__",n.onchange=function(){e(n.files&&n.files[0])},n.oncancel=function(){e(null)},document.body.appendChild(n),n.click()})).then((function(n){return function(A,n){return n?"undefined"!=typeof createImageBitmap?createImageBitmap(n).then((function(n){return A.detect(n).then((function(A){return n.close&&n.close(),A&&A[0]})).catch((function(A){throw n.close&&n.close(),A}))})):new Promise((function(t,e){var r=new Image,o=URL.createObjectURL(n);r.onload=function(){A.detect(r).then((function(A){URL.revokeObjectURL(o),t(A&&A[0])})).catch((function(A){URL.revokeObjectURL(o),e(A)}))},r.onerror=function(A){URL.revokeObjectURL(o),e(A)},r.src=o})):Promise.resolve(null)}(A,n)}))})).then((function(A){return A&&A.rawValue?{result:A.rawValue}:{success:!1,error:"未识别到二维码或条形码"}}))},n.startScanForWeb=function(A,n){return new Promise((function(t,u){try{o.uuid=(0,e.createUUID)(),o.finish=!1;var f,l=c("video","__webscan_video__","display: none",!1),g=!1!==(0,r.getConfig)("webCanvasEnabled"),d=A||"position: fixed; width: 300px; height: 240px; top: 0; left: 0; z-index: 9999;",p=c("canvas","__webscan_canvas__",d+" display: none;",!0);p.style.display,p.style.cssText=d,f=p.style.display,p.style.display="none";var C=p.getContext("2d"),h=o.uuid;l.width=300,l.height=300,l.uuid=o.uuid,s((0,r.getConfig)("webScanType")).then((function(A){return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(n){return{detector:A,stream:n}}))})).then((function(A){var e=A.detector,c=A.stream;l.srcObject=c,l.setAttribute("playsinline",!0),l.play(),p.style.display="none";var s=!1,d=!1,w=!1,v=function(){if(!w){w=!0;try{c.getTracks()[0].stop()}catch(A){}}};requestAnimationFrame((function(){!function A(){try{l.readyState!==l.HAVE_ENOUGH_DATA||s||(p.height=l.videoHeight,p.width=l.videoWidth,C.setTransform(-1,0,0,1,p.width,0),C.drawImage(l,0,0,p.width,p.height),C.setTransform(1,0,0,1,0,0),g&&!d&&(d=!0,p.style.display=f||""),s=!0,e.detect(l).then((function(A){var e=A&&A[0];if(e&&e.rawValue&&o.uuid==h){if(!n||!n(e.rawValue))return;!function(A,n,t){var e=t.cornerPoints;if(e&&e.length)for(var r=0;r1&&(t[n[0]]=n[1])}})),a.status>=200&&a.status<300){var e={errMsg:"request:ok"};try{var r=JSON.parse(a.response);e.data=r}catch(A){e.data=a.response}e.header=t,e.statusCode=a.status,A.success&&A.success(e)}else A.fail&&A.fail({errMsg:"request:fail",data:a.response,header:t})}},a.send(n)}(Object.assign({},{url:n,method:t,data:s,headers:u,json:c,timeout:a},{success:A,fail:e}))})).then((function(A){if(A.statusCode&&200!=A.statusCode)throw A;return A}))};var e=t(2),r=t(18),o=t(19)},function(A,n,t){"use strict";n.__esModule=!0,n.hex_md5=function(A){return d(r(l(A),A.length*e))},n.b64_md5=function(A){return p(r(l(A),A.length*e))},n.str_md5=function(A){return g(r(l(A),A.length*e))},n.hex_hmac_md5=function(A,n){return d(s(A,n))},n.b64_hmac_md5=function(A,n){return p(s(A,n))},n.str_hmac_md5=function(A,n){return g(s(A,n))};var e=8;function r(A,n){A[n>>5]|=128<>>9<<4)]=n;for(var t=1732584193,e=-271733879,r=-1732584194,o=271733878,s=0;s>>32-n}(f(f(n,A),f(e,o)),r),t)}function i(A,n,t,e,r,i,u){return o(n&t|~n&e,A,n,r,i,u)}function u(A,n,t,e,r,i,u){return o(n&e|t&~e,A,n,r,i,u)}function c(A,n,t,e,r,i,u){return o(n^t^e,A,n,r,i,u)}function a(A,n,t,e,r,i,u){return o(t^(n|~e),A,n,r,i,u)}function s(A,n){var t=l(A);t.length>16&&(t=r(t,A.length*e));for(var o=Array(16),i=Array(16),u=0;u<16;u++)o[u]=909522486^t[u],i[u]=1549556828^t[u];var c=r(o.concat(l(n)),512+n.length*e);return r(i.concat(c),640)}function f(A,n){var t=(65535&A)+(65535&n);return(A>>16)+(n>>16)+(t>>16)<<16|65535&t}function l(A){for(var n=Array(),t=(1<>5]|=(A.charCodeAt(r/e)&t)<>5]>>>r%32&t);return n}function d(A){for(var n="0123456789abcdef",t="",e=0;e<4*A.length;e++)t+=n.charAt(A[e>>2]>>e%4*8+4&15)+n.charAt(A[e>>2]>>e%4*8&15);return t}function p(A){for(var n="",t=0;t<4*A.length;t+=3)for(var e=(A[t>>2]>>t%4*8&255)<<16|(A[t+1>>2]>>(t+1)%4*8&255)<<8|A[t+2>>2]>>(t+2)%4*8&255,r=0;r<4;r++)8*t+6*r>32*A.length?n+="":n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>6*(3-r)&63);return n}},function(A,n,t){"use strict";n.__esModule=!0,n.stringifyQuery=function(A){return Object.keys(A).map((function(n){var t=A[n];return n+"="+encodeURIComponent(t)})).join("&")},n.decodeQuery=function(A){return Object.keys(A).reduce((function(n,t){var e=A[t];return n[t]=decodeURIComponent(e),n}),{})},n.parseQueryParams=r,n.appendQueryParams=function(A){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(A),e=t.url,o=t.params;Object.keys(n).forEach((function(A){var t=n[A];null!=t?o[A]=t:delete o[A]}));var i=Object.keys(o).map((function(A){var n=o[A];return A+"="+encodeURIComponent(n)})).join("&");return e?i?e+"?"+i:e:i},n.getQueryString=function(A,n){var t=e.default.location.search,r=new RegExp("(^|&)"+A+"=([^&]*)(&|$)"),o=t.substr(1).match(r);return null!=o?decodeURIComponent(unescape(o[2])):n};var e=function(A){return A&&A.__esModule?A:{default:A}}(t(1));function r(A){var n="",t={};if(!A||"string"!=typeof A)return{url:n,params:t};var e="",r=A.indexOf("?"),o=A.indexOf("#"),i=A.indexOf("=");return r>=0?(n=A.substring(0,r),e=A.substring(r+1,o>0?o:A.length)):i>=0?(n="",e=A):(n=A,e=""),e.split("&").map((function(A){var n=A.indexOf("=");if(n>0){var e=A.substring(0,n),r=A.substring(n+1);t[e]=decodeURIComponent(r)}})),{url:n,params:t}}},function(A,n,t){"use strict";n.__esModule=!0,n.startScanner=function(A){A&&"function"==typeof A&&(e=A,"scanning"!==r&&(r="scanning",c(),window.addEventListener("keydown",a)))},n.stopScanner=function(){"scanning"===r&&(r="closed",e=null,c(),window.removeEventListener("keydown",a))};var e=null,r="closed",o="",i=null,u=0;function c(){o="",u=0,i&&(clearTimeout(i),i=null)}function a(A){if("scanning"===r&&!(A.ctrlKey||A.metaKey||A.altKey)){if("Enter"===A.key){var n=function(A){return A.replace(/[\uFF01-\uFF5E]/g,(function(A){return String.fromCharCode(A.charCodeAt(0)-65248)})).replace(/\u3002/g,".")}(o);return n&&function(A){A.preventDefault&&A.preventDefault(),A.stopPropagation&&A.stopPropagation()}(A),c(),void(n&&e&&e(n))}if(A.key&&1===A.key.length){var t=Date.now();u&&t-u>100&&c(),u=t,o+=A.key,i&&clearTimeout(i),i=setTimeout((function(){c()}),100)}}}},function(A,n,t){"use strict";n.__esModule=!0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};n.exportSDK=function(A,n){for(var t=arguments.length,o=Array(t>2?t-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:"",r={};return Object.keys(n).forEach((function(o){var i=n[o];if("object"===(void 0===i?"undefined":e(i)))Object.assign(r,A(i,""+t+o+"."));else if("function"==typeof i){var u,c=""+t+o;Object.assign(r,((u={})[c]=c,u))}})),r}(A);var c={};return Object.keys(u).forEach((function(n){var t=u[n],e=t&&t.method||n;!function(A,n,t){var e=n.split(".");e.forEach((function(n,r){r==e.length-1?A[n]=t:A[n]||(A[n]={}),A=A[n]}))}(c,n,(function(){for(var t=arguments.length,i=Array(t),u=0;u1;)t=t[e.shift()];if(t&&1==e.length&&t.hasOwnProperty(e[0])){for(var r,o=arguments.length,i=Array(o>2?o-2:0),u=2;u