You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
17 KiB

9 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[397],{10397:function(Ne,V,w){w.d(V,{Z:function(){return ve}});var C=w(67294),K=w(87462),J=w(82947),q=w(93771),ee=function(r,u){return C.createElement(q.Z,(0,K.Z)({},r,{ref:u,icon:J.Z}))},te=C.forwardRef(ee),ne=w(93967),oe=w.n(ne),re=Object.defineProperty,b=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,D=(l,r,u)=>r in l?re(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,O=(l,r)=>{for(var u in r||(r={}))F.call(r,u)&&D(l,u,r[u]);if(b)for(var u of b(r))z.call(r,u)&&D(l,u,r[u]);return l},T=(l,r)=>{var u={};for(var i in l)F.call(l,i)&&r.indexOf(i)<0&&(u[i]=l[i]);if(l!=null&&b)for(var i of b(l))r.indexOf(i)<0&&z.call(l,i)&&(u[i]=l[i]);return u};var S;(l=>{const r=class{constructor(e,t,n,o){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<r.MIN_VERSION||e>r.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let a=0;a<this.size;a++)s.push(!1);for(let a=0;a<this.size;a++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(n);if(this.drawCodewords(c),o==-1){let a=1e9;for(let E=0;E<8;E++){this.applyMask(E),this.drawFormatBits(E);const g=this.getPenaltyScore();g<a&&(o=E,a=g),this.applyMask(E)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(e,t){const n=l.QrSegment.makeSegments(e);return r.encodeSegments(n,t)}static encodeBinary(e,t){const n=l.QrSegment.makeBytes(e);return r.encodeSegments([n],t)}static encodeSegments(e,t,n=1,o=40,s=-1,c=!0){if(!(r.MIN_VERSION<=n&&n<=o&&o<=r.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let a,E;for(a=n;;a++){const m=r.getNumDataCodewords(a,t)*8,R=M.getTotalBits(e,a);if(R<=m){E=R;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[r.Ecc.MEDIUM,r.Ecc.QUARTILE,r.Ecc.HIGH])c&&E<=r.getNumDataCodewords(a,m)*8&&(t=m);let g=[];for(const m of e){i(m.mode.modeBits,4,g),i(m.numChars,m.mode.numCharCountBits(a),g);for(const R of m.getData())g.push(R)}h(g.length==E);const P=r.getNumDataCodewords(a,t)*8;h(g.length<=P),i(0,Math.min(4,P-g.length),g),i(0,(8-g.length%8)%8,g),h(g.length%8==0);for(let m=236;g.length<P;m^=253)i(m,8,g);let v=[];for(;v.length*8<g.length;)v.push(0);return g.forEach((m,R)=>v[R>>>3]|=m<<7-(R&7)),new r(a,t,v,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let o=0;o<t;o++)n==0&&o==0||n==0&&o==t-1||n==t-1&&o==0||this.drawAlignmentPattern(e[n],e[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let s=0;s<10;s++)n=n<<1^(n>>>9)*1335;const o=(t<<10|n)^21522;h(o>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,f(o,s));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,f(o,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,f(o,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,f(o,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const t=this.version<<12|e;h(t>>>18==0);for(let n=0;n<18;n++){const o=f(t,n),s=this.size-11+n%3,c=Math.floor(n/3);this.setFunctionModule(s,c,o),this.setFunctionModule(c,s,o)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let o=-4;o<=4;o++){const s=Math.max(Math.abs(o),Math.abs(n)),c=e+o,a=t+n;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,