12345678 |
- import{d as K,q as Ut,e as Lt,a as l,A as B,I as et,F as pt,x as kt,P as yt,C as At,Q as re,R as k,M as G,D as q,S as zt,r as qt,w as se,y as xt,z as ae,U as ie,V as Pt,E as lt}from"./index-74aaacd7.js";import{C as x}from"./index-baa1bd27.js";import{T as Vt}from"./index-2205fe72.js";import{M as ue}from"./index-d2dfee14.js";import{R as le,a as Dt}from"./index-27664518.js";import{C as Bt}from"./index-4b0636c3.js";import{O as ce}from"./index-cfc4be47.js";import{F as de}from"./index-1237e8dc.js";import{F as Ft}from"./index-5fc0aef0.js";import{q as fe}from"./base-aba1ba3e.js";import{O as ge}from"./index-5703240b.js";import{I as he}from"./index-418977f3.js";import"./index-cc31fe60.js";import"./Checker-c7853573.js";const me="_cartConfirm_1c37u_1",pe="_cartConfirmBox_1c37u_9",ye="_cartItem_1c37u_15",_e="_mlr13_1c37u_24",we="_protocol_1c37u_28",Ce="_paymentContainer_1c37u_36",Ee="_needPrice_1c37u_48",Ae="_allPrice_1c37u_64",Be="_cellItem_1c37u_72",Te="_img_1c37u_77",Ie="_cellPrice_1c37u_85",Ne="_numFont_1c37u_91",be="_numPrefix_1c37u_94",Se="_goodsContent_1c37u_98",Pe="_goodsNum_1c37u_98",De="_goodsPrice_1c37u_104",Fe="_free_1c37u_110",ve="_goodsNums_1c37u_113",Me="_brandName_1c37u_128",Re="_model_1c37u_137",Ue="_popupCode_1c37u_143",Le="_codeContainer_1c37u_147",ke="_codeClose_1c37u_150",ze="_codeImg_1c37u_160",qe="_codeTitle_1c37u_167",xe="_codeName_1c37u_175",Ve="_codeQr_1c37u_182",Oe="_codeBtnText_1c37u_195",He="_codeTips_1c37u_206",je="_tipsTitle_1c37u_220",Ke="_close_1c37u_226",Je="_codeBottom_1c37u_231",Ge="_title_1c37u_238",Ye="_shareImg_1c37u_253",Qe="_shareText_1c37u_257",$e="_freight_1c37u_263",Xe="_submitBtn_1c37u_275",I={cartConfirm:me,cartConfirmBox:pe,cartItem:ye,mlr13:_e,protocol:we,paymentContainer:Ce,needPrice:Ee,allPrice:Ae,cellItem:Be,img:Te,cellPrice:Ie,numFont:Ne,numPrefix:be,goodsContent:Se,goodsNum:Pe,goodsPrice:De,free:Fe,goodsNums:ve,brandName:Me,model:Re,popupCode:Ue,codeContainer:Le,codeClose:ke,codeImg:ze,codeTitle:qe,codeName:xe,codeQr:Ve,codeBtnText:Oe,codeTips:He,tipsTitle:je,close:Ke,codeBottom:Je,title:Ge,shareImg:Ye,shareText:Qe,freight:$e,submitBtn:Xe},Ze="_cellEntry_1kuxn_1",We="_cell_1kuxn_1",tn="_userName_1kuxn_36",en="_phone_1kuxn_41",nn="_addressInfo_1kuxn_46",on="_emtry_1kuxn_51",z={cellEntry:Ze,cell:We,userName:tn,phone:en,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:t=>{}}},setup(t){const n=Ut(),e=Lt(()=>[t.item.provinceName,t.item.cityName,t.item.regionName,t.item.detailAddress].join("")),s=()=>{t.isLink&&n.push("/shopAddress")};return()=>l(pt,null,[t.item&&t.item.phoneNumber?l(x,{class:z.cell,"is-link":t.isLink,onClick:()=>s(),titleStyle:{marginLeft:"0"}},{title:()=>l("div",null,[l("span",{class:z.userName},[t.item.name]),l("span",{class:z.phone},[t.item&&t.item.phoneNumber&&t.item.phoneNumber.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")]),t.item.defaultStatus&&l(Vt,{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},[e.value])}):l(x,{class:z.cell,"is-link":t.isLink,onClick:()=>s()},{icon:()=>l(et,{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(t,{slots:n,attrs:e,emit:s}){const o=kt({payType:"wx",pay_channel:""}),r=()=>{re({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(et,{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("¥ ")]),yt(t.paymentConfig.currentPrice)])]),l(le,{modelValue:o.payType,"onUpdate:modelValue":d=>o.payType=d},{default:()=>[l(Bt,{border:!1},{default:()=>[l(x,{border:!0,center:!0,onClick:()=>{o.payType="wx"}},{icon:()=>l(et,{name:"wechat-pay",color:"#15c434",size:22},null),"right-icon":()=>l(Dt,{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(et,{name:"alipay",color:"#009fe9",size:22},null),"right-icon":()=>l(Dt,{name:"zfb"},null)})]})]}),l("div",{class:R.blank},null),l(At,{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",ct={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 t=G.user.data;this.form.realName=t==null?void 0:t.account.realName},methods:{async onSubmit(){try{const t="/edu-app/sysAccount/realNameAuth";await q.post(t,{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(t){}}},render(){return l(de,{class:ct.userAuth,onSubmit:this.onSubmit},{default:()=>[!this.hideHeader&&l(zt,{title:"实名认证"},null),l(Bt,{inset:!0,class:ct.cellGroup},{default:()=>[l(Ft,{required:!0,label:"真实姓名",modelValue:this.form.realName,"onUpdate:modelValue":t=>this.form.realName=t,rules:[{required:!0,message:"请填写真实姓名"}],name:"realName",placeholder:"请填写真实姓名",autocomplete:"off",maxlength:"50"},null),l(Ft,{required:!0,label:"身份证号",modelValue:this.form.idCardNo,"onUpdate:modelValue":t=>this.form.idCardNo=t,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(At,{block:!0,round:!0,type:"primary","native-type":"submit",class:ct.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},Ot={},b={};let Tt;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(t){let n=0;for(;t!==0;)n++,t>>>=1;return n};b.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');Tt=n};b.isKanjiModeEnabled=function(){return typeof Tt<"u"};b.toSJIS=function(n){return Tt(n)};var rt={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function n(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.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: "+e)}}t.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},t.from=function(s,o){if(t.isValid(s))return s;try{return n(s)}catch(r){return o}}})(rt);function Ht(){this.buffer=[],this.length=0}Ht.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let e=0;e<n;e++)this.putBit((t>>>n-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}};var Ln=Ht;function X(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)}X.prototype.set=function(t,n,e,s){const o=t*this.size+n;this.data[o]=e,s&&(this.reservedBit[o]=!0)};X.prototype.get=function(t,n){return this.data[t*this.size+n]};X.prototype.xor=function(t,n,e){this.data[t*this.size+n]^=e};X.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]};var kn=X,jt={};(function(t){const n=b.getSymbolSize;t.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()},t.getPositions=function(s){const o=[],r=t.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}})(jt);var Kt={};const zn=b.getSymbolSize,vt=7;Kt.getPositions=function(n){const e=zn(n);return[[0,0],[e-vt,0],[0,e-vt]]};var Jt={};(function(t){t.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};t.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const 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},t.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},t.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},t.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 e(s,o,r){switch(s){case t.Patterns.PATTERN000:return(o+r)%2===0;case t.Patterns.PATTERN001:return o%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(o+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return o*r%2+o*r%3===0;case t.Patterns.PATTERN110:return(o*r%2+o*r%3)%2===0;case t.Patterns.PATTERN111:return(o*r%3+(o+r)%2)%2===0;default:throw new Error("bad maskPattern:"+s)}}t.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,e(o,i,u))},t.getBestMask=function(o,r){const a=Object.keys(t.Patterns).length;let u=0,i=1/0;for(let d=0;d<a;d++){r(d),t.applyMask(d,o);const f=t.getPenaltyN1(o)+t.getPenaltyN2(o)+t.getPenaltyN3(o)+t.getPenaltyN4(o);t.applyMask(d,o),f<i&&(i=f,u=d)}return u}})(Jt);var st={};const U=rt,Z=[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],W=[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];st.getBlocksCount=function(n,e){switch(e){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}};st.getTotalCodewordsCount=function(n,e){switch(e){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}};var Gt={},at={};const Y=new Uint8Array(512),nt=new Uint8Array(256);(function(){let n=1;for(let e=0;e<255;e++)Y[e]=n,nt[n]=e,n<<=1,n&256&&(n^=285);for(let e=255;e<512;e++)Y[e]=Y[e-255]})();at.log=function(n){if(n<1)throw new Error("log("+n+")");return nt[n]};at.exp=function(n){return Y[n]};at.mul=function(n,e){return n===0||e===0?0:Y[nt[n]+nt[e]]};(function(t){const n=at;t.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},t.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},t.generateECPolynomial=function(s){let o=new Uint8Array([1]);for(let r=0;r<s;r++)o=t.mul(o,new Uint8Array([1,n.exp(r)]));return o}})(Gt);const Yt=Gt;function It(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}It.prototype.initialize=function(n){this.degree=n,this.genPoly=Yt.generateECPolynomial(this.degree)};It.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(n.length+this.degree);e.set(n);const s=Yt.mod(e,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=It,Qt={},L={},Nt={};Nt.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40};var D={};const $t="[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
- ]))+`;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($t,"g");D.ALPHANUMERIC=new RegExp(xn,"g");const On=new RegExp("^"+Q+"$"),Hn=new RegExp("^"+$t+"$"),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(t){const n=Nt,e=D;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(r,a){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?r.ccBits[0]:a<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return e.testNumeric(r)?t.NUMERIC:e.testAlphanumeric(r)?t.ALPHANUMERIC:e.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 s(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,a){if(t.isValid(r))return r;try{return s(r)}catch(u){return a}}})(L);(function(t){const n=b,e=st,s=rt,o=L,r=Nt,a=7973,u=n.getBCHDigit(a);function i(y,h,C){for(let c=1;c<=40;c++)if(h<=t.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)<=t.getCapacity(C,h,o.MIXED))return C}t.from=function(h,C){return r.isValid(h)?parseInt(h,10):C},t.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=e.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)}},t.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)},t.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}})(Qt);var Xt={};const _t=b,Zt=1335,Kn=21522,Mt=_t.getBCHDigit(Zt);Xt.getEncodedBits=function(n,e){const s=n.bit<<3|e;let o=s<<10;for(;_t.getBCHDigit(o)-Mt>=0;)o^=Zt<<_t.getBCHDigit(o)-Mt;return(s<<10|o)^Kn};var Wt={};const Jn=L;function V(t){this.mode=Jn.NUMERIC,this.data=t.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 e,s,o;for(e=0;e+3<=this.data.length;e+=3)s=this.data.substr(e,3),o=parseInt(s,10),n.put(o,10);const r=this.data.length-e;r>0&&(s=this.data.substr(e),o=parseInt(s,10),n.put(o,r*3+1))};var Gn=V;const Yn=L,dt=["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(t){this.mode=Yn.ALPHANUMERIC,this.data=t}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 e;for(e=0;e+2<=this.data.length;e+=2){let s=dt.indexOf(this.data[e])*45;s+=dt.indexOf(this.data[e+1]),n.put(s,11)}this.data.length%2&&n.put(dt.indexOf(this.data[e]),6)};var Qn=O,$n=function(n){for(var e=[],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){e.push(r);continue}if(r<2048){e.push(r>>6|192),e.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){e.push(r>>12|224),e.push(r>>6&63|128),e.push(r&63|128);continue}if(r>=65536&&r<=1114111){e.push(r>>18|240),e.push(r>>12&63|128),e.push(r>>6&63|128),e.push(r&63|128);continue}e.push(239,191,189)}return new Uint8Array(e).buffer};const Xn=$n,Zn=L;function H(t){this.mode=Zn.BYTE,typeof t=="string"&&(t=Xn(t)),this.data=new Uint8Array(t)}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(t){for(let n=0,e=this.data.length;n<e;n++)t.put(this.data[n],8)};var Wn=H;const to=L,eo=b;function j(t){this.mode=to.KANJI,this.data=t}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(t){let n;for(n=0;n<this.data.length;n++){let e=eo.toSJIS(this.data[n]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
- Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),t.put(e,13)}};var no=j,te={exports:{}};(function(t){var n={single_source_shortest_paths:function(e,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=e[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(e,s){for(var o=[],r=s;r;)o.push(r),e[r],r=e[r];return o.reverse(),o},find_path:function(e,s,o){var r=n.single_source_shortest_paths(e,s,o);return n.extract_shortest_path_from_predecessor_list(r,o)},PriorityQueue:{make:function(e){var s=n.PriorityQueue,o={},r;e=e||{};for(r in s)s.hasOwnProperty(r)&&(o[r]=s[r]);return o.queue=[],o.sorter=e.sorter||s.default_sorter,o},default_sorter:function(e,s){return e.cost-s.cost},push:function(e,s){var o={value:e,cost:s};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=n})(te);var oo=te.exports;(function(t){const n=L,e=Gn,s=Qn,o=Wn,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 e.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 ut=0;ut<E.length;ut++){const F=E[ut];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)+`.
- Suggested mode is: `+n.toString(_));switch(p===n.KANJI&&!u.isKanjiModeEnabled()&&(p=n.BYTE),p){case n.NUMERIC:return new e(g);case n.ALPHANUMERIC:return new s(g);case n.KANJI:return new r(g);case n.BYTE:return new o(g)}}t.fromArray=function(w){return w.reduce(function(p,_){return typeof _=="string"?p.push(m(_,null)):_.data&&p.push(m(_.data,_.mode)),p},[])},t.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 t.fromArray(h(S))},t.rawSplit=function(w){return t.fromArray(A(w,u.isKanjiModeEnabled()))}})(Wt);const it=b,ft=rt,ro=Ln,so=kn,ao=jt,io=Kt,wt=Jt,Ct=st,uo=qn,ot=Qt,lo=Xt,co=L,gt=Wt;function fo(t,n){const e=t.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||e<=r+u))for(let i=-1;i<=7;i++)a+i<=-1||e<=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?t.set(r+u,a+i,!0,!0):t.set(r+u,a+i,!1,!0))}}function go(t){const n=t.size;for(let e=8;e<n-8;e++){const s=e%2===0;t.set(e,6,s,!0),t.set(6,e,s,!0)}}function ho(t,n){const e=ao.getPositions(n);for(let s=0;s<e.length;s++){const o=e[s][0],r=e[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?t.set(o+a,r+u,!0,!0):t.set(o+a,r+u,!1,!0)}}function mo(t,n){const e=t.size,s=ot.getEncodedBits(n);let o,r,a;for(let u=0;u<18;u++)o=Math.floor(u/3),r=u%3+e-8-3,a=(s>>u&1)===1,t.set(o,r,a,!0),t.set(r,o,a,!0)}function ht(t,n,e){const s=t.size,o=lo.getEncodedBits(n,e);let r,a;for(r=0;r<15;r++)a=(o>>r&1)===1,r<6?t.set(r,8,a,!0):r<8?t.set(r+1,8,a,!0):t.set(s-15+r,8,a,!0),r<8?t.set(8,s-r-1,a,!0):r<9?t.set(8,15-r-1+1,a,!0):t.set(8,15-r-1,a,!0);t.set(s-8,8,1,!0)}function po(t,n){const e=t.size;let s=-1,o=e-1,r=7,a=0;for(let u=e-1;u>0;u-=2)for(u===6&&u--;;){for(let i=0;i<2;i++)if(!t.isReserved(o,u-i)){let d=!1;a<n.length&&(d=(n[a]>>>r&1)===1),t.set(o,u-i,d),r--,r===-1&&(a++,r=7)}if(o+=s,o<0||e<=o){o-=s,s=-s;break}}}function yo(t,n,e){const s=new ro;e.forEach(function(i){s.put(i.mode.bit,4),s.put(i.getLength(),co.getCharCountIndicator(i.mode,t)),i.write(s)});const o=it.getSymbolTotalCodewords(t),r=Ct.getTotalCodewordsCount(t,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,t,n)}function _o(t,n,e){const s=it.getSymbolTotalCodewords(n),o=Ct.getTotalCodewordsCount(n,e),r=s-o,a=Ct.getBlocksCount(n,e),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(t.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(t,n,e,s){let o;if(Array.isArray(t))o=gt.fromArray(t);else if(typeof t=="string"){let d=n;if(!d){const f=gt.rawSplit(t);d=ot.getBestVersionForData(f,e)}o=gt.fromString(t,d||40)}else throw new Error("Invalid data");const r=ot.getBestVersionForData(o,e);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(`
- The chosen QR Code version cannot contain this amount of data.
- Minimum version required to store current data is: `+r+`.
- `);const a=yo(n,e,o),u=it.getSymbolSize(n),i=new so(u);return fo(i,n),go(i),ho(i,n),ht(i,e,0),n>=7&&mo(i,n),po(i,a),isNaN(s)&&(s=wt.getBestMask(i,ht.bind(null,i,e))),wt.applyMask(s,i),ht(i,e,s),{modules:i,version:n,errorCorrectionLevel:e,maskPattern:s,segments:o}}Ot.create=function(n,e){if(typeof n>"u"||n==="")throw new Error("No input text");let s=ft.M,o,r;return typeof e<"u"&&(s=ft.from(e.errorCorrectionLevel,ft.M),o=ot.from(e.version),r=wt.from(e.maskPattern),e.toSJISFunc&&it.setToSJISFunction(e.toSJISFunc)),wo(n,o,s,r)};var ee={},bt={};(function(t){function n(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let s=e.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+e);(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("")}}t.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||{}}},t.getScale=function(s,o){return o.width&&o.width>=s+o.margin*2?o.width/(s+o.margin*2):o.scale},t.getImageWidth=function(s,o){const r=t.getScale(s,o);return Math.floor((s+o.margin*2)*r)},t.qrToImageData=function(s,o,r){const a=o.modules.size,u=o.modules.data,i=t.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}}})(bt);(function(t){const n=bt;function e(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")}}t.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),e(A,d,f),A.putImageData(y,0,0),d},t.renderToDataURL=function(r,a,u){let i=u;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),i||(i={});const d=t.render(r,a,i),f=i.type||"image/png",A=i.rendererOpts||{};return d.toDataURL(f,A.quality)}})(ee);var ne={};const Co=bt;function Rt(t,n){const e=t.a/255,s=n+'="'+t.hex+'"';return e<1?s+" "+n+'-opacity="'+e.toFixed(2).slice(1)+'"':s}function mt(t,n,e){let s=t+n;return typeof e<"u"&&(s+=" "+e),s}function Eo(t,n,e){let s="",o=0,r=!1,a=0;for(let u=0;u<t.length;u++){const i=Math.floor(u%n),d=Math.floor(u/n);!i&&!r&&(r=!0),t[u]?(a++,u>0&&i>0&&t[u-1]||(s+=r?mt("M",i+e,.5+d+e):mt("m",o,0),o=0,r=!1),i+1<n&&t[u+1]||(s+=mt("h",a),a=0)):o++}return s}ne.render=function(n,e,s){const o=Co.getOptions(e),r=n.modules.size,a=n.modules.data,u=r+o.margin*2,i=o.color.light.a?"<path "+Rt(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",d="<path "+Rt(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>
- `;return typeof s=="function"&&s(null,y),y};const Ao=Rn,Et=Ot,oe=ee,Bo=ne;function St(t,n,e,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=e,e=n,n=s=void 0):a===3&&(n.getContext&&typeof o>"u"?(o=s,s=void 0):(o=s,s=e,e=n,n=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(e=n,n=s=void 0):a===2&&!n.getContext&&(s=e,e=n,n=void 0),new Promise(function(i,d){try{const f=Et.create(e,s);i(t(f,n,s))}catch(f){d(f)}})}try{const i=Et.create(e,s);o(null,t(i,n,s))}catch(i){o(i)}}$.create=Et.create;$.toCanvas=St.bind(null,oe.render);$.toDataURL=St.bind(null,oe.renderToDataURL);$.toString=St.bind(null,function(t,n,e){return Bo.render(t,e)});const To="_qrcode_izshm_1",Io="_qrcodeCanvas_izshm_4",No="_qrcodeLogo_izshm_8",bo="_small_izshm_18",tt={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(t){const n=qt(),e=()=>{$.toCanvas(n.value,t.text,{margin:1},s=>{s&&console.log(s),console.log("success")})};return se(()=>t.text,()=>{e()}),xt(()=>{ae(()=>{e()})}),()=>l("div",{class:tt.qrcode,style:{width:t.size,height:t.size}},[l("canvas",{ref:n,class:tt.qrcodeCanvas},null),l("img",{src:Mn,class:[tt.qrcodeLogo,t.logoSize==="small"&&tt.small]},null)])}}),Po=K({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup(t){return()=>l("div",{class:[v.saveShareImage]},[l("div",{class:[v.shareContaienr]},[l("div",{class:v.schoolName},[t.orderType==="VIP"?"会员购买":"报名缴费"]),l("div",{class:v.shareType},[B("请截图下方二维码"),l("span",null,[B("登录"),t.pay_channel==="wx_pub"?"微信":"支付宝",B("扫码支付")])]),l("div",{class:v.qrcodeSection},[l(So,{text:t.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.打开"),t.pay_channel==="wx_pub"?"微信":"支付宝",B("扫一扫"),l("br",null,null),B("2.选择相册中的二维码"),l("br",null,null),B("3.请在30分钟内扫码支付")])])])}}),Do=t=>{let n="qrCode";return k().weixin?t=="alipay_qr"||t=="alipay_wap"?n="qrCode":t=="wx_pub"&&(n="pay"):k().alipay&&t=="alipay_wap"?n="pay":n="qrCode",n=="qrCode"?"payDefine":"payResult"},Ko=K({name:"order-detail",setup(){const t=ie(),n=Ut(),e=kt({paymentType:"adapay",orderTimer:null,paymentStatus:!1,showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderNo:t.query.orderNo,orderInfo:{},goodsInfos:[],config:t.query.config?JSON.parse(t.query.config):{},hasFreight:!t.query.hf,freight:"",agreeStatus:!0,showHeader:!1,authShow:!1,selectGoodsId:null,currentPrice:0,hasInstrument:!1,dialogStatus:!1,dialogMessage:"",submitStatus:!1}),s=Lt(()=>e.orderInfo.orderType),o=qt({}),r=async()=>{try{const{data:c}=await q.get("/edu-app/userPaymentOrder/detail/"+e.orderNo),m=c.goodsInfos||[];e.orderInfo=c;let g=!1;m.forEach(w=>{const p=w.goodsUrl?w.goodsUrl.split(",")[0]:"";w.goodsUrl=p,w.goodsType==="INSTRUMENTS"&&(g=!0)}),e.goodsInfos=m,o.value.id||(o.value=c.addresses||{}),e.hasInstrument=g,g?e.freight="到付":e.freight="免运费",c.status!=="WAIT_PAY"&&c.status!=="PAYING"&&(e.dialogStatus=!0,e.dialogMessage="订单"+En[c.status])}catch(c){}},a=c=>{const m=e.config;e.pay_channel=c.pay_channel;const g=fe.stringify({pay_channel:c.pay_channel,wxAppId:m.wxAppId,alipayAppId:m.alipayAppId,paymentType:e.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:(e.qrCodeUrl=window.location.origin+"/classroom-app/#/payDefine?"+g,e.showQrcode=!0,e.paymentStatus=!1,setTimeout(()=>{u()},300))},u=async()=>{const c=setInterval(async()=>{if(t.name!="order-detail"){clearInterval(c);return}e.orderTimer=c;try{const{data:m}=await q.post("/edu-app/open/userOrder/paymentStatus/"+e.orderNo,{hideLoading:!0});m.status!=="WAIT_PAY"&&m.status!=="PAYING"&&(e.showQrcode=!1,clearInterval(e.orderTimer),setTimeout(()=>{y()},100))}catch(m){clearInterval(e.orderTimer)}},5e3)},i=async()=>{clearInterval(e.orderTimer),s.value==="VIP"?f(d):A(d)},d=()=>{const c=e.pay_channel;if(c){const m=Do(e.pay_channel);a({payCode:m,pay_channel:c})}else s.value==="VIP"?e.paymentStatus=!0:a({payCode:"payResult",pay_channel:"wx_pub"})},f=async c=>{try{if(!e.agreeStatus){lt("请先阅读并同意《音乐数字课堂服务协议》");return}const m=G.user.data;if(!(m!=null&&m.account.realName)||!(m!=null&&m.account.idCardNo)){e.authShow=!0;return}e.submitStatus=!0;const{data:g}=await q.post("/edu-app/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:e.orderNo,orderType:"VIP"}});e.pay_channel=g.paymentChannel,g.status!=="WAIT_PAY"&&g.status!=="PAYING"?n.replace({path:"/payment-result",query:{orderNo:e.orderNo}}):(c&&c(),e.submitStatus=!1)}catch(m){e.submitStatus=!1}},A=async c=>{if(!o.value.id&&e.hasInstrument){lt("请选择收货地址");return}if(!e.agreeStatus){lt("请先阅读并同意《音乐数字课堂服务协议》");return}const m=G.user.data;if(!(m!=null&&m.account.realName)||!(m!=null&&m.account.idCardNo)){e.authShow=!0;return}e.submitStatus=!0;try{const{data:g}=await q.post("/edu-app/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:e.orderNo,orderType:"SCHOOL_REGISTER",receiveAddress:o.value.id||""}});e.pay_channel=g.paymentChannel,g.status!=="WAIT_PAY"&&g.status!=="PAYING"?y():(c&&c(),e.submitStatus=!1)}catch(g){e.submitStatus=!1}},y=()=>{n.replace({path:"/payment-result",query:{orderNo:e.orderNo}})},h=async()=>{try{await q.post("/edu-app/userPaymentOrder/cancelPayment/"+e.orderNo),n.back()}catch(c){}},C=()=>{e.authShow=!1,i()};return xt(()=>{k().isApp?e.showHeader=!0:e.showHeader=!1;let c=sessionStorage.getItem("addressDetails");c=c?JSON.parse(c):{},o.value=c,sessionStorage.removeItem("addressDetails"),r()}),()=>l(pt,null,[k().isApp&&l(zt,{border:!1},null),l("div",{class:I.cartConfirm},[e.hasInstrument&&l("div",{class:I.cartConfirmBox},[l(sn,{item:o.value},null)]),l(Bt,{style:{margin:0},border:!1},{default:()=>[e.goodsInfos&&e.goodsInfos.map(c=>l(x,{class:I.cellItem},{icon:()=>l(he,{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(Vt,{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(pt,null,[l("span",{class:I.numPrefix},[B("¥ ")]),yt(c.paymentCashAmount)]):"免费"])]),l("p",{class:I.model},[c.description])])}))]}),e.hasInstrument&&l(x,{class:I.freight,title:"运费",value:e.freight},null)]),l(ue,{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("¥")]),yt(e.orderInfo.currentPrice)])])]),l("div",{class:I.paymentBtn},[l(At,{round:!0,class:[I.submitBtn],onClick:i,loading:e.submitStatus,disabled:e.submitStatus},{default:()=>[B("提交")]})])])]}),l(Pt,{show:e.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[l(mn,{paymentConfig:e.orderInfo,onClose:()=>e.paymentStatus=!1,onBackOut:h,onConfirm:c=>a(c)},null)]}),l(Pt,{show:e.showQrcode,"onUpdate:show":c=>e.showQrcode=c,round:!0,onClose:()=>{clearInterval(e.orderTimer)}},{default:()=>[l(Po,{url:e.qrCodeUrl,pay_channel:e.pay_channel,orderType:s.value},null)]}),l(ce,{modelValue:e.authShow,"onUpdate:modelValue":c=>e.authShow=c},{default:()=>[l(Cn,{onSuccess:C,hideHeader:!k().isApp},null)]}),l(ge,{title:"提示",show:e.dialogStatus,"onUpdate:show":c=>e.dialogStatus=c,message:e.dialogMessage,confirmButtonText:"确定",onConfirm:()=>{y()}},null)])}});export{Ko as default};
|