import{d as Ht,E as Ot,af as Lt,H as me,y as N,O as pe,aA as we,u as R,aY as be,L as Kt,G as Ce,bH as ve,bI as Dt,aQ as Ee,_ as Be,x as Ft,o as Te,c as Ae,K as x,ag as _e,b as Se,W as Ne}from"./index.1417328f.js";import{M as ht}from"./motion.5477d563.js";/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function jt(t){return Object.prototype.toString.call(t)==="[object Object]"}function Pe(t){var e,n;return jt(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(jt(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[n]=t[n]);return o}const Ct={silent:!1,logLevel:"warn"},Ie=["validator"],Jt=Object.prototype,qt=Jt.toString,Me=Jt.hasOwnProperty,Qt=/^\s*function (\w+)/;function Ut(t){var e;const n=(e=t==null?void 0:t.type)!==null&&e!==void 0?e:t;if(n){const i=n.toString().match(Qt);return i?i[1]:""}return""}const U=Pe,Gt=t=>t;let S=Gt;S=typeof console!="undefined"?function(e,n=Ct.logLevel){Ct.silent===!1&&console[n](`[VueTypes warn]: ${e}`)}:Gt;const z=(t,e)=>Me.call(t,e),Re=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t},V=Array.isArray||function(t){return qt.call(t)==="[object Array]"},H=t=>qt.call(t)==="[object Function]",st=t=>U(t)&&z(t,"_vueTypes_name"),xt=t=>U(t)&&(z(t,"type")||["_vueTypes_name","validator","default","required"].some(e=>z(t,e)));function At(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function k(t,e,n=!1){let i,o=!0,r="";i=U(t)?t:{type:t};const s=st(i)?i._vueTypes_name+" - ":"";if(xt(i)&&i.type!==null){if(i.type===void 0||i.type===!0||!i.required&&e===void 0)return o;V(i.type)?(o=i.type.some(u=>k(u,e,!0)===!0),r=i.type.map(u=>Ut(u)).join(" or ")):(r=Ut(i),o=r==="Array"?V(e):r==="Object"?U(e):r==="String"||r==="Number"||r==="Boolean"||r==="Function"?function(u){if(u==null)return"";const a=u.constructor.toString().match(Qt);return a?a[1]:""}(e)===r:e instanceof i.type)}if(!o){const u=`${s}value "${e}" should be of type "${r}"`;return n===!1?(S(u),!1):u}if(z(i,"validator")&&H(i.validator)){const u=S,a=[];if(S=l=>{a.push(l)},o=i.validator(e),S=u,!o){const l=(a.length>1?"* ":"")+a.join(` * `);return a.length=0,n===!1?(S(l),o):l}}return o}function I(t,e){const n=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(o){return o===void 0?(z(this,"default")&&delete this.default,this):H(o)||k(this,o,!0)===!0?(this.default=V(o)?()=>[...o]:U(o)?()=>Object.assign({},o):o,this):(S(`${this._vueTypes_name} - invalid default value: "${o}"`),this)}}}),{validator:i}=n;return H(i)&&(n.validator=At(i,n)),n}function O(t,e){const n=I(t,e);return Object.defineProperty(n,"validate",{value(i){return H(this.validator)&&S(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: ${JSON.stringify(this)}`),this.validator=At(i,this),this}})}function kt(t,e,n){const i=function(a){const l={};return Object.getOwnPropertyNames(a).forEach(c=>{l[c]=Object.getOwnPropertyDescriptor(a,c)}),Object.defineProperties({},l)}(e);if(i._vueTypes_name=t,!U(n))return i;const{validator:o}=n,r=Yt(n,Ie);if(H(o)){let{validator:a}=i;a&&(a=(u=(s=a).__original)!==null&&u!==void 0?u:s),i.validator=At(a?function(l){return a.call(this,l)&&o.call(this,l)}:o,i)}var s,u;return Object.assign(i,r)}function lt(t){return t.replace(/^(?!\s*$)/gm," ")}const Oe=()=>O("any",{}),Le=()=>O("function",{type:Function}),De=()=>O("boolean",{type:Boolean}),Fe=()=>O("string",{type:String}),je=()=>O("number",{type:Number}),Ue=()=>O("array",{type:Array}),ke=()=>O("object",{type:Object}),$e=()=>I("integer",{type:Number,validator:t=>Re(t)}),ze=()=>I("symbol",{validator:t=>typeof t=="symbol"});function Ve(t,e="custom validation failed"){if(typeof t!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return I(t.name||"<>",{type:null,validator(n){const i=t(n);return i||S(`${this._vueTypes_name} - ${e}`),i}})}function He(t){if(!V(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const e=`oneOf - value should be one of "${t.join('", "')}".`,n=t.reduce((i,o)=>{if(o!=null){const r=o.constructor;i.indexOf(r)===-1&&i.push(r)}return i},[]);return I("oneOf",{type:n.length>0?n:void 0,validator(i){const o=t.indexOf(i)!==-1;return o||S(e),o}})}function Ke(t){if(!V(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,n=[];for(let o=0;on.indexOf(o)===r);const i=n.length>0?n:null;return I("oneOfType",e?{type:i,validator(o){const r=[],s=t.some(u=>{const a=k(st(u)&&u._vueTypes_name==="oneOf"?u.type||null:u,o,!0);return typeof a=="string"&&r.push(a),a===!0});return s||S(`oneOfType - provided value does not match any of the ${r.length} passed-in validators: ${lt(r.join(` `))}`),s}}:{type:i})}function Ye(t){return I("arrayOf",{type:Array,validator(e){let n="";const i=e.every(o=>(n=k(t,o,!0),n===!0));return i||S(`arrayOf - value validation error: ${lt(n)}`),i}})}function Je(t){return I("instanceOf",{type:t})}function qe(t){return I("objectOf",{type:Object,validator(e){let n="";const i=Object.keys(e).every(o=>(n=k(t,e[o],!0),n===!0));return i||S(`objectOf - value validation error: ${lt(n)}`),i}})}function Qe(t){const e=Object.keys(t),n=e.filter(o=>{var r;return!((r=t[o])===null||r===void 0||!r.required)}),i=I("shape",{type:Object,validator(o){if(!U(o))return!1;const r=Object.keys(o);if(n.length>0&&n.some(s=>r.indexOf(s)===-1)){const s=n.filter(u=>r.indexOf(u)===-1);return S(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return r.every(s=>{if(e.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(S(`shape - shape definition does not include a "${s}" property. Allowed keys: "${e.join('", "')}".`),!1);const u=k(t[s],o[s],!0);return typeof u=="string"&&S(`shape - "${s}" property validation error: ${lt(u)}`),u===!0})}});return Object.defineProperty(i,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(i,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),i}const Ge=["name","validate","getter"],xe=(()=>{var t;return(t=class{static get any(){return Oe()}static get func(){return Le().def(this.defaults.func)}static get bool(){return De().def(this.defaults.bool)}static get string(){return Fe().def(this.defaults.string)}static get number(){return je().def(this.defaults.number)}static get array(){return Ue().def(this.defaults.array)}static get object(){return ke().def(this.defaults.object)}static get integer(){return $e().def(this.defaults.integer)}static get symbol(){return ze()}static get nullable(){return{type:null}}static extend(e){if(V(e))return e.forEach(a=>this.extend(a)),this;const{name:n,validate:i=!1,getter:o=!1}=e,r=Yt(e,Ge);if(z(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:s}=r;if(st(s))return delete r.type,Object.defineProperty(this,n,o?{get:()=>kt(n,s,r)}:{value(...a){const l=kt(n,s,r);return l.validator&&(l.validator=l.validator.bind(l,...a)),l}});let u;return u=o?{get(){const a=Object.assign({},r);return i?O(n,a):I(n,a)},enumerable:!0}:{value(...a){const l=Object.assign({},r);let c;return c=i?O(n,l):I(n,l),l.validator&&(c.validator=l.validator.bind(c,...a)),c},enumerable:!0},Object.defineProperty(this,n,u)}}).defaults={},t.sensibleDefaults=void 0,t.config=Ct,t.custom=Ve,t.oneOf=He,t.instanceOf=Je,t.oneOfType=Ke,t.arrayOf=Ye,t.objectOf=qe,t.shape=Qe,t.utils={validate:(e,n)=>k(n,e,!0)===!0,toType:(e,n,i=!1)=>i?O(e,n):I(e,n)},t})();function Wt(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e;return(e=class extends xe{static get sensibleDefaults(){return X({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?X({},n!==!0?n:t):{}}}).defaults=X({},t),e}class Qn extends Wt(){}const W=Wt({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});W.extend([{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VNodeChild",getter:!0,type:void 0}]);var et={},We=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Xt={},M={};let _t;const Xe=[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];M.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};M.getSymbolTotalCodewords=function(e){return Xe[e]};M.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};M.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');_t=e};M.isKanjiModeEnabled=function(){return typeof _t!="undefined"};M.toSJIS=function(e){return _t(e)};var ct={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.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: "+n)}}t.isValid=function(i){return i&&typeof i.bit!="undefined"&&i.bit>=0&&i.bit<4},t.from=function(i,o){if(t.isValid(i))return i;try{return e(i)}catch{return o}}})(ct);function Zt(){this.buffer=[],this.length=0}Zt.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 n=0;n>>e-n-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 Ze=Zt;function nt(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)}nt.prototype.set=function(t,e,n,i){const o=t*this.size+e;this.data[o]=n,i&&(this.reservedBit[o]=!0)};nt.prototype.get=function(t,e){return this.data[t*this.size+e]};nt.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};nt.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var tn=nt,te={};(function(t){const e=M.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,r=e(i),s=r===145?26:Math.ceil((r-13)/(2*o-2))*2,u=[r-7];for(let a=1;a=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const r=o.size;let s=0,u=0,a=0,l=null,c=null;for(let v=0;v=5&&(s+=e.N1+(u-5)),l=y,u=1),y=o.get(p,v),y===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=y,a=1)}u>=5&&(s+=e.N1+(u-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(o){const r=o.size;let s=0;for(let u=0;u=10&&(u===1488||u===93)&&s++,a=a<<1&2047|o.get(c,l),c>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let r=0;const s=o.data.length;for(let a=0;a=0;){const s=r[0];for(let a=0;a0){const r=new Uint8Array(this.degree);return r.set(i,o),r}return i};var nn=St,ie={},j={},Nt={};Nt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var L={};const se="[0-9]+",rn="[A-Z $%*+\\-./:]+";let tt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";tt=tt.replace(/u/g,"\\u");const on="(?:(?![A-Z0-9 $%*+\\-./:]|"+tt+`)(?:.|[\r ]))+`;L.KANJI=new RegExp(tt,"g");L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");L.BYTE=new RegExp(on,"g");L.NUMERIC=new RegExp(se,"g");L.ALPHANUMERIC=new RegExp(rn,"g");const sn=new RegExp("^"+tt+"$"),an=new RegExp("^"+se+"$"),un=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");L.testKanji=function(e){return sn.test(e)};L.testNumeric=function(e){return an.test(e)};L.testAlphanumeric=function(e){return un.test(e)};(function(t){const e=Nt,n=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(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return n.testNumeric(r)?t.NUMERIC:n.testAlphanumeric(r)?t.ALPHANUMERIC:n.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 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(r,s){if(t.isValid(r))return r;try{return i(r)}catch{return s}}})(j);(function(t){const e=M,n=ft,i=ct,o=j,r=Nt,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,u=e.getBCHDigit(s);function a(p,y,w){for(let f=1;f<=40;f++)if(y<=t.getCapacity(f,w,p))return f}function l(p,y){return o.getCharCountIndicator(p,y)+4}function c(p,y){let w=0;return p.forEach(function(f){w+=l(f.mode,y)+f.getBitsLength()}),w}function v(p,y){for(let w=1;w<=40;w++)if(c(p,w)<=t.getCapacity(w,y,o.MIXED))return w}t.from=function(y,w){return r.isValid(y)?parseInt(y,10):w},t.getCapacity=function(y,w,f){if(!r.isValid(y))throw new Error("Invalid QR Code version");typeof f=="undefined"&&(f=o.BYTE);const b=e.getSymbolTotalCodewords(y),d=n.getTotalCodewordsCount(y,w),m=(b-d)*8;if(f===o.MIXED)return m;const h=m-l(f,y);switch(f){case o.NUMERIC:return Math.floor(h/10*3);case o.ALPHANUMERIC:return Math.floor(h/11*2);case o.KANJI:return Math.floor(h/13);case o.BYTE:default:return Math.floor(h/8)}},t.getBestVersionForData=function(y,w){let f;const b=i.from(w,i.M);if(Array.isArray(y)){if(y.length>1)return v(y,b);if(y.length===0)return 1;f=y[0]}else f=y;return a(f.mode,f.getLength(),b)},t.getEncodedBits=function(y){if(!r.isValid(y)||y<7)throw new Error("Invalid QR Code version");let w=y<<12;for(;e.getBCHDigit(w)-u>=0;)w^=s<=0;)o^=ue<0&&(i=this.data.substr(n),o=parseInt(i,10),e.put(o,r*3+1))};var fn=K;const dn=j,yt=["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 Y(t){this.mode=dn.ALPHANUMERIC,this.data=t}Y.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=yt.indexOf(this.data[n])*45;i+=yt.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(yt.indexOf(this.data[n]),6)};var gn=Y,hn=function(e){for(var n=[],i=e.length,o=0;o=55296&&r<=56319&&i>o+1){var s=e.charCodeAt(o+1);s>=56320&&s<=57343&&(r=(r-55296)*1024+s-56320+65536,o+=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 yn=hn,mn=j;function J(t){this.mode=mn.BYTE,typeof t=="string"&&(t=yn(t)),this.data=new Uint8Array(t)}J.getBitsLength=function(e){return e*8};J.prototype.getLength=function(){return this.data.length};J.prototype.getBitsLength=function(){return J.getBitsLength(this.data.length)};J.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var Cn=q,ce={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,o){var r={},s={};s[i]=0;var u=e.PriorityQueue.make();u.push(i,0);for(var a,l,c,v,p,y,w,f,b;!u.empty();){a=u.pop(),l=a.value,v=a.cost,p=n[l]||{};for(c in p)p.hasOwnProperty(c)&&(y=p[c],w=v+y,f=s[c],b=typeof s[c]=="undefined",(b||f>w)&&(s[c]=w,u.push(c,w),r[c]=l))}if(typeof o!="undefined"&&typeof s[o]=="undefined"){var d=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(d)}return r},extract_shortest_path_from_predecessor_list:function(n,i){for(var o=[],r=i;r;)o.push(r),n[r],r=n[r];return o.reverse(),o},find_path:function(n,i,o){var r=e.single_source_shortest_paths(n,i,o);return e.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,o={},r;n=n||{};for(r in i)i.hasOwnProperty(r)&&(o[r]=i[r]);return o.queue=[],o.sorter=n.sorter||i.default_sorter,o},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var o={value:n,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})(ce);(function(t){const e=j,n=fn,i=gn,o=pn,r=Cn,s=L,u=M,a=ce.exports;function l(d){return unescape(encodeURIComponent(d)).length}function c(d,m,h){const g=[];let C;for(;(C=d.exec(h))!==null;)g.push({data:C[0],index:C.index,mode:m,length:C[0].length});return g}function v(d){const m=c(s.NUMERIC,e.NUMERIC,d),h=c(s.ALPHANUMERIC,e.ALPHANUMERIC,d);let g,C;return u.isKanjiModeEnabled()?(g=c(s.BYTE,e.BYTE,d),C=c(s.KANJI,e.KANJI,d)):(g=c(s.BYTE_KANJI,e.BYTE,d),C=[]),m.concat(h,g,C).sort(function(B,P){return B.index-P.index}).map(function(B){return{data:B.data,mode:B.mode,length:B.length}})}function p(d,m){switch(m){case e.NUMERIC:return n.getBitsLength(d);case e.ALPHANUMERIC:return i.getBitsLength(d);case e.KANJI:return r.getBitsLength(d);case e.BYTE:return o.getBitsLength(d)}}function y(d){return d.reduce(function(m,h){const g=m.length-1>=0?m[m.length-1]:null;return g&&g.mode===h.mode?(m[m.length-1].data+=h.data,m):(m.push(h),m)},[])}function w(d){const m=[];for(let h=0;h=0&&u<=6&&(a===0||a===6)||a>=0&&a<=6&&(u===0||u===6)||u>=2&&u<=4&&a>=2&&a<=4?t.set(r+u,s+a,!0,!0):t.set(r+u,s+a,!1,!0))}}function Pn(t){const e=t.size;for(let n=8;n>u&1)===1,t.set(o,r,s,!0),t.set(r,o,s,!0)}function wt(t,e,n){const i=t.size,o=_n.getEncodedBits(e,n);let r,s;for(r=0;r<15;r++)s=(o>>r&1)===1,r<6?t.set(r,8,s,!0):r<8?t.set(r+1,8,s,!0):t.set(i-15+r,8,s,!0),r<8?t.set(8,i-r-1,s,!0):r<9?t.set(8,15-r-1+1,s,!0):t.set(8,15-r-1,s,!0);t.set(i-8,8,1,!0)}function Rn(t,e){const n=t.size;let i=-1,o=n-1,r=7,s=0;for(let u=n-1;u>0;u-=2)for(u===6&&u--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,u-a)){let l=!1;s>>r&1)===1),t.set(o,u-a,l),r--,r===-1&&(s++,r=7)}if(o+=i,o<0||n<=o){o-=i,i=-i;break}}}function On(t,e,n){const i=new vn;n.forEach(function(a){i.put(a.mode.bit,4),i.put(a.getLength(),Sn.getCharCountIndicator(a.mode,t)),a.write(i)});const o=gt.getSymbolTotalCodewords(t),r=Bt.getTotalCodewordsCount(t,e),s=(o-r)*8;for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const u=(s-i.getLengthInBits())/8;for(let a=0;a=7&&Mn(a,e),Rn(a,s),isNaN(i)&&(i=Et.getBestMask(a,wt.bind(null,a,n))),Et.applyMask(i,a),wt(a,n,i),{modules:a,version:e,errorCorrectionLevel:n,maskPattern:i,segments:o}}Xt.create=function(e,n){if(typeof e=="undefined"||e==="")throw new Error("No input text");let i=mt.M,o,r;return typeof n!="undefined"&&(i=mt.from(n.errorCorrectionLevel,mt.M),o=ut.from(n.version),r=Et.from(n.maskPattern),n.toSJISFunc&>.setToSJISFunction(n.toSJISFunc)),Dn(e,o,i,r)};var fe={},Pt={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(r){return[r,r]}))),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=="undefined"||i.margin===null||i.margin<0?4:i.margin,r=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:r,scale:r?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 r=t.getScale(i,o);return Math.floor((i+o.margin*2)*r)},t.qrToImageData=function(i,o,r){const s=o.modules.size,u=o.modules.data,a=t.getScale(s,r),l=Math.floor((s+r.margin*2)*a),c=r.margin*a,v=[r.color.light,r.color.dark];for(let p=0;p=c&&y>=c&&p0&&a>0&&t[u-1]||(i+=r?bt("M",a+n,.5+l+n):bt("m",o,0),o=0,r=!1),a+1':"",l="',c='viewBox="0 0 '+u+" "+u+'"',v=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",p=''+a+l+` `;return typeof i=="function"&&i(null,p),p};const Un=We,Tt=Xt,ge=fe,kn=de;function It(t,e,n,i,o){const r=[].slice.call(arguments,1),s=r.length,u=typeof r[s-1]=="function";if(!u&&!Un())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(o=n,n=e,e=i=void 0):s===3&&(e.getContext&&typeof o=="undefined"?(o=i,i=void 0):(o=i,i=n,n=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=e,e=i=void 0):s===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(a,l){try{const c=Tt.create(n,i);a(t(c,e,i))}catch(c){l(c)}})}try{const a=Tt.create(n,i);o(null,t(a,e,i))}catch(a){o(a)}}et.create=Tt.create;et.toCanvas=It.bind(null,ge.render);et.toDataURL=It.bind(null,ge.renderToDataURL);et.toString=It.bind(null,function(t,e,n){return kn.render(t,n)});const $n={tag:W.string.validate(t=>["canvas","img"].includes(t)).def("canvas"),text:{type:[String,Array],default:null},options:{type:Object,default:()=>({})},width:W.number.def(200),logo:{type:[String,Object],default:()=>""},disabled:W.bool.def(!1),disabledText:W.string.def("")};var zn=Ht({name:"ReQrcode",props:$n,emits:["done","click","disabled-click"],setup(t,{emit:e}){const{toCanvas:n,toDataURL:i}=et,o=Ot(!0),r=Ot(null),s=Lt(()=>String(t.text)),u=Lt(()=>({width:t.width+"px",height:t.width+"px"})),a=async()=>{await Ce();const f=ve(t.options||{});if(t.tag==="canvas"){f.errorCorrectionLevel=f.errorCorrectionLevel||v(R(s));const b=await c(R(s),f);f.scale=t.width===0?void 0:t.width/b*4;const d=await n(R(r),R(s),f);if(t.logo){const m=await l(d);e("done",m),o.value=!1}else e("done",d.toDataURL()),o.value=!1}else{const b=await i(s.value,{errorCorrectionLevel:"H",width:t.width,...f});R(r).src=b,e("done",b),o.value=!1}};me(()=>s.value,f=>{!f||a()},{deep:!0,immediate:!0});const l=f=>{const b=f.width,d=Object.assign({logoSize:.15,bgColor:"#ffffff",borderSize:.05,crossOrigin:"anonymous",borderRadius:8,logoRadius:0},Dt(t.logo)?{}:t.logo),{logoSize:m=.15,bgColor:h="#ffffff",borderSize:g=.05,crossOrigin:C="anonymous",borderRadius:E=8,logoRadius:B=0}=d,P=Dt(t.logo)?t.logo:t.logo.src,_=b*m,A=b*(1-m)/2,D=b*(m+g),$=b*(1-m-g)/2,T=f.getContext("2d");if(!T)return;p(T)($,$,D,D,E),T.fillStyle=h,T.fill();const Q=new Image;(C||B)&&Q.setAttribute("crossOrigin",C),Q.src=P;const he=G=>{T.drawImage(G,A,A,_,_)},ye=G=>{const rt=document.createElement("canvas");rt.width=A+_,rt.height=A+_;const Mt=rt.getContext("2d");if(!Mt||!T||(Mt.drawImage(G,A,A,_,_),p(T)(A,A,_,_,B),!T))return;const Rt=T.createPattern(rt,"no-repeat");Rt&&(T.fillStyle=Rt,T.fill())};return new Promise(G=>{Q.onload=()=>{B?ye(Q):he(Q),G(f.toDataURL())}})},c=async(f,b)=>{const d=document.createElement("canvas");return await n(d,f,b),d.width},v=f=>f.length>36?"M":f.length>16?"Q":"H",p=f=>(b,d,m,h,g)=>{const C=Math.min(m,h);return g>C/2&&(g=C/2),f.beginPath(),f.moveTo(b+g,d),f.arcTo(b+m,d,b+m,d+h,g),f.arcTo(b+m,d+h,b,d+h,g),f.arcTo(b,d+h,b,d,g),f.arcTo(b,d,b+m,d,g),f.closePath(),f},y=()=>{e("click")},w=()=>{e("disabled-click")};return()=>N(Kt,null,[pe(N("div",{class:"qrcode relative inline-block",style:R(u)},[t.tag==="canvas"?N("canvas",{ref:r,onClick:y},null):N("img",{ref:r,onClick:y},null),t.disabled&&N("div",{class:"qrcode--disabled absolute top-0 left-0 flex w-full h-full items-center justify-center",onClick:w},[N("div",{class:"absolute top-[50%] left-[50%] font-bold"},[N(be,{class:"cursor-pointer",icon:"refresh-right",width:"30",color:"var(--el-color-primary)"},null),N("div",null,[t.disabledText])])])]),[[we("loading"),R(o)]])])}});const Vn=Ee(zn),Hn=Se("p",{class:"text-gray-500 text-xs"},'\u626B\u7801\u540E\u70B9\u51FB"\u786E\u8BA4"\uFF0C\u5373\u53EF\u5B8C\u6210\u767B\u5F55',-1),Kn=Ne(" \u8FD4\u56DE "),Yn=Ht({__name:"qrCode",setup(t){return(e,n)=>{const i=Ft("el-divider"),o=Ft("el-button");return Te(),Ae(Kt,null,[N(R(ht),{class:"-mt-2 -mb-2"},{default:x(()=>[N(R(Vn),{text:"\u6A21\u62DF\u6D4B\u8BD5"})]),_:1}),N(R(ht),{delay:100},{default:x(()=>[N(i,null,{default:x(()=>[Hn]),_:1})]),_:1}),N(R(ht),{delay:150},{default:x(()=>[N(o,{class:"w-full mt-4",onClick:n[0]||(n[0]=r=>R(_e)().SET_CURRENTPAGE(0))},{default:x(()=>[Kn]),_:1})]),_:1})],64)}}});var Gn=Be(Yn,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/login/components/qrCode.vue"]]);export{Gn as default};