From 956f522703841da6cc0ec09c6acfe1d5a3567e95 Mon Sep 17 00:00:00 2001 From: nuintun Date: Tue, 5 Nov 2024 10:39:10 +0800 Subject: [PATCH] feat: Update examples --- packages/examples/app/index.html | 2 +- .../public/css/{79ce66439417caf1.css => 690d3d8ea191f0eb.css} | 2 +- .../app/public/js/{94caba112e073461.js => 16a5275ddb242ef7.js} | 2 +- packages/examples/app/public/js/59d34b1ac42cc0d3.js | 1 + packages/examples/app/public/js/840461e298d37815.js | 1 - .../app/public/js/{7230b70b48a87b86.js => 845faaac92140806.js} | 2 +- .../app/public/js/{8e495a2dba275d3c.js => ae3d91876e58defa.js} | 2 +- .../app/public/js/{2b5f82a811b3b292.js => df7340bfdf330a14.js} | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename packages/examples/app/public/css/{79ce66439417caf1.css => 690d3d8ea191f0eb.css} (96%) rename packages/examples/app/public/js/{94caba112e073461.js => 16a5275ddb242ef7.js} (99%) create mode 100644 packages/examples/app/public/js/59d34b1ac42cc0d3.js delete mode 100644 packages/examples/app/public/js/840461e298d37815.js rename packages/examples/app/public/js/{7230b70b48a87b86.js => 845faaac92140806.js} (82%) rename packages/examples/app/public/js/{8e495a2dba275d3c.js => ae3d91876e58defa.js} (89%) rename packages/examples/app/public/js/{2b5f82a811b3b292.js => df7340bfdf330a14.js} (87%) diff --git a/packages/examples/app/index.html b/packages/examples/app/index.html index e72d1630..7cb8c3a3 100644 --- a/packages/examples/app/index.html +++ b/packages/examples/app/index.html @@ -1 +1 @@ -二维码
\ No newline at end of file +二维码
\ No newline at end of file diff --git a/packages/examples/app/public/css/79ce66439417caf1.css b/packages/examples/app/public/css/690d3d8ea191f0eb.css similarity index 96% rename from packages/examples/app/public/css/79ce66439417caf1.css rename to packages/examples/app/public/css/690d3d8ea191f0eb.css index 911c588f..64bb34d6 100644 --- a/packages/examples/app/public/css/79ce66439417caf1.css +++ b/packages/examples/app/public/css/690d3d8ea191f0eb.css @@ -1 +1 @@ -html,body{width:100%;height:100%}input::-ms-clear{display:none}input::-ms-reveal{display:none}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:#0000;font-family:sans-serif;line-height:1.15}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{text-align:left;caption-side:bottom;padding-top:.75em;padding-bottom:.3em}input,button,select,optgroup,textarea{color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}[type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]::-moz-focus-inner{border-style:none;padding:0}[type=submit]::-moz-focus-inner{border-style:none;padding:0}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical;overflow:auto}fieldset{border:0;min-width:0;margin:0;padding:0}legend{color:inherit;font-size:1.5em;line-height:inherit;white-space:normal;width:100%;max-width:100%;margin-bottom:.5em;padding:0;display:block}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button{height:auto}[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}noscript{color:red;cursor:default;text-align:center;background:#fff1a8;border-bottom:1px solid #f0c36d;width:100%;line-height:32px;display:block;position:absolute;top:0;left:0}#app{width:100vw;height:100vh}#app .ui-app{width:100%;height:100%}#app .ui-app .ui-page{padding:16px}.bb1713e8{height:100%}.bb1713e8 .b2162135,.bb1713e8 .cc8c9b9c{margin:0 8px}.bb1713e8 .b2162135{width:32px;height:32px}.bb1713e8 .cc8c9b9c{color:inherit;cursor:pointer;display:inline-block}.bb1713e8 .cc8c9b9c:hover{color:#4096ff}.bb1713e8 .cc8c9b9c .d0601377{font-size:32px}.bb1713e8 .c7590423{justify-content:flex-start;align-items:center;gap:4px;display:inline-flex}.bb1713e8 .c7590423 .c999c7bf{margin:0;font-size:16px}.bb1713e8 .ant-tabs-content-holder{overflow:auto} \ No newline at end of file +html,body{width:100%;height:100%}input::-ms-clear{display:none}input::-ms-reveal{display:none}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:#0000;font-family:sans-serif;line-height:1.15}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{text-align:left;caption-side:bottom;padding-top:.75em;padding-bottom:.3em}input,button,select,optgroup,textarea{color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}[type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]::-moz-focus-inner{border-style:none;padding:0}[type=submit]::-moz-focus-inner{border-style:none;padding:0}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical;overflow:auto}fieldset{border:0;min-width:0;margin:0;padding:0}legend{width:100%;max-width:100%;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal;margin-bottom:.5em;padding:0;display:block}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button{height:auto}[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}noscript{color:red;cursor:default;text-align:center;background:#fff1a8;border-bottom:1px solid #f0c36d;width:100%;line-height:32px;display:block;position:absolute;top:0;left:0}#app{width:100vw;height:100vh}#app .ui-app{width:100%;height:100%}#app .ui-app .ui-page{padding:16px}.bb1713e8{height:100%}.bb1713e8 .b2162135,.bb1713e8 .cc8c9b9c{margin:0 8px}.bb1713e8 .b2162135{width:32px;height:32px}.bb1713e8 .cc8c9b9c{color:inherit;cursor:pointer;display:inline-block}.bb1713e8 .cc8c9b9c:hover{color:#4096ff}.bb1713e8 .cc8c9b9c .d0601377{font-size:32px}.bb1713e8 .c7590423{justify-content:flex-start;align-items:center;gap:4px;display:inline-flex}.bb1713e8 .c7590423 .c999c7bf{margin:0;font-size:16px}.bb1713e8 .ant-tabs-content-holder{overflow:auto} \ No newline at end of file diff --git a/packages/examples/app/public/js/94caba112e073461.js b/packages/examples/app/public/js/16a5275ddb242ef7.js similarity index 99% rename from packages/examples/app/public/js/94caba112e073461.js rename to packages/examples/app/public/js/16a5275ddb242ef7.js index 74116c0e..dc75e6f7 100644 --- a/packages/examples/app/public/js/94caba112e073461.js +++ b/packages/examples/app/public/js/16a5275ddb242ef7.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,i,s={3748:function(e,t,n){let r=new Map;class i{#e;#t;static CP437=new i("cp437",2,0);static ISO_8859_1=new i("iso-8859-1",3,1);static ISO_8859_2=new i("iso-8859-2",4);static ISO_8859_3=new i("iso-8859-3",5);static ISO_8859_4=new i("iso-8859-4",6);static ISO_8859_5=new i("iso-8859-5",7);static ISO_8859_6=new i("iso-8859-6",8);static ISO_8859_7=new i("iso-8859-7",9);static ISO_8859_8=new i("iso-8859-8",10);static ISO_8859_9=new i("iso-8859-9",11);static ISO_8859_10=new i("iso-8859-10",12);static ISO_8859_11=new i("iso-8859-11",13);static ISO_8859_13=new i("iso-8859-13",15);static ISO_8859_14=new i("iso-8859-14",16);static ISO_8859_15=new i("iso-8859-15",17);static ISO_8859_16=new i("iso-8859-16",18);static SHIFT_JIS=new i("shift-jis",20);static CP1250=new i("cp1250",21);static CP1251=new i("cp1251",22);static CP1252=new i("cp1252",23);static CP1256=new i("cp1256",24);static UTF_16BE=new i("utf-16be",25);static UTF_8=new i("utf-8",26);static ASCII=new i("ascii",27);static BIG5=new i("big5",28);static GB2312=new i("gb2312",29);static EUC_KR=new i("euc-kr",30);static GBK=new i("gbk",31);static GB18030=new i("gb18030",32);static UTF_16LE=new i("utf-16le",33);static UTF_32BE=new i("utf-32be",34);static UTF_32LE=new i("utf-32le",35);static ISO_646_INV=new i("iso-646-inv",170);static BINARY=new i("binary",899);constructor(e,...t){for(let n of(this.#e=e,this.#t=Object.freeze(t),t))if(n>=0&&n<=999999&&Number.isInteger(n))r.set(n,this);else throw Error("illegal extended channel interpretation value")}get label(){return this.#e}get values(){return this.#t}}function s(e){return 0|e+(e<0?-.5:.5)}function o(e,t){let n=e.at(t);return null!=n?n:""}function l(e){return e-=e>>1&0x55555555,((e=(0x33333333&e)+(e>>2&0x33333333))+(e>>4)&0xf0f0f0f)*0x1010101>>24}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0;for(let i=t;i>>(31&e)&1}flip(e,t){if(null!=e&&null!=t){let n=this.#o(e,t);this.#s[n]^=1<<(31&e)}else{let e=this.#s,{length:t}=e;for(let n=0;n>3;return 7&e&&t++,t}function f(e,t){return e<2?2:Math.min(e,t)}function c(e,t){return(e<<=3)>t?t:e}class h{#l;#w;constructor(e,t){this.#l=e,this.#w=t}get x(){return this.#l}get y(){return this.#w}}function d(e,t){return Math.sqrt(g(e,t))}function g(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function m(e,t,n){let{x:r,y:i}=e,{x:s,y:o}=t,{x:l,y:w}=n;return Math.abs(r*(o-w)+s*(w-i)+l*(i-o))/2}class b extends h{#a;#n;#r;#u;#f;#c=1;#h;#d;static noise(e){return e.#a}static width(e){return e.#n}static height(e){return e.#r}static combined(e){return e.#c}static rect(e){return e.#u}static equals(e,t,n,r,i){let{modules:s}=e.#h,o=e.#d;if(Math.abs(t-e.x)<=o&&Math.abs(n-e.y)<=o){let t=e.#f,n=Math.abs((r+i)/s/2-t);if(n<=1||n<=t)return!0}return!1}static combine(e,t,n,r,i,s){let o=e.#c,l=o+1,w=(e.x*o+t)/l,a=(e.y*o+n)/l,u=(e.#a*o+s)/l,f=(e.#n*o+r)/l,c=(e.#r*o+i)/l,h=new b(e.#h,w,a,f,c,u);return h.#c=l,h}constructor(e,t,n,r,i,s){super(t,n);let{modules:o}=e,l=r/2,w=i/2,a=r/o,u=i/o,f=a/2,c=u/2,h=function(e){let{ratios:t}=e;return t[0|t.length/2]/2}(e),d=(a+u)/2;this.#a=s,this.#n=r,this.#r=i,this.#h=e,this.#f=d,this.#u=[t-l+f,n-w+c,t+l-f,n+w-c],this.#d=d*h}get moduleSize(){return this.#f}}class p{#g;#m;constructor(e,t){this.#g=e,this.#m=t}sample(e,t){let n=this.#g,r=n.width,i=this.#m,s=n.height,o=new a(e,t);for(let l=0;l=0&&u>=0&&aMath.abs(n-i);o&&([i,s,n,r]=[s,i,r,n]);let l=i0){if(f===n)break;f+=i,a-=s}}}function S(e,t,n){let r=0,{width:i,height:s}=e,o=new h((t.x+n.x)/2,(t.y+n.y)/2);for(let[n,l]of new I(t,o).points()){if(n<0||l<0||n>=i||l>=s){if(2===r)return d(t,new h(n,l));break}if(1===r==(1===e.get(n,l))){if(2===r)return d(t,new h(n,l));r++}}return NaN}function E(e,t,n){let r=S(e,t,n);if(Number.isNaN(r))return NaN;let{x:i,y:s}=n,{x:o,y:l}=t,w=S(e,t,new h(o-(i-o),l-(s-l)));return Number.isNaN(w)?NaN:r+w-1}function O(e,t,n){let r=new h(0|t.x,0|t.y),i=new h(0|n.x,0|n.y),s=E(e,r,i),o=E(e,i,r);return Number.isNaN(s)?o/7:Number.isNaN(o)?s/7:(s+o)/14}function k(e,t){var n,r,i,s;let o=Math.max((n=b.width(e))>(r=b.width(t))?n/r:r/n,(i=b.height(e))>(s=b.height(t))?i/s:s/i);return o*o}class T{#N;#I;#g;#R;#f;#D;#B;static moduleSizes(e){if(null==e.#B){let t=e.#g,[n,r,i]=e.#D;e.#B=[O(t,n,r),O(t,n,i)]}return e.#B}static size(e){if(null==e.#I){let t=T.moduleSize(e);e.#I=function(e,t){let[n,r,i]=e,o=s((d(n,r)+d(n,i))/t/2)+7;switch(3&o){case 0:return o+1;case 2:return o-1;case 3:return Math.min(o+2,177)}return o}(e.#D,t)}return e.#I}static moduleSize(e){return null==e.#f&&(e.#f=w(T.moduleSizes(e))/2),e.#f}static contains(e,t){let n=e.#P(),[r,i,s]=e.#D,o=T.bottomRight(e),l=m(r,i,t);return l+m(i,o,t)+m(o,s,t)+m(s,r,t)-n<1}static bottomRight(e){return null==e.#R&&(e.#R=function(e){let[t,n,r]=e,{x:i,y:s}=t;return new h(n.x+r.x-i,n.y+r.y-s)}(e.#D)),e.#R}constructor(e,t){this.#g=e,this.#D=function(e){let t,n,r;let[i,s,o]=e,l=g(i,s)*k(i,s),w=g(i,o)*k(i,o),a=g(s,o)*k(s,o);return a>=l&&a>=w?[t,r,n]=e:w>=a&&w>=l?[r,t,n]=e:[r,n,t]=e,0>function(e,t,n){let{x:r,y:i}=t;return(n.x-r)*(e.y-i)-(n.y-i)*(e.x-r)}(r,t,n)&&([r,n]=[n,r]),[t,n,r]}(t)}get topLeft(){return this.#D[0]}get topRight(){return this.#D[1]}get bottomLeft(){return this.#D[2]}#P(){let[e,t,n]=this.#D,r=T.bottomRight(this);if(null==this.#N){let i=m(e,t,r),s=m(r,n,e);this.#N=i+s}return this.#N}}class M{#g;#U;#F;#m;constructor(e,t,n,r){let i=new p(e,t),s=T.size(n);this.#g=e,this.#m=t,this.#F=n,this.#U=r,this.#g=i.sample(s,s)}get matrix(){return this.#g}get finder(){return this.#F}get alignment(){return this.#U}get size(){return T.size(this.#F)}get moduleSize(){return T.moduleSize(this.#F)}mapping(e,t){return[e,t]=this.#m.mapping(e,t),new h(e,t)}}class _{#j;#L;#Z;#H;#$;#q;#G;#K;#V;constructor(e,t,n,r,i,s,o,l,w){this.#j=e,this.#L=r,this.#Z=o,this.#H=t,this.#$=i,this.#q=l,this.#G=n,this.#K=s,this.#V=w}inverse(){let e=this.#j,t=this.#L,n=this.#Z,r=this.#H,i=this.#$,s=this.#q,o=this.#G,l=this.#K,w=this.#V;return new _(i*w-s*l,s*o-r*w,r*l-i*o,n*l-t*w,e*w-n*o,t*o-e*l,t*s-n*i,n*r-e*s,e*i-t*r)}times(e){let t=this.#j,n=this.#L,r=this.#Z,i=this.#H,s=this.#$,o=this.#q,l=this.#G,w=this.#K,a=this.#V,u=e.#j,f=e.#L,c=e.#Z,h=e.#H,d=e.#$,g=e.#q,m=e.#G,b=e.#K,p=e.#V;return new _(t*u+i*f+l*c,t*h+i*d+l*g,t*m+i*b+l*p,n*u+s*f+w*c,n*h+s*d+w*g,n*m+s*b+w*p,r*u+o*f+a*c,r*h+o*d+a*g,r*m+o*b+a*p)}mapping(e,t){let n=this.#j,r=this.#L,i=this.#Z,s=this.#H,o=this.#$,l=this.#q,w=this.#G,a=this.#K,u=i*e+l*t+this.#V;return[(n*e+s*t+w)/u,(r*e+o*t+a)/u]}}function A(e,t,n,r,i,s,o,l){let w=e-n+i-o,a=t-r+s-l;if(0===w&&0===a)return new _(n-e,i-n,e,r-t,s-r,t,0,0,1);{let u=n-i,f=o-i,c=r-s,h=l-s,d=u*h-f*c,g=(w*h-f*a)/d,m=(u*a-w*c)/d;return new _(n-e+g*n,o-e+m*o,e,r-t+g*r,l-t+m*l,t,g,m,1)}}function N(e,t){let n,r,i,s;let{x:o,y:l}=e.topLeft,{x:w,y:a}=e.topRight,{x:u,y:f}=e.bottomLeft,c=T.size(e)-3.5;return null!=t?(n=t.x,r=t.y,s=i=c-3):(n=w+u-o,r=a+f-l,i=c,s=c),function(e,t,n,r,i,s,o,l,w,a,u,f,c,h,d,g){let m=A(3.5,3.5,n,3.5,i,s,3.5,l).inverse();return A(w,a,u,f,c,h,d,g).times(m)}(0,0,c,0,i,s,0,c,o,l,w,a,n,r,u,f)}function R(e,t){let[n,,r]=b.rect(e);return t>0?r:t<0?n:e.x}function D(e,t){let[,n,,r]=b.rect(e);return t>0?r:t<0?n:e.y}function B(e,t,n,r){let{x:i,y:s}=t,{x:o,y:l}=e,{x:w,y:a}=n,u=w>i?1:ws?1:ai))return!1}return o>=r-14-Math.max(2,(r-17)/4)}function U(e,t,n){let{topLeft:r,topRight:i,bottomLeft:s}=t,[o,l]=n?B(r,s,i,!0):B(r,i,s);return P(e,o,l,T.size(t))}function F(e,t,n,r){let[i,s]=t.mapping(r?6.5:7.5,r?7.5:6.5),[o,l]=t.mapping(r?6.5:n-7.5,r?n-7.5:6.5);return P(e,new h(i,s),new h(o,l),n)}class j{#J;#h;constructor(e){this.#h=e,this.#J=w(e)}get modules(){return this.#J}get ratios(){return this.#h}}let L=new j([1,1,3,1,1]),Z=new j([1,1,1,1,1]),H=new j([1,1,1]);function $(e,t){let{length:n}=e,r=n-1;for(let t=0;t{o+=s,l-=s*f},h=()=>e.get(o,l);for(;o>=0&&l>=0&&l=0&&l>=0&&l=0&&l>=0&&l=0&&l=0&&l=0&&li?e.get(t,s):e.get(s,n);for(;s>=0&&w();)s--,o[2]++;for(;s>=0&&!w();)s--,o[1]++;for(;s>=0&&o[0]t&&([e,t]=[t,e]),t-e<=t*n}function W(e,t){let{ratios:n,modules:r}=t,{length:i}=e,s=function(e){let t=0;for(let n of e){if(0===n)return NaN;t+=n}return t}(e);if(s>=r){let t=s/r,o=.625*t+.5;for(let r=0;ro)return!1}return!0}return!1}class X{#Q;#g;#h;#D=[];constructor(e,t,n){this.#g=e,this.#h=t,this.#Q=n}get matrix(){return this.#g}get patterns(){return this.#D}match(e,t,n,r){let i=this.#g,s=this.#h,o=G(n,e),[l,a]=Q(i,o,t,r,s,!0);if(l>=0){let e;if([o,e]=Q(i,o,l,r,s),o>=0){let t=q(i,o,l,r),n=q(i,o,l,r,!0);if(this.#Q?W(t,s)&&W(n,s):W(t,s)||W(n,s)){let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rb.combined(e)>=3&&1.5>=b.noise(e)),{length:t}=e;if(3===t){let t=new T(this.matrix,e),n=T.size(t);n>=21&&n<=177&&(yield t)}else if(t>3){let n=t-2,r=t-1,i=new Map;for(let o=0;o=V&&c<=J){let[o,l]=T.moduleSizes(f);if(o>=1&&l>=1){let{topLeft:w,topRight:a,bottomLeft:c}=f,h=d(w,a),g=d(w,c);if(4>=Math.abs(s(h/o)-s(g/l))){let s=T.size(f);s>=21&&s<=177&&!function(e,t,n){let r=0,{topLeft:i,topRight:s,bottomLeft:o}=e;for(let l of t)if(l!==i&&l!==s&&l!==o){let t;if(n.has(l)&&(t=T.contains(e,l))||1>b.noise(l)&&(null==t?T.contains(e,l):t)&&++r>3)return!0}return!1}(f,e,i)&&(U(u,f)||U(u,f,!0))&&(yield f)&&(i.set(n,!0),i.set(r,!0),i.set(t,!0))}}}}}}}}find(e,t,n,r){let{matrix:i}=this,s=e+n,o=t+r,l=(e,t,n,r,i,s)=>{$(n,r),$(i,s),1===i[0]&&0===i[1]&&1===i[2]&&0===i[3]&&1===i[4]&&W(n,L)&&this.match(e,t,n,n[2])};for(let n=t;n2.5>=b.noise(e)&&Y(e.moduleSize,t,.5));n.length>1&&n.sort((n,r)=>{let i=b.noise(n),s=b.noise(r),o=Math.abs(n.moduleSize-t),l=Math.abs(r.moduleSize-t);return(d(n,e)+o)*i-(d(r,e)+l)*s});let r=n.slice(0,2);return r.push(e),r}find(e,t,n,r){let{matrix:i}=this,s=e+n,o=t+r,l=(e,t,n,r,i,s)=>{$(n,r),$(i,s),0===i[0]&&1===i[1]&&0===i[2]&&W(n,H)&&this.match(e,t,n,n[1])};for(let n=t;n=25)for(let s of function(e,t,n){let r=Math.min(20,0|T.size(t)/4),i=function(e){let{x:t,y:n}=e.topLeft,r=1-3/(T.size(e)-7),i=T.bottomRight(e),[s,o]=T.moduleSizes(e);return new b(Z,t+(i.x-t)*r,n+(i.y-n)*r,5*s,5*o,0)}(t),s=new et(e,n),o=T.moduleSize(t),{x:l,y:w}=i,a=Math.ceil(o*r),u=0|Math.max(0,w-a),f=0|Math.max(0,l-a),c=0|Math.min(e.width-1,l+a),h=0|Math.min(e.height-1,w+a);return s.find(f,u,c-f,h-u),s.filter(i,o)}(e,r,t)){let t=N(r,s);if(F(e,t,i)&&F(e,t,i,!0)&&(n=yield new M(e,t,r,s)))break}else{let t=N(r);F(e,t,i)&&F(e,t,i,!0)&&(n=yield new M(e,t,r))}o=s.next(n)}}}class er{#W;#X;#ee;#S;#et;#en;constructor(e,t,{mask:n,level:r},i,s){this.#W=n,this.#X=r,this.#ee=s,this.#S=t,this.#en=e,this.#et=i}get mask(){return this.#W}get level(){return this.#X.name}get version(){return this.#S.version}get mirror(){return this.#ee}get content(){return this.#en.content}get corrected(){return this.#et}get symbology(){return this.#en.symbology}get fnc1(){return this.#en.fnc1}get codewords(){return this.#en.codewords}get structured(){return this.#en.structured}}class ei{#er;#ei;#es;constructor(e){this.#er=e,this.#ei=0,this.#es=0}get bitOffset(){return this.#ei}get byteOffset(){return this.#es}read(e){let t=0,n=this.#ei,r=this.#es,i=this.#er;if(n>0){let s=8-n,o=Math.min(e,s),l=s-o;e-=o,n+=o,t=(i[r]&255>>8-o<>l,8===n&&(r++,n=0)}if(e>0){for(;e>=8;)e-=8,t=t<<8|255&i[r++];if(e>0){let s=8-e;n+=e,t=t<>s<>s}}return this.#ei=n,this.#es=r,t}available(){return 8*(this.#er.length-this.#es)-this.#ei}}let es=new Map;class eo{#s;#eo;static TERMINATOR=new eo([0,0,0],0);static NUMERIC=new eo([10,12,14],1);static ALPHANUMERIC=new eo([9,11,13],2);static STRUCTURED_APPEND=new eo([0,0,0],3);static BYTE=new eo([8,16,16],4);static ECI=new eo([0,0,0],7);static KANJI=new eo([8,10,12],8);static FNC1_FIRST_POSITION=new eo([0,0,0],5);static FNC1_SECOND_POSITION=new eo([0,0,0],9);static HANZI=new eo([8,10,12],13);constructor(e,t){this.#s=t,this.#eo=new Int32Array(e),es.set(t,this)}get bits(){return this.#s}getCharacterCountBits(e){let t,{version:n}=e;return t=n<=9?0:n<=26?1:2,this.#eo[t]}}function el(e){let t=0,n=new Map;for(let r of e)n.set(r,t++);return n}function ew(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r>8&255,255&n),s.push(n);let{length:a}=s,u=w.decode(new Uint8Array(i));for(let e=0;e3&&void 0!==arguments[3]?arguments[3]:256,i=n.length-1,s=[];for(let o=e;o{let t=1&e.length;return e=e.replace(/%%/g,"%"),t?e.replace(/%$/,"\x1d"):e})}el(ef);let eh=new Map;class ed{#el;#s;#X;static L=new ed("L",0,1);static M=new ed("M",1,0);static Q=new ed("Q",2,3);static H=new ed("H",3,2);constructor(e,t,n){this.#s=n,this.#el=e,this.#X=t,eh.set(n,this)}get bits(){return this.#s}get name(){return this.#el}get level(){return this.#X}}let eg=[[21522,0],[20773,1],[24188,2],[23371,3],[17913,4],[16590,5],[20375,6],[19104,7],[30660,8],[29427,9],[32170,10],[30877,11],[26159,12],[25368,13],[27713,14],[26998,15],[5769,16],[5054,17],[7399,18],[6608,19],[1890,20],[597,21],[3340,22],[2107,23],[13663,24],[12392,25],[16177,26],[14854,27],[9396,28],[8579,29],[11994,30],[11245,31]];class em{#W;#X;constructor(e){this.#W=7&e,this.#X=function(e){let t=eh.get(e);if(null!=t)return t;throw Error("illegal error correction bits")}(e>>3&3)}get mask(){return this.#W}get level(){return this.#X}}function eb(e,t,n,r){return e.get(t,n)?r<<1|1:r<<1}class ep{#I;#g;constructor(e){let{width:t,height:n}=e;this.#g=e.clone(),this.#I=Math.min(t,n)}readVersion(){let e=this.#I,t=0|(e-17)/4;if(t<1)throw Error("illegal version");if(t<=6)return C[t-1];let n=0,r=0,i=e-11,s=this.#g;for(let t=5;t>=0;t--)for(let r=e-9;r>=i;r--)n=eb(s,r,t,n);for(let t=5;t>=0;t--)for(let n=e-9;n>=i;n--)r=eb(s,t,n,r);let o=function(e,t){let n=32,r=0,{length:i}=v;for(let s=0;s=7)return C[r-1];throw Error("unable to decode version")}(n,r);if(o.size>e)throw Error("matrix size too small for version");return o}readFormatInfo(){let e=0,t=0,n=this.#g,r=this.#I,i=r-7;for(let t=0;t<=8;t++)6!==t&&(e=eb(n,t,8,e));for(let t=7;t>=0;t--)6!==t&&(e=eb(n,8,t,e));for(let e=r-1;e>=i;e--)t=eb(n,8,e,t);for(let e=r-8;e6&&(s.setRegion(t-11,0,3,6),s.setRegion(0,t-11,6,3)),s}(e),f=new Uint8Array(w.numTotalCodewords);for(let e=o-1;e>0;e-=2){6===e&&e--;for(let t=0;t1&&0===t[0]){let e=1;for(;e=e.getDegree()&&!r.isZero();){let i=r.getDegree(),o=i-e.getDegree(),l=t.multiply(r.getCoefficient(i),s),w=e.multiplyByMonomial(o,l),a=t.buildPolynomial(o,l);n=n.addOrSubtract(a),r=r.addOrSubtract(w)}return[n,r]}}let ev=new class{#I;#ef;#ec;#eh;#ed;#eg;constructor(e,t,n){let r=1,i=new Int32Array(t);for(let n=0;n=t&&(r^=e,r&=t-1);let s=new Int32Array(t);for(let e=0,n=t-1;e=r;){let t=l,n=o;if(l=s,(o=i).isZero())throw Error("remainder last was zero");i=n;let r=e.zero,w=i.getDegree(),a=o.getDegree(),u=o.getCoefficient(a),f=e.invert(u);for(;w>=a&&!i.isZero();){let t=i.getDegree()-a,n=e.multiply(i.getCoefficient(w),f);r=r.addOrSubtract(e.buildPolynomial(t,n)),w=(i=i.addOrSubtract(o.multiplyByMonomial(t,n))).getDegree()}if(s=r.multiply(l).addOrSubtract(t),w>=a)throw Error("division algorithm failed to reduce polynomial")}let w=s.getCoefficient(0);if(0===w)throw Error("sigma tilde(0) was zero");let a=e.invert(w);return[s.multiply(a),i.multiply(a)]}(r,r.buildPolynomial(t,1),n,t),l=function(e,t){let n=t.getDegree();if(1===n)return new Int32Array([t.getCoefficient(1)]);let r=0,{size:i}=e,s=new Int32Array(n);for(let o=1;o=0&&o[w].codewords.length!==a;)w--;w++;let u=0,f=a-s;for(let t=0;tg.available()?eo.TERMINATOR:function(e){let t=es.get(e);if(null!=t)return t;throw Error("illegal mode bits")}(g.read(4))){case eo.TERMINATOR:break;case eo.FNC1_FIRST_POSITION:f=!0;break;case eo.FNC1_SECOND_POSITION:c=!0,u=g.read(8);break;case eo.STRUCTURED_APPEND:if(16>g.available())throw Error("illegal structured append");d=Object.freeze({index:g.read(4),count:g.read(4)+1,parity:g.read(8)});break;case eo.ECI:w=function(e){let t=e.read(8);if((128&t)==0)return 127&t;if((192&t)==128)return(63&t)<<8|e.read(8);if((224&t)==192)return(31&t)<<16|e.read(16);throw Error("illegal extended channel interpretation value")}(g);break;default:if(l===eo.HANZI&&1!==g.read(4))throw Error("illegal hanzi subset");let m=g.read(l.getCharacterCountBits(t));switch(l){case eo.ALPHANUMERIC:a+=function(e,t,n){let r="";for(;t>1;){if(11>e.available())throw Error("illegal bits length");let n=e.read(11);r+=o(ef,n/45),r+=o(ef,n%45),t-=2}if(1===t){if(6>e.available())throw Error("illegal bits length");r+=o(ef,e.read(6))}return n?ec(r):r}(g,m,f||c);break;case eo.BYTE:a+=function(e,t,n,s,o){if(e.available()<8*t)throw Error("illegal bits length");let l=new Uint8Array(t),w=null!=o?function(e){let t=r.get(e);if(t)return t;throw Error("illegal charset value")}(o):i.ISO_8859_1;for(let n=0;n0;){let i=e.read(13),s=i/96<<8|i%96;s<2560?s+=41377:s+=42657,r[n]=s>>8&255,r[n+1]=255&s,t--,n+=2}return new TextDecoder("gb2312").decode(r)}(g,m);break;case eo.KANJI:a+=function(e,t){if(e.available()<13*t)throw Error("illegal bits length");let n=0,r=new Uint8Array(2*t);for(;t>0;){let i=e.read(13),s=i/192<<8|i%192;s<7936?s+=33088:s+=49472,r[n]=s>>8&255,r[n+1]=255&s,t--,n+=2}return new TextDecoder("shift-jis").decode(r)}(g,m);break;case eo.NUMERIC:a+=function(e,t){let n="";for(;t>=3;){if(10>e.available())throw Error("illegal bits length");let r=e.read(10);if(r>=1e3)throw Error("illegal numeric codeword");n+=o(eu,r/100),n+=o(eu,r/10%10),n+=o(eu,r%10),t-=3}if(2===t){if(7>e.available())throw Error("illegal bits length");let t=e.read(7);if(t>=100)throw Error("illegal numeric codeword");n+=o(eu,t/10),n+=o(eu,t%10)}else if(1===t){if(4>e.available())throw Error("illegal bits length");let t=e.read(4);if(t>=10)throw Error("illegal numeric codeword");n+=o(eu,t)}return n}(g,m);break;default:throw Error("illegal mode")}}while(l!==eo.TERMINATOR);return f?h=Object.freeze(["GS1"]):c&&(h=Object.freeze(["AIM",u])),s=null!=w?f?4:c?6:2:f?3:c?5:1,{content:a,codewords:e,structured:d,symbology:`]Q${s}`,fnc1:h}}(n,t,this.#em),t,s,l,w)}}var eE=n(6275),eO=n.n(eE);function ek(e){return{x:e.x,y:e.y}}function eT(e){return{x:e.x,y:e.y,moduleSize:e.moduleSize}}function eM(e,t){let n=null;t===i.ISO_8859_1&&(n=eO().detect(e)),null==n&&(n=t.label);try{return new TextDecoder(n).decode(e)}catch(t){return new TextDecoder("utf-8").decode(e)}}self.addEventListener("message",async e=>{let{data:t}=e,{uid:n,image:r}=t,{width:i,height:s}=r,o=new OffscreenCanvas(i,s).getContext("2d");o.drawImage(r,0,0);let l=function(e,t,n){if(e.length!==t*n)throw Error("luminances length must be equals to width * height");return t<40||n<40?function(e,t,n){let r=new a(t,n),i=new Int32Array(32);for(let r=1;r<5;r++){let s=0|4*t/5,o=(0|n*r/5)*t;for(let n=0|t/5;n>3]++}}let s=function(e){let t=0,n=0,r=0,{length:i}=e;for(let s=0;sn&&(t=s,n=e[s]),e[s]>r&&(r=e[s]);let s=0,o=0;for(let n=0;no&&(s=n,o=i)}if(t>s&&([t,s]=[s,t]),s-t<=2)return -1;let l=-1,w=s-1;for(let n=s-1;n>t;n--){let i=n-t,o=i*i*(s-n)*(r-e[n]);o>l&&(w=n,l=o)}return w<<3}(i);if(s>0)for(let i=0;iw&&(w=n)}if(w-a>24)for(n++,r+=t;n<8;n++,r+=t)for(let t=0;t<8;t++)o+=e[r+t]}let f=o>>6;if(w-a<=24&&(f=a/2,n>0&&s>0)){let e=(r[n-1][s]+2*r[n][s-1]+r[n-1][s-1])/4;a>10}}return i}(o.getImageData(0,0,i,s)),i,s);t.invert&&l.flip();let w=new en({strict:t.strict}).detect(l),h=[],d=new eS({decode:eM}),g=w.next();for(;!g.done;){let e=!1,t=g.value;try{let{size:n,finder:r,alignment:i}=t,s=d.decode(t.matrix),{topLeft:o,topRight:l,bottomLeft:w}=r,a=t.mapping(0,0),u=t.mapping(n,0),f=t.mapping(n,n),c=t.mapping(0,n),g=t.mapping(6.5,6.5),m=t.mapping(n-6.5,6.5),b=t.mapping(6.5,n-6.5);h.push({fnc1:s.fnc1,mask:s.mask,level:s.level,mirror:s.mirror,content:s.content,version:s.version,corrected:s.corrected,symbology:s.symbology,structured:s.structured,alignment:i?eT(i):null,finder:[eT(o),eT(l),eT(w)],timing:[ek(g),ek(m),ek(b)],corners:[ek(a),ek(u),ek(f),ek(c)]}),e=!0}catch{}g=w.next(e)}h.length>0?self.postMessage({type:"ok",payload:{uid:n,image:r,items:h}},[r]):self.postMessage({type:"error",message:"未发现二维码"})})}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return s[e].call(n.exports,n,n.exports,l),n.exports}l.m=s,l.x=function(){var e=l.O(void 0,[275],function(){return l(3748)});return l.O(e)},e=[],l.O=function(t,n,r,i){if(n){i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[n,r,i];return}for(var o=1/0,s=0;s=i)&&Object.keys(l.O).every(function(e){return l.O[e](n[a])})?n.splice(a--,1):(w=!1,i=0&&n<=999999&&Number.isInteger(n))r.set(n,this);else throw Error("illegal extended channel interpretation value")}get label(){return this.#e}get values(){return this.#t}}function s(e){return 0|e+(e<0?-.5:.5)}function o(e,t){let n=e.at(t);return null!=n?n:""}function l(e){return e-=e>>1&0x55555555,((e=(0x33333333&e)+(e>>2&0x33333333))+(e>>4)&0xf0f0f0f)*0x1010101>>24}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0;for(let i=t;i>>(31&e)&1}flip(e,t){if(null!=e&&null!=t){let n=this.#o(e,t);this.#s[n]^=1<<(31&e)}else{let e=this.#s,{length:t}=e;for(let n=0;n>3;return 7&e&&t++,t}function f(e,t){return e<2?2:Math.min(e,t)}function c(e,t){return(e<<=3)>t?t:e}class h{#l;#w;constructor(e,t){this.#l=e,this.#w=t}get x(){return this.#l}get y(){return this.#w}}function d(e,t){return Math.sqrt(g(e,t))}function g(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function m(e,t,n){let{x:r,y:i}=e,{x:s,y:o}=t,{x:l,y:w}=n;return Math.abs(r*(o-w)+s*(w-i)+l*(i-o))/2}class b extends h{#a;#n;#r;#u;#f;#c=1;#h;#d;static noise(e){return e.#a}static width(e){return e.#n}static height(e){return e.#r}static combined(e){return e.#c}static rect(e){return e.#u}static equals(e,t,n,r,i){let{modules:s}=e.#h,o=e.#d;if(Math.abs(t-e.x)<=o&&Math.abs(n-e.y)<=o){let t=e.#f,n=Math.abs((r+i)/s/2-t);if(n<=1||n<=t)return!0}return!1}static combine(e,t,n,r,i,s){let o=e.#c,l=o+1,w=(e.x*o+t)/l,a=(e.y*o+n)/l,u=(e.#a*o+s)/l,f=(e.#n*o+r)/l,c=(e.#r*o+i)/l,h=new b(e.#h,w,a,f,c,u);return h.#c=l,h}constructor(e,t,n,r,i,s){super(t,n);let{modules:o}=e,l=r/2,w=i/2,a=r/o,u=i/o,f=a/2,c=u/2,h=function(e){let{ratios:t}=e;return t[0|t.length/2]/2}(e),d=(a+u)/2;this.#a=s,this.#n=r,this.#r=i,this.#h=e,this.#f=d,this.#u=[t-l+f,n-w+c,t+l-f,n+w-c],this.#d=d*h}get moduleSize(){return this.#f}}class p{#g;#m;constructor(e,t){this.#g=e,this.#m=t}sample(e,t){let n=this.#g,r=n.width,i=this.#m,s=n.height,o=new a(e,t);for(let l=0;l=0&&u>=0&&aMath.abs(n-i);o&&([i,s,n,r]=[s,i,r,n]);let l=i0){if(f===n)break;f+=i,a-=s}}}function S(e,t,n){let r=0,{width:i,height:s}=e,o=new h((t.x+n.x)/2,(t.y+n.y)/2);for(let[n,l]of new I(t,o).points()){if(n<0||l<0||n>=i||l>=s){if(2===r)return d(t,new h(n,l));break}if(1===r==(1===e.get(n,l))){if(2===r)return d(t,new h(n,l));r++}}return NaN}function E(e,t,n){let r=S(e,t,n);if(Number.isNaN(r))return NaN;let{x:i,y:s}=n,{x:o,y:l}=t,w=S(e,t,new h(o-(i-o),l-(s-l)));return Number.isNaN(w)?NaN:r+w-1}function O(e,t,n){let r=new h(0|t.x,0|t.y),i=new h(0|n.x,0|n.y),s=E(e,r,i),o=E(e,i,r);return Number.isNaN(s)?o/7:Number.isNaN(o)?s/7:(s+o)/14}function k(e,t){var n,r,i,s;let o=Math.max((n=b.width(e))>(r=b.width(t))?n/r:r/n,(i=b.height(e))>(s=b.height(t))?i/s:s/i);return o*o}class T{#N;#I;#g;#R;#f;#D;#B;static moduleSizes(e){if(null==e.#B){let t=e.#g,[n,r,i]=e.#D;e.#B=[O(t,n,r),O(t,n,i)]}return e.#B}static size(e){if(null==e.#I){let t=T.moduleSize(e);e.#I=function(e,t){let[n,r,i]=e,o=s((d(n,r)+d(n,i))/t/2)+7;switch(3&o){case 0:return o+1;case 2:return o-1;case 3:return Math.min(o+2,177)}return o}(e.#D,t)}return e.#I}static moduleSize(e){return null==e.#f&&(e.#f=w(T.moduleSizes(e))/2),e.#f}static contains(e,t){let n=e.#P(),[r,i,s]=e.#D,o=T.bottomRight(e),l=m(r,i,t);return l+m(i,o,t)+m(o,s,t)+m(s,r,t)-n<1}static bottomRight(e){return null==e.#R&&(e.#R=function(e){let[t,n,r]=e,{x:i,y:s}=t;return new h(n.x+r.x-i,n.y+r.y-s)}(e.#D)),e.#R}constructor(e,t){this.#g=e,this.#D=function(e){let t,n,r;let[i,s,o]=e,l=g(i,s)*k(i,s),w=g(i,o)*k(i,o),a=g(s,o)*k(s,o);return a>=l&&a>=w?[t,r,n]=e:w>=a&&w>=l?[r,t,n]=e:[r,n,t]=e,0>function(e,t,n){let{x:r,y:i}=t;return(n.x-r)*(e.y-i)-(n.y-i)*(e.x-r)}(r,t,n)&&([r,n]=[n,r]),[t,n,r]}(t)}get topLeft(){return this.#D[0]}get topRight(){return this.#D[1]}get bottomLeft(){return this.#D[2]}#P(){let[e,t,n]=this.#D,r=T.bottomRight(this);if(null==this.#N){let i=m(e,t,r),s=m(r,n,e);this.#N=i+s}return this.#N}}class M{#g;#U;#F;#m;constructor(e,t,n,r){let i=new p(e,t),s=T.size(n);this.#g=e,this.#m=t,this.#F=n,this.#U=r,this.#g=i.sample(s,s)}get matrix(){return this.#g}get finder(){return this.#F}get alignment(){return this.#U}get size(){return T.size(this.#F)}get moduleSize(){return T.moduleSize(this.#F)}mapping(e,t){return[e,t]=this.#m.mapping(e,t),new h(e,t)}}class _{#j;#L;#Z;#H;#$;#q;#G;#K;#V;constructor(e,t,n,r,i,s,o,l,w){this.#j=e,this.#L=r,this.#Z=o,this.#H=t,this.#$=i,this.#q=l,this.#G=n,this.#K=s,this.#V=w}inverse(){let e=this.#j,t=this.#L,n=this.#Z,r=this.#H,i=this.#$,s=this.#q,o=this.#G,l=this.#K,w=this.#V;return new _(i*w-s*l,s*o-r*w,r*l-i*o,n*l-t*w,e*w-n*o,t*o-e*l,t*s-n*i,n*r-e*s,e*i-t*r)}times(e){let t=this.#j,n=this.#L,r=this.#Z,i=this.#H,s=this.#$,o=this.#q,l=this.#G,w=this.#K,a=this.#V,u=e.#j,f=e.#L,c=e.#Z,h=e.#H,d=e.#$,g=e.#q,m=e.#G,b=e.#K,p=e.#V;return new _(t*u+i*f+l*c,t*h+i*d+l*g,t*m+i*b+l*p,n*u+s*f+w*c,n*h+s*d+w*g,n*m+s*b+w*p,r*u+o*f+a*c,r*h+o*d+a*g,r*m+o*b+a*p)}mapping(e,t){let n=this.#j,r=this.#L,i=this.#Z,s=this.#H,o=this.#$,l=this.#q,w=this.#G,a=this.#K,u=i*e+l*t+this.#V;return[(n*e+s*t+w)/u,(r*e+o*t+a)/u]}}function A(e,t,n,r,i,s,o,l){let w=e-n+i-o,a=t-r+s-l;if(0===w&&0===a)return new _(n-e,i-n,e,r-t,s-r,t,0,0,1);{let u=n-i,f=o-i,c=r-s,h=l-s,d=u*h-f*c,g=(w*h-f*a)/d,m=(u*a-w*c)/d;return new _(n-e+g*n,o-e+m*o,e,r-t+g*r,l-t+m*l,t,g,m,1)}}function N(e,t){let n,r,i,s;let{x:o,y:l}=e.topLeft,{x:w,y:a}=e.topRight,{x:u,y:f}=e.bottomLeft,c=T.size(e)-3.5;return null!=t?(n=t.x,r=t.y,s=i=c-3):(n=w+u-o,r=a+f-l,i=c,s=c),function(e,t,n,r,i,s,o,l,w,a,u,f,c,h,d,g){let m=A(3.5,3.5,n,3.5,i,s,3.5,l).inverse();return A(w,a,u,f,c,h,d,g).times(m)}(0,0,c,0,i,s,0,c,o,l,w,a,n,r,u,f)}function R(e,t){let[n,,r]=b.rect(e);return t>0?r:t<0?n:e.x}function D(e,t){let[,n,,r]=b.rect(e);return t>0?r:t<0?n:e.y}function B(e,t,n,r){let{x:i,y:s}=t,{x:o,y:l}=e,{x:w,y:a}=n,u=w>i?1:ws?1:ai))return!1}return o>=r-14-Math.max(2,(r-17)/4)}function U(e,t,n){let{topLeft:r,topRight:i,bottomLeft:s}=t,[o,l]=n?B(r,s,i,!0):B(r,i,s);return P(e,o,l,T.size(t))}function F(e,t,n,r){let[i,s]=t.mapping(r?6.5:7.5,r?7.5:6.5),[o,l]=t.mapping(r?6.5:n-7.5,r?n-7.5:6.5);return P(e,new h(i,s),new h(o,l),n)}class j{#J;#h;constructor(e){this.#h=e,this.#J=w(e)}get modules(){return this.#J}get ratios(){return this.#h}}let L=new j([1,1,3,1,1]),Z=new j([1,1,1,1,1]),H=new j([1,1,1]);function $(e,t){let{length:n}=e,r=n-1;for(let t=0;t{o+=s,l-=s*f},h=()=>e.get(o,l);for(;o>=0&&l>=0&&l=0&&l>=0&&l=0&&l>=0&&l=0&&l=0&&l=0&&li?e.get(t,s):e.get(s,n);for(;s>=0&&w();)s--,o[2]++;for(;s>=0&&!w();)s--,o[1]++;for(;s>=0&&o[0]t&&([e,t]=[t,e]),t-e<=t*n}function W(e,t){let{ratios:n,modules:r}=t,{length:i}=e,s=function(e){let t=0;for(let n of e){if(0===n)return NaN;t+=n}return t}(e);if(s>=r){let t=s/r,o=.625*t+.5;for(let r=0;ro)return!1}return!0}return!1}class X{#Q;#g;#h;#D=[];constructor(e,t,n){this.#g=e,this.#h=t,this.#Q=n}get matrix(){return this.#g}get patterns(){return this.#D}match(e,t,n,r){let i=this.#g,s=this.#h,o=G(n,e),[l,a]=Q(i,o,t,r,s,!0);if(l>=0){let e;if([o,e]=Q(i,o,l,r,s),o>=0){let t=q(i,o,l,r),n=q(i,o,l,r,!0);if(this.#Q?W(t,s)&&W(n,s):W(t,s)||W(n,s)){let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rb.combined(e)>=3&&1.5>=b.noise(e)),{length:t}=e;if(3===t){let t=new T(this.matrix,e),n=T.size(t);n>=21&&n<=177&&(yield t)}else if(t>3){let n=t-2,r=t-1,i=new Map;for(let o=0;o=V&&c<=J){let[o,l]=T.moduleSizes(f);if(o>=1&&l>=1){let{topLeft:w,topRight:a,bottomLeft:c}=f,h=d(w,a),g=d(w,c);if(4>=Math.abs(s(h/o)-s(g/l))){let s=T.size(f);s>=21&&s<=177&&!function(e,t,n){let r=0,{topLeft:i,topRight:s,bottomLeft:o}=e;for(let l of t)if(l!==i&&l!==s&&l!==o){let t;if(n.has(l)&&(t=T.contains(e,l))||1>b.noise(l)&&(null==t?T.contains(e,l):t)&&++r>3)return!0}return!1}(f,e,i)&&(U(u,f)||U(u,f,!0))&&(yield f)&&(i.set(n,!0),i.set(r,!0),i.set(t,!0))}}}}}}}}find(e,t,n,r){let{matrix:i}=this,s=e+n,o=t+r,l=(e,t,n,r,i,s)=>{$(n,r),$(i,s),1===i[0]&&0===i[1]&&1===i[2]&&0===i[3]&&1===i[4]&&W(n,L)&&this.match(e,t,n,n[2])};for(let n=t;n2.5>=b.noise(e)&&Y(e.moduleSize,t,.5));n.length>1&&n.sort((n,r)=>{let i=b.noise(n),s=b.noise(r),o=Math.abs(n.moduleSize-t),l=Math.abs(r.moduleSize-t);return(d(n,e)+o)*i-(d(r,e)+l)*s});let r=n.slice(0,2);return r.push(e),r}find(e,t,n,r){let{matrix:i}=this,s=e+n,o=t+r,l=(e,t,n,r,i,s)=>{$(n,r),$(i,s),0===i[0]&&1===i[1]&&0===i[2]&&W(n,H)&&this.match(e,t,n,n[1])};for(let n=t;n=25)for(let s of function(e,t,n){let r=Math.min(20,0|T.size(t)/4),i=function(e){let{x:t,y:n}=e.topLeft,r=1-3/(T.size(e)-7),i=T.bottomRight(e),[s,o]=T.moduleSizes(e);return new b(Z,t+(i.x-t)*r,n+(i.y-n)*r,5*s,5*o,0)}(t),s=new et(e,n),o=T.moduleSize(t),{x:l,y:w}=i,a=Math.ceil(o*r),u=0|Math.max(0,w-a),f=0|Math.max(0,l-a),c=0|Math.min(e.width-1,l+a),h=0|Math.min(e.height-1,w+a);return s.find(f,u,c-f,h-u),s.filter(i,o)}(e,r,t)){let t=N(r,s);if(F(e,t,i)&&F(e,t,i,!0)&&(n=yield new M(e,t,r,s)))break}else{let t=N(r);F(e,t,i)&&F(e,t,i,!0)&&(n=yield new M(e,t,r))}o=s.next(n)}}}class er{#W;#X;#ee;#S;#et;#en;constructor(e,t,{mask:n,level:r},i,s){this.#W=n,this.#X=r,this.#ee=s,this.#S=t,this.#en=e,this.#et=i}get mask(){return this.#W}get level(){return this.#X.name}get version(){return this.#S.version}get mirror(){return this.#ee}get content(){return this.#en.content}get corrected(){return this.#et}get symbology(){return this.#en.symbology}get fnc1(){return this.#en.fnc1}get codewords(){return this.#en.codewords}get structured(){return this.#en.structured}}class ei{#er;#ei;#es;constructor(e){this.#er=e,this.#ei=0,this.#es=0}get bitOffset(){return this.#ei}get byteOffset(){return this.#es}read(e){let t=0,n=this.#ei,r=this.#es,i=this.#er;if(n>0){let s=8-n,o=Math.min(e,s),l=s-o;e-=o,n+=o,t=(i[r]&255>>8-o<>l,8===n&&(r++,n=0)}if(e>0){for(;e>=8;)e-=8,t=t<<8|255&i[r++];if(e>0){let s=8-e;n+=e,t=t<>s<>s}}return this.#ei=n,this.#es=r,t}available(){return 8*(this.#er.length-this.#es)-this.#ei}}let es=new Map;class eo{#s;#eo;static TERMINATOR=new eo([0,0,0],0);static NUMERIC=new eo([10,12,14],1);static ALPHANUMERIC=new eo([9,11,13],2);static STRUCTURED_APPEND=new eo([0,0,0],3);static BYTE=new eo([8,16,16],4);static ECI=new eo([0,0,0],7);static KANJI=new eo([8,10,12],8);static FNC1_FIRST_POSITION=new eo([0,0,0],5);static FNC1_SECOND_POSITION=new eo([0,0,0],9);static HANZI=new eo([8,10,12],13);constructor(e,t){this.#s=t,this.#eo=new Int32Array(e),es.set(t,this)}get bits(){return this.#s}getCharacterCountBits(e){let t,{version:n}=e;return t=n<=9?0:n<=26?1:2,this.#eo[t]}}function el(e){let t=0,n=new Map;for(let r of e)n.set(r,t++);return n}function ew(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r>8&255,255&n),s.push(n);let{length:a}=s,u=w.decode(new Uint8Array(i));for(let e=0;e3&&void 0!==arguments[3]?arguments[3]:256,i=n.length-1,s=[];for(let o=e;o{let t=1&e.length;return e=e.replace(/%%/g,"%"),t?e.replace(/%$/,"\x1d"):e})}el(ef);let eh=new Map;class ed{#el;#s;#X;static L=new ed("L",0,1);static M=new ed("M",1,0);static Q=new ed("Q",2,3);static H=new ed("H",3,2);constructor(e,t,n){this.#s=n,this.#el=e,this.#X=t,eh.set(n,this)}get bits(){return this.#s}get name(){return this.#el}get level(){return this.#X}}let eg=[[21522,0],[20773,1],[24188,2],[23371,3],[17913,4],[16590,5],[20375,6],[19104,7],[30660,8],[29427,9],[32170,10],[30877,11],[26159,12],[25368,13],[27713,14],[26998,15],[5769,16],[5054,17],[7399,18],[6608,19],[1890,20],[597,21],[3340,22],[2107,23],[13663,24],[12392,25],[16177,26],[14854,27],[9396,28],[8579,29],[11994,30],[11245,31]];class em{#W;#X;constructor(e){this.#W=7&e,this.#X=function(e){let t=eh.get(e);if(null!=t)return t;throw Error("illegal error correction bits")}(e>>3&3)}get mask(){return this.#W}get level(){return this.#X}}function eb(e,t,n,r){return e.get(t,n)?r<<1|1:r<<1}class ep{#I;#g;constructor(e){let{width:t,height:n}=e;this.#g=e.clone(),this.#I=Math.min(t,n)}readVersion(){let e=this.#I,t=0|(e-17)/4;if(t<1)throw Error("illegal version");if(t<=6)return C[t-1];let n=0,r=0,i=e-11,s=this.#g;for(let t=5;t>=0;t--)for(let r=e-9;r>=i;r--)n=eb(s,r,t,n);for(let t=5;t>=0;t--)for(let n=e-9;n>=i;n--)r=eb(s,t,n,r);let o=function(e,t){let n=32,r=0,{length:i}=v;for(let s=0;s=7)return C[r-1];throw Error("unable to decode version")}(n,r);if(o.size>e)throw Error("matrix size too small for version");return o}readFormatInfo(){let e=0,t=0,n=this.#g,r=this.#I,i=r-7;for(let t=0;t<=8;t++)6!==t&&(e=eb(n,t,8,e));for(let t=7;t>=0;t--)6!==t&&(e=eb(n,8,t,e));for(let e=r-1;e>=i;e--)t=eb(n,8,e,t);for(let e=r-8;e6&&(s.setRegion(t-11,0,3,6),s.setRegion(0,t-11,6,3)),s}(e),f=new Uint8Array(w.numTotalCodewords);for(let e=o-1;e>0;e-=2){6===e&&e--;for(let t=0;t1&&0===t[0]){let e=1;for(;e=e.getDegree()&&!r.isZero();){let i=r.getDegree(),o=i-e.getDegree(),l=t.multiply(r.getCoefficient(i),s),w=e.multiplyByMonomial(o,l),a=t.buildPolynomial(o,l);n=n.addOrSubtract(a),r=r.addOrSubtract(w)}return[n,r]}}let ev=new class{#I;#ef;#ec;#eh;#ed;#eg;constructor(e,t,n){let r=1,i=new Int32Array(t);for(let n=0;n=t&&(r^=e,r&=t-1);let s=new Int32Array(t);for(let e=0,n=t-1;e=r;){let t=l,n=o;if(l=s,(o=i).isZero())throw Error("remainder last was zero");i=n;let r=e.zero,w=i.getDegree(),a=o.getDegree(),u=o.getCoefficient(a),f=e.invert(u);for(;w>=a&&!i.isZero();){let t=i.getDegree()-a,n=e.multiply(i.getCoefficient(w),f);r=r.addOrSubtract(e.buildPolynomial(t,n)),w=(i=i.addOrSubtract(o.multiplyByMonomial(t,n))).getDegree()}if(s=r.multiply(l).addOrSubtract(t),w>=a)throw Error("division algorithm failed to reduce polynomial")}let w=s.getCoefficient(0);if(0===w)throw Error("sigma tilde(0) was zero");let a=e.invert(w);return[s.multiply(a),i.multiply(a)]}(r,r.buildPolynomial(t,1),n,t),l=function(e,t){let n=t.getDegree();if(1===n)return new Int32Array([t.getCoefficient(1)]);let r=0,{size:i}=e,s=new Int32Array(n);for(let o=1;o=0&&o[w].codewords.length!==a;)w--;w++;let u=0,f=a-s;for(let t=0;tg.available()?eo.TERMINATOR:function(e){let t=es.get(e);if(null!=t)return t;throw Error("illegal mode bits")}(g.read(4))){case eo.TERMINATOR:break;case eo.FNC1_FIRST_POSITION:f=!0;break;case eo.FNC1_SECOND_POSITION:c=!0,u=g.read(8);break;case eo.STRUCTURED_APPEND:if(16>g.available())throw Error("illegal structured append");d=Object.freeze({index:g.read(4),count:g.read(4)+1,parity:g.read(8)});break;case eo.ECI:w=function(e){let t=e.read(8);if((128&t)==0)return 127&t;if((192&t)==128)return(63&t)<<8|e.read(8);if((224&t)==192)return(31&t)<<16|e.read(16);throw Error("illegal extended channel interpretation value")}(g);break;default:if(l===eo.HANZI&&1!==g.read(4))throw Error("illegal hanzi subset");let m=g.read(l.getCharacterCountBits(t));switch(l){case eo.ALPHANUMERIC:a+=function(e,t,n){let r="";for(;t>1;){if(11>e.available())throw Error("illegal bits length");let n=e.read(11);r+=o(ef,n/45),r+=o(ef,n%45),t-=2}if(1===t){if(6>e.available())throw Error("illegal bits length");r+=o(ef,e.read(6))}return n?ec(r):r}(g,m,f||c);break;case eo.BYTE:a+=function(e,t,n,s,o){if(e.available()<8*t)throw Error("illegal bits length");let l=new Uint8Array(t),w=null!=o?function(e){let t=r.get(e);if(t)return t;throw Error("illegal charset value")}(o):i.ISO_8859_1;for(let n=0;n0;){let i=e.read(13),s=i/96<<8|i%96;s<2560?s+=41377:s+=42657,r[n]=s>>8&255,r[n+1]=255&s,t--,n+=2}return new TextDecoder("gb2312").decode(r)}(g,m);break;case eo.KANJI:a+=function(e,t){if(e.available()<13*t)throw Error("illegal bits length");let n=0,r=new Uint8Array(2*t);for(;t>0;){let i=e.read(13),s=i/192<<8|i%192;s<7936?s+=33088:s+=49472,r[n]=s>>8&255,r[n+1]=255&s,t--,n+=2}return new TextDecoder("shift-jis").decode(r)}(g,m);break;case eo.NUMERIC:a+=function(e,t){let n="";for(;t>=3;){if(10>e.available())throw Error("illegal bits length");let r=e.read(10);if(r>=1e3)throw Error("illegal numeric codeword");n+=o(eu,r/100),n+=o(eu,r/10%10),n+=o(eu,r%10),t-=3}if(2===t){if(7>e.available())throw Error("illegal bits length");let t=e.read(7);if(t>=100)throw Error("illegal numeric codeword");n+=o(eu,t/10),n+=o(eu,t%10)}else if(1===t){if(4>e.available())throw Error("illegal bits length");let t=e.read(4);if(t>=10)throw Error("illegal numeric codeword");n+=o(eu,t)}return n}(g,m);break;default:throw Error("illegal mode")}}while(l!==eo.TERMINATOR);return f?h=Object.freeze(["GS1"]):c&&(h=Object.freeze(["AIM",u])),s=null!=w?f?4:c?6:2:f?3:c?5:1,{content:a,codewords:e,structured:d,symbology:`]Q${s}`,fnc1:h}}(n,t,this.#em),t,s,l,w)}}var eE=n(6275),eO=n.n(eE);function ek(e){return{x:e.x,y:e.y}}function eT(e){return{x:e.x,y:e.y,moduleSize:e.moduleSize}}function eM(e,t){let n=null;t===i.ISO_8859_1&&(n=eO().detect(e)),null==n&&(n=t.label);try{return new TextDecoder(n).decode(e)}catch(t){return new TextDecoder("utf-8").decode(e)}}self.addEventListener("message",async e=>{let{data:t}=e,{uid:n,image:r}=t,{width:i,height:s}=r,o=new OffscreenCanvas(i,s).getContext("2d");o.drawImage(r,0,0);let l=function(e,t,n){if(e.length!==t*n)throw Error("luminances length must be equals to width * height");return t<40||n<40?function(e,t,n){let r=new a(t,n),i=new Int32Array(32);for(let r=1;r<5;r++){let s=0|4*t/5,o=(0|n*r/5)*t;for(let n=0|t/5;n>3]++}}let s=function(e){let t=0,n=0,r=0,{length:i}=e;for(let s=0;sn&&(t=s,n=e[s]),e[s]>r&&(r=e[s]);let s=0,o=0;for(let n=0;no&&(s=n,o=i)}if(t>s&&([t,s]=[s,t]),s-t<=2)return -1;let l=-1,w=s-1;for(let n=s-1;n>t;n--){let i=n-t,o=i*i*(s-n)*(r-e[n]);o>l&&(w=n,l=o)}return w<<3}(i);if(s>0)for(let i=0;iw&&(w=n)}if(w-a>24)for(n++,r+=t;n<8;n++,r+=t)for(let t=0;t<8;t++)o+=e[r+t]}let f=o>>6;if(w-a<=24&&(f=a/2,n>0&&s>0)){let e=(r[n-1][s]+2*r[n][s-1]+r[n-1][s-1])/4;a>10}}return i}(o.getImageData(0,0,i,s)),i,s);t.invert&&l.flip();let w=new en({strict:t.strict}).detect(l),h=[],d=new eS({decode:eM}),g=w.next();for(;!g.done;){let e=!1,t=g.value;try{let{size:n,finder:r,alignment:i}=t,s=d.decode(t.matrix),{topLeft:o,topRight:l,bottomLeft:w}=r,a=t.mapping(0,0),u=t.mapping(n,0),f=t.mapping(n,n),c=t.mapping(0,n),g=t.mapping(6.5,6.5),m=t.mapping(n-6.5,6.5),b=t.mapping(6.5,n-6.5);h.push({fnc1:s.fnc1,mask:s.mask,level:s.level,mirror:s.mirror,content:s.content,version:s.version,corrected:s.corrected,symbology:s.symbology,structured:s.structured,alignment:i?eT(i):null,finder:[eT(o),eT(l),eT(w)],timing:[ek(g),ek(m),ek(b)],corners:[ek(a),ek(u),ek(f),ek(c)]}),e=!0}catch{}g=w.next(e)}h.length>0?self.postMessage({type:"ok",payload:{uid:n,image:r,items:h}},[r]):self.postMessage({type:"error",message:"未发现二维码"})})}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return s[e].call(n.exports,n,n.exports,l),n.exports}l.m=s,l.x=function(){var e=l.O(void 0,[275],function(){return l(3988)});return l.O(e)},e=[],l.O=function(t,n,r,i){if(n){i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[n,r,i];return}for(var o=1/0,s=0;s=i)&&Object.keys(l.O).every(function(e){return l.O[e](n[a])})?n.splice(a--,1):(w=!1,i0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o)&&Object.keys(c.O).every(function(e){return c.O[e](n[a])})?n.splice(a--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o)&&Object.keys(c.O).every(function(e){return c.O[e](n[a])})?n.splice(a--,1):(f=!1,oe,[e]),t}},4207:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(9296),a=n(2860);function i(e){let{current:t}=e;null!=t&&(clearTimeout(t),e.current=null)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128,n=(0,r.A)(t),l=(0,a.useRef)(null),[o,c]=(0,a.useState)(e),s=(0,a.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;i(l),t<=0?c(e):l.current=setTimeout(()=>{null!=l.current&&(c(e),l.current=null)},t)},[]);return(0,a.useEffect)(()=>()=>{i(l)},[]),[o,s]}},3975:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return e3}});var r=n(8048),a=n(842),i=n(796),l=n.n(i),o=n(9956),c=n(9995),s=n(1140),u=n(8602),d=n(3945),m=n(7434),p=n(2502),f=n(1096),h=n(9573),g=n(9360),y=n(5259);let v=(e,t)=>new y.q(e).setAlpha(t).toRgbString(),b=(e,t)=>new y.q(e).lighten(t).toHexString(),w=e=>{let t=(0,h.cM)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},k=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:v(r,.85),colorTextSecondary:v(r,.65),colorTextTertiary:v(r,.45),colorTextQuaternary:v(r,.25),colorFill:v(r,.18),colorFillSecondary:v(r,.12),colorFillTertiary:v(r,.08),colorFillQuaternary:v(r,.04),colorBgSolid:v(r,.95),colorBgSolidHover:v(r,1),colorBgSolidActive:v(r,.9),colorBgElevated:b(n,12),colorBgContainer:b(n,8),colorBgLayout:b(n,0),colorBgSpotlight:b(n,26),colorBgBlur:v(r,.04),colorBorder:b(n,26),colorBorderSecondary:b(n,19)}};var x={defaultSeed:m.sb.token,useToken:function(){let[e,t,n]=(0,d.Ay)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:c.A,darkAlgorithm:(e,t)=>{let n=Object.keys(s.r).map(t=>{let n=(0,h.cM)(e[t],{theme:"dark"});return Array(10).fill(1).reduce((e,r,a)=>(e[`${t}-${a+1}`]=n[a],e[`${t}${a+1}`]=n[a],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{});return Object.assign(Object.assign(Object.assign({},null!=t?t:(0,c.A)(e)),n),(0,g.A)(e,{generateColorPalettes:w,generateNeutralColorPalettes:k}))},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,c.A)(e),r=n.fontSizeSM,a=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,f.A)(r)),{controlHeight:a}),(0,p.A)(Object.assign(Object.assign({},n),{controlHeight:a})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.an)(e.algorithm):(0,o.an)(c.A),n=Object.assign(Object.assign({},s.A),null==e?void 0:e.token);return(0,o.lO)(n,{override:null==e?void 0:e.token},t,u.A)},defaultConfig:m.sb,_internalContext:m.vG},A=n(2022),$=n(2860),j=n(1448),S=n(6691),C=n(2102),I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},E=n(53),O=$.forwardRef(function(e,t){return $.createElement(E.A,(0,C.A)({},e,{ref:t,icon:I}))});let{useToken:R}=x;var M=(0,$.memo)(function(e){let{text:t,debug:n,format:a,message:i}=e,{token:o}=R(),[c,s]=(0,$.useState)(0),u=(0,$.useCallback)(()=>{l()(t,{debug:n,format:a,message:i})?s(1):s(2),setTimeout(()=>{s(0)},3e3)},[t,n,a,i]);switch(c){case 1:return(0,r.jsx)(A.A,{title:"复制成功",children:(0,r.jsx)(j.A,{style:{color:o.colorSuccessActive}})});case 2:return(0,r.jsx)(A.A,{title:"复制失败",children:(0,r.jsx)(S.A,{style:{color:o.colorErrorActive}})});default:return(0,r.jsx)(A.A,{title:"复制",children:(0,r.jsx)(O,{onClick:u})})}}),P=n(4207),T=n(7163);let z=(()=>{if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top.window.document._=0}catch(e){return!1}return"showOpenFilePicker"in self})(),L=z?Promise.resolve().then(function(){return H}):Promise.resolve().then(function(){return F});async function D(...e){return(await L).default(...e)}z?Promise.resolve().then(function(){return B}):Promise.resolve().then(function(){return V}),z?Promise.resolve().then(function(){return U}):Promise.resolve().then(function(){return X});let N=async e=>{let t=await e.getFile();return t.handle=e,t};var H={__proto__:null,default:async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((e,n)=>{t[n]={description:e.description||"Files",accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept["*/*"]=e.extensions||[]});let n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(N));return e[0].multiple?r:r[0]}};function _(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(_=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new _(e)}let q=async(e,t,n=e.name,r)=>{let a=[],i=[];var l,o=!1,c=!1;try{for(var s,u=function(e){var t,n,r,a=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);a--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new _(t.call(e));n="@@asyncIterator",r="@@iterator"}throw TypeError("Object is not async iterable")}(e.values());o=!(s=await u.next()).done;o=!1){let l=s.value,o=`${n}/${l.name}`;"file"===l.kind?i.push(l.getFile().then(t=>(t.directoryHandle=e,t.handle=l,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>o})))):"directory"!==l.kind||!t||r&&r(l)||a.push(q(l,t,o,r))}}catch(e){c=!0,l=e}finally{try{o&&null!=u.return&&await u.return()}finally{if(c)throw l}}return[...(await Promise.all(a)).flat(),...await Promise.all(i)]};var B={__proto__:null,default:async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||"read";let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await (await t.values()).next()).done?[t]:q(t,e.recursive,void 0,e.skipDirectory)}},U={__proto__:null,default:async(e,t=[{}],n=null,r=!1,a=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let i=[],l=null;if(e instanceof Blob&&e.type?l=e.type:e.headers&&e.headers.get("content-type")&&(l=e.headers.get("content-type")),t.forEach((e,t)=>{i[t]={description:e.description||"Files",accept:{}},e.mimeTypes?(0===t&&l&&e.mimeTypes.push(l),e.mimeTypes.map(n=>{i[t].accept[n]=e.extensions||[]})):l?i[t].accept[l]=e.extensions||[]:i[t].accept["*/*"]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}let o=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&a&&a(o);let c=await o.createWritable();if("stream"in e){let t=e.stream();return await t.pipeTo(c),o}return"body"in e?await e.body.pipeTo(c):(await c.write(await e),await c.close()),o}},F={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{let r=document.createElement("input");r.type="file";let a=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=a||"",r.style.display="none",document.body.append(r);let i=e=>{"function"==typeof l&&l(),t(e)},l=e[0].legacySetup&&e[0].legacySetup(i,()=>l(n),r),o=()=>{window.removeEventListener("focus",o),r.remove()};r.addEventListener("click",()=>{window.addEventListener("focus",o)}),r.addEventListener("change",()=>{window.removeEventListener("focus",o),r.remove(),i(r.multiple?Array.from(r.files):r.files[0])}),"showPicker"in HTMLInputElement.prototype?r.showPicker():r.click()}))},V={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let a=e=>{"function"==typeof i&&i(),t(e)},i=e[0].legacySetup&&e[0].legacySetup(a,()=>i(n),r);r.addEventListener("change",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split("/").every(t=>!e[0].skipDirectory({name:t,kind:"directory"})))):t=t.filter(e=>2===e.webkitRelativePath.split("/").length),a(t)}),"showPicker"in HTMLInputElement.prototype?r.showPicker():r.click()}))},X={__proto__:null,default:async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let n=document.createElement("a"),r=e;"body"in e&&(r=await async function(e,t){let n=e.getReader(),r=new Response(new ReadableStream({start:e=>(async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})})()})),a=await r.blob();return n.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get("content-type"))),n.download=t.fileName||"Untitled",n.href=URL.createObjectURL(await r);let a=()=>{"function"==typeof i&&i()},i=t.legacySetup&&t.legacySetup(a,()=>i(),n);return n.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),a()}),n.click(),null}},W=n(9296);function K(e){return"function"==typeof e}function Q(e){let{valuePropName:t="value"}=e;return t}let{useApp:G}=T.A;var Z=(0,$.memo)(function(e){let{message:t}=G(),n=(0,$.useRef)(),[a,i]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){let e=(0,$.useRef)(!1);return(0,$.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,$.useCallback)(()=>e.current,[])}(),r=(0,W.A)(e),a=(0,W.A)(t),[i=t.defaultValue,l]=(0,$.useState)(()=>Q(t)in e?e[Q(t)]:e[function(e){let{defaultValuePropName:t="defaultValue"}=e;return t}(t)]),o=(0,W.A)(i),c=(0,$.useCallback)(function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),c=1;c{if(Q(t)in e){let n=e[Q(t)];n!==i&&l(n)}}),[i,c]}(e),{children:l,disabled:o,preview:c,accept:s="image/*"}=e,u=(0,$.useCallback)(()=>{o||D({mimeTypes:[s]}).then(e=>{/^image\/.+$/i.test(e.type)?i(()=>(n.current&&URL.revokeObjectURL(n.current),n.current=URL.createObjectURL(e),n.current)):t.error("请选择图片格式文件")},()=>{})},[s,o]);return(0,r.jsxs)("div",{className:"a6678820",children:[(0,r.jsx)("div",{onClick:u,children:l}),c&&c(a)]})}),J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Y=$.forwardRef(function(e,t){return $.createElement(E.A,(0,C.A)({},e,{ref:t,icon:J}))}),ee=n(6421),et=n(8459),en=n(3138),er=n(4699),ea=n(3197),ei=n(4042),el=n(667),eo=n(9400),ec=n.n(eo),es=n(5330),eu=n(2285),ed=n(7227),em=n(5362),ep=n(5461),ef=n(1341),eh=n(5827),eg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},ey=(0,eu.U)(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:a,type:i,title:l,children:o,footer:c}=e,s=eg(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=$.useContext(ed.QO),d=u(),m=t||u("modal"),p=(0,em.A)(d),[f,h,g]=(0,eh.Ay)(m,p),y=`${m}-confirm`,v={};return v=i?{closable:null!=a&&a,title:"",footer:"",children:$.createElement(ep.k,Object.assign({},e,{prefixCls:m,confirmPrefixCls:y,rootPrefixCls:d,content:o}))}:{closable:null==a||a,title:l,footer:null!==c&&$.createElement(ef.w,Object.assign({},e)),children:o},f($.createElement(es.Z,Object.assign({prefixCls:m,className:ec()(h,`${m}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,p)},s,{closeIcon:(0,ef.O)(m,r),closable:a},v)))}),ev=n(3015);function eb(e){return(0,ea.Ay)((0,ea.fp)(e))}let ew=el.A;ew.useModal=ev.A,ew.info=function(e){return(0,ea.Ay)((0,ea.$D)(e))},ew.success=function(e){return(0,ea.Ay)((0,ea.Ej)(e))},ew.error=function(e){return(0,ea.Ay)((0,ea.jT)(e))},ew.warning=eb,ew.warn=eb,ew.confirm=function(e){return(0,ea.Ay)((0,ea.lr)(e))},ew.destroyAll=function(){for(;ei.A.length;){let e=ei.A.pop();e&&e()}},ew.config=ea.FB,ew._InternalPanelDoNotUseOrYouWillBeFired=ey;var ek=n(9750),ex=n(8314),eA=n(5852),e$=n(9518),ej=n(249),eS=n(1671),eC=n(6339),eI=n(2700),eE=n(91),eO=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],eR=$.forwardRef(function(e,t){var n,r=e.prefixCls,a=void 0===r?"rc-switch":r,i=e.className,l=e.checked,o=e.defaultChecked,c=e.disabled,s=e.loadingIcon,u=e.checkedChildren,d=e.unCheckedChildren,m=e.onClick,p=e.onChange,f=e.onKeyDown,h=(0,eC.A)(e,eO),g=(0,eI.A)(!1,{value:l,defaultValue:o}),y=(0,eS.A)(g,2),v=y[0],b=y[1];function w(e,t){var n=v;return c||(b(n=e),null==p||p(n,t)),n}var k=ec()(a,i,(n={},(0,ej.A)(n,"".concat(a,"-checked"),v),(0,ej.A)(n,"".concat(a,"-disabled"),c),n));return $.createElement("button",(0,C.A)({},h,{type:"button",role:"switch","aria-checked":v,disabled:c,className:k,ref:t,onKeyDown:function(e){e.which===eE.A.LEFT?w(!1,e):e.which===eE.A.RIGHT&&w(!0,e),null==f||f(e)},onClick:function(e){var t=w(!v,e);null==m||m(t,e)}}),s,$.createElement("span",{className:"".concat(a,"-inner")},$.createElement("span",{className:"".concat(a,"-inner-checked")},u),$.createElement("span",{className:"".concat(a,"-inner-unchecked")},d)))});eR.displayName="Switch";var eM=n(817),eP=n(3515),eT=n(985),ez=n(5365),eL=n(4946),eD=n(7102);let eN=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:c,calc:s}=e,u=`${t}-inner`,d=(0,o.zA)(s(c).add(s(r).mul(2)).equal()),m=(0,o.zA)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:n,lineHeight:(0,o.zA)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${u}-checked, ${u}-unchecked`]:{minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${m})`,marginInlineEnd:`calc(100% - ${d} + ${m})`},[`${u}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:s(s(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${m})`,marginInlineEnd:`calc(-100% + ${d} - ${m})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,o.zA)(s(c).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}},eH=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},e_=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:a,handleSize:i,calc:l}=e,c=`${t}-handle`;return{[t]:{[c]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${(0,o.zA)(l(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},eq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:a,innerMaxMargin:i,handleSize:l,calc:c}=e,s=`${t}-inner`,u=(0,o.zA)(c(l).add(c(r).mul(2)).equal()),d=(0,o.zA)(c(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},eB=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ez.dF)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,o.zA)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,ez.K8)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}};var eU=(0,eL.OF)("Switch",e=>{let t=(0,eD.oX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[eB(t),eq(t),e_(t),eH(t),eN(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:a}=e,i=t*n,l=r/2,o=i-4,c=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new y.q("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),eF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let eV=$.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:a,loading:i,className:l,rootClassName:o,style:c,checked:s,value:u,defaultChecked:d,defaultValue:m,onChange:p}=e,f=eF(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[h,g]=(0,eI.A)(!1,{value:null!=s?s:u,defaultValue:null!=d?d:m}),{getPrefixCls:y,direction:v,switch:b}=$.useContext(ed.QO),w=$.useContext(eP.A),k=(null!=a?a:w)||i,x=y("switch",n),A=$.createElement("div",{className:`${x}-handle`},i&&$.createElement(ee.A,{className:`${x}-loading-icon`})),[j,S,C]=eU(x),I=(0,eT.A)(r),E=ec()(null==b?void 0:b.className,{[`${x}-small`]:"small"===I,[`${x}-loading`]:i,[`${x}-rtl`]:"rtl"===v},l,o,S,C),O=Object.assign(Object.assign({},null==b?void 0:b.style),c);return j($.createElement(eM.A,{component:"Switch"},$.createElement(eR,Object.assign({},f,{checked:h,onChange:function(){g(arguments.length<=0?void 0:arguments[0]),null==p||p.apply(void 0,arguments)},prefixCls:x,className:E,style:O,disabled:k,ref:t,loadingIcon:A}))))});eV.__ANT_SWITCH=!0;var eX=n.p+"images/3db910008d877cd2.jpg",eW=n(8483),eK=n(7098);let eQ=(0,$.memo)(e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:[(0,r.jsx)("path",{d:"M341.331 512c0 94.26 76.416 170.669 170.669 170.669 94.26 0 170.669-76.416 170.669-170.669 0-94.26-76.416-170.669-170.669-170.669-94.26 0-170.669 76.416-170.669 170.669"}),(0,r.jsx)("path",{d:"M972.8 460.8h-54.784C894.509 275.443 748.556 129.491 563.2 105.984V51.2a51.2 51.2 0 1 0-102.4 0v54.784C275.443 129.491 129.491 275.444 105.984 460.8H51.2a51.2 51.2 0 1 0 0 102.4h54.784c23.507 185.357 169.46 331.309 354.816 354.816V972.8a51.2 51.2 0 1 0 102.4 0v-54.784c185.357-23.507 331.309-169.46 354.816-354.816H972.8a51.2 51.2 0 1 0 0-102.4M512 819.2c-169.664 0-307.2-137.536-307.2-307.2S342.336 204.8 512 204.8 819.2 342.336 819.2 512 681.664 819.2 512 819.2"})]})),eG=(0,$.memo)(e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M909 897H115a50 50 0 0 1-50-50V177a50 50 0 0 1 50-50h370a50 50 0 0 1 50 50v62a10 10 0 0 0 10 10h241a50 50 0 0 1 50 50v58h73a50 50 0 0 1 50 50v440a50 50 0 0 1-50 50M505 309a30 30 0 0 1-30-30v-72a20 20 0 0 0-20-20H145a20 20 0 0 0-20 20v610c0 11.046 9.377 20 20.422 20H209a20 20 0 0 0 20-20V407a50 50 0 0 1 50-50h497v-28a20 20 0 0 0-20-20H535m364 128a20 20 0 0 0-20-20H309a20 20 0 0 0-20 20v400h590a20 20 0 0 0 20-20zM650.659 615.8l-26.618-26.53V737a30 30 0 0 1-30 30h-.113a30 30 0 0 1-30-30V589.275L537.309 615.8a30.006 30.006 0 0 1-42.509-42.36l77.928-77.669a30.127 30.127 0 0 1 42.506 0l77.929 77.669a30.007 30.007 0 0 1-42.504 42.36"})})),{useApp:eZ}=T.A,{Item:eJ,useForm:eY,useWatch:e0}=et.A,e2=(0,$.memo)(function(e){let{state:t,currentRef:n}=e;if(t&&"ok"===t.type){let{payload:e}=t,{uid:i,image:l,items:o}=e;return(0,r.jsx)(e1,{uid:i,name:"概览",image:l,items:o,currentRef:n,trigger:(e,t)=>(0,r.jsx)(en.Ay,{loading:e,onClick:t,icon:(0,r.jsx)(a.A,{component:eQ}),children:"概览"})},i)}return null}),e1=(0,$.memo)(function(e){let{uid:t,name:a,items:i,image:l,trigger:o,currentRef:c}=e,s=(0,$.useRef)(!1),u=(0,$.useRef)(),{message:d}=eZ(),m=(0,$.useRef)(),[p,f]=(0,$.useState)(),[h,g]=(0,$.useState)(!1),[y,v]=(0,P.A)(!1),b=(0,$.useMemo)(()=>({src:p,visible:h,onVisibleChange(e){g(e)},toolbarRender(e){return(0,r.jsxs)("div",{className:"ee2649fa",children:[(0,r.jsx)("p",{children:a}),e]})}}),[p,a,h]),w=(0,$.useCallback)(()=>{if(c.current=t,m.current!==t){let e=u.current;if(e&&!s.current){v(!0),s.current=!0,m.current=t;let n=function(e){let t=new OffscreenCanvas(e.width,e.height);return t.getContext("2d").drawImage(e,0,0),t.transferToImageBitmap()}(l),r={image:n,items:i.map(e=>({finder:e.finder,timing:e.timing,corners:e.corners,alignment:e.alignment}))};e.postMessage(r,[n])}}else g(e=>!e)},[t,l,i]);return(0,$.useEffect)(()=>{let e=new Worker(new URL(n.p+n.u(58),n.b));return e.addEventListener("message",e=>{let{data:n}=e;switch(v(!1),s.current=!1,n.type){case"ok":f(n.payload);let{current:r}=c;r===t&&g(e=>!e);break;case"error":d.error(n.message);break;default:d.error("发生未知错误")}}),u.current=e,()=>{e.terminate()}},[t]),(0,r.jsxs)("div",{className:"decf7166",children:[o(y,w),(0,r.jsx)(er.A,{hidden:!0,src:eW,preview:b})]})}),e4=(0,$.memo)(function(e){let{name:t,item:n}=e,[a,i]=(0,$.useState)(!1),l=(0,$.useCallback)(()=>{i(!0)},[]),o=(0,$.useCallback)(()=>{i(!1)},[]),c=(0,$.useMemo)(()=>{let{content:e,...t}=n;return function(e){let{key:t="key",null:n="null",number:r="number",string:a="string",boolean:i="boolean"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.replace(/[&<>]/gm,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return">";default:return e}}).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,e=>{let l=r;return/^"/.test(e)?l=/:$/.test(e)?t:a:/null/.test(e)?l=n:/true|false/.test(e)&&(l=i),`${e}`})}(JSON.stringify(t,null,2),{key:"e2ff97cd",null:"a575629a",number:"a9fc8a1c",string:"d3599845",boolean:"c8ab7683"})},[n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.A,{title:"详情",children:(0,r.jsx)(Y,{onClick:l})}),(0,r.jsx)(ew,{centered:!0,title:t,destroyOnClose:!0,open:a,onCancel:o,footer:()=>(0,r.jsx)(en.Ay,{type:"primary",onClick:o,children:"确定"}),children:(0,r.jsx)("code",{className:"e6fab091",dangerouslySetInnerHTML:{__html:c}})})]})}),e6=(0,$.memo)(function(e){let{state:t,currentRef:n}=e,i=(0,$.useMemo)(()=>{if(t&&"ok"===t.type){let{uid:e,image:i,items:l}=t.payload;return l.map((t,l)=>{let{content:o}=t,c=`${e}-${l}`,s=`解码结果【${l+1}】`;return{key:c,label:s,children:(0,r.jsx)("pre",{children:o.replace(/\r(?!\n)|\r\n/g,"\n")}),extra:(0,r.jsxs)("div",{onClick:e=>{e.stopPropagation()},className:"ed042f55",children:[(0,r.jsx)(M,{text:o}),(0,r.jsx)(e1,{uid:c,image:i,items:[t],name:`${s}定位`,currentRef:n,trigger:(e,t)=>e?(0,r.jsx)(ee.A,{}):(0,r.jsx)(A.A,{title:"定位",children:(0,r.jsx)(a.A,{component:eQ,onClick:t})})},c),(0,r.jsx)(e4,{name:`${s}详情`,item:t})]})}})}},[t]);if(t)switch(t.type){case"ok":return(0,r.jsx)(ek.A,{size:"small",items:i,className:"aaf4de2d",defaultActiveKey:`${t.payload.uid}-0`},t.payload.uid);case"error":return(0,r.jsx)(ex.A,{type:"error",message:t.message,showIcon:!0});default:return(0,r.jsx)(ex.A,{type:"error",message:"发生未知错误",showIcon:!0})}return null});var e3=(0,$.memo)(function(){let e=(0,$.useRef)(!1),t=(0,$.useRef)(),[i]=eY(),l=(0,$.useRef)(),[o,c]=(0,P.A)(!1),[s,u]=(0,$.useState)(),d=(0,$.useMemo)(()=>({image:eX,strict:!1,invert:!1}),[]),m=e0(["image"],i)??d.image,p=(0,$.useCallback)(n=>{let r=t.current;if(r&&!e.current){c(!0),e.current=!0;let{image:t}=n,a=new self.Image;a.crossOrigin="anonymous",a.addEventListener("error",()=>{c(!1)}),a.addEventListener("load",()=>{createImageBitmap(a).then(e=>{let a={...n,image:e,uid:t};r.postMessage(a,[e])})}),a.src=t}},[]),f=(0,$.useCallback)(e=>e?(0,r.jsx)(er.A,{src:e,alt:"preview",className:"f9962498"}):null,[]);return(0,$.useEffect)(()=>{let r=new Worker(new URL(n.p+n.u(748),n.b));return r.addEventListener("message",t=>{let{data:n}=t;u(n),c(!1),e.current=!1}),t.current=r,()=>{r.terminate()}},[]),(0,r.jsxs)("div",{className:"ui-page",children:[(0,r.jsx)(et.A,{form:i,onFinish:p,layout:"vertical",initialValues:d,children:(0,r.jsxs)(eA.A,{gutter:24,children:[(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"image",children:(0,r.jsx)(Z,{preview:f,children:(0,r.jsx)(en.Ay,{icon:(0,r.jsx)(a.A,{component:eG}),children:"选择图片"})})})}),(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"strict",label:"严格模式",valuePropName:"checked",tooltip:"可增加扫描速度,但会降低识别率",children:(0,r.jsx)(eV,{checkedChildren:"开",unCheckedChildren:"关"})})}),(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"invert",label:"图片反色",valuePropName:"checked",children:(0,r.jsx)(eV,{checkedChildren:"开",unCheckedChildren:"关"})})}),(0,r.jsxs)(e$.A,{span:24,className:"a741f479",children:[(0,r.jsx)(en.Ay,{type:"primary",htmlType:"submit",loading:o,disabled:!m,icon:(0,r.jsx)(a.A,{component:eK.A}),children:"解码"}),(0,r.jsx)(e2,{state:s,currentRef:l})]})]})}),(0,r.jsx)("div",{className:"ebf18c46",children:(0,r.jsx)(e6,{state:s,currentRef:l})})]})})},3498:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;re,[e]),t}},5200:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(4243),a=n(2860);function i(e){let{current:t}=e;null!=t&&(clearTimeout(t),e.current=null)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128,n=(0,r.A)(t),l=(0,a.useRef)(null),[o,c]=(0,a.useState)(e),s=(0,a.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;i(l),t<=0?c(e):l.current=setTimeout(()=>{null!=l.current&&(c(e),l.current=null)},t)},[]);return(0,a.useEffect)(()=>()=>{i(l)},[]),[o,s]}},4082:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return e3}});var r=n(8048),a=n(842),i=n(796),l=n.n(i),o=n(9956),c=n(9995),s=n(1140),u=n(8602),d=n(3945),m=n(7434),p=n(2502),f=n(1096),h=n(9573),g=n(9360),y=n(5259);let v=(e,t)=>new y.q(e).setAlpha(t).toRgbString(),b=(e,t)=>new y.q(e).lighten(t).toHexString(),w=e=>{let t=(0,h.cM)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},k=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:v(r,.85),colorTextSecondary:v(r,.65),colorTextTertiary:v(r,.45),colorTextQuaternary:v(r,.25),colorFill:v(r,.18),colorFillSecondary:v(r,.12),colorFillTertiary:v(r,.08),colorFillQuaternary:v(r,.04),colorBgSolid:v(r,.95),colorBgSolidHover:v(r,1),colorBgSolidActive:v(r,.9),colorBgElevated:b(n,12),colorBgContainer:b(n,8),colorBgLayout:b(n,0),colorBgSpotlight:b(n,26),colorBgBlur:v(r,.04),colorBorder:b(n,26),colorBorderSecondary:b(n,19)}};var x={defaultSeed:m.sb.token,useToken:function(){let[e,t,n]=(0,d.Ay)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:c.A,darkAlgorithm:(e,t)=>{let n=Object.keys(s.r).map(t=>{let n=(0,h.cM)(e[t],{theme:"dark"});return Array(10).fill(1).reduce((e,r,a)=>(e[`${t}-${a+1}`]=n[a],e[`${t}${a+1}`]=n[a],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{});return Object.assign(Object.assign(Object.assign({},null!=t?t:(0,c.A)(e)),n),(0,g.A)(e,{generateColorPalettes:w,generateNeutralColorPalettes:k}))},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,c.A)(e),r=n.fontSizeSM,a=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,f.A)(r)),{controlHeight:a}),(0,p.A)(Object.assign(Object.assign({},n),{controlHeight:a})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.an)(e.algorithm):(0,o.an)(c.A),n=Object.assign(Object.assign({},s.A),null==e?void 0:e.token);return(0,o.lO)(n,{override:null==e?void 0:e.token},t,u.A)},defaultConfig:m.sb,_internalContext:m.vG},A=n(2022),$=n(2860),j=n(1448),S=n(6691),C=n(2102),I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},E=n(53),O=$.forwardRef(function(e,t){return $.createElement(E.A,(0,C.A)({},e,{ref:t,icon:I}))});let{useToken:R}=x;var M=(0,$.memo)(function(e){let{text:t,debug:n,format:a,message:i}=e,{token:o}=R(),[c,s]=(0,$.useState)(0),u=(0,$.useCallback)(()=>{l()(t,{debug:n,format:a,message:i})?s(1):s(2),setTimeout(()=>{s(0)},3e3)},[t,n,a,i]);switch(c){case 1:return(0,r.jsx)(A.A,{title:"复制成功",children:(0,r.jsx)(j.A,{style:{color:o.colorSuccessActive}})});case 2:return(0,r.jsx)(A.A,{title:"复制失败",children:(0,r.jsx)(S.A,{style:{color:o.colorErrorActive}})});default:return(0,r.jsx)(A.A,{title:"复制",children:(0,r.jsx)(O,{onClick:u})})}}),P=n(5200),T=n(7163);let z=(()=>{if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top.window.document._=0}catch(e){return!1}return"showOpenFilePicker"in self})(),L=z?Promise.resolve().then(function(){return H}):Promise.resolve().then(function(){return F});async function D(...e){return(await L).default(...e)}z?Promise.resolve().then(function(){return B}):Promise.resolve().then(function(){return V}),z?Promise.resolve().then(function(){return U}):Promise.resolve().then(function(){return X});let N=async e=>{let t=await e.getFile();return t.handle=e,t};var H={__proto__:null,default:async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((e,n)=>{t[n]={description:e.description||"Files",accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept["*/*"]=e.extensions||[]});let n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(N));return e[0].multiple?r:r[0]}};function _(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(_=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new _(e)}let q=async(e,t,n=e.name,r)=>{let a=[],i=[];var l,o=!1,c=!1;try{for(var s,u=function(e){var t,n,r,a=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);a--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new _(t.call(e));n="@@asyncIterator",r="@@iterator"}throw TypeError("Object is not async iterable")}(e.values());o=!(s=await u.next()).done;o=!1){let l=s.value,o=`${n}/${l.name}`;"file"===l.kind?i.push(l.getFile().then(t=>(t.directoryHandle=e,t.handle=l,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>o})))):"directory"!==l.kind||!t||r&&r(l)||a.push(q(l,t,o,r))}}catch(e){c=!0,l=e}finally{try{o&&null!=u.return&&await u.return()}finally{if(c)throw l}}return[...(await Promise.all(a)).flat(),...await Promise.all(i)]};var B={__proto__:null,default:async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||"read";let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await (await t.values()).next()).done?[t]:q(t,e.recursive,void 0,e.skipDirectory)}},U={__proto__:null,default:async(e,t=[{}],n=null,r=!1,a=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let i=[],l=null;if(e instanceof Blob&&e.type?l=e.type:e.headers&&e.headers.get("content-type")&&(l=e.headers.get("content-type")),t.forEach((e,t)=>{i[t]={description:e.description||"Files",accept:{}},e.mimeTypes?(0===t&&l&&e.mimeTypes.push(l),e.mimeTypes.map(n=>{i[t].accept[n]=e.extensions||[]})):l?i[t].accept[l]=e.extensions||[]:i[t].accept["*/*"]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}let o=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&a&&a(o);let c=await o.createWritable();if("stream"in e){let t=e.stream();return await t.pipeTo(c),o}return"body"in e?await e.body.pipeTo(c):(await c.write(await e),await c.close()),o}},F={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{let r=document.createElement("input");r.type="file";let a=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=a||"",r.style.display="none",document.body.append(r);let i=e=>{"function"==typeof l&&l(),t(e)},l=e[0].legacySetup&&e[0].legacySetup(i,()=>l(n),r),o=()=>{window.removeEventListener("focus",o),r.remove()};r.addEventListener("click",()=>{window.addEventListener("focus",o)}),r.addEventListener("change",()=>{window.removeEventListener("focus",o),r.remove(),i(r.multiple?Array.from(r.files):r.files[0])}),"showPicker"in HTMLInputElement.prototype?r.showPicker():r.click()}))},V={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let a=e=>{"function"==typeof i&&i(),t(e)},i=e[0].legacySetup&&e[0].legacySetup(a,()=>i(n),r);r.addEventListener("change",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split("/").every(t=>!e[0].skipDirectory({name:t,kind:"directory"})))):t=t.filter(e=>2===e.webkitRelativePath.split("/").length),a(t)}),"showPicker"in HTMLInputElement.prototype?r.showPicker():r.click()}))},X={__proto__:null,default:async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let n=document.createElement("a"),r=e;"body"in e&&(r=await async function(e,t){let n=e.getReader(),r=new Response(new ReadableStream({start:e=>(async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})})()})),a=await r.blob();return n.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get("content-type"))),n.download=t.fileName||"Untitled",n.href=URL.createObjectURL(await r);let a=()=>{"function"==typeof i&&i()},i=t.legacySetup&&t.legacySetup(a,()=>i(),n);return n.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),a()}),n.click(),null}},W=n(4243);function K(e){return"function"==typeof e}function Q(e){let{valuePropName:t="value"}=e;return t}let{useApp:G}=T.A;var Z=(0,$.memo)(function(e){let{message:t}=G(),n=(0,$.useRef)(),[a,i]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){let e=(0,$.useRef)(!1);return(0,$.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,$.useCallback)(()=>e.current,[])}(),r=(0,W.A)(e),a=(0,W.A)(t),[i=t.defaultValue,l]=(0,$.useState)(()=>Q(t)in e?e[Q(t)]:e[function(e){let{defaultValuePropName:t="defaultValue"}=e;return t}(t)]),o=(0,W.A)(i),c=(0,$.useCallback)(function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),c=1;c{if(Q(t)in e){let n=e[Q(t)];n!==i&&l(n)}}),[i,c]}(e),{children:l,disabled:o,preview:c,accept:s="image/*"}=e,u=(0,$.useCallback)(()=>{o||D({mimeTypes:[s]}).then(e=>{/^image\/.+$/i.test(e.type)?i(()=>(n.current&&URL.revokeObjectURL(n.current),n.current=URL.createObjectURL(e),n.current)):t.error("请选择图片格式文件")},()=>{})},[s,o]);return(0,r.jsxs)("div",{className:"a6678820",children:[(0,r.jsx)("div",{onClick:u,children:l}),c&&c(a)]})}),J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Y=$.forwardRef(function(e,t){return $.createElement(E.A,(0,C.A)({},e,{ref:t,icon:J}))}),ee=n(6421),et=n(8459),en=n(3138),er=n(4699),ea=n(3197),ei=n(4042),el=n(667),eo=n(9400),ec=n.n(eo),es=n(5330),eu=n(2285),ed=n(7227),em=n(5362),ep=n(5461),ef=n(1341),eh=n(5827),eg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},ey=(0,eu.U)(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:a,type:i,title:l,children:o,footer:c}=e,s=eg(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=$.useContext(ed.QO),d=u(),m=t||u("modal"),p=(0,em.A)(d),[f,h,g]=(0,eh.Ay)(m,p),y=`${m}-confirm`,v={};return v=i?{closable:null!=a&&a,title:"",footer:"",children:$.createElement(ep.k,Object.assign({},e,{prefixCls:m,confirmPrefixCls:y,rootPrefixCls:d,content:o}))}:{closable:null==a||a,title:l,footer:null!==c&&$.createElement(ef.w,Object.assign({},e)),children:o},f($.createElement(es.Z,Object.assign({prefixCls:m,className:ec()(h,`${m}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,p)},s,{closeIcon:(0,ef.O)(m,r),closable:a},v)))}),ev=n(3015);function eb(e){return(0,ea.Ay)((0,ea.fp)(e))}let ew=el.A;ew.useModal=ev.A,ew.info=function(e){return(0,ea.Ay)((0,ea.$D)(e))},ew.success=function(e){return(0,ea.Ay)((0,ea.Ej)(e))},ew.error=function(e){return(0,ea.Ay)((0,ea.jT)(e))},ew.warning=eb,ew.warn=eb,ew.confirm=function(e){return(0,ea.Ay)((0,ea.lr)(e))},ew.destroyAll=function(){for(;ei.A.length;){let e=ei.A.pop();e&&e()}},ew.config=ea.FB,ew._InternalPanelDoNotUseOrYouWillBeFired=ey;var ek=n(9750),ex=n(8314),eA=n(5852),e$=n(9518),ej=n(249),eS=n(1671),eC=n(6339),eI=n(2700),eE=n(91),eO=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],eR=$.forwardRef(function(e,t){var n,r=e.prefixCls,a=void 0===r?"rc-switch":r,i=e.className,l=e.checked,o=e.defaultChecked,c=e.disabled,s=e.loadingIcon,u=e.checkedChildren,d=e.unCheckedChildren,m=e.onClick,p=e.onChange,f=e.onKeyDown,h=(0,eC.A)(e,eO),g=(0,eI.A)(!1,{value:l,defaultValue:o}),y=(0,eS.A)(g,2),v=y[0],b=y[1];function w(e,t){var n=v;return c||(b(n=e),null==p||p(n,t)),n}var k=ec()(a,i,(n={},(0,ej.A)(n,"".concat(a,"-checked"),v),(0,ej.A)(n,"".concat(a,"-disabled"),c),n));return $.createElement("button",(0,C.A)({},h,{type:"button",role:"switch","aria-checked":v,disabled:c,className:k,ref:t,onKeyDown:function(e){e.which===eE.A.LEFT?w(!1,e):e.which===eE.A.RIGHT&&w(!0,e),null==f||f(e)},onClick:function(e){var t=w(!v,e);null==m||m(t,e)}}),s,$.createElement("span",{className:"".concat(a,"-inner")},$.createElement("span",{className:"".concat(a,"-inner-checked")},u),$.createElement("span",{className:"".concat(a,"-inner-unchecked")},d)))});eR.displayName="Switch";var eM=n(817),eP=n(3515),eT=n(985),ez=n(5365),eL=n(4946),eD=n(7102);let eN=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:c,calc:s}=e,u=`${t}-inner`,d=(0,o.zA)(s(c).add(s(r).mul(2)).equal()),m=(0,o.zA)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:n,lineHeight:(0,o.zA)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${u}-checked, ${u}-unchecked`]:{minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${m})`,marginInlineEnd:`calc(100% - ${d} + ${m})`},[`${u}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:s(s(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${m})`,marginInlineEnd:`calc(-100% + ${d} - ${m})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,o.zA)(s(c).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}},eH=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},e_=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:a,handleSize:i,calc:l}=e,c=`${t}-handle`;return{[t]:{[c]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${(0,o.zA)(l(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},eq=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:a,innerMaxMargin:i,handleSize:l,calc:c}=e,s=`${t}-inner`,u=(0,o.zA)(c(l).add(c(r).mul(2)).equal()),d=(0,o.zA)(c(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},eB=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ez.dF)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,o.zA)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,ez.K8)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}};var eU=(0,eL.OF)("Switch",e=>{let t=(0,eD.oX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[eB(t),eq(t),e_(t),eH(t),eN(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:a}=e,i=t*n,l=r/2,o=i-4,c=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new y.q("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),eF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let eV=$.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:a,loading:i,className:l,rootClassName:o,style:c,checked:s,value:u,defaultChecked:d,defaultValue:m,onChange:p}=e,f=eF(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[h,g]=(0,eI.A)(!1,{value:null!=s?s:u,defaultValue:null!=d?d:m}),{getPrefixCls:y,direction:v,switch:b}=$.useContext(ed.QO),w=$.useContext(eP.A),k=(null!=a?a:w)||i,x=y("switch",n),A=$.createElement("div",{className:`${x}-handle`},i&&$.createElement(ee.A,{className:`${x}-loading-icon`})),[j,S,C]=eU(x),I=(0,eT.A)(r),E=ec()(null==b?void 0:b.className,{[`${x}-small`]:"small"===I,[`${x}-loading`]:i,[`${x}-rtl`]:"rtl"===v},l,o,S,C),O=Object.assign(Object.assign({},null==b?void 0:b.style),c);return j($.createElement(eM.A,{component:"Switch"},$.createElement(eR,Object.assign({},f,{checked:h,onChange:function(){g(arguments.length<=0?void 0:arguments[0]),null==p||p.apply(void 0,arguments)},prefixCls:x,className:E,style:O,disabled:k,ref:t,loadingIcon:A}))))});eV.__ANT_SWITCH=!0;var eX=n.p+"images/3db910008d877cd2.jpg",eW=n(8483),eK=n(1443);let eQ=(0,$.memo)(e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:[(0,r.jsx)("path",{d:"M341.331 512c0 94.26 76.416 170.669 170.669 170.669 94.26 0 170.669-76.416 170.669-170.669 0-94.26-76.416-170.669-170.669-170.669-94.26 0-170.669 76.416-170.669 170.669"}),(0,r.jsx)("path",{d:"M972.8 460.8h-54.784C894.509 275.443 748.556 129.491 563.2 105.984V51.2a51.2 51.2 0 1 0-102.4 0v54.784C275.443 129.491 129.491 275.444 105.984 460.8H51.2a51.2 51.2 0 1 0 0 102.4h54.784c23.507 185.357 169.46 331.309 354.816 354.816V972.8a51.2 51.2 0 1 0 102.4 0v-54.784c185.357-23.507 331.309-169.46 354.816-354.816H972.8a51.2 51.2 0 1 0 0-102.4M512 819.2c-169.664 0-307.2-137.536-307.2-307.2S342.336 204.8 512 204.8 819.2 342.336 819.2 512 681.664 819.2 512 819.2"})]})),eG=(0,$.memo)(e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M909 897H115a50 50 0 0 1-50-50V177a50 50 0 0 1 50-50h370a50 50 0 0 1 50 50v62a10 10 0 0 0 10 10h241a50 50 0 0 1 50 50v58h73a50 50 0 0 1 50 50v440a50 50 0 0 1-50 50M505 309a30 30 0 0 1-30-30v-72a20 20 0 0 0-20-20H145a20 20 0 0 0-20 20v610c0 11.046 9.377 20 20.422 20H209a20 20 0 0 0 20-20V407a50 50 0 0 1 50-50h497v-28a20 20 0 0 0-20-20H535m364 128a20 20 0 0 0-20-20H309a20 20 0 0 0-20 20v400h590a20 20 0 0 0 20-20zM650.659 615.8l-26.618-26.53V737a30 30 0 0 1-30 30h-.113a30 30 0 0 1-30-30V589.275L537.309 615.8a30.006 30.006 0 0 1-42.509-42.36l77.928-77.669a30.127 30.127 0 0 1 42.506 0l77.929 77.669a30.007 30.007 0 0 1-42.504 42.36"})})),{useApp:eZ}=T.A,{Item:eJ,useForm:eY,useWatch:e0}=et.A,e2=(0,$.memo)(function(e){let{state:t,currentRef:n}=e;if(t&&"ok"===t.type){let{payload:e}=t,{uid:i,image:l,items:o}=e;return(0,r.jsx)(e1,{uid:i,name:"概览",image:l,items:o,currentRef:n,trigger:(e,t)=>(0,r.jsx)(en.Ay,{loading:e,onClick:t,icon:(0,r.jsx)(a.A,{component:eQ}),children:"概览"})},i)}return null}),e1=(0,$.memo)(function(e){let{uid:t,name:a,items:i,image:l,trigger:o,currentRef:c}=e,s=(0,$.useRef)(!1),u=(0,$.useRef)(),{message:d}=eZ(),m=(0,$.useRef)(),[p,f]=(0,$.useState)(),[h,g]=(0,$.useState)(!1),[y,v]=(0,P.A)(!1),b=(0,$.useMemo)(()=>({src:p,visible:h,onVisibleChange(e){g(e)},toolbarRender(e){return(0,r.jsxs)("div",{className:"ee2649fa",children:[(0,r.jsx)("p",{children:a}),e]})}}),[p,a,h]),w=(0,$.useCallback)(()=>{if(c.current=t,m.current!==t){let e=u.current;if(e&&!s.current){v(!0),s.current=!0,m.current=t;let n=function(e){let t=new OffscreenCanvas(e.width,e.height);return t.getContext("2d").drawImage(e,0,0),t.transferToImageBitmap()}(l),r={image:n,items:i.map(e=>({finder:e.finder,timing:e.timing,corners:e.corners,alignment:e.alignment}))};e.postMessage(r,[n])}}else g(e=>!e)},[t,l,i]);return(0,$.useEffect)(()=>{let e=new Worker(new URL(n.p+n.u(217),n.b));return e.addEventListener("message",e=>{let{data:n}=e;switch(v(!1),s.current=!1,n.type){case"ok":f(n.payload);let{current:r}=c;r===t&&g(e=>!e);break;case"error":d.error(n.message);break;default:d.error("发生未知错误")}}),u.current=e,()=>{e.terminate()}},[t]),(0,r.jsxs)("div",{className:"decf7166",children:[o(y,w),(0,r.jsx)(er.A,{hidden:!0,src:eW,preview:b})]})}),e4=(0,$.memo)(function(e){let{name:t,item:n}=e,[a,i]=(0,$.useState)(!1),l=(0,$.useCallback)(()=>{i(!0)},[]),o=(0,$.useCallback)(()=>{i(!1)},[]),c=(0,$.useMemo)(()=>{let{content:e,...t}=n;return function(e){let{key:t="key",null:n="null",number:r="number",string:a="string",boolean:i="boolean"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.replace(/[&<>]/gm,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return">";default:return e}}).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,e=>{let l=r;return/^"/.test(e)?l=/:$/.test(e)?t:a:/null/.test(e)?l=n:/true|false/.test(e)&&(l=i),`${e}`})}(JSON.stringify(t,null,2),{key:"e2ff97cd",null:"a575629a",number:"a9fc8a1c",string:"d3599845",boolean:"c8ab7683"})},[n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.A,{title:"详情",children:(0,r.jsx)(Y,{onClick:l})}),(0,r.jsx)(ew,{centered:!0,title:t,destroyOnClose:!0,open:a,onCancel:o,footer:()=>(0,r.jsx)(en.Ay,{type:"primary",onClick:o,children:"确定"}),children:(0,r.jsx)("code",{className:"e6fab091",dangerouslySetInnerHTML:{__html:c}})})]})}),e6=(0,$.memo)(function(e){let{state:t,currentRef:n}=e,i=(0,$.useMemo)(()=>{if(t&&"ok"===t.type){let{uid:e,image:i,items:l}=t.payload;return l.map((t,l)=>{let{content:o}=t,c=`${e}-${l}`,s=`解码结果【${l+1}】`;return{key:c,label:s,children:(0,r.jsx)("pre",{children:o.replace(/\r(?!\n)|\r\n/g,"\n")}),extra:(0,r.jsxs)("div",{onClick:e=>{e.stopPropagation()},className:"ed042f55",children:[(0,r.jsx)(M,{text:o}),(0,r.jsx)(e1,{uid:c,image:i,items:[t],name:`${s}定位`,currentRef:n,trigger:(e,t)=>e?(0,r.jsx)(ee.A,{}):(0,r.jsx)(A.A,{title:"定位",children:(0,r.jsx)(a.A,{component:eQ,onClick:t})})},c),(0,r.jsx)(e4,{name:`${s}详情`,item:t})]})}})}},[t]);if(t)switch(t.type){case"ok":return(0,r.jsx)(ek.A,{size:"small",items:i,className:"aaf4de2d",defaultActiveKey:`${t.payload.uid}-0`},t.payload.uid);case"error":return(0,r.jsx)(ex.A,{type:"error",message:t.message,showIcon:!0});default:return(0,r.jsx)(ex.A,{type:"error",message:"发生未知错误",showIcon:!0})}return null});var e3=(0,$.memo)(function(){let e=(0,$.useRef)(!1),t=(0,$.useRef)(),[i]=eY(),l=(0,$.useRef)(),[o,c]=(0,P.A)(!1),[s,u]=(0,$.useState)(),d=(0,$.useMemo)(()=>({image:eX,strict:!1,invert:!1}),[]),m=e0(["image"],i)??d.image,p=(0,$.useCallback)(n=>{let r=t.current;if(r&&!e.current){c(!0),e.current=!0;let{image:t}=n,a=new self.Image;a.crossOrigin="anonymous",a.addEventListener("error",()=>{c(!1)}),a.addEventListener("load",()=>{createImageBitmap(a).then(e=>{let a={...n,image:e,uid:t};r.postMessage(a,[e])})}),a.src=t}},[]),f=(0,$.useCallback)(e=>e?(0,r.jsx)(er.A,{src:e,alt:"preview",className:"f9962498"}):null,[]);return(0,$.useEffect)(()=>{let r=new Worker(new URL(n.p+n.u(988),n.b));return r.addEventListener("message",t=>{let{data:n}=t;u(n),c(!1),e.current=!1}),t.current=r,()=>{r.terminate()}},[]),(0,r.jsxs)("div",{className:"ui-page",children:[(0,r.jsx)(et.A,{form:i,onFinish:p,layout:"vertical",initialValues:d,children:(0,r.jsxs)(eA.A,{gutter:24,children:[(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"image",children:(0,r.jsx)(Z,{preview:f,children:(0,r.jsx)(en.Ay,{icon:(0,r.jsx)(a.A,{component:eG}),children:"选择图片"})})})}),(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"strict",label:"严格模式",valuePropName:"checked",tooltip:"可增加扫描速度,但会降低识别率",children:(0,r.jsx)(eV,{checkedChildren:"开",unCheckedChildren:"关"})})}),(0,r.jsx)(e$.A,{span:24,children:(0,r.jsx)(eJ,{name:"invert",label:"图片反色",valuePropName:"checked",children:(0,r.jsx)(eV,{checkedChildren:"开",unCheckedChildren:"关"})})}),(0,r.jsxs)(e$.A,{span:24,className:"a741f479",children:[(0,r.jsx)(en.Ay,{type:"primary",htmlType:"submit",loading:o,disabled:!m,icon:(0,r.jsx)(a.A,{component:eK.A}),children:"解码"}),(0,r.jsx)(e2,{state:s,currentRef:l})]})]})}),(0,r.jsx)("div",{className:"ebf18c46",children:(0,r.jsx)(e6,{state:s,currentRef:l})})]})})},3498:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;re,[e]),n}},4207:function(e,n,l){l.d(n,{A:function(){return i}});var s=l(9296),r=l(2860);function t(e){let{current:n}=e;null!=n&&(clearTimeout(n),e.current=null)}function i(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128,l=(0,s.A)(n),i=(0,r.useRef)(null),[c,u]=(0,r.useState)(e),a=(0,r.useCallback)(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.current;t(i),n<=0?u(e):i.current=setTimeout(()=>{null!=i.current&&(u(e),i.current=null)},n)},[]);return(0,r.useEffect)(()=>()=>{t(i)},[]),[c,a]}},3400:function(e,n,l){l.r(n),l.d(n,{default:function(){return C}});var s=l(8048),r=l(4207),t=l(109),i=l(842),c=l(2860),u=l(7071),a=l(9276),d=l(8459),o=l(4699),x=l(8314),h=l(5852),m=l(9518),j=l(6166),A=l(2022),f=l(5442),v=l(3138),p=l(2994);let{Option:b}=u.A,{TextArea:g}=a.A,{Item:I,useForm:y,useWatch:k}=d.A;function w(e){return"string"==typeof e?e:e.toHexString()}let S=(0,c.memo)(function(e){let{value:n}=e;if(n)switch(n.type){case"ok":return(0,s.jsx)(o.A,{src:n.payload,alt:"preview",className:"d52c0583"});case"error":return(0,s.jsx)(x.A,{type:"error",message:n.message,showIcon:!0});default:return(0,s.jsx)(x.A,{type:"error",message:"发生未知错误",showIcon:!0})}return null});var C=(0,c.memo)(function(){let e=(0,c.useRef)(!1),n=(0,c.useRef)(),[a]=y(),[o,x]=(0,r.A)(!1),[C,M]=(0,c.useState)(),L=(0,c.useMemo)(()=>({level:"L",fnc1:"None",mode:"Auto",moduleSize:4,quietZone:16,aimIndicator:0,version:"Auto",charset:"UTF_8",background:"#ffffff",foreground:"#000000",content:"WIFI:S:Gadget Hacks;T:WPA;P:1234567890;;"}),[]),T=(0,c.useMemo)(()=>{let e=[(0,s.jsx)(b,{value:"Auto",children:"Auto"},"Auto")];for(let n=1;n<=40;n++)e.push((0,s.jsx)(b,{value:n,children:n},n));return e},[]),F=(0,c.useCallback)(l=>{let s=n.current;if(s&&!e.current){x(!0),e.current=!0;let n={...l,background:w(l.background),foreground:w(l.foreground)};s.postMessage(n)}},[]),N=(0,c.useCallback)(()=>{let e=a.getFieldValue("moduleSize");a.setFieldsValue({quietZone:4*e})},[]),H=k("mode",a)??L.mode,z=k(["fnc1"],a)??L.fnc1,R=k("content",a)??L.content;return(0,c.useEffect)(()=>{let s=new Worker(new URL(l.p+l.u(35),l.b));return s.addEventListener("message",n=>{let{data:l}=n;M(l),x(!1),e.current=!1}),n.current=s,()=>{s.terminate()}},[]),(0,s.jsxs)("div",{className:"ui-page",children:[(0,s.jsx)(d.A,{form:a,layout:"vertical",onFinish:F,initialValues:L,children:(0,s.jsxs)(h.A,{gutter:24,children:[(0,s.jsx)(m.A,{span:24,children:(0,s.jsx)(I,{name:"content",children:(0,s.jsx)(g,{rows:8,allowClear:!0})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"mode",label:"编码模式",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"Auto",selected:!0,children:"Auto"}),(0,s.jsx)(b,{value:"Alphanumeric",children:"Alphanumeric"}),(0,s.jsx)(b,{value:"Byte",children:"Byte"}),(0,s.jsx)(b,{value:"Hanzi",children:"Hanzi"}),(0,s.jsx)(b,{value:"Kanji",children:"Kanji"}),(0,s.jsx)(b,{value:"Numeric",children:"Numeric"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"charset",label:"字符编码",children:(0,s.jsxs)(u.A,{disabled:"Auto"!==H&&"Byte"!==H,children:[(0,s.jsx)(b,{value:"ASCII",children:"ASCII"}),(0,s.jsx)(b,{value:"UTF_8",children:"UTF-8"}),(0,s.jsx)(b,{value:"ISO_8859_1",children:"ISO-8859-1"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"version",label:"版本大小",children:(0,s.jsx)(u.A,{children:T})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"level",label:"纠错等级",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"L",children:"Level L (7%)"}),(0,s.jsx)(b,{value:"M",children:"Level M (15%)"}),(0,s.jsx)(b,{value:"Q",children:"Level Q (25%)"}),(0,s.jsx)(b,{value:"H",children:"Level H (30%)"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"fnc1",label:"支持 FNC1",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"None",children:"否"}),(0,s.jsx)(b,{value:"AIM",children:"AIM"}),(0,s.jsx)(b,{value:"GS1",children:"GS1"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"aimIndicator",label:"AIM 标识",children:(0,s.jsx)(j.A,{disabled:"AIM"!==z,min:0,max:255,precision:0,style:{width:"100%"}})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"moduleSize",label:"模块大小",children:(0,s.jsx)(j.A,{min:1,max:50,precision:0,style:{width:"100%"}})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"quietZone",label:"静区大小",tooltip:"推荐 4 倍模块大小",children:(0,s.jsx)(j.A,{min:0,max:200,precision:0,style:{width:"100%"},addonAfter:(0,s.jsx)(A.A,{title:"自动计算",children:(0,s.jsx)(t.A,{onClick:N})})})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"foreground",label:"前景颜色",children:(0,s.jsx)(f.A,{showText:!0,disabledAlpha:!0})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"background",label:"背景颜色",children:(0,s.jsx)(f.A,{showText:!0,disabledAlpha:!0})})}),(0,s.jsx)(m.A,{span:24,children:(0,s.jsx)(v.Ay,{type:"primary",htmlType:"submit",loading:o,disabled:!R,icon:(0,s.jsx)(i.A,{component:p.A}),children:"编码"})})]})}),(0,s.jsx)("div",{className:"ee1aa457",children:(0,s.jsx)(S,{value:C})})]})})}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[511],{4243:function(e,n,l){l.d(n,{A:function(){return r}});var s=l(2860);function r(e){let n=(0,s.useRef)(e);return n.current=(0,s.useMemo)(()=>e,[e]),n}},5200:function(e,n,l){l.d(n,{A:function(){return i}});var s=l(4243),r=l(2860);function t(e){let{current:n}=e;null!=n&&(clearTimeout(n),e.current=null)}function i(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128,l=(0,s.A)(n),i=(0,r.useRef)(null),[c,u]=(0,r.useState)(e),a=(0,r.useCallback)(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.current;t(i),n<=0?u(e):i.current=setTimeout(()=>{null!=i.current&&(u(e),i.current=null)},n)},[]);return(0,r.useEffect)(()=>()=>{t(i)},[]),[c,a]}},7511:function(e,n,l){l.r(n),l.d(n,{default:function(){return C}});var s=l(8048),r=l(5200),t=l(109),i=l(842),c=l(2860),u=l(7071),a=l(9276),d=l(8459),o=l(4699),x=l(8314),h=l(5852),m=l(9518),j=l(6166),A=l(2022),f=l(5442),v=l(3138),p=l(3343);let{Option:b}=u.A,{TextArea:g}=a.A,{Item:I,useForm:y,useWatch:k}=d.A;function w(e){return"string"==typeof e?e:e.toHexString()}let S=(0,c.memo)(function(e){let{value:n}=e;if(n)switch(n.type){case"ok":return(0,s.jsx)(o.A,{src:n.payload,alt:"preview",className:"d52c0583"});case"error":return(0,s.jsx)(x.A,{type:"error",message:n.message,showIcon:!0});default:return(0,s.jsx)(x.A,{type:"error",message:"发生未知错误",showIcon:!0})}return null});var C=(0,c.memo)(function(){let e=(0,c.useRef)(!1),n=(0,c.useRef)(),[a]=y(),[o,x]=(0,r.A)(!1),[C,M]=(0,c.useState)(),L=(0,c.useMemo)(()=>({level:"L",fnc1:"None",mode:"Auto",moduleSize:4,quietZone:16,aimIndicator:0,version:"Auto",charset:"UTF_8",background:"#ffffff",foreground:"#000000",content:"WIFI:S:Gadget Hacks;T:WPA;P:1234567890;;"}),[]),T=(0,c.useMemo)(()=>{let e=[(0,s.jsx)(b,{value:"Auto",children:"Auto"},"Auto")];for(let n=1;n<=40;n++)e.push((0,s.jsx)(b,{value:n,children:n},n));return e},[]),F=(0,c.useCallback)(l=>{let s=n.current;if(s&&!e.current){x(!0),e.current=!0;let n={...l,background:w(l.background),foreground:w(l.foreground)};s.postMessage(n)}},[]),N=(0,c.useCallback)(()=>{let e=a.getFieldValue("moduleSize");a.setFieldsValue({quietZone:4*e})},[]),H=k("mode",a)??L.mode,z=k(["fnc1"],a)??L.fnc1,R=k("content",a)??L.content;return(0,c.useEffect)(()=>{let s=new Worker(new URL(l.p+l.u(56),l.b));return s.addEventListener("message",n=>{let{data:l}=n;M(l),x(!1),e.current=!1}),n.current=s,()=>{s.terminate()}},[]),(0,s.jsxs)("div",{className:"ui-page",children:[(0,s.jsx)(d.A,{form:a,layout:"vertical",onFinish:F,initialValues:L,children:(0,s.jsxs)(h.A,{gutter:24,children:[(0,s.jsx)(m.A,{span:24,children:(0,s.jsx)(I,{name:"content",children:(0,s.jsx)(g,{rows:8,allowClear:!0})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"mode",label:"编码模式",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"Auto",selected:!0,children:"Auto"}),(0,s.jsx)(b,{value:"Alphanumeric",children:"Alphanumeric"}),(0,s.jsx)(b,{value:"Byte",children:"Byte"}),(0,s.jsx)(b,{value:"Hanzi",children:"Hanzi"}),(0,s.jsx)(b,{value:"Kanji",children:"Kanji"}),(0,s.jsx)(b,{value:"Numeric",children:"Numeric"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"charset",label:"字符编码",children:(0,s.jsxs)(u.A,{disabled:"Auto"!==H&&"Byte"!==H,children:[(0,s.jsx)(b,{value:"ASCII",children:"ASCII"}),(0,s.jsx)(b,{value:"UTF_8",children:"UTF-8"}),(0,s.jsx)(b,{value:"ISO_8859_1",children:"ISO-8859-1"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"version",label:"版本大小",children:(0,s.jsx)(u.A,{children:T})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"level",label:"纠错等级",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"L",children:"Level L (7%)"}),(0,s.jsx)(b,{value:"M",children:"Level M (15%)"}),(0,s.jsx)(b,{value:"Q",children:"Level Q (25%)"}),(0,s.jsx)(b,{value:"H",children:"Level H (30%)"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"fnc1",label:"支持 FNC1",children:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(b,{value:"None",children:"否"}),(0,s.jsx)(b,{value:"AIM",children:"AIM"}),(0,s.jsx)(b,{value:"GS1",children:"GS1"})]})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"aimIndicator",label:"AIM 标识",children:(0,s.jsx)(j.A,{disabled:"AIM"!==z,min:0,max:255,precision:0,style:{width:"100%"}})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"moduleSize",label:"模块大小",children:(0,s.jsx)(j.A,{min:1,max:50,precision:0,style:{width:"100%"}})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"quietZone",label:"静区大小",tooltip:"推荐 4 倍模块大小",children:(0,s.jsx)(j.A,{min:0,max:200,precision:0,style:{width:"100%"},addonAfter:(0,s.jsx)(A.A,{title:"自动计算",children:(0,s.jsx)(t.A,{onClick:N})})})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"foreground",label:"前景颜色",children:(0,s.jsx)(f.A,{showText:!0,disabledAlpha:!0})})}),(0,s.jsx)(m.A,{md:6,sm:12,xs:24,children:(0,s.jsx)(I,{name:"background",label:"背景颜色",children:(0,s.jsx)(f.A,{showText:!0,disabledAlpha:!0})})}),(0,s.jsx)(m.A,{span:24,children:(0,s.jsx)(v.Ay,{type:"primary",htmlType:"submit",loading:o,disabled:!R,icon:(0,s.jsx)(i.A,{component:p.A}),children:"编码"})})]})}),(0,s.jsx)("div",{className:"ee1aa457",children:(0,s.jsx)(S,{value:C})})]})})}}]); \ No newline at end of file diff --git a/packages/examples/app/public/js/2b5f82a811b3b292.js b/packages/examples/app/public/js/df7340bfdf330a14.js similarity index 87% rename from packages/examples/app/public/js/2b5f82a811b3b292.js rename to packages/examples/app/public/js/df7340bfdf330a14.js index 5c00d6cb..6859f420 100644 --- a/packages/examples/app/public/js/2b5f82a811b3b292.js +++ b/packages/examples/app/public/js/df7340bfdf330a14.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[792],{7534:function(e,s,t){var l=t(8048),n="c999c7bf",a="c7590423",c=t(842),o=t(1711),i=t(1082),r=t(2860),h=t(1592),m=t(3138),d=(0,r.memo)(function(e){let{error:s,resetErrorBoundary:t}=e;return(0,l.jsx)(h.Ay,{status:"error",title:"页面错误",extra:(0,l.jsx)(m.Ay,{type:"primary",onClick:t,children:"重试页面"}),subTitle:"抱歉,发生错误,无法渲染页面,请联系系统管理员或者重试页面!"})}),x=t(5714),u=(0,r.memo)(function(e){let{delay:s=128,width:t,height:n=360}=e;return(0,l.jsx)(x.A,{delay:s,children:(0,l.jsx)("div",{style:{width:t,height:n}})})}),j=t(7163),v=t(6178),p=t(2699),b=t(8483),g=t(2994),f=t(7098);let w=(0,r.memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"M512 12.64c-282.752 0-512 229.216-512 512 0 226.208 146.72 418.144 350.144 485.824 25.6 4.736 35.008-11.104 35.008-24.64 0-12.192-.48-52.544-.704-95.328-142.464 30.976-172.512-60.416-172.512-60.416-23.296-59.168-56.832-74.912-56.832-74.912-46.464-31.776 3.52-31.136 3.52-31.136 51.392 3.616 78.464 52.768 78.464 52.768 45.664 78.272 119.776 55.648 148.992 42.56 4.576-33.088 17.856-55.68 32.512-68.48-113.728-12.928-233.28-56.864-233.28-253.024 0-55.904 20-101.568 52.768-137.44-5.312-12.896-22.848-64.96 4.96-135.488 0 0 43.008-13.76 140.832 52.48 40.832-11.36 84.64-17.024 128.16-17.248 43.488.192 87.328 5.888 128.256 17.248 97.728-66.24 140.64-52.48 140.64-52.48 27.872 70.528 10.336 122.592 5.024 135.488 32.832 35.84 52.704 81.536 52.704 137.44 0 196.64-119.776 239.936-233.792 252.64 18.368 15.904 34.72 47.04 34.72 94.816 0 68.512-.608 123.648-.608 140.512 0 13.632 9.216 29.6 35.168 24.576C877.472 942.624 1024 750.784 1024 524.64c0-282.784-229.248-512-512-512"})})),A=(0,r.lazy)(()=>Promise.all([t.e(693),t.e(646),t.e(400)]).then(t.bind(t,3400))),y=(0,r.lazy)(()=>Promise.all([t.e(693),t.e(645)]).then(t.bind(t,3975))),k=(0,r.memo)(function(){let e=(0,r.useMemo)(()=>"#/decode"===location.hash?"decode":(location.hash="#/encode","encode"),[]),s=(0,r.useCallback)(e=>{location.hash=`#/${e}`},[]),t=(0,r.useMemo)(()=>({maxCount:3}),[]),o=(0,r.useMemo)(()=>({margin:0}),[]),h=(0,r.useMemo)(()=>[{key:"encode",label:(0,l.jsxs)("div",{className:a,children:[(0,l.jsx)(c.A,{className:n,component:g.A}),(0,l.jsx)("span",{children:"二维码编码"})]}),children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(u,{}),children:(0,l.jsx)(A,{})})},{key:"decode",label:(0,l.jsxs)("div",{className:a,children:[(0,l.jsx)(c.A,{className:n,component:f.A}),(0,l.jsx)("span",{children:"二维码解码"})]}),children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(u,{}),children:(0,l.jsx)(y,{})})}],[]),m=(0,r.useMemo)(()=>({left:(0,l.jsx)("img",{title:"QRCode",className:"b2162135",src:b,alt:"logo"}),right:(0,l.jsx)("a",{title:"GitHub",className:"cc8c9b9c",href:"https://github.com/nuintun/qrcode",target:"_blank",children:(0,l.jsx)(c.A,{className:"d0601377",component:w})})}),[]);return(0,l.jsx)(j.A,{className:"ui-app",message:t,children:(0,l.jsx)(i.tH,{FallbackComponent:d,children:(0,l.jsx)(v.A,{centered:!0,items:h,onChange:s,className:"bb1713e8",tabBarStyle:o,defaultActiveKey:e,tabBarExtraContent:m})})})});var H=(0,r.memo)(function(){return(0,l.jsx)(p.Ay,{locale:o.A,theme:{cssVar:!0,hashed:!1,token:{borderRadius:4}},children:(0,l.jsx)(k,{})})}),z=t(1930);let C=document.getElementById("app");(0,z.H)(C).render((0,l.jsx)(H,{}))},7098:function(e,s,t){var l=t(8048);let n=(0,t(2860).memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"M896.256 383.488H832V191.744H640.32V128h224.256c15.552 0 28.48 11.2 31.168 25.984l.512 5.696zm-768.192.256h64.32V192H384v-63.744H159.744a31.68 31.68 0 0 0-31.168 25.984l-.512 5.696zM896.256 640H832v191.744l-191.68-.064v63.808h224.256a31.68 31.68 0 0 0 31.168-25.984l.512-5.76zm-768.192.256h64.32v191.68H384v63.808H159.744a31.68 31.68 0 0 1-31.168-25.984l-.512-5.76zm639.68-159.808v64H256.256v-64z"})}));s.A=n},2994:function(e,s,t){var l=t(8048);let n=(0,t(2860).memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"m140.8 517.2 169.4-164.1.1-15.5v-70.4l-258.1 250 258.1 249.9v-70.4l-.1-15.5zm724.3-4.8-169.4-164-.1-15.5v-70.4l258.1 249.9-258.1 250v-70.5l.1-15.5zM462.2 855h-77.6l159.1-695.4h77.6z"})}));s.A=n},8483:function(e,s,t){e.exports=t.p+"images/158cf240fe1fc517.ico"}},function(e){e.O(0,[806],function(){return e(e.s=7534)}),e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[792],{8209:function(e,s,t){var l=t(8048),n="c999c7bf",a="c7590423",c=t(842),o=t(1711),i=t(1082),r=t(2860),h=t(1592),m=t(3138),d=(0,r.memo)(function(e){let{error:s,resetErrorBoundary:t}=e;return(0,l.jsx)(h.Ay,{status:"error",title:"页面错误",extra:(0,l.jsx)(m.Ay,{type:"primary",onClick:t,children:"重试页面"}),subTitle:"抱歉,发生错误,无法渲染页面,请联系系统管理员或者重试页面!"})}),x=t(5714),u=(0,r.memo)(function(e){let{delay:s=128,width:t,height:n=360}=e;return(0,l.jsx)(x.A,{delay:s,children:(0,l.jsx)("div",{style:{width:t,height:n}})})}),j=t(7163),v=t(6178),p=t(2699),b=t(8483),g=t(3343),f=t(1443);let w=(0,r.memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"M512 12.64c-282.752 0-512 229.216-512 512 0 226.208 146.72 418.144 350.144 485.824 25.6 4.736 35.008-11.104 35.008-24.64 0-12.192-.48-52.544-.704-95.328-142.464 30.976-172.512-60.416-172.512-60.416-23.296-59.168-56.832-74.912-56.832-74.912-46.464-31.776 3.52-31.136 3.52-31.136 51.392 3.616 78.464 52.768 78.464 52.768 45.664 78.272 119.776 55.648 148.992 42.56 4.576-33.088 17.856-55.68 32.512-68.48-113.728-12.928-233.28-56.864-233.28-253.024 0-55.904 20-101.568 52.768-137.44-5.312-12.896-22.848-64.96 4.96-135.488 0 0 43.008-13.76 140.832 52.48 40.832-11.36 84.64-17.024 128.16-17.248 43.488.192 87.328 5.888 128.256 17.248 97.728-66.24 140.64-52.48 140.64-52.48 27.872 70.528 10.336 122.592 5.024 135.488 32.832 35.84 52.704 81.536 52.704 137.44 0 196.64-119.776 239.936-233.792 252.64 18.368 15.904 34.72 47.04 34.72 94.816 0 68.512-.608 123.648-.608 140.512 0 13.632 9.216 29.6 35.168 24.576C877.472 942.624 1024 750.784 1024 524.64c0-282.784-229.248-512-512-512"})})),A=(0,r.lazy)(()=>Promise.all([t.e(693),t.e(646),t.e(511)]).then(t.bind(t,7511))),y=(0,r.lazy)(()=>Promise.all([t.e(693),t.e(202)]).then(t.bind(t,4082))),k=(0,r.memo)(function(){let e=(0,r.useMemo)(()=>"#/decode"===location.hash?"decode":(location.hash="#/encode","encode"),[]),s=(0,r.useCallback)(e=>{location.hash=`#/${e}`},[]),t=(0,r.useMemo)(()=>({maxCount:3}),[]),o=(0,r.useMemo)(()=>({margin:0}),[]),h=(0,r.useMemo)(()=>[{key:"encode",label:(0,l.jsxs)("div",{className:a,children:[(0,l.jsx)(c.A,{className:n,component:g.A}),(0,l.jsx)("span",{children:"二维码编码"})]}),children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(u,{}),children:(0,l.jsx)(A,{})})},{key:"decode",label:(0,l.jsxs)("div",{className:a,children:[(0,l.jsx)(c.A,{className:n,component:f.A}),(0,l.jsx)("span",{children:"二维码解码"})]}),children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(u,{}),children:(0,l.jsx)(y,{})})}],[]),m=(0,r.useMemo)(()=>({left:(0,l.jsx)("img",{title:"QRCode",className:"b2162135",src:b,alt:"logo"}),right:(0,l.jsx)("a",{title:"GitHub",className:"cc8c9b9c",href:"https://github.com/nuintun/qrcode",target:"_blank",children:(0,l.jsx)(c.A,{className:"d0601377",component:w})})}),[]);return(0,l.jsx)(j.A,{className:"ui-app",message:t,children:(0,l.jsx)(i.tH,{FallbackComponent:d,children:(0,l.jsx)(v.A,{centered:!0,items:h,onChange:s,className:"bb1713e8",tabBarStyle:o,defaultActiveKey:e,tabBarExtraContent:m})})})});var H=(0,r.memo)(function(){return(0,l.jsx)(p.Ay,{locale:o.A,theme:{cssVar:!0,hashed:!1,token:{borderRadius:4}},children:(0,l.jsx)(k,{})})}),z=t(1930);let C=document.getElementById("app");(0,z.H)(C).render((0,l.jsx)(H,{}))},1443:function(e,s,t){var l=t(8048);let n=(0,t(2860).memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"M896.256 383.488H832V191.744H640.32V128h224.256c15.552 0 28.48 11.2 31.168 25.984l.512 5.696zm-768.192.256h64.32V192H384v-63.744H159.744a31.68 31.68 0 0 0-31.168 25.984l-.512 5.696zM896.256 640H832v191.744l-191.68-.064v63.808h224.256a31.68 31.68 0 0 0 31.168-25.984l.512-5.76zm-768.192.256h64.32v191.68H384v63.808H159.744a31.68 31.68 0 0 1-31.168-25.984l-.512-5.76zm639.68-159.808v64H256.256v-64z"})}));s.A=n},3343:function(e,s,t){var l=t(8048);let n=(0,t(2860).memo)(e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 1024 1024",...e,children:(0,l.jsx)("path",{d:"m140.8 517.2 169.4-164.1.1-15.5v-70.4l-258.1 250 258.1 249.9v-70.4l-.1-15.5zm724.3-4.8-169.4-164-.1-15.5v-70.4l258.1 249.9-258.1 250v-70.5l.1-15.5zM462.2 855h-77.6l159.1-695.4h77.6z"})}));s.A=n},8483:function(e,s,t){e.exports=t.p+"images/158cf240fe1fc517.ico"}},function(e){e.O(0,[806],function(){return e(e.s=8209)}),e.O()}]); \ No newline at end of file