order-detail-f2b2a028.js 41 KB

12345678
  1. import{d as K,q as Ue,e as Le,a as l,A as B,I as te,F as pe,x as ke,P as ye,C as Ae,Q as rt,R as k,M as G,D as q,S as ze,r as qe,w as st,y as xe,z as at,U as it,V as Pe,W as ut,E as le}from"./index-5e5e4ebc.js";import{C as x}from"./index-4bcfa431.js";import{T as Ve}from"./index-cc5b42dd.js";import{M as lt}from"./index-9096eaf6.js";import{R as ct,a as De}from"./index-cb21536d.js";import{C as Be}from"./index-9827a1cb.js";import{O as dt}from"./index-a10e12a9.js";import{F as ft}from"./index-d76a3626.js";import{F as Fe}from"./index-f6b73f03.js";import{O as gt}from"./index-d3a70a7f.js";import{I as ht}from"./index-fa23aaeb.js";import"./index-572087e5.js";import"./Checker-d0f399df.js";const mt="_cartConfirm_1c37u_1",pt="_cartConfirmBox_1c37u_9",yt="_cartItem_1c37u_15",_t="_mlr13_1c37u_24",wt="_protocol_1c37u_28",Ct="_paymentContainer_1c37u_36",Et="_needPrice_1c37u_48",At="_allPrice_1c37u_64",Bt="_cellItem_1c37u_72",Tt="_img_1c37u_77",It="_cellPrice_1c37u_85",Nt="_numFont_1c37u_91",bt="_numPrefix_1c37u_94",St="_goodsContent_1c37u_98",Pt="_goodsNum_1c37u_98",Dt="_goodsPrice_1c37u_104",Ft="_free_1c37u_110",vt="_goodsNums_1c37u_113",Mt="_brandName_1c37u_128",Rt="_model_1c37u_137",Ut="_popupCode_1c37u_143",Lt="_codeContainer_1c37u_147",kt="_codeClose_1c37u_150",zt="_codeImg_1c37u_160",qt="_codeTitle_1c37u_167",xt="_codeName_1c37u_175",Vt="_codeQr_1c37u_182",Ot="_codeBtnText_1c37u_195",Ht="_codeTips_1c37u_206",jt="_tipsTitle_1c37u_220",Kt="_close_1c37u_226",Jt="_codeBottom_1c37u_231",Gt="_title_1c37u_238",Yt="_shareImg_1c37u_253",Qt="_shareText_1c37u_257",$t="_freight_1c37u_263",Xt="_submitBtn_1c37u_275",I={cartConfirm:mt,cartConfirmBox:pt,cartItem:yt,mlr13:_t,protocol:wt,paymentContainer:Ct,needPrice:Et,allPrice:At,cellItem:Bt,img:Tt,cellPrice:It,numFont:Nt,numPrefix:bt,goodsContent:St,goodsNum:Pt,goodsPrice:Dt,free:Ft,goodsNums:vt,brandName:Mt,model:Rt,popupCode:Ut,codeContainer:Lt,codeClose:kt,codeImg:zt,codeTitle:qt,codeName:xt,codeQr:Vt,codeBtnText:Ot,codeTips:Ht,tipsTitle:jt,close:Kt,codeBottom:Jt,title:Gt,shareImg:Yt,shareText:Qt,freight:$t,submitBtn:Xt},Wt="_cellEntry_1kuxn_1",Zt="_cell_1kuxn_1",en="_userName_1kuxn_36",tn="_phone_1kuxn_41",nn="_addressInfo_1kuxn_46",on="_emtry_1kuxn_51",z={cellEntry:Wt,cell:Zt,userName:en,phone:tn,addressInfo:nn,emtry:on},rn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABiVBMVEUAAAD/qDn/oED/pDf/iTT/jjf/sEf/sEf/rEb/rkb/oED/qEL/sEf/oD//oD//sEf/kDf/jzf/ljr/ijX/kDb/oUH/rkr/kTb/sUX/kTP/jTb/sEf/iDP/r0b/qkT/lTr/izb/mT3/lzv/sEf/jzf/sEf/rEX/kzn/sEf/o0H/nT7/iDT/sEf/p0P/mTz/iTT/pEH/nD3/iDP/sEf/pUL/nD3/ijT/skf/jjX/skj/jDX/rkP/oUP/r0f/r0b/iDP/iDT/skj/sEj/mD3/mDr/////r0b/kDf/kzn/jjb/rUX/nD3/o0D/q0T/oT//nT7/qUP/rkb/pUH/p0L/lzv/jDX/lTn/mjz/ljr/nz7/iDT/mTv/ijT/1Kr/+vX/8eP/7dr/zJX/+PL/7t7/6NP/q07/oUv//fz//Pr/8+b/3Lj/2rD/xo3/um//9uz/5cr/3sH/wob/vn//wnn/tHP/tGz/s17/6M7/x5X/yo7/uGH/qFr/qFj/sFT/pVL/p0f/1bH/0pv/rGQBKLmeAAAARXRSTlMABAoH7eDfl4NN+O7r69/NzZWDg041JiYaGhP4+PPz8/Pw6+np4ODgwcHBwaurq6uampqEcXFxT001NRMT8PDf3nFxT08xlprTAAADJUlEQVRIx5WXaV/aQBDGE1EEb221tfY+7KG97GnvK0tEQzhUkIpyi3IpCN7a9pOXuJOws4Qg84788ucZdmZnHgSzEEffvHwy0N/T0z/w+MXrUVG4UIi/nt0Jzs/Pq+qKx7OwsOD39z51tmavjdxdXPyNwUAg0Ov4ZIl1jNxaDmlgEEAPBb1e5aajozl3+aG8TEFO0VsjlUlnE8w2LMtyjTNXVBS3r9tmxo0PuWTZStHt9g1ebeSudLmagwEAffaxBu6+i4IhAFVI1c8q+sg9jhzvmnNZKGqcBhJC7Chb25DGaaAcskpVIwfZExqem0OKpqcKIOmuc+9rHJdqJZIsZDKFZCTP/kZyHk6jX7qWzjmXXsdgaV0yYn0HFA3wgd5Dl5aWkOJxVEIRrWJF8gr6+rYGugxwNy5xES8DCOSNj1RwlQFr3IbUEBtlBBKHxomdq2yqR2uSSawdsqmSPlG7EmFWMRRl3ma+I4EUybsa+DzMKu7UD/N0xZPKGcd7gMBpLVMWXNyE9yIq7Rx/BB4U3Eyq5LMofAizqe7qXL1zsvCozIJkVngbZhUjkKda79UzSCKLwB/CTHiVUUzSl3Jsk8egDYzfSBt2CqUKtT9i72MVugCBj4SvKFUovsoqnkEToFTtQidShMqlWTAFVUWKfcJ1pAhlq7D3MU+fbSJwggO3oRqsItSjiFKd4FLdpy9ljuuK1Qx99heBfcI3pHiqt2ZaV0wl4NEhdzhTqI5yUW/VCgXzeg/uKVw5ZlCq8j9Jj2SsVIoljY95DHZzLScv/5FMY0tRUKrfcZPXIhg146IpBSvOwrVihlU60cglThQMfhHpRUZTLl3kub0TY8pBTMPowHM1uB9H8yaG5yqMDhhWeJKnt+tcJAWTHA8rPB6NFaAaZAwvHRoONJDRflS3gEP7EQ1kfgVQEMgDvK3wCoClg/cjJXP8foSl03zNaZIr2ZzpfiROfrG2dh3Qpg2r3NrnADhoa8s8eLF5wHbF2udgu4INUmufYx9r15Ip2JLxJtDa52ATiG2nlc+ZdFoa3WanCka3lbXmFcFaW4b4sx0z3/7fh//zfdvlEDfKRQAAAABJRU5ErkJggg==",sn=K({name:"cart-address",props:{item:{type:Object,default:()=>({})},isLink:{type:Boolean,default:!0},setAddress:{type:Function,default:e=>{}}},setup(e){const n=Ue(),t=Le(()=>[e.item.provinceName,e.item.cityName,e.item.regionName,e.item.detailAddress].join("")),s=()=>{e.isLink&&n.push("/shopAddress")};return()=>l(pe,null,[e.item&&e.item.phoneNumber?l(x,{class:z.cell,"is-link":e.isLink,onClick:()=>s(),titleStyle:{marginLeft:"0"}},{title:()=>l("div",null,[l("span",{class:z.userName},[e.item.name]),l("span",{class:z.phone},[e.item&&e.item.phoneNumber&&e.item.phoneNumber.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")]),e.item.defaultStatus&&l(Ve,{type:"primary",color:"linear-gradient(90deg, #FF8633 0%, #FFB047 100%)",round:!0,style:{"vertical-align":"text-top",marginLeft:"10px",padding:"1px 8px"}},{default:()=>[B("默认")]})]),label:()=>l("span",{class:z.addressInfo},[t.value])}):l(x,{class:z.cell,"is-link":e.isLink,onClick:()=>s()},{icon:()=>l(te,{name:rn,size:28},null),title:()=>l("div",{class:z.emtry},[B("去填写收货地址")])})])}}),an="_payment_1ot0l_1",un="_title_1ot0l_13",ln="_payAmount_1ot0l_21",cn="_amount_1ot0l_31",dn="_blank_1ot0l_38",fn="_payTypeRe_1ot0l_41",gn="_recommend_1ot0l_45",hn="_payBtn_1ot0l_54",R={payment:an,title:un,payAmount:ln,amount:cn,blank:dn,payTypeRe:fn,recommend:gn,payBtn:hn},mn=K({name:"payment",props:{paymentConfig:{type:Object,default:{}}},emits:["backOut","close","confirm"],setup(e,{slots:n,attrs:t,emit:s}){const o=ke({payType:"wx",pay_channel:""}),r=()=>{rt({message:"是否放弃本次付款",confirmButtonText:"继续付款",cancelButtonText:"放弃",showCancelButton:!0}).catch(async()=>{await a(),s("backOut"),s("close")})},a=async d=>{},u=async()=>{const d=o.payType;k().weixin?d=="zfb"?(o.pay_channel="alipay_qr",i("qrCode")):d=="wx"&&(o.pay_channel="wx_pub",i("pay")):k().alipay?d=="zfb"?(o.pay_channel="alipay_wap",i("pay")):d=="wx"&&(o.pay_channel="wx_pub",i("qrCode")):(d=="zfb"?o.pay_channel="alipay_qr":d=="wx"&&(o.pay_channel="wx_pub"),i("qrCode"))},i=d=>{const f=d=="qrCode"?"payCenter":"payResult";s("confirm",{payCode:f,pay_channel:o.pay_channel})};return()=>l("div",{class:R.payment},[l(te,{onClick:r,name:"cross",size:20},null),l("div",{class:[R.title]},[B("选择支付方式")]),l("div",{class:R.payAmount},[l("p",null,[B("应付金额")]),l("div",{class:R.amount},[l("span",null,[B("¥ ")]),ye(e.paymentConfig.currentPrice)])]),l(ct,{modelValue:o.payType,"onUpdate:modelValue":d=>o.payType=d},{default:()=>[l(Be,{border:!1},{default:()=>[l(x,{border:!0,center:!0,onClick:()=>{o.payType="wx"}},{icon:()=>l(te,{name:"wechat-pay",color:"#15c434",size:22},null),"right-icon":()=>l(De,{name:"wx"},null),title:()=>l("div",{class:R.payTypeRe},[B("微信支付 "),l("span",{class:R.recommend},[B("推荐")])])}),l(x,{title:"支付宝支付",border:!0,center:!0,onClick:()=>{o.payType="zfb"}},{icon:()=>l(te,{name:"alipay",color:"#009fe9",size:22},null),"right-icon":()=>l(De,{name:"zfb"},null)})]})]}),l("div",{class:R.blank},null),l(Ae,{type:"primary",class:R.payBtn,block:!0,round:!0,onClick:u},{default:()=>[B("确认支付")]})])}}),pn="_userAuth_1wdij_1",yn="_cellGroup_1wdij_6",_n="_btnGroup_1wdij_38",wn="_otherBtn_1wdij_42",ce={userAuth:pn,cellGroup:yn,btnGroup:_n,otherBtn:wn},Cn=K({name:"UserAuth",props:{onSuccess:{type:Function,default:()=>{}},hideHeader:{type:Boolean,default:!1}},data(){return{form:{realName:"",idCardNo:""}}},mounted(){const e=G.user.data;this.form.realName=e==null?void 0:e.account.realName},methods:{async onSubmit(){try{const e="/edu-app/sysAccount/realNameAuth";await q.post(e,{data:{...this.form,contract:!0,save:!0}}),G.user.data.account.realName=this.form.realName,G.user.data.account.idCardNo=this.form.idCardNo,this.onSuccess()}catch(e){}}},render(){return l(ft,{class:ce.userAuth,onSubmit:this.onSubmit},{default:()=>[!this.hideHeader&&l(ze,{title:"实名认证"},null),l(Be,{inset:!0,class:ce.cellGroup},{default:()=>[l(Fe,{required:!0,label:"真实姓名",modelValue:this.form.realName,"onUpdate:modelValue":e=>this.form.realName=e,rules:[{required:!0,message:"请填写真实姓名"}],name:"realName",placeholder:"请填写真实姓名",autocomplete:"off",maxlength:"50"},null),l(Fe,{required:!0,label:"身份证号",modelValue:this.form.idCardNo,"onUpdate:modelValue":e=>this.form.idCardNo=e,maxlength:18,autocomplete:"off",rules:[{required:!0,message:"请输入身份证号"},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"请输入正确的身份证号"}],placeholder:"请输入身份证号"},null)]}),l("div",{class:["btnGroup"]},[l(Ae,{block:!0,round:!0,type:"primary","native-type":"submit",class:ce.otherBtn},{default:()=>[B("确定")]})])]})}}),En={WAIT_PAY:"待支付",PAYING:"支付中",PAID:"已付款",TIMEOUT:"已关闭",FAIL:"支付失败",CLOSED:"已关闭",REFUNDING:"退款中",REFUNDED:"已退款"},An="_saveShareImage_1vhog_1",Bn="_tips_1vhog_5",Tn="_tipsTitle_1vhog_11",In="_tipsContent_1vhog_17",Nn="_previewSection_1vhog_23",bn="_topImage_1vhog_30",Sn="_shareContaienr_1vhog_37",Pn="_schoolName_1vhog_45",Dn="_shareType_1vhog_51",Fn="_qrcodeSection_1vhog_60",vn="_memo_1vhog_68",v={saveShareImage:An,tips:Bn,tipsTitle:Tn,tipsContent:In,previewSection:Nn,topImage:bn,shareContaienr:Sn,schoolName:Pn,shareType:Dn,qrcodeSection:Fn,memo:vn},Mn=""+new URL("smallLogo-517ff5bd.png",import.meta.url).href;var $={},Rn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Oe={},b={};let Te;const Un=[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];b.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17};b.getSymbolTotalCodewords=function(n){return Un[n]};b.getBCHDigit=function(e){let n=0;for(;e!==0;)n++,e>>>=1;return n};b.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');Te=n};b.isKanjiModeEnabled=function(){return typeof Te<"u"};b.toSJIS=function(n){return Te(n)};var re={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}e.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},e.from=function(s,o){if(e.isValid(s))return s;try{return n(s)}catch(r){return o}}})(re);function He(){this.buffer=[],this.length=0}He.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let t=0;t<n;t++)this.putBit((e>>>n-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}};var Ln=He;function X(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}X.prototype.set=function(e,n,t,s){const o=e*this.size+n;this.data[o]=t,s&&(this.reservedBit[o]=!0)};X.prototype.get=function(e,n){return this.data[e*this.size+n]};X.prototype.xor=function(e,n,t){this.data[e*this.size+n]^=t};X.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]};var kn=X,je={};(function(e){const n=b.getSymbolSize;e.getRowColCoords=function(s){if(s===1)return[];const o=Math.floor(s/7)+2,r=n(s),a=r===145?26:Math.ceil((r-13)/(2*o-2))*2,u=[r-7];for(let i=1;i<o-1;i++)u[i]=u[i-1]-a;return u.push(6),u.reverse()},e.getPositions=function(s){const o=[],r=e.getRowColCoords(s),a=r.length;for(let u=0;u<a;u++)for(let i=0;i<a;i++)u===0&&i===0||u===0&&i===a-1||u===a-1&&i===0||o.push([r[u],r[i]]);return o}})(je);var Ke={};const zn=b.getSymbolSize,ve=7;Ke.getPositions=function(n){const t=zn(n);return[[0,0],[t-ve,0],[0,t-ve]]};var Je={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const r=o.size;let a=0,u=0,i=0,d=null,f=null;for(let A=0;A<r;A++){u=i=0,d=f=null;for(let y=0;y<r;y++){let h=o.get(A,y);h===d?u++:(u>=5&&(a+=n.N1+(u-5)),d=h,u=1),h=o.get(y,A),h===f?i++:(i>=5&&(a+=n.N1+(i-5)),f=h,i=1)}u>=5&&(a+=n.N1+(u-5)),i>=5&&(a+=n.N1+(i-5))}return a},e.getPenaltyN2=function(o){const r=o.size;let a=0;for(let u=0;u<r-1;u++)for(let i=0;i<r-1;i++){const d=o.get(u,i)+o.get(u,i+1)+o.get(u+1,i)+o.get(u+1,i+1);(d===4||d===0)&&a++}return a*n.N2},e.getPenaltyN3=function(o){const r=o.size;let a=0,u=0,i=0;for(let d=0;d<r;d++){u=i=0;for(let f=0;f<r;f++)u=u<<1&2047|o.get(d,f),f>=10&&(u===1488||u===93)&&a++,i=i<<1&2047|o.get(f,d),f>=10&&(i===1488||i===93)&&a++}return a*n.N3},e.getPenaltyN4=function(o){let r=0;const a=o.data.length;for(let i=0;i<a;i++)r+=o.data[i];return Math.abs(Math.ceil(r*100/a/5)-10)*n.N4};function t(s,o,r){switch(s){case e.Patterns.PATTERN000:return(o+r)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(o+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return o*r%2+o*r%3===0;case e.Patterns.PATTERN110:return(o*r%2+o*r%3)%2===0;case e.Patterns.PATTERN111:return(o*r%3+(o+r)%2)%2===0;default:throw new Error("bad maskPattern:"+s)}}e.applyMask=function(o,r){const a=r.size;for(let u=0;u<a;u++)for(let i=0;i<a;i++)r.isReserved(i,u)||r.xor(i,u,t(o,i,u))},e.getBestMask=function(o,r){const a=Object.keys(e.Patterns).length;let u=0,i=1/0;for(let d=0;d<a;d++){r(d),e.applyMask(d,o);const f=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),f<i&&(i=f,u=d)}return u}})(Je);var se={};const U=re,W=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Z=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];se.getBlocksCount=function(n,t){switch(t){case U.L:return W[(n-1)*4+0];case U.M:return W[(n-1)*4+1];case U.Q:return W[(n-1)*4+2];case U.H:return W[(n-1)*4+3];default:return}};se.getTotalCodewordsCount=function(n,t){switch(t){case U.L:return Z[(n-1)*4+0];case U.M:return Z[(n-1)*4+1];case U.Q:return Z[(n-1)*4+2];case U.H:return Z[(n-1)*4+3];default:return}};var Ge={},ae={};const Y=new Uint8Array(512),ne=new Uint8Array(256);(function(){let n=1;for(let t=0;t<255;t++)Y[t]=n,ne[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)Y[t]=Y[t-255]})();ae.log=function(n){if(n<1)throw new Error("log("+n+")");return ne[n]};ae.exp=function(n){return Y[n]};ae.mul=function(n,t){return n===0||t===0?0:Y[ne[n]+ne[t]]};(function(e){const n=ae;e.mul=function(s,o){const r=new Uint8Array(s.length+o.length-1);for(let a=0;a<s.length;a++)for(let u=0;u<o.length;u++)r[a+u]^=n.mul(s[a],o[u]);return r},e.mod=function(s,o){let r=new Uint8Array(s);for(;r.length-o.length>=0;){const a=r[0];for(let i=0;i<o.length;i++)r[i]^=n.mul(o[i],a);let u=0;for(;u<r.length&&r[u]===0;)u++;r=r.slice(u)}return r},e.generateECPolynomial=function(s){let o=new Uint8Array([1]);for(let r=0;r<s;r++)o=e.mul(o,new Uint8Array([1,n.exp(r)]));return o}})(Ge);const Ye=Ge;function Ie(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Ie.prototype.initialize=function(n){this.degree=n,this.genPoly=Ye.generateECPolynomial(this.degree)};Ie.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const s=Ye.mod(t,this.genPoly),o=this.degree-s.length;if(o>0){const r=new Uint8Array(this.degree);return r.set(s,o),r}return s};var qn=Ie,Qe={},L={},Ne={};Ne.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40};var D={};const $e="[0-9]+",xn="[A-Z $%*+\\-./:]+";let Q="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Q=Q.replace(/u/g,"\\u");const Vn="(?:(?![A-Z0-9 $%*+\\-./:]|"+Q+`)(?:.|[\r
  2. ]))+`;D.KANJI=new RegExp(Q,"g");D.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");D.BYTE=new RegExp(Vn,"g");D.NUMERIC=new RegExp($e,"g");D.ALPHANUMERIC=new RegExp(xn,"g");const On=new RegExp("^"+Q+"$"),Hn=new RegExp("^"+$e+"$"),jn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");D.testKanji=function(n){return On.test(n)};D.testNumeric=function(n){return Hn.test(n)};D.testAlphanumeric=function(n){return jn.test(n)};(function(e){const n=Ne,t=D;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.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]},e.getBestModeForData=function(r){return t.testNumeric(r)?e.NUMERIC:t.testAlphanumeric(r)?e.ALPHANUMERIC:t.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function s(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(r,a){if(e.isValid(r))return r;try{return s(r)}catch(u){return a}}})(L);(function(e){const n=b,t=se,s=re,o=L,r=Ne,a=7973,u=n.getBCHDigit(a);function i(y,h,C){for(let c=1;c<=40;c++)if(h<=e.getCapacity(c,C,y))return c}function d(y,h){return o.getCharCountIndicator(y,h)+4}function f(y,h){let C=0;return y.forEach(function(c){const m=d(c.mode,h);C+=m+c.getBitsLength()}),C}function A(y,h){for(let C=1;C<=40;C++)if(f(y,C)<=e.getCapacity(C,h,o.MIXED))return C}e.from=function(h,C){return r.isValid(h)?parseInt(h,10):C},e.getCapacity=function(h,C,c){if(!r.isValid(h))throw new Error("Invalid QR Code version");typeof c>"u"&&(c=o.BYTE);const m=n.getSymbolTotalCodewords(h),g=t.getTotalCodewordsCount(h,C),w=(m-g)*8;if(c===o.MIXED)return w;const p=w-d(c,h);switch(c){case o.NUMERIC:return Math.floor(p/10*3);case o.ALPHANUMERIC:return Math.floor(p/11*2);case o.KANJI:return Math.floor(p/13);case o.BYTE:default:return Math.floor(p/8)}},e.getBestVersionForData=function(h,C){let c;const m=s.from(C,s.M);if(Array.isArray(h)){if(h.length>1)return A(h,m);if(h.length===0)return 1;c=h[0]}else c=h;return i(c.mode,c.getLength(),m)},e.getEncodedBits=function(h){if(!r.isValid(h)||h<7)throw new Error("Invalid QR Code version");let C=h<<12;for(;n.getBCHDigit(C)-u>=0;)C^=a<<n.getBCHDigit(C)-u;return h<<12|C}})(Qe);var Xe={};const _e=b,We=1335,Kn=21522,Me=_e.getBCHDigit(We);Xe.getEncodedBits=function(n,t){const s=n.bit<<3|t;let o=s<<10;for(;_e.getBCHDigit(o)-Me>=0;)o^=We<<_e.getBCHDigit(o)-Me;return(s<<10|o)^Kn};var Ze={};const Jn=L;function V(e){this.mode=Jn.NUMERIC,this.data=e.toString()}V.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(n){let t,s,o;for(t=0;t+3<=this.data.length;t+=3)s=this.data.substr(t,3),o=parseInt(s,10),n.put(o,10);const r=this.data.length-t;r>0&&(s=this.data.substr(t),o=parseInt(s,10),n.put(o,r*3+1))};var Gn=V;const Yn=L,de=["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 O(e){this.mode=Yn.ALPHANUMERIC,this.data=e}O.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)};O.prototype.getLength=function(){return this.data.length};O.prototype.getBitsLength=function(){return O.getBitsLength(this.data.length)};O.prototype.write=function(n){let t;for(t=0;t+2<=this.data.length;t+=2){let s=de.indexOf(this.data[t])*45;s+=de.indexOf(this.data[t+1]),n.put(s,11)}this.data.length%2&&n.put(de.indexOf(this.data[t]),6)};var Qn=O,$n=function(n){for(var t=[],s=n.length,o=0;o<s;o++){var r=n.charCodeAt(o);if(r>=55296&&r<=56319&&s>o+1){var a=n.charCodeAt(o+1);a>=56320&&a<=57343&&(r=(r-55296)*1024+a-56320+65536,o+=1)}if(r<128){t.push(r);continue}if(r<2048){t.push(r>>6|192),t.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128);continue}if(r>=65536&&r<=1114111){t.push(r>>18|240),t.push(r>>12&63|128),t.push(r>>6&63|128),t.push(r&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const Xn=$n,Wn=L;function H(e){this.mode=Wn.BYTE,typeof e=="string"&&(e=Xn(e)),this.data=new Uint8Array(e)}H.getBitsLength=function(n){return n*8};H.prototype.getLength=function(){return this.data.length};H.prototype.getBitsLength=function(){return H.getBitsLength(this.data.length)};H.prototype.write=function(e){for(let n=0,t=this.data.length;n<t;n++)e.put(this.data[n],8)};var Zn=H;const eo=L,to=b;function j(e){this.mode=eo.KANJI,this.data=e}j.getBitsLength=function(n){return n*13};j.prototype.getLength=function(){return this.data.length};j.prototype.getBitsLength=function(){return j.getBitsLength(this.data.length)};j.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let t=to.toSJIS(this.data[n]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
  3. Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};var no=j,et={exports:{}};(function(e){var n={single_source_shortest_paths:function(t,s,o){var r={},a={};a[s]=0;var u=n.PriorityQueue.make();u.push(s,0);for(var i,d,f,A,y,h,C,c,m;!u.empty();){i=u.pop(),d=i.value,A=i.cost,y=t[d]||{};for(f in y)y.hasOwnProperty(f)&&(h=y[f],C=A+h,c=a[f],m=typeof a[f]>"u",(m||c>C)&&(a[f]=C,u.push(f,C),r[f]=d))}if(typeof o<"u"&&typeof a[o]>"u"){var g=["Could not find a path from ",s," to ",o,"."].join("");throw new Error(g)}return r},extract_shortest_path_from_predecessor_list:function(t,s){for(var o=[],r=s;r;)o.push(r),t[r],r=t[r];return o.reverse(),o},find_path:function(t,s,o){var r=n.single_source_shortest_paths(t,s,o);return n.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(t){var s=n.PriorityQueue,o={},r;t=t||{};for(r in s)s.hasOwnProperty(r)&&(o[r]=s[r]);return o.queue=[],o.sorter=t.sorter||s.default_sorter,o},default_sorter:function(t,s){return t.cost-s.cost},push:function(t,s){var o={value:t,cost:s};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=n})(et);var oo=et.exports;(function(e){const n=L,t=Gn,s=Qn,o=Zn,r=no,a=D,u=b,i=oo;function d(g){return unescape(encodeURIComponent(g)).length}function f(g,w,p){const _=[];let E;for(;(E=g.exec(p))!==null;)_.push({data:E[0],index:E.index,mode:w,length:E[0].length});return _}function A(g){const w=f(a.NUMERIC,n.NUMERIC,g),p=f(a.ALPHANUMERIC,n.ALPHANUMERIC,g);let _,E;return u.isKanjiModeEnabled()?(_=f(a.BYTE,n.BYTE,g),E=f(a.KANJI,n.KANJI,g)):(_=f(a.BYTE_KANJI,n.BYTE,g),E=[]),w.concat(p,_,E).sort(function(N,S){return N.index-S.index}).map(function(N){return{data:N.data,mode:N.mode,length:N.length}})}function y(g,w){switch(w){case n.NUMERIC:return t.getBitsLength(g);case n.ALPHANUMERIC:return s.getBitsLength(g);case n.KANJI:return r.getBitsLength(g);case n.BYTE:return o.getBitsLength(g)}}function h(g){return g.reduce(function(w,p){const _=w.length-1>=0?w[w.length-1]:null;return _&&_.mode===p.mode?(w[w.length-1].data+=p.data,w):(w.push(p),w)},[])}function C(g){const w=[];for(let p=0;p<g.length;p++){const _=g[p];switch(_.mode){case n.NUMERIC:w.push([_,{data:_.data,mode:n.ALPHANUMERIC,length:_.length},{data:_.data,mode:n.BYTE,length:_.length}]);break;case n.ALPHANUMERIC:w.push([_,{data:_.data,mode:n.BYTE,length:_.length}]);break;case n.KANJI:w.push([_,{data:_.data,mode:n.BYTE,length:d(_.data)}]);break;case n.BYTE:w.push([{data:_.data,mode:n.BYTE,length:d(_.data)}])}}return w}function c(g,w){const p={},_={start:{}};let E=["start"];for(let T=0;T<g.length;T++){const N=g[T],S=[];for(let M=0;M<N.length;M++){const P=N[M],J=""+T+M;S.push(J),p[J]={node:P,lastCount:0},_[J]={};for(let ue=0;ue<E.length;ue++){const F=E[ue];p[F]&&p[F].node.mode===P.mode?(_[F][J]=y(p[F].lastCount+P.length,P.mode)-y(p[F].lastCount,P.mode),p[F].lastCount+=P.length):(p[F]&&(p[F].lastCount=P.length),_[F][J]=y(P.length,P.mode)+4+n.getCharCountIndicator(P.mode,w))}}E=S}for(let T=0;T<E.length;T++)_[E[T]].end=0;return{map:_,table:p}}function m(g,w){let p;const _=n.getBestModeForData(g);if(p=n.from(w,_),p!==n.BYTE&&p.bit<_.bit)throw new Error('"'+g+'" cannot be encoded with mode '+n.toString(p)+`.
  4. Suggested mode is: `+n.toString(_));switch(p===n.KANJI&&!u.isKanjiModeEnabled()&&(p=n.BYTE),p){case n.NUMERIC:return new t(g);case n.ALPHANUMERIC:return new s(g);case n.KANJI:return new r(g);case n.BYTE:return new o(g)}}e.fromArray=function(w){return w.reduce(function(p,_){return typeof _=="string"?p.push(m(_,null)):_.data&&p.push(m(_.data,_.mode)),p},[])},e.fromString=function(w,p){const _=A(w,u.isKanjiModeEnabled()),E=C(_),T=c(E,p),N=i.find_path(T.map,"start","end"),S=[];for(let M=1;M<N.length-1;M++)S.push(T.table[N[M]].node);return e.fromArray(h(S))},e.rawSplit=function(w){return e.fromArray(A(w,u.isKanjiModeEnabled()))}})(Ze);const ie=b,fe=re,ro=Ln,so=kn,ao=je,io=Ke,we=Je,Ce=se,uo=qn,oe=Qe,lo=Xe,co=L,ge=Ze;function fo(e,n){const t=e.size,s=io.getPositions(n);for(let o=0;o<s.length;o++){const r=s[o][0],a=s[o][1];for(let u=-1;u<=7;u++)if(!(r+u<=-1||t<=r+u))for(let i=-1;i<=7;i++)a+i<=-1||t<=a+i||(u>=0&&u<=6&&(i===0||i===6)||i>=0&&i<=6&&(u===0||u===6)||u>=2&&u<=4&&i>=2&&i<=4?e.set(r+u,a+i,!0,!0):e.set(r+u,a+i,!1,!0))}}function go(e){const n=e.size;for(let t=8;t<n-8;t++){const s=t%2===0;e.set(t,6,s,!0),e.set(6,t,s,!0)}}function ho(e,n){const t=ao.getPositions(n);for(let s=0;s<t.length;s++){const o=t[s][0],r=t[s][1];for(let a=-2;a<=2;a++)for(let u=-2;u<=2;u++)a===-2||a===2||u===-2||u===2||a===0&&u===0?e.set(o+a,r+u,!0,!0):e.set(o+a,r+u,!1,!0)}}function mo(e,n){const t=e.size,s=oe.getEncodedBits(n);let o,r,a;for(let u=0;u<18;u++)o=Math.floor(u/3),r=u%3+t-8-3,a=(s>>u&1)===1,e.set(o,r,a,!0),e.set(r,o,a,!0)}function he(e,n,t){const s=e.size,o=lo.getEncodedBits(n,t);let r,a;for(r=0;r<15;r++)a=(o>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(s-15+r,8,a,!0),r<8?e.set(8,s-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(s-8,8,1,!0)}function po(e,n){const t=e.size;let s=-1,o=t-1,r=7,a=0;for(let u=t-1;u>0;u-=2)for(u===6&&u--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,u-i)){let d=!1;a<n.length&&(d=(n[a]>>>r&1)===1),e.set(o,u-i,d),r--,r===-1&&(a++,r=7)}if(o+=s,o<0||t<=o){o-=s,s=-s;break}}}function yo(e,n,t){const s=new ro;t.forEach(function(i){s.put(i.mode.bit,4),s.put(i.getLength(),co.getCharCountIndicator(i.mode,e)),i.write(s)});const o=ie.getSymbolTotalCodewords(e),r=Ce.getTotalCodewordsCount(e,n),a=(o-r)*8;for(s.getLengthInBits()+4<=a&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const u=(a-s.getLengthInBits())/8;for(let i=0;i<u;i++)s.put(i%2?17:236,8);return _o(s,e,n)}function _o(e,n,t){const s=ie.getSymbolTotalCodewords(n),o=Ce.getTotalCodewordsCount(n,t),r=s-o,a=Ce.getBlocksCount(n,t),u=s%a,i=a-u,d=Math.floor(s/a),f=Math.floor(r/a),A=f+1,y=d-f,h=new uo(y);let C=0;const c=new Array(a),m=new Array(a);let g=0;const w=new Uint8Array(e.buffer);for(let N=0;N<a;N++){const S=N<i?f:A;c[N]=w.slice(C,C+S),m[N]=h.encode(c[N]),C+=S,g=Math.max(g,S)}const p=new Uint8Array(s);let _=0,E,T;for(E=0;E<g;E++)for(T=0;T<a;T++)E<c[T].length&&(p[_++]=c[T][E]);for(E=0;E<y;E++)for(T=0;T<a;T++)p[_++]=m[T][E];return p}function wo(e,n,t,s){let o;if(Array.isArray(e))o=ge.fromArray(e);else if(typeof e=="string"){let d=n;if(!d){const f=ge.rawSplit(e);d=oe.getBestVersionForData(f,t)}o=ge.fromString(e,d||40)}else throw new Error("Invalid data");const r=oe.getBestVersionForData(o,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!n)n=r;else if(n<r)throw new Error(`
  5. The chosen QR Code version cannot contain this amount of data.
  6. Minimum version required to store current data is: `+r+`.
  7. `);const a=yo(n,t,o),u=ie.getSymbolSize(n),i=new so(u);return fo(i,n),go(i),ho(i,n),he(i,t,0),n>=7&&mo(i,n),po(i,a),isNaN(s)&&(s=we.getBestMask(i,he.bind(null,i,t))),we.applyMask(s,i),he(i,t,s),{modules:i,version:n,errorCorrectionLevel:t,maskPattern:s,segments:o}}Oe.create=function(n,t){if(typeof n>"u"||n==="")throw new Error("No input text");let s=fe.M,o,r;return typeof t<"u"&&(s=fe.from(t.errorCorrectionLevel,fe.M),o=oe.from(t.version),r=we.from(t.maskPattern),t.toSJISFunc&&ie.setToSJISFunction(t.toSJISFunc)),wo(n,o,s,r)};var tt={},be={};(function(e){function n(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let s=t.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+t);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(r){return[r,r]}))),s.length===6&&s.push("F","F");const o=parseInt(s.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+s.slice(0,6).join("")}}e.getOptions=function(s){s||(s={}),s.color||(s.color={});const o=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,r=s.width&&s.width>=21?s.width:void 0,a=s.scale||4;return{width:r,scale:r?4:a,margin:o,color:{dark:n(s.color.dark||"#000000ff"),light:n(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},e.getScale=function(s,o){return o.width&&o.width>=s+o.margin*2?o.width/(s+o.margin*2):o.scale},e.getImageWidth=function(s,o){const r=e.getScale(s,o);return Math.floor((s+o.margin*2)*r)},e.qrToImageData=function(s,o,r){const a=o.modules.size,u=o.modules.data,i=e.getScale(a,r),d=Math.floor((a+r.margin*2)*i),f=r.margin*i,A=[r.color.light,r.color.dark];for(let y=0;y<d;y++)for(let h=0;h<d;h++){let C=(y*d+h)*4,c=r.color.light;if(y>=f&&h>=f&&y<d-f&&h<d-f){const m=Math.floor((y-f)/i),g=Math.floor((h-f)/i);c=A[u[m*a+g]?1:0]}s[C++]=c.r,s[C++]=c.g,s[C++]=c.b,s[C]=c.a}}})(be);(function(e){const n=be;function t(o,r,a){o.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=a,r.width=a,r.style.height=a+"px",r.style.width=a+"px"}function s(){try{return document.createElement("canvas")}catch(o){throw new Error("You need to specify a canvas element")}}e.render=function(r,a,u){let i=u,d=a;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),a||(d=s()),i=n.getOptions(i);const f=n.getImageWidth(r.modules.size,i),A=d.getContext("2d"),y=A.createImageData(f,f);return n.qrToImageData(y.data,r,i),t(A,d,f),A.putImageData(y,0,0),d},e.renderToDataURL=function(r,a,u){let i=u;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),i||(i={});const d=e.render(r,a,i),f=i.type||"image/png",A=i.rendererOpts||{};return d.toDataURL(f,A.quality)}})(tt);var nt={};const Co=be;function Re(e,n){const t=e.a/255,s=n+'="'+e.hex+'"';return t<1?s+" "+n+'-opacity="'+t.toFixed(2).slice(1)+'"':s}function me(e,n,t){let s=e+n;return typeof t<"u"&&(s+=" "+t),s}function Eo(e,n,t){let s="",o=0,r=!1,a=0;for(let u=0;u<e.length;u++){const i=Math.floor(u%n),d=Math.floor(u/n);!i&&!r&&(r=!0),e[u]?(a++,u>0&&i>0&&e[u-1]||(s+=r?me("M",i+t,.5+d+t):me("m",o,0),o=0,r=!1),i+1<n&&e[u+1]||(s+=me("h",a),a=0)):o++}return s}nt.render=function(n,t,s){const o=Co.getOptions(t),r=n.modules.size,a=n.modules.data,u=r+o.margin*2,i=o.color.light.a?"<path "+Re(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",d="<path "+Re(o.color.dark,"stroke")+' d="'+Eo(a,r,o.margin)+'"/>',f='viewBox="0 0 '+u+" "+u+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+f+' shape-rendering="crispEdges">'+i+d+`</svg>
  8. `;return typeof s=="function"&&s(null,y),y};const Ao=Rn,Ee=Oe,ot=tt,Bo=nt;function Se(e,n,t,s,o){const r=[].slice.call(arguments,1),a=r.length,u=typeof r[a-1]=="function";if(!u&&!Ao())throw new Error("Callback required as last argument");if(u){if(a<2)throw new Error("Too few arguments provided");a===2?(o=t,t=n,n=s=void 0):a===3&&(n.getContext&&typeof o>"u"?(o=s,s=void 0):(o=s,s=t,t=n,n=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=n,n=s=void 0):a===2&&!n.getContext&&(s=t,t=n,n=void 0),new Promise(function(i,d){try{const f=Ee.create(t,s);i(e(f,n,s))}catch(f){d(f)}})}try{const i=Ee.create(t,s);o(null,e(i,n,s))}catch(i){o(i)}}$.create=Ee.create;$.toCanvas=Se.bind(null,ot.render);$.toDataURL=Se.bind(null,ot.renderToDataURL);$.toString=Se.bind(null,function(e,n,t){return Bo.render(e,t)});const To="_qrcode_izshm_1",Io="_qrcodeCanvas_izshm_4",No="_qrcodeLogo_izshm_8",bo="_small_izshm_18",ee={qrcode:To,qrcodeCanvas:Io,qrcodeLogo:No,small:bo},So=K({props:{text:{type:String,default:""},size:{type:String,default:"200px"},logoSize:{type:String,default:"default"}},setup(e){const n=qe(),t=()=>{$.toCanvas(n.value,e.text,{margin:1},s=>{s&&console.log(s),console.log("success")})};return st(()=>e.text,()=>{t()}),xe(()=>{at(()=>{t()})}),()=>l("div",{class:ee.qrcode,style:{width:e.size,height:e.size}},[l("canvas",{ref:n,class:ee.qrcodeCanvas},null),l("img",{src:Mn,class:[ee.qrcodeLogo,e.logoSize==="small"&&ee.small]},null)])}}),Po=K({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup(e){return()=>l("div",{class:[v.saveShareImage]},[l("div",{class:[v.shareContaienr]},[l("div",{class:v.schoolName},[e.orderType==="VIP"?"会员购买":"报名缴费"]),l("div",{class:v.shareType},[B("请截图下方二维码"),l("span",null,[B("登录"),e.pay_channel==="wx_pub"?"微信":"支付宝",B("扫码支付")])]),l("div",{class:v.qrcodeSection},[l(So,{text:e.url,logoSize:"small",size:"100%"},null)]),l("div",{class:v.memo},[B("请在30分钟内扫码支付")])]),l("div",{class:[v.tips]},[l("div",{class:v.tipsTitle},[B("使用说明:")]),l("div",{class:v.tipsContent},[B("1.打开"),e.pay_channel==="wx_pub"?"微信":"支付宝",B("扫一扫"),l("br",null,null),B("2.选择相册中的二维码"),l("br",null,null),B("3.请在30分钟内扫码支付")])])])}}),Do=e=>{let n="qrCode";return k().weixin?e=="alipay_qr"||e=="alipay_wap"?n="qrCode":e=="wx_pub"&&(n="pay"):k().alipay&&e=="alipay_wap"?n="pay":n="qrCode",n=="qrCode"?"payDefine":"payResult"},jo=K({name:"order-detail",setup(){const e=it(),n=Ue(),t=ke({paymentType:"adapay",orderTimer:null,paymentStatus:!1,showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderNo:e.query.orderNo,orderInfo:{},goodsInfos:[],config:e.query.config?JSON.parse(e.query.config):{},hasFreight:!e.query.hf,freight:"",agreeStatus:!0,showHeader:!1,authShow:!1,selectGoodsId:null,currentPrice:0,hasInstrument:!1,dialogStatus:!1,dialogMessage:"",submitStatus:!1}),s=Le(()=>t.orderInfo.orderType),o=qe({}),r=async()=>{try{const{data:c}=await q.get("/edu-app/userPaymentOrder/detail/"+t.orderNo),m=c.goodsInfos||[];t.orderInfo=c;let g=!1;m.forEach(w=>{const p=w.goodsUrl?w.goodsUrl.split(",")[0]:"";w.goodsUrl=p,w.goodsType==="INSTRUMENTS"&&(g=!0)}),t.goodsInfos=m,o.value.id||(o.value=c.addresses||{}),t.hasInstrument=g,g?t.freight="到付":t.freight="免运费",c.status!=="WAIT_PAY"&&c.status!=="PAYING"&&(t.dialogStatus=!0,t.dialogMessage="订单"+En[c.status])}catch(c){}},a=c=>{const m=t.config;t.pay_channel=c.pay_channel;const g=ut.stringify({pay_channel:c.pay_channel,wxAppId:m.wxAppId,alipayAppId:m.alipayAppId,paymentType:t.paymentType,body:m.body,price:m.price,orderNo:m.merOrderNo,userId:m.userId});c.payCode==="payResult"?window.location.href=window.location.origin+"/classroom-app/#/payResult?"+g:(t.qrCodeUrl=window.location.origin+"/classroom-app/#/payDefine?"+g,t.showQrcode=!0,t.paymentStatus=!1,setTimeout(()=>{u()},300))},u=async()=>{const c=setInterval(async()=>{if(e.name!="order-detail"){clearInterval(c);return}t.orderTimer=c;try{const{data:m}=await q.post("/edu-app/open/userOrder/paymentStatus/"+t.orderNo,{hideLoading:!0});m.status!=="WAIT_PAY"&&m.status!=="PAYING"&&(t.showQrcode=!1,clearInterval(t.orderTimer),setTimeout(()=>{y()},100))}catch(m){clearInterval(t.orderTimer)}},5e3)},i=async()=>{clearInterval(t.orderTimer),s.value==="VIP"?f(d):A(d)},d=()=>{const c=t.pay_channel;if(c){const m=Do(t.pay_channel);a({payCode:m,pay_channel:c})}else s.value==="VIP"?t.paymentStatus=!0:a({payCode:"payResult",pay_channel:"wx_pub"})},f=async c=>{try{if(!t.agreeStatus){le("请先阅读并同意《音乐数字课堂服务协议》");return}const m=G.user.data;if(!(m!=null&&m.account.realName)||!(m!=null&&m.account.idCardNo)){t.authShow=!0;return}t.submitStatus=!0;const{data:g}=await q.post("/edu-app/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:t.orderNo,orderType:"VIP"}});t.pay_channel=g.paymentChannel,g.status!=="WAIT_PAY"&&g.status!=="PAYING"?n.replace({path:"/payment-result",query:{orderNo:t.orderNo}}):(c&&c(),t.submitStatus=!1)}catch(m){t.submitStatus=!1}},A=async c=>{if(!o.value.id&&t.hasInstrument){le("请选择收货地址");return}if(!t.agreeStatus){le("请先阅读并同意《音乐数字课堂服务协议》");return}const m=G.user.data;if(!(m!=null&&m.account.realName)||!(m!=null&&m.account.idCardNo)){t.authShow=!0;return}t.submitStatus=!0;try{const{data:g}=await q.post("/edu-app/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:t.orderNo,orderType:"SCHOOL_REGISTER",receiveAddress:o.value.id||""}});t.pay_channel=g.paymentChannel,g.status!=="WAIT_PAY"&&g.status!=="PAYING"?y():(c&&c(),t.submitStatus=!1)}catch(g){t.submitStatus=!1}},y=()=>{n.replace({path:"/payment-result",query:{orderNo:t.orderNo}})},h=async()=>{try{await q.post("/edu-app/userPaymentOrder/cancelPayment/"+t.orderNo),n.back()}catch(c){}},C=()=>{t.authShow=!1,i()};return xe(()=>{k().isApp?t.showHeader=!0:t.showHeader=!1;let c=sessionStorage.getItem("addressDetails");c=c?JSON.parse(c):{},o.value=c,sessionStorage.removeItem("addressDetails"),r()}),()=>l(pe,null,[k().isApp&&l(ze,{border:!1},null),l("div",{class:I.cartConfirm},[t.hasInstrument&&l("div",{class:I.cartConfirmBox},[l(sn,{item:o.value},null)]),l(Be,{style:{margin:0},border:!1},{default:()=>[t.goodsInfos&&t.goodsInfos.map(c=>l(x,{class:I.cellItem},{icon:()=>l(ht,{class:I.img,src:c.goodsUrl},null),title:()=>l("div",{class:I.goodsContent},[l("h2",null,[l("span",null,[c.goodsName]),l("span",{class:I.goodsNum},[B("x "),c.goodsNum])]),l("div",{class:I.goodsPrice},[l(Ve,{class:I.brandName},{default:()=>[c.goodsType==="VIP"?"12个月":c.brandName]}),l("span",{class:[I.goodsNums,c.paymentCashAmount>0?I.numFont:I.free]},[c.paymentCashAmount>0?l(pe,null,[l("span",{class:I.numPrefix},[B("¥ ")]),ye(c.paymentCashAmount)]):"免费"])]),l("p",{class:I.model},[c.description])])}))]}),t.hasInstrument&&l(x,{class:I.freight,title:"运费",value:t.freight},null)]),l(lt,{position:"bottom"},{default:()=>[l("div",{class:I.paymentContainer},[l("div",{class:I.payemntPrice},[l("p",{class:I.needPrice},[B("支付金额:"),l("span",null,[l("i",null,[B("¥")]),ye(t.orderInfo.currentPrice)])])]),l("div",{class:I.paymentBtn},[l(Ae,{round:!0,class:[I.submitBtn],onClick:i,loading:t.submitStatus,disabled:t.submitStatus},{default:()=>[B("提交")]})])])]}),l(Pe,{show:t.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[l(mn,{paymentConfig:t.orderInfo,onClose:()=>t.paymentStatus=!1,onBackOut:h,onConfirm:c=>a(c)},null)]}),l(Pe,{show:t.showQrcode,"onUpdate:show":c=>t.showQrcode=c,round:!0,onClose:()=>{clearInterval(t.orderTimer)}},{default:()=>[l(Po,{url:t.qrCodeUrl,pay_channel:t.pay_channel,orderType:s.value},null)]}),l(dt,{modelValue:t.authShow,"onUpdate:modelValue":c=>t.authShow=c},{default:()=>[l(Cn,{onSuccess:C,hideHeader:!k().isApp},null)]}),l(gt,{title:"提示",show:t.dialogStatus,"onUpdate:show":c=>t.dialogStatus=c,message:t.dialogMessage,confirmButtonText:"确定",onConfirm:()=>{y()}},null)])}});export{jo as default};