import{E as We,_ as Ge,t as tn,__tla as en}from"./test.f9d1f3c7.js";import{E as nn,__tla as rn}from"./el-input.6e95d1c0.js";import{E as on,a as an,__tla as sn}from"./el-overlay.471082ac.js";import{E as ln,__tla as un}from"./el-button.647c2baa.js";import{_ as cn,__tla as fn}from"./nuxt-link.d2e57a6c.js";import{f as hn,x as O,h as dn,a5 as gn,i as zt,a1 as pn,o as Q,k as $,l as I,m as N,t as k,X as Ht,Z as mn,$ as yn,u as b,w as T,R as Jt,V as Kt,p as ot,a6 as wn,a7 as vn,a8 as En,A as _n,v as B,q as bn,s as An,a9 as Cn,aa as Bn,e as Nn,__tla as xn}from"./entry.9b92f05f.js";import{u as Yt,__tla as In}from"./useLogin.277a65ff.js";import{_ as Pn}from"./_plugin-vue_export-helper.c27b6911.js";import{__tla as Tn}from"./throttle.5a090da9.js";import{__tla as Mn}from"./debounce.e5e48a2d.js";import{__tla as Rn}from"./system.ead60a57.js";import{__tla as Ln}from"./use-form-item.2286029f.js";import{__tla as kn}from"./index.ad444b6c.js";import{__tla as Un}from"./index.33eb77e2.js";import{__tla as Sn}from"./vnode.ad035761.js";let qt,Dn=Promise.all([(()=>{try{return en}catch{}})(),(()=>{try{return rn}catch{}})(),(()=>{try{return sn}catch{}})(),(()=>{try{return un}catch{}})(),(()=>{try{return fn}catch{}})(),(()=>{try{return xn}catch{}})(),(()=>{try{return In}catch{}})(),(()=>{try{return Tn}catch{}})(),(()=>{try{return Mn}catch{}})(),(()=>{try{return Rn}catch{}})(),(()=>{try{return Ln}catch{}})(),(()=>{try{return kn}catch{}})(),(()=>{try{return Un}catch{}})(),(()=>{try{return Sn}catch{}})()]).then(async()=>{var H={},jt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},_t={},P={};let at;const Ot=[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];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},P.getSymbolTotalCodewords=function(t){return Ot[t]},P.getBCHDigit=function(t){let n=0;for(;t!==0;)n++,t>>>=1;return n},P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');at=t},P.isKanjiModeEnabled=function(){return typeof at<"u"},P.toSJIS=function(t){return at(t)};var Z={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.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: "+o)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,e){if(t.isValid(o))return o;try{return n(o)}catch{return e}}})(Z);function bt(){this.buffer=[],this.length=0}bt.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let o=0;o>>n-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}};var Qt=bt;function J(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)}J.prototype.set=function(t,n,o,e){const r=t*this.size+n;this.data[r]=o,e&&(this.reservedBit[r]=!0)},J.prototype.get=function(t,n){return this.data[t*this.size+n]},J.prototype.xor=function(t,n,o){this.data[t*this.size+n]^=o},J.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]};var $t=J,At={};(function(t){const n=P.getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const e=Math.floor(o/7)+2,r=n(o),a=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const r=e.size;let a=0,i=0,s=0,l=null,c=null;for(let p=0;p=5&&(a+=n.N1+(i-5)),l=h,i=1),h=e.get(A,p),h===c?s++:(s>=5&&(a+=n.N1+(s-5)),c=h,s=1)}i>=5&&(a+=n.N1+(i-5)),s>=5&&(a+=n.N1+(s-5))}return a},t.getPenaltyN2=function(e){const r=e.size;let a=0;for(let i=0;i=10&&(i===1488||i===93)&&a++,s=s<<1&2047|e.get(c,l),c>=10&&(s===1488||s===93)&&a++}return a*n.N3},t.getPenaltyN4=function(e){let r=0;const a=e.data.length;for(let i=0;i=0;){const a=r[0];for(let s=0;s0){const r=new Uint8Array(this.degree);return r.set(o,e),r}return o};var Xt=it,Pt={},S={},st={};st.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var M={};const Tt="[0-9]+",Wt="[A-Z $%*+\\-./:]+";let Y="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Y=Y.replace(/u/g,"\\u");const Gt="(?:(?![A-Z0-9 $%*+\\-./:]|"+Y+`)(?:.|[\r ]))+`;M.KANJI=new RegExp(Y,"g"),M.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),M.BYTE=new RegExp(Gt,"g"),M.NUMERIC=new RegExp(Tt,"g"),M.ALPHANUMERIC=new RegExp(Wt,"g");const te=new RegExp("^"+Y+"$"),ee=new RegExp("^"+Tt+"$"),ne=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");M.testKanji=function(t){return te.test(t)},M.testNumeric=function(t){return ee.test(t)},M.testAlphanumeric=function(t){return ne.test(t)},function(t){const n=st,o=M;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(r,a){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?r.ccBits[0]:a<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return o.testNumeric(r)?t.NUMERIC:o.testAlphanumeric(r)?t.ALPHANUMERIC:o.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},t.isValid=function(r){return r&&r.bit&&r.ccBits};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.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: "+r)}}t.from=function(r,a){if(t.isValid(r))return r;try{return e(r)}catch{return a}}}(S),function(t){const n=P,o=X,e=Z,r=S,a=st,i=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,s=n.getBCHDigit(i);function l(h,v,y){for(let u=1;u<=40;u++)if(v<=t.getCapacity(u,y,h))return u}function c(h,v){return r.getCharCountIndicator(h,v)+4}function p(h,v){let y=0;return h.forEach(function(u){const w=c(u.mode,v);y+=w+u.getBitsLength()}),y}function A(h,v){for(let y=1;y<=40;y++)if(p(h,y)<=t.getCapacity(y,v,r.MIXED))return y}t.from=function(h,v){return a.isValid(h)?parseInt(h,10):v},t.getCapacity=function(h,v,y){if(!a.isValid(h))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=r.BYTE);const u=n.getSymbolTotalCodewords(h),w=o.getTotalCodewordsCount(h,v),f=(u-w)*8;if(y===r.MIXED)return f;const d=f-c(y,h);switch(y){case r.NUMERIC:return Math.floor(d/10*3);case r.ALPHANUMERIC:return Math.floor(d/11*2);case r.KANJI:return Math.floor(d/13);case r.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(h,v){let y;const u=e.from(v,e.M);if(Array.isArray(h)){if(h.length>1)return A(h,u);if(h.length===0)return 1;y=h[0]}else y=h;return l(y.mode,y.getLength(),u)},t.getEncodedBits=function(h){if(!a.isValid(h)||h<7)throw new Error("Invalid QR Code version");let v=h<<12;for(;n.getBCHDigit(v)-s>=0;)v^=i<=0;)e^=Rt<0&&(o=this.data.substr(n),e=parseInt(o,10),t.put(e,r*3+1))};var ae=D;const ie=S,ut=["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 V(t){this.mode=ie.ALPHANUMERIC,this.data=t}V.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},V.prototype.getLength=function(){return this.data.length},V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)},V.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=ut.indexOf(this.data[n])*45;o+=ut.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(ut.indexOf(this.data[n]),6)};var se=V,le=function(t){for(var n=[],o=t.length,e=0;e=55296&&r<=56319&&o>e+1){var a=t.charCodeAt(e+1);a>=56320&&a<=57343&&(r=(r-55296)*1024+a-56320+65536,e+=1)}if(r<128){n.push(r);continue}if(r<2048){n.push(r>>6|192),n.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){n.push(r>>12|224),n.push(r>>6&63|128),n.push(r&63|128);continue}if(r>=65536&&r<=1114111){n.push(r>>18|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(r&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const ue=le,ce=S;function F(t){this.mode=ce.BYTE,typeof t=="string"&&(t=ue(t)),this.data=new Uint8Array(t)}F.getBitsLength=function(t){return t*8},F.prototype.getLength=function(){return this.data.length},F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)},F.prototype.write=function(t){for(let n=0,o=this.data.length;n=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),t.put(o,13)}};var ge=z,ct={},pe={get exports(){return ct},set exports(t){ct=t}};(function(t){var n={single_source_shortest_paths:function(o,e,r){var a={},i={};i[e]=0;var s=n.PriorityQueue.make();s.push(e,0);for(var l,c,p,A,h,v,y,u,w;!s.empty();){l=s.pop(),c=l.value,A=l.cost,h=o[c]||{};for(p in h)h.hasOwnProperty(p)&&(v=h[p],y=A+v,u=i[p],w=typeof i[p]>"u",(w||u>y)&&(i[p]=y,s.push(p,y),a[p]=c))}if(typeof r<"u"&&typeof i[r]>"u"){var f=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(o,e){for(var r=[],a=e;a;)r.push(a),o[a],a=o[a];return r.reverse(),r},find_path:function(o,e,r){var a=n.single_source_shortest_paths(o,e,r);return n.extract_shortest_path_from_predecessor_list(a,r)},PriorityQueue:{make:function(o){var e=n.PriorityQueue,r={},a;o=o||{};for(a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);return r.queue=[],r.sorter=o.sorter||e.default_sorter,r},default_sorter:function(o,e){return o.cost-e.cost},push:function(o,e){var r={value:o,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=n})(pe),function(t){const n=S,o=ae,e=se,r=fe,a=ge,i=M,s=P,l=ct;function c(f){return unescape(encodeURIComponent(f)).length}function p(f,d,g){const m=[];let _;for(;(_=f.exec(g))!==null;)m.push({data:_[0],index:_.index,mode:d,length:_[0].length});return m}function A(f){const d=p(i.NUMERIC,n.NUMERIC,f),g=p(i.ALPHANUMERIC,n.ALPHANUMERIC,f);let m,_;return s.isKanjiModeEnabled()?(m=p(i.BYTE,n.BYTE,f),_=p(i.KANJI,n.KANJI,f)):(m=p(i.BYTE_KANJI,n.BYTE,f),_=[]),d.concat(g,m,_).sort(function(E,x){return E.index-x.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function h(f,d){switch(d){case n.NUMERIC:return o.getBitsLength(f);case n.ALPHANUMERIC:return e.getBitsLength(f);case n.KANJI:return a.getBitsLength(f);case n.BYTE:return r.getBitsLength(f)}}function v(f){return f.reduce(function(d,g){const m=d.length-1>=0?d[d.length-1]:null;return m&&m.mode===g.mode?(d[d.length-1].data+=g.data,d):(d.push(g),d)},[])}function y(f){const d=[];for(let g=0;g=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(a+s,i+l,!0,!0):t.set(a+s,i+l,!1,!0))}}function Ce(t){const n=t.size;for(let o=8;o>s&1)===1,t.set(r,a,i,!0),t.set(a,r,i,!0)}function pt(t,n,o){const e=t.size,r=_e.getEncodedBits(n,o);let a,i;for(a=0;a<15;a++)i=(r>>a&1)===1,a<6?t.set(a,8,i,!0):a<8?t.set(a+1,8,i,!0):t.set(e-15+a,8,i,!0),a<8?t.set(8,e-a-1,i,!0):a<9?t.set(8,15-a-1+1,i,!0):t.set(8,15-a-1,i,!0);t.set(e-8,8,1,!0)}function xe(t,n){const o=t.size;let e=-1,r=o-1,a=7,i=0;for(let s=o-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(r,s-l)){let c=!1;i>>a&1)===1),t.set(r,s-l,c),a--,a===-1&&(i++,a=7)}if(r+=e,r<0||o<=r){r-=e,e=-e;break}}}function Ie(t,n,o){const e=new me;o.forEach(function(l){e.put(l.mode.bit,4),e.put(l.getLength(),be.getCharCountIndicator(l.mode,t)),l.write(e)});const r=nt.getSymbolTotalCodewords(t),a=dt.getTotalCodewordsCount(t,n),i=(r-a)*8;for(e.getLengthInBits()+4<=i&&e.put(0,4);e.getLengthInBits()%8!==0;)e.putBit(0);const s=(i-e.getLengthInBits())/8;for(let l=0;l=7&&Ne(l,n),xe(l,i),isNaN(e)&&(e=ht.getBestMask(l,pt.bind(null,l,o))),ht.applyMask(e,l),pt(l,o,e),{modules:l,version:n,errorCorrectionLevel:o,maskPattern:e,segments:r}}_t.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let o=ft.M,e,r;return typeof n<"u"&&(o=ft.from(n.errorCorrectionLevel,ft.M),e=rt.from(n.version),r=ht.from(n.maskPattern),n.toSJISFunc&&nt.setToSJISFunction(n.toSJISFunc)),Te(t,e,o,r)};var Ut={},mt={};(function(t){function n(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let e=o.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+o);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(a){return[a,a]}))),e.length===6&&e.push("F","F");const r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const e=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,r=o.width&&o.width>=21?o.width:void 0,a=o.scale||4;return{width:r,scale:r?4:a,margin:e,color:{dark:n(o.color.dark||"#000000ff"),light:n(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,e){return e.width&&e.width>=o+e.margin*2?e.width/(o+e.margin*2):e.scale},t.getImageWidth=function(o,e){const r=t.getScale(o,e);return Math.floor((o+e.margin*2)*r)},t.qrToImageData=function(o,e,r){const a=e.modules.size,i=e.modules.data,s=t.getScale(a,r),l=Math.floor((a+r.margin*2)*s),c=r.margin*s,p=[r.color.light,r.color.dark];for(let A=0;A=c&&h>=c&&A"u"&&(!a||!a.getContext)&&(s=a,a=void 0),a||(l=e()),s=n.getOptions(s);const c=n.getImageWidth(r.modules.size,s),p=l.getContext("2d"),A=p.createImageData(c,c);return n.qrToImageData(A.data,r,s),o(p,l,c),p.putImageData(A,0,0),l},t.renderToDataURL=function(r,a,i){let s=i;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),s||(s={});const l=t.render(r,a,s),c=s.type||"image/png",p=s.rendererOpts||{};return l.toDataURL(c,p.quality)}}(Ut);var St={};const Me=mt;function Dt(t,n){const o=t.a/255,e=n+'="'+t.hex+'"';return o<1?e+" "+n+'-opacity="'+o.toFixed(2).slice(1)+'"':e}function yt(t,n,o){let e=t+n;return typeof o<"u"&&(e+=" "+o),e}function Re(t,n,o){let e="",r=0,a=!1,i=0;for(let s=0;s0&&l>0&&t[s-1]||(e+=a?yt("M",l+o,.5+c+o):yt("m",r,0),r=0,a=!1),l+1':"",l="',c='viewBox="0 0 '+i+" "+i+'"',p=''+s+l+` `;return typeof o=="function"&&o(null,p),p};const Le=jt,wt=_t,Vt=Ut,ke=St;function vt(t,n,o,e,r){const a=[].slice.call(arguments,1),i=a.length,s=typeof a[i-1]=="function";if(!s&&!Le())throw new Error("Callback required as last argument");if(s){if(i<2)throw new Error("Too few arguments provided");i===2?(r=o,o=n,n=e=void 0):i===3&&(n.getContext&&typeof r>"u"?(r=e,e=void 0):(r=e,e=o,o=n,n=void 0))}else{if(i<1)throw new Error("Too few arguments provided");return i===1?(o=n,n=e=void 0):i===2&&!n.getContext&&(e=o,o=n,n=void 0),new Promise(function(l,c){try{const p=wt.create(o,e);l(t(p,n,e))}catch(p){c(p)}})}try{const l=wt.create(o,e);r(null,t(l,n,e))}catch(l){r(l)}}H.create=wt.create,H.toCanvas=vt.bind(null,Vt.render),H.toDataURL=vt.bind(null,Vt.renderToDataURL),H.toString=vt.bind(null,function(t,n,o){return ke.render(t,o)});const Ft=t=>(bn("data-v-52ef3cef"),t=t(),An(),t),Ue={class:"w-full h-full bg-page flex items-center justify-center"},Se={class:"flex bg-white"},De={class:"flex flex-col items-center w-[330px] py-[100px] border-r"},Ve=Ft(()=>I("div",{class:"title font-bold text-xl"},"\u6253\u5F00\u624B\u673A\u5FAE\u4FE1",-1)),Fe=Ft(()=>I("div",{class:"tips text-sm mt-[5px]"},"\u70B9\u51FB\u53F3\u4E0A\u89D2\u6253\u5F00\u626B\u4E00\u626B",-1)),ze={class:"qrcode p-[10px] mt-[30px] border h-[120px] leading-none box-content"},He={class:"relative"},Je={key:0,class:"flex flex-col justify-center items-center absolute inset-0 bg-gray-50"},Ke={class:"text-xs text-gray-600"},Ye={class:"bg-white w-[380px] p-[30px]"},qe={class:"flex items-end my-[30px]"},je=["onClick"],Oe={class:"flex justify-between leading-none"},Qe={key:0,class:"text-xs py-[50rpx] flex justify-center w-full"},$e={class:"text-primary"},Ze={class:"text-primary"},Xe=hn({__name:"login",setup(t){const n=u=>{Cn({key:u}).then(w=>{let f=w.data;switch(f.status){case"wait":setTimeout(()=>{n(o.value.key)},1e3);break;case"success":f.login_data.token?(r.setToken(f.login_data.token),Yt().handleLoginBack()):(Bn("openId").value=f.login_data.openid,Nn("/auth/bind"));break;case"fail":o.value.pastDueContent=f.fail_reason,o.value.pastDue=!0;break}}).catch(w=>{o.value.pastDue=!0,o.value.pastDueContent=w.msg})},o=O({url:"",key:"",pastDue:!1,pastDueContent:"\u4E8C\u7EF4\u7801\u751F\u6210\u5931\u8D25"}),e=async()=>{let u=await(await wn()).data;o.value.key=u.key,H.toDataURL(u.url,{errorCorrectionLevel:"L",margin:0,width:100}).then(w=>{o.value.url=w}),o.value.pastDue=!1,setTimeout(()=>{n(o.value.key)},1e3)};e();const r=dn(),a=gn();a.getLoginConfig();const i=zt(()=>{const u=[];return a.login.is_username&&u.push({type:"username",title:B("usernameLogin")}),a.login.is_mobile&&u.push({type:"mobile",title:B("mobileLogin")}),l.value=u[0]?u[0].type:"",u}),s=O(!1),l=O(""),c=pn({username:"",password:"",mobile:"",mobile_code:"",mobile_key:""}),p=O(),A=zt(()=>({username:{required:l.value=="username",message:B("usernamePlaceholder"),trigger:["blur","change"]},password:{required:l.value=="username",message:B("passwordPlaceholder"),trigger:["blur","change"]},mobile:[{required:l.value=="mobile",message:B("mobilePlaceholder"),trigger:["blur","change"]},{validator(u,w,f){return l.value!="mobile"?!0:tn.mobile(w)},message:B("mobileError"),trigger:["blur"]}],mobile_code:{required:l.value=="mobile",message:B("codePlaceholder"),trigger:["change"]}})),h=async()=>{var u;await((u=p.value)==null?void 0:u.validate(async(w,f)=>{if(w){if(s.value)return;s.value=!0,(l.value=="username"?vn:En)(c).then(async d=>{await r.setToken(d.data.token),Yt().handleLoginBack()}).catch(()=>{s.value=!1})}}))},v=O(null),y=async()=>{var u;await((u=p.value)==null?void 0:u.validateField("mobile",async(w,f)=>{var d;w&&((d=v.value)==null||d.send())}))};return(u,w)=>{const f=We,d=nn,g=on,m=Ge,_=ln,E=cn,x=an;return Q(),$("div",Ue,[I("div",Se,[I("div",De,[Ve,Fe,I("div",ze,[I("div",He,[N(f,{src:o.value.url,class:"w-[120px]"},null,8,["src"]),o.value.pastDue?(Q(),$("div",Je,[I("span",Ke,k(o.value.pastDueContent),1),I("span",{onClick:w[0]||(w[0]=C=>e()),class:"text-xs cursor-pointer text-color mt-2"},"\u70B9\u51FB\u5237\u65B0")])):Ht("",!0)])])]),I("div",Ye,[I("div",qe,[(Q(!0),$(mn,null,yn(b(i),C=>(Q(),$("div",{class:_n(["mr-[20px] text-base cursor-pointer leading-none",{"font-bold":l.value==C.type}]),onClick:q=>l.value=C.type},k(C.title),11,je))),256))]),N(x,{model:b(c),ref_key:"formRef",ref:p,rules:b(A),"validate-on-rule-change":!1},{default:T(()=>[Jt(I("div",null,[N(g,{prop:"username"},{default:T(()=>[N(d,{modelValue:b(c).username,"onUpdate:modelValue":w[1]||(w[1]=C=>b(c).username=C),placeholder:("t"in u?u.t:b(B))("usernamePlaceholder"),clearable:"","inline-message":!0},null,8,["modelValue","placeholder"])]),_:1}),N(g,{prop:"password"},{default:T(()=>[N(d,{modelValue:b(c).password,"onUpdate:modelValue":w[2]||(w[2]=C=>b(c).password=C),placeholder:("t"in u?u.t:b(B))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0},null,8,["modelValue","placeholder"])]),_:1})],512),[[Kt,l.value=="username"]]),Jt(I("div",null,[N(g,{prop:"mobile"},{default:T(()=>[N(d,{modelValue:b(c).mobile,"onUpdate:modelValue":w[3]||(w[3]=C=>b(c).mobile=C),placeholder:("t"in u?u.t:b(B))("mobilePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),_:1}),N(g,{prop:"mobile_code"},{default:T(()=>[N(d,{modelValue:b(c).mobile_code,"onUpdate:modelValue":w[5]||(w[5]=C=>b(c).mobile_code=C),placeholder:("t"in u?u.t:b(B))("codePlaceholder")},{suffix:T(()=>[N(m,{mobile:b(c).mobile,type:"login",modelValue:b(c).mobile_key,"onUpdate:modelValue":w[4]||(w[4]=C=>b(c).mobile_key=C),onClick:y,ref_key:"smsCodeRef",ref:v},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[Kt,l.value=="mobile"]]),I("div",Oe,[N(E,{to:"/auth/register"},{default:T(()=>[N(_,{type:"primary",link:""},{default:T(()=>[ot(k(("t"in u?u.t:b(B))("noAccount"))+"\uFF0C"+k(("t"in u?u.t:b(B))("toRegister")),1)]),_:1})]),_:1})]),N(g,null,{default:T(()=>[N(_,{type:"primary",class:"mt-[20px] w-full",size:"large",onClick:h,loading:s.value},{default:T(()=>[ot(k(s.value?("t"in u?u.t:b(B))("logining"):("t"in u?u.t:b(B))("login")),1)]),_:1},8,["loading"])]),_:1}),b(a).login.agreement_show?(Q(),$("div",Qe,[ot(k(("t"in u?u.t:b(B))("agreeTips"))+" ",1),N(E,{to:"/auth/agreement?key=service"},{default:T(()=>[I("span",$e,k(("t"in u?u.t:b(B))("userAgreement")),1)]),_:1}),ot(" "+k(("t"in u?u.t:b(B))("and"))+" ",1),N(E,{to:"/auth/agreement?key=privacy"},{default:T(()=>[I("span",Ze,k(("t"in u?u.t:b(B))("privacyAgreement")),1)]),_:1})])):Ht("",!0)]),_:1},8,["model","rules"])])])])}}});qt=Pn(Xe,[["__scopeId","data-v-52ef3cef"]])});export{Dn as __tla,qt as default};