9 lines
30 KiB
JavaScript
9 lines
30 KiB
JavaScript
import{t as Ye,E as Oe,_ as xe}from"./test.b4f3927f.js";import{E as qe}from"./el-input.60ea0dae.js";import{E as Ge,a as Qe}from"./el-overlay.172e9766.js";import{E as We}from"./el-button.b86b6ea8.js";import{_ as Xe}from"./nuxt-link.47b9aec4.js";import{a as Ze,r as $,W as et,$ as tt,s as be,D as nt,o as j,e as Y,j as S,f as N,t as D,k as Be,F as ot,G as rt,u as b,w as P,a0 as _e,a1 as Ae,V as T,h as Q,a2 as it,a3 as st,a4 as at,y as lt,J as ut,K as ct,a5 as ft,X as dt,a6 as gt}from"./entry.539d3b49.js";import{u as Ie}from"./useLogin.3a7e13da.js";import{_ as ht}from"./_plugin-vue_export-helper.c27b6911.js";import"./throttle.4fc9319f.js";import"./debounce.7822d733.js";import"./use-form-item.aa386fad.js";import"./index.e7365e3c.js";import"./index.68b3a059.js";import"./_initCloneObject.18c5d913.js";import"./vnode.48eda29e.js";var q={},mt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ve={},v={};let pe;const pt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];v.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};v.getSymbolTotalCodewords=function(e){return pt[e]};v.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};v.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');pe=e};v.isKanjiModeEnabled=function(){return typeof pe<"u"};v.toSJIS=function(e){return pe(e)};var te={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,o){if(t.isValid(i))return i;try{return e(i)}catch{return o}}})(te);function Pe(){this.buffer=[],this.length=0}Pe.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var wt=Pe;function G(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}G.prototype.set=function(t,e,r,i){const o=t*this.size+e;this.data[o]=r,i&&(this.reservedBit[o]=!0)};G.prototype.get=function(t,e){return this.data[t*this.size+e]};G.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};G.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var yt=G,Me={};(function(t){const e=v.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,n=e(i),s=n===145?26:Math.ceil((n-13)/(2*o-2))*2,l=[n-7];for(let a=1;a<o-1;a++)l[a]=l[a-1]-s;return l.push(6),l.reverse()},t.getPositions=function(i){const o=[],n=t.getRowColCoords(i),s=n.length;for(let l=0;l<s;l++)for(let a=0;a<s;a++)l===0&&a===0||l===0&&a===s-1||l===s-1&&a===0||o.push([n[l],n[a]]);return o}})(Me);var Le={};const Ct=v.getSymbolSize,Te=7;Le.getPositions=function(e){const r=Ct(e);return[[0,0],[r-Te,0],[0,r-Te]]};var Re={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const n=o.size;let s=0,l=0,a=0,c=null,f=null;for(let A=0;A<n;A++){l=a=0,c=f=null;for(let w=0;w<n;w++){let h=o.get(A,w);h===c?l++:(l>=5&&(s+=e.N1+(l-5)),c=h,l=1),h=o.get(w,A),h===f?a++:(a>=5&&(s+=e.N1+(a-5)),f=h,a=1)}l>=5&&(s+=e.N1+(l-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(o){const n=o.size;let s=0;for(let l=0;l<n-1;l++)for(let a=0;a<n-1;a++){const c=o.get(l,a)+o.get(l,a+1)+o.get(l+1,a)+o.get(l+1,a+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(o){const n=o.size;let s=0,l=0,a=0;for(let c=0;c<n;c++){l=a=0;for(let f=0;f<n;f++)l=l<<1&2047|o.get(c,f),f>=10&&(l===1488||l===93)&&s++,a=a<<1&2047|o.get(f,c),f>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let n=0;const s=o.data.length;for(let a=0;a<s;a++)n+=o.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*e.N4};function r(i,o,n){switch(i){case t.Patterns.PATTERN000:return(o+n)%2===0;case t.Patterns.PATTERN001:return o%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(o+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return o*n%2+o*n%3===0;case t.Patterns.PATTERN110:return(o*n%2+o*n%3)%2===0;case t.Patterns.PATTERN111:return(o*n%3+(o+n)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(o,n){const s=n.size;for(let l=0;l<s;l++)for(let a=0;a<s;a++)n.isReserved(a,l)||n.xor(a,l,r(o,a,l))},t.getBestMask=function(o,n){const s=Object.keys(t.Patterns).length;let l=0,a=1/0;for(let c=0;c<s;c++){n(c),t.applyMask(c,o);const f=t.getPenaltyN1(o)+t.getPenaltyN2(o)+t.getPenaltyN3(o)+t.getPenaltyN4(o);t.applyMask(c,o),f<a&&(a=f,l=c)}return l}})(Re);var ne={};const U=te,W=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],X=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ne.getBlocksCount=function(e,r){switch(r){case U.L:return W[(e-1)*4+0];case U.M:return W[(e-1)*4+1];case U.Q:return W[(e-1)*4+2];case U.H:return W[(e-1)*4+3];default:return}};ne.getTotalCodewordsCount=function(e,r){switch(r){case U.L:return X[(e-1)*4+0];case U.M:return X[(e-1)*4+1];case U.Q:return X[(e-1)*4+2];case U.H:return X[(e-1)*4+3];default:return}};var ke={},oe={};const O=new Uint8Array(512),Z=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)O[r]=e,Z[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)O[r]=O[r-255]})();oe.log=function(e){if(e<1)throw new Error("log("+e+")");return Z[e]};oe.exp=function(e){return O[e]};oe.mul=function(e,r){return e===0||r===0?0:O[Z[e]+Z[r]]};(function(t){const e=oe;t.mul=function(i,o){const n=new Uint8Array(i.length+o.length-1);for(let s=0;s<i.length;s++)for(let l=0;l<o.length;l++)n[s+l]^=e.mul(i[s],o[l]);return n},t.mod=function(i,o){let n=new Uint8Array(i);for(;n.length-o.length>=0;){const s=n[0];for(let a=0;a<o.length;a++)n[a]^=e.mul(o[a],s);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},t.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let n=0;n<i;n++)o=t.mul(o,new Uint8Array([1,e.exp(n)]));return o}})(ke);const De=ke;function we(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}we.prototype.initialize=function(e){this.degree=e,this.genPoly=De.generateECPolynomial(this.degree)};we.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const i=De.mod(r,this.genPoly),o=this.degree-i.length;if(o>0){const n=new Uint8Array(this.degree);return n.set(i,o),n}return i};var Et=we,Ue={},F={},ye={};ye.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var L={};const Fe="[0-9]+",bt="[A-Z $%*+\\-./:]+";let x="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";x=x.replace(/u/g,"\\u");const Bt="(?:(?![A-Z0-9 $%*+\\-./:]|"+x+`)(?:.|[\r
|
||
]))+`;L.KANJI=new RegExp(x,"g");L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");L.BYTE=new RegExp(Bt,"g");L.NUMERIC=new RegExp(Fe,"g");L.ALPHANUMERIC=new RegExp(bt,"g");const _t=new RegExp("^"+x+"$"),At=new RegExp("^"+Fe+"$"),It=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");L.testKanji=function(e){return _t.test(e)};L.testNumeric=function(e){return At.test(e)};L.testAlphanumeric=function(e){return It.test(e)};(function(t){const e=ye,r=L;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},t.isValid=function(n){return n&&n.bit&&n.ccBits};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(n,s){if(t.isValid(n))return n;try{return i(n)}catch{return s}}})(F);(function(t){const e=v,r=ne,i=te,o=F,n=ye,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,l=e.getBCHDigit(s);function a(w,h,y){for(let u=1;u<=40;u++)if(h<=t.getCapacity(u,y,w))return u}function c(w,h){return o.getCharCountIndicator(w,h)+4}function f(w,h){let y=0;return w.forEach(function(u){const C=c(u.mode,h);y+=C+u.getBitsLength()}),y}function A(w,h){for(let y=1;y<=40;y++)if(f(w,y)<=t.getCapacity(y,h,o.MIXED))return y}t.from=function(h,y){return n.isValid(h)?parseInt(h,10):y},t.getCapacity=function(h,y,u){if(!n.isValid(h))throw new Error("Invalid QR Code version");typeof u>"u"&&(u=o.BYTE);const C=e.getSymbolTotalCodewords(h),g=r.getTotalCodewordsCount(h,y),m=(C-g)*8;if(u===o.MIXED)return m;const d=m-c(u,h);switch(u){case o.NUMERIC:return Math.floor(d/10*3);case o.ALPHANUMERIC:return Math.floor(d/11*2);case o.KANJI:return Math.floor(d/13);case o.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(h,y){let u;const C=i.from(y,i.M);if(Array.isArray(h)){if(h.length>1)return A(h,C);if(h.length===0)return 1;u=h[0]}else u=h;return a(u.mode,u.getLength(),C)},t.getEncodedBits=function(h){if(!n.isValid(h)||h<7)throw new Error("Invalid QR Code version");let y=h<<12;for(;e.getBCHDigit(y)-l>=0;)y^=s<<e.getBCHDigit(y)-l;return h<<12|y}})(Ue);var Ve={};const fe=v,ze=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,Tt=1<<14|1<<12|1<<10|1<<4|1<<1,Ne=fe.getBCHDigit(ze);Ve.getEncodedBits=function(e,r){const i=e.bit<<3|r;let o=i<<10;for(;fe.getBCHDigit(o)-Ne>=0;)o^=ze<<fe.getBCHDigit(o)-Ne;return(i<<10|o)^Tt};var He={};const Nt=F;function V(t){this.mode=Nt.NUMERIC,this.data=t.toString()}V.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(e){let r,i,o;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),o=parseInt(i,10),e.put(o,10);const n=this.data.length-r;n>0&&(i=this.data.substr(r),o=parseInt(i,10),e.put(o,n*3+1))};var St=V;const vt=F,se=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function z(t){this.mode=vt.ALPHANUMERIC,this.data=t}z.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};z.prototype.getLength=function(){return this.data.length};z.prototype.getBitsLength=function(){return z.getBitsLength(this.data.length)};z.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let i=se.indexOf(this.data[r])*45;i+=se.indexOf(this.data[r+1]),e.put(i,11)}this.data.length%2&&e.put(se.indexOf(this.data[r]),6)};var Pt=z,Mt=function(e){for(var r=[],i=e.length,o=0;o<i;o++){var n=e.charCodeAt(o);if(n>=55296&&n<=56319&&i>o+1){var s=e.charCodeAt(o+1);s>=56320&&s<=57343&&(n=(n-55296)*1024+s-56320+65536,o+=1)}if(n<128){r.push(n);continue}if(n<2048){r.push(n>>6|192),r.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){r.push(n>>12|224),r.push(n>>6&63|128),r.push(n&63|128);continue}if(n>=65536&&n<=1114111){r.push(n>>18|240),r.push(n>>12&63|128),r.push(n>>6&63|128),r.push(n&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Lt=Mt,Rt=F;function H(t){this.mode=Rt.BYTE,typeof t=="string"&&(t=Lt(t)),this.data=new Uint8Array(t)}H.getBitsLength=function(e){return e*8};H.prototype.getLength=function(){return this.data.length};H.prototype.getBitsLength=function(){return H.getBitsLength(this.data.length)};H.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var kt=H;const Dt=F,Ut=v;function K(t){this.mode=Dt.KANJI,this.data=t}K.getBitsLength=function(e){return e*13};K.prototype.getLength=function(){return this.data.length};K.prototype.getBitsLength=function(){return K.getBitsLength(this.data.length)};K.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=Ut.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
||
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var Ft=K,de={},Vt={get exports(){return de},set exports(t){de=t}};(function(t){var e={single_source_shortest_paths:function(r,i,o){var n={},s={};s[i]=0;var l=e.PriorityQueue.make();l.push(i,0);for(var a,c,f,A,w,h,y,u,C;!l.empty();){a=l.pop(),c=a.value,A=a.cost,w=r[c]||{};for(f in w)w.hasOwnProperty(f)&&(h=w[f],y=A+h,u=s[f],C=typeof s[f]>"u",(C||u>y)&&(s[f]=y,l.push(f,y),n[f]=c))}if(typeof o<"u"&&typeof s[o]>"u"){var g=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(g)}return n},extract_shortest_path_from_predecessor_list:function(r,i){for(var o=[],n=i;n;)o.push(n),r[n],n=r[n];return o.reverse(),o},find_path:function(r,i,o){var n=e.single_source_shortest_paths(r,i,o);return e.extract_shortest_path_from_predecessor_list(n,o)},PriorityQueue:{make:function(r){var i=e.PriorityQueue,o={},n;r=r||{};for(n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o.queue=[],o.sorter=r.sorter||i.default_sorter,o},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var o={value:r,cost:i};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Vt);(function(t){const e=F,r=St,i=Pt,o=kt,n=Ft,s=L,l=v,a=de;function c(g){return unescape(encodeURIComponent(g)).length}function f(g,m,d){const p=[];let E;for(;(E=g.exec(d))!==null;)p.push({data:E[0],index:E.index,mode:m,length:E[0].length});return p}function A(g){const m=f(s.NUMERIC,e.NUMERIC,g),d=f(s.ALPHANUMERIC,e.ALPHANUMERIC,g);let p,E;return l.isKanjiModeEnabled()?(p=f(s.BYTE,e.BYTE,g),E=f(s.KANJI,e.KANJI,g)):(p=f(s.BYTE_KANJI,e.BYTE,g),E=[]),m.concat(d,p,E).sort(function(I,_){return I.index-_.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function w(g,m){switch(m){case e.NUMERIC:return r.getBitsLength(g);case e.ALPHANUMERIC:return i.getBitsLength(g);case e.KANJI:return n.getBitsLength(g);case e.BYTE:return o.getBitsLength(g)}}function h(g){return g.reduce(function(m,d){const p=m.length-1>=0?m[m.length-1]:null;return p&&p.mode===d.mode?(m[m.length-1].data+=d.data,m):(m.push(d),m)},[])}function y(g){const m=[];for(let d=0;d<g.length;d++){const p=g[d];switch(p.mode){case e.NUMERIC:m.push([p,{data:p.data,mode:e.ALPHANUMERIC,length:p.length},{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.ALPHANUMERIC:m.push([p,{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.KANJI:m.push([p,{data:p.data,mode:e.BYTE,length:c(p.data)}]);break;case e.BYTE:m.push([{data:p.data,mode:e.BYTE,length:c(p.data)}])}}return m}function u(g,m){const d={},p={start:{}};let E=["start"];for(let B=0;B<g.length;B++){const I=g[B],_=[];for(let R=0;R<I.length;R++){const M=I[R],J=""+B+R;_.push(J),d[J]={node:M,lastCount:0},p[J]={};for(let ie=0;ie<E.length;ie++){const k=E[ie];d[k]&&d[k].node.mode===M.mode?(p[k][J]=w(d[k].lastCount+M.length,M.mode)-w(d[k].lastCount,M.mode),d[k].lastCount+=M.length):(d[k]&&(d[k].lastCount=M.length),p[k][J]=w(M.length,M.mode)+4+e.getCharCountIndicator(M.mode,m))}}E=_}for(let B=0;B<E.length;B++)p[E[B]].end=0;return{map:p,table:d}}function C(g,m){let d;const p=e.getBestModeForData(g);if(d=e.from(m,p),d!==e.BYTE&&d.bit<p.bit)throw new Error('"'+g+'" cannot be encoded with mode '+e.toString(d)+`.
|
||
Suggested mode is: `+e.toString(p));switch(d===e.KANJI&&!l.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new r(g);case e.ALPHANUMERIC:return new i(g);case e.KANJI:return new n(g);case e.BYTE:return new o(g)}}t.fromArray=function(m){return m.reduce(function(d,p){return typeof p=="string"?d.push(C(p,null)):p.data&&d.push(C(p.data,p.mode)),d},[])},t.fromString=function(m,d){const p=A(m,l.isKanjiModeEnabled()),E=y(p),B=u(E,d),I=a.find_path(B.map,"start","end"),_=[];for(let R=1;R<I.length-1;R++)_.push(B.table[I[R]].node);return t.fromArray(h(_))},t.rawSplit=function(m){return t.fromArray(A(m,l.isKanjiModeEnabled()))}})(He);const re=v,ae=te,zt=wt,Ht=yt,Kt=Me,Jt=Le,ge=Re,he=ne,$t=Et,ee=Ue,jt=Ve,Yt=F,le=He;function Ot(t,e){const r=t.size,i=Jt.getPositions(e);for(let o=0;o<i.length;o++){const n=i[o][0],s=i[o][1];for(let l=-1;l<=7;l++)if(!(n+l<=-1||r<=n+l))for(let a=-1;a<=7;a++)s+a<=-1||r<=s+a||(l>=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?t.set(n+l,s+a,!0,!0):t.set(n+l,s+a,!1,!0))}}function xt(t){const e=t.size;for(let r=8;r<e-8;r++){const i=r%2===0;t.set(r,6,i,!0),t.set(6,r,i,!0)}}function qt(t,e){const r=Kt.getPositions(e);for(let i=0;i<r.length;i++){const o=r[i][0],n=r[i][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(o+s,n+l,!0,!0):t.set(o+s,n+l,!1,!0)}}function Gt(t,e){const r=t.size,i=ee.getEncodedBits(e);let o,n,s;for(let l=0;l<18;l++)o=Math.floor(l/3),n=l%3+r-8-3,s=(i>>l&1)===1,t.set(o,n,s,!0),t.set(n,o,s,!0)}function ue(t,e,r){const i=t.size,o=jt.getEncodedBits(e,r);let n,s;for(n=0;n<15;n++)s=(o>>n&1)===1,n<6?t.set(n,8,s,!0):n<8?t.set(n+1,8,s,!0):t.set(i-15+n,8,s,!0),n<8?t.set(8,i-n-1,s,!0):n<9?t.set(8,15-n-1+1,s,!0):t.set(8,15-n-1,s,!0);t.set(i-8,8,1,!0)}function Qt(t,e){const r=t.size;let i=-1,o=r-1,n=7,s=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,l-a)){let c=!1;s<e.length&&(c=(e[s]>>>n&1)===1),t.set(o,l-a,c),n--,n===-1&&(s++,n=7)}if(o+=i,o<0||r<=o){o-=i,i=-i;break}}}function Wt(t,e,r){const i=new zt;r.forEach(function(a){i.put(a.mode.bit,4),i.put(a.getLength(),Yt.getCharCountIndicator(a.mode,t)),a.write(i)});const o=re.getSymbolTotalCodewords(t),n=he.getTotalCodewordsCount(t,e),s=(o-n)*8;for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const l=(s-i.getLengthInBits())/8;for(let a=0;a<l;a++)i.put(a%2?17:236,8);return Xt(i,t,e)}function Xt(t,e,r){const i=re.getSymbolTotalCodewords(e),o=he.getTotalCodewordsCount(e,r),n=i-o,s=he.getBlocksCount(e,r),l=i%s,a=s-l,c=Math.floor(i/s),f=Math.floor(n/s),A=f+1,w=c-f,h=new $t(w);let y=0;const u=new Array(s),C=new Array(s);let g=0;const m=new Uint8Array(t.buffer);for(let I=0;I<s;I++){const _=I<a?f:A;u[I]=m.slice(y,y+_),C[I]=h.encode(u[I]),y+=_,g=Math.max(g,_)}const d=new Uint8Array(i);let p=0,E,B;for(E=0;E<g;E++)for(B=0;B<s;B++)E<u[B].length&&(d[p++]=u[B][E]);for(E=0;E<w;E++)for(B=0;B<s;B++)d[p++]=C[B][E];return d}function Zt(t,e,r,i){let o;if(Array.isArray(t))o=le.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const f=le.rawSplit(t);c=ee.getBestVersionForData(f,r)}o=le.fromString(t,c||40)}else throw new Error("Invalid data");const n=ee.getBestVersionForData(o,r);if(!n)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=n;else if(e<n)throw new Error(`
|
||
The chosen QR Code version cannot contain this amount of data.
|
||
Minimum version required to store current data is: `+n+`.
|
||
`);const s=Wt(e,r,o),l=re.getSymbolSize(e),a=new Ht(l);return Ot(a,e),xt(a),qt(a,e),ue(a,r,0),e>=7&&Gt(a,e),Qt(a,s),isNaN(i)&&(i=ge.getBestMask(a,ue.bind(null,a,r))),ge.applyMask(i,a),ue(a,r,i),{modules:a,version:e,errorCorrectionLevel:r,maskPattern:i,segments:o}}ve.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let i=ae.M,o,n;return typeof r<"u"&&(i=ae.from(r.errorCorrectionLevel,ae.M),o=ee.from(r.version),n=ge.from(r.maskPattern),r.toSJISFunc&&re.setToSJISFunction(r.toSJISFunc)),Zt(e,o,i,n)};var Ke={},Ce={};(function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(n){return[n,n]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,n=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:n,scale:n?4:s,margin:o,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},t.getImageWidth=function(i,o){const n=t.getScale(i,o);return Math.floor((i+o.margin*2)*n)},t.qrToImageData=function(i,o,n){const s=o.modules.size,l=o.modules.data,a=t.getScale(s,n),c=Math.floor((s+n.margin*2)*a),f=n.margin*a,A=[n.color.light,n.color.dark];for(let w=0;w<c;w++)for(let h=0;h<c;h++){let y=(w*c+h)*4,u=n.color.light;if(w>=f&&h>=f&&w<c-f&&h<c-f){const C=Math.floor((w-f)/a),g=Math.floor((h-f)/a);u=A[l[C*s+g]?1:0]}i[y++]=u.r,i[y++]=u.g,i[y++]=u.b,i[y]=u.a}}})(Ce);(function(t){const e=Ce;function r(o,n,s){o.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(n,s,l){let a=l,c=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=i()),a=e.getOptions(a);const f=e.getImageWidth(n.modules.size,a),A=c.getContext("2d"),w=A.createImageData(f,f);return e.qrToImageData(w.data,n,a),r(A,c,f),A.putImageData(w,0,0),c},t.renderToDataURL=function(n,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=t.render(n,s,a),f=a.type||"image/png",A=a.rendererOpts||{};return c.toDataURL(f,A.quality)}})(Ke);var Je={};const en=Ce;function Se(t,e){const r=t.a/255,i=e+'="'+t.hex+'"';return r<1?i+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function ce(t,e,r){let i=t+e;return typeof r<"u"&&(i+=" "+r),i}function tn(t,e,r){let i="",o=0,n=!1,s=0;for(let l=0;l<t.length;l++){const a=Math.floor(l%e),c=Math.floor(l/e);!a&&!n&&(n=!0),t[l]?(s++,l>0&&a>0&&t[l-1]||(i+=n?ce("M",a+r,.5+c+r):ce("m",o,0),o=0,n=!1),a+1<e&&t[l+1]||(i+=ce("h",s),s=0)):o++}return i}Je.render=function(e,r,i){const o=en.getOptions(r),n=e.modules.size,s=e.modules.data,l=n+o.margin*2,a=o.color.light.a?"<path "+Se(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+Se(o.color.dark,"stroke")+' d="'+tn(s,n,o.margin)+'"/>',f='viewBox="0 0 '+l+" "+l+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+f+' shape-rendering="crispEdges">'+a+c+`</svg>
|
||
`;return typeof i=="function"&&i(null,w),w};const nn=mt,me=ve,$e=Ke,on=Je;function Ee(t,e,r,i,o){const n=[].slice.call(arguments,1),s=n.length,l=typeof n[s-1]=="function";if(!l&&!nn())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(o=r,r=e,e=i=void 0):s===3&&(e.getContext&&typeof o>"u"?(o=i,i=void 0):(o=i,i=r,r=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=e,e=i=void 0):s===2&&!e.getContext&&(i=r,r=e,e=void 0),new Promise(function(a,c){try{const f=me.create(r,i);a(t(f,e,i))}catch(f){c(f)}})}try{const a=me.create(r,i);o(null,t(a,e,i))}catch(a){o(a)}}q.create=me.create;q.toCanvas=Ee.bind(null,$e.render);q.toDataURL=Ee.bind(null,$e.renderToDataURL);q.toString=Ee.bind(null,function(t,e,r){return on.render(t,r)});const je=t=>(ut("data-v-ea8f49c9"),t=t(),ct(),t),rn={class:"w-full h-full bg-page flex items-center justify-center"},sn={class:"flex bg-white"},an={class:"flex flex-col items-center w-[330px] py-[100px] border-r"},ln=je(()=>S("div",{class:"title font-bold text-xl"},"打开手机微信",-1)),un=je(()=>S("div",{class:"tips text-sm mt-[5px]"},"点击右上角打开扫一扫",-1)),cn={class:"qrcode p-[10px] mt-[30px] border h-[120px] leading-none box-content"},fn={class:"relative"},dn={key:0,class:"flex flex-col justify-center items-center absolute inset-0 bg-gray-50"},gn={class:"text-xs text-gray-600"},hn={class:"bg-white w-[380px] p-[30px]"},mn={class:"flex items-end my-[30px]"},pn=["onClick"],wn={class:"flex justify-between leading-none"},yn={key:0,class:"text-xs py-[50rpx] flex justify-center w-full"},Cn={class:"text-primary"},En={class:"text-primary"},bn=Ze({__name:"login",setup(t){const e=u=>{ft({key:u}).then(g=>{let m=g.data;switch(m.status){case"wait":setTimeout(()=>{e(r.value.key)},1e3);break;case"success":m.login_data.token?(o.setToken(m.login_data.token),Ie().handleLoginBack()):(dt("openId").value=m.login_data.openid,gt("/auth/bind"));break;case"fail":r.value.pastDueContent=m.fail_reason,r.value.pastDue=!0;break}}).catch(g=>{r.value.pastDue=!0,r.value.pastDueContent=g.msg})},r=$({url:"",key:"",pastDue:!1,pastDueContent:"二维码生成失败"}),i=async()=>{let u=await(await it()).data;r.value.key=u.key,q.toDataURL(u.url,{errorCorrectionLevel:"L",margin:0,width:100}).then(C=>{r.value.url=C}),r.value.pastDue=!1,setTimeout(()=>{e(r.value.key)},1e3)};i();const o=et(),n=tt();n.getLoginConfig();const s=be(()=>{const u=[];return n.login.is_username&&u.push({type:"username",title:T("usernameLogin")}),n.login.is_mobile&&u.push({type:"mobile",title:T("mobileLogin")}),a.value=u[0]?u[0].type:"",u}),l=$(!1),a=$(""),c=nt({username:"",password:"",mobile:"",mobile_code:"",mobile_key:""}),f=$(),A=be(()=>({username:{required:a.value=="username",message:T("usernamePlaceholder"),trigger:["blur","change"]},password:{required:a.value=="username",message:T("passwordPlaceholder"),trigger:["blur","change"]},mobile:[{required:a.value=="mobile",message:T("mobilePlaceholder"),trigger:["blur","change"]},{validator(u,C,g){return a.value!="mobile"?!0:Ye.mobile(C)},message:T("mobileError"),trigger:["blur"]}],mobile_code:{required:a.value=="mobile",message:T("codePlaceholder"),trigger:["change"]}})),w=async()=>{var u;await((u=f.value)==null?void 0:u.validate(async(C,g)=>{if(C){if(l.value)return;l.value=!0,(a.value=="username"?st:at)(c).then(async d=>{await o.setToken(d.data.token),Ie().handleLoginBack()}).catch(()=>{l.value=!1})}}))},h=$(null),y=async()=>{var u;await((u=f.value)==null?void 0:u.validateField("mobile",async(C,g)=>{var m;C&&((m=h.value)==null||m.send())}))};return(u,C)=>{const g=Oe,m=qe,d=Ge,p=xe,E=We,B=Xe,I=Qe;return j(),Y("div",rn,[S("div",sn,[S("div",an,[ln,un,S("div",cn,[S("div",fn,[N(g,{src:r.value.url,class:"w-[120px]"},null,8,["src"]),r.value.pastDue?(j(),Y("div",dn,[S("span",gn,D(r.value.pastDueContent),1),S("span",{onClick:C[0]||(C[0]=_=>i()),class:"text-xs cursor-pointer text-color mt-2"},"点击刷新")])):Be("",!0)])])]),S("div",hn,[S("div",mn,[(j(!0),Y(ot,null,rt(b(s),_=>(j(),Y("div",{class:lt(["mr-[20px] text-base cursor-pointer leading-none",{"font-bold":a.value==_.type}]),onClick:R=>a.value=_.type},D(_.title),11,pn))),256))]),N(I,{model:b(c),ref_key:"formRef",ref:f,rules:b(A),"validate-on-rule-change":!1},{default:P(()=>[_e(S("div",null,[N(d,{prop:"username"},{default:P(()=>[N(m,{modelValue:b(c).username,"onUpdate:modelValue":C[1]||(C[1]=_=>b(c).username=_),placeholder:("t"in u?u.t:b(T))("usernamePlaceholder"),clearable:"","inline-message":!0},null,8,["modelValue","placeholder"])]),_:1}),N(d,{prop:"password"},{default:P(()=>[N(m,{modelValue:b(c).password,"onUpdate:modelValue":C[2]||(C[2]=_=>b(c).password=_),placeholder:("t"in u?u.t:b(T))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0},null,8,["modelValue","placeholder"])]),_:1})],512),[[Ae,a.value=="username"]]),_e(S("div",null,[N(d,{prop:"mobile"},{default:P(()=>[N(m,{modelValue:b(c).mobile,"onUpdate:modelValue":C[3]||(C[3]=_=>b(c).mobile=_),placeholder:("t"in u?u.t:b(T))("mobilePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),_:1}),N(d,{prop:"mobile_code"},{default:P(()=>[N(m,{modelValue:b(c).mobile_code,"onUpdate:modelValue":C[5]||(C[5]=_=>b(c).mobile_code=_),placeholder:("t"in u?u.t:b(T))("codePlaceholder")},{suffix:P(()=>[N(p,{mobile:b(c).mobile,type:"login",modelValue:b(c).mobile_key,"onUpdate:modelValue":C[4]||(C[4]=_=>b(c).mobile_key=_),onClick:y,ref_key:"smsCodeRef",ref:h},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[Ae,a.value=="mobile"]]),S("div",wn,[N(B,{to:"/auth/register"},{default:P(()=>[N(E,{type:"primary",link:""},{default:P(()=>[Q(D(("t"in u?u.t:b(T))("noAccount"))+","+D(("t"in u?u.t:b(T))("toRegister")),1)]),_:1})]),_:1})]),N(d,null,{default:P(()=>[N(E,{type:"primary",class:"mt-[20px] w-full",size:"large",onClick:w,loading:l.value},{default:P(()=>[Q(D(l.value?("t"in u?u.t:b(T))("logining"):("t"in u?u.t:b(T))("login")),1)]),_:1},8,["loading"])]),_:1}),b(n).login.agreement_show?(j(),Y("div",yn,[Q(D(("t"in u?u.t:b(T))("agreeTips"))+" ",1),N(B,{to:"/auth/agreement?key=service"},{default:P(()=>[S("span",Cn,D(("t"in u?u.t:b(T))("userAgreement")),1)]),_:1}),Q(" "+D(("t"in u?u.t:b(T))("and"))+" ",1),N(B,{to:"/auth/agreement?key=privacy"},{default:P(()=>[S("span",En,D(("t"in u?u.t:b(T))("privacyAgreement")),1)]),_:1})])):Be("",!0)]),_:1},8,["model","rules"])])])])}}});const Fn=ht(bn,[["__scopeId","data-v-ea8f49c9"]]);export{Fn as default};
|