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.
1 line
30 KiB
1 line
30 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[21255,15845],{72826:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(15250),o=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},a=n(1393),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var l=o.forwardRef(s)},67147:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(15250),o=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a=n(1393),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var l=o.forwardRef(s)},46400:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(46906),o=n(21884),i=n(53043),a=n(90584),s=n(85456),l=n(92310),c=n.n(l),u=n(16934),f=n(47413),h=n(59301),g=n(92343),d=n(36355),m=n(17313),p=n(83116);const v=(e,t,n,r,o)=>({backgroundColor:e,border:`${r.lineWidth}px ${r.lineType} ${t}`,[`${o}-icon`]:{color:n}}),y=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:i,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:f,colorTextHeading:h,withDescriptionPadding:g,defaultPadding:d}=e;return{[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:d,wordWrap:"break-word",borderRadius:l,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:s},"&-message":{color:h},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},\n padding-top ${n} ${c}, padding-bottom ${n} ${c},\n margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:g,[`${t}-icon`]:{marginInlineEnd:o,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:h,fontSize:a},[`${t}-description`]:{display:"block",color:f}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},C=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:o,colorWarning:i,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:f,colorInfoBorder:h,colorInfoBg:g}=e;return{[t]:{"&-success":v(o,r,n,e,t),"&-info":v(g,h,f,e,t),"&-warning":v(s,a,i,e,t),"&-error":Object.assign(Object.assign({},v(u,c,l,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},b=e=>{const{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:i,colorIcon:a,colorIconHover:s}=e;return{[t]:{"&-action":{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:i,lineHeight:`${i}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:s}}}}},E=e=>[y(e),C(e),b(e)];var w=(0,p.Z)("Alert",(e=>[E(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}))),S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const B={success:r.Z,info:s.Z,error:o.Z,warning:a.Z},O=e=>{const{icon:t,prefixCls:n,type:r}=e,o=B[r]||null;return t?(0,g.wm)(t,h.createElement("span",{className:`${n}-icon`},t),(()=>({className:c()(`${n}-icon`,{[t.props.className]:t.props.className})}))):h.createElement(o,{className:`${n}-icon`})},L=e=>{const{isClosable:t,prefixCls:n,closeIcon:r,handleClose:o}=e,a=!0===r||void 0===r?h.createElement(i.Z,null):r;return t?h.createElement("button",{type:"button",onClick:o,className:`${n}-close-icon`,tabIndex:0},a):null};var P=e=>{const{description:t,prefixCls:n,message:r,banner:o,className:i,rootClassName:a,style:s,onMouseEnter:l,onMouseLeave:g,onClick:m,afterClose:p,showIcon:v,closable:y,closeText:C,closeIcon:b,action:E}=e,B=S(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),[P,x]=h.useState(!1);const M=h.useRef(null),{getPrefixCls:D,direction:k,alert:_}=h.useContext(d.E_),$=D("alert",n),[T,A]=w($),I=t=>{var n;x(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},N=h.useMemo((()=>void 0!==e.type?e.type:o?"warning":"info"),[e.type,o]),j=h.useMemo((()=>!!C||("boolean"==typeof y?y:!1!==b&&null!=b)),[C,b,y]),H=!(!o||void 0!==v)||v,z=c()($,`${$}-${N}`,{[`${$}-with-description`]:!!t,[`${$}-no-icon`]:!H,[`${$}-banner`]:!!o,[`${$}-rtl`]:"rtl"===k},null==_?void 0:_.className,i,a,A),R=(0,f.Z)(B,{aria:!0,data:!0});return T(h.createElement(u.default,{visible:!P,motionName:`${$}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:p},(n=>{let{className:o,style:i}=n;return h.createElement("div",Object.assign({ref:M,"data-show":!P,className:c()(z,o),style:Object.assign(Object.assign(Object.assign({},null==_?void 0:_.style),s),i),onMouseEnter:l,onMouseLeave:g,onClick:m,role:"alert"},R),H?h.createElement(O,{description:t,icon:e.icon,prefixCls:$,type:N}):null,h.createElement("div",{className:`${$}-content`},r?h.createElement("div",{className:`${$}-message`},r):null,t?h.createElement("div",{className:`${$}-description`},t):null),E?h.createElement("div",{className:`${$}-action`},E):null,h.createElement(L,{isClosable:j,prefixCls:$,closeIcon:C||b,handleClose:I}))})))},x=n(17712),M=n(38261),D=n(74007),k=n(18652);let _=function(e){(0,D.Z)(n,e);var t=(0,k.Z)(n);function n(){var e;return(0,x.Z)(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return(0,M.Z)(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){const{message:e,description:t,children:n}=this.props,{error:r,info:o}=this.state,i=o&&o.componentStack?o.componentStack:null,a=void 0===e?(r||"").toString():e,s=void 0===t?i:t;return r?h.createElement(P,{type:"error",message:a,description:h.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},s)}):n}}]),n}(h.Component);var $=_;const T=P;T.ErrorBoundary=$;var A=T},31797:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(59301),o=n(56762),i=n(92343),a=n(92310),s=n.n(a),l=n(36355),c=n(66999);var u=e=>{const{value:t,formatter:n,precision:o,decimalSeparator:i,groupSeparator:a="",prefixCls:s}=e;let l;if("function"==typeof n)l=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",c=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,a),"number"==typeof o&&(c=c.padEnd(o,"0").slice(0,o>0?o:0)),c&&(c=`${i}${c}`),l=[r.createElement("span",{key:"int",className:`${s}-content-value-int`},e,t),c&&r.createElement("span",{key:"decimal",className:`${s}-content-value-decimal`},c)]}else l=e}return r.createElement("span",{className:`${s}-content-value`},l)},f=n(17313),h=n(83116),g=n(37613);const d=e=>{const{componentCls:t,marginXXS:n,padding:r,colorTextDescription:o,titleFontSize:i,colorTextHeading:a,contentFontSize:s,fontFamily:l}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,f.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:o,fontSize:i},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:a,fontSize:s,fontFamily:l,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var m=(0,h.Z)("Statistic",(e=>{const t=(0,g.TS)(e,{});return[d(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var p=e=>{const{prefixCls:t,className:n,rootClassName:o,style:i,valueStyle:a,value:f=0,title:h,valueRender:g,prefix:d,suffix:p,loading:v=!1,onMouseEnter:y,onMouseLeave:C,decimalSeparator:b=".",groupSeparator:E=","}=e,{getPrefixCls:w,direction:S,statistic:B}=r.useContext(l.E_),O=w("statistic",t),[L,P]=m(O),x=r.createElement(u,Object.assign({decimalSeparator:b,groupSeparator:E,prefixCls:O},e,{value:f})),M=s()(O,{[`${O}-rtl`]:"rtl"===S},null==B?void 0:B.className,n,o,P);return L(r.createElement("div",{className:M,style:Object.assign(Object.assign({},null==B?void 0:B.style),i),onMouseEnter:y,onMouseLeave:C},h&&r.createElement("div",{className:`${O}-title`},h),r.createElement(c.Z,{paragraph:!1,loading:v,className:`${O}-skeleton`},r.createElement("div",{style:a,className:`${O}-content`},d&&r.createElement("span",{className:`${O}-content-prefix`},d),g?g(x):x,p&&r.createElement("span",{className:`${O}-content-suffix`},p)))))};const v=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function y(e,t){const{format:n=""}=t,r=new Date(e).getTime(),o=Date.now();return function(e,t){let n=e;const r=/\[[^\]]*]/g,o=(t.match(r)||[]).map((e=>e.slice(1,-1))),i=t.replace(r,"[]"),a=v.reduce(((e,t)=>{let[r,o]=t;if(e.includes(r)){const t=Math.floor(n/o);return n-=t*o,e.replace(new RegExp(`${r}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),i);let s=0;return a.replace(r,(()=>{const e=o[s];return s+=1,e}))}(Math.max(r-o,0),n)}const C=e=>{const{value:t,format:n="HH:mm:ss",onChange:a,onFinish:s}=e,l=(0,o.Z)(),c=r.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{l(),null==a||a(e-Date.now()),e<Date.now()&&(null==s||s(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};r.useEffect((()=>(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return r.createElement(p,Object.assign({},e,{valueRender:e=>(0,i.Tm)(e,{title:void 0}),formatter:(e,t)=>y(e,Object.assign(Object.assign({},t),{format:n}))}))};var b=r.memo(C);p.Countdown=b;var E=p},31193:function(e,t,n){var r=n(48955);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},31144:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},78485:function(e){e.exports={L:1,M:0,Q:3,H:2}},13679:function(e,t,n){var r=n(87532);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},86397:function(e,t,n){var r=n(31193),o=n(84590),i=n(31144),a=n(28688),s=n(13679);function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},c.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;i<e.length&&(c=1==(e[i]>>>o&1)),a.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),a.getLengthInBits(u.mode,e)),u.write(s)}var f=0;for(c=0;c<r.length;c++)f+=r[c].dataCount;if(s.getLengthInBits()>8*f)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*f+")");for(s.getLengthInBits()+4<=8*f&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*f||(s.put(l.PAD0,8),s.getLengthInBits()>=8*f));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,f=t[c].totalCount-u;r=Math.max(r,u),o=Math.max(o,f),i[c]=new Array(u);for(var h=0;h<i[c].length;h++)i[c][h]=255&e.buffer[h+n];n+=u;var g=a.getErrorCorrectPolynomial(f),d=new s(i[c],g.getLength()-1).mod(g);l[c]=new Array(g.getLength()-1);for(h=0;h<l[c].length;h++){var m=h+d.getLength()-l[c].length;l[c][h]=m>=0?d.get(m):0}}var p=0;for(h=0;h<t.length;h++)p+=t[h].totalCount;var v=new Array(p),y=0;for(h=0;h<r;h++)for(c=0;c<t.length;c++)h<i[c].length&&(v[y++]=i[c][h]);for(h=0;h<o;h++)for(c=0;c<t.length;c++)h<l[c].length&&(v[y++]=l[c][h]);return v},e.exports=l},84590:function(e,t,n){var r=n(78485);function o(e,t){this.totalCount=e,this.dataCount=t}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],l=n[3*a+1],c=n[3*a+2],u=0;u<s;u++)i.push(new o(l,c));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},87532:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},48955:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},28688:function(e,t,n){var r=n(48955),o=n(13679),i=n(87532),a=0,s=1,l=2,c=3,u=4,f=5,h=6,g=7,d={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;d.getBCHDigit(t)-d.getBCHDigit(d.G15)>=0;)t^=d.G15<<d.getBCHDigit(t)-d.getBCHDigit(d.G15);return(e<<10|t)^d.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;d.getBCHDigit(t)-d.getBCHDigit(d.G18)>=0;)t^=d.G18<<d.getBCHDigit(t)-d.getBCHDigit(d.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return d.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case f:return t*n%2+t*n%3==0;case h:return(t*n%2+t*n%3)%2==0;case g:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)o+l<0||t<=o+l||0==s&&0==l||a==e.isDark(r+s,o+l)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var c=0;e.isDark(r,o)&&c++,e.isDark(r+1,o)&&c++,e.isDark(r,o+1)&&c++,e.isDark(r+1,o+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var u=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=d},15845:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?g(e):t}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=n(59301),y=(n(12708),n(86397)),C=n(78485);function b(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var E={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function B(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),l=a/r,c=(n.width||s)*l,u=(n.height||s)*l,f=null==n.x?t.length/2-c/2:n.x*l,h=null==n.y?t.length/2-u/2:n.y*l,g=null;if(n.excavate){var d=Math.floor(f),m=Math.floor(h);g={x:d,y:m,w:Math.ceil(c+f-d),h:Math.ceil(u+h-m)}}return{x:f,y:h,h:u,w:c,excavation:g}}var O=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),L=function(e){function t(){var e,n;l(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return p(g(n=f(this,(e=h(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),p(g(n),"_image",void 0),p(g(n),"state",{imgLoaded:!1}),p(g(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return d(t,e),u(t,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,l=new y(-1,C[r]);if(l.addData(b(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var f=l.modules;if(null===f)return;var h=a?4:0,g=f.length+2*h,d=B(this.props,f);null!=s&&null!=d&&null!=d.excavation&&(f=S(f,d.excavation));var m=window.devicePixelRatio||1;c.height=c.width=n*m;var p=n/g*m;u.scale(p,p),u.fillStyle=o,u.fillRect(0,0,g,g),u.fillStyle=i,O?u.fill(new Path2D(w(f,h))):f.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+h,t+h,1,1)}))})),this.state.imgLoaded&&this._image&&null!=d&&u.drawImage(this._image,d.x+h,d.y+h,d.w,d.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),l=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),c=a({height:n,width:n},r),u=null,f=i&&i.src;return null!=i&&null!=f&&(u=v.createElement("img",{src:f,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),v.createElement(v.Fragment,null,v.createElement("canvas",o({style:c,height:n,width:n,ref:function(t){return e._canvas=t}},l)),u)}}]),t}(v.PureComponent);p(L,"defaultProps",E);var P=function(e){function t(){return l(this,t),f(this,h(t).apply(this,arguments))}return d(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,l=e.includeMargin,c=e.imageSettings,u=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),f=new y(-1,C[r]);f.addData(b(t)),f.make();var h=f.modules;if(null===h)return null;var g=l?4:0,d=h.length+2*g,m=B(this.props,h),p=null;null!=c&&null!=m&&(null!=m.excavation&&(h=S(h,m.excavation)),p=v.createElement("image",{xlinkHref:c.src,height:m.h,width:m.w,x:m.x+g,y:m.y+g,preserveAspectRatio:"none"}));var E=w(h,g);return v.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(d," ").concat(d)},u),v.createElement("path",{fill:i,d:"M0,0 h".concat(d,"v").concat(d,"H0z")}),v.createElement("path",{fill:a,d:E}),p)}}]),t}(v.PureComponent);p(P,"defaultProps",E);var x=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?P:L;return v.createElement(r,n)};x.defaultProps=a({renderAs:"canvas"},E),e.exports=x}}]); |