@forsion/extend 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,4 +1,72 @@
1
- "use strict";(()=>{var qe,T,Tt,Kn,ae,Pt,It,Rt,Ze,Te,ye,Lt,ot,et,tt,Dt,Le={},De=[],jn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ne=Array.isArray;function ee(t,e){for(var n in e)t[n]=e[n];return t}function rt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Yn(t,e,n){var r,a,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?qe.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return Ie(t,s,r,a,null)}function Ie(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Tt,__i:-1,__u:0};return a==null&&T.vnode!=null&&T.vnode(i),i}function R(t){return t.children}function Re(t,e){this.props=t,this.context=e}function de(t,e){if(e==null)return t.__?de(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?de(t):null}function Qn(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],a=[],i=ee({},e);i.__v=e.__v+1,T.vnode&&T.vnode(i),at(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??de(e),!!(32&e.__u),a),i.__v=e.__v,i.__.__k[i.__i]=i,zt(r,i,a),e.__e=e.__=null,i.__e!=n&&Ft(i)}}function Ft(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Ft(t)}function nt(t){(!t.__d&&(t.__d=!0)&&ae.push(t)&&!Fe.__r++||Pt!=T.debounceRendering)&&((Pt=T.debounceRendering)||It)(Fe)}function Fe(){try{for(var t,e=1;ae.length;)ae.length>e&&ae.sort(Rt),t=ae.shift(),e=ae.length,Qn(t)}finally{ae.length=Fe.__r=0}}function qt(t,e,n,r,a,i,s,c,u,d,m){var f,l,g,h,x,w,_=r&&r.__k||De,p=e.length;for(u=Gn(n,e,_,u,p),f=0;f<p;f++)(g=n.__k[f])!=null&&(l=g.__i!=-1&&_[g.__i]||Le,g.__i=f,w=at(t,g,l,a,i,s,c,u,d,m),h=g.__e,g.ref&&l.ref!=g.ref&&(l.ref&&it(l.ref,null,g),m.push(g.ref,g.__c||h,g)),x==null&&h!=null&&(x=h),4&g.__u?(u=Nt(g,u,t),l.__e&&(l.__e=null)):typeof g.type=="function"&&w!==void 0?u=w:h&&(u=h.nextSibling),g.__u&=-7);return n.__e=x,u}function Gn(t,e,n,r,a){var i,s,c,u,d,m=n.length,f=m,l=0;for(t.__k=new Array(a),i=0;i<a;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[i]=Ie(null,s,null,null,null):Ne(s)?s=t.__k[i]=Ie(R,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=Ie(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,u=i+l,s.__=t,s.__b=t.__b+1,c=null,(d=s.__i=Zn(s,n,u,f))!=-1&&(f--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(a>m?l--:a<m&&l++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?l--:d==u+1?l++:(d>u?l--:l++,s.__u|=4))):t.__k[i]=null;if(f)for(i=0;i<m;i++)(c=n[i])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=de(c)),Ot(c,c));return r}function Nt(t,e,n){var r,a;if(typeof t.type=="function"){for(r=t.__k,a=0;r&&a<r.length;a++)r[a]&&(r[a].__=t,e=Nt(r[a],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=de(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Zn(t,e,n,r){var a,i,s,c=t.key,u=t.type,d=e[n],m=d!=null&&(2&d.__u)==0;if(d===null&&c==null||m&&c==d.key&&u==d.type)return n;if(r>(m?1:0)){for(a=n-1,i=n+1;a>=0||i<e.length;)if((d=e[s=a>=0?a--:i++])!=null&&(2&d.__u)==0&&c==d.key&&u==d.type)return s}return-1}function Mt(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||jn.test(e)?n:n+"px"}function Ee(t,e,n,r,a){var i,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Mt(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Mt(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(Lt,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[ye]=r[ye]:(n[ye]=ot,t.addEventListener(e,i?tt:et,i)):t.removeEventListener(e,i?tt:et,i);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Et(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Te]==null)e[Te]=ot++;else if(e[Te]<n[ye])return;return n(T.event?T.event(e):e)}}}function at(t,e,n,r,a,i,s,c,u,d){var m,f,l,g,h,x,w,_,p,b,y,C,E,F,O,re,H=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[c=e.__e=n.__e]),(m=T.__b)&&m(e);e:if(typeof H=="function"){f=s.length;try{if(p=e.props,b=H.prototype&&H.prototype.render,y=(m=H.contextType)&&r[m.__c],C=m?y?y.props.value:m.__:r,n.__c?_=(l=e.__c=n.__c).__=l.__E:(b?e.__c=l=new H(p,C):(e.__c=l=new Re(p,C),l.constructor=H,l.render=to),y&&y.sub(l),l.state||(l.state={}),l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),b&&l.__s==null&&(l.__s=l.state),b&&H.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ee({},l.__s)),ee(l.__s,H.getDerivedStateFromProps(p,l.__s))),h=l.props,x=l.state,l.__v=e,g)b&&H.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),b&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(b&&H.getDerivedStateFromProps==null&&p!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(p,C),e.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(p,l.__s,C)===!1){e.__v!=n.__v&&(l.props=p,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Z){Z&&(Z.__=e)}),De.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&s.push(l),c=de(n);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(p,l.__s,C),b&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,x,w)})}if(l.context=C,l.props=p,l.__P=t,l.__e=!1,E=T.__r,F=0,b)l.state=l.__s,l.__d=!1,E&&E(e),m=l.render(l.props,l.state,l.context),De.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,E&&E(e),m=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++F<25);l.state=l.__s,l.getChildContext!=null&&(r=ee(ee({},r),l.getChildContext())),b&&!g&&l.getSnapshotBeforeUpdate!=null&&(w=l.getSnapshotBeforeUpdate(h,x)),O=m!=null&&m.type===R&&m.key==null?Ut(m.props.children):m,c=qt(t,Ne(O)?O:[O],e,n,r,a,i,s,c,u,d),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(s.length=f,e.__v=null,u||i!=null){if(Z.then){for(e.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i!=null&&(i[i.indexOf(c)]=null),e.__e=c}else if(i!=null)for(re=i.length;re--;)rt(i[re])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),Z.then||Bt(e),T.__e(Z,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=eo(n.__e,e,n,r,a,i,s,u,d);return(m=T.diffed)&&m(e),128&e.__u?void 0:c}function Bt(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Bt))}function zt(t,e,n){for(var r=0;r<n.length;r++)it(n[r],n[++r],n[++r]);T.__c&&T.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(i){i.call(a)})}catch(i){T.__e(i,a.__v)}})}function Ut(t){return typeof t!="object"||t==null||t.__b>0?t:Ne(t)?t.map(Ut):t.constructor!==void 0?null:ee({},t)}function eo(t,e,n,r,a,i,s,c,u){var d,m,f,l,g,h,x,w=n.props||Le,_=e.props,p=e.type;if(p=="svg"?a="http://www.w3.org/2000/svg":p=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!p&&(p?g.localName==p:g.nodeType==3)){t=g,i[d]=null;break}}if(t==null){if(p==null)return document.createTextNode(_);t=document.createElementNS(a,p,_.is&&_),c&&(T.__m&&T.__m(e,i),c=!1),i=null}if(p==null)w===_||c&&t.data==_||(t.data=_);else{if(i=p=="textarea"&&_.defaultValue!=null?null:i&&qe.call(t.childNodes),!c&&i!=null)for(w={},d=0;d<t.attributes.length;d++)w[(g=t.attributes[d]).name]=g.value;for(d in w)g=w[d],d=="dangerouslySetInnerHTML"?f=g:d=="children"||d in _||d=="value"&&"defaultValue"in _||d=="checked"&&"defaultChecked"in _||Ee(t,d,null,g,a);for(d in _)g=_[d],d=="children"?l=g:d=="dangerouslySetInnerHTML"?m=g:d=="value"?h=g:d=="checked"?x=g:c&&typeof g!="function"||w[d]===g||Ee(t,d,g,w[d],a);if(m)c||f&&(m.__html==f.__html||m.__html==t.innerHTML)||(t.innerHTML=m.__html),e.__k=[];else if(f&&(t.innerHTML=""),qt(e.type=="template"?t.content:t,Ne(l)?l:[l],e,n,r,p=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&de(n,0),c,u),i!=null)for(d=i.length;d--;)rt(i[d]);c&&p!="textarea"||(d="value",p=="progress"&&h==null?t.removeAttribute("value"):h!=null&&(h!==t[d]||p=="progress"&&!h||p=="option"&&h!=w[d])&&Ee(t,d,h,w[d],a),d="checked",x!=null&&x!=t[d]&&Ee(t,d,x,w[d],a))}return t}function it(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(a){T.__e(a,n)}}function Ot(t,e,n){var r,a;if(T.unmount&&T.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||it(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(a=0;a<r.length;a++)r[a]&&Ot(r[a],e,n||typeof t.type!="function");n||rt(t.__e),t.__c=t.__=t.__e=void 0}function to(t,e,n){return this.constructor(t,n)}function st(t,e,n){var r,a,i,s;e==document&&(e=document.documentElement),T.__&&T.__(t,e),a=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],at(e,t=(!r&&n||e).__k=Yn(R,null,[t]),a||Le,Le,e.namespaceURI,!r&&n?[n]:a?null:e.firstChild?qe.call(e.childNodes):null,i,!r&&n?n:a?a.__e:e.firstChild,r,s),zt(i,t,s),t.props.children=null}function Ht(t){function e(n){var r,a;return this.getChildContext||(r=new Set,(a={})[e.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,nt(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return e.__c="__cC"+Dt++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}qe=De.slice,T={__e:function(t,e,n,r){for(var a,i,s;e=e.__;)if((a=e.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(t)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,r||{}),s=a.__d),s)return a.__E=a}catch(c){t=c}throw t}},Tt=0,Kn=function(t){return t!=null&&t.constructor===void 0},Re.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ee({},this.state),typeof t=="function"&&(t=t(ee({},n),this.props)),t&&ee(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),nt(this))},Re.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),nt(this))},Re.prototype.render=R,ae=[],It=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(t,e){return t.__v.__b-e.__v.__b},Fe.__r=0,Ze=Math.random().toString(8),Te="__d"+Ze,ye="__a"+Ze,Lt=/(PointerCapture)$|Capture$/i,ot=0,et=Et(!1),tt=Et(!0),Dt=0;var be,q,ct,$t,_e=0,Qt=[],z=T,Xt=z.__b,Wt=z.__r,Vt=z.diffed,Jt=z.__c,Kt=z.unmount,jt=z.__;function ze(t,e){z.__h&&z.__h(q,t,_e||e),_e=0;var n=q.__H||(q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function v(t){return _e=1,no(en,t)}function no(t,e,n){var r=ze(be++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):en(void 0,e),function(c){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,c);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.__f)){var a=function(c,u,d){if(!r.__c.__H)return!0;var m=!1,f=r.__c.props!==c;if(r.__c.__H.__.some(function(g){if(g.__N){m=!0;var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(f=!0)}}),i){var l=i.call(this,c,u,d);return m?l||f:l}return!m||f};q.__f=!0;var i=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(c,u,d){if(this.__e){var m=i;i=void 0,a(c,u,d),i=m}s&&s.call(this,c,u,d)},q.shouldComponentUpdate=a}return r.__N||r.__}function N(t,e){var n=ze(be++,3);!z.__s&&Zt(n.__H,e)&&(n.__=t,n.u=e,q.__H.__h.push(n))}function $(t){return _e=5,ve(function(){return{current:t}},[])}function ve(t,e){var n=ze(be++,7);return Zt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ie(t,e){return _e=8,ve(function(){return t},e)}function Gt(t){var e=q.context[t.__c],n=ze(be++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(q)),e.props.value):t.__}function oo(){for(var t;t=Qt.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Be),e.__h.some(lt),e.__h=[]}catch(n){e.__h=[],z.__e(n,t.__v)}}}z.__b=function(t){q=null,Xt&&Xt(t)},z.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),jt&&jt(t,e)},z.__r=function(t){Wt&&Wt(t),be=0;var e=(q=t.__c).__H;e&&(ct===q?(e.__h=[],q.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Be),e.__h.some(lt),e.__h=[],be=0)),ct=q},z.diffed=function(t){Vt&&Vt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Qt.push(e)!==1&&$t===z.requestAnimationFrame||(($t=z.requestAnimationFrame)||ro)(oo)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),ct=q=null},z.__c=function(t,e){e.some(function(n){try{n.__h.some(Be),n.__h=n.__h.filter(function(r){return!r.__||lt(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],z.__e(r,n.__v)}}),Jt&&Jt(t,e)},z.unmount=function(t){Kt&&Kt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Be(r)}catch(a){e=a}}),n.__H=void 0,e&&z.__e(e,n.__v))};var Yt=typeof requestAnimationFrame=="function";function ro(t){var e,n=function(){clearTimeout(r),Yt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Yt&&(e=requestAnimationFrame(n))}function Be(t){var e=q,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),q=e}function lt(t){var e=q;t.__c=t.__(),q=e}function Zt(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function en(t,e){return typeof e=="function"?e(t):e}var ao={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","common.cancel":"\u53D6\u6D88","common.copied":"\u5DF2\u590D\u5236","common.copyFailed":"\u590D\u5236\u5931\u8D25","common.done":"\u5B8C\u6210","common.loadFailed":"\u6CA1\u80FD\u52A0\u8F7D","common.loadMore":"\u52A0\u8F7D\u66F4\u591A","common.loading":"\u52A0\u8F7D\u4E2D\u2026","common.openInBrowser":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00","common.retry":"\u91CD\u8BD5","common.save":"\u4FDD\u5B58","common.thisWeek":"\u672C\u5468","common.today":"\u4ECA\u65E5","common.unlimited":"\u4E0D\u9650","signin.button":"\u767B\u5F55 Forsion","signin.desc":"\u767B\u5F55 Forsion \u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u7BA1\u7406\u8D26\u53F7\u3001\u989D\u5EA6\u3001\u5B89\u5168\u4E0E\u53CD\u9988\u3002","signin.pending":"\u7B49\u5F85\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u767B\u5F55\u2026","signin.deviceHint":"\u6D4F\u89C8\u5668\u4F1A\u81EA\u52A8\u6253\u5F00\u767B\u5F55\u9875\uFF1B\u6CA1\u6709\u6253\u5F00\u7684\u8BDD\uFF0C\u7528\u624B\u673A\u626B\u7801\u6216\u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u5E76\u6838\u5BF9\u9A8C\u8BC1\u7801\u3002","signin.code":"\u9A8C\u8BC1\u7801","signin.openLink":"\u6253\u5F00\u767B\u5F55\u9875","signin.copyLink":"\u590D\u5236\u94FE\u63A5","signin.qrLabel":"\u767B\u5F55\u4E8C\u7EF4\u7801","account.profile.title":"\u4E2A\u4EBA\u8D44\u6599","account.profile.desc":"\u5934\u50CF\u3001\u6635\u79F0\uFF0C\u4EE5\u53CA\u7ED1\u5B9A\u7684\u624B\u673A\u548C\u90AE\u7BB1","account.avatar.change":"\u66F4\u6362\u5934\u50CF","account.avatar.saved":"\u5934\u50CF\u5DF2\u66F4\u65B0","account.nickname.edit":"\u4FEE\u6539\u6635\u79F0","account.nickname.label":"\u6635\u79F0","account.nickname.saved":"\u6635\u79F0\u5DF2\u66F4\u65B0","account.role.admin":"\u7BA1\u7406\u5458","account.username":"\u7528\u6237\u540D {name}","account.contact.phone":"\u624B\u673A","account.contact.email":"\u90AE\u7BB1","account.contact.unbound":"\u672A\u7ED1\u5B9A","account.contact.manage":"\u53BB\u5B89\u5168\u9875\u7BA1\u7406","account.web.open":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u4E2A\u4EBA\u4E2D\u5FC3","account.web.desc":"\u4E91\u7A7A\u95F4\u3001AI \u5927\u8111\u3001\u6295\u7A3F\u4E0E\u4E3B\u9898\u5728\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7BA1\u7406\u3002","member.title":"\u4F1A\u5458","member.desc":"\u5F53\u524D\u6863\u4F4D\u3001\u65B9\u6848\u4E0E\u5230\u671F\u65E5","member.upgrade":"\u5347\u7EA7\u4F1A\u5458","member.renew":"\u7EED\u8D39","member.freeName":"\u514D\u8D39\u7248","member.freeHint":"\u5347\u7EA7\u4F1A\u5458\u53EF\u4EE5\u83B7\u5F97\u66F4\u591A AI \u989D\u5EA6","member.expires":"{date} \u5230\u671F","member.noExpiry":"\u957F\u671F\u6709\u6548","member.loadFailed":"\u4F1A\u5458\u4FE1\u606F\u6682\u65F6\u62FF\u4E0D\u5230\u3002","local.title":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u8D26\u53F7","local.desc":"\u5728\u767B\u5F55\u8FC7\u7684\u8D26\u53F7\u4E4B\u95F4\u5207\u6362","local.current":"\u5F53\u524D","local.switch":"\u5207\u6362","local.add":"\u767B\u5F55\u5176\u4ED6\u8D26\u53F7","local.signOut":"\u9000\u51FA\u767B\u5F55","local.empty":"\u8FD8\u6CA1\u6709\u4FDD\u5B58\u7684\u8D26\u53F7","local.loadFailed":"\u8D26\u53F7\u5217\u8868\u6682\u65F6\u8BFB\u4E0D\u5230","quota.ai.title":"AI \u989D\u5EA6","quota.ai.desc":"\u4ECA\u65E5\u548C\u672C\u5468\u5404\u8FD8\u5269\u591A\u5C11\uFF1B\u7528\u5B8C\u540E\u53EF\u4EE5\u7528\u989D\u5EA6\u91CD\u7F6E\u5361\u6062\u590D","quota.resetDaily":"\u6BCF\u5929 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","quota.resetWeekly":"{date} 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","card.title":"\u989D\u5EA6\u91CD\u7F6E\u5361","card.desc":"\u628A\u4ECA\u65E5\u548C\u672C\u5468\u7684 AI \u989D\u5EA6\u6062\u590D\u5230 100%","card.owned":"\u6301\u6709 {n} \u5F20","card.use":"\u4F7F\u7528\u4E00\u5F20","card.useConfirm":"\u786E\u8BA4\u4F7F\u7528","card.used":"\u5DF2\u4F7F\u7528 1 \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","card.left":"\u8FD8\u5269 {n} \u5F20","card.noneHint":"\u6CA1\u6709\u989D\u5EA6\u91CD\u7F6E\u5361\u4E86\uFF0C\u53EF\u4EE5\u7528\u79EF\u5206\u5151\u6362\u3002","card.exchange":"\u7528\u79EF\u5206\u5151\u6362","card.price":"\u6BCF\u5F20 {price} \u79EF\u5206\uFF0C\u4E00\u6B21 1\u201350 \u5F20","card.count":"\u5151\u6362\u5F20\u6570","card.cost":"\u82B1\u8D39 {cost} \u79EF\u5206","card.countHint":"\u586B 1\u201350","card.exchangeButton":"\u5151\u6362","card.exchangeConfirm":"\u786E\u8BA4\u82B1\u8D39 {cost} \u79EF\u5206","card.exchanged":"\u5DF2\u5151\u6362 {n} \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","points.title":"\u79EF\u5206","points.desc":"\u79EF\u5206\u53EF\u4EE5\u5151\u6362\u989D\u5EA6\u91CD\u7F6E\u5361\uFF0C\u4E5F\u80FD\u5728 AI \u989D\u5EA6\u7528\u5B8C\u540E\u81EA\u52A8\u62B5\u6263","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","points.autoDeduct":"\u79EF\u5206\u81EA\u52A8\u62B5\u6263","points.autoDeductDesc":"AI \u989D\u5EA6\u7528\u5B8C\u540E\uFF0C\u81EA\u52A8\u7528\u79EF\u5206\u7EE7\u7EED","bg.title":"\u540E\u53F0\u989D\u5EA6","bg.desc":"Muse \u4E0E\u81EA\u52A8\u5316\u4F7F\u7528\uFF0C\u548C AI \u989D\u5EA6\u5206\u5F00\u8BA1\u7B97","bg.autoMain":"\u7528\u5B8C\u540E\u6539\u7528 AI \u989D\u5EA6\u7EE7\u7EED","bg.autoMainDesc":"\u5173\u7740\u65F6\uFF0C\u540E\u53F0\u989D\u5EA6\u7528\u5B8C\u540E Muse \u4E0E\u81EA\u52A8\u5316\u4F1A\u6682\u505C","bg.convert":"\u4ECE AI \u989D\u5EA6\u8F6C\u5165","bg.convertDesc":"\u6309 AI \u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B\u8F6C\u5165\uFF0C\u672C\u5468\u671F\u5185\u6709\u6548","bg.convertConfirm":"\u786E\u8BA4\u8F6C\u5165 {pct}%","bg.converted":"\u5DF2\u4ECE AI \u989D\u5EA6\u8F6C\u5165 {pct}%","invite.title":"\u9080\u8BF7\u4E0E\u5151\u6362","invite.desc":"\u9080\u8BF7\u597D\u53CB\u6CE8\u518C\uFF0C\u6216\u5151\u6362\u4F60\u6536\u5230\u7684\u7801","invite.myCode":"\u6211\u7684\u9080\u8BF7\u7801","invite.count":"\u5DF2\u9080\u8BF7 {n} \u4EBA","invite.copyCode":"\u590D\u5236\u9080\u8BF7\u7801","invite.copyLink":"\u590D\u5236\u9080\u8BF7\u94FE\u63A5","invite.loadFailed":"\u9080\u8BF7\u7801\u6682\u65F6\u62FF\u4E0D\u5230","invite.claim":"\u586B\u5199\u9080\u8BF7\u7801","invite.claimDesc":"\u6CE8\u518C\u540E 7 \u5929\u5185\uFF0C\u53EF\u4EE5\u8865\u586B\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimPlaceholder":"\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimSubmit":"\u63D0\u4EA4","invite.claimed":"\u9080\u8BF7\u7801\u5DF2\u751F\u6548","redeem.title":"\u5151\u6362\u7801","redeem.desc":"\u5151\u6362\u79EF\u5206\u3001\u4F1A\u5458\u6216\u5176\u4ED6\u5956\u52B1","redeem.placeholder":"\u8F93\u5165\u5151\u6362\u7801","redeem.submit":"\u5151\u6362","redeem.success":"\u5151\u6362\u6210\u529F","redeem.successWith":"\u5151\u6362\u6210\u529F\uFF1A{what}","redeem.gotPoints":"{n} \u79EF\u5206","redeem.gotMembership":"\u4F1A\u5458","sec.methods.title":"\u767B\u5F55\u65B9\u5F0F","sec.methods.desc":"\u624B\u673A\u548C\u90AE\u7BB1\u53EF\u4EE5\u7528\u6765\u767B\u5F55\u3001\u627E\u56DE\u5BC6\u7801","sec.bind":"\u7ED1\u5B9A","sec.change":"\u66F4\u6362","sec.phone":"\u624B\u673A\u53F7","sec.email":"\u90AE\u7BB1\u5730\u5740","sec.newPhone":"\u65B0\u624B\u673A\u53F7","sec.newEmail":"\u65B0\u90AE\u7BB1\u5730\u5740","sec.phonePlaceholder":"\u4E2D\u56FD\u5927\u9646\u53F7\u7801\u76F4\u63A5\u586B\uFF0C\u5176\u4ED6\u5730\u533A\u5E26 +\u533A\u53F7","sec.emailPlaceholder":"name@example.com","sec.code":"\u9A8C\u8BC1\u7801","sec.codePlaceholder":"\u8F93\u5165\u9A8C\u8BC1\u7801","sec.sendCode":"\u53D1\u9001\u9A8C\u8BC1\u7801","sec.resendIn":"{s} \u79D2\u540E\u91CD\u53D1","sec.codeSent":"\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001","sec.bindSubmit":"\u786E\u8BA4\u7ED1\u5B9A","sec.phoneBound":"\u624B\u673A\u5DF2\u7ED1\u5B9A","sec.emailBound":"\u90AE\u7BB1\u5DF2\u7ED1\u5B9A","sec.devices.title":"\u767B\u5F55\u8BBE\u5907","sec.devices.desc":"\u62C5\u5FC3\u8D26\u53F7\u88AB\u522B\u4EBA\u7528\u4E86\uFF0C\u53EF\u4EE5\u8BA9\u6240\u6709\u8BBE\u5907\u91CD\u65B0\u767B\u5F55","sec.logoutAll":"\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDesc":"\u5305\u62EC\u8FD9\u53F0\u7535\u8111\uFF0C\u6240\u6709\u8BBE\u5907\u90FD\u8981\u91CD\u65B0\u767B\u5F55","sec.logoutAllConfirm":"\u786E\u8BA4\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDone":"\u5DF2\u9000\u51FA\u6240\u6709\u8BBE\u5907","pw.title":"\u5BC6\u7801","pw.desc":"{min}\u2013{max} \u4F4D\uFF0C\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C","pw.change":"\u4FEE\u6539\u5BC6\u7801","pw.modeLabel":"\u4FEE\u6539\u65B9\u5F0F","pw.mode.current":"\u7528\u5F53\u524D\u5BC6\u7801","pw.mode.code":"\u7528\u9A8C\u8BC1\u7801","pw.current":"\u5F53\u524D\u5BC6\u7801","pw.currentRequired":"\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801","pw.new":"\u65B0\u5BC6\u7801","pw.confirm":"\u518D\u8F93\u4E00\u6B21\u65B0\u5BC6\u7801","pw.mismatch":"\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u4E0D\u4E00\u81F4","pw.submit":"\u4FEE\u6539\u5BC6\u7801","pw.submitReset":"\u8BBE\u7F6E\u65B0\u5BC6\u7801","pw.changed":"\u5BC6\u7801\u5DF2\u66F4\u65B0","pw.noPasswordYet":"\u8FD9\u4E2A\u8D26\u53F7\u8FD8\u6CA1\u6709\u8BBE\u7F6E\u5BC6\u7801\uFF0C\u8BF7\u6539\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u3002","pw.codeNeedsContact":"\u7ED1\u5B9A\u624B\u673A\u6216\u90AE\u7BB1\u540E\uFF0C\u624D\u80FD\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u5BC6\u7801\u3002","pw.via":"\u9A8C\u8BC1\u7801\u53D1\u5230","pw.codeTo":"\u9A8C\u8BC1\u7801\u4F1A\u53D1\u5230 {target}","pw.rulesLabel":"\u5BC6\u7801\u89C4\u5219","pw.req.length":"{min}\u2013{max} \u4F4D","pw.req.lower":"\u542B\u5C0F\u5199\u5B57\u6BCD","pw.req.upper":"\u542B\u5927\u5199\u5B57\u6BCD","pw.req.special":"\u542B\u7279\u6B8A\u5B57\u7B26","pw.req.space":"\u4E0D\u542B\u7A7A\u683C","pw.rule.format":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","pw.rule.min":"\u5BC6\u7801\u81F3\u5C11 8 \u4F4D","pw.rule.max":"\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D","pw.rule.space":"\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C","pw.rule.lower":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD","pw.rule.upper":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD","pw.rule.special":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26","del.title":"\u6CE8\u9500\u8D26\u53F7","del.desc":"\u6C38\u4E45\u5220\u9664\u8D26\u53F7\u548C\u5168\u90E8\u6570\u636E\uFF0C\u65E0\u6CD5\u6062\u590D","del.start":"\u6CE8\u9500\u8D26\u53F7","del.warn":"\u6CE8\u9500\u540E\uFF0C\u8D26\u53F7\u3001\u79EF\u5206\u3001\u4F1A\u5458\u3001\u4E91\u7A7A\u95F4\u548C\u5168\u90E8\u6570\u636E\u90FD\u4F1A\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u627E\u56DE\u3002","del.methodLabel":"\u9A8C\u8BC1\u65B9\u5F0F","del.byCode":"\u9A8C\u8BC1\u7801","del.byPassword":"\u5BC6\u7801","del.codeLabel":"\u53D1\u5230 {target} \u7684\u9A8C\u8BC1\u7801","del.passwordLabel":"\u8D26\u53F7\u5BC6\u7801","del.submit":"\u6CE8\u9500\u8D26\u53F7","del.confirm":"\u786E\u8BA4\u6C38\u4E45\u6CE8\u9500","del.done":"\u8D26\u53F7\u5DF2\u6CE8\u9500","usage.overview.title":"\u7528\u91CF\u6982\u89C8","usage.overview.desc":"\u6240\u9009\u65F6\u95F4\u6BB5\u5185\u7684\u8BF7\u6C42\u4E0E AI \u989D\u5EA6\u6D88\u8017","usage.range":"\u65F6\u95F4\u8303\u56F4","usage.days":"{n} \u5929","usage.requests":"\u8BF7\u6C42\u6B21\u6570","usage.successRate":"\u6210\u529F\u7387","usage.consumption":"AI \u989D\u5EA6\u6D88\u8017","usage.ofToday":"\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650","usage.unlimitedNote":"\u4F60\u7684 AI \u989D\u5EA6\u4E0D\u9650\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.noLimitNote":"\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u4E3A 0 \u6216\u6682\u65F6\u62FF\u4E0D\u5230\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.byModel.title":"\u6309\u6A21\u578B","usage.byModel.desc":"\u5404\u6A21\u578B\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.byApp.title":"\u6309\u5E94\u7528","usage.byApp.desc":"\u5404\u5E94\u7528\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.col.model":"\u6A21\u578B","usage.col.app":"\u5E94\u7528","usage.col.requests":"\u8BF7\u6C42","usage.col.consumption":"\u989D\u5EA6\u6D88\u8017","usage.empty":"\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u7528\u91CF","usage.appUnknown":"\u5176\u4ED6","usage.recent.title":"\u6700\u8FD1\u6D88\u8017","usage.recent.desc":"\u6BCF\u6B21\u8C03\u7528\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B","usage.recentEmpty":"\u8FD8\u6CA1\u6709\u6D88\u8017\u8BB0\u5F55","usage.failed":"\u5931\u8D25","usage.shown":"\u5DF2\u663E\u793A {shown} / {total} \u6761","fb.list.title":"\u6211\u7684\u53CD\u9988","fb.list.desc":"\u63D0\u4EA4\u8FC7\u7684\u95EE\u9898\u548C\u5EFA\u8BAE\uFF0C\u56DE\u590D\u4F1A\u663E\u793A\u5728\u8FD9\u91CC","fb.new":"\u65B0\u5EFA\u53CD\u9988","fb.empty":"\u8FD8\u6CA1\u6709\u53CD\u9988","fb.untitled":"\u672A\u547D\u540D\u53CD\u9988","fb.unread":"\u6709\u65B0\u56DE\u590D","fb.shown":"\u5DF2\u663E\u793A {n} \u6761","fb.submitted":"\u5DF2\u63D0\u4EA4\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D","fb.descLabel":"\u63CF\u8FF0\u95EE\u9898\u6216\u5EFA\u8BAE","fb.descPlaceholder":"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF0C\u4F60\u671F\u671B\u600E\u6837\u2026\u2026","fb.imagesHint":"\u6700\u591A\u9644 {n} \u5F20\u622A\u56FE\uFF08\u6BCF\u5F20\u4E0D\u8D85\u8FC7 5MB\uFF09\uFF0C\u53EF\u4EE5\u7C98\u8D34\u6216\u62D6\u8FDB\u6765\u3002","fb.addImages":"\u6DFB\u52A0\u622A\u56FE","fb.removeImage":"\u79FB\u9664\u8FD9\u5F20\u56FE","fb.submit":"\u63D0\u4EA4","fb.back":"\u8FD4\u56DE\u5217\u8868","fb.you":"\u4F60","fb.support":"Forsion \u56E2\u961F","fb.attachment":"\u9644\u4EF6","fb.imagePreview":"\u67E5\u770B\u5927\u56FE","fb.closedNote":"\u8FD9\u4E2A\u5DE5\u5355\u5DF2\u5173\u95ED\uFF0C\u4E0D\u80FD\u518D\u56DE\u590D\u3002\u6709\u65B0\u95EE\u9898\u8BF7\u65B0\u5EFA\u53CD\u9988\u3002","fb.replyPlaceholder":"\u56DE\u590D\u2026","fb.replySend":"\u53D1\u9001\u56DE\u590D","fb.replySent":"\u56DE\u590D\u5DF2\u53D1\u9001","fb.status.open":"\u5F85\u5904\u7406","fb.status.in_progress":"\u5904\u7406\u4E2D","fb.status.resolved":"\u5DF2\u89E3\u51B3","fb.status.closed":"\u5DF2\u5173\u95ED","err.accountGone":"\u8FD9\u4E2A\u8D26\u53F7\u5DF2\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.adminCannotDelete":"\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500","err.avatarInvalid":"\u8FD9\u5F20\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6362\u4E00\u5F20\u8BD5\u8BD5","err.avatarTooLarge":"\u56FE\u7247\u592A\u5927\u4E86\uFF0C\u6362\u4E00\u5F20\u5C0F\u4E00\u70B9\u7684","err.backgroundUnavailable":"\u540E\u53F0\u989D\u5EA6\u6682\u65F6\u4E0D\u53EF\u7528","err.captcha":"\u9700\u8981\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u4EBA\u673A\u9A8C\u8BC1","err.codeCooldown":"\u53D1\u9001\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.codeInvalid":"\u9A8C\u8BC1\u7801\u4E0D\u5BF9\u6216\u5DF2\u8FC7\u671F","err.codeRequired":"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801","err.codeSendFailed":"\u9A8C\u8BC1\u7801\u6CA1\u53D1\u51FA\u53BB\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.currentPasswordWrong":"\u5F53\u524D\u5BC6\u7801\u4E0D\u5BF9","err.deleteTargetInvalid":"\u9A8C\u8BC1\u7801\u53EA\u80FD\u53D1\u5230\u8D26\u53F7\u7ED1\u5B9A\u7684\u624B\u673A\u6216\u90AE\u7BB1","err.deleteVerifyFailed":"\u9A8C\u8BC1\u6CA1\u901A\u8FC7\uFF0C\u8D26\u53F7\u6CA1\u6709\u6CE8\u9500","err.emailInUse":"\u8FD9\u4E2A\u90AE\u7BB1\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.emailInvalid":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.featureDisabled":"\u8FD9\u9879\u529F\u80FD\u6682\u65F6\u5173\u95ED\u4E86","err.feedbackEmpty":"\u8BF7\u5199\u4E00\u4E0B\u95EE\u9898\u6216\u5EFA\u8BAE","err.feedbackTooLong":"\u63CF\u8FF0\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.generic":"\u64CD\u4F5C\u6CA1\u6709\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.imageRead":"\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765","err.imageTooLarge":"\u6BCF\u5F20\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5MB","err.imageType":"\u53EA\u80FD\u6DFB\u52A0\u56FE\u7247","err.insufficientMainQuota":"AI \u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6","err.insufficientPoints":"\u79EF\u5206\u4E0D\u591F","err.priceChanged":"\u91CD\u7F6E\u5361\u5355\u4EF7\u521A\u521A\u8C03\u6574\u8FC7\uFF0C\u8BF7\u770B\u4E00\u4E0B\u65B0\u4EF7\u683C\uFF0C\u518D\u786E\u8BA4\u5151\u6362\u3002","err.invalidCount":"\u5F20\u6570\u8981\u5728 1\u201350 \u4E4B\u95F4","err.invalidInviteCode":"\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548","err.inviteAlreadyUsed":"\u4F60\u5DF2\u7ECF\u7528\u8FC7\u9080\u8BF7\u7801\u4E86","err.inviteEmpty":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","err.inviteOwnCode":"\u4E0D\u80FD\u586B\u81EA\u5DF1\u7684\u9080\u8BF7\u7801","err.inviteWindowExpired":"\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F","err.loginCodeExpired":"\u767B\u5F55\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.loginInProgress":"\u6B63\u5728\u767B\u5F55\u4E2D","err.loginTimeout":"\u767B\u5F55\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5","err.loginUnsupported":"\u8FD9\u4E2A\u4E91\u7AEF\u4E0D\u652F\u6301\u684C\u9762\u7AEF\u767B\u5F55","err.network":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5","err.noCloudUrl":"\u8BF7\u5148\u5728\u300C\u8FDE\u63A5\u300D\u91CC\u586B\u5199\u4E91\u7AEF\u5730\u5740","err.noResetCard":"\u6CA1\u6709\u53EF\u7528\u7684\u989D\u5EA6\u91CD\u7F6E\u5361","err.openFailed":"\u6CA1\u80FD\u6253\u5F00\u6D4F\u89C8\u5668","err.passwordRequired":"\u8BF7\u586B\u5199\u5F53\u524D\u5BC6\u7801\u548C\u65B0\u5BC6\u7801","err.phoneInUse":"\u8FD9\u4E2A\u624B\u673A\u53F7\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.phoneInvalid":"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u5BF9\uFF08\u5176\u4ED6\u5730\u533A\u8BF7\u5E26 +\u533A\u53F7\uFF09","err.redeemEmpty":"\u8BF7\u8F93\u5165\u5151\u6362\u7801","err.redeemExpired":"\u5151\u6362\u7801\u5DF2\u8FC7\u671F","err.redeemInactive":"\u5151\u6362\u7801\u5DF2\u505C\u7528","err.redeemNotFound":"\u5151\u6362\u7801\u4E0D\u5B58\u5728","err.redeemUsedUp":"\u5151\u6362\u7801\u5DF2\u88AB\u7528\u5B8C","err.redeemUserLimit":"\u4F60\u5DF2\u7ECF\u5151\u6362\u8FC7\u8FD9\u4E2A\u7801\u4E86","err.replyEmpty":"\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9","err.replyTooLong":"\u56DE\u590D\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.server":"\u670D\u52A1\u5668\u51FA\u9519\u4E86\uFF08{status}\uFF09\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.session":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.signedOut":"\u8BF7\u5148\u767B\u5F55 Forsion","err.targetInvalid":"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.ticketNotFound":"\u8FD9\u6761\u53CD\u9988\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664","err.tooFrequent":"\u64CD\u4F5C\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.tooManyImages":"\u6700\u591A\u6DFB\u52A0 5 \u5F20\u56FE\u7247","err.unavailable":"\u8FD9\u4E2A\u7248\u672C\u7684\u684C\u9762\u7AEF\u8FD8\u4E0D\u652F\u6301\u8FD9\u4E2A\u64CD\u4F5C\uFF0C\u8BF7\u66F4\u65B0 Forsion"},io={"page.account":"Account","page.quota":"Quota & points","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","common.cancel":"Cancel","common.copied":"Copied","common.copyFailed":"Couldn't copy","common.done":"Done","common.loadFailed":"Couldn't load","common.loadMore":"Load more","common.loading":"Loading\u2026","common.openInBrowser":"Open in browser","common.retry":"Retry","common.save":"Save","common.thisWeek":"This week","common.today":"Today","common.unlimited":"Unlimited","signin.button":"Sign in to Forsion","signin.desc":"Sign in to your Forsion account to manage your account, quota, security and feedback here.","signin.pending":"Waiting for you to finish in your browser\u2026","signin.deviceHint":"Your browser opens the sign-in page on its own. If it doesn't, scan the code with your phone or open the link below, and check that the code matches.","signin.code":"Code","signin.openLink":"Open sign-in page","signin.copyLink":"Copy link","signin.qrLabel":"Sign-in QR code","account.profile.title":"Profile","account.profile.desc":"Your photo and nickname, plus the phone and email linked to your account","account.avatar.change":"Change photo","account.avatar.saved":"Photo updated","account.nickname.edit":"Edit nickname","account.nickname.label":"Nickname","account.nickname.saved":"Nickname updated","account.role.admin":"Admin","account.username":"Username {name}","account.contact.phone":"Phone","account.contact.email":"Email","account.contact.unbound":"Not linked","account.contact.manage":"Manage in Security","account.web.open":"Open the account center in your browser","account.web.desc":"Cloud storage, AI Brain, submissions and themes are managed in the web account center.","member.title":"Membership","member.desc":"Your tier, plan and expiry date","member.upgrade":"Upgrade membership","member.renew":"Renew","member.freeName":"Free plan","member.freeHint":"Upgrade to get more AI quota","member.expires":"Expires {date}","member.noExpiry":"No expiry","member.loadFailed":"Couldn't load your membership.","local.title":"Accounts on this computer","local.desc":"Switch between accounts you've signed in with","local.current":"Current","local.switch":"Switch","local.add":"Sign in to another account","local.signOut":"Sign out","local.empty":"No saved accounts yet","local.loadFailed":"Couldn't read the account list","quota.ai.title":"AI quota","quota.ai.desc":"What's left today and this week; a quota reset card restores it","quota.resetDaily":"Resets daily at 0:00 (Beijing time)","quota.resetWeekly":"Resets {date} at 0:00 (Beijing time)","card.title":"Quota reset card","card.desc":"Restores today's and this week's AI quota to 100%","card.owned":"You have {n}","card.use":"Use one","card.useConfirm":"Confirm","card.used":"Used 1 quota reset card","card.left":"{n} left","card.noneHint":"You have no quota reset cards left. You can exchange points for more.","card.exchange":"Exchange points","card.price":"{price} points each, 1\u201350 at a time","card.count":"Number of cards","card.cost":"Costs {cost} points","card.countHint":"Enter 1\u201350","card.exchangeButton":"Exchange","card.exchangeConfirm":"Spend {cost} points","card.exchanged":"Quota reset cards added: {n}","points.title":"Points","points.desc":"Exchange points for quota reset cards, or spend them automatically when your AI quota runs out","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy points","points.autoDeduct":"Pay with points automatically","points.autoDeductDesc":"When your AI quota runs out, keep going with points","bg.title":"Background quota","bg.desc":"Used by Muse and automations, counted separately from your AI quota","bg.autoMain":"Continue with AI quota when used up","bg.autoMainDesc":"When off, Muse and automations pause once the background quota runs out","bg.convert":"Move from AI quota","bg.convertDesc":"Moves a share of your AI quota limit, valid for the current period","bg.convertConfirm":"Move {pct}%","bg.converted":"Moved {pct}% from your AI quota","invite.title":"Invites & codes","invite.desc":"Invite friends to join, or redeem a code you received","invite.myCode":"My invite code","invite.count":"{n} invited","invite.copyCode":"Copy code","invite.copyLink":"Copy invite link","invite.loadFailed":"Couldn't load your invite code","invite.claim":"Enter an invite code","invite.claimDesc":"Within 7 days of signing up, you can enter a friend's invite code","invite.claimPlaceholder":"Friend's invite code","invite.claimSubmit":"Submit","invite.claimed":"Invite code applied","redeem.title":"Redemption code","redeem.desc":"Redeem points, membership or other rewards","redeem.placeholder":"Enter a code","redeem.submit":"Redeem","redeem.success":"Redeemed","redeem.successWith":"Redeemed: {what}","redeem.gotPoints":"{n} points","redeem.gotMembership":"membership","sec.methods.title":"Sign-in methods","sec.methods.desc":"Your phone and email can be used to sign in and reset your password","sec.bind":"Link","sec.change":"Change","sec.phone":"Phone number","sec.email":"Email address","sec.newPhone":"New phone number","sec.newEmail":"New email address","sec.phonePlaceholder":"Mainland China numbers as is; others with +country code","sec.emailPlaceholder":"name@example.com","sec.code":"Verification code","sec.codePlaceholder":"Enter the code","sec.sendCode":"Send code","sec.resendIn":"Resend in {s}s","sec.codeSent":"Code sent","sec.bindSubmit":"Link","sec.phoneBound":"Phone linked","sec.emailBound":"Email linked","sec.devices.title":"Signed-in devices","sec.devices.desc":"If you think someone else is using your account, sign out on every device","sec.logoutAll":"Sign out everywhere","sec.logoutAllDesc":"Including this computer: every device has to sign in again","sec.logoutAllConfirm":"Confirm sign out everywhere","sec.logoutAllDone":"Signed out everywhere","pw.title":"Password","pw.desc":"{min}\u2013{max} characters, with a lowercase letter, an uppercase letter and a special character, and no spaces","pw.change":"Change password","pw.modeLabel":"How to change it","pw.mode.current":"With current password","pw.mode.code":"With a verification code","pw.current":"Current password","pw.currentRequired":"Enter your current password","pw.new":"New password","pw.confirm":"Confirm new password","pw.mismatch":"The new passwords don't match","pw.submit":"Change password","pw.submitReset":"Set new password","pw.changed":"Password updated","pw.noPasswordYet":"This account doesn't have a password yet. Set one with a verification code instead.","pw.codeNeedsContact":"Link a phone or email first to set a password with a verification code.","pw.via":"Send the code to","pw.codeTo":"The code goes to {target}","pw.rulesLabel":"Password rules","pw.req.length":"{min}\u2013{max} characters","pw.req.lower":"A lowercase letter","pw.req.upper":"An uppercase letter","pw.req.special":"A special character","pw.req.space":"No spaces","pw.rule.format":"Invalid password","pw.rule.min":"Password must be at least 8 characters","pw.rule.max":"Password can't be longer than 64 characters","pw.rule.space":"Password can't contain spaces","pw.rule.lower":"Password needs a lowercase letter","pw.rule.upper":"Password needs an uppercase letter","pw.rule.special":"Password needs a special character","del.title":"Delete account","del.desc":"Permanently delete your account and all its data. This can't be undone","del.start":"Delete account","del.warn":"Deleting your account removes your account, points, membership, cloud storage and all other data for good.","del.methodLabel":"Verify with","del.byCode":"Verification code","del.byPassword":"Password","del.codeLabel":"Code sent to {target}","del.passwordLabel":"Account password","del.submit":"Delete account","del.confirm":"Delete permanently","del.done":"Account deleted","usage.overview.title":"Overview","usage.overview.desc":"Requests and AI quota used in the selected period","usage.range":"Time range","usage.days":"{n} days","usage.requests":"Requests","usage.successRate":"Success rate","usage.consumption":"AI quota used","usage.ofToday":"Of your daily limit","usage.unlimitedNote":"Your AI quota is unlimited, so usage isn't shown as a percentage.","usage.noLimitNote":"Your daily limit is 0 or unavailable right now, so usage isn't shown as a percentage.","usage.byModel.title":"By model","usage.byModel.desc":"Requests and quota used per model","usage.byApp.title":"By app","usage.byApp.desc":"Requests and quota used per app","usage.col.model":"Model","usage.col.app":"App","usage.col.requests":"Requests","usage.col.consumption":"Quota used","usage.empty":"No usage in this period","usage.appUnknown":"Other","usage.recent.title":"Recent usage","usage.recent.desc":"Each call as a share of your daily limit","usage.recentEmpty":"No usage yet","usage.failed":"Failed","usage.shown":"Showing {shown} of {total}","fb.list.title":"My feedback","fb.list.desc":"Issues and suggestions you've sent; replies show up here","fb.new":"New feedback","fb.empty":"No feedback yet","fb.untitled":"Untitled feedback","fb.unread":"New reply","fb.shown":"Showing {n}","fb.submitted":"Sent. We'll reply as soon as we can","fb.descLabel":"Describe the issue or suggestion","fb.descPlaceholder":"What happened, and what did you expect?","fb.imagesHint":"Attach up to {n} screenshots (5 MB each). You can paste or drop them here.","fb.addImages":"Add screenshots","fb.removeImage":"Remove this image","fb.submit":"Send","fb.back":"Back to list","fb.you":"You","fb.support":"Forsion team","fb.attachment":"Attachment","fb.imagePreview":"View image","fb.closedNote":"This ticket is closed and can't take replies. Send new feedback for a new issue.","fb.replyPlaceholder":"Reply\u2026","fb.replySend":"Send reply","fb.replySent":"Reply sent","fb.status.open":"Open","fb.status.in_progress":"In progress","fb.status.resolved":"Resolved","fb.status.closed":"Closed","err.accountGone":"This account is signed out. Sign in again","err.adminCannotDelete":"Admin accounts can't be deleted here","err.avatarInvalid":"Couldn't read this image. Try another one","err.avatarTooLarge":"This image is too large. Try a smaller one","err.backgroundUnavailable":"Background quota is unavailable right now","err.captcha":"You need to finish a verification check in your browser","err.codeCooldown":"Too many codes requested. Try again shortly","err.codeInvalid":"The code is wrong or has expired","err.codeRequired":"Enter the verification code","err.codeSendFailed":"Couldn't send the code. Try again later","err.currentPasswordWrong":"Your current password is incorrect","err.deleteTargetInvalid":"Codes can only go to the phone or email linked to your account","err.deleteVerifyFailed":"Verification failed, so your account wasn't deleted","err.emailInUse":"This email is already used by another account","err.emailInvalid":"Enter a valid email address","err.featureDisabled":"This feature is turned off for now","err.feedbackEmpty":"Describe the issue or suggestion first","err.feedbackTooLong":"The description is too long (10,000 characters max)","err.generic":"That didn't work. Try again later","err.imageRead":"Couldn't read the image","err.imageTooLarge":"Each image must be 5 MB or less","err.imageType":"Only images can be added","err.insufficientMainQuota":"Your AI quota is used up, so there's nothing to move","err.insufficientPoints":"Not enough points","err.priceChanged":"The reset card price just changed. Check the new price, then confirm the exchange again.","err.invalidCount":"Choose between 1 and 50 cards","err.invalidInviteCode":"This invite code is invalid or has expired","err.inviteAlreadyUsed":"You've already used an invite code","err.inviteEmpty":"Enter an invite code","err.inviteOwnCode":"You can't use your own invite code","err.inviteWindowExpired":"The 7-day window after sign-up has passed","err.loginCodeExpired":"The sign-in code expired. Sign in again","err.loginInProgress":"A sign-in is already in progress","err.loginTimeout":"Sign-in timed out. Try again","err.loginUnsupported":"This cloud doesn't support desktop sign-in","err.network":"Network error. Check your connection and try again","err.noCloudUrl":"Set the cloud address under Connection first","err.noResetCard":"You have no quota reset cards","err.openFailed":"Couldn't open the browser","err.passwordRequired":"Enter your current and new password","err.phoneInUse":"This phone number is already used by another account","err.phoneInvalid":"Enter a valid phone number (with +country code outside mainland China)","err.redeemEmpty":"Enter a code","err.redeemExpired":"This code has expired","err.redeemInactive":"This code is no longer active","err.redeemNotFound":"This code doesn't exist","err.redeemUsedUp":"This code has been used up","err.redeemUserLimit":"You've already redeemed this code","err.replyEmpty":"Write a reply first","err.replyTooLong":"The reply is too long (10,000 characters max)","err.server":"Server error ({status}). Try again later","err.session":"You've been signed out. Sign in again","err.signedOut":"Sign in to Forsion first","err.targetInvalid":"Enter a valid phone number or email","err.ticketNotFound":"This feedback doesn't exist or was deleted","err.tooFrequent":"Too many attempts. Try again shortly","err.tooManyImages":"You can add up to 5 images","err.unavailable":"This version of the desktop app can't do that yet. Update Forsion"},tn={zh:ao,en:io},we=t=>t==="en"?"en":"zh";function ut(t,e,n){let r=tn[t][e]??tn.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(a,i)=>i in n?String(n[i]):a):r}var nn=t=>(e,n)=>ut(t,e,n),te=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var L=()=>typeof window<"u"&&window.tangu||{};function on(t){let e=typeof t?.status=="number"?t.status:0;if(e>=200&&e<300)return{ok:!0,status:e,data:t?.json??null};let n=t?.json&&typeof t.json=="object"?t.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,a=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:a,transport:typeof t?.error=="string"?t.error:null}}var dt=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function k(t,e={}){let n=L().cloudFetch;if(!n)return dt("no_bridge");try{return on(await n({path:t,...e}))}catch(r){return dt(String(r?.message||r))}}async function Ue(t,e){if(!t)return e();try{return on(await t())}catch(n){return dt(String(n?.message||n))}}var Oe=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function se(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function He(t){let e=L().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function $e(t){let e=L().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}function rn(t){return typeof t!="string"?{ok:!1,rule:"format"}:t.length<8?{ok:!1,rule:"min"}:t.length>64?{ok:!1,rule:"max"}:/\s/.test(t)?{ok:!1,rule:"space"}:/[a-z]/.test(t)?/[A-Z]/.test(t)?/[^A-Za-z0-9]/.test(t)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function an(t){return{length:t.length>=8&&t.length<=64,lower:/[a-z]/.test(t),upper:/[A-Z]/.test(t),special:/[^A-Za-z0-9]/.test(t),space:t.length>0&&!/\s/.test(t)}}var sn={\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E:"format","\u5BC6\u7801\u81F3\u5C11 8 \u4F4D":"min","\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D":"max",\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C:"space",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD:"lower",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD:"upper",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26:"special"};var cn={no_reset_card:"err.noResetCard",invalid_type:"err.generic",invalid_count:"err.invalidCount",insufficient_points:"err.insufficientPoints",price_changed:"err.priceChanged",insufficient_main_quota:"err.insufficientMainQuota",background_unavailable:"err.backgroundUnavailable",invalid_percent:"err.generic",invalid_request:"err.generic",invalid_invite_code:"err.invalidInviteCode",already_used:"err.inviteAlreadyUsed",window_expired:"err.inviteWindowExpired",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},ln={"Current password is incorrect":"err.currentPasswordWrong","Current and new password are required":"err.passwordRequired",\u9A8C\u8BC1\u7801\u65E0\u6548\u6216\u5DF2\u8FC7\u671F:"err.codeInvalid","Invalid or expired verification code":"err.codeInvalid",\u8D26\u53F7\u6216\u9A8C\u8BC1\u7801\u9519\u8BEF:"err.codeInvalid",\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801:"err.codeRequired","Email already in use":"err.emailInUse","Phone number already in use":"err.phoneInUse","Invalid email format":"err.emailInvalid","Email is required":"err.emailInvalid","Invalid phone number format":"err.phoneInvalid","Phone number is required":"err.phoneInvalid","Invalid phone number or email format":"err.targetInvalid","Please wait before requesting another code":"err.codeCooldown","Failed to send verification code":"err.codeSendFailed","Invalid target for account deletion":"err.deleteTargetInvalid","\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u6CE8\u9500\u8D26\u6237":"err.deleteVerifyFailed",\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500:"err.adminCannotDelete",\u79EF\u5206\u4F59\u989D\u4E0D\u8DB3:"err.insufficientPoints","\u5151\u6362\u5F20\u6570\u9700\u4E3A 1-50 \u7684\u6574\u6570":"err.invalidCount",\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361:"err.noResetCard","\u4E3B\u989D\u5EA6\u5DF2\u7528\u5B8C,\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6":"err.insufficientMainQuota",\u540E\u53F0\u989D\u5EA6\u6682\u4E0D\u53EF\u7528:"err.backgroundUnavailable",\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548:"err.invalidInviteCode","\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F":"err.inviteWindowExpired",\u4F60\u5DF2\u4F7F\u7528\u8FC7\u9080\u8BF7\u7801:"err.inviteAlreadyUsed","You have already used an invite code":"err.inviteAlreadyUsed","Cannot use your own invite code":"err.inviteOwnCode","Invite code is required":"err.inviteEmpty","code is required":"err.redeemEmpty","Redemption code not found":"err.redeemNotFound","Redemption code is not active":"err.redeemInactive","Redemption code has expired":"err.redeemExpired","Redemption code has reached maximum uses":"err.redeemUsedUp","You have already used this code the maximum number of times":"err.redeemUserLimit",avatar_too_large:"err.avatarTooLarge","description is required":"err.feedbackEmpty","description too long (max 10000 chars)":"err.feedbackTooLong","content is required":"err.replyEmpty","content too long (max 10000 chars)":"err.replyTooLong","Ticket not found":"err.ticketNotFound","Too many attachments (max 5)":"err.tooManyImages","Attachment type not allowed (image / json / text only)":"err.imageType","\u4EBA\u673A\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"err.captcha"},ft={format:"pw.rule.format",min:"pw.rule.min",max:"pw.rule.max",space:"pw.rule.space",lower:"pw.rule.lower",upper:"pw.rule.upper",special:"pw.rule.special"};function so(t){if(t.code&&cn[t.code])return cn[t.code];if(t.detail){if(ln[t.detail])return ln[t.detail];let e=sn[t.detail];if(e)return ft[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function K(t){let e=so(t);return e?{key:e}:Oe(t)?{key:"err.signedOut"}:t.status===0?{key:"err.network"}:t.status===401?{key:"err.session"}:t.status===429?{key:"err.tooFrequent"}:t.detail?{raw:t.detail}:t.status>=500?{key:"err.server",vars:{status:t.status}}:{key:"err.generic"}}function ke(t){let e=t.trim();return e?/cancelled\.?$/i.test(e)?null:e==="A sign-in is already in progress."?{key:"err.loginInProgress"}:e.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:e.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:e.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:e.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:e.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:e.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:e}:{key:"err.generic"}}var mt=Ht(null);function A(){let t=Gt(mt);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var ce=()=>A().t;function le(){let t=$(!0);return N(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var un={pending:!1,error:null,success:null,captcha:!1};function P(){let t=le(),[e,n]=v(un),r=$(!1),a=ie(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let c;try{c=await s()}catch(u){c={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:c?.error??null,success:c?.success??null,captcha:!!c?.captcha})},[]),i=ie(()=>{r.current||n(un)},[]);return{...e,run:a,clear:i}}var X=t=>({error:K(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function dn(){let[t,e]=v(0),n=$(null);N(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=ie((i=60)=>{n.current&&clearInterval(n.current),e(i),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),a=ie(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:a}}function Q(t){let[e,n]=v({state:"loading"}),r=$(0),a=$(t);a.current=t;let i=ie((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let m;try{m=await a.current()}catch(f){m={ok:!1,status:0,code:null,detail:null,transport:String(f?.message||f)}}d===r.current&&(m.ok?n({state:"ready",data:m.data,gen:d}):Oe(m)?n({state:"signedOut"}):(m.status===401&&L().authStatus?.().catch(()=>{}),n({state:"error",fail:m})))})()},[]);N(()=>{i();let u=L().onAuthChanged?.(()=>i());return()=>{r.current++,u?.()}},[i]);let s=ie(()=>i(),[i]),c=ie(()=>i(!0),[i]);switch(e.state){case"ready":{let u=e.gen,d=m=>n(f=>f.state==="ready"&&f.gen===u?{...f,data:m(f.data)}:f);return{state:"ready",data:e.data,reload:c,update:d}}case"error":return{state:"error",error:K(e.fail),retry:s};default:return e}}var fn=`
1
+ "use strict";var __fxExtend=(()=>{var lr=Object.defineProperty;var bs=Object.getOwnPropertyDescriptor;var xs=Object.getOwnPropertyNames;var ys=Object.prototype.hasOwnProperty;var vs=(t,e)=>{for(var n in e)lr(t,n,{get:e[n],enumerable:!0})},ws=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of xs(e))!ys.call(t,o)&&o!==n&&lr(t,o,{get:()=>e[o],enumerable:!(r=bs(e,o))||r.enumerable});return t};var ks=t=>ws(lr({},"__esModule",{value:!0}),t);var Bu={};vs(Bu,{dispose:()=>qa});function _s(t,e){this.v=t,this.k=e}function Io(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ss(t){if(Array.isArray(t))return t}function As(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],u=!0,d=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(p){d=!0,o=p}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return l}}function Ts(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Es(t,e){return Ss(t)||As(t,e)||Cs(t,e)||Ts()}function Cs(t,e){if(t){if(typeof t=="string")return Io(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Io(t,e):void 0}}function pn(t){var e,n;function r(i,s){try{var l=t[i](s),u=l.value,d=u instanceof _s;Promise.resolve(d?u.v:u).then(function(p){if(d){var m=i==="return"&&u.k?i:"next";if(!u.k||p.done)return r(m,p);p=t[m](p).value}o(!!l.done,p)},function(p){r("throw",p)})}catch(p){o(2,p)}}function o(i,s){i===2?e.reject(s):e.resolve({value:s,done:i}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,u){var d={key:i,arg:s,resolve:l,reject:u,next:null};n?n=n.next=d:(e=n=d,r(i,s))})},typeof t.return!="function"&&(this.return=void 0)}pn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},pn.prototype.next=function(t){return this._invoke("next",t)},pn.prototype.throw=function(t){return this._invoke("throw",t)},pn.prototype.return=function(t){return this._invoke("return",t)};var Go=Object.entries,Do=Object.setPrototypeOf,Rs=Object.isFrozen,Ps=Object.getPrototypeOf,Ms=Object.getOwnPropertyDescriptor,le=Object.freeze,ce=Object.seal,Tt=Object.create,Yo=typeof Reflect<"u"&&Reflect,hr=Yo.apply,gr=Yo.construct;le||(le=function(e){return e});ce||(ce=function(e){return e});hr||(hr=function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return e.apply(n,o)});gr||(gr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new e(...r)});var it=ie(Array.prototype.forEach);Array.prototype.indexOf;var Ls=ie(Array.prototype.lastIndexOf),No=ie(Array.prototype.pop),Ot=ie(Array.prototype.push);Array.prototype.slice;var Is=ie(Array.prototype.splice),Et=Array.isArray,Bt=ie(String.prototype.toLowerCase),cr=ie(String.prototype.toString),Oo=ie(String.prototype.match),zt=ie(String.prototype.replace),zo=ie(String.prototype.indexOf),Ds=ie(String.prototype.trim),Ns=ie(Number.prototype.toString),Os=ie(Boolean.prototype.toString),Fo=typeof BigInt>"u"?null:ie(BigInt.prototype.toString),Bo=typeof Symbol>"u"?null:ie(Symbol.prototype.toString),be=ie(Object.prototype.hasOwnProperty),Ft=ie(Object.prototype.toString),fe=ie(RegExp.prototype.test),je=zs(TypeError);function ie(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return hr(t,e,r)}}function zs(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return gr(t,n)}}function O(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bt;if(Do&&Do(t,null),!Et(e))return t;let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){let i=n(o);i!==o&&(Rs(e)||(e[r]=i),o=i)}t[o]=!0}return t}function Fs(t){for(let e=0;e<t.length;e++)be(t,e)||(t[e]=null);return t}function we(t){let e=Tt(null);for(let r of Go(t)){var n=Es(r,2);let o=n[0],i=n[1];be(t,o)&&(Et(i)?e[o]=Fs(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=we(i):e[o]=i)}return e}function Bs(t){switch(typeof t){case"string":return t;case"number":return Ns(t);case"boolean":return Os(t);case"bigint":return Fo?Fo(t):"0";case"symbol":return Bo?Bo(t):"Symbol()";case"undefined":return Ft(t);case"function":case"object":{if(t===null)return Ft(t);let e=t,n=Ae(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:Ft(r)}return Ft(t)}default:return Ft(t)}}function Ae(t,e){for(;t!==null;){let r=Ms(t,e);if(r){if(r.get)return ie(r.get);if(typeof r.value=="function")return ie(r.value)}t=Ps(t)}function n(){return null}return n}function $s(t){try{return fe(t,""),!0}catch{return!1}}var $o=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ur=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dr=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Us=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fr=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qs=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uo=le(["#text"]),qo=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pr=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ho=le(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mn=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hs=ce(/{{[\w\W]*|^[\w\W]*}}/g),Ws=ce(/<%[\w\W]*|^[\w\W]*%>/g),Xs=ce(/\${[\w\W]*/g),js=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vs=ce(/^aria-[\-\w]+$/),Wo=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gs=ce(/^(?:\w+script|data):/i),Ys=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Js=ce(/^html$/i),Zs=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),Xo=ce(/<[/\w!]/g),jo=ce(/<[/\w]/g),Ks=ce(/<\/no(script|embed|frames)/i),Qs=ce(/\/>/i),ve={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Jo=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],el=le(O({},Jo)),tl=(function(){let t={};return it(Jo,e=>{t[e]=ce(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),le(t)})(),nl=function(){return typeof window>"u"?null:window},rl=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Vo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ve=function(e,n,r,o){return be(e,n)&&Et(e[n])?O(o.base?we(o.base):{},e[n],o.transform):r},mr=function(e,n,r){let o=be(e,n)?e[n]:void 0;return o&&typeof o=="object"?we(o):r()};function Zo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nl(),e=w=>Zo(w);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==ve.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,o=r.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,p=t.trustedTypes,m=l.prototype,f=Ae(m,"cloneNode"),g=Ae(m,"remove"),b=Ae(m,"removeAttributeNode"),v=Ae(m,"nextSibling"),k=Ae(m,"childNodes"),T=Ae(m,"parentNode"),x=Ae(m,"shadowRoot"),_=Ae(m,"attributes"),A=s&&s.prototype?Ae(s.prototype,"nodeType"):null,R=s&&s.prototype?Ae(s.prototype,"nodeName"):null,N=s&&s.prototype?Ae(s.prototype,"ownerDocument"):null,G=function(c){return A?A(c):c.nodeType},z=function(c){return R?R(c):c.nodeName};if(typeof i=="function"){let w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let H,re="",pe,Pe=!1,Oe=0,gt=function(){if(Oe>0)throw je('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},bt=function(c){gt(),Oe++;try{return H.createHTML(c)}finally{Oe--}},Ha=function(c){gt(),Oe++;try{return H.createScriptURL(c)}finally{Oe--}},Wa=function(){return Pe||(pe=rl(p,o),Pe=!0),pe},Qt=n,jn=Qt.implementation,no=Qt.createNodeIterator,Xa=Qt.createDocumentFragment,ja=Qt.getElementsByTagName,Va=r.importNode,Y=Vo();e.isSupported=typeof Go=="function"&&typeof T=="function"&&jn&&jn.createHTMLDocument!==void 0;let Ga=Hs,Ya=Ws,Ja=Xs,Za=js,Ka=Vs,Qa=Gs,ro=Ys,es=Zs,oo=Wo,J=null,Vn=O({},[...$o,...ur,...dr,...fr,...Uo]),Z=null,Gn=O({},[...qo,...pr,...Ho,...mn]),Me=Object.seal(Tt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,io=null,He=Object.seal(Tt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ao=!0,Yn=!0,so=!1,lo=!0,We=!1,nt=!0,rt=!1,Jn=!1,en=null,tn=null,Zn=!1,xt=!1,nn=!1,rn=!1,co=!0,uo=!1,fo="user-content-",Kn=!0,Qn=!1,yt={},vt=null,po=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),mo=null,ho=O({},["audio","video","img","source","image","track"]),go=null,bo=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),on="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml",wt=Le,er=!1,tr=null,ts=O({},[on,an,Le],cr),xo=le(["mi","mo","mn","ms","mtext"]),nr=O({},xo),yo=le(["annotation-xml"]),rr=O({},yo),ns=O({},["title","style","font","a","script"]),Dt=null,rs=["application/xhtml+xml","text/html"],os="text/html",oe=null,kt=null,is=n.createElement("form"),vo=function(c){return c instanceof RegExp||c instanceof Function},or=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(kt&&kt===c)return;(!c||typeof c!="object")&&(c={}),c=we(c),Dt=rs.indexOf(c.PARSER_MEDIA_TYPE)===-1?os:c.PARSER_MEDIA_TYPE,oe=Dt==="application/xhtml+xml"?cr:Bt,J=Ve(c,"ALLOWED_TAGS",Vn,{transform:oe}),Z=Ve(c,"ALLOWED_ATTR",Gn,{transform:oe}),tr=Ve(c,"ALLOWED_NAMESPACES",ts,{transform:cr}),go=Ve(c,"ADD_URI_SAFE_ATTR",bo,{transform:oe,base:bo}),mo=Ve(c,"ADD_DATA_URI_TAGS",ho,{transform:oe,base:ho}),vt=Ve(c,"FORBID_CONTENTS",po,{transform:oe}),It=Ve(c,"FORBID_TAGS",we({}),{transform:oe}),io=Ve(c,"FORBID_ATTR",we({}),{transform:oe}),yt=be(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?we(c.USE_PROFILES):c.USE_PROFILES:!1,ao=c.ALLOW_ARIA_ATTR!==!1,Yn=c.ALLOW_DATA_ATTR!==!1,so=c.ALLOW_UNKNOWN_PROTOCOLS||!1,lo=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,We=c.SAFE_FOR_TEMPLATES||!1,nt=c.SAFE_FOR_XML!==!1,rt=c.WHOLE_DOCUMENT||!1,xt=c.RETURN_DOM||!1,nn=c.RETURN_DOM_FRAGMENT||!1,rn=c.RETURN_TRUSTED_TYPE||!1,Zn=c.FORCE_BODY||!1,co=c.SANITIZE_DOM!==!1,uo=c.SANITIZE_NAMED_PROPS||!1,Kn=c.KEEP_CONTENT!==!1,Qn=c.IN_PLACE||!1,oo=$s(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:Wo,wt=typeof c.NAMESPACE=="string"?c.NAMESPACE:Le,nr=mr(c,"MATHML_TEXT_INTEGRATION_POINTS",()=>O({},xo)),rr=mr(c,"HTML_INTEGRATION_POINTS",()=>O({},yo));let h=mr(c,"CUSTOM_ELEMENT_HANDLING",()=>Tt(null));if(Me=Tt(null),be(h,"tagNameCheck")&&vo(h.tagNameCheck)&&(Me.tagNameCheck=h.tagNameCheck),be(h,"attributeNameCheck")&&vo(h.attributeNameCheck)&&(Me.attributeNameCheck=h.attributeNameCheck),be(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(Me.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),ce(Me),We&&(Yn=!1),nn&&(xt=!0),yt&&(J=O({},Uo),Z=Tt(null),yt.html===!0&&(O(J,$o),O(Z,qo)),yt.svg===!0&&(O(J,ur),O(Z,pr),O(Z,mn)),yt.svgFilters===!0&&(O(J,dr),O(Z,pr),O(Z,mn)),yt.mathMl===!0&&(O(J,fr),O(Z,Ho),O(Z,mn))),He.tagCheck=null,He.attributeCheck=null,be(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?He.tagCheck=c.ADD_TAGS:Et(c.ADD_TAGS)&&(J===Vn&&(J=we(J)),O(J,c.ADD_TAGS,oe))),be(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?He.attributeCheck=c.ADD_ATTR:Et(c.ADD_ATTR)&&(Z===Gn&&(Z=we(Z)),O(Z,c.ADD_ATTR,oe))),be(c,"ADD_FORBID_CONTENTS")&&Et(c.ADD_FORBID_CONTENTS)&&(vt===po&&(vt=we(vt)),O(vt,c.ADD_FORBID_CONTENTS,oe)),Kn&&(J["#text"]=!0),rt&&O(J,["html","head","body"]),J.table&&(O(J,["tbody"]),delete It.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let y=H;H=c.TRUSTED_TYPES_POLICY;try{re=bt("")}catch(S){throw H=y,S}}else c.TRUSTED_TYPES_POLICY===null?(H=void 0,re=""):(H===void 0&&(H=Wa()),H&&typeof re=="string"&&(re=bt("")));le&&le(c),kt=c},wo=O({},[...ur,...dr,...Us]),ko=O({},[...fr,...qs]),as=function(c,h,y){return h.namespaceURI===Le?c==="svg":h.namespaceURI===on?c==="svg"&&(y==="annotation-xml"||nr[y]):!!wo[c]},ss=function(c,h,y){return h.namespaceURI===Le?c==="math":h.namespaceURI===an?c==="math"&&rr[y]:!!ko[c]},ls=function(c,h,y){return h.namespaceURI===an&&!rr[y]||h.namespaceURI===on&&!nr[y]?!1:!ko[c]&&(ns[c]||!wo[c])},cs=function(c){let h=T(c);(!h||!h.tagName)&&(h={namespaceURI:wt,tagName:"template"});let y=Bt(c.tagName),S=Bt(h.tagName);return tr[c.namespaceURI]?c.namespaceURI===an?as(y,h,S):c.namespaceURI===on?ss(y,h,S):c.namespaceURI===Le?ls(y,h,S):!!(Dt==="application/xhtml+xml"&&tr[c.namespaceURI]):!1},Xe=function(c){Ot(e.removed,{element:c});try{T(c).removeChild(c)}catch{if(g(c),!T(c))throw je("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_o=function(c,h,y){try{b(c,h)}catch{try{c.removeAttribute(y)}catch{}}},sn=function(c){ln(c);let h=k(c);if(h){let S=[];it(h,C=>{Ot(S,C)}),it(S,C=>{try{g(C)}catch{}})}let y=_(c);if(y)for(let S=y.length-1;S>=0;--S){let C=y[S],L=C&&C.name;typeof L=="string"&&_o(c,C,L)}},ot=function(c,h,y){if(!y)try{y=h.getAttributeNode(c)}catch{y=null}Ot(e.removed,{attribute:y||null,from:h});try{y?b(h,y):h.removeAttribute(c)}catch{try{h.removeAttribute(c)}catch{}}if(c==="is")if(xt||nn)try{Xe(h)}catch{}else try{h.setAttribute(c,"")}catch{}},us=function(c){let h=_(c);if(h)for(let y=h.length-1;y>=0;--y){let S=h[y],C=S&&S.name;typeof C!="string"||Z[oe(C)]||_o(c,S,C)}},ln=function(c){let h=[c];for(;h.length>0;){let y=h.pop();G(y)===ve.element&&us(y);let S=k(y);if(S)for(let C=S.length-1;C>=0;--C)h.push(S[C])}},So=function(c,h){return nt?c==="patchsrc"?!0:c==="for"&&h!=="label"&&h!=="output":!1},ds=function(c){if(!nt)return;let h=[c];for(;h.length>0;){let y=h.pop(),S=G(y);if(S===ve.processingInstruction||S===ve.comment&&fe(jo,y.data)){try{g(y)}catch{}continue}if(S===ve.element){let L=y,D=oe(z(y));try{L.hasAttribute&&L.hasAttribute("patchsrc")&&L.removeAttribute("patchsrc"),L.hasAttribute&&L.hasAttribute("for")&&So("for",D)&&L.removeAttribute("for")}catch{}}let C=k(y);if(C)for(let L=C.length-1;L>=0;--L)h.push(C[L])}},Ao=function(c){let h=null,y=null;if(Zn)c="<remove></remove>"+c;else{let L=Oo(c,/^[\r\n\t ]+/);y=L&&L[0]}Dt==="application/xhtml+xml"&&wt===Le&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let S=H?bt(c):c;if(wt===Le)try{h=new d().parseFromString(S,Dt)}catch{}if(!h||!h.documentElement){h=jn.createDocument(wt,"template",null);try{h.documentElement.innerHTML=er?re:S}catch{}}let C=h.body||h.documentElement;return c&&y&&C.insertBefore(n.createTextNode(y),C.childNodes[0]||null),wt===Le?ja.call(h,rt?"html":"body")[0]:rt?h.documentElement:C},To=function(c){let h=N?N(c):c.ownerDocument;return no.call(h||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},cn=function(c){return c=zt(c,Ga," "),c=zt(c,Ya," "),c=zt(c,Ja," "),c},ir=function(c){var h;c.normalize();let y=N?N(c):c.ownerDocument,S=no.call(y||c,c,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),C=S.nextNode();for(;C;)C.data=cn(C.data),C=S.nextNode();let L=(h=c.querySelectorAll)===null||h===void 0?void 0:h.call(c,"template");L&&it(L,D=>{_t(D.content)&&ir(D.content)})},un=function(c){let h=R?R(c):null;return typeof h!="string"||oe(h)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==_(c)||typeof c.removeAttribute!="function"||typeof c.removeAttributeNode!="function"||typeof c.getAttributeNode!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==A(c)||c.childNodes!==k(c)},_t=function(c){if(!A||typeof c!="object"||c===null)return!1;try{return A(c)===ve.documentFragment}catch{return!1}},Nt=function(c){if(!A||typeof c!="object"||c===null)return!1;try{return typeof A(c)=="number"}catch{return!1}};function Ie(w,c,h){w.length!==0&&it(w,y=>{y.call(e,c,h,kt)})}let fs=function(c,h){return!!(nt&&c.hasChildNodes()&&!Nt(c.firstElementChild)&&fe(Xo,c.textContent)&&fe(Xo,c.innerHTML)||nt&&c.namespaceURI===Le&&el[h]&&(Nt(c.firstElementChild)||typeof c.textContent=="string"&&fe(tl[h],c.textContent))||c.nodeType===ve.processingInstruction||nt&&c.nodeType===ve.comment&&fe(jo,c.data))},dn=function(c,h){if(c instanceof RegExp)return fe(c,h);if(c instanceof Function){for(var y=arguments.length,S=new Array(y>2?y-2:0),C=2;C<y;C++)S[C-2]=arguments[C];return!!c(h,...S)}return!1},ps=function(c,h,y){if(!It[h]&&Po(h)&&dn(Me.tagNameCheck,h))return!1;if(Kn&&!vt[h]){let S=T(c),C=k(c);if(C&&S){let L=C.length;for(let D=L-1;D>=0;--D){let te=c===y?f(C[D],!0):C[D];S.insertBefore(te,v(c))}}}return Xe(c),!0},Eo=function(c,h,y,S){return c.length===0?h:h===y||h===S?we(h):h},St=function(c,h){return c===h||T(c)!==null?!1:(Qn&&ln(c),!0)},Co=function(c,h){if(Ie(Y.beforeSanitizeElements,c,null),St(c,h))return!0;if(un(c))return Xe(c),!0;let y=oe(z(c));if(J=Eo(Y.uponSanitizeElement,J,Vn,en),Ie(Y.uponSanitizeElement,c,{tagName:y,allowedTags:J}),St(c,h))return!0;if(fs(c,y))return Xe(c),!0;if(It[y]||!(He.tagCheck instanceof Function&&He.tagCheck(y))&&!J[y]){let S=ps(c,y,h);return S===!1&&(Ie(Y.afterSanitizeElements,c,null),St(c,h))?!0:S}if(G(c)===ve.element&&!cs(c)||(y==="noscript"||y==="noembed"||y==="noframes")&&fe(Ks,c.innerHTML))return Xe(c),!0;if(We&&c.nodeType===ve.text){let S=cn(c.textContent);c.textContent!==S&&(Ot(e.removed,{element:c.cloneNode()}),c.textContent=S)}return Ie(Y.afterSanitizeElements,c,null),St(c,h)},Ro=function(c,h,y){if(io[h]||So(h,c)||co&&(h==="id"||h==="name")&&(y in n||y in is))return!1;let S=Z[h]||He.attributeCheck instanceof Function&&He.attributeCheck(h,c);return Yn&&fe(Za,h)||ao&&fe(Ka,h)?!0:S?go[h]||fe(oo,zt(y,ro,""))||(h==="src"||h==="xlink:href"||h==="href")&&c!=="script"&&zo(y,"data:")===0&&mo[c]||so&&!fe(Qa,zt(y,ro,""))?!0:!y:Po(c)&&dn(Me.tagNameCheck,c)&&dn(Me.attributeNameCheck,h,c)||h==="is"&&Me.allowCustomizedBuiltInElements&&dn(Me.tagNameCheck,y)},ms=O({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Po=function(c){return!ms[Bt(c)]&&fe(es,c)},hs=function(c,h,y,S){if(H&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!y)switch(p.getAttributeType(c,h)){case"TrustedHTML":return bt(S);case"TrustedScriptURL":return Ha(S)}return S},gs=function(c,h,y,S){try{return y?c.setAttributeNS(y,h,S):c.setAttribute(h,S),un(c)?(Xe(c),!1):!0}catch{return ot(h,c),!1}},Mo=function(c,h){if(Ie(Y.beforeSanitizeAttributes,c,null),St(c,h))return;let y=c.attributes;if(!y||un(c))return;Z=Eo(Y.uponSanitizeAttribute,Z,Gn,tn);let S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},C=y.length,L=oe(c.nodeName);for(;C--;){let D=y[C],te=D.name,Se=D.namespaceURI,ye=D.value,At=oe(te),sr=ye,me=te==="value"?sr:Ds(sr),Lo=!1;if(S.attrName=At,S.attrValue=me,S.keepAttr=!0,S.forceKeepAttr=void 0,Ie(Y.uponSanitizeAttribute,c,S),me=S.attrValue,uo&&(At==="id"||At==="name")&&zo(me,fo)!==0&&(ot(te,c,D),me=fo+me,Lo=!0),nt&&fe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,me)){ot(te,c,D);continue}if(At==="attributename"&&Oo(me,"href")){ot(te,c,D);continue}if(!S.forceKeepAttr){if(!S.keepAttr){ot(te,c,D);continue}if(!lo&&fe(Qs,me)){ot(te,c,D);continue}if(We&&(me=cn(me)),!Ro(L,At,me)){ot(te,c,D);continue}me=hs(L,At,Se,me),me!==sr&&gs(c,te,Se,me)&&Lo&&No(e.removed)}}Ie(Y.afterSanitizeAttributes,c,null),St(c,h)},fn=function(c){let h=null,y=To(c);for(Ie(Y.beforeSanitizeShadowDOM,c,null);h=y.nextNode();)if(Ie(Y.uponSanitizeShadowNode,h,null),Co(h,c),Mo(h,c),_t(h.content)&&fn(h.content),G(h)===ve.element){let S=x(h);_t(S)&&(ar(S),fn(S))}Ie(Y.afterSanitizeShadowDOM,c,null)},ar=function(c){let h=[{node:c,shadow:null}];for(;h.length>0;){let y=h.pop();if(y.shadow){fn(y.shadow);continue}let S=y.node,C=G(S)===ve.element,L=k(S);if(L)for(let D=L.length-1;D>=0;--D)h.push({node:L[D],shadow:null});if(C){let D=R?R(S):null;if(typeof D=="string"&&oe(D)==="template"){let te=S.content;_t(te)&&h.push({node:te,shadow:null})}}if(C){let D=x(S);_t(D)&&h.push({node:null,shadow:D},{node:D,shadow:null})}}};return e.sanitize=function(w){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,y=null,S=null,C=null;if(er=!w,er&&(w="<!-->"),typeof w!="string"&&!Nt(w)&&(w=Bs(w),typeof w!="string"))throw je("dirty is not a string, aborting");if(!e.isSupported)return w;Jn?(J=en,Z=tn):or(c),(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&(J=we(J)),Y.uponSanitizeAttribute.length>0&&(Z=we(Z)),e.removed=[];let L=Qn&&typeof w!="string"&&Nt(w);if(L){ds(w);let Se=z(w);if(typeof Se=="string"){let ye=oe(Se);if(!J[ye]||It[ye])throw sn(w),je("root node is forbidden and cannot be sanitized in-place")}if(un(w))throw sn(w),je("root node is clobbered and cannot be sanitized in-place");try{ar(w)}catch(ye){throw sn(w),ye}}else if(Nt(w))h=Ao("<!---->"),y=h.ownerDocument.importNode(w,!0),y.nodeType===ve.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?h=y:h.appendChild(y),ar(h);else{if(!xt&&!We&&!rt&&w.indexOf("<")===-1)return H&&rn?bt(w):w;if(h=Ao(w),!h)return xt?null:rn?re:""}h&&Zn&&Xe(h.firstChild);let D=L?w:h;try{let Se=To(D);for(;S=Se.nextNode();)Co(S,D),Mo(S,D),_t(S.content)&&fn(S.content)}catch(Se){throw L&&(sn(w),it(e.removed,ye=>{ye.element&&ln(ye.element)})),Se}if(L){let Se=!1;if(it(e.removed,ye=>{ye.element&&(ye.element===w&&(Se=!0),ln(ye.element))}),Se)throw je("a node selected for removal could not be safely returned; refusing to sanitize in place");return We&&ir(w),w}if(xt){if(We&&ir(h),nn)for(C=Xa.call(h.ownerDocument);h.firstChild;)C.appendChild(h.firstChild);else C=h;return(Z.shadowroot||Z.shadowrootmode)&&(C=Va.call(r,C,!0)),C}let te=rt?h.outerHTML:h.innerHTML;return rt&&J["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&fe(Js,h.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
3
+ `+te),We&&(te=cn(te)),H&&rn?bt(te):te},e.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};or(w),Jn=!0,en=J,tn=Z},e.clearConfig=function(){kt=null,Jn=!1,en=null,tn=null,H=pe,re=""},e.isValidAttribute=function(w,c,h){kt||or({});let y=oe(w),S=oe(c);return Ro(y,S,h)},e.addHook=function(w,c){typeof c=="function"&&be(Y,w)&&Ot(Y[w],c)},e.removeHook=function(w,c){if(be(Y,w)){if(c!==void 0){let h=Ls(Y[w],c);return h===-1?void 0:Is(Y[w],h,1)[0]}return No(Y[w])}},e.removeHooks=function(w){be(Y,w)&&(Y[w]=[])},e.removeAllHooks=function(){Y=Vo()},e}var br=Zo();function wr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var lt=wr();function li(t){lt=t}var at={exec:()=>null};function Ct(t){let e=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),o=e[r];return o||(o=t(r),e[r]=o),o}}function P(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(ue.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,e)};return r}var ol=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ue={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ct(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ct(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ct(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ct(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ct(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Ht})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ct(t=>new RegExp(`^ {0,${t}}>`))},il=/^(?:[ \t]*(?:\n|$))+/,al=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ll=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ci=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ui=P(ci).replace(/bull/g,kr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),cl=P(ci).replace(/bull/g,kr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_r=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ul=/^[^\n]+/,Sr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dl=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fl=P(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,kr).getRegex(),Ht="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ar=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pl=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ar).replace("tag",Ht).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),di=t=>P(_r).replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),ml=di(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),hl=di(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),gl=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hl).getRegex(),Tr={blockquote:gl,code:al,def:dl,fences:sl,heading:ll,hr:qt,html:pl,lheading:ui,list:fl,newline:il,paragraph:ml,table:at,text:ul},Ko=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),bl={...Tr,lheading:cl,table:Ko,paragraph:P(_r).replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ko).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex()},xl={...Tr,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ar).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:at,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(_r).replace("hr",qt).replace("heading",` *#{1,6} *[^
4
+ ]`).replace("lheading",ui).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fi=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,wl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ze=/[\p{P}\p{S}]/u,Rt=/[\s\p{P}\p{S}]/u,Wt=/[^\s\p{P}\p{S}]/u,kl=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rt).getRegex(),_l=/[\p{Pi}\p{Ps}"']/u,pi=/(?!~)[\p{P}\p{S}]/u,Sl=/(?!~)[\s\p{P}\p{S}]/u,Al=/(?:[^\s\p{P}\p{S}]|~)/u,Tl=P(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ol?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,El=P(mi,"u").replace(/punct/g,ze).getRegex(),Cl=P(mi,"u").replace(/punct/g,pi).getRegex(),Rl=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Pl=P(Rl,"u").replace(/openQuote/g,_l).replace(/punct/g,ze).getRegex(),hi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ml=P(hi,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,ze).getRegex(),Ll=P(hi,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,Sl).replace(/punct/g,pi).getRegex(),Il="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Dl=P(Il,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,ze).getRegex(),Nl=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,ze).getRegex(),Ol="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",zl=P(Ol,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,ze).getRegex(),Fl=P(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ze).getRegex(),Bl="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$l=P(Bl,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,ze).getRegex(),Ul=P(/\\(punct)/,"gu").replace(/punct/g,ze).getRegex(),ql=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Hl=P(Ar).replace("(?:-->|$)","-->").getRegex(),Wl=P("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Hl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gi=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,gn=P(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",gi).getRegex(),Xl=P(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",gn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),jl=P(/^!?\[(label)\]\[(ref)\]/).replace("label",gn).replace("ref",Sr).getRegex(),Vl=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sr).getRegex(),Qo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Gl=P(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",gi).getRegex(),Yl=P("reflink|nolink(?!\\()","g").replace("reflink",P(/^!?\[(label)\]\[(ref)\]/).replace("label",Gl).replace("ref",Qo).getRegex()).replace("nolink",P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qo).getRegex()).getRegex(),ei=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jl=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Zl=P(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Jl).getRegex(),Er={_backpedal:at,anyPunctuation:Ul,autolink:ql,blockSkip:Tl,br:fi,code:vl,del:at,delLDelim:at,delRDelim:at,emStrongLDelim:El,emStrongRDelimAst:Ml,emStrongRDelimUnd:Nl,escape:yl,link:Xl,nolink:Vl,punctuation:kl,reflink:jl,reflinkSearch:Yl,tag:Wl,text:wl,url:at},Kl={...Er,emStrongLDelim:Pl,emStrongRDelimAst:Dl,emStrongRDelimUnd:zl,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",gn).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gn).getRegex()},xr={...Er,emStrongRDelimAst:Ll,emStrongLDelim:Cl,delLDelim:Fl,delRDelim:$l,url:P(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Zl).replace("protocol",ei).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:P(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",ei).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Ql={...xr,br:P(fi).replace("{2,}","*").getRegex(),text:P(xr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},hn={normal:Tr,gfm:bl,pedantic:xl},$t={normal:Er,gfm:xr,breaks:Ql,pedantic:Kl},ec={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ti=t=>ec[t];function ke(t,e){if(e){if(ue.escapeTest.test(t))return t.replace(ue.escapeReplace,ti)}else if(ue.escapeTestNoEncode.test(t))return t.replace(ue.escapeReplaceNoEncode,ti);return t}function tc(t){return t.replace(ue.numericCharacterReference,(e,n,r)=>{let o=n===void 0?Number.parseInt(r,16):Number.parseInt(n,10);return o===0||o>1114111||o>=55296&&o<=57343?"\uFFFD":String.fromCodePoint(o)})}function ni(t){try{t=encodeURI(t).replace(ue.percentDecode,"%")}catch{return null}return t}function ri(t,e){let n=t.replace(ue.findPipe,(i,s,l)=>{let u=!1,d=s;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(ue.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(ue.slashPipe,"|");return r}function Ge(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let i=t.charAt(r-o-1);if(i===e&&!n)o++;else if(i!==e&&n)o++;else break}return t.slice(0,r-o)}function oi(t){let e=t.split(`
5
+ `),n=e.length-1;for(;n>=0&&ue.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
6
+ `)}function bn(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function nc(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function ii(t,e=0){let n=e,r="";for(let o of t)if(o===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=o,n++;return r}function ai(t,e,n,r,o){let i=e.href,s=e.title||null,l=t[1].replace(o.other.outputLinkReplace,"$1"),u=t[0].charAt(0)==="!";r.state.inLink=!0;let d=r.state.linkEmitted,p=r.state.inRawBlock;r.state.linkEmitted=!1;let m=r.inlineTokens(l),f=r.state.linkEmitted;if(r.state.linkEmitted=d,r.state.inLink=!1,!u){if(f){r.state.inRawBlock=p;return}r.state.linkEmitted=!0}return{type:u?"image":"link",raw:n,href:i,title:s,text:l,tokens:m}}function rc(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
7
+ `).map(i=>{let s=i.match(n.other.beginningSpace);if(s===null)return i;let[l]=s;return i.slice(Math.min(l.length,o.length))}).join(`
8
+ `)}function si(t,e,n,r){if(!e.includes("<"))return!1;for(let o=0;o<e.length;o++){if(e[o]==="\\"){o++;continue}if(e[o]==="`"){let l=r.inline.code.exec(e.slice(o));if(l){o+=l[0].length-1;continue}}if(e[o]!=="<")continue;let i=t.slice(n+o),s=r.inline.tag.exec(i)||r.inline.autolink.exec(i);if(s){if(s[0].length>e.length-o)return!0;o+=s[0].length-1}}return!1}var xn=class{options;rules;lexer;constructor(t){this.options=t||lt}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:oi(e[0]),r=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:r}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=rc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=Ge(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(n=r.trim())}return{type:"heading",raw:Ge(e[0],`
9
+ `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ge(e[0],`
10
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Ge(e[0],`
11
+ `).split(`
12
+ `),r="",o="",i=[];for(;n.length>0;){let s=!1,l=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))l.push(n[u]),s=!0;else if(!s)l.push(n[u]);else break;n=n.slice(u);let d=l.join(`
13
+ `),p=d.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
15
+ ${d}`:d,o=o?`${o}
16
+ ${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=m,n.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,b=n.join(`
17
+ `),v=g.raw+`
18
+ `+b.replace(this.rules.other.blockquoteSetextReplace2,""),k=this.blockquote(v);i[i.length-1]=k;let T=v.substring(k.raw.length).replace(/^\n/,""),x=T?T.split(`
19
+ `).length:0,_=x?n.slice(0,-x):n;_.length>0&&(r=`${r}
20
+ ${_.join(`
21
+ `)}`),o=o.substring(0,o.length-g.text.length)+k.text;break}else if(f?.type==="list"){let g=f,b=g.raw+`
22
+ `+n.join(`
23
+ `),v=this.list(b);i[i.length-1]=v,r=r.substring(0,r.length-f.raw.length)+v.raw,o=o.substring(0,o.length-g.raw.length)+v.raw,n=b.substring(i.at(-1).raw.length).split(`
24
+ `);continue}}return{type:"blockquote",raw:r,tokens:i,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),s=!1;for(;t;){let u=!1,d="",p="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let m=e[2].split(`
25
+ `,1)[0],f=e[1].length,g=this.options.pedantic?ii(m,f):m.replace(this.rules.other.leadingSpaceTab,T=>ii(T,f)),b=t.split(`
26
+ `,1)[0],v=!g.trim(),k=0;if(this.options.pedantic?(k=2,p=g.trimStart()):v?k=f+1:(k=g.search(this.rules.other.nonSpaceChar),k=k>4?1:k,p=g.slice(k),k+=f),v&&this.rules.other.blankLine.test(b)&&(d+=b+`
27
+ `,t=t.substring(b.length+1),u=!0),!u){let T=this.rules.other.nextBulletRegex(k),x=this.rules.other.hrRegex(k),_=this.rules.other.fencesBeginRegex(k),A=this.rules.other.headingBeginRegex(k),R=this.rules.other.htmlBeginRegex(k),N=this.rules.other.blockquoteBeginRegex(k);for(;t;){let G=t.split(`
28
+ `,1)[0],z;if(b=G,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),z=b):z=b.replace(this.rules.other.leadingSpaceTab,H=>H.replace(this.rules.other.tabCharGlobal," ")),_.test(b)||A.test(b)||R.test(b)||N.test(b)||T.test(b)||x.test(b))break;if(z.search(this.rules.other.nonSpaceChar)>=k||!b.trim())p+=`
29
+ `+z.slice(k);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(g)||A.test(g)||x.test(g))break;p+=`
30
+ `+b}v=!b.trim(),d+=G+`
31
+ `,t=t.substring(G.length+1),g=z.slice(k)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0)),o.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),o.raw+=d}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u of o.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!o.loose){let d=u.tokens.filter(m=>m.type==="space"),p=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));o.loose=p}for(let u of o.items){let d=u.tokens[0];if(u.task&&(d?.type==="text"||d?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(u.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};u.checked=m.checked,o.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=m.raw+u.tokens[0].raw,u.tokens[0].text=m.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(m)):u.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):u.tokens.unshift(m)}}else u.task&&(u.task=!1)}if(o.loose)for(let u of o.items){u.loose=!0;for(let d of u.tokens)d.type==="text"&&(d.type="paragraph")}return o}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=oi(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=bn(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:Ge(e[0],`
32
+ `),href:r,title:o}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=ri(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
33
+ `):[],i={type:"table",raw:Ge(e[0],`
34
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<n.length;s++)i.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:i.align[s]});for(let s of o)i.rows.push(ri(s,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:Ge(e[0],`
35
+ `),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
36
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&si(t,e[1],n,this.rules))return;let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Ge(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=nc(e[2],"()");if(s===-2)return;if(s>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let o=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(o);s&&(o=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),ai(e,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&si(t,n[1],r,this.rules))return;let o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[bn(o)];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ai(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,s,l=o,u=0,d=r[0][0],p=n===d,m=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*t.length+o);(r=m.exec(e))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=[...i].length,r[3]||r[4]){l+=s;continue}else if(r[5]||r[6]){if(o%3&&!((o+s)%3)){u+=s;continue}if(p)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);let f=[...r[0]][0].length,g=t.slice(0,o+r.index+f+s);if(Math.min(o,s)%2){let v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}let b=g.slice(2,-2);return{type:"strong",raw:g,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,s,l=o,u=this.rules.inline.delRDelim;for(u.lastIndex=0,e=e.slice(-1*t.length+o);(r=u.exec(e))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(s=[...i].length,s!==o))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let d=[...r[0]][0].length,p=t.slice(0,o+r.index+d+s),m=p.slice(o,-o);return{type:"del",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:tc(e[0]),escaped:n}}}},Te=class yr{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||lt,this.options.tokenizer=this.options.tokenizer||new xn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let n={other:ue,block:hn.normal,inline:$t.normal};this.options.pedantic?(n.block=hn.pedantic,n.inline=$t.pedantic):this.options.gfm&&(n.block=hn.gfm,this.options.breaks?n.inline=$t.breaks:n.inline=$t.gfm),this.tokenizer.rules=n}static get rules(){return{block:hn,inline:$t}}static lex(e,n){return new yr(n).lex(e)}static lexInline(e,n){return new yr(n).inlineTokens(e)}lex(e){e=e.replace(ue.carriageReturn,`
37
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(ue.tabCharGlobal," ").replace(ue.spaceLine,""));let o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
38
+ `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
39
+ `)?"":`
40
+ `)+i.raw,l.text+=`
41
+ `+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
42
+ `)?"":`
43
+ `)+i.raw,l.text+=`
44
+ `+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,u=e.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(s=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
45
+ `)?"":`
46
+ `)+i.raw,l.text+=`
47
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
48
+ `)?"":`
49
+ `)+i.raw,l.text+=`
50
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let r of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(r[0])&&e.charAt(r.index-1)!=="!")return!0;for(let r of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let o=r[0],i=o.lastIndexOf("[");if(!(o.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,bn(o.slice(i+1,-1))))&&!(i>1&&this.linkInText(o.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let r=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,u=d=>{let p=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,bn(d.slice(p+1,-1))))return d;if(p>1&&d.charAt(0)!=="!"){let m=d.slice(1,p-1);if(this.linkInText(m))return"["+m.replace(l,u)+"]["+"a".repeat(d.length-p-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};r=r.replace(l,u)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(l,u,d)=>{let p=d?d.length:0;return l.slice(0,p)+"["+"a".repeat(l.length-p-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let o=!1,i="",s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}o||(i=""),o=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.call({lexer:this},e,n))?(e=e.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let d=n.at(-1);l.type==="text"&&d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(e,r,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(e,r,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),n.push(l);continue}let u=e;if(this.options.extensions?.startInline){let d=1/0,p=e.slice(1),m;this.options.extensions.startInline.forEach(f=>{m=f.call({lexer:this},p),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(l=this.tokenizer.inlineText(u)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),o=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},yn=class{options;parser;constructor(t){this.options=t||lt}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(ue.notSpaceStart)?.[0],o=t?t.replace(ue.endingNewline,"")+`
51
+ `:"";return r?'<pre><code class="language-'+ke(r)+'">'+(n?o:ke(o,!0))+`</code></pre>
52
+ `:"<pre><code>"+(n?o:ke(o,!0))+`</code></pre>
53
+ `}blockquote({tokens:t}){return`<blockquote>
54
+ ${this.parser.parse(t)}</blockquote>
55
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
56
+ `}hr(t){return`<hr>
57
+ `}list(t){let e=t.ordered,n=t.start,r="";for(let s=0;s<t.items.length;s++){let l=t.items[s];r+=this.listitem(l)}let o=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+o+i+`>
58
+ `+r+"</"+o+`>
59
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
60
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
61
+ `}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let i=t.rows[o];n="";for(let s=0;s<i.length;s++)n+=this.tablecell(i[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
62
+ <thead>
63
+ `+e+`</thead>
64
+ `+r+`</table>
65
+ `}tablerow({text:t}){return`<tr>
66
+ ${t}</tr>
67
+ `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
68
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ke(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:r,autolink:o}){let i=o?ke(n,!0):this.parser.parseInline(r),s=ni(t);if(s===null)return i;t=ke(s,o);let l='<a href="'+t+'"';return e&&(l+=' title="'+ke(e)+'"'),l+=">"+i+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=ni(t);if(o===null)return ke(n);t=o;let i=`<img src="${ke(t)}" alt="${ke(n)}"`;return e&&(i+=` title="${ke(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ke(t.text)}},Cr=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Ee=class vr{options;renderer;textRenderer;constructor(e){this.options=e||lt,this.options.renderer=this.options.renderer||new yn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cr}static parse(e,n){return new vr(n).parse(e)}static parseInline(e,n){return new vr(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let s=o,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){n+=l||"";continue}}let i=o;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let o=0;o<e.length;o++){let i=e[o];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}let s=i;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Ut=class{options;block;constructor(t){this.options=t||lt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Te.lex:Te.lexInline}provideParser(t=this.block){return t?Ee.parse:Ee.parseInline}},Rr=class{defaults=wr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ee;Renderer=yn;TextRenderer=Cr;Lexer=Te;Tokenizer=xn;Hooks=Ut;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let o=r;for(let i of o.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of o.rows)for(let s of i)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{let o=r;n=n.concat(this.walkTokens(o.items,e));break}default:{let o=r;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(i=>{let s=o[i].flat(1/0);n=n.concat(this.walkTokens(s,e))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let i=e.renderers[o.name];i?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[o.level];i?i.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new yn(this.defaults);for(let i in n.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,l=n.renderer[s],u=o[s];o[s]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=u.apply(o,d)),p||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new xn(this.defaults);for(let i in n.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,l=n.tokenizer[s],u=o[s];o[s]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=u.apply(o,d)),p}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Ut;for(let i in n.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,l=n.hooks[s],u=o[s];Ut.passThroughHooks.has(i)?o[s]=d=>{if(this.defaults.async&&Ut.passThroughHooksRespectAsync.has(i))return(async()=>{let m=await l.call(o,d);return u.call(o,m)})();let p=l.call(o,d);return u.call(o,p)}:o[s]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await l.apply(o,d);return m===!1&&(m=await u.apply(o,d)),m})();let p=l.apply(o,d);return p===!1&&(p=u.apply(o,d)),p}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(i.call(this,s)),o&&(l=l.concat(o.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Te.lex(t,e??this.defaults)}parser(t,e){return Ee.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let s=o.hooks?await o.hooks.preprocess(e):e,l=await(o.hooks?await o.hooks.provideLexer(t):t?Te.lex:Te.lexInline)(s,o),u=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(u,o.walkTokens));let d=await(o.hooks?await o.hooks.provideParser(t):t?Ee.parse:Ee.parseInline)(u,o);return o.hooks?await o.hooks.postprocess(d):d})().catch(i);try{o.hooks&&(e=o.hooks.preprocess(e));let s=(o.hooks?o.hooks.provideLexer(t):t?Te.lex:Te.lexInline)(e,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let l=(o.hooks?o.hooks.provideParser(t):t?Ee.parse:Ee.parseInline)(s,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(s){return i(s)}}}onError(t,e){return n=>{if(n.message+=`
69
+ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+ke(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},st=new Rr;function W(t,e){return st.parse(t,e)}W.options=W.setOptions=function(t){return st.setOptions(t),W.defaults=st.defaults,li(W.defaults),W};W.getDefaults=wr;W.defaults=lt;function oc(...t){return st.use(...t),W.defaults=st.defaults,li(W.defaults),W}W.use=oc;W.walkTokens=function(t,e){return st.walkTokens(t,e)};W.parseInline=st.parseInline;W.Parser=Ee;W.parser=Ee.parse;W.Renderer=yn;W.TextRenderer=Cr;W.Lexer=Te;W.lexer=Te.lex;W.Tokenizer=xn;W.Hooks=Ut;W.parse=W;var qu=W.options,Hu=W.setOptions,Wu=W.walkTokens,Xu=W.parseInline;var ju=Ee.parse,Vu=Te.lex;var En,U,vi,ic,Ye,bi,wi,ki,Pr,wn,Xt,_i,Dr,Mr,Lr,Si,Sn={},An=[],ac=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cn=Array.isArray;function Fe(t,e){for(var n in e)t[n]=e[n];return t}function Nr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function sc(t,e,n){var r,o,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?En.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return kn(t,s,r,o,null)}function kn(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++vi,__i:-1,__u:0};return o==null&&U.vnode!=null&&U.vnode(i),i}function V(t){return t.children}function _n(t,e){this.props=t,this.context=e}function ct(t,e){if(e==null)return t.__?ct(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?ct(t):null}function lc(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],o=[],i=Fe({},e);i.__v=e.__v+1,U.vnode&&U.vnode(i),Or(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??ct(e),!!(32&e.__u),o),i.__v=e.__v,i.__.__k[i.__i]=i,Ri(r,i,o),e.__e=e.__=null,i.__e!=n&&Ai(i)}}function Ai(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Ai(t)}function Ir(t){(!t.__d&&(t.__d=!0)&&Ye.push(t)&&!Tn.__r++||bi!=U.debounceRendering)&&((bi=U.debounceRendering)||wi)(Tn)}function Tn(){try{for(var t,e=1;Ye.length;)Ye.length>e&&Ye.sort(ki),t=Ye.shift(),e=Ye.length,lc(t)}finally{Ye.length=Tn.__r=0}}function Ti(t,e,n,r,o,i,s,l,u,d,p){var m,f,g,b,v,k,T=r&&r.__k||An,x=e.length;for(u=cc(n,e,T,u,x),m=0;m<x;m++)(g=n.__k[m])!=null&&(f=g.__i!=-1&&T[g.__i]||Sn,g.__i=m,k=Or(t,g,f,o,i,s,l,u,d,p),b=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&zr(f.ref,null,g),p.push(g.ref,g.__c||b,g)),v==null&&b!=null&&(v=b),4&g.__u?(u=Ei(g,u,t),f.__e&&(f.__e=null)):typeof g.type=="function"&&k!==void 0?u=k:b&&(u=b.nextSibling),g.__u&=-7);return n.__e=v,u}function cc(t,e,n,r,o){var i,s,l,u,d,p=n.length,m=p,f=0;for(t.__k=new Array(o),i=0;i<o;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[i]=kn(null,s,null,null,null):Cn(s)?s=t.__k[i]=kn(V,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=kn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,u=i+f,s.__=t,s.__b=t.__b+1,l=null,(d=s.__i=uc(s,n,u,m))!=-1&&(m--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(o>p?f--:o<p&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?f--:d==u+1?f++:(d>u?f--:f++,s.__u|=4))):t.__k[i]=null;if(m)for(i=0;i<p;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=ct(l)),Mi(l,l));return r}function Ei(t,e,n){var r,o;if(typeof t.type=="function"){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=Ei(r[o],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=ct(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function uc(t,e,n,r){var o,i,s,l=t.key,u=t.type,d=e[n],p=d!=null&&(2&d.__u)==0;if(d===null&&l==null||p&&l==d.key&&u==d.type)return n;if(r>(p?1:0)){for(o=n-1,i=n+1;o>=0||i<e.length;)if((d=e[s=o>=0?o--:i++])!=null&&(2&d.__u)==0&&l==d.key&&u==d.type)return s}return-1}function xi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||ac.test(e)?n:n+"px"}function vn(t,e,n,r,o){var i,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||xi(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||xi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(_i,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[Xt]=r[Xt]:(n[Xt]=Dr,t.addEventListener(e,i?Lr:Mr,i)):t.removeEventListener(e,i?Lr:Mr,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function yi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[wn]==null)e[wn]=Dr++;else if(e[wn]<n[Xt])return;return n(U.event?U.event(e):e)}}}function Or(t,e,n,r,o,i,s,l,u,d){var p,m,f,g,b,v,k,T,x,_,A,R,N,G,z,H,re=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[l=e.__e=n.__e]),(p=U.__b)&&p(e);e:if(typeof re=="function"){m=s.length;try{if(x=e.props,_=re.prototype&&re.prototype.render,A=(p=re.contextType)&&r[p.__c],R=p?A?A.props.value:p.__:r,n.__c?T=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new re(x,R):(e.__c=f=new _n(x,R),f.constructor=re,f.render=fc),A&&A.sub(f),f.state||(f.state={}),f.__n=r,g=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&re.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Fe({},f.__s)),Fe(f.__s,re.getDerivedStateFromProps(x,f.__s))),b=f.props,v=f.state,f.__v=e,g)_&&re.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&re.getDerivedStateFromProps==null&&x!==b&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,R),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,R)===!1){e.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(pe){pe&&(pe.__=e)}),An.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f),l=ct(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,R),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(b,v,k)})}if(f.context=R,f.props=x,f.__P=t,f.__e=!1,N=U.__r,G=0,_)f.state=f.__s,f.__d=!1,N&&N(e),p=f.render(f.props,f.state,f.context),An.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,N&&N(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++G<25);f.state=f.__s,f.getChildContext!=null&&(r=Fe(Fe({},r),f.getChildContext())),_&&!g&&f.getSnapshotBeforeUpdate!=null&&(k=f.getSnapshotBeforeUpdate(b,v)),z=p!=null&&p.type===V&&p.key==null?Pi(p.props.children):p,l=Ti(t,Cn(z)?z:[z],e,n,r,o,i,s,l,u,d),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),T&&(f.__E=f.__=null)}catch(pe){if(s.length=m,e.__v=null,u||i!=null){if(pe.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),e.__e=l}else if(i!=null)for(H=i.length;H--;)Nr(i[H])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),pe.then||Ci(e),U.__e(pe,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=dc(n.__e,e,n,r,o,i,s,u,d);return(p=U.diffed)&&p(e),128&e.__u?void 0:l}function Ci(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Ci))}function Ri(t,e,n){for(var r=0;r<n.length;r++)zr(n[r],n[++r],n[++r]);U.__c&&U.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){U.__e(i,o.__v)}})}function Pi(t){return typeof t!="object"||t==null||t.__b>0?t:Cn(t)?t.map(Pi):t.constructor!==void 0?null:Fe({},t)}function dc(t,e,n,r,o,i,s,l,u){var d,p,m,f,g,b,v,k=n.props||Sn,T=e.props,x=e.type;if(x=="svg"?o="http://www.w3.org/2000/svg":x=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!x&&(x?g.localName==x:g.nodeType==3)){t=g,i[d]=null;break}}if(t==null){if(x==null)return document.createTextNode(T);t=document.createElementNS(o,x,T.is&&T),l&&(U.__m&&U.__m(e,i),l=!1),i=null}if(x==null)k===T||l&&t.data==T||(t.data=T);else{if(i=x=="textarea"&&T.defaultValue!=null?null:i&&En.call(t.childNodes),!l&&i!=null)for(k={},d=0;d<t.attributes.length;d++)k[(g=t.attributes[d]).name]=g.value;for(d in k)g=k[d],d=="dangerouslySetInnerHTML"?m=g:d=="children"||d in T||d=="value"&&"defaultValue"in T||d=="checked"&&"defaultChecked"in T||vn(t,d,null,g,o);for(d in T)g=T[d],d=="children"?f=g:d=="dangerouslySetInnerHTML"?p=g:d=="value"?b=g:d=="checked"?v=g:l&&typeof g!="function"||k[d]===g||vn(t,d,g,k[d],o);if(p)l||m&&(p.__html==m.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(m&&(t.innerHTML=""),Ti(e.type=="template"?t.content:t,Cn(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&ct(n,0),l,u),i!=null)for(d=i.length;d--;)Nr(i[d]);l&&x!="textarea"||(d="value",x=="progress"&&b==null?t.removeAttribute("value"):b!=null&&(b!==t[d]||x=="progress"&&!b||x=="option"&&b!=k[d])&&vn(t,d,b,k[d],o),d="checked",v!=null&&v!=t[d]&&vn(t,d,v,k[d],o))}return t}function zr(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(o){U.__e(o,n)}}function Mi(t,e,n){var r,o;if(U.unmount&&U.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||zr(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){U.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Mi(r[o],e,n||typeof t.type!="function");n||Nr(t.__e),t.__c=t.__=t.__e=void 0}function fc(t,e,n){return this.constructor(t,n)}function Pt(t,e,n){var r,o,i,s;e==document&&(e=document.documentElement),U.__&&U.__(t,e),o=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],Or(e,t=(!r&&n||e).__k=sc(V,null,[t]),o||Sn,Sn,e.namespaceURI,!r&&n?[n]:o?null:e.firstChild?En.call(e.childNodes):null,i,!r&&n?n:o?o.__e:e.firstChild,r,s),Ri(i,t,s),t.props.children=null}function Li(t){function e(n){var r,o;return this.getChildContext||(r=new Set,(o={})[e.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,Ir(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return e.__c="__cC"+Si++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}En=An.slice,U={__e:function(t,e,n,r){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),s=o.__d),s)return o.__E=o}catch(l){t=l}throw t}},vi=0,ic=function(t){return t!=null&&t.constructor===void 0},_n.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Fe({},this.state),typeof t=="function"&&(t=t(Fe({},n),this.props)),t&&Fe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ir(this))},_n.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ir(this))},_n.prototype.render=V,Ye=[],wi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(t,e){return t.__v.__b-e.__v.__b},Tn.__r=0,Pr=Math.random().toString(8),wn="__d"+Pr,Xt="__a"+Pr,_i=/(PointerCapture)$|Capture$/i,Dr=0,Mr=yi(!1),Lr=yi(!0),Si=0;var Mt,Q,Fr,Ii,jt=0,Ui=[],ae=U,Di=ae.__b,Ni=ae.__r,Oi=ae.diffed,zi=ae.__c,Fi=ae.unmount,Bi=ae.__;function Pn(t,e){ae.__h&&ae.__h(Q,t,jt||e),jt=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function E(t){return jt=1,pc(Wi,t)}function pc(t,e,n){var r=Pn(Mt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Wi(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,l);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.__f)){var o=function(l,u,d){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==l;if(r.__c.__H.__.some(function(g){if(g.__N){p=!0;var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(m=!0)}}),i){var f=i.call(this,l,u,d);return p?f||m:f}return!p||m};Q.__f=!0;var i=Q.shouldComponentUpdate,s=Q.componentWillUpdate;Q.componentWillUpdate=function(l,u,d){if(this.__e){var p=i;i=void 0,o(l,u,d),i=p}s&&s.call(this,l,u,d)},Q.shouldComponentUpdate=o}return r.__N||r.__}function X(t,e){var n=Pn(Mt++,3);!ae.__s&&Hi(n.__H,e)&&(n.__=t,n.u=e,Q.__H.__h.push(n))}function ee(t){return jt=5,Je(function(){return{current:t}},[])}function Je(t,e){var n=Pn(Mt++,7);return Hi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ze(t,e){return jt=8,Je(function(){return t},e)}function qi(t){var e=Q.context[t.__c],n=Pn(Mt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Q)),e.props.value):t.__}function mc(){for(var t;t=Ui.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Rn),e.__h.some(Br),e.__h=[]}catch(n){e.__h=[],ae.__e(n,t.__v)}}}ae.__b=function(t){Q=null,Di&&Di(t)},ae.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bi&&Bi(t,e)},ae.__r=function(t){Ni&&Ni(t),Mt=0;var e=(Q=t.__c).__H;e&&(Fr===Q?(e.__h=[],Q.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Rn),e.__h.some(Br),e.__h=[],Mt=0)),Fr=Q},ae.diffed=function(t){Oi&&Oi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ui.push(e)!==1&&Ii===ae.requestAnimationFrame||((Ii=ae.requestAnimationFrame)||hc)(mc)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Fr=Q=null},ae.__c=function(t,e){e.some(function(n){try{n.__h.some(Rn),n.__h=n.__h.filter(function(r){return!r.__||Br(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ae.__e(r,n.__v)}}),zi&&zi(t,e)},ae.unmount=function(t){Fi&&Fi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Rn(r)}catch(o){e=o}}),n.__H=void 0,e&&ae.__e(e,n.__v))};var $i=typeof requestAnimationFrame=="function";function hc(t){var e,n=function(){clearTimeout(r),$i&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);$i&&(e=requestAnimationFrame(n))}function Rn(t){var e=Q,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Q=e}function Br(t){var e=Q;t.__c=t.__(),Q=e}function Hi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Wi(t,e){return typeof e=="function"?e(t):e}var j=()=>typeof window<"u"&&window.tangu||{};function Xi(t){let e=typeof t?.status=="number"?t.status:0;if(e>=200&&e<300)return{ok:!0,status:e,data:t?.json??null};let n=t?.json&&typeof t.json=="object"?t.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,o=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:o,transport:typeof t?.error=="string"?t.error:null}}var $r=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function M(t,e={}){let n=j().cloudFetch;if(!n)return $r("no_bridge");try{return Xi(await n({path:t,...e}))}catch(r){return $r(String(r?.message||r))}}async function Mn(t,e){if(!t)return e();try{return Xi(await t())}catch(n){return $r(String(n?.message||n))}}var Ln=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Ke(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function In(t){let e=j().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function Dn(t){let e=j().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var gc=0;function a(t,e,n,r,o,i){e||(e={});var s,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?s=e[l]:u[l]=e[l];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gc,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return U.vnode&&U.vnode(d),d}var bc={user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 20c.8-3.5 4-5.5 8-5.5s7.2 2 8 5.5",gauge:"M4 16a8 8 0 1 1 16 0 M12 16l4-5 M12 16h.01",shield:"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3Z",chart:"M4 20V10 M10 20V4 M16 20v-7 M21 20H3",message:"M5 4h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-7l-5 4v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",card:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z M3 10h18 M7 15h4",coins:"M9 11a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z M15.5 9.2A5 5 0 1 1 9.8 16",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M12 7v5l3 2",gift:"M4 11h16v9H4z M3 7h18v4H3z M12 7v13 M12 7c-1.5-3-5-3-5-1s3 1 5 1c2 0 5 1 5-1s-3.5-2-5 1",key:"M8 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M11 11h10 M17 11v3 M20 11v2",laptop:"M5 5h14v10H5z M3 19h18",alert:"M12 4l9 16H3l9-16Z M12 10v4 M12 17h.01",external:"M14 4h6v6 M20 4l-9 9 M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",copy:"M9 9h11v11H9z M5 15H4V4h11v1",check:"M5 12.5l4.5 4.5L19 7.5",chevron:"M9 6l6 6-6 6",back:"M15 6l-6 6 6 6",pencil:"M4 20h4L19 9l-4-4L4 16v4Z M13.5 6.5l4 4",plus:"M12 5v14 M5 12h14",refresh:"M20 11a8 8 0 0 0-14.3-4.9L4 8 M4 4v4h4 M4 13a8 8 0 0 0 14.3 4.9L20 16 M20 20v-4h-4",phone:"M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M11 18h2",mail:"M4 6h16v12H4z M4 7l8 6 8-6",image:"M4 5h16v14H4z M4 16l5-5 4 4 3-3 4 4 M15.5 9.5h.01",x:"M6 6l12 12 M18 6L6 18",logout:"M15 4h4v16h-4 M10 8l-4 4 4 4 M6 12h10"};function q({name:t,size:e=14,class:n}){return a("svg",{class:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:a("path",{d:bc[t]})})}function Vt({size:t=12}){return a("svg",{class:"spin",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:a("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var xc={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","common.cancel":"\u53D6\u6D88","common.copied":"\u5DF2\u590D\u5236","common.copyFailed":"\u590D\u5236\u5931\u8D25","common.done":"\u5B8C\u6210","common.loadFailed":"\u6CA1\u80FD\u52A0\u8F7D","common.loadMore":"\u52A0\u8F7D\u66F4\u591A","common.loading":"\u52A0\u8F7D\u4E2D\u2026","common.openInBrowser":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00","common.retry":"\u91CD\u8BD5","common.save":"\u4FDD\u5B58","common.thisWeek":"\u672C\u5468","common.today":"\u4ECA\u65E5","common.unlimited":"\u4E0D\u9650","ann.eyebrow":"FORSION \xB7 \u516C\u544A","ann.close":"\u5173\u95ED","ann.ok":"\u77E5\u9053\u4E86","signin.button":"\u767B\u5F55 Forsion","signin.desc":"\u767B\u5F55 Forsion \u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u7BA1\u7406\u8D26\u53F7\u3001\u989D\u5EA6\u3001\u5B89\u5168\u4E0E\u53CD\u9988\u3002","signin.pending":"\u7B49\u5F85\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u767B\u5F55\u2026","signin.deviceHint":"\u6D4F\u89C8\u5668\u4F1A\u81EA\u52A8\u6253\u5F00\u767B\u5F55\u9875\uFF1B\u6CA1\u6709\u6253\u5F00\u7684\u8BDD\uFF0C\u7528\u624B\u673A\u626B\u7801\u6216\u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u5E76\u6838\u5BF9\u9A8C\u8BC1\u7801\u3002","signin.code":"\u9A8C\u8BC1\u7801","signin.openLink":"\u6253\u5F00\u767B\u5F55\u9875","signin.copyLink":"\u590D\u5236\u94FE\u63A5","signin.qrLabel":"\u767B\u5F55\u4E8C\u7EF4\u7801","account.profile.title":"\u4E2A\u4EBA\u8D44\u6599","account.profile.desc":"\u5934\u50CF\u3001\u6635\u79F0\uFF0C\u4EE5\u53CA\u7ED1\u5B9A\u7684\u624B\u673A\u548C\u90AE\u7BB1","account.avatar.change":"\u66F4\u6362\u5934\u50CF","account.avatar.saved":"\u5934\u50CF\u5DF2\u66F4\u65B0","account.nickname.edit":"\u4FEE\u6539\u6635\u79F0","account.nickname.label":"\u6635\u79F0","account.nickname.saved":"\u6635\u79F0\u5DF2\u66F4\u65B0","account.role.admin":"\u7BA1\u7406\u5458","account.username":"\u7528\u6237\u540D {name}","account.contact.phone":"\u624B\u673A","account.contact.email":"\u90AE\u7BB1","account.contact.unbound":"\u672A\u7ED1\u5B9A","account.contact.manage":"\u53BB\u5B89\u5168\u9875\u7BA1\u7406","account.web.open":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u4E2A\u4EBA\u4E2D\u5FC3","account.web.desc":"\u4E91\u7A7A\u95F4\u3001AI \u5927\u8111\u3001\u6295\u7A3F\u4E0E\u4E3B\u9898\u5728\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7BA1\u7406\u3002","member.title":"\u4F1A\u5458","member.desc":"\u5F53\u524D\u6863\u4F4D\u3001\u65B9\u6848\u4E0E\u5230\u671F\u65E5","member.upgrade":"\u5347\u7EA7\u4F1A\u5458","member.renew":"\u7EED\u8D39","member.freeName":"\u514D\u8D39\u7248","member.freeHint":"\u5347\u7EA7\u4F1A\u5458\u53EF\u4EE5\u83B7\u5F97\u66F4\u591A AI \u989D\u5EA6","member.expires":"{date} \u5230\u671F","member.noExpiry":"\u957F\u671F\u6709\u6548","member.loadFailed":"\u4F1A\u5458\u4FE1\u606F\u6682\u65F6\u62FF\u4E0D\u5230\u3002","local.title":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u8D26\u53F7","local.desc":"\u5728\u767B\u5F55\u8FC7\u7684\u8D26\u53F7\u4E4B\u95F4\u5207\u6362","local.current":"\u5F53\u524D","local.switch":"\u5207\u6362","local.add":"\u767B\u5F55\u5176\u4ED6\u8D26\u53F7","local.signOut":"\u9000\u51FA\u767B\u5F55","local.empty":"\u8FD8\u6CA1\u6709\u4FDD\u5B58\u7684\u8D26\u53F7","local.loadFailed":"\u8D26\u53F7\u5217\u8868\u6682\u65F6\u8BFB\u4E0D\u5230","quota.ai.title":"AI \u989D\u5EA6","quota.ai.desc":"\u4ECA\u65E5\u548C\u672C\u5468\u5404\u8FD8\u5269\u591A\u5C11\uFF1B\u7528\u5B8C\u540E\u53EF\u4EE5\u7528\u989D\u5EA6\u91CD\u7F6E\u5361\u6062\u590D","quota.resetDaily":"\u6BCF\u5929 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","quota.resetWeekly":"{date} 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","card.title":"\u989D\u5EA6\u91CD\u7F6E\u5361","card.desc":"\u628A\u4ECA\u65E5\u548C\u672C\u5468\u7684 AI \u989D\u5EA6\u6062\u590D\u5230 100%","card.owned":"\u6301\u6709 {n} \u5F20","card.use":"\u4F7F\u7528\u4E00\u5F20","card.useConfirm":"\u786E\u8BA4\u4F7F\u7528","card.used":"\u5DF2\u4F7F\u7528 1 \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","card.left":"\u8FD8\u5269 {n} \u5F20","card.noneHint":"\u6CA1\u6709\u989D\u5EA6\u91CD\u7F6E\u5361\u4E86\uFF0C\u53EF\u4EE5\u7528\u79EF\u5206\u5151\u6362\u3002","card.exchange":"\u7528\u79EF\u5206\u5151\u6362","card.price":"\u6BCF\u5F20 {price} \u79EF\u5206\uFF0C\u4E00\u6B21 1\u201350 \u5F20","card.count":"\u5151\u6362\u5F20\u6570","card.cost":"\u82B1\u8D39 {cost} \u79EF\u5206","card.countHint":"\u586B 1\u201350","card.exchangeButton":"\u5151\u6362","card.exchangeConfirm":"\u786E\u8BA4\u82B1\u8D39 {cost} \u79EF\u5206","card.exchanged":"\u5DF2\u5151\u6362 {n} \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","points.title":"\u79EF\u5206","points.desc":"\u79EF\u5206\u53EF\u4EE5\u5151\u6362\u989D\u5EA6\u91CD\u7F6E\u5361","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","bg.title":"\u540E\u53F0\u989D\u5EA6","bg.desc":"Muse \u4E0E\u81EA\u52A8\u5316\u4F7F\u7528\uFF0C\u548C AI \u989D\u5EA6\u5206\u5F00\u8BA1\u7B97","bg.autoMain":"\u7528\u5B8C\u540E\u6539\u7528 AI \u989D\u5EA6\u7EE7\u7EED","bg.autoMainDesc":"\u5173\u7740\u65F6\uFF0C\u540E\u53F0\u989D\u5EA6\u7528\u5B8C\u540E Muse \u4E0E\u81EA\u52A8\u5316\u4F1A\u6682\u505C","bg.convert":"\u4ECE AI \u989D\u5EA6\u8F6C\u5165","bg.convertDesc":"\u6309 AI \u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B\u8F6C\u5165\uFF0C\u672C\u5468\u671F\u5185\u6709\u6548","bg.convertConfirm":"\u786E\u8BA4\u8F6C\u5165 {pct}%","bg.converted":"\u5DF2\u4ECE AI \u989D\u5EA6\u8F6C\u5165 {pct}%","invite.title":"\u9080\u8BF7\u4E0E\u5151\u6362","invite.desc":"\u9080\u8BF7\u597D\u53CB\u6CE8\u518C\uFF0C\u6216\u5151\u6362\u4F60\u6536\u5230\u7684\u7801","invite.myCode":"\u6211\u7684\u9080\u8BF7\u7801","invite.count":"\u5DF2\u9080\u8BF7 {n} \u4EBA","invite.copyCode":"\u590D\u5236\u9080\u8BF7\u7801","invite.copyLink":"\u590D\u5236\u9080\u8BF7\u94FE\u63A5","invite.loadFailed":"\u9080\u8BF7\u7801\u6682\u65F6\u62FF\u4E0D\u5230","invite.claim":"\u586B\u5199\u9080\u8BF7\u7801","invite.claimDesc":"\u6CE8\u518C\u540E 7 \u5929\u5185\uFF0C\u53EF\u4EE5\u8865\u586B\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimPlaceholder":"\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimSubmit":"\u63D0\u4EA4","invite.claimed":"\u9080\u8BF7\u7801\u5DF2\u751F\u6548","redeem.title":"\u5151\u6362\u7801","redeem.desc":"\u5151\u6362\u79EF\u5206\u3001\u4F1A\u5458\u6216\u5176\u4ED6\u5956\u52B1","redeem.placeholder":"\u8F93\u5165\u5151\u6362\u7801","redeem.submit":"\u5151\u6362","redeem.success":"\u5151\u6362\u6210\u529F","redeem.successWith":"\u5151\u6362\u6210\u529F\uFF1A{what}","redeem.gotPoints":"{n} \u79EF\u5206","redeem.gotMembership":"\u4F1A\u5458","sec.methods.title":"\u767B\u5F55\u65B9\u5F0F","sec.methods.desc":"\u624B\u673A\u548C\u90AE\u7BB1\u53EF\u4EE5\u7528\u6765\u767B\u5F55\u3001\u627E\u56DE\u5BC6\u7801","sec.bind":"\u7ED1\u5B9A","sec.change":"\u66F4\u6362","sec.phone":"\u624B\u673A\u53F7","sec.email":"\u90AE\u7BB1\u5730\u5740","sec.newPhone":"\u65B0\u624B\u673A\u53F7","sec.newEmail":"\u65B0\u90AE\u7BB1\u5730\u5740","sec.phonePlaceholder":"\u4E2D\u56FD\u5927\u9646\u53F7\u7801\u76F4\u63A5\u586B\uFF0C\u5176\u4ED6\u5730\u533A\u5E26 +\u533A\u53F7","sec.emailPlaceholder":"name@example.com","sec.code":"\u9A8C\u8BC1\u7801","sec.codePlaceholder":"\u8F93\u5165\u9A8C\u8BC1\u7801","sec.sendCode":"\u53D1\u9001\u9A8C\u8BC1\u7801","sec.resendIn":"{s} \u79D2\u540E\u91CD\u53D1","sec.codeSent":"\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001","sec.bindSubmit":"\u786E\u8BA4\u7ED1\u5B9A","sec.phoneBound":"\u624B\u673A\u5DF2\u7ED1\u5B9A","sec.emailBound":"\u90AE\u7BB1\u5DF2\u7ED1\u5B9A","sec.devices.title":"\u767B\u5F55\u8BBE\u5907","sec.devices.desc":"\u62C5\u5FC3\u8D26\u53F7\u88AB\u522B\u4EBA\u7528\u4E86\uFF0C\u53EF\u4EE5\u8BA9\u6240\u6709\u8BBE\u5907\u91CD\u65B0\u767B\u5F55","sec.logoutAll":"\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDesc":"\u5305\u62EC\u8FD9\u53F0\u7535\u8111\uFF0C\u6240\u6709\u8BBE\u5907\u90FD\u8981\u91CD\u65B0\u767B\u5F55","sec.logoutAllConfirm":"\u786E\u8BA4\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDone":"\u5DF2\u9000\u51FA\u6240\u6709\u8BBE\u5907","pw.title":"\u5BC6\u7801","pw.desc":"{min}\u2013{max} \u4F4D\uFF0C\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C","pw.change":"\u4FEE\u6539\u5BC6\u7801","pw.modeLabel":"\u4FEE\u6539\u65B9\u5F0F","pw.mode.current":"\u7528\u5F53\u524D\u5BC6\u7801","pw.mode.code":"\u7528\u9A8C\u8BC1\u7801","pw.current":"\u5F53\u524D\u5BC6\u7801","pw.currentRequired":"\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801","pw.new":"\u65B0\u5BC6\u7801","pw.confirm":"\u518D\u8F93\u4E00\u6B21\u65B0\u5BC6\u7801","pw.mismatch":"\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u4E0D\u4E00\u81F4","pw.submit":"\u4FEE\u6539\u5BC6\u7801","pw.submitReset":"\u8BBE\u7F6E\u65B0\u5BC6\u7801","pw.changed":"\u5BC6\u7801\u5DF2\u66F4\u65B0","pw.noPasswordYet":"\u8FD9\u4E2A\u8D26\u53F7\u8FD8\u6CA1\u6709\u8BBE\u7F6E\u5BC6\u7801\uFF0C\u8BF7\u6539\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u3002","pw.codeNeedsContact":"\u7ED1\u5B9A\u624B\u673A\u6216\u90AE\u7BB1\u540E\uFF0C\u624D\u80FD\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u5BC6\u7801\u3002","pw.via":"\u9A8C\u8BC1\u7801\u53D1\u5230","pw.codeTo":"\u9A8C\u8BC1\u7801\u4F1A\u53D1\u5230 {target}","pw.rulesLabel":"\u5BC6\u7801\u89C4\u5219","pw.req.length":"{min}\u2013{max} \u4F4D","pw.req.lower":"\u542B\u5C0F\u5199\u5B57\u6BCD","pw.req.upper":"\u542B\u5927\u5199\u5B57\u6BCD","pw.req.special":"\u542B\u7279\u6B8A\u5B57\u7B26","pw.req.space":"\u4E0D\u542B\u7A7A\u683C","pw.rule.format":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","pw.rule.min":"\u5BC6\u7801\u81F3\u5C11 8 \u4F4D","pw.rule.max":"\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D","pw.rule.space":"\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C","pw.rule.lower":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD","pw.rule.upper":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD","pw.rule.special":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26","del.title":"\u6CE8\u9500\u8D26\u53F7","del.desc":"\u6C38\u4E45\u5220\u9664\u8D26\u53F7\u548C\u5168\u90E8\u6570\u636E\uFF0C\u65E0\u6CD5\u6062\u590D","del.start":"\u6CE8\u9500\u8D26\u53F7","del.warn":"\u6CE8\u9500\u540E\uFF0C\u8D26\u53F7\u3001\u79EF\u5206\u3001\u4F1A\u5458\u3001\u4E91\u7A7A\u95F4\u548C\u5168\u90E8\u6570\u636E\u90FD\u4F1A\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u627E\u56DE\u3002","del.methodLabel":"\u9A8C\u8BC1\u65B9\u5F0F","del.byCode":"\u9A8C\u8BC1\u7801","del.byPassword":"\u5BC6\u7801","del.codeLabel":"\u53D1\u5230 {target} \u7684\u9A8C\u8BC1\u7801","del.passwordLabel":"\u8D26\u53F7\u5BC6\u7801","del.submit":"\u6CE8\u9500\u8D26\u53F7","del.confirm":"\u786E\u8BA4\u6C38\u4E45\u6CE8\u9500","del.done":"\u8D26\u53F7\u5DF2\u6CE8\u9500","usage.overview.title":"\u7528\u91CF\u6982\u89C8","usage.overview.desc":"\u6240\u9009\u65F6\u95F4\u6BB5\u5185\u7684\u8BF7\u6C42\u4E0E AI \u989D\u5EA6\u6D88\u8017","usage.range":"\u65F6\u95F4\u8303\u56F4","usage.days":"{n} \u5929","usage.requests":"\u8BF7\u6C42\u6B21\u6570","usage.successRate":"\u6210\u529F\u7387","usage.consumption":"AI \u989D\u5EA6\u6D88\u8017","usage.ofToday":"\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650","usage.unlimitedNote":"\u4F60\u7684 AI \u989D\u5EA6\u4E0D\u9650\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.noLimitNote":"\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u4E3A 0 \u6216\u6682\u65F6\u62FF\u4E0D\u5230\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.byModel.title":"\u6309\u6A21\u578B","usage.byModel.desc":"\u5404\u6A21\u578B\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.byApp.title":"\u6309\u5E94\u7528","usage.byApp.desc":"\u5404\u5E94\u7528\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.col.model":"\u6A21\u578B","usage.col.app":"\u5E94\u7528","usage.col.requests":"\u8BF7\u6C42","usage.col.consumption":"\u989D\u5EA6\u6D88\u8017","usage.empty":"\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u7528\u91CF","usage.appUnknown":"\u5176\u4ED6","usage.recent.title":"\u6700\u8FD1\u6D88\u8017","usage.recent.desc":"\u6BCF\u6B21\u8C03\u7528\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B","usage.recentEmpty":"\u8FD8\u6CA1\u6709\u6D88\u8017\u8BB0\u5F55","usage.failed":"\u5931\u8D25","usage.shown":"\u5DF2\u663E\u793A {shown} / {total} \u6761","fb.list.title":"\u6211\u7684\u53CD\u9988","fb.list.desc":"\u63D0\u4EA4\u8FC7\u7684\u95EE\u9898\u548C\u5EFA\u8BAE\uFF0C\u56DE\u590D\u4F1A\u663E\u793A\u5728\u8FD9\u91CC","fb.new":"\u65B0\u5EFA\u53CD\u9988","fb.empty":"\u8FD8\u6CA1\u6709\u53CD\u9988","fb.untitled":"\u672A\u547D\u540D\u53CD\u9988","fb.unread":"\u6709\u65B0\u56DE\u590D","fb.shown":"\u5DF2\u663E\u793A {n} \u6761","fb.submitted":"\u5DF2\u63D0\u4EA4\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D","fb.descLabel":"\u63CF\u8FF0\u95EE\u9898\u6216\u5EFA\u8BAE","fb.descPlaceholder":"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF0C\u4F60\u671F\u671B\u600E\u6837\u2026\u2026","fb.imagesHint":"\u6700\u591A\u9644 {n} \u5F20\u622A\u56FE\uFF08\u6BCF\u5F20\u4E0D\u8D85\u8FC7 5MB\uFF09\uFF0C\u53EF\u4EE5\u7C98\u8D34\u6216\u62D6\u8FDB\u6765\u3002","fb.addImages":"\u6DFB\u52A0\u622A\u56FE","fb.removeImage":"\u79FB\u9664\u8FD9\u5F20\u56FE","fb.submit":"\u63D0\u4EA4","fb.back":"\u8FD4\u56DE\u5217\u8868","fb.you":"\u4F60","fb.support":"Forsion \u56E2\u961F","fb.attachment":"\u9644\u4EF6","fb.imagePreview":"\u67E5\u770B\u5927\u56FE","fb.closedNote":"\u8FD9\u4E2A\u5DE5\u5355\u5DF2\u5173\u95ED\uFF0C\u4E0D\u80FD\u518D\u56DE\u590D\u3002\u6709\u65B0\u95EE\u9898\u8BF7\u65B0\u5EFA\u53CD\u9988\u3002","fb.replyPlaceholder":"\u56DE\u590D\u2026","fb.replySend":"\u53D1\u9001\u56DE\u590D","fb.replySent":"\u56DE\u590D\u5DF2\u53D1\u9001","fb.status.open":"\u5F85\u5904\u7406","fb.status.in_progress":"\u5904\u7406\u4E2D","fb.status.resolved":"\u5DF2\u89E3\u51B3","fb.status.closed":"\u5DF2\u5173\u95ED","err.accountGone":"\u8FD9\u4E2A\u8D26\u53F7\u5DF2\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.adminCannotDelete":"\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500","err.avatarInvalid":"\u8FD9\u5F20\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6362\u4E00\u5F20\u8BD5\u8BD5","err.avatarTooLarge":"\u56FE\u7247\u592A\u5927\u4E86\uFF0C\u6362\u4E00\u5F20\u5C0F\u4E00\u70B9\u7684","err.backgroundUnavailable":"\u540E\u53F0\u989D\u5EA6\u6682\u65F6\u4E0D\u53EF\u7528","err.captcha":"\u9700\u8981\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u4EBA\u673A\u9A8C\u8BC1","err.codeCooldown":"\u53D1\u9001\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.codeInvalid":"\u9A8C\u8BC1\u7801\u4E0D\u5BF9\u6216\u5DF2\u8FC7\u671F","err.codeRequired":"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801","err.codeSendFailed":"\u9A8C\u8BC1\u7801\u6CA1\u53D1\u51FA\u53BB\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.currentPasswordWrong":"\u5F53\u524D\u5BC6\u7801\u4E0D\u5BF9","err.deleteTargetInvalid":"\u9A8C\u8BC1\u7801\u53EA\u80FD\u53D1\u5230\u8D26\u53F7\u7ED1\u5B9A\u7684\u624B\u673A\u6216\u90AE\u7BB1","err.deleteVerifyFailed":"\u9A8C\u8BC1\u6CA1\u901A\u8FC7\uFF0C\u8D26\u53F7\u6CA1\u6709\u6CE8\u9500","err.emailInUse":"\u8FD9\u4E2A\u90AE\u7BB1\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.emailInvalid":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.featureDisabled":"\u8FD9\u9879\u529F\u80FD\u6682\u65F6\u5173\u95ED\u4E86","err.feedbackEmpty":"\u8BF7\u5199\u4E00\u4E0B\u95EE\u9898\u6216\u5EFA\u8BAE","err.feedbackTooLong":"\u63CF\u8FF0\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.generic":"\u64CD\u4F5C\u6CA1\u6709\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.imageRead":"\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765","err.imageTooLarge":"\u6BCF\u5F20\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5MB","err.imageType":"\u53EA\u80FD\u6DFB\u52A0\u56FE\u7247","err.insufficientMainQuota":"AI \u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6","err.insufficientPoints":"\u79EF\u5206\u4E0D\u591F","err.priceChanged":"\u91CD\u7F6E\u5361\u5355\u4EF7\u521A\u521A\u8C03\u6574\u8FC7\uFF0C\u8BF7\u770B\u4E00\u4E0B\u65B0\u4EF7\u683C\uFF0C\u518D\u786E\u8BA4\u5151\u6362\u3002","err.invalidCount":"\u5F20\u6570\u8981\u5728 1\u201350 \u4E4B\u95F4","err.invalidInviteCode":"\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548","err.inviteAlreadyUsed":"\u4F60\u5DF2\u7ECF\u7528\u8FC7\u9080\u8BF7\u7801\u4E86","err.inviteEmpty":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","err.inviteOwnCode":"\u4E0D\u80FD\u586B\u81EA\u5DF1\u7684\u9080\u8BF7\u7801","err.inviteWindowExpired":"\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F","err.loginCodeExpired":"\u767B\u5F55\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.loginInProgress":"\u6B63\u5728\u767B\u5F55\u4E2D","err.loginTimeout":"\u767B\u5F55\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5","err.loginUnsupported":"\u8FD9\u4E2A\u4E91\u7AEF\u4E0D\u652F\u6301\u684C\u9762\u7AEF\u767B\u5F55","err.network":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5","err.noCloudUrl":"\u8BF7\u5148\u5728\u300C\u8FDE\u63A5\u300D\u91CC\u586B\u5199\u4E91\u7AEF\u5730\u5740","err.noResetCard":"\u6CA1\u6709\u53EF\u7528\u7684\u989D\u5EA6\u91CD\u7F6E\u5361","err.openFailed":"\u6CA1\u80FD\u6253\u5F00\u6D4F\u89C8\u5668","err.passwordRequired":"\u8BF7\u586B\u5199\u5F53\u524D\u5BC6\u7801\u548C\u65B0\u5BC6\u7801","err.phoneInUse":"\u8FD9\u4E2A\u624B\u673A\u53F7\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.phoneInvalid":"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u5BF9\uFF08\u5176\u4ED6\u5730\u533A\u8BF7\u5E26 +\u533A\u53F7\uFF09","err.redeemEmpty":"\u8BF7\u8F93\u5165\u5151\u6362\u7801","err.redeemExpired":"\u5151\u6362\u7801\u5DF2\u8FC7\u671F","err.redeemInactive":"\u5151\u6362\u7801\u5DF2\u505C\u7528","err.redeemNotFound":"\u5151\u6362\u7801\u4E0D\u5B58\u5728","err.redeemUsedUp":"\u5151\u6362\u7801\u5DF2\u88AB\u7528\u5B8C","err.redeemUserLimit":"\u4F60\u5DF2\u7ECF\u5151\u6362\u8FC7\u8FD9\u4E2A\u7801\u4E86","err.replyEmpty":"\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9","err.replyTooLong":"\u56DE\u590D\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.server":"\u670D\u52A1\u5668\u51FA\u9519\u4E86\uFF08{status}\uFF09\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.session":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.signedOut":"\u8BF7\u5148\u767B\u5F55 Forsion","err.targetInvalid":"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.ticketNotFound":"\u8FD9\u6761\u53CD\u9988\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664","err.tooFrequent":"\u64CD\u4F5C\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.tooManyImages":"\u6700\u591A\u6DFB\u52A0 5 \u5F20\u56FE\u7247","err.unavailable":"\u8FD9\u4E2A\u7248\u672C\u7684\u684C\u9762\u7AEF\u8FD8\u4E0D\u652F\u6301\u8FD9\u4E2A\u64CD\u4F5C\uFF0C\u8BF7\u66F4\u65B0 Forsion"},yc={"page.account":"Account","page.quota":"Quota & points","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","common.cancel":"Cancel","common.copied":"Copied","common.copyFailed":"Couldn't copy","common.done":"Done","common.loadFailed":"Couldn't load","common.loadMore":"Load more","common.loading":"Loading\u2026","common.openInBrowser":"Open in browser","common.retry":"Retry","common.save":"Save","common.thisWeek":"This week","common.today":"Today","common.unlimited":"Unlimited","ann.eyebrow":"FORSION \xB7 Announcement","ann.close":"Close","ann.ok":"Got it","signin.button":"Sign in to Forsion","signin.desc":"Sign in to your Forsion account to manage your account, quota, security and feedback here.","signin.pending":"Waiting for you to finish in your browser\u2026","signin.deviceHint":"Your browser opens the sign-in page on its own. If it doesn't, scan the code with your phone or open the link below, and check that the code matches.","signin.code":"Code","signin.openLink":"Open sign-in page","signin.copyLink":"Copy link","signin.qrLabel":"Sign-in QR code","account.profile.title":"Profile","account.profile.desc":"Your photo and nickname, plus the phone and email linked to your account","account.avatar.change":"Change photo","account.avatar.saved":"Photo updated","account.nickname.edit":"Edit nickname","account.nickname.label":"Nickname","account.nickname.saved":"Nickname updated","account.role.admin":"Admin","account.username":"Username {name}","account.contact.phone":"Phone","account.contact.email":"Email","account.contact.unbound":"Not linked","account.contact.manage":"Manage in Security","account.web.open":"Open the account center in your browser","account.web.desc":"Cloud storage, AI Brain, submissions and themes are managed in the web account center.","member.title":"Membership","member.desc":"Your tier, plan and expiry date","member.upgrade":"Upgrade membership","member.renew":"Renew","member.freeName":"Free plan","member.freeHint":"Upgrade to get more AI quota","member.expires":"Expires {date}","member.noExpiry":"No expiry","member.loadFailed":"Couldn't load your membership.","local.title":"Accounts on this computer","local.desc":"Switch between accounts you've signed in with","local.current":"Current","local.switch":"Switch","local.add":"Sign in to another account","local.signOut":"Sign out","local.empty":"No saved accounts yet","local.loadFailed":"Couldn't read the account list","quota.ai.title":"AI quota","quota.ai.desc":"What's left today and this week; a quota reset card restores it","quota.resetDaily":"Resets daily at 0:00 (Beijing time)","quota.resetWeekly":"Resets {date} at 0:00 (Beijing time)","card.title":"Quota reset card","card.desc":"Restores today's and this week's AI quota to 100%","card.owned":"You have {n}","card.use":"Use one","card.useConfirm":"Confirm","card.used":"Used 1 quota reset card","card.left":"{n} left","card.noneHint":"You have no quota reset cards left. You can exchange points for more.","card.exchange":"Exchange points","card.price":"{price} points each, 1\u201350 at a time","card.count":"Number of cards","card.cost":"Costs {cost} points","card.countHint":"Enter 1\u201350","card.exchangeButton":"Exchange","card.exchangeConfirm":"Spend {cost} points","card.exchanged":"Quota reset cards added: {n}","points.title":"Points","points.desc":"Use points to get quota reset cards","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy points","bg.title":"Background quota","bg.desc":"Used by Muse and automations, counted separately from your AI quota","bg.autoMain":"Continue with AI quota when used up","bg.autoMainDesc":"When off, Muse and automations pause once the background quota runs out","bg.convert":"Move from AI quota","bg.convertDesc":"Moves a share of your AI quota limit, valid for the current period","bg.convertConfirm":"Move {pct}%","bg.converted":"Moved {pct}% from your AI quota","invite.title":"Invites & codes","invite.desc":"Invite friends to join, or redeem a code you received","invite.myCode":"My invite code","invite.count":"{n} invited","invite.copyCode":"Copy code","invite.copyLink":"Copy invite link","invite.loadFailed":"Couldn't load your invite code","invite.claim":"Enter an invite code","invite.claimDesc":"Within 7 days of signing up, you can enter a friend's invite code","invite.claimPlaceholder":"Friend's invite code","invite.claimSubmit":"Submit","invite.claimed":"Invite code applied","redeem.title":"Redemption code","redeem.desc":"Redeem points, membership or other rewards","redeem.placeholder":"Enter a code","redeem.submit":"Redeem","redeem.success":"Redeemed","redeem.successWith":"Redeemed: {what}","redeem.gotPoints":"{n} points","redeem.gotMembership":"membership","sec.methods.title":"Sign-in methods","sec.methods.desc":"Your phone and email can be used to sign in and reset your password","sec.bind":"Link","sec.change":"Change","sec.phone":"Phone number","sec.email":"Email address","sec.newPhone":"New phone number","sec.newEmail":"New email address","sec.phonePlaceholder":"Mainland China numbers as is; others with +country code","sec.emailPlaceholder":"name@example.com","sec.code":"Verification code","sec.codePlaceholder":"Enter the code","sec.sendCode":"Send code","sec.resendIn":"Resend in {s}s","sec.codeSent":"Code sent","sec.bindSubmit":"Link","sec.phoneBound":"Phone linked","sec.emailBound":"Email linked","sec.devices.title":"Signed-in devices","sec.devices.desc":"If you think someone else is using your account, sign out on every device","sec.logoutAll":"Sign out everywhere","sec.logoutAllDesc":"Including this computer: every device has to sign in again","sec.logoutAllConfirm":"Confirm sign out everywhere","sec.logoutAllDone":"Signed out everywhere","pw.title":"Password","pw.desc":"{min}\u2013{max} characters, with a lowercase letter, an uppercase letter and a special character, and no spaces","pw.change":"Change password","pw.modeLabel":"How to change it","pw.mode.current":"With current password","pw.mode.code":"With a verification code","pw.current":"Current password","pw.currentRequired":"Enter your current password","pw.new":"New password","pw.confirm":"Confirm new password","pw.mismatch":"The new passwords don't match","pw.submit":"Change password","pw.submitReset":"Set new password","pw.changed":"Password updated","pw.noPasswordYet":"This account doesn't have a password yet. Set one with a verification code instead.","pw.codeNeedsContact":"Link a phone or email first to set a password with a verification code.","pw.via":"Send the code to","pw.codeTo":"The code goes to {target}","pw.rulesLabel":"Password rules","pw.req.length":"{min}\u2013{max} characters","pw.req.lower":"A lowercase letter","pw.req.upper":"An uppercase letter","pw.req.special":"A special character","pw.req.space":"No spaces","pw.rule.format":"Invalid password","pw.rule.min":"Password must be at least 8 characters","pw.rule.max":"Password can't be longer than 64 characters","pw.rule.space":"Password can't contain spaces","pw.rule.lower":"Password needs a lowercase letter","pw.rule.upper":"Password needs an uppercase letter","pw.rule.special":"Password needs a special character","del.title":"Delete account","del.desc":"Permanently delete your account and all its data. This can't be undone","del.start":"Delete account","del.warn":"Deleting your account removes your account, points, membership, cloud storage and all other data for good.","del.methodLabel":"Verify with","del.byCode":"Verification code","del.byPassword":"Password","del.codeLabel":"Code sent to {target}","del.passwordLabel":"Account password","del.submit":"Delete account","del.confirm":"Delete permanently","del.done":"Account deleted","usage.overview.title":"Overview","usage.overview.desc":"Requests and AI quota used in the selected period","usage.range":"Time range","usage.days":"{n} days","usage.requests":"Requests","usage.successRate":"Success rate","usage.consumption":"AI quota used","usage.ofToday":"Of your daily limit","usage.unlimitedNote":"Your AI quota is unlimited, so usage isn't shown as a percentage.","usage.noLimitNote":"Your daily limit is 0 or unavailable right now, so usage isn't shown as a percentage.","usage.byModel.title":"By model","usage.byModel.desc":"Requests and quota used per model","usage.byApp.title":"By app","usage.byApp.desc":"Requests and quota used per app","usage.col.model":"Model","usage.col.app":"App","usage.col.requests":"Requests","usage.col.consumption":"Quota used","usage.empty":"No usage in this period","usage.appUnknown":"Other","usage.recent.title":"Recent usage","usage.recent.desc":"Each call as a share of your daily limit","usage.recentEmpty":"No usage yet","usage.failed":"Failed","usage.shown":"Showing {shown} of {total}","fb.list.title":"My feedback","fb.list.desc":"Issues and suggestions you've sent; replies show up here","fb.new":"New feedback","fb.empty":"No feedback yet","fb.untitled":"Untitled feedback","fb.unread":"New reply","fb.shown":"Showing {n}","fb.submitted":"Sent. We'll reply as soon as we can","fb.descLabel":"Describe the issue or suggestion","fb.descPlaceholder":"What happened, and what did you expect?","fb.imagesHint":"Attach up to {n} screenshots (5 MB each). You can paste or drop them here.","fb.addImages":"Add screenshots","fb.removeImage":"Remove this image","fb.submit":"Send","fb.back":"Back to list","fb.you":"You","fb.support":"Forsion team","fb.attachment":"Attachment","fb.imagePreview":"View image","fb.closedNote":"This ticket is closed and can't take replies. Send new feedback for a new issue.","fb.replyPlaceholder":"Reply\u2026","fb.replySend":"Send reply","fb.replySent":"Reply sent","fb.status.open":"Open","fb.status.in_progress":"In progress","fb.status.resolved":"Resolved","fb.status.closed":"Closed","err.accountGone":"This account is signed out. Sign in again","err.adminCannotDelete":"Admin accounts can't be deleted here","err.avatarInvalid":"Couldn't read this image. Try another one","err.avatarTooLarge":"This image is too large. Try a smaller one","err.backgroundUnavailable":"Background quota is unavailable right now","err.captcha":"You need to finish a verification check in your browser","err.codeCooldown":"Too many codes requested. Try again shortly","err.codeInvalid":"The code is wrong or has expired","err.codeRequired":"Enter the verification code","err.codeSendFailed":"Couldn't send the code. Try again later","err.currentPasswordWrong":"Your current password is incorrect","err.deleteTargetInvalid":"Codes can only go to the phone or email linked to your account","err.deleteVerifyFailed":"Verification failed, so your account wasn't deleted","err.emailInUse":"This email is already used by another account","err.emailInvalid":"Enter a valid email address","err.featureDisabled":"This feature is turned off for now","err.feedbackEmpty":"Describe the issue or suggestion first","err.feedbackTooLong":"The description is too long (10,000 characters max)","err.generic":"That didn't work. Try again later","err.imageRead":"Couldn't read the image","err.imageTooLarge":"Each image must be 5 MB or less","err.imageType":"Only images can be added","err.insufficientMainQuota":"Your AI quota is used up, so there's nothing to move","err.insufficientPoints":"Not enough points","err.priceChanged":"The reset card price just changed. Check the new price, then confirm the exchange again.","err.invalidCount":"Choose between 1 and 50 cards","err.invalidInviteCode":"This invite code is invalid or has expired","err.inviteAlreadyUsed":"You've already used an invite code","err.inviteEmpty":"Enter an invite code","err.inviteOwnCode":"You can't use your own invite code","err.inviteWindowExpired":"The 7-day window after sign-up has passed","err.loginCodeExpired":"The sign-in code expired. Sign in again","err.loginInProgress":"A sign-in is already in progress","err.loginTimeout":"Sign-in timed out. Try again","err.loginUnsupported":"This cloud doesn't support desktop sign-in","err.network":"Network error. Check your connection and try again","err.noCloudUrl":"Set the cloud address under Connection first","err.noResetCard":"You have no quota reset cards","err.openFailed":"Couldn't open the browser","err.passwordRequired":"Enter your current and new password","err.phoneInUse":"This phone number is already used by another account","err.phoneInvalid":"Enter a valid phone number (with +country code outside mainland China)","err.redeemEmpty":"Enter a code","err.redeemExpired":"This code has expired","err.redeemInactive":"This code is no longer active","err.redeemNotFound":"This code doesn't exist","err.redeemUsedUp":"This code has been used up","err.redeemUserLimit":"You've already redeemed this code","err.replyEmpty":"Write a reply first","err.replyTooLong":"The reply is too long (10,000 characters max)","err.server":"Server error ({status}). Try again later","err.session":"You've been signed out. Sign in again","err.signedOut":"Sign in to Forsion first","err.targetInvalid":"Enter a valid phone number or email","err.ticketNotFound":"This feedback doesn't exist or was deleted","err.tooFrequent":"Too many attempts. Try again shortly","err.tooManyImages":"You can add up to 5 images","err.unavailable":"This version of the desktop app can't do that yet. Update Forsion"},ji={zh:xc,en:yc},Be=t=>t==="en"?"en":"zh";function Ur(t,e,n){let r=ji[t][e]??ji.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(o,i)=>i in n?String(n[i]):o):r}var Nn=t=>(e,n)=>Ur(t,e,n),$e=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var Vi=`
2
70
  .fx-acct { color: var(--text); }
3
71
  .fx-acct .fx-panel > .settings-panel-head:last-child { border-bottom-color: transparent; }
4
72
  .fx-acct .fx-panel > .fx-block + .fx-block,
@@ -176,4 +244,56 @@
176
244
  .fx-acct .fx-skel { animation: none; }
177
245
  .fx-acct .fx-bar > span { transition: none; }
178
246
  }
179
- `;function Xe(t){let e=String(t||"").trim();if(!e)return"";let n=e.startsWith("+")?4:3;return e.length<=n+4?`${e.slice(0,2)}***`:`${e.slice(0,n)}****${e.slice(-4)}`}function We(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let r=e.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${e.slice(n)}`}function mn(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var co=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pn(t,e){let n=String(t||"").trim(),r,a,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)r=Number(i[2]),a=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let c=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(c.find(u=>u.type==="month")?.value),a=Number(c.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:e==="zh"?`${r}\u6708${a}\u65E5`:`${co[r-1]} ${a}`}var pt=t=>t==="zh"?"zh-CN":"en-US";function gn(t){if(t==null||t==="")return null;let e=new Date(typeof t=="string"&&/^\d+$/.test(t)?Number(t):t);return Number.isNaN(e.getTime())?null:e}function hn(t,e){let n=gn(t);return n?new Intl.DateTimeFormat(pt(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function xe(t,e){let n=gn(t);return n?new Intl.DateTimeFormat(pt(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function W(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(pt(e),{maximumFractionDigits:2}).format(n):"\u2014"}var fe=class extends Error{};async function bn(t,e=256){if(t.size>20971520)throw new fe;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((m,f)=>{r.onload=()=>m(),r.onerror=()=>f(new Error("image decode failed")),r.src=n});let a=r.naturalWidth,i=r.naturalHeight;if(!a||!i)throw new Error("empty image");if(a*i>5e7)throw new fe;let s=Math.min(1,e/Math.max(a,i)),c=document.createElement("canvas");c.width=Math.max(1,Math.round(a*s)),c.height=Math.max(1,Math.round(i*s));let u=c.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height),u.drawImage(r,0,0,c.width,c.height);let d=c.toDataURL("image/jpeg",.85);if(d.length>262144)throw new fe;return d}finally{URL.revokeObjectURL(n)}}function vn(t){let e=String(t||"").trim();if(!e)return"?";let n=Array.from(e)[0];return/[㐀-鿿]/.test(n)?n:Array.from(e).slice(0,2).join("").toUpperCase()}var lo=0;function o(t,e,n,r,a,i){e||(e={});var s,c,u=e;if("ref"in u)for(c in u={},e)c=="ref"?s=e[c]:u[c]=e[c];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--lo,__i:-1,__u:0,__source:a,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(c in s)u[c]===void 0&&(u[c]=s[c]);return T.vnode&&T.vnode(d),d}var uo={user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 20c.8-3.5 4-5.5 8-5.5s7.2 2 8 5.5",gauge:"M4 16a8 8 0 1 1 16 0 M12 16l4-5 M12 16h.01",shield:"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3Z",chart:"M4 20V10 M10 20V4 M16 20v-7 M21 20H3",message:"M5 4h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-7l-5 4v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",card:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z M3 10h18 M7 15h4",coins:"M9 11a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z M15.5 9.2A5 5 0 1 1 9.8 16",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M12 7v5l3 2",gift:"M4 11h16v9H4z M3 7h18v4H3z M12 7v13 M12 7c-1.5-3-5-3-5-1s3 1 5 1c2 0 5 1 5-1s-3.5-2-5 1",key:"M8 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M11 11h10 M17 11v3 M20 11v2",laptop:"M5 5h14v10H5z M3 19h18",alert:"M12 4l9 16H3l9-16Z M12 10v4 M12 17h.01",external:"M14 4h6v6 M20 4l-9 9 M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",copy:"M9 9h11v11H9z M5 15H4V4h11v1",check:"M5 12.5l4.5 4.5L19 7.5",chevron:"M9 6l6 6-6 6",back:"M15 6l-6 6 6 6",pencil:"M4 20h4L19 9l-4-4L4 16v4Z M13.5 6.5l4 4",plus:"M12 5v14 M5 12h14",refresh:"M20 11a8 8 0 0 0-14.3-4.9L4 8 M4 4v4h4 M4 13a8 8 0 0 0 14.3 4.9L20 16 M20 20v-4h-4",phone:"M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M11 18h2",mail:"M4 6h16v12H4z M4 7l8 6 8-6",image:"M4 5h16v14H4z M4 16l5-5 4 4 3-3 4 4 M15.5 9.5h.01",x:"M6 6l12 12 M18 6L6 18",logout:"M15 4h4v16h-4 M10 8l-4 4 4 4 M6 12h10"};function I({name:t,size:e=14,class:n}){return o("svg",{class:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:uo[t]})})}function Ce({size:t=12}){return o("svg",{class:"spin",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:o("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var me=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(me||{}),fo=[0,1],yn=[1,0],_n=[2,3],wn=[3,2],mo={L:fo,M:yn,Q:_n,H:wn},po=/^\d*$/,go=/^[A-Z0-9 $%*+./:-]*$/,gt="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",xt=1,yt=40,xn=3,ho=3,Ve=40,bo=10,kn=[[-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]],Cn=[[-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]],ht=class{constructor(e,n,r,a){if(this.version=e,this.ecc=n,e<xt||e>yt)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let c=0;c<this.size;c++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a===-1){let c=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<c&&(a=u,c=d),this.applyMask(u)}}this.mask=a,this.applyMask(a),this.drawFormatBits(a)}size;mask;modules=[];types=[];getModule(e,n){return e>=0&&e<this.size&&n>=0&&n<this.size&&this.modules[n][e]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,me.Timing),this.setFunctionModule(r,6,r%2===0,me.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),n=e.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let i=0;i<10;i++)r=r<<1^(r>>>9)*1335;let a=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,ne(a,i));this.setFunctionModule(8,7,ne(a,6)),this.setFunctionModule(8,8,ne(a,7)),this.setFunctionModule(7,8,ne(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,ne(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,ne(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,ne(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let r=0;r<18;r++){let a=ne(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,a),this.setFunctionModule(s,i,a)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let i=Math.max(Math.abs(a),Math.abs(r)),s=e+a,c=n+r;s>=0&&s<this.size&&c>=0&&c<this.size&&this.setFunctionModule(s,c,i!==2&&i!==4,me.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,n+r,Math.max(Math.abs(a),Math.abs(r))!==1,me.Alignment)}setFunctionModule(e,n,r,a=me.Function){this.modules[n][e]=r,this.types[n][e]=a}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Je(n,r))throw new RangeError("Invalid argument");let a=Cn[r[0]][n],i=kn[r[0]][n],s=Math.floor(bt(n)/8),c=a-s%a,u=Math.floor(s/a),d=[],m=Ao(i);for(let l=0,g=0;l<a;l++){let h=e.slice(g,g+u-i+(l<c?0:1));g+=h.length;let x=Po(h,m);l<c&&h.push(0),d.push(h.concat(x))}let f=[];for(let l=0;l<d[0].length;l++)d.forEach((g,h)=>{(l!==u-i||h>=c)&&f.push(g[l])});return f}drawCodewords(e){if(e.length!==Math.floor(bt(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let a=0;a<this.size;a++)for(let i=0;i<2;i++){let s=r-i,u=(r+1&2)===0?this.size-1-a:a;!this.types[u][s]&&n<e.length*8&&(this.modules[u][s]=ne(e[n>>>3],7-(n&7)),n++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+n)%2===0;break;case 1:a=n%2===0;break;case 2:a=r%3===0;break;case 3:a=(r+n)%3===0;break;case 4:a=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:a=r*n%2+r*n%3===0;break;case 6:a=(r*n%2+r*n%3)%2===0;break;case 7:a=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&a&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let i=0;i<this.size;i++){let s=!1,c=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(c++,c===5?e+=xn:c>5&&e++):(this.finderPenaltyAddHistory(c,u),s||(e+=this.finderPenaltyCountPatterns(u)*Ve),s=this.modules[i][d],c=1);e+=this.finderPenaltyTerminateAndCount(s,c,u)*Ve}for(let i=0;i<this.size;i++){let s=!1,c=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(c++,c===5?e+=xn:c>5&&e++):(this.finderPenaltyAddHistory(c,u),s||(e+=this.finderPenaltyCountPatterns(u)*Ve),s=this.modules[d][i],c=1);e+=this.finderPenaltyTerminateAndCount(s,c,u)*Ve}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let c=this.modules[i][s];c===this.modules[i][s+1]&&c===this.modules[i+1][s]&&c===this.modules[i+1][s+1]&&(e+=ho)}let n=0;for(let i of this.modules)n=i.reduce((s,c)=>s+(c?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=a*bo,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let a=this.size-7;r.length<e;a-=n)r.splice(1,0,a);return r}}finderPenaltyCountPatterns(e){let n=e[1],r=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(r&&e[0]>=n*4&&e[6]>=n?1:0)+(r&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,r){return e&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function oe(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)n.push(t>>>r&1)}function ne(t,e){return(t>>>e&1)!==0}var Se=class{constructor(e,n,r){if(this.mode=e,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},vo=[1,10,12,14],xo=[2,9,11,13],yo=[4,8,16,16];function Sn(t,e){return t[Math.floor((e+7)/17)+1]}function An(t){let e=[];for(let n of t)oe(n,8,e);return new Se(yo,t.length,e)}function _o(t){if(!Pn(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let r=Math.min(t.length-n,3);oe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Se(vo,t.length,e)}function wo(t){if(!Mn(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let r=gt.indexOf(t.charAt(n))*45;r+=gt.indexOf(t.charAt(n+1)),oe(r,11,e)}return n<t.length&&oe(gt.indexOf(t.charAt(n)),6,e),new Se(xo,t.length,e)}function ko(t){return t===""?[]:Pn(t)?[_o(t)]:Mn(t)?[wo(t)]:[An(So(t))]}function Pn(t){return po.test(t)}function Mn(t){return go.test(t)}function Co(t,e){let n=0;for(let r of t){let a=Sn(r.mode,e);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function So(t){t=encodeURI(t);let e=[];for(let n=0;n<t.length;n++)t.charAt(n)!=="%"?e.push(t.charCodeAt(n)):(e.push(Number.parseInt(t.substring(n+1,n+3),16)),n+=2);return e}function bt(t){if(t<xt||t>yt)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;e-=(25*n-10)*n-55,t>=7&&(e-=36)}return e}function Je(t,e){return Math.floor(bt(t)/8)-kn[e[0]][t]*Cn[e[0]][t]}function Ao(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let r=0;r<t-1;r++)e.push(0);e.push(1);let n=1;for(let r=0;r<t;r++){for(let a=0;a<e.length;a++)e[a]=vt(e[a],n),a+1<e.length&&(e[a]^=e[a+1]);n=vt(n,2)}return e}function Po(t,e){let n=e.map(r=>0);for(let r of t){let a=r^n.shift();n.push(0),e.forEach((i,s)=>n[s]^=vt(i,a))}return n}function vt(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(e>>>r&1)*t;return n}function Mo(t,e,n=1,r=40,a=-1,i=!0){if(!(xt<=n&&n<=r&&r<=yt)||a<-1||a>7)throw new RangeError("Invalid value");let s,c;for(s=n;;s++){let f=Je(s,e)*8,l=Co(t,s);if(l<=f){c=l;break}if(s>=r)throw new RangeError("Data too long")}for(let f of[yn,_n,wn])i&&c<=Je(s,f)*8&&(e=f);let u=[];for(let f of t){oe(f.mode[0],4,u),oe(f.numChars,Sn(f.mode,s),u);for(let l of f.getData())u.push(l)}let d=Je(s,e)*8;oe(0,Math.min(4,d-u.length),u),oe(0,(8-u.length%8)%8,u);for(let f=236;u.length<d;f^=253)oe(f,8,u);let m=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((f,l)=>m[l>>>3]|=f<<7-(l&7)),new ht(s,e,m,a)}function En(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:i=40,maskPattern:s=-1,border:c=1}=e||{},u=typeof t=="string"?ko(t):Array.isArray(t)?[An(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Mo(u,mo[n],a,i,s,r),m=Eo({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},c);return e?.invert&&(m.data=m.data.map(f=>f.map(l=>!l))),e?.onEncoded?.(m),m}function Eo(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(i=>{for(let s=0;s<e;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<e;i++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let a=me.Border;t.types.forEach(i=>{for(let s=0;s<e;s++)i.unshift(a),i.push(a)});for(let i=0;i<e;i++)t.types.unshift(Array.from({length:r},s=>a)),t.types.push(Array.from({length:r},s=>a));return t}function B(t){return o("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[o("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&o("span",{class:"settings-panel-icon",children:o(I,{name:t.icon,size:16})}),o("div",{children:[o("strong",{children:t.title}),t.desc&&o("p",{children:t.desc})]}),t.actions&&o("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function V(t){return o("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[o("div",{class:"settings-control-copy",children:o("span",{children:[o("strong",{children:t.label}),t.desc&&o("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&o("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function U(t){return o("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function _t(t){return o("button",{type:"button",role:"switch","aria-checked":t.checked,"aria-label":t.label,class:`settings-switch${t.checked?" active":""}`,disabled:t.disabled,onClick:()=>t.onChange(!t.checked),children:o("span",{})})}function S(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return o("button",{type:t.submit?"submit":"button",class:n,disabled:t.disabled||t.pending,"aria-busy":t.pending||void 0,"aria-label":t.label,title:t.title,"data-armed":t.armed?"true":void 0,onClick:t.onClick,children:[t.pending&&o(Ce,{}),t.children]})}var To=5e3;function pe(t){let[e,n]=v(!1),r=$(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};N(()=>()=>{r.current&&clearTimeout(r.current)},[]),N(()=>{(t.pending||t.disabled)&&a()},[t.pending,t.disabled]);let i=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},To);return}a(),t.onConfirm()},s=t.variant??"ghost";return o(S,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:i,children:e?t.confirmLabel:t.label})}function M(t){let e=ce(),{a:n}=t;return n.error?o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(n.error,e)}),n.captcha&&o("button",{type:"button",class:"fx-link",onClick:()=>void $e(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",o(I,{name:"external",size:12})]})]}):n.success?o("div",{class:"fx-msg is-ok",role:"status",children:te(n.success,e)}):null}function J(t){return o("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function ue(t){return o("div",{class:"settings-empty-row fx-block",children:t.children})}function Ae(t){let e=ce(),n=t.display;return o("div",{class:`fx-quota${n.low?" is-low":""}`,children:[o("div",{class:"fx-quota-top",children:[o("span",{class:"fx-quota-label",children:t.label}),o("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),o("div",{class:"fx-bar",role:"progressbar","aria-label":t.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?e("common.unlimited"):n.text,children:o("span",{style:{width:`${n.pct}%`}})}),t.note&&o("div",{class:"fx-quota-note",children:t.note})]})}function ge(t){return o("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>o("button",{type:"button",role:"radio","aria-checked":e.value===t.value,class:e.value===t.value?"active":"",onClick:()=>{e.value!==t.value&&t.onChange(e.value)},children:e.label}))})}async function Io(t){try{return await navigator.clipboard.writeText(t),!0}catch{try{let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");return e.remove(),n}catch{return!1}}}function Ke(t){let e=ce(),[n,r]=v("idle"),a=$(null);N(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=async()=>{let s=await Io(t.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return o(S,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[o(I,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function Ro(t){let e=ve(()=>{try{return En(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((a,i)=>a.forEach((s,c)=>{s&&(n+=`M${c} ${i}h1v1h-1z`)}));let r=t.size??148;return o("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[o("rect",{width:e.size,height:e.size,fill:"#fff"}),o("path",{d:n,fill:"#000"})]})}function wt(t){let e=ce(),{device:n}=t;return o("div",{class:"fx-device",children:[o(Ro,{value:n.url,label:e("signin.qrLabel")}),o("div",{class:"fx-device-copy",children:[o("p",{children:e("signin.deviceHint")}),n.userCode&&o("div",{class:"fx-device-code",children:[o("span",{children:e("signin.code")}),o("code",{children:n.userCode})]}),o("div",{class:"fx-inline",children:[o("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",o(I,{name:"external",size:12})]}),o(Ke,{text:n.url,label:e("signin.copyLink")})]})]})]})}function G(){let t=ce(),e=P(),[n,r]=v(null);N(()=>L().onAuthDevice?.(i=>r(i)),[]);let a=()=>void e.run(async()=>{let i=L().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let c=ke(se(s));return c?{error:c}:void 0}});return o("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:o("div",{class:"settings-state fx-signin-body",children:[o("span",{class:"settings-state-icon",children:o(I,{name:"user",size:18})}),o("p",{class:"fx-signin-lead",children:t("signin.desc")}),o("div",{class:"settings-state-actions",children:o(S,{variant:"primary",pending:e.pending,onClick:a,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&o(wt,{device:n}),o(M,{a:e})]})})}function j(t){let e=ce(),n=t.panels??2,r=t.rows??2;return o("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(a,i)=>o("section",{class:"settings-panel fx-panel",children:[o("div",{class:"settings-panel-head",children:[o("span",{class:"fx-skel fx-skel--icon"}),o("div",{children:[o("span",{class:"fx-skel fx-skel--title"}),o("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,c)=>o("div",{class:"settings-control-row",children:o("span",{class:"fx-skel fx-skel--row"})},c))]},i))})}function Y(t){let e=ce();return o("section",{class:"settings-panel fx-panel",children:o("div",{class:"settings-state fx-error-state",role:"alert",children:[o("span",{class:"settings-state-icon",children:o(I,{name:"alert",size:18})}),o("strong",{children:e("common.loadFailed")}),o("p",{children:te(t.error,e)}),o("div",{class:"settings-state-actions",children:o(S,{variant:"primary",onClick:t.onRetry,children:[o(I,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}function In(){let t=Q(async()=>{let[n,r,a]=await Promise.all([k("/auth/me"),k("/membership/my"),k("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:r.ok?r.data?.membership??null:null,membershipFailed:!r.ok,features:a.ok&&a.data&&typeof a.data=="object"?a.data:{}}}:n});if(t.state==="loading")return o(j,{panels:3});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let{data:e}=t;return o(R,{children:[o(Lo,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),o(Do,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),o(Fo,{}),o(No,{})]})}function Lo(t){let{t:e}=A(),{me:n}=t,r=P(),a=P(),[i,s]=v(!1),[c,u]=v(""),d=$(null),m=n.nickname||n.username,f=h=>{h&&r.run(async()=>{let x;try{x=await bn(h)}catch(_){return{error:{key:_ instanceof fe?"err.avatarTooLarge":"err.avatarInvalid"}}}let w=await k("/settings",{method:"PUT",body:{avatar:x}});return w.ok?(t.onPatch({avatar:x}),{success:{key:"account.avatar.saved"}}):{error:K(w)}})},l=()=>{a.clear(),u(m||""),s(!0)},g=()=>{let h=c.trim();if(!h||h===m){s(!1);return}a.run(async()=>{let x=await k("/settings",{method:"PUT",body:{nickname:h}});return x.ok?(t.onPatch({nickname:h}),s(!1),{success:{key:"account.nickname.saved"}}):{error:K(x)}})};return o(B,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[o("div",{class:"fx-identity fx-block",children:[o("button",{type:"button",class:"fx-avatar",disabled:r.pending,onClick:()=>d.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?o("img",{src:n.avatar,alt:""}):o("span",{class:"fx-avatar-initial",children:vn(m)}),o("span",{class:"fx-avatar-mask",children:r.pending?o(Ce,{size:14}):o(I,{name:"pencil",size:14})})]}),o("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:h=>{let x=h.currentTarget;f(x.files?.[0]),x.value=""}}),o("div",{class:"fx-identity-main",children:[i?o("form",{class:"fx-inline",onSubmit:h=>{h.preventDefault(),g()},children:[o("input",{class:"fx-input fx-input--name",value:c,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:h=>u(h.currentTarget.value),onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),s(!1))}}),o(S,{variant:"primary",submit:!0,pending:a.pending,children:e("common.save")}),o(S,{disabled:a.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):o("div",{class:"fx-name-row",children:[o("span",{class:"fx-name",children:m}),o("button",{type:"button",class:"fx-icon-btn",onClick:l,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:o(I,{name:"pencil",size:13})}),n.role==="ADMIN"&&o("span",{class:"fx-tag",children:e("account.role.admin")})]}),o("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),o(M,{a}),o(M,{a:r})]})]}),o(Tn,{kind:"phone",value:n.phone}),o(Tn,{kind:"email",value:n.email})]})}function Tn(t){let{t:e,goTo:n}=A(),r=!!t.value,a=r?t.kind==="phone"?Xe(t.value):We(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return o(V,{label:i,children:n?o("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[o("span",{children:a}),o(I,{name:"chevron",size:12})]}):o("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function Do(t){let{t:e,locale:n}=A(),r=P(),a=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=mn(a?.tier),s=i==="Free",c=s?"free":i.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await He("membership")?void 0:{error:{key:"err.openFailed"}});return o(B,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?o(S,{variant:"primary",pending:r.pending,onClick:u,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&o("div",{class:"fx-member fx-block",children:[o("span",{class:`fx-tier fx-tier--${c}`,children:i}),o("div",{class:"fx-member-copy",children:[o("strong",{children:s?e("member.freeName"):a?.plan?.name||i}),o("span",{class:"fx-muted",children:s?e("member.freeHint"):a?.expiresAt?e("member.expires",{date:hn(a.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&o("div",{class:"fx-sub",children:o(J,{tone:"warn",children:[e("member.loadFailed")," ",o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(M,{a:r})})]})}function Fo(){let{t}=A(),e=le(),[n,r]=v(null),[a,i]=v(!1),[s,c]=v(null),[u,d]=v(null),m=P(),f=P(),l=P(),g=!!L().authAccounts;N(()=>{let p=0,b=()=>{let E=L().authAccounts;if(!E)return;let F=++p;i(!1),E().then(O=>{F===p&&r(Array.isArray(O)?O:[])}).catch(()=>{F===p&&i(!0)})};b();let y=L().onAuthChanged?.(b),C=L().onAuthDevice?.(E=>d(E));return()=>{p++,y?.(),C?.()}},[]);let h=p=>{c(p),m.run(async()=>{let b=L().forsionSwitchAccount;if(!b)return{error:{key:"err.unavailable"}};try{await b(p)}catch(y){let C=ke(se(y));return C?{error:C}:void 0}finally{e.current&&c(null)}})},x=()=>void f.run(async()=>{let p=L().forsionLogin;if(!p)return{error:{key:"err.unavailable"}};d(null);try{await p()}catch(b){e.current&&d(null);let y=ke(se(b));return y?{error:y}:void 0}}),w=()=>void l.run(async()=>{let p=L().forsionLogout;if(!p)return{error:{key:"err.unavailable"}};try{await p()}catch(b){return{error:{raw:se(b)||t("err.generic")}}}}),_=m.pending||f.pending||l.pending;return o(B,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!a&&o(ue,{children:[o(Ce,{})," ",t("common.loading")]}),a&&o("div",{class:"fx-sub",children:o(J,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&o(ue,{children:t("local.empty")}),n&&n.length>0&&o("div",{class:"fx-list fx-block",role:"list",children:n.map(p=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-icon",children:o(I,{name:"user",size:14})}),o("span",{class:"fx-list-main",children:[o("strong",{children:p.nickname||p.username||"Forsion"}),o("small",{children:[p.username&&p.nickname?p.username:null,qo(p.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),p.active?o("span",{class:"fx-tag fx-tag--accent",children:[o(I,{name:"check",size:11})," ",t("local.current")]}):o(S,{pending:s===p.id,disabled:_&&s!==p.id,onClick:()=>h(p.id),children:t("local.switch")})]},p.id))}),f.pending&&u&&o("div",{class:"fx-sub",children:o(wt,{device:u})}),o("div",{class:"settings-panel-footer fx-footer",children:[o(S,{pending:f.pending,disabled:_&&!f.pending,onClick:x,children:[o(I,{name:"plus",size:12})," ",f.pending?t("signin.pending"):t("local.add")]}),o(S,{pending:l.pending,disabled:_&&!l.pending,onClick:w,children:[o(I,{name:"logout",size:12})," ",t("local.signOut")]})]}),(m.error||f.error||l.error)&&o("div",{class:"fx-sub fx-sub--tight",children:[o(M,{a:m}),o(M,{a:f}),o(M,{a:l})]})]})}function qo(t){try{return new URL(t).host}catch{return t}}function No(){let{t}=A(),e=P();return o("div",{class:"fx-page-foot",children:[o("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await $e()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",o(I,{name:"external",size:12})]}),o("span",{class:"fx-muted",children:t("account.web.desc")}),o(M,{a:e})]})}function D(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function Bo(t,e){let n=D(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,D(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var zo=15;function he(t,e){let n=Bo(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,D(t)??0),a=n===0&&r>0&&(D(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=zo}}function je(t,e){let n=D(e);if(n===null||n<=0)return null;let r=D(t);if(r===null)return null;let a=Math.max(0,r);if(a===0)return"0%";let i=a/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var Uo=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Rn(){let t=Q(async()=>{let[s,c,u,d]=await Promise.all([k("/token-quota/my"),k("/credits/balance"),k("/features"),k("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:c.ok?D(c.data?.balance):null,balanceFailed:!c.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:Uo(d)}}:s});if(t.state==="loading")return o(j,{panels:3,rows:2});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,a=e.features.redemption_codes!==!1,i=e.features.payment!==!1;return o(R,{children:[o(Oo,{data:e,update:n,onFailed:t.reload}),o(Ho,{data:e,update:n,payment:i,onRetry:t.reload}),r?.modelId?o(Xo,{bg:r,update:n}):null,(e.inviteState!=="hidden"||a)&&o(Wo,{data:e,update:n,redeemEnabled:a,onRedeemed:t.reload})]})}function Oo(t){let{t:e,locale:n}=A(),r=t.data.quota,a=he(r.dailyRemaining,r.dailyLimit),i=he(r.weeklyRemaining,r.weeklyLimit),s=pn(r.weeklyResetAt,n),c=Math.max(0,D(r.resetCards)??0),u=D(r.resetCardPricePoints)??100,d=P(),m=P(),[f,l]=v(null),[g,h]=v("1"),x=/^\d+$/.test(g.trim())?Number(g.trim()):NaN,w=Number.isInteger(x)&&x>=1&&x<=50,_=w?x*u:null,p=t.data.balance,b=_!==null&&p!==null&&p<_,y=()=>void d.run(async()=>{let F={daily:a,weekly:i};l(null);let O=L(),re=await Ue(O.accountUseResetCard?()=>O.accountUseResetCard("both"):null,()=>k("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!re.ok)return t.onFailed(),X(re);let H=re.data?.quota,Z=D(re.data?.resetCards);return t.update(Ge=>({...Ge,quota:{...Ge.quota,...H??{},resetCards:Z??Ge.quota.resetCards}})),H&&l({before:F,after:{daily:he(H.dailyRemaining,H.dailyLimit),weekly:he(H.weeklyRemaining,H.weeklyLimit)},cards:Z}),{success:{key:"card.used"}}}),C=()=>void m.run(async()=>{if(!w)return{error:{key:"err.invalidCount"}};let F=await k("/points/exchange-reset-cards",{method:"POST",body:{count:x,expectedPricePerCard:u}});return F.ok?(t.update(O=>({...O,quota:{...O.quota,resetCards:D(F.data?.resetCards)??O.quota.resetCards},balance:D(F.data?.newPointsBalance)??O.balance})),h("1"),{success:{key:"card.exchanged",vars:{n:D(F.data?.cardsGranted)??x}}}):(t.onFailed(),X(F))}),E=F=>F.unlimited?e("common.unlimited"):F.text;return o(B,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Ae,{label:e("common.today"),display:a,note:a.unlimited?null:e("quota.resetDaily")}),o(Ae,{label:e("common.thisWeek"),display:i,note:i.unlimited||!s?null:e("quota.resetWeekly",{date:s})})]}),o(V,{label:e("card.title"),desc:e("card.desc"),children:[o("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:c})}),o(pe,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:d.pending,disabled:c<=0,onConfirm:y})]}),c<=0&&!d.success&&o(U,{children:o(J,{children:e("card.noneHint")})}),(d.error||d.success)&&o(U,{children:[o(M,{a:d}),d.success&&f&&o("div",{class:"fx-ceremony",role:"status",children:[o("span",{children:[e("common.today")," ",o("b",{children:E(f.before.daily)})," \u2192 ",o("b",{children:E(f.after.daily)})]}),o("span",{children:[e("common.thisWeek")," ",o("b",{children:E(f.before.weekly)})," \u2192 ",o("b",{children:E(f.after.weekly)})]}),f.cards!==null&&o("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),o(V,{label:e("card.exchange"),desc:e("card.price",{price:W(u,n)}),class:"fx-row--wide",children:[o("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:g,"aria-label":e("card.count"),onInput:F=>{h(F.currentTarget.value),m.clear()}}),o("span",{class:"fx-muted fx-cost",children:_!==null?e("card.cost",{cost:W(_,n)}):e("card.countHint")}),o(pe,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:_!==null?W(_,n):"\u2014"}),pending:m.pending,disabled:!w||b,onConfirm:C})]}),(b||m.error||m.success)&&o(U,{children:[b&&!m.error&&o(J,{tone:"warn",children:e("err.insufficientPoints")}),o(M,{a:m})]})]})}function Ln(t,e,n){let r=P(),[a,i]=v(null);return{checked:a??t,toggle:c=>{i(c),r.run(async()=>{let u=await e(c);if(i(null),!u.ok)return X(u);n(c)})},action:r}}function Ho(t){let{t:e,locale:n}=A(),r=P(),a=Ln(!!t.data.quota.pointsAutoDeduct,s=>k("/token-quota/auto-deduct",{method:"POST",body:{enabled:s}}),s=>t.update(c=>({...c,quota:{...c.quota,pointsAutoDeduct:s}}))),i=()=>void r.run(async()=>await He("credits")?void 0:{error:{key:"err.openFailed"}});return o(B,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?o(S,{variant:"primary",pending:r.pending,onClick:i,children:e("points.recharge")}):void 0,children:[o(V,{label:e("points.balance"),children:t.data.balance!==null?o("span",{class:"fx-big","data-testid":"points-balance",children:W(t.data.balance,n)}):o("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),o(V,{label:e("points.autoDeduct"),desc:e("points.autoDeductDesc"),children:o(_t,{checked:a.checked,disabled:a.action.pending,label:e("points.autoDeduct"),onChange:a.toggle})}),(a.action.error||r.error)&&o(U,{children:[o(M,{a:a.action}),o(M,{a:r})]})]})}var $o=[5,10,20];function Xo(t){let{t:e}=A(),{bg:n}=t,r=he(n.dailyRemaining,n.dailyLimit),a=he(n.weeklyRemaining,n.weeklyLimit),i=P(),[s,c]=v(null),u=Ln(!!n.autoMain,m=>{let f=L();return Ue(f.accountBgAutoMain?()=>f.accountBgAutoMain(m):null,()=>k("/token-quota/background/auto-main",{method:"POST",body:{enabled:m}}))},m=>t.update(f=>({...f,quota:{...f.quota,background:{...f.quota.background??{},autoMain:m}}}))),d=m=>{c(m),i.run(async()=>{let f=L(),l=await Ue(f.accountBgConvert?()=>f.accountBgConvert(m):null,()=>k("/token-quota/background/convert",{method:"POST",body:{percent:m}}));if(c(null),!l.ok)return X(l);let g=l.data?.quota;return g&&t.update(x=>({...x,quota:{...x.quota,...g,resetCards:x.quota.resetCards,resetCardPricePoints:x.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:m}}}})};return o(B,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[o("div",{class:"fx-quota-list fx-block",children:[o(Ae,{label:e("common.today"),display:r}),o(Ae,{label:e("common.thisWeek"),display:a})]}),o(V,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:o(_t,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),o(V,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:$o.map(m=>o(pe,{label:`${m}%`,confirmLabel:e("bg.convertConfirm",{pct:m}),pending:i.pending&&s===m,disabled:i.pending&&s!==m,onConfirm:()=>d(m)},m))}),(i.error||i.success||u.action.error)&&o(U,{children:[o(M,{a:u.action}),o(M,{a:i})]})]})}function Wo(t){let{t:e,locale:n}=A(),{invite:r,inviteState:a}=t.data,[i,s]=v(null),[c,u]=v(""),[d,m]=v(""),f=P(),l=P(),g=P();N(()=>{let p=!0;return L().authStatus?.().then(b=>{p&&s(b?.cloudUrl?b.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{p=!1}},[]);let h=async()=>{let p=await k("/invite/my-code");return t.update(b=>({...b,invite:p.ok?p.data:b.invite,inviteState:p.ok?"ok":p.status===404?"hidden":b.inviteState})),p},x=()=>void f.run(async()=>{let p=c.trim();if(!p)return{error:{key:"err.inviteEmpty"}};let b=await k("/invite/claim",{method:"POST",body:{code:p}});return b.ok?(u(""),h(),{success:{key:"invite.claimed"}}):X(b)}),w=()=>void l.run(async()=>{let p=d.trim();if(!p)return{error:{key:"err.redeemEmpty"}};let b=await k("/redemption/redeem",{method:"POST",body:{code:p}});if(!b.ok)return X(b);m(""),t.onRedeemed();let y=[],C=D(b.data?.creditsAmount);C&&y.push(e("redeem.gotPoints",{n:W(C,n)})),b.data?.membershipPlanId&&y.push(e("redeem.gotMembership"));for(let E of Array.isArray(b.data?.items)?b.data.items:[]){let F=(n==="zh"?E?.label?.zh:E?.label?.en)||E?.label?.zh||E?.label?.en||E?.kind;F&&y.push(F)}return{success:y.length?{key:"redeem.successWith",vars:{what:y.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),_=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return o(B,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[a==="ok"&&r?.code&&o(V,{label:e("invite.myCode"),desc:e("invite.count",{n:W(D(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[o("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),o(Ke,{text:r.code,label:e("invite.copyCode")}),o(Ke,{text:_,label:e("invite.copyLink"),disabled:!_})]}),a==="failed"&&o(U,{children:o(J,{tone:"warn",children:[e("invite.loadFailed")," ",o("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await h()}),children:e("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&o(V,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:p=>{p.preventDefault(),x()},children:[o("input",{class:"fx-input",value:c,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:p=>u(p.currentTarget.value)}),o(S,{submit:!0,pending:f.pending,children:e("invite.claimSubmit")})]})}),(f.error||f.success)&&o(U,{children:o(M,{a:f})}),t.redeemEnabled&&o(V,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:o("form",{class:"fx-inline",onSubmit:p=>{p.preventDefault(),w()},children:[o("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:p=>m(p.currentTarget.value)}),o(S,{submit:!0,pending:l.pending,children:e("redeem.submit")})]})}),(l.error||l.success)&&o(U,{children:o(M,{a:l})})]})}var Vo=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,Jo=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Dn=(t,e)=>t==="phone"?Vo.test(e):Jo.test(e),Pe=(t,e)=>t==="phone"?Xe(e):We(e);function qn(){let t=Q(()=>k("/auth/me"));if(t.state==="loading")return o(j,{panels:3,rows:2});if(t.state==="signedOut")return o(G,{});if(t.state==="error")return o(Y,{error:t.error,onRetry:t.retry});let e=t.data;return o(R,{children:[o(Ko,{me:e,onBound:(n,r)=>t.update(a=>({...a,[n]:r}))}),o(Qo,{me:e}),o(er,{}),o(tr,{me:e})]})}function Ct(){let t=dn(),e=P();return{cd:t,a:e,send:(a,i,s)=>e.run(async()=>{let c=await k("/auth/send-code",{method:"POST",body:{target:a,type:i,purpose:s}});return c.ok?(t.start(60),{success:{key:"sec.codeSent"}}):X(c)}),reset:()=>{t.stop(),e.clear()}}}function Ko(t){let{t:e}=A(),[n,r]=v(null),[a,i]=v(null);return o(B,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let c=t.me[s];return o(R,{children:[o(V,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:c?Pe(s,c):e("account.contact.unbound"),children:o(S,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":c?"sec.change":"sec.bind")})}),n===s&&o(jo,{kind:s,current:c??null,onDone:u=>{t.onBound(s,u),r(null),i(s)}}),a===s&&n!==s&&o(U,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function jo(t){let{t:e}=A(),{kind:n}=t,[r,a]=v(""),[i,s]=v(""),c=Ct(),u=P(),d=r.trim(),m=n==="phone"?"err.phoneInvalid":"err.emailInvalid",f=()=>{if(!Dn(n,d)){c.a.run(async()=>({error:{key:m}}));return}c.send(d,n,"bind")},l=()=>void u.run(async()=>{if(!Dn(n,d))return{error:{key:m}};if(!i.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},h=await k(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!h.ok)return X(h);t.onDone(d)});return o(U,{class:"fx-form",children:[o("label",{class:"fx-field",children:[o("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),o("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>a(g.currentTarget.value)})]}),o(St,{code:i,setCode:s,sender:c,onSend:f}),o("div",{class:"fx-inline",children:o(S,{variant:"primary",pending:u.pending,onClick:l,children:e("sec.bindSubmit")})}),o(M,{a:u})]})}function St(t){let{t:e}=A(),{cd:n,a:r}=t.sender;return o("div",{class:"fx-field",children:[o("span",{children:t.label??e("sec.code")}),o("div",{class:"fx-inline",children:[o("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:t.code,placeholder:e("sec.codePlaceholder"),"aria-label":t.label??e("sec.code"),onInput:a=>t.setCode(a.currentTarget.value)}),o(S,{pending:r.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),o(M,{a:r})]})}function Yo(t){let{t:e}=A(),n=an(t.value),r=t.value.length>0,a=[[n.length,e("pw.req.length",{min:8,max:64})],[n.lower,e("pw.req.lower")],[n.upper,e("pw.req.upper")],[n.special,e("pw.req.special")],[n.space,e("pw.req.space")]];return o("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:a.map(([i,s])=>o("li",{class:i?"is-ok":r?"is-bad":"",children:[i?o(I,{name:"check",size:11}):r?o(I,{name:"x",size:11}):o("span",{class:"fx-rule-dot","aria-hidden":"true"}),o("span",{children:s})]},s))})}function Nn(t,e){let n=rn(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:ft[n.rule]}}}function Qo(t){let{t:e}=A(),n=["phone","email"].filter(c=>!!t.me[c]),[r,a]=v("current"),[i,s]=v(!1);return o(B,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:o(S,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&o(U,{class:"fx-form",children:[o(ge,{label:e("pw.modeLabel"),value:r,onChange:a,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?o(Go,{onDone:()=>s(!1)}):n.length?o(Zo,{me:t.me,targets:n,onDone:()=>s(!1)}):o(J,{children:e("pw.codeNeedsContact")})]})})}function Bn(t){let{t:e}=A();return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:e("pw.new")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),o(Yo,{value:t.pw}),o("label",{class:"fx-field",children:[o("span",{children:e("pw.confirm")}),o("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function Go(t){let{t:e}=A(),[n,r]=v(""),[a,i]=v(""),[s,c]=v(""),u=P(),[d,m]=v(!1),f=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let l=Nn(a,s);if(l)return l;let g=await k("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return g.ok?(r(""),i(""),c(""),m(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:X(g)});return o(R,{children:[o("label",{class:"fx-field",children:[o("span",{children:e("pw.current")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:l=>r(l.currentTarget.value)})]}),o(Bn,{pw:a,setPw:i,confirm:s,setConfirm:c}),o("div",{class:"fx-inline",children:[o(S,{variant:"primary",pending:u.pending,onClick:f,children:e("pw.submit")}),d&&o(S,{onClick:t.onDone,children:e("common.done")})]}),o(M,{a:u})]})}function Zo(t){let{t:e}=A(),[n,r]=v(t.targets[0]),[a,i]=v(""),[s,c]=v(""),[u,d]=v(""),m=Ct(),f=P(),[l,g]=v(!1),h=t.me[n]||"",x=()=>void f.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let w=Nn(s,u);if(w)return w;let _=n==="phone"?{phone:h,code:a.trim(),newPassword:s}:{email:h,code:a.trim(),newPassword:s},p=await k("/auth/reset-password",{method:"POST",body:_});return p.ok?(i(""),c(""),d(""),g(!0),{success:{key:"pw.changed"}}):X(p)});return o(R,{children:[t.targets.length>1?o(ge,{label:e("pw.via"),value:n,onChange:w=>{r(w),i(""),m.reset()},options:t.targets.map(w=>({value:w,label:Pe(w,t.me[w])}))}):o(J,{children:e("pw.codeTo",{target:Pe(n,h)})}),o(St,{code:a,setCode:i,sender:m,onSend:()=>void m.send(h,n,"reset_password")}),o(Bn,{pw:s,setPw:c,confirm:u,setConfirm:d}),o("div",{class:"fx-inline",children:[o(S,{variant:"primary",pending:f.pending,onClick:x,children:e("pw.submitReset")}),l&&o(S,{onClick:t.onDone,children:e("common.done")})]}),o(M,{a:f})]})}function er(){let{t}=A(),e=P(),n=()=>void e.run(async()=>{let r=await k("/auth/logout-all",{method:"POST"});if(!r.ok)return X(r);try{await L().forsionLogout?.()}catch(a){return{error:{raw:se(a)}}}return{success:{key:"sec.logoutAllDone"}}});return o(B,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[o(V,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:o(pe,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&o(U,{children:o(M,{a:e})})]})}function tr(t){let{t:e}=A(),n=["phone","email"].filter(_=>!!t.me[_]),[r,a]=v(!1),[i,s]=v(n.length?"code":"password"),[c,u]=v(n[0]??null),[d,m]=v(""),[f,l]=v(""),g=Ct(),h=P(),x=c&&t.me[c]||"",w=()=>void h.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!f)return{error:{key:"pw.currentRequired"}};let _=await k("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:f}});if(!_.ok)return X(_);try{await L().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return o(B,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:o(S,{variant:"danger",onClick:()=>{a(!r),h.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&o(U,{class:"fx-form",children:[o(J,{tone:"error",children:e("del.warn")}),n.length>0&&o(ge,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&c?o(R,{children:[n.length>1&&o(ge,{label:e("pw.via"),value:c,onChange:_=>{u(_),m(""),g.reset()},options:n.map(_=>({value:_,label:Pe(_,t.me[_])}))}),o(St,{code:d,setCode:m,sender:g,label:e("del.codeLabel",{target:Pe(c,x)}),onSend:()=>void g.send(x,c,"delete_account")})]}):o("label",{class:"fx-field",children:[o("span",{children:e("del.passwordLabel")}),o("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:f,onInput:_=>l(_.currentTarget.value)})]}),o("div",{class:"fx-inline",children:o(pe,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:h.pending,onConfirm:w})}),o(M,{a:h})]})})}var Un=20;function On(){let t=Q(async()=>{let[e,n]=await Promise.all([k("/token-quota/my"),k(`/token-quota/my/logs?limit=${Un}&offset=0`)]);if(!e.ok)return e;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:D(e.data?.dailyLimit),logs:r,total:n.ok?D(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?o(j,{panels:3,rows:2}):t.state==="signedOut"?o(G,{}):t.state==="error"?o(Y,{error:t.error,onRetry:t.retry}):o(R,{children:[o(nr,{dailyLimit:t.data.dailyLimit}),o(rr,{base:t.data,onRetry:t.reload})]})}function nr(t){let{t:e,locale:n}=A(),[r,a]=v(30),[i,s]=v({state:"loading"}),[c,u]=v(!1),[d,m]=v(0),f=$(0);N(()=>{let b=++f.current;return u(!0),k(`/usage/stats?days=${r}`).then(y=>{b===f.current&&(u(!1),s(y.ok?{state:"ready",data:y.data??{}}:{state:"error",fail:y}))}),()=>{f.current++}},[r,d]);let l=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":je(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=b=>je(b,t.dailyLimit)??"\u2014",h=o(ge,{label:e("usage.range"),value:r,onChange:a,options:[{value:7,label:e("usage.days",{n:7})},{value:30,label:e("usage.days",{n:30})},{value:90,label:e("usage.days",{n:90})}]}),x=i.state==="ready"?i.data:null,w=(x?.byModel??[]).filter(Boolean),_=(x?.byProject??[]).filter(Boolean),p=D(x?.successRate);return o(R,{children:[o(B,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:h,children:[i.state==="error"?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(K(i.fail),e)}),o("button",{type:"button",class:"fx-link",onClick:()=>m(b=>b+1),children:e("common.retry")})]})}):o("div",{class:`fx-stats fx-block${c&&x?" is-refreshing":""}`,"aria-busy":c||void 0,children:[o(At,{label:e("usage.requests"),value:x?W(D(x.totalRequests)??0,n):null,testId:"usage-requests"}),o(At,{label:e("usage.successRate"),value:x?p===null?"\u2014":`${p.toFixed(1)}%`:null}),o(At,{label:e("usage.consumption"),value:x?g(x.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),l&&o("div",{class:"fx-sub fx-sub--tight",children:o(J,{children:e(l)})})]}),i.state!=="error"&&o(R,{children:[o(B,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:o(zn,{loading:!x,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:w.map(b=>[b.modelName||b.modelId||"\u2014",W(D(b.count)??0,n),g(b.pointsCost)])})}),o(B,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:o(zn,{loading:!x,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:_.map(b=>[Hn(b.projectSource,e("usage.appUnknown")),W(D(b.count)??0,n),g(b.pointsCost)])})})]})]})}var or={tangu:"Tangu","ai-studio":"Forsion AI Studio",desktop:"Forsion Desktop",amadeus:"Amadeus",notebase:"Notebase",calendar:"Forsion Calendar",chat:"Forsion Chat",desk:"Forsion Desk","photo-studio":"Photo Studio",connect:"Forsion Connect"},Hn=(t,e)=>!t||t==="unknown"?e:or[t]??t;function At(t){return o("div",{class:"fx-stat",children:[o("span",{class:"fx-stat-label",children:t.label}),t.value===null?o("span",{class:"fx-skel fx-skel--stat"}):o("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&o("span",{class:"fx-stat-sub",children:t.sub})]})}function zn(t){return t.loading?o("div",{class:"fx-sub",children:[o("span",{class:"fx-skel fx-skel--row"}),o("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?o("div",{class:"fx-table-wrap fx-block",children:o("table",{class:"fx-table",children:[o("thead",{children:o("tr",{children:t.head.map((e,n)=>o("th",{class:n?"is-num":"",children:e},n))})}),o("tbody",{children:t.rows.map((e,n)=>o("tr",{children:e.map((r,a)=>o("td",{class:a?"is-num":"",children:r},a))},n))})]})}):o(ue,{children:t.empty})}function rr(t){let{t:e,locale:n}=A(),r=le(),[a,i]=v(t.base.logs??[]),[s,c]=v(t.base.total),u=P();N(()=>{i(t.base.logs??[]),c(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let f=await k(`/token-quota/my/logs?limit=${Un}&offset=${a.length}`);if(!f.ok)return{error:K(f)};let l=Array.isArray(f.data?.logs)?f.data.logs:[];r.current&&(i(g=>[...g,...l]),c(g=>l.length?D(f.data?.total)??g:a.length))}),m=t.base.dailyLimit;return o(B,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?o("div",{class:"fx-sub",children:o("div",{class:"fx-msg is-error",role:"alert",children:[o("span",{children:te(K(t.base.logsFail),e)}),o("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):a.length===0?o(ue,{children:e("usage.recentEmpty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map((f,l)=>o("div",{class:"fx-list-row",role:"listitem",children:[o("span",{class:"fx-list-main",children:[o("strong",{children:[f.modelName||f.modelId||"\u2014",f.success===!1&&o("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),o("small",{children:[xe(f.createdAt,n),Hn(f.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),o("span",{class:"fx-value",children:je(f.pointsCost,m)??"\u2014"})]},f.id??l))}),a.length>0&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("usage.shown",{shown:W(a.length,n),total:W(Math.max(s,a.length),n)})}),a.length<s&&o(S,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&o("div",{class:"fx-sub fx-sub--tight",children:o(M,{a:u})})]})}var Me=20,Ye=5,ar=5*1024*1024,Qe=1e4,ir={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Xn(t){let{t:e}=A(),n=t.status||"open",r=ir[n];return o("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Wn(){let[t,e]=v(null),n=Q(async()=>{let r=await k(`/feedback?limit=${Me}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?o(j,{panels:1,rows:3}):n.state==="signedOut"?o(G,{}):n.state==="error"?o(Y,{error:n.error,onRetry:n.retry}):t?o(dr,{id:t,onBack:()=>{e(null),n.reload()}}):o(sr,{first:n.data,onOpen:e,onChanged:n.reload})}function sr(t){let{t:e,locale:n}=A(),r=le(),[a,i]=v(t.first),[s,c]=v(t.first.length===Me),[u,d]=v(!1),[m,f]=v(!1),l=P();N(()=>{i(t.first),c(t.first.length===Me)},[t.first]);let g=()=>void l.run(async()=>{let h=await k(`/feedback?limit=${Me}&offset=${a.length}`);if(!h.ok)return{error:K(h)};let x=Array.isArray(h.data?.tickets)?h.data.tickets:[];r.current&&(i(w=>{let _=new Set(w.map(p=>p.id));return[...w,...x.filter(p=>!_.has(p.id))]}),c(x.length===Me))});return o(B,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:o(S,{variant:"primary",onClick:()=>{f(!1),d(!0)},children:[o(I,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&o(ur,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),f(!0),t.onChanged()}}),m&&!u&&o(U,{children:o("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),a.length===0?o(ue,{children:e("fb.empty")}):o("div",{class:"fx-list fx-block",role:"list",children:a.map(h=>o("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(h.id),children:[o("span",{class:`fx-dot${h.user_unread?" is-on":""}`,"aria-label":h.user_unread?e("fb.unread"):void 0}),o("span",{class:"fx-list-main",children:[o("strong",{children:h.title||(h.description||"").slice(0,60)||e("fb.untitled")}),o("small",{children:xe(h.updated_at||h.created_at,n)})]}),o(Xn,{status:h.status}),o(I,{name:"chevron",size:12})]},h.id))}),a.length>0&&(s||l.error)&&o("div",{class:"settings-panel-footer fx-footer",children:[o("span",{class:"fx-muted",children:e("fb.shown",{n:W(a.length,n)})}),s&&o(S,{pending:l.pending,onClick:g,children:e("common.loadMore")})]}),l.error&&o(U,{children:o(M,{a:l})})]})}function cr(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(t)})}var lr=0;function ur(t){let{t:e}=A(),n=le(),[r,a]=v(""),[i,s]=v([]),[c,u]=v(null),[d,m]=v(!1),f=$(null),l=P(),[g,h]=v(0),x=$(0);x.current=i.length;let w=async p=>{u(null);for(let b of Array.from(p||[])){if(!b.type||!b.type.startsWith("image/")){u({key:"err.imageType"});continue}if(b.size>ar){u({key:"err.imageTooLarge"});continue}if(x.current>=Ye){u({key:"err.tooManyImages"});break}x.current++,h(y=>y+1);try{let y=await cr(b);if(!n.current)return;let C={id:`img-${++lr}`,filename:b.name||"image",mime_type:b.type,size:b.size,data_base64:y.replace(/^data:[^;]+;base64,/,""),url:y};s(E=>E.length>=Ye?E:[...E,C])}catch{x.current--,u({key:"err.imageRead"})}finally{n.current&&h(y=>y-1)}}},_=()=>void l.run(async()=>{let p=r.trim();if(!p)return{error:{key:"err.feedbackEmpty"}};if(p.length>Qe)return{error:{key:"err.feedbackTooLong"}};let b=i.map(({filename:C,mime_type:E,size:F,data_base64:O})=>({filename:C,mime_type:E,size:F,data_base64:O})),y=await k("/feedback",{method:"POST",body:{description:p,attachments:b},timeoutMs:12e4});if(!y.ok)return X(y);t.onSubmitted()});return o("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:p=>{let b=Array.from(p.clipboardData?.items||[]).filter(y=>y.kind==="file").map(y=>y.getAsFile()).filter(Boolean);b.length&&(p.preventDefault(),w(b))},onDragOver:p=>{p.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:p=>{p.preventDefault(),m(!1),w(p.dataTransfer?.files)},children:[o("label",{class:"fx-field",children:[o("span",{children:e("fb.descLabel")}),o("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:Qe,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:p=>a(p.currentTarget.value)})]}),o("p",{class:"fx-note",children:e("fb.imagesHint",{n:Ye})}),i.length>0&&o("div",{class:"fx-thumbs",children:i.map(p=>o("span",{class:"fx-thumb",children:[o("img",{src:p.url,alt:p.filename}),o("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(b=>b.filter(y=>y.id!==p.id)),u(null)},children:o(I,{name:"x",size:11})})]},p.id))}),c&&o("div",{class:"fx-msg is-error",role:"alert",children:te(c,e)}),o("input",{ref:f,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:p=>{let b=p.currentTarget;w(b.files),b.value=""}}),o("div",{class:"fx-inline",children:[o(S,{disabled:i.length>=Ye||l.pending,onClick:()=>f.current?.click(),children:[o(I,{name:"image",size:12})," ",e("fb.addImages")]}),o("span",{class:"fx-grow"}),o(S,{disabled:l.pending,onClick:t.onCancel,children:e("common.cancel")}),o(S,{variant:"primary",pending:l.pending,disabled:g>0,onClick:_,children:e("fb.submit")})]}),o(M,{a:l})]})}function dr(t){let{t:e,locale:n}=A(),[r,a]=v({state:"loading"}),[i,s]=v(0),[c,u]=v(""),[d,m]=v(null),f=P(),l=$(0);N(()=>{let y=++l.current;return k(`/feedback/${encodeURIComponent(t.id)}`).then(C=>{if(y===l.current){if(!C.ok){a({state:"error",fail:C});return}a({state:"ready",data:{ticket:C.data.ticket,replies:C.data.replies??[],attachments:C.data.attachments??[]}}),k(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{l.current++}},[t.id,i]),N(()=>{if(!d)return;let y=C=>{C.key==="Escape"&&m(null)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[d]);let g=o("div",{class:"fx-back",children:o(S,{onClick:t.onBack,children:[o(I,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return o(R,{children:[g,o(j,{panels:1,rows:3})]});if(r.state==="error")return o(R,{children:[g,o(Y,{error:K(r.fail),onRetry:()=>{a({state:"loading"}),s(y=>y+1)}})]});let{ticket:h,replies:x,attachments:w}=r.data,_=h.status==="closed",p=y=>w.filter(C=>(C.reply_id??null)===y),b=()=>void f.run(async()=>{let y=c.trim();if(!y)return{error:{key:"err.replyEmpty"}};if(y.length>Qe)return{error:{key:"err.replyTooLong"}};let C=await k(`/feedback/${encodeURIComponent(h.id)}/replies`,{method:"POST",body:{content:y},timeoutMs:6e4});return C.ok?(u(""),s(E=>E+1),{success:{key:"fb.replySent"}}):X(C)});return o(R,{children:[g,o(B,{icon:"message",title:h.title||e("fb.untitled"),actions:o(Xn,{status:h.status}),desc:`#${String(h.id).slice(0,8)} \xB7 ${xe(h.created_at,n)}`,children:[o("div",{class:"fx-thread fx-block",children:[o($n,{who:"user",when:h.created_at,text:h.description||"",files:p(null),onZoom:m}),x.map((y,C)=>o($n,{who:y.author_role==="user"?"user":"admin",when:y.created_at,text:y.content||"",files:y.id?p(y.id):[],onZoom:m},y.id??C))]}),_?o(U,{children:o(J,{children:e("fb.closedNote")})}):o(U,{class:"fx-form",children:[o("textarea",{class:"fx-input fx-textarea",rows:3,value:c,maxLength:Qe,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:y=>{u(y.currentTarget.value),f.success&&f.clear()}}),o("div",{class:"fx-inline",children:[o("span",{class:"fx-grow"}),o(S,{variant:"primary",pending:f.pending,onClick:b,children:e("fb.replySend")})]}),o(M,{a:f})]})]}),d&&o("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>m(null),children:o("img",{src:d,alt:""})})]})}function $n(t){let{t:e,locale:n}=A();return o("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[o("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",xe(t.when,n)]}),o("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&o("div",{class:"fx-thumbs",children:t.files.map((r,a)=>{let i=r.mime_type||"";if(i.startsWith("image/")&&r.data_base64){let s=`data:${i};base64,${r.data_base64}`;return o("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:o("img",{src:s,alt:r.filename||""})},r.id??a)}return o("span",{class:"fx-tag",children:[o(I,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??a)})})]})}var fr="forsion-extend",Vn=[{id:"account",titleKey:"page.account",Component:In},{id:"quota",titleKey:"page.quota",Component:Rn},{id:"security",titleKey:"page.security",Component:qn},{id:"usage",titleKey:"page.usage",Component:On},{id:"feedback",titleKey:"page.feedback",Component:Wn}],mr=t=>`forsion/fx:${fr}:${t}`;function pr(t){let{ctx:e,page:n}=t,[r,a]=v(()=>we(e.getLocale?.()));N(()=>{a(we(e.getLocale?.()));let c=e.subscribeLocale?.(u=>a(we(u)));return()=>{typeof c=="function"&&c()}},[e]);let i=ve(()=>{let c=e.app?.openSettings;return{ctx:e,locale:r,t:nn(r),goTo:typeof c=="function"?u=>c.call(e.app,mr(u)):null}},[e,r]),s=n.Component;return o(mt.Provider,{value:i,children:o("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[o("style",{children:fn}),o(s,{})]})})}function Jn(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let r of Vn)t.registerSettingsView({id:r.id,category:"forsion",title:()=>ut(we(t.getLocale?.()),r.titleKey),mount(a){return st(o(pr,{ctx:t,page:r}),a),()=>{st(null,a)}}});return Vn.length}typeof ctx<"u"&&Jn(ctx);})();
247
+ `,Gi=`
248
+ .fx-ann-backdrop { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); animation: fx-ann-fade 300ms ease-out both; }
249
+ .fx-ann { position: relative; display: flex; flex-direction: column; width: min(100%, 560px); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px 28px 22px; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); color: var(--text); font-family: var(--font-ui); text-align: left; animation: fx-ann-enter 480ms cubic-bezier(.2,.75,.15,1) both; }
250
+ .fx-ann:focus { outline: none; }
251
+ .fx-ann-close { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
252
+ .fx-ann-close:hover { background: var(--menu-hover); color: var(--text); }
253
+ .fx-ann-eyebrow { padding-right: 36px; color: var(--accent-ink); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 680; letter-spacing: .08em; animation: fx-ann-reveal 400ms 120ms ease-out both; }
254
+ .fx-ann-title { margin: 8px 36px 14px 0; color: var(--text); font-size: var(--ui-font-display); line-height: var(--ui-line-display); font-weight: 700; overflow-wrap: anywhere; animation: fx-ann-reveal 400ms 180ms ease-out both; }
255
+ .fx-ann-body { position: relative; flex: 0 1 auto; min-height: 0; max-height: 60vh; overflow: auto; contain: layout paint; animation: fx-ann-reveal 400ms 240ms ease-out both; }
256
+ .fx-ann-footer { display: flex; justify-content: flex-end; margin-top: 20px; }
257
+ .fx-ann-ok { min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--radius-sm); background: var(--action-fill); color: var(--on-action); font-family: inherit; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); font-weight: 650; cursor: pointer; animation: fx-ann-reveal 400ms 300ms ease-out both; }
258
+ .fx-ann-ok:hover { background: var(--action-fill-hover); }
259
+ .fx-ann-close:focus-visible,
260
+ .fx-ann-ok:focus-visible { outline: var(--focus-ring) solid var(--accent-ink); outline-offset: 2px; }
261
+
262
+ html[data-glass='off'] .fx-ann-backdrop { backdrop-filter: none; background: var(--bg); }
263
+
264
+ @keyframes fx-ann-fade { from { opacity: 0; } to { opacity: 1; } }
265
+ @keyframes fx-ann-enter { from { opacity: 0; translate: 0 12px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
266
+ @keyframes fx-ann-reveal { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
267
+
268
+ @media (max-width: 440px) {
269
+ .fx-ann { padding-left: 20px; padding-right: 20px; }
270
+ }
271
+ @media (prefers-reduced-motion: reduce) {
272
+ .fx-ann-backdrop, .fx-ann, .fx-ann-eyebrow, .fx-ann-title, .fx-ann-body, .fx-ann-ok { animation: none; }
273
+ }
274
+ `,Yi=`
275
+ :host { display: block; color: var(--text); font-family: var(--font-body, var(--font-ui)); font-size: var(--ui-font-body); line-height: 1.65; overflow-wrap: anywhere; }
276
+ .doc > :first-child { margin-top: 0; }
277
+ .doc > :last-child { margin-bottom: 0; }
278
+ p, ul, ol, blockquote, pre, table, figure, details { margin: 0 0 12px; }
279
+ h1, h2, h3, h4, h5, h6 { margin: 18px 0 8px; color: var(--text); font-family: var(--font-ui); font-weight: 650; }
280
+ h1, h2 { font-size: var(--ui-font-title); line-height: var(--ui-line-title); }
281
+ h3 { font-size: var(--ui-font-heading); line-height: var(--ui-line-heading); }
282
+ h4, h5, h6 { font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
283
+ ul, ol { padding-left: 1.4em; }
284
+ li + li { margin-top: 4px; }
285
+ li > ul, li > ol { margin: 4px 0 0; }
286
+ blockquote { padding: 2px 0 2px 12px; border-left: 3px solid var(--border); color: var(--text-muted); }
287
+ code { padding: 1px 5px; border-radius: var(--radius-sm); background: var(--overlay-light); font-family: var(--font-mono); font-size: .92em; }
288
+ pre { overflow: auto; padding: 10px 12px; border-radius: var(--radius-md); background: var(--overlay-light); }
289
+ pre code { padding: 0; background: transparent; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
290
+ table { width: 100%; border-collapse: collapse; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
291
+ th, td { padding: 6px 10px; border: var(--border-width) solid var(--border); text-align: left; vertical-align: top; }
292
+ th { background: var(--overlay-subtle); font-weight: 600; }
293
+ img, video, svg { max-width: 100%; height: auto; }
294
+ img { border-radius: var(--radius-sm); }
295
+ hr { margin: 16px 0; border: 0; border-top: var(--border-width) solid var(--border); }
296
+ a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
297
+ strong, b { font-weight: 650; }
298
+ `;var ut=t=>typeof t=="string"?t:"";function vc(t){if(!t||typeof t!="object")return null;let e=t,n=typeof e.id=="string"?e.id.trim():typeof e.id=="number"&&Number.isFinite(e.id)?String(e.id):"",r=ut(e.titleZh),o=ut(e.bodyZh);return!n||!r.trim()&&!o.trim()?null:{id:n,titleZh:r,titleEn:ut(e.titleEn).trim()?ut(e.titleEn):null,bodyZh:o,bodyEn:ut(e.bodyEn).trim()?ut(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:ut(e.publishedAt)||null}}function wc(t,e){return e==="en"&&t.bodyEn?{lang:"en",title:t.titleEn??t.titleZh,body:t.bodyEn}:{lang:"zh",title:t.titleZh,body:t.bodyZh}}var kc=new Rr({gfm:!0,breaks:!0}),_c=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Sc=/^(?:https?:|mailto:|#)/i;function Zi(t){return br.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:_c,ALLOWED_URI_REGEXP:Sc})}function Ac(t,e){let n=e==="markdown"?kc.parse(t,{async:!1}):t;return Zi(n)}var On=null;function Tc(){if(On===null)try{let t=Zi('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');On=br.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{On=!1}return On}function Ec(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Cc="http://www.w3.org/1999/xlink";function zn(t){let e=t.target,n=e&&typeof e.closest=="function"?e.closest("a, area"):null;if(!n||(t.preventDefault(),t.type!=="click"))return;let r=Ec(n.getAttribute("href")??n.getAttributeNS(Cc,"href"));if(r)try{j().openExternal?.(r)?.catch(()=>{})}catch{}}function Ji(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Rc(t){let{ctx:e,ann:n}=t,[r,o]=E(()=>Be(e.getLocale?.()));X(()=>{o(Be(e.getLocale?.()));let f=e.subscribeLocale?.(g=>o(Be(g)));return()=>{typeof f=="function"&&f()}},[e]);let i=Je(()=>Nn(r),[r]),s=wc(n,r),l=ee(null),u=ee(null),d=ee(null),p=ee(null),m=ee(t.onClose);return m.current=t.onClose,X(()=>{let f=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let g=v=>{if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),m.current();return}if(v.key!=="Tab")return;let k=u.current,T=d.current,x=l.current;if(!k||!T||!x)return;let _=document.activeElement;if(!_||!x.contains(_)){v.preventDefault(),(v.shiftKey?T:k).focus();return}v.shiftKey&&(_===k||_===x)?(v.preventDefault(),T.focus()):!v.shiftKey&&_===T&&(v.preventDefault(),k.focus())},b=v=>{let k=l.current;k&&v.target instanceof Node&&!k.contains(v.target)&&k.focus()};return window.addEventListener("keydown",g,!0),document.addEventListener("focusin",b,!0),()=>{window.removeEventListener("keydown",g,!0),document.removeEventListener("focusin",b,!0),f?.isConnected&&f.focus()}},[]),X(()=>{let f=p.current;if(!f)return;let g=Ji(f);return g.addEventListener("click",zn),g.addEventListener("auxclick",zn),()=>{g.removeEventListener("click",zn),g.removeEventListener("auxclick",zn)}},[]),X(()=>{let f=p.current;if(!f)return;let g=document.createElement("style");g.textContent=Yi;let b=document.createElement("div");b.className="doc",b.appendChild(Ac(s.body,n.format)),Ji(f).replaceChildren(g,b)},[s.body,n.format]),a("div",{class:"fx-ann-backdrop",children:[a("style",{children:Gi}),a("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[a("button",{ref:u,type:"button",class:"fx-ann-close","aria-label":i("ann.close"),onClick:()=>m.current(),children:a(q,{name:"x",size:16})}),a("div",{class:"fx-ann-eyebrow",children:i("ann.eyebrow")}),a("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),a("div",{class:"fx-ann-body",children:a("div",{ref:p,id:"fx-ann-body",class:"fx-ann-doc"})}),a("div",{class:"fx-ann-footer",children:a("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:i("ann.ok")})})]})]})}function Pc(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Mc(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let o=()=>{i.disconnect(),clearTimeout(s),r()},i=new MutationObserver(()=>{n.isConnected||o()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(o,e)}):Promise.resolve()}function Ki(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Pc(e.location?.search))return null;let r=0,o=!1,i=null,s=Promise.resolve(),l=p=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let f=!1,g=b=>{f||(f=!0,i?.id===p.id&&(i=null),Pt(null,m),m.remove(),b&&(s=M(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};i={id:p.id,finish:g},Pt(a(Rc,{ctx:t,ann:p,onClose:()=>g(!0)}),m)},u=async()=>{let p=++r;await s;let m=await M("/announcements/pending");if(o||p!==r||!m.ok)return;let f=vc(m.data?.announcement);!f||i||Tc()&&(await Mc(),!(o||p!==r||i)&&l(f))},d=n.onAuthChanged?.(p=>{i?.finish(!1),p?.loggedIn?u():r++});return u(),{check:u,dispose(){o=!0,r++,typeof d=="function"&&d(),i?.finish(!1)}}}function Qi(t){return typeof t!="string"?{ok:!1,rule:"format"}:t.length<8?{ok:!1,rule:"min"}:t.length>64?{ok:!1,rule:"max"}:/\s/.test(t)?{ok:!1,rule:"space"}:/[a-z]/.test(t)?/[A-Z]/.test(t)?/[^A-Za-z0-9]/.test(t)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function ea(t){return{length:t.length>=8&&t.length<=64,lower:/[a-z]/.test(t),upper:/[A-Z]/.test(t),special:/[^A-Za-z0-9]/.test(t),space:t.length>0&&!/\s/.test(t)}}var ta={\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E:"format","\u5BC6\u7801\u81F3\u5C11 8 \u4F4D":"min","\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D":"max",\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C:"space",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD:"lower",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD:"upper",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26:"special"};var na={no_reset_card:"err.noResetCard",invalid_type:"err.generic",invalid_count:"err.invalidCount",insufficient_points:"err.insufficientPoints",price_changed:"err.priceChanged",insufficient_main_quota:"err.insufficientMainQuota",background_unavailable:"err.backgroundUnavailable",invalid_percent:"err.generic",invalid_request:"err.generic",invalid_invite_code:"err.invalidInviteCode",already_used:"err.inviteAlreadyUsed",window_expired:"err.inviteWindowExpired",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},ra={"Current password is incorrect":"err.currentPasswordWrong","Current and new password are required":"err.passwordRequired",\u9A8C\u8BC1\u7801\u65E0\u6548\u6216\u5DF2\u8FC7\u671F:"err.codeInvalid","Invalid or expired verification code":"err.codeInvalid",\u8D26\u53F7\u6216\u9A8C\u8BC1\u7801\u9519\u8BEF:"err.codeInvalid",\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801:"err.codeRequired","Email already in use":"err.emailInUse","Phone number already in use":"err.phoneInUse","Invalid email format":"err.emailInvalid","Email is required":"err.emailInvalid","Invalid phone number format":"err.phoneInvalid","Phone number is required":"err.phoneInvalid","Invalid phone number or email format":"err.targetInvalid","Please wait before requesting another code":"err.codeCooldown","Failed to send verification code":"err.codeSendFailed","Invalid target for account deletion":"err.deleteTargetInvalid","\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u6CE8\u9500\u8D26\u6237":"err.deleteVerifyFailed",\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500:"err.adminCannotDelete",\u79EF\u5206\u4F59\u989D\u4E0D\u8DB3:"err.insufficientPoints","\u5151\u6362\u5F20\u6570\u9700\u4E3A 1-50 \u7684\u6574\u6570":"err.invalidCount",\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361:"err.noResetCard","\u4E3B\u989D\u5EA6\u5DF2\u7528\u5B8C,\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6":"err.insufficientMainQuota",\u540E\u53F0\u989D\u5EA6\u6682\u4E0D\u53EF\u7528:"err.backgroundUnavailable",\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548:"err.invalidInviteCode","\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F":"err.inviteWindowExpired",\u4F60\u5DF2\u4F7F\u7528\u8FC7\u9080\u8BF7\u7801:"err.inviteAlreadyUsed","You have already used an invite code":"err.inviteAlreadyUsed","Cannot use your own invite code":"err.inviteOwnCode","Invite code is required":"err.inviteEmpty","code is required":"err.redeemEmpty","Redemption code not found":"err.redeemNotFound","Redemption code is not active":"err.redeemInactive","Redemption code has expired":"err.redeemExpired","Redemption code has reached maximum uses":"err.redeemUsedUp","You have already used this code the maximum number of times":"err.redeemUserLimit",avatar_too_large:"err.avatarTooLarge","description is required":"err.feedbackEmpty","description too long (max 10000 chars)":"err.feedbackTooLong","content is required":"err.replyEmpty","content too long (max 10000 chars)":"err.replyTooLong","Ticket not found":"err.ticketNotFound","Too many attachments (max 5)":"err.tooManyImages","Attachment type not allowed (image / json / text only)":"err.imageType","\u4EBA\u673A\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"err.captcha"},qr={format:"pw.rule.format",min:"pw.rule.min",max:"pw.rule.max",space:"pw.rule.space",lower:"pw.rule.lower",upper:"pw.rule.upper",special:"pw.rule.special"};function Lc(t){if(t.code&&na[t.code])return na[t.code];if(t.detail){if(ra[t.detail])return ra[t.detail];let e=ta[t.detail];if(e)return qr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function _e(t){let e=Lc(t);return e?{key:e}:Ln(t)?{key:"err.signedOut"}:t.status===0?{key:"err.network"}:t.status===401?{key:"err.session"}:t.status===429?{key:"err.tooFrequent"}:t.detail?{raw:t.detail}:t.status>=500?{key:"err.server",vars:{status:t.status}}:{key:"err.generic"}}function Gt(t){let e=t.trim();return e?/cancelled\.?$/i.test(e)?null:e==="A sign-in is already in progress."?{key:"err.loginInProgress"}:e.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:e.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:e.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:e.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:e.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:e.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:e}:{key:"err.generic"}}var Hr=Li(null);function F(){let t=qi(Hr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var Qe=()=>F().t;function et(){let t=ee(!0);return X(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var oa={pending:!1,error:null,success:null,captcha:!1};function B(){let t=et(),[e,n]=E(oa),r=ee(!1),o=Ze(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let l;try{l=await s()}catch(u){l={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=Ze(()=>{r.current||n(oa)},[]);return{...e,run:o,clear:i}}var de=t=>({error:_e(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function ia(){let[t,e]=E(0),n=ee(null);X(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=Ze((i=60)=>{n.current&&clearInterval(n.current),e(i),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),o=Ze(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:o}}function De(t){let[e,n]=E({state:"loading"}),r=ee(0),o=ee(t);o.current=t;let i=Ze((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let p;try{p=await o.current()}catch(m){p={ok:!1,status:0,code:null,detail:null,transport:String(m?.message||m)}}d===r.current&&(p.ok?n({state:"ready",data:p.data,gen:d}):Ln(p)?n({state:"signedOut"}):(p.status===401&&j().authStatus?.().catch(()=>{}),n({state:"error",fail:p})))})()},[]);X(()=>{i();let u=j().onAuthChanged?.(()=>i());return()=>{r.current++,u?.()}},[i]);let s=Ze(()=>i(),[i]),l=Ze(()=>i(!0),[i]);switch(e.state){case"ready":{let u=e.gen,d=p=>n(m=>m.state==="ready"&&m.gen===u?{...m,data:p(m.data)}:m);return{state:"ready",data:e.data,reload:l,update:d}}case"error":return{state:"error",error:_e(e.fail),retry:s};default:return e}}function Fn(t){let e=String(t||"").trim();if(!e)return"";let n=e.startsWith("+")?4:3;return e.length<=n+4?`${e.slice(0,2)}***`:`${e.slice(0,n)}****${e.slice(-4)}`}function Bn(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let r=e.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${e.slice(n)}`}function aa(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Ic=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function sa(t,e){let n=String(t||"").trim(),r,o,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)r=Number(i[2]),o=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(u=>u.type==="month")?.value),o=Number(l.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(o>=1&&o<=31)?null:e==="zh"?`${r}\u6708${o}\u65E5`:`${Ic[r-1]} ${o}`}var Wr=t=>t==="zh"?"zh-CN":"en-US";function la(t){if(t==null||t==="")return null;let e=new Date(typeof t=="string"&&/^\d+$/.test(t)?Number(t):t);return Number.isNaN(e.getTime())?null:e}function ca(t,e){let n=la(t);return n?new Intl.DateTimeFormat(Wr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Lt(t,e){let n=la(t);return n?new Intl.DateTimeFormat(Wr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function he(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Wr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var dt=class extends Error{};async function ua(t,e=256){if(t.size>20971520)throw new dt;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((p,m)=>{r.onload=()=>p(),r.onerror=()=>m(new Error("image decode failed")),r.src=n});let o=r.naturalWidth,i=r.naturalHeight;if(!o||!i)throw new Error("empty image");if(o*i>5e7)throw new dt;let s=Math.min(1,e/Math.max(o,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(o*s)),l.height=Math.max(1,Math.round(i*s));let u=l.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height),u.drawImage(r,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new dt;return d}finally{URL.revokeObjectURL(n)}}function da(t){let e=String(t||"").trim();if(!e)return"?";let n=Array.from(e)[0];return/[㐀-鿿]/.test(n)?n:Array.from(e).slice(0,2).join("").toUpperCase()}var ft=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(ft||{}),Dc=[0,1],pa=[1,0],ma=[2,3],ha=[3,2],Nc={L:Dc,M:pa,Q:ma,H:ha},Oc=/^\d*$/,zc=/^[A-Z0-9 $%*+./:-]*$/,Xr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Yr=1,Jr=40,fa=3,Fc=3,$n=40,Bc=10,ga=[[-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]],ba=[[-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]],jr=class{constructor(e,n,r,o){if(this.version=e,this.ecc=n,e<Yr||e>Jr)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),o===-1){let l=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<l&&(o=u,l=d),this.applyMask(u)}}this.mask=o,this.applyMask(o),this.drawFormatBits(o)}size;mask;modules=[];types=[];getModule(e,n){return e>=0&&e<this.size&&n>=0&&n<this.size&&this.modules[n][e]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,ft.Timing),this.setFunctionModule(r,6,r%2===0,ft.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),n=e.length;for(let r=0;r<n;r++)for(let o=0;o<n;o++)r===0&&o===0||r===0&&o===n-1||r===n-1&&o===0||this.drawAlignmentPattern(e[r],e[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let i=0;i<10;i++)r=r<<1^(r>>>9)*1335;let o=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,Ue(o,i));this.setFunctionModule(8,7,Ue(o,6)),this.setFunctionModule(8,8,Ue(o,7)),this.setFunctionModule(7,8,Ue(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,Ue(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,Ue(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,Ue(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let r=0;r<18;r++){let o=Ue(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,o),this.setFunctionModule(s,i,o)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let o=-4;o<=4;o++){let i=Math.max(Math.abs(o),Math.abs(r)),s=e+o,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,ft.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let o=-2;o<=2;o++)this.setFunctionModule(e+o,n+r,Math.max(Math.abs(o),Math.abs(r))!==1,ft.Alignment)}setFunctionModule(e,n,r,o=ft.Function){this.modules[n][e]=r,this.types[n][e]=o}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Un(n,r))throw new RangeError("Invalid argument");let o=ba[r[0]][n],i=ga[r[0]][n],s=Math.floor(Vr(n)/8),l=o-s%o,u=Math.floor(s/o),d=[],p=Gc(i);for(let f=0,g=0;f<o;f++){let b=e.slice(g,g+u-i+(f<l?0:1));g+=b.length;let v=Yc(b,p);f<l&&b.push(0),d.push(b.concat(v))}let m=[];for(let f=0;f<d[0].length;f++)d.forEach((g,b)=>{(f!==u-i||b>=l)&&m.push(g[f])});return m}drawCodewords(e){if(e.length!==Math.floor(Vr(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){let s=r-i,u=(r+1&2)===0?this.size-1-o:o;!this.types[u][s]&&n<e.length*8&&(this.modules[u][s]=Ue(e[n>>>3],7-(n&7)),n++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let o;switch(e){case 0:o=(r+n)%2===0;break;case 1:o=n%2===0;break;case 2:o=r%3===0;break;case 3:o=(r+n)%3===0;break;case 4:o=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:o=r*n%2+r*n%3===0;break;case 6:o=(r*n%2+r*n%3)%2===0;break;case 7:o=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&o&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let i=0;i<this.size;i++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(l++,l===5?e+=fa:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*$n),s=this.modules[i][d],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*$n}for(let i=0;i<this.size;i++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(l++,l===5?e+=fa:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*$n),s=this.modules[d][i],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*$n}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(e+=Fc)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,o=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=o*Bc,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let o=this.size-7;r.length<e;o-=n)r.splice(1,0,o);return r}}finderPenaltyCountPatterns(e){let n=e[1],r=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(r&&e[0]>=n*4&&e[6]>=n?1:0)+(r&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,r){return e&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function qe(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)n.push(t>>>r&1)}function Ue(t,e){return(t>>>e&1)!==0}var Yt=class{constructor(e,n,r){if(this.mode=e,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},$c=[1,10,12,14],Uc=[2,9,11,13],qc=[4,8,16,16];function xa(t,e){return t[Math.floor((e+7)/17)+1]}function ya(t){let e=[];for(let n of t)qe(n,8,e);return new Yt(qc,t.length,e)}function Hc(t){if(!va(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let r=Math.min(t.length-n,3);qe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Yt($c,t.length,e)}function Wc(t){if(!wa(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let r=Xr.indexOf(t.charAt(n))*45;r+=Xr.indexOf(t.charAt(n+1)),qe(r,11,e)}return n<t.length&&qe(Xr.indexOf(t.charAt(n)),6,e),new Yt(Uc,t.length,e)}function Xc(t){return t===""?[]:va(t)?[Hc(t)]:wa(t)?[Wc(t)]:[ya(Vc(t))]}function va(t){return Oc.test(t)}function wa(t){return zc.test(t)}function jc(t,e){let n=0;for(let r of t){let o=xa(r.mode,e);if(r.numChars>=1<<o)return Number.POSITIVE_INFINITY;n+=4+o+r.bitData.length}return n}function Vc(t){t=encodeURI(t);let e=[];for(let n=0;n<t.length;n++)t.charAt(n)!=="%"?e.push(t.charCodeAt(n)):(e.push(Number.parseInt(t.substring(n+1,n+3),16)),n+=2);return e}function Vr(t){if(t<Yr||t>Jr)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;e-=(25*n-10)*n-55,t>=7&&(e-=36)}return e}function Un(t,e){return Math.floor(Vr(t)/8)-ga[e[0]][t]*ba[e[0]][t]}function Gc(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let r=0;r<t-1;r++)e.push(0);e.push(1);let n=1;for(let r=0;r<t;r++){for(let o=0;o<e.length;o++)e[o]=Gr(e[o],n),o+1<e.length&&(e[o]^=e[o+1]);n=Gr(n,2)}return e}function Yc(t,e){let n=e.map(r=>0);for(let r of t){let o=r^n.shift();n.push(0),e.forEach((i,s)=>n[s]^=Gr(i,o))}return n}function Gr(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(e>>>r&1)*t;return n}function Jc(t,e,n=1,r=40,o=-1,i=!0){if(!(Yr<=n&&n<=r&&r<=Jr)||o<-1||o>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=Un(s,e)*8,f=jc(t,s);if(f<=m){l=f;break}if(s>=r)throw new RangeError("Data too long")}for(let m of[pa,ma,ha])i&&l<=Un(s,m)*8&&(e=m);let u=[];for(let m of t){qe(m.mode[0],4,u),qe(m.numChars,xa(m.mode,s),u);for(let f of m.getData())u.push(f)}let d=Un(s,e)*8;qe(0,Math.min(4,d-u.length),u),qe(0,(8-u.length%8)%8,u);for(let m=236;u.length<d;m^=253)qe(m,8,u);let p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new jr(s,e,p,o)}function ka(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:o=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=e||{},u=typeof t=="string"?Xc(t):Array.isArray(t)?[ya(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Jc(u,Nc[n],o,i,s,r),p=Zc({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Zc(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(i=>{for(let s=0;s<e;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<e;i++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let o=ft.Border;t.types.forEach(i=>{for(let s=0;s<e;s++)i.unshift(o),i.push(o)});for(let i=0;i<e;i++)t.types.unshift(Array.from({length:r},s=>o)),t.types.push(Array.from({length:r},s=>o));return t}function ne(t){return a("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[a("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&a("span",{class:"settings-panel-icon",children:a(q,{name:t.icon,size:16})}),a("div",{children:[a("strong",{children:t.title}),t.desc&&a("p",{children:t.desc})]}),t.actions&&a("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function xe(t){return a("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[a("div",{class:"settings-control-copy",children:a("span",{children:[a("strong",{children:t.label}),t.desc&&a("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&a("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function se(t){return a("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function _a(t){return a("button",{type:"button",role:"switch","aria-checked":t.checked,"aria-label":t.label,class:`settings-switch${t.checked?" active":""}`,disabled:t.disabled,onClick:()=>t.onChange(!t.checked),children:a("span",{})})}function I(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return a("button",{type:t.submit?"submit":"button",class:n,disabled:t.disabled||t.pending,"aria-busy":t.pending||void 0,"aria-label":t.label,title:t.title,"data-armed":t.armed?"true":void 0,onClick:t.onClick,children:[t.pending&&a(Vt,{}),t.children]})}var Kc=5e3;function pt(t){let[e,n]=E(!1),r=ee(null),o=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};X(()=>()=>{r.current&&clearTimeout(r.current)},[]),X(()=>{(t.pending||t.disabled)&&o()},[t.pending,t.disabled]);let i=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},Kc);return}o(),t.onConfirm()},s=t.variant??"ghost";return a(I,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:i,children:e?t.confirmLabel:t.label})}function $(t){let e=Qe(),{a:n}=t;return n.error?a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(n.error,e)}),n.captcha&&a("button",{type:"button",class:"fx-link",onClick:()=>void Dn(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",a(q,{name:"external",size:12})]})]}):n.success?a("div",{class:"fx-msg is-ok",role:"status",children:$e(n.success,e)}):null}function ge(t){return a("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function tt(t){return a("div",{class:"settings-empty-row fx-block",children:t.children})}function Jt(t){let e=Qe(),n=t.display;return a("div",{class:`fx-quota${n.low?" is-low":""}`,children:[a("div",{class:"fx-quota-top",children:[a("span",{class:"fx-quota-label",children:t.label}),a("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),a("div",{class:"fx-bar",role:"progressbar","aria-label":t.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?e("common.unlimited"):n.text,children:a("span",{style:{width:`${n.pct}%`}})}),t.note&&a("div",{class:"fx-quota-note",children:t.note})]})}function mt(t){return a("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>a("button",{type:"button",role:"radio","aria-checked":e.value===t.value,class:e.value===t.value?"active":"",onClick:()=>{e.value!==t.value&&t.onChange(e.value)},children:e.label}))})}async function Qc(t){try{return await navigator.clipboard.writeText(t),!0}catch{try{let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");return e.remove(),n}catch{return!1}}}function qn(t){let e=Qe(),[n,r]=E("idle"),o=ee(null);X(()=>()=>{o.current&&clearTimeout(o.current)},[]);let i=async()=>{let s=await Qc(t.text);r(s?"copied":"failed"),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r("idle"),1800)};return a(I,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[a(q,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function eu(t){let e=Je(()=>{try{return ka(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((o,i)=>o.forEach((s,l)=>{s&&(n+=`M${l} ${i}h1v1h-1z`)}));let r=t.size??148;return a("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[a("rect",{width:e.size,height:e.size,fill:"#fff"}),a("path",{d:n,fill:"#000"})]})}function Zr(t){let e=Qe(),{device:n}=t;return a("div",{class:"fx-device",children:[a(eu,{value:n.url,label:e("signin.qrLabel")}),a("div",{class:"fx-device-copy",children:[a("p",{children:e("signin.deviceHint")}),n.userCode&&a("div",{class:"fx-device-code",children:[a("span",{children:e("signin.code")}),a("code",{children:n.userCode})]}),a("div",{class:"fx-inline",children:[a("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",a(q,{name:"external",size:12})]}),a(qn,{text:n.url,label:e("signin.copyLink")})]})]})]})}function Ne(){let t=Qe(),e=B(),[n,r]=E(null);X(()=>j().onAuthDevice?.(i=>r(i)),[]);let o=()=>void e.run(async()=>{let i=j().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let l=Gt(Ke(s));return l?{error:l}:void 0}});return a("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:a("div",{class:"settings-state fx-signin-body",children:[a("span",{class:"settings-state-icon",children:a(q,{name:"user",size:18})}),a("p",{class:"fx-signin-lead",children:t("signin.desc")}),a("div",{class:"settings-state-actions",children:a(I,{variant:"primary",pending:e.pending,onClick:o,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&a(Zr,{device:n}),a($,{a:e})]})})}function Ce(t){let e=Qe(),n=t.panels??2,r=t.rows??2;return a("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(o,i)=>a("section",{class:"settings-panel fx-panel",children:[a("div",{class:"settings-panel-head",children:[a("span",{class:"fx-skel fx-skel--icon"}),a("div",{children:[a("span",{class:"fx-skel fx-skel--title"}),a("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,l)=>a("div",{class:"settings-control-row",children:a("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function Re(t){let e=Qe();return a("section",{class:"settings-panel fx-panel",children:a("div",{class:"settings-state fx-error-state",role:"alert",children:[a("span",{class:"settings-state-icon",children:a(q,{name:"alert",size:18})}),a("strong",{children:e("common.loadFailed")}),a("p",{children:$e(t.error,e)}),a("div",{class:"settings-state-actions",children:a(I,{variant:"primary",onClick:t.onRetry,children:[a(q,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}function Aa(){let t=De(async()=>{let[n,r,o]=await Promise.all([M("/auth/me"),M("/membership/my"),M("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:r.ok?r.data?.membership??null:null,membershipFailed:!r.ok,features:o.ok&&o.data&&typeof o.data=="object"?o.data:{}}}:n});if(t.state==="loading")return a(Ce,{panels:3});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let{data:e}=t;return a(V,{children:[a(tu,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),a(nu,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),a(ru,{}),a(iu,{})]})}function tu(t){let{t:e}=F(),{me:n}=t,r=B(),o=B(),[i,s]=E(!1),[l,u]=E(""),d=ee(null),p=n.nickname||n.username,m=b=>{b&&r.run(async()=>{let v;try{v=await ua(b)}catch(T){return{error:{key:T instanceof dt?"err.avatarTooLarge":"err.avatarInvalid"}}}let k=await M("/settings",{method:"PUT",body:{avatar:v}});return k.ok?(t.onPatch({avatar:v}),{success:{key:"account.avatar.saved"}}):{error:_e(k)}})},f=()=>{o.clear(),u(p||""),s(!0)},g=()=>{let b=l.trim();if(!b||b===p){s(!1);return}o.run(async()=>{let v=await M("/settings",{method:"PUT",body:{nickname:b}});return v.ok?(t.onPatch({nickname:b}),s(!1),{success:{key:"account.nickname.saved"}}):{error:_e(v)}})};return a(ne,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[a("div",{class:"fx-identity fx-block",children:[a("button",{type:"button",class:"fx-avatar",disabled:r.pending,onClick:()=>d.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?a("img",{src:n.avatar,alt:""}):a("span",{class:"fx-avatar-initial",children:da(p)}),a("span",{class:"fx-avatar-mask",children:r.pending?a(Vt,{size:14}):a(q,{name:"pencil",size:14})})]}),a("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:b=>{let v=b.currentTarget;m(v.files?.[0]),v.value=""}}),a("div",{class:"fx-identity-main",children:[i?a("form",{class:"fx-inline",onSubmit:b=>{b.preventDefault(),g()},children:[a("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:b=>u(b.currentTarget.value),onKeyDown:b=>{b.key==="Escape"&&(b.preventDefault(),s(!1))}}),a(I,{variant:"primary",submit:!0,pending:o.pending,children:e("common.save")}),a(I,{disabled:o.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):a("div",{class:"fx-name-row",children:[a("span",{class:"fx-name",children:p}),a("button",{type:"button",class:"fx-icon-btn",onClick:f,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:a(q,{name:"pencil",size:13})}),n.role==="ADMIN"&&a("span",{class:"fx-tag",children:e("account.role.admin")})]}),a("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),a($,{a:o}),a($,{a:r})]})]}),a(Sa,{kind:"phone",value:n.phone}),a(Sa,{kind:"email",value:n.email})]})}function Sa(t){let{t:e,goTo:n}=F(),r=!!t.value,o=r?t.kind==="phone"?Fn(t.value):Bn(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return a(xe,{label:i,children:n?a("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[a("span",{children:o}),a(q,{name:"chevron",size:12})]}):a("span",{class:`fx-value${r?"":" is-empty"}`,children:o})})}function nu(t){let{t:e,locale:n}=F(),r=B(),o=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=aa(o?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await In("membership")?void 0:{error:{key:"err.openFailed"}});return a(ne,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?a(I,{variant:"primary",pending:r.pending,onClick:u,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&a("div",{class:"fx-member fx-block",children:[a("span",{class:`fx-tier fx-tier--${l}`,children:i}),a("div",{class:"fx-member-copy",children:[a("strong",{children:s?e("member.freeName"):o?.plan?.name||i}),a("span",{class:"fx-muted",children:s?e("member.freeHint"):o?.expiresAt?e("member.expires",{date:ca(o.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&a("div",{class:"fx-sub",children:a(ge,{tone:"warn",children:[e("member.loadFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a("div",{class:"fx-sub fx-sub--tight",children:a($,{a:r})})]})}function ru(){let{t}=F(),e=et(),[n,r]=E(null),[o,i]=E(!1),[s,l]=E(null),[u,d]=E(null),p=B(),m=B(),f=B(),g=!!j().authAccounts;X(()=>{let x=0,_=()=>{let N=j().authAccounts;if(!N)return;let G=++x;i(!1),N().then(z=>{G===x&&r(Array.isArray(z)?z:[])}).catch(()=>{G===x&&i(!0)})};_();let A=j().onAuthChanged?.(_),R=j().onAuthDevice?.(N=>d(N));return()=>{x++,A?.(),R?.()}},[]);let b=x=>{l(x),p.run(async()=>{let _=j().forsionSwitchAccount;if(!_)return{error:{key:"err.unavailable"}};try{await _(x)}catch(A){let R=Gt(Ke(A));return R?{error:R}:void 0}finally{e.current&&l(null)}})},v=()=>void m.run(async()=>{let x=j().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(_){e.current&&d(null);let A=Gt(Ke(_));return A?{error:A}:void 0}}),k=()=>void f.run(async()=>{let x=j().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(_){return{error:{raw:Ke(_)||t("err.generic")}}}}),T=p.pending||m.pending||f.pending;return a(ne,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!o&&a(tt,{children:[a(Vt,{})," ",t("common.loading")]}),o&&a("div",{class:"fx-sub",children:a(ge,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&a(tt,{children:t("local.empty")}),n&&n.length>0&&a("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-icon",children:a(q,{name:"user",size:14})}),a("span",{class:"fx-list-main",children:[a("strong",{children:x.nickname||x.username||"Forsion"}),a("small",{children:[x.username&&x.nickname?x.username:null,ou(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?a("span",{class:"fx-tag fx-tag--accent",children:[a(q,{name:"check",size:11})," ",t("local.current")]}):a(I,{pending:s===x.id,disabled:T&&s!==x.id,onClick:()=>b(x.id),children:t("local.switch")})]},x.id))}),m.pending&&u&&a("div",{class:"fx-sub",children:a(Zr,{device:u})}),a("div",{class:"settings-panel-footer fx-footer",children:[a(I,{pending:m.pending,disabled:T&&!m.pending,onClick:v,children:[a(q,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),a(I,{pending:f.pending,disabled:T&&!f.pending,onClick:k,children:[a(q,{name:"logout",size:12})," ",t("local.signOut")]})]}),(p.error||m.error||f.error)&&a("div",{class:"fx-sub fx-sub--tight",children:[a($,{a:p}),a($,{a:m}),a($,{a:f})]})]})}function ou(t){try{return new URL(t).host}catch{return t}}function iu(){let{t}=F(),e=B();return a("div",{class:"fx-page-foot",children:[a("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await Dn()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",a(q,{name:"external",size:12})]}),a("span",{class:"fx-muted",children:t("account.web.desc")}),a($,{a:e})]})}function K(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function au(t,e){let n=K(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,K(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var su=15;function ht(t,e){let n=au(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,K(t)??0),o=n===0&&r>0&&(K(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:o,low:n<=su}}function Hn(t,e){let n=K(e);if(n===null||n<=0)return null;let r=K(t);if(r===null)return null;let o=Math.max(0,r);if(o===0)return"0%";let i=o/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var lu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Ea(){let t=De(async()=>{let[s,l,u,d]=await Promise.all([M("/token-quota/my"),M("/credits/balance"),M("/features"),M("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?K(l.data?.balance):null,balanceFailed:!l.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:lu(d)}}:s});if(t.state==="loading")return a(Ce,{panels:3,rows:2});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,o=e.features.redemption_codes!==!1,i=e.features.payment!==!1;return a(V,{children:[a(uu,{data:e,update:n,onFailed:t.reload}),a(fu,{data:e,payment:i,onRetry:t.reload}),r?.modelId?a(mu,{bg:r,update:n}):null,(e.inviteState!=="hidden"||o)&&a(hu,{data:e,update:n,redeemEnabled:o,onRedeemed:t.reload})]})}var Ta=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function cu(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function uu(t){let{t:e,locale:n,ctx:r}=F(),o=t.data.quota,i=ht(o.dailyRemaining,o.dailyLimit),s=ht(o.weeklyRemaining,o.weeklyLimit),l=sa(o.weeklyResetAt,n),u=Math.max(0,K(o.resetCards)??0),d=K(o.resetCardPricePoints)??100,p=B(),m=B(),[f,g]=E(null),[b,v]=E("1"),k=/^\d+$/.test(b.trim())?Number(b.trim()):NaN,T=Number.isInteger(k)&&k>=1&&k<=50,x=T?k*d:null,_=t.data.balance,A=x!==null&&_!==null&&_<x,R=()=>void p.run(async()=>{let z={daily:i,weekly:s},H=Ta(o);g(null);let re=j(),pe=await Mn(re.accountUseResetCard?()=>re.accountUseResetCard("both"):null,()=>M("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!pe.ok)return t.onFailed(),de(pe);let Pe=pe.data?.quota,Oe=K(pe.data?.resetCards);return t.update(gt=>({...gt,quota:{...gt.quota,...Pe??{},resetCards:Oe??gt.quota.resetCards}})),Pe&&!cu(r.app,{before:H,after:Ta(Pe),remainingCards:Oe??void 0})&&g({before:z,after:{daily:ht(Pe.dailyRemaining,Pe.dailyLimit),weekly:ht(Pe.weeklyRemaining,Pe.weeklyLimit)},cards:Oe}),{success:{key:"card.used"}}}),N=()=>void m.run(async()=>{if(!T)return{error:{key:"err.invalidCount"}};let z=await M("/points/exchange-reset-cards",{method:"POST",body:{count:k,expectedPricePerCard:d}});return z.ok?(t.update(H=>({...H,quota:{...H.quota,resetCards:K(z.data?.resetCards)??H.quota.resetCards},balance:K(z.data?.newPointsBalance)??H.balance})),v("1"),{success:{key:"card.exchanged",vars:{n:K(z.data?.cardsGranted)??k}}}):(t.onFailed(),de(z))}),G=z=>z.unlimited?e("common.unlimited"):z.text;return a(ne,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(Jt,{label:e("common.today"),display:i,note:i.unlimited?null:e("quota.resetDaily")}),a(Jt,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),a(xe,{label:e("card.title"),desc:e("card.desc"),children:[a("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:u})}),a(pt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:p.pending,disabled:u<=0,onConfirm:R})]}),u<=0&&!p.success&&a(se,{children:a(ge,{children:e("card.noneHint")})}),(p.error||p.success)&&a(se,{children:[a($,{a:p}),p.success&&f&&a("div",{class:"fx-ceremony",role:"status",children:[a("span",{children:[e("common.today")," ",a("b",{children:G(f.before.daily)})," \u2192 ",a("b",{children:G(f.after.daily)})]}),a("span",{children:[e("common.thisWeek")," ",a("b",{children:G(f.before.weekly)})," \u2192 ",a("b",{children:G(f.after.weekly)})]}),f.cards!==null&&a("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),a(xe,{label:e("card.exchange"),desc:e("card.price",{price:he(d,n)}),class:"fx-row--wide",children:[a("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:b,"aria-label":e("card.count"),onInput:z=>{v(z.currentTarget.value),m.clear()}}),a("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:he(x,n)}):e("card.countHint")}),a(pt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?he(x,n):"\u2014"}),pending:m.pending,disabled:!T||A,onConfirm:N})]}),(A||m.error||m.success)&&a(se,{children:[A&&!m.error&&a(ge,{tone:"warn",children:e("err.insufficientPoints")}),a($,{a:m})]})]})}function du(t,e,n){let r=B(),[o,i]=E(null);return{checked:o??t,toggle:l=>{i(l),r.run(async()=>{let u=await e(l);if(i(null),!u.ok)return de(u);n(l)})},action:r}}function fu(t){let{t:e,locale:n}=F(),r=B(),o=()=>void r.run(async()=>await In("credits")?void 0:{error:{key:"err.openFailed"}});return a(ne,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?a(I,{variant:"primary",pending:r.pending,onClick:o,children:e("points.recharge")}):void 0,children:[a(xe,{label:e("points.balance"),children:t.data.balance!==null?a("span",{class:"fx-big","data-testid":"points-balance",children:he(t.data.balance,n)}):a("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a(se,{children:a($,{a:r})})]})}var pu=[5,10,20];function mu(t){let{t:e}=F(),{bg:n}=t,r=ht(n.dailyRemaining,n.dailyLimit),o=ht(n.weeklyRemaining,n.weeklyLimit),i=B(),[s,l]=E(null),u=du(!!n.autoMain,p=>{let m=j();return Mn(m.accountBgAutoMain?()=>m.accountBgAutoMain(p):null,()=>M("/token-quota/background/auto-main",{method:"POST",body:{enabled:p}}))},p=>t.update(m=>({...m,quota:{...m.quota,background:{...m.quota.background??{},autoMain:p}}}))),d=p=>{l(p),i.run(async()=>{let m=j(),f=await Mn(m.accountBgConvert?()=>m.accountBgConvert(p):null,()=>M("/token-quota/background/convert",{method:"POST",body:{percent:p}}));if(l(null),!f.ok)return de(f);let g=f.data?.quota;return g&&t.update(v=>({...v,quota:{...v.quota,...g,resetCards:v.quota.resetCards,resetCardPricePoints:v.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:p}}}})};return a(ne,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(Jt,{label:e("common.today"),display:r}),a(Jt,{label:e("common.thisWeek"),display:o})]}),a(xe,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:a(_a,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),a(xe,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:pu.map(p=>a(pt,{label:`${p}%`,confirmLabel:e("bg.convertConfirm",{pct:p}),pending:i.pending&&s===p,disabled:i.pending&&s!==p,onConfirm:()=>d(p)},p))}),(i.error||i.success||u.action.error)&&a(se,{children:[a($,{a:u.action}),a($,{a:i})]})]})}function hu(t){let{t:e,locale:n}=F(),{invite:r,inviteState:o}=t.data,[i,s]=E(null),[l,u]=E(""),[d,p]=E(""),m=B(),f=B(),g=B();X(()=>{let x=!0;return j().authStatus?.().then(_=>{x&&s(_?.cloudUrl?_.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let b=async()=>{let x=await M("/invite/my-code");return t.update(_=>({..._,invite:x.ok?x.data:_.invite,inviteState:x.ok?"ok":x.status===404?"hidden":_.inviteState})),x},v=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let _=await M("/invite/claim",{method:"POST",body:{code:x}});return _.ok?(u(""),b(),{success:{key:"invite.claimed"}}):de(_)}),k=()=>void f.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let _=await M("/redemption/redeem",{method:"POST",body:{code:x}});if(!_.ok)return de(_);p(""),t.onRedeemed();let A=[],R=K(_.data?.creditsAmount);R&&A.push(e("redeem.gotPoints",{n:he(R,n)})),_.data?.membershipPlanId&&A.push(e("redeem.gotMembership"));for(let N of Array.isArray(_.data?.items)?_.data.items:[]){let G=(n==="zh"?N?.label?.zh:N?.label?.en)||N?.label?.zh||N?.label?.en||N?.kind;G&&A.push(G)}return{success:A.length?{key:"redeem.successWith",vars:{what:A.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),T=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return a(ne,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[o==="ok"&&r?.code&&a(xe,{label:e("invite.myCode"),desc:e("invite.count",{n:he(K(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[a("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),a(qn,{text:r.code,label:e("invite.copyCode")}),a(qn,{text:T,label:e("invite.copyLink"),disabled:!T})]}),o==="failed"&&a(se,{children:a(ge,{tone:"warn",children:[e("invite.loadFailed")," ",a("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await b()}),children:e("common.retry")})]})}),o==="ok"&&r?.claim?.eligible&&a(xe,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),v()},children:[a("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>u(x.currentTarget.value)}),a(I,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&a(se,{children:a($,{a:m})}),t.redeemEnabled&&a(xe,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),k()},children:[a("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>p(x.currentTarget.value)}),a(I,{submit:!0,pending:f.pending,children:e("redeem.submit")})]})}),(f.error||f.success)&&a(se,{children:a($,{a:f})})]})}var gu=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,bu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ca=(t,e)=>t==="phone"?gu.test(e):bu.test(e),Zt=(t,e)=>t==="phone"?Fn(e):Bn(e);function Pa(){let t=De(()=>M("/auth/me"));if(t.state==="loading")return a(Ce,{panels:3,rows:2});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let e=t.data;return a(V,{children:[a(xu,{me:e,onBound:(n,r)=>t.update(o=>({...o,[n]:r}))}),a(wu,{me:e}),a(Su,{}),a(Au,{me:e})]})}function Qr(){let t=ia(),e=B();return{cd:t,a:e,send:(o,i,s)=>e.run(async()=>{let l=await M("/auth/send-code",{method:"POST",body:{target:o,type:i,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):de(l)}),reset:()=>{t.stop(),e.clear()}}}function xu(t){let{t:e}=F(),[n,r]=E(null),[o,i]=E(null);return a(ne,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return a(V,{children:[a(xe,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Zt(s,l):e("account.contact.unbound"),children:a(I,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&a(yu,{kind:s,current:l??null,onDone:u=>{t.onBound(s,u),r(null),i(s)}}),o===s&&n!==s&&a(se,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function yu(t){let{t:e}=F(),{kind:n}=t,[r,o]=E(""),[i,s]=E(""),l=Qr(),u=B(),d=r.trim(),p=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!Ca(n,d)){l.a.run(async()=>({error:{key:p}}));return}l.send(d,n,"bind")},f=()=>void u.run(async()=>{if(!Ca(n,d))return{error:{key:p}};if(!i.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},b=await M(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!b.ok)return de(b);t.onDone(d)});return a(se,{class:"fx-form",children:[a("label",{class:"fx-field",children:[a("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),a("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>o(g.currentTarget.value)})]}),a(eo,{code:i,setCode:s,sender:l,onSend:m}),a("div",{class:"fx-inline",children:a(I,{variant:"primary",pending:u.pending,onClick:f,children:e("sec.bindSubmit")})}),a($,{a:u})]})}function eo(t){let{t:e}=F(),{cd:n,a:r}=t.sender;return a("div",{class:"fx-field",children:[a("span",{children:t.label??e("sec.code")}),a("div",{class:"fx-inline",children:[a("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:t.code,placeholder:e("sec.codePlaceholder"),"aria-label":t.label??e("sec.code"),onInput:o=>t.setCode(o.currentTarget.value)}),a(I,{pending:r.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),a($,{a:r})]})}function vu(t){let{t:e}=F(),n=ea(t.value),r=t.value.length>0,o=[[n.length,e("pw.req.length",{min:8,max:64})],[n.lower,e("pw.req.lower")],[n.upper,e("pw.req.upper")],[n.special,e("pw.req.special")],[n.space,e("pw.req.space")]];return a("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:o.map(([i,s])=>a("li",{class:i?"is-ok":r?"is-bad":"",children:[i?a(q,{name:"check",size:11}):r?a(q,{name:"x",size:11}):a("span",{class:"fx-rule-dot","aria-hidden":"true"}),a("span",{children:s})]},s))})}function Ma(t,e){let n=Qi(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:qr[n.rule]}}}function wu(t){let{t:e}=F(),n=["phone","email"].filter(l=>!!t.me[l]),[r,o]=E("current"),[i,s]=E(!1);return a(ne,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:a(I,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&a(se,{class:"fx-form",children:[a(mt,{label:e("pw.modeLabel"),value:r,onChange:o,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?a(ku,{onDone:()=>s(!1)}):n.length?a(_u,{me:t.me,targets:n,onDone:()=>s(!1)}):a(ge,{children:e("pw.codeNeedsContact")})]})})}function La(t){let{t:e}=F();return a(V,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.new")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),a(vu,{value:t.pw}),a("label",{class:"fx-field",children:[a("span",{children:e("pw.confirm")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function ku(t){let{t:e}=F(),[n,r]=E(""),[o,i]=E(""),[s,l]=E(""),u=B(),[d,p]=E(!1),m=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let f=Ma(o,s);if(f)return f;let g=await M("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:o}});return g.ok?(r(""),i(""),l(""),p(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:de(g)});return a(V,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.current")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:f=>r(f.currentTarget.value)})]}),a(La,{pw:o,setPw:i,confirm:s,setConfirm:l}),a("div",{class:"fx-inline",children:[a(I,{variant:"primary",pending:u.pending,onClick:m,children:e("pw.submit")}),d&&a(I,{onClick:t.onDone,children:e("common.done")})]}),a($,{a:u})]})}function _u(t){let{t:e}=F(),[n,r]=E(t.targets[0]),[o,i]=E(""),[s,l]=E(""),[u,d]=E(""),p=Qr(),m=B(),[f,g]=E(!1),b=t.me[n]||"",v=()=>void m.run(async()=>{if(!o.trim())return{error:{key:"err.codeRequired"}};let k=Ma(s,u);if(k)return k;let T=n==="phone"?{phone:b,code:o.trim(),newPassword:s}:{email:b,code:o.trim(),newPassword:s},x=await M("/auth/reset-password",{method:"POST",body:T});return x.ok?(i(""),l(""),d(""),g(!0),{success:{key:"pw.changed"}}):de(x)});return a(V,{children:[t.targets.length>1?a(mt,{label:e("pw.via"),value:n,onChange:k=>{r(k),i(""),p.reset()},options:t.targets.map(k=>({value:k,label:Zt(k,t.me[k])}))}):a(ge,{children:e("pw.codeTo",{target:Zt(n,b)})}),a(eo,{code:o,setCode:i,sender:p,onSend:()=>void p.send(b,n,"reset_password")}),a(La,{pw:s,setPw:l,confirm:u,setConfirm:d}),a("div",{class:"fx-inline",children:[a(I,{variant:"primary",pending:m.pending,onClick:v,children:e("pw.submitReset")}),f&&a(I,{onClick:t.onDone,children:e("common.done")})]}),a($,{a:m})]})}function Su(){let{t}=F(),e=B(),n=()=>void e.run(async()=>{let r=await M("/auth/logout-all",{method:"POST"});if(!r.ok)return de(r);try{await j().forsionLogout?.()}catch(o){return{error:{raw:Ke(o)}}}return{success:{key:"sec.logoutAllDone"}}});return a(ne,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[a(xe,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:a(pt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&a(se,{children:a($,{a:e})})]})}function Au(t){let{t:e}=F(),n=["phone","email"].filter(T=>!!t.me[T]),[r,o]=E(!1),[i,s]=E(n.length?"code":"password"),[l,u]=E(n[0]??null),[d,p]=E(""),[m,f]=E(""),g=Qr(),b=B(),v=l&&t.me[l]||"",k=()=>void b.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!m)return{error:{key:"pw.currentRequired"}};let T=await M("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:m}});if(!T.ok)return de(T);try{await j().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return a(ne,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:a(I,{variant:"danger",onClick:()=>{o(!r),b.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&a(se,{class:"fx-form",children:[a(ge,{tone:"error",children:e("del.warn")}),n.length>0&&a(mt,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&l?a(V,{children:[n.length>1&&a(mt,{label:e("pw.via"),value:l,onChange:T=>{u(T),p(""),g.reset()},options:n.map(T=>({value:T,label:Zt(T,t.me[T])}))}),a(eo,{code:d,setCode:p,sender:g,label:e("del.codeLabel",{target:Zt(l,v)}),onSend:()=>void g.send(v,l,"delete_account")})]}):a("label",{class:"fx-field",children:[a("span",{children:e("del.passwordLabel")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:m,onInput:T=>f(T.currentTarget.value)})]}),a("div",{class:"fx-inline",children:a(pt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:b.pending,onConfirm:k})}),a($,{a:b})]})})}var Da=20;function Na(){let t=De(async()=>{let[e,n]=await Promise.all([M("/token-quota/my"),M(`/token-quota/my/logs?limit=${Da}&offset=0`)]);if(!e.ok)return e;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:K(e.data?.dailyLimit),logs:r,total:n.ok?K(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?a(Ce,{panels:3,rows:2}):t.state==="signedOut"?a(Ne,{}):t.state==="error"?a(Re,{error:t.error,onRetry:t.retry}):a(V,{children:[a(Tu,{dailyLimit:t.data.dailyLimit}),a(Cu,{base:t.data,onRetry:t.reload})]})}function Tu(t){let{t:e,locale:n}=F(),[r,o]=E(30),[i,s]=E({state:"loading"}),[l,u]=E(!1),[d,p]=E(0),m=ee(0);X(()=>{let _=++m.current;return u(!0),M(`/usage/stats?days=${r}`).then(A=>{_===m.current&&(u(!1),s(A.ok?{state:"ready",data:A.data??{}}:{state:"error",fail:A}))}),()=>{m.current++}},[r,d]);let f=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Hn(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=_=>Hn(_,t.dailyLimit)??"\u2014",b=a(mt,{label:e("usage.range"),value:r,onChange:o,options:[{value:7,label:e("usage.days",{n:7})},{value:30,label:e("usage.days",{n:30})},{value:90,label:e("usage.days",{n:90})}]}),v=i.state==="ready"?i.data:null,k=(v?.byModel??[]).filter(Boolean),T=(v?.byProject??[]).filter(Boolean),x=K(v?.successRate);return a(V,{children:[a(ne,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:b,children:[i.state==="error"?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(_e(i.fail),e)}),a("button",{type:"button",class:"fx-link",onClick:()=>p(_=>_+1),children:e("common.retry")})]})}):a("div",{class:`fx-stats fx-block${l&&v?" is-refreshing":""}`,"aria-busy":l||void 0,children:[a(to,{label:e("usage.requests"),value:v?he(K(v.totalRequests)??0,n):null,testId:"usage-requests"}),a(to,{label:e("usage.successRate"),value:v?x===null?"\u2014":`${x.toFixed(1)}%`:null}),a(to,{label:e("usage.consumption"),value:v?g(v.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),f&&a("div",{class:"fx-sub fx-sub--tight",children:a(ge,{children:e(f)})})]}),i.state!=="error"&&a(V,{children:[a(ne,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:a(Ia,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:k.map(_=>[_.modelName||_.modelId||"\u2014",he(K(_.count)??0,n),g(_.pointsCost)])})}),a(ne,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:a(Ia,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:T.map(_=>[Oa(_.projectSource,e("usage.appUnknown")),he(K(_.count)??0,n),g(_.pointsCost)])})})]})]})}var Eu={tangu:"Tangu","ai-studio":"Forsion AI Studio",desktop:"Forsion Desktop",amadeus:"Amadeus",notebase:"Notebase",calendar:"Forsion Calendar",chat:"Forsion Chat",desk:"Forsion Desk","photo-studio":"Photo Studio",connect:"Forsion Connect"},Oa=(t,e)=>!t||t==="unknown"?e:Eu[t]??t;function to(t){return a("div",{class:"fx-stat",children:[a("span",{class:"fx-stat-label",children:t.label}),t.value===null?a("span",{class:"fx-skel fx-skel--stat"}):a("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&a("span",{class:"fx-stat-sub",children:t.sub})]})}function Ia(t){return t.loading?a("div",{class:"fx-sub",children:[a("span",{class:"fx-skel fx-skel--row"}),a("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?a("div",{class:"fx-table-wrap fx-block",children:a("table",{class:"fx-table",children:[a("thead",{children:a("tr",{children:t.head.map((e,n)=>a("th",{class:n?"is-num":"",children:e},n))})}),a("tbody",{children:t.rows.map((e,n)=>a("tr",{children:e.map((r,o)=>a("td",{class:o?"is-num":"",children:r},o))},n))})]})}):a(tt,{children:t.empty})}function Cu(t){let{t:e,locale:n}=F(),r=et(),[o,i]=E(t.base.logs??[]),[s,l]=E(t.base.total),u=B();X(()=>{i(t.base.logs??[]),l(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let m=await M(`/token-quota/my/logs?limit=${Da}&offset=${o.length}`);if(!m.ok)return{error:_e(m)};let f=Array.isArray(m.data?.logs)?m.data.logs:[];r.current&&(i(g=>[...g,...f]),l(g=>f.length?K(m.data?.total)??g:o.length))}),p=t.base.dailyLimit;return a(ne,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(_e(t.base.logsFail),e)}),a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):o.length===0?a(tt,{children:e("usage.recentEmpty")}):a("div",{class:"fx-list fx-block",role:"list",children:o.map((m,f)=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-main",children:[a("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&a("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),a("small",{children:[Lt(m.createdAt,n),Oa(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),a("span",{class:"fx-value",children:Hn(m.pointsCost,p)??"\u2014"})]},m.id??f))}),o.length>0&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("usage.shown",{shown:he(o.length,n),total:he(Math.max(s,o.length),n)})}),o.length<s&&a(I,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&a("div",{class:"fx-sub fx-sub--tight",children:a($,{a:u})})]})}var Kt=20,Wn=5,Ru=5*1024*1024,Xn=1e4,Pu={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Fa(t){let{t:e}=F(),n=t.status||"open",r=Pu[n];return a("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Ba(){let[t,e]=E(null),n=De(async()=>{let r=await M(`/feedback?limit=${Kt}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?a(Ce,{panels:1,rows:3}):n.state==="signedOut"?a(Ne,{}):n.state==="error"?a(Re,{error:n.error,onRetry:n.retry}):t?a(Nu,{id:t,onBack:()=>{e(null),n.reload()}}):a(Mu,{first:n.data,onOpen:e,onChanged:n.reload})}function Mu(t){let{t:e,locale:n}=F(),r=et(),[o,i]=E(t.first),[s,l]=E(t.first.length===Kt),[u,d]=E(!1),[p,m]=E(!1),f=B();X(()=>{i(t.first),l(t.first.length===Kt)},[t.first]);let g=()=>void f.run(async()=>{let b=await M(`/feedback?limit=${Kt}&offset=${o.length}`);if(!b.ok)return{error:_e(b)};let v=Array.isArray(b.data?.tickets)?b.data.tickets:[];r.current&&(i(k=>{let T=new Set(k.map(x=>x.id));return[...k,...v.filter(x=>!T.has(x.id))]}),l(v.length===Kt))});return a(ne,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:a(I,{variant:"primary",onClick:()=>{m(!1),d(!0)},children:[a(q,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&a(Du,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),m(!0),t.onChanged()}}),p&&!u&&a(se,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),o.length===0?a(tt,{children:e("fb.empty")}):a("div",{class:"fx-list fx-block",role:"list",children:o.map(b=>a("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(b.id),children:[a("span",{class:`fx-dot${b.user_unread?" is-on":""}`,"aria-label":b.user_unread?e("fb.unread"):void 0}),a("span",{class:"fx-list-main",children:[a("strong",{children:b.title||(b.description||"").slice(0,60)||e("fb.untitled")}),a("small",{children:Lt(b.updated_at||b.created_at,n)})]}),a(Fa,{status:b.status}),a(q,{name:"chevron",size:12})]},b.id))}),o.length>0&&(s||f.error)&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("fb.shown",{n:he(o.length,n)})}),s&&a(I,{pending:f.pending,onClick:g,children:e("common.loadMore")})]}),f.error&&a(se,{children:a($,{a:f})})]})}function Lu(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(t)})}var Iu=0;function Du(t){let{t:e}=F(),n=et(),[r,o]=E(""),[i,s]=E([]),[l,u]=E(null),[d,p]=E(!1),m=ee(null),f=B(),[g,b]=E(0),v=ee(0);v.current=i.length;let k=async x=>{u(null);for(let _ of Array.from(x||[])){if(!_.type||!_.type.startsWith("image/")){u({key:"err.imageType"});continue}if(_.size>Ru){u({key:"err.imageTooLarge"});continue}if(v.current>=Wn){u({key:"err.tooManyImages"});break}v.current++,b(A=>A+1);try{let A=await Lu(_);if(!n.current)return;let R={id:`img-${++Iu}`,filename:_.name||"image",mime_type:_.type,size:_.size,data_base64:A.replace(/^data:[^;]+;base64,/,""),url:A};s(N=>N.length>=Wn?N:[...N,R])}catch{v.current--,u({key:"err.imageRead"})}finally{n.current&&b(A=>A-1)}}},T=()=>void f.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>Xn)return{error:{key:"err.feedbackTooLong"}};let _=i.map(({filename:R,mime_type:N,size:G,data_base64:z})=>({filename:R,mime_type:N,size:G,data_base64:z})),A=await M("/feedback",{method:"POST",body:{description:x,attachments:_},timeoutMs:12e4});if(!A.ok)return de(A);t.onSubmitted()});return a("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let _=Array.from(x.clipboardData?.items||[]).filter(A=>A.kind==="file").map(A=>A.getAsFile()).filter(Boolean);_.length&&(x.preventDefault(),k(_))},onDragOver:x=>{x.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:x=>{x.preventDefault(),p(!1),k(x.dataTransfer?.files)},children:[a("label",{class:"fx-field",children:[a("span",{children:e("fb.descLabel")}),a("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:Xn,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>o(x.currentTarget.value)})]}),a("p",{class:"fx-note",children:e("fb.imagesHint",{n:Wn})}),i.length>0&&a("div",{class:"fx-thumbs",children:i.map(x=>a("span",{class:"fx-thumb",children:[a("img",{src:x.url,alt:x.filename}),a("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(_=>_.filter(A=>A.id!==x.id)),u(null)},children:a(q,{name:"x",size:11})})]},x.id))}),l&&a("div",{class:"fx-msg is-error",role:"alert",children:$e(l,e)}),a("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let _=x.currentTarget;k(_.files),_.value=""}}),a("div",{class:"fx-inline",children:[a(I,{disabled:i.length>=Wn||f.pending,onClick:()=>m.current?.click(),children:[a(q,{name:"image",size:12})," ",e("fb.addImages")]}),a("span",{class:"fx-grow"}),a(I,{disabled:f.pending,onClick:t.onCancel,children:e("common.cancel")}),a(I,{variant:"primary",pending:f.pending,disabled:g>0,onClick:T,children:e("fb.submit")})]}),a($,{a:f})]})}function Nu(t){let{t:e,locale:n}=F(),[r,o]=E({state:"loading"}),[i,s]=E(0),[l,u]=E(""),[d,p]=E(null),m=B(),f=ee(0);X(()=>{let A=++f.current;return M(`/feedback/${encodeURIComponent(t.id)}`).then(R=>{if(A===f.current){if(!R.ok){o({state:"error",fail:R});return}o({state:"ready",data:{ticket:R.data.ticket,replies:R.data.replies??[],attachments:R.data.attachments??[]}}),M(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{f.current++}},[t.id,i]),X(()=>{if(!d)return;let A=R=>{R.key==="Escape"&&p(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[d]);let g=a("div",{class:"fx-back",children:a(I,{onClick:t.onBack,children:[a(q,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return a(V,{children:[g,a(Ce,{panels:1,rows:3})]});if(r.state==="error")return a(V,{children:[g,a(Re,{error:_e(r.fail),onRetry:()=>{o({state:"loading"}),s(A=>A+1)}})]});let{ticket:b,replies:v,attachments:k}=r.data,T=b.status==="closed",x=A=>k.filter(R=>(R.reply_id??null)===A),_=()=>void m.run(async()=>{let A=l.trim();if(!A)return{error:{key:"err.replyEmpty"}};if(A.length>Xn)return{error:{key:"err.replyTooLong"}};let R=await M(`/feedback/${encodeURIComponent(b.id)}/replies`,{method:"POST",body:{content:A},timeoutMs:6e4});return R.ok?(u(""),s(N=>N+1),{success:{key:"fb.replySent"}}):de(R)});return a(V,{children:[g,a(ne,{icon:"message",title:b.title||e("fb.untitled"),actions:a(Fa,{status:b.status}),desc:`#${String(b.id).slice(0,8)} \xB7 ${Lt(b.created_at,n)}`,children:[a("div",{class:"fx-thread fx-block",children:[a(za,{who:"user",when:b.created_at,text:b.description||"",files:x(null),onZoom:p}),v.map((A,R)=>a(za,{who:A.author_role==="user"?"user":"admin",when:A.created_at,text:A.content||"",files:A.id?x(A.id):[],onZoom:p},A.id??R))]}),T?a(se,{children:a(ge,{children:e("fb.closedNote")})}):a(se,{class:"fx-form",children:[a("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:Xn,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:A=>{u(A.currentTarget.value),m.success&&m.clear()}}),a("div",{class:"fx-inline",children:[a("span",{class:"fx-grow"}),a(I,{variant:"primary",pending:m.pending,onClick:_,children:e("fb.replySend")})]}),a($,{a:m})]})]}),d&&a("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>p(null),children:a("img",{src:d,alt:""})})]})}function za(t){let{t:e,locale:n}=F();return a("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[a("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",Lt(t.when,n)]}),a("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&a("div",{class:"fx-thumbs",children:t.files.map((r,o)=>{let i=r.mime_type||"";if(i.startsWith("image/")&&r.data_base64){let s=`data:${i};base64,${r.data_base64}`;return a("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:a("img",{src:s,alt:r.filename||""})},r.id??o)}return a("span",{class:"fx-tag",children:[a(q,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??o)})})]})}var Ou="forsion-extend",$a=[{id:"account",titleKey:"page.account",Component:Aa},{id:"quota",titleKey:"page.quota",Component:Ea},{id:"security",titleKey:"page.security",Component:Pa},{id:"usage",titleKey:"page.usage",Component:Na},{id:"feedback",titleKey:"page.feedback",Component:Ba}],zu=t=>`forsion/fx:${Ou}:${t}`;function Fu(t){let{ctx:e,page:n}=t,[r,o]=E(()=>Be(e.getLocale?.()));X(()=>{o(Be(e.getLocale?.()));let l=e.subscribeLocale?.(u=>o(Be(u)));return()=>{typeof l=="function"&&l()}},[e]);let i=Je(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:Nn(r),goTo:typeof l=="function"?u=>l.call(e.app,zu(u)):null}},[e,r]),s=n.Component;return a(Hr.Provider,{value:i,children:a("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[a("style",{children:Vi}),a(s,{})]})})}function Ua(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let r of $a)t.registerSettingsView({id:r.id,category:"forsion",title:()=>Ur(Be(t.getLocale?.()),r.titleKey),mount(o){return Pt(a(Fu,{ctx:t,page:r}),o),()=>{Pt(null,o)}}});return $a.length}var qa;if(typeof ctx<"u"){Ua(ctx);let t=Ki(ctx);t&&(qa=()=>t.dispose())}return ks(Bu);})();
299
+ return __fxExtend.dispose;