mirror of
https://github.com/vastxie/99AI.git
synced 2024-11-16 03:32:42 +08:00
47 lines
88 KiB
JavaScript
47 lines
88 KiB
JavaScript
var wt=Object.defineProperty;var _t=(u,s,n)=>s in u?wt(u,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[s]=n;var Ee=(u,s,n)=>(_t(u,typeof s!="symbol"?s+"":s,n),n);import{u as xe,a as se,f as $t,b as tt,c as St,t as m,d as Ct,e as Ie,s as ke,g as It,h as zt,i as Tt,j as Lt,k as Rt,l as Pt,m as nt,n as Mt,p as At,o as Pe,q as Me,r as st,R as Dt,v as Nt,w as Bt,_ as jt,x as Ut,y as Et}from"./index-d64a7cc4.js";import{C as Ae,Q as qe}from"./index-03531f8f.js";import{p as at,e as re,q as De,r as ve,s as it,t as lt,v as we,w as ze,d as rt,x as Oe,y as qt,z as Ne,A as He,B as ot,C as Re,D as Ot,E as Ht,F as Wt,G as Qt,H as Gt}from"./naive-ui-fedd20b1.js";import{d as ne,e as f,S as p,U as C,X as S,W as M,a3 as l,m as We,c as V,a4 as _,M as o,r as N,V as W,a5 as D,H as Be,F as ce,a6 as me,f as Te,k as ae,a7 as ie,a8 as J,o as Vt,n as ct,w as Le,h as Zt,x as Qe,z as Ft,a9 as ut,aa as Jt,P as Xt}from"./vue-10b4afc0.js";import{f as Yt}from"./crami-99ee44eb.js";import{f as dt,a as Kt}from"./order-8be5c617.js";import{u as le}from"./useBasicLayout-a4f17bae.js";import{C as en}from"./Close-d2230b2f.js";import{_ as gt}from"./index.vue_vue_type_script_setup_true_lang-f425914e.js";import{S as tn,U as Ge,M as nn,b as fe,D as sn,A as an,C as ln,a as rn,c as on,L as cn,g as un}from"./menu-19bde8fc.js";import"./vueuse-motion-d4cdaf7b.js";import"./_plugin-vue_export-helper-c27b6911.js";const dn={key:0},gn={key:1},pn=ne({__name:"index",props:{tooltip:{default:""},placement:{default:"bottom"}},emits:["click"],setup(u,{emit:s}){const n=u,e=s,a=f(()=>!!n.tooltip);function i(){e("click")}return(r,c)=>a.value?(p(),C("div",dn,[S(o(at),{placement:r.placement,trigger:"hover"},{trigger:M(()=>[l("button",{onClick:i},[We(r.$slots,"default")])]),default:M(()=>[V(" "+_(r.tooltip),1)]),_:3},8,["placement"])])):(p(),C("div",gn,[l("button",{onClick:i},[We(r.$slots,"default")])]))}}),hn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},fn=l("path",{d:"M53.12 199.94l400-151.39a8 8 0 0 1 10.33 10.33l-151.39 400a8 8 0 0 1-15-.34l-67.4-166.09a16 16 0 0 0-10.11-10.11L53.46 215a8 8 0 0 1-.34-15.06z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),mn=l("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M460 52L227 285"},null,-1),xn=[fn,mn],pt=ne({name:"PaperPlaneOutline",render:function(s,n){return p(),C("svg",hn,xn)}}),yn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},vn=l("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),bn=l("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),kn=l("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M88 176v112"},null,-1),wn=l("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),_n=[vn,bn,kn,wn],$n=ne({name:"PersonAddOutline",render:function(s,n){return p(),C("svg",yn,_n)}}),Sn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Cn=l("path",{d:"M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),In=l("path",{d:"M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),zn=l("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 232H32"},null,-1),Tn=[Cn,In,zn],Ln=ne({name:"PersonRemoveOutline",render:function(s,n){return p(),C("svg",Sn,Tn)}}),Rn={class:"p-5 bg-white rounded dark:bg-slate-800"},Pn={class:"flex text-xl font-bold mb-[20px] bg-currentflex items-center"},Mn=l("span",{class:"ml-[8px]"},"绑定微信账户",-1),An={style:{"white-space":"nowrap"},class:"w-full text-center font-bold text-sm py-5"},Dn={class:"w-[55px] inline-block text-[red] text-left"},Nn={class:"my-2 flex justify-center relative"},Bn=l("span",{class:"flex items-center justify-center text-base py-5"}," 打开微信扫码绑定账户 ",-1),jn=ne({__name:"BindWx",props:{visible:{type:Boolean}},setup(u){const s=xe();let n;const e=N(),a=se(),i=N(!1),r=N(""),c=N(""),d=re();async function y(){const z=await $t();z.success&&(c.value=z.data,k())}async function k(){const z=await tt({sceneStr:c.value});z.success&&(i.value=!0,r.value=z.data,n=setInterval(()=>{x()},1e3))}async function x(){if(!c.value)return;const z=await St({sceneStr:c.value});if(z.data){clearInterval(n);const{status:$,msg:I}=z.data;$?d.success(I):d.error(I),a.getUserInfo(),s.updateBindwxDialog(!1)}}function h(){var z;clearInterval(n),y(),(z=e.value)==null||z.reset()}function g(){y()}function B(){clearInterval(n),r.value="",c.value="",i.value=!1}return(z,$)=>(p(),W(o(De),{show:z.visible,style:{width:"90%","max-width":"700px"},"on-after-enter":g,"on-after-leave":B},{default:M(()=>[l("div",Rn,[l("div",{class:"absolute top-3 right-3 cursor-pointer",onClick:$[0]||($[0]=I=>o(s).updateBindwxDialog(!1))},[S(o(ve),{size:"20",color:"#0e7a0d"},{default:M(()=>[S(o(Ae))]),_:1})]),l("div",Pn,[S(o(ve),{size:"25",color:"#0e7a0d"},{default:M(()=>[S(o(pt))]),_:1}),Mn]),l("div",null,[l("div",An,[l("p",null,[V(" 请在 "),l("span",Dn,[S(o(it),{ref_key:"countdownRef",ref:e,active:i.value,duration:120*1e3,"on-finish":h},null,8,["active"])]),V(" 时间内完成绑定 ")])]),l("div",Nn,[r.value?(p(),W(o(lt),{key:0,"preview-disabled":"",width:"230",src:r.value},null,8,["src"])):(p(),W(o(we),{key:1,height:"230px",width:"230px"})),r.value?D("",!0):(p(),W(o(ze),{key:2,size:"large",class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"}))]),Bn])])]),_:1},8,["show"]))}}),Un=""+new URL("preferential-0ee5bc79.png",import.meta.url).href,En={class:"p-4 bg-white rounded dark:bg-slate-800 max-h-4/5"},qn={class:"flex cursor-pointer justify-between"},On={class:"text-xl"},Hn={key:0,class:"p-4"},Wn={class:"relative"},Qn=["src"],Gn=["src"],Vn={key:0,class:"flex justify-between items-end min-h-28"},Zn={class:"text-sm font-bold mr-1 w-[120px]"},Fn={class:"font-bold"},Jn={key:1,class:"flex justify-between items-end min-h-28"},Xn={class:"text-sm font-bold mr-1 w-[120px]"},Yn={class:"font-bold"},Kn={key:2,class:"flex justify-between items-end min-h-28"},es={class:"text-sm font-bold mr-1 w-[120px]"},ts={class:"font-bold"},ns={class:"flex justify-between items-end mt-5"},ss={class:"text-xl text-[red] font-bold"},as={key:1,class:"p-4"},is=ne({__name:"GoodsDialog",props:{visible:{type:Boolean}},setup(u){const s=se(),n=xe(),e=N(!0),{isSmallMd:a}=le(),i=N([]),r=re(),c=rt(),d=N(!1),y=f(()=>s.globalConfig.model3Name||m("goods.basicModelQuota")),k=f(()=>s.globalConfig.model4Name)||m("goods.advancedModelQuota"),x=f(()=>s.globalConfig.drawMjName)||m("goods.drawingQuota"),h=f(()=>Number(s.globalConfig.isHideModel3Point)===1),g=f(()=>Number(s.globalConfig.isHideModel4Point)===1),B=f(()=>Number(s.globalConfig.isHideDrawMjPoint)===1),z=f(()=>{var O;const v=window.navigator.userAgent.toLowerCase();return v.match(/MicroMessenger/i)&&((O=v==null?void 0:v.match(/MicroMessenger/i))==null?void 0:O[0])==="micromessenger"}),$=f(()=>{const{payHupiStatus:v,payEpayStatus:O,payMpayStatus:w,payWechatStatus:E,payLtzfStatus:G}=s.globalConfig;return Number(E)===1?"wechat":Number(w)===1?"mpay":Number(v)===1?"hupi":Number(O)===1?"epay":Number(G)===1?"ltzf":null}),I=f(()=>{const{payEpayChannel:v,payMpayChannel:O}=s.globalConfig;return $.value==="mpay"?O?JSON.parse(O):[]:$.value==="epay"?v?JSON.parse(v):[]:$.value==="wechat"?["wxpay"]:$.value==="hupi"?["wxpay"]:$.value==="ltzf"?["wxpay"]:[]});function j(){P(),z.value&&R()}function Q(){i.value=[],e.value=!0}async function R(){const v=window.location.href.replace(/#.*$/,""),O=await Ct({url:v}),{appId:w,nonceStr:E,timestamp:G,signature:A}=O.data;w&&(wx.config({debug:!1,appId:w,timestamp:G,nonceStr:E,signature:A,jsApiList:["chooseWXPay"]}),wx.ready(()=>{}),wx.error(()=>{}))}function q(v){const{appId:O,timeStamp:w,nonceStr:E,package:G,signType:A,paySign:U}=v;WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:O,timeStamp:w,nonceStr:E,package:G,signType:A,paySign:U},ee=>{ee.err_msg==="get_brand_wcpay_request:ok"?(r.success(m("goods.purchaseSuccess")),setTimeout(()=>{s.getUserInfo(),n.updateGoodsDialog(!1)},500)):r.success(m("goods.paymentNotSuccessful"))})}async function H(v){if(!d.value){if(z.value&&$.value==="wechat"&&Number(s.globalConfig.payWechatStatus)===1){if(typeof WeixinJSBridge>"u")document.addEventListener?document.addEventListener("WeixinJSBridgeReady",q,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",q),document.attachEvent("onWeixinJSBridgeReady",q));else{const O=await dt({goodsId:v.id,payType:"jsapi"}),{success:w,data:E}=O;w&&q(E)}return}n.updateOrderInfo({pkgInfo:v}),n.updateGoodsDialog(!1),n.updatePayDialog(!0)}}async function P(){e.value=!0;try{const v=await Yt({status:1,size:30});i.value=v.data.rows,e.value=!1}catch{e.value=!1}}function X(v){const{name:O}=v;c.success({title:m("goods.orderConfirmationTitle"),content:m("goods.orderConfirmationContent")+O,negativeText:m("goods.thinkAgain"),positiveText:m("goods.confirmPurchase"),onPositiveClick:()=>{I.value.length||r.warning(m("goods.paymentNotEnabled")),H(v)}})}return(v,O)=>(p(),W(o(De),{show:v.visible,style:Be({maxWidth:`${i.value.length>4?1200:i.value.length*250}px`,minWidth:o(a)?"100%":"1000px"}),"on-after-enter":j,"on-after-leave":Q},{default:M(()=>[l("div",En,[l("div",qn,[l("span",On,_(o(m)("goods.selectProducts")),1),S(o(ve),{size:"20",color:"#0e7a0d",onClick:O[0]||(O[0]=w=>o(n).updateGoodsDialog(!1))},{default:M(()=>[S(o(Ae))]),_:1})]),e.value?D("",!0):(p(),C("div",Hn,[S(o(He),{"x-gap":15,"y-gap":15,cols:o(a)?1:i.value.length>4?4:i.value.length,class:"mt-3"},{default:M(()=>[(p(!0),C(ce,null,me(i.value,(w,E)=>(p(),W(o(Oe),{key:E},{default:M(()=>[S(o(qt),{size:"small",embedded:""},{header:M(()=>[l("div",Wn,[l("b",null,_(w.name),1),w.extraReward===1?(p(),C("img",{key:0,src:o(Un),class:"w-8 absolute -right-4 -top-3"},null,8,Qn)):D("",!0)])]),cover:M(()=>[l("img",{src:w.coverImg,class:"h-[130px] object-cover"},null,8,Gn)]),default:M(()=>[l("div",null,[l("p",null,_(w.des),1),h.value?D("",!0):(p(),C("div",Vn,[l("span",Zn,_(y.value),1),l("span",Fn,_(w.model3Count),1)])),g.value?D("",!0):(p(),C("div",Jn,[l("span",Xn,_(o(k)),1),l("span",Yn,_(w.model4Count),1)])),B.value?D("",!0):(p(),C("div",Kn,[l("span",es,_(o(x)),1),l("span",ts,_(w.drawMjCount),1)])),l("div",ns,[l("i",ss,_(`¥${w.price}`),1),S(o(Ne),{type:"primary",dashed:"",size:"small",onClick:G=>X(w)},{default:M(()=>[V(_(o(m)("goods.buyPackage")),1)]),_:2},1032,["onClick"])])])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["cols"])])),e.value?(p(),C("div",as,[S(o(He),{"x-gap":15,"y-gap":15,cols:o(a)?1:4,class:"mt-3"},{default:M(()=>[(p(),C(ce,null,me(4,w=>S(o(Oe),{key:w},{default:M(()=>[S(o(ot),{vertical:""},{default:M(()=>[S(o(we),{height:"130px",width:"100%"}),S(o(we),{height:"210px",width:"100%",sharp:!1})]),_:1})]),_:2},1024)),64))]),_:1},8,["cols"])])):D("",!0)])]),_:1},8,["show","style"]))}}),ls={class:"sm:mx-auto sm:w-full sm:max-w-sm"},rs={class:"mb-8 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900 dark:text-gray-300"},os={class:"mt-4 flex relative"},cs=["placeholder"],us=["innerHTML"],ds={class:"mt-4 flex"},gs=["placeholder"],ps={key:0,class:"mt-4 relative"},hs=["placeholder"],fs=["disabled","loading"],ms={class:"mt-4"},xs=["placeholder"],ys={class:"mt-4"},vs=["placeholder"],bs={key:1,class:"text-center text-sm text-gray-500 dark:text-gray-400"},ks={class:"mb-8 sm:mx-auto sm:w-full sm:max-w-sm"},ws={class:"text-center text-2xl font-bold leading-9 tracking-tight text-gray-900 dark:text-gray-300"},_s={class:"mt-4"},$s={for:"username",class:"block text-sm font-medium leading-6 text-gray-900 dark:text-gray-300"},Ss={class:"mt-2"},Cs=["placeholder"],Is={class:"mt-4"},zs={class:"mt-2"},Ts={for:"username",class:"block text-sm font-medium leading-6 text-gray-900 dark:text-gray-300"},Ls=["placeholder"],Rs={class:"flex items-center justify-between my-3"},Ps={class:"flex items-center"},Ms=l("input",{id:"remember-me",name:"remember-me",type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"},null,-1),As={for:"remember-me",class:"ml-3 block text-sm leading-6 text-gray-500 dark:text-gray-400"},Ds={key:0,class:"text-center text-sm text-gray-500 dark:text-gray-400"},Ns={key:0},Bs=l("div",{class:"sm:mx-auto sm:w-full sm:max-w-sm"},[l("h2",{class:"mb-8 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900 dark:text-gray-300"}," 验证码登录 ")],-1),js={class:"mt-4 flex relative"},Us=["placeholder"],Es=["innerHTML"],qs={class:"mt-4 relative"},Os=["placeholder"],Hs=["disabled","loading"],Ws={class:"mt-4 flex"},Qs=["placeholder"],Gs={key:0,class:"mt-0 mb-5 text-center text-sm text-gray-500 dark:text-gray-400"},Vs=ne({__name:"Email",emits:["changeLoginType"],setup(u,{emit:s}){const n=s,e=Ie(),a=N(null),i=re(),r=N(!0),c=N(!1),d=se(),y=N(""),k=f(()=>e.theme),x=N(0),h=d.globalConfig.siteName,{isMobile:g}=le(),B=N(!1),z=f(()=>k.value==="dark"?"#6b7280":"#fff"),$=N({password:"",contact:"",invitedBy:"",captchaCode:"",captchaId:null,code:""}),I=N({username:"",password:"",contact:"",invitedBy:""}),j={username:[{required:!0,message:m("login.enterUsername"),trigger:"blur"},{min:2,max:30,message:m("login.usernameLength"),trigger:"blur"}],password:[{required:!0,message:m("login.enterPassword"),trigger:"blur"},{min:6,max:30,message:m("login.passwordLength"),trigger:"blur"}],email:[{required:!0,message:m("login.enterEmail"),trigger:"blur"},{type:"email",message:m("login.emailValid"),trigger:["blur","change"]}],captchaCode:[{required:!0,message:m("login.enterCaptcha"),trigger:"blur"}]},Q=f(()=>Number(d.globalConfig.wechatRegisterStatus)===1),R=f(()=>Number(d.globalConfig.phoneLoginStatus)===1),q=f(()=>Number(d.globalConfig.noVerifyRegister)===1),H=f(()=>Number(d.globalConfig.emailLoginStatus)===1),P=f(()=>{if(H.value&&R.value)return m("login.emailPhone");if(H.value)return m("login.email");if(R.value)return m("login.phone")}),X=f(()=>{if(H.value&&R.value)return m("login.enterEmailOrPhone");if(H.value)return m("login.enterEmail");if(R.value)return m("login.enterPhone")});function v(){x.value>0&&setTimeout(()=>{x.value--,v()},1e3)}async function O(){var G;(G=a.value)==null||G.validate(async A=>{if(!A)try{const{contact:U,captchaCode:ee,captchaId:oe}=$.value,ge={contact:U,captchaCode:ee,captchaId:oe};let pe;pe=await It(ge),E();const{success:be,message:Y}=pe;be?(i.success(pe.data),x.value=60,v()):i.error(Y)}catch{E()}})}function w(){var G;(G=a.value)==null||G.validate(async A=>{if(!A)try{c.value=!0;const U=r.value?zt:Tt,ee=r.value?{username:I.value.username,password:I.value.password}:$.value,oe=await U(ee);c.value=!1,E();const{success:ge,message:pe}=oe;if(!ge)return i.error(pe);if(r.value)i.success(m("login.loginSuccess")),d.setToken(oe.data),d.getUserInfo(),d.setLoginDialog(!1),ke.remove("invitedBy");else{i.success(m("login.registrationSuccess"));const{contact:be,password:Y}=$.value;I.value.username=be,I.value.password=Y,r.value=!r.value}}catch{E(),c.value=!1}})}async function E(){const G=await Lt({color:z.value});y.value=G.data.svgCode,$.value.captchaId=G.data.code}return Te(()=>{const G=ke.get("invitedBy");G&&($.value.invitedBy=G),E()}),(G,A)=>(p(),C("div",{class:J(["flex w-full flex-col h-full justify-center",o(g)?"px-5 py-5":"px-10 py-5"])},[!r.value&&!B.value?(p(),W(o(Re),{key:0,ref_key:"formRef",ref:a,model:$.value,rules:j,"label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging"},{default:M(()=>[l("div",ls,[l("h2",rs,_(o(h))+" "+_(o(m)("login.registerTitle")),1)]),l("div",os,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[0]||(A[0]=U=>$.value.captchaCode=U),placeholder:o(m)("login.enterCaptcha"),class:"flex-1 block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400 pl-3 pr-16"},null,8,cs),[[ie,$.value.captchaCode]]),y.value?(p(),C("div",{key:0,class:"absolute right-1 top-1/2 transform -translate-y-1/2 cursor-pointer bg-transparent rounded-md",style:{height:"100%",top:"55%",transform:"translateY(-50%)"},onClick:E,innerHTML:y.value},null,8,us)):D("",!0)]),l("div",ds,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[1]||(A[1]=U=>$.value.contact=U),placeholder:o(m)("login.enterContact")+P.value,class:"flex-1 block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,gs),[[ie,$.value.contact]])]),q.value?D("",!0):(p(),C("div",ps,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[2]||(A[2]=U=>$.value.code=U),placeholder:o(m)("login.enterCode"),class:"block w-full rounded-md border-0 py-2 px-2 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400 pl-3 pr-12"},null,8,hs),[[ie,$.value.code]]),q.value?D("",!0):(p(),C("button",{key:0,block:"",class:"absolute right-0 top-1/2 transform -translate-y-1/2 flex justify-center rounded-r-md bg-primary-500 px-2 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-primary-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:c.value,loading:c.value,onClick:O},_(o(m)("login.sendVerificationCode")),9,fs))])),l("div",ms,[ae(l("input",{id:"username",type:"password","onUpdate:modelValue":A[3]||(A[3]=U=>$.value.password=U),placeholder:o(m)("login.enterPassword"),class:"block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,xs),[[ie,$.value.password]])]),l("div",ys,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[4]||(A[4]=U=>$.value.invitedBy=U),placeholder:o(m)("login.optionalInvitationCode"),class:"block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,vs),[[ie,$.value.invitedBy]])]),l("div",null,[l("button",{onClick:w,type:"submit",class:"flex w-full my-5 justify-center rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-primary-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},_(o(m)("login.registerAccount")),1)]),H.value||R.value?(p(),C("p",bs,[V(_(o(m)("login.alreadyHaveAccount"))+" ",1),l("a",{href:"#",class:"font-semibold leading-6 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:hover:text-primary-600",onClick:A[5]||(A[5]=U=>r.value=!r.value)},_(o(m)("login.goToLogin")),1)])):D("",!0)]),_:1},8,["model"])):D("",!0),r.value&&!B.value?(p(),W(o(Re),{key:1,size:"large",ref_key:"formRef",ref:a,model:I.value,rules:j,"label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging"},{default:M(()=>[l("div",ks,[l("h2",ws,_(o(h))+" 登录 ",1)]),l("div",_s,[l("label",$s,_(P.value),1),l("div",Ss,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[6]||(A[6]=U=>I.value.username=U),placeholder:X.value,class:"block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,Cs),[[ie,I.value.username]])])]),l("div",Is,[l("div",zs,[l("label",Ts,_(o(m)("login.password")),1),ae(l("input",{id:"password",type:"password","onUpdate:modelValue":A[7]||(A[7]=U=>I.value.password=U),placeholder:o(m)("login.enterYourPassword"),class:"block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,Ls),[[ie,I.value.password]])])]),l("div",Rs,[l("div",Ps,[Ms,l("label",As,_(o(m)("login.rememberAccount")),1)])]),l("div",null,[l("button",{onClick:w,type:"submit",class:"flex w-full my-5 justify-center rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-primary-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},_(o(m)("login.loginAccount")),1)]),H.value||R.value?(p(),C("p",Ds,[V(_(o(m)("login.noAccount"))+" ",1),l("a",{href:"#",class:"font-semibold leading-6 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:hover:text-primary-600",onClick:A[8]||(A[8]=U=>r.value=!r.value)},_(o(m)("login.register")),1),Q.value?(p(),C("div",Ns,[V(_(o(m)("login.orUse")),1),l("a",{href:"#",class:"font-semibold leading-6 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:hover:text-primary-600",onClick:A[9]||(A[9]=U=>n("changeLoginType","wechat"))},_(o(m)("login.scanLogin")),1)])):D("",!0)])):D("",!0)]),_:1},8,["model"])):D("",!0),B.value?(p(),W(o(Re),{key:2,ref_key:"formRef",ref:a,model:$.value,rules:j,"label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging"},{default:M(()=>[Bs,l("div",js,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[10]||(A[10]=U=>$.value.captchaCode=U),placeholder:o(m)("login.enterCaptcha"),class:"flex-1 block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400 pl-3 pr-16"},null,8,Us),[[ie,$.value.captchaCode]]),y.value?(p(),C("div",{key:0,class:"absolute right-1 top-1/2 transform -translate-y-1/2 cursor-pointer bg-transparent rounded-md",style:{height:"90%",top:"55%",transform:"translateY(-50%)"},onClick:E,innerHTML:y.value},null,8,Es)):D("",!0)]),l("div",qs,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[11]||(A[11]=U=>$.value.contact=U),placeholder:o(m)("login.enterContact")+P.value,class:"block w-full rounded-md border-0 py-2 px-2 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400 pl-3 pr-12"},null,8,Os),[[ie,$.value.contact]]),l("button",{block:"",class:"absolute right-0 top-1/2 transform -translate-y-1/2 flex justify-center rounded-r-md bg-primary-500 px-2 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-primary-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:c.value,loading:c.value,onClick:O},_(o(m)("login.sendVerificationCode")),9,Hs)]),l("div",Ws,[ae(l("input",{id:"username",type:"text","onUpdate:modelValue":A[12]||(A[12]=U=>$.value.code=U),placeholder:o(m)("login.enterCode"),class:"flex-1 block w-full rounded-md border-0 py-2 px-3 text-gray-900 shadow-sm dark:text-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:focus:ring-gray-400"},null,8,Qs),[[ie,$.value.code]])]),l("div",null,[l("button",{onClick:w,type:"submit",class:"flex w-full my-5 justify-center rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-primary-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"}," 验证码登录 ")]),H.value||R.value?(p(),C("p",Gs,[V(" 继续使用密码登录? "),l("a",{href:"#",class:"font-semibold leading-6 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:hover:text-primary-600",onClick:A[13]||(A[13]=U=>B.value=!B.value)},"返回")])):D("",!0)]),_:1},8,["model"])):D("",!0)],2))}}),Zs={class:"sm:mx-auto sm:w-full sm:max-w-sm"},Fs={class:"pt-5 pb-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900 dark:text-gray-300"},Js={key:3,class:"mt-10 mb-5 text-center text-sm text-gray-500 dark:text-gray-400"},Xs={key:4,class:"mt-10 mb-5 text-center text-sm text-gray-500 dark:text-gray-400"},Ys=ne({__name:"Wechat",emits:["changeLoginType"],setup(u,{emit:s}){const n=N(),e=N(),a=s,i=N(""),r=N(""),c=N(!1),d=re(),y=se(),k=N(),{isMobile:x}=le(),h=f(()=>Number(y.globalConfig.phoneLoginStatus)===1),g=f(()=>Number(y.globalConfig.emailLoginStatus)===1),B=f(()=>{if(g.value&&h.value)return m("login.emailPhone");if(g.value)return m("login.email");if(h.value)return m("login.phone")});function z(R){return new Promise((q,H)=>{const P=new Image;P.onload=()=>q(P),P.onerror=H,P.src=R})}async function $(){const R={invitedBy:ke.get("invitedBy")},q=await Rt(R);q.success&&(r.value=q.data,j())}async function I(){if(!r.value)return;const R=await Pt({sceneStr:r.value});R.data&&(clearInterval(n.value),d.success(m("login.loginSuccess")),y.setToken(R.data),y.getUserInfo(),y.setLoginDialog(!1),ke.remove("invitedBy"))}async function j(){const R=await tt({sceneStr:r.value});R.success&&(c.value=!0,await z(R.data),i.value=R.data,n.value=setInterval(()=>{I()},1e3))}function Q(){var R;$(),(R=k.value)==null||R.reset()}return Te(()=>{Q(),e.value!==null&&clearInterval(e.value),e.value=setInterval(Q,6e4)}),Vt(()=>{n.value!==null&&clearInterval(n.value),e.value!==null&&clearInterval(e.value)}),(R,q)=>(p(),C("div",{class:J(["w-full h-full flex flex-col items-center",o(x)?"px-10 py-10":" py-10"])},[l("div",Zs,[l("h2",Fs,_(o(m)("login.wechatLogin")),1)]),i.value?(p(),W(o(lt),{key:0,"preview-disabled":"",class:"w-[220px] h-[220px] select-none",src:i.value},null,8,["src"])):(p(),W(o(we),{key:1,height:"220px",width:"220px",animated:""})),i.value?D("",!0):(p(),W(o(ze),{key:2,size:"large",class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"})),g.value||h.value?(p(),C("p",Js,[V(_(o(m)("login.wechatScanFailed"))+" ",1),l("a",{href:"#",class:"font-semibold leading-6 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:hover:text-primary-600",onClick:q[0]||(q[0]=H=>a("changeLoginType","email"))},_(B.value),1)])):(p(),C("p",Xs,_(o(m)("login.useWechatScan")),1))],2))}});const Ks={key:0,class:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-black bg-opacity-50 py-6"},ea={key:0,class:"flex items-center justify-center h-[600px]"},ta={key:1,class:"flex-1 flex flex-col items-center"},na=ne({__name:"Login",props:{visible:{type:Boolean}},setup(u){const s=se();N(!1),N(""),N("");const n=N(null),e=N(!0),a=N("email"),{isMobile:i}=le(),r=f(()=>Number(s.globalConfig.emailLoginStatus)===1),c=f(()=>Number(s.globalConfig.wechatRegisterStatus)===1),d=f(()=>Number(s.globalConfig.phoneLoginStatus)===1),y=f(()=>!c.value&&!d.value&&!r.value);function k(x){x==="wechat"?e.value=!0:(e.value=!1,a.value=x,ct(()=>{var h;(h=n.value)==null||h.syncBarPosition()}))}return(x,h)=>x.visible?(p(),C("div",Ks,[l("div",{class:J(["bg-white p-6 rounded-lg shadow-lg w-full max-h-[70vh] flex flex-col dark:bg-gray-900 dark:text-gray-400 relative",{"max-w-[95vw]":o(i),"max-w-xl":!o(i)}])},[S(o(en),{size:"18",class:"absolute top-3 right-3 cursor-pointer z-30",onClick:h[0]||(h[0]=g=>o(s).setLoginDialog(!1))}),y.value?(p(),C("div",ea,[S(o(Ot),{size:"small",status:"403",title:"网站已经关闭注册通道",description:"请联系管理员开通吧"},{footer:M(()=>[S(o(Ne),{size:"small",onClick:h[1]||(h[1]=g=>o(s).setLoginDialog(!1))},{default:M(()=>[V(" 知道了 ")]),_:1})]),_:1})])):(p(),C("div",ta,[c.value&&e.value?(p(),W(Ys,{key:0,onChangeLoginType:k})):(p(),W(Vs,{key:1,onChangeLoginType:k}))]))],2)])):D("",!0)}});function sa(){return nt({url:"/config/notice"})}function ht(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let ye=ht();function aa(u){ye=u}const ft=/[&<>"']/,ia=new RegExp(ft.source,"g"),mt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,la=new RegExp(mt.source,"g"),ra={"&":"&","<":"<",">":">",'"':""","'":"'"},Ve=u=>ra[u];function te(u,s){if(s){if(ft.test(u))return u.replace(ia,Ve)}else if(mt.test(u))return u.replace(la,Ve);return u}const oa=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function xt(u){return u.replace(oa,(s,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const ca=/(^|[^\[])\^/g;function Z(u,s){u=typeof u=="string"?u:u.source,s=s||"";const n={replace:(e,a)=>(a=a.source||a,a=a.replace(ca,"$1"),u=u.replace(e,a),n),getRegex:()=>new RegExp(u,s)};return n}const ua=/[^\w:]/g,da=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ze(u,s,n){if(u){let e;try{e=decodeURIComponent(xt(n)).replace(ua,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}s&&!da.test(n)&&(n=fa(s,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const _e={},ga=/^[^:]+:\/*[^/]*$/,pa=/^([^:]+:)[\s\S]*$/,ha=/^([^:]+:\/*[^/]*)[\s\S]*$/;function fa(u,s){_e[" "+u]||(ga.test(u)?_e[" "+u]=u+"/":_e[" "+u]=$e(u,"/",!0)),u=_e[" "+u];const n=u.indexOf(":")===-1;return s.substring(0,2)==="//"?n?s:u.replace(pa,"$1")+s:s.charAt(0)==="/"?n?s:u.replace(ha,"$1")+s:u+s}const Se={exec:function(){}};function Fe(u,s){const n=u.replace(/\|/g,(i,r,c)=>{let d=!1,y=r;for(;--y>=0&&c[y]==="\\";)d=!d;return d?"|":" |"}),e=n.split(/ \|/);let a=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>s)e.splice(s);else for(;e.length<s;)e.push("");for(;a<e.length;a++)e[a]=e[a].trim().replace(/\\\|/g,"|");return e}function $e(u,s,n){const e=u.length;if(e===0)return"";let a=0;for(;a<e;){const i=u.charAt(e-a-1);if(i===s&&!n)a++;else if(i!==s&&n)a++;else break}return u.slice(0,e-a)}function ma(u,s){if(u.indexOf(s[1])===-1)return-1;const n=u.length;let e=0,a=0;for(;a<n;a++)if(u[a]==="\\")a++;else if(u[a]===s[0])e++;else if(u[a]===s[1]&&(e--,e<0))return a;return-1}function xa(u){u&&u.sanitize&&!u.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Je(u,s){if(s<1)return"";let n="";for(;s>1;)s&1&&(n+=u),s>>=1,u+=u;return n+u}function Xe(u,s,n,e){const a=s.href,i=s.title?te(s.title):null,r=u[1].replace(/\\([\[\]])/g,"$1");if(u[0].charAt(0)!=="!"){e.state.inLink=!0;const c={type:"link",raw:n,href:a,title:i,text:r,tokens:e.inlineTokens(r)};return e.state.inLink=!1,c}return{type:"image",raw:n,href:a,title:i,text:te(r)}}function ya(u,s){const n=u.match(/^(\s+)(?:```)/);if(n===null)return s;const e=n[1];return s.split(`
|
||
`).map(a=>{const i=a.match(/^\s+/);if(i===null)return a;const[r]=i;return r.length>=e.length?a.slice(e.length):a}).join(`
|
||
`)}class je{constructor(s){this.options=s||ye}space(s){const n=this.rules.block.newline.exec(s);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(s){const n=this.rules.block.code.exec(s);if(n){const e=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?e:$e(e,`
|
||
`)}}}fences(s){const n=this.rules.block.fences.exec(s);if(n){const e=n[0],a=ya(e,n[3]||"");return{type:"code",raw:e,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:a}}}heading(s){const n=this.rules.block.heading.exec(s);if(n){let e=n[2].trim();if(/#$/.test(e)){const a=$e(e,"#");(this.options.pedantic||!a||/ $/.test(a))&&(e=a.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(s){const n=this.rules.block.hr.exec(s);if(n)return{type:"hr",raw:n[0]}}blockquote(s){const n=this.rules.block.blockquote.exec(s);if(n){const e=n[0].replace(/^ *>[ \t]?/gm,""),a=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(e);return this.lexer.state.top=a,{type:"blockquote",raw:n[0],tokens:i,text:e}}}list(s){let n=this.rules.block.list.exec(s);if(n){let e,a,i,r,c,d,y,k,x,h,g,B,z=n[1].trim();const $=z.length>1,I={type:"list",raw:"",ordered:$,start:$?+z.slice(0,-1):"",loose:!1,items:[]};z=$?`\\d{1,9}\\${z.slice(-1)}`:`\\${z}`,this.options.pedantic&&(z=$?z:"[*+-]");const j=new RegExp(`^( {0,3}${z})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;s&&(B=!1,!(!(n=j.exec(s))||this.rules.block.hr.test(s)));){if(e=n[0],s=s.substring(e.length),k=n[2].split(`
|
||
`,1)[0].replace(/^\t+/,R=>" ".repeat(3*R.length)),x=s.split(`
|
||
`,1)[0],this.options.pedantic?(r=2,g=k.trimLeft()):(r=n[2].search(/[^ ]/),r=r>4?1:r,g=k.slice(r),r+=n[1].length),d=!1,!k&&/^ *$/.test(x)&&(e+=x+`
|
||
`,s=s.substring(x.length+1),B=!0),!B){const R=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),q=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),H=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),P=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);for(;s&&(h=s.split(`
|
||
`,1)[0],x=h,this.options.pedantic&&(x=x.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(H.test(x)||P.test(x)||R.test(x)||q.test(s)));){if(x.search(/[^ ]/)>=r||!x.trim())g+=`
|
||
`+x.slice(r);else{if(d||k.search(/[^ ]/)>=4||H.test(k)||P.test(k)||q.test(k))break;g+=`
|
||
`+x}!d&&!x.trim()&&(d=!0),e+=h+`
|
||
`,s=s.substring(h.length+1),k=x.slice(r)}}I.loose||(y?I.loose=!0:/\n *\n *$/.test(e)&&(y=!0)),this.options.gfm&&(a=/^\[[ xX]\] /.exec(g),a&&(i=a[0]!=="[ ] ",g=g.replace(/^\[[ xX]\] +/,""))),I.items.push({type:"list_item",raw:e,task:!!a,checked:i,loose:!1,text:g}),I.raw+=e}I.items[I.items.length-1].raw=e.trimRight(),I.items[I.items.length-1].text=g.trimRight(),I.raw=I.raw.trimRight();const Q=I.items.length;for(c=0;c<Q;c++)if(this.lexer.state.top=!1,I.items[c].tokens=this.lexer.blockTokens(I.items[c].text,[]),!I.loose){const R=I.items[c].tokens.filter(H=>H.type==="space"),q=R.length>0&&R.some(H=>/\n.*\n/.test(H.raw));I.loose=q}if(I.loose)for(c=0;c<Q;c++)I.items[c].loose=!0;return I}}html(s){const n=this.rules.block.html.exec(s);if(n){const e={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const a=this.options.sanitizer?this.options.sanitizer(n[0]):te(n[0]);e.type="paragraph",e.text=a,e.tokens=this.lexer.inline(a)}return e}}def(s){const n=this.rules.block.def.exec(s);if(n){const e=n[1].toLowerCase().replace(/\s+/g," "),a=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:e,raw:n[0],href:a,title:i}}}table(s){const n=this.rules.block.table.exec(s);if(n){const e={type:"table",header:Fe(n[1]).map(a=>({text:a})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(e.header.length===e.align.length){e.raw=n[0];let a=e.align.length,i,r,c,d;for(i=0;i<a;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(a=e.rows.length,i=0;i<a;i++)e.rows[i]=Fe(e.rows[i],e.header.length).map(y=>({text:y}));for(a=e.header.length,r=0;r<a;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(a=e.rows.length,r=0;r<a;r++)for(d=e.rows[r],c=0;c<d.length;c++)d[c].tokens=this.lexer.inline(d[c].text);return e}}}lheading(s){const n=this.rules.block.lheading.exec(s);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(s){const n=this.rules.block.paragraph.exec(s);if(n){const e=n[1].charAt(n[1].length-1)===`
|
||
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:e,tokens:this.lexer.inline(e)}}}text(s){const n=this.rules.block.text.exec(s);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(s){const n=this.rules.inline.escape.exec(s);if(n)return{type:"escape",raw:n[0],text:te(n[1])}}tag(s){const n=this.rules.inline.tag.exec(s);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):te(n[0]):n[0]}}link(s){const n=this.rules.inline.link.exec(s);if(n){const e=n[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const r=$e(e.slice(0,-1),"\\");if((e.length-r.length)%2===0)return}else{const r=ma(n[2],"()");if(r>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+r;n[2]=n[2].substring(0,r),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let a=n[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);r&&(a=r[1],i=r[3])}else i=n[3]?n[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(this.options.pedantic&&!/>$/.test(e)?a=a.slice(1):a=a.slice(1,-1)),Xe(n,{href:a&&a.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(s,n){let e;if((e=this.rules.inline.reflink.exec(s))||(e=this.rules.inline.nolink.exec(s))){let a=(e[2]||e[1]).replace(/\s+/g," ");if(a=n[a.toLowerCase()],!a){const i=e[0].charAt(0);return{type:"text",raw:i,text:i}}return Xe(e,a,e[0],this.lexer)}}emStrong(s,n,e=""){let a=this.rules.inline.emStrong.lDelim.exec(s);if(!a||a[3]&&e.match(/[\p{L}\p{N}]/u))return;const i=a[1]||a[2]||"";if(!i||i&&(e===""||this.rules.inline.punctuation.exec(e))){const r=a[0].length-1;let c,d,y=r,k=0;const x=a[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(x.lastIndex=0,n=n.slice(-1*s.length+r);(a=x.exec(n))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(d=c.length,a[3]||a[4]){y+=d;continue}else if((a[5]||a[6])&&r%3&&!((r+d)%3)){k+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+k);const h=s.slice(0,r+a.index+(a[0].length-c.length)+d);if(Math.min(r,d)%2){const B=h.slice(1,-1);return{type:"em",raw:h,text:B,tokens:this.lexer.inlineTokens(B)}}const g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(s){const n=this.rules.inline.code.exec(s);if(n){let e=n[2].replace(/\n/g," ");const a=/[^ ]/.test(e),i=/^ /.test(e)&&/ $/.test(e);return a&&i&&(e=e.substring(1,e.length-1)),e=te(e,!0),{type:"codespan",raw:n[0],text:e}}}br(s){const n=this.rules.inline.br.exec(s);if(n)return{type:"br",raw:n[0]}}del(s){const n=this.rules.inline.del.exec(s);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(s,n){const e=this.rules.inline.autolink.exec(s);if(e){let a,i;return e[2]==="@"?(a=te(this.options.mangle?n(e[1]):e[1]),i="mailto:"+a):(a=te(e[1]),i=a),{type:"link",raw:e[0],text:a,href:i,tokens:[{type:"text",raw:a,text:a}]}}}url(s,n){let e;if(e=this.rules.inline.url.exec(s)){let a,i;if(e[2]==="@")a=te(this.options.mangle?n(e[0]):e[0]),i="mailto:"+a;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])[0];while(r!==e[0]);a=te(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:a,href:i,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(s,n){const e=this.rules.inline.text.exec(s);if(e){let a;return this.lexer.state.inRawBlock?a=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):te(e[0]):e[0]:a=te(this.options.smartypants?n(e[0]):e[0]),{type:"text",raw:e[0],text:a}}}}const T={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Se,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};T._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;T._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;T.def=Z(T.def).replace("label",T._label).replace("title",T._title).getRegex();T.bullet=/(?:[*+-]|\d{1,9}[.)])/;T.listItemStart=Z(/^( *)(bull) */).replace("bull",T.bullet).getRegex();T.list=Z(T.list).replace(/bull/g,T.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+T.def.source+")").getRegex();T._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";T._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;T.html=Z(T.html,"i").replace("comment",T._comment).replace("tag",T._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();T.paragraph=Z(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex();T.blockquote=Z(T.blockquote).replace("paragraph",T.paragraph).getRegex();T.normal={...T};T.gfm={...T.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};T.gfm.table=Z(T.gfm.table).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex();T.gfm.paragraph=Z(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",T.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex();T.pedantic={...T.normal,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",T._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Se,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(T.normal._paragraph).replace("hr",T.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",T.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const b={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Se,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};b._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";b.punctuation=Z(b.punctuation).replace(/punctuation/g,b._punctuation).getRegex();b.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;b.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;b._comment=Z(T._comment).replace("(?:-->|$)","-->").getRegex();b.emStrong.lDelim=Z(b.emStrong.lDelim).replace(/punct/g,b._punctuation).getRegex();b.emStrong.rDelimAst=Z(b.emStrong.rDelimAst,"g").replace(/punct/g,b._punctuation).getRegex();b.emStrong.rDelimUnd=Z(b.emStrong.rDelimUnd,"g").replace(/punct/g,b._punctuation).getRegex();b._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;b._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;b._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;b.autolink=Z(b.autolink).replace("scheme",b._scheme).replace("email",b._email).getRegex();b._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;b.tag=Z(b.tag).replace("comment",b._comment).replace("attribute",b._attribute).getRegex();b._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;b._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;b._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;b.link=Z(b.link).replace("label",b._label).replace("href",b._href).replace("title",b._title).getRegex();b.reflink=Z(b.reflink).replace("label",b._label).replace("ref",T._label).getRegex();b.nolink=Z(b.nolink).replace("ref",T._label).getRegex();b.reflinkSearch=Z(b.reflinkSearch,"g").replace("reflink",b.reflink).replace("nolink",b.nolink).getRegex();b.normal={...b};b.pedantic={...b.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",b._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",b._label).getRegex()};b.gfm={...b.normal,escape:Z(b.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};b.gfm.url=Z(b.gfm.url,"i").replace("email",b.gfm._extended_email).getRegex();b.breaks={...b.gfm,br:Z(b.br).replace("{2,}","*").getRegex(),text:Z(b.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function va(u){return u.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Ye(u){let s="",n,e;const a=u.length;for(n=0;n<a;n++)e=u.charCodeAt(n),Math.random()>.5&&(e="x"+e.toString(16)),s+="&#"+e+";";return s}class ue{constructor(s){this.tokens=[],this.tokens.links=Object.create(null),this.options=s||ye,this.options.tokenizer=this.options.tokenizer||new je,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:T.normal,inline:b.normal};this.options.pedantic?(n.block=T.pedantic,n.inline=b.pedantic):this.options.gfm&&(n.block=T.gfm,this.options.breaks?n.inline=b.breaks:n.inline=b.gfm),this.tokenizer.rules=n}static get rules(){return{block:T,inline:b}}static lex(s,n){return new ue(n).lex(s)}static lexInline(s,n){return new ue(n).inlineTokens(s)}lex(s){s=s.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(s,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(s,n=[]){this.options.pedantic?s=s.replace(/\t/g," ").replace(/^ +$/gm,""):s=s.replace(/^( *)(\t+)/gm,(c,d,y)=>d+" ".repeat(y.length));let e,a,i,r;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(e=c.call({lexer:this},s,n))?(s=s.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.space(s)){s=s.substring(e.raw.length),e.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
||
`:n.push(e);continue}if(e=this.tokenizer.code(s)){s=s.substring(e.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
|
||
`+e.raw,a.text+=`
|
||
`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e);continue}if(e=this.tokenizer.fences(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.heading(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.hr(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.blockquote(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.list(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.html(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.def(s)){s=s.substring(e.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
|
||
`+e.raw,a.text+=`
|
||
`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.lheading(s)){s=s.substring(e.raw.length),n.push(e);continue}if(i=s,this.options.extensions&&this.options.extensions.startBlock){let c=1/0;const d=s.slice(1);let y;this.options.extensions.startBlock.forEach(function(k){y=k.call({lexer:this},d),typeof y=="number"&&y>=0&&(c=Math.min(c,y))}),c<1/0&&c>=0&&(i=s.substring(0,c+1))}if(this.state.top&&(e=this.tokenizer.paragraph(i))){a=n[n.length-1],r&&a.type==="paragraph"?(a.raw+=`
|
||
`+e.raw,a.text+=`
|
||
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e),r=i.length!==s.length,s=s.substring(e.raw.length);continue}if(e=this.tokenizer.text(s)){s=s.substring(e.raw.length),a=n[n.length-1],a&&a.type==="text"?(a.raw+=`
|
||
`+e.raw,a.text+=`
|
||
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e);continue}if(s){const c="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(s,n=[]){return this.inlineQueue.push({src:s,tokens:n}),n}inlineTokens(s,n=[]){let e,a,i,r=s,c,d,y;if(this.tokens.links){const k=Object.keys(this.tokens.links);if(k.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)k.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,c.index)+"["+Je("a",c[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,c.index)+"["+Je("a",c[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.escapedEmSt.exec(r))!=null;)r=r.slice(0,c.index+c[0].length-2)+"++"+r.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;s;)if(d||(y=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(k=>(e=k.call({lexer:this},s,n))?(s=s.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.escape(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.tag(s)){s=s.substring(e.raw.length),a=n[n.length-1],a&&e.type==="text"&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(e=this.tokenizer.link(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(e.raw.length),a=n[n.length-1],a&&e.type==="text"&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(e=this.tokenizer.emStrong(s,r,y)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.codespan(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.br(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.del(s)){s=s.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.autolink(s,Ye)){s=s.substring(e.raw.length),n.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(s,Ye))){s=s.substring(e.raw.length),n.push(e);continue}if(i=s,this.options.extensions&&this.options.extensions.startInline){let k=1/0;const x=s.slice(1);let h;this.options.extensions.startInline.forEach(function(g){h=g.call({lexer:this},x),typeof h=="number"&&h>=0&&(k=Math.min(k,h))}),k<1/0&&k>=0&&(i=s.substring(0,k+1))}if(e=this.tokenizer.inlineText(i,va)){s=s.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(y=e.raw.slice(-1)),d=!0,a=n[n.length-1],a&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(s){const k="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return n}}class Ue{constructor(s){this.options=s||ye}code(s,n,e){const a=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(s,a);i!=null&&i!==s&&(e=!0,s=i)}return s=s.replace(/\n$/,"")+`
|
||
`,a?'<pre><code class="'+this.options.langPrefix+te(a)+'">'+(e?s:te(s,!0))+`</code></pre>
|
||
`:"<pre><code>"+(e?s:te(s,!0))+`</code></pre>
|
||
`}blockquote(s){return`<blockquote>
|
||
${s}</blockquote>
|
||
`}html(s){return s}heading(s,n,e,a){if(this.options.headerIds){const i=this.options.headerPrefix+a.slug(e);return`<h${n} id="${i}">${s}</h${n}>
|
||
`}return`<h${n}>${s}</h${n}>
|
||
`}hr(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`}list(s,n,e){const a=n?"ol":"ul",i=n&&e!==1?' start="'+e+'"':"";return"<"+a+i+`>
|
||
`+s+"</"+a+`>
|
||
`}listitem(s){return`<li>${s}</li>
|
||
`}checkbox(s){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(s){return`<p>${s}</p>
|
||
`}table(s,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||
<thead>
|
||
`+s+`</thead>
|
||
`+n+`</table>
|
||
`}tablerow(s){return`<tr>
|
||
${s}</tr>
|
||
`}tablecell(s,n){const e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+s+`</${e}>
|
||
`}strong(s){return`<strong>${s}</strong>`}em(s){return`<em>${s}</em>`}codespan(s){return`<code>${s}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(s){return`<del>${s}</del>`}link(s,n,e){if(s=Ze(this.options.sanitize,this.options.baseUrl,s),s===null)return e;let a='<a href="'+s+'"';return n&&(a+=' title="'+n+'"'),a+=">"+e+"</a>",a}image(s,n,e){if(s=Ze(this.options.sanitize,this.options.baseUrl,s),s===null)return e;let a=`<img src="${s}" alt="${e}"`;return n&&(a+=` title="${n}"`),a+=this.options.xhtml?"/>":">",a}text(s){return s}}class yt{strong(s){return s}em(s){return s}codespan(s){return s}del(s){return s}html(s){return s}text(s){return s}link(s,n,e){return""+e}image(s,n,e){return""+e}br(){return""}}class vt{constructor(){this.seen={}}serialize(s){return s.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(s,n){let e=s,a=0;if(this.seen.hasOwnProperty(e)){a=this.seen[s];do a++,e=s+"-"+a;while(this.seen.hasOwnProperty(e))}return n||(this.seen[s]=a,this.seen[e]=0),e}slug(s,n={}){const e=this.serialize(s);return this.getNextSafeSlug(e,n.dryrun)}}class de{constructor(s){this.options=s||ye,this.options.renderer=this.options.renderer||new Ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new yt,this.slugger=new vt}static parse(s,n){return new de(n).parse(s)}static parseInline(s,n){return new de(n).parseInline(s)}parse(s,n=!0){let e="",a,i,r,c,d,y,k,x,h,g,B,z,$,I,j,Q,R,q,H;const P=s.length;for(a=0;a<P;a++){if(g=s[a],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[g.type]&&(H=this.options.extensions.renderers[g.type].call({parser:this},g),H!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(g.type))){e+=H||"";continue}switch(g.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{e+=this.renderer.heading(this.parseInline(g.tokens),g.depth,xt(this.parseInline(g.tokens,this.textRenderer)),this.slugger);continue}case"code":{e+=this.renderer.code(g.text,g.lang,g.escaped);continue}case"table":{for(x="",k="",c=g.header.length,i=0;i<c;i++)k+=this.renderer.tablecell(this.parseInline(g.header[i].tokens),{header:!0,align:g.align[i]});for(x+=this.renderer.tablerow(k),h="",c=g.rows.length,i=0;i<c;i++){for(y=g.rows[i],k="",d=y.length,r=0;r<d;r++)k+=this.renderer.tablecell(this.parseInline(y[r].tokens),{header:!1,align:g.align[r]});h+=this.renderer.tablerow(k)}e+=this.renderer.table(x,h);continue}case"blockquote":{h=this.parse(g.tokens),e+=this.renderer.blockquote(h);continue}case"list":{for(B=g.ordered,z=g.start,$=g.loose,c=g.items.length,h="",i=0;i<c;i++)j=g.items[i],Q=j.checked,R=j.task,I="",j.task&&(q=this.renderer.checkbox(Q),$?j.tokens.length>0&&j.tokens[0].type==="paragraph"?(j.tokens[0].text=q+" "+j.tokens[0].text,j.tokens[0].tokens&&j.tokens[0].tokens.length>0&&j.tokens[0].tokens[0].type==="text"&&(j.tokens[0].tokens[0].text=q+" "+j.tokens[0].tokens[0].text)):j.tokens.unshift({type:"text",text:q}):I+=q),I+=this.parse(j.tokens,$),h+=this.renderer.listitem(I,R,Q);e+=this.renderer.list(h,B,z);continue}case"html":{e+=this.renderer.html(g.text);continue}case"paragraph":{e+=this.renderer.paragraph(this.parseInline(g.tokens));continue}case"text":{for(h=g.tokens?this.parseInline(g.tokens):g.text;a+1<P&&s[a+1].type==="text";)g=s[++a],h+=`
|
||
`+(g.tokens?this.parseInline(g.tokens):g.text);e+=n?this.renderer.paragraph(h):h;continue}default:{const X='Token with "'+g.type+'" type was not found.';if(this.options.silent){console.error(X);return}else throw new Error(X)}}}return e}parseInline(s,n){n=n||this.renderer;let e="",a,i,r;const c=s.length;for(a=0;a<c;a++){if(i=s[a],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(r=this.options.extensions.renderers[i.type].call({parser:this},i),r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type))){e+=r||"";continue}switch(i.type){case"escape":{e+=n.text(i.text);break}case"html":{e+=n.html(i.text);break}case"link":{e+=n.link(i.href,i.title,this.parseInline(i.tokens,n));break}case"image":{e+=n.image(i.href,i.title,i.text);break}case"strong":{e+=n.strong(this.parseInline(i.tokens,n));break}case"em":{e+=n.em(this.parseInline(i.tokens,n));break}case"codespan":{e+=n.codespan(i.text);break}case"br":{e+=n.br();break}case"del":{e+=n.del(this.parseInline(i.tokens,n));break}case"text":{e+=n.text(i.text);break}default:{const d='Token with "'+i.type+'" type was not found.';if(this.options.silent){console.error(d);return}else throw new Error(d)}}}return e}}class Ce{constructor(s){this.options=s||ye}preprocess(s){return s}postprocess(s){return s}}Ee(Ce,"passThroughHooks",new Set(["preprocess","postprocess"]));function ba(u,s,n){return e=>{if(e.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,u){const a="<p>An error occurred:</p><pre>"+te(e.message+"",!0)+"</pre>";if(s)return Promise.resolve(a);if(n){n(null,a);return}return a}if(s)return Promise.reject(e);if(n){n(e);return}throw e}}function bt(u,s){return(n,e,a)=>{typeof e=="function"&&(a=e,e=null);const i={...e};e={...L.defaults,...i};const r=ba(e.silent,e.async,a);if(typeof n>"u"||n===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(xa(e),e.hooks&&(e.hooks.options=e),a){const c=e.highlight;let d;try{e.hooks&&(n=e.hooks.preprocess(n)),d=u(n,e)}catch(x){return r(x)}const y=function(x){let h;if(!x)try{e.walkTokens&&L.walkTokens(d,e.walkTokens),h=s(d,e),e.hooks&&(h=e.hooks.postprocess(h))}catch(g){x=g}return e.highlight=c,x?r(x):a(null,h)};if(!c||c.length<3||(delete e.highlight,!d.length))return y();let k=0;L.walkTokens(d,function(x){x.type==="code"&&(k++,setTimeout(()=>{c(x.text,x.lang,function(h,g){if(h)return y(h);g!=null&&g!==x.text&&(x.text=g,x.escaped=!0),k--,k===0&&y()})},0))}),k===0&&y();return}if(e.async)return Promise.resolve(e.hooks?e.hooks.preprocess(n):n).then(c=>u(c,e)).then(c=>e.walkTokens?Promise.all(L.walkTokens(c,e.walkTokens)).then(()=>c):c).then(c=>s(c,e)).then(c=>e.hooks?e.hooks.postprocess(c):c).catch(r);try{e.hooks&&(n=e.hooks.preprocess(n));const c=u(n,e);e.walkTokens&&L.walkTokens(c,e.walkTokens);let d=s(c,e);return e.hooks&&(d=e.hooks.postprocess(d)),d}catch(c){return r(c)}}}function L(u,s,n){return bt(ue.lex,de.parse)(u,s,n)}L.options=L.setOptions=function(u){return L.defaults={...L.defaults,...u},aa(L.defaults),L};L.getDefaults=ht;L.defaults=ye;L.use=function(...u){const s=L.defaults.extensions||{renderers:{},childTokens:{}};u.forEach(n=>{const e={...n};if(e.async=L.defaults.async||e.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if(a.renderer){const i=s.renderers[a.name];i?s.renderers[a.name]=function(...r){let c=a.renderer.apply(this,r);return c===!1&&(c=i.apply(this,r)),c}:s.renderers[a.name]=a.renderer}if(a.tokenizer){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");s[a.level]?s[a.level].unshift(a.tokenizer):s[a.level]=[a.tokenizer],a.start&&(a.level==="block"?s.startBlock?s.startBlock.push(a.start):s.startBlock=[a.start]:a.level==="inline"&&(s.startInline?s.startInline.push(a.start):s.startInline=[a.start]))}a.childTokens&&(s.childTokens[a.name]=a.childTokens)}),e.extensions=s),n.renderer){const a=L.defaults.renderer||new Ue;for(const i in n.renderer){const r=a[i];a[i]=(...c)=>{let d=n.renderer[i].apply(a,c);return d===!1&&(d=r.apply(a,c)),d}}e.renderer=a}if(n.tokenizer){const a=L.defaults.tokenizer||new je;for(const i in n.tokenizer){const r=a[i];a[i]=(...c)=>{let d=n.tokenizer[i].apply(a,c);return d===!1&&(d=r.apply(a,c)),d}}e.tokenizer=a}if(n.hooks){const a=L.defaults.hooks||new Ce;for(const i in n.hooks){const r=a[i];Ce.passThroughHooks.has(i)?a[i]=c=>{if(L.defaults.async)return Promise.resolve(n.hooks[i].call(a,c)).then(y=>r.call(a,y));const d=n.hooks[i].call(a,c);return r.call(a,d)}:a[i]=(...c)=>{let d=n.hooks[i].apply(a,c);return d===!1&&(d=r.apply(a,c)),d}}e.hooks=a}if(n.walkTokens){const a=L.defaults.walkTokens;e.walkTokens=function(i){let r=[];return r.push(n.walkTokens.call(this,i)),a&&(r=r.concat(a.call(this,i))),r}}L.setOptions(e)})};L.walkTokens=function(u,s){let n=[];for(const e of u)switch(n=n.concat(s.call(L,e)),e.type){case"table":{for(const a of e.header)n=n.concat(L.walkTokens(a.tokens,s));for(const a of e.rows)for(const i of a)n=n.concat(L.walkTokens(i.tokens,s));break}case"list":{n=n.concat(L.walkTokens(e.items,s));break}default:L.defaults.extensions&&L.defaults.extensions.childTokens&&L.defaults.extensions.childTokens[e.type]?L.defaults.extensions.childTokens[e.type].forEach(function(a){n=n.concat(L.walkTokens(e[a],s))}):e.tokens&&(n=n.concat(L.walkTokens(e.tokens,s)))}return n};L.parseInline=bt(ue.lexInline,de.parseInline);L.Parser=de;L.parser=de.parse;L.Renderer=Ue;L.TextRenderer=yt;L.Lexer=ue;L.lexer=ue.lex;L.Tokenizer=je;L.Slugger=vt;L.Hooks=Ce;L.parse=L;L.options;L.setOptions;L.use;L.walkTokens;L.parseInline;de.parse;ue.lex;const ka={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50"},wa={class:"bg-white dark:bg-gray-900 p-6 rounded-lg shadow-lg w-full max-w-3xl max-h-[80vh] overflow-y-auto"},_a={class:"flex justify-between items-center mb-4"},$a={key:0,class:"w-1/3 bg-gray-300 dark:bg-gray-700 h-6 rounded"},Sa={key:1,class:"text-xl"},Ca=l("span",{class:"sr-only"},"Close",-1),Ia=l("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),za=[Ca,Ia],Ta={key:0,class:"space-y-2"},La=["innerHTML"],Ra={class:"flex justify-end mt-4"},Pa=ne({__name:"NoticeDialog",props:{visible:{type:Boolean}},setup(u){const s=u,n=N({noticeInfo:"",noticeTitle:""}),e=Ie(),a=xe(),i=N(!0);f(()=>e.theme==="dark"),le(),f(()=>e.theme);const r=f(()=>n.value.noticeInfo?L(n.value.noticeInfo):"");function c(){a.updateNoticeDialog(!1)}async function d(){const x=await sa(),{success:h,data:g}=x;h&&(n.value=g)}async function y(){i.value=!0,await d(),i.value=!1}function k(){a.updateNoticeDialog(!1),ke.set("showNotice",Date.now()+24*60*60*1e3)}return Le(()=>s.visible,x=>{x&&y()}),(x,h)=>s.visible?(p(),C("div",ka,[l("div",wa,[l("div",_a,[i.value?(p(),C("div",$a)):(p(),C("span",Sa,_(n.value.noticeTitle),1)),l("button",{onClick:c,class:"text-gray-500 hover:text-gray-700"},za)]),i.value?(p(),C("div",Ta,[(p(),C(ce,null,me(10,g=>l("div",{key:g,class:"bg-gray-300 dark:bg-gray-700 h-4 rounded"})),64))])):(p(),C("div",{key:1,class:"text-gray-950 dark:text-gray-400",innerHTML:r.value},null,8,La)),l("div",Ra,[l("button",{onClick:k,class:"px-4 py-2 shadow-sm bg-primary-600 text-white rounded-md hover:bg-primary-500"},[l("span",null,_(o(m)("notice.doNotRemind24h")),1)])])])])):D("",!0)}}),Ke=""+new URL("alipay-eab94eb8.png",import.meta.url).href,et=""+new URL("wxpay-2d8f84af.png",import.meta.url).href,Ma={class:"p-4 bg-white rounded dark:bg-slate-800"},Aa={class:"flex text-xl font-bold mb-[20px] bg-currentflex items-center"},Da={class:"ml-[8px]"},Na={class:"p-4"},Ba={class:"whitespace-nowrap font-bold"},ja={class:"text-xl text-[red] font-bold"},Ua={class:"mt-2 flex"},Ea={class:"whitespace-nowrap font-bold"},qa={class:"ml-2"},Oa={class:"mt-2 flex"},Ha={class:"whitespace-nowrap font-bold"},Wa={class:"ml-2"},Qa={class:"flex items-center justify-center my-3 relative"},Ga=["src"],Va=["src"],Za={class:"mb-10 mt-5 text-base"},Fa=["src"],Ja=["src"],Xa={key:0,class:"flex items-center justify-center text-lg"},Ya={class:"w-[60px] inline-block text-[red] text-left"},Ka={class:"flex items-center"},ei=["src"],ti=1e3,ni=ne({__name:"PayDialog",props:{visible:{type:Boolean}},setup(u){const{isMobile:s}=le(),n=se(),e=Mt(),a=re(),i=N(!0),r=N("wxpay"),c=f(()=>{var E;const w=window.navigator.userAgent.toLowerCase();return w.match(/MicroMessenger/i)&&((E=w==null?void 0:w.match(/MicroMessenger/i))==null?void 0:E[0])==="micromessenger"}),d=f(()=>{const{payHupiStatus:w,payEpayStatus:E,payMpayStatus:G,payWechatStatus:A,payLtzfStatus:U}=n.globalConfig;return Number(A)===1?"wechat":Number(E)===1?"epay":Number(G)===1?"mpay":Number(w)===1?"hupi":Number(U)===1?"ltzf":null}),y=f(()=>{const{payEpayChannel:w,payMpayChannel:E}=n.globalConfig;return d.value==="mpay"?E?JSON.parse(E):[]:d.value==="epay"?w?JSON.parse(w):[]:d.value==="wechat"?["wxpay"]:d.value==="hupi"?["wxpay"]:d.value==="ltzf"?["wxpay"]:[]}),k=f(()=>r.value==="wxpay"?m("pay.wechat"):m("pay.alipay")),x=N(),h=f(()=>{const{payEpayApiPayUrl:w}=n.globalConfig;return d.value==="epay"&&w.includes("submit")||d.value==="mpay"});Le(r,()=>{var w;P(),(w=x.value)==null||w.reset()});const g=N("");let B;const z=f(()=>[{label:m("pay.wechatPay"),value:"wxpay",icon:et,payChannel:"wxpay"},{label:m("pay.alipayPay"),value:"alipay",icon:Ke,payChannel:"alipay"}].filter(w=>y.value.includes(w.payChannel))),$=async()=>{if(!g.value)return;const w=await Kt({orderId:g.value}),{success:E,data:G}=w;if(E){const{status:A}=G;A===1&&(clearInterval(B),a.success(m("pay.paymentSuccess")),i.value=!1,n.getUserInfo(),setTimeout(()=>{e.updatePayDialog(!1)},2e3))}},I=f(()=>e==null?void 0:e.orderInfo),j=N(""),Q=N(!0),R=N(!0),q=N("");function H(){e.updateOrderInfo({}),clearInterval(B)}async function P(){!h.value&&(Q.value=!0),h.value&&(R.value=!0);let w=null;w=r.value,d.value==="wechat"&&(w=c.value?"jsapi":"native");try{const E=await dt({goodsId:I.value.pkgInfo.id,payType:w}),{data:G,success:A,message:U}=E;if(!A)return a.error(U);const{url_qrcode:ee,orderId:oe,redirectUrl:ge}=G;q.value=ge,g.value=oe,j.value=ee,Q.value=!1,R.value=!1}catch{e.updatePayDialog(!1),Q.value=!1,R.value=!1}}function X(){window.open(q.value)}async function v(){await P(),B=setInterval(()=>{$()},ti)}function O(){a.error(m("pay.paymentTimeout")),clearInterval(B),e.updatePayDialog(!1)}return(w,E)=>(p(),W(o(De),{show:w.visible,style:{width:"90%","max-width":"750px"},"on-after-enter":v,"on-after-leave":H},{default:M(()=>{var G,A,U;return[l("div",Ma,[l("div",{class:"flex justify-between",onClick:E[0]||(E[0]=ee=>o(e).updatePayDialog(!1))},[l("div",Aa,[S(o(ve),{size:"25",color:"#0e7a0d"},{default:M(()=>[S(o(pt))]),_:1}),l("span",Da,_(o(m)("pay.productPayment")),1)]),S(o(ve),{size:"20",color:"#0e7a0d",class:"cursor-pointer"},{default:M(()=>[S(o(Ae))]),_:1})]),l("div",Na,[l("div",null,[l("span",Ba,_(o(m)("pay.amountDue")),1),l("i",ja,_(`¥${(G=I.value.pkgInfo)==null?void 0:G.price}`),1)]),l("div",Ua,[l("span",Ea,_(o(m)("pay.packageName")),1),l("span",qa,_((A=I.value.pkgInfo)==null?void 0:A.name),1)]),l("div",Oa,[l("span",Ha,_(o(m)("pay.packageDescription")),1),l("span",Wa,_((U=I.value.pkgInfo)==null?void 0:U.des),1)]),l("div",{class:J(["flex justify-center",[o(s)?"flex-col":"flex-row",h.value?"flex-row-reverse":""]])},[l("div",null,[l("div",Qa,[Q.value&&!h.value?(p(),W(o(ze),{key:0,size:"large",class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"})):D("",!0),Q.value?(p(),W(o(we),{key:1,width:240,height:240,sharp:!1,size:"medium"})):D("",!0),d.value==="epay"&&!Q.value&&!R.value&&!h.value?(p(),W(qe,{key:2,value:j.value,size:240},null,8,["value"])):D("",!0),r.value==="wxpay"&&!Q.value&&!h.value?(p(),C("img",{key:3,src:o(et),class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-10 bg-[#fff]"},null,8,Ga)):D("",!0),r.value==="alipay"&&!Q.value&&!h.value?(p(),C("img",{key:4,src:o(Ke),class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-10 bg-[#fff]"},null,8,Va)):D("",!0),d.value==="wechat"&&!Q.value?(p(),W(qe,{key:5,value:j.value,size:240},null,8,["value"])):D("",!0),h.value?(p(),C("div",{key:6,class:J(["flex flex-col",[h.value&&o(s)?"ml-0":"ml-20"]])},[l("span",Za,_(o(m)("pay.siteAdminEnabledRedirect")),1),h.value?(p(),W(o(Ne),{key:0,type:"primary",ghost:"",disabled:R.value,loading:R.value,onClick:X},{default:M(()=>[V(_(o(m)("pay.clickToPay")),1)]),_:1},8,["disabled","loading"])):D("",!0)],2)):D("",!0),d.value==="hupi"&&!R.value?(p(),C("iframe",{key:7,class:"w-[280px] h-[280px] scale-90",src:j.value,frameborder:"0"},null,8,Fa)):D("",!0),d.value==="ltzf"&&!R.value?(p(),C("img",{key:8,src:j.value,class:"w-[280px] h-[280px] scale-90",alt:"QRCode"},null,8,Ja)):D("",!0)]),h.value?D("",!0):(p(),C("span",Xa,_(o(m)("pay.open"))+" "+_(k.value)+" "+_(o(m)("pay.scanToPay")),1))]),l("div",{class:J(["flex flex-col",[o(s)?"w-full ":" ml-10 w-[200] "]])},[l("div",{style:{"white-space":"nowrap"},class:J(["mt-6 w-full text-center font-bold text-sm",[o(s)?"mb-2":"mb-10"]])},[V(_(o(m)("pay.completePaymentWithin"))+" ",1),l("span",Ya,[S(o(it),{ref_key:"countdownRef",ref:x,active:i.value,duration:300*1e3,"on-finish":O},null,8,["active"])]),V(" "+_(o(m)("pay.timeToCompletePayment")),1)],2),S(o(Wt),{value:r.value,"onUpdate:value":E[1]||(E[1]=ee=>r.value=ee),name:"radiogroup",class:"flex"},{default:M(()=>[S(o(ot),{vertical:!o(s),justify:"center",size:o(s)?10:35,class:"w-full"},{default:M(()=>[(p(!0),C(ce,null,me(z.value,ee=>(p(),W(o(Ht),{key:ee.value,value:ee.value},{default:M(()=>[l("div",Ka,[l("img",{class:"h-4 object-contain mr-2",src:ee.icon,alt:""},null,8,ei),V(" "+_(ee.label),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["vertical","size"])]),_:1},8,["value"])],2)],2)])])]}),_:1},8,["show"]))}});function si(){return At({url:"/signin/sign"})}function ai(){return nt({url:"/signin/signinLog"})}const ii={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50"},li={class:"bg-white dark:bg-gray-900 p-6 rounded-lg shadow-lg w-full max-w-xl max-h-[80vh] overflow-y-auto"},ri={class:"flex justify-between items-center mb-4"},oi={class:"text-base"},ci={class:"text-[red]"},ui=l("span",{class:"sr-only"},"Close",-1),di=l("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),gi=[ui,di],pi={class:"bg-gray-50 mb-5 p-2 rounded-md border border-gray-200 dark:border-gray-700 dark:bg-gray-700"},hi={key:0},fi={class:"mx-2 text-primary-500"},mi={key:1},xi={class:"mx-2 text-primary-500"},yi={key:2},vi={class:"mx-2 text-primary-500"},bi=l("div",{class:"mt-10 grid grid-cols-7 text-center text-xs leading-6 text-gray-500 dark:text-gray-400"},[l("div",null,"M"),l("div",null,"T"),l("div",null,"W"),l("div",null,"T"),l("div",null,"F"),l("div",null,"S"),l("div",null,"S")],-1),ki={class:"mt-2 grid grid-cols-7 text-sm"},wi=["datetime"],_i={class:"flex mt-3 w-full"},$i=["disabled"],Si=ne({__name:"SignInDialog",props:{visible:{type:Boolean}},setup(u){const s=u,n=se(),e=xe(),a=N(!1);le();const i=N([]),r=re(),c=N(!1),d=new Date().toISOString().split("T")[0],y=f(()=>i.value.map(v=>{var O;return{...v,day:(O=v.signInDate.split("-").pop())==null?void 0:O.replace(/^0/,""),isToday:v.signInDate===d}})),k=f(()=>n.globalConfig.model3Name||t("pay.baseModelQuota")),x=f(()=>n.globalConfig.model4Name)||t("pay.advancedModelQuota"),h=f(()=>n.globalConfig.drawMjName)||t("pay.MJDrawingQuota"),g=f(()=>Number(n.globalConfig.isHideModel3Point)===1),B=f(()=>Number(n.globalConfig.isHideModel4Point)===1),z=f(()=>Number(n.globalConfig.isHideDrawMjPoint)===1);function $(){e.updateSignInDialog(!1)}const I=f(()=>n.userInfo.consecutiveDays),j=f(()=>{var v;return Number((v=n.globalConfig)==null?void 0:v.signInModel3Count)||0}),Q=f(()=>{var v;return Number((v=n.globalConfig)==null?void 0:v.signInModel4Count)||0}),R=f(()=>{var v;return Number((v=n.globalConfig)==null?void 0:v.signInMjDrawToken)||0}),q=f(()=>i.value.some(v=>v.signInDate===d&&v.isSigned));async function H(){try{a.value=!0;const v=await ai();console.log("fetchSignLogAPI response:",v),v.success&&(i.value=v.data||[],console.log("signInData:",i.value)),a.value=!1}catch(v){a.value=!1,console.error("Error fetching sign-in log:",v)}}async function P(){try{c.value=!0;const v=await si();console.log("fetchSignInAPI response:",v),v.success&&(r.success("签到成功!"),await H(),n.getUserInfo()),c.value=!1}catch(v){c.value=!1,console.error("Error during sign-in:",v)}}async function X(){a.value=!0,await H(),a.value=!1}return Le(()=>s.visible,v=>{v&&X()}),(v,O)=>s.visible?(p(),C("div",ii,[l("div",li,[l("div",ri,[l("span",oi,[V("签到奖励 "),l("span",null,[V("(已连续签到"),l("b",ci,_(I.value),1),V("天)")])]),l("button",{onClick:$,class:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"},gi)]),l("div",pi,[V(" 每日签到赠送: "),j.value>0&&!g.value?(p(),C("span",hi,[l("b",fi,_(j.value),1),V(_(k.value),1)])):D("",!0),Q.value>0&&!B.value?(p(),C("span",mi,[l("b",xi,_(Q.value),1),V(_(o(x)),1)])):D("",!0),R.value>0&&!z.value?(p(),C("span",yi,[l("b",vi,_(R.value),1),V(_(o(h)),1)])):D("",!0)]),S(o(ze),{show:a.value},{default:M(()=>[bi,l("div",ki,[(p(!0),C(ce,null,me(y.value,w=>(p(),C("div",{key:w.signInDate,class:"py-2"},[l("button",{type:"button",class:J([w.isToday?"bg-primary-600 text-white":w.isSigned?"text-primary-600":"text-gray-900 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700 mx-auto flex h-8 w-8 items-center justify-center rounded-full"])},[l("time",{datetime:w.signInDate},_(w.day),9,wi)],2)]))),128))])]),_:1},8,["show"]),l("div",_i,[l("button",{class:J(["w-full py-2 px-4 rounded text-white",q.value?"bg-gray-400 cursor-not-allowed":"bg-primary-600"]),disabled:q.value,onClick:P}," 签到 ",10,$i)])])])):D("",!0)}}),Ci={class:"bg-white dark:bg-[#25272c]"},Ii=["onClick"],zi={class:"inline-block text-xl"},Ti={class:"text-xs"},Li=ne({__name:"index",setup(u){const s=N([]),n=re();async function e(){const g=await st({menuPlatform:0});g.success&&(s.value=g.data)}const a=xe(),i=Pe(),r=Me(),c=f(()=>r.path),d=se(),y=f(()=>a.iframeUrl),k=f(()=>d.isLogin);function x(g,B){g.stopPropagation();const{menuPath:z,isJump:$,menuIframeUrl:I,isNeedAuth:j}=B;if(j&&!k.value){n.warning("请先登录后访问!"),d.setLoginDialog(!0);return}if(a.updateIframeUrl(""),z)return i.replace({path:z});$?window.open(I):(a.updateIframeUrl(I),i.push({path:"/extend"}))}function h(g){const{menuIframeUrl:B,menuPath:z}=g;if(B)return B===y.value;if(z)return z===c.value}return Zt(()=>{e()}),(g,B)=>(p(),C("footer",Ci,[l("div",{class:"grid border-t py-1 dark:border-t-neutral-800 grid-cols-2",style:Be({gridTemplateColumns:`repeat(${s.value.length}, minmax(0, 1fr))`})},[(p(!0),C(ce,null,me(s.value,z=>(p(),C("a",{key:z.id,class:J([[h(z)?"text-[#3076fd] dark:text-[#3076fd]":""],"cursor-pointer text-center leading-4"]),onClick:$=>x($,z)},[l("span",zi,[S(o(gt),{icon:z.menuIcon,class:"mb-1 inline-block text-lg"},null,8,["icon"])]),l("p",Ti,_(z.menuTipText),1)],10,Ii))),128))],4)]))}}),Ri=""+new URL("../favicon.ico",import.meta.url).href,Pi=["src"],Mi=ne({__name:"Logo",setup(u){const s=se(),n=f(()=>s.globalConfig.clientLogoPath),e=f(()=>s.globalConfig.clientHomePath||"/"),{isMobile:a}=le(),i=f(()=>a.value?["py-2","w-8","ml-3"]:["py-4","px-2","w-full"]);return(r,c)=>(p(),W(o(Dt),{to:e.value},{default:M(()=>[n.value?D("",!0):(p(),C("img",{key:0,src:Ri,class:J([i.value,"cursor-pointer px-0 dark:border-[#ffffff17] border-#ebebeb-400"]),alt:""},null,2)),n.value?(p(),C("img",{key:1,src:n.value,class:J([i.value,"cursor-pointer px-0 dark:border-[#ffffff17] border-#ebebeb-400"]),alt:""},null,10,Pi)):D("",!0)]),_:1},8,["to"]))}}),Ai={class:"px-2 w-full"},Di={class:"flex h-full flex-col items-center space-y-3"},Ni=["onClick"],Bi={class:"flex flex-col justify-between items-center"},ji={class:"w-8 h-8 mb-2 rounded-full bg-primary-600 flex items-center justify-center overflow-hidden shadow-sm border border-gray-300"},Ui=["src"],Ei={class:"py-1"},qi=ne({__name:"index",setup(u){const s=Jt(()=>jt(()=>import("./index-b1a75368.js"),["./index-b1a75368.js","./index.vue_vue_type_script_setup_true_lang-f425914e.js","./index-d64a7cc4.js","./vue-10b4afc0.js","./naive-ui-fedd20b1.js","./vueuse-motion-d4cdaf7b.js","./index-696013f1.css","./useBasicLayout-a4f17bae.js"],import.meta.url)),{t:n,locale:e}=Nt(),a=Ie(),i=se(),r=Bt(),c=xe();re();const d=N(null);a.setEnv(),f(()=>i.userBalance);const y=rt(),k=f(()=>i.userInfo.avatar),x=Me(),h=Pe(),g=N(!1),B=f(()=>i.isLogin),z=f(()=>a.theme==="dark");f(()=>a.env);const $=Qe($n);Qe(Ln),f(()=>e.value==="zh-CN"?"mynaui:gift":"another-icon-for-english");async function I(){const Y=await st({menuPlatform:1});Y.success&&(j.value=Y.data,ct(()=>{ee()}))}const j=N([]),Q=N(!1);Te(()=>{I()});const R=f(()=>{var Y;return Number((Y=i.globalConfig)==null?void 0:Y.signInStatus)===1});function q(){B.value?i.logOut():i.setLoginDialog(!0)}function H(){const Y=z.value?"light":"dark";a.setTheme(Y)}const{isMobile:P}=le(),X=f(()=>x.path);async function v(){y.warning({title:n("chat.clearConversation"),content:n("chat.clearAllNonFavoriteConversations"),positiveText:n("common.confirm"),negativeText:n("common.cancel"),onPositiveClick:async()=>{await r.delAllGroup()}})}const O=f(()=>P.value?{paddingBottom:"env(safe-area-inset-bottom)"}:{}),w=f(()=>P.value?["flex-rol","w-full","border-0"]:["flex-col","w-sider","h-full","border-r"]),E=f(()=>P.value?["flex","flex-rol","items-center","pt-0","w-full"]:["flex","flex-col","pt-1","items-center"]),G=f(()=>c.iframeUrl);function A(Y){const{menuPath:K,isJump:F,menuIframeUrl:he,isNeedAuth:kt}=Y;if(kt&&!B.value){i.setLoginDialog(!0);return}if(c.updateIframeUrl(""),K)return h.push({path:K});F?window.open(he):(c.updateIframeUrl(he),h.push({path:"/extend"}))}function U(){if(!B.value){i.setLoginDialog(!0);return}c.updateSignInDialog(!0)}function ee(){if(!d.value)return;const{clientHeight:Y=0,scrollHeight:K=0}=d.value;Q.value=K>Y}async function oe(){await ge(),h.replace({path:"user-center"})}async function ge(){return new Promise(Y=>{setTimeout(()=>{i.isLogin||h.replace({path:"login"}),Y()},100)})}function pe(Y){const{menuIframeUrl:K,menuPath:F}=Y;if(K)return K===G.value;if(F)return F===X.value}function be(){i.logOut(),h.push("/")}return Le(P,Y=>{a.setSiderCollapsed(Y)},{immediate:!0,flush:"post"}),(Y,K)=>(p(),C(ce,null,[l("div",{class:J(["flex min-w-sm bg-gray-50 pb-2 dark:bg-gray-900 border-gray-100 dark:border-gray-800 select-none",w.value]),style:Be(O.value)},[l("div",Ai,[S(Mi)]),l("main",{ref_key:"track",ref:d,class:J(["flex-1 flex-grow-1 mb-5 overflow-auto",E.value])},[S(o(Qt),{size:1},{default:M(()=>[l("div",Di,[(p(!0),C(ce,null,me(j.value,F=>(p(),C("div",{key:F.menuName,class:J(["flex justify-center flex-col items-center",o(P)?"mt-0":"mt-3"]),onClick:he=>A(F)},[S(o(at),{trigger:"hover",placement:"right"},{trigger:M(()=>[l("div",{class:J(["relative flex items-center justify-center h-10 w-10 rounded-md cursor-pointer duration-300",[pe(F)?["bg-white","text-primary-600","dark:bg-gray-800","dark:text-white"]:["bg-gray-50","dark:bg-gray-900","dark:text-gray-400"],"hover:bg-white","hover:text-primary-600","dark:hover:bg-gray-800","dark:hover:text-white"]])},[S(o(gt),{icon:F.menuIcon,class:"text-2xl"},null,8,["icon"])],2)]),default:M(()=>[V(" "+_(F.menuTipText),1)]),_:2},1024)],10,Ni))),128))])]),_:1})],2),l("div",Bi,[B.value?(p(),W(o(un),{key:0,as:"div",class:"relative inline-block text-left"},{default:M(()=>[l("div",null,[S(o(tn),{class:"inline-flex w-full justify-center gap-x-1.5 rounded-md text-sm font-semibold dark:text-gray-400 text-gray-700"},{default:M(()=>[l("div",ji,[k.value?(p(),C("img",{key:0,src:k.value,class:"w-full h-full object-cover"},null,8,Ui)):D("",!0),k.value?D("",!0):(p(),W(o(Ge),{key:1,theme:"outline",size:"20",class:"text-white"}))])]),_:1})]),S(Ft,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:M(()=>[S(o(nn),{class:"absolute w-[228px] left-0 bottom-full mb-2 origin-bottom-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-800 dark:text-gray-400 text-gray-900 z-50"},{default:M(()=>[l("div",Ei,[S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([[F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"],"border-b border-b-gray-100 dark:border-b-gray-800"]),onClick:v},[S(o(sn),{theme:"outline",size:"16",class:"mr-2"}),V(" "+_(o(n)("chat.clear")),1)],2)]),_:1}),S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:K[0]||(K[0]=he=>o(c).updateNoticeDialog(!0))},[S(o(an),{theme:"outline",size:"16",class:"mr-2"}),V(" "+_(o(n)("chat.announcement")),1)],2)]),_:1}),S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:K[1]||(K[1]=he=>o(c).updateGoodsDialog(!0))},[S(o(ln),{theme:"outline",size:"16",class:"mr-2"}),V(" "+_(o(n)("chat.pointsMall")),1)],2)]),_:1}),S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:H},[S(o(rn),{theme:"outline",size:"16",class:"mr-2"}),V(" "+_(o(n)("chat.toggleTheme")),1)],2)]),_:1}),R.value?(p(),W(o(fe),{key:0},{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:U},[S(o(on),{theme:"outline",size:"16",class:"mr-2"}),V(" "+_(o(n)("chat.signInReward")),1)],2)]),_:1})):D("",!0),S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:K[2]||(K[2]=he=>oe())},[S(o(Ge),{theme:"outline",size:"16",class:"mr-2"}),V(" 个人中心 ")],2)]),_:1}),S(o(fe),null,{default:M(({active:F})=>[l("a",{href:"#",class:J([F?"bg-gray-100 dark:bg-gray-700":"","group flex items-center justify-start px-2 py-2 text-sm whitespace-nowrap"]),onClick:K[3]||(K[3]=he=>be())},[S(o(cn),{theme:"outline",size:"16",class:"mr-2"}),V(" 退出登录 ")],2)]),_:1})])]),_:1})]),_:1})]),_:1})):D("",!0),B.value?D("",!0):(p(),W(o(pn),{key:1,label:o(n)("siderBar.loginAccount"),placement:o(P)?"bottom":"right",class:J(o(P)?"mb-0":"mb-5"),onClick:q},{default:M(()=>[S(o(ve),{size:"20",color:"#555"},{default:M(()=>[(p(),W(ut($.value)))]),_:1})]),_:1},8,["label","placement","class"]))])],6),g.value?(p(),W(o(s),{key:0,visible:g.value,"onUpdate:visible":K[4]||(K[4]=F=>g.value=F)},null,8,["visible"])):D("",!0)],64))}});const Oi={class:"h-full dark:bg-gray-900 transition-all p-0"},Hi={class:"h-full overflow-hidden"},sl=ne({__name:"index",setup(u){const s=se(),n=Me(),e=Pe(),a=xe(),i=Ie(),r=re(),c=f(()=>a.payDialog),d=f(()=>a.goodsDialog),y=f(()=>a.noticeDialog),k=f(()=>a.bindWxDialog),x=f(()=>a.signInDialog),h=f(()=>{var P;return Number((P=s.globalConfig)==null?void 0:P.isHideSidebar)===1}),{isMobile:g}=le(),B=f(()=>s.loginDialog);f(()=>i.theme);const z=f(()=>s.isLogin),$=f(()=>{var P;return Number((P=s.globalConfig)==null?void 0:P.wechatSilentLoginStatus)===1}),I=f(()=>{var P;return(P=s.globalConfig)==null?void 0:P.clientHomePath});function j(){const{token:P}=n.query;if(P){s.setToken(P);const X=n.name;e.replace({name:X,query:{}}),r.success("账户登录成功、开始体验吧!"),s.getUserInfo()}}async function Q(){if(I.value||!$.value||z.value)return;const X=new URLSearchParams(window.location.search).getAll("code"),v=X.length>0?X[X.length-1]:null;if(v){const O=await Ut({code:v});if(O.success){s.setToken(O.data),s.getUserInfo(),s.setLoginDialog(!1);const w=window.location.href.split("?")[0]+window.location.search.replace(new RegExp("([&?])code=[^&]*","g"),"$1").replace(/^&/,"?");window.history.replaceState(null,"",w)}}else{const O=window.location.href.split("#")[0],w=await Et({url:O});w.success&&(window.location.href=w.data)}}function R(){var X;const P=window.navigator.userAgent.toLowerCase();P.match(/MicroMessenger/i)&&((X=P==null?void 0:P.match(/MicroMessenger/i))==null?void 0:X[0])==="micromessenger"&&Q()}Te(()=>{R(),j()});const q=f(()=>g.value?["rounded-none","shadow-none"]:["dark:border-neutral-800"]),H=f(()=>g.value?["flex-col"]:["dark:border-neutral-800"]);return(P,X)=>{const v=Xt("RouterView");return p(),C("div",Oi,[l("div",Hi,[l("div",{class:J(["z-40 transition flex h-full relative",H.value])},[!o(g)&&!h.value?(p(),W(qi,{key:0})):D("",!0),S(o(Gt),{class:J(["h-full",q.value]),style:{flex:"1"}},{default:M(()=>[S(v,null,{default:M(({Component:O,route:w})=>[(p(),W(ut(O),{key:w.fullPath}))]),_:1})]),_:1},8,["class"]),o(g)&&!h.value?(p(),W(Li,{key:1})):D("",!0)],2),S(na,{visible:B.value},null,8,["visible"]),S(ni,{visible:c.value},null,8,["visible"]),S(is,{visible:d.value},null,8,["visible"]),S(Pa,{visible:y.value},null,8,["visible"]),S(jn,{visible:k.value},null,8,["visible"]),S(Si,{visible:x.value},null,8,["visible"])])])}}});export{sl as default};
|