PageSourceSearch

https://www.trustoken.ai/assets/main-BwlQzZ10.js

js trustoken.ai collected 2026-10-05 14:40:42 UTC 511,046 bytes, 574 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dr8RynAy.js","assets/react-core-BbAAKJJM.js","assets/tt-notice-CRDCEwqI.js","assets/i18n-BkF5Ubg2.js","assets/modulepreload-polyfill-B5Qt9EMX.js","assets/tools-BOMU0Mlc.js","assets/react-components-DQJhV71o.js","assets/index-BuLmARDD.css","assets/index-CvYQXqYv.js","assets/visactor-B3hATS5j.js","assets/index-BX-Uko2J.js","assets/index-DBVEdHZn.js","assets/UserInvitations-CbIN8xrc.js","assets/index-bA79xXhY.js"])))=>i.map(i=>d[i]);
2import"./modulepreload-polyfill-B5Qt9EMX.js";import{a as Bu,b as Iu,g as Kt,R as ie,r as f,d as Pu,u as Ft,e as wt,L as Wt,N as no,f as Nn,h as Mu,i as Lu,j as Oe,k as Ou,B as Tu}from"./react-core-BbAAKJJM.js";import{c as zu,r as Ru,a as $u,u as ve,b as is}from"./tools-BOMU0Mlc.js";import{Q as Et,r as Uu,P as zt,a as Vu,k as Hu}from"./react-components-DQJhV71o.js";import{i as we,t as Z,a as Wu,g as qu,s as Zu,b as Ku,l as os,f as Yu}from"./tt-notice-CRDCEwqI.js";import"./i18n-BkF5Ubg2.js";var fr={exports:{}},dn={};var Hs;function Gu(){if(Hs)return dn;Hs=1;var e=Bu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(c,l,u){var m,d={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(m in l)r.call(l,m)&&!i.hasOwnProperty(m)&&(d[m]=l[m]);if(c&&c.defaultProps)for(m in l=c.defaultProps,l)d[m]===void 0&&(d[m]=l[m]);return{$$typeof:t,type:c,key:h,ref:p,props:d,_owner:a.current}}return dn.Fragment=n,dn.jsx=o,dn.jsxs=o,dn}var Ws;function Qu(){return Ws||(Ws=1,fr.exports=Gu()),fr.exports}var s=Qu(),Pn={},qs;function Ju(){if(qs)return Pn;qs=1;var e=Iu();return Pn.createRoot=e.createRoot,Pn.hydrateRoot=e.hydrateRoot,Pn}var Xu=Ju();const ec=Kt(Xu),tc=(e,t)=>{switch(t.type){case"login":return{...e,user:t.payload};case"logout":return{...e,user:void 0};default:return e}},ro={user:void 0},kt=ie.createContext({state:ro,dispatch:()=>null}),nc=({children:e})=>{const[t,n]=ie.useReducer(tc,ro);return s.jsx(kt.Provider,{value:[t,n],children:e})},rc=(e,t)=>{switch(t.type){case"set":return{...e,status:t.payload};case"unset":return{...e,status:void 0};default:return e}},so={status:void 0},Sn=ie.createContext({state:so,dispatch:()=>null}),sc=({children:e})=>{const[t,n]=ie.useReducer(rc,so);return s.jsx(Sn.Provider,{value:[t,n],children:e})},ao=f.createContext(null),io=()=>f.useContext(ao),oo=f.createContext(null),ls=()=>f.useContext(oo),ac=({children:e})=>{const[t,n]=f.useState(()=>{try{return localStorage.getItem("theme-mode")||null}catch{return null}}),r=f.useCallback(a=>{n(a?"dark":"light");const i=document.body;a?(i.setAttribute("theme-mode","dark"),localStorage.setItem("theme-mode","dark")):(i.removeAttribute("theme-mode"),localStorage.setItem("theme-mode","light"))},[]);return f.useEffect(()=>{const a=t==="dark";document.documentElement.setAttribute("data-theme",a?"dark":"corporate"),a?document.body.setAttribute("theme-mode","dark"):document.body.removeAttribute("theme-mode")},[t]),s.jsx(oo.Provider,{value:r,children:s.jsx(ao.Provider,{value:t,children:e})})},ic=zu(),us={SUCCESS_TIMEOUT:1500,INFO_TIMEOUT:3e3,ERROR_TIMEOUT:5e3},ut=10,oc=({htmlContent:e})=>s.jsx("div",{dangerouslySetInnerHTML:{__html:e}});function lc(){let e=localStorage.getItem("system_name");return e||"trustoken.ai"}function uc(){let e=localStorage.getItem("logo");return e||"/image/[email protected]"}function lo(){let e=localStorage.getItem("user");const t=new URLSearchParams(location.search);let n=sessionStorage.getItem("oUser")||t.get("oUser");return n||(e?(e=JSON.parse(e),e.id):-1)}function cc(){sessionStorage.removeItem("oToken"),sessionStorage.removeItem("oUser")}function vn(){cc()}async function h2(e,t,n="download"){const r=await e.get(t,{responseType:"blob"}),a=r.headers["content-type"];if(a&&a.includes("application/json")){let m;if(r.data instanceof Blob){const h=await r.data.text();m=JSON.parse(h)}else m=r.data;const d=new Error(m.message||"下载失败");throw d.name="AxiosError",d.response={status:200,data:m},d}const i=r.headers["content-disposition"];let o;if(i){const m=i.match(/filename\*=UTF-8''(.+)/);if(m&&m[1])o=decodeURIComponent(m[1]);else{const d=i.match(/filename=(.+)/);d&&d[1]&&(o=d[1])}}if(!o&&n){const m=n.split("/").pop(),d=m.split("_");d.length>1?o=d.slice(1).join("_"):o=m}o||(o="download");const c=new Blob([r.data]),l=window.URL.createObjectURL(c),u=document.createElement("a");u.href=l,u.download=o,document.body.appendChild(u),u.click(),window.URL.revokeObjectURL(l),document.body.removeChild(u)}function dc(){return localStorage.getItem("footer_html")}async function cs(e){let t=!0;try{await navigator.clipboard.writeText(e)}catch{try{var n=window.document.createElement("input");n.value=e,window.document.body.appendChild(n),n.select(),window.document.execCommand("Copy"),window.document.body.removeChild(n)}catch(a){t=!1,console.error(a)}}return t}function qn(){return window.innerWidth<=600}let Jt={autoClose:us.ERROR_TIMEOUT},uo={autoClose:us.SUCCESS_TIMEOUT},ds={autoClose:us.INFO_TIMEOUT},zr={autoClose:!1};qn()&&(Jt.position="top-center",uo.position="top-center",ds.position="top-center",zr.position="top-center");function W(e,t){if(t)return;const n=we.t;if(e.message){if(e.name==="AxiosError"){switch(e.response.status){case 401:localStorage.removeItem("user"),window.location.href=`/login?${new URLSearchParams({expired:!0,next:location.href.slice(location.origin.length)})}`;break;case 429:Et.error(n("错误:请求次数过多,请稍后再试!"),Jt);break;
2case 500:Et.error(n("错误:服务器内部错误,请联系管理员!"),Jt);break;case 405:Et.info(n("本站仅作演示之用,无服务端!"),ds);break;default:Et.error(n("错误:")+n(e?.response?.data?.message||e.message),Jt)}return}Et.error(n("错误:")+n(e.message),Jt)}else{const r=`${n("错误:")}${typeof e=="string"?n(e):e}`;Et.error(r,Jt)}}function fe(e){Et.success(e,uo)}function rn(e){Et.info(e,ds)}function Zs(e,t=!1){t?Et(s.jsx(oc,{htmlContent:e}),zr):Et.info(e,zr)}function mc(){var e=new Date;return e.setHours(0,0,0,0),Math.floor(e.getTime()/1e3)}function pc(){var e=new Date;return e.setHours(23,59,59,0),Math.floor(e.getTime()/1e3)}function _t(e){let t=new Date(e*1e3),n=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),a=t.getDate().toString(),i=t.getHours().toString(),o=t.getMinutes().toString(),c=t.getSeconds().toString();return r.length===1&&(r="0"+r),a.length===1&&(a="0"+a),i.length===1&&(i="0"+i),o.length===1&&(o="0"+o),c.length===1&&(c="0"+c),n+"-"+r+"-"+a+" "+i+":"+o+":"+c}function f2(e,t="hour"){let n=new Date(e*1e3),r=(n.getMonth()+1).toString(),a=n.getDate().toString(),i=n.getHours().toString();r.length===1&&(r="0"+r),a.length===1&&(a="0"+a),i.length===1&&(i="0"+i);let o=r+"-"+a;if(t==="hour")o+=" "+i+":00";else if(t==="week"){let c=new Date(e*1e3+5184e5),l=(c.getMonth()+1).toString(),u=c.getDate().toString();l.length===1&&(l="0"+l),u.length===1&&(u="0"+u),o+=" - "+l+"-"+u}return o}var hc=Ru();const co=Kt(hc);var H=$u();function mo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=mo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fc(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=mo(e))&&(r&&(r+=" "),r+=t);return r}const gc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},xc=(e,t)=>({classGroupId:e,validator:t}),po=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zn="-",Ks=[],bc="arbitrary..",yc=e=>{const t=kc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return wc(o);const c=o.split(Zn),l=c[0]===""&&c.length>1?1:0;return ho(c,l,t)},getConflictingClassGroupIds:(o,c)=>{if(c){const l=r[o],u=n[o];return l?u?gc(u,l):l:u||Ks}return n[o]||Ks}}},ho=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const u=ho(e,t+1,i);if(u)return u}const o=n.validators;if(o===null)return;const c=t===0?e.join(Zn):e.slice(t).join(Zn),l=o.length;for(let u=0;u<l;u++){const m=o[u];if(m.validator(c))return m.classGroupId}},wc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?bc+r:void 0})(),kc=e=>{const{theme:t,classGroups:n}=e;return vc(n,t)},vc=(e,t)=>{const n=po();for(const r in e){const a=e[r];ms(a,n,r,t)}return n},ms=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const o=e[i];Cc(o,t,n,r)}},Cc=(e,t,n,r)=>{if(typeof e=="string"){jc(e,t,n);return}if(typeof e=="function"){Ec(e,t,n,r);return}Fc(e,t,n,r)},jc=(e,t,n)=>{const r=e===""?t:fo(t,e);r.classGroupId=n},Ec=(e,t,n,r)=>{if(Nc(e)){ms(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(xc(n,e))},Fc=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let o=0;o<i;o++){const[c,l]=a[o];ms(l,fo(t,c),n,r)}},fo=(e,t)=>{let n=e;const r=t.split(Zn),a=r.length;for(let i=0;i<a;i++){const o=r[i];let c=n.nextPart.get(o);c||(c=po(),n.nextPart.set(o,c)),n=c}return n},Nc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Sc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,o)=>{n[i]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let o=n[i];if(o!==void 0)return o;if((o=r[i])!==void 0)return a(i,o),o},set(i,o){i in n?n[i]=o:a(i,o)}}},Rr="!",Ys=":",_c=[],Gs=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Ac=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let o=0,c=0,l=0,u;const m=a.length;for(let b=0;b<m;b++){const y=a[b];if(o===0&&c===0){if(y===Ys){i.push(a.slice(l,b)),l=b+1;continue}if(y==="/"){u=b;continue}}y==="["?o++:y==="]"?o--:y==="("?c++:y===")"&&c--}const d=i.length===0?a:a.slice(l);let h=d,p=!1;d.endsWith(Rr)?(h=d.slice(0,-1),p=!0):d.startsWith(Rr)&&(h=d.slice(1),p=!0);const x=u&&u>l?u-l:void 0;return Gs(i,p,h,x)};if(t){const a=t+Ys,i=r;r=o=>o.startsWith(a)?i(o.slice(a.length)):Gs(_c,!1,o,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Dc=e=>{const t=new Map;
vendor: 5,930 bytes, line 2
2return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const o=n[i],c=o[0]==="[",l=t.has(o);c||l?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(o)):a.push(o)}return a.length>0&&(a.sort(),r.push(...a)),r}},Bc=e=>({cache:Sc(e.cacheSize),parseClassName:Ac(e),sortModifiers:Dc(e),postfixLookupClassGroupIds:Ic(e),...yc(e)}),Ic=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Pc=/\s+/,Mc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i,postfixLookupClassGroupIds:o}=t,c=[],l=e.trim().split(Pc);let u="";for(let m=l.length-1;m>=0;m-=1){const d=l[m],{isExternal:h,modifiers:p,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:y}=n(d);if(h){u=d+(u.length>0?" "+u:u);continue}let k=!!y,j;if(k){const O=b.substring(0,y);j=r(O);const N=j&&o[j]?r(b):void 0;N&&N!==j&&(j=N,k=!1)}else j=r(b);if(!j){if(!k){u=d+(u.length>0?" "+u:u);continue}if(j=r(b),!j){u=d+(u.length>0?" "+u:u);continue}k=!1}const v=p.length===0?"":p.length===1?p[0]:i(p).join(":"),A=x?v+Rr:v,S=A+j;if(c.indexOf(S)>-1)continue;c.push(S);const F=a(j,k);for(let O=0;O<F.length;++O){const N=F[O];c.push(A+N)}u=d+(u.length>0?" "+u:u)}return u},Lc=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=go(n))&&(a&&(a+=" "),a+=r);return a},go=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=go(e[r]))&&(n&&(n+=" "),n+=t);return n},Oc=(e,...t)=>{let n,r,a,i;const o=l=>{const u=t.reduce((m,d)=>d(m),e());return n=Bc(u),r=n.cache.get,a=n.cache.set,i=c,c(l)},c=l=>{const u=r(l);if(u)return u;const m=Mc(l,n);return a(l,m),m};return i=o,(...l)=>i(Lc(...l))},Tc=[],He=e=>{const t=n=>n[e]||Tc;return t.isThemeGetter=!0,t},xo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Rc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$c=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=e=>zc.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),Ct=e=>!!e&&Number.isInteger(Number(e)),gr=e=>e.endsWith("%")&&ge(e.slice(0,-1)),St=e=>Rc.test(e),yo=()=>!0,Wc=e=>$c.test(e)&&!Uc.test(e),ps=()=>!1,qc=e=>Vc.test(e),Zc=e=>Hc.test(e),Kc=e=>!Q(e)&&!J(e),Yc=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Gc=e=>Ot(e,vo,ps),Q=e=>xo.test(e),Rt=e=>Ot(e,Co,Wc),Qs=e=>Ot(e,sd,ge),Qc=e=>Ot(e,Eo,yo),Jc=e=>Ot(e,jo,ps),Js=e=>Ot(e,wo,ps),Xc=e=>Ot(e,ko,Zc),Mn=e=>Ot(e,Fo,qc),J=e=>bo.test(e),mn=e=>Yt(e,Co),ed=e=>Yt(e,jo),Xs=e=>Yt(e,wo),td=e=>Yt(e,vo),nd=e=>Yt(e,ko),Ln=e=>Yt(e,Fo,!0),rd=e=>Yt(e,Eo,!0),Ot=(e,t,n)=>{const r=xo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yt=(e,t,n=!1)=>{const r=bo.exec(e);return r?r[1]?t(r[1]):n:!1},wo=e=>e==="position"||e==="percentage",ko=e=>e==="image"||e==="url",vo=e=>e==="length"||e==="size"||e==="bg-size",Co=e=>e==="length",sd=e=>e==="number",jo=e=>e==="family-name",Eo=e=>e==="number"||e==="weight",Fo=e=>e==="shadow",ad=()=>{const e=He("color"),t=He("font"),n=He("text"),r=He("font-weight"),a=He("tracking"),i=He("leading"),o=He("breakpoint"),c=He("container"),l=He("spacing"),u=He("radius"),m=He("shadow"),d=He("inset-shadow"),h=He("text-shadow"),p=He("drop-shadow"),x=He("blur"),b=He("perspective"),y=He("aspect"),k=He("ease"),j=He("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...A(),J,Q],F=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],N=()=>[J,Q,l],I=()=>[Pt,"full","auto",...N()],C=()=>[Ct,"none","subgrid",J,Q],_=()=>["auto",{span:["full",Ct,J,Q]},Ct,J,Q],B=()=>[Ct,"auto",J,Q],U=()=>["auto","min","max","fr",J,Q],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...N()],ee=()=>[Pt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],le=()=>[Pt,"screen","full","dvw","lvw","svw","min","max","fit",...N()],se=()=>[Pt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],g=()=>[e,J,Q],P=()=>[...A(),Xs,Js,{position:[J,Q]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",td,Gc,{size:[J,Q]}],D=()=>[gr,mn,Rt],T=()=>["","none","full",u,J,Q],$=()=>["",ge,mn,Rt],E=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[ge,gr,Xs,Js],me=()=>["","none",x,J,Q],Pe=()=>["none",ge,J,Q],Ee=()=>["none",ge,J,Q],Re=()=>[ge,J,Q],Ae=()=>[Pt,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[St],breakpoint:[St],color:[yo],container:[St],"drop-shadow":[St],ease:["in","out","in-out"],font:[Kc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[St],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[St],shadow:[St],spacing:["px",ge],text:[St],"text-shadow":[St],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pt,Q,J,y]}],container:["container"],"container-type":[{"@container":["","normal","size",J,Q]}
vendor: 6,097 bytes, line 2
2],"container-named":[Yc],columns:[{columns:[ge,Q,J,c]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Ct,"auto",J,Q]}],basis:[{basis:[Pt,"full","auto",c,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,Pt,"auto","initial","none",Q]}],grow:[{grow:["",ge,J,Q]}],shrink:[{shrink:["",ge,J,Q]}],order:[{order:[Ct,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...le()]}],"min-inline-size":[{"min-inline":["auto",...le()]}],"max-inline-size":[{"max-inline":["none",...le()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[c,"screen",...ee()]}],"min-w":[{"min-w":[c,"screen","none",...ee()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[o]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,mn,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,rd,Qc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gr,Q]}],"font-family":[{font:[ed,Jc,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,J,Q]}],"line-clamp":[{"line-clamp":[ge,"none",J,Qs]}],leading:[{leading:[i,...N()]}],"list-image":[{"list-image":["none",J,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",J,Rt]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[ge,"auto",J,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"tab-size":[{tab:[Ct,J,Q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ct,J,Q],radial:["",J,Q],conic:[Ct,J,Q]},nd,Xc]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:D()}
vendor: 7,332 bytes, line 2
2],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-bs":[{"border-bs":$()}],"border-w-be":[{"border-be":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...E(),"hidden","none"]}],"divide-style":[{divide:[...E(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-bs":[{"border-bs":g()}],"border-color-be":[{"border-be":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...E(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,J,Q]}],"outline-w":[{outline:["",ge,mn,Rt]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",m,Ln,Mn]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",d,Ln,Mn]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[ge,Rt]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",h,Ln,Mn]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[ge,J,Q]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[J,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Q]}],filter:[{filter:["","none",J,Q]}],blur:[{blur:me()}],brightness:[{brightness:[ge,J,Q]}],contrast:[{contrast:[ge,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",p,Ln,Mn]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",ge,J,Q]}],"hue-rotate":[{"hue-rotate":[ge,J,Q]}],invert:[{invert:["",ge,J,Q]}],saturate:[{saturate:[ge,J,Q]}],sepia:[{sepia:["",ge,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[ge,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[ge,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",ge,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[ge,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[ge,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",J,Q]}],ease:[{ease:["linear","initial",k,J,Q]}],delay:[{delay:[ge,J,Q]}],animate:[{animate:["none",j,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,J,Q]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[Ct,J,Q]}],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}
vendor: 5,017 bytes, line 2
2],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":g()}],"scrollbar-track-color":[{"scrollbar-track":g()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J,Q]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[ge,mn,Rt,Qs]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}
2,id=Oc(ad);function Te(...e){return id(fc(e))}function od(){const e=document.getElementById("toast-popover-host");!e||typeof e.showPopover!="function"||(e.matches(":popover-open")&&e.hidePopover(),e.showPopover())}function Ne({open:e,onClose:t,title:n,children:r,footer:a,closeOnBackdrop:i=!0,showCloseButton:o=!1,className:c,ariaLabel:l,placement:u="middle"}){const m=f.useId(),d=f.useRef(null),h=f.useRef(null);return f.useEffect(()=>{if(!e)return;const p=d.current;return h.current=document.activeElement,p&&!p.open&&(p.showModal(),od()),()=>{h.current?.focus?.()}},[e]),e?Pu.createPortal(s.jsxs("dialog",{ref:d,className:Te("modal z-[1000]",u==="start"&&"modal-start",u==="end"&&"modal-end",u==="top"&&"modal-top",u==="bottom"&&"modal-bottom",u==="middle"&&"modal-middle"),"aria-labelledby":n?m:void 0,"aria-label":n?void 0:l,onClose:()=>t?.(),children:[s.jsxs("div",{className:Te("modal-box relative max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg overflow-y-auto border border-base-300 bg-base-100 p-5 shadow-2xl sm:p-6",c),children:[o&&s.jsx("button",{type:"button",className:"btn btn-ghost btn-circle btn-sm absolute right-4 top-4 text-base-content/70","aria-label":"关闭",title:"关闭",onClick:()=>t?.(),children:s.jsx("svg",{"aria-hidden":"true",className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:s.jsx("path",{d:"M6 6l12 12M18 6L6 18"})})}),n&&s.jsx("h2",{id:m,className:Te("text-lg font-bold text-base-content",o&&"pr-10"),children:n}),s.jsx("div",{className:Te(n&&"mt-4"),children:r}),a&&s.jsx("footer",{className:"modal-action",children:a})]}),s.jsx("form",{method:"dialog",className:"modal-backdrop",onSubmit:p=>{i||p.preventDefault()},children:s.jsx("button",{type:"submit","aria-label":"关闭",children:"关闭"})})]}),document.body):null}let $r=null;const Ur=new Set;function ld(e){$r=e,Ur.forEach(t=>t(e))}function ud(){const[e,t]=f.useState($r);f.useEffect(()=>(Ur.add(t),()=>Ur.delete(t)),[]);const n=()=>{$r=null,t(null)};return s.jsx(Ne,{open:!!e,onClose:n,ariaLabel:"系统提示",className:"max-w-[600px]",children:e?.isHtml?s.jsx("div",{className:"pt-4 text-base-content",dangerouslySetInnerHTML:{__html:e.content}}):s.jsx("div",{className:"pt-4 text-base-content",children:e?.content})})}let Y=co.create({baseURL:"",headers:{"New-API-User":lo(),"Cache-Control":"no-store"}});function Cn(){Y=co.create({baseURL:"",headers:{"New-API-User":lo(),"Cache-Control":"no-store"}})}Y.interceptors.response.use(e=>{const{data:t}=e;if(H.get(t,"showType")&&H.get(t,"msgType")&&!H.get(t,"success")){const{showType:n,msgType:r,message:a}=t;n==="modal"&&ld({content:a,isHtml:r==="html"})}return e},e=>{if(e.config.skipError)return Promise.reject(e);W(e)});Y.interceptors.request.use(e=>{const t=sessionStorage.getItem("addHeaders"),n=sessionStorage.getItem("oToken");if(t){const r=JSON.parse(t);for(const a in r)e.headers[a]=r[a]}return n&&(e.headers.Authorization=`Bearer ${n}`),e});const nr=2,cd=100;function No(e){const t=Number(e);return Number.isFinite(t)?t*cd:0}function dd(e,t){return isNaN(e)||isNaN(t)||t===0?0:e/t}function md(){const e=localStorage.getItem("quota_per_unit");return parseFloat(e)||5e5}function pd(){return JSON.parse(localStorage.getItem("status")||"{}").currency_symbol||"¥"}function ne(e,t=2){let n=Number(e);return Number.isNaN(n)?e:(n=So(n,t),pd()+n.toFixed(t))}function Xe(e,t=2){const n=Number(e);if(Number.isNaN(n))return"";const r=Number(No(n).toFixed(t+4));return`${So(r,t).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:t})} ${Z`灵石`}`}function pn(e,t=0){const n=Number(e);return Number.isNaN(n)?"":`${n.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:t})} ${Z`灵石`}`}function So(e,t){if(typeof e!="number"||typeof t!="number"||t<0||isNaN(e)||isNaN(t))return console.error("请输入有效的数字和非负小数位数。"),0;const n=Math.pow(10,t);return Math.trunc(e*n)/n}function hs(e){return e*nr}function fs(e,t){return e*nr*t}function hd(e,t){return e*nr*t}function fd(e,t){return e*nr*t}function g2(e){return e>=1e9?(e/1e9).toFixed(1)+"B":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e4?(e/1e3).toFixed(1)+"k":e}function _o(e){return dd(e,md())}function x2(e){return No(_o(e))}function ft(e,t=2){return Xe(_o(e),t)}function Ve(e,t=2){return ft(e,t)}function gd(e,t,n,r=-1,a,i,o=0,c=1){if(r!==-1)return we.t("模型价格:{{price}} * 分组倍率:{{ratio}} = {{total}}",{price:ne(r,6),ratio:i,total:ne(r*i,6)});{a===void 0&&(a=0);let l=hs(n),u=fs(n,a),d=(e-o+o*c)/1e6*l*i+t/1e6*u*i;return s.jsx(s.Fragment,{children:s.jsxs("article",{children:[s.jsx("p",{children:we.t("提示价格:{{price}} / 1M tokens",{price:ne(l,6)})}),s.jsx("p",{children:we.t("补全价格:{{price}} * {{completionRatio}} = {{total}} / 1M tokens (补全倍率: {{completionRatio}})",{price:ne(l,6),total:ne(u,6),completionRatio:a})}),o>0&&s.jsx("p",{children:we.t("缓存价格:{{price}} * {{cacheRatio}} = {{total}} / 1M tokens (缓存倍率: {{cacheRatio}})",{price:ne(l,6),total:ne(l*c,6),cacheRatio:c})}),s.jsx("p",{}),s.jsx("p",{children:o>0?we.t("提示 {{nonCacheInput}} tokens / 1M tokens * {{price}} + 缓存 {{cacheInput}} tokens / 1M tokens * {{cachePrice}} + 补全 {{completion}} tokens / 1M tokens * {{compPrice}} * 分组 {{ratio}} = {{total}}",{nonCacheInput:e-o,cacheInput:o,cachePrice:ne(l*c,6),price:ne(l,6),completion:t,compPrice:ne(u,6),ratio:i,total:ne(d,6)}):we.t("提示 {{input}} tokens / 1M tokens * {{price}} + 补全 {{completion}} tokens / 1M tokens * {{compPrice}} * 分组 {{ratio}} = {{total}}",{input:e,price:ne(l,6),completion:t,compPrice:ne(u,6),ratio:i,total:ne(d,6)})}),s.jsx("p",{children:we.t("仅供参考,以实际扣费为准")})]})})}}function xd(e,t,n,r=-1,a,i,o,c,l,u,m=0,d=1){if(r!==-1)return we.t("模型价格:{{price}} * 分组倍率:{{ratio}} = {{total}}",{price:ne(r,6),ratio:u,total:ne(r*u,6)});
2{a===void 0&&(a=0),c=parseFloat(c).toFixed(6);let h=hs(n),p=fs(n,a),b=(e-m+m*d)/1e6*h*u+t/1e6*p*u,y=i/1e6*h*c*u+o/1e6*h*c*l*u,k=b+y;return s.jsx(s.Fragment,{children:s.jsxs("article",{children:[s.jsx("p",{children:we.t("提示价格:{{price}} / 1M tokens",{price:ne(h,6)})}),s.jsx("p",{children:we.t("补全价格:{{price}} * {{completionRatio}} = {{total}} / 1M tokens (补全倍率: {{completionRatio}})",{price:ne(h,6),total:ne(p,6),completionRatio:a})}),m>0&&s.jsx("p",{children:we.t("缓存价格:{{price}} * {{cacheRatio}} = {{total}} / 1M tokens (缓存倍率: {{cacheRatio}})",{price:ne(h,6),total:ne(h*d,6),cacheRatio:d})}),s.jsx("p",{children:we.t("音频提示价格:{{price}} * {{audioRatio}} = {{total}} / 1M tokens (音频倍率: {{audioRatio}})",{price:ne(h,6),total:ne(h*c,6),audioRatio:c})}),s.jsx("p",{children:we.t("音频补全价格:{{price}} * {{audioRatio}} * {{audioCompRatio}} = {{total}} / 1M tokens (音频补全倍率: {{audioCompRatio}})",{price:ne(h,6),total:ne(h*c*l,6),audioRatio:c,audioCompRatio:l})}),s.jsx("p",{children:m>0?we.t("文字提示 {{nonCacheInput}} tokens / 1M tokens * {{price}} + 缓存 {{cacheInput}} tokens / 1M tokens * {{cachePrice}} + 文字补全 {{completion}} tokens / 1M tokens * {{compPrice}} = {{total}}",{nonCacheInput:e-m,cacheInput:m,cachePrice:ne(h*d,6),price:ne(h,6),completion:t,compPrice:ne(p,6),total:ne(b,6)}):we.t("文字提示 {{input}} tokens / 1M tokens * {{price}} + 文字补全 {{completion}} tokens / 1M tokens * {{compPrice}} = {{total}}",{input:e,price:ne(h,6),completion:t,compPrice:ne(p,6),total:ne(b,6)})}),s.jsx("p",{children:we.t("音频提示 {{input}} tokens / 1M tokens * {{audioInputPrice}} + 音频补全 {{completion}} tokens / 1M tokens * {{audioCompPrice}} = {{total}}",{input:i,completion:o,audioInputPrice:ne(c*h,6),audioCompPrice:ne(c*l*h,6),total:ne(y,6)})}),s.jsx("p",{children:we.t("总价:文字价格 {{textPrice}} + 音频价格 {{audioPrice}} = {{total}}",{total:ne(k,6),textPrice:ne(b,6),audioPrice:ne(y,6)})}),s.jsx("p",{children:we.t("仅供参考,以实际扣费为准")})]})})}}const ea=["amber","blue","cyan","green","grey","indigo","light-blue","lime","orange","pink","purple","red","teal","violet","yellow"],bd=["#1664FF","#1AC6FF","#FF8A00","#3CC780","#7442D4","#FFC400","#304D77","#B48DEB","#009488","#FF7DDA"],yd=["#1664FF","#B2CFFF","#1AC6FF","#94EFFF","#FF8A00","#FFCE7A","#3CC780","#B9EDCD","#7442D4","#DDC5FA","#FFC400","#FAE878","#304D77","#8B959E","#B48DEB","#EFE3FF","#009488","#59BAA8","#FF7DDA","#FFCFEE"],ta={"dall-e":"rgb(147,112,219)","dall-e-3":"rgb(153,50,204)","gpt-3.5-turbo":"rgb(184,227,167)","gpt-3.5-turbo-0613":"rgb(60,179,113)","gpt-3.5-turbo-1106":"rgb(32,178,170)","gpt-3.5-turbo-16k":"rgb(149,252,206)","gpt-3.5-turbo-16k-0613":"rgb(119,255,214)","gpt-3.5-turbo-instruct":"rgb(175,238,238)","gpt-4":"rgb(135,206,235)","gpt-4-0613":"rgb(100,149,237)","gpt-4-1106-preview":"rgb(30,144,255)","gpt-4-0125-preview":"rgb(2,177,236)","gpt-4-turbo-preview":"rgb(2,177,255)","gpt-4-32k":"rgb(104,111,238)","gpt-4-32k-0613":"rgb(61,71,139)","gpt-4-all":"rgb(65,105,225)","gpt-4-gizmo-*":"rgb(0,0,255)","gpt-4-vision-preview":"rgb(25,25,112)","text-ada-001":"rgb(255,192,203)","text-babbage-001":"rgb(255,160,122)","text-curie-001":"rgb(219,112,147)","text-davinci-003":"rgb(219,112,147)","text-davinci-edit-001":"rgb(255,105,180)","text-embedding-ada-002":"rgb(255,182,193)","text-embedding-v1":"rgb(255,174,185)","text-moderation-latest":"rgb(255,130,171)","text-moderation-stable":"rgb(255,160,122)","tts-1":"rgb(255,140,0)","tts-1-1106":"rgb(255,165,0)","tts-1-hd":"rgb(255,215,0)","tts-1-hd-1106":"rgb(255,223,0)","whisper-1":"rgb(245,245,220)","claude-3-opus-20240229":"rgb(255,132,31)","claude-3-sonnet-20240229":"rgb(253,135,93)","claude-3-haiku-20240307":"rgb(255,175,146)","claude-2.1":"rgb(255,209,190)"};function b2(e){if(ta[e])return ta[e];let t=0;for(let a=0;a<e.length;a++)t=(t<<5)-t+e.charCodeAt(a),t=t&t;t=Math.abs(t);const n=e.length>10?yd:bd,r=t%n.length;return n[r]}function en(e){let t=0;for(let r=0;r<e.length;r++)t+=e.charCodeAt(r);let n=t%ea.length;return ea[n]}
2function wd(e,t,n,r=-1,a,i,o=0,c=1,l=0,u=1){const m=we.t("分组倍率");if(r!==-1)return we.t("模型价格:{{price}} * {{ratioType}}:{{ratio}} = {{total}}",{price:ne(r,6),ratioType:m,ratio:i,total:ne(r*i,6)});{a===void 0&&(a=0);const d=a||0,h=hs(n),p=fs(n,d);let x=hd(n,c).toFixed(2),b=fd(n,u);const y=e;let j=(y+o*c+l*u)/1e6*h*i+t/1e6*p*i;return s.jsx(s.Fragment,{children:s.jsxs("article",{children:[s.jsx("p",{children:we.t("提示价格:{{price}} / 1M tokens",{price:ne(h,6)})}),s.jsx("p",{children:we.t("补全价格:{{price}} * {{ratio}} = {{total}} / 1M tokens",{price:ne(h,6),ratio:a,total:ne(p,6)})}),o>0&&s.jsx("p",{children:we.t("缓存价格:{{price}} * {{ratio}} = {{total}} / 1M tokens (缓存倍率: {{cacheRatio}})",{price:ne(h,6),ratio:c,total:ne(x,6),cacheRatio:c})}),l>0&&s.jsx("p",{children:we.t("缓存创建价格:{{price}} * {{ratio}} = {{total}} / 1M tokens (缓存创建倍率: {{cacheCreationRatio}})",{price:ne(h,6),ratio:u,total:ne(b,6),cacheCreationRatio:u})}),s.jsx("p",{}),s.jsx("p",{children:o>0||l>0?we.t("提示 {{nonCacheInput}} tokens / 1M tokens * {{price}} + 缓存 {{cacheInput}} tokens / 1M tokens * {{cachePrice}} + 缓存创建 {{cacheCreationInput}} tokens / 1M tokens * {{cacheCreationPrice}} + 补全 {{completion}} tokens / 1M tokens * {{compPrice}} * 分组 {{ratio}} = {{total}}",{nonCacheInput:y,cacheInput:o,cacheRatio:c,cacheCreationInput:l,cacheCreationRatio:u,cachePrice:ne(x,6),cacheCreationPrice:ne(b,6),price:ne(h,6),completion:t,compPrice:ne(p,6),ratio:i,total:ne(j,6)}):we.t("提示 {{input}} tokens / 1M tokens * {{price}} + 补全 {{completion}} tokens / 1M tokens * {{compPrice}} * 分组 {{ratio}} = {{total}}",{input:e,price:ne(h,6),completion:t,compPrice:ne(p,6),ratio:i,total:ne(j,6)})}),s.jsx("p",{children:we.t("仅供参考,以实际扣费为准")})]})})}}function kd(e,t,n=-1,r,a=1,i=1){const o=we.t("分组倍率");return n!==-1?we.t("模型价格 {{price}},{{ratioType}} {{ratio}}",{price:ne(n,6),ratioType:o,ratio:r}):we.t("模型倍率 {{modelRatio}},补全倍率 {{completionRatio}},缓存倍率 {{cacheRatio}},缓存创建倍率 {{cacheCreationRatio}},{{ratioType}} {{ratio}}",{modelRatio:e,completionRatio:t,cacheRatio:a,cacheCreationRatio:i,ratioType:o,ratio:r})}function vd(e,t,n=-1,r){const a=we.t("分组倍率");return n!==-1?we.t("模型价格 {{price}},{{ratioType}} {{ratio}}",{price:ne(n,6),ratioType:a,ratio:r}):we.t("模型倍率 {{modelRatio}},补全倍率 {{completionRatio}},{{ratioType}} {{ratio}}",{modelRatio:e,completionRatio:t,ratioType:a,ratio:r})}function Cd(){return"https://www-test.aipyaipy.com"}const gs=ie.createContext({dispatch:()=>null}),jd=({children:e})=>{const t=Ft(),[n,r]=f.useState({isMobile:qn(),showSider:!1,siderCollapsed:!1,shouldInnerPadding:!1,layout:!1}),a=i=>{if("type"in i)switch(i.type){case"TOGGLE_SIDER":r(o=>({...o,showSider:!o.showSider}));break;case"SET_SIDER":r(o=>({...o,showSider:i.payload}));break;case"SET_MOBILE":r(o=>({...o,isMobile:i.payload}));break;case"SET_SIDER_COLLAPSED":r(o=>({...o,siderCollapsed:i.payload}));break;case"SET_INNER_PADDING":r(o=>({...o,shouldInnerPadding:i.payload}));break;case"SET_LAYOUT":r(o=>({...o,layout:i.payload}));break;default:r(o=>({...o,...i}))}else r(o=>({...o,...i}))};return f.useEffect(()=>{const i=()=>{const l=qn();a({type:"SET_MOBILE",payload:l})};i(),(()=>{const l=localStorage.getItem("default_collapse_sidebar")==="true";a({type:"SET_SIDER_COLLAPSED",payload:l})})();const c=()=>{i()};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[]),f.useEffect(()=>{const i=t.pathname,o=i===""||i==="/"||i==="/cases"||i.startsWith("/cases/")||i.includes("/home")||i.includes("/chat")||i==="/setup";a({type:"SET_SIDER",payload:o?!1:!n.isMobile}),a({type:"SET_INNER_PADDING",payload:!o})},[t.pathname,n.isMobile]),s.jsx(gs.Provider,{value:[n,a],children:e})},Ao=f.createContext(null);function Ed({children:e}){const[t,n]=f.useState(qu);ie.useEffect(()=>Zu(i=>n(i)),[]);const r=f.useCallback(i=>{const o=Ku(i);return n(o),o},[]),a=f.useMemo(()=>({locale:t,setLocale:r}),[t,r]);return s.jsx(Ao.Provider,{value:a,children:e})}function rr(){const e=f.useContext(Ao);if(!e)throw new Error("useLocale 必须在 LocaleProvider 内使用");return e}function sr(){return rr(),Z}function Do(){return rr(),os}function ye(){const{locale:e}=rr();return{t:f.useCallback((n,r)=>Wu(n,r),[e]),i18n:we}}function jn(e){"@babel/helpers - typeof";return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jn(e)}function Fd(e,t){if(jn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nd(e){var t=Fd(e,"string");return jn(t)=="symbol"?t:t+""}function qe(e,t,n){return(t=Nd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bo(e,t){if(e==null)return{};var n,r,a=Sd(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Io={exports:{}};(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var o=typeof i;
2if(o==="string"||o==="number")r.push(i);else if(Array.isArray(i)&&i.length){var c=n.apply(null,i);c&&r.push(c)}else if(o==="object")for(var l in i)t.call(i,l)&&i[l]&&r.push(l)}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Io);var _d=Io.exports,Ad="t",Dd="zh-CN",Bd=f.createContext({classPrefix:Ad,locale:Dd}),Id=(function(){return f.useContext(Bd)});function Pd(){var e=Id(),t=e.classPrefix;return f.useMemo(function(){return{SIZE:{default:"",xs:"".concat(t,"-size-xs"),small:"".concat(t,"-size-s"),medium:"".concat(t,"-size-m"),large:"".concat(t,"-size-l"),xl:"".concat(t,"-size-xl"),block:"".concat(t,"-size-full-width")},STATUS:{loading:"".concat(t,"-is-loading"),disabled:"".concat(t,"-is-disabled"),focused:"".concat(t,"-is-focused"),success:"".concat(t,"-is-success"),error:"".concat(t,"-is-error"),warning:"".concat(t,"-is-warning"),selected:"".concat(t,"-is-selected"),active:"".concat(t,"-is-active"),checked:"".concat(t,"-is-checked"),current:"".concat(t,"-is-current"),hidden:"".concat(t,"-is-hidden"),visible:"".concat(t,"-is-visible"),expanded:"".concat(t,"-is-expanded"),indeterminate:"".concat(t,"-is-indeterminate")}}},[t])}function Md(e){var t=Pd().SIZE;return typeof e>"u"?{}:e in t?{className:t[e],style:{}}:{className:"",style:{fontSize:e}}}function Ld(){var e="__TDESIGN_ICON_STYLE__",t=`@keyframes t-spin {
3    from {
4      transform: rotate(0deg);
5    }
6    to {
7      transform: rotate(360deg);
8    }
9  }
10  .t-icon {
11    display: inline-block;
12    vertical-align: middle;
13    width: 1em;
14    height: 1em;
15  }
16  .t-icon::before {
17    font-family: unset;
18  }
19  .t-icon-loading {
20    animation: t-spin 1s linear infinite;
21  }
22  .t-icon.t-size-s,
23  i.t-size-s {
24    font-size: 14px;
25  }
26  .t-icon.t-size-m,
27  i.t-size-m {
28    font-size: 16px;
29  }
30  .t-icon.t-size-l,
31  i.t-size-l {
32    font-size: 18px;
33  }
34  `;if(!(!document||document.getElementById(e))){var n=document.createElement("style");n.setAttribute("id",e),n.innerHTML=t,document.head.appendChild(n)}}function Od(e){if(Array.isArray(e))return e}function Td(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,c=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(m){u=!0,a=m}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return c}}function na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zd(e,t){if(e){if(typeof e=="string")return na(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?na(e,t):void 0}}function Rd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $d(e,t){return Od(e)||Td(e,t)||zd(e,t)||Rd()}var Ud=["strokeColor","strokeWidth","fillColor"],Vd=["icon","id","className","size","style"];function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sa=0;function Hd(){var e=f.useRef(null);e.current||(e.current="legacy".concat(sa),sa+=1);var t=f.useId,n=t?t():e.current;return n.replace(/[^a-zA-Z0-9_]/g,"")||e.current}function Wd(e,t){var n=e.split(".")[1],r=/^overlapMask(Id|Url)_(.+)$/.exec(n);if(r){var a="".concat(t.overlapMaskPrefix,"-overlap-").concat(r[2]);return r[1]==="Url"?"url(#".concat(a,")"):a}return t[n]}function qd(e,t,n,r){var a,i,o=n.strokeColor,c=o===void 0?"currentColor":o,l=n.strokeWidth,u=l===void 0?2:l,m=n.fillColor,d=m===void 0?"transparent":m,h=Bo(n,Ud),p;n.fillColor?p=Array.isArray(d)?d[0]:d:p="currentColor";var x={strokeWidth:u,strokeColor1:Array.isArray(c)?c[0]:c,strokeColor2:Array.isArray(c)?(a=c[1])!==null&&a!==void 0?a:c[0]:c,fillColor1:Array.isArray(d)?d[0]:d,fillColor2:Array.isArray(d)?(i=d[1])!==null&&i!==void 0?i:d[0]:d,filledColor:p,overlapMaskPrefix:r};return f.createElement(e.tag,nn(nn({key:t},e.attrs),h),(e.children||[]).map(function(b,y){return Po(b,x,y)}))}function Po(e,t,n){var r={};if(e.attrs)for(var a=0,i=Object.entries(e.attrs);a<i.length;a++){var o=$d(i[a],2),c=o[0],l=o[1];typeof l=="string"&&l.startsWith("props.")?r[c]=Wd(l,t):r[c]=l}return f.createElement(e.tag,nn({key:n},r),(e.children||[]).map(function(u,m){return Po(u,t,m)}))}var Ke=f.forwardRef(function(e,t){var n=e.icon,r=e.id,a=e.className,i=e.size,o=e.style,c=Bo(e,Vd),l=Md(i),u=l.className,m=l.style,d=_d("t-icon","t-icon-".concat(r),a,u),h=Hd(),p="t-icon-".concat(r,"-instance-").concat(h);return f.useEffect(function(){Ld()},[]),qd(n,"".concat(r),nn({ref:t,className:d,style:nn(nn({fill:"none"},o),m)},c),p)});function aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 18,858 bytes, line 35
35t%2?aa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Zd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M3 10H21M3 10V5H21V10M3 10V21H21V10M7 5V1.5M17 5V1.5",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M3 10H21M3 10V5H21V10M3 10V21H21V10M7 5V1.5M17 5V1.5",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"calendar"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M21 10H3V21H21V10Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"fill2",fill:"props.fillColor2",d:"M21 10H3V5H21V10Z",mask:"props.overlapMaskUrl_fill2"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M3 10H21M3 10V5H21V10M3 10V21H21V10M7 5V1.5M17 5V1.5",strokeWidth:"props.strokeWidth"}}]}]},Vr=f.forwardRef(function(e,t){return f.createElement(Ke,ia(ia({},e),{},{id:"calendar",ref:t,icon:Zd}))});Vr.displayName="CalendarIcon";function oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function la(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Kd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M7 10H11V21H7V10Z M15 6H19V21H15V6Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"path",attrs:{stroke:"#000",d:"M21 21H3V3",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"mask",attrs:{id:"props.overlapMaskId_stroke2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M21 21H3V3",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"chart-bar"},children:[{tag:"g",attrs:{id:"fill1",mask:"props.overlapMaskUrl_fill1"},children:[{tag:"path",attrs:{fill:"props.fillColor1",d:"M7 10H11V21H7V10Z"}},{tag:"path",attrs:{fill:"props.fillColor1",d:"M15 6H19V21H15V6Z"}}]},{tag:"g",attrs:{id:"stroke2",mask:"props.overlapMaskUrl_stroke2"},children:[{tag:"path",attrs:{stroke:"props.strokeColor2",d:"M7 10H11V21H7V10Z M15 6H19V21H15V6Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M21 21H3V3",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Mo=f.forwardRef(function(e,t){return f.createElement(Ke,la(la({},e),{},{id:"chart-bar",ref:t,icon:Kd}))});Mo.displayName="ChartBarIcon";function ua(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ua(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Yd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{id:"chevron-up"},children:[{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M17.5 14.5L12 9L6.5 14.5",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Lo=f.forwardRef(function(e,t){return f.createElement(Ke,ca(ca({},e),{},{id:"chevron-up",ref:t,icon:Yd}))});Lo.displayName="ChevronUpIcon";function da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?da(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Gd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M19.5668 4.41406L14.1113 9.86853M14.1113 9.86853C13.5692 9.33152 12.8233 8.99985 12 8.99985C10.3431 8.99985 9 10.343 9 11.9998C9 13.6567 10.3431 14.9998 12 14.9998C13.6569 14.9998 15 13.6567 15 11.9998C15 11.1663 14.6601 10.4122 14.1113 9.86853Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"dashboard"},children:[{tag:"path",attrs:{id:"fill2",fill:"props.fillColor2",d:"M15 11.9998C15 13.6566 13.6569 14.9998 12 14.9998C10.3431 14.9998 9 13.6566 9 11.9998C9 10.3429 10.3431 8.99976 12 8.99976C13.6569 8.99976 15 10.3429 15 11.9998Z",mask:"props.overlapMaskUrl_fill2"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M19.5668 4.41406L14.1113 9.86853M14.1113 9.86853C13.5692 9.33152 12.8233 8.99985 12 8.99985C10.3431 8.99985 9 10.343 9 11.9998C9 13.6567 10.3431 14.9998 12 14.9998C13.6569 14.9998 15 13.6567 15 11.9998C15 11.1663 14.6601 10.4122 14.1113 9.86853Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M6.99912 20.6617C4.0106 18.9325 2 15.7011 2 12C2 6.47715 6.47715 2 12 2C13.095 2 14.1488 2.17598 15.1348 2.50121M17.0034 20.6603C19.9906 18.9308 22.0001 15.7001 22.0001 12.0001C22.0001 10.9051 21.8241 9.85125 21.4989 8.86523",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Oo=f.forwardRef(function(e,t){return f.createElement(Ke,ma(ma({},e),{},{id:"dashboard",ref:t,icon:Gd}))});Oo.displayName="DashboardIcon";function pa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Qd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{id:"download"},children:[{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M16.5 10.5L12 15L7.5 10.5M12 13.75V4",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M20.5 15V20H3.5V15",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},To=f.forwardRef(function(e,t){return f.createElement(Ke,ha(ha({},e),{},{id:"download",ref:t,icon:Qd}))});To.displayName="DownloadIcon";function fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Jd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M14 12H21M16.5 14.9985V12M19.5 14V12M11.5355 15.5355C9.58291 17.4882 6.41709 17.4882 4.46447 15.5355C2.51184 13.5829 2.51184 10.4171 4.46447 8.46447C6.41709 6.51184 9.58291 6.51184 11.5355 8.46447C13.4882 10.4171 13.4882 13.5829 11.5355 15.5355Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"key"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M11.5355 15.5355C9.58291 17.4882 6.41709 17.4882 4.46447 15.5355C2.51184 13.5829 2.51184 10.4171 4.46447 8.46447C6.41709 6.51184 9.58291 6.51184 11.5355 8.46447C13.4882 10.4171 13.4882 13.5829 11.5355 15.5355Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M14 12H21M16.5 14.9985V12M19.5 14V12M11.5355 15.5355C9.58291 17.4882 6.41709 17.4882 4.46447 15.5355C2.51184 13.5829 2.51184 10.4171 4.46447 8.46447C6.41709 6.51184 9.58291 6.51184 11.5355 8.46447C13.4882 10.4171 13.4882 13.5829 11.5355 15.5355Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},zo=f.forwardRef(function(e,t){return f.createElement(Ke,ga(ga({},e),{},{id:"key",ref:t,icon:Jd}))});zo.displayName="KeyIcon";function xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Xd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{id:"logout"},children:[{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M15.5 16.5L20 12L15.5 7.5M18.75 12H9",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M9 20.5H4V3.5H9",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Ro=f.forwardRef(function(e,t){return f.createElement(Ke,ba(ba({},e),{},{id:"logout",ref:t,icon:Xd}))});Ro.displayName="LogoutIcon";function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var em={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M4.75 12L3 13.5625L3 10.4375L4.75 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"menu-fold"},children:[{tag:"path",attrs:{id:"fill2",fill:"props.fillColor2",d:"M4.75 12L3 13.5625L3 10.4375L4.75 12Z",mask:"props.overlapMaskUrl_fill2"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M21 19L3 19M21 12L10 12M21 5H3",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M4.75 12L3 13.5625L3 10.4375L4.75 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},$o=f.forwardRef(function(e,t){return f.createElement(Ke,wa(wa({},e),{},{id:"menu-fold",ref:t,icon:em}))});$o.displayName="MenuFoldIcon";function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ka(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ka(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var tm={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M5.79297 12.75L7.35547 11H4.23047L5.79297 12.75Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"menu-unfold"},children:[{tag:"path",attrs:{id:"fill2",fill:"props.fillColor2",d:"M5.79297 12.75L7.35547 11H4.23047L5.79297 12.75Z",mask:"props.overlapMaskUrl_fill2"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M21 19L3 19M21 5H3M21 12L12 12",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M5.79297 12.75L7.35547 11H4.23047L5.79297 12.75Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Uo=f.forwardRef(function(e,t){return f.createElement(Ke,va(va({},e),{},{id:"menu-unfold",ref:t,icon:tm}))});Uo.displayName="MenuUnfoldIcon";function Ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ca(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ca(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nm={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M3 10.5V21H21V10.5M3 10.5H21M3 10.5V3H21V10.5M17 7H11M7 7H6.99609V7.00391",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M3 10.5V21H21V10.5M3 10.5H21M3 10.5V3H21V10.5M17 7H11M7 7H6.99609V7.00391",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"menu"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M21 3H3V10.5H21V3Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"fill2",fill:"props.fillColor2",d:"M3 21H21V10.5H3V21Z",mask:"props.overlapMaskUrl_fill2"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M3 10.5V21H21V10.5M3 10.5H21M3 10.5V3H21V10.5M17 7H11M7 7H6.99609V7.00391",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Vo=f.forwardRef(function(e,t){return f.createElement(Ke,ja(ja({},e),{},{id:"menu",ref:t,icon:nm}))});Vo.displayName="MenuIcon";function Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ea(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var rm={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{fill:"#000",d:"M11.9996 13.5C13.3803 13.5 14.4996 14.6193 14.4996 16C14.4996 17.3807 13.3803 18.5 11.9996 18.5C10.6189 18.5 9.49961 17.3807 9.49961 16C9.49961 14.6193 10.6189 13.5 11.9996 13.5Z",stroke:"none"}},{tag:"path",attrs:{fill:"#000",d:"M17.1357 6.29148L19.0003 5.66995L20.8239 11.
350033H3.0021L2.99902 11.0043L14.1461 2.09998L17.1357 6.29148Z",stroke:"none"}}]},{tag:"path",attrs:{stroke:"#000",d:"M21 11.0033H20.8243L19.0007 5.66992L3.35369 11.0033L3 10.9999M2.5 11.0043H2.99942L14.1465 2.09998L16.9636 6.04956",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M14.5 16C14.5 17.3807 13.3807 18.5 12 18.5C10.6193 18.5 9.5 17.3807 9.5 16C9.5 14.6193 10.6193 13.5 12 13.5C13.3807 13.5 14.5 14.6193 14.5 16Z M21.5002 11V21H2.5002L2.5002 11L21.5002 11Z M2.5 11L4.5 11C4.5 12.1046 3.60457 13 2.5 13L2.5 11Z M21.5005 11H19.5C19.5 12.1048 20.3956 13.0005 21.5005 13.0005V11Z M2.5 21H4.50195C4.50195 19.8944 3.60565 18.998 2.5 18.998L2.5 21Z M21.5 21H19.5C19.5 19.8954 20.3954 19 21.5 19V21Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M21 11.0033H20.8243L19.0007 5.66992L3.35369 11.0033L3 10.9999M2.5 11.0043H2.99942L14.1465 2.09998L16.9636 6.04956",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M14.5 16C14.5 17.3807 13.3807 18.5 12 18.5C10.6193 18.5 9.5 17.3807 9.5 16C9.5 14.6193 10.6193 13.5 12 13.5C13.3807 13.5 14.5 14.6193 14.5 16Z M21.5002 11V21H2.5002L2.5002 11L21.5002 11Z M2.5 11L4.5 11C4.5 12.1046 3.60457 13 2.5 13L2.5 11Z M21.5005 11H19.5C19.5 12.1048 20.3956 13.0005 21.5005 13.0005V11Z M2.5 21H4.50195C4.50195 19.8944 3.60565 18.998 2.5 18.998L2.5 21Z M21.5 21H19.5C19.5 19.8954 20.3954 19 21.5 19V21Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"mask",attrs:{id:"props.overlapMaskId_stroke2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M14.5 16C14.5 17.3807 13.3807 18.5 12 18.5C10.6193 18.5 9.5 17.3807 9.5 16C9.5 14.6193 10.6193 13.5 12 13.5C13.3807 13.5 14.5 14.6193 14.5 16Z M21.5002 11V21H2.5002L2.5002 11L21.5002 11Z M2.5 11L4.5 11C4.5 12.1046 3.60457 13 2.5 13L2.5 11Z M21.5005 11H19.5C19.5 12.1048 20.3956 13.0005 21.5005 13.0005V11Z M2.5 21H4.50195C4.50195 19.8944 3.60565 18.998 2.5 18.998L2.5 21Z M21.5 21H19.5C19.5 19.8954 20.3954 19 21.5 19V21Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]}]},{tag:"g",attrs:{id:"money"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M21.5002 11V21H2.5002L2.5002 11L21.5002 11Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"g",attrs:{id:"fill2",mask:"props.overlapMaskUrl_fill2"},children:[{tag:"path",attrs:{fill:"props.fillColor2",d:"M11.9996 13.5C13.3803 13.5 14.4996 14.6193 14.4996 16C14.4996 17.3807 13.3803 18.5 11.9996 18.5C10.6189 18.5 9.49961 17.3807 9.49961 16C9.49961 14.6193 10.6189 13.5 11.9996 13.5Z"}},{tag:"path",attrs:{fill:"props.fillColor2",d:"M17.1357 6.29148L19.0003 5.66995L20.8239 11.0033H3.0021L2.99902 11.0043L14.1461 2.09998L17.1357 6.29148Z"}}]},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M21 11.0033H20.8243L19.0007 5.66992L3.35369 11.0033L3 10.9999M2.5 11.0043H2.99942L14.1465 2.09998L16.9636 6.04956",strokeLinecap:"square",strokeWidth:"props.strokeWidth",mask:"props.overlapMaskUrl_stroke2"}},{tag:"g",attrs:{id:"stroke1"},children:[{tag:"path",attrs:{stroke:"props.strokeColor1",d:"M14.5 16C14.5 17.3807 13.3807 18.5 12 18.5C10.6193 18.5 9.5 17.3807 9.5 16C9.5 14.6193 10.6193 13.5 12 13.5C13.3807 13.5 14.5 14.6193 14.5 16Z M21.5002 11V21H2.5002L2.5002 11L21.5002 11Z M2.5 11L4.5 11C4.5 12.1046 3.60457 13 2.5 13L2.5 11Z M21.5005 11H19.5C19.5 12.1048 20.3956 13.0005 21.5005 13.0005V11Z M2.5 21H4.50195C4.50195 19.8944 3.60565 18.998 2.5 18.998L2.5 21Z M21.5 21H19.5C19.5 19.8954 20.3954 19 21.5 19V21Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]}]},Ho=f.forwardRef(function(e,t){return f.createElement(Ke,Fa(Fa({},e),{},{id:"money",ref:t,icon:rm}))});Ho.displayName="MoneyIcon";function Na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 4,199 bytes, line 35
35t%2?Na(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Na(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sm={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M20.5387 14.8522C20.0408 14.9492 19.5263 15 19 15C14.5817 15 11 11.4183 11 7C11 5.54296 11.3194 4.17663 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C15.9737 21 19.3459 18.4248 20.5387 14.8522Z",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"moon"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M20.5387 14.8522C20.0408 14.9492 19.5263 15 19 15C14.5817 15 11 11.4183 11 7C11 5.54296 11.3194 4.17663 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C15.9737 21 19.3459 18.4248 20.5387 14.8522Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M20.5387 14.8522C20.0408 14.9492 19.5263 15 19 15C14.5817 15 11 11.4183 11 7C11 5.54296 11.3194 4.17663 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C15.9737 21 19.3459 18.4248 20.5387 14.8522Z",strokeWidth:"props.strokeWidth"}}]}]},Wo=f.forwardRef(function(e,t){return f.createElement(Ke,Sa(Sa({},e),{},{id:"moon",ref:t,icon:sm}))});Wo.displayName="MoonIcon";function _a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Aa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_a(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_a(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var am={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"sunny"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M12 21V22M12 2V3M3 12H2M22 12H21M5.63603 18.3635L4.92892 19.0706M19.0711 4.92848L18.364 5.63559M5.63601 5.63563L4.9289 4.92852M19.071 19.0707L18.3639 18.3636",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},qo=f.forwardRef(function(e,t){return f.createElement(Ke,Aa(Aa({},e),{},{id:"sunny",ref:t,icon:am}))});qo.displayName="SunnyIcon";function Da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Da(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEac
35h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var im={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{fill:"#000",d:"M15.5 8.5C15.5 10.433 13.933 12 12 12C10.067 12 8.5 10.433 8.5 8.5C8.5 6.567 10.067 5 12 5C13.933 5 15.5 6.567 15.5 8.5Z",stroke:"none"}},{tag:"path",attrs:{fill:"#000",d:"M18.5 19.5996V19C18.5 16.7909 16.7091 15 14.5 15H9.5C7.29086 15 5.5 16.7909 5.5 19V19.5996C7.24803 21.0961 9.51846 22 12 22C14.4815 22 16.752 21.0961 18.5 19.5996Z",fillRule:"evenodd",clipRule:"evenodd",stroke:"none"}}]},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M15.5 8.5C15.5 10.433 13.933 12 12 12C10.067 12 8.5 10.433 8.5 8.5C8.5 6.567 10.067 5 12 5C13.933 5 15.5 6.567 15.5 8.5Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}},{tag:"path",attrs:{stroke:"#000",d:"M18.5 19.5996V19C18.5 16.7909 16.7091 15 14.5 15H9.5C7.29086 15 5.5 16.7909 5.5 19V19.5996C7.24803 21.0961 9.51846 22 12 22C14.4815 22 16.752 21.0961 18.5 19.5996Z",fillRule:"evenodd",strokeLinecap:"square",strokeWidth:"props.strokeWidth",clipRule:"evenodd",fill:"none"}}]},{tag:"path",attrs:{stroke:"#000",d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"mask",attrs:{id:"props.overlapMaskId_fill2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M15.5 8.5C15.5 10.433 13.933 12 12 12C10.06
357 12 8.5 10.433 8.5 8.5C8.5 6.567 10.067 5 12 5C13.933 5 15.5 6.567 15.5 8.5Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}},{tag:"path",attrs:{stroke:"#000",d:"M18.5 19.5996V19C18.5 16.7909 16.7091 15 14.5 15H9.5C7.29086 15 5.5 16.7909 5.5 19V19.5996C7.24803 21.0961 9.51846 22 12 22C14.4815 22 16.752 21.0961 18.5 19.5996Z",fillRule:"evenodd",strokeLinecap:"square",strokeWidth:"props.strokeWidth",clipRule:"evenodd",fill:"none"}}]},{tag:"path",attrs:{stroke:"#000",d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]},{tag:"mask",attrs:{id:"props.overlapMaskId_stroke2",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"user-circle"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"g",attrs:{id:"fill2",mask:"props.overlapMaskUrl_fill2"},children:[{tag:"path",attrs:{fill:"props.fillColor2",d:"M15.5 8.5C15.5 10.433 13.933 12 12 12C10.06
357 12 8.5 10.433 8.5 8.5C8.5 6.567 10.067 5 12 5C13.933 5 15.5 6.567 15.5 8.5Z"}},{tag:"path",attrs:{fill:"props.fillColor2",d:"M18.5 19.5996V19C18.5 16.7909 16.7091 15 14.5 15H9.5C7.29086 15 5.5 16.7909 5.5 19V19.5996C7.24803 21.0961 9.51846 22 12 22C14.4815 22 16.752 21.0961 18.5 19.5996Z",fillRule:"evenodd",clipRule:"evenodd"}}]},{tag:"g",attrs:{id:"stroke2",mask:"props.overlapMaskUrl_stroke2"},children:[{tag:"path",attrs:{stroke:"props.strokeColor2",d:"M15.5 8.5C15.5 10.433 13.933 12 12 12C10.067 12 8.5 10.433 8.5 8.5C8.5 6.567 10.067 5 12 5C13.933 5 15.5 6.567 15.5 8.5Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}},{tag:"path",attrs:{stroke:"props.strokeColor2",d:"M18.5 19.5996V19C18.5 16.7909 16.7091 15 14.5 15H9.5C7.29086 15 5.5 16.7909 5.5 19V19.5996C7.24803 21.0961 9.51846 22 12 22C14.4815 22 16.752 21.0961 18.5 19.5996Z",fillRule:"evenodd",strokeLinecap:"square",strokeWidth:"props.strokeWidth",clipRule:"evenodd"}}]},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Zo=f.forwardRef(function(e,t){return f.createElement(Ke,Ba(Ba({},e),{},{id:"user-circle",ref:t,icon:im}))});Zo.displayName="UserCircleIcon";function Ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ia(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ia(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var om={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M16.5 7.5C16.5 9.98528 14.4853 12 12 12C9.51472 12 7.5 9.98528 7.5 7.5C7.5 5.01472 9.51472 3 12 3C14.4853 3 16.5 5.01472 16.5 7.5Z M20 21V19C20 16.7909 18.2091 15 16 15H8C5.79086 15 4 16.7909 4 19V21H20Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]}]},{tag:"g",attrs:{id:"user"},children:[{tag:"g",attrs:{id:"fill1",mask:"props.overlapMaskUrl_fill1"},children:[{tag:"path",attrs:{fill:"props.fillColor1",d:"M16.5 7.5C16.5 9.98528 14.4853 12 12 12C9.51472 12 7.5 9.98528 7.5 7.5C7.5 5.01472 9.51472 3 12 3C14.4853 3 16.5 5.01472 16.5 7.5Z"}},{tag:"path",attrs:{fill:"props.fillColor1",d:"M20 21V19C20 16.7909 18.2091 15 16 15H8C5.79086 15 4 16.7909 4 19V21H20Z"}}]},{tag:"g",attrs:{id:"stroke1"},children:[{tag:"path",attrs:{stroke:"props.strokeColor1",d:"M16.5 7.5C16.5 9.98528 14.4853 12 12 12C9.51472 12 7.5 9.98528 7.5 7.5C7.5 5.01472 9.51472 3 12 3C14.4853 3 16.5 5.01472 16.5 7.5Z M20 21V19C20 16.7909 18.2091 15 16 15H8C5.79086 15 4 16.7909 4 19V21H20Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]}]},Hr=f.forwardRef(function(e,t){return f.createElement(Ke,Pa(Pa({},e),{},{id:"user",ref:t,icon:om}))});Hr.displayName="UserIcon";function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function La(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ma(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var lm={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"g",attrs:{},children:[{tag:"path",attrs:{stroke:"#000",d:"M16 8C16 10.2091 14.2091 12 12 12C9.79086 12 8 10.2091 8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8Z M5 19C5 16.7909 6.79086 15 9 15H15C17.2091 15 19 16.7909 19 19V21H5V19Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]}]},{tag:"g",attrs:{id:"usergroup"},children:[{tag:"g",attrs:{id:"fill1",mask:"props.overlapMaskUrl_fill1"},children:[{tag:"path",attrs:{fill:"props.fillColor1",d:"M16 8C16 10.2091 14.2091 12 12 12C9.79086 12 8 10.2091 8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8Z"}},{tag:"path",attrs:{fill:"props.fillColor1",d:"M5 19C5 16.7909 6.79086 15 9 15H15C17.2091 15 19 16.7909 19 19V21H5V19Z"}}]},{tag:"g",attrs:{id:"stroke1"},children:[{tag:"path",attrs:{stroke:"props.strokeColor1",d:"M16 8C16 10.2091 14.2091 12 12 12C9.79086 12 8 10.2091 8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8Z M5 19C5 16.7909 6.79086 15 9 15H15C17.2091 15 19 16.7909 19 19V21H5V19Z",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]},{tag:"path",attrs:{id:"stroke2",stroke:"props.strokeColor2",d:"M7 4C4.79086 4 3 5.79086 3 8C3 10.2091 4.79086 12 7 12C3.68629 12 1 14.6863 1 18V21M23 21V18C23 14.6863 20.3137 12 17 12C19.2091 12 21 10.2091 21 8C21 5.79086 19.2091 4 17 4",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Wr=f.forwardRef(function(e,t){return f.createElement(Ke,La(La({},e),{},{id:"usergroup",ref:t,icon:lm}))});Wr.displayName="UsergroupIcon";function Oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
35t%2?Oa(Object(n),!0).forEach(function(r){qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var um={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"defs",attrs:{},children:[{tag:"mask",attrs:{id:"props.overlapMaskId_fill1",maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse","mask-type":"luminance",x:"0",y:"0",width:"24",height:"24"},children:[{tag:"rect",attrs:{x:"0",y:"0",width:"24",height:"24",fill:"#fff"}},{tag:"path",attrs:{stroke:"#000",d:"M19 3H5.00002C3.89546 3 3.00003 3.89542 3.00002 4.99998C3.00001 6.10456 3.89544 7 5.00002 7H18M3 7V6M3 7H19C20.1045 7 21 7.89543 21 9V19C21 20.1046 20.1045 21 19 21H3V7ZM16 14H17",strokeLinecap:"square",strokeWidth:"props.strokeWidth",fill:"none"}}]}]},{tag:"g",attrs:{id:"wallet"},children:[{tag:"path",attrs:{id:"fill1",fill:"props.fillColor1",d:"M19 7H3V21H19C20.1045 21 21 20.1046 21 19V9C21 7.89543 20.1045 7 19 7Z",mask:"props.overlapMaskUrl_fill1"}},{tag:"path",attrs:{id:"stroke1",stroke:"props.strokeColor1",d:"M19 3H5.00002C3.89546 3 3.00003 3.89542 3.00002 4.99998C3.00001 6.10456 3.89544 7 5.00002 7H18M3 7V6M3 7H19C20.1045 7 21 7.89543 21 9V19C21 20.1046 20.1045 21 19 21H3V7ZM16 14H17",strokeLinecap:"square",strokeWidth:"props.strokeWidth"}}]}]},Ko=f.forwardRef(function(e,t){return f.createElement(Ke,Ta(Ta({},e),{},{id:"wallet",ref:t,icon:um}))});Ko.displayName="WalletIcon";const za={detail:"/detail",token:"/token",log:"/log",topup:"/topup","recharge-management":"/recharge-management","activity-center":"/activity-center","my-invites":"/my-invites","user-invitations":"/user-invitations"},cm=()=>{const{t:e}=ye(),[t,n]=f.useContext(gs),[r,a]=f.useContext(kt),i=Ft(),o=wt(),c=io(),l=ls(),u=!t.isMobile&&t.siderCollapsed,m=f.useRef(null),d=uc(),h=r.user?.display_name||r.user?.username||e("用户信息");f.useEffect(()=>{const j=v=>{const A=m.current;A?.open&&!A.contains(v.target)&&A.removeAttribute("open")};return document.addEventListener("pointerdown",j),()=>document.removeEventListener("pointerdown",j)},[]);const p=f.useMemo(()=>[{text:e("数据看板"),itemKey:"detail",icon:s.jsx(Oo,{className:"size-[18px] shrink-0"}),hidden:localStorage.getItem("enable_data_export")!=="true"},{text:e("API令牌"),itemKey:"token",icon:s.jsx(zo,{className:"size-[18px] shrink-0"})},{text:e("使用日志"),itemKey:"log",icon:s.jsx(Mo,{className:"size-[18px] shrink-0"})}],[e]),x=f.useMemo(()=>[{text:e("钱包"),itemKey:"topup",icon:s.jsx(Ko,{className:"size-[18px] shrink-0"})},{text:e("充值管理"),itemKey:"recharge-management",icon:s.jsx(Ho,{className:"size-[18px] shrink-0"})},{text:e("个人中心"),itemKey:"activity-center",icon:s.jsx(Hr,{className:"size-[18px] shrink-0"})},{text:e("签约邀请记录"),itemKey:"my-invites",icon:s.jsx(Wr,{className:"size-[18px] shrink-0"})},{text:e("我的邀请"),itemKey:"user-invitations",icon:s.jsx(Wr,{className:"size-[18px] shrink-0"})}],[e]),b=j=>j.map(v=>{if(v.hidden)return null;const A=i.pathname===za[v.itemKey];return s.jsx("li",{children:s.jsxs(Wt,{to:za[v.itemKey],className:Te(A&&"menu-active",u&&"justify-center"),title:u?v.text:void 0,"aria-label":v.text,"aria-current":A?"page":void 0,onClick:()=>{n({type:"SET_INNER_PADDING",payload:!0}),t.isMobile&&n({type:"SET_SIDER",payload:!1})},children:[v.icon,!u&&s.jsx("span",{children:v.text})]})},v.itemKey)}),y=()=>{if(t.isMobile){n({type:"SET_SIDER",payload:!1});return}const j=!u;n({type:"SET_SIDER_COLLAPSED",payload:j}),localStorage.setItem("default_collapse_sidebar",String(j))},k=async()=>{await Y.get("/api/user/logout"),fe(e("注销成功!")),a({type:"logout"}),localStorage.removeItem("user"),o("/login")};return s.jsxs("aside",{className:Te("user-sidebar flex h-full flex-col border-r border-base-300 bg-base-200 transition-[width] duration-300",u?"user-sidebar-collapsed w-16":"w-[248px]"),children:[s.jsxs("div",{className:Te("flex h-16 shrink-0 items-center gap-2 px-3",u&&"justify-center px-2"),children:[!u&&s.jsx("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"flex min-w-0 flex-1 items-center rounded-selector px-1 py-1 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary","aria-label":e("首页"),children:s.jsx("img",{src:d,alt:"",className:"max-h-8 max-w-[160px] object-contain object-left"})}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-square btn-sm shrink-0",title:u?e("展开侧边栏"):void 0,onClick:y,"aria-label":e(u?"展开侧边栏":"收起侧边栏"),children:u?s.jsx(Uo,{className:"size-5"}):s.jsx($o,{className:"size-5"})})]}),s.jsxs("div",{className:Te("min-h-0 flex-1 overflow-x-hidden overflow-y-auto pb-3",t.isMobile&&"pb-28"),children:[s.jsxs("ul",{className:"menu w-full",children:[!u&&s.jsx("li",{className:"menu-title justify-start text-left",children:e("控制台")}),b(p)]}),s.jsx("div",{className:"divider"}),s.jsxs("ul",{className:"menu w-full",children:[!u&&s.jsx("li",{className:"menu-title justify-start text-left",children:e("个人中心")}),b(x),s.jsx("li",{children:s.jsxs("button",{type:"button",className:Te(u&&"justify-center"),title:u?e("AiPy 下载"):void 0,"aria-label":e("AiPy 下载"),onClick:()=>window.open(Cd(),"_blank","noopener,noreferrer"),children:[s.jsx(To,{className:"size-[18px] shrink-0"}),!u&&s.jsx("span",{children:e("AiPy 下载")})]})})]})]}),s.jsx("div",{className:"shrink-0 border-t border-base-300 p-2",children:s.jsxs("details",{ref:m,className:"dropdown dropdown-top w-full",children:[s.jsxs("summary",{className:Te("flex min-h-12 cursor-pointer list-none items-center gap-2 rounded-selector px-2 text-base-content transition-colors hover:bg-base-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",u&&"justify-center px-0"),"aria-label":e("用户信息"),children:[s.jsx("div",{className:"avatar avatar-placeholder shrink-0",children:s.jsx("div",{className:"w-8 rounded-full bg-primary/10 text-primary",children:s.jsx(Zo,{className:"size-7"})})}),!u&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"min-w-0 flex-1 text-left",children:[s.jsx("div",{className:"truncate text-sm font-medium",children:h}),s.jsx("div",{className:"truncate text-xs text-base-content/60",children:e("用户信息")})]}),s.jsx(Lo,{className:"size-4 shrink-0 text-base-content/50"})]})]}),s.jsxs("ul",{className:Te("user-account-menu menu dropdown-content bottom-full left-0 z-[120] mb-2 w-56 rounded-box border border-base-300 bg-base-100 p-2 shadow-xl",!u&&"w-full"),children:[s.jsx("li",{children:s.jsxs(Wt,{to:"/pers
35onal",onClick:()=>m.current?.removeAttribute("open"),children:[s.jsx(Hr,{className:"size-[18px]"}),s.jsx("span",{children:e("个人设置")})]})}),s.jsx("li",{children:s.jsxs("label",{className:"flex cursor-pointer items-center",children:[c==="dark"?s.jsx(Wo,{className:"size-[18px]"}):s.jsx(qo,{className:"size-[18px]"}),s.jsx("span",{className:"flex-1",children:e("深色模式")}),s.jsx("input",{type:"checkbox",value:"dark",className:"theme-controller toggle toggle-sm",checked:c==="dark",onChange:j=>l(j.target.checked),"aria-label":e("切换主题")})]})}),s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:k,children:[s.jsx(Ro,{className:"size-[18px]"}),s.jsx("span",{children:e("退出登录")})]})})]})]})})]})},dm="modulepreload",mm=function(e){return"/"+e},Ra={},on=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(m=>Promise.resolve(m).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=o?.nonce||o?.getAttribute("nonce");a=l(n.map(u=>{if(u=mm(u),u in Ra)return;Ra[u]=!0;const m=u.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=m?"stylesheet":dm,m||(h.as="script"),h.crossOrigin="",h.href=u,c&&h.setAttribute("nonce",c),document.head.appendChild(h),m)return new Promise((p,x)=>{h.addEventListener("load",p),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return a.then(o=>{for(const c of o||[])c.status==="rejected"&&i(c.reason);return t().catch(i)})},pm=({prompt:e="page"})=>{const{t}=ye();return s.jsxs("div",{className:"flex h-[100px] items-center justify-center gap-2 text-base-content",role:"status","aria-live":"polite",children:[s.jsx("span",{className:"loading loading-spinner loading-sm","aria-hidden":"true"}),s.jsx("span",{children:t("加载中...",{name:e})})]})};function hm({children:e}){const t=new URLSearchParams(location.search);let n={};const r=sessionStorage.getItem("addHeaders");return r&&(n=JSON.parse(r)),location.pathname==="/approve"&&t.has("code")&&(n["x-approve-code"]=t.get("code")),sessionStorage.setItem("addHeaders",JSON.stringify(n)),sessionStorage.getItem("oToken"),sessionStorage.getItem("oUser"),localStorage.getItem("user")?e:s.jsx(no,{to:`/login?${new URLSearchParams({next:location.href.slice(location.origin.length)})}`,state:{from:ic.location}})}var fm=Uu();const ar=Kt(fm);let xs=class extends ie.Component{constructor(t){super(t)}componentDidMount(){const{botName:t,buttonSize:n,cornerRadius:r,requestAccess:a,usePic:i,dataOnauth:o,dataAuthUrl:c,lang:l}=this.props;window.TelegramLoginWidget={dataOnauth:m=>o(m)};const u=document.createElement("script");u.src="https://telegram.org/js/telegram-widget.js?9",u.setAttribute("data-telegram-login",t),u.setAttribute("data-size",n),r!==void 0&&u.setAttribute("data-radius",r),u.setAttribute("data-request-access",a),u.setAttribute("data-userpic",i),u.setAttribute("data-lang",l),c!==void 0?u.setAttribute("data-auth-url",c):u.setAttribute("data-onauth","TelegramLoginWidget.dataOnauth(user)"),u.async=!0,this.instance.appendChild(u)}render(){return s.jsx("div",{className:this.props.className,ref:t=>{this.instance=t},children:this.props.children})}};xs.propTypes={botName:zt.string.isRequired,dataOnauth:zt.func,buttonSize:zt.oneOf(["large","medium","small"]),cornerRadius:zt.number,requestAccess:zt.string,usePic:zt.bool,lang:zt.string};xs.defaultProps={botName:"samplebot",dataOnauth:()=>{},buttonSize:"large",requestAccess:"write",usePic:!0,lang:"en"};const $a="aipy_",gm=e=>e&&e.startsWith($a)?e.slice($a.length):null,xm=e=>e?e.replace(/\s*\(\d+\)$/,"").trim():"",Vt="[aipy-referral]",Yo=async()=>{if(window.aipy&&typeof window.aipy.getAipyInfo=="function")try{const e=await window.aipy.getAipyInfo();if(e?.referralCode){const t=gm(e.referralCode),n=t?xm(t):null;if(n)return localStorage.getItem("aff")||localStorage.setItem("aff",n),n;console.info(`${Vt} 忽略 aipy 邀请码(前缀不符或清洗后为空):`,e.referralCode)}else console.info(`${Vt} aipy 未返回邀请码`)}catch(e){console.warn("Failed to get referral from window.aipy:",e)}return null};Yo();const bs=()=>!!(window.aipy&&typeof window.aipy.getAipyInfo=="function"),bm=1500,ir=(e,t=bm)=>{const n=Date.now();let r=!1;console.info(`${Vt} 开始等待 aipy 邀请码,超时 ${t}ms`);let a;const i=Yo().then(c=>{clearTimeout(a);const l=Date.now()-n;if(!c){console.info(`${Vt} 等待结束,无邀请码,耗时 ${l}ms`);return}console.info(r?`${Vt} 邀请码迟到 ${l}
35ms(已超时),回填并刷新二维码:`:`${Vt} 取到邀请码,耗时 ${l}ms:`,c),e(c)}),o=new Promise(c=>{a=setTimeout(()=>{r=!0,console.warn(`${Vt} 等待 ${t}ms 仍未取到邀请码,二维码先按无码渲染`),c()},t)});return Promise.race([i,o])},Go=async()=>{if(window.aipy&&typeof window.aipy?.logout=="function"){try{await window.aipy.logout()}catch(e){console.error("Logout failed",e)}return}},ym="/".replace(/\/+$/,"");function _n(e){return`${window.location.origin}${ym}/oauth/${e}`}async function or(){!localStorage.getItem("aff")&&bs()&&await ir(()=>{});let e="/api/oauth/state";const t=new URLSearchParams(location.search);let n=localStorage.getItem("aff");n&&n.length>0&&t.set("aff",n),location.search.includes("client_id")&&t.set("oauth_login_params",location.search),e+=`?${t.toString()}`;const r=await Y.get(e),{success:a,message:i,data:o}=r.data;return a?(n&&n.length>0&&localStorage.removeItem("aff"),o):(W(i),"")}async function ys(e,t,n=!1){const r=await or();if(!r)return;const a=new URLSearchParams({client_id:t,redirect_uri:_n("oidc"),response_type:"code",scope:"openid profile email",state:r});window.location.href=`${e}?${a.toString()}`}async function ws(e){const t=await or();if(!t)return;const n=new URLSearchParams({client_id:e,redirect_uri:_n("github"),state:t,scope:"user:email"});window.location.href=`https://github.com/login/oauth/authorize?${n.toString()}`}async function Qo(e){const t=await or(),n=new URLSearchParams;n.set("state",t),n.set("response_type","code"),n.set("scope","openid profile email"),n.set("client_id",e),n.set("redirect_uri",_n("google")),t&&(window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?${n.toString()}`)}async function ks(e){const t=await or();if(!t)return;const n=new URLSearchParams({response_type:"code",client_id:e,redirect_uri:_n("linuxdo"),state:t});window.location.href=`https://connect.linux.do/oauth2/authorize?${n.toString()}`}const Jo=e=>s.jsxs("svg",{className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e,children:[s.jsx("path",{d:"M512 960C265 960 64 759 64 512S265 64 512 64s448 201 448 448-201 448-448 448z m0-882.6c-239.7 0-434.6 195-434.6 434.6s195 434.6 434.6 434.6 434.6-195 434.6-434.6S751.7 77.4 512 77.4z",fill:"currentColor",stroke:"currentColor",strokeWidth:"60"}),s.jsx("path",{d:"M197.7 512c0-78.3 31.6-98.8 87.2-98.8 56.2 0 87.2 20.5 87.2 98.8s-31 98.8-87.2 98.8c-55.7 0-87.2-20.5-87.2-98.8z m130.4 0c0-46.8-7.8-64.5-43.2-64.5-35.2 0-42.9 17.7-42.9 64.5 0 47.1 7.8 63.7 42.9 63.7 35.4 0 43.2-16.6 43.2-63.7zM409.7 415.9h42.1V608h-42.1V415.9zM653.9 512c0 74.2-37.1 96.1-93.6 96.1h-65.9V415.9h65.9c56.5 0 93.6 16.1 93.6 96.1z m-43.5 0c0-49.3-17.7-60.6-52.3-60.6h-21.6v120.7h21.6c35.4 0 52.3-13.3 52.3-60.1zM686.5 512c0-74.2 36.3-98.8 92.7-98.8 18.3 0 33.2 2.2 44.8 6.4v36.3c-11.9-4.2-26-6.6-42.1-6.6-34.6 0-49.8 15.5-49.8 62.6 0 50.1 15.2 62.6 49.3 62.6 15.8 0 30.2-2.2 44.8-7.5v36c-11.3 4.7-28.5 8-46.8 8-56.1-0.2-92.9-18.7-92.9-99z",fill:"currentColor",stroke:"currentColor",strokeWidth:"20"})]}),Xo=e=>s.jsx("svg",{className:"icon",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e,children:s.jsxs("g",{id:"linuxdo_icon","data-name":"linuxdo_icon",children:[s.jsx("path",{d:"m7.44,0s.09,0,.13,0c.09,0,.19,0,.28,0,.14,0,.29,0,.43,0,.09,0,.18,0,.27,0q.12,0,.25,0t.26.08c.15.03.29.06.44.08,1.97.38,3.78,1.47,4.95,3.11.04.06.09.12.13.18.67.96,1.15,2.11,1.3,3.28q0,.19.09.26c0,.15,0,.29,0,.44,0,.04,0,.09,0,.13,0,.09,0,.19,0,.28,0,.14,0,.29,0,.43,0,.09,0,.18,0,.27,0,.08,0,.17,0,.25q0,.19-.08.26c-.03.15-.06.29-.08.44-.38,1.97-1.47,3.78-3.11,4.95-.06.04-.12.09-.18.13-.96.67-2.11,1.15-3.28,1.3q-.19,0-.26.09c-.15,0-.29,0-.44,0-.04,0-.09,0-.13,0-.09,0-.19,0-.28,0-.14,0-.29,0-.43,0-.09,0-.18,0-.27,0-.08,0-.17,0-.25,0q-.19,0-.26-.08c-.15-.03-.29-.06-.44-.08-1.97-.38-3.78-1.47-4.95-3.11q-.07-.09-.13-.18c-.67-.96-1.15-2.11-1.3-3.28q0-.19-.09-.26c0-.15,0-.29,0-.44,0-.04,0-.09,0-.13,0-.09,0-.19,0-.28,0-.14,0-.29,0-.43,0-.09,0-.18,0-.27,0-.08,0-.17,0-.25q0-.19.08-.26c.03-.15.06-.29.08-.44.38-1.97,1.47-3.78,3.11-4.95.06-.04.12-.09.18-.13C4.42.73,5.57.26,6.74.1,7,.07,7.15,0,7.44,0Z",fill:"#EFEFEF"}),s.jsx("path",{d:"m1.27,11.33h13.45c-.94,1.89-2.51,3.21-4.51,3.88-1.99.59-3.96.37-5.8-.57-1.25-.7-2.67-1.9-3.14-3.3Z",fill:"#FEB005"}),s.jsx("path",{d:"m12.54,1.99c.87.7,1.82,1.59,2.18,2.68H1.27c.87-1.74,2.33-3.13,4.2-3.78,2.44-.79,5-.47,7.07,1.1Z",fill:"#1D1D1F"})]})});function wm(e){localStorage.setItem("status",JSON.stringify(e)),localStorage.setItem("system_name",e.system_name),localStorage.setItem("logo",e.logo),localStorage.setItem("footer_html",e.footer_html),localStorage.setItem("quota_per_unit",e.quota_per_unit),localStorage.setItem("display_in_currency",e.display_in_currency),localStorage.setItem("enable_drawing",e.enable_drawing),localStorage.setItem("enable_task",e.enable_task),localStorage.setItem("enable_data_export",e.enable_data_export),localStorage.setItem("chats",JSON.stringify(e.chats)),localStorage.setItem("data_export_default_time",e.data_export_default_time),localStorage.setItem("default_collapse_sidebar",e.default_collapse_sidebar),localStorage.setItem("mj_notify_enabled",e.mj_notify_enabled),e.chat_link||localStorage.removeItem("chat_link"),e.chat_link2||localStorage.removeItem("chat_link2"),e.docs_link?localStorage.setItem("docs_link",e.docs_link):localStorage.removeItem("docs_link")}function sn(e){localStorage.setItem("user",JSON.stringify(e))}
35const On=768;function vs(){const[e,t]=ie.useState(()=>window.innerWidth<On);return ie.useEffect(()=>{const n=window.matchMedia(`(max-width: ${On-1}px)`),r=()=>{t(window.innerWidth<On)};return n.addEventListener("change",r),t(window.innerWidth<On),()=>n.removeEventListener("change",r)},[]),!!e}var xr={exports:{}};var Ua;function km(){return Ua||(Ua=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(i=a(i,r(c)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var c in i)t.call(i,c)&&i[c]&&(o=a(o,c));return o}function a(i,o){return o?i?i+" "+o:i+o:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xr)),xr.exports}var vm=km();const Va=Kt(vm);function ln(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n==="top"&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var Cm=`/**
36 * @Author Awen
37 * @Date 2024/06/01
38 * @Email [email protected]
39 **/
40.index-module_iconBlock__Y1IUb {
41  flex: 1;
42}
43.index-module_dots__2OJFw {
44  position: absolute;
45  top: 0;
46  right: 0;
47  left: 0;
48  bottom: 0;
49}
50.index-module_dots__2OJFw .dot {
51  position: absolute;
52  z-index: 2;
53  width: 22px;
54  height: 22px;
55  color: var(--go-captcha-theme-dot-color);
56  background: var(--go-captcha-theme-dot-bg-color);
57  border: 3px solid #f7f9fb;
58  border-color: var(--go-captcha-theme-dot-border-color);
59  display: flex;
60  align-items: center;
61  justify-content: center;
62  border-radius: 22px;
63  cursor: default;
64}
65`;ln(Cm);var jm=`/**
66 * @Author Awen
67 * @Date 2024/06/01
68 * @Email [email protected]
69 **/
70:root {
71  --go-captcha-theme-text-color: #333333;
72  --go-captcha-theme-bg-color: #ffffff;
73  --go-captcha-theme-btn-color: #ffffff;
74  --go-captcha-theme-btn-disabled-color: #749ff9;
75  --go-captcha-theme-btn-bg-color: #4e87ff;
76  --go-captcha-theme-btn-border-color: #4e87ff;
77  --go-captcha-theme-active-color: #3e7cff;
78  --go-captcha-theme-border-color: rgba(206, 223, 254, 0.5);
79  --go-captcha-theme-icon-color: #3C3C3C;
80  --go-captcha-theme-drag-bar-color: #e0e0e0;
81  --go-captcha-theme-drag-bg-color: #3e7cff;
82  --go-captcha-theme-drag-icon-color: #ffffff;
83  --go-captcha-theme-round-color: #e0e0e0;
84  --go-captcha-theme-loading-icon-color: #3e7cff;
85  --go-captcha-theme-body-bg-color: #34383e;
86  --go-captcha-theme-dot-color: #cedffe;
87  --go-captcha-theme-dot-bg-color: #3e7cff;
88  --go-captcha-theme-dot-border-color: #f7f9fb;
89  --go-captcha-theme-default-color: #3e7cff;
90  --go-captcha-theme-default-bg-color: #ecf5ff;
91  --go-captcha-theme-default-border-color: #3e7cff;
92  --go-captcha-theme-default-hover-color: #e0efff;
93  --go-captcha-theme-error-color: #ed4630;
94  --go-captcha-theme-error-bg-color: #fef0f0;
95  --go-captcha-theme-error-border-color: #ff5a34;
96  --go-captcha-theme-warn-color: #ffa000;
97  --go-captcha-theme-warn-bg-color: #fdf6ec;
98  --go-captcha-theme-warn-border-color: #ffbe09;
99  --go-captcha-theme-success-color: #5eaa2f;
100  --go-captcha-theme-success-bg-color: #f0f9eb;
101  --go-captcha-theme-success-border-color: #8bc640;
102}
103.gocaptcha-module_wrapper__Kpdey {
104  padding: 12px 16px;
105  -webkit-touch-callout: none;
106  -webkit-user-select: none;
107  -ms-user-select: none;
108  user-select: none;
109  box-sizing: border-box;
110}
111.gocaptcha-module_theme__h-Ytl {
112  border: 1px solid rgba(206, 223, 254, 0.5);
113  border-color: var(--go-captcha-theme-border-color);
114  border-radius: 8px;
115  box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
116  -webkit-box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
117  -moz-box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
118  background-color: var(--go-captcha-theme-bg-color);
119}
120.gocaptcha-module_header__LjDUC {
121  height: 36px;
122  width: 100%;
123  font-size: 15px;
124  color: var(--go-captcha-theme-text-color);
125  display: flex;
126  align-items: center;
127  -webkit-touch-callout: none;
128  -webkit-user-select: none;
129  -ms-user-select: none;
130  user-select: none;
131}
132.gocaptcha-module_header__LjDUC span {
133  flex: 1;
134  padding-right: 5px;
135}
136.gocaptcha-module_header__LjDUC em {
137  padding: 0 3px;
138  font-weight: bold;
139  color: var(--go-captcha-theme-active-color);
140  font-style: normal;
141}
142.gocaptcha-module_body__KJKNu {
143  position: relative;
144  width: 100%;
145  margin-top: 10px;
146  display: flex;
147  background: var(--go-captcha-theme-body-bg-color);
148  border-radius: 5px;
149  -webkit-border-radius: 5px;
150  -moz-border-radius: 5px;
151  overflow: hidden;
152}
153.gocaptcha-module_bodyInner__jahqH {
154  position: relative;
155  background: var(--go-captcha-theme-body-bg-color);
156}
157.gocaptcha-module_picture__LRwbY {
158  position: relative;
159  z-index: 2;
160  width: 100%;
161}
162.gocaptcha-module_hide__TUOZE {
163  visibility: hidden;
164}
165.gocaptcha-module_loading__Y-PYK {
166  position: absolute;
167  z-index: 1;
168  top: 50%;
169  left: 50%;
170  width: 68px;
171  height: 68px;
172  margin-left: -34px;
173  margin-top: -34px;
174  line-height: 68px;
175  text-align: center;
176  display: flex;
177  align-content: center;
178  justify-content: center;
179}
180.gocaptcha-module_loading__Y-PYK svg,
181.gocaptcha-module_loading__Y-PYK circle {
182  color: var(--go-captcha-theme-loading-icon-color);
183  fill: var(--go-captcha-theme-loading-icon-color);
184}
185.gocaptcha-module_footer__Ywdpy {
186  width: 100%;
187  height: 50px;
188  color: #34383e;
189  display: flex;
190  align-items: center;
191  padding-top: 10px;
192  -webkit-touch-callout: none;
193  -webkit-user-select: none;
194  -ms-user-select: none;
195  user-select: none;
196}
197.gocaptcha-module_iconBlock__mVB8B {
198  display: flex;
199  align-items: center;
200}
201.gocaptcha-module_iconBlock__mVB8B svg {
202  color: var(--go-captcha-theme-icon-color);
203  fill: var(--go-captcha-theme-icon-color);
204  margin: 0 5px;
205  cursor: pointer;
206}
207.gocaptcha-module_buttonBlock__EZ4vg {
208  width: 120px;
209  height: 40px;
210}
211.gocaptcha-module_buttonBlock__EZ4vg button {
212  width: 100%;
213  height: 40px;
214  text-align: center;
215  padding: 9px 15px;
216  font-size: 15px;
217  border-radius: 5px;
218  display: inline-block;
219  line-height: 1;
220  white-space: nowrap;
221  cursor: pointer;
222  color: var(--go-captcha-theme-btn-color);
223  background-color: var(--go-captcha-theme-btn-bg-color);
224  border: 1px solid transparent;
225  border-color: var(--go-captcha-theme-btn-bg-color);
226  -webkit-appearance: none;
227  box-sizing: border-box;
228  outline: none;
229  margin: 0;
230  transition: 0.1s;
231  font-weight: 500;
232  -moz-user-select: none;
233  -webkit-user-select: none;
234}
235.gocaptcha-module_buttonBlock__EZ4vg button.disabled {
236  pointer-events: none;
237  background-color: var(--go-captcha-theme-btn-disabled-color);
238  border-color: var(--go-captcha-theme-btn-disabled-color);
239}
240.gocaptcha-module_dragSlideBar__noauW {
241  width: 100%;
242  height: 100%;
243  position: relative;
244  touch-action: none;
245}
246.gocaptcha-module_dragLine__3B9KR {
247  position: absolute;
248  height: 14px;
249  background-color: var(--go-captcha-theme-drag-bar-color);
250  left: 0;
251  right: 0;
252  top: 50%;
253  margin-top: -7px;
254  border-radius: 7px;
255}
256.gocaptcha-module_dragBlock__bFlwx {
257  position: absolute;
258  left: 0;
259  top: 50%;
260  margin-top: -20px;
261  width: 82px;
262  height: 40px;
263  z-index: 2;
264  background-color: var(--go-captcha-theme-drag-bg-color);
265  cursor: pointer;
266  display: flex;
267  align-items: center;
268  justify-content: center;
269  -webkit-touch-callout: none;
270  -webkit-user-select: none;
271  -ms-user-select: none;
272  user-select: none;
273  border-radius: 24px;
274  box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);
275  -webkit-box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);
276  -moz-box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);
277}
278.gocaptcha-module_dragBlock__bFlwx svg {
279  color: var(--go-captcha-theme-drag-icon-color);
280  fill: var(--go-captcha-theme-drag-icon-color);
281}
282.gocaptcha-module_disabled__4kN6w {
283  pointer-events: none;
284  background-color: var(--go-captcha-theme-btn-disabled-color);
285  border-color: var(--go-captcha-theme-btn-disabled-color);
286}
287.gocaptcha-module_dragBlockInline__PpF3f {
288  width: 100%;
289  height: 100%;
290  display: flex;
291  align-items: center;
292  justify-content: center;
293}
294`,it={wrapper:"gocaptcha-module_wrapper__Kpdey",theme:"gocaptcha-module_theme__h-Ytl",header:"gocaptcha-module_header__LjDUC",body:"gocaptcha-module_body__KJKNu",picture:"gocaptcha-module_picture__LRwbY",loading:"gocaptcha-module_loading__Y-PYK",footer:"gocaptcha-module_footer__Ywdpy",iconBlock:"gocaptcha-module_iconBlock__mVB8B",dragSlideBar:"gocaptcha-module_dragSlideBar__noauW",dragLine:"gocaptcha-module_dragLine__3B9KR",dragBlock:"gocaptcha-module_dragBlock__bFlwx",disabled:"gocaptcha-module_disabled__4kN6w",dragBlockInline:"gocaptcha-module_dragBlockInline__PpF3f"};ln(jm);const Em=e=>f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:26,height:26},e),f.createElement("path",{d:`M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
295		c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9
296		c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1
297		c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9
298		C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3
299		L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0
300		c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3
301		c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z`})),Fm=e=>f.createElement("svg",Object.assign({width:26,height:26}
301,e,{viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"}),f.createElement("path",{d:`M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
302	c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4
303	c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1
304	c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9
305	c-0.2-0.3-0.5-0.5-0.9-0.5c-0.4,0-0.7,0.2-0.9,0.5L3.8,97.3c-0.2,0.3-0.2,0.7,0,1.1c0.2,0.3,0.5,0.5,0.9,0.5h14.3
306	c0,17.2,5.3,33.2,14.3,46.4c0.1,0.2,0.2,0.4,0.3,0.6c0.9,1.4,2,2.6,3,3.9c0.4,0.5,0.7,1,1.1,1.5c1.5,1.8,3,3.5,4.6,5.2
307	c0.2,0.2,0.3,0.3,0.5,0.5c5.4,5.5,11.5,10.1,18.2,13.8c0.2,0.1,0.3,0.2,0.5,0.3c1.9,1,3.9,2,5.9,2.9c0.5,0.2,1,0.5,1.5,0.7
308	c1.7,0.7,3.5,1.3,5.2,1.9c0.8,0.3,1.7,0.6,2.5,0.8c1.5,0.5,3.1,0.8,4.7,1.2c1.1,0.2,2.1,0.5,3.2,0.7c0.4,0.1,0.9,0.2,1.3,0.3
309	c1.5,0.3,3,0.4,4.5,0.6c0.5,0.1,1.1,0.2,1.6,0.2c2.7,0.3,5.4,0.4,8.1,0.4c16.4,0,32.5-5.1,46.2-14.8c4.4-3.1,5.5-9.2,2.4-13.7
310	C145.5,147.8,139.4,146.7,135,149.9 M180.6,98.9c0-17.2-5.3-33.1-14.2-46.3c-0.1-0.2-0.2-0.5-0.4-0.7c-1.1-1.6-2.3-3.1-3.5-4.6
311	c-0.1-0.2-0.3-0.4-0.4-0.6c-8.2-10.1-18.5-17.9-30.2-23c-0.3-0.1-0.6-0.3-1-0.4c-1.9-0.8-3.8-1.5-5.7-2.1c-0.7-0.2-1.4-0.5-2.1-0.7
312	c-1.7-0.5-3.4-0.9-5.1-1.3c-0.9-0.2-1.9-0.5-2.8-0.7c-0.5-0.1-0.9-0.2-1.4-0.3c-1.3-0.2-2.6-0.3-3.8-0.5c-0.9-0.1-1.8-0.3-2.6-0.3
313	c-2.1-0.2-4.3-0.3-6.4-0.3c-0.4,0-0.8-0.1-1.2-0.1c-0.1,0-0.1,0-0.2,0c-16.4,0-32.4,5-46.2,14.8C49,35,48,41.1,51,45.6
314	c3.1,4.4,9.1,5.5,13.5,2.4c10.6-7.5,23-11.3,35.7-11.2c1.8,0,3.6,0.1,5.4,0.3c0.6,0.1,1.1,0.1,1.6,0.2c1.5,0.2,2.9,0.4,4.3,0.7
315	c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2
316	c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4
317	c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9
318	L180.6,98.9z`})),Nm=e=>f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:84,height:84},e),f.createElement("circle",{cx:"50",cy:"36.8101",r:"10",fill:"#3e7cff"},f.createElement("animate",{attributeName:"cy",dur:"1s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.45 0 0.9 0.55;0 0.45 0.55 0.9",keyTimes:"0;0.5;1",values:"23;77;23"})));function Ha(e,t){let n=t.relatedTarget;try{for(;n&&n!==e;)n=n.parentNode}catch(r){console.warn(r)}return n!==e}var Sm=`/**
319 * @Author Awen
320 * @Date 2024/06/01
321 * @Email [email protected]
322 **/
323.index-module_tile__8pkQD {
324  position: absolute;
325  z-index: 2;
326  cursor: pointer;
327}
328.index-module_tile__8pkQD img {
329  display: block;
330  cursor: pointer;
331  width: 100%;
332  height: 100%;
333}
334`,_m={tile:"index-module_tile__8pkQD"};ln(Sm);const Am=e=>f.createElement("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),f.createElement("path",{d:`M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
335	s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9
336	c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z`})),Wa=()=>({thumbX:0,thumbY:0,thumbWidth:0,thumbHeight:0,image:"",thumb:""}),Dm=()=>({width:300,height:220,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"请拖动滑块完成拼图",iconSize:22,scope:!0}),Bm=(e,t,n,r,a,i,o,c,l)=>{const[u,m]=f.useState(0),[d,h]=f.useState(e.thumbX||0),[p,x]=f.useState(!1);f.useEffect(()=>{p||h(e.thumbX||0)},[e,h]);const b=f.useCallback(()=>{m(0),h(e.thumbX||0)},[m,h,e.thumbX]),y=f.useCallback(N=>{if(!Ha(c.current,N))return;const I=N.touches&&N.touches[0],C=o.current.offsetLeft,_=a.current.offsetWidth,B=o.current.offsetWidth,U=_-B,R=i.current.offsetWidth,M=i.current.offsetLeft,K=_-R,le=(_-(R+M))/U;let se=!1,g=null,P=0,z=0;I?P=I.pageX-C:P=N.clientX-C;const w=Ee=>{se=!0;const Re=Ee.touches&&Ee.touches[0];let Ae=0;Re?Ae=Re.pageX-P:Ae=Ee.clientX-P;const vt=M+Ae*le;if(Ae>=U){m(U),z=K,h(z);return}if(Ae<=0){m(0),z=M,h(z);return}m(Ae),z=z=vt,h(z),t.move&&t.move(z,e.thumbY||0),Ee.cancelBubble=!0,Ee.preventDefault()},D=Ee=>{Ha(c.current,Ee)&&(Pe(),se&&(se=!1,!(z<0)&&(t.confirm&&t.confirm({x:parseInt(z.toString()),y:e.thumbY||0},()=>{b()}),Ee.cancelBubble=!0,Ee.preventDefault())))},T=Ee=>{g=Ee},$=()=>{g=null},E=Ee=>{g&&(D(g),Pe())},G=n.scope,te=G?r.current:c.current,me=G?r.current:document.body,Pe=()=>{me.removeEventListener("mousemove",w,!1),me.removeEventListener("touchmove",w,{passive:!1}),te.removeEventListener("mouseup",D,!1),te.removeEventListener("mouseenter",$,!1),te.removeEventListener("mouseleave",T,!1),te.removeEventListener("touchend",D,!1),me.removeEventListener("mouseleave",D,!1),me.removeEventListener("mouseup",E,!1),x(!1)};x(!0),me.addEventListener("mousemove",w,!1),me.addEventListener("touchmove",w,{passive:!1}),te.addEventListener("mouseup",D,!1),te.addEventListener("mouseenter",$,!1),te.addEventListener("mouseleave",T,!1),te.addEventListener("touchend",D,!1),me.addEventListener("mouseleave",D,!1),me.addEventListener("mouseup",E,!1)},[r,o,a,n,e,i,c,t,b]),k=f.useCallback(()=>{b(),l&&l()},[b,l]),j=f.useCallback(()=>{t.close&&t.close(),b()},[t,b]),v=f.useCallback(()=>{t.refresh&&t.refresh(),b()},[t,b]),A=f.useCallback(N=>(j(),N.cancelBubble=!0,N.preventDefault(),!1),[j]),S=f.useCallback(N=>(v(),N.cancelBubble=!0,N.preventDefault(),!1),[v]),F=f.useCallback(()=>({x:d,y:e.thumbY||0}),[e,d]);return{getState:f.useCallback(()=>({dragLeft:u,thumbLeft:d}),[d,u]),getPoint:F,dragEvent:y,closeEvent:A,refreshEvent:S,resetData:b,clearData:k,close:j,refresh:v}},Im=f.forwardRef((e,t)=>
336{const[n,r]=f.useState({...Dm(),...e.config||{}}),[a,i]=f.useState({...Wa(),...e.data||{}}),[o,c]=f.useState({...e.events||{}});f.useEffect(()=>{r({...n,...e.config||{}})},[e.config,r]),f.useEffect(()=>{i({...a,...e.data||{}})},[e.data,i]),f.useEffect(()=>{c({...o,...e.events||{}})},[e.events,c]);const l=f.useRef(null),u=f.useRef(null),m=f.useRef(null),d=f.useRef(null),h=f.useRef(null),p=Bm(a,o,n,l,m,h,d,u,()=>{i({...a,...Wa()})}),x=n.horizontalPadding||0,b=n.verticalPadding||0,y=(n.width||0)+x*2+(n.showTheme?2:0),k=(n.width||0)>0||(n.height||0)>0,j=a.image&&a.image.length>0&&a.thumb&&a.thumb.length>0;return f.useImperativeHandle(t,()=>({reset:p.resetData,clear:p.clearData,refresh:p.refresh,close:p.close})),f.useEffect(()=>{const v=A=>A.preventDefault();return d.current&&d.current.addEventListener("dragstart",v),()=>{d.current&&d.current.removeEventListener("dragstart",v)}},[d]),ie.createElement("div",{className:Va(it.wrapper,n.showTheme?it.theme:""),style:{width:y+"px",paddingLeft:x+"px",paddingRight:x+"px",paddingTop:b+"px",paddingBottom:b+"px",display:k?"block":"none"},ref:l},ie.createElement("div",{className:it.header},ie.createElement("span",null,n.title),ie.createElement("div",{className:it.iconBlock},ie.createElement(Em,{width:n.iconSize,height:n.iconSize,onClick:p.closeEvent}),ie.createElement(Fm,{width:n.iconSize,height:n.iconSize,onClick:p.refreshEvent}))),ie.createElement("div",{className:it.body,ref:m,style:{width:n.width+"px",height:n.height+"px"}},ie.createElement("div",{className:it.loading},ie.createElement(Nm,null)),j&&ie.createElement("img",{className:it.picture,style:{width:n.width+"px",height:n.height+"px"},src:a.image,alt:""}),ie.createElement("div",{className:_m.tile,ref:h,style:{width:(a.thumbWidth||0)+"px",height:(a.thumbHeight||0)+"px",top:(a.thumbY||0)+"px",left:p.getState().thumbLeft+"px"}},j&&ie.createElement("img",{style:{},src:a.thumb,alt:""}))),ie.createElement("div",{className:it.footer},ie.createElement("div",{className:it.dragSlideBar,ref:u},ie.createElement("div",{className:it.dragLine}),ie.createElement("div",{className:Va(it.dragBlock,!j&&it.disabled),ref:d,onMouseDown:p.dragEvent,style:{left:p.getState().dragLeft+"px"}},ie.createElement("div",{className:it.dragBlockInline,onTouchStart:p.dragEvent},ie.createElement(Am,null))))))});var Pm=ie.memo(Im),Mm=`/**
337 * @Author Awen
338 * @Date 2024/06/01
339 * @Email [email protected]
340 **/
341.index-module_header__jVeEs {
342  text-align: center;
343}
344.index-module_tile__VR9Ut {
345  position: absolute;
346  z-index: 2;
347  cursor: pointer;
348  -webkit-touch-callout: none;
349  -webkit-user-select: none;
350  -ms-user-select: none;
351  user-select: none;
352}
353.index-module_tile__VR9Ut img {
354  display: block;
355  cursor: pointer;
356  width: 100%;
357  height: 100%;
358}
359`;ln(Mm);var Lm=`/**
360 * @Author Awen
361 * @Date 2024/06/01
362 * @Email [email protected]
363 **/
364.index-module_body__5eTaZ {
365  background: transparent !important;
366  display: flex;
367  display: -webkit-flex;
368  justify-content: center;
369  align-items: center;
370  margin: 10px auto 0;
371}
372.index-module_bodyInner__Lb3mp {
373  border-radius: 100%;
374}
375.index-module_picture__M-qbX {
376  position: relative;
377  max-width: 100%;
378  max-height: 100%;
379  z-index: 2;
380  border-radius: 100%;
381  overflow: hidden;
382  display: flex;
383  justify-content: center;
384  align-items: center;
385}
386.index-module_picture__M-qbX img {
387  max-width: 100%;
388  max-height: 100%;
389}
390.index-module_round__zaOPS {
391  position: absolute;
392  top: 0;
393  left: 0;
394  right: 0;
395  bottom: 0;
396  border-radius: 100%;
397  z-index: 2;
398  border: 6px solid #e0e0e0;
399  border-color: var(--go-captcha-theme-round-color);
400}
401.index-module_thumb__jChIh {
402  position: absolute;
403  z-index: 2;
404  top: 0;
405  left: 0;
406  right: 0;
407  bottom: 0;
408  display: flex;
409  justify-content: center;
410  align-items: center;
411}
412.index-module_thumb__jChIh img {
413  max-width: 100%;
414  max-height: 100%;
415}
416.index-module_thumbBlock__u3U1X {
417  width: 100%;
418  height: 100%;
419  display: flex;
420  justify-content: center;
421  align-items: center;
422}
423`;ln(Lm);var Om=`/**
424 * @Author Awen
425 * @Date 2024/06/01
426 * @Email [email protected]
427 **/
428.index-module_btnBlock__L96Vx {
429  position: relative;
430  box-sizing: border-box;
431  display: block;
432  font-size: 13px;
433  -webkit-border-radius: 5px;
434  -moz-border-radius: 5px;
435  letter-spacing: 1px;
436  border-radius: 5px;
437  line-height: 1;
438  white-space: nowrap;
439  -webkit-appearance: none;
440  outline: none;
441  margin: 0;
442  transition: 0.1s;
443  font-weight: 500;
444  -moz-user-select: none;
445  -webkit-user-select: none;
446  display: flex;
447  align-items: center;
448  justify-content: center;
449  justify-items: center;
450  box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);
451  -webkit-box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);
452  -moz-box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);
453}
454.index-module_btnBlock__L96Vx span {
455  padding-left: 8px;
456}
457.index-module_disabled__U5sNo {
458  pointer-events: none;
459}
460.index-module_default__r2sQq {
461  color: var(--go-captcha-theme-default-color);
462  border: 1px solid #50a1ff;
463  border-color: var(--go-captcha-theme-default-border-color);
464  background-color: var(--go-captcha-theme-default-bg-color);
465  cursor: pointer;
466}
467.index-module_default__r2sQq:hover {
468  background-color: var(--go-captcha-theme-default-hover-color) !important;
469}
470.index-module_error__mCm6a {
471  cursor: pointer;
472  color: var(--go-captcha-theme-error-color);
473  background-color: var(--go-captcha-theme-error-bg-color);
474  border: 1px solid #ff5a34;
475  border-color: var(--go-captcha-theme-error-border-color);
476}
477.index-module_warn__CT1sW {
478  cursor: pointer;
479  color: var(--go-captcha-theme-warn-color);
480  background-color: var(--go-captcha-theme-warn-bg-color);
481  border: 1px solid #ffbe09;
482  border-color: var(--go-captcha-theme-warn-border-color);
483}
484.index-module_success__61kOU {
485  color: var(--go-captcha-theme-success-color);
486  background-color: var(--go-captcha-theme-success-bg-color);
487  border: 1px solid #8bc640;
488  border-color: var(--go-captcha-theme-success-border-color);
489  pointer-events: none;
490}
491.index-module_ripple__KF4IK {
492  position: relative;
493  display: flex;
494  align-items: center;
495  justify-content: center;
496  justify-items: center;
497}
498.index-module_ripple__KF4IK svg {
499  position: relative;
500  z-index: 2;
501}
502.index-module_ripple__KF4IK > * {
503  z-index: 2;
504}
505.index-module_ripple__KF4IK::after {
506  background-color: var(--go-captcha-theme-default-border-color);
507  border-radius: 50px;
508  content: "";
509  display: block;
510  width: 21px;
511  height: 21px;
512  opacity: 0;
513  position: absolute;
514  top: 50%;
515  left: 50%;
516  margin-top: -11px;
517  margin-left: -11px;
518  z-index: 1;
519  animation: index-module_ripple__KF4IK 1.3s infinite;
520  -moz-animation: index-module_ripple__KF4IK 1.3s infinite;
521  -webkit-animation: index-module_ripple__KF4IK 1.3s infinite;
522  animation-delay: 2s;
523  -moz-animation-delay: 2s;
524  -webkit-animation-delay: 2s;
525}
526@keyframes index-module_ripple__KF4IK {
527  0% {
528    opacity: 0;
529  }
530  5% {
531    opacity: 0.05;
532  }
533  20% {
534    opacity: 0.35;
535  }
536  65% {
537    opacity: 0.01;
538  }
539  100% {
540    transform: scaleX(2) scaleY(2);
541    opacity: 0;
542  }
543}
544`;ln(Om);var Tm={Slide:Pm};function At({className:e,children:t}){const{t:n}=ye(),r=f.useRef(null),[a,i]=f.useState(!1),[o,c]=f.useState({}),l=f.useCallback(()=>{r.current?.clear?.(),Y.get("/api/captcha").then(({data:p})=>{p?.code===0?c({image:p.image_base64||"",thumb:p.tile_base64||"",captKey:p.captcha_key||"",thumbX:p.tile_x||0,thumbY:p.tile_y||0,thumbWidth:p.tile_width||0,thumbHeight:p.tile_height||0}):console.error("failed get captcha data")}).catch(p=>{console.error(p)})},[c]),u=f.useCallback(()=>{l()},[l]),m=f.useCallback(p=>{p?.preventDefault(),i(!0),l()},[i]),d=f.useCallback(()=>{i(!1)},[i]),h=f.useCallback((p,x)=>{Y.post("/api/captcha/check",{captcha_key:o.captKey,position:p},{skipError:!0}).then(()=>{t.props.onClick&&t.props.onClick(),i(!1)}).catch(b=>{W(n("验证失败,请重试")),console.error(b)}),x()},[o.captKey]);return s.jsxs("div",{className:Te("relative",e),children:[f.useMemo(()=>f.cloneElement(t,{...t.props,onClick:m}),[t]),s.jsx(Ne,{open:a,onClose:d,ariaLabel:n("请拖动滑块完成拼图"),className:"w-auto max-w-[calc(100vw-2rem)] overflow-visible p-0",children:s.jsx(Tm.Slide,{config:{title:n("请拖动滑块完成拼图"),width:300,height:220},data:o,events:{close:d,refresh:u,confirm:h},ref:r})})]})}const zm={primary:"btn-primary",secondary:"btn-outline",soft:"btn-soft btn-primary",ghost:"btn-ghost",neutral:"btn-neutral"},Rm={sm:"btn-sm",md:"btn-md",lg:"btn-lg"},oe=f.forwardRef(function({className:t,variant:n="primary",size:r="md",loading:a=!1,disabled:i=!1,type:o="button",children:c,...l},u){return s.jsxs("button",{ref:u,type:o,disabled:i||a,"aria-busy":a,className:Te("btn",zm[n],Rm[r],t),...l,children:[a&&s.jsx("span",{"aria-hidden":"true",className:"loading loading-spinner loading-sm"}),c]})});function Hn({open:e,onCancel:t,onAgree:n}){const r=sr();return s.jsx(Ne,{open:e,onClose:t,closeOnBackdrop:!1,className:"max-w-[500px]",footer:s.jsxs("div",{className:"grid w-full grid-cols-2 gap-3",children:[s.jsx(oe,{variant:"secondary",onClick:t,children:r`取消`}),s.jsx(oe,{onClick:n,children:r`同意`})]}),children:s.jsx("p",{className:"py-2 text-center text-base font-semibold leading-7 text-base-content",children:r`登录或者注册需要同意《用户协议》和《隐私协议》`})})}function bt({id:e,label:t,required:n=!1,error:r,children:a}){return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{htmlFor:e,className:"block text-sm font-semibold text-[var(--ui-ink)]",children:[t,n&&s.jsx("span",{className:"ml-1 text-[var(--ui-danger)]","aria-hidden":"true",children:"*"})]}),a,r&&s.jsx("p",{className:"text-sm text-[var(--ui-danger)]",role:"alert",children:r})]})}const ke=f.forwardRef(function({className:t,leading:n,invalid:r=!1,readOnly:a=!1,variant:i="outline",...o},c){return s.jsxs("label",{className:Te("input w-full",i==="filled"&&"border-base-200 bg-base-200",r&&"input-error",a&&"bg-base-200",t),children:[n&&s.jsx("span",{"aria-hidden":"true",className:"text-base-content/50",children:n}),s.jsx("input",{ref:c,readOnly:a,"aria-invalid":r||void 0,className:"grow leading-[normal]",...o})]})}),qa=/^1[3-9]\d{9}$/;function el({defaultChecked:e,mobilePromo:t=!1,compact:n=!1,agreement:r,type:a="login"}
544){const i=wt(),[,o]=f.useContext(kt),c=JSON.parse(localStorage.getItem("status")||"{}"),[l]=Nn(),u=Ft(),m=vs(),{i18n:d}=ye(),h=s.jsx("a",{href:"https://d.aipyaipy.com/d/13",target:"_blank",rel:"noreferrer",children:Z`选填`},"optional"),p=l.get("aff")||"",[x]=f.useState(!!p),[b,y]=f.useState({phone_number:"",code:"",aff_code:p}),[k,j]=f.useState({}),[v,A]=f.useState({sms:!1,submit:!1}),[S,F]=f.useState(0),[O,N]=f.useState(!1),[I,C]=f.useState({open:!1,accounts:[],phone_number:"",code:""}),[_,B]=f.useState(null);f.useEffect(()=>{let P=!1;return(async()=>{if(p){localStorage.setItem("aff",p);return}const w=(localStorage.getItem("aff")||"").trim();if(w){y(D=>D.aff_code?D:{...D,aff_code:w});return}await ir(D=>{P||y(T=>T.aff_code?T:{...T,aff_code:D})})})(),()=>{P=!0}},[p]),f.useEffect(()=>{if(S<=0)return;const P=setTimeout(()=>F(z=>z-1),1e3);return()=>clearTimeout(P)},[S]);const U=(P,z)=>{y(w=>({...w,[P]:z})),j(w=>({...w,[P]:""}))},R=(P,z={})=>{fe(Z`登录成功`),vn(),o({type:"login",payload:P}),localStorage.setItem("user",JSON.stringify(P)),sn(P),Cn();const w=typeof window<"u"&&!!window.aipy;if(m&&!w&&z.invite_welcome&&z.invite_code){window.location.href=`/signing-invite.html?invite=${encodeURIComponent(z.invite_code)}`;return}if(u.state?.oauth){window.location.href="/api/oauth/authorize"+u.search;return}let D=l.get("next")||"";(!D.startsWith("/")||D.startsWith("//")||D.startsWith("/\\"))&&(D="/token"),i(D)},M=()=>{const P={};return b.phone_number?qa.test(b.phone_number)||(P.phone_number=Z`请输入正确的手机号`):P.phone_number=Z`请输入手机号`,b.code||(P.code=Z`请输入验证码`),j(P),Object.keys(P).length===0},K=async()=>{if(!qa.test(b.phone_number)){const P=b.phone_number?Z`请输入正确的手机号`:Z`请输入手机号`;j(z=>({...z,phone_number:P})),W(P);return}A(P=>({...P,sms:!0}));try{const P=await Y.post("/api/sms/code",{mobile:b.phone_number}),{success:z,message:w}=P.data;z?(fe(Z`发送成功`),F(60)):W(w)}finally{A(P=>({...P,sms:!1}))}},ee=async()=>{N(!1),A(P=>({...P,submit:!0})),localStorage.setItem("aipay-defaultChecked",!0);try{const P={phone_number:b.phone_number,code:b.code,aff:b.aff_code||""},z=a==="login"&&d.language!=="zh-CN"||!c.WebRegisterEnabled&&sessionStorage.getItem("layout")!=="false"?"/api/user/login/mobile":"/api/user/register/mobile",w=z==="/api/user/login/mobile"?P:{phone_number:b.phone_number,code:b.code,aff_code:b.aff_co
544de},D=await Y.post(z,w);if(D.data.success){(b.aff_code||"").trim()&&localStorage.removeItem("aff");const{data:T}=D.data;if(T?.multiple){C({open:!0,accounts:T.accounts||[],phone_number:b.phone_number,code:b.code});return}R(T,D.data)}else D.data?.showType||W(D.data.message)}finally{A(P=>({...P,submit:!1}))}},le=P=>{P.preventDefault(),M()&&(d.language!=="zh-CN"||e?ee():N(!0))},se=async P=>{if(_===null){B(P);try{const z=await Y.post("/api/user/login/mobile/select",{phone_number:I.phone_number,code:I.code,user_id:P});z.data.success?(C(w=>({...w,open:!1})),R(z.data.data)):z.data?.showType||W(z.data.message)}finally{B(null)}}},g=s.jsxs(Ne,{open:I.open,onClose:()=>C(P=>({...P,open:!1})),title:Z`选择要登录的账户`,children:[s.jsx("p",{className:"mb-4 text-sm text-base-content/60",children:Z`该手机号关联了多个账户,请选择要登录的账户`}),s.jsx("div",{className:"space-y-2",children:I.accounts.map(P=>{const z=P.display_name||P.username,w=P.register_type==="wechat",D=_===P.id;return s.jsxs("button",{type:"button",disabled:_!==null,onClick:()=>se(P.id),className:"flex min-h-14 w-full items-center gap-3 rounded-box border border-base-300 bg-base-100 p-3 text-left transition hover:border-primary hover:bg-base-200 disabled:cursor-wait disabled:opacity-70",children:[s.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-bold text-white",style:{backgroundColor:en(z)},children:z.slice(0,1).toUpperCase()}),s.jsx("span",{className:"min-w-0 flex-1 truncate font-semibold",children:z}),s.jsx("span",{className:`badge ${w?"badge-success":"badge-info"} badge-soft shrink-0`,children:w?Z`微信注册`:Z`手机号注册`}),D&&s.jsx("span",{className:"loading loading-spinner loading-sm"})]},P.id)})})]});return t?s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:"mobile-promo-form",onSubmit:le,autoComplete:"off",children:[s.jsxs("div",{className:"mobile-promo-field",children:[s.jsx("span",{className:"icon-[circum--mobile-2] mobile-promo-icon"}),s.jsx("span",{className:"mobile-promo-label",children:"手机号"}),s.jsx(ke,{className:"h-auto min-h-0 rounded-none border-0 bg-transparent p-0 shadow-none focus-within:border-0 focus-within:outline-none","aria-label":Z`手机号`,placeholder:"请输入手机号",value:b.phone_number,onChange:P=>U("phone_number",P.target.value),invalid:!!k.phone_number})]}),k.phone_number&&s.jsx("p",{className:"-mt-1 ml-24 text-xs text-error",role:"alert",children:k.phone_number}),s.jsxs("div",{className:"mobile-promo-field mobile-promo-code-field",children:[s.jsx("span",{className:"icon-[solar--shield-check-linear] mobile-promo-icon"}),s.jsx("span",{className:"mobile-promo-label",children:"验证码"}),s.jsx(ke,{className:"mobile-promo-code-input h-auto min-h-0 rounded-none border-0 bg-transparent p-0 shadow-none focus-within:border-0 focus-within:outline-none","aria-label":Z`验证码`,placeholder:"请输入验证码",value:b.code,onChange:P=>U("code",P.target.value),invalid:!!k.code,autoComplete:"off"}),s.jsx(At,{className:"mobile-promo-captcha",children:s.jsx(oe,{type:"button",variant:"secondary",size:"sm",loading:v.sms,className:"mobile-promo-code-btn",onClick:K,disabled:S>0,children:S>0?`${S}`:"获取验证码"})})]}),k.code&&s.jsx("p",{className:"-mt-1 ml-24 text-xs text-error",role:"alert",children:k.code}),s.jsxs("div",{className:"mobile-promo-field",children:[s.jsx("span",{className:"icon-[solar--user-plus-linear] mobile-promo-icon"}),s.jsx("span",{className:"mobile-promo-label",children:"邀请码(选填)"}),s.jsx(ke,{className:"h-auto min-h-0 rounded-none border-0 bg-transparent p-0 shadow-none focus-within:border-0 focus-within:outline-none","aria-label":Z`邀请码`,placeholder:"请输入邀请码(选填)",value:b.aff_code,onChange:P=>{const z=P.target.value;U("aff_code",z),z?localStorage.setItem("aff",z):localStorage.removeItem("aff")},disabled:x})]}),s.jsx(oe,{type:"submit",size:"lg",loading:v.submit,className:"mobile-promo-submit",children:"注册并领取奖励"})]}),s.jsx(Hn,{open:O,onCancel:()=>N(!1),onAgree:ee}),g]}):n?s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:"space-y-4",onSubmit:le,autoComplete:"off",children:[s.jsxs("div",{children:[s.jsx(ke,{id:"phone-number",inputMode:"tel",autoComplete:"tel",className:"h-10 sm:h-12",placeholder:Z`请输入您的手机号`,value:b.phone_number,onChange:P=>U("phone_number",P.target.value),invalid:!!k.phone_number}),k.phone_number&&s.jsx("p",{className:"mt-1 text-xs text-error",role:"alert",children:k.phone_number})]}),s.jsxs("div",{children:[s.jsxs("label",{className:`input h-10 w-full sm:h-12 ${k.code?"input-error":""}`,children:[s.jsx("input",{id:"phone-code",inputMode:"numeric",autoComplete:"one-time-code",className:"min-w-0 grow leading-[normal]",placeholder:Z`请输入验证码`,value:b.code,onChange:P=>
544U("code",P.target.value),"aria-invalid":!!k.code||void 0}),s.jsx(At,{children:s.jsx(oe,{type:"button",variant:"ghost",size:"sm",loading:v.sms,className:"login-sms-button-zh h-auto min-h-0 px-[5px] py-[5px] text-info hover:bg-transparent md:px-0 md:py-0",onClick:K,disabled:S>0,children:S>0?`${S}`:Z`获取验证码`})})]}),k.code&&s.jsx("p",{className:"mt-1 text-xs text-error",role:"alert",children:k.code})]}),d.language==="zh-CN"&&s.jsx(ke,{id:"aff-code",className:"h-10 sm:h-12",placeholder:Z`请输入邀请码(选填)`,value:b.aff_code,onChange:P=>{const z=P.target.value;U("aff_code",z),z?localStorage.setItem("aff",z):localStorage.removeItem("aff")},disabled:x}),r,s.jsx(oe,{type:"submit",variant:"neutral",loading:v.submit,className:"h-10 w-full sm:h-12",children:Z`立即登录`})]}),s.jsx(Hn,{open:O,onCancel:()=>N(!1),onAgree:ee}),g]}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:"space-y-5",onSubmit:le,autoComplete:"off",children:[s.jsx(bt,{id:"phone-number",label:Z`手机号`,error:k.phone_number,children:s.jsx(ke,{id:"phone-number",inputMode:"tel",autoComplete:"tel",variant:"filled",placeholder:Z`手机号`,value:b.phone_number,onChange:P=>U("phone_number",P.target.value),invalid:!!k.phone_number})}),s.jsxs("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_150px] sm:items-end",children:[s.jsx(bt,{id:"phone-code",label:Z`验证码`,error:k.code,children:s.jsx(ke,{id:"phone-code",inputMode:"numeric",autoComplete:"one-time-code",variant:"filled",placeholder:Z`验证码`,value:b.code,onChange:P=>U("code",P.target.value),invalid:!!k.code})}),s.jsx(At,{children:s.jsx(oe,{type:"button",variant:"soft",loading:v.sms,className:"w-full",onClick:K,disabled:S>0,children:S>0?`${S}`:Z`获取验证码`})})]}),d.language==="zh-CN"&&s.jsx(bt,{id:"aff-code",label:os`邀请码(${h})`,children:s.jsx(ke,{id:"aff-code",variant:"filled",placeholder:Z`邀请码`,value:b.aff_code,onChange:P=>{const z=P.target.value;U("aff_code",z),z?localStorage.setItem("aff",z):localStorage.removeItem("aff")},disabled:x})}),s.jsx(oe,{type:"submit",size:"lg",loading:v.submit,className:"w-full",children:d.language==="zh-CN"?Z`登录/注册`:a==="login"?Z`登录`:Z`注册`})]}),s.jsx(Hn,{open:O,onCancel:()=>N(!1),onAgree:ee}),g]})}function lr({className:e,children:t,...n}){return s.jsx("section",{className:Te("card border border-base-300 bg-base-100 shadow-xl",e),...n,children:t})}const $m=()=>{const e=sr(),[t,n]=f.useState(0),[r,a]=f.useState({username:"",password:"",password2:"",email:"",verification_code:""}),[i,o]=f.useState({}),{username:c,password:l,password2:u}=r,[m,d]=f.useState(!1),[,h]=f.useContext(kt),[{status:p={}}]=f.useContext(Sn),[x,b]=f.useState(!1),[y,k]=f.useState(""),[j,v]=f.useState(""),[A,S]=f.useState(!1),[F,O]=f.useState(!1),N=wt(),I=vs(),C=Ft(),_=new URLSearchParams(window.location.search),[B,U]=f.useState(_.get("aff")||localStorage.getItem("aff")||""),[R,M]=f.useState(()=>!B.trim()&&bs());f.useEffect(()=>{let w=!1;return(async()=>R&&(await ir(T=>{w||U($=>$||T)}),w||M(!1)))(),()=>{w=!0}},[]),f.useEffect(()=>{p&&(d(p.email_verification),p.turnstile_check&&(b(!0),k(p.turnstile_site_key)))},[p]),f.useEffect(()=>{if(t<=0)return;const w=setTimeout(()=>n(D=>D-1),1e3);return()=>clearTimeout(w)},[t]);const K=(w,D)=>{a(T=>({...T,[w]:D})),o(T=>({...T,[w]:""}))},ee=()=>{const w={};return c||(w.username=e`请输入用户名`),l?l.length<8&&(w.password=e`密码长度不得小于 8 位!`):w.password=e`请输入密码`,u?l!==u&&(w.password2=e`两次输入的密码不一致`):w.password2=e`确认密码`,o(w),Object.keys(w).length===0},le=async w=>{if(w.preventDefault(),!!ee()){if(x&&!j){rn(e`请稍后几秒重试,Turnstile 正在检查用户环境!`);return}S(!0);try{const D=await Y.post(`/api/user/register?turnstile=${j}`,{...r,aff_code:B}),{success:T,message:$,showType:E}=D.data;T?(B&&localStorage.removeItem("aff"),N(`/login${C.search}`,{state:C.state}),fe(e`注册成功!`)):W($,E)}finally{S(!1)}}},se=async()=>{if(r.email){if(x&&!j){rn(e`请稍后几秒重试,Turnstile 正在检查用户环境!`);return}S(!0);try{const w=await Y.get(`/api/verification?email=${r.email}&turnstile=${j}`),{success:D,message:T}=w.data;D?(fe(e`验证码发送成功,请检查你的邮箱!`),n(60)):W(T)}finally{S(!1)}}},g=async w=>{const D=["id","first_name","last_name","username","photo_url","auth_date","hash","lang"],T={};D.forEach(me=>{w[me]&&(T[me]=w[me])});const $=await Y.get("/api/oauth/telegram/login",{params:T}),{success:E,message:G,data:te}=$.data;
544E?(vn(),h({type:"login",payload:te}),localStorage.setItem("user",JSON.stringify(te)),fe(e`登录成功!`),sn(te),Cn(),N("/")):W(G)},P=new URLSearchParams({aff:B,next:_.get("next")||""});C.state?.oauth&&P.set("next",`/oauth/login${C.search}`);const z=p.github_oauth||p.oidc_enabled||!I&&p.wechat_login||p.telegram_oauth||p.linuxdo_oauth;return s.jsxs(s.Fragment,{children:[s.jsx("main",{className:"absolute inset-x-0 top-0 flex min-h-full justify-center px-4 pb-12 pt-12 sm:pt-[120px]",children:s.jsx(lr,{className:"h-fit w-full max-w-[500px] overflow-visible shadow-none",children:s.jsxs("div",{className:"card-body gap-0 p-6 sm:p-8",children:[s.jsx("h1",{className:"mb-8 text-center text-3xl font-bold text-base-content",children:e`新用户注册`}),p.enabled_phone_register?s.jsx(el,{type:"register"}):s.jsxs("form",{className:"space-y-5",onSubmit:le,children:[s.jsx(bt,{id:"register-username",label:e`用户名`,error:i.username,children:s.jsx(ke,{id:"register-username",name:"username",autoComplete:"username",variant:"filled",placeholder:e`用户名`,value:r.username,onChange:w=>K("username",w.target.value),invalid:!!i.username})}),s.jsx(bt,{id:"register-password",label:e`密码`,error:i.password,children:s.jsx(ke,{id:"register-password",name:"password",type:"password",autoComplete:"new-password",variant:"filled",placeholder:e`输入密码,最短 8 位,最长 20 位`,value:r.password,onChange:w=>K("password",w.target.value),invalid:!!i.password})}),s.jsx(bt,{id:"register-password-confirm",label:e`确认密码`,error:i.password2,children:s.jsx(ke,{id:"register-password-confirm",name:"password2",type:"password",autoComplete:"new-password",variant:"filled",placeholder:e`确认密码`,value:r.password2,onChange:w=>K("password2",w.target.value),invalid:!!i.password2})}),m&&s.jsxs(s.Fragment,{children:[s.jsx(bt,{id:"register-email",label:e`邮箱`,children:s.jsxs("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_150px]",children:[s.jsx(ke,{id:"register-email",name:"email",type:"email",autoComplete:"email",variant:"filled",placeholder:e`输入邮箱地址`,value:r.email,onChange:w=>K("email",w.target.value)}),s.jsx(At,{children:s.jsx(oe,{type:"button",variant:"soft",loading:A,onClick:se,disabled:!r.email||t>0,children:t>0?`${t}`:e`获取验证码`})})]})}),s.jsx(bt,{id:"register-email-code",label:e`验证码`,children:s.jsx(ke,{id:"register-email-code",name:"verification_code",inputMode:"numeric",autoComplete:"one-time-code",variant:"filled",placeholder:e`输入验证码`,value:r.verification_code,onChange:w=>K("verification_code",w.target.value)})})]}),s.jsx(oe,{type:"submit",size:"lg",loading:A,className:"w-full",children:e`注册`})]}),s.jsxs("p",{className:"mt-5 text-sm text-base-content/70",children:[e`已有账户?`," ",s.jsx(Wt,{className:"link link-primary link-hover",to:`/login${C.search}`,state:C.state,children:e`点击登录`})]}),z&&s.jsxs("section",{children:[s.jsx("div",{className:"divider text-xs text-base-content/50",children:e`第三方登录`}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[p.github_oauth&&s.jsx(oe,{variant:"soft","aria-label":"GitHub",className:"btn-square",onClick:()=>ws(p.github_client_id),children:s.jsx("span",{className:"icon-[mdi--github] size-5"})}),p.oidc_enabled&&s.jsx(oe,{variant:"soft","aria-label":"OIDC",className:"btn-square",onClick:()=>ys(p.oidc_authorization_endpoint,p.oidc_client_id),children:s.jsx(Jo,{})}),p.linuxdo_oauth&&s.jsx(oe,{variant:"soft","aria-label":"Linux Do",className:"btn-square",onClick:()=>ks(p.linuxdo_client_id),children:s.jsx(Xo,{})}),!I&&!!p.wechat_login&&s.jsx(oe,{variant:"soft","aria-label":"微信",className:"btn-square h-8 w-8 p-0",onClick:()=>O(!0),children:s.jsx("span",{className:"icon-[ant-design--wechat-filled] size-5 text-green-500"})})]}),p.telegram_oauth&&s.jsx("div",{className:"mt-3 flex justify-center",children:s.jsx(xs,{dataOnauth:g,botName:p.telegram_bot_name})})]}),x&&s.jsx("div",{className:"mt-5 flex justify-center overflow-x-auto",children:s.jsx(ar,{sitekey:y,onVerify:w=>v(w)})})]})})}),s.jsx(Ne,{open:F,onClose:()=>O(!1),className:"max-w-md p-3",children:R?s.jsx("div",{role:"status","aria-label":"加载中...",className:"flex h-[440px] w-full items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-md","aria-hidden":"true"})}):s.jsx("iframe",{className:"h-[440px] w-full border-none",title:"微信登录",sandbox:"allow-top-navigation allow-same-origin allow-scripts",src:`/api/oauth/wechat?${P}`},B)})]})};var Um=Vu();const tl=Kt(Um),Vm=e=>f.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 128 128",...e},f.createElement("path",{fill:"#fff",d:"M44.59 4.21a63.28 63.28 0 0 0 4.33 120.9a67.6 67.6 0 0 0 32.36.35a57.13 57.13 0 0 0 25.9-13.46a57.44 57.44 0 0 0 16-26.26a74.3 74.3 0 0 0 1.61-33.58H65.27v24.69h34.47a29.72 29.72 0 0 1-12.66 19.52a36.2 36.2 0 0 1-13.93 5.5a41.3 41.3 0 0 1-15.1 0A37.2 37.2 0 0 1 44 95.74a39.3 39.3 0 0 1-14.5-19.42a38.3 38.3 0 0 1 0-24.63a39.25 39.25 0 0 1 9.18-14.91A37.17 37.17 0 0 1 76.13 27a34.3 34.3 0 0 1 13.64 8q5.83-5.8 11.64-11.63c2-2.09 4.18-4.08 6.15-6.22A61.2 61.2 0 0 0 87.2 4.59a64 64 0 0 0-42.61-.38"}),f.createElement("path",{fill:"#e33629",d:"M44.59 4.21a64 64 0 0 1 42.61.37a61.2 61.2 0 0 1 20.35 12.62c-2 2.14-4.11 4.14-6.15 6.22Q95.58 29.23 89.77 35a34.3 34.3 0 0 0-13.64-8a37.17 37.17 0 0 0-37.46 9.74a39.25 39.25 0 0 0-9.18 14.91L8.76 35.6A63.53 63.53 0 0 1 44.59 4.21"}),f.createElement("path",{fill:"#f8bd00",d:"M3.26 51.5a63 63 0 0 1 5.5-15.9l20.73 16.09a38.3 38.3 0 0 0 0 24.63q-10.36 8-20.73 16.08a63.33 63.33 0 0 1-5.5-40.9"}),f.createElement("path",{fill:"#587dbd",d:"M65.27 52.15h59.52a74.3 74.3 0 0 1-1.61 33.58a57.44 5
5447.44 0 0 1-16 26.26c-6.69-5.22-13.41-10.4-20.1-15.62a29.72 29.72 0 0 0 12.66-19.54H65.27c-.01-8.22 0-16.45 0-24.68"}),f.createElement("path",{fill:"#319f43",d:"M8.75 92.4q10.37-8 20.73-16.08A39.3 39.3 0 0 0 44 95.74a37.2 37.2 0 0 0 14.08 6.08a41.3 41.3 0 0 0 15.1 0a36.2 36.2 0 0 0 13.93-5.5c6.69 5.22 13.41 10.4 20.1 15.62a57.13 57.13 0 0 1-25.9 13.47a67.6 67.6 0 0 1-32.36-.35a63 63 0 0 1-23-11.59A63.7 63.7 0 0 1 8.75 92.4"})),Hm=f.forwardRef(function({className:t,labelClassName:n,contentClassName:r,children:a,...i},o){return s.jsxs("label",{className:Te("flex min-h-11 items-start gap-2",n),children:[s.jsx("input",{ref:o,type:"checkbox",className:Te("checkbox checkbox-primary checkbox-sm mt-0.5",t),...i}),s.jsx("span",{className:Te("text-sm leading-5 text-base-content/70",r),children:a})]})}),Wm=()=>{const{i18n:e}=ye(),[t,n]=f.useState({username:"",password:""}),{username:r,password:a}=t,[i]=Nn(),[,o]=f.useContext(kt),[c]=f.useContext(Sn),l=c?.status||{},u=wt(),m=Ft(),d=vs(),h=!d&&e.language==="zh-CN",[p,x]=f.useState(e.language==="zh-CN"&&!d?"0":e.language==="zh-CN"?"1":"2"),[b,y]=f.useState(!1),[k,j]=f.useState(!1),[v,A]=f.useState("login"),[S,F]=f.useState(!1),[O,N]=f.useState(!1),[I]=f.useState(!1),[C]=f.useState(""),[_,B]=f.useState(""),[U,R]=f.useState(0),M="/image/aipy-logo.avif",K=new URLSearchParams(window.location.search),ee=K.get("aff")?.trim()||(localStorage.getItem("aff")||"").trim(),[le]=f.useState(!!K.get("aff")?.trim()),[se,g]=f.useState(ee),[P,z]=f.useState(ee),[w,D]=f.useState(()=>!ee&&bs());f.useEffect(()=>{let re=!1;i.get("expired")&&W(Z`未登录或登录已过期,请重新登录`),i.has("error")&&W(i.get("error")||Z`登录失败,请重试`),localStorage.getItem("aipay-defaultChecked")&&y(!0);const $e=i.get("aff");return $e&&localStorage.setItem("aff",$e),(async()=>w&&(await ir(Qe=>{re||(g(dt=>dt||Qe),z(dt=>dt||Qe))}),re||D(!1)))(),()=>{re=!0}},[]),f.useEffect(()=>{if(!d||e.language!=="zh-CN")return;let re=!1;return(async()=>{try{const tt=await Y.get("/api/user/register/reward",{params:{phone_number:"",aff_code:new URLSearchParams(m.search).get("aff")||""}});if(!re&&tt.data?.success){const Qe=tt.data?.data||{};R(Number(Qe.quota)||0)}}catch{re||R(0)}})(),()=>{re=!0}},[e.language,d,m.search]),f.useEffect(()=>{c?.status&&(p==="0"&&(!h||!l.wechat_login)?x(l.enabled_phone_login?"1":"2"):p==="1"&&l.enabled_phone_login===!1?x(h&&l.wechat_login?"0":"2"):p==="2"&&l.enabled_password_login===!1&&(l.enabled_phone_login||h&&l.wechat_login)&&x(l.enabled_phone_login?"1":"0"))},[e.language,h,d,p,l.enabled_password_login,l.enabled_phone_login,l.wechat_login,c?.status]);const T=(re,$e)=>{n(tt=>({...tt,[re]:$e}))},$=()=>{if(m.state?.oauth){window.location.href="/api/oauth/authorize"+m.search;return}let re=new URLSearchParams(m.search).get("next")||"";if(re.startsWith("/share")){window.location.href=re;return}(!re.startsWith("/")||re.startsWith("//")||re.startsWith("/\\"))&&(re="/token"),u(re)},E=async re=>{if(y(!0),localStorage.setItem("aipay-defaultChecked",!0),j(!1),I&&!_){rn(Z`请稍后几秒重试,Turnstile 正在检查用户环境!`);return}if(!r||!a){W(Z`请输入用户名和密码!`);return}const $e=await Y.post(`/api/user/login?turnstile=${_}`,{username:r,password:a}),{success:tt,message:Qe,data:dt}=$e.data;if(!tt){W(Qe);return}if(vn(),o({type:"login",payload:dt}),sn(dt),Cn(),fe(Z`登录成功!`),localStorage.setItem("lastLoginTime",Date.now().toString()),r==="root"&&a==="123456"){N(!0);return}$()},G=()=>{if(!r||!a){W(Z`请输入用户名和密码!`);return}e.language!=="zh-CN"||b?E():(A("login"),j(!0))},te=()=>{if(!b){A("wechat"),j(!0);return}F(!0)},me=()=>{if(v==="wechat"){y(!0),localStorage.setItem("aipay-defaultChecked",!0),j(!1),A("login"),F(!0);return}E()},Pe=async re=>{const $e=["id","first_name","last_name","username","photo_url","auth_date","hash","lang"],tt={};$e.forEach(ae=>{re[ae]&&(tt[ae]=re[ae])});const Qe=await Y.get("/api/oauth/telegram/login",{params:tt}),{success:dt,message:L,data:q}=Qe.data;if(dt){vn(),o({type:"login",payload:q}),localStorage.setItem("user",JSON.stringify(q)),fe(Z`登录成功!`),sn(q),Cn();let ae=new URLSearchParams(m.search).get("next")||"";(!ae.startsWith("/")||ae.startsWith("//")||ae.startsWith("/\\"))&&(ae="/"),u(ae)}else W(L)},Ee=()=>{const re=se.trim();g(re),z(re),re?localStorage.setItem("aff",re):localStorage.removeItem("aff")};f.useEffect(()=>{if(!(!S||!P))return localStorage.removeItem("aff"),()=>{localStorage.getItem("user")||localStorage.setItem("aff",P)}},[S]);const Re=s.jsx("div",{role:"status","aria-label":Z`加载中...`,className:"mx-auto flex h-[220px] w-[220px] max-w-full items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-md","aria-hidden":"true"})}),Ae=new URLSearchParams({compact:"1",aff:P,next:K.get("next")||""});m.state?.oauth&&Ae.set("next",`/oauth/login${m.search}`);const vt=s.jsx(Ne,{open:O,onClose:()=>{N(!1),$()},closeOnBackdrop:!1,title:Z`您正在使用默认密码!`,footer:s.jsx(oe,{className:"w-full",onClick:()=>{N(!1),$()},children:Z`关闭`}),children:s.jsx("p",{className:"text-sm leading-6 text-base-content/70",children:Z`请立刻修改默认密码!`})}),X=l.github_oauth||l.oidc_enabled||!d&&l.wechat_login&&e.language!=="zh-CN"||l.telegram_oauth||l.google_oauth||l.linuxdo_oauth,ce=s.jsx("a",{className:"link link-hover text-base-content",href:"/terms/terms-of-service.html",target:"_blank",children:Z`服务条款`},"terms"),_e=s.jsx("a",{className:"link link-hover text-base-content",href:"/terms/privacy-policy.html",target:"_blank",children:Z`隐私政策`},"privacy"),De=[{key:"0",label:Z`微信扫码`,enabled:!!(h&&l.wechat_login)},{key:"1",label:Z`手机号登录`,enabled:!!l.enabled_phone_login},{key:"2",label:Z`用户名登录`,enabled:!!l.enabled_password_login}].filter(re=>re.enabled),Se=s.jsx(Hm,{checked:b,onChange:re=>y(re.target.checked),"aria-label":Z`协议勾选`,className:"checkbox-xs mt-0.5",labelClassName:"min-h-0 gap-1.5",contentClassName:"text-xs leading-4",children:os`我已阅读并同意${ce}和${_e},未注册的手机号将自动创建账号`});return s.jsxs(s.Fragment,{children:[s.jsxs("main",{className:`absolute inset-0 flex min-h-full flex-col items-center overflow-y-auto bg-base-200 px-[18px] pb-12 pt-8 sm:justify-center sm:px-6 ${h?"login-bg-zh":""}`,children:[d&&e.language==="zh-CN"&&s.jsxs("section",{className:"relative mb-4 w-full max-w-[700px] overflow-hidden rounded-2xl",children:[s.jsx("img",{src:"/image/mobile-login-banner-20260630.webp",alt:Z`扫码注册下载APP`,className:"block w-full object-cover"}),U>0&&s.jsxs("p",{className:"absolute left-[4%] top-[45%] m-0 text-[10px] font-medium text-[#535786]",children:[Z`登录使用,可获
544取`,s.jsx("strong",{className:"text-[#fc4b15]",children:ft(U,0)}),Z`奖励`]})]}),s.jsx(lr,{className:`h-fit w-full max-w-[700px] overflow-visible rounded-2xl border-0 shadow-none ${h?"login-card-zh":""}`,children:s.jsxs("div",{className:`card-body gap-0 p-3 py-7 sm:min-h-[424px] sm:px-14 sm:pb-14 sm:pt-8 ${h?"login-card-body-zh":""}`,children:[s.jsx("img",{src:M,alt:"",className:`mx-auto hidden h-[52px] w-[215px] shrink-0 object-contain sm:block ${h?"login-logo-zh":"mb-12"}`}),h&&s.jsx("h1",{className:"login-title-zh",children:Z`欢迎登录/注册`}),s.jsx("div",{className:`grid min-w-0 grid-cols-1 ${h?"login-content-zh":"sm:mx-auto sm:w-[320px]"}`,children:s.jsxs("section",{className:"min-w-0",children:[e.language!=="zh-CN"&&l.enabled_phone_login&&l.enabled_password_login&&s.jsxs("div",{className:"tabs mb-7 flex gap-7",role:"tablist",children:[s.jsx("button",{type:"button",role:"tab","aria-selected":p==="1",className:`tab ${p==="1"?"tab-active":""}`,onClick:()=>x("1"),children:Z`手机号登录`}),s.jsx("button",{type:"button",role:"tab","aria-selected":p==="2",className:`tab ${p==="2"?"tab-active":""}`,onClick:()=>x("2"),children:Z`用户名登录`})]}),e.language==="zh-CN"&&De.length>0&&s.jsx("div",{className:"tabs login-tabs-zh mb-7 flex justify-between gap-7",role:"tablist",children:De.map(re=>{const $e=re.key==="0"?Z`微信扫码`:re.key==="1"?h?Z`手机号`:Z`手机号登录`:h?Z`密码`:Z`账号密码登录`;return s.jsx("button",{type:"button",role:"tab","aria-selected":p===re.key,className:`tab h-auto min-h-0 px-0 py-0 text-[16px] font-normal ${p===re.key?"tab-active text-primary":"text-base-content/50"}`,onClick:()=>x(re.key),children:$e},re.key)})}),p==="0"&&h&&l.wechat_login?s.jsxs("section",{className:"login-wechat-zh text-center",children:[s.jsxs("div",{className:"login-qrcode-zh",children:[s.jsx("div",{className:"login-qrcode-frame-zh",children:w?Re:s.jsx("iframe",{className:"login-qrcode-iframe-zh border-none",scrolling:"no",title:Z`微信登录`,sandbox:"allow-top-navigation allow-same-origin allow-scripts",src:`/api/oauth/wechat?${Ae}`},P)}),s.jsx("p",{className:"login-qrcode-caption-zh mt-3",children:Z`请使用微信扫描二维码登录`})]}),s.jsxs("div",{className:le?"login-invite-zh mt-4 w-full":"login-invite-zh join mt-4 flex w-full",children:[s.jsx(ke,{id:"wechat-aff-code",className:`${le?"":"join-item"} login-invite-input-zh h-10 min-w-0 flex-1 basis-0 text-left`,"aria-label":Z`邀请码`,placeholder:Z`邀请码(选填)`,value:se,onChange:re=>g(re.target.value),onKeyDown:re=>{re.key==="Enter"&&(re.preventDefault(),Ee())},disabled:le}),!le&&s.jsx(oe,{variant:"secondary",size:"sm",className:"login-invite-apply-zh join-item",onClick:Ee,disabled:se.trim()===P,children:Z`应用`})]}),s.jsxs("p",{className:"login-register-hint-zh mt-4 flex items-center justify-center gap-2",children:[s.jsx("span",{className:"icon-[material-symbols--info] size-4","aria-hidden":"true"}),Z`未注册的用户扫码或手机验证后会自动注册`]})]}):p==="1"&&l.enabled_phone_login?s.jsx(el,{compact:!0,defaultChecked:b,agreement:Se}):l.enabled_password_login&&s.jsxs("form",{className:"space-y-4",onSubmit:re=>{re.preventDefault(),G()},children:[s.jsx(ke,{id:"login-username",autoComplete:"username",className:"h-10 sm:h-12",placeholder:e.language==="zh-CN"?Z`请输入用户名`:Z`用户名/邮箱`,value:r,onChange:re=>T("username",re.target.value)}),s.jsx(ke,{id:"login-password",autoComplete:"current-password",className:"h-10 sm:h-12",placeholder:Z`请输入密码`,type:"password",value:a,onChange:re=>T("password",re.target.value)}),e.language==="zh-CN"&&Se,s.jsx(oe,{type:"submit",variant:"neutral",className:"h-10 w-full sm:h-12",children:Z`立即登录`})]}),e.language!=="zh-CN"&&s.jsxs("div",{className:"mt-2 flex flex-wrap justify-between gap-3 text-sm",children:[e.language!=="zh-CN"&&s.jsxs("span",{children:[Z`没有账户?`," ",s.jsx(Wt,{className:"link link-primary link-hover",state:m.state,to:`/register${m.search}`,children:Z`点击注册`})]}),p==="2"&&!m.state?.oauth&&s.jsxs("span",{children:[Z`忘记密码?`," ",s.jsx(Wt,{className:"link link-primary link-hover",state:m.state,to:`/reset${m.search}`,children:Z`点击重置`})]})]}),X&&p!=="0"&&s.jsxs("section",{children:[s.jsx("div",{className:"divider text-xs text-base-content/50",children:Z`第三方登录`}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[l.google_oauth&&s.jsx(oe,{variant:"soft","aria-label":"Google",className:"btn-square  h-8 w-8 p-0",onClick:()=>Qo(l.google_client_id),children:s.jsx(Vm,{className:"size-5"})}),l.github_oauth&&s.jsx(oe,{variant:"soft","aria-label":"GitHub",className:"btn-square  h-8 w-8 p-0",onClick:()=>ws(l.github_client_id),children:s.jsx("span",{className:"icon-[mdi--github] size-5"})}),l.oidc_enabled&&s.jsx(oe,{variant:"soft","aria-label":"OIDC",className:"btn-square  h-8 w-8 p-0",onClick:()=>ys(l.oidc_authorization_endpoint,l.oidc_client_id),children:s.jsx(Jo,{})}),l.linuxdo_oauth&&s.jsx(oe,{variant:"soft","aria-label":"Linux Do",className:"btn-square  h-8 w-8 p-0",onClick:()=>ks(l.linuxdo_client_id),children:s.jsx(Xo,{})}),!d&&e.language!=="zh-CN"&&!!l.wechat_login&&s.jsx(oe,{variant:"soft","aria-label":Z`微信`,className:"btn-square h-8 w-8 p-0",onClick:te,children:s.jsx("span",{className:"icon-[ant-design--wechat-filled] size-5 text-green-500"})})]}),l.telegram_oauth&&s.jsx("div",{className:"mt-3 flex justify-center",children:s.jsx(tl,{dataOnauth:Pe,botName:l.telegram_bot_name})})]}),I&&s.jsx("div",{className:"mt-5 flex justify-center overflow-x-auto",children:s.jsx(ar,{sitekey:C,onVerify:re=>B(re)})}),e.language!=="zh-CN"&&s.jsx(oe,{variant:"ghost",size:"sm",className:"mt-4 w-full whitespace-normal",onClick:()=>{window.location.href=`https://www.trustoken.cn/api/oauth/logout?${new URLSearchParams({next:`https://www.trustoken.cn/api/oauth/authorize/${window.location.search}${window.location.hash}`})}`},children:"🇨🇳 切换到中国站 / Switch to China site"})]})})]})})]}),s.jsx(Hn,{open:k,onCancel:()=>{j(!1),A("login")},onAgree:me}),s.jsx(Ne,{open:S,onClose:()=>F(!1),className:"max-w-md p-3",children:w?Re:s.jsx("iframe",{className:"mx-auto h-[220px] w-[220px] max-w-full border-none",scrolling:"no",title:Z`微信登录`,sandbox:"allow-top-navigation allow-same-origin allow-scripts",src:`/api/oauth/wechat?${Ae}`},P)}),vt]})},nl=()=>s.jsx("div",{className:"alert alert-error",role:"alert",children:s.jsxs("div",{children:[s.jsx("h2",{className:"font-bold",children:"页面不存在"}),s.jsx("p",{children:"请检查你的浏览器地址是否正确"})]})});function rl({title:e,step:t=1,children:n}){return s.jsx("main",{className:"relative h-full min-h-full w-full items-start justify-center px-4 py-10 sm:items-center sm:px-6 sm:py-14",style:{display:"flex",height:"100%",minHeight:"100%"},children:s.jsxs(lr,{className:"relative z-10 w-full max-w-[440px] overflow-hidden px-5 py-7 sm:px-8 sm:py-9",children:[s.jsxs("header",{className:"mb-8 text-center",children:[s.jsx("img",{src:"/logo.webp",alt:"",className:"mx-auto mb-4 h-11 w-11 object-contain"}),s.jsx("h1",{className:"text-[28px] font-extrabold tracking-[-0.025em] text-[var(--ui-ink)]",children:e}),s.jsx("div",{className:"mx-auto mt-5 flex w-28 items-center",role:"img","aria-label":e,children:[1,2,3].map(r=>s.jsxs(ie.Fragment,{children:[r>1&&s.jsx("span",{className:`h-px flex-1 ${r<=t?"bg-[var(--ui-primary)]":"bg-[var(--ui-border)]"}`}),s.jsx("span",{className:`h-2.5 w-2.5 rounded-full border-2 ${r<t?"border-[var(--ui-primary)] bg-[var(--ui-primary)]":r===t?"border-[var(--ui-token-gold)] bg-[var(--ui-token-gold)]":"border-[var(--ui-border-strong)] bg-[var(--ui-surface)]"}`})]},r))})]}),n]})})}const sl={width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};function al(){return s.jsxs("svg",{...sl,children:[s.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),s.jsx("path",{d:"m4 7 8 6 8-6"})]})}function qm(){return s.jsxs("svg",{...sl,children:[s.jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),s.jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"}),s.jsx("path",{d:"M12 14v2"})]})}const Zm=()=>{const e=sr(),t=f.useId(),[n,r]=f.useState({email:""}),{email:a}=n,[i,o]=f.useState(!1),[c,l]=f.useState(!1),[u,m]=f.useState(""),[d,h]=f.useState(""),[p,x]=f.useState(!1),[b,y]=f.useState(60),[k,j]=f.useState("");f.useEffect(()=>{let S=null;return p&&b>0?S=setInterval(()=>{y(b-1)},1e3):b===0&&(x(!1),y(60)),()=>clearInterval(S)},[p,b]);function v(S){r(F=>({...F,email:S.target.value})),k&&j("")}async function A(){if(!a.trim()){j(e`字段不可为空`);return}if(c&&d===""){rn(e`请稍后几秒重试,Turnstile 正在检查用户环境!`);return}try{o(!0);const S=await Y.get(`/api/reset_password?email=${a}&turnstile=${d}`),{success:F=!1,message:O=""}=H.get(S,"data",{});F?(fe(e`重置邮件发送成功,请检查邮箱!`),r(N=>({...N,email:""})),x(!0)):O&&W(O)}finally{o(!1)}}return s.jsx(rl,{title:e`密码重置`,step:1,children:s.jsxs("div",{className:"space-y-5",children:[s.jsx(bt,{id:t,label:e`邮箱地址`,required:!0,error:k,children:s.jsx(ke,{id:t,type:"email",name:"email",value:a,onChange:v,placeholder:e`邮箱地址`,autoComplete:"email",leading:s.jsx(al,{}),invalid:!!k})}),c&&s.jsx("div",{className:"flex justify-center",children:s.jsx(ar,{sitekey:u,onVerify:S=>h(S)})}),s.jsx(At,{className:"w-full",children:s.jsx(oe,{className:"w-full",size:"lg",onClick:A,loading:i,disabled:p||!a,children:p?e`重试 (${b})`:e`提交`})})]})})},Km=()=>{const e=sr(),t=f.useId(),n=f.useId(),[r,a]=f.useState({email:"",token:""}),{email:i,token:o}=r,[c,l]=f.useState(!1),[u,m]=f.useState(!1),[d,h]=f.useState(30),[p,x]=f.useState(""),[b]=Nn();f.useEffect(()=>{const k=b.get("token")||"",j=b.get("email")||"";a({token:k,email:j})},[]),f.useEffect(()=>{let k=null;return u&&d>0?k=setInterval(()=>{h(d-1)},1e3):d===0&&(m(!1),h(30)),()=>clearInterval(k)},[u,d]);async function y(k){if(k.preventDefault(),m(!0),!i)return;l(!0);const j=await Y.post("/api/user/reset",{email:i,token:o}),{success:v=!1,message:A=""}=H.get(j,"data",{});if(v){let S=j.data.data;x(S),await cs(S),Zs(e`新密码已复制到剪贴板:${S}`)}else A&&W(A);l(!1)}return s.jsx(rl,{title:e`密码重置确认`,step:p?3:2,children:s.jsxs("form",{className:"space-y-5",onSubmit:y,children:[s.jsx(bt,{id:t,label:e`邮箱地址`,children:s.jsx(ke,{id:t,type:"email",name:"email",value:i,readOnly:!0,leading:s.jsx(al,{})})}),p&&s.jsx(bt,{id:n,label:e`新密码`,children:s.jsx(ke,{id:n,name:"newPassword",value:p,readOnly:!0,leading:s.jsx(qm,{}),onClick:k=>{k.target.select(),navigator.clipboard.writeText(p),Zs(e`密码已复制到剪贴板:${p}`)}})}),s.jsx(oe,{type:"submit",className:"w-full",size:"lg",loading:c,disabled:u,children:u?e`密码重置完成`:e`提交`})]})})};function Ym(e,t){if(t<=7)return Array.from({length:t},(a,i)=>i+1);const n=new Set([1,t]);for(let a=Math.max(2,e-1);a<=Math.min(t-1,e+1);a+=1)n.add(a);const r=[...n].sort((a,i)=>a-i);return r.flatMap((a,i)=>{const o=r[i-1];return o&&a-o>1?["ellipsis",a]:[a]})}function Cs({current:e,pageSize:t,total:n,onChange:r,showPageNumbers:a=!1,className:i="mt-4"}){const o=Math.max(1,Math.ceil(Number(n||0)/t));return o<=1?null:s.jsx("nav",{className:`flex justify-end ${i}`,"aria-label":"分页",children:s.jsxs("div",{className:"join items-center gap-1",children:[s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm join-item px-2 font-medium",disabled:e<=1,onClick:()=>r(e-1),"aria-label":"上一页",children:s.jsx("svg",{viewBox:"0 0 16 16",className:"h-4 w-4 fill-none stroke-current","aria-hidden":"true",children:s.jsx("path",{d:"m10 3-5 5 5 5",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a?Ym(e,o).map((c,l)=>c==="ellipsis"?s.jsx("span",{className:"btn btn-ghost btn-sm join-item pointer-events-none px-2 font-medium",children:"…"},`ellipsis-${l}`):s.jsx("button",{type:"button",className:`btn btn-sm join-item min-w-8 px-2 font-medium ${c===e?"btn-primary btn-soft":"btn-ghost"}`,"aria-current":c===e?"page":void 0,onClick:()=>r(c),children:c},c)):s.jsxs("button",{type:"button",className:"btn btn-sm join-item font-medium",disabled:!0,children:[e," / ",o
544]}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm join-item px-2 font-medium",disabled:e>=o,onClick:()=>r(e+1),"aria-label":"下一页",children:s.jsx("svg",{viewBox:"0 0 16 16",className:"h-4 w-4 fill-none stroke-current","aria-hidden":"true",children:s.jsx("path",{d:"m6 3 5 5-5 5",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})}const Gm=e=>{const[t,n]=f.useState(!1),[r,a]=f.useState(t),i={name:"",remain_quota:t?0:5e5,expired_time:-1,unlimited_quota:!1,model_limits_enabled:!1,model_limits:[],allow_ips:"",group:""},[o,c]=f.useState(i),{name:l,remain_quota:u,expired_time:m,unlimited_quota:d,model_limits_enabled:h,model_limits:p,allow_ips:x,group:b}=o,{t:y}=ye(),k=(I,C)=>{c(_=>({..._,[I]:C}))},j=()=>{e.handleClose()},v=async()=>{a(!0);let I=await Y.get(`/api/token/${e.editingToken.id}`);const{success:C,message:_,data:B}=I.data;C?(B.expired_time!==-1&&(B.expired_time=_t(B.expired_time)),B.model_limits!==""?B.model_limits=B.model_limits.split(","):B.model_limits=[],c(B)):W(_),a(!1)};f.useEffect(()=>{n(e.editingToken.id!==void 0)},[e.editingToken.id]),f.useEffect(()=>{t?v().then(()=>{}):c(i)},[t]);const[A,S]=f.useState("1"),F=I=>{/^\d*$/.test(I)&&S(I)},O=()=>{const I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let C="";for(let _=0;_<6;_++)C+=I.charAt(Math.floor(Math.random()*I.length));return C},N=async()=>{if(o.name===""){W(y("令牌名称不能为空!"));return}const I=Number(A);if(!t&&(!Number.isInteger(I)||I<=0)){W(y("新建数量必须为正整数!"));return}if(a(!0),t){let C={...o};if(C.remain_quota=parseInt(C.remain_quota),C.expired_time!==-1){let R=Date.parse(C.expired_time);if(isNaN(R)){W(y("过期时间格式错误!")),a(!1);return}C.expired_time=Math.ceil(R/1e3)}C.model_limits=C.model_limits.join(",");let _=await Y.put("/api/token/",{...C,id:parseInt(e.editingToken.id)});const{success:B,message:U}=_.data;B?(fe(y("令牌更新成功!")),e.refresh(),e.handleClose()):W(y(U))}else{let C=0;for(let _=0;_<I;_++){let B={...o};if(_!==0&&(B.name=`${o.name}-${O()}`),B.remain_quota=parseInt(B.remain_quota),B.expired_time!==-1){let K=Date.parse(B.expired_time);if(isNaN(K)){W(y("过期时间格式错误!")),a(!1);break}B.expired_time=Math.ceil(K/1e3)}B.model_limits=B.model_limits.join(",");let U=await Y.post("/api/token/",B);const{success:R,message:M}=U.data;if(R)C++;else{W(y(M));break}}C>0&&(fe(y("令牌创建成功,请在列表页面点击复制获取令牌!")),e.refresh(),e.handleClose())}a(!1),c(i),S("1")};return s.jsx(Ne,{open:e.visiable,onClose:j,placement:t?"end":"start",title:y(t?"更新令牌信息":"创建新的令牌"),className:`h-dvh max-h-dvh rounded-none ${qn()?"w-full max-w-none":"w-[600px] max-w-[600px]"}`,footer:s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:"lg",onClick:N,loading:r,children:y("提交")}),s.jsx(oe,{size:"lg",variant:"secondary",onClick:j,children:y("取消")})]}),children:s.jsxs("div",{className:"relative space-y-5",children:[r&&s.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-base-100/70",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}),s.jsxs("label",{className:"form-control block space-y-2",children:[s.jsx("span",{className:"label-text text-sm font-medium",children:y("名称")}),s.jsx(ke,{className:"border-base-300 bg-base-200 focus-within:border-primary",name:"name",placeholder:y("请输入名称"),onChange:I=>k("name",I.target.value),value:l,autoComplete:"new-password",required:!t})]}),!t&&s.jsx("div",{className:"border-t border-base-300 pt-5",children:s.jsxs("label",{className:"form-control block space-y-2",children:[s.jsx("span",{className:"label-text text-sm font-medium",children:y("新建数量")}),s.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"input w-full border-base-300 bg-base-200 leading-[normal] focus:border-primary",placeholder:y("请输入创建令牌的数量"),onChange:I=>F(I.target.value),value:A,autoComplete:"off",disabled:d})]})}),s.jsx("div",{className:"border-t border-base-300 pt-5",children:s.jsxs("label",{className:"form-control block space-y-2",children:[s.jsx("span",{className:"label-text text-sm font-medium",children:y("IP白名单(请勿过度信任此功能)")}),s.jsx("textarea",{className:"textarea min-h-28 w-full font-mono leading-[normal]",name:"allow_ips",placeholder:y("允许的IP,一行一个,不填写则不限制"),onChange:I=>{k("allow_ips",I.target.value)},value:o.allow_ips})]})})]})})},Qm={1:"badge-success",2:"badge-error",3:"badge-warning",4:"badge-neutral"};function Za(e){return _t(e)}const Jm=()=>{const{t:e}=ye(),[t,n]=f.useState(ut),[r,a]=f.useState(!1),[i,o]=f.useState([]),[c,l]=f.useState([]),[u,m]=f.useState(t),[d,h]=f.useState(!0),[p,x]=f.useState(1),[b,y]=f.useState(""),[k,j]=f.useState(""),[v,A]=f.useState(null),[S,F]=f.useState(""),[O,N]=f.useState({id:void 0}),I=(g,P=!1)=>{const z=e(g===1?P?"已启用:限制模型":"已启用":g===2?"已禁用":g===3?"已过期":g===4?"已耗尽":"未知状态");return s.jsx("span",{className:`badge badge-soft text-sm ${Qm[g]||""}`,children:z})},C=()=>{a(!1),setTimeout(()=>N({id:void 0}),500)},_=async g=>{h(!0);let P=`/api/token/page?p=${g}&size=${t}`;(b!==""||k!=="")&&(P+=`&keyword=${b}&token=${k}`);try{const z=await Y.get(P),{success:w,message:D,data:T}=z.data;w?(o(T.items),m(T.total),l([])):W(D)}finally{h(!1)}},B=async()=>_(p),U=async g=>{await cs(g)?fe(e("已复制到剪贴板!")):F(g)},R=(g,P)=>{let z=localStorage.getItem("status"),w="";z&&(z=JSON.parse(z),w=z.server_address),w===""&&(w=window.location.origin),g=g.replaceAll("{address}",encodeURIComponent(w)),g=g.replaceAll("{key}",`sk-${P.key}`),window.open(g,"_blank")},M=g=>{const P=[];try{const z=JSON.parse(localStorage.getItem("chats"));Array.isArray(z)&&z.forEach(w=>
544{Object.entries(w).forEach(([D,T])=>{P.push({name:D,onClick:()=>R(T,g)})})})}catch{W(e("聊天链接配置错误,请联系管理员"))}return P},K=async(g,P)=>{h(!0);const z={id:g};try{let w;P==="delete"?w=await Y.delete(`/api/token/${g}/`):(z.status=P==="enable"?1:2,w=await Y.put("/api/token/?status_only=true",z));const{success:D,message:T}=w.data;D?(fe("操作成功完成!"),A(null),await B()):W(T)}finally{h(!1)}};f.useEffect(()=>{_(1).catch(W)},[t]);const ee=g=>{x(g),_(g)},le=(g,P)=>{l(z=>P?[...z,g]:z.filter(w=>w.id!==g.id))},se=i.length>0&&i.every(g=>c.some(P=>P.id===g.id));return s.jsxs(s.Fragment,{children:[s.jsx(Gm,{refresh:B,editingToken:O,visiable:r,handleClose:C}),s.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-3",onSubmit:g=>{g.preventDefault(),x(1),_(1)},children:[s.jsxs("label",{className:"form-control block max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-semibold",children:e("搜索关键字")}),s.jsx(ke,{className:"input-sm border-base-300 bg-base-200 text-sm focus-within:border-primary",value:b,placeholder:e("令牌名称"),onChange:g=>y(g.target.value.trim())})]}),s.jsxs("label",{className:"form-control block max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-semibold",children:e("密钥")}),s.jsx(ke,{className:"input-sm border-base-300 bg-base-200 text-sm focus-within:border-primary",value:k,placeholder:e("密钥"),onChange:g=>j(g.target.value.trim())})]}),s.jsx(oe,{type:"submit",size:"sm",className:"text-sm font-medium hover:text-white",loading:d,children:e("查询")})]}),s.jsx("div",{className:"my-4 h-px bg-base-300"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("button",{type:"button",className:"btn btn-primary btn-soft btn-sm text-sm font-medium hover:text-white",onClick:()=>{N({id:void 0}),a(!0)},children:e("添加令牌")}),s.jsx("button",{type:"button",className:"btn btn-warning btn-soft btn-sm text-sm font-medium hover:text-white",onClick:async()=>{if(c.length===0){W(e("请至少选择一个令牌!"));return}const g=c.map(P=>`${P.name}    sk-${P.key}`).join(`
545`);await U(g)},children:e("复制所选令牌到剪贴板")}),s.jsx("button",{type:"button",className:"btn btn-primary btn-soft btn-sm text-sm font-medium hover:text-white",onClick:()=>U("https://sapi.trustoken.ai/v1"),children:e("复制 base_url 地址")}),s.jsx(Wt,{className:"btn btn-primary btn-soft btn-sm text-sm font-medium hover:text-white",to:"/topup",children:e("查询剩余额度")})]}),s.jsxs("div",{className:"mt-5 overflow-x-auto",children:[s.jsxs("table",{className:"table w-max min-w-full text-sm [&_td]:whitespace-nowrap [&_th]:whitespace-nowrap",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:s.jsx("input",{type:"checkbox",className:"checkbox checkbox-sm",checked:se,onChange:g=>l(g.target.checked?i:[]),"aria-label":e("全部")})}),s.jsx("th",{children:e("名称")}),s.jsx("th",{children:e("状态")}),s.jsx("th",{children:e("已用额度")}),s.jsx("th",{children:e("创建时间")}),s.jsx("th",{children:e("过期时间")}),s.jsx("th",{children:s.jsx("span",{className:"sr-only",children:e("操作")})})]})}),s.jsx("tbody",{children:!d&&i.map(g=>{const P=M(g);return s.jsxs("tr",{className:g.status===1?"":"bg-base-200",children:[s.jsx("td",{children:s.jsx("input",{type:"checkbox",className:"checkbox checkbox-sm",checked:c.some(z=>z.id===g.id),onChange:z=>le(g,z.target.checked),"aria-label":g.name})}),s.jsx("td",{children:g.name}),s.jsx("td",{children:s.jsx("div",{className:"tooltip tooltip-top","data-tip":"链路保护运行中",children:I(g.status,g.model_limits_enabled)})}),s.jsx("td",{children:ft(parseInt(g.used_quota))}),s.jsx("td",{children:Za(g.created_time)}),s.jsx("td",{children:g.expired_time===-1?e("永不过期"):Za(g.expired_time)}),s.jsx("td",{children:s.jsxs("div",{className:"flex flex-nowrap gap-1",children:[s.jsx("div",{className:"tooltip tooltip-top [--tt-bg:var(--color-base-100)] before:max-w-none before:whitespace-nowrap before:rounded-box before:border before:border-base-300 before:px-4 before:py-3 before:text-left before:text-base-content before:shadow-lg after:hidden","data-tip":`sk-${g.key}`,children:s.jsx("button",{type:"button",className:"btn btn-soft btn-sm whitespace-nowrap bg-base-100! text-sm font-medium hover:bg-neutral! hover:text-white!",children:e("查看")})}),s.jsx("button",{type:"button",className:"btn btn-primary btn-soft btn-sm whitespace-nowrap text-sm font-medium hover:text-white",onClick:()=>U(`sk-${g.key}`),children:e("复制")}),P.length>0&&s.jsxs("details",{className:"dropdown dropdown-end",children:[s.jsx("summary",{className:"btn btn-accent btn-soft btn-sm list-none whitespace-nowrap px-2 font-medium hover:text-white",children:s.jsx("svg",{viewBox:"0 0 16 16",className:"h-4 w-4 fill-current","aria-hidden":"true",children:s.jsx("path",{d:"m3.5 6 4.5 4.5L12.5 6z"})})}),s.jsx("ul",{className:"menu dropdown-content z-20 mt-1 w-max min-w-44 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg",children:P.map(z=>s.jsx("li",{children:s.jsx("button",{type:"button",className:"whitespace-nowrap font-medium hover:bg-primary hover:text-white",onClick:z.onClick,children:z.name})},z.name))})]}
545),s.jsx("button",{type:"button",className:"btn btn-error btn-soft btn-sm whitespace-nowrap text-sm font-medium hover:text-white",onClick:()=>A(g),children:e("删除")}),s.jsx("button",{type:"button",className:`btn btn-soft btn-sm whitespace-nowrap text-sm font-medium hover:text-white ${g.status===1?"btn-warning":"btn-primary"}`,onClick:()=>K(g.id,g.status===1?"disable":"enable"),children:g.status===1?e("禁用"):e("启用")}),s.jsx("button",{type:"button",className:"btn btn-soft btn-sm whitespace-nowrap bg-base-100! text-sm font-medium hover:bg-neutral! hover:text-white!",onClick:()=>{N(g),a(!0)},children:e("编辑")})]})})]},g.id)})})]}),d&&s.jsx("div",{className:"flex justify-center py-10",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}),!d&&i.length===0&&s.jsx("div",{className:"py-10 text-center text-base-content/60",children:e("暂无数据")})]}),s.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[s.jsx("span",{className:"text-sm text-base-content/60",children:e("第 {{start}} - {{end}} 条,共 {{total}} 条",{start:u===0?0:(p-1)*t+1,end:Math.min(p*t,u),total:u})}),s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[s.jsx(Cs,{current:p,pageSize:t,total:u,onChange:ee,showPageNumbers:!0,className:"mt-0"}),s.jsx("select",{className:"select select-sm w-max whitespace-nowrap border-base-300 bg-base-200 text-sm focus:border-primary",value:t,onChange:g=>{n(Number(g.target.value)),x(1)},"aria-label":e("每页条数"),children:[10,20,50,100].map(g=>s.jsxs("option",{className:"whitespace-nowrap",value:g,children:[e("每页条数"),": ",g]},g))})]})]}),s.jsx(Ne,{open:!!v,onClose:()=>A(null),title:e("确定是否要删除此令牌?"),footer:s.jsxs(s.Fragment,{children:[s.jsx(oe,{variant:"secondary",onClick:()=>A(null),children:e("取消")}),s.jsx("button",{type:"button",className:"btn btn-error",disabled:d,onClick:()=>v&&K(v.id,"delete"),children:e("删除")})]}),children:s.jsx("p",{className:"text-sm text-base-content/70",children:e("此修改将不可逆")})}),s.jsx(Ne,{open:!!S,onClose:()=>F(""),title:e("无法复制到剪贴板,请手动复制"),children:s.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap break-all rounded-box bg-base-200 p-3 text-sm",children:S})})]})},Xm=()=>{const{t:e}=ye();return s.jsxs("div",{children:[s.jsxs("div",{className:"alert alert-warning",role:"alert",children:[s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-5 w-5 shrink-0 stroke-current",fill:"none","aria-hidden":"true",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v4m0 4h.01M10.3 3.84 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.7 3.84a2 2 0 0 0-3.4 0Z"})}),s.jsx("span",{children:e("令牌无法精确控制使用额度,只允许自用,请勿直接将令牌分发给他人。")})]}),s.jsx("div",{children:s.jsx(Jm,{})})]})};function il({value:e,unitClassName:t="text-sm"}){const n=String(e||""),r=" 灵石";return n.endsWith(r)?s.jsxs(s.Fragment,{children:[n.slice(0,-r.length),s.jsx("span",{className:`ml-1 ${t}`,children:"灵石"})]}):n}function ep({className:e,onRedeemSuccess:t}){const{t:n}=ye(),[r,a]=f.useState(""),[i,o]=f.useState(""),{run:c,loading:l}=ve(async()=>{if(r===""){rn(n("请输入兑换码!"));return}const u=await Y.post("/api/user/topup",{key:r}),{success:m,message:d,data:h}=u.data;m?(o(ft(h)),a(""),await t?.()):W(d)},{manual:!0,onError:u=>{W(n("请求失败"))}});return s.jsxs("div",{className:e,children:[s.jsxs("div",{className:"rounded-box bg-base-200 p-4",children:[s.jsx("label",{htmlFor:"redemption-code",className:"mb-2 block text-sm text-base-content/60",children:n("兑换码")}
545),s.jsx("input",{id:"redemption-code",autoFocus:!0,type:"text",className:"input input-ghost w-full bg-transparent text-xl font-medium leading-[normal]",placeholder:n("请输入兑换码"),value:r,onChange:u=>a(u.target.value)})]}),s.jsx("div",{className:"mt-6 flex justify-center",children:s.jsx(oe,{onClick:c,loading:l,size:"lg",className:"px-12",children:n(l?"兑换中...":"兑换")})}),s.jsx(Ne,{title:n("兑换成功!"),open:!!i,onClose:()=>o(""),footer:s.jsx(oe,{onClick:()=>o(""),children:n("确定")}),children:s.jsxs("p",{children:[n("成功兑换额度:"),i]})})]})}var tp=Object.defineProperty,Kn=Object.getOwnPropertySymbols,ol=Object.prototype.hasOwnProperty,ll=Object.prototype.propertyIsEnumerable,Ka=(e,t,n)=>t in e?tp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qr=(e,t)=>{for(var n in t||(t={}))ol.call(t,n)&&Ka(e,n,t[n]);if(Kn)for(var n of Kn(t))ll.call(t,n)&&Ka(e,n,t[n]);return e},Zr=(e,t)=>{var n={};for(var r in e)ol.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kn)for(var r of Kn(e))t.indexOf(r)<0&&ll.call(e,r)&&(n[r]=e[r]);return n};var qt;(e=>{const t=class xe{constructor(l,u,m,d){if(this.version=l,this.errorCorrectionLevel=u,this.modules=[],this.isFunction=[],l<xe.MIN_VERSION||l>xe.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let h=[];for(let x=0;x<this.size;x++)h.push(!1);for(let x=0;x<this.size;x++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(m);if(this.drawCodewords(p),d==-1){let x=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);const y=this.getPenaltyScore();y<x&&(d=b,x=y),this.applyMask(b)}}a(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(l,u){const m=e.QrSegment.makeSegments(l);return xe.encodeSegments(m,u)}static encodeBinary(l,u){const m=e.QrSegment.makeBytes(l);return xe.encodeSegments([m],u)}static encodeSegments(l,u,m=1,d=40,h=-1,p=!0){if(!(xe.MIN_VERSION<=m&&m<=d&&d<=xe.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let x,b;for(x=m;;x++){const v=xe.getNumDataCodewords(x,u)*8,A=o.getTotalBits(l,x);if(A<=v){b=A;break}if(x>=d)throw new RangeError("Data too long")}for(const v of[xe.Ecc.MEDIUM,xe.Ecc.QUARTILE,xe.Ecc.HIGH])p&&b<=xe.getNumDataCodewords(x,v)*8&&(u=v);let y=[];for(const v of l){n(v.mode.modeBits,4,y),n(v.numChars,v.mode.numCharCountBits(x),y);for(const A of v.getData())y.push(A)}a(y.length==b);const k=xe.getNumDataCodewords(x,u)*8;a(y.length<=k),n(0,Math.min(4,k-y.length),y),n(0,(8-y.length%8)%8,y),a(y.length%8==0);for(let v=236;y.length<k;v^=253)n(v,8,y);let j=[];for(;j.length*8<y.length;)j.push(0);return y.forEach((v,A)=>j[A>>>3]|=v<<7-(A&7)),new xe(x,u,j,h)}getModule(l,u){return 0<=l&&l<this.size&&0<=u&&u<this.size&&this.modules[u][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let m=0;m<this.size;m++)this.setFunctionModule(6,m,m%2==0),this.setFunctionModule(m,6,m%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),u=l.length;for(let m=0;m<u;m++)for(let d=0;d<u;d++)m==0&&d==0||m==0&&d==u-1||m==u-1&&d==0||this.drawAlignmentPattern(l[m],l[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const u=this.errorCorrectionLevel.formatBits<<3|l;let m=u;for(let h=0;h<10;h++)m=m<<1^(m>>>9)*1335;const d=(u<<10|m)^21522;a(d>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(d,h));this.setFunctionModule(8,7,r(d,6)),this.setFunctionModule(8,8,r(d,7)),this.setFunctionModule(7,8,r(d,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(d,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(d,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(d,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let m=0;m<12;m++)l=l<<1^(l>>>11)*7973;const u=this.version<<12|l;a(u>>>18==0);for(let m=0;m<18;m++){const d=r(u,m),h=this.size-11+m%3,p=Math.floor(m/3);this.setFunctionModule(h,p,d),this.setFunctionModule(p,h,d)}}drawFinderPattern(l,u){for(let m=-4;m<=4;m++)for(let d=-4;d<=4;d++){const h=Math.max(Math.abs(d),Math.abs(m)),p=l+d,x=u+m;0<=p&&p<this.size&&0<=x&&x<this.size&&this.setFunctionModule(p,x,h!=2&&h!=4)}}drawAlignmentPattern(l,u){for(let m=-2;m<=2;m++)for(let d=-2;d<=2;d++)this.setFunctionModule(l+d,u+m,Math.max(Math.abs(d),Math.abs(m))!=1)}setFunctionModule(l,u,m){this.modules[u][l]=m,this.isFunction[u][l]=!0}addEccAndInterleave(l){const u=this.version,m=this.errorCorrectionLevel;if(l.length!=xe.getNumDataCodewords(u,m))throw new RangeError("Invalid argument");const d=xe.NUM_ERROR_CORRECTION_BLOCKS[m.ordinal][u],h=xe.ECC_CODEWORDS_PER_BLOCK[m.ordinal][u],p=Math.floor(xe.getNumRawDataModules(u)/8),x=d-p%d,b=Math.floor(p/d);let y=[];const k=xe.reedSolomonComputeDivisor(h);for(let v=0,A=0;v<d;v++){let S=l.slice(A,A+b-h+(v<x?0:1));A+=S.length;const F=xe.reedSolomonComputeRemainder(S,k);
545v<x&&S.push(0),y.push(S.concat(F))}let j=[];for(let v=0;v<y[0].length;v++)y.forEach((A,S)=>{(v!=b-h||S>=x)&&j.push(A[v])});return a(j.length==p),j}drawCodewords(l){if(l.length!=Math.floor(xe.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let u=0;for(let m=this.size-1;m>=1;m-=2){m==6&&(m=5);for(let d=0;d<this.size;d++)for(let h=0;h<2;h++){const p=m-h,b=(m+1&2)==0?this.size-1-d:d;!this.isFunction[b][p]&&u<l.length*8&&(this.modules[b][p]=r(l[u>>>3],7-(u&7)),u++)}}a(u==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let u=0;u<this.size;u++)for(let m=0;m<this.size;m++){let d;switch(l){case 0:d=(m+u)%2==0;break;case 1:d=u%2==0;break;case 2:d=m%3==0;break;case 3:d=(m+u)%3==0;break;case 4:d=(Math.floor(m/3)+Math.floor(u/2))%2==0;break;case 5:d=m*u%2+m*u%3==0;break;case 6:d=(m*u%2+m*u%3)%2==0;break;case 7:d=((m+u)%2+m*u%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[u][m]&&d&&(this.modules[u][m]=!this.modules[u][m])}}getPenaltyScore(){let l=0;for(let h=0;h<this.size;h++){let p=!1,x=0,b=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[h][y]==p?(x++,x==5?l+=xe.PENALTY_N1:x>5&&l++):(this.finderPenaltyAddHistory(x,b),p||(l+=this.finderPenaltyCountPatterns(b)*xe.PENALTY_N3),p=this.modules[h][y],x=1);l+=this.finderPenaltyTerminateAndCount(p,x,b)*xe.PENALTY_N3}for(let h=0;h<this.size;h++){let p=!1,x=0,b=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[y][h]==p?(x++,x==5?l+=xe.PENALTY_N1:x>5&&l++):(this.finderPenaltyAddHistory(x,b),p||(l+=this.finderPenaltyCountPatterns(b)*xe.PENALTY_N3),p=this.modules[y][h],x=1);l+=this.finderPenaltyTerminateAndCount(p,x,b)*xe.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let p=0;p<this.size-1;p++){const x=this.modules[h][p];x==this.modules[h][p+1]&&x==this.modules[h+1][p]&&x==this.modules[h+1][p+1]&&(l+=xe.PENALTY_N2)}let u=0;for(const h of this.modules)u=h.reduce((p,x)=>p+(x?1:0),u);const m=this.size*this.size,d=Math.ceil(Math.abs(u*20-m*10)/m)-1;return a(0<=d&&d<=9),l+=d*xe.PENALTY_N4,a(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,u=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let m=[6];for(let d=this.size-7;m.length<l;d-=u)m.splice(1,0,d);return m}}static getNumRawDataModules(l){if(l<xe.MIN_VERSION||l>xe.MAX_VERSION)throw new RangeError("Version number out of range");let u=(16*l+128)*l+64;if(l>=2){const m=Math.floor(l/7)+2;u-=(25*m-10)*m-55,l>=7&&(u-=36)}return a(208<=u&&u<=29648),u}static getNumDataCodewords(l,u){return Math.floor(xe.getNumRawDataModules(l)/8)-xe.ECC_CODEWORDS_PER_BLOCK[u.ordinal][l]*xe.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let u=[];for(let d=0;d<l-1;d++)u.push(0);u.push(1);let m=1;for(let d=0;d<l;d++){for(let h=0;h<u.length;h++)u[h]=xe.reedSolomonMultiply(u[h],m),h+1<u.length&&(u[h]^=u[h+1]);m=xe.reedSolomonMultiply(m,2)}return u}static reedSolomonComputeRemainder(l,u){let m=u.map(d=>0);for(const d of l){const h=d^m.shift();m.push(0),u.forEach((p,x)=>m[x]^=xe.reedSolomonMultiply(p,h))}return m}static reedSolomonMultiply(l,u){if(l>>>8||u>>>8)throw new RangeError("Byte out of range");let m=0;for(let d=7;d>=0;d--)m=m<<1^(m>>>7)*285,m^=(u>>>d&1)*l;return a(m>>>8==0),m}finderPenaltyCountPatterns(l){const u=l[1];a(u<=this.size*3);const m=u>0&&l[2]==u&&l[3]==u*3&&l[4]==u&&l[5]==u;return(m&&l[0]>=u*4&&l[6]>=u?1:0)+(m&&l[6]>=u*4&&l[0]>=u?1:0)}finderPenaltyTerminateAndCount(l,u,m){return l&&(this.finderPenaltyAddHistory(u,m),u=0),u+=this.size,this.finderPenaltyAddHistory(u,m),this.finderPenaltyCountPatterns(m)}finderPenaltyAddHistory(l,u){u[0]==0&&(l+=this.size),u.pop(),u.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(c,l,u){if(l<0||l>31||c>>>l)throw new RangeError("Value out of range");for(let m=l-1;m>=0;m--)u.push(c>>>m&1)}function r(c,l){return(c>>>l&1)!=0}function a(c){if(!c)throw new Error("Assertion error")}const i=class ze{constructor(l,u,m){if(this.mode=l,this.numChars=u,this.bitData=m,u<0)throw new RangeError("Invalid argument");this.bitData=m.slice()}static makeBytes(l){let u=[];for(const m of l)n(m,8,u);return new ze(ze.Mode.BYTE,l.length,u)}static makeNumeric(l){if(!ze.isNumeric(l))throw new RangeError("String contains 
545non-numeric characters");let u=[];for(let m=0;m<l.length;){const d=Math.min(l.length-m,3);n(parseInt(l.substring(m,m+d),10),d*3+1,u),m+=d}return new ze(ze.Mode.NUMERIC,l.length,u)}static makeAlphanumeric(l){if(!ze.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let u=[],m;for(m=0;m+2<=l.length;m+=2){let d=ze.ALPHANUMERIC_CHARSET.indexOf(l.charAt(m))*45;d+=ze.ALPHANUMERIC_CHARSET.indexOf(l.charAt(m+1)),n(d,11,u)}return m<l.length&&n(ze.ALPHANUMERIC_CHARSET.indexOf(l.charAt(m)),6,u),new ze(ze.Mode.ALPHANUMERIC,l.length,u)}static makeSegments(l){return l==""?[]:ze.isNumeric(l)?[ze.makeNumeric(l)]:ze.isAlphanumeric(l)?[ze.makeAlphanumeric(l)]:[ze.makeBytes(ze.toUtf8ByteArray(l))]}static makeEci(l){let u=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,u);else if(l<16384)n(2,2,u),n(l,14,u);else if(l<1e6)n(6,3,u),n(l,21,u);else throw new RangeError("ECI assignment value out of range");return new ze(ze.Mode.ECI,0,u)}static isNumeric(l){return ze.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return ze.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,u){let m=0;for(const d of l){const h=d.mode.numCharCountBits(u);if(d.numChars>=1<<h)return 1/0;m+=4+h+d.bitData.length}return m}static toUtf8ByteArray(l){l=encodeURI(l);let u=[];for(let m=0;m<l.length;m++)l.charAt(m)!="%"?u.push(l.charCodeAt(m)):(u.push(parseInt(l.substring(m+1,m+3),16)),m+=2);return u}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let o=i;e.QrSegment=i})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(a,i){this.ordinal=a,this.formatBits=i}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(a,i){this.modeBits=a,this.numBitsCharCount=i}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(qt||(qt={}));var tn=qt;var np={L:tn.QrCode.Ecc.LOW,M:tn.QrCode.Ecc.MEDIUM,Q:tn.QrCode.Ecc.QUARTILE,H:tn.QrCode.Ecc.HIGH}
545,ul=128,cl="L",dl="#FFFFFF",ml="#000000",pl=!1,hl=1,rp=4,sp=0,ap=.1;function fl(e,t=0){const n=[];return e.forEach(function(r,a){let i=null;r.forEach(function(o,c){if(!o&&i!==null){n.push(`M${i+t} ${a+t}h${c-i}v1H${i+t}z`),i=null;return}if(c===r.length-1){if(!o)return;i===null?n.push(`M${c+t},${a+t} h1v1H${c+t}z`):n.push(`M${i+t},${a+t} h${c+1-i}v1H${i+t}z`);return}o&&i===null&&(i=c)})}),n.join("")}function gl(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((a,i)=>i<t.x||i>=t.x+t.w?a:!1))}function ip(e,t,n,r){if(r==null)return null;const a=e.length+n*2,i=Math.floor(t*ap),o=a/t,c=(r.width||i)*o,l=(r.height||i)*o,u=r.x==null?e.length/2-c/2:r.x*o,m=r.y==null?e.length/2-l/2:r.y*o,d=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let x=Math.floor(u),b=Math.floor(m),y=Math.ceil(c+u-x),k=Math.ceil(l+m-b);h={x,y:b,w:y,h:k}}const p=r.crossOrigin;return{x:u,y:m,h:l,w:c,excavation:h,opacity:d,crossOrigin:p}}function op(e,t){return t!=null?Math.max(Math.floor(t),0):e?rp:sp}function xl({value:e,level:t,minVersion:n,includeMargin:r,marginSize:a,imageSettings:i,size:o,boostLevel:c}){let l=ie.useMemo(()=>{const x=(Array.isArray(e)?e:[e]).reduce((b,y)=>(b.push(...tn.QrSegment.makeSegments(y)),b),[]);return tn.QrCode.encodeSegments(x,np[t],n,void 0,void 0,c)},[e,t,n,c]);const{cells:u,margin:m,numCells:d,calculatedImageSettings:h}=ie.useMemo(()=>{let p=l.getModules();const x=op(r,a),b=p.length+x*2,y=ip(p,o,x,i);return{cells:p,margin:x,numCells:b,calculatedImageSettings:y}},[l,o,i,r,a]);return{qrcode:l,margin:m,cells:u,numCells:d,calculatedImageSettings:h}}var lp=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),up=ie.forwardRef(function(t,n){const r=t,{value:a,size:i=ul,level:o=cl,bgColor:c=dl,fgColor:l=ml,includeMargin:u=pl,minVersion:m=hl,boostLevel:d,marginSize:h,imageSettings:p}=r,b=Zr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:y}=b,k=Zr(b,["style"]),j=p?.src,v=ie.useRef(null),A=ie.useRef(null),S=ie.useCallback(R=>{v.current=R,typeof n=="function"?n(R):n&&(n.current=R)},[n]),[F,O]=ie.useState(!1),{margin:N,cells:I,numCells:C,calculatedImageSettings:_}=xl({value:a,level:o,minVersion:m,boostLevel:d,includeMargin:u,marginSize:h,imageSettings:p,size:i});ie.useEffect(()=>{if(v.current!=null){const R=v.current,M=R.getContext("2d");if(!M)return;let K=I;const ee=A.current,le=_!=null&&ee!==null&&ee.complete&&ee.naturalHeight!==0&&ee.naturalWidth!==0;le&&_.excavation!=null&&(K=gl(I,_.excavation));const se=window.devicePixelRatio||1;R.height=R.width=i*se;const g=i/C*se;M.scale(g,g),M.fillStyle=c,M.fillRect(0,0,C,C),M.fillStyle=l,lp?M.fill(new Path2D(fl(K,N))):I.forEach(function(P,z){P.forEach(function(w,D){w&&M.fillRect(D+N,z+N,1,1)})}),_&&(M.globalAlpha=_.opacity),le&&M.drawImage(ee,_.x+N,_.y+N,_.w,_.h)}}),ie.useEffect(()=>{O(!1)},[j]);const B=qr({height:i,width:i},y);let U=null;return j!=null&&(U=ie.createElement("img",{src:j,key:j,style:{display:"none"},onLoad:()=>{O(!0)},ref:A,crossOrigin:_?.crossOrigin})),ie.createElement(ie.Fragment,null,ie.createElement("canvas",qr({style:B,height:i,width:i,ref:S,role:"img"},k)),U)});up.displayName="QRCodeCanvas";var js=ie.forwardRef(function(t,n){const r=t,{value:a,size:i=ul,level:o=cl,bgColor:c=dl,fgColor:l=ml,includeMargin:u=pl,minVersion:m=hl,boostLevel:d,title:h,marginSize:p,imageSettings:x}=r,b=Zr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:y,cells:k,numCells:j,calculatedImageSettings:v}=xl({value:a,level:o,minVersion:m,boostLevel:d,includeMargin:u,marginSize:p,imageSettings:x,size:i});let A=k,S=null;x!=null&&v!=null&&(v.excavation!=null&&(A=gl(k,v.excavation)),S=ie.createElement("image",{href:x.src,height:v.h,width:v.w,x:v.x+y,y:v.y+y,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));const F=fl(A,y);return ie.createElement("svg",qr({height:i,width:i,viewBox:`0 0 ${j} ${j}`,ref:n,role:"img"},b),!!h&&ie.createElement("title",null,h),ie.createElement("path",{fill:c,d:`M0,0 h${j}v${j}H0z`,shapeRendering:"crispEdges"}),ie.createElement("path",{fill:l,d:F,shapeRendering:"crispEdges"}),S)});js.displayName="QRCodeSVG";const cp=104996,dp=[100,200,500],mp={0:"凡人",1:"筑基",2:"金丹"},Ya=(e,t)=>{const n=document.createElement("form");n.action=e,n.method="POST";for(const[r,a]of Object.entries(t||{})){const i=document.createElement("input");i.type="hidden",i.name=r,i.value=a,n.appendChild(i)}document.body.appendChild(n),n.submit(),document.body.removeChild(n)},pp=(e=[],t)=>{if(!e.length)return t("全部等级生效");const n=e.map(r=>t(mp[r]||`Lv${r}`)).join(t("、"));return t("{{levels}}生效",{levels:n})},bn=(e,t)=>{const n=String(e||"").trim();if(!n)return"";const r=n.match(/^加赠\s*(\d+(?:\.\d+)?)%\s*灵石$/);if(r)return t("加赠 {{percent}}% 灵石",{percent:r[1]});const a=n.match(/^赠送\s*([\d,]+)\s*灵石$/);if(a)return t("赠送 {{stones}} 灵石",{stones:a[1]});const i=n.match(/^(\d+(?:\.\d+)?)折$/);return i?t("价格为原价的 {{percent}}%",{percent:Number(i[1])*10}):t(n)}
545,hp=e=>{const t=Number(e?.purchase_spirit_stones||0),n=Number(e?.gift_spirit_stones||0);if(t<=0||n<=0)return"";const r=Math.round(n/t*1e3)/10;return`${Number.isInteger(r)?r:r.toFixed(1)}%`},fp=(e,t)=>{const n=Math.max(0,Number(e||0)-t),r=Math.floor(n/86400),a=Math.floor(n%86400/3600),i=Math.floor(n%3600/60);return{days:r,hours:a,minutes:i}};function gp({quote:e}){const t=Do(),{t:n}=ye(),[r,a]=f.useState(()=>Math.floor(Date.now()/1e3)),i=e?.policies?.[0],o=fp(i?.end_at,r);return f.useEffect(()=>{if(!i?.end_at)return;const c=setInterval(()=>a(Math.floor(Date.now()/1e3)),1e3);return()=>clearInterval(c)},[i?.end_at]),i?s.jsx("div",{className:"rounded-2xl bg-gradient-to-r from-violet-600 via-pink-500 to-orange-400 px-5 py-4 text-white shadow-lg",children:s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("div",{className:"text-lg font-bold",children:bn(i.name,n)}),i.policy_type==="FIRST_TOP_UP"&&s.jsx("span",{className:"badge badge-sm",children:t`首充赠送`}),s.jsx("span",{className:"rounded-full bg-white/20 px-2.5 py-1 text-xs font-medium ring-1 ring-white/30",children:pp(i.target_levels,n)}),i.discount_label&&s.jsx("span",{className:"rounded-full bg-white px-2.5 py-1 text-xs font-bold text-pink-600 shadow-sm",children:bn(i.discount_label,n)})]}),s.jsxs("div",{className:"mt-1.5 text-sm text-white/90",children:[bn(i.description,n),i.stackable&&` · ${n("可与等级常驻赠送叠加")}`]})]}),i.end_at>0&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2 text-sm",children:[s.jsx("span",{className:"text-white/90",children:n("距结束")}),[[o.days,"天"],[o.hours,"时"],[o.minutes,"分"]].map(([c,l])=>s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("strong",{className:"min-w-10 rounded-xl bg-black/20 px-2.5 py-2 text-center font-mono text-lg font-bold tabular-nums",children:String(c).padStart(2,"0")}),s.jsx("span",{children:n(l)})]},l))]})]})}):null}function xp({className:e,user:t,systemStatus:n,onQuoteChange:r}){const a=Do(),{t:i,i18n:o}=ye(),c=o.language==="zh-CN",l=Ft(),u=wt(),m="¥",d=Number(n?.quota_per_unit||0),h=f.useMemo(()=>n.min_topup||1,[n]),p=f.useMemo(()=>n.max_topup||1e5,[n]),x=f.useMemo(()=>{const X=n?.topup_preset_amounts;return!Array.isArray(X)||X.length!==3||X.some(ce=>!Number.isInteger(Number(ce))||Number(ce)<=0||Number(ce)<h||Number(ce)>p)?dp:X.map(Number)},[n,h,p]),b=x.join(","),y=x[0],k=y,[j,v]=f.useState(0),[A,S]=f.useState(null),[F,O]=f.useState({}),[N,I]=f.useState(y),[C,_]=f.useState(String(y)),B=f.useMemo(()=>n.enable_online_topup||!1,[n]),[U,R]=f.useState(""),[M,K]=f.useState(null),ee=f.useRef(""),le=f.useRef(null),se=f.useRef(null),g=f.useRef(null),P=f.useRef(null),z=f.useRef(!1),w=A?.policies?.[0],D="relative cursor-pointer border rounded-xl p-4 text-center transition-all duration-200",T="bg-gradient-to-r from-blue-500 to-indigo-600 text-white border-transparent shadow-lg scale-105",$="border-gray-200 bg-white text-gray-900 hover:border-blue-300 hover:shadow-sm dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 dark:hover:border-blue-400",E=X=>!X||typeof X!="string"?X:X.replace(/小于\s+(\d+(\.\d+)?)/g,(ce,_e)=>{const De=parseFloat(_e);return c?"小于 "+(De%1===0?De.toFixed(0):De.toFixed(2)):ce}),{runAsync:G}=ve(async X=>{X===void 0&&(X=N);const ce=await Y.post("/api/user/topup/quote",{amount:parseFloat(X)});if(ce!==void 0){const{success:_e,message:De,data:Se}=ce.data;if(_e)v(parseFloat(Se.pay_amount)),S(Se),r?.(Se),g.current?.setCustomValidity(""),P.current?.setCustomValidity("");else{v(0),S(null),r?.(null);const re=E(De),$e=g.current&&!g.current.disabled?g.current:P.current;$e&&($e.setCustomValidity(re),$e.reportValidity())}}else W(ce)},{manual:!0,onError:X=>{console.log(X)}}),te=async()=>{try{const X=await Promise.all(x.map(async ce=>{const _e=await Y.post("/api/user/topup/quote",{amount:ce});return[ce,_e?.data?.success?_e.data.data:null]}));O(Object.fromEntries(X.filter(([,ce])=>ce)))}catch{O({})}};f.useEffect(()=>{const X=x.includes(N)?N:x[0];x.includes(Number(C))||(_(String(X)),I(X)),G(X),te()},[b]),f.useEffect(()=>{if(z.current)return;const X=new URLSearchParams(l.search),ce=X.get("continue_order_id");if(!ce)return;z.current=!0,X.delete("continue_order_id");const _e=X.toString();u({pathname:l.pathname,search:_e?`?${_e}`:"",hash:l.hash},{replace:!0,state:l.state}),(async()=>{try{const Se=await Y.post(`/api/user/topup/orders/${ce}/continue`);if(Se?.data?.message!=="success"){W(E(Se?.data?.data||i("继续付款失败")));return}if(Se.data.payment_method==="wechat"){K(Se.data.data),se.current?.showModal();return}Ya(Se.data.url,Se.data.data)}catch(Se){W(Se?.message||i("继续付款失败"))}})()},[]),f.useEffect(()=>{if(!M?.trade_no)return;const X=setInterval(async()=>{try{const ce=await Y.get(`/api/user/pay/wechat/status/${M.trade_no}`);ce?.data?.message==="success"&&ce.data.data?.status==="success"&&(clearInterval(X),fe(i("充值成功!")),se.current?.close(),window.location.reload())}catch(ce){console.log(ce)}},3e3);return()=>clearInterval(X)},[M?.trade_no]),f.useEffect(()=>{if(!w?.end_at)return;let X;const ce=()=>{const _e=w.end_at*1e3-Date.now()+500;if(_e>2147483647){X=setTimeout(ce,2147483647);return}X=setTimeout(()=>{G(N),te()},Math.max(_e,0))};return ce(),()=>clearTimeout(X)},[w?.id,w?.end_at]);const me=X=>{const ce=new FormData(X.currentTarget),_e=ce.get("preset");_(String(_e));let De;
545if(_e==="custom"){const Se=parseFloat(ce.get("customAmount"));if(isNaN(Se)||Se<=0)return;De=Math.round(Se),g.current&&(Se<h?g.current.setCustomValidity(i("充值数量不能小于")+h):Se>p?g.current.setCustomValidity(i("充值数量不能大于")+p):g.current.setCustomValidity(""))}else De=parseInt(_e),g.current?.setCustomValidity("");!isNaN(De)&&De!==N&&(I(De),G(De))},Pe=()=>m+Number(j||0).toFixed(2),Ee=async X=>{if(!B){W(i("管理员未开启在线充值!"));return}le.current?.reportValidity()&&(await G(),K(null),ee.current=X,R(X),se.current?.showModal())},{run:Re}=ve(async()=>{if(j===0&&await G(),N<h){W(i("充值数量不能小于")+h);return}if(N>p){W(i("充值数量不能大于")+p);return}const X=ee.current||U;if(X==="wx"){const _e=await Y.post("/api/user/pay/wechat-native",{amount:parseInt(N)});if(_e!==void 0){const{message:De,data:Se}=_e.data;De==="success"?K(Se):W(E(Se))}else W(_e);return}se.current?.close();const ce=await Y.post("/api/user/pay/alipay",{amount:parseInt(N),payment_method:X});if(ce!==void 0){const{message:_e,data:De}=ce.data;_e==="success"?Ya(ce.data.url,De):W(E(De))}else W(ce)},{manual:!0,onError:X=>{console.log(X)}}),Ae=()=>{K(null),se.current?.close()},vt=async X=>{X.preventDefault();const ce=X.nativeEvent?.submitter?.value;await Ee(ce)};return s.jsxs(s.Fragment,{children:[s.jsxs("dialog",{ref:se,className:"modal modal-middle",onCancel:Ae,children:[s.jsx("div",{className:"absolute left-1/2 top-1/2 flex max-h-[90vh] w-[380px] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-[14px] bg-white text-left shadow-[0_12px_40px_rgba(0,0,0,0.2)] dark:bg-gray-900",children:M?s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4",children:i("微信扫码支付")}),s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:"rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-700",children:s.jsx(js,{value:M.code_url,size:220})}),s.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:i("请使用微信扫码完成支付,支付成功后页面会自动刷新")}),s.jsxs("div",{className:"text-sm",children:[i("实付金额"),":",s.jsxs("b",{children:[m,M.amount]})]})]}),s.jsx("div",{className:"mt-4",children:s.jsx("button",{className:"flex-1 btn rounded-xl",onClick:Ae,children:i("取消")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"shrink-0 bg-gradient-to-br from-[#8B5CF6] to-[#6366F1] px-6 pb-4 pt-5 text-center",children:[s.jsx("div",{className:"text-[18px] font-bold text-white",children:i("确认支付")}),s.jsx("div",{className:"mt-1 text-xs text-white/80",children:i("请确认以下订单信息")})]}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 py-2.5 text-sm dark:border-gray-700",children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:i("购买灵石")}),s.jsx("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:A?pn(A.purchase_spirit_stones):Xe(N)})]}),Number(A?.gift_spirit_stones||0)>0&&s.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 py-2.5 text-sm dark:border-gray-700",children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:i("赠送灵石")}),s.jsx("span",{className:"font-semibold text-orange-600 dark:text-orange-400",children:pn(A.gift_spirit_stones)})]}),s.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 py-2.5 text-sm dark:border-gray-700",children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:i("合计到账")}),s.jsx("span",{className:"text-[16px] font-medium text-[#4A90D9] dark:text-blue-300",children:A?pn(A.total_spirit_stones):Xe(N)})]}),s.jsxs("div",{className:"flex items-center justify-between py-2.5 text-sm",children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:i("实付金额")}),s.jsx("span",{className:"text-[18px] font-bold text-[#4A90D9] dar
545k:text-blue-300",children:Pe()})]})]}),s.jsxs("div",{className:"flex shrink-0 gap-3 px-6 pb-5",children:[s.jsx("button",{className:"flex-1 rounded-[10px] bg-gray-200 py-3 text-[15px] font-semibold text-gray-600 transition-all hover:bg-gray-300 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700",onClick:Ae,children:i("取消")}),s.jsx("button",{className:"flex-1 rounded-[10px] bg-gradient-to-br from-[#8B5CF6] to-[#6366F1] py-3 text-[15px] font-semibold text-white transition-all hover:opacity-90",onClick:Re,children:i("确认支付")})]})]})}),s.jsx("form",{method:"dialog",className:"modal-backdrop",children:s.jsx("button",{onClick:Ae,children:"close"})})]}),s.jsxs("form",{ref:le,onSubmit:vt,onChange:me,className:e||"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[x.map(X=>s.jsxs("label",{className:`${D} ${C===String(X)?T:$}`,children:[s.jsx("input",{type:"radio",name:"preset",value:X,className:"sr-only",checked:C===String(X),onChange:()=>{}}),s.jsx("div",{className:"text-2xl font-bold",children:s.jsx(il,{value:Xe(X),unitClassName:"text-base"})}),Number(F[X]?.gift_spirit_stones||0)>0&&s.jsxs("span",{className:"absolute -right-2 -top-3 rounded-full bg-orange-500 px-2 py-1 text-xs font-bold text-white shadow",children:[F[X]?.policies?.some(ce=>ce.policy_type==="FIRST_TOP_UP")?a`首充赠送`:a`加赠`," ",hp(F[X])]})]},X)),s.jsx("label",{htmlFor:"preset-custom",className:`${D} flex items-center justify-center ${C==="custom"?T:$}`,children:s.jsx("div",{className:"text-2xl font-bold",children:i("自定义")})})]}),s.jsx("input",{id:"preset-custom",type:"radio",name:"preset",value:"custom",className:"sr-only",checked:C==="custom",onChange:()=>{}}),s.jsxs("div",{className:`${C==="custom"?"block":"hidden"} bg-gray-50 rounded-xl p-4 dark:bg-gray-800`,children:[s.jsx("div",{className:"text-sm text-gray-500 mb-2 dark:text-gray-400",children:i("自定义金额")}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("input",{autoFocus:!0,t
545ype:"number",name:"customAmount",min:h,max:p,step:"1",className:"min-w-0 flex-1 bg-transparent text-xl font-medium text-gray-900 outline-none placeholder:text-gray-400 dark:text-gray-100 dark:placeholder:text-gray-500",placeholder:i("输入充值金额,最低")+h+i(",最高")+p,defaultValue:k,ref:g}),s.jsxs("span",{className:"shrink-0 text-base font-semibold text-blue-600 dark:text-blue-300",children:["= ",Xe(N)]})]})]}),s.jsxs("div",{className:"bg-blue-50 rounded-xl p-6 text-center mt-4 dark:bg-blue-500/10",children:[s.jsxs("div",{className:"text-xl text-gray-800 dark:text-gray-100",children:[i("实付金额"),":",s.jsx("span",{className:"text-blue-600 font-bold text-2xl dark:text-blue-300",children:N?Pe():""}),A&&s.jsxs("span",{className:"ml-3 text-base text-gray-600 dark:text-gray-300",children:[i("(购买")," ",pn(A.purchase_spirit_stones),A.gift_spirit_stones>0&&s.jsxs(s.Fragment,{children:[" ",i("+ 赠送")," ",s.jsx("span",{className:"font-semibold text-orange-600",children:pn(A.gift_spirit_stones)})]}),i(")")]}),N&&d>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mx-2 text-gray-400 dark:text-gray-500",children:"·"}),s.jsxs("span",{className:"text-gray-600 dark:text-gray-300",children:[i("约可完成")," ",s.jsx("span",{className:"text-purple-600 font-bold text-2xl dark:text-purple-300",children:Math.floor(N*d/cp)})," ",i("个中等任务")]})]})]}),A?.policies?.length>0&&s.jsx("div",{className:"mt-3 flex flex-wrap justify-center gap-2",children:A.policies.map((X,ce)=>s.jsxs("span",{className:"rounded-full border border-indigo-200 bg-white/70 px-3 py-1 text-xs font-medium text-indigo-600 dark:border-indigo-400/30 dark:bg-indigo-950/30 dark:text-indigo-300",children:[bn(X.name,i)," ·"," ",bn(X.discount_label,i)]},`${X.id}-${ce}`))})]}),s.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3 sm:flex sm:flex-row sm:justify-center",children:[n.enable_wechat_pay&&s.jsxs("button",{type:"submit",name:"payment",value:"wx",className:"flex min-w-0 items-center justify-center gap-2 rounded-xl bg-green-600 px-2 py-3 text-base font-bold text-white shadow-lg shadow-green-100 transition-colors hover:bg-green-700 sm:px-12 sm:text-lg dark:shadow-green-950/40 cursor-pointer",children:[s.jsx("span",{className:"size-5 icon-[ant-design--wechat-filled]"}),i("微信支付")]}),s.jsx("button",{type:"submit",name:"payment",value:"zfb",ref:P,className:`flex min-w-0 items-center justify-center gap-2 rounded-xl bg-blue-600 px-2 py-3 text-base font-bold text-white shadow-lg shadow-blue-200 transition-colors hover:bg-blue-700 sm:px-12 sm:text-lg dark:shadow-blue-950/40 cursor-pointer ${n.enable_wechat_pay?"":"col-span-2"}`,children:i("支付宝")})]})]})]})}const br="__aipyBackToHome";function bp(){if(typeof window.aipy?.navigate=="function"){window.aipy.navigate("/");return}typeof window.aipy?.send=="function"&&window.aipy.send("browser:navigate","/")}const yp=()=>{const{t:e}=ye(),[t,n]=f.useState("topup"),[r,a]=f.useState(null),[,i]=f.useContext(kt),[{status:o}]=f.useContext(Sn),c=Ft(),l=wt(),u=Mu(),m=f.useRef(!1);f.useEffect(()=>{if(!window.aipy||m.current)return;const v=new URLSearchParams(window.location.search);if(v.get("aipyEntry")!=="home")return;m.current=!0,v.delete("aipyEntry");const A=v.toString(),S=c.state&&typeof c.state=="object"?c.state:{};l({pathname:c.pathname,search:window.location.search,hash:c.hash},{replace:!0,state:{...S,[br]:!0}}),l({pathname:c.pathname,search:A?`?${A}`:"",hash:c.hash},{state:{[br]:!1}})},[c.hash,c.pathname,c.state,l]),f.useEffect(()=>{!window.aipy||u!=="POP"||c.state?.[br]===!0&&bp()},[c.state,u]);const{data:d={},refresh:h}=ve(()=>Y.get("/api/user/self"),{onSuccess:v=>{const{success:A,data:S}=v.data;A&&S&&(sn(S),i({type:"login",payload:S}))}}),p=f.useMemo(()=>{if(o)return o;const v=localStorage.getItem("status");return v?JSON.parse(v):{}},[o]),x=d?.data?.data||{},b=Number(x.quota)||0,y=Number(x.gift_quota)||0,k=b-y,j=v=>{const A=ft(v,0),S=ft(v),F=A!==S;return s.jsx("span",{className:F?"tooltip tooltip-top cursor-help":void 0,"data-tip":F?S:void 0,"aria-label":F?S:void 0,children:s.jsx(il,{value:A})})};return s.jsx("div",{className:"flex justify-center md:p-8",children:s.jsxs("div",{className:"w-full max-w-3xl rounded-2xl bg-white p-8 md:shadow-lg dark:border dark:border-gray-700 dark:bg-gray-900 dark:shadow-black/30",children:[r?.policies?.length>0&&s.jsx("div",{className:"mb-8",children:s.jsx(gp,{quote:r})}),s.jsx("div",{className:"mb-10 hidden md:block",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"rounded-2xl border border-blue-100 bg-blue-50 p-5 dark:border-blue-500/30 dark:bg-blue-500/10",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-blue-600 mb-3 dark:text-blue-300",children:[s.jsx("span",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-blue-100 dar
545k:bg-blue-500/20",children:s.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 fill-current",children:s.jsx("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"})})}),e("购买灵石")]}),s.jsx("div",{className:"whitespace-nowrap text-xl font-bold text-gray-900 dark:text-gray-50",children:j(k)})]}),s.jsxs("div",{className:"rounded-2xl border border-orange-100 bg-orange-50 p-5 dark:border-orange-500/30 dark:bg-orange-500/10",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-orange-600 mb-3 dark:text-orange-300",children:[s.jsx("span",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-orange-100 dark:bg-orange-500/20",children:s.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 fill-current",children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}),e("赠送灵石")]}),s.jsx("div",{className:"whitespace-nowrap text-xl font-bold text-gray-900 dark:text-gray-50",children:j(y)})]}),s.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-700 dark:bg-gray-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-600 mb-3 dark:text-gray-300",children:[s.jsx("span",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-gray-200 dark:bg-gray-700",children:s.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 fill-current",children:s.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 15c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5zm5-8H7V8h10v2z"})})}),e("灵石总额")]}),s.jsx("div",{className:"whitespace-nowrap text-xl font-bold text-gray-900 dark:text-gray-50",children:j(b)})]})]})}),s.jsxs("div",{className:"flex p-1 bg-gray-100 rounded-xl mb-8 dark:bg-gray-800",children:[s.jsx("button",{className:`h-10 flex-1 py-2 text-sm font-medium rounded-lg transition-all ${t==="topup"?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md":"cursor-pointer text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"}`,onClick:()=>n("topup"),children:e("灵石购买")}),s.jsx("button",{className:`h-10 flex-1 py-2 text-sm font-medium rounded-lg transition-all ${t==="redeem"?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md":"cursor-pointer text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"}`,onClick:()=>n("redeem"),children:e("灵石兑换")})]}),t==="topup"?s.jsx(xp,{className:"space-y-6",user:d.data,systemStatus:p,onQuoteChange:a}):s.jsx(ep,{className:"space-y-6",user:d.data,systemStatus:p,onRedeemSuccess:h})]})})},Ga={"en-US":{clear:"Clear",today:"Today",confirm:"Confirm",previousMonth:"Previous month",nextMonth:"Next month"},"zh-CN":{clear:"清除",today:"今天",confirm:"确定",previousMonth:"上个月",nextMonth:"下个月"}},lt=e=>String(e).padStart(2,"0");function Qa(e){return`${e.getFullYear()}-${lt(e.getMonth()+1)}-${lt(e.getDate())}`}function wp(e){const t=String(e||"").match(/^(\d{4})-(\d{2})-(\d{2})(?:\s+(\d{2}):(\d{2}):(\d{2}))?/);if(!t)return null;const[,n,r,a,i="00",o="00",c="00"]=t,l=new Date(Number(n),Number(r)-1,Number(a),Number(i),Number(o),Number(c));return Number.isNaN(l.getTime())?null:l}function Ja({value:e,includeTime:t,onChange:n,onClose:r}){const{locale:a}=rr(),i=Ga[a]||Ga["zh-CN"],o=wp(e)||new Date,[c,l]=f.useState(()=>new Date(o.getFullYear(),o.getMonth(),1)),[u,m]=f.useState(o),[d,h]=f.useState(()=>({hour:lt(o.getHours()),minute:lt(o.getMinutes()),second:lt(o.getSeconds())})),p=f.useMemo(()=>{const S=new Intl.DateTimeFormat(a,{weekday:"short"});return Array.from({length:7},(F,O)=>S.format(new Date(2026,0,4+O)))},[a]),x=new Intl.DateTimeFormat(a,{year:"numeric",month:"long"}).format(c),b=c.getDay(),y=new Date(c.getFullYear(),c.getMonth()+1,0).getDate(),k=[...Array.from({length:b},()=>null),...Array.from({length:y},(S,F)=>F+1)],j=(S,F=!t)=>{const O=Qa(S);n(t?`${O} ${d.hour}:${d.minute}:${d.second}`:O),F&&r()},v=S=>{const F=new Date(c.getFullYear(),c.getMonth(),S);m(F),j(F)},A=()=>{const S=new Date;l(new Date(S.getFullYear(),S.getMonth(),1)),m(S),t?(h({hour:lt(S.getHours()),minute:lt(S.getMinutes()),second:lt(S.getSeconds())}),n(`${Qa(S)} ${lt(S.getHours())}:${lt(S.getMinutes())}:${lt(S.getSeconds())}`)):j(S,!0)};return s.jsxs("div",{className:"absolute top-[calc(100%+0.25rem)] left-0 z-[110] isolate w-72 rounded-box border border-base-300 bg-base-100! p-3 text-base-content shadow-xl",onClick:S=>S.stopPropagation(),children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":i.previousMonth,onClick:()=>l(new Date(c.getFullYear(),c.getMonth()-1,1)),children:"‹"}),s.jsx("span",{className:"font-medium",children:x}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":i.nextMonth,onClick:()=>
545l(new Date(c.getFullYear(),c.getMonth()+1,1)),children:"›"})]}),s.jsxs("div",{className:"grid grid-cols-7 gap-1 text-center text-xs text-base-content/60",children:[p.map((S,F)=>s.jsx("span",{className:"py-1",children:S},`${S}-${F}`)),k.map((S,F)=>{const O=S!==null&&u.getFullYear()===c.getFullYear()&&u.getMonth()===c.getMonth()&&u.getDate()===S;return S===null?s.jsx("span",{},`empty-${F}`):s.jsx("button",{type:"button",className:Te("btn btn-ghost btn-xs btn-square",O&&"btn-active"),onClick:()=>v(S),children:S},S)})]}),t&&s.jsx("div",{className:"mt-3 flex items-center justify-center gap-1 border-t border-base-300 pt-3",children:["hour","minute","second"].map((S,F)=>s.jsxs(ie.Fragment,{children:[F>0&&s.jsx("span",{children:":"}),s.jsx("select",{className:"select select-sm w-16",value:d[S],onChange:O=>h(N=>({...N,[S]:O.target.value})),children:Array.from({length:S==="hour"?24:60},(O,N)=>s.jsx("option",{value:lt(N),children:lt(N)},N))})]},S))}),s.jsxs("div",{className:"mt-3 flex items-center justify-between border-t border-base-300 pt-2",children:[s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:()=>{n(""),r()},children:i.clear}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:A,children:i.today}),t&&s.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>j(u,!0),children:i.confirm})]})]})]})}function Xa(e){const n=String(e).trim().replaceAll("/","-").replaceAll(":",":").replace(/\s+/," ").match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})(?::(\d{2}))?$/);if(!n)return null;const[,r,a,i,o,c,l="00"]=n,u=new Date(Number(r),Number(a)-1,Number(i),Number(o),Number(c),Number(l));return u.getFullYear()===Number(r)&&u.getMonth()===Number(a)-1&&u.getDate()===Number(i)&&u.getHours()===Number(o)&&u.getMinutes()===Number(c)&&u.getSeconds()===Number(l)?`${r}-${a}-${i} ${o}:${c}:${l}`:null}function ei(e){const n=String(e).trim().replaceAll("/","-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!n)return null;const[,r,a,i]=n,o=new Date(Number(r),Number(a)-1,Number(i));return o.getFullYear()===Number(r)&&o.getMonth()===Number(a)-1&&o.getDate()===Number(i)?`${r}-${a}-${i}`:null}function Yn({value:e,onChange:t,includeTime:n=!1,ariaLabel:r,className:a}){const i=f.useRef(null),[o,c]=f.useState(!1),[l,u]=f.useState(e||"");f.useEffect(()=>{u(e||"")},[e]),f.useEffect(()=>{if(!o)return;const d=p=>{i.current?.contains(p.target)||c(!1)},h=p=>{p.key==="Escape"&&c(!1)};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",h)}},[o]);const m=d=>{u(d),t?.(d)};return n?s.jsxs("label",{ref:i,className:Te("input relative w-[272px] max-md:w-full border-base-300 bg-base-200 leading-[normal] focus-within:border-primary",o&&"z-[100]",a),children:[s.jsx("input",{type:"text",className:"min-w-0 grow bg-transparent font-mono outline-none",value:l,placeholder:"YYYY-MM-DD HH:mm:ss",pattern:"\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}",title:Z`请输入 YYYY-MM-DD HH:mm:ss 格式的时间`,onChange:d=>{const h=d.target.value;u(h);const p=Xa(h);p!==null?t?.(p):h||t?.("")},onBlur:d=>{const h=Xa(d.target.value);h!==null?(u(h),t?.(h)):d.target.value&&u(e||"")},"aria-label":r}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-xs btn-square -mr-2 shrink-0",onClick:()=>c(d=>!d),"aria-label":r?Z`选择${r}`:Z`选择时间`,children:s.jsx(Vr,{className:"size-4"})}),o&&s.jsx(Ja,{value:e,includeTime:!0,onChange:m,onClose:()=>c(!1)})]}):s.jsxs("label",{ref:i,className:Te("input relative w-[272px] max-md:w-full border-base-300 bg-base-200 leading-[normal] focus-within:border-primary",o&&"z-[100]",a),children:[s.jsx("input",{type:"text",className:"min-w-0 grow bg-transparent font-mono outline-none",value:l,placeholder:r||"YYYY-MM-DD",pattern:"\\d{4}-\\d{2}-\\d{2}",title:Z`请输入 YYYY-MM-DD 格式的日期`,onChange:d=>{const h=d.target.value;u(h);const p=ei(h);p!==null?t?.(p):h||t?.("")},onBlur:d=>{const h=ei(d.target.value);h!==null?(u(h),t?.(h)):d.target.value&&u(e||"")},"aria-label":r}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-xs btn-square -mr-2 shrink-0",onClick:()=>c(d=>!d),"aria-label":r?Z`选择${r}`:Z`选择日期`,children:s.jsx(Vr,{className:"size-4"})}),o&&s.jsx(Ja,{value:e,includeTime:!1,onChange:m,onClose:()=>c(!1)})]})}function ti(e){return(e===void 0||e==="")&&(e="{}"),JSON.parse(e)}const kp={amber:"badge-warning badge-soft",blue:"badge-info badge-soft",black:"badge-neutral",cyan:"badge-info badge-soft",green:"badge-success badge-soft",grey:"badge-ghost",indigo:"badge-primary badge-soft","light-blue":"badge-info badge-soft",lime:"badge-success badge-soft",orange:"badge-warning badge-soft",pink:"badge-secondary badge-soft",purple:"badge-secondary badge-soft",red:"badge-error badge-soft",teal:"badge-accent badge-soft",violet:"badge-secondary badge-soft",white:"badge-ghost",yellow:"badge-warning badge-soft"};function Mt({color:e="grey",children:t,className:n="",...r}){return s.jsx("span",{className:`badge badge-lg text-[0.875rem] ${kp[e]||"badge-neutral"} ${n}`,...r,children:t})}function ni({content:e,children:t}){return s.jsx("span",{className:"tooltip","data-tip":e,children:t})}function vp({children:e}){const t=e==null?"":String(e);return s.jsx("span",{className:"tooltip tooltip-left block max-w-60","data-tip":t,children:s.jsx("span",{className:"line-clamp-2 break-words",children:t})})}const Cp=()=>{const{t:e}=ye();function t(D){const T={1:["cyan","充值"],2:["lime","消费"],3:["orange","管理"],4:["purple","系统"],5:["purple","活动"],6:["purple","分享"],7:["red","退款"]},[$,E]=T[D]||["black","未知"];return s.jsx(Mt,{color:$,children:e(E)})}function n(D){const T=ti(D.other);return T?.is_model_mapped&&T?.upstream_model_name&&T?.upstream_model_name!==""?s.jsxs("span",{className:"dropdown dropdown-hover",children:[s.jsx("span",{tabIndex:0,role:"button",children:s.jsxs(Mt,{color:en(D.model_name),children:[D.model_name," ↻"]})}),s.jsxs("span",{tabIndex:0,className:"dropdown-content z-20 flex w-max max-w-80 flex-col gap-2 rounded-box border border-base-300 bg-base-100 p-3 shadow-lg",children:[s.jsxs(Mt,{color:en(D.model_name),className:"cursor-pointer",onClick:E=>w(E,D.model_name),children:[e("请求并计费模型")," ",D.model_name]}),s.jsxs(Mt,{color:en(T.upstream_model_name),className:"cursor-pointer",onClick:E=>w(E,T.upstream_model_name),children:[e("实际模型")," ",T.upstream_model_name]})]})]}):s.jsx(Mt,{color:en(D.model_name),className:"cursor-pointer",onClick:E=>{w(E,D.model_name).then(G=>{})},children:D.model_name})}const r={TIME:"time",IP:"ip",MODEL:"model",COST:"cost",DETAILS:"details"}
545,a=[{key:r.TIME,title:e("时间"),dataIndex:"timestamp2string",width:160},{key:r.IP,title:e("IP"),dataIndex:"ip",width:130},{key:r.MODEL,title:`${e("模型")}/${e("类型")}`,dataIndex:"model_name",render:(D,T,$)=>s.jsxs("div",{className:"min-w-[80px]",children:[s.jsx(ni,{content:e("模型"),children:T.type===0||T.type===2?n(T):"-"}),s.jsx("div",{className:"mt-1",children:s.jsx(ni,{content:e("类型"),children:t(T.type)})})]})},{key:r.COST,title:e("花费"),dataIndex:"quota",render:(D,T,$)=>T.type===0||T.type===2?s.jsx(s.Fragment,{children:ft(D,6)}):s.jsx(s.Fragment,{})},{key:r.DETAILS,title:e("详情"),dataIndex:"content",render:(D,T,$)=>{if(T.type===2)return s.jsx(s.Fragment,{});const E=String(D||"").replaceAll(/(\$|$|¥)(\d+\.{0,1}\d*) 额度/g,(G,te,me)=>{const Pe=te==="¥"?Number(me):Number(me)*7.3;return Xe(Pe)});return s.jsx(vp,{children:E})}}],[i,o]=f.useState([]),[,c]=f.useState({}),[l,u]=f.useState(!1),[m,d]=f.useState(!1),[h,p]=f.useState(""),[x,b]=f.useState(1),[y,k]=f.useState(ut),[j,v]=f.useState(ut),[A,S]=f.useState(0),[F,O]=f.useState({token_name:"",model_name:"",start_timestamp:_t(mc()),end_timestamp:_t(pc()),group:""}),{token_name:N,model_name:I,start_timestamp:C,end_timestamp:_,group:B}=F,[U,R]=f.useState({quota:0,token:0}),M=(D,T)=>{O($=>({...$,[T]:D}))},K=async()=>{let D=Date.parse(C)/1e3,T=Date.parse(_)/1e3,$=`/api/log/self/stat?type=${A}&token_name=${N}&model_name=${I}&start_timestamp=${D}&end_timestamp=${T}&group=${B}`;$=encodeURI($);let E=await Y.get($);const{success:G,message:te,data:me}=E.data;G?R(me):W(te)},ee=async()=>{m||(d(!0),await K(),d(!1))},le=D=>{let T={};for(let $=0;$<D.length;$++){D[$].timestamp2string=_t(D[$].created_at),D[$].key=D[$].id;let E=ti(D[$].other),G=[];if((E?.ws||E?.audio)&&(G.push({key:e("语音输入"),value:E.audio_input}),G.push({key:e("语音输出"),value:E.audio_output}),G.push({key:e("文字输入"),value:E.text_input}),G.push({key:e("文字输出"),value:E.text_output})),E?.cache_tokens>0&&G.push({key:e("缓存 Tokens"),value:E.cache_tokens}),E?.cache_creation_tokens>0&&G.push({key:e("缓存创建 Tokens"),value:E.cache_creation_tokens}),D[$].type===2&&G.push({key:e("日志详情"),value:E?.claude?kd(E?.model_ratio,E.completion_ratio,E.model_price,E.group_ratio,E.user_group_ratio,E.cache_ratio||1,E.cache_creation_ratio||1):vd(E?.model_ratio??"",E?.completion_ratio??"",E?.model_price??"",E?.group_ratio??"",E?.user_group_ratio??"")}),D[$].type===2){E?.is_model_mapped&&E?.upstream_model_name&&E?.upstream_model_name!==""&&(G.push({key:e("请求并计费模型"),value:D[$].model_name}),G.push({key:e("实际模型"),value:E.upstream_model_name}));let me="";if(E?.ws||E?.audio?me=xd(E?.text_input,E?.text_output,E?.model_ratio,E?.model_price,E?.completion_ratio,E?.audio_input,E?.audio_output,E?.audio_ratio,E?.audio_completion_ratio,E?.group_ratio,E?.cache_tokens||0,E?.cache_ratio||1):E?.claude?me=wd(D[$].prompt_tokens,D[$].completion_tokens,E.model_ratio,E.model_price,E.completion_ratio,E.group_ratio,E.cache_tokens||0,E.cache_ratio||1,E.cache_creation_tokens||0,E.cache_creation_ratio||1):me=gd(D[$].prompt_tokens,D[$].completion_tokens,E?.model_ratio,E?.model_price,E?.completion_ratio,E?.group_ratio,E?.cache_tokens||0,E?.cache_ratio||1),G.push({key:e("计费过程"),value:me}),E?.special_time_multiplier&&Number(E.special_time_multiplier)>1){const Pe=E?.special_time_timezone||"Asia/Shanghai",Ee=E?.special_time_windows||"-";G.push({key:e("特殊时段价格"),value:`${e("倍率")} x${E.special_time_multiplier} (${Pe}, ${Ee})`})}E?.reasoning_effort&&G.push({key:e("Reasoning Effort"),value:E.reasoning_effort})}T[D[$].key]=G}c(T),o(D)},se=async(D,T,$=0)=>{u(!0);let E=Date.parse(C)/1e3,G=Date.parse(_)/1e3,te=`/api/log/self/?p=${D}&page_size=${T}&type=${$}&token_name=${N}&model_name=${I}&start_timestamp=${E}&end_timestamp=${G}&group=${B}`;te=encodeURI(te);const me=await Y.get(te),{success:Pe,message:Ee,data:Re}=me.data;if(Pe){const Ae=Re.items;b(Re.page),v(Re.page_size),k(Re.total),le(Ae)}else W(Ee);u(!1)},g=D=>{b(D),se(D,j,A).then(T=>{})},P=async D=>
545{localStorage.setItem("page-size",D+""),v(D),b(1),se(1,D,A).then().catch(T=>{W(T)})},z=async()=>{b(1),ee(),await se(1,j,A)},w=async(D,T)=>{D.stopPropagation(),await cs(T)?fe("已复制:"+T):p(T)};return f.useEffect(()=>{const D=parseInt(localStorage.getItem("page-size"))||ut;v(D),se(x,D).then().catch(T=>{W(T)}),ee()},[]),s.jsxs(s.Fragment,{children:[s.jsxs("section",{children:[s.jsxs("div",{className:"relative flex flex-wrap gap-2",children:[s.jsxs(Mt,{color:"blue",className:"h-auto px-4 py-3 shadow-sm",children:[e("消耗额度"),": ",ft(U.quota)]}),s.jsxs(Mt,{color:"pink",className:"h-auto px-4 py-3 shadow-sm",children:["RPM: ",U.rpm]}),s.jsxs(Mt,{color:"white",className:"h-auto px-4 py-3 shadow-sm",children:["TPM: ",U.tpm]}),m&&s.jsx("span",{className:"loading loading-spinner loading-sm self-center"})]}),s.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-3",onSubmit:D=>{D.preventDefault(),z()},children:[s.jsxs("label",{className:"form-control block w-50 max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:e("起始时间")}),s.jsx(Yn,{includeTime:!0,className:"w-full",value:C,ariaLabel:e("起始时间"),onChange:D=>M(D,"start_timestamp")})]}),s.jsxs("label",{className:"form-control block w-50 max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:e("结束时间")}),s.jsx(Yn,{includeTime:!0,className:"w-full",value:_,ariaLabel:e("结束时间"),onChange:D=>M(D,"end_timestamp")})]}),[["token_name",e("令牌名称"),N],["model_name",e("模型名称"),I],["group",e("分组"),B]].map(([D,T,$])=>s.jsxs("label",{className:"form-control block w-40 max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:T}),s.jsx(ke,{className:"border-base-300 bg-base-200 focus-within:border-primary",name:D,value:$,placeholder:e("可选值"),onChange:E=>M(E.target.value,D)})]},D)),s.jsx(oe,{type:"submit",loading:l,children:e("查询")})]}),s.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:s.jsxs("select",{className:"select w-32 border-base-300 bg-base-200 focus:border-primary",value:A,onChange:D=>{const T=Number(D.target.value);S(T),b(1),se(1,j,T)},"aria-label":e("类型"),children:[s.jsx("option",{value:"0",children:e("全部")}),s.jsx("option",{value:"1",children:e("充值")}),s.jsx("option",{value:"2",children:e("消费")}),s.jsx("option",{value:"3",children:e("管理")}),s.jsx("option",{value:"4",children:e("系统")}),s.jsx("option",{value:"5",children:e("活动")}),s.jsx("option",{value:"6",children:e("分享")}),s.jsx("option",{value:"7",children:e("退款")})]})}),s.jsxs("div",{className:"mt-2 overflow-visible",children:[s.jsxs("table",{className:"table text-[0.875rem]",children:[s.jsx("thead",{children:s.jsx("tr",{children:a.map(D=>s.jsx("th",{className:"text-[0.875rem]",children:D.title},D.key))})}),s.jsx("tbody",{children:!l&&i.map((D,T)=>s.jsx("tr",{children:a.map($=>{const E=D[$.dataIndex];return s.jsx("td",{className:"text-[0.875rem]",children:$.render?$.render(E,D,T):E??"-"},$.key)})},D.key||D.id))})]}),l&&s.jsx("div",{className:"flex justify-center py-10",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}),!l&&i.length===0&&s.jsx("div",{className:"py-10 text-center text-base-content/60",children:e("暂无数据")})]}),s.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[s.jsx("span",{className:"text-sm text-base-content/60",children:e("第 {{start}} - {{end}} 条,共 {{total}} 条",{start:y===0?0:(x-1)*j+1,end:Math.min(x*j,y),total:y})}),s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[s.jsx(Cs,{current:x,pageSize:j,total:y,onChange:g,showPageNumbers:!0,className:"mt-0"}),s.jsx("select",{className:"select select-sm w-max whitespace-nowrap border-base-300 bg-base-200 text-sm focus:border-primary",value:j,onChange:D=>P(Number(D.target.value)),"aria-label":e("每页条数"),children:[10,20,50,100].map(D=>s.jsxs("option",{className:"whitespace-nowrap",value:D,children:[e("每页条数"),": ",D]},D))})]})]})]}),s.jsx(Ne,{open:!!h,onClose:()=>p(""),title:e("无法复制到剪贴板,请手动复制"),footer:s.jsx(oe,{onClick:()=>p(""),children:e("确定")}),children:s.jsx("textarea",{className:"textarea min-h-28 w-full leading-[normal]",value:h,readOnly:!0})})]})},jp=()=>s.jsx(s.Fragment,{children:s.jsx(Cp,{})}),Ep={IMAGINE:["绘图","badge-info"],UPSCALE:["放大","badge-warning"],VARIATION:["变换","badge-secondary"],HIGH_VARIATION:["强变换","badge-secondary"],LOW_VARIATION:["弱变换","badge-secondary"],PAN:["平移","badge-info"],DESCRIBE:["图生文","badge-warning"],BLEND:["图混合","badge-success"],UPLOAD:["上传文件","badge-info"],SHORTEN:["缩词","badge-secondary"],REROLL:["重绘","badge-primary"],INPAINT:["局部重绘-提交","badge-secondary"],ZOOM:["变焦","badge-accent"],CUSTOM_ZOOM:["自定义变焦-提交","badge-accent"],MODAL:["窗口处理","badge-success"],SWAP_FACE:["换脸","badge-success"]},Fp=()=>{const{t:e}=ye(),[t,n]=f.useState(""),[r,a]=f.useState(""),[i,o]=f.useState([]),[c,l]=f.useState(!0),[u,m]=f.useState(1),[d,h]=f.useState(ut),p=new Date,[x,b]=f.useState({mj_id:"",start_timestamp:_t(p.getTime()/1e3-2592e3),end_timestamp:_t(p.getTime()/1e3)}),{mj_id:y,start_timestamp:k,end_timestamp:j}=x,v=_=>{const[B,U]=Ep[_]||["未知","badge-ghost"];return s.jsx("span",{className:`badge badge-lg ${U}`,children:e(B)})},A=(_,B)=>{if(!_||!B)return"N/A";const U=((new Date(B)-new Date(_))/1e3).toFixed(1);return s.jsxs("span",{className:`badge badge-lg ${U>60?"badge-error":"badge-success"}`,children:[U," ",e("秒")]})},S=_=>{const B=_.map(U=>
545({...U,timestamp2string:_t(U.created_at),key:String(U.id)}));o(B),h(B.length+ut)},F=async _=>{l(!0);const B=Date.parse(k),U=Date.parse(j),R=`/api/mj/self/?p=${_}&mj_id=${y}&start_timestamp=${B}&end_timestamp=${U}`;try{const M=await Y.get(R),{success:K,message:ee,data:le}=M.data;if(K)if(_===0)S(le);else{const se=[...i];se.splice(_*ut,le.length,...le),S(se)}else W(ee)}finally{l(!1)}},O=i.slice((u-1)*ut,u*ut),N=_=>{m(_),_===Math.ceil(i.length/ut)+1&&F(_-1)},I=async()=>{m(1),await F(0)};f.useEffect(()=>{I()},[]);const C=({value:_})=>_?s.jsx("button",{type:"button",className:"block w-[100px] truncate text-left hover:text-primary",title:_,onClick:()=>n(_),children:_}):e("无");return s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-3",onSubmit:_=>{_.preventDefault(),I()},children:[s.jsxs("label",{className:"form-control block w-44 max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:e("任务 ID")}),s.jsx(ke,{className:"border-base-300 bg-base-200 focus-within:border-primary",value:y,placeholder:e("可选值"),onChange:_=>b(B=>({...B,mj_id:_.target.value}))})]}),s.jsxs("label",{className:"form-control block w-[272px] max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:e("起始时间")}),s.jsx(Yn,{includeTime:!0,value:k,ariaLabel:e("起始时间"),onChange:_=>b(B=>({...B,start_timestamp:_}))})]}),s.jsxs("label",{className:"form-control block w-[272px] max-md:w-full",children:[s.jsx("span",{className:"mb-2 block text-sm font-medium",children:e("结束时间")}),s.jsx(Yn,{includeTime:!0,value:j,ariaLabel:e("结束时间"),onChange:_=>b(B=>({...B,end_timestamp:_}))})]}),s.jsx(oe,{type:"submit",loading:c,children:e("查询")})]}),s.jsxs("div",{className:"mt-2 overflow-x-auto",children:[s.jsxs("table",{className:"table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:e("提交时间")}),s.jsx("th",{children:e("花费时间")}),s.jsx("th",{children:e("类型")}),s.jsx("th",{children:e("任务ID")}),s.jsx("th",{children:e("进度")}),s.jsx("th",{children:e("结果图片")}),s.jsx("th",{children:"Prompt"}),s.jsx("th",{children:"PromptEn"}),s.jsx("th",{children:e("失败原因")})]})}),s.jsx("tbody",{children:!c&&O.map(_=>{const B=_.progress?parseInt(_.progress.replace("%","")):0;return s.jsxs("tr",{children:[s.jsx("td",{children:_t(_.submit_time/1e3)}),s.jsx("td",{children:A(_.submit_time,_.finish_time)}),s.jsx("td",{children:v(_.action)}),s.jsx("td",{className:"font-mono text-xs",children:_.mj_id}),s.jsx("td",{className:"min-w-36",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("progress",{className:`progress w-24 ${_.status==="FAILURE"?"progress-warning":"progress-primary"}`,value:B,max:"100","aria-label":"drawing progress"}),s.jsxs("span",{className:"text-xs",children:[B,"%"]})]})}),s.jsx("td",{children:_.image_url?s.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>a(_.image_url),children:e("查看图片")}):e("无")}),s.jsx("td",{children:s.jsx(C,{value:_.prompt})}),s.jsx("td",{children:s.jsx(C,{value:_.prompt_en})}),s.jsx("td",{children:s.jsx(C,{value:_.fail_reason})})]},_.key||_.id)})})]}),c&&s.jsx("div",{className:"flex justify-center py-10",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}),!c&&O.length===0&&s.jsx("div",{className:"py-10 text-center text-base-content/60",children:e("暂无数据")})]}),s.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[s.jsx("span",{className:"text-sm text-base-content/60",children:e("第 {{start}} - {{end}} 条,共 {{total}} 条",{start:d===0?0:(u-1)*ut+1,end:Math.min(u*ut,d),total:d})}),s.jsx(Cs,{current:u,pageSize:ut,total:d,onChange:N,showPageNumbers:!0,className:"mt-0"})]}),s.jsx(Ne,{open:!!t,onClose:()=>n(""),className:"max-w-[800px]",children:s.jsx("p",{className:"max-h-[400px] overflow-auto whitespace-pre-line text-base-content",children:t})}),s.jsx(Ne,{open:!!r,onClose:()=>a(""),ariaLabel:e("结果图片"),className:"max-w-4xl bg-transparent p-0 shadow-none",children:s.jsx("img",{src:r,alt:e("结果图片"),className:"max-h-[85dvh] w-auto rounded-box object-contain"})})]})},Np=()=>s.jsx(s.Fragment,{children:s.jsx(Fp,{})}),Tn=({type:e})=>{const[t]=Nn(),[,n]=f.useContext(kt),[r,a]=f.useState("处理中..."),i=wt(),o=async(c,l,u,m)=>{const d=await Y.get(`/api/oauth/${e}?code=${c}&state=${l}${m?`&redirect=${m}`:""}`),{success:h,message:p,data:x,oauth_login_params:b,showType:y}=d.data;if(h){if(p==="bind")fe("绑定成功!"),i("/setting");else{if(vn(),n({type:"login",payload:x}),localStorage.setItem("user",JSON.stringify(x)),sn(x),Cn(),fe("登录成功!"),b){i(`/oauth/login${b}`);return}i("/token")}return}if(W(p,y),!y){a("操作失败,重定向至登录界面中..."),i("/setting");return}};return f.useEffect(()=>{const c=t.get("code"),l=t.get("state");o(c,l,0,_n(e)).then()},[]),s.jsx("main",{className:"flex min-h-[300px] w-full items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-4",role:"status",children:[s.jsx("span",{className:"loading loading-spinner loading-lg","aria-hidden":"true"}),s.jsx("p",{className:"text-base-content/70",children:r})]})})},Sp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,_p=/^1[3-9]\d{9}$/,Ap=/^(?=.*[a-zA-Z])(?=.*[0-9])[\x21-\x7e]{8,20}$/,Dt=({message:e})=>e?s.jsx("p",{className:"label text-error",role:"alert",children:e}):null;function Dp({showEmailBindModal:e,onCancel:t,onSuccess:n,turnstileEnabled:r,turnstileSiteKey:a}){const{t:i}=ye(),o=f.useId(),[c,l]=f.useState(""),[u,m]=f.useState(""),[d,h]=f.useState(""),[p,x]=f.useState(""),[b,y]=f.useState(0),[k,j]=f.useState(""),{run:v,loading:A}=ve(({email:I,turnstile:C})=>Y.get(`/api/verification?email=${I}&turnstile=${C}`),{manual:!0,onSuccess:I=>{const{success:C=!1,message:_=""}=H.get(I,"data",{});C?(fe(i("验证码发送成功,请检查邮箱!")),y(60)):_&&W(_)}}),{run:S,loading:F}
545=ve(({email:I,code:C})=>Y.get(`/api/oauth/email/bind?email=${I}&code=${C}`),{manual:!0,onSuccess:I=>{const{success:C=!1,message:_=""}=H.get(I,"data",{});C?(fe(i("邮箱账户绑定成功!")),n()):_&&W(_)}});f.useEffect(()=>{if(b<=0)return;const I=setTimeout(()=>{y(C=>Math.max(0,C-1))},1e3);return()=>clearTimeout(I)},[b]);const O=()=>c?Sp.test(c)?(h(""),!0):(h(i("请输入正确的邮箱地址")),!1):(h(i("请输入邮箱地址")),!1),N=I=>{I.preventDefault();const C=O(),_=!!u;x(_?"":i("请输入验证码")),!(!C||!_)&&S({email:c,code:u})};return s.jsx(Ne,{title:i("绑定邮箱地址"),open:e,onClose:t,closeOnBackdrop:!1,showCloseButton:!0,className:"flex min-h-[428px] max-w-[600px] flex-col p-8 [&>div]:flex-1 [&>h2]:text-xl",footer:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:t,children:i("取消")}),s.jsx(oe,{type:"submit",form:o,loading:F,children:i("确定")})]}),children:s.jsxs("form",{id:o,noValidate:!0,onSubmit:N,children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx(ke,{type:"email",value:c,invalid:!!d,variant:"filled",placeholder:i("输入邮箱地址"),autoComplete:"email",onChange:I=>{l(I.target.value),h("")},onBlur:O}),s.jsx(Dt,{message:d})]}),s.jsx(At,{children:s.jsx(oe,{type:"button",loading:A,disabled:b>0||!c,onClick:()=>{O()&&v({email:c,turnstile:k})},children:b>0?i("重新发送 ()",{countdown:b}):i("获取验证码")})})]}),s.jsxs("div",{className:"mt-2",children:[s.jsx(ke,{value:u,invalid:!!p,variant:"filled",placeholder:i("验证码"),autoComplete:"one-time-code",onChange:I=>{m(I.target.value),x("")}}),s.jsx(Dt,{message:p})]}),r&&s.jsx("div",{className:"mt-3",children:s.jsx(ar,{sitekey:a,onVerify:I=>j(I)})})]})})}function bl({visible:e,currentPhoneNumber:t,onCancel:n,onSuccess:r}){const{t:a}=ye(),i=f.useId(),[o,c]=f.useState(""),[l,u]=f.useState(""),[m,d]=f.useState(""),[h,p]=f.useState(""),[x,b]=f.useState(0),y=!!t,{run:k,loading:j}=ve(({mobile:O})=>Y.post("/api/sms/code",{mobile:O}),{manual:!0,onSuccess:O=>{const{success:N=!1,message:I=""}=H.get(O,"data",{});N?(fe(a("验证码发送成功,请查收短信!")),b(60)):I&&W(I)}}),{run:v,loading:A}=ve(({phone_number:O,code:N})=>Y.get(`/api/oauth/phone/bind?phone_number=${O}&code=${N}`),{manual:!0,onSuccess:O=>{const{success:N=!1,message:I=""}=H.get(O,"data",{});N?(fe(a(y?"手机号更换成功!":"手机号绑定成功!")),r()):I&&W(I)}});f.useEffect(()=>{if(x<=0)return;const O=setTimeout(()=>{b(N=>Math.max(0,N-1))},1e3);return()=>clearTimeout(O)},[x]),f.useEffect(()=>{e&&(c(""),u(""),d(""),p(""),b(0))},[e]);const S=()=>o?_p.test(o)?o===t?(d(a("新手机号不能与当前手机号相同")),!1):(d(""),!0):(d(a("请输入正确的手机号")),!1):(d(a("请输入手机号")),!1),F=O=>{O.preventDefault();const N=S(),I=!!l;p(I?"":a("请输入验证码")),!(!N||!I)&&v({phone_number:o,code:l})};return s.jsx(Ne,{title:a(y?"更换手机号":"绑定手机号"),open:e,onClose:n,closeOnBackdrop:!1,footer:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:n,children:a("取消")}),s.jsx(oe,{type:"submit",form:i,loading:A,children:a("确定")})]}),children:s.jsxs("form",{id:i,noValidate:!0,onSubmit:F,children:[y&&s.jsx("div",{role:"alert",className:"alert alert-soft mb-3",children:s.jsxs("span",{children:[a("当前手机号"),":",t]})}),s.jsxs("fieldset",{className:"fieldset",children:[s.jsx("legend",{className:"fieldset-legend",children:a(y?"新手机号":"手机号")}),s.jsx(ke,{value:o,invalid:!!m,placeholder:a(y?"请输入新手机号":"手机号"),autoComplete:"tel",inputMode:"numeric",onChange:O=>{c(O.target.value),d("")},onBlur:S}),s.jsx(Dt,{message:m})]}),s.jsxs("div",{className:"mt-2 flex items-start gap-5",children:[s.jsxs("fieldset",{className:"fieldset min-w-0 flex-1",children:[s.jsx("legend",{className:"fieldset-legend",children:a("验证码")}),s.jsx(ke,{value:l,invalid:!!h,placeholder:a("验证码"),autoComplete:"one-time-code",onChange:O=>{u(O.target.value),p("")}}),s.jsx(Dt,{message:h})]}),s.jsx(At,{className:"mt-7 min-w-[100px] max-w-[160px]",children:s.jsx(oe,{type:"button",className:"w-full",loading:j,disabled:x>0||!o,onClick:()=>{S()&&k({mobile:o})},children:x>0?x:a("获取验证码")})})]})]})})}const yl=({visible:e,onOk:t,onCancel:n,user:r})=>{const{t:a}=ye(),i=f.useId(),[o,c]=f.useState(""),[l,u]=f.useState(""),{run:m,loading:d}=ve(p=>Y.put("/api/user/self",p),{manual:!0,onSuccess:p=>{const{data:{success:x,message:b}}=p;x?(fe(a("个人信息修改成功!")),t&&t()):W(b)}});f.useEffect(()=>{e&&(c(H.get(r,"display_name","")),u(""))},[e,r]);const h=p=>{if(p.preventDefault(),!o){u(a("显示名称不能为空"));return}if(o===H.get(r,"display_name","")){n();return}m({display_name:o})};return s.jsx(Ne,{title:a("修改个人信息"),open:e,onClose:n,showCloseButton:!0,children:s.jsxs("form",{id:i,className:"space-y-3",autoComplete:"off",noValidate:!0,onSubmit:h,children:[s.jsxs("fieldset",{className:"fieldset",children:[s.jsx("legend",{className:"fieldset-legend",children:a("用户名")}),s.jsx(ke,{value:H.get(r,"username",""),disabled:!0})]}),s.jsxs("fieldset",{className:"fieldset",children:[s.jsx("legend",{className:"fieldset-legend",children:a("显示名称")}),s.jsx(ke,{value:o,invalid:!!l,placeholder:a("请输入显示名称"),onChange:p=>{c(p.target.value),u("")}}),s.jsx(Dt,{message:l})]}),s.jsxs("div",{className:"mb-6 flex justify-center gap-3",children:[s.jsx("button",{type:"button",className:"btn btn-error",onClick:n,children:a("取消")}),s.jsx(oe,{type:"submit",loading:d,children:a("确定")})]})]})})};function Bp({visible:e,onCancel:t,onSuccess:n}){const{t:r}=ye(),a=f.useId(),[i,o]=f.useState(""),[c,l]=f.useState(""),[u,m]=f.useState(""),[d,h]=f.useState(""),[p,x]=f.useState(""),[b,y]=f.useState(""),[k,j]=f.useState(0),{run:v,loading:A}=ve(()=>Y.post("/api/user/self/password/code"),{manual:!0,onSuccess:N=>{const{success:I=!1,message:C=""}
545=H.get(N,"data",{});I?(fe(r("验证码发送成功,请查收短信!")),j(60)):C&&W(C)}}),{run:S,loading:F}=ve(({nextPassword:N,verificationCode:I})=>Y.put("/api/user/self",{password:N,code:I}),{manual:!0,onSuccess:N=>{const{success:I,message:C}=N.data;I?(fe(r("密码修改成功!")),n()):W(C)}});f.useEffect(()=>{if(k<=0)return;const N=setTimeout(()=>{j(I=>Math.max(0,I-1))},1e3);return()=>clearTimeout(N)},[k]),f.useEffect(()=>{e&&(o(""),l(""),m(""),h(""),x(""),y(""),j(0))},[e]);const O=N=>{if(N.preventDefault(),!Ap.test(i)){h(r("密码需同时包含英文字母和数字,且长度在8-20之间!"));return}if(h(""),i!==c){x(r("两次输入的密码不一致!"));return}if(x(""),!u){y(r("请输入验证码"));return}y(""),S({nextPassword:i,verificationCode:u})};return s.jsx(Ne,{title:r("修改密码"),open:e,onClose:t,showCloseButton:!0,children:s.jsxs("form",{id:a,className:"space-y-3",autoComplete:"off",noValidate:!0,onSubmit:O,children:[s.jsx("div",{role:"alert",className:"alert alert-soft",children:s.jsx("span",{children:r("验证码将发送至已绑定手机号")})}),s.jsxs("div",{className:"flex items-start gap-5",children:[s.jsxs("fieldset",{className:"fieldset min-w-0 flex-1",children:[s.jsx("legend",{className:"fieldset-legend",children:r("验证码")}),s.jsx(ke,{value:u,invalid:!!b,placeholder:r("验证码"),autoComplete:"one-time-code",inputMode:"numeric",onChange:N=>{m(N.target.value),y("")}}),s.jsx(Dt,{message:b})]}),s.jsx(At,{className:"mt-7 min-w-[100px] max-w-[160px]",children:s.jsx(oe,{type:"button",className:"w-full",loading:A,disabled:k>0,onClick:v,children:k>0?k:r("获取验证码")})})]}),s.jsxs("fieldset",{className:"fieldset",children:[s.jsx("legend",{className:"fieldset-legend",children:r("新密码")}),s.jsx(ke,{type:"password",value:i,invalid:!!d,autoComplete:"new-password",onChange:N=>{o(N.target.value),h("")}}),s.jsx(Dt,{message:d})]}),s.jsxs("fieldset",{className:"fieldset",children:[s.jsx("legend",{className:"fieldset-legend",children:r("确认新密码")}),s.jsx(ke,{type:"password",value:c,invalid:!!p,autoComplete:"new-password",onChange:N=>{l(N.target.value),x("")}}),s.jsx(Dt,{message:p})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-3",children:[s.jsx("button",{type:"button",className:"btn",onClick:t,children:r("取消")}),s.jsx(oe,{type:"submit",loading:F,children:r("确定")})]})]})})}function Ip({visible:e,onCancel:t}){return s.jsx(Ne,{open:e,onClose:t,showCloseButton:!0,className:"max-w-[600px] pt-14",children:s.jsx("iframe",{className:"h-[440px] w-full border-0",title:"微信绑定",sandbox:"allow-top-navigation allow-same-origin allow-scripts",src:"/api/oauth/wechat/bind"})})}function Pp({visible:e,onCancel:t,username:n,onSuccess:r}){const{t:a}=ye(),i=f.useId(),[o,c]=f.useState(""),[l,u]=f.useState(""),{run:m,loading:d}=ve(()=>Y.delete("/api/user/self"),{manual:!0,onSuccess:p=>{const{success:x,message:b}=p.data;x?(fe(a("账户已删除!")),r()):W(b)}}),h=p=>{if(p.preventDefault(),!o){u(a("请输入你的账户名以确认删除!"));return}if(o!==n){u(a("账户名不正确!"));return}u(""),m()};return s.jsxs(Ne,{open:e,onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:t,children:a("取消")}),s.jsxs("button",{type:"submit",form:i,className:"btn btn-error",disabled:d,"aria-busy":d,children:[d&&s.jsx("span",{className:"loading loading-spinner loading-sm"}),a("确定")]})]}),children:[s.jsx("div",{className:"alert alert-error mt-5",role:"alert",children:s.jsx("span",{children:"您正在删除自己的帐户,将清空所有数据且不可恢复"})}),s.jsxs("form",{id:i,className:"mt-4",noValidate:!0,onSubmit:h,children:[s.jsx(ke,{value:o,invalid:!!l,placeholder:`输入你的账户名 ${n} 以确认删除`,onChange:p=>{c(p.target.value),u("")}}),s.jsx(Dt,{message:l})]})]})}const gt=({label:e,value:t,actionLabel:n,onAction:r,children:a})=>s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-sm text-base-content/60",children:e}),s.jsxs("div",{className:"flex min-h-6 items-center gap-2 text-base-content",children:[s.jsx("span",{className:"min-w-0 break-all",children:t}),r&&s.jsx("button",{type:"button",className:"btn btn-link h-auto min-h-0 px-0 py-0 text-primary no-underline",onClick:r,children:n}),a]})]}),Mp=e=>e?e.length<7?e:`${e.slice(0,3)}******${e.slice(-2)}`:"",Lp=()=>{const[e,t]=f.useContext(kt),[n,r]=f.useState({enabled:!1,siteKey:""}),[a,i]=f.useState({}),[o,c]=is({showEmailBindModal:!1,showPhoneBindModal:!1,showWeChatBindModal:!1,showEditProfileModal:!1,showChangePasswordModal:!1,continuePasswordAfterPhoneBind:!1,showAccountDeleteModal:!1}),{t:l}=ye(),u=wt(),m=ls();f.useEffect(()=>{const v=new URLSearchParams(window.location.search).get("colorScheme");(v==="dark"||v==="light")&&m(v==="dark")},[]);const{refresh:d}=ve(()=>Y.get("/api/user/self"),{onSuccess:v=>{const{data:{data:A,success:S,message:F}}=v;S?t({type:"login",payload:A}):W(F)}});f.useEffect(()=>{const v=JSON.parse(localStorage.getItem("status")||"{}");i(v),v.turnstile_check&&r({enabled:!0,siteKey:v.turnstile_site_key})},[]);const h=H.get(e,"user.username","-"),p=H.get(e,"user.display_name","")||"-",x=p==="-"?h:p,b=l("未绑定"),y=l("编辑"),k=()=>
545{if(e.user?.phone_number){c({showChangePasswordModal:!0,continuePasswordAfterPhoneBind:!1});return}W(l("请先绑定手机号后再修改密码")),c({showPhoneBindModal:!0,continuePasswordAfterPhoneBind:!0})},j=async()=>{if(window.aipy&&typeof window.aipy?.logout=="function"){await Go();return}await Y.get("/api/user/logout"),fe(l("注销成功!")),t({type:"logout"}),localStorage.removeItem("user"),u("/login")};return s.jsxs("div",{className:"mr-auto w-full max-w-sm px-4 py-2 sm:py-4 lg:ml-12",children:[s.jsxs("header",{className:"mb-8 text-left",children:[s.jsx("h1",{className:"text-2xl font-bold text-base-content",children:l("个人信息")}),s.jsx("div",{className:"avatar avatar-placeholder mt-3",children:s.jsx("div",{className:"h-14 w-14 rounded-full text-xl font-bold text-neutral-content",style:{backgroundColor:en(x)},children:s.jsx("span",{children:x.slice(0,1)})})})]}),s.jsxs("section",{className:"space-y-6","aria-label":l("个人信息"),children:[s.jsx(gt,{label:l("用户名"),value:h}),s.jsx(gt,{label:l("显示名称"),value:p,actionLabel:y,onAction:()=>c({showEditProfileModal:!0})}),s.jsx(gt,{label:l("密码"),value:"••••••••",actionLabel:l("修改密码"),onAction:k}),s.jsx(gt,{label:l("邮箱"),value:e.user?.email||b,actionLabel:y,onAction:()=>c({showEmailBindModal:!0})}),s.jsx(gt,{label:l("手机号"),value:Mp(e.user?.phone_number)||b,actionLabel:l(e.user?.phone_number?"更换":"绑定"),onAction:()=>c({showPhoneBindModal:!0,continuePasswordAfterPhoneBind:!1})}),a.wechat_login&&s.jsx(gt,{label:l("微信"),value:e.user?.wechat_id?l("已绑定"):b,actionLabel:y,onAction:()=>c({showWeChatBindModal:!0})}),a.google_oauth&&s.jsx(gt,{label:l("Google"),value:e.user?.google_id||b,actionLabel:y,onAction:()=>Qo(a.google_client_id)}),a.github_oauth&&s.jsx(gt,{label:l("GitHub"),value:e.user?.github_id||b,actionLabel:y,onAction:()=>ws(a.github_client_id)}),a.oidc_enabled&&s.jsx(gt,{label:l("OIDC"),value:e.user?.oidc_id||b,actionLabel:y,onAction:()=>ys(a.oidc_authorization_endpoint,a.oidc_client_id)}),a.telegram_oauth&&s.jsx(gt,{label:l("Telegram"),value:e.user?.telegram_id||b,children:s.jsx(tl,{dataAuthUrl:"/api/oauth/telegram/bind",botName:a.telegram_bot_name})}),a.linuxdo_oauth&&s.jsx(gt,{label:l("LinuxDO"),value:e.user?.linux_do_id||b,actionLabel:y,onAction:()=>ks(a.linuxdo_client_id)})]}),s.jsxs("div",{className:"mt-10 flex items-center gap-3",children:[s.jsx("button",{type:"button",className:"btn btn-info btn-sm rounded-field px-4 shadow-none",hidden:!(window.aipy&&typeof window.aipy?.logout=="function"),onClick:j,children:l("退出登录")}),s.jsx("button",{type:"button",className:"btn btn-error  btn-active text-white  btn-sm rounded-field px-5 shadow-none",onClick:()=>c({showAccountDeleteModal:!0}),children:l("注销")})]}),s.jsx(yl,{visible:o.showEditProfileModal,onCancel:()=>c({showEditProfileModal:!1}),onOk:()=>{c({showEditProfileModal:!1}),d()},user:e?.user}),s.jsx(Bp,{visible:o.showChangePasswordModal,onCancel:()=>c({showChangePasswordModal:!1}),onSuccess:()=>c({showChangePasswordModal:!1})}),s.jsx(Dp,{showEmailBindModal:o.showEmailBindModal,onCancel:()=>c({showEmailBindModal:!1}),onSuccess:()=>{d(),c({showEmailBindModal:!1})},turnstileEnabled:n.enabled,turnstileSiteKey:n.siteKey}),s.jsx(bl,{visible:o.showPhoneBindModal,currentPhoneNumber:e.user?.phone_number||"",onCancel:()=>c({showPhoneBindModal:!1,continuePasswordAfterPhoneBind:!1}),onSuccess:()=>{d(),c({showPhoneBindModal:!1,showChangePasswordModal:o.continuePasswordAfterPhoneBind,continuePasswordAfterPhoneBind:!1})}}),s.jsx(Ip,{visible:o.showWeChatBindModal,onCancel:()=>c({showWeChatBindModal:!1})}),s.jsx(Pp,{visible:o.showAccountDeleteModal,onCancel:()=>c({showAccountDeleteModal:!1}),username:e?.user?.username,onSuccess:()=>{Y.get("/api/user/logout"),t({type:"logout"}),localStorage.removeItem("user"),u("/login")}})]})};function Op(){const{t:e}=ye(),[t,n]=ie.useState("loading"),[r,a]=ie.useState([]),i=ie.useMemo(()=>{try{return JSON.parse(localStorage.getItem("user")).username}catch{return""}},[]);ie.useEffect(()=>{Y.get("/api/token/?p=0&size=100").then(u=>{const{success:m,message:d,data:h}=u.data;if(m){const p=h.filter(x=>x.status===1);a(p),n(p.length===0?"no-token":"confirm")}else W(d)}).catch(u=>W(u))},[]);const o=u=>{const m=new URLSearchParams(location.search).get("code");!m||!u||Y.patch("/api/request_bind",{code:m,token:u}).then(d=>{const{success:h}=d?.data||{};h&&(n("approved"),setTimeout(()=>{location.href="/token"},3e3))}).catch(d=>W(d))},c=u=>{if(!u){n("rejected");return}if(r.length===1){o(`sk-${r[0].key}`);return}n("choose-token")};let l=null;switch(t){case"loading":l=s.jsx("span",{className:"loading loading-spinner loading-lg",role:"status","aria-label":e("加载中...")});break;case"confirm":l=s.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-4 text-center",children:[s.jsxs("p",{className:"text-sm text-base-content/70",children:[e("授权账户"),": ",i]}),s.jsx("section",{className:"card card-border w-full bg-base-100",children:s.jsxs("div",{className:"card-body items-center",children:[s.jsx("h1",{className:"card-title",children:e("API令牌授权请求")}),s.jsx("p",{children:e("确认授权应用访问您的API令牌")}),s.jsx("p",{className:"text-sm text-base-content/70",children:e("请点击下方按钮进行授权")}),s.jsxs("div",{className:"card-actions mt-2 grid w-full grid-cols-2",children:[s.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>c(!0),children:e("授权")}),s.jsx("button",{type:"button",className:"btn btn-outline btn-error",onClick:()=>c(!1),children:e("拒绝")})]})]})}),s.jsxs("div",{className:"space-y-1 text-sm text-base-content/60",children:[s.jsx("p",{children:e("只有在您信任此应用程序的情况下才允许访问")}),s.jsx("p",{children:e("请勿授权陌生不明链接请求")})]})]});break;case"choose-token":l=s.jsxs("section",{className:"w-full max-w-lg",children:[s.jsx("h1",{className:"text-center text-lg font-bold text-base-content",children:e("您当前有多个API令牌,请选择其中一个授权")}),s.jsx("ul",{className:"list mt-8 max-h-[60vh] overflow-y-auto rounded-box border border-base-300 bg-base-100",children:r.map(u=>s.jsx("li",{className:"list-row p-0",children:s.jsxs("button",{type:"button",className:"w-full p-4 text-left hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-primary",onClick:()=>o(`sk-${u.key}`),children:[s.jsx("span",{className:"block font-semibold text-base-content",children:u.name}),s.jsxs("span",{className:"mt-1 block break-all font-mono text-sm text-base-content/60",children:["sk-",u.key]})]})},u.key))})]});break;case"no-token":l=s.jsx("section",{className:"card card-border w-full max-w-md bg-base-100 text-center",children:s.jsxs("div",{className:"card-body items-center",children:[s.jsx("h1",{className:"card-title",children:e("API令牌授权请求")}),s.jsx("p",{children:e("当前没有可用API令牌,请前往“API令牌”页面点击“添加令牌”创建")}),s.jsx("div",{className:"card-actions mt-2",children:s.jsx(Wt,{className:"btn btn-primary",to:"/token",children:e("前往API令牌理页面")})})]})});break;case"approved":l=s.jsxs("div",{className:"alert alert-success max-w-md",role:"status",children:[s.jsx("span",{className:"icon-[solar--check-circle-linear] size-6"}),s.jsx("span",{children:e("授权成功")})]});break;case"rejected":l=s.jsxs("div",{className:"alert alert-error max-w-md",role:"alert",children:[s.jsx("span",{className:"icon-[solar--close-circle-linear] size-6"}),s.jsx("span",{children:e("授权拒绝")})]});break}return s.jsx("main",{className:"fixed inset-x-0 bottom-0 top-[60
545px] z-[1] flex flex-col items-center justify-center bg-base-100 px-4",children:l})}const Tp=()=>{const{t:e}=ye(),t=wt(),n=new URLSearchParams(window.location.search);return f.useEffect(()=>{if(sessionStorage.setItem("layout","false"),!localStorage.getItem("user")){t("/login?"+n.toString(),{state:{oauth:!0},replace:!0});return}Y.get("/api/user/self",{skipError:!0}).then(()=>{location.href=`/api/oauth/authorize${location.search}`}).catch(r=>{localStorage.clear(),console.error(r);let a=0;n.has("reloadLogin")?(a=n.get("reloadLogin"),n.set("reloadLogin",Number(a)+1)):n.set("reloadLogin",1),!(a>=5)&&t("/login?"+n.toString(),{state:{oauth:!0},replace:!0})})},[]),n.has("reloadLogin")&&Number(n.get("reloadLogin"))>=5?s.jsx("main",{className:"flex min-h-full w-full items-center justify-center px-4",children:s.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",role:"alert",children:[s.jsx("span",{className:"icon-[solar--danger-circle-linear] size-20 text-error","aria-hidden":"true"}),s.jsx("p",{className:"text-lg font-semibold text-base-content",children:e("授权失败")})]})}):s.jsx("main",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-lg",role:"status","aria-label":e("加载中...")})})},Ze={FANREN:0,ZHUJI:1,JINDAN:2},zp={[Ze.FANREN]:{styleClass:"fanren",themeSkin:"基础",interactivePartner:"基础",conversationStyle:"基础",modelSettings:"AiPy内置"},[Ze.ZHUJI]:{styleClass:"zhuji",themeSkin:"丰富",interactivePartner:"丰富",conversationStyle:"丰富、可自定义",modelSettings:"可自定义"},[Ze.JINDAN]:{styleClass:"jindan",themeSkin:"丰富",interactivePartner:"丰富",conversationStyle:"丰富、可自定义",modelSettings:"可自定义"}},wl=(e,t)=>{const n=Number(e??0);return n===Ze.FANREN?t("等级名称_lv0"):n===Ze.ZHUJI?t("等级名称_lv1"):n===Ze.JINDAN?t("等级名称_lv2"):`Lv${n}`},Rp=e=>Number(e??0)>=Ze.JINDAN,$p=()=>{const{data:e,loading:t,error:n}=ve(()=>Y.get("/api/level_benefits"),{cacheKey:"level-benefits"}),r=f.useMemo(()=>{const c=e?.data?.data||{};return Object.entries(zp).map(([l,u])=>{const m=c[l]||{};return{level:Number(l),...u,threshold:m.threshold??0}})},[e]),a=f.useMemo(()=>{const c={};return r.forEach(l=>{c[l.level]=l.threshold}),c},[r]),i=f.useCallback((c,l)=>{const u=Number(c??0),m=Number(l??0),d=a[u+1];return d==null?null:Math.max(0,d-m)},[a]),o=f.useCallback((c,l)=>{const u=Number(c??0),m=Number(l??0);if(u===Ze.FANREN){const d=a[Ze.ZHUJI];return d?Math.min(100,m/d*100):100}if(u===Ze.ZHUJI){const d=a[Ze.ZHUJI],h=a[Ze.JINDAN];return h?Math.min(100,(m-d)/(h-d)*100):100}return 100},[a]);return{benefits:r,loading:t,error:n,getPointsToNextLevel:i,getLevelProgressPercent:o}};function Up(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wp={};function ri(e,t){return(Wp.jsx?Hp:Vp).test(e)}const qp=/[ \t\n\f\r]/g;function Zp(e){return typeof e=="object"?e.type==="text"?si(e.value):!1:si(e)}function si(e){return e.replace(qp,"")===""}class An{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}An.prototype.normal={};An.prototype.property={};An.prototype.space=void 0;function kl(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new An(n,r,t)}function Kr(e){return e.toLowerCase()}class rt{constructor(t,n){this.attribute=n,this.property=t}}rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;let Kp=0;const pe=Gt(),Ue=Gt(),Yr=Gt(),V=Gt(),Be=Gt(),Ht=Gt(),ot=Gt();function Gt(){return 2**++Kp}const Gr=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ue,commaOrSpaceSeparated:ot,commaSeparated:Ht,number:V,overloadedBoolean:Yr,spaceSeparated:Be},Symbol.toStringTag,{value:"Module"})),yr=Object.keys(Gr);class Es extends rt{constructor(t,n,r,a){let i=-1;
vendor: 4,308 bytes, line 545
545if(super(t,n),ai(this,"space",a),typeof r=="number")for(;++i<yr.length;){const o=yr[i];ai(this,yr[i],(r&Gr[o])===Gr[o])}}}Es.prototype.defined=!0;function ai(e,t,n){n&&(e[t]=n)}function un(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Es(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Kr(r)]=r,n[Kr(i.attribute)]=r}return new An(t,n,e.space)}const vl=un({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Be,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:V,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Be,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ue,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Cl(e,t){return t in e?e[t]:t}function jl(e,t){return Cl(e,t.toLowerCase())}const Yp=un({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ht,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alpha:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Be,autoFocus:pe,autoPlay:pe,blocking:Be,capture:null,charSet:null,checked:pe,cite:null,className:Be,closedBy:null,colorSpace:null,cols:V,colSpan:V,command:null,commandFor:null,content:null,contentEditable:Ue,controls:pe,controlsList:Be,coords:V|Ht,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Yr,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Be,height:V,hidden:Yr,high:V,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Be,itemRef:Be,itemScope:pe,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:V,pattern:null,ping:Be,placeholder:null,playsInl
545ine:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Be,required:pe,reversed:pe,rows:V,rowSpan:V,sandbox:Be,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootCustomElementRegistry:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shadowRootSerializable:pe,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ue,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:pe,disablePictureInPicture:pe,disableRemotePlayback:pe,exportParts:Ht,part:Be,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:jl}),Gp=un({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
545-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ot,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ht,g2:Ht,glyphName:Ht,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:ot,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 5,351 bytes, lines 545-546
545Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ot,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ot,rev:ot,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ot,requiredFeatures:ot,requiredFonts:ot,requiredFormats:ot,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:ot,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ot,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ot,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cl}),El=un({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fl=un({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jl}),Nl=un({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qp={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Jp=/[A-Z]/g,ii=/-[a-z]/g,Xp=/^data[-\w.:]+$/i;function eh(e,t){const n=Kr(t);let r=t,a=rt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Xp.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ii,nh);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ii.test(i)){let o=i.replace(Jp,th);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Es}return new a(r,t)}function th(e){return"-"+e.toLowerCase()}function nh(e){return e.charAt(1).toUpperCase()}const rh=kl([vl,Yp,El,Fl,Nl],"html"),Fs=kl([vl,Gp,El,Fl,Nl],"svg");function sh(e){return e.join(" ").trim()}var Qt={},wr,oi;function ah(){if(oi)return wr;oi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,c=/^\s+|\s+$/g,l=`
546`,u="/",m="*",d="",h="comment",p="declaration";function x(y,k){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];k=k||{};var j=1,v=1;function A(R){var M=R.match(t);M&&(j+=M.length);var K=R.lastIndexOf(l);v=~K?R.length-K:v+R.length}function S(){var R={line:j,column:v};return function(M){return M.position=new F(R),I(),M}}function F(R){this.start=R,this.end={line:j,column:v},this.source=k.source}F.prototype.content=y;function O(R){var M=new Error(k.source+":"+j+":"+v+": "+R);if(M.reason=R,M.filename=k.source,M.line=j,M.column=v,M.source=y,!k.silent)throw M}function N(R){var M=R.exec(y);if(M){var K=M[0];return A(K),y=y.slice(K.length),M}}function I(){N(n)}function C(R){var M;for(R=R||[];M=_();)M!==!1&&R.push(M);return R}function _(){var R=S();if(!(u!=y.charAt(0)||m!=y.charAt(1))){for(var M=2;d!=y.charAt(M)&&(m!=y.charAt(M)||u!=y.charAt(M+1));)++M;if(M+=2,d===y.charAt(M-1))return O("End of comment missing");var K=y.slice(2,M-2);return v+=2,A(K),y=y.slice(M),v+=2,R({type:h,comment:K})}}function B(){var R=S(),M=N(r);if(M){if(_(),!N(a))return O("property missing ':'");var K=N(i),ee=R({type:p,property:b(M[0].replace(e,d)),value:K?b(K[0].replace(e,d)):d});return N(o),ee}}function U(){var R=[];C(R);for(var M;M=B();)M!==!1&&(R.push(M),C(R));return R}return I(),U()}function b(y){return y?y.replace(c,d):d}return wr=x,wr}var li;function ih(){if(li)return Qt;li=1;var e=Qt&&Qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};
vendor: 3,714 bytes, line 546
546Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=n;const t=e(ah());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const o=(0,t.default)(r),c=typeof a=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:m}=l;c?a(u,m,l):m&&(i=i||{},i[u]=m)}),i}return Qt}var hn={},ui;function oh(){if(ui)return hn;ui=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},o=function(u,m){return m.toUpperCase()},c=function(u,m){return"".concat(m,"-")},l=function(u,m){return m===void 0&&(m={}),i(u)?u:(u=u.toLowerCase(),m.reactCompat?u=u.replace(a,c):u=u.replace(r,c),u.replace(t,o))};return hn.camelCase=l,hn}var fn,ci;function lh(){if(ci)return fn;ci=1;var e=fn&&fn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(ih()),n=oh();function r(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(c,l){c&&l&&(o[(0,n.camelCase)(c,i)]=l)}),o}return r.default=r,fn=r,fn}var uh=lh();const ch=Kt(uh),Sl=_l("end"),Ns=_l("start");function _l(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dh(e){const t=Ns(e),n=Sl(e);if(t&&n)return{start:t,end:n}}function yn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?di(e.position):"start"in e||"end"in e?di(e):"line"in e||"column"in e?Qr(e):""}function Qr(e){return mi(e&&e.line)+":"+mi(e&&e.column)}function di(e){return Qr(e&&e.start)+"-"+Qr(e&&e.end)}function mi(e){return e&&typeof e=="number"?e:1}class Ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const c=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=yn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const Ss={}.hasOwnProperty,mh=new Map,ph=/[A-Z]/g,hh=new Set(["table","tbody","thead","tfoot","tr"]),fh=new Set(["td","th"]),Al="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gh(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jh(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,302 bytes, line 546
546if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ch(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Fs:rh,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Dl(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Dl(e,t,n){if(t.type==="element")return xh(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bh(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wh(e,t,n);if(t.type==="mdxjsEsm")return yh(e,t);if(t.type==="root")return kh(e,t,n);if(t.type==="text")return vh(e,t)}function xh(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Fs,e.schema=a),e.ancestors.push(t);const i=Il(e,t.tagName,!1),o=Eh(e,t);let c=As(e,t);return hh.has(t.tagName)&&(c=c.filter(function(l){return typeof l=="string"?!Zp(l):!0})),Bl(e,o,i,t),_s(o,c),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function bh(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}En(e,t.position)}function yh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);En(e,t.position)}function wh(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Fs,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:Il(e,t.name,!0),o=Fh(e,t),c=As(e,t);return Bl(e,o,i,t),_s(o,c),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function kh(e,t,n){const r={};return _s(r,As(e,t)),e.create(t,e.Fragment,r,n)}function vh(e,t){return t.value}function Bl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _s(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ch(e,t,n){return r;function r(a,i,o,c){const u=Array.isArray(o.children)?n:t;return c?u(i,o,c):u(i,o)}}function jh(e,t){return n;function n(r,a,i,o){const c=Array.isArray(i.children),l=Ns(r);return t(a,i,o,c,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Eh(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Ss.call(t.properties,a)){const i=Nh(e,a,t.properties[a]);if(i){const[o,c]=i;e.tableCellAlignToStyle&&o==="align"&&typeof c=="string"&&fh.has(t.tagName)?r=c:n[o]=c}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Fh(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const c=o.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else En(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,i=e.evaluater.evaluateExpression(c.expression)}else En(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function As(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:mh;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=a.get(l)||0;o=l+"-"+u,a.set(l,u+1)}}const c=Dl(e,i,o);c!==void 0&&n.push(c)}return n}function Nh(e,t,n){const r=eh(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Up(n):sh(n)),r.property==="style"){let a=typeof n=="object"?n:Sh(e,String(n));return e.stylePropertyNameCase==="css"&&(a=_h(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Qp[r.property]||r.property:r.attribute,n]}}function Sh(e,t){try{return ch(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Ge("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Al+"#cannot-parse-style-attribute",a}}function Il(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const c=ri(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:c,computed:!!(i&&c.type==="Literal"),optional:!1}:c}r=o}else r=ri(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Ss.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);En(e)}function En(e,t){const n=new Ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Al+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _h(e){const t={};let n;for(n in e)Ss.call(e,n)&&(t[Ah(n)]=e[n]);return t}function Ah(e){let t=e.replace(ph,Dh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Dh(e){return"-"+e.toLowerCase()}const kr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Bh={};function Ds(e,t){const n=Bh,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pl(e,r,a)}function Pl(e,t,n){if(Ih(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pi(e.children,t,n)}return Array.isArray(e)?pi(e,t,n):""}function pi(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Pl(e[a],t,n);return r.join("")}function Ih(e){return!!(e&&typeof e=="object")}const hi=document.createElement("i");function Bs(e){const t="&"+e+";";hi.innerHTML=t;const n=hi.textContent;
vendor: 13,002 bytes, line 546
546return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ct(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function ht(e,t){return e.length>0?(ct(e,e.length,0,t),e):t}const fi={}.hasOwnProperty;function Ml(e){const t={};let n=-1;for(;++n<e.length;)Ph(t,e[n]);return t}function Ph(e,t){let n;for(n in t){const a=(fi.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){fi.call(a,o)||(a[o]=[]);const c=i[o];Mh(a[o],Array.isArray(c)?c:c?[c]:[])}}}function Mh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ct(e,0,0,r)}function Ll(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const et=Tt(/[A-Za-z]/),Ye=Tt(/[\dA-Za-z]/),Lh=Tt(/[#-'*+\--9=?A-Z^-~]/);function Gn(e){return e!==null&&(e<32||e===127)}const Jr=Tt(/\d/),Oh=Tt(/[\dA-Fa-f]/),Th=Tt(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function Ie(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const ur=Tt(new RegExp("\\p{P}|\\p{S}","u")),Zt=Tt(/\s/);function Tt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function cn(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&Ye(e.charCodeAt(n+1))&&Ye(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const c=e.charCodeAt(n+1);i<56320&&c>56319&&c<57344?(o=String.fromCharCode(i,c),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Ce(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return be(l)?(e.enter(n),c(l)):t(l)}function c(l){return be(l)&&i++<a?(e.consume(l),c):(e.exit(n),t(l))}}const zh={tokenize:Rh};function Rh(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),i(c)}function i(c){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(c)}function o(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ue(c)?(e.consume(c),e.exit("chunkText"),i):(e.consume(c),o)}}const $h={tokenize:Uh},gi={tokenize:Vh};function Uh(e){const t=this,n=[];let r=0,a,i,o;return c;function c(v){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&j();const A=t.events.length;let S=A,F;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){F=t.events[S][1].end;break}k(r);let O=A;for(;O<t.events.length;)t.events[O][1].end={...F},O++;return ct(t.events,S+1,0,t.events.slice(A)),t.events.length=O,u(v)}return c(v)}function u(v){if(r===n.length){if(!a)return h(v);if(a.currentConstruct&&a.currentConstruct.concrete)return x(v);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gi,m,d)(v)}function m(v){return a&&j(),k(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,x(v)}function h(v){return t.containerState={},e.attempt(gi,p,x)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function x(v){if(v===null){a&&j(),k(0),e.consume(v);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),b(v)}function b(v){if(v===null){y(e.exit("chunkFlow"),!0),k(0),e.consume(v);return}return ue(v)?(e.consume(v),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(v),b)}function y(v,A){const S=t.sliceStream(v);if(A&&S.push(null),v.previous=i,i&&(i.next=v),i=v,a.defineSkip(v.start),a.write(S),t.parser.lazy[v.start.line]){let F=a.events.length;for(;F--;)if(a.events[F][1].start.offset<o&&(!a.events[F][1].end||a.events[F][1].end.offset>o))return;const O=t.events.length;let N=O,I,C;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(I){C=t.events[N][1].end;break}I=!0}for(k(r),F=O;F<t.events.length;)t.events[F][1].end={...C},F++;ct(t.events,N+1,0,t.events.slice(O)),t.events.length=F}}function k(v){let A=n.length;for(;A-- >v;){const S=n[A];t.containerState=S[1],S[0].exit.call(t,e)}n.length=v}function j(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Vh(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function an(e){if(e===null||Ie(e)||Zt(e))return 1;if(ur(e))return 2}function cr(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Xr={name:"attention",resolveAll:Hh,tokenize:Wh};function Hh(e,t){let n=-1,r,a,i,o,c,l,u,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};xi(d,-l),xi(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},c={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...c.end}},e[r][1].end={...o.start},e[n][1].start={...c.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ht(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ht(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=ht(u,cr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ht(u,[["exit",i,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,u=ht(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,ct(e,r-1,n-r+3,u),n=r+u.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Wh(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=an(r);let i;return o;function o(l){return i=l,e.enter("attentionSequence"),c(l)}function c(l){if(l===i)return e.consume(l),c;const u=e.exit("attentionSequence"),m=an(l),d=!m||m===2&&a||n.includes(l),h=!a||a===2&&m||n.includes(r);return u._open=!!(i===42?d:d&&(a||!h)),u._close=!!(i===42?h:h&&(m||!d)),t(l)}}function xi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qh={name:"autolink",tokenize:Zh};function Zh(e,t,n){let r=0;return a;function a(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return et(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Ye(p)?(r=1,c(p)):u(p)}function c(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Ye(p))&&r++<32?(e.consume(p),c):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Gn(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),m):Lh(p)?(e.consume(p),u):n(p)}function m(p){return Ye(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,m):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Ye(p))&&r++<63){const x=p===45?h:d;return e.consume(p),x}return n(p)}}const Dn={partial:!0,tokenize:Kh};function Kh(e,t,n){return r;function r(i){return be(i)?Ce(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ue(i)?t(i):n(i)}}const Ol={continuation:{tokenize:Gh},exit:Qh,name:"blockQuote",tokenize:Yh};function Yh(e,t,n){const r=this;return a;function a(o){if(o===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return be(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Gh(e,t,n){const r=this;return a;function a(o){return be(o)?Ce(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(Ol,t,n)(o)}}function Qh(e){e.exit("blockQuote")}const Tl={name:"characterEscape",tokenize:Jh};function Jh(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Th(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const zl={name:"characterReference",tokenize:Xh};function Xh(e,t,n){const r=this;let a=0,i,o;return c;function c(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=Ye,m(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=Oh,m):(e.enter("characterReferenceValue"),i=7,o=Jr,m(d))}function m(d){if(d===59&&a){const h=e.exit("characterReferenceValue");return o===Ye&&!Bs(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&a++<i?(e.consume(d),m):n(d)}}const bi={partial:!0,tokenize:tf},yi={concrete:!0,name:"codeFenced",tokenize:ef};function ef(e,t,n){const r=this,a={partial:!0,tokenize:S};let i=0,o=0,c;return l;function l(F){return u(F)}function u(F){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(F)}function m(F){return F===c?(o++,e.consume(F),m):o<3?n(F):(e.exit("codeFencedFenceSequence"),be(F)?Ce(e,d,"whitespace")(F):d(F))}function d(F){return F===null||ue(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(bi,b,A)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(F))}function h(F){return F===null||ue(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(F)):be(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,p,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),h)}function p(F){return F===null||ue(F)?d(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(F))}function x(F){return F===null||ue(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(F)):F===96&&F===c?n(F):(e.consume(F),x)}function b(F){return e.attempt(a,A,y)(F)}function y(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),k}function k(F){return i>0&&be(F)?Ce(e,j,"linePrefix",i+1)(F):j(F)}function j(F){return F===null||ue(F)?e.check(bi,b,A)(F):(e.enter("codeFlowValue"),v(F))}function v(F){return F===null||ue(F)?(e.exit("codeFlowValue"),j(F)):(e.consume(F),v)}function A(F){return e.exit("codeFenced"),t(F)}function S(F,O,N){let I=0;return C;function C(M){return F.enter("lineEnding"),F.consume(M),F.exit("lineEnding"),_}function _(M){return F.enter("codeFencedFence"),be(M)?Ce(F,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):B(M)}function B(M){return M===c?(F.enter("codeFencedFenceSequence"),U(M)):N(M)}function U(M){return M===c?(I++,F.consume(M),U):I>=o?(F.exit("codeFencedFenceSequence"),be(M)?Ce(F,R,"whitespace")(M):R(M)):N(M)}function R(M){return M===null||ue(M)?(F.exit("codeFencedFence"),O(M)):N(M)}}}function tf(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const vr={name:"codeIndented",tokenize:rf},nf={partial:!0,tokenize:sf};function rf(e,t,n){const r=this;return a;
vendor: 5,057 bytes, line 546
546function a(u){return e.enter("codeIndented"),Ce(e,i,"linePrefix",5)(u)}function i(u){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):ue(u)?e.attempt(nf,o,l)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||ue(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),c)}function l(u){return e.exit("codeIndented"),t(u)}}function sf(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):Ce(e,i,"linePrefix",5)(o)}function i(o){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(o):ue(o)?a(o):n(o)}}const af={name:"codeText",previous:lf,resolve:of,tokenize:uf};function of(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function lf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uf(e,t,n){let r=0,a,i;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),c(d)}function c(d){return d===96?(e.consume(d),r++,c):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),a=0,m(d)):ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ue(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function m(d){return d===96?(e.consume(d),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(d))}}class cf{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&gn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gn(this.left,n.reverse())}}}function gn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rl(e){const t={};let n=-1,r,a,i,o,c,l,u;const m=new cf(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,df(m,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=m.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},c=m.slice(a,n),c.unshift(r),m.splice(a,n-a+1,c))}}return ct(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!u}function df(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const c=o.events,l=[],u={};let m,d,h=-1,p=n,x=0,b=0;const y=[b];for(;p;){for(;e.get(++a)[1]!==p;);i.push(a),p._tokenizer||(m=r.sliceStream(p),p.next||m.push(null),d&&o.defineSki
vendor: 18,572 bytes, line 546
546p(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(m),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<c.length;)c[h][0]==="exit"&&c[h-1][0]==="enter"&&c[h][1].type===c[h-1][1].type&&c[h][1].start.line!==c[h][1].end.line&&(b=h+1,y.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),h=y.length;h--;){const k=c.slice(y[h],y[h+1]),j=i.pop();l.push([j,j+k.length-1]),e.splice(j,2,k)}for(l.reverse(),h=-1;++h<l.length;)u[x+l[h][0]]=x+l[h][1],x+=l[h][1]-l[h][0]-1;return u}const mf={resolve:hf,tokenize:ff},pf={partial:!0,tokenize:gf};function hf(e){return Rl(e),e}function ff(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?i(c):ue(c)?e.check(pf,o,i)(c):(e.consume(c),a)}function i(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function o(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function gf(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,i,"linePrefix")}function i(o){if(o===null||ue(o))return n(o);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function $l(e,t,n,r,a,i,o,c,l){const u=l||Number.POSITIVE_INFINITY;let m=0;return d;function d(k){return k===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(k),e.exit(i),h):k===null||k===32||k===41||Gn(k)?n(k):(e.enter(r),e.enter(o),e.enter(c),e.enter("chunkString",{contentType:"string"}),b(k))}function h(k){return k===62?(e.enter(i),e.consume(k),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(c),h(k)):k===null||k===60||ue(k)?n(k):(e.consume(k),k===92?x:p)}function x(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function b(k){return!m&&(k===null||k===41||Ie(k))?(e.exit("chunkString"),e.exit(c),e.exit(o),e.exit(r),t(k)):m<u&&k===40?(e.consume(k),m++,b):k===41?(e.consume(k),m--,b):k===null||k===32||k===40||Gn(k)?n(k):(e.consume(k),k===92?y:b)}function y(k){return k===40||k===41||k===92?(e.consume(k),b):b(k)}}function Ul(e,t,n,r,a,i){const o=this;let c=0,l;return u;function u(p){return e.enter(r),e.enter(a),e.consume(p),e.exit(a),e.enter(i),m}function m(p){return c>999||p===null||p===91||p===93&&!l||p===94&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(i),e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||ue(p)||c++>999?(e.exit("chunkString"),m(p)):(e.consume(p),l||(l=!be(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),c++,d):d(p)}}function Vl(e,t,n,r,a,i){let o;return c;function c(h){return h===34||h===39||h===40?(e.enter(r),e.enter(a),e.consume(h),e.exit(a),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===o?(e.exit(i),l(o)):h===null?n(h):ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(h))}function m(h){return h===o||h===null||ue(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:m)}function d(h){return h===o||h===92?(e.consume(h),m):m(h)}}function wn(e,t){let n;return r;function r(a){return ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):be(a)?Ce(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const xf={name:"definition",tokenize:yf},bf={partial:!0,tokenize:wf};function yf(e,t,n){const r=this;let a;return i;function i(p){return e.enter("definition"),o(p)}function o(p){return Ul.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function c(p){return a=yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Ie(p)?wn(e,u)(p):u(p)}function u(p){return $l(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(bf,d,d)(p)}function d(p){return be(p)?Ce(e,h,"whitespace")(p):h(p)}function h(p){return p===null||ue(p)?(e.exit("definition"),r.parser.defined.push(a),t(p)):n(p)}}function wf(e,t,n){return r;function r(c){return Ie(c)?wn(e,a)(c):n(c)}function a(c){return Vl(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function i(c){return be(c)?Ce(e,o,"whitespace")(c):o(c)}function o(c){return c===null||ue(c)?t(c):n(c)}}const kf={name:"hardBreakEscape",tokenize:vf};function vf(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ue(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Cf={name:"headingAtx",resolve:jf,tokenize:Ef};function jf(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ct(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function Ef(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),i(m)}function i(m){return e.enter("atxHeadingSequence"),o(m)}function o(m){return m===35&&r++<6?(e.consume(m),o):m===null||Ie(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),l(m)):m===null||ue(m)?(e.exit("atxHeading"),t(m)):be(m)?Ce(e,c,"whitespace")(m):(e.enter("atxHeadingText"),u(m))}function l(m){return m===35?(e.consume(m),l):(e.exit("atxHeadingSequence"),c(m))}function u(m){return m===null||m===35||Ie(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),u)}}const Ff=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wi=["pre","script","style","textarea"],Nf={concrete:!0,name:"htmlFlow",resolveTo:Af,tokenize:Df},Sf={partial:!0,tokenize:If},_f={partial:!0,tokenize:Bf};function Af(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Df(e,t,n){const r=this;let a,i,o,c,l;return u;function u(w){return m(w)}function m(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),i=!0,b):w===63?(e.consume(w),a=3,r.interrupt?t:g):et(w)?(e.consume(w),o=String.fromCharCode(w),y):n(w)}function h(w){return w===45?(e.consume(w),a=2,p):w===91?(e.consume(w),a=5,c=0,x):et(w)?(e.consume(w),a=4,r.interrupt?t:g):n(w)}function p(w){return w===45?(e.consume(w),r.interrupt?t:g):n(w)}function x(w){const D="CDATA[";return w===D.charCodeAt(c++)?(e.consume(w),c===D.length?r.interrupt?t:B:x):n(w)}function b(w){return et(w)?(e.consume(w),o=String.fromCharCode(w),y):n(w)}function y(w){if(w===null||w===47||w===62||Ie(w)){const D=w===47,T=o.toLowerCase();return!D&&!i&&wi.includes(T)?(a=1,r.interrupt?t(w):B(w)):Ff.includes(o.toLowerCase())?(a=6,D?(e.consume(w),k):r.interrupt?t(w):B(w)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):i?j(w):v(w))}return w===45||Ye(w)?(e.consume(w),o+=String.fromCharCode(w),y):n(w)}function k(w){return w===62?(e.consume(w),r.interrupt?t:B):n(w)}function j(w){return be(w)?(e.consume(w),j):C(w)}function v(w){return w===47?(e.consume(w),C):w===58||w===95||et(w)?(e.consume(w),A):be(w)?(e.consume(w),v):C(w)}function A(w){return w===45||w===46||w===58||w===95||Ye(w)?(e.consume(w),A):S(w)}function S(w){return w===61?(e.consume(w),F):be(w)?(e.consume(w),S):v(w)}function F(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,O):be(w)?(e.consume(w),F):N(w)}function O(w){return w===l?(e.consume(w),l=null,I):w===null||ue(w)?n(w):(e.consume(w),O)}function N(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ie(w)?S(w):(e.consume(w),N)}function I(w){return w===47||w===62||be(w)?v(w):n(w)}function C(w){return w===62?(e.consume(w),_):n(w)}function _(w){return w===null||ue(w)?B(w):be(w)?(e.consume(w),_):n(w)}function B(w){return w===45&&a===2?(e.consume(w),K):w===60&&a===1?(e.consume(w),ee):w===62&&a===4?(e.consume(w),P):w===63&&a===3?(e.consume(w),g):w===93&&a===5?(e.consume(w),se):ue(w)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Sf,z,U)(w)):w===null||ue(w)?(e.exit("htmlFlowData"),U(w)):(e.consume(w),B)}function U(w){return e.check(_f,R,z)(w)}function R(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),M}function M(w){return w===null||ue(w)?U(w):(e.enter("htmlFlowData"),B(w))}function K(w){return w===45?(e.consume(w),g):B(w)}function ee(w){return w===47?(e.consume(w),o="",le):B(w)}function le(w){if(w===62){const D=o.toLowerCase();return wi.includes(D)?(e.consume(w),P):B(w)}return et(w)&&o.length<8?(e.consume(w),o+=String.fromCharCode(w),le):B(w)}function se(w){return w===93?(e.consume(w),g):B(w)}function g(w){return w===62?(e.consume(w),P):w===45&&a===2?(e.consume(w),g):B(w)}function P(w){return w===null||ue(w)?(e.exit("htmlFlowData"),z(w)):(e.consume(w),P)}function z(w){return e.exit("htmlFlow"),t(w)}}function Bf(e,t,n){const r=this;return a;function a(o){return ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function If(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Dn,t,n)}}const Pf={name:"htmlText",tokenize:Mf};function Mf(e,t,n){const r=this;let a,i,o;return c;function c(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),l}function l(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),S):g===63?(e.consume(g),v):et(g)?(e.consume(g),N):n(g)}function u(g){return g===45?(e.consume(g),m):g===91?(e.consume(g),i=0,x):et(g)?(e.consume(g),j):n(g)}function m(g){return g===45?(e.consume(g),p):n(g)}function d(g){return g===null?n(g):g===45?(e.consume(g),h):ue(g)?(o=d,ee(g)):(e.consume(g),d)}function h(g){return g===45?(e.consume(g),p):d(g)}function p(g){return g===62?K(g):g===45?h(g):d(g)}function x(g){const P="CDATA[";return g===P.charCodeAt(i++)?(e.consume(g),i===P.length?b:x):n(g)}function b(g){return g===null?n(g):g===93?(e.consume(g),y):ue(g)?(o=b,ee(g)):(e.consume(g),b)}function y(g){return g===93?(e.consume(g),k):b(g)}function k(g){return g===62?K(g):g===93?(e.consume(g),k):b(g)}function j(g){return g===null||g===62?K(g):ue(g)?(o=j,ee(g)):(e.consume(g),j)}function v(g){return g===null?n(g):g===63?(e.consume(g),A):ue(g)?(o=v,ee(g)):(e.consume(g),v)}function A(g){return g===62?K(g):v(g)}function S(g){return et(g)?(e.consume(g),F):n(g)}function F(g){return g===45||Ye(g)?(e.consume(g),F):O(g)}function O(g){return ue(g)?(o=O,ee(g)):be(g)?(e.consume(g),O):K(g)}function N(g){return g===45||Ye(g)?(e.consume(g),N):g===47||g===62||Ie(g)?I(g):n(g)}function I(g){return g===47?(e.consume(g),K):g===58||g===95||et(g)?(e.consume(g),C):ue(g)?(o=I,ee(g)):be(g)?(e.consume(g),I):K(g)}function C(g){return g===45||g===46||g===58||g===95||Ye(g)?(e.consume(g),C):_(g)}function _(g){return g===61?(e.consume(g),B):ue(g)?(o=_,ee(g)):be(g)?(e.consume(g),_):I(g)}function B(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),a=g,U):ue(g)?(o=B,ee(g)):be(g)?(e.consume(g),B):(e.consume(g),R)}function U(g){return g===a?(e.consume(g),a=void 0,M):g===null?n(g):ue(g)?(o=U,ee(g)):(e.consume(g),U)}function R(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Ie(g)?I(g):(e.consume(g),R)}function M(g){return g===47||g===62||Ie(g)?I(g):n(g)}function K(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function ee(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),le}function le(g){return be(g)?Ce(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):se(g)}function se(g){return e.enter("htmlTextData"),o(g)}}const Is={name:"labelEnd",resolveAll:zf,resolveTo:Rf,tokenize:$f},Lf={tokenize:Uf},Of={tokenize:Vf},Tf={tokenize:Hf};function zf(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&ct(e,0,e.length,n),e}function Rf(e,t){let n=e.length,r=0,a,i,o,c;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},m={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return c=[["enter",l,t],["enter",u,t]],c=ht(c,e.slice(i+1,i+r+3)),c=ht(c,[["enter",m,t]]),c=ht(c,cr(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),c=ht(c,[["exit",m,t],e[o-2],e[o-1],["exit",u,t]]),c=ht(c,e.slice(o+1)),c=ht(c,[["exit",l,t]]),ct(e,i,e.length,c),e}function $f(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return c;function c(h){return i?i._inactive?d(h):(o=r.parser.defined.includes(yt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(Lf,m,o?m:d)(h):h===91?e.attempt(Of,m,o?u:d)(h):o?m(h):d(h)}function u(h){return e.attempt(Tf,m,d)(h)}function m(h){return t(h)}function d(h){return i._balanced=!0,n(h)}}function Uf(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),a}function a(d){return Ie(d)?wn(e,i)(d):i(d)}function i(d){return d===41?m(d):$l(e,o,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Ie(d)?wn(e,l)(d):m(d)}function c(d){return n(d)}function l(d){return d===34||d===39||d===40?Vl(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):m(d)}function u(d){return Ie(d)?wn(e,m)(d):m(d)}function m(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Vf(e,t,n){const r=this;return a;function a(c){return Ul.call(r,e,i,o,"reference","referenceMarker","referenceString")(c)}function i(c){return r.parser.defined.includes(yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function o(c){return n(c)}}function Hf(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const Wf={name:"labelStartImage",resolveAll:Is.resolveAll,tokenize:qf};function qf(e,t,n){const r=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),i}function i(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),o):n(c)}function o(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Zf={name:"labelStartLink",resolveAll:Is.resolveAll,tokenize:Kf};function Kf(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Cr={name:"lineEnding",tokenize:Yf};function Yf(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const Wn={name:"thematicBreak",tokenize:Gf};function Gf(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return a=u,c(u)}function c(u){return u===a?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ue(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===a?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),be(u)?Ce(e,c,"whitespace")(u):c(u))}}const nt={continuation:{tokenize:e0},exit:n0,name:"list",tokenize:Xf},Qf={partial:!0,tokenize:r0},Jf={partial:!0,tokenize:t0};function Xf(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return c;function c(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Jr(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Wn,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Jr(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Dn,r.interrupt?n:m,e.attempt(Qf,h,d))}
vendor: 5,240 bytes, line 546
546function m(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function d(p){return be(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function e0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Dn,a,i);function a(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(c)}function i(c){return r.containerState.furtherBlankLines||!be(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jf,t,o)(c))}function o(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(nt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function t0(e,t,n){const r=this;return Ce(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function n0(e){e.exit(this.containerState.type)}function r0(e,t,n){const r=this;return Ce(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!be(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const ki={name:"setextUnderline",resolveTo:s0,tokenize:a0};function s0(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function a0(e,t,n){const r=this;let a;return i;function i(u){let m=r.events.length,d;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){d=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===a?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),be(u)?Ce(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ue(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const i0={tokenize:o0};function o0(e){const t=this,n=e.attempt(Dn,r,e.attempt(this.parser.constructs.flowInitial,a,Ce(e,e.attempt(this.parser.constructs.flow,a,e.attempt(mf,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const l0={resolveAll:Wl()},u0=Hl("string"),c0=Hl("text");function Hl(e){return{resolveAll:Wl(e==="text"?d0:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,c);return o;function o(m){return u(m)?i(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),l}function l(m){return u(m)?(n.exit("data"),i(m)):(n.consume(m),l)}function u(m){if(m===null)return!0;const d=a[m];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Wl(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function d0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,o=-1,c=0,l;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)c++,o--;if(o)break;o=-1}else if(u===-2)l=!0,c++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const u={type:n===e.length||l||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const m0={42:nt,43:nt,45:nt,48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,62:Ol},p0={91:xf},h0={[-2]:vr,[-1]:vr,32:vr},f0={35:Cf,42:Wn,45:[ki,Wn],60:Nf,61:ki,95:Wn,96:yi,126:yi},g0={38:zl,92:Tl},x0={[-5]:Cr,[-4]:Cr,[-3]:Cr,33:Wf,38:zl,42:Xr,60:[qh,Pf],91:Zf,92:[kf,Tl],93:Is,95:Xr,96:af},b0={null:[Xr,l0]},y0={null:[42,95]},w0={null:[]},k0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:y0,contentInitial:p0,disable:w0,document:m0,flow:f0,flowInitial:h0,insideSpan:b0,string:g
vendor: 14,706 bytes, lines 546-548
5460,text:x0},Symbol.toStringTag,{value:"Module"}));function v0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],c=[];const l={attempt:O(S),check:O(F),consume:j,enter:v,exit:A,interrupt:O(F,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:x,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let m=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function d(_){return o=ht(o,_),y(),o[o.length-1]!==null?[]:(N(t,0),u.events=cr(i,u.events,u),u.events)}function h(_,B){return j0(p(_),B)}function p(_){return C0(o,_)}function x(){const{_bufferIndex:_,_index:B,line:U,column:R,offset:M}=r;return{_bufferIndex:_,_index:B,line:U,column:R,offset:M}}function b(_){a[_.line]=_.column,C()}function y(){let _;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<B.length;)k(B.charCodeAt(r._bufferIndex));else k(B)}}function k(_){m=m(_)}function j(_){ue(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,C()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=_}function v(_,B){const U=B||{};return U.type=_,U.start=x(),u.events.push(["enter",U,u]),c.push(U),U}function A(_){const B=c.pop();return B.end=x(),u.events.push(["exit",B,u]),B}function S(_,B){N(_,B.from)}function F(_,B){B.restore()}function O(_,B){return U;function U(R,M,K){let ee,le,se,g;return Array.isArray(R)?z(R):"tokenize"in R?z([R]):P(R);function P($){return E;function E(G){const te=G!==null&&$[G],me=G!==null&&$.null,Pe=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(me)?me:me?[me]:[]];return z(Pe)(G)}}function z($){return ee=$,le=0,$.length===0?K:w($[le])}function w($){return E;function E(G){return g=I(),se=$,$.partial||(u.currentConstruct=$),$.name&&u.parser.constructs.disable.null.includes($.name)?T():$.tokenize.call(B?Object.assign(Object.create(u),B):u,l,D,T)(G)}}function D($){return _(se,g),M}function T($){return g.restore(),++le<ee.length?w(ee[le]):K}}}function N(_,B){_.resolveAll&&!i.includes(_)&&i.push(_),_.resolve&&ct(u.events,B,u.events.length-B,_.resolve(u.events.slice(B),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function I(){const _=x(),B=u.previous,U=u.currentConstruct,R=u.events.length,M=Array.from(c);return{from:R,restore:K};function K(){r=_,u.previous=B,u.currentConstruct=U,u.events.length=R,c=M,C()}}function C(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function C0(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const c=o[0];typeof c=="string"?o[0]=c.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function j0(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
547`;break}case-3:{o=`\r
548`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function E0(e){const r={constructs:Ml([k0,...(e||{}).extensions||[]]),content:a(zh),defined:[],document:a($h),flow:a(i0),lazy:{},string:a(u0),text:a(c0)};return r;function a(i){return o;function o(c){return v0(r,i,c)}}}function F0(e){for(;!Rl(e););return e}const vi=/[\0\t\n\r]/g;function N0(){let e=1,t="",n=!0,r;return a;function a(i,o,c){const l=[];let u,m,d,h,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(vi.lastIndex=d,u=vi.exec(i),h=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(h),!u){t=i.slice(d);break}if(p===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(i.slice(d,h)),e+=h-d),p){case 0:{l.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,l.push(-2);e++<m;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return c&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const S0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _0(e){return e.replace(S0,A0)}function A0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return Ll(n.slice(i?2:1),i?16:10)}return Bs(n)||e}const ql={}.hasOwnProperty;function D0(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),B0(n)(F0(E0(n).document().write(N0()(e,t,!0))))}function B0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(De),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(vt),blockQuote:i(me),characterEscape:I,characterReference:I,codeFenced:i(Pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(Pe,o),codeText:i(Ee,o),codeTextData:I,data:I,codeFlowValue:I,definition:i(Re),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(Ae),hardBreakEscape:i(X),hardBreakTrailing:i(X),htmlFlow:i(ce,o),htmlFlowData:I,htmlText:i(ce,o),htmlTextData:I,image:i(_e),label:o,link:i(De),listItem:i(re),listItemValue:h,listOrdered:i(Se,d),listUnordered:i(Se),paragraph:i($e),reference:w,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(vt),strong:i(tt),thematicBreak:i(dt)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:te,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:T,characterReferenceMarkerNumeric:T,characterReferenceValue:$,characterReference:E,codeFenced:l(y),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:C,codeIndented:l(k),codeText:l(M),codeTextData:C,data:C,definition:l(),definitionDestinationString:A,definitionLabelString:j,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(U),htmlFlowData:C,htmlText:l(R),htmlTextData:C,image:l(ee),label:se,labelText:le,lineEnding:_,link:l(K),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:D,resourceDestinationString:g,resourceTitleString:P,resource:z,setextHeading:l(N),setextHeadingLineSequence:O,setextHeadingText:F,strong:l(),thematicBreak:l()}};Zl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let q={type:"root",children:[]};const ae={stack:[q],tokenStack:[],config:t,enter:c,exit:u,buffer:o,resume:m,data:n},he=[];let Fe=-1;for(;++Fe<L.length;)if(L[Fe][1].type==="listOrdered"||L[Fe][1].type==="listUnordered")if(L[Fe][0]==="enter")he.push(Fe);else{const Je=he.pop();Fe=a(L,Je,Fe)}for(Fe=-1;++Fe<L.length;){const Je=t[L[Fe][0]];ql.call(Je,L[Fe][1].type)&&Je[L[Fe][1].type].call(Object.assign({sliceSerialize:L[Fe][2].sliceSerialize},ae),L[Fe][1])}if(ae.tokenStack.length>0){const Je=ae.tokenStack[ae.tokenStack.length-1];(Je[1]||Ci).call(ae,void 0,Je[0])}for(q.position={start:Lt(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:Lt(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)q=t.transforms[Fe](q)||q;return q}function a(L,q,ae){let he=q-1,Fe=-1,Je=!1,de,Me,We,mt;for(;++he<=ae;){const Le=L[he];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?Fe++:Fe--,mt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(de&&!mt&&!Fe&&!We&&(We=he),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!Fe&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||Fe===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(de){let st=he;for(Me=void 0;st--;){const at=L[st];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;Me&&(L[Me][1].type="lineEndingBlank",Je=!0),at[1].type="lineEnding",Me=st}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}We&&(!Me||We<Me)&&(de._spread=!0),de.end=Object.assign({},Me?L[Me][1].start:Le[1].end),L.splice(Me||he,0,["exit",de,Le[2]]),he++,ae++}if(Le[1].type==="listItemPrefix"){const st={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};de=st,L.splice(he,0,["enter",st,Le[2]]),he++,ae++,We=void 0,mt=!0}}}return L[q][1]._spread=Je,ae}function i(L,q){return ae;function ae(he){c.call(this,L(he),he),q&&q.call(this,he)}}function o(){this.stack.push({type:"fragment",children:[]})}function c(L,q,ae){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([q,ae||void 0]),L.position={start:Lt(q.start),end:void 0}}function l(L){return q;function q(ae){L&&L.call(this,ae),u.call(this,ae)}}function u(L,q){const ae=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==L.type&&(q?q.call(this,L,he[0]):(he[1]||Ci).call(this,L,he[0]));else throw new Error("Cannot close `"+L.type+"` ("+yn({start:L.start,end:L.end})+"): it’s not open");ae.position.end=Lt(L.end)}function m(){return Ds(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(L){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),q=this.stack[this.stack.length-1];q.lang=L}function x(){const L=this.resume(),q=this.stack[this.stack.length-1];q.meta=L}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/(\r?\n|\r)$/g,"")}function j(L){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=yt(this.sliceSerialize(L)).toLowerCase()}function v(){const L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function A(){const L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function S(L){const q=this.stack[this.stack.length-1];if(!q.depth){const ae=this.sliceSerialize(L).length;q.depth=ae}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function O(L){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function I(L){const ae=this.stack[this.stack.length-1].children;let he=ae[ae.length-1];(!he||he.type!=="text")&&(he=Qe(),he.position={start:Lt(L.start),end:void 0},ae.push(he)),this.stack.push(he)}function C(L){const q=this.stack.pop();q.value+=this.sliceSerialize(L),q.position.end=Lt(L.end)}function _(L){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=q.children[q.children.length-1];ae.position.end=Lt(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(I.call(this,L),C.call(this,L))}function B(){this.data.atHardBreak=!0}function U(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function R(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function M(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function K(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function ee(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function le(L){const q=this.sliceSerialize(L),ae=this.stack[this.stack.length-2];ae.label=_0(q),ae.identifier=yt(q).toLowerCase()}function se(){const L=this.stack[this.stack.length-1],q=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const he=L.children;ae.children=he}else ae.alt=q}function g(){const L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function P(){const L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function z(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function D(L){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.label=q,ae.identifier=yt(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function T(L){this.data.characterReferenceType=L.type}function $(L){const q=this.sliceSerialize(L),ae=this.data.characterReferenceType;let he;ae?(he=Ll(q,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=Bs(q);const Fe=this.stack[this.stack.length-1];Fe.value+=he}function E(L){const q=this.stack.pop();q.position.end=Lt(L.end)}function G(L){C.call(this,L);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(L)}function te(L){C.call(this,L);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(L)}function me(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function Re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ae(){return{type:"emphasis",children:[]}}function vt(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function ce(){return{type:"html",value:""}}function _e(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function Se(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function re(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function $e(){return{type:"paragraph",children:[]}}function tt(){return{type:"strong",children:[]}}function Qe(){return{type:"text",value:""}}function dt(){return{type:"thematicBreak"}}}function Lt(e){return{line:e.line,column:e.column,offset:e.offset}}function Zl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Zl(e,r):I0(e,r)}}function I0(e,t){let n;for(n in t)if(ql.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ci(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yn({start:t.start,end:t.end}
vendor: 4,516 bytes, lines 548-552
548)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yn({start:t.start,end:t.end})+") is still open")}function P0(e){const t=this;t.parser=n;function n(r){return D0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function M0(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function L0(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
549`}]}function O0(e,t){const n=t.value?t.value+`
550`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function T0(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function z0(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R0(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=cn(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,c+=1,e.footnoteCounts.set(r,c);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function $0(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U0(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Kl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=r:a.push({type:"text",value:r}),a}function V0(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kl(e,t);const a={src:cn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function H0(e,t){const n={src:cn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function W0(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function q0(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kl(e,t);const a={href:cn(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Z0(e,t){const n={href:cn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function K0(e,t,n){const r=e.all(t),a=n?Y0(n):Yl(t),i={},o=[];if(typeof t.checked=="boolean"){const m=r[0];let d;m&&m.type==="element"&&m.tagName==="p"?d=m:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(a||c!==0||m.type!=="element"||m.tagName!=="p")&&o.push({type:"text",value:`
551`}),m.type==="element"&&m.tagName==="p"&&!a?o.push(...m.children):o.push(m)}const l=r[r.length-1];l&&(a||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
552`});const u={type:"element",tagName:"li",properties:i,children:o};
vendor: 3,257 bytes, line 552
552return e.patch(t,u),e.applyData(t,u)}function Y0(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Yl(n[r])}return t}function Yl(e){const t=e.spread;return t??e.children.length>1}function G0(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const o=r[a];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Q0(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J0(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function X0(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eg(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),a.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ns(t.children[1]),l=Sl(t.children[t.children.length-1]);c&&l&&(o.position={start:c,end:l}),a.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function tg(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,c=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<c;){const d=t.children[l],h={},p=o?o[l]:void 0;p&&(h.align=p);let x={type:"element",tagName:i,properties:h,children:[]};d&&(x.children=e.all(d),e.patch(d,x),x=e.applyData(d,x)),u.push(x)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,m),e.applyData(t,m)}function ng(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ji=9,Ei=32;function rg(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Fi(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Fi(t.slice(a),a>0,!1)),i.join("")}function Fi(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===ji||i===Ei;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===ji||i===Ei;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function sg(e,t){const n={type:"text",value:rg(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ag(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ig={blockquote:M0,break:L0,code:O0,delete:T0,emphasis:z0,footnoteReference:R0,heading:$0,html:U0,imageReference:V0,image:H0,inlineCode:W0,linkReference:q0,link:Z0,listItem:K0,list:G0,paragraph:Q0,root:J0,strong:X0,table:eg,tableCell:ng,tableRow:tg,text:sg,thematicBreak:ag,toml:zn,yaml:zn,definition:zn,footnoteDefinition:zn};function zn(){}const Gl=-1,dr=0,kn=1,Qn=2,Ps=3,Ms=4,Ls=5,Os=6,Ql=7,Jl=8,{defineProperty:og}=Object,Xl=typeof self=="object"?self:globalThis,Ni=(e,t)=>
552{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Xl[e](t)},lg=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,o]=t[a];switch(i){case dr:case Gl:return n(o,a);case kn:{const c=n([],a);for(const l of o)c.push(r(l));return c}case Qn:{const c=n({},a);for(const[l,u]of o){const m=r(l),d=r(u);m==="__proto__"?og(c,m,{value:d,configurable:!0,enumerable:!0,writable:!0}):c[m]=d}return c}case Ps:return n(new Date(o),a);case Ms:{const{source:c,flags:l}=o;return n(new RegExp(c,l),a)}case Ls:{const c=n(new Map,a);for(const[l,u]of o)c.set(r(l),r(u));return c}case Os:{const c=n(new Set,a);for(const l of o)c.add(r(l));return c}case Ql:{const{name:c,message:l}=o;return n(typeof Xl[c]=="function"?Ni(c,l):new Error(l),a)}case Jl:return n(BigInt(o),a);case"BigInt":return n(Object(BigInt(o)),a);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:c}=new Uint8Array(o);return n(new DataView(c),o)}case"-0":return-0}return n(Ni(i,o),a)};return r},Si=e=>lg(new Map,e)(0),Ut="",{toString:ug}={},{keys:cg,is:dg}=Object,xn=e=>{const t=typeof e;if(t!=="object"||!e)return[dr,t];const n=ug.call(e).slice(8,-1);switch(n){case"Array":return[kn,Ut];case"Object":return[Qn,Ut];case"Date":return[Ps,Ut];case"RegExp":return[Ms,Ut];case"Map":return[Ls,Ut];case"Set":return[Os,Ut];case"DataView":return[kn,n]}return n.includes("Array")?[kn,n]:e instanceof Error?[Ql,e.name||"Error"]:[Qn,n]},Rn=([e,t])=>e===dr&&(t==="function"||t==="symbol"),mg=(e,t,n,r)=>{const a=(o,c)=>{const l=r.push(o)-1;return n.set(c,l),l},i=o=>{if(n.has(o))return n.get(o);let[c,l]=xn(o);switch(c){case dr:{let m=o;switch(l){case"bigint":c=Jl,m=o.toString();break;case"number":if(!o&&dg(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);m=null;break;case"undefined":return a([Gl],o)}return a([c,m],o)}case kn:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),a([l,[...h]],o)}const m=[],d=a([c,m],o);for(const h of o)m.push(i(h));return d}case Qn:{if(l)switch(l){case"BigInt":return a([l,o.toString()],o);case"Boolean":case"Number":case"String":return a([l,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const m=[],d=a([c,m],o);for(const h of cg(o))(e||!Rn(xn(o[h])))&&m.push([i(h),i(o[h])]);return d}case Ps:return a([c,isNaN(o.getTime())?Ut:o.toISOString()],o);case Ms:{const{source:m,flags:d}=o;return a([c,{source:m,flags:d}],o)}case Ls:{const m=[],d=a([c,m],o);for(const[h,p]of o)(e||!(Rn(xn(h))||Rn(xn(p))))&&m.push([i(h),i(p)]);return d}case Os:{const m=[],d=a([c,m],o);for(const h of o)(e||!Rn(xn(h)))&&m.push(i(h));return d}}const{message:u}=o;return a([c,{name:l,message:u}],o)};return i},_i=(e,{json:t,lossy:n}={})=>{const r=[];return mg(!(t||n),!!t,new Map,r)(e),r},Jn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Si(_i(e,t)):structuredClone(e):(e,t)=>Si(_i(e,t));function pg(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hg(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fg(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pg,r=e.options.footnoteBackLabel||hg,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const m=e.all(u),d=String(u.identifier).toUpperCase(),h=cn(d.toLowerCase());let p=0;const x=[],b=e.footnoteCounts.get(d);for(;b!==void 0&&++p<=b;){x.length>0&&x.push({type:"text",value:" "});let j=typeof n=="string"?n:n(l,p);typeof j=="string"&&(j={type:"text",value:j}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const y=m[m.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const j=y.children[y.children.length-1];j&&j.type==="text"?j.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...x)}else m.push(...x);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(m,!0)};e.patch(u,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Jn(o),id:"footnote-label"},children:[{type:"text",value:a}]}
vendor: 5,651 bytes, lines 552-558
552,{type:"text",value:`
553`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
554`}]}}const mr=(function(e){if(e==null)return yg;if(typeof e=="function")return pr(e);if(typeof e=="object")return Array.isArray(e)?gg(e):xg(e);if(typeof e=="string")return bg(e);throw new Error("Expected function, string, or object as test")});function gg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mr(e[n]);return pr(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function xg(e){const t=e;return pr(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function bg(e){return pr(t);function t(n){return n&&n.type===e}}function pr(e){return t;function t(n,r,a){return!!(wg(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function yg(){return!0}function wg(e){return e!==null&&typeof e=="object"&&"type"in e}const eu=[],kg=!0,es=!1,vg="skip";function tu(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=mr(a),o=r?-1:1;c(e,void 0,[])();function c(l,u,m){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=eu,x,b,y;if((!t||i(l,u,m[m.length-1]||void 0))&&(p=Cg(n(l,m)),p[0]===es))return p;if("children"in l&&l.children){const k=l;if(k.children&&p[0]!==vg)for(b=(r?k.children.length:-1)+o,y=m.concat(k);b>-1&&b<k.children.length;){const j=k.children[b];if(x=c(j,b,y)(),x[0]===es)return x;b=typeof x[1]=="number"?x[1]:b+o}}return p}}}function Cg(e){return Array.isArray(e)?e:typeof e=="number"?[kg,e]:e==null?eu:[e]}function Ts(e,t,n,r){let a,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,a=n):(i=t,o=n,a=r),tu(e,i,c,a);function c(l,u){const m=u[u.length-1],d=m?m.children.indexOf(l):void 0;return o(l,d,m)}}const ts={}.hasOwnProperty,jg={};function Eg(e,t){const n=t||jg,r=new Map,a=new Map,i=new Map,o={...ig,...n.handlers},c={all:u,applyData:Ng,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:o,one:l,options:n,patch:Fg,wrap:_g};return Ts(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const d=m.type==="definition"?r:a,h=String(m.identifier).toUpperCase();d.has(h)||d.set(h,m)}}),c;function l(m,d){const h=m.type,p=c.handlers[h];if(ts.call(c.handlers,h)&&p)return p(c,m,d);if(c.options.passThrough&&c.options.passThrough.includes(h)){if("children"in m){const{children:b,...y}=m,k=Jn(y);return k.children=c.all(m),k}return Jn(m)}return(c.options.unknownHandler||Sg)(c,m,d)}function u(m){const d=[];if("children"in m){const h=m.children;let p=-1;for(;++p<h.length;){const x=c.one(h[p],m);if(x){if(p&&h[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Ai(x.value)),!Array.isArray(x)&&x.type==="element")){const b=x.children[0];b&&b.type==="text"&&(b.value=Ai(b.value))}Array.isArray(x)?d.push(...x):d.push(x)}}}return d}}function Fg(e,t){e.position&&(t.position=dh(e))}function Ng(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&i&&Object.assign(n.properties,Jn(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Sg(e,t){const n=t.data||{},r="value"in t&&!(ts.call(n,"hProperties")||ts.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _g(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
555`});++r<e.length;)r&&n.push({type:"text",value:`
556`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
557`}),n}function Ai(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Di(e,t){const n=Eg(e,t),r=n.one(e,void 0),a=fg(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
558`},a),i}function Ag(e,t){return e&&"run"in e?async function(n,r){const a=Di(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Di(n,{file:r,...e||t})}}function Bi(e){if(e)throw e}var jr,Ii;function Dg(){if(Ii)return jr;Ii=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var m=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!m&&!d)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,m){n&&m.name==="__proto__"?n(u,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):u[m.name]=m.newValue},c=function(u,m){if(m==="__proto__")if(e.call(u,m)){if(r)return r(u,m).value}else return;return u[m]};return jr=function l(){var u,m,d,h,p,x,b=arguments[0],y=1,k=arguments.length,j=!1;for(typeof b=="boolean"&&(j=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<k;++y)if(u=arguments[y],u!=null)for(m in u)d=c(b,m),h=c(u,m),b!==h&&(j&&h&&(i(h)||(p=a(h)))?(p?(p=!1,x=d&&a(d)?d:[]):x=d&&i(d)?d:{},o(b,{name:m,newValue:l(j,x,h)})):typeof h<"u"&&o(b,{name:m,newValue:h}));return b},jr}var Bg=Dg();const Er=Kt(Bg);function ns(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
vendor: 4,451 bytes, line 558
558return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ig(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const o=a.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);c(null,...a);function c(l,...u){const m=e[++i];let d=-1;if(l){o(l);return}for(;++d<a.length;)(u[d]===null||u[d]===void 0)&&(u[d]=a[d]);a=u,m?Pg(m,c)(...u):o(null,...u)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function Pg(e,t){let n;return r;function r(...o){const c=e.length>o.length;let l;c&&o.push(a);try{l=e.apply(this,o)}catch(u){const m=u;if(c&&n)throw m;return a(m)}c||(l&&l.then&&typeof l.then=="function"?l.then(i,a):l instanceof Error?a(l):i(l))}function a(o,...c){n||(n=!0,t(o,...c))}function i(o){a(null,o)}}const jt={basename:Mg,dirname:Lg,extname:Og,join:Tg,sep:"/"};function Mg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bn(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(r=a):(c=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Lg(e){if(Bn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Og(e){Bn(e);let t=e.length,n=-1,r=0,a=-1,i=0,o;for(;t--;){const c=e.codePointAt(t);if(c===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),c===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Tg(...e){let t=-1,n;for(;++t<e.length;)Bn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":zg(n)}function zg(e){Bn(e);const t=e.codePointAt(0)===47;let n=Rg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Rg(e,t){let n="",r=0,a=-1,i=0,o=-1,c,l;for(;++o<=e.length;){if(o<e.length)c=e.codePointAt(o);else{if(c===47)break;c=47}if(c===47){if(!(a===o-1||i===1))if(a!==o-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),a=o,i=0;continue}}else if(n.length>0){n="",r=0,a=o,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),r=o-a-1;a=o,i=0}else c===46&&i>-1?i++:i=-1}return n}function Bn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $g={cwd:Ug};function Ug(){return"/"}function rs(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Vg(e){if(typeof e=="string")e=new URL(e);else if(!rs(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Hg(e)}function Hg(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Fr=["history","path","basename","stem","extname","dirname"];class nu{constructor(t){let n;t?rs(t)?n={path:t}:typeof t=="string"||Wg(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$g.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fr.length;){const i=Fr[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)Fr.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?jt.basename(this.path):void 0}
vendor: 11,196 bytes, line 558
558set basename(t){Sr(t,"basename"),Nr(t,"basename"),this.path=jt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?jt.dirname(this.path):void 0}set dirname(t){Pi(this.basename,"dirname"),this.path=jt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?jt.extname(this.path):void 0}set extname(t){if(Nr(t,"extname"),Pi(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rs(t)&&(t=Vg(t)),Sr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?jt.basename(this.path,this.extname):void 0}set stem(t){Sr(t,"stem"),Nr(t,"stem"),this.path=jt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Ge(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Nr(e,t){if(e&&e.includes(jt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jt.sep+"`")}function Sr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Pi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Wg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qg=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),Zg={}.hasOwnProperty;class zs extends qg{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ig()}copy(){const t=new zs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Er(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dr("data",this.frozen),this.namespace[t]=n,this):Zg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dr("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$n(t),r=this.parser||this.Parser;return _r("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),_r("process",this.parser||this.Parser),Ar("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,o){const c=$n(t),l=r.parse(c);r.run(l,c,function(m,d,h){if(m||!d||!h)return u(m);const p=d,x=r.stringify(p,h);Gg(x)?h.value=x:h.result=x,u(m,h)});function u(m,d){m||!d?o(m):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),_r("processSync",this.parser||this.Parser),Ar("processSync",this.compiler||this.Compiler),this.process(t,a),Li("processSync","process",n),r;function a(i,o){n=!0,Bi(i),r=o}}run(t,n,r){Mi(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(o,c){const l=$n(n);a.run(t,l,u);function u(m,d,h){const p=d||t;m?c(m):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Li("runSync","run",r),a;function i(o,c){Bi(o),a=c,r=!0}}stringify(t,n){this.freeze();const r=$n(n),a=this.compiler||this.Compiler;return Ar("stringify",a),Mi(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Dr("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[m,...d]=u;l(m,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(u.plugins),u.settings&&(a.settings=Er(!0,a.settings,u.settings))}function c(u){let m=-1;if(u!=null)if(Array.isArray(u))for(;++m<u.length;){const d=u[m];i(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,m){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...m]);else if(m.length>0){let[p,...x]=m;const b=r[h][1];ns(b)&&ns(p)&&(p=Er(!0,b,p)),r[h]=[u,p,...x]}}}}const Kg=new zs().freeze();function _r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ar(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mi(e){if(!ns(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Li(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $n(e){return Yg(e)?e:new nu(e)}function Yg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gg(e){return typeof e=="string"||Qg(e)}function Qg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Oi=[],Ti={allowDangerousHtml:!0},Xg=/^(https?|ircs?|mailto|xmpp)$/i,e1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ru(e){const t=t1(e),n=n1(e);return r1(t.runSync(t.parse(n),n),e)}function t1(e){const t=e.rehypePlugins||Oi,n=e.remarkPlugins||Oi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ti}:Ti;return Kg().use(P0).use(n).use(Ag,r).use(t)}function n1(e){const t=e.children||"",n=new nu;return typeof t=="string"&&(n.value=t),n}function r1(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,c=t.unwrapDisallowed,l=t.urlTransform||s1;for(const m of e1)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Jg+m.id,void 0);return Ts(e,u),gh(e,{Fragment:s.Fragment,components:a,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(m,d,h){if(m.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:m.value},d;if(m.type==="element"){let p;for(p in kr)if(Object.hasOwn(kr,p)&&Object.hasOwn(m.properties,p)){const x=m.properties[p],b=kr[p];(b===null||b.includes(m.tagName))&&(m.properties[p]=l(String(x||""),p,m))}}if(m.type==="element"){let p=n?!n.includes(m.tagName):i?i.includes(m.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(m,d,h)),p&&h&&typeof d=="number")return c&&m.children?h.children.splice(d,1,...m.children):h.children.splice(d,1),d}}}function s1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||Xg.test(e.slice(0,t))?e:""}function zi(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function a1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i1(e,t,n){const a=mr((n||{}).ignore||[]),i=o1(t);let o=-1;for(;++o<i.length;)tu(e,"text",c);function c(u,m){let d=-1,h;for(;++d<m.length;){const p=m[d],x=h?h.children:void 0;if(a(p,x?x.indexOf(p):void 0,h))return;h=p}if(h)return l(u,m)}function l(u,m){const d=m[m.length-1],h=i[o][0],p=i[o][1];let x=0;const y=d.children.indexOf(u);let k=!1,j=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const A=v.index,S={index:v.index,input:v.input,stack:[...m,u]};let F=p(...v,S);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?h.lastIndex=A+1:(x!==A&&j.push({type:"text",value:u.value.slice(x,A)}),Array.isArray(F)?j.push(...F):F&&j.push(F),x=A+v[0].length,k=!0),!h.global)break;v=h.exec(u.value)}return k?(x<u.value.length&&j.push({type:"text",value:u.value.slice(x)}),d.children.splice(y,1,...j)):j=[u],y+j.length}}function o1(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([l1(a[0]),u1(a[1])])}return t}function l1(e){return typeof e=="string"?new RegExp(a1(e),"g"):e}function u1(e){return typeof e=="function"?e:function(){return e}}const Br="phrasing",Ir=["autolink","link","image","label"];function c1(){return{transforms:[x1],enter:{literalAutolink:m1,literalAutolinkEmail:Pr,literalAutolinkHttp:Pr,literalAutolinkWww:Pr},exit:{literalAutolink:g1,literalAutolinkEmail:f1,literalAutolinkHttp:p1,literalAutolinkWww:h1}}}function d1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Br,notInConstruct:Ir},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Br,notInConstruct:Ir},{character:":",before:"[ps]",after:"\\/",inConstruct:Br,notInConstruct:Ir}]}}function m1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pr(e){this.config.enter.autolinkProtocol.call(this,e)}function p1(e){this.config.exit.autolinkProtocol.call(this,e)}function h1(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function f1(e){this.config.exit.autolinkEmail.call(this,e)}function g1(e){this.exit(e)}function x1(e){i1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,b1],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S}
558)([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),y1]],{ignore:["link","linkReference"]})}function b1(e,t,n,r,a){let i="";if(!su(a)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!w1(n)))return!1;const o=k1(n+r);if(!o[0])return!1;const c={type:"link",title:null,url:i+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[c,{type:"text",value:o[1]}]:c}function y1(e,t,n,r){return!su(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function w1(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function k1(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=zi(e,"(");let i=zi(e,")");for(;r!==-1&&a>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function su(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Zt(n)||ur(n))&&(!t||n!==47)}au.peek=A1;function v1(){this.buffer()}function C1(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j1(){this.buffer()}function E1(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function N1(e){this.exit(e)}function S1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _1(e){this.exit(e)}function A1(){return"["}function au(e,t,n,r){const a=n.createTracker(r);let i=a.move("[^");const o=n.enter("footnoteReference"),c=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),c(),o(),i+=a.move("]"),i}function D1(){return{enter:{gfmFootnoteCallString:v1,gfmFootnoteCall:C1,gfmFootnoteDefinitionLabelString:j1,gfmFootnoteDefinition:E1},exit:{gfmFootnoteCallString:F1,gfmFootnoteCall:N1,gfmFootnoteDefinitionLabelString:S1,gfmFootnoteDefinition:_1}}}function B1(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:au},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,i,o){const c=i.createTracker(o);let l=c.move("[^");const u=i.enter("footnoteDefinition"),m=i.enter("label");return l+=c.move(i.safe(i.associationId(r),{before:l,after:"]"})),m(),l+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),l+=c.move((t?`
559`:" ")+i.indentLines(i.containerFlow(r,c.current()),t?iu:I1))),u(),l}}function I1(e,t,n){return t===0?e:iu(e,t,n)}function iu(e,t,n){return(n?"":"    ")+e}const P1=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ou.peek=z1;function M1(){return{canContainEols:["delete"],enter:{strikethrough:O1},exit:{strikethrough:T1}}}function L1(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:P1}],handlers:{delete:ou}}}function O1(e){this.enter({type:"delete",children:[]},e)}function T1(e){this.exit(e)}function ou(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let o=a.move("~~");return o+=n.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),i(),o}function z1(){return"~"}function R1(e){return e.length}function $1(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||R1,i=[],o=[],c=[],l=[];let u=0,m=-1;for(;++m<e.length;){const b=[],y=[];let k=-1;for(e[m].length>u&&(u=e[m].length);++k<e[m].length;){const j=U1(e[m][k]);if(n.alignDelimiters!==!1){const v=a(j);y[k]=v,(l[k]===void 0||v>l[k])&&(l[k]=v)}b.push(j)}o[m]=b,c[m]=y}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)i[d]=Ri(r[d]);else{const b=Ri(r);for(;++d<u;)i[d]=b}d=-1;const h=[],p=[];for(;++d<u;){const b=i[d];let y="",k="";b===99?(y=":",k=":"):b===108?y=":":b===114&&(k=":");let j=n.alignDelimiters===!1?1:Math.max(1,l[d]-y.length-k.length);const v=y+"-".repeat(j)+k;n.alignDelimiters!==!1&&(j=y.length+j+k.length,j>l[d]&&(l[d]=j),p[d]=j),h[d]=v}o.splice(1,0,h),c.splice(1,0,p),m=-1;const x=[];for(;++m<o.length;){const b=o[m],y=c[m];d=-1;const k=[];for(;++d<u;){const j=b[d]||"";let v="",A="";if(n.alignDelimiters!==!1){const S=l[d]-(y[d]||0),F=i[d];F===114?v=" ".repeat(S):F===99?S%2?(v=" ".repeat(S/2+.5),A=" ".repeat(S/2-.5)):(v=" ".repeat(S/2),A=v):A=" ".repeat(S)}n.delimiterStart!==!1&&!d&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||d)&&k.push(" "),n.alignDelimiters!==!1&&k.push(v),k.push(j),n.alignDelimiters!==!1&&k.push(A),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&k.push("|")}x.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return x.join(`
560`)}function U1(e){return e==null?"":String(e)}function Ri(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function V1(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const o=n.indentLines(n.containerFlow(e,i.current()),H1);return a(),o}function H1(e,t,n){return">"+(n?"":" ")+e}function W1(e,t){return $i(e,t.inConstruct,!0)&&!$i(e,t.notInConstruct,!1)}function $i(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ui(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
561`&&W1(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
562`}function q1(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>o&&(o=i):i=1,a=r+t.length,r=n.indexOf(t,a);return o}function Z1(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function K1(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Y1(e,t,n,r){const a=K1(n),i=e.value||"",o=a==="`"?"GraveAccent":"Tilde";
vendor: 8,454 bytes, lines 562-571
562if(Z1(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(i,G1);return d(),h}const c=n.createTracker(r),l=a.repeat(Math.max(q1(i,a)+1,3)),u=n.enter("codeFenced");let m=c.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
563`,encode:["`"],...c.current()})),d()}return m+=c.move(`
564`),i&&(m+=c.move(i+`
565`)),m+=c.move(l),u(),m}function G1(e,t,n){return(n?"":"    ")+e}function Rs(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Q1(e,t,n,r){const a=Rs(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("definition");let c=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
566`,...l.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=l.move(" "+a),u+=l.move(n.safe(e.title,{before:u,after:a,...l.current()})),u+=l.move(a),c()),o(),u}function J1(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Fn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xn(e,t,n){const r=an(e),a=an(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}lu.peek=X1;function lu(e,t,n,r){const a=J1(n),i=n.enter("emphasis"),o=n.createTracker(r),c=o.move(a);let l=o.move(n.containerPhrasing(e,{after:a,before:c,...o.current()}));const u=l.charCodeAt(0),m=Xn(r.before.charCodeAt(r.before.length-1),u,a);m.inside&&(l=Fn(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Xn(r.after.charCodeAt(0),d,a);h.inside&&(l=l.slice(0,-1)+Fn(d));const p=o.move(a);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:m.outside},c+l+p}function X1(e,t,n){return n.options.emphasis||"*"}function ex(e,t){let n=!1;return Ts(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,es}),!!((!e.depth||e.depth<3)&&Ds(e)&&(t.options.setext||n))}function tx(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(ex(e,n)){const m=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...i.current(),before:`
567`,after:`
568`});return d(),m(),h+`
569`+(a===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
570`))+1))}const o="#".repeat(a),c=n.enter("headingAtx"),l=n.enter("phrasing");i.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
571`,...i.current()});return/^[\t ]/.test(u)&&(u=Fn(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),l(),c(),u}uu.peek=nx;function uu(e){return e.value||""}function nx(){return"<"}cu.peek=rx;function cu(e,t,n,r){const a=Rs(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let c=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=l.move(" "+a),u+=l.move(n.safe(e.title,{before:u,after:a,...l.current()})),u+=l.move(a),c()),u+=l.move(")"),o(),u}function rx(){return"!"}du.peek=sx;function du(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("![");const u=n.safe(e.alt,{before:l,after:"]",...c.current()});l+=c.move(u+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...c.current()});return o(),n.stack=m,i(),a==="full"||!u||u!==d?l+=c.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=c.move("]"),l}function sx(){return"!"}mu.peek=ax;function mu(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],c=n.compilePattern(o);let l;if(o.atBreak)for(;l=c.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return a+r+a}function ax(){return"`"}function pu(e,t){const n=Ds(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}hu.peek=ix;function hu(e,t,n,r){const a=Rs(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let c,l;if(pu(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),c(),n.stack=m,d}c=n.enter("link"),l=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=o.move(" "+a),u+=o.move(n.safe(e.title,{before:u,after:a,...o.current()})),u+=o.move(a),l()),u+=o.move(")"),c(),u}function ix(e,t,n){return pu(e,n)?"<":"["}fu.peek=ox;function fu(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const c=n.createTracker(r);let l=c.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...c.current()});l+=c.move(u+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...c.current()});return o(),n.stack=m,i(),a==="full"||!u||u!==d?l+=c.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=c.move("]"),l}function ox(){return"["}function $s(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function lx(e){const t=$s(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ux(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function gu(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cx(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?ux(n):$s(n);const c=e.ordered?o==="."?")":".":lx(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),gu(n)===o&&m){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=c),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,a(),u}function dx(e){const t=e.options.listItemIndent||"one";
vendor: 7,545 bytes, lines 571-573
571if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function mx(e,t,n,r){const a=dx(n);let i=n.bulletCurrent||$s(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const c=n.createTracker(r);c.move(i+" ".repeat(o-i.length)),c.shift(o);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,c.current()),m);return l(),u;function m(d,h,p){return h?(p?"":" ".repeat(o))+d:(p?i:i+" ".repeat(o-i.length))+d}}function px(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const hx=mr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fx(e,t,n,r){return(e.children.some(function(o){return hx(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gx(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xu.peek=xx;function xu(e,t,n,r){const a=gx(n),i=n.enter("strong"),o=n.createTracker(r),c=o.move(a+a);let l=o.move(n.containerPhrasing(e,{after:a,before:c,...o.current()}));const u=l.charCodeAt(0),m=Xn(r.before.charCodeAt(r.before.length-1),u,a);m.inside&&(l=Fn(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Xn(r.after.charCodeAt(0),d,a);h.inside&&(l=l.slice(0,-1)+Fn(d));const p=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:m.outside},c+l+p}function xx(e,t,n){return n.options.strong||"*"}function bx(e,t,n,r){return n.safe(e.value,r)}function yx(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function wx(e,t,n){const r=(gu(n)+(n.options.ruleSpaces?" ":"")).repeat(yx(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bu={blockquote:V1,break:Ui,code:Y1,definition:Q1,emphasis:lu,hardBreak:Ui,heading:tx,html:uu,image:cu,imageReference:du,inlineCode:mu,link:hu,linkReference:fu,list:cx,listItem:mx,paragraph:px,root:fx,strong:xu,text:bx,thematicBreak:wx};function kx(){return{enter:{table:vx,tableData:Vi,tableHeader:Vi,tableRow:jx},exit:{codeText:Ex,table:Cx,tableData:Mr,tableHeader:Mr,tableRow:Mr}}}function vx(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Cx(e){this.exit(e),this.data.inTable=void 0}function jx(e){this.enter({type:"tableRow",children:[]},e)}function Mr(e){this.exit(e)}function Vi(e){this.enter({type:"tableCell",children:[]},e)}function Ex(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Fx));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Fx(e,t){return t==="|"?t:e}function Nx(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
572`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:c}};function o(p,x,b,y){return u(m(p,b,y),p.align)}function c(p,x,b,y){const k=d(p,b,y),j=u([k]);return j.slice(0,j.indexOf(`
573`))}function l(p,x,b,y){const k=b.enter("tableCell"),j=b.enter("phrasing"),v=b.containerPhrasing(p,{...y,before:i,after:i});return j(),k(),v}function u(p,x){return $1(p,{align:x,alignDelimiters:r,padding:n,stringLength:a})}function m(p,x,b){const y=p.children;let k=-1;const j=[],v=x.enter("table");for(;++k<y.length;)j[k]=d(y[k],x,b);return v(),j}function d(p,x,b){const y=p.children;let k=-1;const j=[],v=x.enter("tableRow");for(;++k<y.length;)j[k]=l(y[k],p,x,b);return v(),j}function h(p,x,b){let y=bu.inlineCode(p,x,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Sx(){return{exit:{taskListCheckValueChecked:Hi,taskListCheckValueUnchecked:Hi,paragraph:Ax}}}function _x(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dx}}}function Hi(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ax(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const c=a[i];if(c.type==="paragraph"){o=c;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dx(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);i&&c.move(o);let l=bu.listItem(e,t,n,{...r,...c.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(m){return m+o}}function Bx(){return[c1(),D1(),M1(),kx(),Sx()]}function Ix(e){return{extensions:[d1(),B1(e),L1(),Nx(e),_x()]}}const Px={tokenize:Rx,partial:!0},yu={tokenize:$x,partial:!0},wu={tokenize:Ux,partial:!0},ku={tokenize:Vx,partial:!0},Mx={tokenize:Hx,partial:!0},vu={name:"wwwAutolink",tokenize:Tx,previous:ju},Cu={name:"protocolAutolink",tokenize:zx,previous:Eu},Bt={name:"emailAutolink",tokenize:Ox,previous:Fu},Nt={};function Lx(){return{text:Nt}}let $t=48;for(;$t<123;)Nt[$t]=Bt,$t++,$t===58?$t=65:$t===91&&($t=97);Nt[43]=Bt;Nt[45]=Bt;Nt[46]=Bt;Nt[95]=Bt;Nt[72]=[Bt,Cu];Nt[104]=[Bt,Cu];Nt[87]=[Bt,vu];Nt[119]=[Bt,vu];function Ox(e,t,n){const r=this;let a,i;return o;function o(d){return!ss(d)||!Fu.call(r,r.previous)||Us(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(d))}function c(d){return ss(d)?(e.consume(d),c):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(Mx,m,u)(d):d===45||d===95||Ye(d)?(i=!0,e.consume(d),l):m(d)}function u(d){return e.consume(d),a=!0,l}function m(d){return i&&a&&et(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Tx(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!ju.call(r,r.previous)||Us(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Px,e.attempt(yu,e.attempt(wu,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function zx(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&Eu.call(r,r.previous)&&!Us(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),e.consume(d),c):n(d)}function c(d){if(et(d)&&a.length<5)return a+=String.fromCodePoint(d),e.consume(d),c;if(d===58){const h=a.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?u:(i=!0,l)):n(d)}function u(d){return d===null||Gn(d)||Ie(d)||Zt(d)||ur(d)?n(d):e.attempt(yu,e.attempt(wu,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}
vendor: 5,527 bytes, line 573
573function Rx(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function $x(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(ku,l,c)(u):u===null||Ie(u)||Zt(u)||u!==45&&ur(u)?l(u):(i=!0,e.consume(u),o)}function c(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function l(u){return a||r||!i?n(u):t(u)}}function Ux(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ku,t,i)(o):o===null||Ie(o)||Zt(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function Vx(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),i):c===93?(e.consume(c),a):c===60||c===null||Ie(c)||Zt(c)?t(c):n(c)}function a(c){return c===null||c===40||c===91||Ie(c)||Zt(c)?t(c):r(c)}function i(c){return et(c)?o(c):n(c)}function o(c){return c===59?(e.consume(c),r):et(c)?(e.consume(c),o):n(c)}}function Hx(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return Ye(i)?n(i):t(i)}}function ju(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ie(e)}function Eu(e){return!et(e)}function Fu(e){return!(e===47||ss(e))}function ss(e){return e===43||e===45||e===46||e===95||Ye(e)}function Us(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Wx={tokenize:Xx,partial:!0};function qx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gx,continuation:{tokenize:Qx},exit:Jx}},text:{91:{name:"gfmFootnoteCall",tokenize:Yx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zx,resolveTo:Kx}}}}function Zx(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return c;function c(l){if(!o||!o._balanced)return n(l);const u=yt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Kx(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Yx(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return c;function c(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!o||d===null||d===91||Ie(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return a.includes(yt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ie(d)||(o=!0),i++,e.consume(d),d===92?m:u}function m(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function Gx(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,c;return l;function l(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(x)}function m(x){if(o>999||x===93&&!c||x===null||x===91||Ie(x))return n(x);if(x===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return i=yt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ie(x)||(c=!0),o++,e.consume(x),x===92?d:m}function d(x){return x===91||x===92||x===93?(e.consume(x),o++,m):m(x)}function h(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),a.includes(i)||a.push(i),Ce(e,p,"gfmFootnoteDefinitionWhitespace")):n(x)}function p(x){return t(x)}}
vendor: 6,285 bytes, line 573
573function Qx(e,t,n){return e.check(Dn,t,e.attempt(Wx,t,n))}function Jx(e){e.exit("gfmFootnoteDefinition")}function Xx(e,t,n){const r=this;return Ce(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function eb(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,c){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",m,c],["enter",o[u][1],c],["exit",o[u][1],c],["enter",d,c]],p=c.parser.constructs.insideSpan.null;p&&ct(h,h.length,0,cr(p,o.slice(u+1,l),c)),ct(h,h.length,0,[["exit",d,c],["enter",o[l][1],c],["exit",o[l][1],c],["exit",m,c]]),ct(o,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,c,l){const u=this.previous,m=this.events;let d=0;return h;function h(x){return u===126&&m[m.length-1][1].type!=="characterEscape"?l(x):(o.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const b=an(u);if(x===126)return d>1?l(x):(o.consume(x),d++,p);if(d<2&&!n)return l(x);const y=o.exit("strikethroughSequenceTemporary"),k=an(x);return y._open=!k||k===2&&!!b,y._close=!b||b===2&&!!k,c(x)}}}class tb{constructor(){this.map=[]}add(t,n,r){nb(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function nb(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function rb(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function sb(){return{flow:{null:{name:"table",tokenize:ab,resolveAll:ib}}}}function ab(e,t,n){const r=this;let a=0,i=0,o;return c;function c(C){let _=r.events.length-1;for(;_>-1;){const R=r.events[_][1].type;if(R==="lineEnding"||R==="linePrefix")_--;else break}const B=_>-1?r.events[_][1].type:null,U=B==="tableHead"||B==="tableRow"?F:l;return U===F&&r.parser.lazy[r.now().line]?n(C):U(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(o=!0,i+=1),m(C)}function m(C){return C===null?n(C):ue(C)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),p):n(C):be(C)?Ce(e,m,"whitespace")(C):(i+=1,o&&(o=!1,a+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,m):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||Ie(C)?(e.exit("data"),m(C)):(e.consume(C),C===92?h:d)}function h(C){return C===92||C===124?(e.consume(C),d):d(C)}function p(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),o=!1,be(C)?Ce(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):x(C))}function x(C){return C===45||C===58?y(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),b):S(C)}function b(C){return be(C)?Ce(e,y,"whitespace")(C):y(C)}function y(C){return C===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),k):C===45?(i+=1,k(C)):C===null||ue(C)?A(C):S(C)}function k(C){return C===45?(e.enter("tableDelimiterFiller"),j(C)):S(C)}function j(C){return C===45?(e.consume(C),j):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(C))}function v(C){return be(C)?Ce(e,A,"whitespace")(C):A(C)}function A(C){return C===124?x(C):C===null||ue(C)?!o||a!==i?S(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):S(C)}function S(C){return n(C)}function F(C){return e.enter("tableRow"),O(C)}function O(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),O):C===null||ue(C)?(e.exit("tableRow"),t(C)):be(C)?Ce(e,O,"whitespace")(C):(e.enter("data"),N(C))}function N(C){return C===null||C===124||Ie(C)?(e.exit("data"),O(C)):(e.consume(C),C===92?I:N)}function I(C){return C===92||C===124?(e.consume(C),N):N(C)}}function ib(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],c=!1,l=0,u,m,d;const h=new tb;for(;++n<e.length;){const p=e[n],x=p[1];p[0]==="enter"?x.type==="tableHead"?(c=!1,l!==0&&(Wi(h,t,l,u,m),m=void 0,l=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],o=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",m,t]])),a=x.type==="tableDelimiterRow"?2:m?3:1):a&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],d=Un(h,t,i,a,void 0,d),i=[0,0,0,0]),o[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],d=Un(h,t,i,a,void 0,d)),i=o,o=[i[1],n,0,0])):x.type==="tableHead"?(c=!0,l=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],d=Un(h,t,i,a,n,d)):o[1]!==0&&(
573d=Un(h,t,o,a,n,d)),a=0):a&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Wi(h,t,l,u,m),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=rb(t.events,n))}return e}function Un(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(i.end=Object.assign({},Xt(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Xt(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Xt(t.events,n[2]),m=Xt(t.events,n[3]),d={type:c,start:Object.assign({},u),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,b=n[3]-n[2]-1;e.add(x,b,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return a!==void 0&&(i.end=Object.assign({},Xt(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function Wi(e,t,n,r,a){const i=[],o=Xt(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Xt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ob={name:"tasklistCheck",tokenize:ub};function lb(){return{text:{91:ob}}}function ub(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ie(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(l)}function c(l){return ue(l)?t(l):be(l)?e.check({tokenize:cb},t,n)(l):n(l)}}function cb(e,t,n){return Ce(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function db(e){return Ml([Lx(),qx(),eb(e),sb(),lb()])}const mb={};function Nu(e){const t=this,n=e||mb,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(db(n)),i.push(Bx()),o.push(Ix(n))}const pb="{{ratio_card}}",hb=({ratio:e})=>{const{t}=ye();return s.jsx("span",{className:"my-1 ml-[22px] inline-block text-lg font-bold leading-relaxed text-primary",children:t("当前返佣比例:{{ratio}}%",{ratio:e})})},fb={h1:e=>s.jsx("h2",{...e,className:"mb-3 mt-5 text-lg font-bold text-base-content"}),h2:e=>s.jsx("h3",{...e,className:"mb-2.5 mt-5 text-base font-bold text-base-content"}),h3:e=>s.jsx("h4",{...e,className:"mb-2 mt-4 text-sm font-semibold text-base-content"}),p:e=>s.jsx("p",{...e,className:"my-2 leading-7 text-base-content/70"}),ul:e=>s.jsx("ul",{...e,className:"my-2 list-disc space-y-0.5 pl-[22px] leading-8"}),ol:e=>s.jsx("ol",{...e,className:"my-2 list-decimal space-y-0.5 pl-[22px] leading-8"}),li:e=>s.jsx("li",{...e,className:"text-base-content/70"}),strong:e=>s.jsx("strong",{...e,className:"font-bold text-base-content"}),hr:()=>s.jsx("hr",{className:"my-4 border-0 border-t border-base-300"}),blockquote:e=>s.jsx("div",{...e,className:"alert my-3.5 block border-success/30 bg-success/10 px-4 py-3 font-semibold text-success [&>p]:text-success [&_strong]:text-success"})},gb=({content:e,ratio:t})=>{const n=f.useMemo(()=>(e||"").split(pb),[e]);return s.jsx("div",{className:"text-base-content/70",children:n.map((r,a)=>s.jsxs(f.Fragment,{children:[s.jsx(ru,{remarkPlugins:[Nu],components:fb,children:r}),a<n.length-1&&s.jsx(hb,{ratio:t})]},a))})},Lr=8,xb=e=>{if(!e)return"-";const t=String(e);return`${t.slice(0,4)}-${t.slice(4)}`},bb=e=>e?Yu(new Date(e*1e3),{dateStyle:"short",timeStyle:"medium"}):"-",yb={0:{text:"待处理",className:"badge-warning"},1:{text:"已打款",className:"badge-success"},2:{text:"已驳回",className:"badge-error"}},qi=({columns:e,rows:t,loading:n,emptyText:r,page:a,onPageChange:i})=>{const o=Math.max(1,Math.ceil(t.length/Lr)),c=Math.min(a,o),l=t.slice((c-1)*Lr,c*Lr);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"table table-sm",children:[s.jsx("thead",{children:s.jsx("tr",{children:e.map(u=>s.jsx("th",{children:u.title},u.dataIndex))})}),s.jsx("tbody",{children:n?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:"py-8 text-center",children:s.jsx("span",{className:"loading loading-spinner loading-md"})})}):l.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,className:"py-8 text-center text-base-content/60",children:r})}):l.map((u,m)=>s.jsx("tr",{children:e.map(d=>{const h=u[d.dataIndex];return s.jsx("td",{children:d.render?d.render(h,u):h},d.dataIndex)})},m))})]})}),o>1&&s.jsx("div",{className:"mt-3 flex justify-end",children:s.jsxs("div",{className:"join",children:[s.jsx("button",{type:"button",className:"btn btn-sm join-item",disabled:c<=1,onClick:()=>i(c-1),children:"‹"}),s.jsxs("span",{className:"btn btn-sm join-item pointer-events-none",children:[c," / ",o]}),s.jsx("button",{type:"button",className:"btn btn-sm join-item",disabled:c>=o,onClick:()=>i(c+1),children:"›"})]})})]})},wb=({visible:e,onCancel:t,onChanged:n})=>{const{t:r}=ye(),[a,i]=f.useState(null),[o,c]=f.useState([]),[l,u]=f.useState([]),[m,d]=f.useState(!1),[h,p]=f.useState("settlements"),[x,b]=f.useState(1),[y,k]=f.useState(1),[j,v]=f.useState(!1),[A,S]=f.useState(!1),[F,O]=f.useState(),[N,I]=f.useState(),[C,_]=f.useState(""),[B,U]=f.useState(!1),R=()=>{d(!0),Promise.all([Y.get("/api/signing/reward/self"),Y.get("/api/signing/reward/withdraws")]).then(([g,P])=>{g.data.success&&(i(H.get(g,"data.data.account",null)),c(H.get(g,"data.data.settlements",[]))),P.data.success&&u(H.get(P,"data.data.items",[]))}).catch(W).finally(()=>d(!1))};f.useEffect(()=>{e&&R()},[e]);const M=Number(H.get(a,"balance",0)),K=()=>
573{if(!F||F<=0){W(r("请输入划转金额"));return}U(!0),Y.post("/api/signing/reward/transfer",{amount:F},{skipError:!0}).then(g=>{g.data.success?(fe(r("划转成功,已到账充值额度")),v(!1),O(void 0),R(),n?.()):W(r(g.data.message))}).catch(W).finally(()=>U(!1))},ee=()=>{if(!N||N<100){W(r("单笔提现金额不得低于 ¥100"));return}if(!C.trim()){W(r("请填写收款信息"));return}U(!0),Y.post("/api/signing/reward/withdraw",{amount:N,account_info:C},{skipError:!0}).then(g=>{g.data.success?(fe(r("提现申请已提交")),S(!1),I(void 0),_(""),R()):W(r(g.data.message))}).catch(W).finally(()=>U(!1))},le=[{title:r("月份"),dataIndex:"period",render:xb},{title:r("下级充值消耗"),dataIndex:"base_amount",render:g=>Xe(g)},{title:r("比例"),dataIndex:"ratio",render:g=>`${g}%`},{title:r("返佣金额"),dataIndex:"rebate_amount",render:g=>Xe(g)},{title:r("状态"),dataIndex:"status",render:g=>s.jsx("span",{className:`badge badge-soft badge-sm ${g===1?"badge-success":"badge-warning"}`,children:r(g===1?"已发放":"待发放")})}],se=[{title:r("金额"),dataIndex:"amount",render:g=>Xe(g)},{title:r("状态"),dataIndex:"status",render:g=>{const P=yb[g]||{text:"-",className:"badge-neutral"};return s.jsx("span",{className:`badge badge-soft badge-sm ${P.className}`,children:r(P.text)})}},{title:r("申请时间"),dataIndex:"created_at",render:bb},{title:r("备注"),dataIndex:"remark"}];return s.jsxs(Ne,{open:e,onClose:t,title:r("我的激励"),showCloseButton:!0,className:"max-w-[680px]",children:[s.jsxs("div",{className:"rounded-box bg-primary/10 px-6 py-5",children:[s.jsx("div",{className:"text-[13px] text-base-content/60",children:r("奖励余额(灵石)")}),s.jsx("div",{className:"text-4xl font-extrabold leading-tight text-primary",children:Xe(M)}),s.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-xs text-base-content/50",children:[s.jsxs("span",{children:[r("累计返佣:"),Xe(H.get(a,"total_earned",0))]}),s.jsxs("span",{children:[r("累计提现:"),Xe(H.get(a,"total_withdrawn",0))]}),s.jsxs("span",{children:[r("累计划转:"),Xe(H.get(a,"total_transferred",0))]})]}),s.jsxs("div",{className:"mt-3.5 flex flex-wrap gap-2",children:[s.jsx(oe,{onClick:()=>v(!0),children:r("划转到充值余额")}),s.jsx("button",{type:"button",className:"btn",onClick:()=>S(!0),children:r("申请提现")})]})]}),s.jsxs("div",{role:"tablist",className:"tabs tabs-border mt-4",children:[s.jsx("button",{type:"button",role:"tab",className:`tab ${h==="settlements"?"tab-active":""}`,"aria-selected":h==="settlements",onClick:()=>p("settlements"),children:r("结算记录")}),s.jsx("button",{type:"button",role:"tab",className:`tab ${h==="withdraws"?"tab-active":""}`,"aria-selected":h==="withdraws",onClick:()=>p("withdraws"),children:r("提现记录")})]}),s.jsx("div",{className:"mt-2",children:h==="settlements"?s.jsx(qi,{columns:le,rows:o,loading:m,emptyText:r("暂无结算记录"),page:x,onPageChange:b}):s.jsx(qi,{columns:se,rows:l,loading:m,emptyText:r("暂无提现记录"),page:y,onPageChange:k})}),s.jsxs(Ne,{open:j,onClose:()=>v(!1),title:r("划转到充值余额"),showCloseButton:!0,footer:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:()=>v(!1),children:r("取消")}),s.jsx(oe,{loading:B,onClick:K,children:r("确定")})]}),children:[s.jsxs("p",{className:"text-base-content/60",children:[r("可划转余额"),":",Xe(M)]}),s.jsx("input",{type:"number",className:"input mt-3 w-full leading-[normal]",min:"0.01",max:M,step:"0.01",placeholder:r("请输入划转金额(元)"),value:F??"",onChange:g=>O(g.target.value===""?void 0:Number(g.target.value))}),s.jsx("p",{className:"mt-2 text-sm text-base-content/60",children:r("划转后将按平台汇率转为充值额度,即时到账")})]}),s.jsxs(Ne,{open:A,onClose:()=>S(!1),title:r("申请提现"),showCloseButton:!0,footer:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:()=>S(!1),children:r("取消")}),s.jsx(oe,{loading:B,onClick:ee,children:r("确定")})]}),children:[s.jsxs("p",{className:"text-base-content/60",children:[r("可提现余额"),":",Xe(M)]}),s.jsx("input",{type:"number",className:"input mt-3 w-full leading-[normal]",min:"100",max:M,step:"0.01",placeholder:r("请输入提现金额(单笔不低于100元)"),value:N??"",onChange:g=>I(g.target.value===""?void 0:Number(g.target.value))}),s.jsx("input",{type:"text",className:"input mt-3 w-full leading-[normal]",placeholder:r("收款信息(银行卡号/开户行/姓名)"),value:C,onChange:g=>_(g.target.value)})]})]})},Vn=3e3,kb=e=>{switch(e){case 0:return"badge-info";case 1:return"badge-success";case 2:return"badge-error";default:return"badge-neutral"}},vb=(e,t)=>{switch(e){case 0:return t("待审核");case 1:return t("已通过");case 2:return t("已拒绝");default:return t("未申请")}},Cb=({activity:e,userApplication:t,onUpdated:n})=>{const{t:r}=ye(),[a,i]=f.useState("view"),[o,c]=f.useState(""),{run:l,loading:u}=ve(y=>Y.post("/api/activity/application",y),{manual:!0,onSuccess:()=>{fe(r("提交成功")),i("view"),c(""),n?.()},onError:y=>W(y)}),{run:m,loading:d}=ve((y,k)=>Y.put(`/api/activity/application/${y}`,k),{manual:!0,onSuccess:()=>{fe(r("更新成功")),i("view"),c(""),n?.()},onError:y=>W(y)}),h=()=>{t&&t.status===0?c(t.content):c(""),i("edit")},p=()=>{c(""),i("view")},x=()=>{const y=o.trim();if(!y){W(r("请输入申请内容"));return}if(y.length>Vn){W(r("申请内容不能超过 {{max}} 字",{max:Vn}));return}t&&t.status===0?m(t.id,{content:y}):l({activity_id:e.id,content:y})};if(a==="view")return t?s.jsxs("div",{className:"mt-4 border-t border-base-300 pt-4",children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"text-sm text-base-content/60",children:[r("我的申请"),s.jsx("span",{className:`badge badge-soft badge-sm ml-2 ${kb(t.status)}`,children:vb(t.status,r)})]}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:h,children:t.status===0?r("修改申请"):r("重新申请")})]}),s.jsx("div",{className:"mb-2 whitespace-pre-wrap break-all rounded-box bg-base-200 p-3 text-base-content",children:t.content}),t.status===2&&t.admin_note&&s.jsx("div",{className:"alert alert-error alert-soft mb-2 whitespace-pre-wrap break-all p-3 text-sm",children:s.jsxs("span",{children:[s.jsxs("span",{className:"font-medium",children:[r("拒绝原因"),":"]}),t.admin_note]})})]}):s.jsx("div",{className:"mt-4 flex justify-end border-t border-base-300 pt-4",children:s.jsx(oe,{size:"sm",onClick:h,children:r("创建申请")})});const b=t&&t.status===0;return s.jsxs("div",{className:"mt-4 border-t border-base-300 pt-4",children:[s.jsx("div",{className:"mb-3 text-sm text-base-content/60",children:r(b?"修改申请内容:":"请输入申请内容:")}),s.jsx("textarea",{placeholder:r("请输入申请内容..."),value:o,onChange:y=>c(y.target.value),maxLength:Vn,className:"textarea mb-1 min-h-[100px] w-full leading-[normal]"}),s.jsxs("div",{className:"mb-3 text-right text-xs text-base-content/50",children:[o.length," / ",Vn]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{type:"button",className:"btn btn-sm",onClick:p,children:r("取消")}),s.jsx(oe,{size:"sm",onClick:x,loading:u||d,children:r(b?"更新申请":"提交申请")})]})]})}
573,jb=s.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),Eb=({onApplicationUpdated:e})=>{const{t}=ye(),n=Ft(),[r,a]=f.useState(!1),[i,o]=f.useState(),c=f.useMemo(()=>{const y=new URLSearchParams(n.search);return{id:y.get("activity_id")||y.get("activityId"),name:y.get("activity_name")||y.get("activityName")}},[n.search]),{data:l,loading:u,refresh:m}=ve(()=>Y.get("/api/activity_list")),d=H.get(l,"data.data",[]);f.useEffect(()=>{if(!(d.length<=0)){if(c.id||c.name){const y=(c.name||"").trim().toLowerCase(),k=d.find(j=>!!(c.id&&String(j.id)===String(c.id)||y&&String(j.name||"").trim().toLowerCase()===y));if(k){a(!0),o([k.id]);return}}o([d[0].id])}},[d,c]);const h=d.length,p=d[0]?.name||t("暂无活动"),x="group relative flex min-h-[216px] min-w-0 flex-[1_1_320px] cursor-pointer flex-col overflow-hidden rounded-[4px] border border-[var(--ac-card-border)] bg-[var(--ac-card-bg)] p-6 transition-all hover:border-[var(--ac-primary)] hover:shadow-[0_12px_28px_rgba(31,35,41,0.08)]",b=(y,k)=>{o((j=[])=>k?[...new Set([...j,y])]:j.filter(v=>v!==y))};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:x,children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center",children:s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-6 w-6"})}),s.jsx("div",{className:"min-w-0 flex-1 text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:t("专题活动")}),s.jsx("div",{className:"rounded-full bg-[var(--ac-primary-soft)] px-3 py-[3px] text-xs leading-[18px] text-[var(--ac-primary)]",children:t("上不封顶")})]}),s.jsx("button",{type:"button",className:"mb-4 min-h-20 text-left text-sm leading-5 text-[var(--ac-text-secondary)] transition-colors hover:text-[var(--ac-primary)]",onClick:()=>a(!0),children:p&&p!==t("暂无活动")?p:t("AI传播者计划,讲述你的 AiPy 故事,获得更多灵石。")}),s.jsxs("div",{className:"mt-auto flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-sm leading-5 text-[var(--ac-text-muted)] [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 [&_svg]:fill-[#2CC970]",children:[jb,s.jsxs("span",{children:[s.jsx("span",{className:"text-[var(--ac-primary)]",children:h})," ",t("个活动进行中")]})]}),s.jsx("button",{type:"button",className:"h-8 rounded-[4px] bg-[var(--ac-primary)] px-6 text-sm font-medium leading-5 text-white transition-colors hover:bg-[var(--ac-primary-hover)]",onClick:()=>a(!0),children:t("更多活动")})]})]}),s.jsx(Ne,{open:r,onClose:()=>a(!1),title:t("近期活动详情"),showCloseButton:!0,className:"max-w-[700px]",children:s.jsx("div",{className:"flex min-h-[280px] max-h-[500px] w-full flex-col overflow-y-auto",children:u?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}):d.length===0?s.jsx("div",{className:"flex flex-1 items-center justify-center px-4 text-center text-base-content/60",children:t("暂无活动")}):d.map(y=>s.jsx("div",{className:"w-full",children:s.jsxs("div",{className:"collapse collapse-
573arrow border-b border-base-300",children:[s.jsx("input",{type:"checkbox",checked:i?.includes(y.id)||!1,onChange:k=>b(y.id,k.target.checked)}),s.jsx("div",{className:"collapse-title pr-12",children:s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.jsx("span",{className:"font-medium",children:y.name}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"tooltip","data-tip":t("奖励金额"),children:s.jsx("span",{className:"badge badge-secondary badge-soft",children:ft(y.quota)})}),s.jsx("div",{className:"tooltip","data-tip":y.start_date&&y.end_date?`${new Date(y.start_date*1e3).toLocaleDateString()} - ${new Date(y.end_date*1e3).toLocaleDateString()}`:t("长期有效"),children:s.jsx("svg",{className:"h-4 w-4 text-info",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm1 11h-6V7h2v4h4Z"})})})]})]})}),s.jsxs("div",{className:"collapse-content",children:[s.jsx("div",{className:"break-all",children:s.jsx(ru,{remarkPlugins:[Nu],components:{p:({children:k})=>s.jsx("p",{className:"!leading-[1.8]",children:k}),a:({children:k,href:j})=>s.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:k}),img:({src:k,alt:j})=>s.jsx("img",{src:k,alt:j,className:"max-w-full rounded-lg"}),ul:({children:k})=>s.jsx("ul",{className:"my-1 list-disc pl-5",children:k}),ol:({children:k})=>s.jsx("ol",{className:"my-1 list-decimal pl-5",children:k}),h1:({children:k})=>s.jsx("h3",{className:"mb-1 mt-3 text-lg font-bold",children:k}),h2:({children:k})=>s.jsx("h4",{className:"mb-1 mt-2 text-base font-bold",children:k}),h3:({children:k})=>s.jsx("h5",{className:"mb-1 mt-2 text-sm font-semibold",children:k}),blockquote:({children:k})=>s.jsx("blockquote",{className:"my-2 border-l-4 border-primary/30 pl-3 text-base-content/70",children:k}),code:({children:k})=>s.jsx("code",{className:"rounded bg-base-200 px-1 py-0.5 text-sm",children:k}),pre:({children:k})=>s.jsx("pre",{className:"my-2 overflow-x-auto rounded-lg bg-base-200 p-3 text-sm",children:k})},children:(y.desc||"").replace(/<br\s*\/?>/gi,`\\
574`)})}),s.jsx(Cb,{activity:y,userApplication:y.user_application,onUpdated:()=>{e?.(),m()}})]})]})},y.id))})})]})};function Fb(e,t=!0){const{t:n}=ye(),[r,a]=f.useState(!1),{data:i,loading:o,refresh:c}=ve(()=>Y.get("/api/user/checkin/status"),{skipError:!0,ready:t}),l=H.get(i,"data.data",{}),u=!!i,m=H.get(l,"cycle_day",0),d=H.get(l,"captcha_min_cycle_day",1/0),h=H.get(l,"checked_in_today",!1),p=H.get(l,"today_base_reward",5e5),x=H.get(l,"today_total_reward",p),b=H.get(l,"ladder",[]),y=H.get(l,"next_milestone",null),k=(()=>{const v=b.reduce((A,S)=>Math.max(A,S.bonus),0);return p+v})(),{run:j}=ve(()=>Y.post("/api/user/checkin"),{manual:!0,onBefore:()=>a(!0),onFinally:()=>a(!1),onSuccess:v=>{if(H.get(v,"data.success",!1)){const A=H.get(v,"data.data.total_reward",0),S=H.get(v,"data.data.milestone_reward",0);S>0?fe(n("🎉 签到成功,+{{reward}} 已到账「赠送灵石」(含里程碑加赠 {{bonus}})",{reward:Ve(A,2),bonus:Ve(S,2)})):fe(n("🎉 签到成功,+{{reward}} 已到账「赠送灵石」",{reward:Ve(A,2)})),c(),e?.()}else W(H.get(v,"data.message",n("签到失败")))}});return{loading:o,hasStatusData:u,checking:r,refresh:c,doCheckin:j,cycleDay:m,captchaMinDay:d,checkedInToday:h,baseReward:p,todayTotalReward:x,ladder:b,nextMilestone:y,maxDayReward:k}}const je={indigo:"var(--ck-indigo-text)",indigoLight:"var(--ck-done-bg)",amber:"#f59e0b",amberText:"var(--ck-amber-text)",amberLight:"var(--ck-today-bg)",amberTagBg:"var(--ck-tag-bg)",amberTagText:"var(--ck-tag-text)",gold:"#fde68a",orangeGrad:"linear-gradient(135deg, #fbbf24, #f97316)",greenDone:"#10b981",grayText:"var(--ck-muted-text)",grayBorder:"var(--ck-border)",bodyText:"var(--ck-body-text)",titleText:"var(--ck-title-text)",cardBg:"var(--ck-card-bg)",trackBg:"var(--ck-track-bg)",startBg:"var(--ck-start-bg)",startBorder:"var(--ck-start-border)"};function Nb({cycleDay:e,captchaMinDay:t,todayReward:n,checkedInToday:r,checking:a,onCheckin:i}){const{t:o}=ye(),c=Ve(n,2),l=" 灵石",u=c.endsWith(l),m=u?c.slice(0,-l.length):c,d=s.jsx("button",{disabled:a||r,onClick:i,style:{border:"none",cursor:r?"default":"pointer",background:r?je.greenDone:je.orangeGrad,color:"#fff",fontSize:17,fontWeight:800,padding:"14px 46px",borderRadius:999,boxShadow:r?"none":"0 8px 20px rgba(249,115,22,0.45)",transition:"transform 0.2s",opacity:a?.7:1},children:a?o("签到中..."):r?o("已签到 ✅"):o("立即签到 +{{reward}}",{reward:Ve(n,0)})});return s.jsxs("div",{style:{background:"linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7)",color:"#fff",padding:"26px 30px",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:16},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{fontSize:22,fontWeight:800,display:"flex",alignItems:"center",gap:10},children:[o("📅 每日签到领灵石"),s.jsx("span",{style:{fontSize:12,fontWeight:500,background:"rgba(255,255,255,0.22)",padding:"2px 10px",borderRadius:999},children:o("每日可领 · 无门槛")})]}),s.jsxs("div",{style:{marginTop:10,fontSize:14,opacity:.95},children:[o("🔥 已连续签到")," ",s.jsx("b",{style:{fontSize:26,color:je.gold},children:e})," ",o("天")," | ",o("今日签到可领")," ",s.jsx("b",{style:{fontSize:26,color:je.gold},children:m}),u?` ${o("灵石")}`:""]})]}),e>=t?s.jsx(At,{children:d}):d]})}function Sb({cycleDay:e,ladder:t,nextMilestone:n,baseReward:r}){const{t:a}=ye(),i=[{day:0,bonus:0,status:e>0?"passed":"start",isStart:!0},...t],o=(()=>
574{if(i.length<=1)return 0;let l=-1;for(let b=0;b<i.length;b++)if(i[b].status!=="achieved"&&i[b].status!=="passed"&&i[b].status!=="start"){l=b;break}if(l<0)return 100;const u=i[l].day,m=l-1,d=m>=0?i[m].day:0,h=u>d?(e-d)/(u-d):0,p=l/(i.length-1)*100,x=m>=0?m/(i.length-1)*100:0;return Math.min(Math.max(x+(p-x)*h,0),100)})(),c=l=>i.length<=1?50:l/(i.length-1)*100;return s.jsxs("div",{style:{padding:"24px 30px 28px"},children:[s.jsx("div",{style:{fontSize:16,fontWeight:700,marginBottom:6,color:je.titleText},children:a("🏔️ 连续签到阶梯加赠(30 天一轮)")}),s.jsx("div",{style:{fontSize:12.5,color:je.bodyText,marginBottom:18},children:n?s.jsxs(s.Fragment,{children:[a("再签")," ",s.jsxs("b",{style:{color:je.amber},children:[n.day-e," ",a("天")]})," ",a("达成「连续 {{day}} 天」",{day:n.day}),a(",当日合计可领")," ",s.jsx("b",{style:{color:je.amber},children:Ve(n.bonus+r,0)}),a(";中断任意一天连续天数清零重算")]}):a("本轮已满签,继续签到开启新一轮;中断任意一天连续天数清零重算")}),s.jsxs("div",{style:{position:"relative",margin:"24px 20px 0"},children:[s.jsx("div",{style:{position:"relative",height:10,background:je.trackBg,borderRadius:99},children:s.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:`${Math.min(o,100)}%`,borderRadius:99,background:"linear-gradient(90deg, #4f46e5, #a855f7, #f59e0b)"}})}),s.jsx("div",{style:{position:"relative",height:100,marginTop:-24},children:i.map((l,u)=>{const m=l.isStart,d=l.status==="achieved"||l.status==="passed",h=l.status==="next"||l.status==="today",p=c(u);return s.jsxs("div",{style:{position:"absolute",left:`${p}%`,transform:"translateX(-50%)",textAlign:"center",width:80},children:[s.jsx("div",{style:{width:38,height:38,margin:"0 auto",borderRadius:"50%",background:m?je.startBg:d?je.indigoLight:h?je.amberLight:je.cardBg,border:`3px solid ${m?je.startBorder:d?je.indigo:h?je.amber:je.grayBorder}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:800,color:m?je.grayText:d?je.indigo:h?je.amberText:je.grayText},children:l.day}),s.jsx("div",{style:{marginTop:8,fontSize:12.5,fontWeight:700,color:je.titleText},children:m?a("第0天"):a("连续{{day}}天",{day:l.day})}),!m&&s.jsxs("div",{style:{fontSize:11.5,color:je.amber,fontWeight:700},children:["+",Ve(l.bonus,0)]}),!m&&h&&s.jsx("span",{style:{display:"inline-block",marginTop:4,fontSize:10,background:je.amberTagBg,color:je.amberTagText,borderRadius:6,padding:"1px 6px"},children:a("即将达成")})]},u)})})]})]})}function _b({baseReward:e,ladder:t}){const{t:n}=ye(),r=t.map(l=>l.day).join("/"),a=t.map(l=>Ve(l.bonus,0)).join("/"),i=e*30,o=t.reduce((l,u)=>l+u.bonus,0),c=i+o;return s.jsxs("div",{style:{background:je.cardBg,borderRadius:12,border:`1px solid ${je.grayBorder}`,padding:"16px 26px",fontSize:12,color:je.bodyText,lineHeight:1.8},children:[s.jsx("div",{style:{color:je.titleText,fontSize:13.5,fontWeight:700,marginBottom:6},children:n("📜 活动规则")}),s.jsx("div",{children:n("1. 每日签到领取 {{reward}},每日 0 点刷新,当日未领不可补领",{reward:Ve(e,0)})}),s.jsx("div",{children:n("2. 连续签到达成 {{days}} 天节点,当日额外加赠 {{bonuses}}",{days:r,bonuses:a})}),s.jsx("div",{children:n("3. 30 天为一轮,满签后自动开启新一轮;中断任意一天,连续天数清零重新计算")}),s.jsx("div",{children:n("4. 满签一轮累计可获 {{total}}(基础 {{base}} + 阶梯 {{milestone}}),奖励全部进入「赠送灵石」",{total:Ve(c,0),base:Ve(i,0),milestone:Ve(o,0)})}),s.jsx("div",{children:n("5. 活动最终解释权归Trustoken所有,异常账号将被冻结奖励发放")})]})}function Ab({visible:e,onClose:t,checkin:n}){const{t:r}=ye(),{loading:a,hasStatusData:i,checking:o,doCheckin:c,refresh:l,cycleDay:u,captchaMinDay:m,checkedInToday:d,baseReward:h,todayTotalReward:p,ladder:x,nextMilestone:b}=n,y=!i&&a;return s.jsx(Ne,{open:e,onClose:()=>{t(),l()},title:r("签到活动"),showCloseButton:!0,className:"max-w-[900px]",children:y?s.jsx("div",{className:"grid min-h-[360px] place-items-center",children:s.jsx("span",{className:"loading loading-spinner loading-lg",role:"status","aria-label":r("加载中")})}):s.jsxs("div",{className:"checkin-modal",children:[s.jsxs("div",{style:{background:je.cardBg,borderRadius:12,border:`1px solid ${je.grayBorder}`,overflow:"hidden",marginBottom:22}
574,children:[s.jsx(Nb,{cycleDay:u,captchaMinDay:m,todayReward:p,checkedInToday:d,checking:o,onCheckin:()=>c()}),s.jsx(Sb,{cycleDay:u,ladder:x,nextMilestone:b,baseReward:h})]}),s.jsx(_b,{baseReward:h,ladder:x})]})})}const Su="rounded-[4px] border border-[var(--ac-card-border)] bg-[var(--ac-card-bg)]",Zi="h-8 rounded-[4px] bg-[var(--ac-primary)] px-6 text-sm font-medium text-white transition-colors hover:bg-[var(--ac-primary-hover)] disabled:cursor-not-allowed disabled:opacity-60",Db="h-8 cursor-not-allowed rounded-[4px] bg-[var(--ac-progress-bg)] px-6 text-sm font-medium text-[var(--ac-text-muted)]",Bb=({children:e})=>s.jsxs("div",{className:"mb-5 flex items-center gap-2 text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:[s.jsx("span",{className:"h-4 w-[3px] shrink-0 bg-[var(--ac-primary)]"}),s.jsx("span",{children:e})]}),Ib={daily_ai_1:{icon:"🤖"},daily_ai_5:{icon:"🤖"}};function Pb(e){const{t}=ye(),[n,r]=f.useState(!1),{data:a,loading:i,refresh:o}=ve(()=>Y.get("/api/user/daily_tasks/status"),{skipError:!0}),c=H.get(a,"data.data.tasks",[]),{run:l}=ve(u=>Y.post("/api/user/daily_tasks/claim",{task_type:u}),{manual:!0,onBefore:()=>r(!0),onFinally:()=>r(!1),onSuccess:(u,[m])=>{if(H.get(u,"data.success",!1)){const d=H.get(u,"data.data.reward",0);fe(t("🎉 任务奖励 {{reward}} 已到账「赠送灵石」",{reward:Ve(d,2)})),o(),e?.()}else W(t(H.get(u,"data.message","领取失败")))}});return{loading:i,claiming:n,tasks:c,refresh:o,claimTask:l}}function Mb({task:e,claiming:t,onClaim:n,t:r}){const a=Ib[e.task_type]||{icon:"✨"},i=Ve(e.reward,2),o=H.get(e,"progress",0),c=H.get(e,"target",0),l=()=>{if(e.status==="claimed")return s.jsx("button",{className:Db,disabled:!0,children:r("已领取")});if(e.status==="claimable")return s.jsx("button",{className:Zi,disabled:t,onClick:()=>n(e.task_type),children:r(t?"领取中...":"领取")});const u=e.status==="in_progress"&&o===0;return s.jsx("button",{className:Zi,disabled:u,onClick:()=>{window.aipy&&typeof window.aipy.send=="function"?window.aipy.send("browser:navigate","/",{}):rn(r("请打开 AiPy 主界面完成任务"))},children:r("去完成")})};return s.jsxs("section",{className:`${Su} flex min-h-[216px] min-w-0 flex-[1_1_320px] flex-col gap-2 p-6`,children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--ac-primary-soft)] text-xl",children:a.icon}),s.jsx("div",{className:"min-w-0 flex-1 text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:r(e.title)})]}),s.jsxs("div",{className:"min-h-20 text-sm leading-5 text-[var(--ac-text-secondary)]",children:[r("奖励")," ",s.jsx("span",{className:"font-medium text-[var(--ac-primary)]",children:i}),r("(进入赠送灵石)"),s.jsxs("div",{className:"mt-1 text-xs text-[var(--ac-text-muted)]",children:[r("今日进度:"),o,"/",c]})]}),s.jsx("div",{className:"mt-auto flex flex-wrap items-center justify-end gap-3",children:l()})]})}function Lb({loading:e,claiming:t,tasks:n,claimTask:r,t:a}){return s.jsxs("div",{children:[s.jsx(Bb,{children:a("做任务领灵石")}),s.jsx("div",{className:"flex flex-wrap gap-4",children:e&&n.length===0?[0,1,2].map(i=>s.jsx("div",{className:`${Su} h-[200px] min-w-0 flex-[1_1_320px] animate-pulse`},i)):n.map(i=>s.jsx(Mb,{task:i,claiming:t,onClaim:r,t:a},i.task_type))})]})}const Ki=e=>f.createElement("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},f.createElement("title",null,"编组 9"),f.createElement("g",{id:"Trustoken-\\u63A7\\u5236\\u53F0",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},f.createElement("g",{id:"\\u63A7\\u5236\\u53F0-\\u4E2A\\u4EBA\\u8BBE\\u7F6E",transform:"translate(-466.
574000000, -680.000000)",fillRule:"nonzero"},f.createElement("g",{id:"\\u7F16\\u8F91\\u8272\\u5757",transform:"translate(466.000000, 680.000000)"},f.createElement("rect",{id:"\\u77E9\\u5F62",fill:"#000000",opacity:0,x:0,y:0,width:16,height:16}),f.createElement("path",{d:"M12.1225,6.137 L9.6975,3.444 L2.512,10.051 L1.9125,12.9875 L4.89,12.787 L12.1225,6.137 Z M14.5305,3.593 L12.4805,1.2345 L12.476,1.2295 C12.3826221,1.12796952 12.2246544,1.12125701 12.123,1.2145 L10.0735,3.0985 L12.498,5.7915 L14.511,3.9405 C14.6108159,3.8491948 14.6194742,3.69489918 14.5305,3.593 L14.5305,3.593 Z M1.5,14 L14.5,14 L14.5,15 L1.5,15 L1.5,14 Z",id:"\\u5F62\\u72B6",fill:"#0088FF"}))))),Ob={参加活动获得:"notice_action_activity",使用邀请码获得:"notice_action_invite_code",邀请好友获得:"notice_action_invite_friend",参与活动获得:"notice_action_join_activity"},Tb=(e,t)=>{if(!e)return"";if(e==="刚刚")return t("notice_time_just_now");let n=e.match(/^(\d+)分钟前$/);return n?t("notice_time_minutes_ago",{n:n[1]}):(n=e.match(/^(\d+)小时前$/),n?t("notice_time_hours_ago",{n:n[1]}):(n=e.match(/^(\d+)天前$/),n?t("notice_time_days_ago",{n:n[1]}):e))},zb=(e,t)=>{const n=Ob[e];return n?t(n):e},Yi={[Ze.FANREN]:{key:"fanren",textCls:"text-[#36322D]",accentCls:"text-[#36322D]",activeBorderCls:"border-[#1E1F23]",activeTextCls:"text-[#1E1F23]",activeIconCls:"bg-[#36322D] text-white",activeIconFilterCls:"brightness-0",badgeCls:"border-[#9B9488] bg-[#EAE7DE] text-[#36322D]",tagSrc:"/activity-center-assets/light/[email protected]",motto:"尘俗凡身,道途初启"},[Ze.ZHUJI]:{key:"zhuji",textCls:"text-[#2B68AD]",accentCls:"text-[#2B68AD]",activeBorderCls:"border-[#2B68AD]",activeTextCls:"text-[#2B68AD]",activeIconCls:"bg-[#2B68AD] text-white",activeIconFilterCls:"brightness-0 saturate-100 invert-[35%] sepia-[57%] saturate-[825%] hue-rotate-[174deg] brightness-[88%] contrast-[88%]",badgeCls:"border-[#A9C5E8] bg-[#EAF4FF] text-[#2B68AD]",tagSrc:"/activity-center-assets/light/[email protected]",motto:"修炼不错,终有所成"},[Ze.JINDAN]:{key:"jindan",textCls:"text-[#A45B05]",accentCls:"text-[#A45B05]",activeBorderCls:"border-[#D6A545]",activeTextCls:"text-[#A45B05]",activeIconCls:"bg-[#A45B05] text-white",activeIconFilterCls:"brightness-0 saturate-100 invert-[35%] sepia-[93%] saturate-[1032%] hue-rotate-[9deg] brightness-[85%] contrast-[96%]",badgeCls:"border-[#E4B45D] bg-[#FFF5D9] text-[#A45B05]",tagSrc:"/activity-center-assets/light/[email protected]",motto:"丹凝本源,大道可期"}},Rb=[{key:"threshold",label:"所需积分",path:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0m4.002 9.242c-.166 0-.3.135-.3.3 0 .08.03.153.086.21l.008.01c.132.132.213.298.213.434 0 .584-1.525 1.399-4.009 1.399s-4.01-.815-4.01-1.399c0-.147.037-.277.216-.435l.02-.02a.3.3 0 0 0 .076-.199.301.301 0 0 0-.5-.226l-.014.011q-.416.407-.417.869c0 1.15 1.99 2.019 4.629 2.019s4.63-.868 4.63-2.019c0-.304-.14-.594-.41-.86l-.018-.017-.011-.008-.058-.038a.3.3 0 0 0-.131-.031m0-2.21c-.166 0-.3.135-.3.3 0 .08.03.153.086.21l.008.01c.132.132.213.298.213.434 0 .584-1.525 1.399-4.009 1.399S3.99 8.57 3.99 7.986c0-.147.037-.277.216-.435l.014-.013.006-.007a.3.3 0 0 0 .076-.199.3.3 0 0 0-.5-.226l-.014.011q-.416.407-.417.869c0 1.15 1.99 2.019 4.629 2.019s4.63-.868 4.63-2.019q0-.454-.423-.873L12.19 7.1a.3.3 0 0 0-.188-.068M8 3.785c-2.646 0-4.642.873-4.642 2.031S5.354 7.848 8 7.848s4.642-.873 4.642-2.032c0-1.158-1.996-2.03-4.642-2.03m0 .645c2.476 0 3.997.808 3.997 1.386 0 .58-1.52 1.387-3.997 1.387s-3.997-.808-3.997-1.387c0-.578 1.52-1.386 3.997-1.386"},{key:"themeSkin",label:"主题皮肤",path:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0M5.855 4h-.376c-.24 0-.41.068-.53.205L3.205 5.932a.66.66 0 0 0 0 .957l1.009 1.008c.12.12.29.188.444.188a.65.65 0 0 0 .445-.188h.017q.015-.001.016.005v3.62c0 .752.616 1.367 1.368 1.367h3.42c.751 0 1.367-.615 1.367-1.368V7.915c0-.018 0-.018.017-.018h.017c.12.12.29.188.444.188a.62.62 0 0 0 .445-.188l1.008-1.008a.66.66 0 0 0 0-.957l-1.726-1.727A.69.69 0 0 0 11 4h-.427c-.24 0-.445.12-.582.325-.359.53-1.025.872-1.794.872s-1.436-.36-1.795-.872A.61.61 0 0 0 5.855 4m-.017.684.017.017c.478.718 1.384 1.18 2.359 1.18.974 0 1.88-.445 2.359-1.18 0-.017.017-.017.017-.017H11l1.744 1.726-.975.975a.67.67 0 0 0-.461-.171c-.393 0-.701.307-.701.7v3.607a.686.686 0 0 1-.684.684H6.504a.686.686 0 0 1-.683-.684V7.915c0-.394-.308-.701-.701-.701a.73.73 0 0 0-.462.17l-.974-.974L5.41 4.684z"},{key:"interactivePartner",label:"互动伙伴",path:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0m.311 9.022h-3.2a2 2 0 0 0-2 2v.8a.4.4 0 1 0 .8 0v-.8a1.2 1.2 0 0 1 1.2-1.2h3.2a1.2 1.2 0 0 1 1.2 1.2v.8a.4.4 0 1 0 .8 0v-.8a2 2 0 0 0-2-2m2.9.065a.4.4 0 0 0-.2.774c.53.137.9.614.9 1.161v.8a.4.4 0 1 0 .8 0v-.8a2 2 0 0 0-1.5-1.935m-4.5-4.865a2 2 0 1 0 0 4 2 2 0 0 0 0-4m2.9.065a.4.4 0 1 0-.2.775 1.2 1.2 0 0 1 0 2.325.4.4 0 0 0 .2.775 2 2 0 0 0 0-3.875m-2.9.735a1.2 1.2 0 1 1 0 2.4 1.2 1.2 0 0 1 0-2.4"},{key:"conversationStyle",label:"对话风格",path:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0m-.384 3.715c-2.478 0-4.488 1.871-4.488 4.186 0 1.252.595 2.376 1.517 3.148-.177.48-.19.974-.114 1.29.038.165.19.265.342.265a.4.4 0 0 0 .114-.026c.303-.101.796-.265 1.087-.328.442-.102 1.53-.165 1.53-.165 2.478 0 4.489-1.871 4.489-4.184s-1.998-4.186-4.477-4.186m0 .772c2.06 0 3.73 1.53 3.73 3.426 0 1.895-1.67 3.426-3.73 3.426h-.05l-.038.003c-.222.018-1.159.08-1.605.174-.19.038-.418.101-.658.189a1.6 1.6 0 0 1 .102-.392l.177-.506-.418-.34-.163-.145c-.684-.645-1.076-1.505-1.076-2.41 0-1.896 1.668-3.425 3.73-3.425M6.97 8.675c-.139-.151-.38-.177-.531-.037s-.177.38-.038.53c.316.367.784.57 1.278.57.48 0 .947-.203 1.277-.57a.37.37 0 0 0-.038-.53.39.39 0 0 0-.53.037.93.93 0 0 1-.71.317.93.93 0 0 1-.708-.317m-.842-2.14a.405.405 0 0 0-.406.406v.501l.009.082a.405.405 0 0 0 .803-.082v-.501l-.009-.082a.405.405 0 0 0-.397-.324m3 0a.405.405 0 0 0-.406.406v.501l.009.082a.405.405 0 0 0 .803-.082v-.501l-.009-.082a.405.405 0 0 0-.397-.324"},{key:"modelSettings",label:"模型设置",path:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0m1.658 3.316h-3.97a.81.81 0 0 0-.709.42l-2 3.626a.83.83 0 0 0 0 .797l2 3.626a.81.81 0 0 0 .708.42h3.97a.81.81 0 0 0 .709-.42l2-3.626a.83.83 0 0 0 0-.797l-2-3.625a.81.81 0 0 0-.708-.42m-.004.702c.043 0 .081.023.101.06l1.996 3.626c.02.035.02.078 0 .114l-1.996 3.626a.12.12 0 0 1-.1.06H5.69a.12.12 0 0 1-.101-.06L3.594 7.818a.12.12 0 0 1 0-.114L5.59 4.078a.12.12 0 0 1 .1-.06ZM7.642 5.844a1.871 1.871 0 1 0 0 3.743 1.871 1.871 0 0 0 0-3.743m0 .702a1.17 1.17 0 1 1 0 2.34 1.17 1.17 0 0 1 0-2.34"}],er="rounded-[4px] border border-[var(--ac-card-border)] bg-[var(--ac-card-bg)]",tr="inline-flex items-center justify-center",as=`${tr} h-8 rounded-[4px] bg-[var(--ac-primary)] px-6 text-sm font-medium text-white transition-colors hover:bg-[var(--ac-primary-hover)] disabled:cursor-not-allowed disabled:opacity-60`,_u=`${tr} h-8 rounded-[4px] border border-[var(--ac-primary)] bg-[var(--ac-card-bg)] px-6 text-sm font-medium text-[var(--ac-primary)] transition-colors hover:bg-[var(--ac-primary-soft)]`,Vs=e=>Yi[Number(e)]||Yi[Ze.FANREN],Gi=({children:e})=>s.jsxs("div",{className:"mb-5 flex items-center gap-2 text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:[s.jsx("span",{className:"h-4 w-[3px] shrink-0 bg-[var(--ac-primary)]"}),s.jsx("span",{children:e})]}),$b=({className:e="bg-[var(--ac-primary)]",icon:t,src:n,children:r})=>s.jsx("span",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-white ${e}`,children:n?s.jsx("img",{src:n,alt:"",className:"h-6 w-6"}):t?s.jsx("span",{className:`h-3.5 w-3.5 ${t}`}):r}),Au=({level:e,t,className:n=""})=>s.jsx("span",{className:`font-['AlimamaDongFangDaKai'] text-[40px] font-normal leading-[48px] tracking-normal ${n}`,children:wl(e,t)}),Ub=({level:e,points:t,levelBenefits:n,getPointsToNextLevel:r,t:a})=>{const i=Vs(e),o=Math.max(...n.map(d=>Number(d.threshold||0)),300),c=Number(t||0),l=o>0?Math.min(100,c/o*100):0,u=r(e,c),m=Rp(e);return s.jsx("section",{className:`ac-level-hero ac-level-hero--${i.key} bg-top-right! bg-cover! relative h-full min-h-[235px] w-full self
574-stretch overflow-hidden rounded-[4px] px-8 py-8 max-sm:min-h-[310px] max-sm:px-5 max-sm:py-8`,children:s.jsxs("div",{className:"relative z-10 ",children:[s.jsx("div",{children:s.jsx(Au,{level:e,t:a,className:i.textCls})}),s.jsxs("div",{className:"mt-6 text-sm leading-5",children:[s.jsx("span",{className:"text-[var(--ac-primary)]",children:c}),s.jsxs("span",{className:"text-[var(--ac-level-hero-text)]",children:[" ","/ ",o," ",a("积分")]})]}),s.jsx("div",{className:"mt-2.5 h-2 w-60 overflow-hidden rounded-full bg-[var(--ac-progress-bg)] max-sm:w-full",children:s.jsx("div",{className:"h-full rounded-full bg-[var(--ac-primary)]",style:{width:`${l}%`}})}),s.jsxs("div",{className:"mt-5 text-sm leading-5 text-[var(--ac-level-hero-text)] [text-shadow:0_1px_2px_rgba(255,255,255,0.85)]",children:[m?s.jsxs(s.Fragment,{children:[a("您已是最高等级"),s.jsx("br",{})]}):s.jsxs(s.Fragment,{children:[a("距离下一等级还需")," ",s.jsx("span",{className:"text-[var(--ac-primary)]",children:u}),a("积分"),"。",s.jsx("br",{})]}),a("升级方式:每充值100灵石(即1元)增加1积分,"),s.jsx("br",{}),a("每邀请1位用户得10积分,每使用100次得1积分。")]})]})})},Qi=({quota:e,accentCls:t,t:n})=>{const r=ft(e,0),a=ft(e),i=r!==a,o=" 灵石",c=r.endsWith(o);return s.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3",children:[s.jsx("span",{"aria-hidden":"true",className:`h-4 w-4 shrink-0 rotate-45 rounded-[1px] ${t}`}),s.jsxs("div",{className:`flex min-w-0 flex-1 flex-nowrap items-baseline gap-x-2 whitespace-nowrap ${i?"tooltip tooltip-top cursor-help":""}`,"data-tip":i?a:void 0,"aria-label":i?a:void 0,children:[s.jsx("span",{className:"shrink-0 text-[32px] font-semibold leading-10 text-[var(--ac-text-primary)]",children:c?r.slice(0,-o.length):r}),c&&s.jsx("span",{className:"shrink-0 text-base leading-6 text-[var(--ac-text-muted)]",children:n("灵石")})]})]})},Vb=({topupQuota:e,rewardQuota:t,navigate:n,location:r,t:a,hasTopupDiscount:i=!1})=>s.jsxs("div",{className:"flex min-w-0 flex-wrap items-start gap-4",children:[s.jsx("section",{className:`${er} max-w-full w-full flex-none p-6 @min-[720px]:w-auto @min-[720px]:flex-[1_0_auto]`,children:s.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-5",children:[s.jsxs("div",{className:"shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2 text-base leading-6 text-[var(--ac-text-secondary)]",children:[s.jsx("span",{children:a("购买灵石")}),s.jsx("div",{className:"tooltip tooltip-top","data-tip":a("topup_balance_tip"),children:s.jsx("span",{className:"h-4 w-4 cursor-help text-[var(--ac-info-muted)] icon-[fluent--info-16-regular]"})})]}),s.jsx(Qi,{quota:e,accentCls:"bg-[#6C63FF]",t:a})]}),s.jsxs("div",{className:"flex shrink-0 flex-wrap gap-3",children:[s.jsxs("button",{type:"button",className:`relative ${as}`,onClick:()=>{n({pathname:"/topup",search:r.search,state:r.state})},children:[a("购买灵石"),i&&s.jsx("span",{className:"absolute -right-2 -top-3 flex h-5 min-w-5 items-center justify-center rounded-full bg-orange-500 px-1 text-xs font-bold text-white shadow",children:a("惠")})]}),s.jsx("button",{type:"button",className:_u,onClick:()=>n("/recharge-management"),children:a("开发票")})]})]})}),s.jsx("section",{className:`${er} max-w-full w-full flex-none p-6 @min-[720px]:w-auto @min-[720px]:flex-[1_0_auto]`,children:s.jsx("div",{className:"flex min-w-0 items-center gap-3",children:s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-base leading-6 text-[var(--ac-text-secondary)]",children:a("赠送灵石")}),s.jsx(Qi,{quota:t,accentCls:"bg-[#FF9F1C]",t:a})]})})})]}),Ji=2e3,Xi=700,Hb=({noticeList:e,t})=>{const[n,r]=f.useState(0),[a,i]=f.useState(!1),o=2,c=e.length>o,l=c?[...e,...e.slice(0,o)]:e;f.useEffect(()=>{i(!0),r(0)},[e.length]),f.useEffect(()=>{if(!c)return;let d;const h=()=>{i(!1),r(x=>Math.min(x+1,e.length))},p=window.setTimeout(()=>{h(),d=window.setInterval(h,Ji+Xi)},Ji);return()=>{window.clearTimeout(p),d&&window.clearInterval(d)}},[e.length,c]);const u=c?{"--ac-notice-slide-duration":`${Xi}
574ms`,transform:`translateY(${n*-30}px)`}:void 0,m=d=>{d.target!==d.currentTarget||d.propertyName!=="transform"||n<e.length||(i(!0),r(0))};return s.jsxs("div",{className:`${er} flex min-h-[100px] flex-1 flex-row flex-nowrap items-center justify-between gap-6 px-5 py-5`,children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx("div",{className:"ac-notice-viewport h-[60px] overflow-hidden",children:e.length===0?s.jsx("div",{className:"text-sm leading-[18px] text-[var(--ac-text-muted)]",children:t("暂无动态")}):s.jsx("div",{className:c?`ac-notice-track${a?" ac-notice-track-resetting":""}`:"",style:u,onTransitionEnd:m,children:l.map((d,h)=>s.jsxs("div",{className:"flex h-[30px] min-w-0 items-center gap-2 text-sm leading-[30px] text-[var(--ac-text-secondary)]",children:[s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-4 w-4 shrink-0"}),s.jsxs("span",{className:"block min-w-0 flex-1 truncate",children:[Tb(d.time,t),",",t("用户")," ",d.username," ",zb(d.action_type,t)," ",ft(d.reward)]})]},`${d.time}-${d.username}-${d.action_type}-${h}`))})})}),s.jsx("div",{className:"ac-gift-illustration  w-[86px] h-[54px] basis-[28%] shrink"})]})},eo=({icon:e,iconSrc:t,iconCls:n,title:r,tag:a,tagCls:i,children:o,footer:c,actions:l})=>s.jsxs("section",{className:`${er} !flex min-h-[216px] min-w-0 flex-[1_1_320px] flex-col gap-2 p-6`,children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx($b,{className:n,icon:e,src:t}),s.jsx("div",{className:"min-w-0 flex-1 text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:r}),s.jsx("div",{className:`rounded-full px-3 py-[3px] text-xs leading-[18px] ${i}`,children:a})]}),s.jsx("div",{className:"min-h-20 text-sm leading-5 text-[var(--ac-text-secondary)]",children:o}),s.jsxs("div",{className:"mt-auto flex flex-wrap items-center justify-between gap-3",children:[s.jsx("div",{className:"flex items-center gap-1.5 text-sm leading-5 text-[var(--ac-text-muted)]",children:c}),s.jsx("div",{className:"flex flex-wrap gap-3",children:l})]})]}),Wb=({benefit:e,active:t,t:n})=>{const r=Vs(e.level),a=t?`ac-color-${r.key}`:"text-[var(--ac-text-secondary)]",i=o=>o.key==="threshold"?e.threshold:n(e[o.key]);return s.jsxs("section",{className:`ac-benefit-card min-w-0 flex-[1_1_320px] overflow-hidden p-8 ${t?`ac-benefit-card-${r.key}`:""}`,children:[t&&s.jsx("div",{className:`absolute right-0 top-0 rounded-bl-[4px] px-2 py-[2px] text-xs leading-[18px] text-white ${r.activeIconCls}`,children:n("当前等级")}),s.jsx("div",{className:`ac-benefit-card-bg ac-benefit-card-bg--${r.key}`}),s.jsxs("div",{className:"relative z-10",children:[s.jsx(Au,{level:e.level,t:n,className:t?`ac-benefit-card-lvelname-${r.key}`:"text-[var(--ac-text-primary)]"}),s.jsx("div",{className:"ac-benefit-card-line"}),s.jsx("div",{className:"space-y-5",children:Rb.map(o=>s.jsxs("div",{className:`flex items-center justify-between gap-4 text-sm leading-5 ${t?`ac-color-${r.key}`:"text-[var(--ac-text-secondary)]"}`,children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[s.jsx("div",{className:t?`ac-color-${r.key}`:"ac-benefit-card-icon-default",children:s.jsx("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:o.path})})}),s.jsx("span",{className:"whitespace-nowrap",children:n(o.label)})]}),s.jsx("span",{className:`shrink-0 text-right ${a}`,children:i(o)})]},o.key))})]})]})},to="aipy-signing-dialog-auto-opened",qb=()=>{const{t:e}=ye(),t=Ft(),n=wt(),r=io(),a=ls(),i=new URLSearchParams(t.search).get("colorScheme"),o=i==="dark"||i==="light",c=o?i==="dark":r==="dark";f.useEffect(()=>{o&&a(i==="dark")},[i]);const l=JSON.parse(localStorage.getItem("status")||"{}"),u=l;new Intl.NumberFormat(navigator.lang,{minimumFractionDigits:0,maximumFractionDigits:1,notation:"compact"}).format,Number(H.get(l,"price",0)),Number(H.get(l,"quota_per_unit",0));const[m,d]=is({showEditProfileModal:!1}),[h,p]=f.useContext(kt),[x,b]=f.useState(!1),[y,k]=f.useState(""),j=()=>h.user?h.user.display_name||h.user.username:"null",{data:v,refresh:A}=ve(()=>Y.get("/api/user/self"),{manual:!localStorage.getItem("user"),onSuccess:de=>{const{success:Me,data:We}=H.get(de,"data",{});Me&&We&&p({type:"login",payload:We})}}),S=H.get(h,"user.id")||H.get(v,"data.data.id")||H.get(h,"user.user_id")||H.get(v,"data.data.user_id")||H.get(h,"user.username")||H.get(v,"data.data.username")||H.get(h,"user.aff_code")||H.get(v,"data.data.aff_code")||"",F=!!(window.aipy&&typeof window.aipy.send=="function"),{data:O}=ve(()=>Y.get("/api/reward_notices?limit=20"),{cacheKey:"reward-notices"}),{data:N}=ve(()=>Y.get("/api/inviter/invitations/summary"),{skipError:!0}),I=H.get(N,"data.data.pending",0),{data:C}=ve(async()=>{const de=Number(H.get(l,"min_topup",0))||1,Me=Number(H.get(l,"max_topup",0))||1e5,We=H.get(l,"topup_preset_amounts",[]),mt=Array.isArray(We)&&We.length===3&&We.every(Le=>Number.isInteger(Number(Le))&&Number(Le)>0&&Number(Le)>=de&&Number(Le)<=Me)?We.map(Number):[100,200,500];return Promise.all(mt.map(Le=>Y.post("/api/user/topup/quote",{amount:Le}).catch(()=>null)))},{manual:!localStorage.getItem("user"),skipError:!0}),_=(C||[]).some(de=>H.get(de,"data.success",!1)&&(H.get(de,"data.data.policies")||[]).length>0),B=H.get(O,"data.data",[]),[U,R]=f.useState(!1),M=Fb(A,F),K=Pb(A),[ee,le]=f.useState(!1),[se,g]=f.useState(!1),P=f.useRef(null),z=f.useRef(!1),w=f.useRef(null),{data:D,refresh:T}=ve(()=>Y.get("/api/signing/self",{skipError:!0})),$=H.get(D,"data.data",null),{data:E,run:G,mutate:te}=ve(()=>Y.get("/api/signing/agreement"),{manual:!0}),me=H.get(E,"data.data",{}),{run:Pe,loading:Ee}=ve(()=>Y.post("/api/signing/sign"),{manual:!0,onSuccess:de=>{H.get(de,"data.success",!1)?(fe(H.get(de,"data.message",e("签约成功"))),le(!1),T()):W(H.get(de,"data.message"))}}),Re=()=>{G(),le(!0)},Ae=()=>S?`${to}:${S}`:"",vt=()=>{const de=Ae();if(!de||P.current===de)return!0;try{return localStorage.getItem(de)==="1"}catch{return!1}},X=()=>{const de=Ae();if(de){P.current=de;try{localStorage.setItem(de,"1")}catch{}}},ce=()=>{P.current=null;try{Object.keys(localStorage).filter(de=>
574de.startsWith(to)).forEach(de=>localStorage.removeItem(de))}catch{}};f.useEffect(()=>{z.current=!1,P.current=null},[S]),f.useEffect(()=>{!S||!$||$.status!==0||z.current||vt()||(X(),Re())},[S,$?.status]);const _e=async()=>{z.current=!0,le(!1),g(!1),b(!1),k(""),te(null),ce(),await Go()},De=(de,Me)=>{navigator.clipboard.writeText(de).then(()=>{fe(Me)}).catch(()=>{W(e("复制失败,请手动复制"))})},Se=()=>{const de=w.current;if(!de)return;const Me=de.querySelector("svg");if(!Me)return;const mt=new XMLSerializer().serializeToString(Me),Le=new Blob([mt],{type:"image/svg+xml;charset=utf-8"}),st=URL.createObjectURL(Le),at=new Image;at.onload=()=>{const It=document.createElement("canvas");It.width=352,It.height=352;const hr=It.getContext("2d");hr.fillStyle="#fff",hr.fillRect(0,0,It.width,It.height),hr.drawImage(at,0,0,It.width,It.height),URL.revokeObjectURL(st),It.toBlob(Du=>{const In=document.createElement("a");In.href=URL.createObjectURL(Du),In.download="invite-qrcode.png",In.click(),URL.revokeObjectURL(In.href)},"image/png")},at.src=st},re=H.get(v,"data.data.quota",0),$e=H.get(v,"data.data.gift_quota",0),tt=re-$e,Qe=H.get(v,"data.data.level")??Ze.FANREN,dt=H.get(v,"data.data.points",0),{benefits:L,getPointsToNextLevel:q}=$p(),ae=$e,he=H.get(v,"data.data.aff_code",""),Fe=`https://promo.aipyaipy.com/?referral=aipy_${encodeURIComponent(he)}`,Je=`${window.location.origin}/login?aff=${encodeURIComponent(he)}`;return s.jsxs("div",{"data-theme":c?"ac-dark":"ac-light",className:"min-h-full bg-[var(--ac-page-bg)] text-base-content",children:[s.jsx("main",{className:"min-h-screen overflow-x-hidden px-4 pb-6 pt-6 sm:px-6",children:s.jsxs("div",{className:"@container mx-auto w-full min-w-0 max-w-400",children:[s.jsxs("div",{className:"mb-6 flex min-h-6 items-center justify-between gap-4 max-md:flex-col max-md:items-start",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsxs("div",{className:"group relative flex min-w-0 items-center gap-2",children:[s.jsx("div",{className:"pointer-events-none absolute left-0 top-full z-30 min-w-[148px] pt-2 opacity-0 transition-all duration-150 group-hover:pointer-events-auto group-hover:opacity-100",children:s.jsxs("div",{className:"rounded-[4px] border border-[var(--ac-card-border)] bg-[var(--ac-card-bg)] p-1.5 shadow-lg",children:[s.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 whitespace-nowrap rounded-[4px] px-3 py-2 text-left text-sm text-[var(--ac-text-primary)] transition-colors hover:bg-[var(--ac-page-bg)]",onClick:()=>d({showEditProfileModal:!0}),children:[s.jsx(Ki,{style:{width:"14px",height:"14px"}}),e("编辑")]}),s.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 whitespace-nowrap rounded-[4px] px-3 py-2 text-left text-sm text-[var(--ac-text-primary)] transition-colors hover:bg-[var(--ac-page-bg)]",onClick:()=>n("/personal"),children:[s.jsx("span",{className:"h-3.5 w-3.5 icon-[fluent--person-settings-20-regular]"}),e("个人设置")]})]})}),s.jsx("span",{className:"truncate text-base font-semibold leading-6 text-[var(--ac-text-primary)]",children:j()}),s.jsx("button",{type:"button",className:"flex h-5 w-5 shrink-0 items-center justify-center text-[var(--ac-text-muted)] transition-colors hover:text-[var(--ac-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ac-primary)]",onClick:()=>d({showEditProfileModal:!0}),title:e("编辑个人信息"),children:s.jsx(Ki,{style:{width:"14px",height:"14px"}})}),s.jsx("span",{className:"inline-flex h-[22px] items-center",children:s.jsx("img",{src:Vs(Qe).tagSrc,alt:wl(Qe,e),className:"h-[22px] w-auto"})})]}),s.jsx("button",{type:"button",className:"flex h-5 shrink-0 cursor-pointer items-center whitespace-nowrap rounded-[4px] text-sm text-[var(--ac-text-muted)] transition-colors hover:text-[var(--ac-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ac-primary)]",onClick:()=>n("/log"),title:e("使用日志"),children:e("使用日志")})]}),s.jsxs("div",{className:"flex items-center justify-end gap-4 max-md:flex-wrap",children:[$&&s.jsxs(s.Fragment,{children:[$.status===0&&s.jsx("button",{type:"button",className:`${tr} h-7 rounded-[4px] bg-[var(--ac-primary)] px-3 text-sm font-medium text-white transition-colors hover:bg-[var(--ac-primary-hover)]`,onClick:Re,children:e("签约计划")}),$.status===1&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button",className:"inline-flex h-6 items-center gap-1.5 text-sm font-medium text-[var(--ac-primary)] transition-opacity hover:opacity-75",onClick:()=>{k("signing_invite"),b(!0)},children:[s.jsx("span",{className:"h-4 w-4 icon-[fluent--qr-code-20-regular]"}),e("分享二维码")]}),s.jsxs("button",{type:"button",className:"inline-flex h-6 items-center gap-1.5 text-sm font-medium text-[var(--ac-primary)] transition-opacity hover:opacity-75",onClick:()=>g(!0),children:[s.jsx("span",{className:"h-4 w-4 icon-[fluent--person-money-20-regular]"}),e("我的激励")]})]}),$.status===2&&s.jsx("button",{type:"button",className:`${tr} h-7 cursor-not-allowed rounded-[4px] bg-[#E53E3E]/15 px-3 text-sm font-medium text-[#E53E3E]`,disabled:!0,children:e("签约异常")})]}),s.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center",onClick:()=>{k("官方微信粉丝群"),b(!0)},title:e("官方微信粉丝群"),children:s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-6 w-6"})}),s.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center",onClick:()=>{k("微信公众号"),b(!0)},title:e("微信公众号"),children:s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-6 w-6"})}),s.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center",onClick:()=>{k("视频号"),b(!0)},title:e("视频号"),children:s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-6 w-6"})}),s.jsx("button",{type:"button",className:"flex h-6 w-6 items-center justify-center",onClick:()=>{k("抖音"),b(!0)},title:e("抖音"),children:s.jsx("img",{src:"/activity-center-assets/light/[email protected]",alt:"",className:"h-6 w-6"})})]})]}),s.jsxs("div",{className:"flex min-w-0 flex-col items-stretch gap-4 @min-[720px]:flex-row",children:[s.jsx("div",{className:"flex w-full min-w-0 flex-none @min-[720px]:w-auto @min-[720px]:flex-[0_0_38%] @min-[1080px]:max-w-[420px]",children:s.jsx(Ub,{level:Qe,points:dt,levelBenefits:L,getPointsToNextLevel:q,t:e})}),s.jsxs("div",{className:"flex w-full min-w-0 flex-1 flex-col gap-4",children:[s.jsx(Vb,{topupQuota:tt,rewardQuota:ae,navigate:n,location:t,t:e,hasTopupDiscount:_}),s.jsx(Hb,{noticeList:B,t:e})]})]}),s.jsxs("section",{className:"mt-6",children:[s.jsx(Gi,{children:e("参加活动,赚取余额")}),s.jsxs("div",{className:"flex flex-wrap gap-4",children:[s.jsxs(eo,{iconSrc:"/activity-center-assets/light/[email protected]",iconCls:"bg-transparent",title:e("邀请好友用 AiPy"),tag:e("上不封顶"),tagCls:"bg-[#005ACA]/10 text-[#005ACA]",footer
574:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"h-4 w-4 text-[#2CC970] icon-[fluent--checkmark-circle-16-filled]"}),s.jsxs("span",{children:[e("已邀请")," ",s.jsx("span",{className:"text-[var(--ac-primary)]",children:H.get(v,"data.data.aff_count",0)})," ",e("人")]}),s.jsxs("span",{className:"cursor-pointer text-[var(--ac-text-muted)] underline-offset-2 hover:underline",onClick:()=>n("/user-invitations"),children:[e("未激活")," ",s.jsx("span",{className:"text-[var(--ac-primary)]",children:I})," ",e("人")]})]}),actions:s.jsxs(s.Fragment,{children:[s.jsx("button",{className:as,onClick:()=>{navigator.clipboard.writeText(Fe).then(()=>{fe(e("邀请链接已复制到剪贴板!"))}).catch(()=>{W(e("复制失败,请手动复制"))})},children:e("复制链接")}),s.jsx("button",{className:_u,onClick:()=>{const de=H.get(u,"invitation_message_template",""),Me=H.get(v,"data.data.aff_code"),We=H.get(u,"quota_for_invitee",0)+H.get(u,"quota_for_new_user",0),mt=Ve(We,2),Le=Fe;let st;de&&de.trim()?st=de.replace(/\{\{code\}\}/g,Me).replace(/\{\{num\}\}/g,mt).replace(/\{\{url\}\}/g,Le):st=e("复制完整邀请信息 txt",{code:Me,num:mt,url:Le}),navigator.clipboard.writeText(st).then(()=>{fe(e("邀请文案已复制到剪贴板!"))}).catch(()=>{W(e("复制失败,请手动复制"))})},children:e("复制文案")})]}),children:[e("邀请朋友使用你的专属链接或邀请码")," ",s.jsxs("span",{className:"font-medium text-[var(--ac-primary)]",children:["(",he,")"]})," ",e("下载安装AiPy并注册使用,双方就会自动获得奖励。"),s.jsx("br",{}),e("您将获得"),s.jsx("span",{className:"font-medium text-[var(--ac-primary)]",children:Ve(H.get(u,"quota_for_inviter",0),2)}),e(",朋友也将获得"),s.jsx("span",{className:"font-medium text-[var(--ac-primary)]",children:Ve(H.get(u,"quota_for_invitee",0)+H.get(u,"quota_for_new_user",0),2)}),e("。")]}),F&&s.jsxs(eo,{iconSrc:"/activity-center-assets/light/[email protected]",iconCls:"bg-transparent",title:e("每日签到领灵石"),tag:e("每日可领"),tagCls:"bg-success/10 text-success",footer:s.jsxs("span",{className:"flex items-center gap-1.5 text-sm leading-5 text-[var(--ac-text-muted)]",children:[s.jsx("span",{className:"h-4 w-4 text-success icon-[fluent--checkmark-circle-16-filled]"}),s.jsx("span",{children:e("无门槛签到")})]}),actions:s.jsx("button",{className:as,onClick:()=>R(!0),children:M.checkedInToday?e("已签到"):e("立即签到")}),children:[e("每日签到领取")," ",s.jsx("span",{className:"font-medium text-[var(--ac-primary)]",children:Ve(
574M.baseReward,2)}),e(",连续签到再享阶梯加赠,最高单日")," ",s.jsx("span",{className:"font-medium text-[var(--ac-primary)]",children:Ve(M.maxDayReward,2)}),e("!"),M.nextMilestone?s.jsxs("div",{className:"mt-3 rounded-[10px] border border-dashed border-warning/50 bg-warning/10 px-3 py-2 text-xs text-warning",children:[e("已连续签到")," ",s.jsx("span",{className:"font-bold",children:M.cycleDay})," ",e("天"),e(",再签 {{days}} 天可额外得 {{bonus}}",{days:M.nextMilestone.day-M.cycleDay,bonus:Ve(M.nextMilestone.bonus,2)})]}):s.jsxs("div",{className:"mt-3 rounded-[10px] border border-dashed border-success/50 bg-success/10 px-3 py-2 text-xs text-success",children:[e("本轮已满签!连续签到")," ",s.jsx("span",{className:"font-bold",children:M.cycleDay})," ",e("天,继续签到开启新一轮")]})]}),s.jsx(Eb,{onApplicationUpdated:A})]})]}),s.jsx("section",{className:"mt-6",children:s.jsx(Lb,{...K,t:e})}),s.jsxs("section",{className:"mt-7",children:[s.jsx(Gi,{children:e("升级等级:解锁更多功能、获得更多权益")}),s.jsx("div",{className:"flex flex-wrap gap-4",children:L.map(de=>s.jsx(Wb,{benefit:de,active:Number(de.level)===Number(Qe),t:e},de.level))})]}),s.jsx("div",{className:"mt-4 flex justify-center py-4",children:s.jsx("button",{hidden:!(window.aipy&&typeof window.aipy?.logout=="function"),className:"inline-flex h-8 items-center justify-center rounded-[4px] border border-[var(--ac-card-border)] bg-[var(--ac-card-bg)] px-5 text-sm text-[var(--ac-text-muted)] transition-colors hover:border-[var(--ac-primary)] hover:text-[var(--ac-primary)]",onClick:_e,children:e("切换账号")})}),s.jsx("div",{className:"border-t border-[var(--ac-card-border)] py-5",children:s.jsxs("p",{className:"text-center text-xs leading-[1.7] text-[var(--ac-text-muted)] whitespace-pre",children:[e("奖励额度对应的平台配额资金仅限于Trustoken平台使用,不可提现;"),s.jsx("wbr",{}),e("为了确保活动公平,严禁奖励转卖、刷单等违规行为,平台将对违反规则的账户取消奖励资格并追究相关责任;"),s.jsx("wbr",{}),e("在法律允许范围内,本活动的最终解释权归Trustoken所有。")]})})]})}),s.jsx(Ne,{open:x,onClose:()=>b(!1),showCloseButton:!0,className:"max-w-[380px]",children:s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"mb-2 flex items-center justify-center gap-2 text-lg font-semibold text-base-content",children:[s.jsx("svg",{viewBox:"0 0 24 24",className:"h-6 w-6 fill-current text-base-content/60",children:s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"})}),s.jsx("span",{children:e(y==="signing_invite"?"分享邀请二维码":y)})]}),s.jsxs("div",{className:"mb-5 text-sm text-base-content/70",children:[y==="signing_invite"&&e("扫码注册后将自动绑定您的签约邀请关系"),y==="微信公众号"&&e("扫码关注,获取最新升级消息"),y==="视频号"&&e("扫码关注,查看最新视频案例"),y==="抖音"&&e("扫码关注,查看最新视频案例"),y==="官方微信粉丝群"&&e("扫码加入,与AI爱好者一起交流")]}),y==="signing_invite"&&s.jsx("div",{ref:w,className:"mx-auto mb-4 flex h-[200px] w-[200px] items-center justify-center rounded-box bg-white shadow",children:s.jsx(js,{value:Je,size:176})}),y==="signing_invite"&&s.jsxs("div",{className:"mb-4 flex flex-col gap-2.5 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2 rounded-box border border-base-300 bg-base-200 px-2.5 py-2",children:[s.jsxs("span",{className:"min-w-0 flex-1 text-[13px] text-base-content",children:[e("邀请码"),":",s.jsx("strong",{children:he})]}),s.jsx("button",{type:"button",className:"btn btn-primary btn-sm whitespace-nowrap",onClick:()=>De(he,e("邀请码已复制")),children:e("复制")})]}),s.jsxs("div",{className:"flex items-center gap-2 rounded-box border border-base-300 bg-base-200 px-2.5 py-2",children:[s.jsx("span",{className:"min-w-0 flex-1 break-all text-[13px] text-base-content",children:Je}),s.jsx("button",{type:"button",className:"btn btn-primary btn-sm whitespace-nowrap",onClick:()=>De(Je,e("邀请链接已复制")),children:e("复制")})]}),s.jsx("button",{type:"button",className:"btn btn-primary w-full",onClick:Se,children:e("下载二维码")})]}),y!=="signing_invite"&&s.jsx("img",{src:y==="官方微信粉丝群"?"/api/wechat/qrcode":y==="微信公众号"?"/qrcode/wechat.png":y==="视频号"?"/qrcode/webchat_video.png":y==="抖音"?"/qrcode/douyin.png":"",alt:"QR Code",className:"mx-auto mb-4 h-[200px] w-[200px] rounded-box shadow"}),s.jsx("div",{className:"text-xs text-base-content/60",children:e("使用手机APP扫描二维码")})]})}),s.jsx(Ne,{open:ee,onClose:()=>le(!1),title:e("AiPy合作伙伴服务协议"),showCloseButton:!0,className:"max-w-[640px]",footer
574:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn",onClick:()=>le(!1),children:e("取消")}),s.jsx(oe,{loading:Ee,disabled:!me.content,onClick:()=>Pe(),children:e("同意并签署")})]}),children:s.jsxs("div",{className:"max-h-[60vh] overflow-y-auto break-words pr-2 text-base-content/70",children:[me.content?s.jsx(gb,{content:me.content,ratio:$?.ratio??me.default_ratio}):s.jsx("div",{className:"py-6 text-center text-base-content/60",children:e("协议尚未配置,请联系管理员")}),me.version&&s.jsxs("div",{className:"mt-4 text-xs text-base-content/60",children:[e("协议版本"),":",me.version]})]})}),s.jsx(wb,{visible:se,onCancel:()=>g(!1),onChanged:()=>A()}),s.jsx(Ab,{visible:U,onClose:()=>R(!1),checkin:M}),s.jsx(yl,{visible:m.showEditProfileModal,onCancel:()=>d({showEditProfileModal:!1}),onOk:()=>{d({showEditProfileModal:!1}),Y.get("/api/user/self").then(de=>{const{success:Me,data:We}=H.get(de,"data",{});Me&&(p({type:"login",payload:We}),A())})},user:h?.user})]})},Or={supplier_id:"",key:"",models:[]},Zb=()=>{const{t:e}=ye(),[t,n]=f.useState(Or),[r,a]=f.useState(""),[i,o]=f.useState(!1),[c,l]=f.useState(!1),[u,m]=f.useState(!1),[d,h]=f.useState(null),p=f.useRef(null),x=f.useRef(null),[b,y]=is({open:!1,record:null}),{data:k,loading:j,refresh:v}=ve(()=>Y.get("/api/user/custom-models/conf")),{data:A,loading:S}=ve(()=>Y.get("/api/supplier")),{run:F,loading:O,data:N,mutate:I}=ve(E=>Y.post("/api/user/custom-models/models",E,{skipError:!0}),{manual:!0,onSuccess:E=>{if(!E.data.success)return;const G=H.get(E,"data.data",[]);n(te=>({...te,models:b.record?b.record.models:G}))},onError:E=>{W(H.get(E,"response.data.message"))}}),C=()=>{y({open:!1,record:null}),n(Or),a(""),o(!1),l(!1),m(!1),I(null)},{run:_,loading:B}=ve(E=>Y.post("/api/user/custom-models/conf",E),{manual:!0,onSuccess:E=>{if(!E.data.success){W(E.data.message);return}v(),C(),fe("添加成功")}}),{run:U,loading:R,params:M}=ve(E=>Y.delete(`/api/user/custom-models/conf/${E}`),{manual:!0,onSuccess:E=>{if(!E.data.success){W(E.data.message);return}v(),h(null),fe("删除成功")}}),{run:K,loading:ee}=ve((E,G)=>Y.put(`/api/user/custom-models/conf/${E}`,G),{manual:!0,onSuccess:E=>{if(!E.data.success){W(E.data.message);return}v(),C(),fe("更新成功")}});f.useEffect(()=>{b.open&&(b.record?(n({supplier_id:b.record.supplier_id,key:b.record.key,models:b.record.models||[]}),F({base_url:b.record.supplier.base_url,key:b.record.key})):(n(Or),I(null)))},[b.open,b.record]),f.useEffect(()=>{if(!i&&!c)return;const E=G=>{i&&!p.current?.contains(G.target)&&o(!1),c&&!x.current?.contains(G.target)&&l(!1)};return document.addEventListener("pointerdown",E),()=>document.removeEventListener("pointerdown",E)},[i,c]);const le=new Set(H.get(k,"data.data",[]).map(E=>E.supplier_id)),se=H.get(A,"data.data",[]).map(E=>({value:E.id,label:E.name,disabled:le.has(E.id),...E})),g=se.find(E=>String(E.value)===String(t.supplier_id)),P=b.record?se:se.filter(E=>!E.disabled),z=f.useMemo(()=>[...new Set([...H.get(N,"data.data",[]),...t.models||[]])],[N,t.models]),w=()=>
574{if(!t.supplier_id){W(e("请选择服务商"));return}if(!t.key){W(e("请输入Key"));return}const E=se.find(G=>String(G.value)===String(t.supplier_id));E&&F({base_url:E.base_url,key:t.key,type:E.type})},D=()=>{const E=r.split(/[,,\n]/).map(G=>G.trim()).filter(Boolean);E.length!==0&&(n(G=>({...G,models:[...new Set([...G.models||[],...E])]})),a(""))},T=E=>{n(G=>({...G,models:G.models.includes(E)?G.models.filter(te=>te!==E):[...G.models,E]}))},$=E=>{if(E.preventDefault(),!t.supplier_id){W(e("请选择服务商"));return}if(!t.key){W(e("请输入Key"));return}b.record?K(b.record.id,H.omit(t,"supplier_id")):_(t)};return s.jsxs("div",{children:[s.jsxs("div",{className:"mb-4 flex items-center justify-between gap-4",children:[s.jsx("h1",{className:"text-2xl font-semibold text-base-content",children:e("可用服务")}),s.jsx(oe,{onClick:()=>y({open:!0,record:null}),children:e("添加服务")})]}),j||S?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx("span",{className:"loading loading-spinner loading-md"})}):H.isEmpty(H.get(k,"data.data",[]))?s.jsx("div",{className:"py-12 text-center text-base-content/60",children:e("暂无内容,请添加")}):s.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:H.get(k,"data.data",[]).map(E=>s.jsx(lr,{className:"h-full shadow-sm",children:s.jsxs("div",{className:"card-body gap-3 p-5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h2",{className:"card-title text-base",children:E.supplier.name}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-square text-error","aria-label":e("删除"),disabled:R&&M[0]===E.id,onClick:()=>h(E),children:s.jsx("span",{className:"icon-[fluent--delete-20-regular] h-5 w-5"})}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":e("编辑"),onClick:()=>y({open:!0,record:E}),children:s.jsx("span",{className:"icon-[fluent--settings-20-regular] h-5 w-5"})})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[H.get(E,"models",[]).slice(0,10).map(G=>s.jsx("span",{className:"badge badge-outline badge-sm",children:G},G)),H.get(E,"models",[]).length>10&&s.jsx("span",{className:"tooltip tooltip-top","data-tip":H.get(E,"models",[]).slice(10).join(", "),children:s.jsxs("span",{className:"badge badge-ghost badge-sm",children:["+",H.get(E,"models",[]).length-10]})})]})]})},E.id))}),s.jsx(Ne,{open:b.open,onClose:C,closeOnBackdrop:!1,placement:"end",title:b.record?e("编辑服务"):e("添加服务"),showCloseButton:!0,className:"h-dvh max-h-dvh w-full max-w-[448px] rounded-none border-0 p-8 sm:p-8 [&>button]:right-6 [&>button]:top-6 [&>h2]:text-xl",children:s.jsxs("form",{className:"mt-16 space-y-8",onSubmit:$,children:[s.jsxs("div",{className:"form-control block space-y-2",children:[s.jsxs("span",{className:"label-text text-base font-semibold",children:[e("服务商")," ",s.jsx("span",{className:"text-error",children:"*"})]}),s.jsxs("div",{ref:x,className:"relative",children:[s.jsxs("button",{type:"button",className:"input flex w-full items-center justify-between border-transparent bg-base-200 text-left focus:border-primary disabled:cursor-not-allowed disabled:opacity-60",disabled:!!b.record,"aria-required":"true","aria-expanded":c,onClick:()=>l(E=>!E),children:[s.jsx("span",{className:g?"truncate text-base-content":"truncate text-base-content/50",children:g?.label||e("请选择服务商")}),s.jsx("svg",{"aria-hidden":"true",className:`size-4 shrink-0 fill-none stroke-current text-base-content/60 transition-transform ${c?"rotate-180":""}`,viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"m6 9 6 6 6-6"})})]}),c&&!b.record&&s.jsx("div",{className:"absolute left-0 right-0 top-[calc(100%+4px)] z-30 overflow-hidden rounded-box border border-base-300 bg-base-100 p-1 shadow-xl",children:S?s.jsx("div",{className:"flex min-h-16 items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-sm"})}):P.length===0?s.jsx("div",{className:"flex min-h-16 items-center justify-center text-sm text-base-content/50",children:e("暂无数据")}):P.map(E=>s.jsx("button",{type:"button",className:"flex w-full items-center rounded-field px-3 py-2 text-left text-sm hover:bg-base-200",onClick:()=>{n(G=>({...G,supplier_id:String(E.value),models:[]})),I(null),l(!1)},children:E.label},E.value))})]})]}),s.jsxs("label",{className:"form-control block space-y-2",children:[s.jsxs("span",{className:"label-text text-base font-semibold",children:[e("Key")," ",s.jsx("span",{className:"text-error",children:"*"})]}),s.jsxs("span",{className:"input w-full border-transparent bg-base-200 focus-within:border-primary",children:[s.jsx("input",{type:u?"text":"password",className:"grow leading-[normal]",value:t.key,required:!0,placeholder:e("请提供服务商提供的Key"),onChange:E=>n(G=>({...G,key:E.target.value}))}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-xs btn-square -mr-2 text-base-content/60","aria-label":e(u?"隐藏":"显示"),onClick:()=>m(E=>!E),children:s.jsx("span",{"aria-hidden":"true",className:u?"icon-[fluent--eye-20-regular] size-5":"icon-[fluent--eye-off-20-regular] size-5"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"text-base font-semibold",children:e("添加模型")}),s.jsx(oe,{type:"button",size:"sm",variant:"ghost",className:"bg-base-200 text-primary hover:bg-base-300",loading:O,onClick:()=>{o(!0),w()},children:e("加载可用模型")})]}),s.jsxs("div",{ref:p,className:"relative",children:[s.jsxs("div",{className:"input min-h-11 h-auto w-full border-base-300 bg-base-200 py-1.5 focus-within:border-primary",onClick:()=>o(!0),children:[s.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:[t.models.map(E=>s.jsxs("span",{className:"badge badge-primary badge-soft max-w-full gap-1",children:[s.jsx("span",{className:"truncate",children:E}),s.jsx("button",{type:"button",className:"shrink-0","aria-label":`${e("删除")} ${E}`,onClick:G=>{G.stopPropagation(),T(E)},children:"×"})]},E)),s.jsx("input",{type:"text",className:"min-w-[120px] flex-1 bg-transparent leading-[normal] outline-none",value:r,placeholder:t.models.length===0?e("请选择模型"):"",onFocus:()=>o(!0),onChange:E=>a(E.target.value),onKeyDown:E=>
574{E.key==="Enter"&&(E.preventDefault(),D())}})]}),s.jsx("button",{type:"button",className:"btn btn-ghost btn-xs btn-square -mr-2 shrink-0 text-base-content/60","aria-label":e("请选择模型"),"aria-expanded":i,onClick:E=>{E.stopPropagation(),o(G=>!G)},children:s.jsx("svg",{"aria-hidden":"true",className:`size-4 fill-none stroke-current transition-transform ${i?"rotate-180":""}`,viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),i&&s.jsxs("div",{className:"absolute left-0 right-0 top-[calc(100%+4px)] z-20 overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-xl",children:[s.jsx("div",{className:"max-h-64 min-h-20 overflow-y-auto p-2",children:O?s.jsx("div",{className:"flex min-h-16 items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-sm"})}):z.length===0?s.jsx("div",{className:"flex min-h-16 items-center justify-center text-sm text-base-content/50",children:e("暂无数据")}):z.map(E=>s.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-field px-3 py-2 hover:bg-base-200",children:[s.jsx("input",{type:"checkbox",className:"checkbox checkbox-primary checkbox-sm",checked:t.models.includes(E),onChange:()=>T(E)}),s.jsx("span",{className:"min-w-0 break-all text-sm",children:E})]},E))}),s.jsxs("div",{className:"grid grid-cols-2 border-t border-base-300",children:[s.jsx("button",{type:"button",className:"btn btn-ghost rounded-none text-error",onClick:()=>n(E=>({...E,models:[]})),children:e("清空")}),s.jsx("button",{type:"button",className:"btn btn-ghost rounded-none text-primary",onClick:()=>n(E=>({...E,models:z})),children:e("全选")})]})]})]})]}),s.jsx("div",{className:"flex justify-end pt-2",children:s.jsx(oe,{type:"submit",loading:B||ee,children:e("保存配置")})})]})}),s.jsx(Ne,{open:!!d,onClose:()=>h(null),title:e("确定是否删除?"),footer:s.jsxs(s.Fragment,{children:[s.jsx(oe,{variant:"secondary",onClick:()=>h(null),children:e("取消")}),s.jsxs("button",{type:"button",className:"btn btn-error",disabled:R,onClick:()=>d&&U(d.id),children:[R&&s.jsx("span",{className:"loading loading-spinner loading-sm"}),e("确定")]})]}),children:s.jsx("p",{className:"text-sm text-base-content/70",children:d?.supplier?.name})})]})},Kb=f.lazy(()=>on(()=>import("./index-Dr8RynAy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Yb=f.lazy(()=>on(()=>import("./index-CvYQXqYv.js"),__vite__mapDeps([8,1,9,4,5,6,2,3]))),Gb=f.lazy(()=>on(()=>import("./index-BX-Uko2J.js"),__vite__mapDeps([10,1,5,2,3,4,6]))),Qb=f.lazy(()=>on(()=>import("./index-DBVEdHZn.js"),__vite__mapDeps([11,1,5,2,3,4,6]))),Jb=f.lazy(()=>on(()=>import("./UserInvitations-CbIN8xrc.js"),__vite__mapDeps([12,1,2,3,5,11,4,6]))),Xb=f.lazy(()=>on(()=>import("./index-bA79xXhY.js"),__vite__mapDeps([13,1,2,3,4,5,6]))),xt=({children:e})=>s.jsx(f.Suspense,{fallback:s.jsx(pm,{}),children:e}),pt=({children:e})=>s.jsx(hm,{children:s.jsx(xt,{children:e})});function e2(){return s.jsxs(Lu,{children:[s.jsx(Oe,{path:"/",element:s.jsx(xt,{children:s.jsx(Kb,{})})}),s.jsx(Oe,{path:"/login",element:s.jsx(xt,{children:s.jsx(Wm,{})})}),s.jsx(Oe,{path:"/register",element:s.jsx(xt,{children:s.jsx($m,{})})}),s.jsx(Oe,{path:"/reset",element:s.jsx(xt,{children:s.jsx(Zm,{})})}),s.jsx(Oe,{path:"/user/reset",element:s.jsx(xt,{children:s.jsx(Km,{})})}),s.jsx(Oe,{path:"/oauth/github",element:s.jsx(xt,{children:s.jsx(Tn,{type:"github"})})}),s.jsx(Oe,{path:"/oauth/google",element:s.jsx(xt,{children:s.jsx(Tn,{type:"google"})})}),s.jsx(Oe,{path:"/oauth/oidc",element:s.jsx(xt,{children:s.jsx(Tn,{type:"oidc"})})}),s.jsx(Oe,{path:"/oauth/linuxdo",element:s.jsx(xt,{children:s.jsx(Tn,{type:"linuxdo"})})}),s.jsx(Oe,{path:"/oauth/login",element:s.jsx(Tp,{})}),s.jsx(Oe,{path:"/license/apply",element:s.jsx(xt,{children:s.jsx(Xb,{})})}),s.jsx(Oe,{path:"/approve",element:s.jsx(pt,{children:s.jsx(Op,{})})}),s.jsx(Oe,{path:"/detail",element:s.jsx(pt,{children:s.jsx(Yb,{})})}),s.jsx(Oe,{path:"/token",element:s.jsx(pt,{children:s.jsx(Xm,{})})}),s.jsx(Oe,{path:"/log",element:s.jsx(pt,{children:s.jsx(jp,{})})}),s.jsx(Oe,{path:"/midjourney",element:s.jsx(pt,{children:s.jsx(Np,{})})}),s.jsx(Oe,{path:"/topup",element:s.jsx(pt,{children:s.jsx(yp,{})})}
574),s.jsx(Oe,{path:"/personal",element:s.jsx(pt,{children:s.jsx(Lp,{})})}),s.jsx(Oe,{path:"/recharge-management",element:s.jsx(pt,{children:s.jsx(Gb,{})})}),s.jsx(Oe,{path:"/custom-models",element:s.jsx(pt,{children:s.jsx(Zb,{})})}),s.jsx(Oe,{path:"/activity-center",element:s.jsx(pt,{children:s.jsx(qb,{})})}),s.jsx(Oe,{path:"/my-invites",element:s.jsx(pt,{children:s.jsx(Qb,{})})}),s.jsx(Oe,{path:"/user-invitations",element:s.jsx(pt,{children:s.jsx(Jb,{})})}),s.jsx(Oe,{path:"/:segment",element:s.jsx(t2,{})}),s.jsx(Oe,{path:"*",element:s.jsx(nl,{})})]})}function t2(){const{segment:e=""}=Ou();if(e.startsWith("activity-center-id-")){const t=e.slice(19);return s.jsx(no,{to:`/activity-center?${new URLSearchParams({activity_id:t})}`,replace:!0})}return s.jsx(nl,{})}const n2=()=>{const[e,t]=f.useState(dc());let n=5;const r=()=>{let i=localStorage.getItem("footer_html");i&&t(i)},a=s.jsx("div",{className:"custom-footer"});return f.useEffect(()=>{const i=setInterval(()=>{if(n<=0){clearInterval(i);return}n--,r()},200);return()=>clearTimeout(i)},[]),s.jsx("div",{className:"pb-[5px] text-center",children:e?s.jsx("div",{className:"custom-footer",dangerouslySetInnerHTML:{__html:e}}):a})},Tr=e=>`phone_bind_prompt_handled_${e}`,r2=()=>{const{t:e}=ye(),[t,n]=f.useContext(kt),[r,a]=f.useState(!1),[i,o]=f.useState(!1),c=H.get(t,"user.id"),l=f.useRef(void 0),u=()=>{c&&sessionStorage.setItem(Tr(c),"true")},m=()=>{Object.keys(sessionStorage).filter(x=>x.startsWith("phone_bind_prompt_handled_")).forEach(x=>sessionStorage.removeItem(x))},d=()=>{Y.get("/api/user/self").then(x=>{const{success:b,data:y}=x.data;b&&(localStorage.setItem("user",JSON.stringify(y)),n({type:"login",payload:y}))})};f.useEffect(()=>{const x=l.current;if(l.current=c,!c){x&&m();return}sessionStorage.getItem(Tr(c))!=="true"&&Y.get("/api/user/self",{skipError:!0}).then(b=>{const{success:y,data:k}=b.data;if(!y)return;const j=!!k.wechat_id,v=!!k.phone_number;j&&!v?a(!0):sessionStorage.setItem(Tr(c),"true")}).catch(()=>{})},[c]);const h=()=>{u(),a(!1)},p=()=>{a(!1),o(!0)};return s.jsxs(s.Fragment,{children:[s.jsx(Ne,{title:e("绑定手机号"),open:r,onClose:h,closeOnBackdrop:!1,footer:s.jsxs(s.Fragment,{children:[s.jsx(oe,{variant:"secondary",onClick:h,children:e("稍后再说")}),s.jsx(oe,{onClick:p,children:e("去绑定")})]}),children:s.jsx("p",{children:e("根据实名制要求,建议您绑定手机号以保障账号安全。绑定为可选项,您也可以稍后在个人中心完成。")})}),s.jsx(bl,{visible:i,onCancel:()=>{u(),o(!1)},onSuccess:()=>{u(),o(!1),d()}})]})};function s2(){return f.useEffect(()=>{document.getElementById("toast-popover-host")?.showPopover?.()},[]),s.jsx("div",{id:"toast-popover-host",popover:"manual",className:"pointer-events-none fixed inset-0 m-0 h-full max-h-none w-full max-w-none overflow-visible border-0 bg-transparent p-0",children:s.jsx(Hu,{})})}const a2=()=>{const[e,t]=f.useContext(kt),[,n]=f.useContext(Sn),[r,a]=f.useContext(gs),[i,o]=f.useState(!0),[c,l]=f.useState(!1),u=Ft(),m=wt(),[d]=Nn(),{t:h,i18n:p}=ye(),x=()=>{const B=localStorage.getItem("user");B&&t({type:"login",payload:JSON.parse(B)})},b=async()=>{try{const B=await Y.get("/api/status"),{success:U,data:R}=B.data;U?(n({type:"set",payload:R}),wm(R)):W("Unable to connect to server")}catch{W("Failed to load status")}finally{l(!0)}};f.useEffect(()=>{x(),b().catch(console.error);const B=lc();B&&(document.title=B),a({type:"SET_SIDER",payload:!0})},[p]),f.useEffect(()=>{const B=d.get("oToken"),U=d.get("oUser"),R=d.get("layout");B&&U?(sessionStorage.setItem("oToken",B),sessionStorage.setItem("oUser",U),sessionStorage.setItem("layout",R),d.delete("oToken"),d.delete("oUser"),Y.get("/api/user/self",{skipError:!0}).then(M=>{const{success:K,data:ee}=M.data;K&&(localStorage.setItem("user",JSON.stringify(ee)),t({type:"login",payload:ee}),m({pathname:u.pathname,search:d?`?${d}`:""},{replace:!0,state:u.state}))}).finally(()=>{o(!1)})):o(!1)},[]),f.useEffect(()=>{const B=sessionStorage.getItem("layout")!=="false";a({type:"SET_LAYOUT",payload:B})},[u.pathname]);const y=u.pathname==="/login",k=u.pathname==="/";r.isMobile;const j=u.pathname==="/cases"||u.pathname.startsWith("/cases/"),v=u.pathname==="/license/apply",A=typeof window<"u"&&!!window.aipy,S=r.layout&&!!e.user&&!A&&r.showSider&&!k&&!y&&!j&&!v,F=r.layout&&!!e.user&&!A&&r.isMobile&&!r.showSider&&!k&&!y&&!j&&!v,O=A&&u.pathname==="/log",N=u.pathname==="/activity-center",I=r.isMobile&&u.pathname==="/topup",C=r.isMobile&&["/my-invites","/user-invitations","/recharge-management"].includes(u.pathname),_=r.shouldInnerPadding&&!k&&!y&&!v&&!N&&!I&&!C&&(!A||O);return s.jsxs("div",{className:Te("flex h-screen flex-col overflow-x-hidden bg-base-100 text-base-content",r.isMobile&&"h-auto min-h-screen overflow-visible"),children:[s.jsxs("div",{className:Te("flex h-screen flex-1 flex-col overflow-auto",r.isMobile&&"h-auto overflow-visible"),children:[S&&s.jsx("div",{className:"fixed left-0 top-0 z-[99] h-screen",children:s.jsx(cm,{})}),F&&s.jsx("button",{type:"button",className:"btn btn-square fixed left-3 top-3 z-[110] shadow-md",onClick:()=>a({type:"SET_SIDER",payload:!0}),"aria-label":h("展开侧边栏"),children:s.jsx(Vo,{className:"size-5"})}),s.jsxs("div",{className:Te("flex min-w-0 flex-1 flex-col transition-[margin] duration-300",r.layout&&!r.isMobile&&S&&(r.siderCollapsed?"ml-16":"ml-[248px]")),children:[s.jsx("main",{className:Te("relative min-h-0 flex-1",r.isMobile?"mt-0.5 overflow-visible":"overflow-y-auto",_&&"p-6"),children:i||y&&!c?s.jsx("div",{className:"flex min-h-screen w-full items-center justify-center",children:s.jsx("span",{className:"loading loading-spinner loading-lg",role:"status","aria-label":"loading"})}):s.jsx(e2,{})}),s.jsx("footer",{className:"w-full shrink-0",children:r.layout&&!k&&!y&&!v&&s.jsx(n2,{})})]})]}),s.jsx(s2,{}),!i&&!(y&&!c)&&!k&&!v&&s.jsx(r2,{})]})},i2=ec.createRoot(document.getElementById("root"));i2.render(s.jsx(Ed,{children:s.jsx(sc,{children:s.jsx(nc,{children:s.jsx(Tu,{basename:"/",children:s.jsx(ac,{children:s.jsxs(jd,{children:[s.jsx(a2,{}),s.jsx(ud,{})]})})})})})}));export{Y as A,oe as B,Yn as C,Ne as D,ke as I,Cs as P,il as S,kt as U,io as a,ft as b,lr as c,b2 as d,f2 as e,ne as f,Cd as g,pn as h,h2 as i,s as j,lo as k,fe as l,ta as m,Xe as n,H as o,x2 as q,g2 as r,W as s,_t as t,ye as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.