import{o as e,c as t,w as o,d as r,t as i,n,j as a,k as s,h as u,l,u as d,p as c,s as h,q as g,v as p,x as m,y as f,z as v,A as y,$ as b,B as C,C as k,D as w,b as I,E as S,G as A,H as O,i as D,g as T,m as P,a as M,r as B,I as E,J as z,K as x,L}from"./index-ESTWQ1DK.js";import{_ as j}from"./my-topbar.8HnIktHp.js";import{r as N}from"./uni-app.es.B2O8FBxl.js";import{_ as R}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{t as q}from"./tools.CwkibfPM.js";import{c as Y}from"./card.BCVRIhIx.js";import{p as F}from"./define.C1V5zl3Q.js";import{d as G,c as H,e as W,f as Q,g as X}from"./api.BMgalDqr.js";import"./uni-icons.CCSIFyQK.js";const Z=R({name:"UniTag",emits:["click"],props:{type:{type:String,default:"default"},size:{type:String,default:"normal"},text:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},inverted:{type:[Boolean,String],default:!1},circle:{type:[Boolean,String],default:!1},mark:{type:[Boolean,String],default:!1},customStyle:{type:String,default:""}},computed:{classes(){const{type:e,disabled:t,inverted:o,circle:r,mark:i,size:n,isTrue:a}=this;return["uni-tag--"+e,"uni-tag--"+n,a(t)?"uni-tag--disabled":"",a(o)?"uni-tag--"+e+"--inverted":"",a(r)?"uni-tag--circle":"",a(i)?"uni-tag--mark":"",a(o)?"uni-tag--inverted uni-tag-text--"+e:"","small"===n?"uni-tag-text--small":""].join(" ")}},methods:{isTrue:e=>!0===e||"true"===e,onClick(){this.isTrue(this.disabled)||this.$emit("click")}}},[["render",function(l,d,c,h,g,p){const m=u;return c.text?(e(),t(m,{key:0,class:n(["uni-tag",p.classes]),style:a(c.customStyle),onClick:p.onClick},{default:o((()=>[r(i(c.text),1)])),_:1},8,["class","style","onClick"])):s("",!0)}],["__scopeId","data-v-9f3c5d16"]]),K={props:{value:{type:[String,Number]},options:{type:Object,default:()=>({})},size:{type:[String,Number],default:200},fileType:{type:String,default:"png"},start:{type:Boolean,default:!0},auto:{type:Boolean,default:!0},hide:{type:Boolean,default:!1},type:{type:String,default:()=>"normal"},queue:{type:Boolean,default:!1},isQueueLoadImage:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},h5SaveIsDownload:{type:Boolean,default:!1},h5DownloadName:{type:String,default:"uvQRCode"},h5SaveTip:{type:Boolean,default:!0}}};function $(e){return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(e)}function J(e){switch(typeof e){case"undefined":return!0;case"string":if(0==e.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case"boolean":if(!e)return!0;break;case"number":if(0===e||isNaN(e))return!0;break;case"object":if(null===e||0===e.length)return!0;for(const t in e)return!1;return!0}return!1}function _(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function U(e){return"[object Object]"===Object.prototype.toString.call(e)}function V(e){return"function"==typeof e}const ee=Object.freeze(Object.defineProperty({__proto__:null,amount:function(e){return/^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(e)},array:_,carNo:function(e){const t=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/,o=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;return 7===e.length?o.test(e):8===e.length&&t.test(e)},chinese:function(e){return/^[\u4e00-\u9fa5]+$/gi.test(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)},contains:function(e,t){return e.indexOf(t)>=0},date:function(e){return!!e&&($(e)&&(e=+e),!/Invalid|NaN/.test(new Date(e).toString()))},dateISO:function(e){return/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},digits:function(e){return/^\d+$/.test(e)},email:function(e){return/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e)},empty:J,enOrNum:function(e){return/^[0-9a-zA-Z]*$/g.test(e)},func:V,idCard:function(e){return/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e)},image:function(e){const t=e.split("?")[0];return/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i.test(t)},jsonString:function(e){if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(t){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},letter:function(e){return/^[a-zA-Z]*$/.test(e)},mobile:function(e){return/^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(e)},number:$,object:U,promise:function(e){return U(e)&&V(e.then)&&V(e.catch)},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},regExp:function(e){return e&&"[object RegExp]"===Object.prototype.toString.call(e)},string:function(e){return"string"==typeof e},url:function(e){return/^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(e)},video:function(e){return/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i.test(e)}},Symbol.toStringTag,{value:"Module"}));function te(e,t=15){return+parseFloat(Number(e).toPrecision(t))}function oe(e){const t=e.toString().split(/[eE]/),o=(t[0].split(".")[1]||"").length-+(t[1]||0);return o>0?o:0}function re(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));const t=oe(e);return t>0?te(Number(e)*Math.pow(10,t)):Number(e)}function ie(e){(e>Number.MAX_SAFE_INTEGER||e{n=t(n,e)})),n}function ae(...e){if(e.length>2)return ne(e,ae);const[t,o]=e,r=re(t),i=re(o),n=oe(t)+oe(o),a=r*i;return ie(a),a/Math.pow(10,n)}function se(...e){if(e.length>2)return ne(e,se);const[t,o]=e,r=re(t),i=re(o);return ie(r),ie(i),ae(r/i,te(Math.pow(10,oe(o)-oe(t))))}function ue(e){let t=this.$parent;for(;t;){if(!t.$options||t.$options.name===e)return t;t=t.$parent}return!1}function le(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let o;if(e instanceof Date)o=new Date(e.getTime());else if(e instanceof RegExp)o=new RegExp(e);else if(e instanceof Map)o=new Map(Array.from(e,(([e,o])=>[e,le(o,t)])));else if(e instanceof Set)o=new Set(Array.from(e,(e=>le(e,t))));else if(Array.isArray(e))o=e.map((e=>le(e,t)));else if("[object Object]"===Object.prototype.toString.call(e)){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);for(const[r,i]of Object.entries(e))o[r]=le(i,t)}else o=Object.assign({},e);return t.set(e,o),o}function de(e={},t={}){if("object"!=typeof(e=le(e))||null===e||"object"!=typeof t||null===t)return e;const o=Array.isArray(e)?e.slice():Object.assign({},e);for(const r in t){if(!t.hasOwnProperty(r))continue;const e=t[r],i=o[r];e instanceof Date?o[r]=new Date(e):e instanceof RegExp?o[r]=new RegExp(e):e instanceof Map?o[r]=new Map(e):e instanceof Set?o[r]=new Set(e):o[r]="object"==typeof e&&null!==e?de(i,e):e}return o}function ce(e=null,t="yyyy-mm-dd"){let o;o=e?/^\d{10}$/.test(null==e?void 0:e.toString().trim())?new Date(1e3*e):"string"==typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):"string"==typeof e&&e.includes("-")&&!e.includes("T")?new Date(e.replace(/-/g,"/")):new Date(e):new Date;const r={y:o.getFullYear().toString(),m:(o.getMonth()+1).toString().padStart(2,"0"),d:o.getDate().toString().padStart(2,"0"),h:o.getHours().toString().padStart(2,"0"),M:o.getMinutes().toString().padStart(2,"0"),s:o.getSeconds().toString().padStart(2,"0")};for(const i in r){const[e]=new RegExp(`${i}+`).exec(t)||[];if(e){const o="y"===i&&2===e.length?2:0;t=t.replace(e,r[i].slice(o))}}return t}function he(e,t="both"){return e=String(e),"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e}function ge(e={},t=!0,o="brackets"){const r=t?"?":"",i=[];-1==["indices","brackets","repeat","comma"].indexOf(o)&&(o="brackets");for(const n in e){const t=e[n];if(!(["",void 0,null].indexOf(t)>=0))if(t.constructor===Array)switch(o){case"indices":for(let o=0;o{i.push(`${n}[]=${e}`)}));break;case"repeat":t.forEach((e=>{i.push(`${n}=${e}`)}));break;case"comma":let e="";t.forEach((t=>{e+=(e?",":"")+t})),i.push(`${n}=${e}`)}else i.push(`${n}=${t}`)}return i.length?r+i.join("&"):""}function pe(){var e;const t=l(),o=null==(e=t[t.length-1])?void 0:e.route;return`/${o||""}`}String.prototype.padStart||(String.prototype.padStart=function(e,t=" "){if("[object String]"!==Object.prototype.toString.call(t))throw new TypeError("fillString must be String");const o=this;if(o.length>=e)return String(o);const r=e-o.length;let i=Math.ceil(r/t.length);for(;i>>=1;)t+=t,1===i&&(t+=t);return t.slice(0,r)+o});const me=Object.freeze(Object.defineProperty({__proto__:null,$parent:ue,addStyle:function(e,t="object"){if(J(e)||"object"==typeof e&&"object"===t||"string"===t&&"string"==typeof e)return e;if("object"===t){const t=(e=he(e)).split(";"),o={};for(let e=0;e{return null==(e=null==(t=null==uni?void 0:uni.$uv)?void 0:t.config)?void 0:e.unit;var t})()?(e=>{return null==(e=null==(t=null==uni?void 0:uni.$uv)?void 0:t.config)?void 0:e.unit;var t})():"px")){return $(e=String(e))?`${e}${t}`:e},deepClone:le,deepMerge:de,error:function(e){},formValidate:function(e,t){const o=ue.call(e,"uv-form-item"),r=ue.call(e,"uv-form");o&&r&&r.validateField(o.prop,(()=>{}),t)},getDuration:function(e,t=!0){const o=parseInt(e);return t?/s$/.test(e)?e:e>30?`${e}ms`:`${e}s`:/ms$/.test(e)?o:/s$/.test(e)?o>30?o:1e3*o:o},getHistoryPage:function(e=0){const t=l();return t[t.length-1+e]},getProperty:function(e,t){if(e){if("string"!=typeof t||""===t)return"";if(-1!==t.indexOf(".")){const o=t.split(".");let r=e[o[0]]||{};for(let e=1;e=0&&t>0&&t>=e){const o=t-e+1;return Math.floor(Math.random()*o+e)}return 0},randomArray:function(e=[]){return e.sort((()=>Math.random()-.5))},range:function(e=0,t=0,o=0){return Math.max(e,Math.min(t,Number(o)))},setConfig:function({props:e={},config:t={},color:o={},zIndex:r={}}){const{deepMerge:i}=uni.$uv;uni.$uv.config=i(uni.$uv.config,t),uni.$uv.props=i(uni.$uv.props,e),uni.$uv.color=i(uni.$uv.color,o),uni.$uv.zIndex=i(uni.$uv.zIndex,r)},setProperty:function(e,t,o){if(!e)return;const r=function(e,t,o){if(1!==t.length)for(;t.length>1;){const i=t[0];e[i]&&"object"==typeof e[i]||(e[i]={}),t.shift(),r(e[i],t,o)}else e[t[0]]=o};if("string"!=typeof t||""===t);else if(-1!==t.indexOf(".")){const i=t.split(".");r(e,i,o)}else e[t]=o},sleep:function(e=30){return new Promise((t=>{setTimeout((()=>{t()}),e)}))},sys:function(){return c()},timeFormat:ce,timeFrom:function(e=null,t="yyyy-mm-dd"){null==e&&(e=Number(new Date)),10==(e=parseInt(e)).toString().length&&(e*=1e3);let o=(new Date).getTime()-e;o=parseInt(o/1e3);let r="";switch(!0){case o<300:r="刚刚";break;case o>=300&&o<3600:r=`${parseInt(o/60)}分钟前`;break;case o>=3600&&o<86400:r=`${parseInt(o/3600)}小时前`;break;case o>=86400&&o<2592e3:r=`${parseInt(o/86400)}天前`;break;default:r=!1===t?o>=2592e3&&o<31536e3?`${parseInt(o/2592e3)}个月前`:`${parseInt(o/31536e3)}年前`:ce(e,t)}return r},toast:function(e,t=2e3){h({title:String(e),icon:"none",duration:t})},trim:he,type2icon:function(e="success",t=!1){-1==["primary","info","error","warning","success"].indexOf(e)&&(e="success");let o="";switch(e){case"primary":case"info":o="info-circle";break;case"error":o="close-circle";break;case"warning":o="error-circle";break;default:o="checkmark-circle"}return t&&(o+="-fill"),o}},Symbol.toStringTag,{value:"Module"}));const fe=(new class{constructor(){this.config={type:"navigateTo",url:"",delta:1,params:{},animationType:"pop-in",animationDuration:300,intercept:!1,events:{}},this.route=this.route.bind(this)}addRootPath(e){return"/"===e[0]?e:`/${e}`}mixinParam(e,t){e=e&&this.addRootPath(e);let o="";return/.*\/.*\?.*=.*/.test(e)?(o=ge(t,!1),e+`&${o}`):(o=ge(t),e+o)}async route(e={},t={}){let o={};if("string"==typeof e?(o.url=this.mixinParam(e,t),o.type="navigateTo"):(o=de(this.config,e),o.url=this.mixinParam(e.url,e.params)),o.url!==pe())if(t.intercept&&(o.intercept=t.intercept),o.params=t,o=de(this.config,o),"function"==typeof o.intercept){await new Promise(((e,t)=>{o.intercept(o,e)}))&&this.openPage(o)}else this.openPage(o)}openPage(e){const{url:t,type:o,delta:r,animationType:i,animationDuration:n,events:a}=e;"navigateTo"!=e.type&&"to"!=e.type||g({url:t,animationType:i,animationDuration:n,events:a}),"redirectTo"!=e.type&&"redirect"!=e.type||p({url:t}),"switchTab"!=e.type&&"tab"!=e.type||m({url:t}),"reLaunch"!=e.type&&"launch"!=e.type||f({url:t}),"navigateBack"!=e.type&&"back"!=e.type||v({delta:r})}}).route;let ve,ye=null;function be(e,t=500,o=!1){if(null!==ye&&clearTimeout(ye),o){const o=!ye;ye=setTimeout((()=>{ye=null}),t),o&&"function"==typeof e&&e()}else ye=setTimeout((()=>{"function"==typeof e&&e()}),t)}function Ce(e,t=500,o=!0){o?ve||(ve=!0,"function"==typeof e&&e(),setTimeout((()=>{ve=!1}),t)):ve||(ve=!0,setTimeout((()=>{ve=!1,"function"==typeof e&&e()}),t))}const ke={props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"}},data:()=>({}),onLoad(){this.$uv.getRect=this.$uvGetRect},created(){this.$uv.getRect=this.$uvGetRect},computed:{$uv(){var e,t;return{...me,test:ee,route:fe,debounce:be,throttle:Ce,unit:null==(t=null==(e=null==uni?void 0:uni.$uv)?void 0:e.config)?void 0:t.unit}},bem:()=>function(e,t,o){const r=`uv-${e}--`,i={};return t&&t.map((e=>{i[r+this[e]]=!0})),o&&o.map((e=>{this[e]?i[r+e]=this[e]:delete i[r+e]})),Object.keys(i)}},methods:{openPage(e="url"){const t=this[e];t&&uni[this.linkType]({url:t})},$uvGetRect(e,t){return new Promise((o=>{y().in(this)[t?"selectAll":"select"](e).boundingClientRect((e=>{t&&Array.isArray(e)&&e.length&&o(e),!t&&e&&o(e)})).exec()}))},getParentData(e=""){this.parent||(this.parent={}),this.parent=this.$uv.$parent.call(this,e),this.parent.children&&-1===this.parent.children.indexOf(this)&&this.parent.children.push(this),this.parent&&this.parentData&&Object.keys(this.parentData).map((e=>{this.parentData[e]=this.parent[e]}))},preventEvent(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()},noop(e){this.preventEvent(e)}},onReachBottom(){b("uvOnReachBottom")},beforeDestroy(){if(this.parent&&_(this.parent.children)){const e=this.parent.children;e.map(((t,o)=>{t===this&&e.splice(o,1)}))}},unmounted(){if(this.parent&&_(this.parent.children)){const e=this.parent.children;e.map(((t,o)=>{t===this&&e.splice(o,1)}))}}};function we(e){this.mode=Se.MODE_8BIT_BYTE,this.data=e}function Ie(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}we.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=Ie.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var o=-1;o<=7;o++)if(!(e+o<=-1||this.moduleCount<=e+o))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+o][t+r]=0<=o&&o<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==o||6==o)||2<=o&&o<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var e=0,t=0,o=0;o<8;o++){this.makeImpl(!0,o);var r=Oe.getLostPoint(this);(0==o||e>r)&&(e=r,t=o)}return t},createMovieClip:function(e,t,o){var r=e.createEmptyMovieClip(t,o);this.make();for(var i=0;i>o&1);this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=r}for(o=0;o<18;o++)r=!e&&1==(t>>o&1),this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=r},setupTypeInfo:function(e,t){for(var o=this.errorCorrectLevel<<3|t,r=Oe.getBCHTypeInfo(o),i=0;i<15;i++){var n=!e&&1==(r>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(i=0;i<15;i++)n=!e&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var o=-1,r=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[r][a-s]){var u=!1;n>>i&1)),Oe.getMask(t,r,a-s)&&(u=!u),this.modules[r][a-s]=u,-1==--i&&(n++,i=7)}if((r+=o)<0||this.moduleCount<=r){r-=o,o=-o;break}}}},Ie.PAD0=236,Ie.PAD1=17,Ie.createData=function(e,t,o){for(var r=Me.getRSBlocks(e,t),i=new Be,n=0;n8*s)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*s+")");for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*s||(i.put(Ie.PAD0,8),i.getLengthInBits()>=8*s));)i.put(Ie.PAD1,8);return Ie.createBytes(i,r)},Ie.createBytes=function(e,t){for(var o=0,r=0,i=0,n=new Array(t.length),a=new Array(t.length),s=0;s=0?h.get(g):0}}var p=0;for(d=0;d=0;)t^=Oe.G15<=0;)t^=Oe.G18<>>=1;return t},getPatternPosition:function(e){return Oe.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,o){switch(e){case 0:return(t+o)%2==0;case 1:return t%2==0;case 2:return o%3==0;case 3:return(t+o)%3==0;case 4:return(Math.floor(t/2)+Math.floor(o/3))%2==0;case 5:return t*o%2+t*o%3==0;case 6:return(t*o%2+t*o%3)%2==0;case 7:return(t*o%3+(t+o)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new Pe([1],0),o=0;o5&&(o+=3+n-5)}for(r=0;r=256;)e-=255;return De.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Te=0;Te<8;Te++)De.EXP_TABLE[Te]=1<r,set(e){r=Number(e)}},typeNumber:{get:()=>i,set(e){i=Number(e)}},margin:{get:()=>n,set(e){n=Number(e)}},backgroundImageWidth:{get(){return void 0===a?this.dynamicSize:this.useDynamicSize?this.dynamicSize/this.size*a:a},set(e){a=Number(e)}},backgroundImageHeight:{get(){return void 0===s?this.dynamicSize:this.useDynamicSize?this.dynamicSize/this.size*s:s},set(e){s=Number(e)}},backgroundImageX:{get(){return void 0===u?0:this.useDynamicSize?this.dynamicSize/this.size*u:u},set(e){u=Number(e)}},backgroundImageY:{get(){return void 0===l?0:this.useDynamicSize?this.dynamicSize/this.size*l:l},set(e){l=Number(e)}},backgroundPadding:{get:()=>d,set(e){d=e>1?1:e<0?0:e}},foregroundImageWidth:{get(){return void 0===c?(this.dynamicSize-2*this.margin)/4:this.useDynamicSize?this.dynamicSize/this.size*c:c},set(e){c=Number(e)}},foregroundImageHeight:{get(){return void 0===h?(this.dynamicSize-2*this.margin)/4:this.useDynamicSize?this.dynamicSize/this.size*h:h},set(e){h=Number(e)}},foregroundImageX:{get(){return void 0===g?this.dynamicSize/2-this.foregroundImageWidth/2:this.useDynamicSize?this.dynamicSize/this.size*g:g},set(e){g=Number(e)}},foregroundImageY:{get(){return void 0===p?this.dynamicSize/2-this.foregroundImageHeight/2:this.useDynamicSize?this.dynamicSize/this.size*p:p},set(e){p=Number(e)}},foregroundImagePadding:{get(){return this.useDynamicSize?this.dynamicSize/this.size*m:m},set(e){m=Number(e)}},foregroundImageBorderRadius:{get(){return this.useDynamicSize?this.dynamicSize/this.size*f:f},set(e){f=Number(e)}},foregroundImageShadowOffsetX:{get(){return this.useDynamicSize?this.dynamicSize/this.size*v:v},set(e){v=Number(e)}},foregroundImageShadowOffsetY:{get(){return this.useDynamicSize?this.dynamicSize/this.size*y:y},set(e){y=Number(e)}},foregroundImageShadowBlur:{get(){return this.useDynamicSize?this.dynamicSize/this.size*b:b},set(e){b=Number(e)}},foregroundPadding:{get:()=>C,set(e){C=e>1?1:e<0?0:e}},positionProbeBackgroundColor:{get(){return k||this.backgroundColor},set(e){k=e}},positionProbeForegroundColor:{get(){return w||this.foregroundColor},set(e){w=e}},separatorColor:{get(){return I||this.backgroundColor},set(e){I=e}},positionAdjustBackgroundColor:{get(){return S||this.backgroundColor},set(e){S=e}},positionAdjustForegroundColor:{get(){return A||this.foregroundColor},set(e){A=e}},timingBackgroundColor:{get(){return O||this.backgroundColor},set(e){O=e}},timingForegroundColor:{get(){return D||this.foregroundColor},set(e){D=e}},typeNumberBackgroundColor:{get(){return T||this.backgroundColor},set(e){T=e}},typeNumberForegroundColor:{get(){return P||this.foregroundColor},set(e){P=e}},darkBlockColor:{get(){return M||this.foregroundColor},set(e){M=e}},canvasContext:{get(){if(void 0===B)throw console.error("[uQRCode]: use drawCanvas, you need to set the canvasContext!"),new ze.Error("use drawCanvas, you need to set the canvasContext!");return B},set(e){B=Ee(e)}}}),ze.plugins.forEach((e=>e(ze,this,!1))),e&&this.setOptions(e),t&&(this.canvasContext=Ee(t))}function xe(){let e=this.waitingQueue=[],t=this.isRunning=!1;function o(r,i,n){r().then((e=>{i(e)})).catch((e=>{n(e)})).finally((()=>{if(e.length){const t=e.shift();o(t.task,t.resolve,t.reject)}else t=!1}))}this.exec=function(r){return new Promise(((i,n)=>{t?e.push({task:r,resolve:i,reject:n}):(t=!0,o(r,i,n))}))}}Pe.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),o=0;o>>7-e%8&1)},put:function(e,t){for(var o=0;o>>t-o-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++}},Ie.errorCorrectLevel=Ae,ze.errorCorrectLevel=Ie.errorCorrectLevel,ze.Error=function(e){this.errMsg="[uQRCode]: "+e},ze.plugins=[],ze.use=function(e){"function"==typeof e&&ze.plugins.push(e)},ze.prototype.loadImage=function(e){return Promise.resolve(e)},ze.prototype.setOptions=function(e){var t,o,r,i,n,a,s,u,l,d,c,h,g,p,m,f,v,y,b,C,k,w,I,S,A,O,D,T,P,M,B,E,z,x,L,j,N,R,q,Y,F,G,H,W,Q,X,Z,K,$,J,_,U,V,ee,te,oe;e&&(Object.keys(e).forEach((t=>{this[t]=e[t]})),function(e={},t={},o=!1){let r;r=o?e:{...e};for(let n in t){var i=t[n];null!=i&&(i.constructor==Object?r[n]=this.deepReplace(r[n],i):i.constructor!=String||i?r[n]=i:r[n]=r[n])}}(this,{data:e.data||e.text,size:e.size,useDynamicSize:e.useDynamicSize,typeNumber:e.typeNumber,errorCorrectLevel:e.errorCorrectLevel,margin:e.margin,areaColor:e.areaColor,backgroundColor:e.backgroundColor||(null===(t=e.background)||void 0===t?void 0:t.color),backgroundImageSrc:e.backgroundImageSrc||(null===(o=e.background)||void 0===o||null===(r=o.image)||void 0===r?void 0:r.src),backgroundImageWidth:e.backgroundImageWidth||(null===(i=e.background)||void 0===i||null===(n=i.image)||void 0===n?void 0:n.width),backgroundImageHeight:e.backgroundImageHeight||(null===(a=e.background)||void 0===a||null===(s=a.image)||void 0===s?void 0:s.height),backgroundImageX:e.backgroundImageX||(null===(u=e.background)||void 0===u||null===(l=u.image)||void 0===l?void 0:l.x),backgroundImageY:e.backgroundImageY||(null===(d=e.background)||void 0===d||null===(c=d.image)||void 0===c?void 0:c.y),backgroundImageAlpha:e.backgroundImageAlpha||(null===(h=e.background)||void 0===h||null===(g=h.image)||void 0===g?void 0:g.alpha),backgroundImageBorderRadius:e.backgroundImageBorderRadius||(null===(p=e.background)||void 0===p||null===(m=p.image)||void 0===m?void 0:m.borderRadius),backgroundPadding:e.backgroundPadding,foregroundColor:e.foregroundColor||(null===(f=e.foreground)||void 0===f?void 0:f.color),foregroundImageSrc:e.foregroundImageSrc||(null===(v=e.foreground)||void 0===v||null===(y=v.image)||void 0===y?void 0:y.src),foregroundImageWidth:e.foregroundImageWidth||(null===(b=e.foreground)||void 0===b||null===(C=b.image)||void 0===C?void 0:C.width),foregroundImageHeight:e.foregroundImageHeight||(null===(k=e.foreground)||void 0===k||null===(w=k.image)||void 0===w?void 0:w.height),foregroundImageX:e.foregroundImageX||(null===(I=e.foreground)||void 0===I||null===(S=I.image)||void 0===S?void 0:S.x),foregroundImageY:e.foregroundImageY||(null===(A=e.foreground)||void 0===A||null===(O=A.image)||void 0===O?void 0:O.y),foregroundImagePadding:e.foregroundImagePadding||(null===(D=e.foreground)||void 0===D||null===(T=D.image)||void 0===T?void 0:T.padding),foregroundImageBackgroundColor:e.foregroundImageBackgroundColor||(null===(P=e.foreground)||void 0===P||null===(M=P.image)||void 0===M?void 0:M.backgroundColor),foregroundImageBorderRadius:e.foregroundImageBorderRadius||(null===(B=e.foreground)||void 0===B||null===(E=B.image)||void 0===E?void 0:E.borderRadius),foregroundImageShadowOffsetX:e.foregroundImageShadowOffsetX||(null===(z=e.foreground)||void 0===z||null===(x=z.image)||void 0===x?void 0:x.shadowOffsetX),foregroundImageShadowOffsetY:e.foregroundImageShadowOffsetY||(null===(L=e.foreground)||void 0===L||null===(j=L.image)||void 0===j?void 0:j.shadowOffsetY),foregroundImageShadowBlur:e.foregroundImageShadowBlur||(null===(N=e.foreground)||void 0===N||null===(R=N.image)||void 0===R?void 0:R.shadowBlur),foregroundImageShadowColor:e.foregroundImageShadowColor||(null===(q=e.foreground)||void 0===q||null===(Y=q.image)||void 0===Y?void 0:Y.shadowColor),foregroundPadding:e.foregroundPadding,positionProbeBackgroundColor:e.positionProbeBackgroundColor||(null===(F=e.positionProbe)||void 0===F?void 0:F.backgroundColor)||(null===(G=e.positionDetection)||void 0===G?void 0:G.backgroundColor),positionProbeForegroundColor:e.positionProbeForegroundColor||(null===(H=e.positionProbe)||void 0===H?void 0:H.foregroundColor)||(null===(W=e.positionDetection)||void 0===W?void 0:W.foregroundColor),separatorColor:e.separatorColor||(null===(Q=e.separator)||void 0===Q?void 0:Q.color),positionAdjustBackgroundColor:e.positionAdjustBackgroundColor||(null===(X=e.positionAdjust)||void 0===X?void 0:X.backgroundColor)||(null===(Z=e.alignment)||void 0===Z?void 0:Z.backgroundColor),positionAdjustForegroundColor:e.positionAdjustForegroundColor||(null===(K=e.positionAdjust)||void 0===K?void 0:K.foregroundColor)||(null===($=e.alignment)||void 0===$?void 0:$.foregroundColor),timingBackgroundColor:e.timingBackgroundColor||(null===(J=e.timing)||void 0===J?void 0:J.backgroundColor),timingForegroundColor:e.timingForegroundColor||(null===(_=e.timing)||void 0===_?void 0:_.foregroundColor),typeNumberBackgroundColor:e.typeNumberBackgroundColor||(null===(U=e.typeNumber)||void 0===U?void 0:U.backgroundColor)||(null===(V=e.versionInformation)||void 0===V?void 0:V.backgroundColor),typeNumberForegroundColor:e.typeNumberForegroundColor||(null===(ee=e.typeNumber)||void 0===ee?void 0:ee.foregroundColor)||(null===(te=e.versionInformation)||void 0===te?void 0:te.foregroundColor),darkBlockColor:e.darkBlockColor||(null===(oe=e.darkBlock)||void 0===oe?void 0:oe.color)},!0))},ze.prototype.make=function(){let{foregroundColor:e,backgroundColor:t,typeNumber:o,errorCorrectLevel:r,data:i,size:n,margin:a,useDynamicSize:s}=this;if(e===t)throw console.error("[uQRCode]: foregroundColor and backgroundColor cannot be the same!"),new ze.Error("foregroundColor and backgroundColor cannot be the same!");var u=new Ie(o,r);u.addData(function(e){e=e.toString();for(var t,o="",r=0;r=1&&t<=127?o+=e.charAt(r):t>2047?(o+=String.fromCharCode(224|t>>12&15),o+=String.fromCharCode(128|t>>6&63),o+=String.fromCharCode(128|t>>0&63)):(o+=String.fromCharCode(192|t>>6&31),o+=String.fromCharCode(128|t>>0&63));return o}(i)),u.make(),this.base=u,this.typeNumber=u.typeNumber,this.modules=u.modules,this.moduleCount=u.moduleCount,this.dynamicSize=s?Math.ceil((n-2*a)/u.moduleCount)*u.moduleCount+2*a:n,function(e){let{dynamicSize:t,margin:o,backgroundColor:r,backgroundPadding:i,foregroundColor:n,foregroundPadding:a,modules:s,moduleCount:u}=e,l=(t-2*o)/u,d=l,c=0;i>0&&(c=d*i/2,d-=2*c);let h=l,g=0;a>0&&(g=h*a/2,h-=2*g);for(var p=0;p{var o=t[e[0]][e[1]],a=t[e[0]+n][e[1]],s=t[e[0]][e[1]+n];s.type.push("positionProbe"),a.type.push("positionProbe"),o.type.push("positionProbe"),o.color=1==e[2]?i:r,a.color=1==e[2]?i:r,s.color=1==e[2]?i:r}))}(this),function(e){let{modules:t,moduleCount:o,separatorColor:r}=e;[[7,0],[7,1],[7,2],[7,3],[7,4],[7,5],[7,6],[7,7],[0,7],[1,7],[2,7],[3,7],[4,7],[5,7],[6,7]].forEach((e=>{var i=t[e[0]][e[1]],n=t[o-e[0]-1][e[1]],a=t[e[0]][o-e[1]-1];a.type.push("separator"),n.type.push("separator"),i.type.push("separator"),i.color=r,n.color=r,a.color=r}))}(this),function(e){let{typeNumber:t,modules:o,moduleCount:r,foregroundColor:i,backgroundColor:n,positionAdjustForegroundColor:a,positionAdjustBackgroundColor:s,timingForegroundColor:u,timingBackgroundColor:l}=e;const d=[[],[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]][t-1];if(d){const e=[[-2,-2,1],[-1,-2,1],[0,-2,1],[1,-2,1],[2,-2,1],[-2,-1,1],[-1,-1,0],[0,-1,0],[1,-1,0],[2,-1,1],[-2,0,1],[-1,0,0],[0,0,1],[1,0,0],[2,0,1],[-2,1,1],[-1,1,0],[0,1,0],[1,1,0],[2,1,1],[-2,2,1],[-1,2,1],[0,2,1],[1,2,1],[2,2,1]],t=d.length;for(let c=0;cr-9-1&&g<9||g>r-9-1&&t<9||e.forEach((e=>{var r=o[t+e[0]][g+e[1]];r.type.push("positionAdjust"),r.type.includes("timing")?1==e[2]?r.color=a==i?u:a:r.color=a==i&&s==n?l:s:r.color=1==e[2]?a:s}))}}}(this),function(e){let{modules:t,moduleCount:o,timingForegroundColor:r,timingBackgroundColor:i}=e,n=o-16;for(let u=0;u{var r=o[e[0]][e[1]];r.type.push("typeNumber"),r.color="1"==s[t]?n:i}))}(this),this.isMaked=!0,this.drawModules=[]},ze.prototype.getDrawModules=function(){if(this.drawModules&&this.drawModules.length>0)return this.drawModules;let e=this.drawModules=[],{modules:t,moduleCount:o,dynamicSize:r,areaColor:i,backgroundImageSrc:n,backgroundImageX:a,backgroundImageY:s,backgroundImageWidth:u,backgroundImageHeight:l,backgroundImageAlpha:d,backgroundImageBorderRadius:c,foregroundImageSrc:h,foregroundImageX:g,foregroundImageY:p,foregroundImageWidth:m,foregroundImageHeight:f,foregroundImagePadding:v,foregroundImageBackgroundColor:y,foregroundImageBorderRadius:b,foregroundImageShadowOffsetX:C,foregroundImageShadowOffsetY:k,foregroundImageShadowBlur:w,foregroundImageShadowColor:I}=this;i&&e.push({name:"area",type:"area",color:i,x:0,y:0,width:r,height:r}),n&&e.push({name:"backgroundImage",type:"image",imageSrc:n,mappingName:"backgroundImageSrc",x:a,y:s,width:u,height:l,alpha:d,borderRadius:c});for(var S=0;Se||0>t||e>=o||t>=o)&&this.modules[e][t].isBlack},ze.prototype.drawCanvas=function(){let{isMaked:e,canvasContext:t,useDynamicSize:o,dynamicSize:r,foregroundColor:i,foregroundPadding:n,backgroundColor:a,backgroundPadding:s,drawReserve:u,margin:l}=this;if(!e)return console.error("[uQRCode]: please execute the make method first!"),Promise.reject(new ze.Error("please execute the make method first!"));let d=this.getDrawModules(),c=async(e,o)=>{try{t.clearRect(0,0,r,r),t.draw(!1);for(var i=0;i0&&(t.beginPath(),t.moveTo(a+g,s),t.arcTo(a+l,s,a+l,s+c,g),t.arcTo(a+l,s+c,a,s+c,g),t.arcTo(a,s+c,a,s,g),t.arcTo(a,s,a+l,s,g),t.closePath(),t.setStrokeStyle("rgba(0,0,0,0)"),t.stroke(),t.clip());try{var h=await this.loadImage(n.imageSrc);t.drawImage(h,a,s,l,c)}catch(C){throw console.error(`[uQRCode]: ${n.mappingName} invalid!`),new ze.Error(`${n.mappingName} invalid!`)}}else if("foregroundImage"===n.name){a=Math.round(n.x),s=Math.round(n.y),l=Math.round(n.width),c=Math.round(n.height);var g,p=Math.round(n.padding);l<2*(g=Math.round(n.borderRadius))&&(g=l/2),c<2*g&&(g=c/2);var m=a-p,f=s-p,v=l+2*p,y=c+2*p,b=Math.round(v/l*g);v<2*b&&(b=v/2),y<2*b&&(b=y/2),t.save(),t.setShadow(n.shadowOffsetX,n.shadowOffsetY,n.shadowBlur,n.shadowColor),b>0?(t.beginPath(),t.moveTo(m+b,f),t.arcTo(m+v,f,m+v,f+y,b),t.arcTo(m+v,f+y,m,f+y,b),t.arcTo(m,f+y,m,f,b),t.arcTo(m,f,m+v,f,b),t.closePath(),t.setFillStyle(n.backgroundColor),t.fill()):(t.setFillStyle(n.backgroundColor),t.fillRect(m,f,v,y)),t.restore(),t.save(),b>0?(t.beginPath(),t.moveTo(m+b,f),t.arcTo(m+v,f,m+v,f+y,b),t.arcTo(m+v,f+y,m,f+y,b),t.arcTo(m,f+y,m,f,b),t.arcTo(m,f,m+v,f,b),t.closePath(),t.setFillStyle(p>0?n.backgroundColor:"rgba(0,0,0,0)"),t.fill()):(t.setFillStyle(p>0?n.backgroundColor:"rgba(0,0,0,0)"),t.fillRect(m,f,v,y)),t.restore(),g>0&&(t.beginPath(),t.moveTo(a+g,s),t.arcTo(a+l,s,a+l,s+c,g),t.arcTo(a+l,s+c,a,s+c,g),t.arcTo(a,s+c,a,s,g),t.arcTo(a,s,a+l,s,g),t.closePath(),t.setStrokeStyle("rgba(0,0,0,0)"),t.stroke(),t.clip());try{h=await this.loadImage(n.imageSrc),t.drawImage(h,a,s,l,c)}catch(C){throw console.error(`[uQRCode]: ${n.mappingName} invalid!`),new ze.Error(`${n.mappingName} invalid!`)}}}u&&t.draw(!0),t.restore()}t.draw(!0),setTimeout(e,150)}catch(C){if(!(C instanceof ze.Error))throw C;o(C)}};return new Promise(((e,t)=>{c(e,t)}))},ze.prototype.draw=function(){return this.drawCanvas()},ze.prototype.register=function(e){e&&e(ze,this,!0)};const Le=new xe,je=new xe,Ne=[];let Re=null;function qe(e={},t={},o=!1){let r;r=o?e:{...e};for(let n in t){var i=t[n];null!=i&&(i.constructor==Object?r[n]=this.deepReplace(r[n],i):i.constructor!=String||i?r[n]=i:r[n]=r[n])}return r}const Ye=R({name:"uv-qrcode",mixins:[{},ke,K],emits:["click","change","complete"],data:()=>({canvasId:"",canvas:void 0,canvasType:void 0,canvasContext:void 0,makeDelegate:void 0,drawDelegate:void 0,toTempFilePathDelegate:void 0,makeExecuted:!1,makeing:!1,drawing:!1,isError:!1,error:void 0,isH5Save:!1,tempFilePath:"",templateOptions:{size:0,width:0,height:0,canvasWidth:0,canvasHeight:0,canvasTransform:"",canvasDisplay:!1},uqrcodeOptions:{data:""},plugins:[],makeingPattern:[[[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]],[[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!1,!1,!1],[!0,!0,!0,!0,!0,!0,!1,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!1,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!1,!0,!0,!0]],[[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!0,!0,!0]],[[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!1,!1,!1,!1,!1,!1,!1],[!0,!0,!0,!1,!1,!1,!1,!1,!1,!1],[!0,!0,!0,!1,!1,!1,!1,!1,!1,!1],[!0,!0,!0,!1,!1,!1,!1,!1,!1,!1],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]]]}),watch:{type:{handler(e){["2d"].includes(e)?this.canvasType=e:this.canvasType=void 0},immediate:!0},value:{handler(){this.auto&&this.remake()}},size:{handler(){this.auto&&this.remake()}},options:{handler(){this.auto&&this.remake()},deep:!0},makeing:{handler(e){e||"function"==typeof this.toTempFilePathDelegate&&this.toTempFilePathDelegate()}}},created(){this.canvasId=this.$uv.guid()},mounted(){this.templateOptions.size=this.$uv.getPx(this.size),this.templateOptions.width=this.templateOptions.size,this.templateOptions.height=this.templateOptions.size,this.templateOptions.canvasWidth=this.templateOptions.size,this.templateOptions.canvasHeight=this.templateOptions.size,this.canvasType,this.templateOptions.canvasTransform=`scale(${this.templateOptions.size/this.templateOptions.canvasWidth}, ${this.templateOptions.size/this.templateOptions.canvasHeight})`,this.start&&this.$nextTick((()=>{this.make()}))},methods:{getTemplateOptions(){var e=this.$uv.getPx(this.size);return qe(this.templateOptions,{size:e,width:e,height:e})},getUqrcodeOptions(){return qe(this.options,{data:String(this.value),size:Number(this.templateOptions.size)})},resetCanvas(e){this.templateOptions.canvasDisplay=!1,this.$nextTick((()=>{this.templateOptions.canvasDisplay=!0,this.$nextTick((()=>{e&&e()}))}))},async draw(e={},t=!1){if("function"!=typeof e.success&&(e.success=()=>{}),"function"!=typeof e.fail&&(e.fail=()=>{}),"function"!=typeof e.complete&&(e.complete=()=>{}),this.drawing){if(!t)return void(this.drawDelegate=()=>{this.draw(e,!0)})}else this.drawing=!0;if(!this.canvasId)return console.error("[uQRCode]: canvasId must be set!"),this.isError=!0,this.drawing=!1,e.fail({errMsg:"[uQRCode]: canvasId must be set!"}),void e.complete({errMsg:"[uQRCode]: canvasId must be set!"});if(!this.value)return console.error("[uQRCode]: value must be set!"),this.isError=!0,this.drawing=!1,e.fail({errMsg:"[uQRCode]: value must be set!"}),void e.complete({errMsg:"[uQRCode]: value must be set!"});this.templateOptions=this.getTemplateOptions(),this.uqrcodeOptions=this.getUqrcodeOptions(),"string"==typeof this.uqrcodeOptions.errorCorrectLevel&&(this.uqrcodeOptions.errorCorrectLevel=ze.errorCorrectLevel[this.uqrcodeOptions.errorCorrectLevel]),void 0===this.options.useDynamicSize&&(this.uqrcodeOptions.useDynamicSize=!0);const o=Re=new ze;this.plugins.forEach((e=>o.register(e.plugin))),o.setOptions(this.uqrcodeOptions),o.make();let r=null;"2d"===this.canvasType?(r=this.canvasContext=C(this.canvasId,this),this.templateOptions.canvasWidth=o.dynamicSize,this.templateOptions.canvasHeight=o.dynamicSize,this.templateOptions.canvasTransform=`scale(${this.templateOptions.size/this.templateOptions.canvasWidth}, ${this.templateOptions.size/this.templateOptions.canvasHeight})`,o.loadImage=this.getLoadImage((function(e){return new Promise(((t,o)=>{if(e.startsWith("http"))k({src:e,success:e=>{t(e.path)},fail:e=>{o(e)}});else{if(e.startsWith("."))throw console.error("[uQRCode]: 本地图片路径仅支持绝对路径!"),new Error("[uQRCode]: local image path only supports absolute path!");t(e)}}))}))):(r=this.canvasContext=C(this.canvasId,this),this.templateOptions.canvasWidth=o.dynamicSize,this.templateOptions.canvasHeight=o.dynamicSize,this.templateOptions.canvasTransform=`scale(${this.templateOptions.size/this.templateOptions.canvasWidth}, ${this.templateOptions.size/this.templateOptions.canvasHeight})`,o.loadImage=this.getLoadImage((function(e){return new Promise(((t,o)=>{if(e.startsWith("http"))k({src:e,success:e=>{t(e.path)},fail:e=>{o(e)}});else{if(e.startsWith("."))throw console.error("[uQRCode]: 本地图片路径仅支持绝对路径!"),new Error("[uQRCode]: local image path only supports absolute path!");t(e)}}))}))),o.canvasContext=r,setTimeout((()=>{var t=this.plugins.find((e=>e.name==o.style)),r=t?t.drawCanvas:"drawCanvas";(this.queue?()=>Le.exec((()=>o[r]())):()=>o[r]())().then((()=>{if(this.drawDelegate){let e=this.drawDelegate;this.drawDelegate=void 0,e()}else this.drawing=!1,e.success()})).catch((t=>{if(console.log(t),this.drawDelegate){let e=this.drawDelegate;this.drawDelegate=void 0,e()}else this.drawing=!1,this.isError=!0,e.fail(t)})).finally((()=>{e.complete()}))}),300)},make(e={}){this.makeExecuted=!0,this.makeing=!0,this.isError=!1,"function"!=typeof e.success&&(e.success=()=>{}),"function"!=typeof e.fail&&(e.fail=()=>{}),"function"!=typeof e.complete&&(e.complete=()=>{}),this.resetCanvas((()=>{clearTimeout(this.makeDelegate),this.makeDelegate=setTimeout((()=>{this.draw({success:()=>{setTimeout((()=>{e.success(),this.complete(!0)}),300)},fail:t=>{e.fail(t),this.error=t,this.complete(!1,t.errMsg)},complete:()=>{e.complete(),this.makeing=!1}})}),300)}))},remake(e){this.$emit("change"),this.make(e)},complete(e=!0,t=""){e?this.$emit("complete",{success:e}):this.$emit("complete",{success:e,errMsg:t})},toTempFilePath(e={}){if("function"!=typeof e.success&&(e.success=()=>{}),"function"!=typeof e.fail&&(e.fail=()=>{}),"function"!=typeof e.complete&&(e.complete=()=>{}),!this.makeExecuted){console.error("[uQRCode]: make() 方法从未调用!请先成功调用 make() 后再进行操作。");var t={errMsg:"[uQRCode]: make() method has never been executed! please execute make() successfully before operating."};return e.fail(t),void e.complete(t)}if(this.isError)return e.fail(this.error),void e.complete(this.error);this.makeing?this.toTempFilePathDelegate=()=>{this.toTempFilePath(e)}:(this.toTempFilePathDelegate=null,"2d"===this.canvasType||w({canvasId:this.canvasId,fileType:this.fileType,width:Number(this.templateOptions.canvasWidth),height:Number(this.templateOptions.canvasHeight),destWidth:Number(this.templateOptions.size),destHeight:Number(this.templateOptions.size),success:t=>{e.success(t)},fail:t=>{e.fail(t)},complete:()=>{e.complete()}},this))},save(e={}){"function"!=typeof e.success&&(e.success=()=>{}),"function"!=typeof e.fail&&(e.fail=()=>{}),"function"!=typeof e.complete&&(e.complete=()=>{}),this.toTempFilePath({success:t=>{if(this.isH5Save=this.h5SaveTip,this.tempFilePath=t.tempFilePath,this.h5SaveIsDownload){const e=document.createElement("a");e.download=this.h5DownloadName,e.href=t.tempFilePath,document.body.appendChild(e),e.click(),e.remove()}e.success({errMsg:"ok"}),e.complete({errMsg:"ok"})},fail:t=>{e.fail(t),e.complete(t)}})},onClick(e){this.$emit("click",e)},getInstance:()=>Re,registerStyle(e){if("style"!=e.Type)return console.warn("[uQRCode]: registerStyle 仅支持注册 style 类型的扩展!"),{errMsg:"registerStyle 仅支持注册 style 类型的扩展!"};"function"==typeof e&&this.plugins.push({plugin:e,name:e.Name,drawCanvas:e.DrawCanvas})},getLoadImage(e){var t=this;return"function"==typeof e?function(o){return t.isQueueLoadImage?je.exec((()=>new Promise(((t,r)=>{setTimeout((()=>{const i=Ne.find((e=>e.src==o));i?t(i.img):e(o).then((e=>{Ne.push({src:o,img:e}),t(e)})).catch((e=>{r(e)}))}),10)})))):e(o)}:function(e){return Promise.resolve(e)}}}},[["render",function(l,d,c,h,g,p){const m=O,f=D,v=T,y=u;return e(),t(f,{class:n(["uqrcode",{"uqrcode-hide":l.hide}]),style:a({width:`${g.templateOptions.width}px`,height:`${g.templateOptions.height}px`})},{default:o((()=>[I(f,{class:"uqrcode-canvas-wrapper"},{default:o((()=>[g.templateOptions.canvasDisplay?(e(),t(m,{key:0,class:"uqrcode-canvas",id:g.canvasId,"canvas-id":g.canvasId,type:g.canvasType,style:a({width:`${g.templateOptions.canvasWidth}px`,height:`${g.templateOptions.canvasHeight}px`,transform:g.templateOptions.canvasTransform}),onClick:p.onClick},null,8,["id","canvas-id","type","style","onClick"])):s("",!0)])),_:1}),(void 0!==l.loading&&l.loading?l.loading:g.makeing)?(e(),t(f,{key:0,class:"uqrcode-makeing"},{default:o((()=>[S(l.$slots,"loading",{},(()=>[I(v,{class:"uqrcode-makeing-image",style:a({width:g.templateOptions.size/4+"px",height:g.templateOptions.size/4+"px"}),src:"data:image/gif;base64,R0lGODlhAAEAAfIEAOHh4SSsWuDg4N3d3f///wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8xMC0yMjowNjo1MyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT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yCGKOKIJJZo4okopqjiimQB4OKLMMYo44w01mjjjTMSKMCOPPbo449ABinkkDgWaeSROOpI5JJMNonkk1BGqaSTVFYZ5ZVY3jillVx2meWXSG7p5Zhkgmmmi2KWqeaZbBqZ5ppwtilnjG/GaeecbNZ55554Yqknn4D2eeSfgRYqaI2EGqrooS8muiijkDr6KKSCSjoppXNaeimmeSq46aec2qgpqKH66SmpqJYKwKipqjroqa3yKVWSsP64oaknSVmrj7deOauWu/bYq665QgmhhrgCRexl/1UOayxFy+bGpbNP/ipqsDxSGya0zxropLavFlsttjuC6ya343rbpLlFWosouQKwS6u426rLpLzA0hsus1Tie62+59q7pL/vAtwuvATT6K7CCCPrK7r18vutw9Hm9LDARCacI8T7SmulxjIuvDHGQ4JMJ8cBS7wuxa6GjPK9LLcMo8i2xiwzmi8PbPPNNPO6s8w9C/tzy0FnO7SrRZd7tKpJx7t0qU2bzGjUT4fadKxYn2xw1lwfvHXXYDP8ddhkN5pz2WhfjTbQZ68dttpuM9123De7PDbddZvJatZUk4x3xbsk6/Hfa/atMuGCWww4f4gXPrfYhzferbKTDy554hmBXxz55R0rXvlgnGvO1OJphS665+luTncCADs="},null,8,["style"])]),!0)])),_:3})):s("",!0),g.isError?(e(),t(f,{key:1,class:"uqrcode-error",onClick:p.onClick},{default:o((()=>[S(l.$slots,"error",{error:g.error},(()=>[I(y,{class:"uqrcode-error-message"},{default:o((()=>[r(i(g.error.errMsg),1)])),_:1})]),!0)])),_:3},8,["onClick"])):s("",!0),g.isH5Save?(e(),t(f,{key:2,class:"uqrcode-h5-save"},{default:o((()=>[S(l.$slots,"h5save",{tempFilePath:g.tempFilePath},(()=>[I(v,{class:"uqrcode-h5-save-image",src:g.tempFilePath},null,8,["src"]),I(y,{class:"uqrcode-h5-save-text"},{default:o((()=>[r(i(l.h5SaveIsDownload?"若保存失败,":"")+"请长按二维码进行保存",1)])),_:1})]),!0),I(f,{class:"uqrcode-h5-save-close",onClick:d[0]||(d[0]=A((e=>g.isH5Save=!1),["stop"]))},{default:o((()=>[I(f,{class:"uqrcode-h5-save-close-before"}),I(f,{class:"uqrcode-h5-save-close-after"})])),_:1})])),_:3})):s("",!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-93b86477"]]);const Fe=R({data:()=>({pubState:F,queryObj:{},queryString:"",compId:0,qrCodeWx:"",qrCodeOptWx:{margin:5,foregroundImageSrc:"/static/logo/wechat.png"},imgQrCodeWx:"",qrCodeApp:"",qrCodeOptApp:{margin:5,foregroundImageSrc:"/static/logo.png"},imgQrCodeApp:"",actRs:Y.actRs}),computed:{...P(["username","userlevel","token"]),...M(["metadata"])},onLoad(e){this.queryObj=e,this.queryString=q.objectToQueryString(this.queryObj),this.compId=e.compId??0,this.compInfoDetail(),this.getQrCodeWx()},methods:{getBannerStyle(){return Y.getBannerStyle(this.actRs)},getActtime(){return q.fmtMcTime3(this.actRs.config.matchInfo.compBeginSecond,this.actRs.config.matchInfo.compEndSecond)},compInfoDetail(){B({url:G,header:this.metadata,method:"POST",data:{compId:this.compId},success:e=>{if(console.log("compInfoDetail",e),H(e)){const t=e.data.data;this.actRs=t,this.userlevel>0&&this.getQrCodeApp()}},fail:e=>{console.log("compInfoDetail err",e)}})},compInfoPublish(){B({url:W,header:this.metadata,method:"POST",data:{compId:this.compId},success:e=>{console.log("compInfoPublish",e),H(e)&&(h({title:"赛事发布成功",icon:"none",duration:3e3}),setTimeout((()=>{this.$router.go(0)}),1e3))},fail:e=>{console.log("compInfoPublish err",e)}})},getQrCodeWx(){this.qrCodeWx="http://t-oss-card.colormaprun.com/actMgt/#/pages/actManage/actDetail?compId="+this.compId},getQrCodeApp(){B({url:Q,header:this.metadata,method:"POST",data:{compId:this.compId},success:e=>{if(console.log("getQrCodeApp",e),H(e)){const t=e.data.data;this.qrCodeApp="url:"+t.qrCode}},fail:e=>{console.log("getQrCodeApp err",e)}})},qrCodeAppReset(){B({url:X,header:this.metadata,method:"POST",data:{compId:this.compId},success:e=>{console.log("qrCodeAppReset",e),H(e)&&(this.getQrCodeApp(),h({title:"二维码重置成功",icon:"none",duration:3e3}))},fail:e=>{console.log("qrCodeAppReset err",e)}})},btnBack(){q.appAction("/pages/actManage/index","uni.switchTab")},btnActEdit(){this.queryObj.from="actDetail",this.queryString=q.objectToQueryString(this.queryObj);const e="/pages/actCreate/actEdit?"+this.queryString;q.appAction(e,"uni.navigateTo")},btnActPublish(){let e=this;E({title:"提示",content:"赛事发布后将无法修改赛事内容\r\n您确定要继续吗?",confirmText:"确定",cancelText:"取消",showCancel:!0,success:function(t){t.confirm?e.compInfoPublish():t.cancel}})},btnRankList(){const e="/pages/actManage/rankList?"+this.queryString;q.appAction(e,"uni.navigateTo")},btnTrack(){const e="/pages/actManage/track?"+this.queryString;q.appAction(e,"uni.navigateTo")},qrCodeReset(){let e=this;E({title:"重置二维码",content:"重置后生成新码,旧码会失效\r\n您确定要继续吗?",confirmText:"确定",cancelText:"取消",showCancel:!0,success:function(t){t.confirm?e.qrCodeAppReset():t.cancel}})},qrCodeWxComplete(e){this.$refs.qrCodeWx.toTempFilePath({success:e=>{this.imgQrCodeWx=e.tempFilePath}})},qrCodeAppComplete(e){this.$refs.qrCodeApp.toTempFilePath({success:e=>{this.imgQrCodeApp=e.tempFilePath}})}}},[["render",function(n,l,d,c,h,g){const p=N(z("my-topbar"),j),m=D,f=N(z("uni-tag"),Z),v=u,y=T,b=L,C=N(z("uv-qrcode"),Ye);return e(),t(m,{class:"body"},{default:o((()=>[I(m,{class:"content uni-column"},{default:o((()=>[I(m,{class:"uni-column top",style:a(g.getBannerStyle())},{default:o((()=>[I(p,{title:h.actRs.config.matchInfo.compName,onBtnBackClick:g.btnBack,showBack:n.userlevel>0},null,8,["title","onBtnBackClick","showBack"]),I(m,{class:"top-content uni-row"})])),_:1},8,["style"]),I(m,{class:"main uni-column"},{default:o((()=>[I(m,{class:"compBox uni-column"},{default:o((()=>[I(m,{class:"compName"},{default:o((()=>[I(f,{circle:!0,text:h.pubState[h.actRs.otherInfo.pubState],type:h.actRs.otherInfo.pubState>1?"primary":"warning",size:"small"},null,8,["text","type"]),r(" "+i(h.actRs.config.matchInfo.compName),1)])),_:1}),I(m,{class:"comp_time"},{default:o((()=>[r("赛事日期:"+i(g.getActtime()),1)])),_:1}),n.userlevel>0?(e(),t(m,{key:0,class:"comp_time"},{default:o((()=>[r("( 联系人:"+i(h.actRs.config.matchInfo.contactName)+"    电话:",1),x("a",{href:"tel:"+h.actRs.config.matchInfo.phone,style:{color:"#ff5500"}},i(h.actRs.config.matchInfo.phone),9,["href"]),r(" )")])),_:1})):s("",!0),I(m,{class:"introduce uni-column"},{default:o((()=>[I(v,{class:"introduce-content",innerHTML:h.actRs.config.matchInfo.description},null,8,["innerHTML"])])),_:1}),h.actRs.config.matchInfo.rules.length>0?(e(),t(m,{key:1,class:"activityRules uni-column"},{default:o((()=>[I(v,{class:"activityRules-title"},{default:o((()=>[r("活动规则")])),_:1}),I(v,{class:"activityRules-content",innerHTML:h.actRs.config.matchInfo.rules},null,8,["innerHTML"])])),_:1})):s("",!0)])),_:1}),I(m,{class:"uni-row uni-jcse qrImgBox"},{default:o((()=>[I(m,{class:"uni-column"},{default:o((()=>[I(y,{class:"imgQrCode",src:h.imgQrCodeWx},null,8,["src"]),I(m,{class:"qrMemo"},{default:o((()=>[r("(微信扫码)")])),_:1}),I(m,{class:"qrMemo"},{default:o((()=>[r("查看赛事详情")])),_:1})])),_:1}),n.userlevel>0?(e(),t(m,{key:0,class:"uni-column"},{default:o((()=>[I(y,{class:"imgQrCode",src:h.imgQrCodeApp},null,8,["src"]),I(m,{class:"qrMemo"},{default:o((()=>[r("(彩图奔跑APP扫码)")])),_:1}),I(m,{class:"qrMemo"},{default:o((()=>[r("查看赛事卡片"),n.userlevel>0?(e(),t(v,{key:0,style:{color:"#ff5500"},onClick:g.qrCodeReset},{default:o((()=>[r(" [重置]")])),_:1},8,["onClick"])):s("",!0)])),_:1})])),_:1})):s("",!0)])),_:1})])),_:1}),I(m,{class:"bottom uni-row uni-jcc"},{default:o((()=>[n.userlevel>0?(e(),t(b,{key:0,class:"bottom-button",onClick:g.btnActEdit},{default:o((()=>[r("赛事修改")])),_:1},8,["onClick"])):s("",!0),n.userlevel>0&&1==h.actRs.otherInfo.pubState?(e(),t(b,{key:1,class:"bottom-button",onClick:g.btnActPublish},{default:o((()=>[r("赛事发布")])),_:1},8,["onClick"])):s("",!0),I(b,{class:"bottom-button",onClick:g.btnRankList},{default:o((()=>[r("排行榜")])),_:1},8,["onClick"])])),_:1})])),_:1}),I(m,{class:"qrcodeBox"},{default:o((()=>[I(C,{ref:"qrCodeWx",class:"qrCode",size:"300px",value:h.qrCodeWx,options:h.qrCodeOptWx,onComplete:g.qrCodeWxComplete},null,8,["value","options","onComplete"]),n.userlevel>0?(e(),t(C,{key:0,ref:"qrCodeApp",class:"qrCode",size:"300px",value:h.qrCodeApp,options:h.qrCodeOptApp,onComplete:g.qrCodeAppComplete},null,8,["value","options","onComplete"])):s("",!0)])),_:1})])),_:1})}],["__scopeId","data-v-88be45aa"]]);export{Fe as default};