twikoo 2.0.14 → 2.0.15

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.
@@ -166,21 +166,21 @@ ${[`verifyOtp`,`signInWithOtp`,`signUp`].includes(n)?`
166
166
  ✓ 控制台已开启「短信验证码登录」或「邮箱验证码登录」`,signInWithOAuth:`当前使用「第三方 OAuth 登录」,需确保:
167
167
  ✓ 控制台已配置并开启对应的第三方身份源`}[e]||``}var I=function(e){function t(t,n){var r=this,o=function(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}(t);return(r=e.call(this,o?t.message:t.error_description||t.message)||this).__isAuthError=!0,r.name=`AuthError`,o?(r.status=t.status,r.code=t.code,r.errorCode=t.errorCode,r.requestId=t.requestId,r.category=t.category,r.retryAfter=t.retryAfter,r.helpMessage=$e(r.category,{method:n?.method,errorCode:r.errorCode,code:r.code}),r.loginMethodHint=et(n?.method),r):(r.status=t.error,r.code=String(t.error||t.error_code||`unknown`).toLowerCase(),r.errorCode=typeof t.error_code==`number`?t.error_code:typeof t.error_code==`string`&&parseInt(t.error_code,10)||void 0,r.requestId=t.requestId,r.category=function(e,t,n){if(!e&&!t&&!n)return F.UNKNOWN;try{var r=(e||``).toLowerCase(),o=typeof n==`string`?parseInt(n,10):n;return o===a.MISSING_REQUIRED_PARAM||t===i.MISSING_REQUIRED_PARAM?F.INVALID_PARAMS:o===a.CAPTCHA_REQUIRED||t===i.CAPTCHA_REQUIRED?F.CAPTCHA_REQUIRED:o===a.CAPTCHA_INVALID||t===i.CAPTCHA_INVALID?F.CAPTCHA_INVALID:o===a.MFA_PHONE_REQUIRED||t===i.MFA_PHONE_REQUIRED?F.MFA_REQUIRED:o===a.LOGIN_TYPE_DISABLED||t===i.LOGIN_TYPE_DISABLED?F.PROVIDER_NOT_ENABLED:o===a.RESOURCE_EXHAUSTED||t===i.RESOURCE_EXHAUSTED?F.RATE_LIMITED:o===a.INTERNAL||o===a.UNAVAILABLE||o===a.UNIMPLEMENTED||o===a.ABORTED?F.SERVICE_ERROR:o===a.NOT_FOUND?F.USER_NOT_FOUND:o===a.UNAUTHENTICATED?F.INVALID_CREDENTIALS:o===a.INVALID_ARGUMENT&&(r.includes(`验证码`)||r.includes(`verification`)||r.includes(`verification_code`)||r.includes(`verification_id`)||r.includes(`does not match`)||r.includes(`token expired`)||r.includes(`token error`)||r.includes(`过期`))?F.VERIFICATION_FAILED:t===i.PROVIDER_NOT_ENABLED||t===i.LOGIN_METHOD_DISABLED||r.includes(`身份源`)||r.includes(`开启`)||r.includes(`identity provider`)||r.includes(`provider not enabled`)||r.includes(`login method`)||r.includes(`登录方式`)||r.includes(`not enabled`)||r.includes(`未开启`)||r.includes(`未启用`)||r.includes(`请联系开发者`)||r.includes(`anonymous login is not enabled`)||r.includes(`匿名登录未开启`)?F.PROVIDER_NOT_ENABLED:t===i.FAILED_PRECONDITION||o===a.FAILED_PRECONDITION&&!r.includes(`请联系开发者`)?r.includes(`不存在`)||r.includes(`not found`)||r.includes(`未注册`)?F.USER_NOT_FOUND:F.PRECONDITION_FAILED:t===i.INVALID_PASSWORD||t===i.INVALID_GRANT||t===i.INVALID_VERIFICATION_CODE||t===i.INVALID_USERNAME_OR_PASSWORD||t===i.INVALID_CREDENTIALS||t===i.WRONG_PASSWORD||t===i.UNAUTHENTICATED||t===i.INVALID_TWO_FACTOR||t===i.INVALID_TWO_FACTOR_RECOVERY||t===i.PASSWORD_NOT_SET||r.includes(`密码不正确`)||r.includes(`password`)||r.includes(`invalid_password`)||r.includes(`凭据`)||r.includes(`credentials`)||r.includes(`验证码`)||r.includes(`verification`)||r.includes(`invalid_verification_code`)||r.includes(`invalid_username_or_password`)||r.includes(`username or password`)||r.includes(`用户名或密码`)||r.includes(`wrong password`)||r.includes(`incorrect password`)?F.INVALID_CREDENTIALS:t===i.NOT_FOUND||t===i.USER_NOT_FOUND||r.includes(`用户不存在`)||r.includes(`not found`)||r.includes(`user not found`)||r.includes(`no such user`)||r.includes(`user does not exist`)?F.USER_NOT_FOUND:t===i.USER_BLOCKED||t===i.USER_PENDING||t===i.UNDER_REVIEW||t===i.INVALID_STATUS||r.includes(`被封禁`)||r.includes(`blocked`)||r.includes(`pending`)||r.includes(`审核`)||r.includes(`review`)||r.includes(`locked`)||r.includes(`已锁定`)?F.USER_STATUS_ABNORMAL:t===i.SERVER_ERROR||t===i.UNAVAILABLE||t===i.TEMPORARILY_UNAVAILABLE||t===i.INTERNAL||t===i.UNREACHABLE||t===i.DEADLINE_EXCEEDED||t===i.DATA_LOSS||t===i.ABORTED||r.includes(`network`)||r.includes(`timeout`)||r.includes(`timed out`)||r.includes(`超时`)||r.includes(`smtp is not set`)||r.includes(`sms sender does not config`)?F.SERVICE_ERROR:t===i.INVALID_ARGUMENT||t===i.INVALID_REQUEST||t===i.INVALID_SCOPE||t===i.INVALID_REQUEST_URI||t===i.INVALID_REQUEST_OBJECT||o===a.INVALID_ARGUMENT?F.INVALID_PARAMS:t===i.PERMISSION_DENIED||t===i.ACCESS_DENIED||t===i.UNAUTHORIZED_CLIENT?F.PROVIDER_NOT_ENABLED:F.UNKNOWN}catch{return t}}(r.message,r.status,r.errorCode),r.helpMessage=$e(r.category,{method:n?.method,errorCode:r.errorCode,code:r.code}),r.loginMethodHint=et(n?.method),r.category===F.RATE_LIMITED&&(r.retryAfter=t.retry_after||t.retryAfter||void 0),r)}return Xe(t,e),t.prototype.toJSON=function(){return{name:this.name,message:this.message,code:this.code,errorCode:this.errorCode,status:this.status,requestId:this.requestId,category:this.category,retryAfter:this.retryAfter}},t}(Error),tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tt.apply(this,arguments)},L=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},R=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};function nt(e,t){return L(this,void 0,void 0,function(){var n,r=this;return R(this,function(i){n=function(){return L(r,void 0,void 0,function(){return R(this,function(e){switch(e.label){case 0:return e.trys.push([0,1,,6]),[2,mo(171)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,Promise.resolve().then(mo.bind(mo,171))];case 3:return[2,e.sent()];case 4:return e.sent(),[2];case 5:return[3,6];case 6:return[2]}})})};try{if((t?.root?.globalThis||globalThis).IS_MP_BUILD)return[2];if(e)return[2,n()]}catch{if(e)return[2,n()]}return[2]})})}var rt=function(){function e(e){var t=e.request,n=e.credentialsClient;if(n||=new Pe({apiOrigin:e.apiOrigin,apiPath:e.apiPath,clientId:e.clientId,storage:e.storage,env:e.env,baseRequest:e.baseRequest,anonymousSignInFunc:e.anonymousSignInFunc,wxCloud:e.wxCloud,onCredentialsError:e.onCredentialsError,headers:e.headers||{},i18n:e.i18n,debug:e.debug}),!t){var r=n.request.bind(n),i=new Je(tt({env:e.env,clientId:e.clientId,request:r,storage:e.storage,adapter:e.adapter,oauthInstance:this},e.captchaOptions));t=i.request.bind(i)}this.config={env:e.env,apiOrigin:e.apiOrigin,apiPath:e.apiPath,clientId:e.clientId,request:t,credentialsClient:n,storage:e.storage||Me,adapter:e.adapter}}return e.parseParamsToSearch=function(e){return Object.keys(e).forEach(function(t){e[t]||delete e[t]}),new Ye(e).toString()},e.prototype.getParamsByVersion=function(e,r){var i=(0,w.I)(e),a={v2:n}[i?.version]?.[r]||t[r];return i&&delete i.version,{params:i,url:a}},e.prototype.signIn=function(e){return L(this,void 0,Promise,function(){var t,n,r,i;return R(this,function(a){switch(a.label){case 0:return t=e.version||`v1`,(n=this.getParamsByVersion(e,`AUTH_SIGN_IN_URL`)).params.query&&delete n.params.query,[4,this.getEncryptParams(n.params)];case 1:return r=a.sent(),[4,this.config.request(n.url,{method:`POST`,body:r})];case 2:return i=a.sent(),[4,this.config.credentialsClient.setCredentials(tt(tt({},i),{version:t}))];case 3:return a.sent(),[2,Promise.resolve(i)]}})})},e.prototype.signInAnonymously=function(e,n){return e===void 0&&(e={}),n===void 0&&(n=!1),L(this,void 0,Promise,function(){var r;return R(this,function(i){switch(i.label){case 0:return[4,this.config.request(t.AUTH_SIGN_IN_ANONYMOUSLY_URL,{method:`POST`,body:e,useWxCloud:n})];case 1:return r=i.sent(),[4,this.config.credentialsClient.setCredentials(r)];case 2:return i.sent(),[2,Promise.resolve(r)]}})})},e.prototype.signUp=function(e){return L(this,void 0,Promise,function(){var n;return R(this,function(r){switch(r.label){case 0:return[4,this.config.request(t.AUTH_SIGN_UP_URL,{method:`POST`,body:e})];case 1:return n=r.sent(),[4,this.config.credentialsClient.setCredentials(n)];case 2:return r.sent(),[2,Promise.resolve(n)]}})})},e.prototype.signOut=function(e){return L(this,void 0,Promise,function(){var n,r,a,o;return R(this,function(s){switch(s.label){case 0:if(n={},!e)return[3,6];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.config.request(t.AUTH_SIGNOUT_URL,{method:`POST`,withCredentials:!0,body:e})];case 2:return n=s.sent(),[3,4];case 3:return(r=s.sent()).error!==i.UNAUTHENTICATED&&console.log(`sign_out_error`,r),[3,4];case 4:return[4,this.config.credentialsClient.setCredentials()];case 5:return s.sent(),[2,n];case 6:return[4,this.config.credentialsClient.getAccessToken()];case 7:return a=s.sent(),[4,this.config.request(t.AUTH_REVOKE_URL,{method:`POST`,body:{token:a}})];case 8:return o=s.sent(),[4,this.config.credentialsClient.setCredentials()];case 9:return s.sent(),[2,Promise.resolve(o)]}})})},e.prototype.revokeAllDevices=function(){return L(this,void 0,Promise,function(){return R(this,function(e){switch(e.label){case 0:return[4,this.config.request(t.AUTH_REVOKE_ALL_URL,{method:`DELETE`,withCredentials:!0})];case 1:return e.sent(),[2]}})})},e.prototype.revokeDevice=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){switch(n.label){case 0:return[4,this.config.request(t.AUTHORIZED_DEVICES_DELETE_URL+e.device_id,{method:`DELETE`,withCredentials:!0})];case 1:return n.sent(),[2]}})})},e.prototype.getVerification=function(e,n){return L(this,void 0,Promise,function(){var r,i;return R(this,function(a){switch(a.label){case 0:return r=!1,e.target===`CUR_USER`?(r=!0,[3,3]):[3,1];case 1:return[4,this.hasLoginState()];case 2:a.sent()&&(r=!0),a.label=3;case 3:return(i=(0,w.I)(e)).phone_number&&!/^\+\d{1,3}\s+\d+/.test(i.phone_number)&&(i.phone_number=`+86 ${i.phone_number}`),[2,this.config.request(t.VERIFICATION_URL,{method:`POST`,body:i,withCaptcha:n?.withCaptcha||!1,withCredentials:r})]}})})},e.prototype.verify=function(e){return L(this,void 0,Promise,function(){var t,n;return R(this,function(r){switch(r.label){case 0:return t=this.getParamsByVersion(e,`VERIFY_URL`),[4,this.config.request(t.url,{method:`POST`,body:t.params})];case 1:return n=r.sent(),e?.version===`v2`?[4,this.config.credentialsClient.setCredentials(tt(tt({},n),{version:`v2`}))]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2,n]}})})},e.prototype.genProviderRedirectUri=function(n){return L(this,void 0,Promise,function(){var r,i,a,o,s;return R(this,function(c){return r=n.provider_redirect_uri,i=n.other_params,a=i===void 0?{}:i,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,[`provider_redirect_uri`,`other_params`]),r&&!o.redirect_uri&&(o.redirect_uri=r),s=`${t.PROVIDER_URI_URL}?${e.parseParamsToSearch(o)}`,Object.keys(a).forEach(function(e){var t=a[e];(e!==`sign_out_uri`||t?.length>0)&&(s+=`&other_params[${e}]=${encodeURIComponent(t)}`)}),[2,this.config.request(s,{method:`GET`})]})})},e.prototype.grantProviderToken=function(e,n){return n===void 0&&(n=!1),L(this,void 0,Promise,function(){return R(this,function(r){return[2,this.config.request(t.PROVIDER_TOKEN_URL,{method:`POST`,body:e,useWxCloud:n})]})})},e.prototype.patchProviderToken=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.PROVIDER_TOKEN_URL,{method:`PATCH`,body:e})]})})},e.prototype.signInWithProvider=function(e,t){return t===void 0&&(t=!1),L(this,void 0,Promise,function(){var n,r;return R(this,function(i){switch(i.label){case 0:return n=this.getParamsByVersion(e,`AUTH_SIGN_IN_WITH_PROVIDER_URL`),[4,this.config.request(n.url,{method:`POST`,body:n.params,useWxCloud:t})];case 1:return r=i.sent(),[4,this.config.credentialsClient.setCredentials(tt(tt({},r),{version:e?.version||`v1`}))];case 2:return i.sent(),[2,Promise.resolve(r)]}})})},e.prototype.toBindIdentity=function(e){var t,n;return L(this,void 0,void 0,function(){var r,i,a,o;return R(this,function(s){switch(s.label){case 0:return(i=e.credentials)?[3,2]:[4,this.config.credentialsClient.localCredentials.getCredentials()];case 1:i=s.sent(),s.label=2;case 2:r=i,s.label=3;case 3:return s.trys.push([3,5,,6]),[4,this.bindWithProvider({provider_token:e.provider_token},r)];case 4:return s.sent(),a={data:{type:x,provider:e.provider},error:null},[3,6];case 5:return o=s.sent(),a={data:{type:x},error:new I(o)},[3,6];case 6:return e.fireEvent&&((n=(t=this.config.eventBus)?.fire)==null||n.call(t,v,{event:g,info:a})),[2,a]}})})},e.prototype.getInitialSession=function(){return L(this,void 0,Promise,function(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m;return R(this,function(h){switch(h.label){case 0:e={},h.label=1;case 1:if(h.trys.push([1,12,,13]),typeof window>`u`||typeof document>`u`||(t=new URLSearchParams(location==null?void 0:location.search),n=t.get(`code`),r=t.get(`state`),!n||!r))return[2,{data:null,error:null}];i=null;try{i=JSON.parse(sessionStorage.getItem(r)||`null`)}catch{}return e={type:i?.type},a=t.get(`error`),o=t.get(`error_description`),a||o?[2,{data:e,error:new I({message:o||a||`Unknown error from OAuth provider`})}]:(s=i?.provider||t.get(`provider`))?(c=location.origin+location.pathname,[4,this.grantProviderToken({provider_id:s,provider_redirect_uri:c,provider_code:n})]):[2,{data:e,error:new I({message:`Provider is required for OAuth verification`})}];case 2:return l=h.sent().provider_token,u=void 0,d=null,f=void 0,i.type===x?[4,this.config.credentialsClient.localCredentials.getCredentials()]:[3,5];case 3:return u=h.sent(),[4,this.toBindIdentity({provider:s,provider_token:l,credentials:u})];case 4:return f=h.sent(),[3,11];case 5:return i.type===y?(f=this.getParamsByVersion({provider:s},`AUTH_SIGN_IN_WITH_PROVIDER_URL`),[4,this.config.request(f.url,{method:`POST`,body:{provider_token:l}})]):[3,11];case 6:u=h.sent(),h.label=7;case 7:return h.trys.push([7,9,,10]),[4,this.getUserInfo({credentials:u})];case 8:return d=h.sent(),[3,10];case 9:return p=h.sent(),console.error(`get user info error`,p),[3,10];case 10:f={data:tt(tt({},e),{session:u,user:d}),error:null},h.label=11;case 11:t.delete(`code`),t.delete(`state`),t.delete(`provider`),this.restoreUrlState(i?.search===void 0?`?${t.toString()}`:i.search,i?.hash||location.hash);try{sessionStorage.removeItem(r)}catch{}return[2,f];case 12:return m=h.sent(),[2,{data:e,error:new I(m)}];case 13:return[2]}})})},e.prototype.signInCustom=function(e){return L(this,void 0,Promise,function(){var n;return R(this,function(r){switch(r.label){case 0:return[4,this.config.request(t.AUTH_SIGN_IN_CUSTOM,{method:`POST`,body:e})];case 1:return n=r.sent(),[4,this.config.credentialsClient.setCredentials(n)];case 2:return r.sent(),[2,Promise.resolve(n)]}})})},e.prototype.signInWithWechat=function(e){return e===void 0&&(e={}),L(this,void 0,Promise,function(){var n;return R(this,function(r){switch(r.label){case 0:return[4,this.config.request(t.AUTH_SIGN_IN_WITH_WECHAT_URL,{method:`POST`,body:e})];case 1:return n=r.sent(),[4,this.config.credentialsClient.setCredentials(n)];case 2:return r.sent(),[2,Promise.resolve(n)]}})})},e.prototype.bindWithProvider=function(e,n){return L(this,void 0,Promise,function(){return R(this,function(r){return[2,this.config.request(t.PROVIDER_BIND_URL,{method:`POST`,body:e,withCredentials:!0,getCredentials:n?function(){return n}:void 0})]})})},e.prototype.getUserProfile=function(e){return L(this,void 0,Promise,function(){return R(this,function(t){return[2,this.getUserInfo(e)]})})},e.prototype.getUserInfo=function(e){var t;return e===void 0&&(e={}),L(this,void 0,Promise,function(){var n,r,i,a,o;return R(this,function(s){switch(s.label){case 0:return n=this.getParamsByVersion(e,`USER_ME_URL`),(t=n.params)!=null&&t.query&&(r=new Ye(n.params.query),n.url+=`?${r.toString()}`),[4,this.config.request(n.url,{method:`GET`,withCredentials:!0,getCredentials:e.credentials?function(){return e.credentials}:void 0})];case 1:if((i=s.sent()).sub&&(i.uid=i.sub),i.providers?.length)try{typeof wx<`u`&&wx.getAccountInfoSync&&(a=wx.getAccountInfoSync().miniProgram?.appId,(o=i.providers.find(function(e){return e.id===a}))!=null&&o.provider_user_id&&(i.open_id=o.provider_user_id))}catch{}return[2,i]}})})},e.prototype.getWedaUserInfo=function(){return L(this,void 0,Promise,function(){return R(this,function(e){switch(e.label){case 0:return[4,this.config.request(t.WEDA_USER_URL,{method:`GET`,withCredentials:!0})];case 1:return[2,e.sent()]}})})},e.prototype.deleteMe=function(t){return L(this,void 0,Promise,function(){var n,r;return R(this,function(i){return n=this.getParamsByVersion(t,`USER_ME_URL`),r=`${n.url}?${e.parseParamsToSearch(n.params)}`,[2,this.config.request(r,{method:`DELETE`,withCredentials:!0})]})})},e.prototype.hasLoginState=function(){return L(this,void 0,Promise,function(){return R(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.config.credentialsClient.getAccessToken()];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})},e.prototype.hasLoginStateSync=function(){return this.config.credentialsClient.getCredentialsSync()},e.prototype.getLoginState=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.credentialsClient.getCredentialsAsync()]})})},e.prototype.transByProvider=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.USER_TRANS_BY_PROVIDER_URL,{method:`PATCH`,body:e,withCredentials:!0})]})})},e.prototype.grantToken=function(e){return L(this,void 0,Promise,function(){var t;return R(this,function(n){return t=this.getParamsByVersion(e,`AUTH_TOKEN_URL`),[2,this.config.request(t.url,{method:`POST`,body:t.params})]})})},e.prototype.getProviders=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.request(t.PROVIDER_LIST,{method:`GET`,withCredentials:!0})]})})},e.prototype.unbindProvider=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.PROVIDER_UNBIND_URL}/${e.provider_id}`,{method:`DELETE`,withCredentials:!0})]})})},e.prototype.checkPassword=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.CHECK_PWD_URL}`,{method:`POST`,withCredentials:!0,body:e})]})})},e.prototype.editContact=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.BIND_CONTACT_URL}`,{method:`PATCH`,withCredentials:!0,body:e})]})})},e.prototype.setPassword=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.AUTH_SET_PASSWORD}`,{method:`PATCH`,withCredentials:!0,body:e})]})})},e.prototype.updatePasswordByOld=function(e){return L(this,void 0,Promise,function(){var t;return R(this,function(n){switch(n.label){case 0:return[4,this.sudo({password:e.old_password})];case 1:return t=n.sent(),[2,this.setPassword({sudo_token:t.sudo_token,new_password:e.new_password})]}})})},e.prototype.sudo=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.SUDO_URL}`,{method:`POST`,withCredentials:!0,body:e})]})})},e.prototype.sendVerificationCodeToCurrentUser=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return e.target=`CUR_USER`,[2,this.config.request(t.VERIFICATION_URL,{method:`POST`,body:e,withCredentials:!0,withCaptcha:!0})]})})},e.prototype.changeBoundProvider=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(`${t.PROVIDER_LIST}/${e.provider_id}/trans`,{method:`POST`,body:{provider_trans_token:e.trans_token},withCredentials:!0})]})})},e.prototype.setUserProfile=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.USER_PRIFILE_URL,{method:`PATCH`,body:e,withCredentials:!0})]})})},e.prototype.updateUserBasicInfo=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.USER_BASIC_EDIT_URL,{method:`POST`,withCredentials:!0,body:e})]})})},e.prototype.queryUserProfile=function(e){return L(this,void 0,Promise,function(){var n;return R(this,function(r){return n=new Ye(e),[2,this.config.request(`${t.USER_QUERY_URL}?${n.toString()}`,{method:`GET`,withCredentials:!0})]})})},e.prototype.setCustomSignFunc=function(e){this.getCustomSignTicketFn=e},e.prototype.signInWithCustomTicket=function(){return L(this,void 0,Promise,function(){var e,t;return R(this,function(n){switch(n.label){case 0:return(e=this.getCustomSignTicketFn)?[4,e()]:[2,Promise.reject({error:`failed_precondition`,error_description:`please use setCustomSignFunc to set custom sign function`})];case 1:return t=n.sent(),[2,this.signInCustom({provider_id:`custom`,ticket:t})]}})})},e.prototype.resetPassword=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.AUTH_RESET_PASSWORD,{method:`POST`,body:e})]})})},e.prototype.authorize=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.AUTHORIZE_URL,{method:`POST`,withCredentials:!0,body:e})]})})},e.prototype.authorizeDevice=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.AUTHORIZE_DEVICE_URL,{method:`POST`,withCredentials:!0,body:e})]})})},e.prototype.deviceAuthorize=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.AUTH_GET_DEVICE_CODE,{method:`POST`,body:e})]})})},e.prototype.authorizeInfo=function(n){return L(this,void 0,Promise,function(){var r,i,a;return R(this,function(o){switch(o.label){case 0:return r=`${t.AUTHORIZE_INFO_URL}?${e.parseParamsToSearch(n)}`,i=!0,a=!1,[4,this.hasLoginState()];case 1:return o.sent()&&(a=!0,i=!1),[2,this.config.request(r,{method:`GET`,withBasicAuth:i,withCredentials:a})]}})})},e.prototype.checkUsername=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.CHECK_USERNAME,{method:`GET`,body:e,withCredentials:!0})]})})},e.prototype.checkIfUserExist=function(e){return L(this,void 0,Promise,function(){var n;return R(this,function(r){return n=new Ye(e),[2,this.config.request(`${t.CHECK_IF_USER_EXIST}?${n.toString()}`,{method:`GET`})]})})},e.prototype.loginScope=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.credentialsClient.getScope()]})})},e.prototype.loginGroups=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.credentialsClient.getGroups()]})})},e.prototype.refreshTokenForce=function(e){return L(this,void 0,void 0,function(){var t;return R(this,function(n){switch(n.label){case 0:return[4,this.config.credentialsClient.getCredentials()];case 1:return t=n.sent(),[4,this.config.credentialsClient.refreshToken(tt(tt({},t),{version:e?.version||`v1`}))];case 2:return[2,n.sent()]}})})},e.prototype.getCredentials=function(){return L(this,void 0,void 0,function(){return R(this,function(e){return[2,this.config.credentialsClient.getCredentials()]})})},e.prototype.getPublicKey=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.request(n.AUTH_PUBLIC_KEY,{method:`POST`,body:{}})]})})},e.prototype.getEncryptParams=function(e){return L(this,void 0,Promise,function(){var t,n,r,i,a,o;return R(this,function(s){switch(s.label){case 0:return t=e.isEncrypt,delete e.isEncrypt,n=(0,w.I)(e),[4,nt(t,this.config.adapter)];case 1:if(!(r=s.sent()))return[2,e];i=``,a=``,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.getPublicKey()];case 3:if(o=s.sent(),i=o.public_key,a=o.public_key_thumbprint,!i||!a)throw o;return[3,5];case 4:throw s.sent();case 5:return[2,{params:r.getEncryptInfo({publicKey:i,payload:n}),public_key_thumbprint:a}]}})})},e.prototype.getProviderSubType=function(){return L(this,void 0,Promise,function(){return R(this,function(e){return[2,this.config.request(t.GET_PROVIDER_TYPE,{method:`POST`,body:{provider_id:`weda`}})]})})},e.prototype.verifyCaptchaData=function(e){var n=e.token,r=e.key;return L(this,void 0,void 0,function(){return R(this,function(e){return[2,this.config.request(t.VERIFY_CAPTCHA_DATA_URL,{method:`POST`,body:{token:n,key:r},withCredentials:!1})]})})},e.prototype.createCaptchaData=function(e){var n=e.state,r=e.redirect_uri,i=r===void 0?void 0:r;return L(this,void 0,void 0,function(){return R(this,function(e){return[2,this.config.request(t.CAPTCHA_DATA_URL,{method:`POST`,body:{state:n,redirect_uri:i},withCredentials:!1})]})})},e.prototype.getMiniProgramCode=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.GET_MINIPROGRAM_QRCODE,{method:`POST`,body:e})]})})},e.prototype.getMiniProgramQrCodeStatus=function(e){return L(this,void 0,Promise,function(){return R(this,function(n){return[2,this.config.request(t.GET_MINIPROGRAM_QRCODE_STATUS,{method:`POST`,body:e})]})})},e.prototype.getUserBehaviorLog=function(e){return L(this,void 0,Promise,function(){var n,r;return R(this,function(i){return n={LOGIN:`query[action]=USER_LOGIN`,MODIFY:`ne_query[action]=USER_LOGIN`},r=`${t.GET_USER_BEHAVIOR_LOG}?${n[e.type]}&limit=${e.limit}${e.page_token?`&page_token=${e.page_token}`:``}`,[2,this.config.request(r,{method:`GET`,withCredentials:!0})]})})},e.prototype.modifyPassword=function(e){return L(this,void 0,Promise,function(){var n,r,i,a,o,s;return R(this,function(c){switch(c.label){case 0:return n=``,r=``,[4,nt(!0,this.config.adapter)];case 1:if(!(i=c.sent()))throw Error(`do not support encrypt, a encrypt util required.`);c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.getPublicKey()];case 3:if(a=c.sent(),n=a.public_key,r=a.public_key_thumbprint,!n||!r)throw a;return[3,5];case 4:throw c.sent();case 5:return o=e.password?i.getEncryptInfo({publicKey:n,payload:e.password}):``,s=i.getEncryptInfo({publicKey:n,payload:e.new_password}),[2,this.config.request(t.USER_BASIC_EDIT_URL,{method:`POST`,withCredentials:!0,body:{user_id:e.user_id,encrypt_password:o,encrypt_new_password:s,public_key_thumbprint:r}})]}})})},e.prototype.modifyPasswordWithoutLogin=function(e){return L(this,void 0,Promise,function(){var t,r,i,a,o,s;return R(this,function(c){switch(c.label){case 0:return t=``,r=``,[4,nt(!0,this.config.adapter)];case 1:if(!(i=c.sent()))throw Error(`do not support encrypt, a encrypt util required.`);c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.getPublicKey()];case 3:if(a=c.sent(),t=a.public_key,r=a.public_key_thumbprint,!t||!r)throw a;return[3,5];case 4:throw c.sent();case 5:return o=e.password?i.getEncryptInfo({publicKey:t,payload:e.password}):``,s=i.getEncryptInfo({publicKey:t,payload:e.new_password}),[2,this.config.request(n.AUTH_RESET_PASSWORD,{method:`POST`,body:{username:e.username,password:o,new_password:s,public_key_thumbprint:r}})]}})})},e.prototype.restoreUrlState=function(e,t){if(e!==void 0)try{var n=new URL(window.location.href);n.search=e,n.hash=t||``,window.history.replaceState(null,``,n.toString()),window.location.replace(n.toString())}catch{}},e}(),it=function(){return it=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},it.apply(this,arguments)},at=function(){function e(e){var t=e.apiOrigin,n=e.getApiOrigin,r=e.apiPath,i=r===void 0?s:r,a=e.clientId,o=e.env,c=e.storage,l=e.request,u=e.baseRequest,d=e.anonymousSignInFunc,f=e.wxCloud,p=e.adapter,m=e.onCredentialsError,h=e.headers,g=e.i18n,_=e.useWxCloud,v=e.eventBus,y=e.detectSessionInUrl,b=e.debug;if(this.detectSessionInUrl=y!=null&&y,this.oauth2client=new Pe({apiOrigin:t,getApiOrigin:n,apiPath:i,clientId:a,env:o,storage:c,baseRequest:u||l,anonymousSignInFunc:d,wxCloud:f,onCredentialsError:m,headers:h||{},i18n:g,useWxCloud:_,eventBus:v,debug:b}),this.authApi=new rt(it(it({credentialsClient:this.oauth2client},e),{request:l?this.oauth2client.request.bind(this.oauth2client):void 0,adapter:p})),y)this.oauth2client.setGetInitialSession(this.authApi.getInitialSession.bind(this.authApi));else try{var x=new URL(window.location.href),S=x.searchParams.get(`code`),C=x.searchParams.get(`state`),w=JSON.parse(sessionStorage.getItem(C)||`null`);S&&C&&w!=null&&w.hash&&(x.hash=w.hash,window.history.replaceState(null,``,x.toString()),window.location.replace(x.toString()))}catch{}}return e.prototype.initializeSession=function(e){this.detectSessionInUrl?(this.oauth2client.setOnInitialSessionObtained(e),this.oauth2client.initialize()):this.oauth2client.initialize(Promise.resolve({error:null}))},e}(),z=mo(794),ot=mo(141),st=mo(197);let ct=(e=>{var t={};return mo.d(t,e),t})({default:()=>Ti});var lt=mo(182),ut=function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ut.apply(this,arguments)},dt=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},ft=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},pt=function(){function e(e){try{this.localStorage=e?.localStorage||(e?.adapter?.root?.globalThis||globalThis).localStorage}catch{this.localStorage=e?.localStorage||{}}}return e.prototype.getItem=function(e){return dt(this,void 0,Promise,function(){return ft(this,function(t){return[2,this.localStorage.getItem(e)]})})},e.prototype.removeItem=function(e){return dt(this,void 0,void 0,function(){return ft(this,function(t){return this.localStorage.removeItem(e),[2]})})},e.prototype.setItem=function(e,t){return dt(this,void 0,Promise,function(){return ft(this,function(n){return this.localStorage.setItem(e,t),[2]})})},e.prototype.getItemSync=function(e){return this.localStorage.getItem(e)},e.prototype.setItemSync=function(e,t){this.localStorage.setItem(e,t)},e.prototype.removeItemSync=function(e){this.localStorage.removeItem(e)},e}(),mt=/^[^:]+:\/\/[^/]+(\/[^?#]+)/,ht=function(e,t){var n,r,i=t?.headers?.[`x-request-id`];return e||={},(e!=null&&e.code||(n=e?.data)!=null&&n.error_code)&&(e={error:e.code||e.data.error,error_description:e.data.error_description||e.message||e.code||e.data.error_code,request_id:e.requestId,error_code:e.data?.error_code}),e!=null&&e.request_id||(e.request_id=e.request_id||i),e?.error?(e.error_uri=(r=t?.url,mt.test(r)?RegExp.$1:r),e):e?.data||{}},gt=function(e){return e.adapter&&e.adapter.type!=="default"?function(e,t){var n=ut({},e);try{if(!(e!=null&&e.storage)&&t!=null&&t.localStorage&&(n.storage=new pt({localStorage:t.localStorage,adapter:t})),!e.captchaOptions&&t!=null&&t.captchaOptions&&(n.captchaOptions=t.captchaOptions),!e.baseRequest&&!e.request&&t?.reqClass){var r={timeout:1e4,restrictedMethods:[`get`,`post`,`upload`,`download`,`request`],auth:e.auth},i=new t.reqClass(r);n.baseRequest=function(e,t){var n,r,a;return dt(this,void 0,void 0,function(){var o,s,c,l;return ft(this,function(u){switch(u.label){case 0:if(o={},s=t.method?.toLocaleLowerCase()||`post`,typeof(c=((n=i?.[s])?.bind)?.call(n,i))!=`function`)throw Error(`invalid 【${s}】 request method`);u.label=1;case 1:return u.trys.push([1,3,,4]),(r=t.headers)!=null&&r[`content-type`]&&!((a=t.headers)!=null&&a[`content-type`].includes(`application/json`))||[`string`,`undefined`].includes(typeof t.body)||(t.data=t.data||t.body,t.body=JSON.stringify(t.body)),[4,c(ut({url:e},t))];case 2:return o=u.sent(),o=ht(o,ut(ut({},t),{url:e})),[3,4];case 3:throw l=u.sent(),o=ut(ut({},l?.data),l);case 4:if(o?.error)throw o;return[2,o]}})})}}}catch(e){console.error(`user adapter generate fail:`,e)}return n}(e,e.adapter):function(e,t){var n=ut({},e),r={};if(t!=null&&t.captchaOptions&&(n.captchaOptions=t.captchaOptions),!ct.default.isMatch()||e.storage&&e.baseRequest)return n;try{var i=ct.default.genAdapter({}),a=i.localStorage,o=i.reqClass;return a&&(r.storage=new pt({localStorage:a,adapter:t})),o&&(r.request=function(e){return function(t,n){return dt(this,void 0,void 0,function(){return ft(this,function(r){return[2,new Promise(function(r,i){var a=Object.assign({},n);a.body&&typeof a.body!=`string`&&(a.body=JSON.stringify(a.body));var o=wx.request({url:t,data:a.body,timeout:e._timeout,method:a.method||`GET`,header:a.headers,success:function(e){(e=ht(e,ut(ut({},n),{url:t}))).error&&i(e),r(e)},fail:function(e){i({error:`unreachable`,error_description:e.message})},complete:function(t){if(t&&t.errMsg&&e._timeout&&e._restrictedMethods.indexOf(`request`)!==-1&&t.errMsg===`request:fail timeout`){console.warn(e._timeoutMsg);try{o.abort()}catch{}}}})})]})})}}(new o({timeout:1e4,restrictedMethods:[`get`,`post`,`upload`,`download`,`request`]}))),n.captchaOptions&&(r.baseRequest=r.request,r.request=void 0),ut(ut({},n),r)}catch(e){console.error(`adapter generate fail:`,e)}return n}(e,e.adapter)},_t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_t.apply(this,arguments)},vt=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},yt=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},bt=function(){function e(e){}return e.prototype.signInWithRedirect=function(){throw Error(`[v1 兼容] WeixinAuthProvider.signInWithRedirect() 在当前版本中无法实现。 建议使用 auth.signInWithOAuth({ provider: 'providerId' }) 替代。`)},e.prototype.getRedirectResult=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] WeixinAuthProvider.getRedirectResult() 在当前版本中无法实现。 建议使用 auth.verifyOAuth({ code, state, provider }) 替代。`)})})},e.prototype.getLinkRedirectResult=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] WeixinAuthProvider.getLinkRedirectResult() 在当前版本中无法实现。 建议使用 auth.linkIdentity({ provider: 'providerId' }) 替代。`)})})},e}(),xt=function(){function e(e){this.authInstance=e.authInstance}return e.prototype.signIn=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(t){switch(t.label){case 0:return[4,this.authInstance.signInWithCustomTicket(function(){return Promise.resolve(e)})];case 1:return t.sent(),[2]}})})},e}(),St=function(){function e(e){this.authInstance=e.authInstance}return e.prototype.signIn=function(){return vt(this,void 0,Promise,function(){return yt(this,function(e){switch(e.label){case 0:return[4,this.authInstance.signInAnonymously({})];case 1:return e.sent(),[2]}})})},e}(),Ct=function(){function e(){}return e.prototype.weixinAuthProvider=function(e){return new bt({authInstance:this,appid:e.appid,scope:e.scope})},e.prototype.customAuthProvider=function(){return new xt({authInstance:this})},e.prototype.anonymousAuthProvider=function(){return new St({authInstance:this})},e.prototype.signUpWithEmailAndPassword=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(n){switch(n.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`email must be a string`),typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`password must be a string`),[4,this.signUp({email:e,password:t})];case 1:return[2,n.sent()]}})})},e.prototype.signInWithEmailAndPassword=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(n){switch(n.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`email must be a string`),typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`password must be a string`),[4,this.signIn({username:e,password:t})];case 1:return n.sent(),[2,this.createLoginState()]}})})},e.prototype.sendPasswordResetEmail=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(t){switch(t.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`email must be a string`),[4,this.getVerification({email:e})];case 1:return t.sent(),[2]}})})},e.prototype.signInWithUsernameAndPassword=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(n){switch(n.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`username must be a string`),typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`password must be a string`),[4,this.signIn({username:e,password:t})];case 1:return n.sent(),[2,this.createLoginState()]}})})},e.prototype.sendPhoneCode=function(e){return vt(this,void 0,Promise,function(){var t;return yt(this,function(n){switch(n.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneNumber must be a string`),t=this.formatPhone(e),[4,this.getVerification({phone_number:t})];case 1:return n.sent(),[2,!0]}})})},e.prototype.signUpWithPhoneCode=function(e,t,n){return vt(this,void 0,Promise,function(){var r;return yt(this,function(i){switch(i.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneNumber must be a string`),typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneCode must be a string`),r=this.formatPhone(e),[4,this.signUp(_t({phone_number:r,verification_code:t},n?{password:n}:{}))];case 1:return i.sent(),[2,this.createLoginState()]}})})},e.prototype.signInWithPhoneCodeOrPassword=function(e){return vt(this,void 0,Promise,function(){var t,n,r,i;return yt(this,function(a){switch(a.label){case 0:return t=e.phoneNumber,n=e.phoneCode,r=e.password,typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneNumber must be a string`),i=this.formatPhone(t),r?[4,this.signIn({username:i,password:r})]:[3,2];case 1:return a.sent(),[3,5];case 2:return n?[4,this.signIn({username:i,verification_token:n})]:[3,4];case 3:return a.sent(),[3,5];case 4:(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneCode or password must be provided`),a.label=5;case 5:return[2,this.createLoginState()]}})})},e.prototype.forceResetPwdByPhoneCode=function(e){return vt(this,void 0,Promise,function(){var t,n,r,i;return yt(this,function(a){switch(a.label){case 0:return t=e.phoneNumber,n=e.phoneCode,r=e.password,typeof t!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneNumber must be a string`),typeof n!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`phoneCode must be a string`),typeof r!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`password must be a string`),i=this.formatPhone(t),[4,this.resetPassword({phone_number:i,new_password:r,verification_token:n})];case 1:return a.sent(),[4,this.signIn({username:i,password:r})];case 2:return a.sent(),[2,this.createLoginState()]}})})},e.prototype.shouldRefreshAccessToken=function(e){throw Error(`[v1 兼容] shouldRefreshAccessToken() 在当前版本中无法实现。 建议使用 auth.onAuthStateChange(callback) 来监听 TOKEN_REFRESHED 事件替代。`)},e.prototype.onLoginStateExpired=function(e){var t=this;this.onLoginStateChanged(function(n){n?.eventType===u&&e.call(t)})},e.prototype.onAccessTokenRefreshed=function(e){var t=this;this.onAuthStateChange(function(n){n===m&&e.call(t)})},e.prototype.onAnonymousConverted=function(e){var t=this;this.onAuthStateChange(function(n){n===f&&e.call(t)})},e.prototype.onLoginTypeChanged=function(e){var t=this;this.onAuthStateChange(function(n){n!==f&&n!==d||e.call(t)})},e}(),wt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)},Tt=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},V=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},H=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},U=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Et=function(){return typeof window<`u`&&typeof document<`u`},Dt=function(e){return function(t){e.fire(_,B(B({},t),{eventType:u}))}},Ot=[`avatar_url`,`avatarUrl`];function kt(e){return typeof TextEncoder<`u`?new TextEncoder().encode(e).length:e.length}function At(e,t){if(e)for(var n=0,r=Ot;n<r.length;n++){var i=r[n],o=e[i];if(o!=null&&o!==``){var s=kt(String(o));if(s>204800)throw new I({error:`invalid_argument`,error_code:a.INVALID_ARGUMENT,error_description:`auth.${t}(params): "${i}" 超过 200KB 限制(当前 ${s} 字节),请传入图片 URL 而非文件内容`},{method:t})}}}var jt,Mt=function(){function t(e){var t=e.cache,n=e.oauthInstance;this.cache=t,this.oauthInstance=n,this.setUserInfo()}var n,r,i;return t.prototype.checkLocalInfo=function(){return H(this,void 0,void 0,function(){return U(this,function(e){return this.uid=this.getLocalUserInfo(`uid`),this.gender=this.getLocalUserInfo(`gender`),this.picture=this.getLocalUserInfo(`picture`),this.email=this.getLocalUserInfo(`email`),this.emailVerified=this.getLocalUserInfo(`email_verified`),this.phoneNumber=this.getLocalUserInfo(`phone_number`),this.username=this.getLocalUserInfo(`username`),this.name=this.getLocalUserInfo(`name`),this.birthdate=this.getLocalUserInfo(`birthdate`),this.zoneinfo=this.getLocalUserInfo(`zoneinfo`),this.locale=this.getLocalUserInfo(`locale`),this.sub=this.getLocalUserInfo(`sub`),this.createdFrom=this.getLocalUserInfo(`created_from`),this.providers=this.getLocalUserInfo(`providers`),[2]})})},t.prototype.checkLocalInfoAsync=function(){return H(this,void 0,void 0,function(){var e,t,n,r;return U(this,function(i){switch(i.label){case 0:return e=this,[4,this.getLocalUserInfoAsync(`uid`)];case 1:return e.uid=i.sent(),t=this,[4,this.getLocalUserInfoAsync(`gender`)];case 2:return t.gender=i.sent(),this.picture=this.getLocalUserInfo(`picture`),n=this,[4,this.getLocalUserInfoAsync(`email`)];case 3:return n.email=i.sent(),this.emailVerified=this.getLocalUserInfo(`email_verified`),this.phoneNumber=this.getLocalUserInfo(`phone_number`),r=this,[4,this.getLocalUserInfoAsync(`username`)];case 4:return r.username=i.sent(),this.name=this.getLocalUserInfo(`name`),this.birthdate=this.getLocalUserInfo(`birthdate`),this.zoneinfo=this.getLocalUserInfo(`zoneinfo`),this.locale=this.getLocalUserInfo(`locale`),this.sub=this.getLocalUserInfo(`sub`),this.createdFrom=this.getLocalUserInfo(`created_from`),this.providers=this.getLocalUserInfo(`providers`),[2]}})})},t.prototype.update=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return At(e,`update`),[4,this.oauthInstance.authApi.setUserProfile(B({},e))];case 1:return t=n.sent(),this.setLocalUserInfo(t),[2]}})})},t.prototype.updateUserBasicInfo=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return At(e,`updateUserBasicInfo`),[4,this.oauthInstance.authApi.updateUserBasicInfo(B({},e))];case 1:return t.sent(),[4,this.refresh()];case 2:return t.sent(),[2]}})})},t.prototype.updatePassword=function(e,t){return this.oauthInstance.authApi.updatePasswordByOld({old_password:t,new_password:e})},t.prototype.updateUsername=function(e){return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`username must be a string`),this.update({username:e})},t.prototype.refresh=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return[4,this.oauthInstance.authApi.getUserInfo(e)];case 1:if((t=n.sent()).code===`INVALID_ACCESS_TOKEN`)throw this.setLocalUserInfo({}),t;return this.setLocalUserInfo(t),[2,t]}})})},t.prototype.getLocalUserInfo=function(e){var t=this.cache.keys.userInfoKey,n=this.cache.getStore(t);return e?n[e]:n||{}},t.prototype.setLocalUserInfo=function(e){var t=this.cache.keys.userInfoKey;this.cache.setStore(t,e),this.setUserInfo()},t.prototype.getLocalUserInfoAsync=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return t=this.cache.keys.userInfoKey,[4,this.cache.getStoreAsync(t)];case 1:return[2,n.sent()[e]]}})})},t.prototype.setUserInfo=function(){var e=this,t=this.cache.keys.userInfoKey,n=this.cache.getStore(t);[`uid`,`email`,`name`,`gender`,`picture`,`email_verified`,`phone_number`,`birthdate`,`zoneinfo`,`locale`,`sub`,`created_from`,`providers`,`username`,`created_at`,`open_id`].forEach(function(t){e[t]=n[t]})},Tt([(0,ot.catchErrorsDecorator)({title:`更新用户信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 User.update() 的语法或参数是否正确`,` 2 - 用户信息中是否包含非法值`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(n=e.UserProfile)==`function`?n:Object]),V(`design:returntype`,typeof(r=typeof Promise<`u`&&Promise)==`function`?r:Object)],t.prototype,`update`,null),Tt([(0,ot.catchErrorsDecorator)({title:`更新密码失败`,messages:[`请确认以下各项:`,` 1 - 调用 User.updatePassword() 的语法或参数是否正确`,` 3 - 新密码中是否包含非法字符`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[String,String]),V(`design:returntype`,void 0)],t.prototype,`updatePassword`,null),Tt([(0,ot.catchErrorsDecorator)({title:`更新用户名失败`,messages:[`请确认以下各项:`,` 1 - 调用 User.updateUsername() 的语法或参数是否正确`,` 2 - 当前环境是否开通了用户名密码登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[String]),V(`design:returntype`,void 0)],t.prototype,`updateUsername`,null),Tt([(0,ot.catchErrorsDecorator)({title:`刷新本地用户信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 User.refresh() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(i=typeof Promise<`u`&&Promise)==`function`?i:Object)],t.prototype,`refresh`,null),t}();(jt=Mt).prototype.linkWithTicket=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] User.linkWithTicket() 在当前版本中无法实现。 建议使用 auth.signInWithCustomTicket(() => Promise.resolve(ticket)) 替代。`)})})},jt.prototype.linkWithRedirect=function(e){throw Error(`[v1 兼容] User.linkWithRedirect() 在当前版本中无法实现。 建议使用 auth.linkIdentity({ provider: 'providerId' }) 替代。`)},jt.prototype.updateEmail=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(t){switch(t.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`newEmail must be a string`),[4,this.updateUserBasicInfo({email:e})];case 1:return t.sent(),[2]}})})},jt.prototype.linkWithPhoneNumber=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] User.linkWithPhoneNumber() 在当前版本中无法实现。 建议使用 auth.bindPhoneNumber({ phone_number, verification_token, sudo_token }) 替代。`)})})},jt.prototype.updatePhoneNumber=function(e,t){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] User.updatePhoneNumber() 在当前版本中无法实现。 建议使用 auth.updateUser({ phone: newPhoneNumber }) 替代。`)})})},jt.prototype.unlink=function(e){return vt(this,void 0,Promise,function(){return yt(this,function(e){throw Error(`[v1 兼容] User.unlink() 在当前版本中无法实现。 建议使用 auth.unlinkIdentity({ provider: loginType }) 替代。`)})})};var Nt=function(){function e(e){var t=e.envId,n=e.cache,r=e.oauthInstance;t||(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`envId is not defined`),this.cache=n,this.oauthInstance=r,this.user=new Mt({cache:this.cache,oauthInstance:r})}return e.prototype.checkLocalState=function(){this.oauthLoginState=this.oauthInstance?.authApi.hasLoginStateSync(),this.user.checkLocalInfo()},e.prototype.checkLocalStateAsync=function(){return H(this,void 0,void 0,function(){return U(this,function(e){switch(e.label){case 0:return[4,this.oauthInstance?.authApi.getLoginState()];case 1:return e.sent(),[4,this.user.checkLocalInfoAsync()];case 2:return e.sent(),[2]}})})},e}(),Pt=function(t){function n(e){var n=t.call(this)||this;return n.listeners=new Map,n.hasListenerSetUp=!1,n.config=e,n.oauthInstance=e.oauthInstance,n.cache=e.cache,n.init(),n.setAccessKey(),n}var r,i,a,o,s,l,d,m,g,b,C,w,T,E,D,ee,te,O,A,ne,re;return wt(n,t),n.prototype.signInAnonymously=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a;return U(this,function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.oauthInstance.authApi.signInAnonymously(e)];case 1:return o.sent(),[4,this.createLoginState()];case 2:return t=o.sent(),[4,this.getSession()];case 3:return n=o.sent().data,r=(n===void 0?{}:n).session,[2,B(B({},t),{data:{user:r.user,session:r},error:null})];case 4:return i=o.sent(),(a=new I(i,{method:`signInAnonymously`})).category===F.PROVIDER_NOT_ENABLED?(console.error(a.helpMessage),console.error(`[CloudBase Auth] 提示:匿名登录需要在控制台开启「匿名登录」。
168
168
  如果您需要使用用户名密码登录,请改用 auth.signInWithPassword({ username, password })。
169
- 不要在匿名登录失败后自动回退到密码登录,这两种方式的使用场景不同。`)):(console.warn(`[CloudBase Auth] signInAnonymously 失败 [${a.category}]: ${a.message}`),a.loginMethodHint&&console.warn(a.loginMethodHint)),[2,{data:{user:null,session:null},error:a}];case 5:return[2]}})})},n.prototype.signUp=function(e){return H(this,void 0,Promise,function(){var t,n,r=this;return U(this,function(i){switch(i.label){case 0:return e.phone_number||e.verification_code||e.verification_token||e.provider_token?(e.phone_number&&=this.formatPhone(e.phone_number),[4,this.oauthInstance.authApi.signUp(e)]):[3,2];case 1:return i.sent(),[2,this.createLoginState()];case 2:return i.trys.push([2,4,,5]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`signUp`),[4,this.getVerification(e.email?{email:e.email,usage:c.EMAIL}:{phone_number:this.formatPhone(e.phone)})];case 3:return t=i.sent(),[2,{data:{verifyOtp:function(n){var i=n.token,a=n.messageId,o=a===void 0?t.verification_id:a;return H(r,void 0,Promise,function(){var n,r,a,s,c;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,8,,9]),[4,this.verify({verification_id:o||t.verification_id,verification_code:String(i)})];case 1:return n=l.sent(),t.is_user?[4,this.signIn({username:e.email||this.formatPhone(e.phone),verification_token:n.verification_token})]:[3,3];case 2:return l.sent(),[3,6];case 3:return delete(r=JSON.parse(JSON.stringify(e))).email,delete r.phone,[4,this.oauthInstance.authApi.signUp(B(B(B({},r),e.email?{email:e.email}:{phone_number:this.formatPhone(e.phone)}),{verification_token:n.verification_token,verification_code:i}))];case 4:return l.sent(),[4,this.createLoginState()];case 5:l.sent(),l.label=6;case 6:return[4,this.getSession()];case 7:return a=l.sent().data,[2,{data:{user:(s=(a===void 0?{}:a).session).user,session:s},error:null}];case 8:return c=l.sent(),[2,{data:{user:null,session:null},error:new I(c,{method:`signUp`})}];case 9:return[2]}})})}},error:null}];case 4:return n=i.sent(),[2,{data:{user:null,session:null},error:new I(n,{method:`signUp`})}];case 5:return[2]}})})},n.prototype.signOut=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=this.cache.keys.userInfoKey,[4,this.oauthInstance.authApi.signOut(e)];case 1:return n=i.sent(),[4,this.cache.removeStoreAsync(t)];case 2:return i.sent(),this.setAccessKey(),[2,B(B({},n),{data:{},error:null})];case 3:return r=i.sent(),[2,{data:{},error:new I(r,{method:`signOut`})}];case 4:return[2]}})})},n.prototype.onAuthStateChange=function(e){var t=this;this.hasListenerSetUp||=(this.setupListeners(),!0);var n=Math.random().toString(36);return this.listeners.has(n)||this.listeners.set(n,new Set),this.listeners.get(n).add(e),{data:{subscription:{id:n,callback:e,unsubscribe:function(){var r=t.listeners.get(n);r&&(r.delete(e),r.size===0&&t.listeners.delete(n))}}}}},n.prototype.signInWithPassword=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),this.validateAtLeastOne(e,[[`username`],[`email`],[`phone`]],`signInWithPassword`),this.validateParams(e,{password:{required:!0,message:`Password is required`}},`signInWithPassword`),t=`username`in e?e.username:void 0,n=`email`in e?e.email:void 0,r=`phone`in e?e.phone:void 0,i=e.options?.is_encrypt??e.is_encrypt,[4,this.signIn(B({username:t||n||this.formatPhone(r),password:e.password},i?{isEncrypt:!0,version:`v2`}:{}))];case 1:return l.sent(),[4,this.getSession()];case 2:return a=l.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 3:return s=l.sent(),(c=new I(s,{method:`signInWithPassword`})).category===F.PROVIDER_NOT_ENABLED?console.error(c.helpMessage):c.category===F.INVALID_CREDENTIALS||c.category===F.USER_NOT_FOUND?console.warn(c.helpMessage):console.warn(`[CloudBase Auth] signInWithPassword 失败 [${c.category}]: ${c.message}`),c.loginMethodHint&&console.info(c.loginMethodHint),[2,{data:{user:null,session:null},error:c}];case 4:return[2]}})})},n.prototype.signInWithIdToken=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.validateParams(e,{token:{required:!0,message:`Token is required`}},`signInWithIdToken`),[4,this.signInWithProvider({provider_id:e.provider,provider_id_token:e.token})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`signInWithIdToken`})}];case 4:return[2]}})})},n.prototype.signInWithOtp=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o=this;return U(this,function(s){switch(s.label){case 0:if(t=e.options,n=`email`in e?e.email:void 0,r=`phone`in e?e.phone:void 0,!t?.emailRedirectTo&&(t?.shouldCreateUser===void 0||t?.shouldCreateUser))return[2,this.signUp(n?{email:n}:{phone:r})];s.label=1;case 1:return s.trys.push([1,3,,4]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`signInWithOtp`),[4,this.getVerification(B(B({email_redirect_to:t?.emailRedirectTo},n?{email:n,usage:c.EMAIL}:{phone_number:this.formatPhone(r)}),{target:t?.emailRedirectTo&&t?.shouldCreateUser?`ANY`:`USER`}))];case 2:return i=s.sent(),[2,{data:{user:null,session:null,verifyOtp:function(e){var t=e.token,a=e.messageId,s=a===void 0?i.verification_id:a;return H(o,void 0,Promise,function(){return U(this,function(e){return[2,this.verifyOtp(n?{email:n,token:String(t),messageId:s||``}:{phone:r,token:String(t),messageId:s||``})]})})}},error:null}];case 3:return a=s.sent(),[2,{data:{user:null,session:null},error:new I(a,{method:`signInWithOtp`})}];case 4:return[2]}})})},n.prototype.verifyOAuth=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l;return U(this,function(u){switch(u.label){case 0:t={},u.label=1;case 1:return u.trys.push([1,7,,8]),n=e?.code||ue(`code`),r=e?.state||ue(`state`),n?r?(i=function(e){try{return JSON.parse(sessionStorage.getItem(e))}catch(e){return console.error(`Failed to get browser session:`,e),null}}(r),t.type=i?.type,(a=e?.provider||i?.provider||ue(`provider`))?[4,this.grantProviderToken({provider_id:a,provider_redirect_uri:location.origin+location.pathname,provider_code:n})]:[2,{data:B(B({},t),{user:null,session:null,redirectUrl:null}),error:this.missingRequiredParam(`verifyOAuth`,`provider`)}]):[2,{data:{user:null,session:null,redirectUrl:null},error:this.missingRequiredParam(`verifyOAuth`,`state`)}]:[2,{data:{user:null,session:null,redirectUrl:null},error:this.missingRequiredParam(`verifyOAuth`,`code`)}];case 2:return o=u.sent().provider_token,s=void 0,i.type===x?[4,this.oauthInstance.authApi.toBindIdentity({provider_token:o,provider:a,fireEvent:!0})]:[3,4];case 3:return s=u.sent(),[3,6];case 4:return[4,this.signInWithIdToken({token:o})];case 5:(s=u.sent()).data=B(B({},t),s.data),u.label=6;case 6:return(c=new URLSearchParams(location==null?void 0:location.search)).delete(`code`),c.delete(`state`),s.data.redirectUrl=function(e,t){if(e!==void 0){var n=new URL(window.location.href);return n.search=e,n.hash=t||n.hash,window.history.replaceState({},``,n.href),n.href}}(i?.search===void 0?`?${c.toString()}`:i?.search,i?.hash||location.hash),function(e){try{return sessionStorage.removeItem(e),!0}catch(e){return console.error(`Failed to remove browser session:`,e),null}}(r),[2,s];case 7:return l=u.sent(),[2,{data:B(B({},t),{user:null,session:null,redirectUrl:null}),error:new I(l,{method:`verifyOAuth`})}];case 8:return[2]}})})},n.prototype.signInWithOAuth=function(e){var t,n;return H(this,void 0,Promise,function(){var r,i,a,o,s,c,l,u,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`signInWithOAuth`),r=e.options?.redirectTo||location.href,i=new URL(r),a=i.origin+i.pathname,o=e.options?.state||`prd-${e.provider}-${Math.random().toString(36).slice(2)}`,[4,this.genProviderRedirectUri({provider_id:e.provider,provider_redirect_uri:a,state:o})];case 1:return s=f.sent().uri,c=decodeURIComponent(s),l=c,(t=e.options)!=null&&t.queryParams&&(u=new URL(c),Object.entries(e.options.queryParams).forEach(function(e){var t=e[0],n=e[1];u.searchParams.set(t,n)}),l=u.toString()),function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(`Failed to save to browser session:`,e)}}(o,{provider:e.provider,search:i.search,hash:i.hash,type:e.options?.type||y}),Et()&&!((n=e.options)!=null&&n.skipBrowserRedirect)&&window.location.assign(l),[2,{data:{url:l,provider:e.provider},error:null}];case 2:return d=f.sent(),[2,{data:{url:null,provider:null},error:new I(d,{method:`signInWithOAuth`})}];case 3:return[2]}})})},n.prototype.getClaims=function(){return H(this,void 0,Promise,function(){var e;return U(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getAccessToken()];case 1:return[2,{data:function(e){if(typeof e!=`string`)throw Error(`Invalid token specified`);try{var t=e.split(`.`).map(function(e,t){return t===2?e:JSON.parse(function(e){var t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`Illegal base64url string!`)}try{return function(e){return decodeURIComponent(k(e).replace(/(.)/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=`0${t}`),`%${t}`}))}(t)}catch{return k(t)}}(e))});return{claims:t[1],header:t[0],signature:t[2]}}catch(e){throw Error(`Invalid token specified: ${e}`?e.message:0)}}(t.sent().accessToken),error:null}];case 2:return e=t.sent(),[2,{data:{claims:null,header:null,signature:null},error:new I(e,{method:`getClaims`})}];case 3:return[2]}})})},n.prototype.resetPasswordForEmail=function(e,t){return H(this,void 0,Promise,function(){var n,r,i,a,o,s,l=this;return U(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),this.validateParams({emailOrPhone:e},{emailOrPhone:{required:!0,message:`Email or phone is required`}},`resetPasswordForEmail`),n=(t||{}).redirectTo,r=e.includes(`@`),i=void 0,r?i={email:e,usage:c.RECOVERY}:(a=this.formatPhone(e),i={phone_number:a}),[4,this.getVerification(B(B({},i),{target:`USER`}))];case 1:return o=u.sent(),[2,{data:{updateUser:function(t){return H(l,void 0,Promise,function(){var i,a,s,c;return U(this,function(l){switch(l.label){case 0:this.validateParams(t,{nonce:{required:!0,message:`Nonce is required`},password:{required:!0,message:`Password is required`}},`resetPasswordForEmail`),l.label=1;case 1:return l.trys.push([1,5,,6]),[4,this.verify({verification_id:o.verification_id,verification_code:t.nonce})];case 2:return i=l.sent(),[4,this.oauthInstance.authApi.resetPassword({email:r?e:void 0,phone_number:r?void 0:e,new_password:t.password,verification_token:i.verification_token})];case 3:return l.sent(),(c=this.config.eventBus)==null||c.fire(v,{event:`PASSWORD_RECOVERY`}),[4,this.signInWithPassword({email:r?e:void 0,phone:r?void 0:e,password:t.password})];case 4:return a=l.sent(),n&&Et()&&window.location.assign(n),[2,a];case 5:return s=l.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`resetPasswordForEmail`})}];case 6:return[2]}})})}},error:null}];case 2:return s=u.sent(),[2,{data:{updateUser:null},error:new I(s,{method:`resetPasswordForEmail`})}];case 3:return[2]}})})},n.prototype.resetPasswordForOld=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.authApi.updatePasswordByOld({old_password:e.old_password,new_password:e.new_password})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`resetPasswordForOld`})}];case 4:return[2]}})})},n.prototype.verifyOtp=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s;return U(this,function(c){switch(c.label){case 0:return c.trys.push([0,6,,7]),t=e.type,n=String(e.token),r=`email`in e?e.email:void 0,i=`phone`in e?e.phone:void 0,this.validateParams(e,{token:{required:!0,message:`Token is required`},messageId:{required:!0,message:`messageId is required`}},`verifyOtp`),[`phone_change`,`email_change`].includes(t)?[4,this.verify({verification_id:e.messageId,verification_code:n})]:[3,2];case 1:return c.sent(),[3,4];case 2:return[4,this.signInWithUsername({verificationInfo:{verification_id:e.messageId,is_user:!0},verificationCode:n,username:r||this.formatPhone(i)||``,loginType:r?`email`:`phone`})];case 3:c.sent(),c.label=4;case 4:return[4,this.getSession()];case 5:return a=c.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 6:return s=c.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`verifyOtp`})}];case 7:return[2]}})})},n.prototype.getSession=function(){return H(this,void 0,Promise,function(){var e,t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.oauth2client.getCredentials()];case 1:return(e=i.sent())&&e.scope!==`accessKey`?[4,this.getUser(!1)]:[2,{data:{session:null,user:null},error:null}];case 2:return t=i.sent().data,n=(t===void 0?{}:t).user,[2,{data:{session:B(B({},e),{user:n}),user:n},error:null}];case 3:return r=i.sent(),[2,{data:{session:null,user:null},error:new I(r,{method:`getSession`})}];case 4:return[2]}})})},n.prototype.refreshSession=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a;return U(this,function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.oauthInstance.oauth2client.localCredentials.getCredentials()];case 1:return(t=o.sent()).refresh_token=e||t.refresh_token,[4,this.oauthInstance.oauth2client.refreshToken(t)];case 2:return n=o.sent(),[4,this.getUser(!1)];case 3:return r=o.sent().data,[2,{data:{user:i=(r===void 0?{}:r).user,session:B(B({},n),{user:i})},error:null}];case 4:return a=o.sent(),[2,{data:{user:null,session:null},error:new I(a,{method:`refreshSession`})}];case 5:return[2]}})})},n.prototype.getUser=function(e){return e===void 0&&(e=!0),H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.oauth2client.getCredentials()];case 1:return(t=i.sent())&&t.scope!==`accessKey`?(n=this.convertToUser,[4,this.getCurrentUser(e)]):[2,{data:{user:null},error:null}];case 2:return[2,{data:{user:n.apply(this,[i.sent()])},error:null}];case 3:return r=i.sent(),[2,{data:{user:null},error:new I(r,{method:`getUser`})}];case 4:return[2]}})})},n.prototype.refreshUser=function(){return H(this,void 0,Promise,function(){var e,t,n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.currentUser.refresh()];case 1:return r.sent(),[4,this.getSession()];case 2:return e=r.sent().data,[2,{data:{user:(t=(e===void 0?{}:e).session).user,session:t},error:null}];case 3:return n=r.sent(),[2,{data:{user:null,session:null},error:new I(n,{method:`refreshUser`})}];case 4:return[2]}})})},n.prototype.updateUser=function(e){var t;return H(this,void 0,Promise,function(){var n,r,i,a,o,s,l,u,d,f,p,m,g,_=this;return U(this,function(y){switch(y.label){case 0:if(y.trys.push([0,8,,9]),At(e,`updateUser`),n=[`password`,`new_password`].find(function(t){var n=e[t];return n!=null&&n!==``}))throw new I({message:`updateUser 不支持更新密码,检测到传入了 "${n}" 参数。如需修改密码请使用 resetPasswordForOld(旧密码修改)、resetPasswordForEmail(验证码重置)或 reauthenticate(重新认证后改密)`});if(!Object.keys(e).some(function(t){return e[t]!==void 0&&e[t]!==null&&e[t]!==``}))throw this.missingRequiredParam(`updateUser`,`(at least one field)`);return r=e.email,i=e.phone,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[`email`,`phone`]),s=i!==void 0,l={},(o=r!==void 0)||s?(u=void 0,o?(u={email:e.email,usage:c.REAUTHENTICATION},d=`email_change`):(f=this.formatPhone(e.phone),u={phone_number:f},d=`phone_change`),[4,this.getVerification(B({},u))]):[3,4];case 1:return p=y.sent(),Object.keys(a).length>0?[4,this.updateUserBasicInfo(a)]:[3,3];case 2:y.sent(),y.label=3;case 3:return l={messageId:p.verification_id,verifyOtp:function(t){return H(_,void 0,Promise,function(){var n,r,i,a;return U(this,function(s){switch(s.label){case 0:return s.trys.push([0,11,,12]),t.email&&e.email===t.email?[4,this.verifyOtp({type:`email_change`,email:e.email,token:t.token,messageId:p.verification_id||``})]:[3,3];case 1:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo({email:e.email})];case 2:return s.sent(),[3,9];case 3:return t.phone&&e.phone===t.phone?[4,this.verifyOtp({type:`phone_change`,phone:e.phone,token:t.token,messageId:p.verification_id||``})]:[3,6];case 4:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo({phone:this.formatPhone(e.phone)})];case 5:return s.sent(),[3,9];case 6:return[4,this.verifyOtp(o?{type:d,email:e.email,token:t.token,messageId:p.verification_id||``}:{type:d,phone:e.phone,token:t.token,messageId:p.verification_id||``})];case 7:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo(e)];case 8:s.sent(),s.label=9;case 9:return[4,this.getUser(!1)];case 10:return r=s.sent().data.user,(a=this.config.eventBus)==null||a.fire(v,{event:h}),[2,{data:{user:r},error:null}];case 11:return i=s.sent(),[2,{data:{user:null},error:new I(i,{method:`updateUser`})}];case 12:return[2]}})})}},[3,6];case 4:return[4,this.updateUserBasicInfo(e)];case 5:y.sent(),y.label=6;case 6:return[4,this.getUser(!1)];case 7:return m=y.sent().data.user,Object.keys(a).length>0&&((t=this.config.eventBus)==null||t.fire(v,{event:h})),[2,{data:B({user:m},l),error:null}];case 8:return g=y.sent(),[2,{data:{user:null},error:new I(g,{method:`updateUser`})}];case 9:return[2]}})})},n.prototype.getUserIdentities=function(){return H(this,void 0,Promise,function(){var e,t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.oauthInstance.authApi.getProviders()];case 1:return e=n.sent(),[2,{data:{identities:(e?.data)?.filter(function(e){return!!e.bind})},error:null}];case 2:return t=n.sent(),[2,{data:{identities:null},error:new I(t,{method:`getUserIdentities`})}];case 3:return[2]}})})},n.prototype.linkIdentity=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`linkIdentity`),[4,this.signInWithOAuth({provider:e.provider,options:{type:x}})];case 1:return n.sent(),[2,{data:{provider:e.provider},error:null}];case 2:return t=n.sent(),[2,{data:{provider:null},error:new I(t,{method:`linkIdentity`})}];case 3:return[2]}})})},n.prototype.unlinkIdentity=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`unlinkIdentity`),[4,this.oauthInstance.authApi.unbindProvider({provider_id:e.provider})];case 1:return n.sent(),[2,{data:{},error:null}];case 2:return t=n.sent(),[2,{data:{},error:new I(t,{method:`unlinkIdentity`})}];case 3:return[2]}})})},n.prototype.reauthenticate=function(){return H(this,void 0,Promise,function(){var e,t,n,r,i=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.getUser(!1)];case 1:return e=a.sent().data.user,this.validateAtLeastOne(e,[[`email`,`phone`]],`reauthenticate`),t=e.email?{email:e.email,usage:c.REAUTHENTICATION}:{phone_number:this.formatPhone(e.phone)},[4,this.getVerification(t)];case 2:return n=a.sent(),[2,{data:{updateUser:function(e){return H(i,void 0,Promise,function(){var r,i,a,o,s;return U(this,function(c){switch(c.label){case 0:this.validateParams(e,{nonce:{required:!0,message:`Nonce is required`}},`reauthenticate`),c.label=1;case 1:return c.trys.push([1,9,,10]),e.password?[4,this.verify({verification_id:n.verification_id,verification_code:e.nonce})]:[3,5];case 2:return r=c.sent(),[4,this.oauthInstance.authApi.sudo({verification_token:r.verification_token})];case 3:return i=c.sent(),[4,this.oauthInstance.authApi.setPassword({new_password:e.password,sudo_token:i.sudo_token})];case 4:return c.sent(),[3,7];case 5:return[4,this.signInWithUsername(B(B({verificationInfo:n,verificationCode:e.nonce},t),{loginType:t.email?`email`:`phone`}))];case 6:c.sent(),c.label=7;case 7:return[4,this.getSession()];case 8:return a=c.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 9:return s=c.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`reauthenticate`})}];case 10:return[2]}})})}},error:null}];case 3:return r=a.sent(),[2,{data:{updateUser:null},error:new I(r,{method:`reauthenticate`})}];case 4:return[2]}})})},n.prototype.resend=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`resend`),t=e.type===`signup`?`ANY`:`USER`,n={target:t},`email`in e&&(n.email=e.email,n.usage=c.EMAIL),`phone`in e&&(n.phone_number=this.formatPhone(e.phone)),[4,this.oauthInstance.authApi.getVerification(n)];case 1:return[2,{data:{messageId:i.sent().verification_id},error:null}];case 2:return r=i.sent(),[2,{data:{messageId:null},error:new I(r,{method:`resend`})}];case 3:return[2]}})})},n.prototype.setSession=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.validateParams(e,{access_token:{required:!0,message:`Access token is required`},refresh_token:{required:!0,message:`Refresh token is required`}},`setSession`),[4,this.oauthInstance.oauth2client.refreshToken(e,{throwError:!0})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`setSession`})}];case 4:return[2]}})})},n.prototype.exchangeCodeForSession=function(){return H(this,void 0,void 0,function(){return U(this,function(e){return[2]})})},n.prototype.deleteUser=function(e){return H(this,void 0,Promise,function(){var t,n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),this.validateParams(e,{password:{required:!0,message:`Password is required`}},`deleteUser`),[4,this.oauthInstance.authApi.sudo(e)];case 1:return t=r.sent().sudo_token,[4,this.oauthInstance.authApi.deleteMe({sudo_token:t})];case 2:return r.sent(),[2,{data:{},error:null}];case 3:return n=r.sent(),[2,{data:{},error:new I(n,{method:`deleteUser`})}];case 4:return[2]}})})},n.prototype.toDefaultLoginPage=function(e){return e===void 0&&(e={}),H(this,void 0,Promise,function(){var t,n,r,i,a;return U(this,function(o){try{return t=e.config_version||`env`,n=Object.keys(e.query||{}).map(function(t){return`${t}=${e.query[t]}`}).join(`&`),ct.default.isMatch()?wx.navigateTo({url:`/packages/\$wd_system/pages/login/index${n?`?${n}`:``}`}):(r=e.redirect_uri||window.location.href,i=new URL(r),a=`${i.origin}/__auth/?app_id=${e.app_id||``}&env_id=${this.config.env}&client_id=${this.config.clientId||this.config.env}&config_version=${t}&redirect_uri=${encodeURIComponent(r)}${n?`&${n}`:``}`,window.location.href=a),[2,{data:{},error:null}]}catch(e){return[2,{data:{},error:new I(e,{method:`toDefaultLoginPage`})}]}})})},n.prototype.signInWithCustomTicket=function(e){return H(this,void 0,Promise,function(){var t,n,r,i;return U(this,function(a){switch(a.label){case 0:e&&this.setCustomSignFunc(e),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,this.oauthInstance.authApi.signInWithCustomTicket()];case 2:return a.sent(),[4,this.createLoginState()];case 3:return t=a.sent(),[4,this.getSession()];case 4:return n=a.sent().data,r=(n===void 0?{}:n).session,[2,B(B({},t),{data:{user:r.user,session:r},error:null})];case 5:return i=a.sent(),[2,{data:{user:null,session:null},error:new I(i,{method:`signInWithCustomTicket`})}];case 6:return[2]}})})},n.prototype.signInWithOpenId=function(e){var t=(e===void 0?{}:e).useWxCloud,n=t===void 0||t;return H(this,void 0,Promise,function(){var e,t,r,i,a,o,s=this;return U(this,function(c){switch(c.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);e=wx.getAccountInfoSync().miniProgram,t=function(t){return H(s,void 0,void 0,function(){var r,i;return U(this,function(a){switch(a.label){case 0:r=void 0,i=void 0,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:t,provider_params:{provider_code_type:`open_id`,appid:e?.appId}},n)];case 2:if((r=a.sent())?.error_code||!r.provider_token)throw r;return[4,this.oauthInstance.authApi.signInWithProvider({provider_token:r.provider_token},n)];case 3:if((i=a.sent())?.error_code)throw i;return[3,5];case 4:throw a.sent();case 5:return[4,this.oauthInstance.oauth2client.setCredentials(i)];case 6:return a.sent(),[2]}})})},c.label=1;case 1:return c.trys.push([1,5,,6]),[4,new Promise(function(e,n){wx.login({success:function(r){return H(s,void 0,void 0,function(){var i;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t(r.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return i=a.sent(),n(i),[3,3];case 3:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,n(t)}})})];case 2:return c.sent(),[4,this.createLoginState()];case 3:return r=c.sent(),[4,this.getSession()];case 4:return i=c.sent().data,a=(i===void 0?{}:i).session,[2,B(B({},r),{data:{user:a.user,session:a},error:null})];case 5:return o=c.sent(),[2,{data:{user:null,session:null},error:new I(o,{method:`signInWithOpenId`})}];case 6:return[2]}})})},n.prototype.signInWithPhoneAuth=function(e){var t=e.phoneCode,n=t===void 0?``:t,r=e.useWxCloud,i=r!==void 0&&r;return H(this,void 0,Promise,function(){var e,t,r,a,o,s,c,l,u;return U(this,function(d){switch(d.label){case 0:return ct.default.isMatch()?(e=wx.getAccountInfoSync().miniProgram,t={provider_params:{provider_code_type:`phone`,code:n,appid:e.appId},provider_id:e.appId},[4,wx.login()]):[2,{data:{user:null,session:null},error:new I({message:`wx api undefined`})}];case 1:r=d.sent().code,t.provider_code=r,d.label=2;case 2:return d.trys.push([2,5,,6]),[4,this.oauthInstance.authApi.grantProviderToken(t,i)];case 3:if((a=d.sent()).error_code)throw a;return[4,this.oauthInstance.authApi.signInWithProvider({provider_token:a.provider_token},i)];case 4:if((o=d.sent())?.error_code)throw o;return[3,6];case 5:return s=d.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`signInWithPhoneAuth`})}];case 6:return[4,this.createLoginState()];case 7:return c=d.sent(),[4,this.getSession()];case 8:return l=d.sent().data,u=(l===void 0?{}:l).session,[2,B(B({},c),{data:{user:u.user,session:u},error:null})]}})})},n.prototype.bindPhoneNumber=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.editContact(e)]})})},n.prototype.unbindProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.unbindProvider(e)]})})},n.prototype.bindEmail=function(e){return this.oauthInstance.authApi.editContact(e)},n.prototype.verify=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.verify(e)]})})},n.prototype.getVerification=function(e,t){return H(this,void 0,Promise,function(){return U(this,function(n){return e.phone_number&&=this.formatPhone(e.phone_number),[2,this.oauthInstance.authApi.getVerification(e,t)]})})},Object.defineProperty(n.prototype,"currentUser",{get:function(){if(this.cache.mode!==`async`){var e=this.hasLoginState();return e&&e.user||null}(0,Ie.printWarn)(z.ERRORS.INVALID_OPERATION,`current platform's storage is asynchronous, please use getCurrentUser instead`)},enumerable:!1,configurable:!0}),n.prototype.getCurrentUser=function(e){return e===void 0&&(e=!0),H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e?[4,this.getLoginState()]:[3,3];case 1:return(t=i.sent())?[4,t.user.refresh()]:[3,3];case 2:i.sent(),i.label=3;case 3:return[3,5];case 4:return i.sent(),[3,5];case 5:return[4,this.getLoginState()];case 6:return(n=i.sent())?(r=n.user.getLocalUserInfo(),[4,n.user.checkLocalInfoAsync()]):[3,8];case 7:return i.sent(),[2,B(B({},n.user),r)];case 8:return[2,null]}})})},n.prototype.signInAnonymouslyInWx=function(e){var t=(e===void 0?{}:e).useWxCloud;return H(this,void 0,Promise,function(){var e,n,r=this;return U(this,function(i){switch(i.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);return e=wx.getAccountInfoSync().miniProgram,n=function(n){return H(r,void 0,void 0,function(){var r,i;return U(this,function(a){switch(a.label){case 0:r=void 0,i=void 0,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:n,provider_params:{provider_code_type:`open_id`,appid:e?.appId}},t)];case 2:if((r=a.sent())?.error_code||!r.provider_token)throw r;return[4,this.oauthInstance.authApi.signInAnonymously({provider_token:r.provider_token},t)];case 3:if((i=a.sent())?.error_code)throw i;return[3,5];case 4:throw a.sent();case 5:return[2]}})})},[4,new Promise(function(e,t){wx.login({success:function(i){return H(r,void 0,void 0,function(){var r;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n(i.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return r=a.sent(),t(r),[3,3];case 3:return[2]}})})},fail:function(e){var n=Error(e?.errMsg);n.code=e?.errno,t(n)}})})];case 1:return i.sent(),[2,this.createLoginState(void 0,{asyncRefreshUser:!0})]}})})},n.prototype.bindOpenId=function(){return H(this,void 0,Promise,function(){var e,t,n=this;return U(this,function(r){switch(r.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);return e=wx.getAccountInfoSync().miniProgram,t=function(t){return H(n,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:n=void 0,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:t,provider_params:{provider_code_type:`open_id`,appid:e?.appId}})];case 2:if((n=r.sent())?.error_code||!n.provider_token)throw n;return[4,this.oauthInstance.authApi.bindWithProvider({provider_token:n.provider_token})];case 3:return r.sent(),[3,5];case 4:throw r.sent();case 5:return[2]}})})},[4,new Promise(function(e,r){wx.login({success:function(i){return H(n,void 0,void 0,function(){var n;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t(i.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return n=a.sent(),r(n),[3,3];case 3:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,r(t)}})})];case 1:return r.sent(),[2]}})})},n.prototype.signInWithUnionId=function(){return H(this,void 0,Promise,function(){var e=this;return U(this,function(t){switch(t.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);t.label=1;case 1:return t.trys.push([1,3,,4]),[4,new Promise(function(t,n){var r=wx.getAccountInfoSync().miniProgram;wx.login({success:function(i){return H(e,void 0,void 0,function(){var e,a,o,s,c;return U(this,function(l){switch(l.label){case 0:e=r?.appId,l.label=1;case 1:return l.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_code:i.code,provider_id:e,provider_params:{provider_code_type:`union_id`,appid:r?.appId}})];case 2:return a=l.sent(),(o=a.provider_token)?[4,this.oauthInstance.authApi.signInWithProvider({provider_id:e,provider_token:o})]:(n(a),[2]);case 3:return(s=l.sent())?.error_code?(n(s),[2]):(t(!0),[3,5]);case 4:return c=l.sent(),n(c),[3,5];case 5:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,n(t)}})})];case 2:return t.sent(),[3,4];case 3:throw t.sent();case 4:return[2,this.createLoginState()]}})})},n.prototype.signInWithSms=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.phoneNum,o=a===void 0?``:a,s=e.bindInfo,c=s===void 0?void 0:s;return H(this,void 0,Promise,function(){return U(this,function(e){try{return[2,this.signInWithUsername({verificationInfo:n,verificationCode:i,bindInfo:c,username:o,loginType:`sms`})]}catch(e){throw e}})})},n.prototype.signInWithEmail=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.bindInfo,o=a===void 0?void 0:a,s=e.email,c=s===void 0?``:s;return H(this,void 0,Promise,function(){return U(this,function(e){try{return[2,this.signInWithUsername({verificationInfo:n,verificationCode:i,bindInfo:o,username:c,loginType:`email`})]}catch(e){throw e}})})},n.prototype.setCustomSignFunc=function(e){this.oauthInstance.authApi.setCustomSignFunc(e)},n.prototype.signIn=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signIn(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.setPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.setPassword(e)]})})},n.prototype.isUsernameRegistered=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`username must be a string`),[4,this.oauthInstance.authApi.checkIfUserExist({username:e})];case 1:return[2,t.sent().exist]}})})},n.prototype.hasLoginState=function(){if(this.cache.mode!==`async`)return this.oauthInstance?.authApi.hasLoginStateSync()?new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance}):null;(0,Ie.printWarn)(z.ERRORS.INVALID_OPERATION,`current platform's storage is asynchronous, please use getLoginState instead`)},n.prototype.getLoginState=function(){return H(this,void 0,Promise,function(){var e;return U(this,function(t){switch(t.label){case 0:e=null,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.oauthInstance.authApi.getLoginState()];case 2:return e=t.sent(),[3,4];case 3:return t.sent(),[2,null];case 4:return e?[2,new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance})]:[2,null]}})})},n.prototype.getUserInfo=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.getCurrentUser()]})})},n.prototype.getWedaUserInfo=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getWedaUserInfo()]})})},n.prototype.updateUserBasicInfo=function(e){return H(this,void 0,void 0,function(){var t;return U(this,function(n){switch(n.label){case 0:return[4,this.getLoginState()];case 1:return(t=n.sent())?[4,t.user.updateUserBasicInfo(e)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},n.prototype.getAuthHeader=function(){return console.error(`Auth.getAuthHeader API 已废弃`),{}},n.prototype.bindWithProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.bindWithProvider(e)]})})},n.prototype.queryUser=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.queryUserProfile(e)]})})},n.prototype.getAccessToken=function(){return H(this,void 0,Promise,function(){return U(this,function(e){switch(e.label){case 0:return[4,this.oauthInstance.oauth2client.getAccessToken()];case 1:return[2,{accessToken:e.sent(),env:this.config.env}]}})})},n.prototype.grantProviderToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.grantProviderToken(e)]})})},n.prototype.patchProviderToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.patchProviderToken(e)]})})},n.prototype.signInWithProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signInWithProvider(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.signInWithWechat=function(e){return e===void 0&&(e={}),H(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signInWithWechat(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.grantToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.grantToken(e)];case 1:return t.sent(),[2,this.createLoginState()]}})})},n.prototype.genProviderRedirectUri=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.genProviderRedirectUri(e)]})})},n.prototype.resetPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.resetPassword(e)]})})},n.prototype.deviceAuthorize=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.deviceAuthorize(e)]})})},n.prototype.sudo=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.sudo(e)]})})},n.prototype.deleteMe=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.deleteMe(e)]})})},n.prototype.getProviders=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getProviders()]})})},n.prototype.loginScope=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.loginScope()]})})},n.prototype.loginGroups=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.loginGroups()]})})},n.prototype.onLoginStateChanged=function(e){var t;return H(this,void 0,void 0,function(){var n,r=this;return U(this,function(i){switch(i.label){case 0:return(t=this.config.eventBus)==null||t.on(_,function(t){return H(r,void 0,void 0,function(){var n,r;return U(this,function(i){switch(i.label){case 0:return t?.data?.eventType===u?[3,2]:[4,this.getLoginState()];case 1:return r=i.sent(),[3,3];case 2:r={},i.label=3;case 3:return n=r,e.call(this,B(B({},t),n)),[2]}})})}),[4,this.getLoginState()];case 1:return n=i.sent(),e.call(this,n),[2]}})})},n.prototype.refreshTokenForce=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.refreshTokenForce(e)]})})},n.prototype.getCredentials=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getCredentials()]})})},n.prototype.setCredentials=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.oauth2client.setCredentials(e)];case 1:return t.sent(),[2]}})})},n.prototype.getProviderSubType=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getProviderSubType()]})})},n.prototype.createCaptchaData=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.createCaptchaData(e)]})})},n.prototype.verifyCaptchaData=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.verifyCaptchaData(e)]})})},n.prototype.getMiniProgramQrCode=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getMiniProgramCode(e)]})})},n.prototype.getMiniProgramQrCodeStatus=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getMiniProgramQrCodeStatus(e)]})})},n.prototype.modifyPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.modifyPassword(e)]})})},n.prototype.modifyPasswordWithoutLogin=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.modifyPasswordWithoutLogin(e)]})})},n.prototype.getUserBehaviorLog=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getUserBehaviorLog(e)]})})},n.prototype.signInWithUsername=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.username,o=a===void 0?``:a,s=e.bindInfo,c=s===void 0?void 0:s,l=e.loginType,u=l===void 0?``:l;return H(this,void 0,Promise,function(){var e,t,r,a,s,l,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,8,,9]),[4,this.oauthInstance.authApi.verify({verification_id:n.verification_id,verification_code:i})];case 1:if((e=f.sent())?.error_code)throw e;return t=e.verification_token,r=this.formatPhone(o),a={phone_number:r},u===`email`&&(a={email:r=o}),n.is_user?[4,this.oauthInstance.authApi.signIn({username:r,verification_token:t})]:[3,5];case 2:if((s=f.sent())?.error_code)throw s;return c?[4,this.oauthInstance.authApi.bindWithProvider({provider_token:c?.providerToken})]:[3,4];case 3:if((l=f.sent())?.error_code)throw l;f.label=4;case 4:return[3,7];case 5:return[4,this.oauthInstance.authApi.signUp(B(B({},a),{verification_token:t,provider_token:c?.providerId}))];case 6:if((d=f.sent())?.error_code)throw d;f.label=7;case 7:return[2,this.createLoginState()];case 8:throw f.sent();case 9:return[2]}})})},n.prototype.createLoginState=function(e,t){return H(this,void 0,Promise,function(){var n;return U(this,function(r){switch(r.label){case 0:return[4,(n=new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance})).checkLocalStateAsync()];case 1:return r.sent(),t?.userInfo?(n.user.setLocalUserInfo(t.userInfo),[3,5]):[3,2];case 2:return t?.asyncRefreshUser?(n.user.refresh(e),[3,5]):[3,3];case 3:return[4,n.user.refresh(e)];case 4:r.sent(),r.label=5;case 5:return[2,n]}})})},n.prototype.setAccessKey=function(){var e,t;return H(this,void 0,void 0,function(){var n,r;return U(this,function(i){if(n=``,r=``,this.config.accessKey?(n=this.config.accessKey,r=`accessKey`):(e=this.config.auth)!=null&&e.secretId&&(t=this.config.auth)!=null&&t.secretKey&&(n=``,r=S),!r)return[2];try{this.oauthInstance.oauth2client.setAccessKeyCredentials({access_token:n,token_type:`Bearer`,scope:r,expires_at:new Date(+new Date+ +new Date),expires_in:+new Date+ +new Date})}catch(e){console.warn(`accessKey error: `,e)}return[2]})})},n.prototype.formatPhone=function(e){return!/\s+/.test(e)&&/^\+\d{1,3}\d+/.test(e)?e.replace(/^(\+\d{1,2})(\d+)$/,`$1 $2`):/^\+\d{1,3}\s+/.test(e)?e:`+86 ${e}`},n.prototype.notifyListeners=function(e,t,n){this.listeners.forEach(function(r){r.forEach(function(r){try{r(e,t,n)}catch(e){console.error(`Error in auth state change callback:`,e)}})})},n.prototype.setupListeners=function(){var e,t=this;(e=this.config.eventBus)==null||e.on(v,function(e){return H(t,void 0,void 0,function(){var t,n,r,i,a;return U(this,function(o){switch(o.label){case 0:return t=e?.data?.event,n=e?.data?.info,t!==f||n?[3,2]:[4,this.getUser(!0)];case 1:r=o.sent().data,(i=(r===void 0?{}:r).user)&&(n={user:i}),o.label=2;case 2:return[4,this.getSession()];case 3:return a=o.sent().data.session,this.notifyListeners(t,a,n),[2]}})})})},n.prototype.convertToUser=function(e){var t;if(!e)return null;var n=e?.email||``,r=e?.phone_number||``,i=e?.sub||e?.uid||``;return{id:i,aud:`authenticated`,role:((t=e.groups)?.map)?.call(t,function(e){return typeof e==`string`?e:e.id}),email:n||``,email_confirmed_at:(e?.email_verified,e.created_at),phone:r,phone_confirmed_at:r?e.created_at:void 0,confirmed_at:e.created_at,last_sign_in_at:e.last_sign_in_at,app_metadata:{provider:e.loginType?.toLowerCase()||`cloudbase`,providers:[e.loginType?.toLowerCase()||`cloudbase`]},user_metadata:{name:e?.name,picture:e?.picture,username:e?.username,gender:e?.gender,locale:e?.locale,uid:e.uid,nickName:e.nickName||e?.name,avatarUrl:e.avatarUrl||e.picture,location:e.location,hasPassword:e.hasPassword??e.password===`SET`,open_id:e?.open_id},identities:(e?.providers)?.map(function(t){return{id:t.id||``,identity_id:t.id||``,user_id:i,identity_data:{provider_id:t.id,provider_user_id:t.provider_user_id,name:t.name},provider:t.id||`cloudbase`,created_at:e.created_at,updated_at:e.updated_at,last_sign_in_at:e.last_sign_in_at}})||[],created_at:e.created_at,updated_at:e.updated_at,is_anonymous:e.name===`anonymous`}},n.prototype.missingRequiredParam=function(e,t){return new I({error:`missing_required_param`,error_code:4e3,error_description:`auth.${e}(params): missing required param '${t}'`},{method:e})},n.prototype.validateParams=function(e,t,n){for(var r=0,i=Object.entries(t);r<i.length;r++){var a=i[r],o=a[0];if(a[1].required&&(e?.[o]===void 0||e?.[o]===null||e?.[o]===``))throw this.missingRequiredParam(n,o)}},n.prototype.validateAtLeastOne=function(e,t,n){if(!t.some(function(t){return t.some(function(t){return e?.[t]!==void 0&&e?.[t]!==null&&e?.[t]!==``})}))throw this.missingRequiredParam(n,t.map(function(e){return e.join(`|`)}).join(`|`))},n.prototype.init=function(){var e;return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.oauthInstance.oauth2client.localCredentials.getCredentials()];case 1:return t.sent()&&!this.oauthInstance.oauth2client.initSessionEmitted&&((e=this.config.eventBus)==null||e.fire(v,{event:p})),[3,3];case 2:return t.sent(),[3,3];case 3:return[2,{error:null}]}})})},Tt([(0,ot.catchErrorsDecorator)({title:`绑定手机号失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindPhoneNumber() 的语法或参数是否正确`,` 2 - 当前环境是否开通了短信验证码登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(r=e.BindPhoneRequest)==`function`?r:Object]),V(`design:returntype`,Promise)],n.prototype,`bindPhoneNumber`,null),Tt([(0,ot.catchErrorsDecorator)({title:`解除三方绑定失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().unbindProvider() 的语法或参数是否正确`,` 2 - 当前账户是否已经与此登录方式解绑`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(i=e.UnbindProviderRequest)==`function`?i:Object]),V(`design:returntype`,typeof(a=typeof Promise<`u`&&Promise)==`function`?a:Object)],n.prototype,`unbindProvider`,null),Tt([(0,ot.catchErrorsDecorator)({title:`绑定邮箱地址失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindEmail() 的语法或参数是否正确`,` 2 - 当前环境是否开通了邮箱密码登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(o=e.BindEmailRequest)==`function`?o:Object]),V(`design:returntype`,void 0)],n.prototype,`bindEmail`,null),Tt([(0,ot.catchErrorsDecorator)({title:`验证码验证失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().verify() 的语法或参数是否正确`,` 2 - 当前环境是否开通了手机验证码/邮箱登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(s=e.VerifyRequest)==`function`?s:Object]),V(`design:returntype`,typeof(l=typeof Promise<`u`&&Promise)==`function`?l:Object)],n.prototype,`verify`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取验证码失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getVerification() 的语法或参数是否正确`,` 2 - 当前环境是否开通了手机验证码/邮箱登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(d=e.GetVerificationRequest)==`function`?d:Object,Object]),V(`design:returntype`,typeof(m=typeof Promise<`u`&&Promise)==`function`?m:Object)],n.prototype,`getVerification`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getCurrentUser() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(g=typeof Promise<`u`&&Promise)==`function`?g:Object)],n.prototype,`getCurrentUser`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序匿名登录失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了匿名登录`,` 2 - 调用 auth().signInAnonymouslyInWx() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(b=typeof Promise<`u`&&Promise)==`function`?b:Object)],n.prototype,`signInAnonymouslyInWx`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序绑定OpenID失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序openId静默登录`,` 2 - 调用 auth().bindOpenId() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(C=typeof Promise<`u`&&Promise)==`function`?C:Object)],n.prototype,`bindOpenId`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序unionId静默登录失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序unionId静默登录`,` 2 - 调用 auth().signInWithUnionId() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(w=typeof Promise<`u`&&Promise)==`function`?w:Object)],n.prototype,`signInWithUnionId`,null),Tt([(0,ot.catchErrorsDecorator)({title:`短信验证码登陆`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序短信验证码登陆`,` 2 - 调用 auth().signInWithSms() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(T=typeof Promise<`u`&&Promise)==`function`?T:Object)],n.prototype,`signInWithSms`,null),Tt([(0,ot.catchErrorsDecorator)({title:`邮箱验证码登陆`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了邮箱登陆`,` 2 - 调用 auth().signInWithEmail() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(E=typeof Promise<`u`&&Promise)==`function`?E:Object)],n.prototype,`signInWithEmail`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户是否被占用失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().isUsernameRegistered() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[String]),V(`design:returntype`,typeof(D=typeof Promise<`u`&&Promise)==`function`?D:Object)],n.prototype,`isUsernameRegistered`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取本地登录态失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getLoginState() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(ee=typeof Promise<`u`&&Promise)==`function`?ee:Object)],n.prototype,`getLoginState`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户信息失败`,messages:[`请确认以下各项:`,` 1 - 是否已登录`,` 2 - 调用 auth().getUserInfo() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(te=typeof Promise<`u`&&Promise)==`function`?te:Object)],n.prototype,`getUserInfo`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取微搭插件用户信息失败`,messages:[`请确认以下各项:`,` 1 - 是否已登录`,` 2 - 调用 auth().getWedaUserInfo() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(O=typeof Promise<`u`&&Promise)==`function`?O:Object)],n.prototype,`getWedaUserInfo`,null),Tt([(0,ot.catchErrorsDecorator)({title:`绑定第三方登录方式失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindWithProvider() 的语法或参数是否正确`,` 2 - 此账户是否已经绑定此第三方`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(A=e.BindWithProviderRequest)==`function`?A:Object]),V(`design:returntype`,typeof(ne=typeof Promise<`u`&&Promise)==`function`?ne:Object)],n.prototype,`bindWithProvider`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取身份源类型`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getProviderSubType() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(re=typeof Promise<`u`&&Promise)==`function`?re:Object)],n.prototype,`getProviderSubType`,null),n}(Ct),Ft=`auth`;function It(e,t){for(var n=[],r=0;r<=e.length;r++)n[r]=[r];for(var i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++){var a=e[r-1].toLowerCase()===t[i-1].toLowerCase()?0:1;n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+a)}return n[e.length][t.length]}var Lt={name:`auth`,namespace:Ft,entity:function(e){var t=function(e){var t=this;if(this.authInstance&&!e)return this.authInstance;e||={region:``,persistence:`local`,apiPath:s};var n=this.platform.adapter,r=e.persistence||n.primaryStorage;r&&r!==this.config.persistence&&this.updateConfig({persistence:r});var i=function(e,t){var n=this,r=e.region,i=r===void 0?`ap-shanghai`:r,a=e.i18n,o=e.accessKey,c=e.useWxCloud,l=t?.platform||lt.useDefaultAdapter.bind(t)(),u=l.runtime,d=l.adapter,p=t||{},m=p.env,h=p.clientId,_=p.debug,b=p.cache,S=p.app,C=p.getApiOrigin,w=(t||{}).apiOrigin;w||=`https://${m}.${i}.tcb-api.tencentcloudapi.com`;var T={env:m,clientId:h,i18n:a,accessKey:o,useWxCloud:c,eventBus:new Fe.CloudbaseEventEmitter},E=new at(gt(B(B({},T),{apiOrigin:w,getApiOrigin:C,apiPath:e?.apiPath||s,storage:e?.storage,baseRequest:e?.baseRequest,request:e?.request,anonymousSignInFunc:e?.anonymousSignInFunc,captchaOptions:e?.captchaOptions,wxCloud:e?.wxCloud,adapter:d,onCredentialsError:Dt(T.eventBus),headers:B({"X-SDK-Version":`@cloudbase/js-sdk/${e.sdkVersion}`},e.headers||{}),detectSessionInUrl:e.detectSessionInUrl,debug:_,auth:t.app?.config?.auth}))),D=new Pt(B(B({},T),{region:i,persistence:e.persistence,debug:_,cache:b||new st.CloudbaseCache({persistence:e.persistence,keys:{userInfoKey:`user_info_${m}`},platformInfo:l}),runtime:u||`web`,_fromApp:S,oauthInstance:E,auth:t.app?.config?.auth}));return E.initializeSession(function(e,t){return H(n,void 0,void 0,function(){return U(this,function(n){return e&&(e.type===y?t?T.eventBus.fire(v,{event:f,info:B(B({},e),{error:t})}):e.user&&D.createLoginState({},{userInfo:e.user}):e.type===x&&T.eventBus.fire(v,{event:g,info:B(B({},e),{error:t})})),[2]})})}),{authInstance:D,oauthInstance:E}}(B(B({wxCloud:this.config.wxCloud,storage:this.config.storage},e),{persistence:this.config.persistence,i18n:this.config.i18n,accessKey:this.config.accessKey,useWxCloud:this.config.useWxCloud,sdkVersion:this.version,detectSessionInUrl:this.config.auth?.detectSessionInUrl}),{env:this.config.env,clientId:this.config.clientId,getApiOrigin:function(){return t.request.getBaseEndPoint(t.config.endPointMode||`CLOUD_API`)},platform:this.platform,cache:this.cache,app:this,debug:this.config.debug}),a=i.authInstance,o=i.oauthInstance;return this.oauthInstance=o,this.authInstance=a,this.authInstance},n=t.call(this,e);Object.assign(t,n),Object.setPrototypeOf(t,Object.getPrototypeOf(n));var r=typeof Proxy<`u`?new Proxy(t,{get:function(e,t,n){var r=Reflect.get(e,t,n);if(r!==void 0||typeof t!=`string`)return r;var i=function(e,t){for(var n=null,r=1/0,i=0,a=t;i<a.length;i++){var o=a[i];if(!o.startsWith(`_`)&&o!==`constructor`){var s=It(e,o);s<r&&(r=s,n=o)}}return n}(t,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).concat(Object.keys(e)).filter(function(t){return typeof e[t]==`function`}));return i&&console.warn(`[CloudBase Auth] auth.${t} is not a function. Did you mean: auth.${i}() ?`),r}}):t;return this[Ft]=r,r}};try{cloudbase.registerComponent(Lt)}catch{}var Rt=function(e){try{e.registerComponent(Lt)}catch(e){console.warn(e)}};try{window.registerAuth=Rt}catch{}})(),ho.W;var go={388:e=>{e.exports={}}},_o={};function vo(e){var t=_o[e];if(t!==void 0)return t.exports;var n=_o[e]={exports:{}};return go[e](n,n.exports,vo),n.exports}vo.d=(e,t)=>{for(var n in t)vo.o(t,n)&&!vo.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},vo.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var yo={};(()=>{vo.d(yo,{r:()=>ve});var e=vo(388);function t(){return`@cloudbase/js-sdk`}var n={INVALID_PARAMS:`INVALID_PARAMS`,INVALID_SYNTAX:`INVALID_SYNTAX`,INVALID_OPERATION:`INVALID_OPERATION`,OPERATION_FAIL:`OPERATION_FAIL`,NETWORK_ERROR:`NETWORK_ERROR`,UNKOWN_ERROR:`UNKOWN_ERROR`};let r=(i={AbstractSDKRequest:()=>f,AbstractStorage:()=>p},a={},vo.d(a,i),a);var i,a,o,s=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}o(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function l(e,t){console.warn(`[@cloudbase/js-sdk][${e}]:${t}`)}var u=function(e){function t(t){var n=e.call(this,t.msg||t.message||``)||this;return n.code=t.code||``,n.requestId=t.requestId||``,Object.defineProperty(n,"message",{value:t.msg||t.message||``,enumerable:!0,writable:!0,configurable:!0}),n}return s(t,e),t}(Error),d=function(e){return new u(e)};function m(e,t){return(t||d)(e)}var h,g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},v=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){function t(t){var n=e.call(this)||this,r=t.timeout,i=t.timeoutMsg,a=t.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=i||`请求超时`,n.restrictedMethods=a||[`get`,`post`,`upload`,`download`],n}g(t,e),t.prototype.get=function(e){return this.request(_(_({},e),{method:`get`}),this.restrictedMethods.includes(`get`))},t.prototype.post=function(e){return this.request(_(_({},e),{method:`post`}),this.restrictedMethods.includes(`post`))},t.prototype.put=function(e){return this.request(_(_({},e),{method:`put`}))},t.prototype.upload=function(e){var t=e,n=t.data,r=t.file,i=t.fileContent,a=t.name,o=t.method,s=t.headers,c=s===void 0?{}:s,l=r??i,u={post:`post`,put:`put`}[o?.toLowerCase()]||`put`,d=new FormData;return u===`post`?(Object.keys(n).forEach(function(e){d.append(e,n[e])}),d.append(`key`,a),d.append(`file`,l instanceof Blob?l:new Blob([l])),this.request(_(_({},e),{data:d,method:u}),this.restrictedMethods.includes(`upload`))):this.request(_(_({},e),{method:`put`,headers:c,body:l}),this.restrictedMethods.includes(`upload`))},t.prototype.download=function(e){return v(this,void 0,Promise,function(){var t,n,r,i;return y(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(_(_({},e),{headers:{},responseType:`blob`}))];case 1:return t=a.sent().data,n=window.URL.createObjectURL(new Blob([t])),r=decodeURIComponent(new URL(e.url).pathname.split(`/`).pop()||``),(i=document.createElement(`a`)).href=n,i.setAttribute(`download`,r),i.style.display=`none`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise(function(t){t({statusCode:200,tempFilePath:e.url})})]}})})},t.prototype.fetch=function(e){return v(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m=this;return y(this,function(h){switch(h.label){case 0:return t=new AbortController,n=e.url,r=e.enableAbort,i=r!==void 0&&r,a=e.stream,o=a!==void 0&&a,s=e.signal,c=e.timeout,l=e.shouldThrowOnError,u=l===void 0||l,d=c??this.timeout,s&&(s.aborted&&t.abort(),s.addEventListener(`abort`,function(){return t.abort()})),f=null,i&&d&&(f=setTimeout(function(){console.warn(m.timeoutMsg),t.abort(Error(m.timeoutMsg))},d)),[4,fetch(n,_(_({},e),{signal:t.signal})).then(function(e){return v(m,void 0,void 0,function(){var t,n,r;return y(this,function(i){switch(i.label){case 0:return clearTimeout(f),u?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,e.json()];case 2:t=r.apply(n,[i.sent()]),i.label=3;case 3:return[2,t];case 4:return[2,e]}})})}).catch(function(e){return clearTimeout(f),Promise.reject(e)})];case 1:return p=h.sent(),[2,{data:o?p.body:p.headers.get(`content-type`)?.includes(`application/json`)?p.json():p.text(),statusCode:p.status,header:p.headers,response:p}]}})})},t.prototype.request=function(e,t){var n=this;t===void 0&&(t=!1);var r=String(e.method).toLowerCase()||`get`;return new Promise(function(i){var a=e.url,o=e.headers,s=o===void 0?{}:o,c=e.data,l=e.responseType,u=e.withCredentials,d=e.body,f=e.onUploadProgress,p=function(e,t,n){n===void 0&&(n={});var r=/\?/.test(t),i=``;return Object.keys(n).forEach(function(e){i===``?!r&&(t+=`?`):i+=`&`,i+=`${e}=${encodeURIComponent(n[e])}`}),/^http(s)?:\/\//.test(t+=i)?t:`${e}${t}`}(`https:`,a,r===`get`?c:{}),m=new XMLHttpRequest;m.open(r,p),l&&(m.responseType=l);var h,g,_,v=e.signal;v&&(v.aborted?m.abort():v.addEventListener(`abort`,function(){return m.abort()},{once:!0})),Object.keys(s).forEach(function(e){m.setRequestHeader(e,s[e])}),f&&m.upload.addEventListener(`progress`,f),m.onreadystatechange=function(){var e={};if(m.readyState===4){var t=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};t.forEach(function(e){var t=e.split(`: `),r=t.shift().toLowerCase();n[r]=t.join(`: `)}),e.header=n,e.statusCode=m.status;try{e.data=l===`blob`?m.response:JSON.parse(m.responseText)}catch{e.data=l===`blob`?m.response:m.responseText}clearTimeout(h),i(e)}},t&&n.timeout&&(h=setTimeout(function(){console.warn(n.timeoutMsg),m.abort()},n.timeout)),_=c,g=Object.prototype.toString.call(_)===`[object FormData]`?c:s[`content-type`]===`application/x-www-form-urlencoded`?function(e){e===void 0&&(e={});var t=[];return Object.keys(e).forEach(function(n){t.push(`${n}=${encodeURIComponent(e[n])}`)}),t.join(`&`)}(c):d||(c?JSON.stringify(c):void 0),u&&(m.withCredentials=!0),m.send(g)})}})(r.AbstractSDKRequest),function(e){e.WEB=`web`,e.WX_MP=`wx_mp`}(h||={});var x=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},C=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},w=function(e){function t(t){var n=e.call(this)||this;return n.root=t,t.tcbCacheObject||={},n}return x(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}(r.AbstractStorage);(function(){function e(e){this.keys={};var t=e.persistence,r=e.platformInfo,i=r===void 0?{}:r,a=e.keys,o=a===void 0?{}:a;this.platformInfo=i,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case`local`:default:return t.localStorage?t.localStorage:(l(n.INVALID_PARAMS,`localStorage is not supported on current platform`),new w(t.root));case`none`:return new w(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=o)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||`sync`},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,r){if(this.mode!==`async`){if(this.storage)try{var i={version:r||`localCachev1`,content:t};this.storage.setItem(e,JSON.stringify(i))}catch(e){throw Error(JSON.stringify({code:n.OPERATION_FAIL,msg:`[@cloudbase/js-sdk][${n.OPERATION_FAIL}]setStore failed`,info:e}))}}else l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use setStoreAsync insteed`)},e.prototype.setStoreAsync=function(e,t,n){return S(this,void 0,void 0,function(){var r;return C(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),r={version:n||`localCachev1`,content:t},[4,this.storage.setItem(e,JSON.stringify(r))];case 2:return i.sent(),[3,4];case 3:return i.sent(),[2];case 4:return[2]}})})},e.prototype.getStore=function(e,t){if(this.mode!==`async`){try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return``}catch{return``}t||=`localCachev1`;var r=this.storage.getItem(e);return r&&r.indexOf(t)>=0?JSON.parse(r).content:``}l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use getStoreAsync insteed`)},e.prototype.getStoreAsync=function(e,t){return S(this,void 0,void 0,function(){var n;return C(this,function(r){switch(r.label){case 0:try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,``]}catch{return[2,``]}return t||=`localCachev1`,[4,this.storage.getItem(e)];case 1:return(n=r.sent())&&n.indexOf(t)>=0?[2,JSON.parse(n).content]:[2,``]}})})},e.prototype.removeStore=function(e){this.mode===`async`?l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use removeStoreAsync insteed`):this.storage.removeItem(e)},e.prototype.removeStoreAsync=function(e){return S(this,void 0,void 0,function(){return C(this,function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}})})}})();var T=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e,t){this.data=t||null,this.name=e},D=function(e){function t(t,n){var r=e.call(this,`error`,{error:t,data:n})||this;return r.error=t,r}return T(t,e),t}(E),ee=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,n){if(n?.[e]){var r=n[e].indexOf(t);r!==-1&&n[e].splice(r,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if(e instanceof D)return console.error(e.error),this;var n=typeof e==`string`?new E(e,t||{}):e,r=n.name;if(this.listens(r)){n.target=this;for(var i=0,a=this.listeners[r]?function(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],this.listeners[r],!0):[];i<a.length;i++)a[i].call(this,n)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();new ee,new ee,typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.indexOf(`Firefox`),(e=>{var t={};return vo.d(t,e),t})({default:()=>b}).default;var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},te.apply(this,arguments)},O=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},k=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},A=n,ne=`cloudrun`;function re(e,t){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;return k(this,function(_){switch(_.label){case 0:if(n=e.name,r=e.data,i=e.path,a=i===void 0?``:i,o=e.method,s=e.header,c=s===void 0?{}:s,l=this.getEndPointWithKey(`GATEWAY`),u=l.BASE_URL,d=l.PROTOCOL,f=`${d}${u}/cloudrun/${n}`,p=a.startsWith(`/`)?a:`/${a}`,m=[`GET`,`HEAD`].includes((o?.toUpperCase)?.call(o)))try{h={};try{h=JSON.parse(r)}catch{h=r||{}}p=`${p}${p.includes(`?`)?`&`:`?`}${Object.keys(h).map(function(e){return`${e}=${h[e]}`}).join(`&`)}`}catch{}return[4,this.request.fetch(te(te({method:o||`POST`,headers:Object.assign({},{"Content-Type":`application/json; charset=utf-8`},c)},m?{}:{body:r}),{url:`${f}${p}`,customReqOpts:t}))];case 1:return g=_.sent(),t?.from===`node-sdk`?[2,g]:[4,g.data];case 2:return[2,_.sent()]}})})}var ie={name:ne,entity:{callContainer:new(function(){function e(){}return e.prototype.callContainer=function(e,t){return O(this,void 0,void 0,function(){var n,r,i;return k(this,function(a){switch(a.label){case 0:if(n=e.name,r=e.data,!n)throw Error(JSON.stringify({code:A.INVALID_PARAMS,msg:`[${ne}.callContainer] invalid name`}));try{i=r?JSON.stringify(r):``}catch{throw Error(JSON.stringify({code:A.INVALID_PARAMS,msg:`[${ne}.callContainer] invalid data`}))}return[4,re.call(this,te(te({},e),{data:i}),t)];case 1:return[2,a.sent()]}})})},e}())().callContainer}};try{cloudbase.registerComponent(ie)}catch{}try{window.registerCloudrun=function(e){try{e.registerComponent(ie)}catch(e){console.warn(e)}}}catch{}var ae=function(){return ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ae.apply(this,arguments)},oe=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},se=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},ce=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},le=t,ue=n,de=function(e,t,n){if(n===void 0&&(n=null),e&&typeof e==`function`)return e(t,n);if(t)throw t;return n},fe=function(e,t){if(function(e){return!e||typeof e.throw!=`boolean`||e.throw}(e))throw m(c(c({},t),{msg:t.message}),e?.errorFactory);return c({code:t.code,message:t.message},t.requestId?{requestId:t.requestId}:{})},pe=`functions`;function me(e){return e.length<=1024?e:`${e.slice(0,1024)}…`}function he(e,t){return{code:e?.code||ue.NETWORK_ERROR,message:e?.message||e?.msg||``,requestId:t}}function ge(e,t){if(e&&typeof e==`object`&&!Array.isArray(e))return he(e,t);if(typeof e==`string`){try{var n=JSON.parse(e);if(n&&typeof n==`object`&&!Array.isArray(n))return he(n,t)}catch{}return{code:ue.NETWORK_ERROR,message:me(e),requestId:t}}return{code:ue.NETWORK_ERROR,message:me(e==null?``:String(e)),requestId:t}}var _e={name:pe,entity:{callFunction:new(function(){function t(){}var n,r,i,a;return t.invokeCloudrun=function(e,t,n){return se(this,void 0,void 0,function(){var r,i,a,o,s,c,l;return ce(this,function(u){switch(u.label){case 0:return r=t.name,i=t.path,a=i===void 0?``:i,o=t.method,s=t.header,c=s===void 0?{}:s,d=new Date().getTime(),f=(Date==null?void 0:Date.now)&&1e3*Date.now()||0,l=`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=16*Math.random();return d>0?(t=(d+t)%16|0,d=Math.floor(d/16)):(t=(f+t)%16|0,f=Math.floor(f/16)),(e===`x`?t:7&t|8).toString(16)}),[4,re.call(e,{name:r,data:n,path:a,method:o,header:ae(ae({},c),{"X-Request-Id":l})})];case 1:return[2,{result:u.sent(),requestId:l}]}var d,f})})},t.invokeGateway=function(e,t,n,r){return se(this,void 0,void 0,function(){var i,a,o,s,c;return ce(this,function(l){switch(l.label){case 0:i=e.request,a=e.config,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,i.gateWay(ae(ae({},t),{path:`functions`,shouldThrowOnError:!1}),r)];case 2:return o=l.sent(),[3,4];case 3:return s=l.sent(),function(e){if(!e)return!1;if(e instanceof SyntaxError||e.name===`SyntaxError`)return!0;var t=String(e.message||``);return/not valid JSON|Unexpected token|JSON\.parse|Failed to execute 'json'/i.test(t)}(c=s)?[2,fe(a,ge(c.message,c.requestId))]:[2,de(n,c)];case 4:return Number(o?.statusCode)>=400?[2,fe(a,ge(o?.data,o?.requestId))]:[2,de(n,null,{requestId:o?.requestId,result:o?.data})]}})})},t.invokeCloudApi=function(e,t,n,r,i){return se(this,void 0,void 0,function(){var a,o,s,c,l,u,d;return ce(this,function(f){switch(f.label){case 0:return a=t.name,o=t.data,s=t.query,c=t.parse,l=t.search,[4,e.request.send(`functions.invokeFunction`,{inQuery:s,parse:c,search:l,function_name:a,request_data:n},{endPointMode:`CLOUD_API`,defaultQuery:o?.params?.action?{action:o?.params?.action}:{}},i)];case 1:if(u=f.sent(),(d=u.data?.response_data)===void 0)return[2,de(r,null,u)];if(c)return[2,de(r,null,{result:d,requestId:u.requestId})];try{return d=JSON.parse(d),[2,de(r,null,{result:d,requestId:u.requestId})]}catch{return[2,de(r,Error(`[${le()}][${ue.INVALID_PARAMS}][${pe}.callFunction] response data must be json`))]}}})})},t.prototype.callFunction=function(e,n,r){return se(this,void 0,void 0,function(){var i,a,o,s,c,l;return ce(this,function(u){switch(u.label){case 0:if(i=e.name,a=e.data,o=e.type,s=this.config,!i)return[2,fe(s,{code:ue.INVALID_PARAMS,message:`[${pe}.callFunction] invalid function name`})];try{c=a?JSON.stringify(a):``}catch{return[2,fe(s,{code:ue.INVALID_PARAMS,message:`[${pe}.callFunction] invalid data`})]}if(o===`cloudrun`)return[2,t.invokeCloudrun(this,e,c)];u.label=1;case 1:return u.trys.push([1,5,,6]),function(e,t){return e.endPointMode===`GATEWAY`&&!function(e){return e===`lcap-common-service`||e===`lcap-datasource-test`||e.startsWith(`lcap-data`)||e.startsWith(`lowcode-datasource`)||e===`cloudbase_module`}(t)&&!function(e){return e===`lowcode-wx-datasource`}(t)}(s,i)?[4,t.invokeGateway(this,e,n,r)]:[3,3];case 2:return[2,u.sent()];case 3:return[4,t.invokeCloudApi(this,e,c,n,r)];case 4:return[2,u.sent()];case 5:return l=u.sent(),de(n,l),[3,6];case 6:return[2]}})})},function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([(a={customInfo:{className:`Cloudbase`,methodName:`callFunction`},title:`函数调用失败`,messages:[`请确认以下各项:`,` 1 - 调用 callFunction() 的语法或参数是否正确`,` 2 - 当前环境下是否存在此函数`,` 3 - 函数安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:https://support.qq.com/products/148793`]},a.mode,a.customInfo,a.title,a.messages,function(e,t,n){}),oe(`design:type`,Function),oe(`design:paramtypes`,[typeof(n=e.ICallFunctionOptions!==void 0&&e.ICallFunctionOptions)==`function`?n:Object,typeof(r=typeof Function<`u`&&Function)==`function`?r:Object,typeof(i=e.ICustomReqOpts!==void 0&&e.ICustomReqOpts)==`function`?i:Object]),oe(`design:returntype`,Promise)],t.prototype,`callFunction`,null),t}())().callFunction}};try{cloudbase.registerComponent(_e)}catch{}var ve=function(e){try{e.registerComponent(_e)}catch(e){console.warn(e)}};try{window.registerFunctions=ve}catch{}})(),yo.r;var bo={388:e=>{e.exports={}}},xo={};function So(e){var t=xo[e];if(t!==void 0)return t.exports;var n=xo[e]={exports:{}};return bo[e](n,n.exports,So),n.exports}So.d=(e,t)=>{for(var n in t)So.o(t,n)&&!So.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},So.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Co={};(()=>{So.d(Co,{v:()=>ct});var e,t=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}),n=function(e){function n(t){var n=e.call(this,t)||this;return n.__isStorageError=!0,n.name=`StorageError`,n}return t(n,e),n}(Error);function r(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var i,a=function(e){function n(t,n,r){var i=e.call(this,t)||this;return i.name=`StorageApiError`,i.status=n,i.statusCode=r,i}return t(n,e),n.prototype.toJSON=function(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}},n}(n);function o(){return globalThis.Buffer}function s(e){var t=o();return t?t.from(e).toString(`base64`):btoa(e)}function c(e){return e.split(`/`).map(function(e){return encodeURIComponent(e)}).join(`/`)}t(function(e,t){var n=i.call(this,e)||this;return n.name=`StorageUnknownError`,n.originalError=t,n},i=n);var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)},u=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},d=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},m=`/v1/storages`;function h(e,t){return u(this,void 0,Promise,function(){var i;return d(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e()];case 1:return[2,{data:a.sent(),error:null}];case 2:if(i=a.sent(),t)throw i;return r(i)?[2,{data:null,error:i}]:[2,{data:null,error:new n(i?.message||String(i))}];case 3:return[2]}})})}var g=function(){function e(e){this.ctx=e}return Object.defineProperty(e.prototype,"request",{get:function(){return this.ctx.request},enumerable:!1,configurable:!0}),e.prototype.gatewayOrigin=function(){return this.request.getBaseEndPoint(`GATEWAY`)},e.prototype.buildUrl=function(e,t){var n=`${this.gatewayOrigin()}${m}${e}`,r=function(e){if(!e)return``;var t=[];return Object.keys(e).forEach(function(n){var r=e[n];r!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`)}),t.join(`&`)}(t);return r&&(n+=(n.includes(`?`)?`&`:`?`)+r),n},e.prototype.toFullUrl=function(e){return e&&(/^https?:\/\//.test(e)||e.startsWith(`//`)?e:`${this.gatewayOrigin()}${m}${e.startsWith(`/`)?``:`/`}${e}`)},e.prototype.send=function(e){return u(this,void 0,Promise,function(){var t,n,r,i,a,o;return d(this,function(s){switch(s.label){case 0:return t=this.buildUrl(e.path,e.query),n=e.method.toUpperCase(),r=[`GET`,`HEAD`].includes(n),i=l({},e.headers||{}),r||(e.rawBody===void 0?e.json!==void 0&&(i[`Content-Type`]=i[`Content-Type`]||`application/json`,a=JSON.stringify(e.json)):a=e.rawBody),[4,this.request.fetch(l(l(l(l({url:t,method:n,headers:i},a===void 0?{}:{body:a}),{withCredentials:!1!==e.withCredentials,shouldThrowOnError:!1}),e.signal?{signal:e.signal}:{}),e.cache?{cache:e.cache}:{}))];case 1:return o=s.sent(),[2,this.unwrap(o,t)]}})})},e.prototype.download=function(e){return u(this,void 0,Promise,function(){var t,n,r,i;return d(this,function(o){switch(o.label){case 0:return t=this.buildUrl(e.path,e.query),[4,this.request.fetch(l(l({url:t,method:`GET`,headers:l({},e.headers||{}),stream:!0,withCredentials:!1!==e.withCredentials,shouldThrowOnError:!1},e.signal?{signal:e.signal}:{}),e.cache?{cache:e.cache}:{}))];case 1:if(n=o.sent(),e.signal?.aborted)throw new a(`The download was aborted`,0,`STORAGE_PG_ABORTED`);if((r=Number(n?.statusCode??200))===304)throw new a(`Not Modified`,r,`STORAGE_PG_NOT_MODIFIED`);if(r>=400)throw new a(`Download failed with status ${r}`,r,`STORAGE_PG_REQUEST_FAIL`);if(!(i=n?.response))throw new a(`Underlying adapter did not expose the raw Response`,r,`STORAGE_PG_NO_RESPONSE`);return[2,{response:i,status:r,header:n?.header}]}})})},e.prototype.unwrap=function(e,t){return u(this,void 0,Promise,function(){var n,r,i,o;return d(this,function(s){switch(s.label){case 0:n=Number(e?.statusCode??e?.status??200),r=e?.data,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r];case 2:return r=s.sent(),[3,4];case 3:return s.sent(),r=void 0,[3,4];case 4:if(n>=200&&n<300)return[2,r];throw i=r?.code||r?.error||`STORAGE_PG_REQUEST_FAIL`,o=r?.message||`Storage request failed with status ${n}: ${t}`,new a(o,n,i)}})})},e}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},v=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};function x(e){return r(e)?e:new n(e?.message||String(e))}function S(e){var t={};return e?.download!==void 0&&(t.download=!0===e.download?``:e.download),e?.cacheNonce!==void 0&&(t.cacheNonce=String(e.cacheNonce)),{headers:{},query:t}}var C=function(){function e(e){this.ctx=e}return e.prototype.then=function(e,t){return this.execute().then(e,t)},e.prototype.execute=function(){return v(this,void 0,Promise,function(){var e,t,n,r,i;return y(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=S(this.ctx.options),t=e.headers,n=e.query,[4,this.ctx.http.download({path:`/object/${this.ctx.bucketId}/${c(this.ctx.cleanName)}`,headers:_(_({},this.ctx.headers),t),query:n,signal:this.ctx.parameters?.signal,cache:this.ctx.parameters?.cache})];case 1:if(!(r=o.sent().response).body)throw new a(`Response body is empty`,r.status,`STORAGE_PG_EMPTY_BODY`);return[2,{data:r.body,error:null}];case 2:if(i=o.sent(),this.ctx.shouldThrowOnError)throw i;return[2,{data:null,error:x(i)}];case 3:return[2]}})})},e}(),w=function(){function e(e){this.ctx=e}return e.prototype.asStream=function(){return new C(this.ctx)},e.prototype.then=function(e,t){return this.execute().then(e,t)},e.prototype.execute=function(){return v(this,void 0,Promise,function(){var e,t,n,r,i,a;return y(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),e=S(this.ctx.options),t=e.headers,n=e.query,[4,this.ctx.http.download({path:`/object/${this.ctx.bucketId}/${c(this.ctx.cleanName)}`,headers:_(_({},this.ctx.headers),t),query:n,signal:this.ctx.parameters?.signal,cache:this.ctx.parameters?.cache})];case 1:return r=o.sent().response,a={},[4,r.blob()];case 2:return[2,(a.data=o.sent(),a.error=null,a)];case 3:if(i=o.sent(),this.ctx.shouldThrowOnError)throw i;return[2,{data:null,error:x(i)}];case 4:return[2]}})})},e}(),T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)},E=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},D=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ee=`3600`,te=function(){function e(e,t,n){n===void 0&&(n=!1),this.headers={},this.http=e,this.bucketId=t,this.shouldThrowOnError=n}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.setHeader=function(e,t){var r;if(typeof e!=`string`||e.trim()===``)throw new n(`setHeader requires a non-empty header name`);if(/[\r\n]/.test(e)||typeof t==`string`&&/[\r\n]/.test(t))throw new n(`setHeader does not allow CR/LF characters in header name or value`);return this.headers=T(T({},this.headers),((r={})[e]=String(t),r)),this},e.prototype.upload=function(e,t,n){return E(this,void 0,Promise,function(){return D(this,function(r){return[2,this.uploadOrUpdate(`POST`,e,t,n)]})})},e.prototype.update=function(e,t,n){return E(this,void 0,Promise,function(){return D(this,function(r){return[2,this.uploadOrUpdate(`PUT`,e,t,n)]})})},e.prototype.download=function(e,t,n){return new w({http:this.http,bucketId:this.bucketId,cleanName:this.cleanPath(e),options:t,parameters:n,headers:this.headers,shouldThrowOnError:this.shouldThrowOnError})},e.prototype.list=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r;return D(this,function(i){return r={prefix:e||``},t?.limit!==void 0&&(r.limit=t.limit),t?.cursor!==void 0&&(r.cursor=t.cursor),t?.withDelimiter!==void 0&&(r.with_delimiter=t.withDelimiter),t?.sortBy!==void 0&&(r.sortBy=t.sortBy),[2,this.send({method:`POST`,path:`/object/list/${this.bucketId}`,json:r,signal:n?.signal,cache:n?.cache})]})})},this.shouldThrowOnError)]})})},e.prototype.remove=function(e){return E(this,void 0,Promise,function(){var t=this;return D(this,function(n){return[2,h(function(){return E(t,void 0,void 0,function(){var t,n,r,i,a,o=this;return D(this,function(s){switch(s.label){case 0:t=e.map(function(e){return o.cleanPath(e)}),n=[],r=0,s.label=1;case 1:return r<t.length?(i=t.slice(r,r+100),[4,this.send({method:`DELETE`,path:`/object/${this.bucketId}`,json:{prefixes:i}})]):[3,4];case 2:a=s.sent(),Array.isArray(a)&&n.push.apply(n,a),s.label=3;case 3:return r+=100,[3,1];case 4:return[2,n]}})})},this.shouldThrowOnError)]})})},e.prototype.copy=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r;return D(this,function(i){switch(i.label){case 0:return r=this.buildCopyMoveHeaders(n),[4,this.send({method:`POST`,path:`/object/copy`,json:{bucketId:this.bucketId,sourceKey:this.cleanPath(e),destinationKey:this.cleanPath(t),destinationBucket:n?.destinationBucket,copyMetadata:n?.copyMetadata,metadata:n?.metadata},headers:r})];case 1:return[2,{path:i.sent().Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.move=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){return D(this,function(r){switch(r.label){case 0:return[4,this.send({method:`POST`,path:`/object/move`,json:{bucketId:this.bucketId,sourceKey:this.cleanPath(e),destinationKey:this.cleanPath(t),destinationBucket:n?.destinationBucket}})];case 1:return[2,{message:r.sent().message||`Successfully moved`}]}})})},this.shouldThrowOnError)]})})},e.prototype.info=function(e){return E(this,void 0,Promise,function(){var t=this;return D(this,function(n){return[2,h(function(){return E(t,void 0,void 0,function(){var t,n;return D(this,function(r){switch(r.label){case 0:return t=this.cleanPath(e),[4,this.send({method:`GET`,path:`/object/info/${this.bucketId}/${this.encodePath(t)}`})];case 1:return[2,{id:(n=r.sent()).id,name:n.name,version:n.version,bucketId:n.bucket_id,size:n.size,contentType:n.content_type,cacheControl:n.cache_control,etag:n.etag,metadata:n.metadata,lastModified:n.last_modified,createdAt:n.created_at}]}})})},this.shouldThrowOnError)]})})},e.prototype.exists=function(e){return E(this,void 0,Promise,function(){var t,r,i;return D(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=this.cleanPath(e),[4,this.send({method:`GET`,path:`/object/info/${this.bucketId}/${this.encodePath(t)}`})];case 1:return a.sent(),[2,{data:!0,error:null}];case 2:if(r=a.sent(),(i=r?.status)!==void 0&&[400,404].includes(Number(i)))return[2,{data:!1,error:null}];if(this.shouldThrowOnError)throw r;return[2,{data:null,error:r instanceof n?r:new n(r?.message||String(r))}];case 3:return[2]}})})},e.prototype.createSignedUrl=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r,i,a;return D(this,function(o){switch(o.label){case 0:return r=this.cleanPath(e),[4,this.send({method:`POST`,path:`/object/sign/${this.bucketId}/${this.encodePath(r)}`,json:{expiresIn:t}})];case 1:return i=o.sent(),a=i.fullSignedURL||this.http.toFullUrl(i.signedURL||``),[2,{fullSignedURL:this.appendUrlOptions(a,n)}]}})})},this.shouldThrowOnError)]})})},e.prototype.createSignedUrls=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r,i,a,o,s=this;return D(this,function(c){switch(c.label){case 0:r=e.map(function(e){return s.cleanPath(e)}),i=[],a=0,c.label=1;case 1:return a<r.length?(o=r.slice(a,a+500),[4,this.send({method:`POST`,path:`/object/sign/${this.bucketId}`,json:{expiresIn:t,paths:o}})]):[3,4];case 2:c.sent().forEach(function(e){var t=e.fullSignedURL||(e.signedURL?s.http.toFullUrl(e.signedURL):null);i.push({path:e.path,fullSignedURL:t?s.appendUrlOptions(t,n):null,error:e.error??null})}),c.label=3;case 3:return a+=500,[3,1];case 4:return[2,i]}})})},this.shouldThrowOnError)]})})},e.prototype.createSignedUploadUrl=function(e,t){return E(this,void 0,Promise,function(){var n=this;return D(this,function(r){return[2,h(function(){return E(n,void 0,void 0,function(){var n,r,i;return D(this,function(a){switch(a.label){case 0:return n=this.cleanPath(e),r={},t!=null&&t.upsert&&(r[`x-upsert`]=`true`),[4,this.send({method:`POST`,path:`/object/upload/sign/${this.bucketId}/${this.encodePath(n)}`,headers:r})];case 1:return[2,{fullSignedURL:(i=a.sent()).fullURL||this.http.toFullUrl(i.url||``),path:n,token:i.token}]}})})},this.shouldThrowOnError)]})})},e.prototype.uploadToSignedUrl=function(e,t,n,r){return E(this,void 0,Promise,function(){var i=this;return D(this,function(a){return[2,h(function(){return E(i,void 0,void 0,function(){var i,a,o,s,c;return D(this,function(l){switch(l.label){case 0:return i=this.cleanPath(e),a=this.buildUploadBody(n,r),o=a.body,s=a.headers,[4,this.send({method:`PUT`,path:`/object/upload/sign/${this.bucketId}/${this.encodePath(i)}`,query:{token:t},rawBody:o,headers:s,withCredentials:!1})];case 1:return c=l.sent(),[2,{path:i,fullPath:c.Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.getPublicUrl=function(e,t){var n=this.cleanPath(e),r=this.http.buildUrl(`/object/public/${this.bucketId}/${this.encodePath(n)}`);return{data:{publicUrl:this.appendUrlOptions(r,t)}}},e.prototype.send=function(e){return this.http.send(T(T({},e),{headers:T(T({},this.headers),e.headers||{})}))},e.prototype.uploadOrUpdate=function(e,t,n,r){return E(this,void 0,Promise,function(){var i=this;return D(this,function(a){return[2,h(function(){return E(i,void 0,void 0,function(){var i,a,o,s,c;return D(this,function(l){switch(l.label){case 0:return i=this.cleanPath(t),a=this.buildUploadBody(n,r),o=a.body,s=a.headers,e===`POST`&&(s[`x-upsert`]=String(!!r?.upsert)),[4,this.send({method:e,path:`/object/${this.bucketId}/${this.encodePath(i)}`,rawBody:o,headers:s})];case 1:return[2,{id:(c=l.sent()).Id,path:i,fullPath:c.Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.cleanPath=function(e){var t=e.replace(/^\/+|\/+$/g,``).replace(/\/+/g,`/`);if(t.split(`/`).some(function(e){return e===`..`}))throw new n(`invalid path: ".." segment is not allowed`);return t},e.prototype.encodePath=function(e){return c(e)},e.prototype.buildUploadBody=function(e,t){var n=T({},t?.headers||{}),r=e,i=typeof FormData<`u`&&e instanceof FormData;if(typeof Blob<`u`&&e instanceof Blob||i){var a=void 0,o={};if(i){var s=this.extractFromFormData(e);a=s.file,o=s.fields}else a=e;var c=t?.cacheControl??o.cacheControl??ee,l=t?.contentType??o.contentType,u=t?.metadata===void 0?o.metadata:JSON.stringify(t.metadata),d=new FormData;c!==void 0&&d.append(`cacheControl`,String(c)),l!==void 0&&d.append(`contentType`,l),u!==void 0&&d.append(`metadata`,u),d.append(``,a),r=d}else r=e,c=t?.cacheControl??ee,l=t?.contentType??`text/plain;charset=UTF-8`,n[`cache-control`]=`max-age=${c}`,l&&(n[`content-type`]=l),t!=null&&t.metadata&&(n[`x-metadata`]=this.toBase64(JSON.stringify(t.metadata)));return{body:r,headers:n}},e.prototype.extractFromFormData=function(e){var t,r={},i=0,a=[];if(e.forEach(function(e,n){if(typeof Blob<`u`&&e instanceof Blob)return t=e,void(i+=1);n!==`cacheControl`&&n!==`contentType`&&n!==`metadata`?a.push(n):r[n]=String(e)}),a.length>0&&console.warn(`Ignored unsupported FormData field(s): [${a.join(`, `)}]. Only file, cacheControl, contentType and metadata are supported`),i===0||!t)throw new n(`FormData must contain a file`);if(i>1)throw new n(`FormData must contain exactly one file`);return{file:t,fields:r}},e.prototype.buildCopyMoveHeaders=function(e){var t={};return e!=null&&e.upsert&&(t[`x-upsert`]=`true`),!1===e?.copyMetadata&&e!=null&&e.metadata&&(t[`x-metadata`]=this.toBase64(JSON.stringify(e.metadata))),t},e.prototype.appendUrlOptions=function(e,t){var n=[];if(t?.download!==void 0){var r=!0===t.download?``:String(t.download);n.push(`download=${encodeURIComponent(r)}`)}return t?.cacheNonce!==void 0&&n.push(`cacheNonce=${encodeURIComponent(String(t.cacheNonce))}`),n.length===0?e:`${e}${e.includes(`?`)?`&`:`?`}${n.join(`&`)}`},e.prototype.toBase64=function(e){return s(e)},e}(),O=/[\x00-\x20\x7f/\\?#%]/;function k(e,t){if(typeof e!=`string`||e.length===0)throw new n(`[storage.${t}] bucketId is required`);if(e.length>256)throw new n(`[storage.${t}] invalid bucketId: length must be 1-256`);var r=O.exec(e);if(r)throw new n(`[storage.${t}] invalid bucketId "${e}": contains forbidden character ${JSON.stringify(r[0])}; must not contain whitespace, control chars, "/", "\\", "?", "#" or "%"`)}var A=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},ne=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},re=function(){function e(e,t){t===void 0&&(t=!1),this.http=new g(e),this.shouldThrowOnError=t}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.listBuckets=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){var n={};return e?.limit!==void 0&&(n.limit=e.limit),e?.offset!==void 0&&(n.offset=e.offset),e!=null&&e.sortColumn&&(n.sortColumn=e.sortColumn),e!=null&&e.sortOrder&&(n.sortOrder=e.sortOrder),e!=null&&e.search&&(n.search=e.search),t.http.send({method:`GET`,path:`/bucket/`,query:n})},this.shouldThrowOnError)]})})},e.prototype.getBucket=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){return k(e,`getBucket`),t.http.send({method:`GET`,path:`/bucket/${e}`})},this.shouldThrowOnError)]})})},e.prototype.createBucket=function(e,t){return A(this,void 0,Promise,function(){var n=this;return ne(this,function(r){return[2,h(function(){var r;return k(e,`createBucket`),n.http.send({method:`POST`,path:`/bucket/`,json:{id:e,name:e,public:(r=t?.public)!=null&&r,type:t?.type,file_size_limit:t?.fileSizeLimit,allowed_mime_types:t?.allowedMimeTypes}})},this.shouldThrowOnError)]})})},e.prototype.updateBucket=function(e,t){return A(this,void 0,Promise,function(){var n=this;return ne(this,function(r){return[2,h(function(){return k(e,`updateBucket`),n.http.send({method:`PUT`,path:`/bucket/${e}`,json:{public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes}})},this.shouldThrowOnError)]})})},e.prototype.deleteBucket=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){return k(e,`deleteBucket`),t.http.send({method:`DELETE`,path:`/bucket/${e}`})},this.shouldThrowOnError)]})})},e}();function ie(){return`@cloudbase/js-sdk`}var ae={INVALID_PARAMS:`INVALID_PARAMS`,INVALID_SYNTAX:`INVALID_SYNTAX`,INVALID_OPERATION:`INVALID_OPERATION`,OPERATION_FAIL:`OPERATION_FAIL`,NETWORK_ERROR:`NETWORK_ERROR`,UNKOWN_ERROR:`UNKOWN_ERROR`};let oe=(se={AbstractSDKRequest:()=>f,AbstractStorage:()=>p},ce={},So.d(ce,se),ce);var se,ce,le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ue.apply(this,arguments)};function de(e){return typeof e==`string`}function fe(e,t){console.warn(`[@cloudbase/js-sdk][${e}]:${t}`)}var pe=function(e){function t(t){var n=e.call(this,t.msg||t.message||``)||this;return n.code=t.code||``,n.requestId=t.requestId||``,Object.defineProperty(n,"message",{value:t.msg||t.message||``,enumerable:!0,writable:!0,configurable:!0}),n}return le(t,e),t}(Error),me=function(e){return new pe(e)};function he(e,t){return(t||me)(e)}function ge(e){if(e&&typeof e==`object`&&e.data&&typeof e.data==`object`){var t=e.data,n=t.code,r=t.message;if(!e.code&&n||!e.message&&r)return ue(ue(ue({},e),!e.code&&n?{code:n}:{}),!e.message&&r?{message:r}:{})}return e}var _e,ve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(){return j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},j.apply(this,arguments)},ye=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},be=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){function t(t){var n=e.call(this)||this,r=t.timeout,i=t.timeoutMsg,a=t.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=i||`请求超时`,n.restrictedMethods=a||[`get`,`post`,`upload`,`download`],n}ve(t,e),t.prototype.get=function(e){return this.request(j(j({},e),{method:`get`}),this.restrictedMethods.includes(`get`))},t.prototype.post=function(e){return this.request(j(j({},e),{method:`post`}),this.restrictedMethods.includes(`post`))},t.prototype.put=function(e){return this.request(j(j({},e),{method:`put`}))},t.prototype.upload=function(e){var t=e,n=t.data,r=t.file,i=t.fileContent,a=t.name,o=t.method,s=t.headers,c=s===void 0?{}:s,l=r??i,u={post:`post`,put:`put`}[o?.toLowerCase()]||`put`,d=new FormData;return u===`post`?(Object.keys(n).forEach(function(e){d.append(e,n[e])}),d.append(`key`,a),d.append(`file`,l instanceof Blob?l:new Blob([l])),this.request(j(j({},e),{data:d,method:u}),this.restrictedMethods.includes(`upload`))):this.request(j(j({},e),{method:`put`,headers:c,body:l}),this.restrictedMethods.includes(`upload`))},t.prototype.download=function(e){return ye(this,void 0,Promise,function(){var t,n,r,i;return be(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(j(j({},e),{headers:{},responseType:`blob`}))];case 1:return t=a.sent().data,n=window.URL.createObjectURL(new Blob([t])),r=decodeURIComponent(new URL(e.url).pathname.split(`/`).pop()||``),(i=document.createElement(`a`)).href=n,i.setAttribute(`download`,r),i.style.display=`none`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise(function(t){t({statusCode:200,tempFilePath:e.url})})]}})})},t.prototype.fetch=function(e){return ye(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m=this;return be(this,function(h){switch(h.label){case 0:return t=new AbortController,n=e.url,r=e.enableAbort,i=r!==void 0&&r,a=e.stream,o=a!==void 0&&a,s=e.signal,c=e.timeout,l=e.shouldThrowOnError,u=l===void 0||l,d=c??this.timeout,s&&(s.aborted&&t.abort(),s.addEventListener(`abort`,function(){return t.abort()})),f=null,i&&d&&(f=setTimeout(function(){console.warn(m.timeoutMsg),t.abort(Error(m.timeoutMsg))},d)),[4,fetch(n,j(j({},e),{signal:t.signal})).then(function(e){return ye(m,void 0,void 0,function(){var t,n,r;return be(this,function(i){switch(i.label){case 0:return clearTimeout(f),u?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,e.json()];case 2:t=r.apply(n,[i.sent()]),i.label=3;case 3:return[2,t];case 4:return[2,e]}})})}).catch(function(e){return clearTimeout(f),Promise.reject(e)})];case 1:return p=h.sent(),[2,{data:o?p.body:p.headers.get(`content-type`)?.includes(`application/json`)?p.json():p.text(),statusCode:p.status,header:p.headers,response:p}]}})})},t.prototype.request=function(e,t){var n=this;t===void 0&&(t=!1);var r=String(e.method).toLowerCase()||`get`;return new Promise(function(i){var a=e.url,o=e.headers,s=o===void 0?{}:o,c=e.data,l=e.responseType,u=e.withCredentials,d=e.body,f=e.onUploadProgress,p=function(e,t,n){n===void 0&&(n={});var r=/\?/.test(t),i=``;return Object.keys(n).forEach(function(e){i===``?!r&&(t+=`?`):i+=`&`,i+=`${e}=${encodeURIComponent(n[e])}`}),/^http(s)?:\/\//.test(t+=i)?t:`${e}${t}`}(`https:`,a,r===`get`?c:{}),m=new XMLHttpRequest;m.open(r,p),l&&(m.responseType=l);var h,g,_,v=e.signal;v&&(v.aborted?m.abort():v.addEventListener(`abort`,function(){return m.abort()},{once:!0})),Object.keys(s).forEach(function(e){m.setRequestHeader(e,s[e])}),f&&m.upload.addEventListener(`progress`,f),m.onreadystatechange=function(){var e={};if(m.readyState===4){var t=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};t.forEach(function(e){var t=e.split(`: `),r=t.shift().toLowerCase();n[r]=t.join(`: `)}),e.header=n,e.statusCode=m.status;try{e.data=l===`blob`?m.response:JSON.parse(m.responseText)}catch{e.data=l===`blob`?m.response:m.responseText}clearTimeout(h),i(e)}},t&&n.timeout&&(h=setTimeout(function(){console.warn(n.timeoutMsg),m.abort()},n.timeout)),_=c,g=Object.prototype.toString.call(_)===`[object FormData]`?c:s[`content-type`]===`application/x-www-form-urlencoded`?function(e){e===void 0&&(e={});var t=[];return Object.keys(e).forEach(function(n){t.push(`${n}=${encodeURIComponent(e[n])}`)}),t.join(`&`)}(c):d||(c?JSON.stringify(c):void 0),u&&(m.withCredentials=!0),m.send(g)})}})(oe.AbstractSDKRequest),function(e){e.WEB=`web`,e.WX_MP=`wx_mp`}(_e||={});var xe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},Ce=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},we=function(e){function t(t){var n=e.call(this)||this;return n.root=t,t.tcbCacheObject||={},n}return xe(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}(oe.AbstractStorage);(function(){function e(e){this.keys={};var t=e.persistence,n=e.platformInfo,r=n===void 0?{}:n,i=e.keys,a=i===void 0?{}:i;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case`local`:default:return t.localStorage?t.localStorage:(fe(ae.INVALID_PARAMS,`localStorage is not supported on current platform`),new we(t.root));case`none`:return new we(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=a)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||`sync`},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,n){if(this.mode!==`async`){if(this.storage)try{var r={version:n||`localCachev1`,content:t};this.storage.setItem(e,JSON.stringify(r))}catch(e){throw Error(JSON.stringify({code:ae.OPERATION_FAIL,msg:`[@cloudbase/js-sdk][${ae.OPERATION_FAIL}]setStore failed`,info:e}))}}else fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use setStoreAsync insteed`)},e.prototype.setStoreAsync=function(e,t,n){return Se(this,void 0,void 0,function(){var r;return Ce(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),r={version:n||`localCachev1`,content:t},[4,this.storage.setItem(e,JSON.stringify(r))];case 2:return i.sent(),[3,4];case 3:return i.sent(),[2];case 4:return[2]}})})},e.prototype.getStore=function(e,t){if(this.mode!==`async`){try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return``}catch{return``}t||=`localCachev1`;var n=this.storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:``}fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use getStoreAsync insteed`)},e.prototype.getStoreAsync=function(e,t){return Se(this,void 0,void 0,function(){var n;return Ce(this,function(r){switch(r.label){case 0:try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,``]}catch{return[2,``]}return t||=`localCachev1`,[4,this.storage.getItem(e)];case 1:return(n=r.sent())&&n.indexOf(t)>=0?[2,JSON.parse(n).content]:[2,``]}})})},e.prototype.removeStore=function(e){this.mode===`async`?fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use removeStoreAsync insteed`):this.storage.removeItem(e)},e.prototype.removeStoreAsync=function(e){return Se(this,void 0,void 0,function(){return Ce(this,function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}})})}})();var Te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e,t){this.data=t||null,this.name=e},Ee=function(e){function t(t,n){var r=e.call(this,`error`,{error:t,data:n})||this;return r.error=t,r}return Te(t,e),t}(M),N=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,n){if(n?.[e]){var r=n[e].indexOf(t);r!==-1&&n[e].splice(r,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if(e instanceof Ee)return console.error(e.error),this;var n=de(e)?new M(e,t||{}):e,r=n.name;if(this.listens(r)){n.target=this;for(var i=0,a=this.listeners[r]?function(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],this.listeners[r],!0):[];i<a.length;i++)a[i].call(this,n)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();new N,new N,typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.indexOf(`Firefox`),(e=>{var t={};return So.d(t,e),t})({default:()=>b}).default;var P,De=So(388),Oe=function(){return Oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Oe.apply(this,arguments)},ke=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ae=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},je=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},Me=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){e.put=`put`,e.post=`post`})(P||={});var Ne=ie,Pe=ae,Fe=`https://support.qq.com/products/148793`,Ie=function(e){return Object.prototype.toString.call(e)===`[object Array]`},Le=de,Re=function(e){return Object.prototype.toString.call(e)===`[object Object]`},ze=function(e,t,n){if(n===void 0&&(n=null),e&&typeof e==`function`)return e(t,n);if(t)throw t;return n},Be=function(e,t){if(function(e){return!e||typeof e.throw!=`boolean`||e.throw}(e))throw he(ue(ue({},t),{msg:t.message}),e?.errorFactory);return ue({code:t.code,message:t.message},t.requestId?{requestId:t.requestId}:{})},Ve=fe,He=function(e){return e.mode,e.customInfo,e.title,e.messages,function(e,t,n){}},Ue=`storage`;function We(e,t){return t&&typeof t!=`function`?[Oe(Oe({},e),{customReqOpts:t}),void 0]:[e,t]}var Ge=function(e,t,n){return je(void 0,void 0,void 0,function(){var r,i;return Me(this,function(a){switch(a.label){case 0:return[4,e.gateWay({path:`storages`,name:`get-objects-upload-info`,data:[Oe({objectId:t.path},t.signedHeader?{signedHeader:t.signedHeader}:{})]},n)];case 1:return r=ge(r=a.sent()),i=r.data?.[0]||{},[2,Oe(Oe({},r),{data:Oe(Oe({},i.code?Oe({},i):{}),{authorization:i.authorization,token:i.token,url:i.uploadUrl,fileId:i.cloudObjectId,cosFileId:i.cloudObjectMeta,download_url:i.downloadUrl})})]}})})},Ke=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`get-objects-download-info`,data:t.convertedFileList.map(function(e){return Oe({cloudObjectId:e.fileid},e.max_age==null?{}:{maxAge:e.max_age})})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{download_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,message:e.message,fileid:e.cloudObjectId,download_url:e.downloadUrl,fileID:e.cloudObjectId,tempFileURL:e.downloadUrl,mime_type:e.contentType||F(null,e.cloudObjectId||``)}}):[]}})]}})})},qe=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`delete-objects`,data:t.fileList.map(function(e){return{cloudObjectId:e}})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{delete_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,fileID:e.cloudObjectId,message:e.message}}):[]}})]}})})},Je=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`copy-objects`,data:t.convertedFileList.map(function(e){return{srcPath:e.src_path,dstPath:e.dst_path,overwrite:e.overwrite,removeOriginal:e.remove_original}})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{copy_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,fileID:e.cloudObjectId,fileId:e.cloudObjectId,message:e.message}}):[]}})]}})})},Ye={txt:`text/plain`,json:`application/json`,html:`text/html`,htm:`text/html`,css:`text/css`,js:`application/javascript`,csv:`text/csv`,xml:`application/xml`,png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,svg:`image/svg+xml`,ico:`image/x-icon`,pdf:`application/pdf`,zip:`application/zip`,gz:`application/gzip`,mp4:`video/mp4`,webm:`video/webm`,mp3:`audio/mpeg`,wav:`audio/wav`};function F(e,t){if(typeof Blob<`u`&&e instanceof Blob&&e.type)return e.type;var n=/\.([a-zA-Z0-9]+)$/.exec(t||``);return Ye[n?n[1].toLowerCase():``]||`application/octet-stream`}function Xe(){return typeof globalThis.wx?.getFileSystemManager==`function`}function Ze(e,t){var n=t.toLowerCase();return Object.keys(e).some(function(e){return e.toLowerCase()===n})}function Qe(e){return Object.keys(e).reduce(function(t,n){var r;return Oe(Oe({},t),((r={})[n]=[e[n]],r))},{})}function $e(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1}var et=function(){function e(e){this.context=e}var t,n,r,i,a,s,c,l,u,d,f,p,m,h,g,_,v;return Object.defineProperty(e.prototype,"config",{get:function(){return this.context?.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){return this.context?.request},enumerable:!1,configurable:!0}),e.prototype.isGateWay=function(){return(this.config.endPointMode||`CLOUD_API`)===`GATEWAY`},e.prototype.uploadFile=function(e,t){var n;return je(this,void 0,Promise,function(){var r,i,a,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,te,O,k,A,ne,re,ie,ae,oe;return Me(this,function(se){switch(se.label){case 0:if(re=We(e,t),e=re[0],t=re[1],r=e.cloudPath,i=e.filePath,a=e.onUploadProgress,ie=e.method,s=ie===void 0?`put`:ie,ae=e.headers,c=ae===void 0?{}:ae,l=e.fileContent,!Le(r)||!i&&!l)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.uploadFile] invalid params`})];if(i&&l&&console.warn(`[${Ne()}][${Ue}.uploadFile] fileContent 是兼容字段,与 filePath 同时传入时忽略,实际使用 filePath`),u=i??l,(d={put:P.put,post:P.post}[s.toLocaleLowerCase()]||P.put)===P.post&&console.warn(`[${Ne()}][${Ue}.uploadFile] method: 'post' 已废弃,请改用 'put'`),f=this.isGateWay(),p=Oe({},c),m=Object.keys(c).reduce(function(e,t){return t.toLowerCase()!==`content-length`&&(e[t]=c[t]),e},{}),d===P.put&&f){if(!Ze(p,`content-length`)){if(h=((n=this.request)?.getUploadByteLength)?.call(n,u),typeof(g=typeof h==`number`?h:function(e){if((!Xe()||typeof e!=`string`)&&e!==null){if(typeof Blob<`u`&&e instanceof Blob)return e.size;if(typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||typeof ArrayBuffer.isView==`function`&&ArrayBuffer.isView(e)))return e.byteLength;if(typeof e==`string`){if(typeof Blob<`u`)return new Blob([e]).size;var t=(n=e,(r=o())?.byteLength(n));return typeof t==`number`?t:e.length}var n,r;return typeof e==`object`&&typeof e.size==`number`?e.size:void 0}}(u))!=`number`)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:Xe()?`[${Ue}.uploadFile] 无法计算 content-length,请确认上传内容为有效的本地临时路径,或传入 ArrayBuffer`:`[${Ue}.uploadFile] 无法计算 content-length,请传入 File/Blob/Buffer/ArrayBuffer,或在 headers 中提供 content-length`})];p[`content-length`]=String(g)}Ze(p,`content-type`)||(p[`content-type`]=F(u,r)),Ze(m,`content-type`)||(m[`content-type`]=F(u,r))}return[4,this.getUploadMetadata({cloudPath:r,method:d,headers:d!==P.put||f?void 0:m,signedHeader:d===P.put&&f?Qe(p):void 0,customReqOpts:e.customReqOpts})];case 1:return _=se.sent(),v=_.data,y=_.requestId,(b=v)?.code||!b?.url?(x=b?.code||Pe.OPERATION_FAIL,S=b?.message||`get upload info failed`,[2,ze(t,Error(`[${Ne()}][${x}][${Ue}]:${S}`))]):(C=v.url,w=v.authorization,T=v.token,E=v.fileId,D=v.cosFileId,ee=v.download_url,O=Oe(Oe({},te={url:C,file:u,name:r,onUploadProgress:a,fileId:E,requestId:y}),{method:P.put,headers:Oe(Oe({},m),{authorization:w,"x-cos-meta-fileid":D,"x-cos-security-token":T})}),k=Oe(Oe({},te),{method:P.post,data:{key:r,signature:w,"x-cos-meta-fileid":D,success_action_status:`201`,"x-cos-security-token":T}}),(oe={})[P.put]={params:O,isSuccess:function(e){return e>=200&&e<300}},oe[P.post]={params:k,isSuccess:function(e){return e===201}},A=oe,[4,this.request.upload(A[d].params)]);case 2:return ne=se.sent(),A[d].isSuccess(ne.statusCode)?[2,ze(t,null,{fileID:E,download_url:ee,requestId:y})]:[2,ze(t,Error(`[${Ne()}][${Pe.OPERATION_FAIL}][${Ue}]:${ne.data}`))]}})})},e.prototype.getUploadMetadata=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d;return Me(this,function(f){switch(f.label){case 0:if(n=e.cloudPath,r=e.method,i=e.headers,a=e.signedHeader,!Le(n))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getUploadMetadata] invalid cloudPath`})];o=this.request,s=`storage.getUploadMetadata`,f.label=1;case 1:return f.trys.push([1,6,,7]),c=void 0,l={path:n},u=this.isGateWay(),r&&(l.method=r),r===P.put&&(u&&a?l.signedHeader=a:!u&&i&&(l.headers=i)),r!==P.post&&u?[3,3]:[4,o.send(s,l,{endPointMode:`CLOUD_API`},e.customReqOpts)];case 2:return c=f.sent(),[3,5];case 3:return[4,Ge(o,l,e.customReqOpts)];case 4:c=f.sent(),f.label=5;case 5:return[2,ze(t,null,c)];case 6:return d=f.sent(),[2,ze(t,d)];case 7:return[2]}})})},e.prototype.deleteFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u;return Me(this,function(d){switch(d.label){case 0:if(u=We(e,t),e=u[0],t=u[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.deleteFile] fileList must not be empty`})];for(r=0,i=n;r<i.length;r++)if(!(a=i[r])||!Le(a))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.deleteFile] fileID must be string`})];return o=`storage.batchDeleteFile`,s=this.request,c={},this.isGateWay()?[4,qe(s,{fileList:n},e.customReqOpts)]:[3,2];case 1:return c=d.sent(),[3,4];case 2:return[4,s.send(o,{fileid_list:n},e.customReqOpts)];case 3:c=d.sent(),d.label=4;case 4:return c.code?[2,ze(t,null,c)]:(l={fileList:c.data.delete_list,requestId:c.requestId},[2,ze(t,null,l)])}})})},e.prototype.getTempFileURL=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d,f,p;return Me(this,function(m){switch(m.label){case 0:if(p=We(e,t),e=p[0],t=p[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] fileList must not be empty`})];for(r=[],i=!1,a=0,o=n;a<o.length;a++)if(s=o[a],Re(s)){if(!Object.prototype.hasOwnProperty.call(s,`fileID`))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] file info must include fileID`})];if(c={fileid:s.fileID},Object.prototype.hasOwnProperty.call(s,`maxAge`)){if(!$e(l=s.maxAge))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] maxAge must be an integer greater than or equal to 1`})];l>3600&&!i&&(Ve(Pe.INVALID_PARAMS,`[${Ue}.getTempFileURL] maxAge ${l} 大于 3600,仍按原值下发`),i=!0),c.max_age=l}r.push(c)}else{if(!Le(s))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] invalid fileList`})];r.push({fileid:s})}return u=`storage.batchGetDownloadUrl`,d=this.request,f={},this.isGateWay()?[4,Ke(d,{convertedFileList:r},e.customReqOpts)]:[3,2];case 1:return f=m.sent(),[3,4];case 2:return[4,d.send(u,{file_list:r},e.customReqOpts)];case 3:f=m.sent(),m.label=4;case 4:return f.code?[2,ze(t,null,f)]:[2,ze(t,null,{fileList:Array.isArray(f.data?.download_list)?f.data.download_list:[],requestId:f.requestId})]}})})},e.prototype.downloadFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c;return Me(this,function(l){switch(l.label){case 0:return c=We(e,t),e=c[0],t=c[1],n=e.fileID,Le(n)?[4,this.getTempFileURL.call(this,{fileList:[{fileID:n,maxAge:600}],customReqOpts:e.customReqOpts})]:[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] fileID must be string`})];case 1:return r=l.sent(),(i=r.fileList[0]).code===`SUCCESS`?(a=this.request,o=encodeURI(i.download_url),[4,a.download({url:o,tempFilePath:e.tempFilePath})]):[2,ze(t,i)];case 2:return s=l.sent(),[2,ze(t,null,s)]}})})},e.prototype.copyFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d;return Me(this,function(f){switch(f.label){case 0:if(d=We(e,t),e=d[0],t=d[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] fileList must not be empty`})];for(r=[],i=0,a=n;i<a.length;i++){if(o=a[i],s=o.srcPath,c=o.dstPath,!s||!c||typeof s!=`string`||typeof c!=`string`)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] srcPath and dstPath may not be empty`})];if(s===c)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] srcPath and dstPath can not be the same`})];r.push({src_path:s,dst_path:c,overwrite:o.overwrite,remove_original:o.removeOriginal})}return l=this.request,u={},this.isGateWay()?[4,Je(l,{convertedFileList:r},e.customReqOpts)]:[3,2];case 1:return u=f.sent(),[3,4];case 2:return[4,l.send(`storage.batchCopyFile`,{file_list:r},e.customReqOpts)];case 3:u=f.sent(),f.label=4;case 4:return u.code?[2,ze(t,null,u)]:[2,ze(t,null,{fileList:u.data.copy_list,requestId:u.requestId})]}})})},e.prototype.getFileInfo=function(e){return je(this,void 0,Promise,function(){var t,n=this;return Me(this,function(r){switch(r.label){case 0:return[4,this.getTempFileURL(e)];case 1:return(t=r.sent())?.fileList&&t?.fileList?.length>0?[4,Promise.all(t.fileList.map(function(e){return je(n,void 0,void 0,function(){var t,n,r,i,a,o,s;return Me(this,function(c){switch(c.label){case 0:if(e.code!==`SUCCESS`)return[2,{code:e.code,fileID:e.fileID,tempFileURL:e.tempFileURL,message:e.message}];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.request.fetch({url:e.tempFileURL,method:`HEAD`})];case 2:return t=c.sent(),n=t.header,typeof Headers<`u`&&n instanceof Headers&&(r={},n.forEach(function(e,t){r[t]=e}),n=r),i=parseInt(n[`content-length`])||0,a=n[`content-type`]||``,[400,404].includes(Number(t.statusCode))?[2,{code:`FILE_NOT_FOUND`,fileID:e.fileID,tempFileURL:e.tempFileURL,message:`file not found`}]:[2,{code:e.code,fileID:e.fileID,tempFileURL:e.tempFileURL,cloudId:e.fileID,fileName:e.fileID.split(`/`).pop(),contentType:a,mime:a.split(`;`)[0].trim(),size:i,etag:n.etag||``,lastModified:n[`last-modified`]||``,cacheControl:n[`cache-control`]||``}];case 3:return o=c.sent(),s=typeof o==`object`&&o&&`message`in o?String(o.message):void 0,[2,{code:`FETCH_FILE_INFO_ERROR`,fileID:e.fileID,tempFileURL:e.tempFileURL,message:s}];case 4:return[2]}})})}))]:[3,3];case 2:return[2,{fileList:r.sent(),requestId:t.requestId}];case 3:return[2,{fileList:[],requestId:t.requestId}]}})})},ke([He({customInfo:{className:`Cloudbase`,methodName:`uploadFile`},title:`上传文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 uploadFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(t=De.ICloudbaseUploadFileParams!==void 0&&De.ICloudbaseUploadFileParams)==`function`?t:Object,typeof(n=typeof Function<`u`&&Function)==`function`?n:Object]),Ae(`design:returntype`,typeof(r=typeof Promise<`u`&&Promise)==`function`?r:Object)],e.prototype,`uploadFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`getUploadMetadata`},title:`获取上传元信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 getUploadMetadata() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[Object,typeof(i=typeof Function<`u`&&Function)==`function`?i:Object]),Ae(`design:returntype`,typeof(a=typeof Promise<`u`&&Promise)==`function`?a:Object)],e.prototype,`getUploadMetadata`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`deleteFile`},title:`删除文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 deleteFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(s=De.ICloudbaseDeleteFileParams!==void 0&&De.ICloudbaseDeleteFileParams)==`function`?s:Object,typeof(c=typeof Function<`u`&&Function)==`function`?c:Object]),Ae(`design:returntype`,typeof(l=typeof Promise<`u`&&Promise)==`function`?l:Object)],e.prototype,`deleteFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`getTempFileURL`},title:`获取文件下载链接`,messages:[`请确认以下各项:`,` 1 - 调用 getTempFileURL() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(u=De.ICloudbaseGetTempFileURLParams!==void 0&&De.ICloudbaseGetTempFileURLParams)==`function`?u:Object,typeof(d=typeof Function<`u`&&Function)==`function`?d:Object]),Ae(`design:returntype`,typeof(f=typeof Promise<`u`&&Promise)==`function`?f:Object)],e.prototype,`getTempFileURL`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`downloadFile`},title:`下载文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 downloadFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(p=De.ICloudbaseDownloadFileParams!==void 0&&De.ICloudbaseDownloadFileParams)==`function`?p:Object,typeof(m=typeof Function<`u`&&Function)==`function`?m:Object]),Ae(`design:returntype`,typeof(h=typeof Promise<`u`&&Promise)==`function`?h:Object)],e.prototype,`downloadFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`copyFile`},title:`批量复制文件`,messages:[`请确认以下各项:`,` 1 - 调用 copyFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(g=De.ICloudbaseCopyFileParams!==void 0&&De.ICloudbaseCopyFileParams)==`function`?g:Object,typeof(_=typeof Function<`u`&&Function)==`function`?_:Object]),Ae(`design:returntype`,typeof(v=typeof Promise<`u`&&Promise)==`function`?v:Object)],e.prototype,`copyFile`,null),e}(),I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I.apply(this,arguments)},tt=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},L=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},R=ae,nt=function(){function e(e,t){t===void 0&&(t=!1),this.shouldThrowOnError=!1,this.bucketId=``,this.context=e,this.shouldThrowOnError=t,this.storage=new et(e)}return Object.defineProperty(e.prototype,"config",{get:function(){return this.context?.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){return this.context?.request},enumerable:!1,configurable:!0}),e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.upload=function(e,t,n){return tt(this,void 0,Promise,function(){var i,a,o,s,c,l,u,d,f;return L(this,function(p){switch(p.label){case 0:i=I({upsert:!0},n),a=i.cacheControl,o=i.contentType,s=i.metadata,p.label=1;case 1:return p.trys.push([1,3,,4]),c=this.getCloudPath(e),l={cloudPath:c,filePath:t},(a||o||s)&&(u={},a&&(u[`cache-control`]=a),o&&(u[`content-type`]=o),s&&(u[`x-cos-metadata-metadata`]=this.toBase64(JSON.stringify(s))),l.headers=u),[4,this.storage.uploadFile(l)];case 2:if(!(d=p.sent()).fileID)throw Error(JSON.stringify({code:R.OPERATION_FAIL,msg:`[${Ue}.update] no fileID returned`}));return[2,{data:{id:d.fileID,path:e,fullPath:e},error:null}];case 3:if(f=p.sent(),this.shouldThrowOnError)throw f;if(r(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}})})},e.prototype.uploadToSignedUrl=function(e,t,n,r){return tt(this,void 0,Promise,function(){return L(this,function(t){return[2,this.upload(e,n,r)]})})},e.prototype.createSignedUploadUrl=function(e){return tt(this,void 0,Promise,function(){var t,r,i;return L(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=this.getCloudPath(e),[4,this.storage.getUploadMetadata({cloudPath:t})];case 1:return[2,{data:{signedUrl:(r=a.sent().data).url,token:r.token,path:e,authorization:r.authorization,id:r.fileId,cosFileId:r.cosFileId,downloadUrl:r.download_url},error:null}];case 2:if(i=a.sent(),this.shouldThrowOnError)throw i;return[2,{data:null,error:i instanceof n?i:new n(i.message)}];case 3:return[2]}})})},e.prototype.update=function(e,t,n){return tt(this,void 0,Promise,function(){return L(this,function(r){return[2,this.upload(e,t,I(I({},n),{upsert:!0}))]})})},e.prototype.move=function(e,t){return tt(this,void 0,Promise,function(){var i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.copyFile({fileList:[{srcPath:this.getCloudPath(e),dstPath:this.getCloudPath(t),overwrite:!0,removeOriginal:!0}]})];case 1:if((i=o.sent()).fileList[0].code&&i.fileList[0].code!==`SUCCESS`)throw new n(i.fileList[0].message||`Move failed`);return[2,{data:{message:`File moved from ${e} to ${t}`},error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.copy=function(e,t){return tt(this,void 0,Promise,function(){var i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.copyFile({fileList:[{srcPath:this.getCloudPath(e),dstPath:this.getCloudPath(t),overwrite:!0,removeOriginal:!1}]})];case 1:if((i=o.sent()).fileList[0].code&&i.fileList[0].code!==`SUCCESS`)throw new n(i.fileList[0].message||`Copy failed`);return[2,{data:{path:this.getCloudPath(t)},error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.createSignedUrl=function(e,t,i){return tt(this,void 0,Promise,function(){var a,o,s,c,l,u,d;return L(this,function(f){switch(f.label){case 0:if(f.trys.push([0,2,,3]),!$e(t))throw new n(`[${Ue}.createSignedUrl] expiresIn must be an integer greater than or equal to 1`);return a=this.normalizeCloudId(e),[4,this.storage.getTempFileURL({fileList:[{fileID:a,maxAge:t}]})];case 1:if((o=f.sent()).fileList[0].code!==`SUCCESS`)throw new n(`Failed to create signed URL: [${o.fileList[0].code}] ${o.fileList[0].fileID}`);return s=o.fileList[0].download_url,c=[],i?.download!==void 0&&(typeof i.download==`string`?c.push(`download=${encodeURIComponent(i.download)}`):!0===i.download&&c.push(`download=true`)),i!=null&&i.transform&&(l=this.transformOptsToQueryString(i.transform))&&c.push(l),c.length>0&&(u=s.includes(`?`)?`&`:`?`,s=`${s}${u}${c.join(`&`)}`),[2,{data:{signedUrl:s},error:null}];case 2:if(d=f.sent(),this.shouldThrowOnError)throw d;if(r(d))return[2,{data:null,error:d}];throw d;case 3:return[2]}})})},e.prototype.createSignedUrls=function(e,t){return tt(this,void 0,Promise,function(){var i,a,o=this;return L(this,function(s){switch(s.label){case 0:if(s.trys.push([0,2,,3]),!$e(t))throw new n(`[${Ue}.createSignedUrls] expiresIn must be an integer greater than or equal to 1`);return i=e.map(function(e){return{fileID:o.normalizeCloudId(e),maxAge:t}}),[4,this.storage.getTempFileURL({fileList:i})];case 1:return[2,{data:s.sent().fileList.map(function(t,n){return{path:e[n],signedUrl:t.tempFileURL||``,error:t.code===`SUCCESS`?null:t.message}}),error:null}];case 2:if(a=s.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.download=function(e,t){return tt(this,void 0,Promise,function(){var i,a,o=this;return L(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),a={},[4,tt(o,void 0,void 0,function(){var r,i,a;return L(this,function(o){switch(o.label){case 0:return[4,this.createSignedUrl(e,600,{transform:t})];case 1:if((r=o.sent()).error)throw r.error;return i=encodeURI(r.data?.signedUrl),[4,this.request.reqClass.get({url:i,headers:{},responseType:`blob`})];case 2:if(!(a=o.sent().data))throw new n(`Download failed: no file content`);return[2,new Blob([a])]}})})];case 1:return[2,(a.data=s.sent(),a.error=null,a)];case 2:if(i=s.sent(),this.shouldThrowOnError)throw i;if(r(i))return[2,{data:null,error:i}];throw i;case 3:return[2]}})})},e.prototype.info=function(e){return tt(this,void 0,Promise,function(){var t,r,i,a,o,s,c,l;return L(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),t=e.startsWith(`cloud://`),r=t?this.extractPathFromFileId(e):e,i=t?this.extractBucketFromFileId(e):this.bucketId,[4,this.storage.getFileInfo({fileList:[this.normalizeCloudId(e)]})];case 1:if(a=u.sent(),(o=a.fileList[0]).code!==`SUCCESS`)throw new n(o.message);return s=new Date().toISOString(),c=(o.lastModified?new Date(o.lastModified):new Date).toISOString(),[2,{data:{id:o.fileID,version:`1`,name:r,bucketId:i,updatedAt:c,createdAt:c,lastAccessedAt:s,size:o.size,cacheControl:o.cacheControl,contentType:o.contentType,etag:o.etag,lastModified:c,metadata:{}},error:null}];case 2:if(l=u.sent(),this.shouldThrowOnError)throw l;return[2,{data:null,error:l instanceof n?l:new n(l.message)}];case 3:return[2]}})})},e.prototype.exists=function(e){return tt(this,void 0,Promise,function(){var t,i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.getFileInfo({fileList:[this.normalizeCloudId(e)]})];case 1:if(t=o.sent(),(i=t.fileList[0]).code===`FILE_NOT_FOUND`)return[2,{data:!1,error:null}];if(i.code!==`SUCCESS`)throw new n(i.message);return[2,{data:!0,error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.getPublicUrl=function(e,t){return tt(this,void 0,Promise,function(){var n;return L(this,function(r){switch(r.label){case 0:return[4,this.createSignedUrl(e,600,t)];case 1:return(n=r.sent()).data?[2,{data:{publicUrl:n.data.signedUrl}}]:[2,{data:null,error:n.error}]}})})},e.prototype.remove=function(e){return tt(this,void 0,Promise,function(){var t,i,a,o,s,c,l,u,d,f,p=this;return L(this,function(m){switch(m.label){case 0:for(m.trys.push([0,3,,4]),t=10,i=[],a=0;a<e.length;a+=t)i.push(e.slice(a,a+t));return[4,Promise.all(i.map(function(e){return Promise.all(e.map(function(e){return p.info(e)}))}))];case 1:return o=m.sent(),s=new Map,o.forEach(function(n,r){n.forEach(function(n,i){n.data&&s.set(e[r*t+i],n.data)})}),c=e.map(function(e){return p.normalizeCloudId(e)}),[4,this.storage.deleteFile({fileList:c})];case 2:if(l=m.sent(),(u=l.fileList.filter(function(e){return e.code!==`SUCCESS`})).length>0)throw new n(`Delete failed for ${u.length} file(s)`);return d=new Date().toISOString(),[2,{data:e.map(function(e){var t=s.get(e);return{name:t?.name,id:t?.id,bucket_id:t?.bucketId,owner:void 0,updated_at:t?.updatedAt||d,created_at:t?.createdAt,last_accessed_at:t?.lastAccessedAt||d,metadata:t?.metadata||{},buckets:{id:t?.bucketId,name:t?.bucketId,owner:void 0,public:!1,created_at:``,updated_at:d}}}),error:null}];case 3:if(f=m.sent(),this.shouldThrowOnError)throw f;if(r(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}})})},e.prototype.list=function(){return tt(this,void 0,void 0,function(){return L(this,function(e){throw new n(`Not implemented`)})})},e.prototype.getCloudPath=function(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)},e.prototype.normalizeCloudId=function(e){if(/^cloud:\/\//.test(e))return e;var t=this.getCloudPath(e);if(!this.bucketId)throw new n(`bucketId is not set`);var r=this.config?.env||``;return r?`cloud://${r}.${this.bucketId}/${t}`:void 0},e.prototype.toBase64=function(e){return s(e)},e.prototype.transformOptsToQueryString=function(e){var t=[`imageMogr2`];if(e.width||e.height){var n=e.width||``,r=e.height||``;e.resize===`fill`?t.push(`thumbnail/${n}x${r}!`):e.resize===`contain`?t.push(`thumbnail/${n}x${r}`):t.push(`thumbnail/${n}x${r}^`)}if(e.format&&e.format!==`origin`&&t.push(`format/${e.format}`),e.quality!==void 0){var i=Math.max(1,Math.min(100,e.quality));t.push(`quality/${i}`)}return t.join(`/`)},e.prototype.extractPathFromFileId=function(e){var t=e.replace(/^cloud:\/\//,``).split(`/`);return t.length<2?e:t.slice(1).join(`/`)},e.prototype.extractBucketFromFileId=function(e){var t=e.replace(/^cloud:\/\//,``).split(`/`);if(t.length<1)return``;var n=t[0],r=n.indexOf(`.`);return r===-1?n:n.substring(r+1)},e}(),rt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=new et,at={name:Ue,entity:{uploadFile:it.uploadFile,deleteFile:it.deleteFile,getTempFileURL:it.getTempFileURL,downloadFile:it.downloadFile,getUploadMetadata:it.getUploadMetadata,copyFile:it.copyFile,getFileInfo:it.getFileInfo,isGateWay:it.isGateWay}},z=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.from=function(e){return e?(k(e,`from`),new te(this.http,e,this.shouldThrowOnError)):new nt(this.http.ctx,this.shouldThrowOnError)},t}(re),ot={name:`${Ue}/supabase`,IIFE:!0,entity:function(){var e=new WeakMap;Object.defineProperty(this.prototype,"storage",{get:function(){if(e.has(this))return e.get(this);var t=this,n=new z(new Proxy({},{get:function(e,n){return n===`config`?t.config:n===`request`?t.request:void 0}}));return e.set(this,n),n},configurable:!0,enumerable:!0})}};try{cloudbase.registerComponent(at),cloudbase.registerComponent(ot)}catch{}function st(e){try{e.registerComponent(at),e.registerComponent(ot)}catch(e){console.warn(e)}}try{window.registerStorage=st}catch{}var ct=st})(),Co.v;var wo=`2.0.14`,To=[`webhook`,`qmsg`,`serverchan`,`pushplus`,`dingtalk`,`wecom`,`bark`,`gocqhttp`,`onebot`,`atri`,`pushdeer`,`igot`,`telegram`,`feishu`,`lark`,`ifttt`,`wecombot`,`discord`,`wxpusher`,`ntfy`,`join`],Eo=class extends Error{kind;httpStatus;rawMessage;requestId;constructor(e,t,n={}){super(t),this.name=`TwikooError`,this.kind=e,this.httpStatus=n.httpStatus,this.rawMessage=n.rawMessage??t,this.requestId=n.requestId}},Do={tcb:null,options:{}};function Oo(e,t){Do.tcb=e,Do.options=t}function ko(){return Do}function Ao(e){return typeof e==`string`&&/^http(s)?:\/\//.test(e)}function jo(e,t){return new Promise((n,r)=>{let i=localStorage.getItem(`twikoo-access-token`),a=new XMLHttpRequest,o=Date.now();a.onreadystatechange=()=>{if(a.readyState!==4)return;let e=Date.now()-o;if(a.status===200)try{let e=JSON.parse(a.responseText);e.accessToken&&localStorage.setItem(`twikoo-access-token`,typeof e.accessToken==`string`?e.accessToken:``),n(e)}catch{r(new Eo(`UNKNOWN`,`后端返回格式异常`,{rawMessage:a.responseText.slice(0,200)}))}else a.status===0?r(new Eo(e>3e4?`TIMEOUT`:`CORS`,`请求被跨域策略拦截或网络不可达`,{rawMessage:a.statusText||`status 0`})):a.status===404?r(new Eo(`NOT_FOUND`,`接口地址不存在`,{httpStatus:404,rawMessage:a.responseText.slice(0,200)})):a.status===401||a.status===403?r(new Eo(`CLIENT_ERROR`,`认证失败,请重新登录`,{httpStatus:a.status,rawMessage:a.responseText.slice(0,200)})):a.status===429?r(new Eo(`REJECTED`,`请求过于频繁`,{httpStatus:429,rawMessage:a.responseText.slice(0,200)})):a.status>=500?r(new Eo(`SERVER_ERROR`,`后端异常`,{httpStatus:a.status,rawMessage:a.responseText.slice(0,200)})):r(new Eo(`CLIENT_ERROR`,`请求失败(${a.status})`,{httpStatus:a.status,rawMessage:a.responseText.slice(0,200)}))};try{a.open(`POST`,e),a.setRequestHeader(`Content-Type`,`application/json`),a.send(JSON.stringify({accessToken:i,...t,envId:e}))}catch(e){r(new Eo(`NETWORK`,`无法连接到后端`,{rawMessage:String(e)}))}})}async function Mo(e,t,n={}){let r=e??Do.tcb,i=typeof n.envId==`string`?n.envId:typeof Do.options.envId==`string`?Do.options.envId:void 0,a=typeof n.funcName==`string`?n.funcName:typeof Do.options.funcName==`string`?Do.options.funcName:`twikoo`;if(r)return await r.app.callFunction({name:a,data:{event:t,...n}});if(typeof i==`string`&&Ao(i))return await jo(i,{event:t,...n});throw Error(`缺少 envId 配置 - https://twikoo.js.org`)}var No={verbose:1,info:2,warn:3,error:4}[(typeof process<`u`&&process.env,`info`).toLowerCase()]||2,Po={verbose:(...e)=>{No<=1&&console.log(...e)},info:(...e)=>{No<=2&&console.info(...e)},warn:(...e)=>{No<=3&&console.warn(...e)},error:(...e)=>{No<=4&&console.error(...e)}},Fo={ADMIN_CLIENT_VERSION:`前端版本:`,ADMIN_SERVER_VERSION:`云函数版本:`,ADMIN_COMMENT:`评论管理`,ADMIN_COMMENT_DELETE:`删除`,ADMIN_COMMENT_DELETE_CONFIRM:`确认删除?`,ADMIN_COMMENT_FILTER_ALL:`全部`,ADMIN_COMMENT_FILTER_VISIBLE:`只看可见`,ADMIN_COMMENT_FILTER_HIDDEN:`只看隐藏`,ADMIN_COMMENT_HIDE:`隐藏`,ADMIN_COMMENT_IS_SPAM_SUFFIX:` (已隐藏)`,ADMIN_COMMENT_SEARCH:`搜索`,ADMIN_COMMENT_SEARCH_PLACEHOLDER:`搜索昵称、邮箱、网址、IP、评论正文、文章地址`,ADMIN_COMMENT_SHOW:`显示`,ADMIN_COMMENT_TOP:`置顶`,ADMIN_COMMENT_UNTOP:`取消置顶`,ADMIN_COMMENT_VIEW:`查看`,ADMIN_COMMENT_SECURITY_ALERT:`评论链接与本站不同!出于安全考虑,请手动复制以下网址访问:`,ADMIN_COMMENT_PARSE_ERROR:`无法解析评论链接,请仔细检查链接后手动复制以下网址访问:`,ADMIN_CONFIG:`配置管理`,ADMIN_CONFIG_CATEGORY_COMMON:`通用`,ADMIN_CONFIG_CATEGORY_IM:`即时通知`,ADMIN_CONFIG_CATEGORY_MAIL:`邮件通知`,ADMIN_CONFIG_CATEGORY_PLUGIN:`插件`,ADMIN_CONFIG_CATEGORY_PRIVACY:`隐私`,ADMIN_CONFIG_CATEGORY_SPAM:`反垃圾`,ADMIN_CONFIG_CATEGORY_CAPTCHA:`人机验证`,ADMIN_CONFIG_IMAGE_CDN_NONE:`无(不启用图片上传)`,ADMIN_CONFIG_CAPTCHA_NONE:`无`,ADMIN_CONFIG_CAPTCHA_TURNSTILE:`Cloudflare Turnstile`,ADMIN_CONFIG_CAPTCHA_GEETEST:`极验 Geetest`,ADMIN_CONFIG_CAPTCHA_CAP:`Cap`,ADMIN_CONFIG_EMAIL_TEST:`邮件通知测试`,ADMIN_CONFIG_EMAIL_TEST_BTN:`发送测试邮件`,ADMIN_CONFIG_EMAIL_TEST_HELP:`输入一个邮箱地址,发送测试邮件`,ADMIN_CONFIG_EMAIL_TEST_RESULT:`测试结果:`,ADMIN_CONFIG_EXAMPLE:`示例:`,ADMIN_CONFIG_ITEM_AKISMET_KEY:`Akismet 反垃圾评论,用于垃圾评论检测,设为 "MANUAL_REVIEW" 开启人工审核,留空不使用反垃圾。注册:https://akismet.com`,ADMIN_CONFIG_ITEM_BLOGGER_NICK:`博主的昵称。`,ADMIN_CONFIG_ITEM_BLOGGER_EMAIL:`博主的邮箱地址,用于邮件通知、博主标识。`,ADMIN_CONFIG_ITEM_COMMENT_BG_IMG:`评论框自定义背景图片 URL 地址。`,ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE:`评论列表分页大小,默认为 8。`,ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER:`评论框提示信息,可用<br>换行,默认为空`,ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN:`CORS 安全域名,注意:如果您不了解什么是 CORS,此项请留空,错误设置会导致无法加载,默认为空,格式为 https://blog.example.com;如需添加多域名请使用,分隔`,ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR:`默认的头像显示。默认值(留空)为 "initials",可选:"404"、"mp"、"identicon"、"monsterid"、"wavatar"、"retro"、"robohash"、"blank"`,ADMIN_CONFIG_ITEM_EMOTION_CDN:`表情 CDN,英文逗号分隔。默认为:https://owo.imaegoo.com/owo.json`,ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS:`违禁词配置,包含违禁词的内容会直接标记为垃圾评论。英文逗号分隔。`,ADMIN_CONFIG_ITEM_BLOCKED_WORDS:`屏蔽词配置,包含屏蔽词的内容会直接评论失败。英文逗号分隔。`,ADMIN_CONFIG_ITEM_GRAVATAR_CDN:`自定义头像 CDN 地址。如:cn.gravatar.com, weavatar.com, cravatar.cn, sdn.geekzu.org, gravatar.loli.net,默认:weavatar.com`,ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT:`隐藏管理面板入口。可设置一个“暗号”,只有在“昵称”一栏输入相同的“暗号”时,管理面板入口才会显示,留空则不隐藏管理入口`,ADMIN_CONFIG_ITEM_QQ_API_KEY:`QQ昵称API密钥,用于获取QQ昵称。前往 https://api.tqq.me/dashboard/api-keys 获取`,ADMIN_CONFIG_ITEM_HIGHLIGHT:`启用代码高亮功能。如果您的主题和代码高亮有冲突,请设为 false。默认:true`,ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME:`代码高亮主题,可选:"default"、"coy"、"dark"、"funky"、"okaidia"、"solarizedlight"、"tomorrow"、"twilight",访问 https://prismjs.com 可预览主题效果。如果您的主题和代码高亮有冲突,请设为 none。默认:none`,ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN:`代码高亮插件,可选:"showLanguage"、"copyButton",分别表示:展示代码语言、展示代码拷贝按钮。可以同时设置多个选项,如果想要不添加任何代码高亮插件,请设为 none。默认:none。`,ADMIN_CONFIG_ITEM_IMAGE_CDN:`插入图片所使用的图床,目前支持:"qcloud"、"7bu (https://7bu.top)"、"see (https://s.ee)"、"lskypro"、"piclist"、"easyimage"、"chevereto"、"S3 / R2 / MinIO"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_URL:`图床的 URL,仅当 IMAGE_CDN 为 "lskypro" / "piclist" / "easyimage" / "s3" 时需要填写`,ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN:`图床 token。qcloud 图床无需设置`,ADMIN_CONFIG_ITEM_NSFW_API_URL:`NSFW 图片检测 API 地址。免费服务:nsfw.qixz.cn,项目:github.com/HG-ha/nsfwpy`,ADMIN_CONFIG_ITEM_NSFW_THRESHOLD:`NSFW 检测阈值(0-1),当检测分数高于此值时拒绝上传。默认:0.5`,ADMIN_CONFIG_ITEM_S3_REGION:`S3 存储区域,例如 us-east-1。使用兼容 S3 的服务(如 Cloudflare R2、MinIO)时可填任意值`,ADMIN_CONFIG_ITEM_S3_BUCKET:`S3 存储桶名称`,ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID:`S3 Access Key ID`,ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY:`S3 Secret Access Key`,ADMIN_CONFIG_ITEM_S3_ENDPOINT:`S3 自定义 Endpoint,使用 Cloudflare R2、MinIO 等兼容 S3 的服务时填写`,ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE:`设置 S3_ENDPOINT 时,是否将 S3_BUCKET 拼入上传地址路径。默认为 true,适用于 Cloudflare R2、MinIO 等 path-style S3 兼容端点;使用已绑定存储桶的自定义域名时设为 false,例如腾讯云 COS 自定义域名`,ADMIN_CONFIG_ITEM_S3_CDN_URL:`S3 图片访问域名(CDN 域名),留空则使用默认 S3/Endpoint URL`,ADMIN_CONFIG_ITEM_S3_PATH_PREFIX:`S3 图片存储路径前缀,例如 images/twikoo,留空则存储在根目录`,ADMIN_CONFIG_ITEM_LIGHTBOX:`使用简易图片点击放大效果。默认:false`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE:`单个 IP 发言频率限制(条/10分钟),0 为无限制,默认:10`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL:`全站发言频率限制(条/10分钟),0 为无限制,默认:10`,ADMIN_CONFIG_ITEM_LIMIT_LENGTH:`评论长度限制,0 为无限制,默认:500`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT:`自定义通知邮件主题,留空则使用默认主题。`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN:`自定义博主通知邮件主题,留空则使用默认主题。`,ADMIN_CONFIG_ITEM_MAIL_TEMPLATE:"自定义通知邮件模板,留空则使用默认模板。可包含的字段:${SITE_URL}, ${SITE_NAME}, ${PARENT_NICK}, ${PARENT_COMMENT}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IMG}, ${PARENT_IMG}",ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN:"自定义博主通知邮件模板,留空则使用默认模板。可包含的字段:${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IP}, ${MAIL}, ${IMG}",ADMIN_CONFIG_ITEM_MASTER_TAG:`博主标识自定义文字,默认为 “博主”。`,ADMIN_CONFIG_ITEM_NOTIFY_SPAM:`垃圾评论是否发送通知,默认:true`,ADMIN_CONFIG_ITEM_HIDE_SPAM:`前台评论区对所有人隐藏垃圾评论,包括管理员和评论作者。评论管理后台仍可审核和恢复。设为 true 开启,默认:false。`,ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER:`人机验证码提供商`,ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY:`Turnstile 验证码的站点密钥。申请地址: https://dash.cloudflare.com/?to=/:account/turnstile`,ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY:`Turnstile 验证码的密钥`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID:`极验验证码的 Captcha ID。申请地址: https://console.geetest.com/sensbot/management`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY:`极验验证码的 Captcha Key`,ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT:`Cap 验证码 API 端点。留空则使用内嵌 Cap(无需额外部署);外部 Standalone 格式:https://<实例地址>/<site_key>/`,ADMIN_CONFIG_ITEM_CAP_SECRET_KEY:`Cap Secret Key(仅外部 Standalone 需要;内嵌模式可留空)`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID:`腾讯云 secret id,用于垃圾评论检测。同时设置腾讯云和 Akismet 时,只有腾讯云会生效。注册:https://twikoo.js.org/cms.html`,ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE:`腾讯云内容安全 Biztype 名称,用于垃圾评论策略。可以自定义垃圾拦截规则`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY:`腾讯云 secret key`,ADMIN_CONFIG_ITEM_JEV_API_KEY:`Jev API Key,用于 AI 垃圾评论检测。仅在未配置腾讯云和 Akismet 时生效,优先于 LLM。`,ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT:`Jev API 接口地址,默认:https://api.typesafe.ai/v1/systemone`,ADMIN_CONFIG_ITEM_JEV_MODEL:`Jev 模型名称,默认:jev-latest`,ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD:`Jev 垃圾评论概率阈值,范围 0 到 1,默认:0.85`,ADMIN_CONFIG_ITEM_LLM_API_KEY:`LLM API Key,用于 AI 垃圾评论检测。仅在未配置腾讯云、Akismet 和 Jev 时生效。`,ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT:`LLM API 接口地址,默认:https://api.deepseek.com/v1`,ADMIN_CONFIG_ITEM_LLM_MODEL:`LLM 模型名称,默认:deepseek-v4-pro`,ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT:`LLM 垃圾检测提示词(可选,留空则使用默认提示词)`,ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES:`LLM 检测最大重试次数(默认 3 次)`,ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL:`即时消息推送平台名称,支持:"qmsg"、"serverchan"、"pushplus"、"dingtalk"、"wecom"、"bark"、"gocqhttp"、"atri"、"pushdeer"、"igot"、"telegram"、"feishu" 等`,ADMIN_CONFIG_ITEM_PUSHOO_TOKEN:`即时消息推送 token。请参考 https://pushoo.js.org 里的详细说明配置`,ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS:`界面上展示的输入框,默认:nick,mail,link`,ADMIN_CONFIG_ITEM_REQUIRED_FIELDS:`评论必填信息,设为 nick,mail,link 代表全必填,设为 none 代表全选填,默认:nick,mail`,ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY:`是否同时通过 IM 和邮件 2 种方式通知博主,默认只通过 IM 通知博主,默认:false`,ADMIN_CONFIG_ITEM_SENDER_EMAIL:`邮件通知邮箱地址。对于大多数邮箱服务商,SENDER_EMAIL 必须和 SMTP_USER 保持一致,否则无法发送邮件。`,ADMIN_CONFIG_ITEM_SENDER_NAME:`邮件通知标题。`,ADMIN_CONFIG_ITEM_SHOW_EMOTION:`启用插入表情功能,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_IMAGE:`启用插入图片功能,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_ORDER:`评论排序下拉框,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_DISLIKE:`评论点踩按钮,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_UA:`是否显示用户系统和浏览器,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_REGION:`是否显示用户 IP 属地到省,可能不准确,不支持 IPv6,默认为:false`,ADMIN_CONFIG_ITEM_SITE_NAME:`网站名称`,ADMIN_CONFIG_ITEM_SITE_URL:`网站地址`,ADMIN_CONFIG_ITEM_SMTP_HOST:`自定义 SMTP 服务器地址。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_PASS:`邮件通知邮箱密码,QQ、163邮箱请填写授权码。`,ADMIN_CONFIG_ITEM_SMTP_PORT:`自定义 SMTP 端口。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_SECURE:`自定义 SMTP 是否使用TLS,请填写 true 或 false。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_SERVICE:`邮件通知邮箱服务商。支持:"126"、"163"、"1und1"、"AOL"、"DebugMail"、"DynectEmail"、"FastMail"、"GandiMail"、"Gmail"、"Godaddy"、"GodaddyAsia"、"GodaddyEurope"、"Hotmail"、"Mail.ru"、"Maildev"、"Mailgun"、"Mailjet"、"Mailosaur"、"Mandrill"、"Naver"、"OpenMailBox"、"Outlook365"、"Postmark"、"QQ"、"QQex"、"SES"、"SES-EU-WEST-1"、"SES-US-EAST-1"、"SES-US-WEST-2"、"SendCloud"、"SendGrid"、"SendPulse"、"SendinBlue"、"Sparkpost"、"Yahoo"、"Yandex"、"Zoho"、"hot.ee"、"iCloud"、"mail.ee"、"qiye.aliyun"`,ADMIN_CONFIG_ITEM_SMTP_USER:`邮件通知邮箱用户名。`,ADMIN_CONFIG_RESET:`重置`,ADMIN_CONFIG_SAVE:`保存`,ADMIN_CONFIG_EXPORT:`导出配置`,ADMIN_CONFIG_IMPORT:`导入配置`,ADMIN_CONFIG_IMPORT_FAILED:`配置导入失败:`,ADMIN_CONFIG_IMPORT_INVALID:`配置文件格式不合法`,ADMIN_CONFIG_IMPORT_SOURCE_INVALID:`配置导入仅支持 Twikoo 导出的配置文件,请将「源系统」选择为 Twikoo`,ADMIN_CONFIG_IMPORTED:`配置导入成功`,ADMIN_CONFIG_IMPORTING:`正在导入配置`,ADMIN_CREDENTIALS:`私钥文件`,ADMIN_CREDENTIALS_FAQ:`如何获得私钥`,ADMIN_CREDENTIALS_PLACEHOLDER:`请粘贴私钥文件内容`,ADMIN_FORGOT:`忘记密码`,ADMIN_EXPORT:`导出`,ADMIN_EXPORT_WARN:`将全部数据导出为 JSON 文件。如果遇到评论较多、导出失败或缺失数据,请连接数据库手动导出`,ADMIN_EXPORT_COMMENT:`导出评论`,ADMIN_EXPORT_COUNTER:`导出访问量`,ADMIN_IMPORT:`导入`,ADMIN_IMPORT_FILE_REQUIRED:`未选择文件`,ADMIN_IMPORT_IMPORTED:`完成导入 `,ADMIN_IMPORT_IMPORTING:`开始导入 `,ADMIN_IMPORT_LOG:`日志`,ADMIN_IMPORT_SELECT:`请选择`,ADMIN_IMPORT_SELECT_FILE:`选择文件`,ADMIN_IMPORT_SELECT_SOURCE:`选择源系统`,ADMIN_IMPORT_SOURCE_REQUIRED:`未选择源系统`,ADMIN_IMPORT_START:`开始导入`,ADMIN_IMPORT_COMMENT:`导入评论`,ADMIN_IMPORT_STARTING:`开始导入`,ADMIN_IMPORT_TIP_ARTALK:`请上传 JSON 格式的 Artalk 导出文件,文件名通常为 comments.data.json`,ADMIN_IMPORT_TIP_DISQUS:`请上传 XML 格式的 Disqus 导出文件,文件名通常为 [网站名称]-[导出时间]-all.xml`,ADMIN_IMPORT_TIP_VALINE:`请上传 JSON 格式的 Valine 导出文件,文件名通常为 Comment.json`,ADMIN_IMPORT_UPLOADED:`上传完成 `,ADMIN_IMPORT_UPLOADING:`已上传 `,ADMIN_IMPORT_WARN:`支持从其他评论系统的备份文件导入评论。
169
+ 不要在匿名登录失败后自动回退到密码登录,这两种方式的使用场景不同。`)):(console.warn(`[CloudBase Auth] signInAnonymously 失败 [${a.category}]: ${a.message}`),a.loginMethodHint&&console.warn(a.loginMethodHint)),[2,{data:{user:null,session:null},error:a}];case 5:return[2]}})})},n.prototype.signUp=function(e){return H(this,void 0,Promise,function(){var t,n,r=this;return U(this,function(i){switch(i.label){case 0:return e.phone_number||e.verification_code||e.verification_token||e.provider_token?(e.phone_number&&=this.formatPhone(e.phone_number),[4,this.oauthInstance.authApi.signUp(e)]):[3,2];case 1:return i.sent(),[2,this.createLoginState()];case 2:return i.trys.push([2,4,,5]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`signUp`),[4,this.getVerification(e.email?{email:e.email,usage:c.EMAIL}:{phone_number:this.formatPhone(e.phone)})];case 3:return t=i.sent(),[2,{data:{verifyOtp:function(n){var i=n.token,a=n.messageId,o=a===void 0?t.verification_id:a;return H(r,void 0,Promise,function(){var n,r,a,s,c;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,8,,9]),[4,this.verify({verification_id:o||t.verification_id,verification_code:String(i)})];case 1:return n=l.sent(),t.is_user?[4,this.signIn({username:e.email||this.formatPhone(e.phone),verification_token:n.verification_token})]:[3,3];case 2:return l.sent(),[3,6];case 3:return delete(r=JSON.parse(JSON.stringify(e))).email,delete r.phone,[4,this.oauthInstance.authApi.signUp(B(B(B({},r),e.email?{email:e.email}:{phone_number:this.formatPhone(e.phone)}),{verification_token:n.verification_token,verification_code:i}))];case 4:return l.sent(),[4,this.createLoginState()];case 5:l.sent(),l.label=6;case 6:return[4,this.getSession()];case 7:return a=l.sent().data,[2,{data:{user:(s=(a===void 0?{}:a).session).user,session:s},error:null}];case 8:return c=l.sent(),[2,{data:{user:null,session:null},error:new I(c,{method:`signUp`})}];case 9:return[2]}})})}},error:null}];case 4:return n=i.sent(),[2,{data:{user:null,session:null},error:new I(n,{method:`signUp`})}];case 5:return[2]}})})},n.prototype.signOut=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=this.cache.keys.userInfoKey,[4,this.oauthInstance.authApi.signOut(e)];case 1:return n=i.sent(),[4,this.cache.removeStoreAsync(t)];case 2:return i.sent(),this.setAccessKey(),[2,B(B({},n),{data:{},error:null})];case 3:return r=i.sent(),[2,{data:{},error:new I(r,{method:`signOut`})}];case 4:return[2]}})})},n.prototype.onAuthStateChange=function(e){var t=this;this.hasListenerSetUp||=(this.setupListeners(),!0);var n=Math.random().toString(36);return this.listeners.has(n)||this.listeners.set(n,new Set),this.listeners.get(n).add(e),{data:{subscription:{id:n,callback:e,unsubscribe:function(){var r=t.listeners.get(n);r&&(r.delete(e),r.size===0&&t.listeners.delete(n))}}}}},n.prototype.signInWithPassword=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),this.validateAtLeastOne(e,[[`username`],[`email`],[`phone`]],`signInWithPassword`),this.validateParams(e,{password:{required:!0,message:`Password is required`}},`signInWithPassword`),t=`username`in e?e.username:void 0,n=`email`in e?e.email:void 0,r=`phone`in e?e.phone:void 0,i=e.options?.is_encrypt??e.is_encrypt,[4,this.signIn(B({username:t||n||this.formatPhone(r),password:e.password},i?{isEncrypt:!0,version:`v2`}:{}))];case 1:return l.sent(),[4,this.getSession()];case 2:return a=l.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 3:return s=l.sent(),(c=new I(s,{method:`signInWithPassword`})).category===F.PROVIDER_NOT_ENABLED?console.error(c.helpMessage):c.category===F.INVALID_CREDENTIALS||c.category===F.USER_NOT_FOUND?console.warn(c.helpMessage):console.warn(`[CloudBase Auth] signInWithPassword 失败 [${c.category}]: ${c.message}`),c.loginMethodHint&&console.info(c.loginMethodHint),[2,{data:{user:null,session:null},error:c}];case 4:return[2]}})})},n.prototype.signInWithIdToken=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.validateParams(e,{token:{required:!0,message:`Token is required`}},`signInWithIdToken`),[4,this.signInWithProvider({provider_id:e.provider,provider_id_token:e.token})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`signInWithIdToken`})}];case 4:return[2]}})})},n.prototype.signInWithOtp=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o=this;return U(this,function(s){switch(s.label){case 0:if(t=e.options,n=`email`in e?e.email:void 0,r=`phone`in e?e.phone:void 0,!t?.emailRedirectTo&&(t?.shouldCreateUser===void 0||t?.shouldCreateUser))return[2,this.signUp(n?{email:n}:{phone:r})];s.label=1;case 1:return s.trys.push([1,3,,4]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`signInWithOtp`),[4,this.getVerification(B(B({email_redirect_to:t?.emailRedirectTo},n?{email:n,usage:c.EMAIL}:{phone_number:this.formatPhone(r)}),{target:t?.emailRedirectTo&&t?.shouldCreateUser?`ANY`:`USER`}))];case 2:return i=s.sent(),[2,{data:{user:null,session:null,verifyOtp:function(e){var t=e.token,a=e.messageId,s=a===void 0?i.verification_id:a;return H(o,void 0,Promise,function(){return U(this,function(e){return[2,this.verifyOtp(n?{email:n,token:String(t),messageId:s||``}:{phone:r,token:String(t),messageId:s||``})]})})}},error:null}];case 3:return a=s.sent(),[2,{data:{user:null,session:null},error:new I(a,{method:`signInWithOtp`})}];case 4:return[2]}})})},n.prototype.verifyOAuth=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l;return U(this,function(u){switch(u.label){case 0:t={},u.label=1;case 1:return u.trys.push([1,7,,8]),n=e?.code||ue(`code`),r=e?.state||ue(`state`),n?r?(i=function(e){try{return JSON.parse(sessionStorage.getItem(e))}catch(e){return console.error(`Failed to get browser session:`,e),null}}(r),t.type=i?.type,(a=e?.provider||i?.provider||ue(`provider`))?[4,this.grantProviderToken({provider_id:a,provider_redirect_uri:location.origin+location.pathname,provider_code:n})]:[2,{data:B(B({},t),{user:null,session:null,redirectUrl:null}),error:this.missingRequiredParam(`verifyOAuth`,`provider`)}]):[2,{data:{user:null,session:null,redirectUrl:null},error:this.missingRequiredParam(`verifyOAuth`,`state`)}]:[2,{data:{user:null,session:null,redirectUrl:null},error:this.missingRequiredParam(`verifyOAuth`,`code`)}];case 2:return o=u.sent().provider_token,s=void 0,i.type===x?[4,this.oauthInstance.authApi.toBindIdentity({provider_token:o,provider:a,fireEvent:!0})]:[3,4];case 3:return s=u.sent(),[3,6];case 4:return[4,this.signInWithIdToken({token:o})];case 5:(s=u.sent()).data=B(B({},t),s.data),u.label=6;case 6:return(c=new URLSearchParams(location==null?void 0:location.search)).delete(`code`),c.delete(`state`),s.data.redirectUrl=function(e,t){if(e!==void 0){var n=new URL(window.location.href);return n.search=e,n.hash=t||n.hash,window.history.replaceState({},``,n.href),n.href}}(i?.search===void 0?`?${c.toString()}`:i?.search,i?.hash||location.hash),function(e){try{return sessionStorage.removeItem(e),!0}catch(e){return console.error(`Failed to remove browser session:`,e),null}}(r),[2,s];case 7:return l=u.sent(),[2,{data:B(B({},t),{user:null,session:null,redirectUrl:null}),error:new I(l,{method:`verifyOAuth`})}];case 8:return[2]}})})},n.prototype.signInWithOAuth=function(e){var t,n;return H(this,void 0,Promise,function(){var r,i,a,o,s,c,l,u,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`signInWithOAuth`),r=e.options?.redirectTo||location.href,i=new URL(r),a=i.origin+i.pathname,o=e.options?.state||`prd-${e.provider}-${Math.random().toString(36).slice(2)}`,[4,this.genProviderRedirectUri({provider_id:e.provider,provider_redirect_uri:a,state:o})];case 1:return s=f.sent().uri,c=decodeURIComponent(s),l=c,(t=e.options)!=null&&t.queryParams&&(u=new URL(c),Object.entries(e.options.queryParams).forEach(function(e){var t=e[0],n=e[1];u.searchParams.set(t,n)}),l=u.toString()),function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(`Failed to save to browser session:`,e)}}(o,{provider:e.provider,search:i.search,hash:i.hash,type:e.options?.type||y}),Et()&&!((n=e.options)!=null&&n.skipBrowserRedirect)&&window.location.assign(l),[2,{data:{url:l,provider:e.provider},error:null}];case 2:return d=f.sent(),[2,{data:{url:null,provider:null},error:new I(d,{method:`signInWithOAuth`})}];case 3:return[2]}})})},n.prototype.getClaims=function(){return H(this,void 0,Promise,function(){var e;return U(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getAccessToken()];case 1:return[2,{data:function(e){if(typeof e!=`string`)throw Error(`Invalid token specified`);try{var t=e.split(`.`).map(function(e,t){return t===2?e:JSON.parse(function(e){var t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`Illegal base64url string!`)}try{return function(e){return decodeURIComponent(k(e).replace(/(.)/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=`0${t}`),`%${t}`}))}(t)}catch{return k(t)}}(e))});return{claims:t[1],header:t[0],signature:t[2]}}catch(e){throw Error(`Invalid token specified: ${e}`?e.message:0)}}(t.sent().accessToken),error:null}];case 2:return e=t.sent(),[2,{data:{claims:null,header:null,signature:null},error:new I(e,{method:`getClaims`})}];case 3:return[2]}})})},n.prototype.resetPasswordForEmail=function(e,t){return H(this,void 0,Promise,function(){var n,r,i,a,o,s,l=this;return U(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),this.validateParams({emailOrPhone:e},{emailOrPhone:{required:!0,message:`Email or phone is required`}},`resetPasswordForEmail`),n=(t||{}).redirectTo,r=e.includes(`@`),i=void 0,r?i={email:e,usage:c.RECOVERY}:(a=this.formatPhone(e),i={phone_number:a}),[4,this.getVerification(B(B({},i),{target:`USER`}))];case 1:return o=u.sent(),[2,{data:{updateUser:function(t){return H(l,void 0,Promise,function(){var i,a,s,c;return U(this,function(l){switch(l.label){case 0:this.validateParams(t,{nonce:{required:!0,message:`Nonce is required`},password:{required:!0,message:`Password is required`}},`resetPasswordForEmail`),l.label=1;case 1:return l.trys.push([1,5,,6]),[4,this.verify({verification_id:o.verification_id,verification_code:t.nonce})];case 2:return i=l.sent(),[4,this.oauthInstance.authApi.resetPassword({email:r?e:void 0,phone_number:r?void 0:e,new_password:t.password,verification_token:i.verification_token})];case 3:return l.sent(),(c=this.config.eventBus)==null||c.fire(v,{event:`PASSWORD_RECOVERY`}),[4,this.signInWithPassword({email:r?e:void 0,phone:r?void 0:e,password:t.password})];case 4:return a=l.sent(),n&&Et()&&window.location.assign(n),[2,a];case 5:return s=l.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`resetPasswordForEmail`})}];case 6:return[2]}})})}},error:null}];case 2:return s=u.sent(),[2,{data:{updateUser:null},error:new I(s,{method:`resetPasswordForEmail`})}];case 3:return[2]}})})},n.prototype.resetPasswordForOld=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.authApi.updatePasswordByOld({old_password:e.old_password,new_password:e.new_password})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`resetPasswordForOld`})}];case 4:return[2]}})})},n.prototype.verifyOtp=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a,o,s;return U(this,function(c){switch(c.label){case 0:return c.trys.push([0,6,,7]),t=e.type,n=String(e.token),r=`email`in e?e.email:void 0,i=`phone`in e?e.phone:void 0,this.validateParams(e,{token:{required:!0,message:`Token is required`},messageId:{required:!0,message:`messageId is required`}},`verifyOtp`),[`phone_change`,`email_change`].includes(t)?[4,this.verify({verification_id:e.messageId,verification_code:n})]:[3,2];case 1:return c.sent(),[3,4];case 2:return[4,this.signInWithUsername({verificationInfo:{verification_id:e.messageId,is_user:!0},verificationCode:n,username:r||this.formatPhone(i)||``,loginType:r?`email`:`phone`})];case 3:c.sent(),c.label=4;case 4:return[4,this.getSession()];case 5:return a=c.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 6:return s=c.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`verifyOtp`})}];case 7:return[2]}})})},n.prototype.getSession=function(){return H(this,void 0,Promise,function(){var e,t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.oauth2client.getCredentials()];case 1:return(e=i.sent())&&e.scope!==`accessKey`?[4,this.getUser(!1)]:[2,{data:{session:null,user:null},error:null}];case 2:return t=i.sent().data,n=(t===void 0?{}:t).user,[2,{data:{session:B(B({},e),{user:n}),user:n},error:null}];case 3:return r=i.sent(),[2,{data:{session:null,user:null},error:new I(r,{method:`getSession`})}];case 4:return[2]}})})},n.prototype.refreshSession=function(e){return H(this,void 0,Promise,function(){var t,n,r,i,a;return U(this,function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.oauthInstance.oauth2client.localCredentials.getCredentials()];case 1:return(t=o.sent()).refresh_token=e||t.refresh_token,[4,this.oauthInstance.oauth2client.refreshToken(t)];case 2:return n=o.sent(),[4,this.getUser(!1)];case 3:return r=o.sent().data,[2,{data:{user:i=(r===void 0?{}:r).user,session:B(B({},n),{user:i})},error:null}];case 4:return a=o.sent(),[2,{data:{user:null,session:null},error:new I(a,{method:`refreshSession`})}];case 5:return[2]}})})},n.prototype.getUser=function(e){return e===void 0&&(e=!0),H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.oauthInstance.oauth2client.getCredentials()];case 1:return(t=i.sent())&&t.scope!==`accessKey`?(n=this.convertToUser,[4,this.getCurrentUser(e)]):[2,{data:{user:null},error:null}];case 2:return[2,{data:{user:n.apply(this,[i.sent()])},error:null}];case 3:return r=i.sent(),[2,{data:{user:null},error:new I(r,{method:`getUser`})}];case 4:return[2]}})})},n.prototype.refreshUser=function(){return H(this,void 0,Promise,function(){var e,t,n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.currentUser.refresh()];case 1:return r.sent(),[4,this.getSession()];case 2:return e=r.sent().data,[2,{data:{user:(t=(e===void 0?{}:e).session).user,session:t},error:null}];case 3:return n=r.sent(),[2,{data:{user:null,session:null},error:new I(n,{method:`refreshUser`})}];case 4:return[2]}})})},n.prototype.updateUser=function(e){var t;return H(this,void 0,Promise,function(){var n,r,i,a,o,s,l,u,d,f,p,m,g,_=this;return U(this,function(y){switch(y.label){case 0:if(y.trys.push([0,8,,9]),At(e,`updateUser`),n=[`password`,`new_password`].find(function(t){var n=e[t];return n!=null&&n!==``}))throw new I({message:`updateUser 不支持更新密码,检测到传入了 "${n}" 参数。如需修改密码请使用 resetPasswordForOld(旧密码修改)、resetPasswordForEmail(验证码重置)或 reauthenticate(重新认证后改密)`});if(!Object.keys(e).some(function(t){return e[t]!==void 0&&e[t]!==null&&e[t]!==``}))throw this.missingRequiredParam(`updateUser`,`(at least one field)`);return r=e.email,i=e.phone,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[`email`,`phone`]),s=i!==void 0,l={},(o=r!==void 0)||s?(u=void 0,o?(u={email:e.email,usage:c.REAUTHENTICATION},d=`email_change`):(f=this.formatPhone(e.phone),u={phone_number:f},d=`phone_change`),[4,this.getVerification(B({},u))]):[3,4];case 1:return p=y.sent(),Object.keys(a).length>0?[4,this.updateUserBasicInfo(a)]:[3,3];case 2:y.sent(),y.label=3;case 3:return l={messageId:p.verification_id,verifyOtp:function(t){return H(_,void 0,Promise,function(){var n,r,i,a;return U(this,function(s){switch(s.label){case 0:return s.trys.push([0,11,,12]),t.email&&e.email===t.email?[4,this.verifyOtp({type:`email_change`,email:e.email,token:t.token,messageId:p.verification_id||``})]:[3,3];case 1:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo({email:e.email})];case 2:return s.sent(),[3,9];case 3:return t.phone&&e.phone===t.phone?[4,this.verifyOtp({type:`phone_change`,phone:e.phone,token:t.token,messageId:p.verification_id||``})]:[3,6];case 4:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo({phone:this.formatPhone(e.phone)})];case 5:return s.sent(),[3,9];case 6:return[4,this.verifyOtp(o?{type:d,email:e.email,token:t.token,messageId:p.verification_id||``}:{type:d,phone:e.phone,token:t.token,messageId:p.verification_id||``})];case 7:return(n=s.sent()).error?[2,n]:[4,this.updateUserBasicInfo(e)];case 8:s.sent(),s.label=9;case 9:return[4,this.getUser(!1)];case 10:return r=s.sent().data.user,(a=this.config.eventBus)==null||a.fire(v,{event:h}),[2,{data:{user:r},error:null}];case 11:return i=s.sent(),[2,{data:{user:null},error:new I(i,{method:`updateUser`})}];case 12:return[2]}})})}},[3,6];case 4:return[4,this.updateUserBasicInfo(e)];case 5:y.sent(),y.label=6;case 6:return[4,this.getUser(!1)];case 7:return m=y.sent().data.user,Object.keys(a).length>0&&((t=this.config.eventBus)==null||t.fire(v,{event:h})),[2,{data:B({user:m},l),error:null}];case 8:return g=y.sent(),[2,{data:{user:null},error:new I(g,{method:`updateUser`})}];case 9:return[2]}})})},n.prototype.getUserIdentities=function(){return H(this,void 0,Promise,function(){var e,t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.oauthInstance.authApi.getProviders()];case 1:return e=n.sent(),[2,{data:{identities:(e?.data)?.filter(function(e){return!!e.bind})},error:null}];case 2:return t=n.sent(),[2,{data:{identities:null},error:new I(t,{method:`getUserIdentities`})}];case 3:return[2]}})})},n.prototype.linkIdentity=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`linkIdentity`),[4,this.signInWithOAuth({provider:e.provider,options:{type:x}})];case 1:return n.sent(),[2,{data:{provider:e.provider},error:null}];case 2:return t=n.sent(),[2,{data:{provider:null},error:new I(t,{method:`linkIdentity`})}];case 3:return[2]}})})},n.prototype.unlinkIdentity=function(e){return H(this,void 0,Promise,function(){var t;return U(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.validateParams(e,{provider:{required:!0,message:`Provider is required`}},`unlinkIdentity`),[4,this.oauthInstance.authApi.unbindProvider({provider_id:e.provider})];case 1:return n.sent(),[2,{data:{},error:null}];case 2:return t=n.sent(),[2,{data:{},error:new I(t,{method:`unlinkIdentity`})}];case 3:return[2]}})})},n.prototype.reauthenticate=function(){return H(this,void 0,Promise,function(){var e,t,n,r,i=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.getUser(!1)];case 1:return e=a.sent().data.user,this.validateAtLeastOne(e,[[`email`,`phone`]],`reauthenticate`),t=e.email?{email:e.email,usage:c.REAUTHENTICATION}:{phone_number:this.formatPhone(e.phone)},[4,this.getVerification(t)];case 2:return n=a.sent(),[2,{data:{updateUser:function(e){return H(i,void 0,Promise,function(){var r,i,a,o,s;return U(this,function(c){switch(c.label){case 0:this.validateParams(e,{nonce:{required:!0,message:`Nonce is required`}},`reauthenticate`),c.label=1;case 1:return c.trys.push([1,9,,10]),e.password?[4,this.verify({verification_id:n.verification_id,verification_code:e.nonce})]:[3,5];case 2:return r=c.sent(),[4,this.oauthInstance.authApi.sudo({verification_token:r.verification_token})];case 3:return i=c.sent(),[4,this.oauthInstance.authApi.setPassword({new_password:e.password,sudo_token:i.sudo_token})];case 4:return c.sent(),[3,7];case 5:return[4,this.signInWithUsername(B(B({verificationInfo:n,verificationCode:e.nonce},t),{loginType:t.email?`email`:`phone`}))];case 6:c.sent(),c.label=7;case 7:return[4,this.getSession()];case 8:return a=c.sent().data,[2,{data:{user:(o=(a===void 0?{}:a).session).user,session:o},error:null}];case 9:return s=c.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`reauthenticate`})}];case 10:return[2]}})})}},error:null}];case 3:return r=a.sent(),[2,{data:{updateUser:null},error:new I(r,{method:`reauthenticate`})}];case 4:return[2]}})})},n.prototype.resend=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.validateAtLeastOne(e,[[`email`],[`phone`]],`resend`),t=e.type===`signup`?`ANY`:`USER`,n={target:t},`email`in e&&(n.email=e.email,n.usage=c.EMAIL),`phone`in e&&(n.phone_number=this.formatPhone(e.phone)),[4,this.oauthInstance.authApi.getVerification(n)];case 1:return[2,{data:{messageId:i.sent().verification_id},error:null}];case 2:return r=i.sent(),[2,{data:{messageId:null},error:new I(r,{method:`resend`})}];case 3:return[2]}})})},n.prototype.setSession=function(e){return H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.validateParams(e,{access_token:{required:!0,message:`Access token is required`},refresh_token:{required:!0,message:`Refresh token is required`}},`setSession`),[4,this.oauthInstance.oauth2client.refreshToken(e,{throwError:!0})];case 1:return i.sent(),[4,this.getSession()];case 2:return t=i.sent().data,[2,{data:{user:(n=(t===void 0?{}:t).session).user,session:n},error:null}];case 3:return r=i.sent(),[2,{data:{user:null,session:null},error:new I(r,{method:`setSession`})}];case 4:return[2]}})})},n.prototype.exchangeCodeForSession=function(){return H(this,void 0,void 0,function(){return U(this,function(e){return[2]})})},n.prototype.deleteUser=function(e){return H(this,void 0,Promise,function(){var t,n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),this.validateParams(e,{password:{required:!0,message:`Password is required`}},`deleteUser`),[4,this.oauthInstance.authApi.sudo(e)];case 1:return t=r.sent().sudo_token,[4,this.oauthInstance.authApi.deleteMe({sudo_token:t})];case 2:return r.sent(),[2,{data:{},error:null}];case 3:return n=r.sent(),[2,{data:{},error:new I(n,{method:`deleteUser`})}];case 4:return[2]}})})},n.prototype.toDefaultLoginPage=function(e){return e===void 0&&(e={}),H(this,void 0,Promise,function(){var t,n,r,i,a;return U(this,function(o){try{return t=e.config_version||`env`,n=Object.keys(e.query||{}).map(function(t){return`${t}=${e.query[t]}`}).join(`&`),ct.default.isMatch()?wx.navigateTo({url:`/packages/\$wd_system/pages/login/index${n?`?${n}`:``}`}):(r=e.redirect_uri||window.location.href,i=new URL(r),a=`${i.origin}/__auth/?app_id=${e.app_id||``}&env_id=${this.config.env}&client_id=${this.config.clientId||this.config.env}&config_version=${t}&redirect_uri=${encodeURIComponent(r)}${n?`&${n}`:``}`,window.location.href=a),[2,{data:{},error:null}]}catch(e){return[2,{data:{},error:new I(e,{method:`toDefaultLoginPage`})}]}})})},n.prototype.signInWithCustomTicket=function(e){return H(this,void 0,Promise,function(){var t,n,r,i;return U(this,function(a){switch(a.label){case 0:e&&this.setCustomSignFunc(e),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,this.oauthInstance.authApi.signInWithCustomTicket()];case 2:return a.sent(),[4,this.createLoginState()];case 3:return t=a.sent(),[4,this.getSession()];case 4:return n=a.sent().data,r=(n===void 0?{}:n).session,[2,B(B({},t),{data:{user:r.user,session:r},error:null})];case 5:return i=a.sent(),[2,{data:{user:null,session:null},error:new I(i,{method:`signInWithCustomTicket`})}];case 6:return[2]}})})},n.prototype.signInWithOpenId=function(e){var t=(e===void 0?{}:e).useWxCloud,n=t===void 0||t;return H(this,void 0,Promise,function(){var e,t,r,i,a,o,s=this;return U(this,function(c){switch(c.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);e=wx.getAccountInfoSync().miniProgram,t=function(t){return H(s,void 0,void 0,function(){var r,i;return U(this,function(a){switch(a.label){case 0:r=void 0,i=void 0,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:t,provider_params:{provider_code_type:`open_id`,appid:e?.appId}},n)];case 2:if((r=a.sent())?.error_code||!r.provider_token)throw r;return[4,this.oauthInstance.authApi.signInWithProvider({provider_token:r.provider_token},n)];case 3:if((i=a.sent())?.error_code)throw i;return[3,5];case 4:throw a.sent();case 5:return[4,this.oauthInstance.oauth2client.setCredentials(i)];case 6:return a.sent(),[2]}})})},c.label=1;case 1:return c.trys.push([1,5,,6]),[4,new Promise(function(e,n){wx.login({success:function(r){return H(s,void 0,void 0,function(){var i;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t(r.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return i=a.sent(),n(i),[3,3];case 3:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,n(t)}})})];case 2:return c.sent(),[4,this.createLoginState()];case 3:return r=c.sent(),[4,this.getSession()];case 4:return i=c.sent().data,a=(i===void 0?{}:i).session,[2,B(B({},r),{data:{user:a.user,session:a},error:null})];case 5:return o=c.sent(),[2,{data:{user:null,session:null},error:new I(o,{method:`signInWithOpenId`})}];case 6:return[2]}})})},n.prototype.signInWithPhoneAuth=function(e){var t=e.phoneCode,n=t===void 0?``:t,r=e.useWxCloud,i=r!==void 0&&r;return H(this,void 0,Promise,function(){var e,t,r,a,o,s,c,l,u;return U(this,function(d){switch(d.label){case 0:return ct.default.isMatch()?(e=wx.getAccountInfoSync().miniProgram,t={provider_params:{provider_code_type:`phone`,code:n,appid:e.appId},provider_id:e.appId},[4,wx.login()]):[2,{data:{user:null,session:null},error:new I({message:`wx api undefined`})}];case 1:r=d.sent().code,t.provider_code=r,d.label=2;case 2:return d.trys.push([2,5,,6]),[4,this.oauthInstance.authApi.grantProviderToken(t,i)];case 3:if((a=d.sent()).error_code)throw a;return[4,this.oauthInstance.authApi.signInWithProvider({provider_token:a.provider_token},i)];case 4:if((o=d.sent())?.error_code)throw o;return[3,6];case 5:return s=d.sent(),[2,{data:{user:null,session:null},error:new I(s,{method:`signInWithPhoneAuth`})}];case 6:return[4,this.createLoginState()];case 7:return c=d.sent(),[4,this.getSession()];case 8:return l=d.sent().data,u=(l===void 0?{}:l).session,[2,B(B({},c),{data:{user:u.user,session:u},error:null})]}})})},n.prototype.bindPhoneNumber=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.editContact(e)]})})},n.prototype.unbindProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.unbindProvider(e)]})})},n.prototype.bindEmail=function(e){return this.oauthInstance.authApi.editContact(e)},n.prototype.verify=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.verify(e)]})})},n.prototype.getVerification=function(e,t){return H(this,void 0,Promise,function(){return U(this,function(n){return e.phone_number&&=this.formatPhone(e.phone_number),[2,this.oauthInstance.authApi.getVerification(e,t)]})})},Object.defineProperty(n.prototype,"currentUser",{get:function(){if(this.cache.mode!==`async`){var e=this.hasLoginState();return e&&e.user||null}(0,Ie.printWarn)(z.ERRORS.INVALID_OPERATION,`current platform's storage is asynchronous, please use getCurrentUser instead`)},enumerable:!1,configurable:!0}),n.prototype.getCurrentUser=function(e){return e===void 0&&(e=!0),H(this,void 0,Promise,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e?[4,this.getLoginState()]:[3,3];case 1:return(t=i.sent())?[4,t.user.refresh()]:[3,3];case 2:i.sent(),i.label=3;case 3:return[3,5];case 4:return i.sent(),[3,5];case 5:return[4,this.getLoginState()];case 6:return(n=i.sent())?(r=n.user.getLocalUserInfo(),[4,n.user.checkLocalInfoAsync()]):[3,8];case 7:return i.sent(),[2,B(B({},n.user),r)];case 8:return[2,null]}})})},n.prototype.signInAnonymouslyInWx=function(e){var t=(e===void 0?{}:e).useWxCloud;return H(this,void 0,Promise,function(){var e,n,r=this;return U(this,function(i){switch(i.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);return e=wx.getAccountInfoSync().miniProgram,n=function(n){return H(r,void 0,void 0,function(){var r,i;return U(this,function(a){switch(a.label){case 0:r=void 0,i=void 0,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:n,provider_params:{provider_code_type:`open_id`,appid:e?.appId}},t)];case 2:if((r=a.sent())?.error_code||!r.provider_token)throw r;return[4,this.oauthInstance.authApi.signInAnonymously({provider_token:r.provider_token},t)];case 3:if((i=a.sent())?.error_code)throw i;return[3,5];case 4:throw a.sent();case 5:return[2]}})})},[4,new Promise(function(e,t){wx.login({success:function(i){return H(r,void 0,void 0,function(){var r;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n(i.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return r=a.sent(),t(r),[3,3];case 3:return[2]}})})},fail:function(e){var n=Error(e?.errMsg);n.code=e?.errno,t(n)}})})];case 1:return i.sent(),[2,this.createLoginState(void 0,{asyncRefreshUser:!0})]}})})},n.prototype.bindOpenId=function(){return H(this,void 0,Promise,function(){var e,t,n=this;return U(this,function(r){switch(r.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);return e=wx.getAccountInfoSync().miniProgram,t=function(t){return H(n,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:n=void 0,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_id:e?.appId,provider_code:t,provider_params:{provider_code_type:`open_id`,appid:e?.appId}})];case 2:if((n=r.sent())?.error_code||!n.provider_token)throw n;return[4,this.oauthInstance.authApi.bindWithProvider({provider_token:n.provider_token})];case 3:return r.sent(),[3,5];case 4:throw r.sent();case 5:return[2]}})})},[4,new Promise(function(e,r){wx.login({success:function(i){return H(n,void 0,void 0,function(){var n;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t(i.code)];case 1:return a.sent(),e(!0),[3,3];case 2:return n=a.sent(),r(n),[3,3];case 3:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,r(t)}})})];case 1:return r.sent(),[2]}})})},n.prototype.signInWithUnionId=function(){return H(this,void 0,Promise,function(){var e=this;return U(this,function(t){switch(t.label){case 0:if(!ct.default.isMatch())throw Error(`wx api undefined`);t.label=1;case 1:return t.trys.push([1,3,,4]),[4,new Promise(function(t,n){var r=wx.getAccountInfoSync().miniProgram;wx.login({success:function(i){return H(e,void 0,void 0,function(){var e,a,o,s,c;return U(this,function(l){switch(l.label){case 0:e=r?.appId,l.label=1;case 1:return l.trys.push([1,4,,5]),[4,this.oauthInstance.authApi.grantProviderToken({provider_code:i.code,provider_id:e,provider_params:{provider_code_type:`union_id`,appid:r?.appId}})];case 2:return a=l.sent(),(o=a.provider_token)?[4,this.oauthInstance.authApi.signInWithProvider({provider_id:e,provider_token:o})]:(n(a),[2]);case 3:return(s=l.sent())?.error_code?(n(s),[2]):(t(!0),[3,5]);case 4:return c=l.sent(),n(c),[3,5];case 5:return[2]}})})},fail:function(e){var t=Error(e?.errMsg);t.code=e?.errno,n(t)}})})];case 2:return t.sent(),[3,4];case 3:throw t.sent();case 4:return[2,this.createLoginState()]}})})},n.prototype.signInWithSms=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.phoneNum,o=a===void 0?``:a,s=e.bindInfo,c=s===void 0?void 0:s;return H(this,void 0,Promise,function(){return U(this,function(e){try{return[2,this.signInWithUsername({verificationInfo:n,verificationCode:i,bindInfo:c,username:o,loginType:`sms`})]}catch(e){throw e}})})},n.prototype.signInWithEmail=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.bindInfo,o=a===void 0?void 0:a,s=e.email,c=s===void 0?``:s;return H(this,void 0,Promise,function(){return U(this,function(e){try{return[2,this.signInWithUsername({verificationInfo:n,verificationCode:i,bindInfo:o,username:c,loginType:`email`})]}catch(e){throw e}})})},n.prototype.setCustomSignFunc=function(e){this.oauthInstance.authApi.setCustomSignFunc(e)},n.prototype.signIn=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signIn(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.setPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.setPassword(e)]})})},n.prototype.isUsernameRegistered=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return typeof e!=`string`&&(0,Ie.throwError)(z.ERRORS.INVALID_PARAMS,`username must be a string`),[4,this.oauthInstance.authApi.checkIfUserExist({username:e})];case 1:return[2,t.sent().exist]}})})},n.prototype.hasLoginState=function(){if(this.cache.mode!==`async`)return this.oauthInstance?.authApi.hasLoginStateSync()?new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance}):null;(0,Ie.printWarn)(z.ERRORS.INVALID_OPERATION,`current platform's storage is asynchronous, please use getLoginState instead`)},n.prototype.getLoginState=function(){return H(this,void 0,Promise,function(){var e;return U(this,function(t){switch(t.label){case 0:e=null,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.oauthInstance.authApi.getLoginState()];case 2:return e=t.sent(),[3,4];case 3:return t.sent(),[2,null];case 4:return e?[2,new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance})]:[2,null]}})})},n.prototype.getUserInfo=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.getCurrentUser()]})})},n.prototype.getWedaUserInfo=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getWedaUserInfo()]})})},n.prototype.updateUserBasicInfo=function(e){return H(this,void 0,void 0,function(){var t;return U(this,function(n){switch(n.label){case 0:return[4,this.getLoginState()];case 1:return(t=n.sent())?[4,t.user.updateUserBasicInfo(e)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},n.prototype.getAuthHeader=function(){return console.error(`Auth.getAuthHeader API 已废弃`),{}},n.prototype.bindWithProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.bindWithProvider(e)]})})},n.prototype.queryUser=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.queryUserProfile(e)]})})},n.prototype.getAccessToken=function(){return H(this,void 0,Promise,function(){return U(this,function(e){switch(e.label){case 0:return[4,this.oauthInstance.oauth2client.getAccessToken()];case 1:return[2,{accessToken:e.sent(),env:this.config.env}]}})})},n.prototype.grantProviderToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.grantProviderToken(e)]})})},n.prototype.patchProviderToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.patchProviderToken(e)]})})},n.prototype.signInWithProvider=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signInWithProvider(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.signInWithWechat=function(e){return e===void 0&&(e={}),H(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.signInWithWechat(e)];case 1:return t.sent(),[2,this.createLoginState(e)]}})})},n.prototype.grantToken=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.authApi.grantToken(e)];case 1:return t.sent(),[2,this.createLoginState()]}})})},n.prototype.genProviderRedirectUri=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.genProviderRedirectUri(e)]})})},n.prototype.resetPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.resetPassword(e)]})})},n.prototype.deviceAuthorize=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.deviceAuthorize(e)]})})},n.prototype.sudo=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.sudo(e)]})})},n.prototype.deleteMe=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.deleteMe(e)]})})},n.prototype.getProviders=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getProviders()]})})},n.prototype.loginScope=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.loginScope()]})})},n.prototype.loginGroups=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.loginGroups()]})})},n.prototype.onLoginStateChanged=function(e){var t;return H(this,void 0,void 0,function(){var n,r=this;return U(this,function(i){switch(i.label){case 0:return(t=this.config.eventBus)==null||t.on(_,function(t){return H(r,void 0,void 0,function(){var n,r;return U(this,function(i){switch(i.label){case 0:return t?.data?.eventType===u?[3,2]:[4,this.getLoginState()];case 1:return r=i.sent(),[3,3];case 2:r={},i.label=3;case 3:return n=r,e.call(this,B(B({},t),n)),[2]}})})}),[4,this.getLoginState()];case 1:return n=i.sent(),e.call(this,n),[2]}})})},n.prototype.refreshTokenForce=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.refreshTokenForce(e)]})})},n.prototype.getCredentials=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getCredentials()]})})},n.prototype.setCredentials=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,this.oauthInstance.oauth2client.setCredentials(e)];case 1:return t.sent(),[2]}})})},n.prototype.getProviderSubType=function(){return H(this,void 0,Promise,function(){return U(this,function(e){return[2,this.oauthInstance.authApi.getProviderSubType()]})})},n.prototype.createCaptchaData=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.createCaptchaData(e)]})})},n.prototype.verifyCaptchaData=function(e){return H(this,void 0,void 0,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.verifyCaptchaData(e)]})})},n.prototype.getMiniProgramQrCode=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getMiniProgramCode(e)]})})},n.prototype.getMiniProgramQrCodeStatus=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getMiniProgramQrCodeStatus(e)]})})},n.prototype.modifyPassword=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.modifyPassword(e)]})})},n.prototype.modifyPasswordWithoutLogin=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.modifyPasswordWithoutLogin(e)]})})},n.prototype.getUserBehaviorLog=function(e){return H(this,void 0,Promise,function(){return U(this,function(t){return[2,this.oauthInstance.authApi.getUserBehaviorLog(e)]})})},n.prototype.signInWithUsername=function(e){var t=e.verificationInfo,n=t===void 0?{verification_id:``,is_user:!1}:t,r=e.verificationCode,i=r===void 0?``:r,a=e.username,o=a===void 0?``:a,s=e.bindInfo,c=s===void 0?void 0:s,l=e.loginType,u=l===void 0?``:l;return H(this,void 0,Promise,function(){var e,t,r,a,s,l,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,8,,9]),[4,this.oauthInstance.authApi.verify({verification_id:n.verification_id,verification_code:i})];case 1:if((e=f.sent())?.error_code)throw e;return t=e.verification_token,r=this.formatPhone(o),a={phone_number:r},u===`email`&&(a={email:r=o}),n.is_user?[4,this.oauthInstance.authApi.signIn({username:r,verification_token:t})]:[3,5];case 2:if((s=f.sent())?.error_code)throw s;return c?[4,this.oauthInstance.authApi.bindWithProvider({provider_token:c?.providerToken})]:[3,4];case 3:if((l=f.sent())?.error_code)throw l;f.label=4;case 4:return[3,7];case 5:return[4,this.oauthInstance.authApi.signUp(B(B({},a),{verification_token:t,provider_token:c?.providerId}))];case 6:if((d=f.sent())?.error_code)throw d;f.label=7;case 7:return[2,this.createLoginState()];case 8:throw f.sent();case 9:return[2]}})})},n.prototype.createLoginState=function(e,t){return H(this,void 0,Promise,function(){var n;return U(this,function(r){switch(r.label){case 0:return[4,(n=new Nt({envId:this.config.env,cache:this.cache,oauthInstance:this.oauthInstance})).checkLocalStateAsync()];case 1:return r.sent(),t?.userInfo?(n.user.setLocalUserInfo(t.userInfo),[3,5]):[3,2];case 2:return t?.asyncRefreshUser?(n.user.refresh(e),[3,5]):[3,3];case 3:return[4,n.user.refresh(e)];case 4:r.sent(),r.label=5;case 5:return[2,n]}})})},n.prototype.setAccessKey=function(){var e,t;return H(this,void 0,void 0,function(){var n,r;return U(this,function(i){if(n=``,r=``,this.config.accessKey?(n=this.config.accessKey,r=`accessKey`):(e=this.config.auth)!=null&&e.secretId&&(t=this.config.auth)!=null&&t.secretKey&&(n=``,r=S),!r)return[2];try{this.oauthInstance.oauth2client.setAccessKeyCredentials({access_token:n,token_type:`Bearer`,scope:r,expires_at:new Date(+new Date+ +new Date),expires_in:+new Date+ +new Date})}catch(e){console.warn(`accessKey error: `,e)}return[2]})})},n.prototype.formatPhone=function(e){return!/\s+/.test(e)&&/^\+\d{1,3}\d+/.test(e)?e.replace(/^(\+\d{1,2})(\d+)$/,`$1 $2`):/^\+\d{1,3}\s+/.test(e)?e:`+86 ${e}`},n.prototype.notifyListeners=function(e,t,n){this.listeners.forEach(function(r){r.forEach(function(r){try{r(e,t,n)}catch(e){console.error(`Error in auth state change callback:`,e)}})})},n.prototype.setupListeners=function(){var e,t=this;(e=this.config.eventBus)==null||e.on(v,function(e){return H(t,void 0,void 0,function(){var t,n,r,i,a;return U(this,function(o){switch(o.label){case 0:return t=e?.data?.event,n=e?.data?.info,t!==f||n?[3,2]:[4,this.getUser(!0)];case 1:r=o.sent().data,(i=(r===void 0?{}:r).user)&&(n={user:i}),o.label=2;case 2:return[4,this.getSession()];case 3:return a=o.sent().data.session,this.notifyListeners(t,a,n),[2]}})})})},n.prototype.convertToUser=function(e){var t;if(!e)return null;var n=e?.email||``,r=e?.phone_number||``,i=e?.sub||e?.uid||``;return{id:i,aud:`authenticated`,role:((t=e.groups)?.map)?.call(t,function(e){return typeof e==`string`?e:e.id}),email:n||``,email_confirmed_at:(e?.email_verified,e.created_at),phone:r,phone_confirmed_at:r?e.created_at:void 0,confirmed_at:e.created_at,last_sign_in_at:e.last_sign_in_at,app_metadata:{provider:e.loginType?.toLowerCase()||`cloudbase`,providers:[e.loginType?.toLowerCase()||`cloudbase`]},user_metadata:{name:e?.name,picture:e?.picture,username:e?.username,gender:e?.gender,locale:e?.locale,uid:e.uid,nickName:e.nickName||e?.name,avatarUrl:e.avatarUrl||e.picture,location:e.location,hasPassword:e.hasPassword??e.password===`SET`,open_id:e?.open_id},identities:(e?.providers)?.map(function(t){return{id:t.id||``,identity_id:t.id||``,user_id:i,identity_data:{provider_id:t.id,provider_user_id:t.provider_user_id,name:t.name},provider:t.id||`cloudbase`,created_at:e.created_at,updated_at:e.updated_at,last_sign_in_at:e.last_sign_in_at}})||[],created_at:e.created_at,updated_at:e.updated_at,is_anonymous:e.name===`anonymous`}},n.prototype.missingRequiredParam=function(e,t){return new I({error:`missing_required_param`,error_code:4e3,error_description:`auth.${e}(params): missing required param '${t}'`},{method:e})},n.prototype.validateParams=function(e,t,n){for(var r=0,i=Object.entries(t);r<i.length;r++){var a=i[r],o=a[0];if(a[1].required&&(e?.[o]===void 0||e?.[o]===null||e?.[o]===``))throw this.missingRequiredParam(n,o)}},n.prototype.validateAtLeastOne=function(e,t,n){if(!t.some(function(t){return t.some(function(t){return e?.[t]!==void 0&&e?.[t]!==null&&e?.[t]!==``})}))throw this.missingRequiredParam(n,t.map(function(e){return e.join(`|`)}).join(`|`))},n.prototype.init=function(){var e;return H(this,void 0,Promise,function(){return U(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.oauthInstance.oauth2client.localCredentials.getCredentials()];case 1:return t.sent()&&!this.oauthInstance.oauth2client.initSessionEmitted&&((e=this.config.eventBus)==null||e.fire(v,{event:p})),[3,3];case 2:return t.sent(),[3,3];case 3:return[2,{error:null}]}})})},Tt([(0,ot.catchErrorsDecorator)({title:`绑定手机号失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindPhoneNumber() 的语法或参数是否正确`,` 2 - 当前环境是否开通了短信验证码登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(r=e.BindPhoneRequest)==`function`?r:Object]),V(`design:returntype`,Promise)],n.prototype,`bindPhoneNumber`,null),Tt([(0,ot.catchErrorsDecorator)({title:`解除三方绑定失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().unbindProvider() 的语法或参数是否正确`,` 2 - 当前账户是否已经与此登录方式解绑`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(i=e.UnbindProviderRequest)==`function`?i:Object]),V(`design:returntype`,typeof(a=typeof Promise<`u`&&Promise)==`function`?a:Object)],n.prototype,`unbindProvider`,null),Tt([(0,ot.catchErrorsDecorator)({title:`绑定邮箱地址失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindEmail() 的语法或参数是否正确`,` 2 - 当前环境是否开通了邮箱密码登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(o=e.BindEmailRequest)==`function`?o:Object]),V(`design:returntype`,void 0)],n.prototype,`bindEmail`,null),Tt([(0,ot.catchErrorsDecorator)({title:`验证码验证失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().verify() 的语法或参数是否正确`,` 2 - 当前环境是否开通了手机验证码/邮箱登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(s=e.VerifyRequest)==`function`?s:Object]),V(`design:returntype`,typeof(l=typeof Promise<`u`&&Promise)==`function`?l:Object)],n.prototype,`verify`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取验证码失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getVerification() 的语法或参数是否正确`,` 2 - 当前环境是否开通了手机验证码/邮箱登录`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(d=e.GetVerificationRequest)==`function`?d:Object,Object]),V(`design:returntype`,typeof(m=typeof Promise<`u`&&Promise)==`function`?m:Object)],n.prototype,`getVerification`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getCurrentUser() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(g=typeof Promise<`u`&&Promise)==`function`?g:Object)],n.prototype,`getCurrentUser`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序匿名登录失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了匿名登录`,` 2 - 调用 auth().signInAnonymouslyInWx() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(b=typeof Promise<`u`&&Promise)==`function`?b:Object)],n.prototype,`signInAnonymouslyInWx`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序绑定OpenID失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序openId静默登录`,` 2 - 调用 auth().bindOpenId() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(C=typeof Promise<`u`&&Promise)==`function`?C:Object)],n.prototype,`bindOpenId`,null),Tt([(0,ot.catchErrorsDecorator)({title:`小程序unionId静默登录失败`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序unionId静默登录`,` 2 - 调用 auth().signInWithUnionId() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(w=typeof Promise<`u`&&Promise)==`function`?w:Object)],n.prototype,`signInWithUnionId`,null),Tt([(0,ot.catchErrorsDecorator)({title:`短信验证码登陆`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了小程序短信验证码登陆`,` 2 - 调用 auth().signInWithSms() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(T=typeof Promise<`u`&&Promise)==`function`?T:Object)],n.prototype,`signInWithSms`,null),Tt([(0,ot.catchErrorsDecorator)({title:`邮箱验证码登陆`,messages:[`请确认以下各项:`,` 1 - 当前环境是否开启了邮箱登陆`,` 2 - 调用 auth().signInWithEmail() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[Object]),V(`design:returntype`,typeof(E=typeof Promise<`u`&&Promise)==`function`?E:Object)],n.prototype,`signInWithEmail`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户是否被占用失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().isUsernameRegistered() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[String]),V(`design:returntype`,typeof(D=typeof Promise<`u`&&Promise)==`function`?D:Object)],n.prototype,`isUsernameRegistered`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取本地登录态失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getLoginState() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(ee=typeof Promise<`u`&&Promise)==`function`?ee:Object)],n.prototype,`getLoginState`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取用户信息失败`,messages:[`请确认以下各项:`,` 1 - 是否已登录`,` 2 - 调用 auth().getUserInfo() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(te=typeof Promise<`u`&&Promise)==`function`?te:Object)],n.prototype,`getUserInfo`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取微搭插件用户信息失败`,messages:[`请确认以下各项:`,` 1 - 是否已登录`,` 2 - 调用 auth().getWedaUserInfo() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(O=typeof Promise<`u`&&Promise)==`function`?O:Object)],n.prototype,`getWedaUserInfo`,null),Tt([(0,ot.catchErrorsDecorator)({title:`绑定第三方登录方式失败`,messages:[`请确认以下各项:`,` 1 - 调用 auth().bindWithProvider() 的语法或参数是否正确`,` 2 - 此账户是否已经绑定此第三方`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[typeof(A=e.BindWithProviderRequest)==`function`?A:Object]),V(`design:returntype`,typeof(ne=typeof Promise<`u`&&Promise)==`function`?ne:Object)],n.prototype,`bindWithProvider`,null),Tt([(0,ot.catchErrorsDecorator)({title:`获取身份源类型`,messages:[`请确认以下各项:`,` 1 - 调用 auth().getProviderSubType() 的语法或参数是否正确`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${z.COMMUNITY_SITE_URL}`]}),V(`design:type`,Function),V(`design:paramtypes`,[]),V(`design:returntype`,typeof(re=typeof Promise<`u`&&Promise)==`function`?re:Object)],n.prototype,`getProviderSubType`,null),n}(Ct),Ft=`auth`;function It(e,t){for(var n=[],r=0;r<=e.length;r++)n[r]=[r];for(var i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++){var a=e[r-1].toLowerCase()===t[i-1].toLowerCase()?0:1;n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+a)}return n[e.length][t.length]}var Lt={name:`auth`,namespace:Ft,entity:function(e){var t=function(e){var t=this;if(this.authInstance&&!e)return this.authInstance;e||={region:``,persistence:`local`,apiPath:s};var n=this.platform.adapter,r=e.persistence||n.primaryStorage;r&&r!==this.config.persistence&&this.updateConfig({persistence:r});var i=function(e,t){var n=this,r=e.region,i=r===void 0?`ap-shanghai`:r,a=e.i18n,o=e.accessKey,c=e.useWxCloud,l=t?.platform||lt.useDefaultAdapter.bind(t)(),u=l.runtime,d=l.adapter,p=t||{},m=p.env,h=p.clientId,_=p.debug,b=p.cache,S=p.app,C=p.getApiOrigin,w=(t||{}).apiOrigin;w||=`https://${m}.${i}.tcb-api.tencentcloudapi.com`;var T={env:m,clientId:h,i18n:a,accessKey:o,useWxCloud:c,eventBus:new Fe.CloudbaseEventEmitter},E=new at(gt(B(B({},T),{apiOrigin:w,getApiOrigin:C,apiPath:e?.apiPath||s,storage:e?.storage,baseRequest:e?.baseRequest,request:e?.request,anonymousSignInFunc:e?.anonymousSignInFunc,captchaOptions:e?.captchaOptions,wxCloud:e?.wxCloud,adapter:d,onCredentialsError:Dt(T.eventBus),headers:B({"X-SDK-Version":`@cloudbase/js-sdk/${e.sdkVersion}`},e.headers||{}),detectSessionInUrl:e.detectSessionInUrl,debug:_,auth:t.app?.config?.auth}))),D=new Pt(B(B({},T),{region:i,persistence:e.persistence,debug:_,cache:b||new st.CloudbaseCache({persistence:e.persistence,keys:{userInfoKey:`user_info_${m}`},platformInfo:l}),runtime:u||`web`,_fromApp:S,oauthInstance:E,auth:t.app?.config?.auth}));return E.initializeSession(function(e,t){return H(n,void 0,void 0,function(){return U(this,function(n){return e&&(e.type===y?t?T.eventBus.fire(v,{event:f,info:B(B({},e),{error:t})}):e.user&&D.createLoginState({},{userInfo:e.user}):e.type===x&&T.eventBus.fire(v,{event:g,info:B(B({},e),{error:t})})),[2]})})}),{authInstance:D,oauthInstance:E}}(B(B({wxCloud:this.config.wxCloud,storage:this.config.storage},e),{persistence:this.config.persistence,i18n:this.config.i18n,accessKey:this.config.accessKey,useWxCloud:this.config.useWxCloud,sdkVersion:this.version,detectSessionInUrl:this.config.auth?.detectSessionInUrl}),{env:this.config.env,clientId:this.config.clientId,getApiOrigin:function(){return t.request.getBaseEndPoint(t.config.endPointMode||`CLOUD_API`)},platform:this.platform,cache:this.cache,app:this,debug:this.config.debug}),a=i.authInstance,o=i.oauthInstance;return this.oauthInstance=o,this.authInstance=a,this.authInstance},n=t.call(this,e);Object.assign(t,n),Object.setPrototypeOf(t,Object.getPrototypeOf(n));var r=typeof Proxy<`u`?new Proxy(t,{get:function(e,t,n){var r=Reflect.get(e,t,n);if(r!==void 0||typeof t!=`string`)return r;var i=function(e,t){for(var n=null,r=1/0,i=0,a=t;i<a.length;i++){var o=a[i];if(!o.startsWith(`_`)&&o!==`constructor`){var s=It(e,o);s<r&&(r=s,n=o)}}return n}(t,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).concat(Object.keys(e)).filter(function(t){return typeof e[t]==`function`}));return i&&console.warn(`[CloudBase Auth] auth.${t} is not a function. Did you mean: auth.${i}() ?`),r}}):t;return this[Ft]=r,r}};try{cloudbase.registerComponent(Lt)}catch{}var Rt=function(e){try{e.registerComponent(Lt)}catch(e){console.warn(e)}};try{window.registerAuth=Rt}catch{}})(),ho.W;var go={388:e=>{e.exports={}}},_o={};function vo(e){var t=_o[e];if(t!==void 0)return t.exports;var n=_o[e]={exports:{}};return go[e](n,n.exports,vo),n.exports}vo.d=(e,t)=>{for(var n in t)vo.o(t,n)&&!vo.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},vo.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var yo={};(()=>{vo.d(yo,{r:()=>ve});var e=vo(388);function t(){return`@cloudbase/js-sdk`}var n={INVALID_PARAMS:`INVALID_PARAMS`,INVALID_SYNTAX:`INVALID_SYNTAX`,INVALID_OPERATION:`INVALID_OPERATION`,OPERATION_FAIL:`OPERATION_FAIL`,NETWORK_ERROR:`NETWORK_ERROR`,UNKOWN_ERROR:`UNKOWN_ERROR`};let r=(i={AbstractSDKRequest:()=>f,AbstractStorage:()=>p},a={},vo.d(a,i),a);var i,a,o,s=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}o(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function l(e,t){console.warn(`[@cloudbase/js-sdk][${e}]:${t}`)}var u=function(e){function t(t){var n=e.call(this,t.msg||t.message||``)||this;return n.code=t.code||``,n.requestId=t.requestId||``,Object.defineProperty(n,"message",{value:t.msg||t.message||``,enumerable:!0,writable:!0,configurable:!0}),n}return s(t,e),t}(Error),d=function(e){return new u(e)};function m(e,t){return(t||d)(e)}var h,g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},v=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){function t(t){var n=e.call(this)||this,r=t.timeout,i=t.timeoutMsg,a=t.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=i||`请求超时`,n.restrictedMethods=a||[`get`,`post`,`upload`,`download`],n}g(t,e),t.prototype.get=function(e){return this.request(_(_({},e),{method:`get`}),this.restrictedMethods.includes(`get`))},t.prototype.post=function(e){return this.request(_(_({},e),{method:`post`}),this.restrictedMethods.includes(`post`))},t.prototype.put=function(e){return this.request(_(_({},e),{method:`put`}))},t.prototype.upload=function(e){var t=e,n=t.data,r=t.file,i=t.fileContent,a=t.name,o=t.method,s=t.headers,c=s===void 0?{}:s,l=r??i,u={post:`post`,put:`put`}[o?.toLowerCase()]||`put`,d=new FormData;return u===`post`?(Object.keys(n).forEach(function(e){d.append(e,n[e])}),d.append(`key`,a),d.append(`file`,l instanceof Blob?l:new Blob([l])),this.request(_(_({},e),{data:d,method:u}),this.restrictedMethods.includes(`upload`))):this.request(_(_({},e),{method:`put`,headers:c,body:l}),this.restrictedMethods.includes(`upload`))},t.prototype.download=function(e){return v(this,void 0,Promise,function(){var t,n,r,i;return y(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(_(_({},e),{headers:{},responseType:`blob`}))];case 1:return t=a.sent().data,n=window.URL.createObjectURL(new Blob([t])),r=decodeURIComponent(new URL(e.url).pathname.split(`/`).pop()||``),(i=document.createElement(`a`)).href=n,i.setAttribute(`download`,r),i.style.display=`none`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise(function(t){t({statusCode:200,tempFilePath:e.url})})]}})})},t.prototype.fetch=function(e){return v(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m=this;return y(this,function(h){switch(h.label){case 0:return t=new AbortController,n=e.url,r=e.enableAbort,i=r!==void 0&&r,a=e.stream,o=a!==void 0&&a,s=e.signal,c=e.timeout,l=e.shouldThrowOnError,u=l===void 0||l,d=c??this.timeout,s&&(s.aborted&&t.abort(),s.addEventListener(`abort`,function(){return t.abort()})),f=null,i&&d&&(f=setTimeout(function(){console.warn(m.timeoutMsg),t.abort(Error(m.timeoutMsg))},d)),[4,fetch(n,_(_({},e),{signal:t.signal})).then(function(e){return v(m,void 0,void 0,function(){var t,n,r;return y(this,function(i){switch(i.label){case 0:return clearTimeout(f),u?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,e.json()];case 2:t=r.apply(n,[i.sent()]),i.label=3;case 3:return[2,t];case 4:return[2,e]}})})}).catch(function(e){return clearTimeout(f),Promise.reject(e)})];case 1:return p=h.sent(),[2,{data:o?p.body:p.headers.get(`content-type`)?.includes(`application/json`)?p.json():p.text(),statusCode:p.status,header:p.headers,response:p}]}})})},t.prototype.request=function(e,t){var n=this;t===void 0&&(t=!1);var r=String(e.method).toLowerCase()||`get`;return new Promise(function(i){var a=e.url,o=e.headers,s=o===void 0?{}:o,c=e.data,l=e.responseType,u=e.withCredentials,d=e.body,f=e.onUploadProgress,p=function(e,t,n){n===void 0&&(n={});var r=/\?/.test(t),i=``;return Object.keys(n).forEach(function(e){i===``?!r&&(t+=`?`):i+=`&`,i+=`${e}=${encodeURIComponent(n[e])}`}),/^http(s)?:\/\//.test(t+=i)?t:`${e}${t}`}(`https:`,a,r===`get`?c:{}),m=new XMLHttpRequest;m.open(r,p),l&&(m.responseType=l);var h,g,_,v=e.signal;v&&(v.aborted?m.abort():v.addEventListener(`abort`,function(){return m.abort()},{once:!0})),Object.keys(s).forEach(function(e){m.setRequestHeader(e,s[e])}),f&&m.upload.addEventListener(`progress`,f),m.onreadystatechange=function(){var e={};if(m.readyState===4){var t=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};t.forEach(function(e){var t=e.split(`: `),r=t.shift().toLowerCase();n[r]=t.join(`: `)}),e.header=n,e.statusCode=m.status;try{e.data=l===`blob`?m.response:JSON.parse(m.responseText)}catch{e.data=l===`blob`?m.response:m.responseText}clearTimeout(h),i(e)}},t&&n.timeout&&(h=setTimeout(function(){console.warn(n.timeoutMsg),m.abort()},n.timeout)),_=c,g=Object.prototype.toString.call(_)===`[object FormData]`?c:s[`content-type`]===`application/x-www-form-urlencoded`?function(e){e===void 0&&(e={});var t=[];return Object.keys(e).forEach(function(n){t.push(`${n}=${encodeURIComponent(e[n])}`)}),t.join(`&`)}(c):d||(c?JSON.stringify(c):void 0),u&&(m.withCredentials=!0),m.send(g)})}})(r.AbstractSDKRequest),function(e){e.WEB=`web`,e.WX_MP=`wx_mp`}(h||={});var x=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},C=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},w=function(e){function t(t){var n=e.call(this)||this;return n.root=t,t.tcbCacheObject||={},n}return x(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}(r.AbstractStorage);(function(){function e(e){this.keys={};var t=e.persistence,r=e.platformInfo,i=r===void 0?{}:r,a=e.keys,o=a===void 0?{}:a;this.platformInfo=i,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case`local`:default:return t.localStorage?t.localStorage:(l(n.INVALID_PARAMS,`localStorage is not supported on current platform`),new w(t.root));case`none`:return new w(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=o)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||`sync`},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,r){if(this.mode!==`async`){if(this.storage)try{var i={version:r||`localCachev1`,content:t};this.storage.setItem(e,JSON.stringify(i))}catch(e){throw Error(JSON.stringify({code:n.OPERATION_FAIL,msg:`[@cloudbase/js-sdk][${n.OPERATION_FAIL}]setStore failed`,info:e}))}}else l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use setStoreAsync insteed`)},e.prototype.setStoreAsync=function(e,t,n){return S(this,void 0,void 0,function(){var r;return C(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),r={version:n||`localCachev1`,content:t},[4,this.storage.setItem(e,JSON.stringify(r))];case 2:return i.sent(),[3,4];case 3:return i.sent(),[2];case 4:return[2]}})})},e.prototype.getStore=function(e,t){if(this.mode!==`async`){try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return``}catch{return``}t||=`localCachev1`;var r=this.storage.getItem(e);return r&&r.indexOf(t)>=0?JSON.parse(r).content:``}l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use getStoreAsync insteed`)},e.prototype.getStoreAsync=function(e,t){return S(this,void 0,void 0,function(){var n;return C(this,function(r){switch(r.label){case 0:try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,``]}catch{return[2,``]}return t||=`localCachev1`,[4,this.storage.getItem(e)];case 1:return(n=r.sent())&&n.indexOf(t)>=0?[2,JSON.parse(n).content]:[2,``]}})})},e.prototype.removeStore=function(e){this.mode===`async`?l(n.INVALID_OPERATION,`current platform's storage is asynchronous, please use removeStoreAsync insteed`):this.storage.removeItem(e)},e.prototype.removeStoreAsync=function(e){return S(this,void 0,void 0,function(){return C(this,function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}})})}})();var T=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e,t){this.data=t||null,this.name=e},D=function(e){function t(t,n){var r=e.call(this,`error`,{error:t,data:n})||this;return r.error=t,r}return T(t,e),t}(E),ee=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,n){if(n?.[e]){var r=n[e].indexOf(t);r!==-1&&n[e].splice(r,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if(e instanceof D)return console.error(e.error),this;var n=typeof e==`string`?new E(e,t||{}):e,r=n.name;if(this.listens(r)){n.target=this;for(var i=0,a=this.listeners[r]?function(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],this.listeners[r],!0):[];i<a.length;i++)a[i].call(this,n)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();new ee,new ee,typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.indexOf(`Firefox`),(e=>{var t={};return vo.d(t,e),t})({default:()=>b}).default;var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},te.apply(this,arguments)},O=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},k=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},A=n,ne=`cloudrun`;function re(e,t){return O(this,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;return k(this,function(_){switch(_.label){case 0:if(n=e.name,r=e.data,i=e.path,a=i===void 0?``:i,o=e.method,s=e.header,c=s===void 0?{}:s,l=this.getEndPointWithKey(`GATEWAY`),u=l.BASE_URL,d=l.PROTOCOL,f=`${d}${u}/cloudrun/${n}`,p=a.startsWith(`/`)?a:`/${a}`,m=[`GET`,`HEAD`].includes((o?.toUpperCase)?.call(o)))try{h={};try{h=JSON.parse(r)}catch{h=r||{}}p=`${p}${p.includes(`?`)?`&`:`?`}${Object.keys(h).map(function(e){return`${e}=${h[e]}`}).join(`&`)}`}catch{}return[4,this.request.fetch(te(te({method:o||`POST`,headers:Object.assign({},{"Content-Type":`application/json; charset=utf-8`},c)},m?{}:{body:r}),{url:`${f}${p}`,customReqOpts:t}))];case 1:return g=_.sent(),t?.from===`node-sdk`?[2,g]:[4,g.data];case 2:return[2,_.sent()]}})})}var ie={name:ne,entity:{callContainer:new(function(){function e(){}return e.prototype.callContainer=function(e,t){return O(this,void 0,void 0,function(){var n,r,i;return k(this,function(a){switch(a.label){case 0:if(n=e.name,r=e.data,!n)throw Error(JSON.stringify({code:A.INVALID_PARAMS,msg:`[${ne}.callContainer] invalid name`}));try{i=r?JSON.stringify(r):``}catch{throw Error(JSON.stringify({code:A.INVALID_PARAMS,msg:`[${ne}.callContainer] invalid data`}))}return[4,re.call(this,te(te({},e),{data:i}),t)];case 1:return[2,a.sent()]}})})},e}())().callContainer}};try{cloudbase.registerComponent(ie)}catch{}try{window.registerCloudrun=function(e){try{e.registerComponent(ie)}catch(e){console.warn(e)}}}catch{}var ae=function(){return ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ae.apply(this,arguments)},oe=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},se=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},ce=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},le=t,ue=n,de=function(e,t,n){if(n===void 0&&(n=null),e&&typeof e==`function`)return e(t,n);if(t)throw t;return n},fe=function(e,t){if(function(e){return!e||typeof e.throw!=`boolean`||e.throw}(e))throw m(c(c({},t),{msg:t.message}),e?.errorFactory);return c({code:t.code,message:t.message},t.requestId?{requestId:t.requestId}:{})},pe=`functions`;function me(e){return e.length<=1024?e:`${e.slice(0,1024)}…`}function he(e,t){return{code:e?.code||ue.NETWORK_ERROR,message:e?.message||e?.msg||``,requestId:t}}function ge(e,t){if(e&&typeof e==`object`&&!Array.isArray(e))return he(e,t);if(typeof e==`string`){try{var n=JSON.parse(e);if(n&&typeof n==`object`&&!Array.isArray(n))return he(n,t)}catch{}return{code:ue.NETWORK_ERROR,message:me(e),requestId:t}}return{code:ue.NETWORK_ERROR,message:me(e==null?``:String(e)),requestId:t}}var _e={name:pe,entity:{callFunction:new(function(){function t(){}var n,r,i,a;return t.invokeCloudrun=function(e,t,n){return se(this,void 0,void 0,function(){var r,i,a,o,s,c,l;return ce(this,function(u){switch(u.label){case 0:return r=t.name,i=t.path,a=i===void 0?``:i,o=t.method,s=t.header,c=s===void 0?{}:s,d=new Date().getTime(),f=(Date==null?void 0:Date.now)&&1e3*Date.now()||0,l=`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=16*Math.random();return d>0?(t=(d+t)%16|0,d=Math.floor(d/16)):(t=(f+t)%16|0,f=Math.floor(f/16)),(e===`x`?t:7&t|8).toString(16)}),[4,re.call(e,{name:r,data:n,path:a,method:o,header:ae(ae({},c),{"X-Request-Id":l})})];case 1:return[2,{result:u.sent(),requestId:l}]}var d,f})})},t.invokeGateway=function(e,t,n,r){return se(this,void 0,void 0,function(){var i,a,o,s,c;return ce(this,function(l){switch(l.label){case 0:i=e.request,a=e.config,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,i.gateWay(ae(ae({},t),{path:`functions`,shouldThrowOnError:!1}),r)];case 2:return o=l.sent(),[3,4];case 3:return s=l.sent(),function(e){if(!e)return!1;if(e instanceof SyntaxError||e.name===`SyntaxError`)return!0;var t=String(e.message||``);return/not valid JSON|Unexpected token|JSON\.parse|Failed to execute 'json'/i.test(t)}(c=s)?[2,fe(a,ge(c.message,c.requestId))]:[2,de(n,c)];case 4:return Number(o?.statusCode)>=400?[2,fe(a,ge(o?.data,o?.requestId))]:[2,de(n,null,{requestId:o?.requestId,result:o?.data})]}})})},t.invokeCloudApi=function(e,t,n,r,i){return se(this,void 0,void 0,function(){var a,o,s,c,l,u,d;return ce(this,function(f){switch(f.label){case 0:return a=t.name,o=t.data,s=t.query,c=t.parse,l=t.search,[4,e.request.send(`functions.invokeFunction`,{inQuery:s,parse:c,search:l,function_name:a,request_data:n},{endPointMode:`CLOUD_API`,defaultQuery:o?.params?.action?{action:o?.params?.action}:{}},i)];case 1:if(u=f.sent(),(d=u.data?.response_data)===void 0)return[2,de(r,null,u)];if(c)return[2,de(r,null,{result:d,requestId:u.requestId})];try{return d=JSON.parse(d),[2,de(r,null,{result:d,requestId:u.requestId})]}catch{return[2,de(r,Error(`[${le()}][${ue.INVALID_PARAMS}][${pe}.callFunction] response data must be json`))]}}})})},t.prototype.callFunction=function(e,n,r){return se(this,void 0,void 0,function(){var i,a,o,s,c,l;return ce(this,function(u){switch(u.label){case 0:if(i=e.name,a=e.data,o=e.type,s=this.config,!i)return[2,fe(s,{code:ue.INVALID_PARAMS,message:`[${pe}.callFunction] invalid function name`})];try{c=a?JSON.stringify(a):``}catch{return[2,fe(s,{code:ue.INVALID_PARAMS,message:`[${pe}.callFunction] invalid data`})]}if(o===`cloudrun`)return[2,t.invokeCloudrun(this,e,c)];u.label=1;case 1:return u.trys.push([1,5,,6]),function(e,t){return e.endPointMode===`GATEWAY`&&!function(e){return e===`lcap-common-service`||e===`lcap-datasource-test`||e.startsWith(`lcap-data`)||e.startsWith(`lowcode-datasource`)||e===`cloudbase_module`}(t)&&!function(e){return e===`lowcode-wx-datasource`}(t)}(s,i)?[4,t.invokeGateway(this,e,n,r)]:[3,3];case 2:return[2,u.sent()];case 3:return[4,t.invokeCloudApi(this,e,c,n,r)];case 4:return[2,u.sent()];case 5:return l=u.sent(),de(n,l),[3,6];case 6:return[2]}})})},function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([(a={customInfo:{className:`Cloudbase`,methodName:`callFunction`},title:`函数调用失败`,messages:[`请确认以下各项:`,` 1 - 调用 callFunction() 的语法或参数是否正确`,` 2 - 当前环境下是否存在此函数`,` 3 - 函数安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:https://support.qq.com/products/148793`]},a.mode,a.customInfo,a.title,a.messages,function(e,t,n){}),oe(`design:type`,Function),oe(`design:paramtypes`,[typeof(n=e.ICallFunctionOptions!==void 0&&e.ICallFunctionOptions)==`function`?n:Object,typeof(r=typeof Function<`u`&&Function)==`function`?r:Object,typeof(i=e.ICustomReqOpts!==void 0&&e.ICustomReqOpts)==`function`?i:Object]),oe(`design:returntype`,Promise)],t.prototype,`callFunction`,null),t}())().callFunction}};try{cloudbase.registerComponent(_e)}catch{}var ve=function(e){try{e.registerComponent(_e)}catch(e){console.warn(e)}};try{window.registerFunctions=ve}catch{}})(),yo.r;var bo={388:e=>{e.exports={}}},xo={};function So(e){var t=xo[e];if(t!==void 0)return t.exports;var n=xo[e]={exports:{}};return bo[e](n,n.exports,So),n.exports}So.d=(e,t)=>{for(var n in t)So.o(t,n)&&!So.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},So.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Co={};(()=>{So.d(Co,{v:()=>ct});var e,t=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}),n=function(e){function n(t){var n=e.call(this,t)||this;return n.__isStorageError=!0,n.name=`StorageError`,n}return t(n,e),n}(Error);function r(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var i,a=function(e){function n(t,n,r){var i=e.call(this,t)||this;return i.name=`StorageApiError`,i.status=n,i.statusCode=r,i}return t(n,e),n.prototype.toJSON=function(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}},n}(n);function o(){return globalThis.Buffer}function s(e){var t=o();return t?t.from(e).toString(`base64`):btoa(e)}function c(e){return e.split(`/`).map(function(e){return encodeURIComponent(e)}).join(`/`)}t(function(e,t){var n=i.call(this,e)||this;return n.name=`StorageUnknownError`,n.originalError=t,n},i=n);var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)},u=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},d=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},m=`/v1/storages`;function h(e,t){return u(this,void 0,Promise,function(){var i;return d(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e()];case 1:return[2,{data:a.sent(),error:null}];case 2:if(i=a.sent(),t)throw i;return r(i)?[2,{data:null,error:i}]:[2,{data:null,error:new n(i?.message||String(i))}];case 3:return[2]}})})}var g=function(){function e(e){this.ctx=e}return Object.defineProperty(e.prototype,"request",{get:function(){return this.ctx.request},enumerable:!1,configurable:!0}),e.prototype.gatewayOrigin=function(){return this.request.getBaseEndPoint(`GATEWAY`)},e.prototype.buildUrl=function(e,t){var n=`${this.gatewayOrigin()}${m}${e}`,r=function(e){if(!e)return``;var t=[];return Object.keys(e).forEach(function(n){var r=e[n];r!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`)}),t.join(`&`)}(t);return r&&(n+=(n.includes(`?`)?`&`:`?`)+r),n},e.prototype.toFullUrl=function(e){return e&&(/^https?:\/\//.test(e)||e.startsWith(`//`)?e:`${this.gatewayOrigin()}${m}${e.startsWith(`/`)?``:`/`}${e}`)},e.prototype.send=function(e){return u(this,void 0,Promise,function(){var t,n,r,i,a,o;return d(this,function(s){switch(s.label){case 0:return t=this.buildUrl(e.path,e.query),n=e.method.toUpperCase(),r=[`GET`,`HEAD`].includes(n),i=l({},e.headers||{}),r||(e.rawBody===void 0?e.json!==void 0&&(i[`Content-Type`]=i[`Content-Type`]||`application/json`,a=JSON.stringify(e.json)):a=e.rawBody),[4,this.request.fetch(l(l(l(l({url:t,method:n,headers:i},a===void 0?{}:{body:a}),{withCredentials:!1!==e.withCredentials,shouldThrowOnError:!1}),e.signal?{signal:e.signal}:{}),e.cache?{cache:e.cache}:{}))];case 1:return o=s.sent(),[2,this.unwrap(o,t)]}})})},e.prototype.download=function(e){return u(this,void 0,Promise,function(){var t,n,r,i;return d(this,function(o){switch(o.label){case 0:return t=this.buildUrl(e.path,e.query),[4,this.request.fetch(l(l({url:t,method:`GET`,headers:l({},e.headers||{}),stream:!0,withCredentials:!1!==e.withCredentials,shouldThrowOnError:!1},e.signal?{signal:e.signal}:{}),e.cache?{cache:e.cache}:{}))];case 1:if(n=o.sent(),e.signal?.aborted)throw new a(`The download was aborted`,0,`STORAGE_PG_ABORTED`);if((r=Number(n?.statusCode??200))===304)throw new a(`Not Modified`,r,`STORAGE_PG_NOT_MODIFIED`);if(r>=400)throw new a(`Download failed with status ${r}`,r,`STORAGE_PG_REQUEST_FAIL`);if(!(i=n?.response))throw new a(`Underlying adapter did not expose the raw Response`,r,`STORAGE_PG_NO_RESPONSE`);return[2,{response:i,status:r,header:n?.header}]}})})},e.prototype.unwrap=function(e,t){return u(this,void 0,Promise,function(){var n,r,i,o;return d(this,function(s){switch(s.label){case 0:n=Number(e?.statusCode??e?.status??200),r=e?.data,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r];case 2:return r=s.sent(),[3,4];case 3:return s.sent(),r=void 0,[3,4];case 4:if(n>=200&&n<300)return[2,r];throw i=r?.code||r?.error||`STORAGE_PG_REQUEST_FAIL`,o=r?.message||`Storage request failed with status ${n}: ${t}`,new a(o,n,i)}})})},e}(),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},v=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},y=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};function x(e){return r(e)?e:new n(e?.message||String(e))}function S(e){var t={};return e?.download!==void 0&&(t.download=!0===e.download?``:e.download),e?.cacheNonce!==void 0&&(t.cacheNonce=String(e.cacheNonce)),{headers:{},query:t}}var C=function(){function e(e){this.ctx=e}return e.prototype.then=function(e,t){return this.execute().then(e,t)},e.prototype.execute=function(){return v(this,void 0,Promise,function(){var e,t,n,r,i;return y(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=S(this.ctx.options),t=e.headers,n=e.query,[4,this.ctx.http.download({path:`/object/${this.ctx.bucketId}/${c(this.ctx.cleanName)}`,headers:_(_({},this.ctx.headers),t),query:n,signal:this.ctx.parameters?.signal,cache:this.ctx.parameters?.cache})];case 1:if(!(r=o.sent().response).body)throw new a(`Response body is empty`,r.status,`STORAGE_PG_EMPTY_BODY`);return[2,{data:r.body,error:null}];case 2:if(i=o.sent(),this.ctx.shouldThrowOnError)throw i;return[2,{data:null,error:x(i)}];case 3:return[2]}})})},e}(),w=function(){function e(e){this.ctx=e}return e.prototype.asStream=function(){return new C(this.ctx)},e.prototype.then=function(e,t){return this.execute().then(e,t)},e.prototype.execute=function(){return v(this,void 0,Promise,function(){var e,t,n,r,i,a;return y(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),e=S(this.ctx.options),t=e.headers,n=e.query,[4,this.ctx.http.download({path:`/object/${this.ctx.bucketId}/${c(this.ctx.cleanName)}`,headers:_(_({},this.ctx.headers),t),query:n,signal:this.ctx.parameters?.signal,cache:this.ctx.parameters?.cache})];case 1:return r=o.sent().response,a={},[4,r.blob()];case 2:return[2,(a.data=o.sent(),a.error=null,a)];case 3:if(i=o.sent(),this.ctx.shouldThrowOnError)throw i;return[2,{data:null,error:x(i)}];case 4:return[2]}})})},e}(),T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)},E=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},D=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ee=`3600`,te=function(){function e(e,t,n){n===void 0&&(n=!1),this.headers={},this.http=e,this.bucketId=t,this.shouldThrowOnError=n}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.setHeader=function(e,t){var r;if(typeof e!=`string`||e.trim()===``)throw new n(`setHeader requires a non-empty header name`);if(/[\r\n]/.test(e)||typeof t==`string`&&/[\r\n]/.test(t))throw new n(`setHeader does not allow CR/LF characters in header name or value`);return this.headers=T(T({},this.headers),((r={})[e]=String(t),r)),this},e.prototype.upload=function(e,t,n){return E(this,void 0,Promise,function(){return D(this,function(r){return[2,this.uploadOrUpdate(`POST`,e,t,n)]})})},e.prototype.update=function(e,t,n){return E(this,void 0,Promise,function(){return D(this,function(r){return[2,this.uploadOrUpdate(`PUT`,e,t,n)]})})},e.prototype.download=function(e,t,n){return new w({http:this.http,bucketId:this.bucketId,cleanName:this.cleanPath(e),options:t,parameters:n,headers:this.headers,shouldThrowOnError:this.shouldThrowOnError})},e.prototype.list=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r;return D(this,function(i){return r={prefix:e||``},t?.limit!==void 0&&(r.limit=t.limit),t?.cursor!==void 0&&(r.cursor=t.cursor),t?.withDelimiter!==void 0&&(r.with_delimiter=t.withDelimiter),t?.sortBy!==void 0&&(r.sortBy=t.sortBy),[2,this.send({method:`POST`,path:`/object/list/${this.bucketId}`,json:r,signal:n?.signal,cache:n?.cache})]})})},this.shouldThrowOnError)]})})},e.prototype.remove=function(e){return E(this,void 0,Promise,function(){var t=this;return D(this,function(n){return[2,h(function(){return E(t,void 0,void 0,function(){var t,n,r,i,a,o=this;return D(this,function(s){switch(s.label){case 0:t=e.map(function(e){return o.cleanPath(e)}),n=[],r=0,s.label=1;case 1:return r<t.length?(i=t.slice(r,r+100),[4,this.send({method:`DELETE`,path:`/object/${this.bucketId}`,json:{prefixes:i}})]):[3,4];case 2:a=s.sent(),Array.isArray(a)&&n.push.apply(n,a),s.label=3;case 3:return r+=100,[3,1];case 4:return[2,n]}})})},this.shouldThrowOnError)]})})},e.prototype.copy=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r;return D(this,function(i){switch(i.label){case 0:return r=this.buildCopyMoveHeaders(n),[4,this.send({method:`POST`,path:`/object/copy`,json:{bucketId:this.bucketId,sourceKey:this.cleanPath(e),destinationKey:this.cleanPath(t),destinationBucket:n?.destinationBucket,copyMetadata:n?.copyMetadata,metadata:n?.metadata},headers:r})];case 1:return[2,{path:i.sent().Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.move=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){return D(this,function(r){switch(r.label){case 0:return[4,this.send({method:`POST`,path:`/object/move`,json:{bucketId:this.bucketId,sourceKey:this.cleanPath(e),destinationKey:this.cleanPath(t),destinationBucket:n?.destinationBucket}})];case 1:return[2,{message:r.sent().message||`Successfully moved`}]}})})},this.shouldThrowOnError)]})})},e.prototype.info=function(e){return E(this,void 0,Promise,function(){var t=this;return D(this,function(n){return[2,h(function(){return E(t,void 0,void 0,function(){var t,n;return D(this,function(r){switch(r.label){case 0:return t=this.cleanPath(e),[4,this.send({method:`GET`,path:`/object/info/${this.bucketId}/${this.encodePath(t)}`})];case 1:return[2,{id:(n=r.sent()).id,name:n.name,version:n.version,bucketId:n.bucket_id,size:n.size,contentType:n.content_type,cacheControl:n.cache_control,etag:n.etag,metadata:n.metadata,lastModified:n.last_modified,createdAt:n.created_at}]}})})},this.shouldThrowOnError)]})})},e.prototype.exists=function(e){return E(this,void 0,Promise,function(){var t,r,i;return D(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=this.cleanPath(e),[4,this.send({method:`GET`,path:`/object/info/${this.bucketId}/${this.encodePath(t)}`})];case 1:return a.sent(),[2,{data:!0,error:null}];case 2:if(r=a.sent(),(i=r?.status)!==void 0&&[400,404].includes(Number(i)))return[2,{data:!1,error:null}];if(this.shouldThrowOnError)throw r;return[2,{data:null,error:r instanceof n?r:new n(r?.message||String(r))}];case 3:return[2]}})})},e.prototype.createSignedUrl=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r,i,a;return D(this,function(o){switch(o.label){case 0:return r=this.cleanPath(e),[4,this.send({method:`POST`,path:`/object/sign/${this.bucketId}/${this.encodePath(r)}`,json:{expiresIn:t}})];case 1:return i=o.sent(),a=i.fullSignedURL||this.http.toFullUrl(i.signedURL||``),[2,{fullSignedURL:this.appendUrlOptions(a,n)}]}})})},this.shouldThrowOnError)]})})},e.prototype.createSignedUrls=function(e,t,n){return E(this,void 0,Promise,function(){var r=this;return D(this,function(i){return[2,h(function(){return E(r,void 0,void 0,function(){var r,i,a,o,s=this;return D(this,function(c){switch(c.label){case 0:r=e.map(function(e){return s.cleanPath(e)}),i=[],a=0,c.label=1;case 1:return a<r.length?(o=r.slice(a,a+500),[4,this.send({method:`POST`,path:`/object/sign/${this.bucketId}`,json:{expiresIn:t,paths:o}})]):[3,4];case 2:c.sent().forEach(function(e){var t=e.fullSignedURL||(e.signedURL?s.http.toFullUrl(e.signedURL):null);i.push({path:e.path,fullSignedURL:t?s.appendUrlOptions(t,n):null,error:e.error??null})}),c.label=3;case 3:return a+=500,[3,1];case 4:return[2,i]}})})},this.shouldThrowOnError)]})})},e.prototype.createSignedUploadUrl=function(e,t){return E(this,void 0,Promise,function(){var n=this;return D(this,function(r){return[2,h(function(){return E(n,void 0,void 0,function(){var n,r,i;return D(this,function(a){switch(a.label){case 0:return n=this.cleanPath(e),r={},t!=null&&t.upsert&&(r[`x-upsert`]=`true`),[4,this.send({method:`POST`,path:`/object/upload/sign/${this.bucketId}/${this.encodePath(n)}`,headers:r})];case 1:return[2,{fullSignedURL:(i=a.sent()).fullURL||this.http.toFullUrl(i.url||``),path:n,token:i.token}]}})})},this.shouldThrowOnError)]})})},e.prototype.uploadToSignedUrl=function(e,t,n,r){return E(this,void 0,Promise,function(){var i=this;return D(this,function(a){return[2,h(function(){return E(i,void 0,void 0,function(){var i,a,o,s,c;return D(this,function(l){switch(l.label){case 0:return i=this.cleanPath(e),a=this.buildUploadBody(n,r),o=a.body,s=a.headers,[4,this.send({method:`PUT`,path:`/object/upload/sign/${this.bucketId}/${this.encodePath(i)}`,query:{token:t},rawBody:o,headers:s,withCredentials:!1})];case 1:return c=l.sent(),[2,{path:i,fullPath:c.Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.getPublicUrl=function(e,t){var n=this.cleanPath(e),r=this.http.buildUrl(`/object/public/${this.bucketId}/${this.encodePath(n)}`);return{data:{publicUrl:this.appendUrlOptions(r,t)}}},e.prototype.send=function(e){return this.http.send(T(T({},e),{headers:T(T({},this.headers),e.headers||{})}))},e.prototype.uploadOrUpdate=function(e,t,n,r){return E(this,void 0,Promise,function(){var i=this;return D(this,function(a){return[2,h(function(){return E(i,void 0,void 0,function(){var i,a,o,s,c;return D(this,function(l){switch(l.label){case 0:return i=this.cleanPath(t),a=this.buildUploadBody(n,r),o=a.body,s=a.headers,e===`POST`&&(s[`x-upsert`]=String(!!r?.upsert)),[4,this.send({method:e,path:`/object/${this.bucketId}/${this.encodePath(i)}`,rawBody:o,headers:s})];case 1:return[2,{id:(c=l.sent()).Id,path:i,fullPath:c.Key}]}})})},this.shouldThrowOnError)]})})},e.prototype.cleanPath=function(e){var t=e.replace(/^\/+|\/+$/g,``).replace(/\/+/g,`/`);if(t.split(`/`).some(function(e){return e===`..`}))throw new n(`invalid path: ".." segment is not allowed`);return t},e.prototype.encodePath=function(e){return c(e)},e.prototype.buildUploadBody=function(e,t){var n=T({},t?.headers||{}),r=e,i=typeof FormData<`u`&&e instanceof FormData;if(typeof Blob<`u`&&e instanceof Blob||i){var a=void 0,o={};if(i){var s=this.extractFromFormData(e);a=s.file,o=s.fields}else a=e;var c=t?.cacheControl??o.cacheControl??ee,l=t?.contentType??o.contentType,u=t?.metadata===void 0?o.metadata:JSON.stringify(t.metadata),d=new FormData;c!==void 0&&d.append(`cacheControl`,String(c)),l!==void 0&&d.append(`contentType`,l),u!==void 0&&d.append(`metadata`,u),d.append(``,a),r=d}else r=e,c=t?.cacheControl??ee,l=t?.contentType??`text/plain;charset=UTF-8`,n[`cache-control`]=`max-age=${c}`,l&&(n[`content-type`]=l),t!=null&&t.metadata&&(n[`x-metadata`]=this.toBase64(JSON.stringify(t.metadata)));return{body:r,headers:n}},e.prototype.extractFromFormData=function(e){var t,r={},i=0,a=[];if(e.forEach(function(e,n){if(typeof Blob<`u`&&e instanceof Blob)return t=e,void(i+=1);n!==`cacheControl`&&n!==`contentType`&&n!==`metadata`?a.push(n):r[n]=String(e)}),a.length>0&&console.warn(`Ignored unsupported FormData field(s): [${a.join(`, `)}]. Only file, cacheControl, contentType and metadata are supported`),i===0||!t)throw new n(`FormData must contain a file`);if(i>1)throw new n(`FormData must contain exactly one file`);return{file:t,fields:r}},e.prototype.buildCopyMoveHeaders=function(e){var t={};return e!=null&&e.upsert&&(t[`x-upsert`]=`true`),!1===e?.copyMetadata&&e!=null&&e.metadata&&(t[`x-metadata`]=this.toBase64(JSON.stringify(e.metadata))),t},e.prototype.appendUrlOptions=function(e,t){var n=[];if(t?.download!==void 0){var r=!0===t.download?``:String(t.download);n.push(`download=${encodeURIComponent(r)}`)}return t?.cacheNonce!==void 0&&n.push(`cacheNonce=${encodeURIComponent(String(t.cacheNonce))}`),n.length===0?e:`${e}${e.includes(`?`)?`&`:`?`}${n.join(`&`)}`},e.prototype.toBase64=function(e){return s(e)},e}(),O=/[\x00-\x20\x7f/\\?#%]/;function k(e,t){if(typeof e!=`string`||e.length===0)throw new n(`[storage.${t}] bucketId is required`);if(e.length>256)throw new n(`[storage.${t}] invalid bucketId: length must be 1-256`);var r=O.exec(e);if(r)throw new n(`[storage.${t}] invalid bucketId "${e}": contains forbidden character ${JSON.stringify(r[0])}; must not contain whitespace, control chars, "/", "\\", "?", "#" or "%"`)}var A=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},ne=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},re=function(){function e(e,t){t===void 0&&(t=!1),this.http=new g(e),this.shouldThrowOnError=t}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.listBuckets=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){var n={};return e?.limit!==void 0&&(n.limit=e.limit),e?.offset!==void 0&&(n.offset=e.offset),e!=null&&e.sortColumn&&(n.sortColumn=e.sortColumn),e!=null&&e.sortOrder&&(n.sortOrder=e.sortOrder),e!=null&&e.search&&(n.search=e.search),t.http.send({method:`GET`,path:`/bucket/`,query:n})},this.shouldThrowOnError)]})})},e.prototype.getBucket=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){return k(e,`getBucket`),t.http.send({method:`GET`,path:`/bucket/${e}`})},this.shouldThrowOnError)]})})},e.prototype.createBucket=function(e,t){return A(this,void 0,Promise,function(){var n=this;return ne(this,function(r){return[2,h(function(){var r;return k(e,`createBucket`),n.http.send({method:`POST`,path:`/bucket/`,json:{id:e,name:e,public:(r=t?.public)!=null&&r,type:t?.type,file_size_limit:t?.fileSizeLimit,allowed_mime_types:t?.allowedMimeTypes}})},this.shouldThrowOnError)]})})},e.prototype.updateBucket=function(e,t){return A(this,void 0,Promise,function(){var n=this;return ne(this,function(r){return[2,h(function(){return k(e,`updateBucket`),n.http.send({method:`PUT`,path:`/bucket/${e}`,json:{public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes}})},this.shouldThrowOnError)]})})},e.prototype.deleteBucket=function(e){return A(this,void 0,Promise,function(){var t=this;return ne(this,function(n){return[2,h(function(){return k(e,`deleteBucket`),t.http.send({method:`DELETE`,path:`/bucket/${e}`})},this.shouldThrowOnError)]})})},e}();function ie(){return`@cloudbase/js-sdk`}var ae={INVALID_PARAMS:`INVALID_PARAMS`,INVALID_SYNTAX:`INVALID_SYNTAX`,INVALID_OPERATION:`INVALID_OPERATION`,OPERATION_FAIL:`OPERATION_FAIL`,NETWORK_ERROR:`NETWORK_ERROR`,UNKOWN_ERROR:`UNKOWN_ERROR`};let oe=(se={AbstractSDKRequest:()=>f,AbstractStorage:()=>p},ce={},So.d(ce,se),ce);var se,ce,le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ue.apply(this,arguments)};function de(e){return typeof e==`string`}function fe(e,t){console.warn(`[@cloudbase/js-sdk][${e}]:${t}`)}var pe=function(e){function t(t){var n=e.call(this,t.msg||t.message||``)||this;return n.code=t.code||``,n.requestId=t.requestId||``,Object.defineProperty(n,"message",{value:t.msg||t.message||``,enumerable:!0,writable:!0,configurable:!0}),n}return le(t,e),t}(Error),me=function(e){return new pe(e)};function he(e,t){return(t||me)(e)}function ge(e){if(e&&typeof e==`object`&&e.data&&typeof e.data==`object`){var t=e.data,n=t.code,r=t.message;if(!e.code&&n||!e.message&&r)return ue(ue(ue({},e),!e.code&&n?{code:n}:{}),!e.message&&r?{message:r}:{})}return e}var _e,ve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(){return j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},j.apply(this,arguments)},ye=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},be=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){function t(t){var n=e.call(this)||this,r=t.timeout,i=t.timeoutMsg,a=t.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=i||`请求超时`,n.restrictedMethods=a||[`get`,`post`,`upload`,`download`],n}ve(t,e),t.prototype.get=function(e){return this.request(j(j({},e),{method:`get`}),this.restrictedMethods.includes(`get`))},t.prototype.post=function(e){return this.request(j(j({},e),{method:`post`}),this.restrictedMethods.includes(`post`))},t.prototype.put=function(e){return this.request(j(j({},e),{method:`put`}))},t.prototype.upload=function(e){var t=e,n=t.data,r=t.file,i=t.fileContent,a=t.name,o=t.method,s=t.headers,c=s===void 0?{}:s,l=r??i,u={post:`post`,put:`put`}[o?.toLowerCase()]||`put`,d=new FormData;return u===`post`?(Object.keys(n).forEach(function(e){d.append(e,n[e])}),d.append(`key`,a),d.append(`file`,l instanceof Blob?l:new Blob([l])),this.request(j(j({},e),{data:d,method:u}),this.restrictedMethods.includes(`upload`))):this.request(j(j({},e),{method:`put`,headers:c,body:l}),this.restrictedMethods.includes(`upload`))},t.prototype.download=function(e){return ye(this,void 0,Promise,function(){var t,n,r,i;return be(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(j(j({},e),{headers:{},responseType:`blob`}))];case 1:return t=a.sent().data,n=window.URL.createObjectURL(new Blob([t])),r=decodeURIComponent(new URL(e.url).pathname.split(`/`).pop()||``),(i=document.createElement(`a`)).href=n,i.setAttribute(`download`,r),i.style.display=`none`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise(function(t){t({statusCode:200,tempFilePath:e.url})})]}})})},t.prototype.fetch=function(e){return ye(this,void 0,Promise,function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m=this;return be(this,function(h){switch(h.label){case 0:return t=new AbortController,n=e.url,r=e.enableAbort,i=r!==void 0&&r,a=e.stream,o=a!==void 0&&a,s=e.signal,c=e.timeout,l=e.shouldThrowOnError,u=l===void 0||l,d=c??this.timeout,s&&(s.aborted&&t.abort(),s.addEventListener(`abort`,function(){return t.abort()})),f=null,i&&d&&(f=setTimeout(function(){console.warn(m.timeoutMsg),t.abort(Error(m.timeoutMsg))},d)),[4,fetch(n,j(j({},e),{signal:t.signal})).then(function(e){return ye(m,void 0,void 0,function(){var t,n,r;return be(this,function(i){switch(i.label){case 0:return clearTimeout(f),u?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,e.json()];case 2:t=r.apply(n,[i.sent()]),i.label=3;case 3:return[2,t];case 4:return[2,e]}})})}).catch(function(e){return clearTimeout(f),Promise.reject(e)})];case 1:return p=h.sent(),[2,{data:o?p.body:p.headers.get(`content-type`)?.includes(`application/json`)?p.json():p.text(),statusCode:p.status,header:p.headers,response:p}]}})})},t.prototype.request=function(e,t){var n=this;t===void 0&&(t=!1);var r=String(e.method).toLowerCase()||`get`;return new Promise(function(i){var a=e.url,o=e.headers,s=o===void 0?{}:o,c=e.data,l=e.responseType,u=e.withCredentials,d=e.body,f=e.onUploadProgress,p=function(e,t,n){n===void 0&&(n={});var r=/\?/.test(t),i=``;return Object.keys(n).forEach(function(e){i===``?!r&&(t+=`?`):i+=`&`,i+=`${e}=${encodeURIComponent(n[e])}`}),/^http(s)?:\/\//.test(t+=i)?t:`${e}${t}`}(`https:`,a,r===`get`?c:{}),m=new XMLHttpRequest;m.open(r,p),l&&(m.responseType=l);var h,g,_,v=e.signal;v&&(v.aborted?m.abort():v.addEventListener(`abort`,function(){return m.abort()},{once:!0})),Object.keys(s).forEach(function(e){m.setRequestHeader(e,s[e])}),f&&m.upload.addEventListener(`progress`,f),m.onreadystatechange=function(){var e={};if(m.readyState===4){var t=m.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};t.forEach(function(e){var t=e.split(`: `),r=t.shift().toLowerCase();n[r]=t.join(`: `)}),e.header=n,e.statusCode=m.status;try{e.data=l===`blob`?m.response:JSON.parse(m.responseText)}catch{e.data=l===`blob`?m.response:m.responseText}clearTimeout(h),i(e)}},t&&n.timeout&&(h=setTimeout(function(){console.warn(n.timeoutMsg),m.abort()},n.timeout)),_=c,g=Object.prototype.toString.call(_)===`[object FormData]`?c:s[`content-type`]===`application/x-www-form-urlencoded`?function(e){e===void 0&&(e={});var t=[];return Object.keys(e).forEach(function(n){t.push(`${n}=${encodeURIComponent(e[n])}`)}),t.join(`&`)}(c):d||(c?JSON.stringify(c):void 0),u&&(m.withCredentials=!0),m.send(g)})}})(oe.AbstractSDKRequest),function(e){e.WEB=`web`,e.WX_MP=`wx_mp`}(_e||={});var xe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},Ce=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},we=function(e){function t(t){var n=e.call(this)||this;return n.root=t,t.tcbCacheObject||={},n}return xe(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}(oe.AbstractStorage);(function(){function e(e){this.keys={};var t=e.persistence,n=e.platformInfo,r=n===void 0?{}:n,i=e.keys,a=i===void 0?{}:i;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case`local`:default:return t.localStorage?t.localStorage:(fe(ae.INVALID_PARAMS,`localStorage is not supported on current platform`),new we(t.root));case`none`:return new we(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=a)}Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||`sync`},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,n){if(this.mode!==`async`){if(this.storage)try{var r={version:n||`localCachev1`,content:t};this.storage.setItem(e,JSON.stringify(r))}catch(e){throw Error(JSON.stringify({code:ae.OPERATION_FAIL,msg:`[@cloudbase/js-sdk][${ae.OPERATION_FAIL}]setStore failed`,info:e}))}}else fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use setStoreAsync insteed`)},e.prototype.setStoreAsync=function(e,t,n){return Se(this,void 0,void 0,function(){var r;return Ce(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),r={version:n||`localCachev1`,content:t},[4,this.storage.setItem(e,JSON.stringify(r))];case 2:return i.sent(),[3,4];case 3:return i.sent(),[2];case 4:return[2]}})})},e.prototype.getStore=function(e,t){if(this.mode!==`async`){try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return``}catch{return``}t||=`localCachev1`;var n=this.storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:``}fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use getStoreAsync insteed`)},e.prototype.getStoreAsync=function(e,t){return Se(this,void 0,void 0,function(){var n;return Ce(this,function(r){switch(r.label){case 0:try{if(typeof process<`u`&&{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token)return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,``]}catch{return[2,``]}return t||=`localCachev1`,[4,this.storage.getItem(e)];case 1:return(n=r.sent())&&n.indexOf(t)>=0?[2,JSON.parse(n).content]:[2,``]}})})},e.prototype.removeStore=function(e){this.mode===`async`?fe(ae.INVALID_OPERATION,`current platform's storage is asynchronous, please use removeStoreAsync insteed`):this.storage.removeItem(e)},e.prototype.removeStoreAsync=function(e){return Se(this,void 0,void 0,function(){return Ce(this,function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}})})}})();var Te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(e,t){this.data=t||null,this.name=e},Ee=function(e){function t(t,n){var r=e.call(this,`error`,{error:t,data:n})||this;return r.error=t,r}return Te(t,e),t}(M),N=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,n){if(n?.[e]){var r=n[e].indexOf(t);r!==-1&&n[e].splice(r,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if(e instanceof Ee)return console.error(e.error),this;var n=de(e)?new M(e,t||{}):e,r=n.name;if(this.listens(r)){n.target=this;for(var i=0,a=this.listeners[r]?function(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],this.listeners[r],!0):[];i<a.length;i++)a[i].call(this,n)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();new N,new N,typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.indexOf(`Firefox`),(e=>{var t={};return So.d(t,e),t})({default:()=>b}).default;var P,De=So(388),Oe=function(){return Oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Oe.apply(this,arguments)},ke=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ae=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},je=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},Me=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(e){e.put=`put`,e.post=`post`})(P||={});var Ne=ie,Pe=ae,Fe=`https://support.qq.com/products/148793`,Ie=function(e){return Object.prototype.toString.call(e)===`[object Array]`},Le=de,Re=function(e){return Object.prototype.toString.call(e)===`[object Object]`},ze=function(e,t,n){if(n===void 0&&(n=null),e&&typeof e==`function`)return e(t,n);if(t)throw t;return n},Be=function(e,t){if(function(e){return!e||typeof e.throw!=`boolean`||e.throw}(e))throw he(ue(ue({},t),{msg:t.message}),e?.errorFactory);return ue({code:t.code,message:t.message},t.requestId?{requestId:t.requestId}:{})},Ve=fe,He=function(e){return e.mode,e.customInfo,e.title,e.messages,function(e,t,n){}},Ue=`storage`;function We(e,t){return t&&typeof t!=`function`?[Oe(Oe({},e),{customReqOpts:t}),void 0]:[e,t]}var Ge=function(e,t,n){return je(void 0,void 0,void 0,function(){var r,i;return Me(this,function(a){switch(a.label){case 0:return[4,e.gateWay({path:`storages`,name:`get-objects-upload-info`,data:[Oe({objectId:t.path},t.signedHeader?{signedHeader:t.signedHeader}:{})]},n)];case 1:return r=ge(r=a.sent()),i=r.data?.[0]||{},[2,Oe(Oe({},r),{data:Oe(Oe({},i.code?Oe({},i):{}),{authorization:i.authorization,token:i.token,url:i.uploadUrl,fileId:i.cloudObjectId,cosFileId:i.cloudObjectMeta,download_url:i.downloadUrl})})]}})})},Ke=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`get-objects-download-info`,data:t.convertedFileList.map(function(e){return Oe({cloudObjectId:e.fileid},e.max_age==null?{}:{maxAge:e.max_age})})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{download_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,message:e.message,fileid:e.cloudObjectId,download_url:e.downloadUrl,fileID:e.cloudObjectId,tempFileURL:e.downloadUrl,mime_type:e.contentType||F(null,e.cloudObjectId||``)}}):[]}})]}})})},qe=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`delete-objects`,data:t.fileList.map(function(e){return{cloudObjectId:e}})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{delete_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,fileID:e.cloudObjectId,message:e.message}}):[]}})]}})})},Je=function(e,t,n){return je(void 0,void 0,void 0,function(){var r;return Me(this,function(i){switch(i.label){case 0:return[4,e.gateWay({path:`storages`,name:`copy-objects`,data:t.convertedFileList.map(function(e){return{srcPath:e.src_path,dstPath:e.dst_path,overwrite:e.overwrite,removeOriginal:e.remove_original}})},n)];case 1:return r=ge(r=i.sent()),[2,Oe(Oe({},r),{data:{copy_list:Array.isArray(r.data)?r.data.map(function(e){return{code:e.code||`SUCCESS`,fileID:e.cloudObjectId,fileId:e.cloudObjectId,message:e.message}}):[]}})]}})})},Ye={txt:`text/plain`,json:`application/json`,html:`text/html`,htm:`text/html`,css:`text/css`,js:`application/javascript`,csv:`text/csv`,xml:`application/xml`,png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,svg:`image/svg+xml`,ico:`image/x-icon`,pdf:`application/pdf`,zip:`application/zip`,gz:`application/gzip`,mp4:`video/mp4`,webm:`video/webm`,mp3:`audio/mpeg`,wav:`audio/wav`};function F(e,t){if(typeof Blob<`u`&&e instanceof Blob&&e.type)return e.type;var n=/\.([a-zA-Z0-9]+)$/.exec(t||``);return Ye[n?n[1].toLowerCase():``]||`application/octet-stream`}function Xe(){return typeof globalThis.wx?.getFileSystemManager==`function`}function Ze(e,t){var n=t.toLowerCase();return Object.keys(e).some(function(e){return e.toLowerCase()===n})}function Qe(e){return Object.keys(e).reduce(function(t,n){var r;return Oe(Oe({},t),((r={})[n]=[e[n]],r))},{})}function $e(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1}var et=function(){function e(e){this.context=e}var t,n,r,i,a,s,c,l,u,d,f,p,m,h,g,_,v;return Object.defineProperty(e.prototype,"config",{get:function(){return this.context?.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){return this.context?.request},enumerable:!1,configurable:!0}),e.prototype.isGateWay=function(){return(this.config.endPointMode||`CLOUD_API`)===`GATEWAY`},e.prototype.uploadFile=function(e,t){var n;return je(this,void 0,Promise,function(){var r,i,a,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,te,O,k,A,ne,re,ie,ae,oe;return Me(this,function(se){switch(se.label){case 0:if(re=We(e,t),e=re[0],t=re[1],r=e.cloudPath,i=e.filePath,a=e.onUploadProgress,ie=e.method,s=ie===void 0?`put`:ie,ae=e.headers,c=ae===void 0?{}:ae,l=e.fileContent,!Le(r)||!i&&!l)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.uploadFile] invalid params`})];if(i&&l&&console.warn(`[${Ne()}][${Ue}.uploadFile] fileContent 是兼容字段,与 filePath 同时传入时忽略,实际使用 filePath`),u=i??l,(d={put:P.put,post:P.post}[s.toLocaleLowerCase()]||P.put)===P.post&&console.warn(`[${Ne()}][${Ue}.uploadFile] method: 'post' 已废弃,请改用 'put'`),f=this.isGateWay(),p=Oe({},c),m=Object.keys(c).reduce(function(e,t){return t.toLowerCase()!==`content-length`&&(e[t]=c[t]),e},{}),d===P.put&&f){if(!Ze(p,`content-length`)){if(h=((n=this.request)?.getUploadByteLength)?.call(n,u),typeof(g=typeof h==`number`?h:function(e){if((!Xe()||typeof e!=`string`)&&e!==null){if(typeof Blob<`u`&&e instanceof Blob)return e.size;if(typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||typeof ArrayBuffer.isView==`function`&&ArrayBuffer.isView(e)))return e.byteLength;if(typeof e==`string`){if(typeof Blob<`u`)return new Blob([e]).size;var t=(n=e,(r=o())?.byteLength(n));return typeof t==`number`?t:e.length}var n,r;return typeof e==`object`&&typeof e.size==`number`?e.size:void 0}}(u))!=`number`)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:Xe()?`[${Ue}.uploadFile] 无法计算 content-length,请确认上传内容为有效的本地临时路径,或传入 ArrayBuffer`:`[${Ue}.uploadFile] 无法计算 content-length,请传入 File/Blob/Buffer/ArrayBuffer,或在 headers 中提供 content-length`})];p[`content-length`]=String(g)}Ze(p,`content-type`)||(p[`content-type`]=F(u,r)),Ze(m,`content-type`)||(m[`content-type`]=F(u,r))}return[4,this.getUploadMetadata({cloudPath:r,method:d,headers:d!==P.put||f?void 0:m,signedHeader:d===P.put&&f?Qe(p):void 0,customReqOpts:e.customReqOpts})];case 1:return _=se.sent(),v=_.data,y=_.requestId,(b=v)?.code||!b?.url?(x=b?.code||Pe.OPERATION_FAIL,S=b?.message||`get upload info failed`,[2,ze(t,Error(`[${Ne()}][${x}][${Ue}]:${S}`))]):(C=v.url,w=v.authorization,T=v.token,E=v.fileId,D=v.cosFileId,ee=v.download_url,O=Oe(Oe({},te={url:C,file:u,name:r,onUploadProgress:a,fileId:E,requestId:y}),{method:P.put,headers:Oe(Oe({},m),{authorization:w,"x-cos-meta-fileid":D,"x-cos-security-token":T})}),k=Oe(Oe({},te),{method:P.post,data:{key:r,signature:w,"x-cos-meta-fileid":D,success_action_status:`201`,"x-cos-security-token":T}}),(oe={})[P.put]={params:O,isSuccess:function(e){return e>=200&&e<300}},oe[P.post]={params:k,isSuccess:function(e){return e===201}},A=oe,[4,this.request.upload(A[d].params)]);case 2:return ne=se.sent(),A[d].isSuccess(ne.statusCode)?[2,ze(t,null,{fileID:E,download_url:ee,requestId:y})]:[2,ze(t,Error(`[${Ne()}][${Pe.OPERATION_FAIL}][${Ue}]:${ne.data}`))]}})})},e.prototype.getUploadMetadata=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d;return Me(this,function(f){switch(f.label){case 0:if(n=e.cloudPath,r=e.method,i=e.headers,a=e.signedHeader,!Le(n))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getUploadMetadata] invalid cloudPath`})];o=this.request,s=`storage.getUploadMetadata`,f.label=1;case 1:return f.trys.push([1,6,,7]),c=void 0,l={path:n},u=this.isGateWay(),r&&(l.method=r),r===P.put&&(u&&a?l.signedHeader=a:!u&&i&&(l.headers=i)),r!==P.post&&u?[3,3]:[4,o.send(s,l,{endPointMode:`CLOUD_API`},e.customReqOpts)];case 2:return c=f.sent(),[3,5];case 3:return[4,Ge(o,l,e.customReqOpts)];case 4:c=f.sent(),f.label=5;case 5:return[2,ze(t,null,c)];case 6:return d=f.sent(),[2,ze(t,d)];case 7:return[2]}})})},e.prototype.deleteFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u;return Me(this,function(d){switch(d.label){case 0:if(u=We(e,t),e=u[0],t=u[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.deleteFile] fileList must not be empty`})];for(r=0,i=n;r<i.length;r++)if(!(a=i[r])||!Le(a))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.deleteFile] fileID must be string`})];return o=`storage.batchDeleteFile`,s=this.request,c={},this.isGateWay()?[4,qe(s,{fileList:n},e.customReqOpts)]:[3,2];case 1:return c=d.sent(),[3,4];case 2:return[4,s.send(o,{fileid_list:n},e.customReqOpts)];case 3:c=d.sent(),d.label=4;case 4:return c.code?[2,ze(t,null,c)]:(l={fileList:c.data.delete_list,requestId:c.requestId},[2,ze(t,null,l)])}})})},e.prototype.getTempFileURL=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d,f,p;return Me(this,function(m){switch(m.label){case 0:if(p=We(e,t),e=p[0],t=p[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] fileList must not be empty`})];for(r=[],i=!1,a=0,o=n;a<o.length;a++)if(s=o[a],Re(s)){if(!Object.prototype.hasOwnProperty.call(s,`fileID`))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] file info must include fileID`})];if(c={fileid:s.fileID},Object.prototype.hasOwnProperty.call(s,`maxAge`)){if(!$e(l=s.maxAge))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] maxAge must be an integer greater than or equal to 1`})];l>3600&&!i&&(Ve(Pe.INVALID_PARAMS,`[${Ue}.getTempFileURL] maxAge ${l} 大于 3600,仍按原值下发`),i=!0),c.max_age=l}r.push(c)}else{if(!Le(s))return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] invalid fileList`})];r.push({fileid:s})}return u=`storage.batchGetDownloadUrl`,d=this.request,f={},this.isGateWay()?[4,Ke(d,{convertedFileList:r},e.customReqOpts)]:[3,2];case 1:return f=m.sent(),[3,4];case 2:return[4,d.send(u,{file_list:r},e.customReqOpts)];case 3:f=m.sent(),m.label=4;case 4:return f.code?[2,ze(t,null,f)]:[2,ze(t,null,{fileList:Array.isArray(f.data?.download_list)?f.data.download_list:[],requestId:f.requestId})]}})})},e.prototype.downloadFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c;return Me(this,function(l){switch(l.label){case 0:return c=We(e,t),e=c[0],t=c[1],n=e.fileID,Le(n)?[4,this.getTempFileURL.call(this,{fileList:[{fileID:n,maxAge:600}],customReqOpts:e.customReqOpts})]:[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.getTempFileURL] fileID must be string`})];case 1:return r=l.sent(),(i=r.fileList[0]).code===`SUCCESS`?(a=this.request,o=encodeURI(i.download_url),[4,a.download({url:o,tempFilePath:e.tempFilePath})]):[2,ze(t,i)];case 2:return s=l.sent(),[2,ze(t,null,s)]}})})},e.prototype.copyFile=function(e,t){return je(this,void 0,Promise,function(){var n,r,i,a,o,s,c,l,u,d;return Me(this,function(f){switch(f.label){case 0:if(d=We(e,t),e=d[0],t=d[1],!(n=e.fileList)||!Ie(n)||n.length===0)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] fileList must not be empty`})];for(r=[],i=0,a=n;i<a.length;i++){if(o=a[i],s=o.srcPath,c=o.dstPath,!s||!c||typeof s!=`string`||typeof c!=`string`)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] srcPath and dstPath may not be empty`})];if(s===c)return[2,Be(this.config,{code:Pe.INVALID_PARAMS,message:`[${Ue}.copyFile] srcPath and dstPath can not be the same`})];r.push({src_path:s,dst_path:c,overwrite:o.overwrite,remove_original:o.removeOriginal})}return l=this.request,u={},this.isGateWay()?[4,Je(l,{convertedFileList:r},e.customReqOpts)]:[3,2];case 1:return u=f.sent(),[3,4];case 2:return[4,l.send(`storage.batchCopyFile`,{file_list:r},e.customReqOpts)];case 3:u=f.sent(),f.label=4;case 4:return u.code?[2,ze(t,null,u)]:[2,ze(t,null,{fileList:u.data.copy_list,requestId:u.requestId})]}})})},e.prototype.getFileInfo=function(e){return je(this,void 0,Promise,function(){var t,n=this;return Me(this,function(r){switch(r.label){case 0:return[4,this.getTempFileURL(e)];case 1:return(t=r.sent())?.fileList&&t?.fileList?.length>0?[4,Promise.all(t.fileList.map(function(e){return je(n,void 0,void 0,function(){var t,n,r,i,a,o,s;return Me(this,function(c){switch(c.label){case 0:if(e.code!==`SUCCESS`)return[2,{code:e.code,fileID:e.fileID,tempFileURL:e.tempFileURL,message:e.message}];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.request.fetch({url:e.tempFileURL,method:`HEAD`})];case 2:return t=c.sent(),n=t.header,typeof Headers<`u`&&n instanceof Headers&&(r={},n.forEach(function(e,t){r[t]=e}),n=r),i=parseInt(n[`content-length`])||0,a=n[`content-type`]||``,[400,404].includes(Number(t.statusCode))?[2,{code:`FILE_NOT_FOUND`,fileID:e.fileID,tempFileURL:e.tempFileURL,message:`file not found`}]:[2,{code:e.code,fileID:e.fileID,tempFileURL:e.tempFileURL,cloudId:e.fileID,fileName:e.fileID.split(`/`).pop(),contentType:a,mime:a.split(`;`)[0].trim(),size:i,etag:n.etag||``,lastModified:n[`last-modified`]||``,cacheControl:n[`cache-control`]||``}];case 3:return o=c.sent(),s=typeof o==`object`&&o&&`message`in o?String(o.message):void 0,[2,{code:`FETCH_FILE_INFO_ERROR`,fileID:e.fileID,tempFileURL:e.tempFileURL,message:s}];case 4:return[2]}})})}))]:[3,3];case 2:return[2,{fileList:r.sent(),requestId:t.requestId}];case 3:return[2,{fileList:[],requestId:t.requestId}]}})})},ke([He({customInfo:{className:`Cloudbase`,methodName:`uploadFile`},title:`上传文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 uploadFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(t=De.ICloudbaseUploadFileParams!==void 0&&De.ICloudbaseUploadFileParams)==`function`?t:Object,typeof(n=typeof Function<`u`&&Function)==`function`?n:Object]),Ae(`design:returntype`,typeof(r=typeof Promise<`u`&&Promise)==`function`?r:Object)],e.prototype,`uploadFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`getUploadMetadata`},title:`获取上传元信息失败`,messages:[`请确认以下各项:`,` 1 - 调用 getUploadMetadata() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[Object,typeof(i=typeof Function<`u`&&Function)==`function`?i:Object]),Ae(`design:returntype`,typeof(a=typeof Promise<`u`&&Promise)==`function`?a:Object)],e.prototype,`getUploadMetadata`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`deleteFile`},title:`删除文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 deleteFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(s=De.ICloudbaseDeleteFileParams!==void 0&&De.ICloudbaseDeleteFileParams)==`function`?s:Object,typeof(c=typeof Function<`u`&&Function)==`function`?c:Object]),Ae(`design:returntype`,typeof(l=typeof Promise<`u`&&Promise)==`function`?l:Object)],e.prototype,`deleteFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`getTempFileURL`},title:`获取文件下载链接`,messages:[`请确认以下各项:`,` 1 - 调用 getTempFileURL() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(u=De.ICloudbaseGetTempFileURLParams!==void 0&&De.ICloudbaseGetTempFileURLParams)==`function`?u:Object,typeof(d=typeof Function<`u`&&Function)==`function`?d:Object]),Ae(`design:returntype`,typeof(f=typeof Promise<`u`&&Promise)==`function`?f:Object)],e.prototype,`getTempFileURL`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`downloadFile`},title:`下载文件失败`,messages:[`请确认以下各项:`,` 1 - 调用 downloadFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(p=De.ICloudbaseDownloadFileParams!==void 0&&De.ICloudbaseDownloadFileParams)==`function`?p:Object,typeof(m=typeof Function<`u`&&Function)==`function`?m:Object]),Ae(`design:returntype`,typeof(h=typeof Promise<`u`&&Promise)==`function`?h:Object)],e.prototype,`downloadFile`,null),ke([He({customInfo:{className:`Cloudbase`,methodName:`copyFile`},title:`批量复制文件`,messages:[`请确认以下各项:`,` 1 - 调用 copyFile() 的语法或参数是否正确`,` 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety`,` 3 - 云存储安全规则是否限制了当前登录状态访问`,`如果问题依然存在,建议到官方问答社区提问或寻找帮助:${Fe}`]}),Ae(`design:type`,Function),Ae(`design:paramtypes`,[typeof(g=De.ICloudbaseCopyFileParams!==void 0&&De.ICloudbaseCopyFileParams)==`function`?g:Object,typeof(_=typeof Function<`u`&&Function)==`function`?_:Object]),Ae(`design:returntype`,typeof(v=typeof Promise<`u`&&Promise)==`function`?v:Object)],e.prototype,`copyFile`,null),e}(),I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I.apply(this,arguments)},tt=function(e,t,n,r){return new(n||=Promise)(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})},L=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError(`Generator is already executing.`);for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){o=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(s[0]===6&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},R=ae,nt=function(){function e(e,t){t===void 0&&(t=!1),this.shouldThrowOnError=!1,this.bucketId=``,this.context=e,this.shouldThrowOnError=t,this.storage=new et(e)}return Object.defineProperty(e.prototype,"config",{get:function(){return this.context?.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){return this.context?.request},enumerable:!1,configurable:!0}),e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.upload=function(e,t,n){return tt(this,void 0,Promise,function(){var i,a,o,s,c,l,u,d,f;return L(this,function(p){switch(p.label){case 0:i=I({upsert:!0},n),a=i.cacheControl,o=i.contentType,s=i.metadata,p.label=1;case 1:return p.trys.push([1,3,,4]),c=this.getCloudPath(e),l={cloudPath:c,filePath:t},(a||o||s)&&(u={},a&&(u[`cache-control`]=a),o&&(u[`content-type`]=o),s&&(u[`x-cos-metadata-metadata`]=this.toBase64(JSON.stringify(s))),l.headers=u),[4,this.storage.uploadFile(l)];case 2:if(!(d=p.sent()).fileID)throw Error(JSON.stringify({code:R.OPERATION_FAIL,msg:`[${Ue}.update] no fileID returned`}));return[2,{data:{id:d.fileID,path:e,fullPath:e},error:null}];case 3:if(f=p.sent(),this.shouldThrowOnError)throw f;if(r(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}})})},e.prototype.uploadToSignedUrl=function(e,t,n,r){return tt(this,void 0,Promise,function(){return L(this,function(t){return[2,this.upload(e,n,r)]})})},e.prototype.createSignedUploadUrl=function(e){return tt(this,void 0,Promise,function(){var t,r,i;return L(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=this.getCloudPath(e),[4,this.storage.getUploadMetadata({cloudPath:t})];case 1:return[2,{data:{signedUrl:(r=a.sent().data).url,token:r.token,path:e,authorization:r.authorization,id:r.fileId,cosFileId:r.cosFileId,downloadUrl:r.download_url},error:null}];case 2:if(i=a.sent(),this.shouldThrowOnError)throw i;return[2,{data:null,error:i instanceof n?i:new n(i.message)}];case 3:return[2]}})})},e.prototype.update=function(e,t,n){return tt(this,void 0,Promise,function(){return L(this,function(r){return[2,this.upload(e,t,I(I({},n),{upsert:!0}))]})})},e.prototype.move=function(e,t){return tt(this,void 0,Promise,function(){var i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.copyFile({fileList:[{srcPath:this.getCloudPath(e),dstPath:this.getCloudPath(t),overwrite:!0,removeOriginal:!0}]})];case 1:if((i=o.sent()).fileList[0].code&&i.fileList[0].code!==`SUCCESS`)throw new n(i.fileList[0].message||`Move failed`);return[2,{data:{message:`File moved from ${e} to ${t}`},error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.copy=function(e,t){return tt(this,void 0,Promise,function(){var i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.copyFile({fileList:[{srcPath:this.getCloudPath(e),dstPath:this.getCloudPath(t),overwrite:!0,removeOriginal:!1}]})];case 1:if((i=o.sent()).fileList[0].code&&i.fileList[0].code!==`SUCCESS`)throw new n(i.fileList[0].message||`Copy failed`);return[2,{data:{path:this.getCloudPath(t)},error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.createSignedUrl=function(e,t,i){return tt(this,void 0,Promise,function(){var a,o,s,c,l,u,d;return L(this,function(f){switch(f.label){case 0:if(f.trys.push([0,2,,3]),!$e(t))throw new n(`[${Ue}.createSignedUrl] expiresIn must be an integer greater than or equal to 1`);return a=this.normalizeCloudId(e),[4,this.storage.getTempFileURL({fileList:[{fileID:a,maxAge:t}]})];case 1:if((o=f.sent()).fileList[0].code!==`SUCCESS`)throw new n(`Failed to create signed URL: [${o.fileList[0].code}] ${o.fileList[0].fileID}`);return s=o.fileList[0].download_url,c=[],i?.download!==void 0&&(typeof i.download==`string`?c.push(`download=${encodeURIComponent(i.download)}`):!0===i.download&&c.push(`download=true`)),i!=null&&i.transform&&(l=this.transformOptsToQueryString(i.transform))&&c.push(l),c.length>0&&(u=s.includes(`?`)?`&`:`?`,s=`${s}${u}${c.join(`&`)}`),[2,{data:{signedUrl:s},error:null}];case 2:if(d=f.sent(),this.shouldThrowOnError)throw d;if(r(d))return[2,{data:null,error:d}];throw d;case 3:return[2]}})})},e.prototype.createSignedUrls=function(e,t){return tt(this,void 0,Promise,function(){var i,a,o=this;return L(this,function(s){switch(s.label){case 0:if(s.trys.push([0,2,,3]),!$e(t))throw new n(`[${Ue}.createSignedUrls] expiresIn must be an integer greater than or equal to 1`);return i=e.map(function(e){return{fileID:o.normalizeCloudId(e),maxAge:t}}),[4,this.storage.getTempFileURL({fileList:i})];case 1:return[2,{data:s.sent().fileList.map(function(t,n){return{path:e[n],signedUrl:t.tempFileURL||``,error:t.code===`SUCCESS`?null:t.message}}),error:null}];case 2:if(a=s.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.download=function(e,t){return tt(this,void 0,Promise,function(){var i,a,o=this;return L(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),a={},[4,tt(o,void 0,void 0,function(){var r,i,a;return L(this,function(o){switch(o.label){case 0:return[4,this.createSignedUrl(e,600,{transform:t})];case 1:if((r=o.sent()).error)throw r.error;return i=encodeURI(r.data?.signedUrl),[4,this.request.reqClass.get({url:i,headers:{},responseType:`blob`})];case 2:if(!(a=o.sent().data))throw new n(`Download failed: no file content`);return[2,new Blob([a])]}})})];case 1:return[2,(a.data=s.sent(),a.error=null,a)];case 2:if(i=s.sent(),this.shouldThrowOnError)throw i;if(r(i))return[2,{data:null,error:i}];throw i;case 3:return[2]}})})},e.prototype.info=function(e){return tt(this,void 0,Promise,function(){var t,r,i,a,o,s,c,l;return L(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),t=e.startsWith(`cloud://`),r=t?this.extractPathFromFileId(e):e,i=t?this.extractBucketFromFileId(e):this.bucketId,[4,this.storage.getFileInfo({fileList:[this.normalizeCloudId(e)]})];case 1:if(a=u.sent(),(o=a.fileList[0]).code!==`SUCCESS`)throw new n(o.message);return s=new Date().toISOString(),c=(o.lastModified?new Date(o.lastModified):new Date).toISOString(),[2,{data:{id:o.fileID,version:`1`,name:r,bucketId:i,updatedAt:c,createdAt:c,lastAccessedAt:s,size:o.size,cacheControl:o.cacheControl,contentType:o.contentType,etag:o.etag,lastModified:c,metadata:{}},error:null}];case 2:if(l=u.sent(),this.shouldThrowOnError)throw l;return[2,{data:null,error:l instanceof n?l:new n(l.message)}];case 3:return[2]}})})},e.prototype.exists=function(e){return tt(this,void 0,Promise,function(){var t,i,a;return L(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.storage.getFileInfo({fileList:[this.normalizeCloudId(e)]})];case 1:if(t=o.sent(),(i=t.fileList[0]).code===`FILE_NOT_FOUND`)return[2,{data:!1,error:null}];if(i.code!==`SUCCESS`)throw new n(i.message);return[2,{data:!0,error:null}];case 2:if(a=o.sent(),this.shouldThrowOnError)throw a;if(r(a))return[2,{data:null,error:a}];throw a;case 3:return[2]}})})},e.prototype.getPublicUrl=function(e,t){return tt(this,void 0,Promise,function(){var n;return L(this,function(r){switch(r.label){case 0:return[4,this.createSignedUrl(e,600,t)];case 1:return(n=r.sent()).data?[2,{data:{publicUrl:n.data.signedUrl}}]:[2,{data:null,error:n.error}]}})})},e.prototype.remove=function(e){return tt(this,void 0,Promise,function(){var t,i,a,o,s,c,l,u,d,f,p=this;return L(this,function(m){switch(m.label){case 0:for(m.trys.push([0,3,,4]),t=10,i=[],a=0;a<e.length;a+=t)i.push(e.slice(a,a+t));return[4,Promise.all(i.map(function(e){return Promise.all(e.map(function(e){return p.info(e)}))}))];case 1:return o=m.sent(),s=new Map,o.forEach(function(n,r){n.forEach(function(n,i){n.data&&s.set(e[r*t+i],n.data)})}),c=e.map(function(e){return p.normalizeCloudId(e)}),[4,this.storage.deleteFile({fileList:c})];case 2:if(l=m.sent(),(u=l.fileList.filter(function(e){return e.code!==`SUCCESS`})).length>0)throw new n(`Delete failed for ${u.length} file(s)`);return d=new Date().toISOString(),[2,{data:e.map(function(e){var t=s.get(e);return{name:t?.name,id:t?.id,bucket_id:t?.bucketId,owner:void 0,updated_at:t?.updatedAt||d,created_at:t?.createdAt,last_accessed_at:t?.lastAccessedAt||d,metadata:t?.metadata||{},buckets:{id:t?.bucketId,name:t?.bucketId,owner:void 0,public:!1,created_at:``,updated_at:d}}}),error:null}];case 3:if(f=m.sent(),this.shouldThrowOnError)throw f;if(r(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}})})},e.prototype.list=function(){return tt(this,void 0,void 0,function(){return L(this,function(e){throw new n(`Not implemented`)})})},e.prototype.getCloudPath=function(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)},e.prototype.normalizeCloudId=function(e){if(/^cloud:\/\//.test(e))return e;var t=this.getCloudPath(e);if(!this.bucketId)throw new n(`bucketId is not set`);var r=this.config?.env||``;return r?`cloud://${r}.${this.bucketId}/${t}`:void 0},e.prototype.toBase64=function(e){return s(e)},e.prototype.transformOptsToQueryString=function(e){var t=[`imageMogr2`];if(e.width||e.height){var n=e.width||``,r=e.height||``;e.resize===`fill`?t.push(`thumbnail/${n}x${r}!`):e.resize===`contain`?t.push(`thumbnail/${n}x${r}`):t.push(`thumbnail/${n}x${r}^`)}if(e.format&&e.format!==`origin`&&t.push(`format/${e.format}`),e.quality!==void 0){var i=Math.max(1,Math.min(100,e.quality));t.push(`quality/${i}`)}return t.join(`/`)},e.prototype.extractPathFromFileId=function(e){var t=e.replace(/^cloud:\/\//,``).split(`/`);return t.length<2?e:t.slice(1).join(`/`)},e.prototype.extractBucketFromFileId=function(e){var t=e.replace(/^cloud:\/\//,``).split(`/`);if(t.length<1)return``;var n=t[0],r=n.indexOf(`.`);return r===-1?n:n.substring(r+1)},e}(),rt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=new et,at={name:Ue,entity:{uploadFile:it.uploadFile,deleteFile:it.deleteFile,getTempFileURL:it.getTempFileURL,downloadFile:it.downloadFile,getUploadMetadata:it.getUploadMetadata,copyFile:it.copyFile,getFileInfo:it.getFileInfo,isGateWay:it.isGateWay}},z=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.from=function(e){return e?(k(e,`from`),new te(this.http,e,this.shouldThrowOnError)):new nt(this.http.ctx,this.shouldThrowOnError)},t}(re),ot={name:`${Ue}/supabase`,IIFE:!0,entity:function(){var e=new WeakMap;Object.defineProperty(this.prototype,"storage",{get:function(){if(e.has(this))return e.get(this);var t=this,n=new z(new Proxy({},{get:function(e,n){return n===`config`?t.config:n===`request`?t.request:void 0}}));return e.set(this,n),n},configurable:!0,enumerable:!0})}};try{cloudbase.registerComponent(at),cloudbase.registerComponent(ot)}catch{}function st(e){try{e.registerComponent(at),e.registerComponent(ot)}catch(e){console.warn(e)}}try{window.registerStorage=st}catch{}var ct=st})(),Co.v;var wo=`2.0.15`,To=[`webhook`,`qmsg`,`serverchan`,`pushplus`,`dingtalk`,`wecom`,`bark`,`gocqhttp`,`onebot`,`atri`,`pushdeer`,`igot`,`telegram`,`feishu`,`lark`,`ifttt`,`wecombot`,`discord`,`wxpusher`,`ntfy`,`join`],Eo=class extends Error{};async function Do(e,t={}){let n=new AbortController,r=setTimeout(()=>n.abort(),3e4);try{let r=await fetch(e,{...t,signal:n.signal});return{response:r,text:await r.text()}}catch(e){throw n.signal.aborted?new Eo(`请求超时`):e}finally{clearTimeout(r)}}var Oo=class extends Error{kind;httpStatus;rawMessage;requestId;constructor(e,t,n={}){super(t),this.name=`TwikooError`,this.kind=e,this.httpStatus=n.httpStatus,this.rawMessage=n.rawMessage??t,this.requestId=n.requestId}},ko=class extends Oo{constructor(e){super(`CLIENT_ERROR`,e),this.name=`TwikooResponseError`}};function Ao(e){let t=e.result??e;if(t.code!==void 0&&t.code!==0)throw new ko(typeof t.message==`string`&&t.message?t.message:JSON.stringify(t.code)??``);return t}function jo(e){return e&&typeof e==`object`&&`message`in e?String(e.message):String(e)}var Mo={tcb:null,options:{}};function No(e,t){Mo.tcb=e,Mo.options=t}function Po(){return Mo}function Fo(e){return typeof e==`string`&&/^http(s)?:\/\//.test(e)}async function Io(e,t){let n;try{let r=localStorage.getItem(`twikoo-access-token`);n=JSON.stringify({accessToken:r,...t,envId:e})}catch(e){throw new Oo(`NETWORK`,`无法连接到后端`,{rawMessage:jo(e)})}try{let{response:t,text:r}=await Do(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:n}),{status:i}=t;if(i===200)try{let e=JSON.parse(r);return e.accessToken&&localStorage.setItem(`twikoo-access-token`,typeof e.accessToken==`string`?e.accessToken:``),e}catch{throw new Oo(`UNKNOWN`,`后端返回格式异常`,{rawMessage:r.slice(0,200)})}let a={httpStatus:i,rawMessage:r.slice(0,200)};throw i===404?new Oo(`NOT_FOUND`,`接口地址不存在`,a):i===401||i===403?new Oo(`CLIENT_ERROR`,`认证失败,请重新登录`,a):i===429?new Oo(`REJECTED`,`请求过于频繁`,a):i>=500?new Oo(`SERVER_ERROR`,`后端异常`,a):new Oo(`CLIENT_ERROR`,`请求失败(${i})`,a)}catch(e){throw e instanceof Oo?e:e instanceof Eo?new Oo(`TIMEOUT`,`请求超时`,{rawMessage:e.message}):new Oo(`CORS`,`请求被跨域策略拦截或网络不可达`,{rawMessage:jo(e)})}}async function Lo(e,t,n={}){let r=e??Mo.tcb,i=typeof n.envId==`string`?n.envId:typeof Mo.options.envId==`string`?Mo.options.envId:void 0,a=typeof n.funcName==`string`?n.funcName:typeof Mo.options.funcName==`string`?Mo.options.funcName:`twikoo`;if(r)return await r.app.callFunction({name:a,data:{event:t,...n}});if(typeof i==`string`&&Fo(i))return await Io(i,{event:t,...n});throw Error(`缺少 envId 配置 - https://twikoo.js.org`)}var Ro={verbose:1,info:2,warn:3,error:4}[(typeof process<`u`&&process.env,`info`).toLowerCase()]||2,zo={verbose:(...e)=>{Ro<=1&&console.log(...e)},info:(...e)=>{Ro<=2&&console.info(...e)},warn:(...e)=>{Ro<=3&&console.warn(...e)},error:(...e)=>{Ro<=4&&console.error(...e)}},Bo={ADMIN_CLIENT_VERSION:`前端版本:`,ADMIN_SERVER_VERSION:`云函数版本:`,ADMIN_COMMENT:`评论管理`,ADMIN_COMMENT_DELETE:`删除`,ADMIN_COMMENT_DELETE_CONFIRM:`确认删除?`,ADMIN_COMMENT_FILTER_ALL:`全部`,ADMIN_COMMENT_FILTER_VISIBLE:`只看可见`,ADMIN_COMMENT_FILTER_HIDDEN:`只看隐藏`,ADMIN_COMMENT_HIDE:`隐藏`,ADMIN_COMMENT_IS_SPAM_SUFFIX:` (已隐藏)`,ADMIN_COMMENT_SEARCH:`搜索`,ADMIN_COMMENT_SEARCH_PLACEHOLDER:`搜索昵称、邮箱、网址、IP、评论正文、文章地址`,ADMIN_COMMENT_SHOW:`显示`,ADMIN_COMMENT_TOP:`置顶`,ADMIN_COMMENT_UNTOP:`取消置顶`,ADMIN_COMMENT_VIEW:`查看`,ADMIN_COMMENT_SECURITY_ALERT:`评论链接与本站不同!出于安全考虑,请手动复制以下网址访问:`,ADMIN_COMMENT_PARSE_ERROR:`无法解析评论链接,请仔细检查链接后手动复制以下网址访问:`,ADMIN_CONFIG:`配置管理`,ADMIN_CONFIG_CATEGORY_COMMON:`通用`,ADMIN_CONFIG_CATEGORY_IM:`即时通知`,ADMIN_CONFIG_CATEGORY_MAIL:`邮件通知`,ADMIN_CONFIG_CATEGORY_PLUGIN:`插件`,ADMIN_CONFIG_CATEGORY_PRIVACY:`隐私`,ADMIN_CONFIG_CATEGORY_SPAM:`反垃圾`,ADMIN_CONFIG_CATEGORY_CAPTCHA:`人机验证`,ADMIN_CONFIG_IMAGE_CDN_NONE:`无(不启用图片上传)`,ADMIN_CONFIG_CAPTCHA_NONE:`无`,ADMIN_CONFIG_CAPTCHA_TURNSTILE:`Cloudflare Turnstile`,ADMIN_CONFIG_CAPTCHA_GEETEST:`极验 Geetest`,ADMIN_CONFIG_CAPTCHA_CAP:`Cap`,ADMIN_CONFIG_EMAIL_TEST:`邮件通知测试`,ADMIN_CONFIG_EMAIL_TEST_BTN:`发送测试邮件`,ADMIN_CONFIG_EMAIL_TEST_HELP:`输入一个邮箱地址,发送测试邮件`,ADMIN_CONFIG_EMAIL_TEST_RESULT:`测试结果:`,ADMIN_CONFIG_EXAMPLE:`示例:`,ADMIN_CONFIG_ITEM_AKISMET_KEY:`Akismet 反垃圾评论,用于垃圾评论检测,设为 "MANUAL_REVIEW" 开启人工审核,留空不使用反垃圾。注册:https://akismet.com`,ADMIN_CONFIG_ITEM_BLOGGER_NICK:`博主的昵称。`,ADMIN_CONFIG_ITEM_BLOGGER_EMAIL:`博主的邮箱地址,用于邮件通知、博主标识。`,ADMIN_CONFIG_ITEM_COMMENT_BG_IMG:`评论框自定义背景图片 URL 地址。`,ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE:`评论列表分页大小,默认为 8。`,ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER:`评论框提示信息,可用<br>换行,默认为空`,ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN:`CORS 安全域名,注意:如果您不了解什么是 CORS,此项请留空,错误设置会导致无法加载,默认为空,格式为 https://blog.example.com;如需添加多域名请使用,分隔`,ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR:`默认的头像显示。默认值(留空)为 "initials",可选:"404"、"mp"、"identicon"、"monsterid"、"wavatar"、"retro"、"robohash"、"blank"`,ADMIN_CONFIG_ITEM_EMOTION_CDN:`表情 CDN,英文逗号分隔。默认为:https://owo.imaegoo.com/owo.json`,ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS:`违禁词配置,包含违禁词的内容会直接标记为垃圾评论。英文逗号分隔。`,ADMIN_CONFIG_ITEM_BLOCKED_WORDS:`屏蔽词配置,包含屏蔽词的内容会直接评论失败。英文逗号分隔。`,ADMIN_CONFIG_ITEM_GRAVATAR_CDN:`自定义头像 CDN 地址。如:cn.gravatar.com, weavatar.com, cravatar.cn, sdn.geekzu.org, gravatar.loli.net,默认:weavatar.com`,ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT:`隐藏管理面板入口。可设置一个“暗号”,只有在“昵称”一栏输入相同的“暗号”时,管理面板入口才会显示,留空则不隐藏管理入口`,ADMIN_CONFIG_ITEM_QQ_API_KEY:`QQ昵称API密钥,用于获取QQ昵称。前往 https://api.tqq.me/dashboard/api-keys 获取`,ADMIN_CONFIG_ITEM_HIGHLIGHT:`启用代码高亮功能。如果您的主题和代码高亮有冲突,请设为 false。默认:true`,ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME:`代码高亮主题,可选:"default"、"coy"、"dark"、"funky"、"okaidia"、"solarizedlight"、"tomorrow"、"twilight",访问 https://prismjs.com 可预览主题效果。如果您的主题和代码高亮有冲突,请设为 none。默认:none`,ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN:`代码高亮插件,可选:"showLanguage"、"copyButton",分别表示:展示代码语言、展示代码拷贝按钮。可以同时设置多个选项,如果想要不添加任何代码高亮插件,请设为 none。默认:none。`,ADMIN_CONFIG_ITEM_IMAGE_CDN:`插入图片所使用的图床,目前支持:"qcloud"、"7bu (https://7bu.top)"、"see (https://s.ee)"、"lskypro"、"piclist"、"easyimage"、"chevereto"、"S3 / R2 / MinIO"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_URL:`图床的 URL,仅当 IMAGE_CDN 为 "lskypro" / "piclist" / "easyimage" / "s3" 时需要填写`,ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN:`图床 token。qcloud 图床无需设置`,ADMIN_CONFIG_ITEM_NSFW_API_URL:`NSFW 图片检测 API 地址。免费服务:nsfw.qixz.cn,项目:github.com/HG-ha/nsfwpy`,ADMIN_CONFIG_ITEM_NSFW_THRESHOLD:`NSFW 检测阈值(0-1),当检测分数高于此值时拒绝上传。默认:0.5`,ADMIN_CONFIG_ITEM_S3_REGION:`S3 存储区域,例如 us-east-1。使用兼容 S3 的服务(如 Cloudflare R2、MinIO)时可填任意值`,ADMIN_CONFIG_ITEM_S3_BUCKET:`S3 存储桶名称`,ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID:`S3 Access Key ID`,ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY:`S3 Secret Access Key`,ADMIN_CONFIG_ITEM_S3_ENDPOINT:`S3 自定义 Endpoint,使用 Cloudflare R2、MinIO 等兼容 S3 的服务时填写`,ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE:`设置 S3_ENDPOINT 时,是否将 S3_BUCKET 拼入上传地址路径。默认为 true,适用于 Cloudflare R2、MinIO 等 path-style S3 兼容端点;使用已绑定存储桶的自定义域名时设为 false,例如腾讯云 COS 自定义域名`,ADMIN_CONFIG_ITEM_S3_CDN_URL:`S3 图片访问域名(CDN 域名),留空则使用默认 S3/Endpoint URL`,ADMIN_CONFIG_ITEM_S3_PATH_PREFIX:`S3 图片存储路径前缀,例如 images/twikoo,留空则存储在根目录`,ADMIN_CONFIG_ITEM_LIGHTBOX:`使用简易图片点击放大效果。默认:false`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE:`单个 IP 发言频率限制(条/10分钟),0 为无限制,默认:10`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL:`全站发言频率限制(条/10分钟),0 为无限制,默认:10`,ADMIN_CONFIG_ITEM_LIMIT_LENGTH:`评论长度限制,0 为无限制,默认:500`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT:`自定义通知邮件主题,留空则使用默认主题。`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN:`自定义博主通知邮件主题,留空则使用默认主题。`,ADMIN_CONFIG_ITEM_MAIL_TEMPLATE:"自定义通知邮件模板,留空则使用默认模板。可包含的字段:${SITE_URL}, ${SITE_NAME}, ${PARENT_NICK}, ${PARENT_COMMENT}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IMG}, ${PARENT_IMG}",ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN:"自定义博主通知邮件模板,留空则使用默认模板。可包含的字段:${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IP}, ${MAIL}, ${IMG}",ADMIN_CONFIG_ITEM_MASTER_TAG:`博主标识自定义文字,默认为 “博主”。`,ADMIN_CONFIG_ITEM_NOTIFY_SPAM:`垃圾评论是否发送通知,默认:true`,ADMIN_CONFIG_ITEM_HIDE_SPAM:`前台评论区对所有人隐藏垃圾评论,包括管理员和评论作者。评论管理后台仍可审核和恢复。设为 true 开启,默认:false。`,ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER:`人机验证码提供商`,ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY:`Turnstile 验证码的站点密钥。申请地址: https://dash.cloudflare.com/?to=/:account/turnstile`,ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY:`Turnstile 验证码的密钥`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID:`极验验证码的 Captcha ID。申请地址: https://console.geetest.com/sensbot/management`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY:`极验验证码的 Captcha Key`,ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT:`Cap 验证码 API 端点。留空则使用内嵌 Cap(无需额外部署);外部 Standalone 格式:https://<实例地址>/<site_key>/`,ADMIN_CONFIG_ITEM_CAP_SECRET_KEY:`Cap Secret Key(仅外部 Standalone 需要;内嵌模式可留空)`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID:`腾讯云 secret id,用于垃圾评论检测。同时设置腾讯云和 Akismet 时,只有腾讯云会生效。注册:https://twikoo.js.org/cms.html`,ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE:`腾讯云内容安全 Biztype 名称,用于垃圾评论策略。可以自定义垃圾拦截规则`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY:`腾讯云 secret key`,ADMIN_CONFIG_ITEM_JEV_API_KEY:`Jev API Key,用于 AI 垃圾评论检测。仅在未配置腾讯云和 Akismet 时生效,优先于 LLM。`,ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT:`Jev API 接口地址,默认:https://api.typesafe.ai/v1/systemone`,ADMIN_CONFIG_ITEM_JEV_MODEL:`Jev 模型名称,默认:jev-latest`,ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD:`Jev 垃圾评论概率阈值,范围 0 到 1,默认:0.85`,ADMIN_CONFIG_ITEM_LLM_API_KEY:`LLM API Key,用于 AI 垃圾评论检测。仅在未配置腾讯云、Akismet 和 Jev 时生效。`,ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT:`LLM API 接口地址,默认:https://api.deepseek.com/v1`,ADMIN_CONFIG_ITEM_LLM_MODEL:`LLM 模型名称,默认:deepseek-v4-pro`,ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT:`LLM 垃圾检测提示词(可选,留空则使用默认提示词)`,ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES:`LLM 检测最大重试次数(默认 3 次)`,ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL:`即时消息推送平台名称,支持:"qmsg"、"serverchan"、"pushplus"、"dingtalk"、"wecom"、"bark"、"gocqhttp"、"atri"、"pushdeer"、"igot"、"telegram"、"feishu" 等`,ADMIN_CONFIG_ITEM_PUSHOO_TOKEN:`即时消息推送 token。请参考 https://pushoo.js.org 里的详细说明配置`,ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS:`界面上展示的输入框,默认:nick,mail,link`,ADMIN_CONFIG_ITEM_REQUIRED_FIELDS:`评论必填信息,设为 nick,mail,link 代表全必填,设为 none 代表全选填,默认:nick,mail`,ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY:`是否同时通过 IM 和邮件 2 种方式通知博主,默认只通过 IM 通知博主,默认:false`,ADMIN_CONFIG_ITEM_SENDER_EMAIL:`邮件通知邮箱地址。对于大多数邮箱服务商,SENDER_EMAIL 必须和 SMTP_USER 保持一致,否则无法发送邮件。`,ADMIN_CONFIG_ITEM_SENDER_NAME:`邮件通知标题。`,ADMIN_CONFIG_ITEM_SHOW_EMOTION:`启用插入表情功能,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_IMAGE:`启用插入图片功能,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_ORDER:`评论排序下拉框,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_DISLIKE:`评论点踩按钮,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_UA:`是否显示用户系统和浏览器,默认为:true`,ADMIN_CONFIG_ITEM_SHOW_REGION:`是否显示用户 IP 属地到省,可能不准确,不支持 IPv6,默认为:false`,ADMIN_CONFIG_ITEM_SITE_NAME:`网站名称`,ADMIN_CONFIG_ITEM_SITE_URL:`网站地址`,ADMIN_CONFIG_ITEM_SMTP_HOST:`自定义 SMTP 服务器地址。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_PASS:`邮件通知邮箱密码,QQ、163邮箱请填写授权码。`,ADMIN_CONFIG_ITEM_SMTP_PORT:`自定义 SMTP 端口。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_SECURE:`自定义 SMTP 是否使用TLS,请填写 true 或 false。如您已配置 SMTP_SERVICE,此项请留空。`,ADMIN_CONFIG_ITEM_SMTP_SERVICE:`邮件通知邮箱服务商。支持:"126"、"163"、"1und1"、"AOL"、"DebugMail"、"DynectEmail"、"FastMail"、"GandiMail"、"Gmail"、"Godaddy"、"GodaddyAsia"、"GodaddyEurope"、"Hotmail"、"Mail.ru"、"Maildev"、"Mailgun"、"Mailjet"、"Mailosaur"、"Mandrill"、"Naver"、"OpenMailBox"、"Outlook365"、"Postmark"、"QQ"、"QQex"、"SES"、"SES-EU-WEST-1"、"SES-US-EAST-1"、"SES-US-WEST-2"、"SendCloud"、"SendGrid"、"SendPulse"、"SendinBlue"、"Sparkpost"、"Yahoo"、"Yandex"、"Zoho"、"hot.ee"、"iCloud"、"mail.ee"、"qiye.aliyun"`,ADMIN_CONFIG_ITEM_SMTP_USER:`邮件通知邮箱用户名。`,ADMIN_CONFIG_RESET:`重置`,ADMIN_CONFIG_SAVE:`保存`,ADMIN_CONFIG_EXPORT:`导出配置`,ADMIN_CONFIG_IMPORT:`导入配置`,ADMIN_CONFIG_IMPORT_FAILED:`配置导入失败:`,ADMIN_CONFIG_IMPORT_INVALID:`配置文件格式不合法`,ADMIN_CONFIG_IMPORT_SOURCE_INVALID:`配置导入仅支持 Twikoo 导出的配置文件,请将「源系统」选择为 Twikoo`,ADMIN_CONFIG_IMPORTED:`配置导入成功`,ADMIN_CONFIG_IMPORTING:`正在导入配置`,ADMIN_CREDENTIALS:`私钥文件`,ADMIN_CREDENTIALS_FAQ:`如何获得私钥`,ADMIN_CREDENTIALS_PLACEHOLDER:`请粘贴私钥文件内容`,ADMIN_FORGOT:`忘记密码`,ADMIN_EXPORT:`导出`,ADMIN_EXPORT_WARN:`将全部数据导出为 JSON 文件。如果遇到评论较多、导出失败或缺失数据,请连接数据库手动导出`,ADMIN_EXPORT_COMMENT:`导出评论`,ADMIN_EXPORT_COUNTER:`导出访问量`,ADMIN_IMPORT:`导入`,ADMIN_IMPORT_FILE_REQUIRED:`未选择文件`,ADMIN_IMPORT_IMPORTED:`完成导入 `,ADMIN_IMPORT_IMPORTING:`开始导入 `,ADMIN_IMPORT_LOG:`日志`,ADMIN_IMPORT_SELECT:`请选择`,ADMIN_IMPORT_SELECT_FILE:`选择文件`,ADMIN_IMPORT_SELECT_SOURCE:`选择源系统`,ADMIN_IMPORT_SOURCE_REQUIRED:`未选择源系统`,ADMIN_IMPORT_START:`开始导入`,ADMIN_IMPORT_COMMENT:`导入评论`,ADMIN_IMPORT_STARTING:`开始导入`,ADMIN_IMPORT_TIP_ARTALK:`请上传 JSON 格式的 Artalk 导出文件,文件名通常为 comments.data.json`,ADMIN_IMPORT_TIP_DISQUS:`请上传 XML 格式的 Disqus 导出文件,文件名通常为 [网站名称]-[导出时间]-all.xml`,ADMIN_IMPORT_TIP_VALINE:`请上传 JSON 格式的 Valine 导出文件,文件名通常为 Comment.json`,ADMIN_IMPORT_UPLOADED:`上传完成 `,ADMIN_IMPORT_UPLOADING:`已上传 `,ADMIN_IMPORT_WARN:`支持从其他评论系统的备份文件导入评论。
170
170
  数据是安全的,导入功能完全在您的云环境进行。
171
- 建议在导入前备份 comment 数据库。`,ADMIN_LOGIN:`登录`,ADMIN_LOGIN_TITLE:`Twikoo 评论管理`,ADMIN_LOGOUT:`退出登录`,ADMIN_NEED_UPDATE:`若要使用评论管理,请更新 Twikoo 云函数`,ADMIN_PASSWORD:`密码`,ADMIN_PASSWORD_PLACEHOLDER:`请输入`,ADMIN_PASSWORD_REQUIRED:`请输入密码`,ADMIN_REGIST:`注册`,ADMIN_REGIST_FAILED:`注册失败`,ADMIN_SET_PASSWORD:`设置密码`,ADMIN_SET_PASSWORD_CONFIRM:`确认密码`,ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER:`确认密码`,ADMIN_SET_PASSWORD_PLACEHOLDER:`密码`,ADMIN_TITLE:`Twikoo 管理面板`,COMMENTS_SEARCH:`搜索`,COMMENTS_SEARCH_PLACEHOLDER:`搜索评论`,COMMENTS_SEARCH_NO_RESULT:`没有找到评论`,COMMENTS_SEARCH_COUNT_PREFIX:`找到 `,COMMENTS_COUNT_SUFFIX:` 条评论`,COMMENTS_SORT_NEWEST:`最新`,COMMENTS_SORT_OLDEST:`最早`,COMMENTS_SORT_POPULAR:`热门`,COMMENTS_EXPAND:`查看更多`,COMMENTS_NO_COMMENTS:`没有评论`,COMMENT_EXPAND:`展开`,COMMENT_COLLAPSE:`收起`,COMMENT_MASTER_TAG:`博主`,COMMENT_REPLIED:`回复`,COMMENT_DELETE_CONFIRM:`确认删除你的评论?`,COMMENT_REVIEWING_TAG:`审核中`,COMMENT_TOP_TAG:`置顶`,COMMENT_FAILED:`评论失败`,META_INPUT_LINK:`网址`,META_INPUT_MAIL:`邮箱`,META_INPUT_NICK:`昵称`,META_INPUT_NOT_REQUIRED:`选填`,META_INPUT_REQUIRED:`必填`,PAGINATION_COUNT_PREFIX:`共 `,PAGINATION_COUNT_SUFFIX:` 条`,PAGINATION_GOTO_PREFIX:`前往`,PAGINATION_GOTO_SUFFIX:`页`,PAGINATION_PAGESIZE:`条/页`,SUBMIT_CANCEL:`取消`,SUBMIT_PREVIEW:`预览`,SUBMIT_SEND:`发送`,IMAGE_UPLOAD_PLACEHOLDER:`图片上传中`,IMAGE_UPLOAD_FAILED:`图片上传失败`,IMAGE_UPLOAD_NSFW:`图片包含不当内容,禁止上传`,IMAGE_UPLOAD_FAILED_NO_CONF:`博主未配置图床服务`,IMAGE_UPLOAD_PLEASE_WAIT:`图片上传中,请稍候再发送`,SUBMIT_SENDING:`发送中`,TIMEAGO_DAYS:`天前`,TIMEAGO_HOURS:`小时前`,TIMEAGO_MINUTES:`分钟前`,TIMEAGO_NOW:`刚刚`,TIMEAGO_SECONDS:`秒前`},Io={ADMIN_CLIENT_VERSION:`Client version: `,ADMIN_SERVER_VERSION:`Server version: `,ADMIN_COMMENT:`Comment`,ADMIN_COMMENT_DELETE:`Delete`,ADMIN_COMMENT_DELETE_CONFIRM:`Confirm deletion?`,ADMIN_COMMENT_FILTER_ALL:`All`,ADMIN_COMMENT_FILTER_VISIBLE:`Visible`,ADMIN_COMMENT_FILTER_HIDDEN:`Hidden`,ADMIN_COMMENT_HIDE:`Hide`,ADMIN_COMMENT_IS_SPAM_SUFFIX:` (Hidden)`,ADMIN_COMMENT_SEARCH:`Search`,ADMIN_COMMENT_SEARCH_PLACEHOLDER:`Search by nick, mail, website, IP, comment, or article path`,ADMIN_COMMENT_SHOW:`Show`,ADMIN_COMMENT_TOP:`Pin`,ADMIN_COMMENT_UNTOP:`Unpin`,ADMIN_COMMENT_VIEW:`View`,ADMIN_COMMENT_SECURITY_ALERT:`The comment link is different from this site! For security reasons, please manually copy the following URL to visit:`,ADMIN_COMMENT_PARSE_ERROR:`Unable to parse comment link. Please check and manually copy the following URL:`,ADMIN_CONFIG:`Configuration`,ADMIN_CONFIG_CATEGORY_COMMON:`General`,ADMIN_CONFIG_CATEGORY_IM:`Instant notification`,ADMIN_CONFIG_CATEGORY_MAIL:`Email notification`,ADMIN_CONFIG_CATEGORY_PLUGIN:`Plugin`,ADMIN_CONFIG_CATEGORY_PRIVACY:`Privacy`,ADMIN_CONFIG_CATEGORY_SPAM:`Spam`,ADMIN_CONFIG_CATEGORY_CAPTCHA:`CAPTCHA`,ADMIN_CONFIG_IMAGE_CDN_NONE:`None (disable image upload)`,ADMIN_CONFIG_CAPTCHA_NONE:`None`,ADMIN_CONFIG_CAPTCHA_TURNSTILE:`Cloudflare Turnstile`,ADMIN_CONFIG_CAPTCHA_GEETEST:`GeeTest`,ADMIN_CONFIG_CAPTCHA_CAP:`Cap`,ADMIN_CONFIG_EMAIL_TEST:`Email notification test`,ADMIN_CONFIG_EMAIL_TEST_BTN:`Send test mail`,ADMIN_CONFIG_EMAIL_TEST_HELP:`Input an email address & send test mail`,ADMIN_CONFIG_EMAIL_TEST_RESULT:`Test result: `,ADMIN_CONFIG_EXAMPLE:`Example: `,ADMIN_CONFIG_ITEM_AKISMET_KEY:`Akismet spam protection. Set to "MANUAL_REVIEW" to enable manual review. Leave it blank to not use anti-spam. Register Akismet: https://akismet.com`,ADMIN_CONFIG_ITEM_BLOGGER_NICK:`Admin nick name.`,ADMIN_CONFIG_ITEM_BLOGGER_EMAIL:`Admin Email address. Used for Email notification and admin identification.`,ADMIN_CONFIG_ITEM_COMMENT_BG_IMG:`URL for custom background image.`,ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE:`Comment page size. Default: 8.`,ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER:`Comment placeholder. Use <br> to start a newline. Default: empty.`,ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN:`CORS allow origin, note: incorrect settings can cause loading failure. Default: blank, format: https://blog.example.com; If you need to add multiple domain names, please use, separate`,ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR:`Avatar placeholder. Default (when empty): "initials". Choose from: "404", "mp", "identicon", "monsterid", "wavatar", "retro", "robohash", "blank"`,ADMIN_CONFIG_ITEM_EMOTION_CDN:`Emoji CDN. Separate by comma. Default: https://owo.imaegoo.com/owo.json`,ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS:`Configure prohibited words. Comments containing prohibited words will be auto spammed. Separate by comma.`,ADMIN_CONFIG_ITEM_BLOCKED_WORDS:`Configure blocked words. Comments containing blocked words will fail to send. Separate by comma.`,ADMIN_CONFIG_ITEM_GRAVATAR_CDN:`Custom avator CDN. (Examples: gravatar.com) Default: weavatar.com.`,ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT:`Set a cipher to hide the management panel entrance, only when the same cipher is entered in the nickname field the management panel entry will be displayed. Leave it blank to not hide the management entrance.`,ADMIN_CONFIG_ITEM_QQ_API_KEY:`QQ nickname API key for fetching QQ nickname. Get it from https://api.nsuuu.com/admin/key`,ADMIN_CONFIG_ITEM_HIGHLIGHT:`Enable code highlighting. If your theme conflicts with code highlighting, please set it to false. Default: true.`,ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME:`Code highlighting theme. Select from: "default", "coy", "dark", "funky", "okaidia", "solarizedlight", "tomorrow", "twilight". Visit https://prismjs.com for preview. If your theme conflicts with code highlighting, please set it to none. Default: none.`,ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN:`Code highlight plug-in, optional: "showLanguage", "copyButton", respectively: show code language, show code copy button. Multiple options can be set at the same time, if you want to add no code highlighting plug-ins, please set it to none. Default: none. `,ADMIN_CONFIG_ITEM_IMAGE_CDN:`The image bed for image uploading. Select from: "qcloud", "7bu (https://7bu.top)", "see (https://s.ee)", "lskypro", "piclist", "easyimage", "chevereto", "S3 / R2 / MinIO"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_URL:`The URL for the image bed. Required if your IMAGE_CDN is one of these: "lskypro", "piclist", "easyimage", "s3"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN:`The image bed token. Unnessessary for qcloud`,ADMIN_CONFIG_ITEM_NSFW_API_URL:`NSFW image detection API URL. Free services: nsfw.qixz.cn, project: github.com/HG-ha/nsfwpy`,ADMIN_CONFIG_ITEM_NSFW_THRESHOLD:`NSFW detection threshold (0-1). Upload will be rejected if score exceeds this value. Default: 0.5`,ADMIN_CONFIG_ITEM_S3_REGION:`S3 region, e.g. us-east-1. Can be any value when using S3-compatible services (e.g. Cloudflare R2, MinIO)`,ADMIN_CONFIG_ITEM_S3_BUCKET:`S3 bucket name`,ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID:`S3 Access Key ID`,ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY:`S3 Secret Access Key`,ADMIN_CONFIG_ITEM_S3_ENDPOINT:`S3 custom endpoint. Required when using S3-compatible services like Cloudflare R2 or MinIO`,ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE:`When S3_ENDPOINT is set, whether to append S3_BUCKET to the upload URL path. Default: true. Use true for Cloudflare R2, MinIO, and other path-style S3-compatible endpoints; set false for bucket-bound custom domains, such as Tencent Cloud COS custom domains.`,ADMIN_CONFIG_ITEM_S3_CDN_URL:`S3 image access domain (CDN domain). Leave empty to use default S3/Endpoint URL`,ADMIN_CONFIG_ITEM_S3_PATH_PREFIX:`S3 image storage path prefix, e.g. images/twikoo. Leave empty to store in root`,ADMIN_CONFIG_ITEM_LIGHTBOX:`Use simple Lightbox effect. Default: false`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE:`How many comments can be posted by each IP every 10 minutes, 0 is unlimited, default: 10.`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL:`How many comments can be posted by all IPs every 10 minutes, 0 is unlimited, default: 10.`,ADMIN_CONFIG_ITEM_LIMIT_LENGTH:`Comment length limitation, 0 is unlimited, default: 500.`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT:`Custom Email notification subject. Leave it blank to use the default subject.`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN:`Custom admin Email notification subject. Leave it blank to use the default subject.`,ADMIN_CONFIG_ITEM_MAIL_TEMPLATE:"Custom Email notification template. Leave it blank to use the default template. Fields that can be included: ${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IMG}, ${PARENT_IMG}",ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN:"Custom admin Email notification template. Leave it blank to use the default template. Fields that can be included: ${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IP}, ${MAIL}, ${IMG}",ADMIN_CONFIG_ITEM_MASTER_TAG:`Custom admin identifier.`,ADMIN_CONFIG_ITEM_NOTIFY_SPAM:`Notifications for spam comments. Default: true.`,ADMIN_CONFIG_ITEM_HIDE_SPAM:`Hide spam comments from everyone in the public comment section, including admins and comment authors. Comments can still be reviewed and restored in the admin panel. Set to true to enable. Default: false.`,ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER:`CAPTCHA Provider`,ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY:`Turnstile CAPTCHA Site Key. Get from: https://dash.cloudflare.com/?to=/:account/turnstile`,ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY:`Turnstile CAPTCHA Secret Key`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID:`GeeTest CAPTCHA ID. Get from: https://console.geetest.com/sensbot/management`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY:`GeeTest CAPTCHA Key`,ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT:`Cap CAPTCHA API endpoint. Leave empty for built-in Cap (no extra server). External Standalone format: https://<instance_url>/<site_key>/`,ADMIN_CONFIG_ITEM_CAP_SECRET_KEY:`Cap Secret Key (external Standalone only; leave empty for built-in)`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID:`Tencent Cloud secret id for spam detection. When Tencent Cloud and Akismet are set at the same time, only Tencent Cloud will take effect. Register: https://twikoo.js.org/cms.html`,ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE:`Tencent Cloud Content Security Biztype name for spam comment policy. Spam blocking rules can be customized`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY:`Tencent Cloud secret key.`,ADMIN_CONFIG_ITEM_JEV_API_KEY:`Jev API Key for AI spam detection. Used only when Tencent Cloud and Akismet are not configured, and takes precedence over LLM.`,ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT:`Jev API endpoint URL, default: https://api.typesafe.ai/v1/systemone`,ADMIN_CONFIG_ITEM_JEV_MODEL:`Jev model name, default: jev-latest`,ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD:`Jev spam probability threshold from 0 to 1, default: 0.85`,ADMIN_CONFIG_ITEM_LLM_API_KEY:`LLM API Key for AI spam detection. Used only when Tencent Cloud, Akismet, and Jev are not configured.`,ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT:`LLM API endpoint URL, defaults to https://api.deepseek.com/v1`,ADMIN_CONFIG_ITEM_LLM_MODEL:`LLM model name, default: deepseek-v4-pro`,ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT:`LLM spam detection prompt (optional, uses default if left empty)`,ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES:`LLM detection maximum retries (default 3)`,ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL:`IM notification push channel. Support: "qmsg", "serverchan", "pushplus", "dingtalk", "wecom", "bark", "gocqhttp", "atri", "pushdeer", "igot", "telegram", "feishu"`,ADMIN_CONFIG_ITEM_PUSHOO_TOKEN:`IM notification push token. See https://pushoo.js.org for details`,ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS:`Input boxes displayed on the interface. Default: nick,mail,link`,ADMIN_CONFIG_ITEM_REQUIRED_FIELDS:`Required fields for comments. Set to "nick,mail,link" means all fields are required. Set to "none" means all fields are optional. Default: nick,mail.`,ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY:`Whether to notify admin via IM and email at the same time, the default is to notify admin only via IM. Default: false.`,ADMIN_CONFIG_ITEM_SENDER_EMAIL:`Email address for Email notification. For most email service providers, SENDER_EMAIL must be consistent with SMTP_USER, otherwise emails cannot be sent.`,ADMIN_CONFIG_ITEM_SENDER_NAME:`The title for Email notification.`,ADMIN_CONFIG_ITEM_SHOW_EMOTION:`Enable emojis. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_IMAGE:`Enable picture uploading. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_ORDER:`Show sort dropdown. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_DISLIKE:`Show dislike button. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_UA:`Show users' OS and browser. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_REGION:`Show users' IP region (province). Default: false.`,ADMIN_CONFIG_ITEM_SITE_NAME:`Website name.`,ADMIN_CONFIG_ITEM_SITE_URL:`Website URL.`,ADMIN_CONFIG_ITEM_SMTP_HOST:`Custom SMTP server address. If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_PASS:`Email notification mailbox password. Enter authorization code for QQ/163 mail.`,ADMIN_CONFIG_ITEM_SMTP_PORT:`Custom SMTP port. If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_SECURE:`Custom TLS for SMTP. Enter "true" or "false". If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_SERVICE:`Email service provider for Email notification. Support: "126", "163", "1und1", "AOL", "DebugMail", "DynectEmail", "FastMail", "GandiMail", "Gmail", "Godaddy", "GodaddyAsia", "GodaddyEurope", "Hotmail", "Mail.ru", "Maildev", "Mailgun", "Mailjet", "Mailosaur", "Mandrill", "Naver", "OpenMailBox", "Outlook365", "Postmark", "QQ", "QQex", "SES", "SES-EU-WEST-1", "SES-US-EAST-1", "SES-US-WEST-2", "SendCloud", "SendGrid", "SendPulse", "SendinBlue", "Sparkpost", "Yahoo", "Yandex", "Zoho", "hot.ee", "iCloud", "mail.ee", "qiye.aliyun"`,ADMIN_CONFIG_ITEM_SMTP_USER:`Email notification mailbox username.`,ADMIN_CONFIG_RESET:`Reset`,ADMIN_CONFIG_SAVE:`Save`,ADMIN_CONFIG_EXPORT:`Export Config`,ADMIN_CONFIG_IMPORT:`Import Config`,ADMIN_CONFIG_IMPORT_FAILED:`Config import failed: `,ADMIN_CONFIG_IMPORT_INVALID:`Invalid config file format`,ADMIN_CONFIG_IMPORT_SOURCE_INVALID:`Config import only supports files exported by Twikoo. Please select Twikoo as the source system.`,ADMIN_CONFIG_IMPORTED:`Config imported`,ADMIN_CONFIG_IMPORTING:`Importing config`,ADMIN_CREDENTIALS:`Private key file`,ADMIN_CREDENTIALS_FAQ:`How to get the private key`,ADMIN_CREDENTIALS_PLACEHOLDER:`Please paste the contents of the private key file`,ADMIN_FORGOT:`Forget your password`,ADMIN_EXPORT:`Export`,ADMIN_EXPORT_WARN:`Export all data as a JSON file. If you encounter export failures or missing data, connect to the database to export manually`,ADMIN_EXPORT_COMMENT:`Export comment`,ADMIN_EXPORT_COUNTER:`Export counter`,ADMIN_IMPORT:`Import`,ADMIN_IMPORT_FILE_REQUIRED:`No file selected`,ADMIN_IMPORT_IMPORTED:`Imported `,ADMIN_IMPORT_IMPORTING:`Importing `,ADMIN_IMPORT_LOG:`Log`,ADMIN_IMPORT_SELECT:`Select`,ADMIN_IMPORT_SELECT_FILE:`Select file`,ADMIN_IMPORT_SELECT_SOURCE:`Select source`,ADMIN_IMPORT_SOURCE_REQUIRED:`No source selected.`,ADMIN_IMPORT_START:`Start import`,ADMIN_IMPORT_COMMENT:`Import comments`,ADMIN_IMPORT_STARTING:`Importing`,ADMIN_IMPORT_TIP_ARTALK:`Please upload the Artalk export file in JSON format.The file name is usually comments.data.json`,ADMIN_IMPORT_TIP_DISQUS:`Please upload the Disqus export file in XML format. The file name is usually [website name]-[export time]-all.xml`,ADMIN_IMPORT_TIP_VALINE:`Please upload the Valine export file in JSON format. The file name is usually Comment.json`,ADMIN_IMPORT_UPLOADED:`Uploaded `,ADMIN_IMPORT_UPLOADING:`Uploading `,ADMIN_IMPORT_WARN:`Import comments from other comment systems.
171
+ 建议在导入前备份 comment 数据库。`,ADMIN_LOGIN:`登录`,ADMIN_LOGIN_TITLE:`Twikoo 评论管理`,ADMIN_LOGOUT:`退出登录`,ADMIN_NEED_UPDATE:`若要使用评论管理,请更新 Twikoo 云函数`,ADMIN_PASSWORD:`密码`,ADMIN_PASSWORD_PLACEHOLDER:`请输入`,ADMIN_PASSWORD_REQUIRED:`请输入密码`,ADMIN_REGIST:`注册`,ADMIN_REGIST_FAILED:`注册失败`,ADMIN_SET_PASSWORD:`设置密码`,ADMIN_SET_PASSWORD_CONFIRM:`确认密码`,ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER:`确认密码`,ADMIN_SET_PASSWORD_PLACEHOLDER:`密码`,ADMIN_TITLE:`Twikoo 管理面板`,COMMENTS_SEARCH:`搜索`,COMMENTS_SEARCH_PLACEHOLDER:`搜索评论`,COMMENTS_SEARCH_NO_RESULT:`没有找到评论`,COMMENTS_SEARCH_COUNT_PREFIX:`找到 `,COMMENTS_COUNT_SUFFIX:` 条评论`,COMMENTS_SORT_NEWEST:`最新`,COMMENTS_SORT_OLDEST:`最早`,COMMENTS_SORT_POPULAR:`热门`,COMMENTS_EXPAND:`查看更多`,COMMENTS_NO_COMMENTS:`没有评论`,COMMENT_EXPAND:`展开`,COMMENT_COLLAPSE:`收起`,COMMENT_MASTER_TAG:`博主`,COMMENT_REPLIED:`回复`,COMMENT_DELETE_CONFIRM:`确认删除你的评论?`,COMMENT_REVIEWING_TAG:`审核中`,COMMENT_TOP_TAG:`置顶`,COMMENT_FAILED:`评论失败`,META_INPUT_LINK:`网址`,META_INPUT_MAIL:`邮箱`,META_INPUT_NICK:`昵称`,META_INPUT_NOT_REQUIRED:`选填`,META_INPUT_REQUIRED:`必填`,PAGINATION_COUNT_PREFIX:`共 `,PAGINATION_COUNT_SUFFIX:` 条`,PAGINATION_GOTO_PREFIX:`前往`,PAGINATION_GOTO_SUFFIX:`页`,PAGINATION_PAGESIZE:`条/页`,SUBMIT_CANCEL:`取消`,SUBMIT_PREVIEW:`预览`,SUBMIT_SEND:`发送`,IMAGE_UPLOAD_PLACEHOLDER:`图片上传中`,IMAGE_UPLOAD_FAILED:`图片上传失败`,IMAGE_UPLOAD_NSFW:`图片包含不当内容,禁止上传`,IMAGE_UPLOAD_FAILED_NO_CONF:`博主未配置图床服务`,IMAGE_UPLOAD_PLEASE_WAIT:`图片上传中,请稍候再发送`,SUBMIT_SENDING:`发送中`,TIMEAGO_DAYS:`天前`,TIMEAGO_HOURS:`小时前`,TIMEAGO_MINUTES:`分钟前`,TIMEAGO_NOW:`刚刚`,TIMEAGO_SECONDS:`秒前`},Vo={ADMIN_CLIENT_VERSION:`Client version: `,ADMIN_SERVER_VERSION:`Server version: `,ADMIN_COMMENT:`Comment`,ADMIN_COMMENT_DELETE:`Delete`,ADMIN_COMMENT_DELETE_CONFIRM:`Confirm deletion?`,ADMIN_COMMENT_FILTER_ALL:`All`,ADMIN_COMMENT_FILTER_VISIBLE:`Visible`,ADMIN_COMMENT_FILTER_HIDDEN:`Hidden`,ADMIN_COMMENT_HIDE:`Hide`,ADMIN_COMMENT_IS_SPAM_SUFFIX:` (Hidden)`,ADMIN_COMMENT_SEARCH:`Search`,ADMIN_COMMENT_SEARCH_PLACEHOLDER:`Search by nick, mail, website, IP, comment, or article path`,ADMIN_COMMENT_SHOW:`Show`,ADMIN_COMMENT_TOP:`Pin`,ADMIN_COMMENT_UNTOP:`Unpin`,ADMIN_COMMENT_VIEW:`View`,ADMIN_COMMENT_SECURITY_ALERT:`The comment link is different from this site! For security reasons, please manually copy the following URL to visit:`,ADMIN_COMMENT_PARSE_ERROR:`Unable to parse comment link. Please check and manually copy the following URL:`,ADMIN_CONFIG:`Configuration`,ADMIN_CONFIG_CATEGORY_COMMON:`General`,ADMIN_CONFIG_CATEGORY_IM:`Instant notification`,ADMIN_CONFIG_CATEGORY_MAIL:`Email notification`,ADMIN_CONFIG_CATEGORY_PLUGIN:`Plugin`,ADMIN_CONFIG_CATEGORY_PRIVACY:`Privacy`,ADMIN_CONFIG_CATEGORY_SPAM:`Spam`,ADMIN_CONFIG_CATEGORY_CAPTCHA:`CAPTCHA`,ADMIN_CONFIG_IMAGE_CDN_NONE:`None (disable image upload)`,ADMIN_CONFIG_CAPTCHA_NONE:`None`,ADMIN_CONFIG_CAPTCHA_TURNSTILE:`Cloudflare Turnstile`,ADMIN_CONFIG_CAPTCHA_GEETEST:`GeeTest`,ADMIN_CONFIG_CAPTCHA_CAP:`Cap`,ADMIN_CONFIG_EMAIL_TEST:`Email notification test`,ADMIN_CONFIG_EMAIL_TEST_BTN:`Send test mail`,ADMIN_CONFIG_EMAIL_TEST_HELP:`Input an email address & send test mail`,ADMIN_CONFIG_EMAIL_TEST_RESULT:`Test result: `,ADMIN_CONFIG_EXAMPLE:`Example: `,ADMIN_CONFIG_ITEM_AKISMET_KEY:`Akismet spam protection. Set to "MANUAL_REVIEW" to enable manual review. Leave it blank to not use anti-spam. Register Akismet: https://akismet.com`,ADMIN_CONFIG_ITEM_BLOGGER_NICK:`Admin nick name.`,ADMIN_CONFIG_ITEM_BLOGGER_EMAIL:`Admin Email address. Used for Email notification and admin identification.`,ADMIN_CONFIG_ITEM_COMMENT_BG_IMG:`URL for custom background image.`,ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE:`Comment page size. Default: 8.`,ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER:`Comment placeholder. Use <br> to start a newline. Default: empty.`,ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN:`CORS allow origin, note: incorrect settings can cause loading failure. Default: blank, format: https://blog.example.com; If you need to add multiple domain names, please use, separate`,ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR:`Avatar placeholder. Default (when empty): "initials". Choose from: "404", "mp", "identicon", "monsterid", "wavatar", "retro", "robohash", "blank"`,ADMIN_CONFIG_ITEM_EMOTION_CDN:`Emoji CDN. Separate by comma. Default: https://owo.imaegoo.com/owo.json`,ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS:`Configure prohibited words. Comments containing prohibited words will be auto spammed. Separate by comma.`,ADMIN_CONFIG_ITEM_BLOCKED_WORDS:`Configure blocked words. Comments containing blocked words will fail to send. Separate by comma.`,ADMIN_CONFIG_ITEM_GRAVATAR_CDN:`Custom avator CDN. (Examples: gravatar.com) Default: weavatar.com.`,ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT:`Set a cipher to hide the management panel entrance, only when the same cipher is entered in the nickname field the management panel entry will be displayed. Leave it blank to not hide the management entrance.`,ADMIN_CONFIG_ITEM_QQ_API_KEY:`QQ nickname API key for fetching QQ nickname. Get it from https://api.nsuuu.com/admin/key`,ADMIN_CONFIG_ITEM_HIGHLIGHT:`Enable code highlighting. If your theme conflicts with code highlighting, please set it to false. Default: true.`,ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME:`Code highlighting theme. Select from: "default", "coy", "dark", "funky", "okaidia", "solarizedlight", "tomorrow", "twilight". Visit https://prismjs.com for preview. If your theme conflicts with code highlighting, please set it to none. Default: none.`,ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN:`Code highlight plug-in, optional: "showLanguage", "copyButton", respectively: show code language, show code copy button. Multiple options can be set at the same time, if you want to add no code highlighting plug-ins, please set it to none. Default: none. `,ADMIN_CONFIG_ITEM_IMAGE_CDN:`The image bed for image uploading. Select from: "qcloud", "7bu (https://7bu.top)", "see (https://s.ee)", "lskypro", "piclist", "easyimage", "chevereto", "S3 / R2 / MinIO"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_URL:`The URL for the image bed. Required if your IMAGE_CDN is one of these: "lskypro", "piclist", "easyimage", "s3"`,ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN:`The image bed token. Unnessessary for qcloud`,ADMIN_CONFIG_ITEM_NSFW_API_URL:`NSFW image detection API URL. Free services: nsfw.qixz.cn, project: github.com/HG-ha/nsfwpy`,ADMIN_CONFIG_ITEM_NSFW_THRESHOLD:`NSFW detection threshold (0-1). Upload will be rejected if score exceeds this value. Default: 0.5`,ADMIN_CONFIG_ITEM_S3_REGION:`S3 region, e.g. us-east-1. Can be any value when using S3-compatible services (e.g. Cloudflare R2, MinIO)`,ADMIN_CONFIG_ITEM_S3_BUCKET:`S3 bucket name`,ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID:`S3 Access Key ID`,ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY:`S3 Secret Access Key`,ADMIN_CONFIG_ITEM_S3_ENDPOINT:`S3 custom endpoint. Required when using S3-compatible services like Cloudflare R2 or MinIO`,ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE:`When S3_ENDPOINT is set, whether to append S3_BUCKET to the upload URL path. Default: true. Use true for Cloudflare R2, MinIO, and other path-style S3-compatible endpoints; set false for bucket-bound custom domains, such as Tencent Cloud COS custom domains.`,ADMIN_CONFIG_ITEM_S3_CDN_URL:`S3 image access domain (CDN domain). Leave empty to use default S3/Endpoint URL`,ADMIN_CONFIG_ITEM_S3_PATH_PREFIX:`S3 image storage path prefix, e.g. images/twikoo. Leave empty to store in root`,ADMIN_CONFIG_ITEM_LIGHTBOX:`Use simple Lightbox effect. Default: false`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE:`How many comments can be posted by each IP every 10 minutes, 0 is unlimited, default: 10.`,ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL:`How many comments can be posted by all IPs every 10 minutes, 0 is unlimited, default: 10.`,ADMIN_CONFIG_ITEM_LIMIT_LENGTH:`Comment length limitation, 0 is unlimited, default: 500.`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT:`Custom Email notification subject. Leave it blank to use the default subject.`,ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN:`Custom admin Email notification subject. Leave it blank to use the default subject.`,ADMIN_CONFIG_ITEM_MAIL_TEMPLATE:"Custom Email notification template. Leave it blank to use the default template. Fields that can be included: ${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IMG}, ${PARENT_IMG}",ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN:"Custom admin Email notification template. Leave it blank to use the default template. Fields that can be included: ${SITE_URL}, ${SITE_NAME}, ${NICK}, ${COMMENT}, ${POST_URL}, ${IP}, ${MAIL}, ${IMG}",ADMIN_CONFIG_ITEM_MASTER_TAG:`Custom admin identifier.`,ADMIN_CONFIG_ITEM_NOTIFY_SPAM:`Notifications for spam comments. Default: true.`,ADMIN_CONFIG_ITEM_HIDE_SPAM:`Hide spam comments from everyone in the public comment section, including admins and comment authors. Comments can still be reviewed and restored in the admin panel. Set to true to enable. Default: false.`,ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER:`CAPTCHA Provider`,ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY:`Turnstile CAPTCHA Site Key. Get from: https://dash.cloudflare.com/?to=/:account/turnstile`,ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY:`Turnstile CAPTCHA Secret Key`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID:`GeeTest CAPTCHA ID. Get from: https://console.geetest.com/sensbot/management`,ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY:`GeeTest CAPTCHA Key`,ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT:`Cap CAPTCHA API endpoint. Leave empty for built-in Cap (no extra server). External Standalone format: https://<instance_url>/<site_key>/`,ADMIN_CONFIG_ITEM_CAP_SECRET_KEY:`Cap Secret Key (external Standalone only; leave empty for built-in)`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID:`Tencent Cloud secret id for spam detection. When Tencent Cloud and Akismet are set at the same time, only Tencent Cloud will take effect. Register: https://twikoo.js.org/cms.html`,ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE:`Tencent Cloud Content Security Biztype name for spam comment policy. Spam blocking rules can be customized`,ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY:`Tencent Cloud secret key.`,ADMIN_CONFIG_ITEM_JEV_API_KEY:`Jev API Key for AI spam detection. Used only when Tencent Cloud and Akismet are not configured, and takes precedence over LLM.`,ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT:`Jev API endpoint URL, default: https://api.typesafe.ai/v1/systemone`,ADMIN_CONFIG_ITEM_JEV_MODEL:`Jev model name, default: jev-latest`,ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD:`Jev spam probability threshold from 0 to 1, default: 0.85`,ADMIN_CONFIG_ITEM_LLM_API_KEY:`LLM API Key for AI spam detection. Used only when Tencent Cloud, Akismet, and Jev are not configured.`,ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT:`LLM API endpoint URL, defaults to https://api.deepseek.com/v1`,ADMIN_CONFIG_ITEM_LLM_MODEL:`LLM model name, default: deepseek-v4-pro`,ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT:`LLM spam detection prompt (optional, uses default if left empty)`,ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES:`LLM detection maximum retries (default 3)`,ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL:`IM notification push channel. Support: "qmsg", "serverchan", "pushplus", "dingtalk", "wecom", "bark", "gocqhttp", "atri", "pushdeer", "igot", "telegram", "feishu"`,ADMIN_CONFIG_ITEM_PUSHOO_TOKEN:`IM notification push token. See https://pushoo.js.org for details`,ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS:`Input boxes displayed on the interface. Default: nick,mail,link`,ADMIN_CONFIG_ITEM_REQUIRED_FIELDS:`Required fields for comments. Set to "nick,mail,link" means all fields are required. Set to "none" means all fields are optional. Default: nick,mail.`,ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY:`Whether to notify admin via IM and email at the same time, the default is to notify admin only via IM. Default: false.`,ADMIN_CONFIG_ITEM_SENDER_EMAIL:`Email address for Email notification. For most email service providers, SENDER_EMAIL must be consistent with SMTP_USER, otherwise emails cannot be sent.`,ADMIN_CONFIG_ITEM_SENDER_NAME:`The title for Email notification.`,ADMIN_CONFIG_ITEM_SHOW_EMOTION:`Enable emojis. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_IMAGE:`Enable picture uploading. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_ORDER:`Show sort dropdown. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_DISLIKE:`Show dislike button. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_UA:`Show users' OS and browser. Default: true.`,ADMIN_CONFIG_ITEM_SHOW_REGION:`Show users' IP region (province). Default: false.`,ADMIN_CONFIG_ITEM_SITE_NAME:`Website name.`,ADMIN_CONFIG_ITEM_SITE_URL:`Website URL.`,ADMIN_CONFIG_ITEM_SMTP_HOST:`Custom SMTP server address. If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_PASS:`Email notification mailbox password. Enter authorization code for QQ/163 mail.`,ADMIN_CONFIG_ITEM_SMTP_PORT:`Custom SMTP port. If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_SECURE:`Custom TLS for SMTP. Enter "true" or "false". If you have configured SMTP_SERVICE, please leave it empty.`,ADMIN_CONFIG_ITEM_SMTP_SERVICE:`Email service provider for Email notification. Support: "126", "163", "1und1", "AOL", "DebugMail", "DynectEmail", "FastMail", "GandiMail", "Gmail", "Godaddy", "GodaddyAsia", "GodaddyEurope", "Hotmail", "Mail.ru", "Maildev", "Mailgun", "Mailjet", "Mailosaur", "Mandrill", "Naver", "OpenMailBox", "Outlook365", "Postmark", "QQ", "QQex", "SES", "SES-EU-WEST-1", "SES-US-EAST-1", "SES-US-WEST-2", "SendCloud", "SendGrid", "SendPulse", "SendinBlue", "Sparkpost", "Yahoo", "Yandex", "Zoho", "hot.ee", "iCloud", "mail.ee", "qiye.aliyun"`,ADMIN_CONFIG_ITEM_SMTP_USER:`Email notification mailbox username.`,ADMIN_CONFIG_RESET:`Reset`,ADMIN_CONFIG_SAVE:`Save`,ADMIN_CONFIG_EXPORT:`Export Config`,ADMIN_CONFIG_IMPORT:`Import Config`,ADMIN_CONFIG_IMPORT_FAILED:`Config import failed: `,ADMIN_CONFIG_IMPORT_INVALID:`Invalid config file format`,ADMIN_CONFIG_IMPORT_SOURCE_INVALID:`Config import only supports files exported by Twikoo. Please select Twikoo as the source system.`,ADMIN_CONFIG_IMPORTED:`Config imported`,ADMIN_CONFIG_IMPORTING:`Importing config`,ADMIN_CREDENTIALS:`Private key file`,ADMIN_CREDENTIALS_FAQ:`How to get the private key`,ADMIN_CREDENTIALS_PLACEHOLDER:`Please paste the contents of the private key file`,ADMIN_FORGOT:`Forget your password`,ADMIN_EXPORT:`Export`,ADMIN_EXPORT_WARN:`Export all data as a JSON file. If you encounter export failures or missing data, connect to the database to export manually`,ADMIN_EXPORT_COMMENT:`Export comment`,ADMIN_EXPORT_COUNTER:`Export counter`,ADMIN_IMPORT:`Import`,ADMIN_IMPORT_FILE_REQUIRED:`No file selected`,ADMIN_IMPORT_IMPORTED:`Imported `,ADMIN_IMPORT_IMPORTING:`Importing `,ADMIN_IMPORT_LOG:`Log`,ADMIN_IMPORT_SELECT:`Select`,ADMIN_IMPORT_SELECT_FILE:`Select file`,ADMIN_IMPORT_SELECT_SOURCE:`Select source`,ADMIN_IMPORT_SOURCE_REQUIRED:`No source selected.`,ADMIN_IMPORT_START:`Start import`,ADMIN_IMPORT_COMMENT:`Import comments`,ADMIN_IMPORT_STARTING:`Importing`,ADMIN_IMPORT_TIP_ARTALK:`Please upload the Artalk export file in JSON format.The file name is usually comments.data.json`,ADMIN_IMPORT_TIP_DISQUS:`Please upload the Disqus export file in XML format. The file name is usually [website name]-[export time]-all.xml`,ADMIN_IMPORT_TIP_VALINE:`Please upload the Valine export file in JSON format. The file name is usually Comment.json`,ADMIN_IMPORT_UPLOADED:`Uploaded `,ADMIN_IMPORT_UPLOADING:`Uploading `,ADMIN_IMPORT_WARN:`Import comments from other comment systems.
172
172
  The data is safe, and the import function is performed entirely in your cloud environment.
173
- Please backup your comment database before importing.`,ADMIN_LOGIN:`Sign in`,ADMIN_LOGIN_TITLE:`Twikoo Management Panel`,ADMIN_LOGOUT:`Sign out`,ADMIN_NEED_UPDATE:`A new version of Twikoo is required for comment management.`,ADMIN_PASSWORD:`Password`,ADMIN_PASSWORD_PLACEHOLDER:`Enter your password...`,ADMIN_PASSWORD_REQUIRED:`Please enter your password`,ADMIN_REGIST:`Register`,ADMIN_REGIST_FAILED:`Register failed`,ADMIN_SET_PASSWORD:`Set password`,ADMIN_SET_PASSWORD_CONFIRM:`Confirm password`,ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER:`Confirm password...`,ADMIN_SET_PASSWORD_PLACEHOLDER:`Password`,ADMIN_TITLE:`Twikoo Management Panel`,COMMENTS_SEARCH:`Search`,COMMENTS_SEARCH_PLACEHOLDER:`Search comments`,COMMENTS_SEARCH_NO_RESULT:`No comments found`,COMMENTS_SEARCH_COUNT_PREFIX:`Found `,COMMENTS_COUNT_SUFFIX:` comments`,COMMENTS_SORT_NEWEST:`Newest`,COMMENTS_SORT_OLDEST:`Oldest`,COMMENTS_SORT_POPULAR:`Popular`,COMMENTS_EXPAND:`Load more`,COMMENTS_NO_COMMENTS:`No comment`,COMMENT_EXPAND:`Read more`,COMMENT_COLLAPSE:`Collapse`,COMMENT_MASTER_TAG:`Admin`,COMMENT_REPLIED:`Reply`,COMMENT_DELETE_CONFIRM:`Delete your comment?`,COMMENT_REVIEWING_TAG:`Pending`,COMMENT_TOP_TAG:`Pinned`,COMMENT_FAILED:`Comment failed`,META_INPUT_LINK:`Website`,META_INPUT_MAIL:`Email`,META_INPUT_NICK:`Nickname`,META_INPUT_NOT_REQUIRED:`Optional`,META_INPUT_REQUIRED:`Required`,PAGINATION_COUNT_PREFIX:``,PAGINATION_COUNT_SUFFIX:` entries`,PAGINATION_GOTO_PREFIX:`Goto page`,PAGINATION_GOTO_SUFFIX:``,PAGINATION_PAGESIZE:`entries/page`,SUBMIT_CANCEL:`Cancel`,SUBMIT_PREVIEW:`Preview`,SUBMIT_SEND:`Send`,IMAGE_UPLOAD_PLACEHOLDER:`Uploading image`,IMAGE_UPLOAD_FAILED:`IMAGE UPLOAD FAILED`,IMAGE_UPLOAD_NSFW:`Image contains inappropriate content, upload rejected`,IMAGE_UPLOAD_FAILED_NO_CONF:`The blogger didn't configured any image bed service`,IMAGE_UPLOAD_PLEASE_WAIT:`Uploading image, please try again later`,SUBMIT_SENDING:`Sending`,TIMEAGO_DAYS:`days ago`,TIMEAGO_HOURS:`hours ago`,TIMEAGO_MINUTES:`minutes ago`,TIMEAGO_NOW:`Just now`,TIMEAGO_SECONDS:`seconds ago`},Lo=`en`,Ro={"zh-CN":Fo,en:Io},zo={},Bo={zh:`zh-CN`,"zh-cn":`zh-CN`,"zh-hk":`zh-HK`,"zh-tw":`zh-TW`,en:`en`,"en-us":`en`,"en-gb":`en`,uz:`uz-UZ`,"uz-uz":`uz-UZ`,ja:`ja-JP`,"ja-jp":`ja-JP`,ko:`ko-KR`,"ko-kr":`ko-KR`,vi:`vi-VN`,"vi-vn":`vi-VN`,id:`id-ID`,"id-id":`id-ID`},Vo=Lo,Ho=``;function Uo(){if(typeof document>`u`)return``;let e=document.currentScript?.src??``;if(!e){let t=document.querySelectorAll(`script[src]`);for(let n=t.length-1;n>=0;--n){let r=t[n].src;if(/twikoo/i.test(r)){e=r;break}}}return e?e.slice(0,e.lastIndexOf(`/`)):``}function Wo(e={}){let t=e.lang?.toLowerCase(),n=typeof navigator>`u`?void 0:navigator.language?.toLowerCase();return t&&Bo[t]||n&&Bo[n]||Lo}async function Go(e={}){let t=Wo(e);if(Vo=t,Ro[t]||zo[t])return;let n=(e.localeBaseUrl||Ho||Uo()).replace(/\/+$/,``);if(!n){console.warn(`[twikoo] 无法推导语言分片基址,${t} 回退英文`);return}let r=`${n}/locales/${t}.js`;try{let e=await import(r),n=e.default??e;n&&typeof n==`object`?zo[t]=n:console.warn(`[twikoo] 语言分片 ${t} 形态异常,回退英文`)}catch(e){console.warn(`[twikoo] 语言分片 ${r} 加载失败,回退英文:`,e instanceof Error?e.message:String(e))}}function W(e,t){let n=t&&Bo[t.toLowerCase()]||Vo;return(zo[n]??Ro[n])?.[e]??Ro[Lo]?.[e]??``}function Ko(e,t){this.v=e,this.k=t}function qo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Jo(e){if(Array.isArray(e))return e}function Yo(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Xo(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
174
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zo(e,t){return Jo(e)||Yo(e,t)||Qo(e,t)||Xo()}function Qo(e,t){if(e){if(typeof e==`string`)return qo(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qo(e,t):void 0}}function $o(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Ko;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}$o.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},$o.prototype.next=function(e){return this._invoke(`next`,e)},$o.prototype.throw=function(e){return this._invoke(`throw`,e)},$o.prototype.return=function(e){return this._invoke(`return`,e)};var es=Object.entries,ts=Object.setPrototypeOf,ns=Object.isFrozen,rs=Object.getPrototypeOf,is=Object.getOwnPropertyDescriptor,as=Object.freeze,os=Object.seal,ss=Object.create,cs=typeof Reflect<`u`&&Reflect,ls=cs.apply,us=cs.construct;as||=function(e){return e},os||=function(e){return e},ls||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},us||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var ds=js(Array.prototype.forEach);Array.prototype.indexOf;var fs=js(Array.prototype.lastIndexOf),ps=js(Array.prototype.pop),ms=js(Array.prototype.push);Array.prototype.slice;var hs=js(Array.prototype.splice),gs=Array.isArray,_s=js(String.prototype.toLowerCase),vs=js(String.prototype.toString),ys=js(String.prototype.match),bs=js(String.prototype.replace),xs=js(String.prototype.indexOf),Ss=js(String.prototype.trim),Cs=js(Number.prototype.toString),ws=js(Boolean.prototype.toString),Ts=typeof BigInt>`u`?null:js(BigInt.prototype.toString),Es=typeof Symbol>`u`?null:js(Symbol.prototype.toString),Ds=js(Object.prototype.hasOwnProperty),Os=js(Object.prototype.toString),ks=js(RegExp.prototype.test),As=Ms(TypeError);function js(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ls(e,t,r)}}function Ms(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return us(e,n)}}function Ns(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_s;if(ts&&ts(e,null),!gs(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ns(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ps(e){for(let t=0;t<e.length;t++)Ds(e,t)||(e[t]=null);return e}function Fs(e){let t=ss(null);for(let r of es(e)){var n=Zo(r,2);let i=n[0],a=n[1];Ds(e,i)&&(t[i]=gs(a)?Ps(a):a&&typeof a==`object`&&a.constructor===Object?Fs(a):a)}return t}function Is(e){switch(typeof e){case`string`:return e;case`number`:return Cs(e);case`boolean`:return ws(e);case`bigint`:return Ts?Ts(e):`0`;case`symbol`:return Es?Es(e):`Symbol()`;case`undefined`:return Os(e);case`function`:case`object`:{if(e===null)return Os(e);let t=e,n=Ls(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Os(e)}return Os(e)}default:return Os(e)}}function Ls(e,t){for(;e!==null;){let n=is(e,t);if(n){if(n.get)return js(n.get);if(typeof n.value==`function`)return js(n.value)}e=rs(e)}function n(){return null}return n}function Rs(e){try{return ks(e,``),!0}catch{return!1}}var zs=as(`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`.split(`.`)),Bs=as(`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`.split(`.`)),Vs=as([`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`]),Hs=as([`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`]),Us=as(`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`.split(`.`)),Ws=as([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Gs=as([`#text`]),Ks=as(`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`.split(`.`)),qs=as(`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`.split(`.`)),Js=as(`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`.split(`.`)),Ys=as([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Xs=os(/{{[\w\W]*|^[\w\W]*}}/g),Zs=os(/<%[\w\W]*|^[\w\W]*%>/g),Qs=os(/\${[\w\W]*/g),$s=os(/^data-[\-\w.\u00B7-\uFFFF]+$/),ec=os(/^aria-[\-\w]+$/),tc=os(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nc=os(/^(?:\w+script|data):/i),rc=os(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ic=os(/^html$/i),ac=os(/^[a-z][.\w]*(-[.\w]+)+$/i),oc=os(/<[/\w!]/g),sc=os(/<[/\w]/g),cc=os(/<\/no(script|embed|frames)/i),lc=os(/\/>/i),uc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},dc=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],fc=as(Ns({},dc)),pc=function(){let e={};return ds(dc,t=>{e[t]=os(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),as(e)}(),mc=function(){return typeof window>`u`?null:window},hc=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},gc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_c=function(e,t,n,r){return Ds(e,t)&&gs(e[t])?Ns(r.base?Fs(r.base):{},e[t],r.transform):n},vc=function(e,t,n){let r=Ds(e,t)?e[t]:void 0;return r&&typeof r==`object`?Fs(r):n()};function yc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mc(),t=e=>yc(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==uc.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ls(d,`cloneNode`),p=Ls(d,`remove`),m=Ls(d,`removeAttributeNode`),h=Ls(d,`nextSibling`),g=Ls(d,`childNodes`),_=Ls(d,`parentNode`),v=Ls(d,`shadowRoot`),y=Ls(d,`attributes`),b=o&&o.prototype?Ls(o.prototype,`nodeType`):null,x=o&&o.prototype?Ls(o.prototype,`nodeName`):null,S=o&&o.prototype?Ls(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,ee=!1,te=0,O=function(){if(te>0)throw As(`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.`)},k=function(e){O(),te++;try{return T.createHTML(e)}finally{te--}},A=function(e){O(),te++;try{return T.createScriptURL(e)}finally{te--}},ne=function(){return ee||=(D=hc(u,i),!0),D},re=n,ie=re.implementation,ae=re.createNodeIterator,oe=re.createDocumentFragment,se=re.getElementsByTagName,ce=r.importNode,le=gc();t.isSupported=typeof es==`function`&&typeof _==`function`&&ie&&ie.createHTMLDocument!==void 0;let ue=Xs,de=Zs,fe=Qs,pe=$s,me=ec,he=nc,ge=rc,_e=ac,ve=tc,j=null,ye=Ns({},[...zs,...Bs,...Vs,...Us,...Gs]),be=null,xe=Ns({},[...Ks,...qs,...Js,...Ys]),Se=Object.seal(ss(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}})),Ce=null,we=null,Te=Object.seal(ss(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),M=!0,Ee=!0,N=!1,P=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,Ne=!1,Pe=!1,Fe=!1,Ie=!1,Le=!0,Re=!1,ze=`user-content-`,Be=!0,Ve=!1,He={},Ue=null,We=Ns({},`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`.split(`.`)),Ge=null,Ke=Ns({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=Ns({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,F=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=Ns({},[Ye,F,Xe],vs),I=as([`mi`,`mo`,`mn`,`ms`,`mtext`]),tt=Ns({},I),L=as([`annotation-xml`]),R=Ns({},L),nt=Ns({},[`title`,`style`,`font`,`a`,`script`]),rt=null,it=[`application/xhtml+xml`,`text/html`],at=null,z=null,ot=n.createElement(`form`),st=function(e){return e instanceof RegExp||e instanceof Function},ct=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(z&&z===e)return;(!e||typeof e!=`object`)&&(e={}),e=Fs(e),rt=it.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,at=rt===`application/xhtml+xml`?vs:_s,j=_c(e,`ALLOWED_TAGS`,ye,{transform:at}),be=_c(e,`ALLOWED_ATTR`,xe,{transform:at}),$e=_c(e,`ALLOWED_NAMESPACES`,et,{transform:vs}),qe=_c(e,`ADD_URI_SAFE_ATTR`,Je,{transform:at,base:Je}),Ge=_c(e,`ADD_DATA_URI_TAGS`,Ke,{transform:at,base:Ke}),Ue=_c(e,`FORBID_CONTENTS`,We,{transform:at}),Ce=_c(e,`FORBID_TAGS`,Fs({}),{transform:at}),we=_c(e,`FORBID_ATTR`,Fs({}),{transform:at}),He=Ds(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Fs(e.USE_PROFILES):e.USE_PROFILES:!1,M=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,N=e.ALLOW_UNKNOWN_PROTOCOLS||!1,P=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,ve=Rs(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:tc,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,tt=vc(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Ns({},I)),R=vc(e,`HTML_INTEGRATION_POINTS`,()=>Ns({},L));let t=vc(e,`CUSTOM_ELEMENT_HANDLING`,()=>ss(null));if(Se=ss(null),Ds(t,`tagNameCheck`)&&st(t.tagNameCheck)&&(Se.tagNameCheck=t.tagNameCheck),Ds(t,`attributeNameCheck`)&&st(t.attributeNameCheck)&&(Se.attributeNameCheck=t.attributeNameCheck),Ds(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Se.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),os(Se),De&&(Ee=!1),Fe&&(Pe=!0),He&&(j=Ns({},Gs),be=ss(null),He.html===!0&&(Ns(j,zs),Ns(be,Ks)),He.svg===!0&&(Ns(j,Bs),Ns(be,qs),Ns(be,Ys)),He.svgFilters===!0&&(Ns(j,Vs),Ns(be,qs),Ns(be,Ys)),He.mathMl===!0&&(Ns(j,Us),Ns(be,Js),Ns(be,Ys))),Te.tagCheck=null,Te.attributeCheck=null,Ds(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Te.tagCheck=e.ADD_TAGS:gs(e.ADD_TAGS)&&(j===ye&&(j=Fs(j)),Ns(j,e.ADD_TAGS,at))),Ds(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Te.attributeCheck=e.ADD_ATTR:gs(e.ADD_ATTR)&&(be===xe&&(be=Fs(be)),Ns(be,e.ADD_ATTR,at))),Ds(e,`ADD_FORBID_CONTENTS`)&&gs(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=Fs(Ue)),Ns(Ue,e.ADD_FORBID_CONTENTS,at)),Be&&(j[`#text`]=!0),ke&&Ns(j,[`html`,`head`,`body`]),j.table&&(Ns(j,[`tbody`]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw As(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw As(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=k(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=k(``)));as&&as(e),z=e},lt=Ns({},[...Bs,...Vs,...Hs]),ut=Ns({},[...Us,...Ws]),dt=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===Ye?e===`svg`&&(n===`annotation-xml`||tt[n]):!!lt[e]},ft=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===F?e===`math`&&R[n]:!!ut[e]},pt=function(e,t,n){return t.namespaceURI===F&&!R[n]||t.namespaceURI===Ye&&!tt[n]?!1:!ut[e]&&(nt[e]||!lt[e])},mt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=_s(e.tagName),r=_s(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===F?dt(n,t,r):e.namespaceURI===Ye?ft(n,t,r):e.namespaceURI===Xe?pt(n,t,r):!!(rt===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},ht=function(e){ms(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw As(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},gt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},_t=function(e){bt(e);let t=g(e);if(t){let e=[];ds(t,t=>{ms(e,t)}),ds(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&gt(e,r,i)}},vt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ms(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Pe||Fe)try{ht(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},yt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||be[at(i)]||gt(e,r,i)}},bt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===uc.element&&yt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},xt=function(e,t){return Oe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},St=function(e){if(!Oe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===uc.processingInstruction||n===uc.comment&&ks(sc,e.data)){try{p(e)}catch{}continue}if(n===uc.element){let t=e,n=at(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&xt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Ct=function(e){let t=null,r=null;if(Ne)e=`<remove></remove>`+e;else{let t=ys(e,/^[\r\n\t ]+/);r=t&&t[0]}rt===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?k(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,rt)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?se.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},wt=function(e){let t=S?S(e):e.ownerDocument;return ae.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},B=function(e){return e=bs(e,ue,` `),e=bs(e,de,` `),e=bs(e,fe,` `),e},Tt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ae.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=B(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ds(i,e=>{H(e.content)&&Tt(e.content)})},V=function(e){let t=x?x(e):null;return typeof t!=`string`||at(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},H=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===uc.documentFragment}catch{return!1}},U=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Et(e,n,r){e.length!==0&&ds(e,e=>{e.call(t,n,r,z)})}let Dt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!U(e.firstElementChild)&&ks(oc,e.textContent)&&ks(oc,e.innerHTML)||Oe&&e.namespaceURI===Xe&&fc[t]&&(U(e.firstElementChild)||typeof e.textContent==`string`&&ks(pc[t],e.textContent))||e.nodeType===uc.processingInstruction||Oe&&e.nodeType===uc.comment&&ks(sc,e.data))},Ot=function(e,t){if(e instanceof RegExp)return ks(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},kt=function(e,t,n){if(!Ce[t]&&Ft(t)&&Ot(Se.tagNameCheck,t))return!1;if(Be&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return ht(e),!0},At=function(e,t,n,r){return e.length===0?t:t===n||t===r?Fs(t):t},jt=function(e,t){return e===t||_(e)!==null?!1:(Ve&&bt(e),!0)},Mt=function(e,n){if(Et(le.beforeSanitizeElements,e,null),jt(e,n))return!0;if(V(e))return ht(e),!0;let r=at(w(e));if(j=At(le.uponSanitizeElement,j,ye,je),Et(le.uponSanitizeElement,e,{tagName:r,allowedTags:j}),jt(e,n))return!0;if(Dt(e,r))return ht(e),!0;if(Ce[r]||!(Te.tagCheck instanceof Function&&Te.tagCheck(r))&&!j[r]){let t=kt(e,r,n);return t===!1&&(Et(le.afterSanitizeElements,e,null),jt(e,n))?!0:t}if(C(e)===uc.element&&!mt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ks(cc,e.innerHTML))return ht(e),!0;if(De&&e.nodeType===uc.text){let n=B(e.textContent);e.textContent!==n&&(ms(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Et(le.afterSanitizeElements,e,null),jt(e,n)},Nt=function(e,t,r){if(we[t]||xt(t,e)||Le&&(t===`id`||t===`name`)&&(r in n||r in ot))return!1;let i=be[t]||Te.attributeCheck instanceof Function&&Te.attributeCheck(t,e);return Ee&&ks(pe,t)||M&&ks(me,t)?!0:i?qe[t]||ks(ve,bs(r,ge,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&xs(r,`data:`)===0&&Ge[e]||N&&!ks(he,bs(r,ge,``))?!0:!r:Ft(e)&&Ot(Se.tagNameCheck,e)&&Ot(Se.attributeNameCheck,t,e)||t===`is`&&Se.allowCustomizedBuiltInElements&&Ot(Se.tagNameCheck,r)},Pt=Ns({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ft=function(e){return!Pt[_s(e)]&&ks(_e,e)},It=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return A(r)}return r},Lt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!V(e)||(ht(e),!1)}catch{return vt(t,e),!1}},Rt=function(e,n){if(Et(le.beforeSanitizeAttributes,e,null),jt(e,n))return;let r=e.attributes;if(!r||V(e))return;be=At(le.uponSanitizeAttribute,be,xe,Me);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0},a=r.length,o=at(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=at(s),d=l,f=s===`value`?d:Ss(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Et(le.uponSanitizeAttribute,e,i),f=i.attrValue,Re&&(u===`id`||u===`name`)&&xs(f,ze)!==0&&(vt(s,e,n),f=ze+f,p=!0),Oe&&ks(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){vt(s,e,n);continue}if(u===`attributename`&&ys(f,`href`)){vt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){vt(s,e,n);continue}if(!P&&ks(lc,f)){vt(s,e,n);continue}if(De&&(f=B(f)),!Nt(o,u,f)){vt(s,e,n);continue}f=It(o,u,c,f),f!==d&&Lt(e,s,c,f)&&p&&ps(t.removed)}}Et(le.afterSanitizeAttributes,e,null),jt(e,n)},zt=function(e){let t=null,n=wt(e);for(Et(le.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Et(le.uponSanitizeShadowNode,t,null),Mt(t,e),Rt(t,e),H(t.content)&&zt(t.content),C(t)===uc.element){let e=v(t);H(e)&&(Bt(e),zt(e))}Et(le.afterSanitizeShadowDOM,e,null)},Bt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){zt(e.shadow);continue}let n=e.node,r=C(n)===uc.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&at(e)===`template`){let e=n.content;H(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);H(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!U(e)&&(e=Is(e),typeof e!=`string`))throw As(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(j=je,be=Me):ct(n),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(j=Fs(j)),le.uponSanitizeAttribute.length>0&&(be=Fs(be)),t.removed=[];let c=Ve&&typeof e!=`string`&&U(e);if(c){St(e);let t=w(e);if(typeof t==`string`){let n=at(t);if(!j[n]||Ce[n])throw _t(e),As(`root node is forbidden and cannot be sanitized in-place`)}if(V(e))throw _t(e),As(`root node is clobbered and cannot be sanitized in-place`);try{Bt(e)}catch(t){throw _t(e),t}}else if(U(e))i=Ct(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===uc.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Bt(i);else{if(!Pe&&!De&&!ke&&e.indexOf(`<`)===-1)return T&&Ie?k(e):e;if(i=Ct(e),!i)return Pe?null:Ie?E:``}i&&Ne&&ht(i.firstChild);let l=c?e:i;try{let e=wt(l);for(;o=e.nextNode();)Mt(o,l),Rt(o,l),H(o.content)&&zt(o.content)}catch(n){throw c&&(_t(e),ds(t.removed,e=>{e.element&&bt(e.element)})),n}if(c){let n=!1;if(ds(t.removed,t=>{t.element&&(t.element===e&&(n=!0),bt(t.element))}),n)throw As(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return De&&Tt(e),e}if(Pe){if(De&&Tt(i),Fe)for(s=oe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(be.shadowroot||be.shadowrootmode)&&(s=ce.call(r,s,!0)),s}let u=ke?i.outerHTML:i.innerHTML;return ke&&j[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ks(ic,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
175
- `+u),De&&(u=B(u)),T&&Ie?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ct(e),Ae=!0,je=j,Me=be},t.clearConfig=function(){z=null,Ae=!1,je=null,Me=null,T=D,E=``},t.isValidAttribute=function(e,t,n){z||ct({});let r=at(e),i=at(t);return Nt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Ds(le,e)&&ms(le[e],t)},t.removeHook=function(e,t){if(Ds(le,e)){if(t!==void 0){let n=fs(le[e],t);return n===-1?void 0:hs(le[e],n,1)[0]}return ps(le[e])}},t.removeHooks=function(e){Ds(le,e)&&(le[e]=[])},t.removeAllHooks=function(){le=gc()},t}var bc=yc();function xc(e){return bc.sanitize(typeof e==`string`?e:``,{FORBID_TAGS:[`style`],FORBID_ATTR:[`style`]})}var Sc=s(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,ee=E.index+E[0].length,te=C;for(te+=S.value.length;D>=te;)S=S.next,te+=S.value.length;if(te-=S.value.length,C=te,S.value instanceof a)continue;for(var O=S;O!==t.tail&&(te<ee||typeof O.value==`string`);O=O.next)T++,te+=O.value.length;T--,w=e.slice(C,te),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,k=E[0],A=w.slice(0,D),ne=w.slice(D+k.length),re=C+w.length;d&&re>d.reach&&(d.reach=re);var ie=S.prev;A&&(ie=l(t,ie,A),C+=A.length),u(t,ie,T);var ae=new a(f,g?i.tokenize(k,g):k,y,k);if(S=l(t,ie,ae),ne&&l(t,S,ne),T>1){var oe={cause:f+`,`+m,reach:re};s(e,t,n,S.prev,C,oe),d&&oe.reach>d.reach&&(d.reach=oe.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
176
- `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})),Cc=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;var e={javascript:`clike`,actionscript:`javascript`,apex:[`clike`,`sql`],arduino:`cpp`,aspnet:[`markup`,`csharp`],birb:`clike`,bison:`c`,c:`clike`,csharp:`clike`,cpp:`c`,cfscript:`clike`,chaiscript:[`clike`,`cpp`],cilkc:`c`,cilkcpp:`cpp`,coffeescript:`javascript`,crystal:`ruby`,"css-extras":`css`,d:`clike`,dart:`clike`,django:`markup-templating`,ejs:[`javascript`,`markup-templating`],etlua:[`lua`,`markup-templating`],erb:[`ruby`,`markup-templating`],fsharp:`clike`,"firestore-security-rules":`clike`,flow:`javascript`,ftl:`markup-templating`,gml:`clike`,glsl:`c`,go:`clike`,gradle:`clike`,groovy:`clike`,haml:`ruby`,handlebars:`markup-templating`,haxe:`clike`,hlsl:`c`,idris:`haskell`,java:`clike`,javadoc:[`markup`,`java`,`javadoclike`],jolie:`clike`,jsdoc:[`javascript`,`javadoclike`,`typescript`],"js-extras":`javascript`,json5:`json`,jsonp:`json`,"js-templates":`javascript`,kotlin:`clike`,latte:[`clike`,`markup-templating`,`php`],less:`css`,lilypond:`scheme`,liquid:`markup-templating`,markdown:`markup`,"markup-templating":`markup`,mongodb:`javascript`,n4js:`javascript`,objectivec:`c`,opencl:`c`,parser:`markup`,php:`markup-templating`,phpdoc:[`php`,`javadoclike`],"php-extras":`php`,plsql:`sql`,processing:`clike`,protobuf:`clike`,pug:[`markup`,`javascript`],purebasic:`clike`,purescript:`haskell`,qsharp:`clike`,qml:`javascript`,qore:`clike`,racket:`scheme`,cshtml:[`markup`,`csharp`],jsx:[`markup`,`javascript`],tsx:[`jsx`,`typescript`],reason:`clike`,ruby:`clike`,sass:`css`,scss:`css`,scala:`java`,"shell-session":`bash`,smarty:`markup-templating`,solidity:`clike`,soy:`markup-templating`,sparql:`turtle`,sqf:`clike`,squirrel:`clike`,stata:[`mata`,`java`,`python`],"t4-cs":[`t4-templating`,`csharp`],"t4-vb":[`t4-templating`,`vbnet`],tap:`yaml`,tt2:[`clike`,`markup-templating`],textile:`markup`,twig:`markup-templating`,typescript:`javascript`,v:`clike`,vala:`clike`,vbnet:`basic`,velocity:`markup`,wiki:`markup`,xeora:`markup`,"xml-doc":`markup`,xquery:`markup`},t={html:`markup`,xml:`markup`,svg:`markup`,mathml:`markup`,ssml:`markup`,atom:`markup`,rss:`markup`,js:`javascript`,g4:`antlr4`,ino:`arduino`,"arm-asm":`armasm`,art:`arturo`,adoc:`asciidoc`,avs:`avisynth`,avdl:`avro-idl`,gawk:`awk`,sh:`bash`,shell:`bash`,shortcode:`bbcode`,rbnf:`bnf`,oscript:`bsl`,cs:`csharp`,dotnet:`csharp`,cfc:`cfscript`,"cilk-c":`cilkc`,"cilk-cpp":`cilkcpp`,cilk:`cilkcpp`,coffee:`coffeescript`,conc:`concurnas`,jinja2:`django`,"dns-zone":`dns-zone-file`,dockerfile:`docker`,gv:`dot`,eta:`ejs`,xlsx:`excel-formula`,xls:`excel-formula`,gamemakerlanguage:`gml`,po:`gettext`,gni:`gn`,ld:`linker-script`,"go-mod":`go-module`,hbs:`handlebars`,mustache:`handlebars`,hs:`haskell`,idr:`idris`,gitignore:`ignore`,hgignore:`ignore`,npmignore:`ignore`,webmanifest:`json`,kt:`kotlin`,kts:`kotlin`,kum:`kumir`,tex:`latex`,context:`latex`,ly:`lilypond`,emacs:`lisp`,elisp:`lisp`,"emacs-lisp":`lisp`,md:`markdown`,moon:`moonscript`,n4jsd:`n4js`,nani:`naniscript`,objc:`objectivec`,qasm:`openqasm`,objectpascal:`pascal`,px:`pcaxis`,pcode:`peoplecode`,plantuml:`plant-uml`,pq:`powerquery`,mscript:`powerquery`,pbfasm:`purebasic`,purs:`purescript`,py:`python`,qs:`qsharp`,rkt:`racket`,razor:`cshtml`,rpy:`renpy`,res:`rescript`,robot:`robotframework`,rb:`ruby`,"sh-session":`shell-session`,shellsession:`shell-session`,smlnj:`sml`,sol:`solidity`,sln:`solution-file`,rq:`sparql`,sclang:`supercollider`,t4:`t4-cs`,trickle:`tremor`,troy:`tremor`,trig:`turtle`,ts:`typescript`,tsconfig:`typoscript`,uscript:`unrealscript`,uc:`unrealscript`,url:`uri`,vb:`visual-basic`,vba:`visual-basic`,webidl:`web-idl`,mathematica:`wolfram`,nb:`wolfram`,wl:`wolfram`,xeoracube:`xeora`,yml:`yaml`},n={},r=`none`,i=`components/`,a=Prism.util.currentScript();if(a){var o=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,c=a.getAttribute(`data-autoloader-path`);if(c!=null)i=c.trim().replace(/\/?$/,`/`);else{var l=a.src;o.test(l)?i=l.replace(o,`components/`):s.test(l)&&(i=l.replace(s,`$1components/`))}}var u=Prism.plugins.autoloader={languages_path:i,use_minified:!0,loadLanguages:h};function d(e,t,n){var r=document.createElement(`script`);r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),t&&t()},r.onerror=function(){document.body.removeChild(r),n&&n()},document.body.appendChild(r)}function f(e){var t=(e.getAttribute(`data-dependencies`)||``).trim();if(!t){var n=e.parentElement;n&&n.tagName.toLowerCase()===`pre`&&(t=(n.getAttribute(`data-dependencies`)||``).trim())}return t?t.split(/\s*,\s*/g):[]}function p(e){if(e.indexOf(`!`)>=0)return!1;if(e=t[e]||e,e in Prism.languages)return!0;var r=n[e];return r&&!r.error&&r.loading===!1}function m(e){return u.languages_path+`prism-`+e+(u.use_minified?`.min`:``)+`.js`}function h(e,t,n){typeof e==`string`&&(e=[e]);var r=e.length,i=0,a=!1;if(r===0){t&&setTimeout(t,0);return}function o(){a||(i++,i===r&&t&&t(e))}e.forEach(function(e){g(e,o,function(){a||(a=!0,n&&n(e))})})}function g(r,i,a){var o=r.indexOf(`!`)>=0;r=r.replace(`!`,``),r=t[r]||r;function s(){var e=n[r];e||=n[r]={callbacks:[]},e.callbacks.push({success:i,error:a}),!o&&p(r)?_(r,`success`):!o&&e.error?_(r,`error`):(o||!e.loading)&&(e.loading=!0,e.error=!1,d(m(r),function(){e.loading=!1,_(r,`success`)},function(){e.loading=!1,e.error=!0,_(r,`error`)}))}var c=e[r];c&&c.length?h(c,s,a):s()}function _(e,t){if(n[e]){for(var r=n[e].callbacks,i=0,a=r.length;i<a;i++){var o=r[i][t];o&&setTimeout(o,0)}r.length=0}}Prism.hooks.add(`complete`,function(e){var t=e.element,n=e.language;if(t&&n&&n!==r){var i=f(t);/^diff-./i.test(n)?(i.push(`diff`),i.push(n.substr(5))):i.push(n),i.every(p)||h(i,function(){Prism.highlightElement(t)})}})})()})),wc=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;var e=[],t={},n=function(){};Prism.plugins.toolbar={};var r=Prism.plugins.toolbar.registerButton=function(n,r){var i=typeof r==`function`?r:function(e){var t;return typeof r.onClick==`function`?(t=document.createElement(`button`),t.type=`button`,t.addEventListener(`click`,function(){r.onClick.call(this,e)})):typeof r.url==`string`?(t=document.createElement(`a`),t.href=r.url):t=document.createElement(`span`),r.className&&t.classList.add(r.className),t.textContent=r.text,t};if(n in t){console.warn(`There is a button with the key "`+n+`" registered already.`);return}e.push(t[n]=i)};function i(e){for(;e;){var t=e.getAttribute(`data-toolbar-order`);if(t!=null)return t=t.trim(),t.length?t.split(/\s*,\s*/g):[];e=e.parentElement}}var a=Prism.plugins.toolbar.hook=function(r){var a=r.element.parentNode;if(a&&/pre/i.test(a.nodeName)&&!a.parentNode.classList.contains(`code-toolbar`)){var o=document.createElement(`div`);o.classList.add(`code-toolbar`),a.parentNode.insertBefore(o,a),o.appendChild(a);var s=document.createElement(`div`);s.classList.add(`toolbar`);var c=e,l=i(r.element);l&&(c=l.map(function(e){return t[e]||n})),c.forEach(function(e){var t=e(r);if(t){var n=document.createElement(`div`);n.classList.add(`toolbar-item`),n.appendChild(t),s.appendChild(n)}}),o.appendChild(s)}};r(`label`,function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute(`data-label`)){var n,r,i=t.getAttribute(`data-label`);try{r=document.querySelector(`template#`+i)}catch{}return r?n=r.content:(t.hasAttribute(`data-url`)?(n=document.createElement(`a`),n.href=t.getAttribute(`data-url`)):n=document.createElement(`span`),n.textContent=i),n}}),Prism.hooks.add(`complete`,a)})()})),Tc=s((()=>{(function(){if(typeof Prism<`u`&&typeof document<`u`){if(!Prism.plugins.toolbar){console.warn(`Show Languages plugin loaded before Toolbar plugin.`);return}var e={none:`Plain text`,plain:`Plain text`,plaintext:`Plain text`,text:`Plain text`,txt:`Plain text`,html:`HTML`,xml:`XML`,svg:`SVG`,mathml:`MathML`,ssml:`SSML`,rss:`RSS`,css:`CSS`,clike:`C-like`,js:`JavaScript`,abap:`ABAP`,abnf:`ABNF`,al:`AL`,antlr4:`ANTLR4`,g4:`ANTLR4`,apacheconf:`Apache Configuration`,apl:`APL`,aql:`AQL`,ino:`Arduino`,arff:`ARFF`,armasm:`ARM Assembly`,"arm-asm":`ARM Assembly`,art:`Arturo`,asciidoc:`AsciiDoc`,adoc:`AsciiDoc`,aspnet:`ASP.NET (C#)`,asm6502:`6502 Assembly`,asmatmel:`Atmel AVR Assembly`,autohotkey:`AutoHotkey`,autoit:`AutoIt`,avisynth:`AviSynth`,avs:`AviSynth`,"avro-idl":`Avro IDL`,avdl:`Avro IDL`,awk:`AWK`,gawk:`GAWK`,sh:`Shell`,basic:`BASIC`,bbcode:`BBcode`,bbj:`BBj`,bnf:`BNF`,rbnf:`RBNF`,bqn:`BQN`,bsl:`BSL (1C:Enterprise)`,oscript:`OneScript`,csharp:`C#`,cs:`C#`,dotnet:`C#`,cpp:`C++`,cfscript:`CFScript`,cfc:`CFScript`,cil:`CIL`,cilkc:`Cilk/C`,"cilk-c":`Cilk/C`,cilkcpp:`Cilk/C++`,"cilk-cpp":`Cilk/C++`,cilk:`Cilk/C++`,cmake:`CMake`,cobol:`COBOL`,coffee:`CoffeeScript`,conc:`Concurnas`,csp:`Content-Security-Policy`,"css-extras":`CSS Extras`,csv:`CSV`,cue:`CUE`,dataweave:`DataWeave`,dax:`DAX`,django:`Django/Jinja2`,jinja2:`Django/Jinja2`,"dns-zone-file":`DNS zone file`,"dns-zone":`DNS zone file`,dockerfile:`Docker`,dot:`DOT (Graphviz)`,gv:`DOT (Graphviz)`,ebnf:`EBNF`,editorconfig:`EditorConfig`,ejs:`EJS`,etlua:`Embedded Lua templating`,erb:`ERB`,"excel-formula":`Excel Formula`,xlsx:`Excel Formula`,xls:`Excel Formula`,fsharp:`F#`,"firestore-security-rules":`Firestore security rules`,ftl:`FreeMarker Template Language`,gml:`GameMaker Language`,gamemakerlanguage:`GameMaker Language`,gap:`GAP (CAS)`,gcode:`G-code`,gdscript:`GDScript`,gedcom:`GEDCOM`,gettext:`gettext`,po:`gettext`,glsl:`GLSL`,gn:`GN`,gni:`GN`,"linker-script":`GNU Linker Script`,ld:`GNU Linker Script`,"go-module":`Go module`,"go-mod":`Go module`,graphql:`GraphQL`,hbs:`Handlebars`,hs:`Haskell`,hcl:`HCL`,hlsl:`HLSL`,http:`HTTP`,hpkp:`HTTP Public-Key-Pins`,hsts:`HTTP Strict-Transport-Security`,ichigojam:`IchigoJam`,"icu-message-format":`ICU Message Format`,idr:`Idris`,ignore:`.ignore`,gitignore:`.gitignore`,hgignore:`.hgignore`,npmignore:`.npmignore`,inform7:`Inform 7`,javadoc:`JavaDoc`,javadoclike:`JavaDoc-like`,javastacktrace:`Java stack trace`,jq:`JQ`,jsdoc:`JSDoc`,"js-extras":`JS Extras`,json:`JSON`,webmanifest:`Web App Manifest`,json5:`JSON5`,jsonp:`JSONP`,jsstacktrace:`JS stack trace`,"js-templates":`JS Templates`,keepalived:`Keepalived Configure`,kts:`Kotlin Script`,kt:`Kotlin`,kumir:`KuMir (КуМир)`,kum:`KuMir (КуМир)`,latex:`LaTeX`,tex:`TeX`,context:`ConTeXt`,lilypond:`LilyPond`,ly:`LilyPond`,emacs:`Lisp`,elisp:`Lisp`,"emacs-lisp":`Lisp`,llvm:`LLVM IR`,log:`Log file`,lolcode:`LOLCODE`,magma:`Magma (CAS)`,md:`Markdown`,"markup-templating":`Markup templating`,matlab:`MATLAB`,maxscript:`MAXScript`,mel:`MEL`,metafont:`METAFONT`,mongodb:`MongoDB`,moon:`MoonScript`,n1ql:`N1QL`,n4js:`N4JS`,n4jsd:`N4JS`,"nand2tetris-hdl":`Nand To Tetris HDL`,naniscript:`Naninovel Script`,nani:`Naninovel Script`,nasm:`NASM`,neon:`NEON`,nginx:`nginx`,nsis:`NSIS`,objectivec:`Objective-C`,objc:`Objective-C`,ocaml:`OCaml`,opencl:`OpenCL`,openqasm:`OpenQasm`,qasm:`OpenQasm`,parigp:`PARI/GP`,objectpascal:`Object Pascal`,psl:`PATROL Scripting Language`,pcaxis:`PC-Axis`,px:`PC-Axis`,peoplecode:`PeopleCode`,pcode:`PeopleCode`,php:`PHP`,phpdoc:`PHPDoc`,"php-extras":`PHP Extras`,"plant-uml":`PlantUML`,plantuml:`PlantUML`,plsql:`PL/SQL`,powerquery:`PowerQuery`,pq:`PowerQuery`,mscript:`PowerQuery`,powershell:`PowerShell`,promql:`PromQL`,properties:`.properties`,protobuf:`Protocol Buffers`,purebasic:`PureBasic`,pbfasm:`PureBasic`,purs:`PureScript`,py:`Python`,qsharp:`Q#`,qs:`Q#`,q:`Q (kdb+ database)`,qml:`QML`,rkt:`Racket`,cshtml:`Razor C#`,razor:`Razor C#`,jsx:`React JSX`,tsx:`React TSX`,renpy:`Ren'py`,rpy:`Ren'py`,res:`ReScript`,rest:`reST (reStructuredText)`,robotframework:`Robot Framework`,robot:`Robot Framework`,rb:`Ruby`,sas:`SAS`,sass:`Sass (Sass)`,scss:`Sass (SCSS)`,"shell-session":`Shell session`,"sh-session":`Shell session`,shellsession:`Shell session`,sml:`SML`,smlnj:`SML/NJ`,solidity:`Solidity (Ethereum)`,sol:`Solidity (Ethereum)`,"solution-file":`Solution file`,sln:`Solution file`,soy:`Soy (Closure Template)`,sparql:`SPARQL`,rq:`SPARQL`,"splunk-spl":`Splunk SPL`,sqf:`SQF: Status Quo Function (Arma 3)`,sql:`SQL`,stata:`Stata Ado`,iecst:`Structured Text (IEC 61131-3)`,supercollider:`SuperCollider`,sclang:`SuperCollider`,systemd:`Systemd configuration file`,"t4-templating":`T4 templating`,"t4-cs":`T4 Text Templates (C#)`,t4:`T4 Text Templates (C#)`,"t4-vb":`T4 Text Templates (VB)`,tap:`TAP`,tt2:`Template Toolkit 2`,toml:`TOML`,trickle:`trickle`,troy:`troy`,trig:`TriG`,ts:`TypeScript`,tsconfig:`TSConfig`,uscript:`UnrealScript`,uc:`UnrealScript`,uorazor:`UO Razor Script`,uri:`URI`,url:`URL`,vbnet:`VB.Net`,vhdl:`VHDL`,vim:`vim`,"visual-basic":`Visual Basic`,vba:`VBA`,vb:`Visual Basic`,wasm:`WebAssembly`,"web-idl":`Web IDL`,webidl:`Web IDL`,wgsl:`WGSL`,wiki:`Wiki markup`,wolfram:`Wolfram language`,nb:`Mathematica Notebook`,wl:`Wolfram language`,xeoracube:`XeoraCube`,"xml-doc":`XML doc (.net)`,xojo:`Xojo (REALbasic)`,xquery:`XQuery`,yaml:`YAML`,yml:`YAML`,yang:`YANG`};Prism.plugins.toolbar.registerButton(`show-language`,function(t){var n=t.element.parentNode;if(!n||!/pre/i.test(n.nodeName))return;function r(e){return e&&(e.substring(0,1).toUpperCase()+e.substring(1)).replace(/s(?=cript)/,`S`)}var i=n.getAttribute(`data-language`)||e[t.language]||r(t.language);if(i){var a=document.createElement(`span`);return a.textContent=i,a}})}})()})),Ec=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;if(!Prism.plugins.toolbar){console.warn(`Copy to Clipboard plugin loaded before Toolbar plugin.`);return}function e(e,t){e.addEventListener(`click`,function(){n(t)})}function t(e){var t=document.createElement(`textarea`);t.value=e.getText(),t.style.top=`0`,t.style.left=`0`,t.style.position=`fixed`,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand(`copy`);setTimeout(function(){n?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}function n(e){navigator.clipboard?navigator.clipboard.writeText(e.getText()).then(e.success,function(){t(e)}):t(e)}function r(e){window.getSelection().selectAllChildren(e)}function i(e){var t={copy:`Copy`,"copy-error":`Press Ctrl+C to copy`,"copy-success":`Copied!`,"copy-timeout":5e3},n=`data-prismjs-`;for(var r in t){for(var i=n+r,a=e;a&&!a.hasAttribute(i);)a=a.parentElement;a&&(t[r]=a.getAttribute(i))}return t}Prism.plugins.toolbar.registerButton(`copy-to-clipboard`,function(t){var n=t.element,a=i(n),o=document.createElement(`button`);o.className=`copy-to-clipboard-button`,o.setAttribute(`type`,`button`);var s=document.createElement(`span`);return o.appendChild(s),l(`copy`),e(o,{getText:function(){return n.textContent},success:function(){l(`copy-success`),c()},error:function(){l(`copy-error`),setTimeout(function(){r(n)},1),c()}}),o;function c(){setTimeout(function(){l(`copy`)},a[`copy-timeout`])}function l(e){s.textContent=a[e],o.setAttribute(`data-copy-state`,e)}})})()})),Dc=`https://cdn.jsdelivr.net/npm/prismjs@1.28.0`,Oc=null,kc=new Set,Ac=null;function jc(){let e=ko().options.prismCdn;return typeof e==`string`&&e?e:Dc}function Mc(){return document.getElementById(`twikoo`)??document.querySelector(`.twikoo`)??document.body}async function Nc(){let e=window;e.Prism=e.Prism??{},e.Prism.manual=!0;let t=await Promise.resolve().then(()=>u(Sc())),n=t.default??t;e.Prism=n,await Promise.resolve().then(()=>u(Cc()));let r=n.plugins.autoloader;return r&&(r.languages_path=`${jc()}/components/`),kc.add(`autoloader`),n}async function Pc(e){if(!e||e===`none`)return;let t=e.split(`,`).map(e=>e.trim()).filter(e=>e===`showLanguage`||e===`copyButton`);if(!(t.length===0||t.every(e=>kc.has(e)))){await Promise.resolve().then(()=>u(wc()));for(let e of t)e===`showLanguage`?await Promise.resolve().then(()=>u(Tc())):await Promise.resolve().then(()=>u(Ec())),kc.add(e)}}function Fc(e,t){if(!e||e===`none`)return;let n=Mc();if(Ac&&n.contains(Ac))return;let r=document.createElement(`link`);r.href=e==="default"?`${t}/themes/prism.min.css`:`${t}/themes/prism-${e}.min.css`,r.rel=`stylesheet`,r.type=`text/css`,n.appendChild(r),Ac=r}function Ic(e,t,n){e&&(Oc??=Nc().catch(e=>(Po.warn(`Prism 代码高亮加载失败`,e),null)),Oc.then(async r=>{r&&(await Pc(n??``),Fc(t??``,jc()),r.highlightAllUnder(e))}).catch(e=>Po.warn(`代码高亮执行失败`,e)))}var Lc=u(s(((e,t)=>{(function(e){"use strict";function n(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function r(e,t){return e<<t|e>>>32-t}function i(e,t,i,a,o,s){return n(r(n(n(t,e),n(a,s)),o),i)}function a(e,t,n,r,a,o,s){return i(t&n|~t&r,e,t,a,o,s)}function o(e,t,n,r,a,o,s){return i(t&r|n&~r,e,t,a,o,s)}function s(e,t,n,r,a,o,s){return i(t^n^r,e,t,a,o,s)}function c(e,t,n,r,a,o,s){return i(n^(t|~r),e,t,a,o,s)}function l(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var r,i,l,u,d,f=1732584193,p=-271733879,m=-1732584194,h=271733878;for(r=0;r<e.length;r+=16)i=f,l=p,u=m,d=h,f=a(f,p,m,h,e[r],7,-680876936),h=a(h,f,p,m,e[r+1],12,-389564586),m=a(m,h,f,p,e[r+2],17,606105819),p=a(p,m,h,f,e[r+3],22,-1044525330),f=a(f,p,m,h,e[r+4],7,-176418897),h=a(h,f,p,m,e[r+5],12,1200080426),m=a(m,h,f,p,e[r+6],17,-1473231341),p=a(p,m,h,f,e[r+7],22,-45705983),f=a(f,p,m,h,e[r+8],7,1770035416),h=a(h,f,p,m,e[r+9],12,-1958414417),m=a(m,h,f,p,e[r+10],17,-42063),p=a(p,m,h,f,e[r+11],22,-1990404162),f=a(f,p,m,h,e[r+12],7,1804603682),h=a(h,f,p,m,e[r+13],12,-40341101),m=a(m,h,f,p,e[r+14],17,-1502002290),p=a(p,m,h,f,e[r+15],22,1236535329),f=o(f,p,m,h,e[r+1],5,-165796510),h=o(h,f,p,m,e[r+6],9,-1069501632),m=o(m,h,f,p,e[r+11],14,643717713),p=o(p,m,h,f,e[r],20,-373897302),f=o(f,p,m,h,e[r+5],5,-701558691),h=o(h,f,p,m,e[r+10],9,38016083),m=o(m,h,f,p,e[r+15],14,-660478335),p=o(p,m,h,f,e[r+4],20,-405537848),f=o(f,p,m,h,e[r+9],5,568446438),h=o(h,f,p,m,e[r+14],9,-1019803690),m=o(m,h,f,p,e[r+3],14,-187363961),p=o(p,m,h,f,e[r+8],20,1163531501),f=o(f,p,m,h,e[r+13],5,-1444681467),h=o(h,f,p,m,e[r+2],9,-51403784),m=o(m,h,f,p,e[r+7],14,1735328473),p=o(p,m,h,f,e[r+12],20,-1926607734),f=s(f,p,m,h,e[r+5],4,-378558),h=s(h,f,p,m,e[r+8],11,-2022574463),m=s(m,h,f,p,e[r+11],16,1839030562),p=s(p,m,h,f,e[r+14],23,-35309556),f=s(f,p,m,h,e[r+1],4,-1530992060),h=s(h,f,p,m,e[r+4],11,1272893353),m=s(m,h,f,p,e[r+7],16,-155497632),p=s(p,m,h,f,e[r+10],23,-1094730640),f=s(f,p,m,h,e[r+13],4,681279174),h=s(h,f,p,m,e[r],11,-358537222),m=s(m,h,f,p,e[r+3],16,-722521979),p=s(p,m,h,f,e[r+6],23,76029189),f=s(f,p,m,h,e[r+9],4,-640364487),h=s(h,f,p,m,e[r+12],11,-421815835),m=s(m,h,f,p,e[r+15],16,530742520),p=s(p,m,h,f,e[r+2],23,-995338651),f=c(f,p,m,h,e[r],6,-198630844),h=c(h,f,p,m,e[r+7],10,1126891415),m=c(m,h,f,p,e[r+14],15,-1416354905),p=c(p,m,h,f,e[r+5],21,-57434055),f=c(f,p,m,h,e[r+12],6,1700485571),h=c(h,f,p,m,e[r+3],10,-1894986606),m=c(m,h,f,p,e[r+10],15,-1051523),p=c(p,m,h,f,e[r+1],21,-2054922799),f=c(f,p,m,h,e[r+8],6,1873313359),h=c(h,f,p,m,e[r+15],10,-30611744),m=c(m,h,f,p,e[r+6],15,-1560198380),p=c(p,m,h,f,e[r+13],21,1309151649),f=c(f,p,m,h,e[r+4],6,-145523070),h=c(h,f,p,m,e[r+11],10,-1120210379),m=c(m,h,f,p,e[r+2],15,718787259),p=c(p,m,h,f,e[r+9],21,-343485551),f=n(f,i),p=n(p,l),m=n(m,u),h=n(h,d);return[f,p,m,h]}function u(e){var t,n=``,r=e.length*32;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function d(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=e.length*8;for(t=0;t<r;t+=8)n[t>>5]|=(e.charCodeAt(t/8)&255)<<t%32;return n}function f(e){return u(l(d(e),e.length*8))}function p(e,t){var n,r=d(e),i=[],a=[],o;for(i[15]=a[15]=void 0,r.length>16&&(r=l(r,e.length*8)),n=0;n<16;n+=1)i[n]=r[n]^909522486,a[n]=r[n]^1549556828;return o=l(i.concat(d(t)),512+t.length*8),u(l(a.concat(o),640))}function m(e){for(var t=`0123456789abcdef`,n=``,r,i=0;i<e.length;i+=1)r=e.charCodeAt(i),n+=t.charAt(r>>>4&15)+t.charAt(r&15);return n}function h(e){return unescape(encodeURIComponent(e))}function g(e){return f(h(e))}function _(e){return m(g(e))}function v(e,t){return p(h(e),h(t))}function y(e,t){return m(v(e,t))}function b(e,t,n){return t?n?v(t,e):y(t,e):n?g(e):_(e)}typeof define==`function`&&define.amd?define(function(){return b}):typeof t==`object`&&t.exports?t.exports=b:e.md5=b})(e)}))()),Rc=`input is invalid type`,zc=`finalize already called`,Bc=typeof ArrayBuffer<`u`,Vc=function(e){if(typeof e==`string`)return[e,!0];if(Array.isArray(e))return[e,!1];if(Bc&&e){if(e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(ArrayBuffer.isView(e))return[e,!1]}throw Error(Rc)},G=`0123456789abcdef`.split(``),Hc=[-2147483648,8388608,32768,128],Uc=[24,16,8,0],Wc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Gc=[`hex`,`array`,`digest`,`arrayBuffer`],Kc=[],qc=function(e,t){return function(n){return new Zc(t,!0).update(n)[e]()}},Jc=function(e){var t=qc(`hex`,e);t.create=function(){return new Zc(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<Gc.length;++n){var r=Gc[n];t[r]=qc(r,e)}return t},Yc=function(e,t){return function(n,r){return new Qc(n,t,!0).update(r)[e]()}},Xc=function(e){var t=Yc(`hex`,e);t.create=function(t){return new Qc(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<Gc.length;++n){var r=Gc[n];t[r]=Yc(r,e)}return t};function Zc(e,t){t?(Kc[0]=Kc[16]=Kc[1]=Kc[2]=Kc[3]=Kc[4]=Kc[5]=Kc[6]=Kc[7]=Kc[8]=Kc[9]=Kc[10]=Kc[11]=Kc[12]=Kc[13]=Kc[14]=Kc[15]=0,this.blocks=Kc):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Zc.prototype.update=function(e){if(this.finalized)throw Error(zc);var t=Vc(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<Uc[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<Uc[a++&3],s[a>>>2]|=(128|r&63)<<Uc[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<Uc[a++&3],s[a>>>2]|=(128|r>>>6&63)<<Uc[a++&3],s[a>>>2]|=(128|r&63)<<Uc[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<Uc[a++&3],s[a>>>2]|=(128|r>>>12&63)<<Uc[a++&3],s[a>>>2]|=(128|r>>>6&63)<<Uc[a++&3],s[a>>>2]|=(128|r&63)<<Uc[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<Uc[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},Zc.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=Hc[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Zc.prototype.hash=function(){for(var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l=16,u,d,f,p,m,h,g,_,v,y;l<64;++l)p=c[l-15],u=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=c[l-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(y=t&n,l=0;l<64;l+=4)this.first?(this.is224?(g=300032,p=c[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(g=704751109,p=c[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),g=e&t,f=g^e&n^y,h=i&a^~i&o,p=s+d+h+Wc[l]+c[l],m=u+f,s=r+p<<0,r=p+m<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),_=r&e,f=_^r&t^g,h=s&i^~s&a,p=o+d+h+Wc[l+1]+c[l+1],m=u+f,o=n+p<<0,n=p+m<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),v=n&r,f=v^n&e^_,h=o&s^~o&i,p=a+d+h+Wc[l+2]+c[l+2],m=u+f,a=t+p<<0,t=p+m<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),y=t&n,f=y^t&r^v,h=a&o^~a&s,p=i+d+h+Wc[l+3]+c[l+3],m=u+f,i=e+p<<0,e=p+m<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},Zc.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=G[e>>>28&15]+G[e>>>24&15]+G[e>>>20&15]+G[e>>>16&15]+G[e>>>12&15]+G[e>>>8&15]+G[e>>>4&15]+G[e&15]+G[t>>>28&15]+G[t>>>24&15]+G[t>>>20&15]+G[t>>>16&15]+G[t>>>12&15]+G[t>>>8&15]+G[t>>>4&15]+G[t&15]+G[n>>>28&15]+G[n>>>24&15]+G[n>>>20&15]+G[n>>>16&15]+G[n>>>12&15]+G[n>>>8&15]+G[n>>>4&15]+G[n&15]+G[r>>>28&15]+G[r>>>24&15]+G[r>>>20&15]+G[r>>>16&15]+G[r>>>12&15]+G[r>>>8&15]+G[r>>>4&15]+G[r&15]+G[i>>>28&15]+G[i>>>24&15]+G[i>>>20&15]+G[i>>>16&15]+G[i>>>12&15]+G[i>>>8&15]+G[i>>>4&15]+G[i&15]+G[a>>>28&15]+G[a>>>24&15]+G[a>>>20&15]+G[a>>>16&15]+G[a>>>12&15]+G[a>>>8&15]+G[a>>>4&15]+G[a&15]+G[o>>>28&15]+G[o>>>24&15]+G[o>>>20&15]+G[o>>>16&15]+G[o>>>12&15]+G[o>>>8&15]+G[o>>>4&15]+G[o&15];return this.is224||(c+=G[s>>>28&15]+G[s>>>24&15]+G[s>>>20&15]+G[s>>>16&15]+G[s>>>12&15]+G[s>>>8&15]+G[s>>>4&15]+G[s&15]),c},Zc.prototype.toString=Zc.prototype.hex,Zc.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255];return this.is224||c.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),c},Zc.prototype.array=Zc.prototype.digest,Zc.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function Qc(e,t,n){var r,i=Vc(e);if(e=i[0],i[1]){var a=[],o=e.length,s=0,c;for(r=0;r<o;++r)c=e.charCodeAt(r),c<128?a[s++]=c:c<2048?(a[s++]=192|c>>>6,a[s++]=128|c&63):c<55296||c>=57344?(a[s++]=224|c>>>12,a[s++]=128|c>>>6&63,a[s++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++r)&1023),a[s++]=240|c>>>18,a[s++]=128|c>>>12&63,a[s++]=128|c>>>6&63,a[s++]=128|c&63);e=a}e.length>64&&(e=new Zc(t,!0).update(e).array());var l=[],u=[];for(r=0;r<64;++r){var d=e[r]||0;l[r]=92^d,u[r]=54^d}Zc.call(this,t,n),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Qc.prototype=new Zc,Qc.prototype.finalize=function(){if(Zc.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Zc.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Zc.prototype.finalize.call(this)}};var $c=Jc(),el=Jc(!0);$c.sha256=$c,$c.sha224=el,$c.hmac=Xc(),el.hmac=Xc(!0),[...To];var tl=[`lskypro`,`piclist`,`easyimage`,`s3`];function nl(e){return`https://thirdqq.qlogo.cn/g?b=sdk&nk=${e.replace(/@qq\.com/gi,``)}&s=140`}function rl(e,t={}){if(e.avatar)return e.avatar;let n=t.GRAVATAR_CDN||`weavatar.com`,r=t.DEFAULT_GRAVATAR||`initials&name=${e.nick??``}`;return e.mailMd5?`https://${n}/avatar/${e.mailMd5}?d=${r}`:e.mail&&bd(e.mail)?nl(e.mail):e.mail?`https://${n}/avatar/${(n===`cravatar.cn`?Lc.default:$c)(yd(e.mail))}?d=${r}`:``}function il(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var al=il();function ol(e){al=e}var sl={exec:()=>null};function cl(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function ll(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(dl.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ul=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),dl={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,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,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:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:cl(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:cl(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:cl(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:cl(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:cl(e=>RegExp(`^ {0,${e}}(?:</?(?:${El})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:cl(e=>RegExp(`^ {0,${e}}>`))},fl=/^(?:[ \t]*(?:\n|$))+/,pl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ml=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_l=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,vl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yl=ll(vl).replace(/bull/g,_l).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(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),bl=ll(vl).replace(/bull/g,_l).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(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Sl=/^[^\n]+/,Cl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wl=ll(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Cl).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tl=ll(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,_l).getRegex(),El=`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`,Dl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ol=ll(`^ {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`,Dl).replace(`tag`,El).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kl=e=>ll(xl).replace(`hr`,hl).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`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,El).getRegex(),Al=kl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),jl=kl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ml={blockquote:ll(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,jl).getRegex(),code:pl,def:wl,fences:ml,heading:gl,hr:hl,html:Ol,lheading:yl,list:Tl,newline:fl,paragraph:Al,table:sl,text:Sl},Nl=ll(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,hl).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`,El).getRegex(),Pl={...Ml,lheading:bl,table:Nl,paragraph:ll(xl).replace(`hr`,hl).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Nl).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`,El).getRegex()},Fl={...Ml,html:ll(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Dl).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:sl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ll(xl).replace(`hr`,hl).replace(`heading`,` *#{1,6} *[^
177
- ]`).replace(`lheading`,yl).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Il=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ll=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Rl=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,zl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bl=/[\p{P}\p{S}]/u,Vl=/[\s\p{P}\p{S}]/u,Hl=/[^\s\p{P}\p{S}]/u,Ul=ll(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Vl).getRegex(),Wl=/[\p{Pi}\p{Ps}"']/u,Gl=/(?!~)[\p{P}\p{S}]/u,Kl=/(?!~)[\s\p{P}\p{S}]/u,ql=/(?:[^\s\p{P}\p{S}]|~)/u,Jl=ll(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ul?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Yl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Xl=ll(Yl,`u`).replace(/punct/g,Bl).getRegex(),Zl=ll(Yl,`u`).replace(/punct/g,Gl).getRegex(),Ql=ll(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Wl).replace(/punct/g,Bl).getRegex(),$l=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,eu=ll($l,`gu`).replace(/notPunctSpace/g,Hl).replace(/punctSpace/g,Vl).replace(/punct/g,Bl).getRegex(),tu=ll($l,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),nu=ll(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Hl).replace(/punctSpace/g,Vl).replace(/punct/g,Bl).getRegex(),ru=ll(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Hl).replace(/punctSpace/g,Vl).replace(/punct/g,Bl).getRegex(),iu=ll(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Hl).replace(/punctSpace/g,Vl).replace(/punct/g,Bl).getRegex(),au=ll(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Bl).getRegex(),ou=ll(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Hl).replace(/punctSpace/g,Vl).replace(/punct/g,Bl).getRegex(),su=ll(/\\(punct)/,`gu`).replace(/punct/g,Bl).getRegex(),cu=ll(/^<(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(),lu=ll(Dl).replace(`(?:-->|$)`,`-->`).getRegex(),uu=ll(`^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`,lu).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),du=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,fu=ll(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,du).getRegex(),pu=ll(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,fu).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mu=ll(/^!?\[(label)\]\[(ref)\]/).replace(`label`,fu).replace(`ref`,Cl).getRegex(),hu=ll(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Cl).getRegex(),gu=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,_u=ll(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,du).getRegex(),vu=ll(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ll(/^!?\[(label)\]\[(ref)\]/).replace(`label`,_u).replace(`ref`,gu).getRegex()).replace(`nolink`,ll(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,gu).getRegex()).getRegex(),yu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bu={_backpedal:sl,anyPunctuation:su,autolink:cu,blockSkip:Jl,br:Rl,code:Ll,del:sl,delLDelim:sl,delRDelim:sl,emStrongLDelim:Xl,emStrongRDelimAst:eu,emStrongRDelimUnd:ru,escape:Il,link:pu,nolink:hu,punctuation:Ul,reflink:mu,reflinkSearch:vu,tag:uu,text:zl,url:sl},xu={...bu,emStrongLDelim:Ql,emStrongRDelimAst:nu,emStrongRDelimUnd:iu,link:ll(/^!?\[(label)\]\((.*?)\)/).replace(`label`,fu).getRegex(),reflink:ll(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,fu).getRegex()},Su={...bu,emStrongRDelimAst:tu,emStrongLDelim:Zl,delLDelim:au,delRDelim:ou,url:ll(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,yu).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:ll(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,yu).getRegex()},Cu={...Su,br:ll(Rl).replace(`{2,}`,`*`).getRegex(),text:ll(Su.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},wu={normal:Ml,gfm:Pl,pedantic:Fl},Tu={normal:bu,gfm:Su,breaks:Cu,pedantic:xu},Eu={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Du=e=>Eu[e];function Ou(e,t){if(t){if(dl.escapeTest.test(e))return e.replace(dl.escapeReplace,Du)}else if(dl.escapeTestNoEncode.test(e))return e.replace(dl.escapeReplaceNoEncode,Du);return e}function ku(e){try{e=encodeURI(e).replace(dl.percentDecode,`%`)}catch{return null}return e}function Au(e,t){let n=e.replace(dl.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(dl.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(dl.slashPipe,`|`);return n}function ju(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Mu(e){let t=e.split(`
178
- `),n=t.length-1;for(;n>=0&&dl.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
179
- `)}function Nu(e){return e.toLowerCase().toUpperCase().toLowerCase()}function Pu(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Fu(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Iu(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function Lu(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
173
+ Please backup your comment database before importing.`,ADMIN_LOGIN:`Sign in`,ADMIN_LOGIN_TITLE:`Twikoo Management Panel`,ADMIN_LOGOUT:`Sign out`,ADMIN_NEED_UPDATE:`A new version of Twikoo is required for comment management.`,ADMIN_PASSWORD:`Password`,ADMIN_PASSWORD_PLACEHOLDER:`Enter your password...`,ADMIN_PASSWORD_REQUIRED:`Please enter your password`,ADMIN_REGIST:`Register`,ADMIN_REGIST_FAILED:`Register failed`,ADMIN_SET_PASSWORD:`Set password`,ADMIN_SET_PASSWORD_CONFIRM:`Confirm password`,ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER:`Confirm password...`,ADMIN_SET_PASSWORD_PLACEHOLDER:`Password`,ADMIN_TITLE:`Twikoo Management Panel`,COMMENTS_SEARCH:`Search`,COMMENTS_SEARCH_PLACEHOLDER:`Search comments`,COMMENTS_SEARCH_NO_RESULT:`No comments found`,COMMENTS_SEARCH_COUNT_PREFIX:`Found `,COMMENTS_COUNT_SUFFIX:` comments`,COMMENTS_SORT_NEWEST:`Newest`,COMMENTS_SORT_OLDEST:`Oldest`,COMMENTS_SORT_POPULAR:`Popular`,COMMENTS_EXPAND:`Load more`,COMMENTS_NO_COMMENTS:`No comment`,COMMENT_EXPAND:`Read more`,COMMENT_COLLAPSE:`Collapse`,COMMENT_MASTER_TAG:`Admin`,COMMENT_REPLIED:`Reply`,COMMENT_DELETE_CONFIRM:`Delete your comment?`,COMMENT_REVIEWING_TAG:`Pending`,COMMENT_TOP_TAG:`Pinned`,COMMENT_FAILED:`Comment failed`,META_INPUT_LINK:`Website`,META_INPUT_MAIL:`Email`,META_INPUT_NICK:`Nickname`,META_INPUT_NOT_REQUIRED:`Optional`,META_INPUT_REQUIRED:`Required`,PAGINATION_COUNT_PREFIX:``,PAGINATION_COUNT_SUFFIX:` entries`,PAGINATION_GOTO_PREFIX:`Goto page`,PAGINATION_GOTO_SUFFIX:``,PAGINATION_PAGESIZE:`entries/page`,SUBMIT_CANCEL:`Cancel`,SUBMIT_PREVIEW:`Preview`,SUBMIT_SEND:`Send`,IMAGE_UPLOAD_PLACEHOLDER:`Uploading image`,IMAGE_UPLOAD_FAILED:`IMAGE UPLOAD FAILED`,IMAGE_UPLOAD_NSFW:`Image contains inappropriate content, upload rejected`,IMAGE_UPLOAD_FAILED_NO_CONF:`The blogger didn't configured any image bed service`,IMAGE_UPLOAD_PLEASE_WAIT:`Uploading image, please try again later`,SUBMIT_SENDING:`Sending`,TIMEAGO_DAYS:`days ago`,TIMEAGO_HOURS:`hours ago`,TIMEAGO_MINUTES:`minutes ago`,TIMEAGO_NOW:`Just now`,TIMEAGO_SECONDS:`seconds ago`},Ho=`en`,Uo={"zh-CN":Bo,en:Vo},Wo={},Go={zh:`zh-CN`,"zh-cn":`zh-CN`,"zh-hk":`zh-HK`,"zh-tw":`zh-TW`,en:`en`,"en-us":`en`,"en-gb":`en`,uz:`uz-UZ`,"uz-uz":`uz-UZ`,ja:`ja-JP`,"ja-jp":`ja-JP`,ko:`ko-KR`,"ko-kr":`ko-KR`,vi:`vi-VN`,"vi-vn":`vi-VN`,id:`id-ID`,"id-id":`id-ID`},Ko=Ho,qo=``;function Jo(){if(typeof document>`u`)return``;let e=document.currentScript?.src??``;if(!e){let t=document.querySelectorAll(`script[src]`);for(let n=t.length-1;n>=0;--n){let r=t[n].src;if(/twikoo/i.test(r)){e=r;break}}}return e?e.slice(0,e.lastIndexOf(`/`)):``}function Yo(e={}){let t=e.lang?.toLowerCase(),n=typeof navigator>`u`?void 0:navigator.language?.toLowerCase();return t&&Go[t]||n&&Go[n]||Ho}async function Xo(e={}){let t=Yo(e);if(Ko=t,Uo[t]||Wo[t])return;let n=(e.localeBaseUrl||qo||Jo()).replace(/\/+$/,``);if(!n){console.warn(`[twikoo] 无法推导语言分片基址,${t} 回退英文`);return}let r=`${n}/locales/${t}.js`;try{let e=await import(r),n=e.default??e;n&&typeof n==`object`?Wo[t]=n:console.warn(`[twikoo] 语言分片 ${t} 形态异常,回退英文`)}catch(e){console.warn(`[twikoo] 语言分片 ${r} 加载失败,回退英文:`,e instanceof Error?e.message:String(e))}}function W(e,t){let n=t&&Go[t.toLowerCase()]||Ko;return(Wo[n]??Uo[n])?.[e]??Uo[Ho]?.[e]??``}function Zo(e,t){this.v=e,this.k=t}function Qo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $o(e){if(Array.isArray(e))return e}function es(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ts(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
174
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ns(e,t){return $o(e)||es(e,t)||rs(e,t)||ts()}function rs(e,t){if(e){if(typeof e==`string`)return Qo(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qo(e,t):void 0}}function is(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Zo;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}is.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},is.prototype.next=function(e){return this._invoke(`next`,e)},is.prototype.throw=function(e){return this._invoke(`throw`,e)},is.prototype.return=function(e){return this._invoke(`return`,e)};var as=Object.entries,os=Object.setPrototypeOf,ss=Object.isFrozen,cs=Object.getPrototypeOf,ls=Object.getOwnPropertyDescriptor,us=Object.freeze,ds=Object.seal,fs=Object.create,ps=typeof Reflect<`u`&&Reflect,ms=ps.apply,hs=ps.construct;us||=function(e){return e},ds||=function(e){return e},ms||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},hs||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var gs=Is(Array.prototype.forEach);Array.prototype.indexOf;var _s=Is(Array.prototype.lastIndexOf),vs=Is(Array.prototype.pop),ys=Is(Array.prototype.push);Array.prototype.slice;var bs=Is(Array.prototype.splice),xs=Array.isArray,Ss=Is(String.prototype.toLowerCase),Cs=Is(String.prototype.toString),ws=Is(String.prototype.match),Ts=Is(String.prototype.replace),Es=Is(String.prototype.indexOf),Ds=Is(String.prototype.trim),Os=Is(Number.prototype.toString),ks=Is(Boolean.prototype.toString),As=typeof BigInt>`u`?null:Is(BigInt.prototype.toString),js=typeof Symbol>`u`?null:Is(Symbol.prototype.toString),Ms=Is(Object.prototype.hasOwnProperty),Ns=Is(Object.prototype.toString),Ps=Is(RegExp.prototype.test),Fs=Ls(TypeError);function Is(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ms(e,t,r)}}function Ls(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return hs(e,n)}}function Rs(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ss;if(os&&os(e,null),!xs(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ss(t)||(t[r]=e),i=e)}e[i]=!0}return e}function zs(e){for(let t=0;t<e.length;t++)Ms(e,t)||(e[t]=null);return e}function Bs(e){let t=fs(null);for(let r of as(e)){var n=ns(r,2);let i=n[0],a=n[1];Ms(e,i)&&(t[i]=xs(a)?zs(a):a&&typeof a==`object`&&a.constructor===Object?Bs(a):a)}return t}function Vs(e){switch(typeof e){case`string`:return e;case`number`:return Os(e);case`boolean`:return ks(e);case`bigint`:return As?As(e):`0`;case`symbol`:return js?js(e):`Symbol()`;case`undefined`:return Ns(e);case`function`:case`object`:{if(e===null)return Ns(e);let t=e,n=Hs(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ns(e)}return Ns(e)}default:return Ns(e)}}function Hs(e,t){for(;e!==null;){let n=ls(e,t);if(n){if(n.get)return Is(n.get);if(typeof n.value==`function`)return Is(n.value)}e=cs(e)}function n(){return null}return n}function Us(e){try{return Ps(e,``),!0}catch{return!1}}var Ws=us(`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`.split(`.`)),Gs=us(`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`.split(`.`)),Ks=us([`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`]),qs=us([`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`]),Js=us(`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`.split(`.`)),Ys=us([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Xs=us([`#text`]),Zs=us(`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`.split(`.`)),Qs=us(`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`.split(`.`)),$s=us(`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`.split(`.`)),ec=us([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),tc=ds(/{{[\w\W]*|^[\w\W]*}}/g),nc=ds(/<%[\w\W]*|^[\w\W]*%>/g),rc=ds(/\${[\w\W]*/g),ic=ds(/^data-[\-\w.\u00B7-\uFFFF]+$/),ac=ds(/^aria-[\-\w]+$/),oc=ds(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sc=ds(/^(?:\w+script|data):/i),cc=ds(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lc=ds(/^html$/i),uc=ds(/^[a-z][.\w]*(-[.\w]+)+$/i),dc=ds(/<[/\w!]/g),fc=ds(/<[/\w]/g),pc=ds(/<\/no(script|embed|frames)/i),mc=ds(/\/>/i),hc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},gc=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],_c=us(Rs({},gc)),vc=function(){let e={};return gs(gc,t=>{e[t]=ds(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),us(e)}(),yc=function(){return typeof window>`u`?null:window},bc=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},xc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Sc=function(e,t,n,r){return Ms(e,t)&&xs(e[t])?Rs(r.base?Bs(r.base):{},e[t],r.transform):n},Cc=function(e,t,n){let r=Ms(e,t)?e[t]:void 0;return r&&typeof r==`object`?Bs(r):n()};function wc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yc(),t=e=>wc(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==hc.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Hs(d,`cloneNode`),p=Hs(d,`remove`),m=Hs(d,`removeAttributeNode`),h=Hs(d,`nextSibling`),g=Hs(d,`childNodes`),_=Hs(d,`parentNode`),v=Hs(d,`shadowRoot`),y=Hs(d,`attributes`),b=o&&o.prototype?Hs(o.prototype,`nodeType`):null,x=o&&o.prototype?Hs(o.prototype,`nodeName`):null,S=o&&o.prototype?Hs(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,ee=!1,te=0,O=function(){if(te>0)throw Fs(`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.`)},k=function(e){O(),te++;try{return T.createHTML(e)}finally{te--}},A=function(e){O(),te++;try{return T.createScriptURL(e)}finally{te--}},ne=function(){return ee||=(D=bc(u,i),!0),D},re=n,ie=re.implementation,ae=re.createNodeIterator,oe=re.createDocumentFragment,se=re.getElementsByTagName,ce=r.importNode,le=xc();t.isSupported=typeof as==`function`&&typeof _==`function`&&ie&&ie.createHTMLDocument!==void 0;let ue=tc,de=nc,fe=rc,pe=ic,me=ac,he=sc,ge=cc,_e=uc,ve=oc,j=null,ye=Rs({},[...Ws,...Gs,...Ks,...Js,...Xs]),be=null,xe=Rs({},[...Zs,...Qs,...$s,...ec]),Se=Object.seal(fs(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}})),Ce=null,we=null,Te=Object.seal(fs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),M=!0,Ee=!0,N=!1,P=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,Ne=!1,Pe=!1,Fe=!1,Ie=!1,Le=!0,Re=!1,ze=`user-content-`,Be=!0,Ve=!1,He={},Ue=null,We=Rs({},`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`.split(`.`)),Ge=null,Ke=Rs({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=Rs({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,F=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=Rs({},[Ye,F,Xe],Cs),I=us([`mi`,`mo`,`mn`,`ms`,`mtext`]),tt=Rs({},I),L=us([`annotation-xml`]),R=Rs({},L),nt=Rs({},[`title`,`style`,`font`,`a`,`script`]),rt=null,it=[`application/xhtml+xml`,`text/html`],at=null,z=null,ot=n.createElement(`form`),st=function(e){return e instanceof RegExp||e instanceof Function},ct=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(z&&z===e)return;(!e||typeof e!=`object`)&&(e={}),e=Bs(e),rt=it.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,at=rt===`application/xhtml+xml`?Cs:Ss,j=Sc(e,`ALLOWED_TAGS`,ye,{transform:at}),be=Sc(e,`ALLOWED_ATTR`,xe,{transform:at}),$e=Sc(e,`ALLOWED_NAMESPACES`,et,{transform:Cs}),qe=Sc(e,`ADD_URI_SAFE_ATTR`,Je,{transform:at,base:Je}),Ge=Sc(e,`ADD_DATA_URI_TAGS`,Ke,{transform:at,base:Ke}),Ue=Sc(e,`FORBID_CONTENTS`,We,{transform:at}),Ce=Sc(e,`FORBID_TAGS`,Bs({}),{transform:at}),we=Sc(e,`FORBID_ATTR`,Bs({}),{transform:at}),He=Ms(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Bs(e.USE_PROFILES):e.USE_PROFILES:!1,M=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,N=e.ALLOW_UNKNOWN_PROTOCOLS||!1,P=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,ve=Us(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:oc,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,tt=Cc(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Rs({},I)),R=Cc(e,`HTML_INTEGRATION_POINTS`,()=>Rs({},L));let t=Cc(e,`CUSTOM_ELEMENT_HANDLING`,()=>fs(null));if(Se=fs(null),Ms(t,`tagNameCheck`)&&st(t.tagNameCheck)&&(Se.tagNameCheck=t.tagNameCheck),Ms(t,`attributeNameCheck`)&&st(t.attributeNameCheck)&&(Se.attributeNameCheck=t.attributeNameCheck),Ms(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Se.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),ds(Se),De&&(Ee=!1),Fe&&(Pe=!0),He&&(j=Rs({},Xs),be=fs(null),He.html===!0&&(Rs(j,Ws),Rs(be,Zs)),He.svg===!0&&(Rs(j,Gs),Rs(be,Qs),Rs(be,ec)),He.svgFilters===!0&&(Rs(j,Ks),Rs(be,Qs),Rs(be,ec)),He.mathMl===!0&&(Rs(j,Js),Rs(be,$s),Rs(be,ec))),Te.tagCheck=null,Te.attributeCheck=null,Ms(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Te.tagCheck=e.ADD_TAGS:xs(e.ADD_TAGS)&&(j===ye&&(j=Bs(j)),Rs(j,e.ADD_TAGS,at))),Ms(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Te.attributeCheck=e.ADD_ATTR:xs(e.ADD_ATTR)&&(be===xe&&(be=Bs(be)),Rs(be,e.ADD_ATTR,at))),Ms(e,`ADD_FORBID_CONTENTS`)&&xs(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=Bs(Ue)),Rs(Ue,e.ADD_FORBID_CONTENTS,at)),Be&&(j[`#text`]=!0),ke&&Rs(j,[`html`,`head`,`body`]),j.table&&(Rs(j,[`tbody`]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Fs(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Fs(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=k(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=k(``)));us&&us(e),z=e},lt=Rs({},[...Gs,...Ks,...qs]),ut=Rs({},[...Js,...Ys]),dt=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===Ye?e===`svg`&&(n===`annotation-xml`||tt[n]):!!lt[e]},ft=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===F?e===`math`&&R[n]:!!ut[e]},pt=function(e,t,n){return t.namespaceURI===F&&!R[n]||t.namespaceURI===Ye&&!tt[n]?!1:!ut[e]&&(nt[e]||!lt[e])},mt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=Ss(e.tagName),r=Ss(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===F?dt(n,t,r):e.namespaceURI===Ye?ft(n,t,r):e.namespaceURI===Xe?pt(n,t,r):!!(rt===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},ht=function(e){ys(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw Fs(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},gt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},_t=function(e){bt(e);let t=g(e);if(t){let e=[];gs(t,t=>{ys(e,t)}),gs(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&gt(e,r,i)}},vt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ys(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Pe||Fe)try{ht(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},yt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||be[at(i)]||gt(e,r,i)}},bt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===hc.element&&yt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},xt=function(e,t){return Oe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},St=function(e){if(!Oe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===hc.processingInstruction||n===hc.comment&&Ps(fc,e.data)){try{p(e)}catch{}continue}if(n===hc.element){let t=e,n=at(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&xt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Ct=function(e){let t=null,r=null;if(Ne)e=`<remove></remove>`+e;else{let t=ws(e,/^[\r\n\t ]+/);r=t&&t[0]}rt===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?k(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,rt)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?se.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},wt=function(e){let t=S?S(e):e.ownerDocument;return ae.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},B=function(e){return e=Ts(e,ue,` `),e=Ts(e,de,` `),e=Ts(e,fe,` `),e},Tt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ae.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=B(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&gs(i,e=>{H(e.content)&&Tt(e.content)})},V=function(e){let t=x?x(e):null;return typeof t!=`string`||at(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},H=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===hc.documentFragment}catch{return!1}},U=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Et(e,n,r){e.length!==0&&gs(e,e=>{e.call(t,n,r,z)})}let Dt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!U(e.firstElementChild)&&Ps(dc,e.textContent)&&Ps(dc,e.innerHTML)||Oe&&e.namespaceURI===Xe&&_c[t]&&(U(e.firstElementChild)||typeof e.textContent==`string`&&Ps(vc[t],e.textContent))||e.nodeType===hc.processingInstruction||Oe&&e.nodeType===hc.comment&&Ps(fc,e.data))},Ot=function(e,t){if(e instanceof RegExp)return Ps(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},kt=function(e,t,n){if(!Ce[t]&&Ft(t)&&Ot(Se.tagNameCheck,t))return!1;if(Be&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return ht(e),!0},At=function(e,t,n,r){return e.length===0?t:t===n||t===r?Bs(t):t},jt=function(e,t){return e===t||_(e)!==null?!1:(Ve&&bt(e),!0)},Mt=function(e,n){if(Et(le.beforeSanitizeElements,e,null),jt(e,n))return!0;if(V(e))return ht(e),!0;let r=at(w(e));if(j=At(le.uponSanitizeElement,j,ye,je),Et(le.uponSanitizeElement,e,{tagName:r,allowedTags:j}),jt(e,n))return!0;if(Dt(e,r))return ht(e),!0;if(Ce[r]||!(Te.tagCheck instanceof Function&&Te.tagCheck(r))&&!j[r]){let t=kt(e,r,n);return t===!1&&(Et(le.afterSanitizeElements,e,null),jt(e,n))?!0:t}if(C(e)===hc.element&&!mt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Ps(pc,e.innerHTML))return ht(e),!0;if(De&&e.nodeType===hc.text){let n=B(e.textContent);e.textContent!==n&&(ys(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Et(le.afterSanitizeElements,e,null),jt(e,n)},Nt=function(e,t,r){if(we[t]||xt(t,e)||Le&&(t===`id`||t===`name`)&&(r in n||r in ot))return!1;let i=be[t]||Te.attributeCheck instanceof Function&&Te.attributeCheck(t,e);return Ee&&Ps(pe,t)||M&&Ps(me,t)?!0:i?qe[t]||Ps(ve,Ts(r,ge,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Es(r,`data:`)===0&&Ge[e]||N&&!Ps(he,Ts(r,ge,``))?!0:!r:Ft(e)&&Ot(Se.tagNameCheck,e)&&Ot(Se.attributeNameCheck,t,e)||t===`is`&&Se.allowCustomizedBuiltInElements&&Ot(Se.tagNameCheck,r)},Pt=Rs({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ft=function(e){return!Pt[Ss(e)]&&Ps(_e,e)},It=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return A(r)}return r},Lt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!V(e)||(ht(e),!1)}catch{return vt(t,e),!1}},Rt=function(e,n){if(Et(le.beforeSanitizeAttributes,e,null),jt(e,n))return;let r=e.attributes;if(!r||V(e))return;be=At(le.uponSanitizeAttribute,be,xe,Me);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0},a=r.length,o=at(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=at(s),d=l,f=s===`value`?d:Ds(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Et(le.uponSanitizeAttribute,e,i),f=i.attrValue,Re&&(u===`id`||u===`name`)&&Es(f,ze)!==0&&(vt(s,e,n),f=ze+f,p=!0),Oe&&Ps(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){vt(s,e,n);continue}if(u===`attributename`&&ws(f,`href`)){vt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){vt(s,e,n);continue}if(!P&&Ps(mc,f)){vt(s,e,n);continue}if(De&&(f=B(f)),!Nt(o,u,f)){vt(s,e,n);continue}f=It(o,u,c,f),f!==d&&Lt(e,s,c,f)&&p&&vs(t.removed)}}Et(le.afterSanitizeAttributes,e,null),jt(e,n)},zt=function(e){let t=null,n=wt(e);for(Et(le.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Et(le.uponSanitizeShadowNode,t,null),Mt(t,e),Rt(t,e),H(t.content)&&zt(t.content),C(t)===hc.element){let e=v(t);H(e)&&(Bt(e),zt(e))}Et(le.afterSanitizeShadowDOM,e,null)},Bt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){zt(e.shadow);continue}let n=e.node,r=C(n)===hc.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&at(e)===`template`){let e=n.content;H(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);H(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!U(e)&&(e=Vs(e),typeof e!=`string`))throw Fs(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(j=je,be=Me):ct(n),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(j=Bs(j)),le.uponSanitizeAttribute.length>0&&(be=Bs(be)),t.removed=[];let c=Ve&&typeof e!=`string`&&U(e);if(c){St(e);let t=w(e);if(typeof t==`string`){let n=at(t);if(!j[n]||Ce[n])throw _t(e),Fs(`root node is forbidden and cannot be sanitized in-place`)}if(V(e))throw _t(e),Fs(`root node is clobbered and cannot be sanitized in-place`);try{Bt(e)}catch(t){throw _t(e),t}}else if(U(e))i=Ct(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===hc.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Bt(i);else{if(!Pe&&!De&&!ke&&e.indexOf(`<`)===-1)return T&&Ie?k(e):e;if(i=Ct(e),!i)return Pe?null:Ie?E:``}i&&Ne&&ht(i.firstChild);let l=c?e:i;try{let e=wt(l);for(;o=e.nextNode();)Mt(o,l),Rt(o,l),H(o.content)&&zt(o.content)}catch(n){throw c&&(_t(e),gs(t.removed,e=>{e.element&&bt(e.element)})),n}if(c){let n=!1;if(gs(t.removed,t=>{t.element&&(t.element===e&&(n=!0),bt(t.element))}),n)throw Fs(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return De&&Tt(e),e}if(Pe){if(De&&Tt(i),Fe)for(s=oe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(be.shadowroot||be.shadowrootmode)&&(s=ce.call(r,s,!0)),s}let u=ke?i.outerHTML:i.innerHTML;return ke&&j[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ps(lc,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
175
+ `+u),De&&(u=B(u)),T&&Ie?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ct(e),Ae=!0,je=j,Me=be},t.clearConfig=function(){z=null,Ae=!1,je=null,Me=null,T=D,E=``},t.isValidAttribute=function(e,t,n){z||ct({});let r=at(e),i=at(t);return Nt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Ms(le,e)&&ys(le[e],t)},t.removeHook=function(e,t){if(Ms(le,e)){if(t!==void 0){let n=_s(le[e],t);return n===-1?void 0:bs(le[e],n,1)[0]}return vs(le[e])}},t.removeHooks=function(e){Ms(le,e)&&(le[e]=[])},t.removeAllHooks=function(){le=xc()},t}var Tc=wc();function Ec(e){return Tc.sanitize(typeof e==`string`?e:``,{FORBID_TAGS:[`style`],FORBID_ATTR:[`style`]})}var Dc=s(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,ee=E.index+E[0].length,te=C;for(te+=S.value.length;D>=te;)S=S.next,te+=S.value.length;if(te-=S.value.length,C=te,S.value instanceof a)continue;for(var O=S;O!==t.tail&&(te<ee||typeof O.value==`string`);O=O.next)T++,te+=O.value.length;T--,w=e.slice(C,te),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,k=E[0],A=w.slice(0,D),ne=w.slice(D+k.length),re=C+w.length;d&&re>d.reach&&(d.reach=re);var ie=S.prev;A&&(ie=l(t,ie,A),C+=A.length),u(t,ie,T);var ae=new a(f,g?i.tokenize(k,g):k,y,k);if(S=l(t,ie,ae),ne&&l(t,S,ne),T>1){var oe={cause:f+`,`+m,reach:re};s(e,t,n,S.prev,C,oe),d&&oe.reach>d.reach&&(d.reach=oe.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
176
+ `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})),Oc=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;var e={javascript:`clike`,actionscript:`javascript`,apex:[`clike`,`sql`],arduino:`cpp`,aspnet:[`markup`,`csharp`],birb:`clike`,bison:`c`,c:`clike`,csharp:`clike`,cpp:`c`,cfscript:`clike`,chaiscript:[`clike`,`cpp`],cilkc:`c`,cilkcpp:`cpp`,coffeescript:`javascript`,crystal:`ruby`,"css-extras":`css`,d:`clike`,dart:`clike`,django:`markup-templating`,ejs:[`javascript`,`markup-templating`],etlua:[`lua`,`markup-templating`],erb:[`ruby`,`markup-templating`],fsharp:`clike`,"firestore-security-rules":`clike`,flow:`javascript`,ftl:`markup-templating`,gml:`clike`,glsl:`c`,go:`clike`,gradle:`clike`,groovy:`clike`,haml:`ruby`,handlebars:`markup-templating`,haxe:`clike`,hlsl:`c`,idris:`haskell`,java:`clike`,javadoc:[`markup`,`java`,`javadoclike`],jolie:`clike`,jsdoc:[`javascript`,`javadoclike`,`typescript`],"js-extras":`javascript`,json5:`json`,jsonp:`json`,"js-templates":`javascript`,kotlin:`clike`,latte:[`clike`,`markup-templating`,`php`],less:`css`,lilypond:`scheme`,liquid:`markup-templating`,markdown:`markup`,"markup-templating":`markup`,mongodb:`javascript`,n4js:`javascript`,objectivec:`c`,opencl:`c`,parser:`markup`,php:`markup-templating`,phpdoc:[`php`,`javadoclike`],"php-extras":`php`,plsql:`sql`,processing:`clike`,protobuf:`clike`,pug:[`markup`,`javascript`],purebasic:`clike`,purescript:`haskell`,qsharp:`clike`,qml:`javascript`,qore:`clike`,racket:`scheme`,cshtml:[`markup`,`csharp`],jsx:[`markup`,`javascript`],tsx:[`jsx`,`typescript`],reason:`clike`,ruby:`clike`,sass:`css`,scss:`css`,scala:`java`,"shell-session":`bash`,smarty:`markup-templating`,solidity:`clike`,soy:`markup-templating`,sparql:`turtle`,sqf:`clike`,squirrel:`clike`,stata:[`mata`,`java`,`python`],"t4-cs":[`t4-templating`,`csharp`],"t4-vb":[`t4-templating`,`vbnet`],tap:`yaml`,tt2:[`clike`,`markup-templating`],textile:`markup`,twig:`markup-templating`,typescript:`javascript`,v:`clike`,vala:`clike`,vbnet:`basic`,velocity:`markup`,wiki:`markup`,xeora:`markup`,"xml-doc":`markup`,xquery:`markup`},t={html:`markup`,xml:`markup`,svg:`markup`,mathml:`markup`,ssml:`markup`,atom:`markup`,rss:`markup`,js:`javascript`,g4:`antlr4`,ino:`arduino`,"arm-asm":`armasm`,art:`arturo`,adoc:`asciidoc`,avs:`avisynth`,avdl:`avro-idl`,gawk:`awk`,sh:`bash`,shell:`bash`,shortcode:`bbcode`,rbnf:`bnf`,oscript:`bsl`,cs:`csharp`,dotnet:`csharp`,cfc:`cfscript`,"cilk-c":`cilkc`,"cilk-cpp":`cilkcpp`,cilk:`cilkcpp`,coffee:`coffeescript`,conc:`concurnas`,jinja2:`django`,"dns-zone":`dns-zone-file`,dockerfile:`docker`,gv:`dot`,eta:`ejs`,xlsx:`excel-formula`,xls:`excel-formula`,gamemakerlanguage:`gml`,po:`gettext`,gni:`gn`,ld:`linker-script`,"go-mod":`go-module`,hbs:`handlebars`,mustache:`handlebars`,hs:`haskell`,idr:`idris`,gitignore:`ignore`,hgignore:`ignore`,npmignore:`ignore`,webmanifest:`json`,kt:`kotlin`,kts:`kotlin`,kum:`kumir`,tex:`latex`,context:`latex`,ly:`lilypond`,emacs:`lisp`,elisp:`lisp`,"emacs-lisp":`lisp`,md:`markdown`,moon:`moonscript`,n4jsd:`n4js`,nani:`naniscript`,objc:`objectivec`,qasm:`openqasm`,objectpascal:`pascal`,px:`pcaxis`,pcode:`peoplecode`,plantuml:`plant-uml`,pq:`powerquery`,mscript:`powerquery`,pbfasm:`purebasic`,purs:`purescript`,py:`python`,qs:`qsharp`,rkt:`racket`,razor:`cshtml`,rpy:`renpy`,res:`rescript`,robot:`robotframework`,rb:`ruby`,"sh-session":`shell-session`,shellsession:`shell-session`,smlnj:`sml`,sol:`solidity`,sln:`solution-file`,rq:`sparql`,sclang:`supercollider`,t4:`t4-cs`,trickle:`tremor`,troy:`tremor`,trig:`turtle`,ts:`typescript`,tsconfig:`typoscript`,uscript:`unrealscript`,uc:`unrealscript`,url:`uri`,vb:`visual-basic`,vba:`visual-basic`,webidl:`web-idl`,mathematica:`wolfram`,nb:`wolfram`,wl:`wolfram`,xeoracube:`xeora`,yml:`yaml`},n={},r=`none`,i=`components/`,a=Prism.util.currentScript();if(a){var o=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,c=a.getAttribute(`data-autoloader-path`);if(c!=null)i=c.trim().replace(/\/?$/,`/`);else{var l=a.src;o.test(l)?i=l.replace(o,`components/`):s.test(l)&&(i=l.replace(s,`$1components/`))}}var u=Prism.plugins.autoloader={languages_path:i,use_minified:!0,loadLanguages:h};function d(e,t,n){var r=document.createElement(`script`);r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),t&&t()},r.onerror=function(){document.body.removeChild(r),n&&n()},document.body.appendChild(r)}function f(e){var t=(e.getAttribute(`data-dependencies`)||``).trim();if(!t){var n=e.parentElement;n&&n.tagName.toLowerCase()===`pre`&&(t=(n.getAttribute(`data-dependencies`)||``).trim())}return t?t.split(/\s*,\s*/g):[]}function p(e){if(e.indexOf(`!`)>=0)return!1;if(e=t[e]||e,e in Prism.languages)return!0;var r=n[e];return r&&!r.error&&r.loading===!1}function m(e){return u.languages_path+`prism-`+e+(u.use_minified?`.min`:``)+`.js`}function h(e,t,n){typeof e==`string`&&(e=[e]);var r=e.length,i=0,a=!1;if(r===0){t&&setTimeout(t,0);return}function o(){a||(i++,i===r&&t&&t(e))}e.forEach(function(e){g(e,o,function(){a||(a=!0,n&&n(e))})})}function g(r,i,a){var o=r.indexOf(`!`)>=0;r=r.replace(`!`,``),r=t[r]||r;function s(){var e=n[r];e||=n[r]={callbacks:[]},e.callbacks.push({success:i,error:a}),!o&&p(r)?_(r,`success`):!o&&e.error?_(r,`error`):(o||!e.loading)&&(e.loading=!0,e.error=!1,d(m(r),function(){e.loading=!1,_(r,`success`)},function(){e.loading=!1,e.error=!0,_(r,`error`)}))}var c=e[r];c&&c.length?h(c,s,a):s()}function _(e,t){if(n[e]){for(var r=n[e].callbacks,i=0,a=r.length;i<a;i++){var o=r[i][t];o&&setTimeout(o,0)}r.length=0}}Prism.hooks.add(`complete`,function(e){var t=e.element,n=e.language;if(t&&n&&n!==r){var i=f(t);/^diff-./i.test(n)?(i.push(`diff`),i.push(n.substr(5))):i.push(n),i.every(p)||h(i,function(){Prism.highlightElement(t)})}})})()})),kc=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;var e=[],t={},n=function(){};Prism.plugins.toolbar={};var r=Prism.plugins.toolbar.registerButton=function(n,r){var i=typeof r==`function`?r:function(e){var t;return typeof r.onClick==`function`?(t=document.createElement(`button`),t.type=`button`,t.addEventListener(`click`,function(){r.onClick.call(this,e)})):typeof r.url==`string`?(t=document.createElement(`a`),t.href=r.url):t=document.createElement(`span`),r.className&&t.classList.add(r.className),t.textContent=r.text,t};if(n in t){console.warn(`There is a button with the key "`+n+`" registered already.`);return}e.push(t[n]=i)};function i(e){for(;e;){var t=e.getAttribute(`data-toolbar-order`);if(t!=null)return t=t.trim(),t.length?t.split(/\s*,\s*/g):[];e=e.parentElement}}var a=Prism.plugins.toolbar.hook=function(r){var a=r.element.parentNode;if(a&&/pre/i.test(a.nodeName)&&!a.parentNode.classList.contains(`code-toolbar`)){var o=document.createElement(`div`);o.classList.add(`code-toolbar`),a.parentNode.insertBefore(o,a),o.appendChild(a);var s=document.createElement(`div`);s.classList.add(`toolbar`);var c=e,l=i(r.element);l&&(c=l.map(function(e){return t[e]||n})),c.forEach(function(e){var t=e(r);if(t){var n=document.createElement(`div`);n.classList.add(`toolbar-item`),n.appendChild(t),s.appendChild(n)}}),o.appendChild(s)}};r(`label`,function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute(`data-label`)){var n,r,i=t.getAttribute(`data-label`);try{r=document.querySelector(`template#`+i)}catch{}return r?n=r.content:(t.hasAttribute(`data-url`)?(n=document.createElement(`a`),n.href=t.getAttribute(`data-url`)):n=document.createElement(`span`),n.textContent=i),n}}),Prism.hooks.add(`complete`,a)})()})),Ac=s((()=>{(function(){if(typeof Prism<`u`&&typeof document<`u`){if(!Prism.plugins.toolbar){console.warn(`Show Languages plugin loaded before Toolbar plugin.`);return}var e={none:`Plain text`,plain:`Plain text`,plaintext:`Plain text`,text:`Plain text`,txt:`Plain text`,html:`HTML`,xml:`XML`,svg:`SVG`,mathml:`MathML`,ssml:`SSML`,rss:`RSS`,css:`CSS`,clike:`C-like`,js:`JavaScript`,abap:`ABAP`,abnf:`ABNF`,al:`AL`,antlr4:`ANTLR4`,g4:`ANTLR4`,apacheconf:`Apache Configuration`,apl:`APL`,aql:`AQL`,ino:`Arduino`,arff:`ARFF`,armasm:`ARM Assembly`,"arm-asm":`ARM Assembly`,art:`Arturo`,asciidoc:`AsciiDoc`,adoc:`AsciiDoc`,aspnet:`ASP.NET (C#)`,asm6502:`6502 Assembly`,asmatmel:`Atmel AVR Assembly`,autohotkey:`AutoHotkey`,autoit:`AutoIt`,avisynth:`AviSynth`,avs:`AviSynth`,"avro-idl":`Avro IDL`,avdl:`Avro IDL`,awk:`AWK`,gawk:`GAWK`,sh:`Shell`,basic:`BASIC`,bbcode:`BBcode`,bbj:`BBj`,bnf:`BNF`,rbnf:`RBNF`,bqn:`BQN`,bsl:`BSL (1C:Enterprise)`,oscript:`OneScript`,csharp:`C#`,cs:`C#`,dotnet:`C#`,cpp:`C++`,cfscript:`CFScript`,cfc:`CFScript`,cil:`CIL`,cilkc:`Cilk/C`,"cilk-c":`Cilk/C`,cilkcpp:`Cilk/C++`,"cilk-cpp":`Cilk/C++`,cilk:`Cilk/C++`,cmake:`CMake`,cobol:`COBOL`,coffee:`CoffeeScript`,conc:`Concurnas`,csp:`Content-Security-Policy`,"css-extras":`CSS Extras`,csv:`CSV`,cue:`CUE`,dataweave:`DataWeave`,dax:`DAX`,django:`Django/Jinja2`,jinja2:`Django/Jinja2`,"dns-zone-file":`DNS zone file`,"dns-zone":`DNS zone file`,dockerfile:`Docker`,dot:`DOT (Graphviz)`,gv:`DOT (Graphviz)`,ebnf:`EBNF`,editorconfig:`EditorConfig`,ejs:`EJS`,etlua:`Embedded Lua templating`,erb:`ERB`,"excel-formula":`Excel Formula`,xlsx:`Excel Formula`,xls:`Excel Formula`,fsharp:`F#`,"firestore-security-rules":`Firestore security rules`,ftl:`FreeMarker Template Language`,gml:`GameMaker Language`,gamemakerlanguage:`GameMaker Language`,gap:`GAP (CAS)`,gcode:`G-code`,gdscript:`GDScript`,gedcom:`GEDCOM`,gettext:`gettext`,po:`gettext`,glsl:`GLSL`,gn:`GN`,gni:`GN`,"linker-script":`GNU Linker Script`,ld:`GNU Linker Script`,"go-module":`Go module`,"go-mod":`Go module`,graphql:`GraphQL`,hbs:`Handlebars`,hs:`Haskell`,hcl:`HCL`,hlsl:`HLSL`,http:`HTTP`,hpkp:`HTTP Public-Key-Pins`,hsts:`HTTP Strict-Transport-Security`,ichigojam:`IchigoJam`,"icu-message-format":`ICU Message Format`,idr:`Idris`,ignore:`.ignore`,gitignore:`.gitignore`,hgignore:`.hgignore`,npmignore:`.npmignore`,inform7:`Inform 7`,javadoc:`JavaDoc`,javadoclike:`JavaDoc-like`,javastacktrace:`Java stack trace`,jq:`JQ`,jsdoc:`JSDoc`,"js-extras":`JS Extras`,json:`JSON`,webmanifest:`Web App Manifest`,json5:`JSON5`,jsonp:`JSONP`,jsstacktrace:`JS stack trace`,"js-templates":`JS Templates`,keepalived:`Keepalived Configure`,kts:`Kotlin Script`,kt:`Kotlin`,kumir:`KuMir (КуМир)`,kum:`KuMir (КуМир)`,latex:`LaTeX`,tex:`TeX`,context:`ConTeXt`,lilypond:`LilyPond`,ly:`LilyPond`,emacs:`Lisp`,elisp:`Lisp`,"emacs-lisp":`Lisp`,llvm:`LLVM IR`,log:`Log file`,lolcode:`LOLCODE`,magma:`Magma (CAS)`,md:`Markdown`,"markup-templating":`Markup templating`,matlab:`MATLAB`,maxscript:`MAXScript`,mel:`MEL`,metafont:`METAFONT`,mongodb:`MongoDB`,moon:`MoonScript`,n1ql:`N1QL`,n4js:`N4JS`,n4jsd:`N4JS`,"nand2tetris-hdl":`Nand To Tetris HDL`,naniscript:`Naninovel Script`,nani:`Naninovel Script`,nasm:`NASM`,neon:`NEON`,nginx:`nginx`,nsis:`NSIS`,objectivec:`Objective-C`,objc:`Objective-C`,ocaml:`OCaml`,opencl:`OpenCL`,openqasm:`OpenQasm`,qasm:`OpenQasm`,parigp:`PARI/GP`,objectpascal:`Object Pascal`,psl:`PATROL Scripting Language`,pcaxis:`PC-Axis`,px:`PC-Axis`,peoplecode:`PeopleCode`,pcode:`PeopleCode`,php:`PHP`,phpdoc:`PHPDoc`,"php-extras":`PHP Extras`,"plant-uml":`PlantUML`,plantuml:`PlantUML`,plsql:`PL/SQL`,powerquery:`PowerQuery`,pq:`PowerQuery`,mscript:`PowerQuery`,powershell:`PowerShell`,promql:`PromQL`,properties:`.properties`,protobuf:`Protocol Buffers`,purebasic:`PureBasic`,pbfasm:`PureBasic`,purs:`PureScript`,py:`Python`,qsharp:`Q#`,qs:`Q#`,q:`Q (kdb+ database)`,qml:`QML`,rkt:`Racket`,cshtml:`Razor C#`,razor:`Razor C#`,jsx:`React JSX`,tsx:`React TSX`,renpy:`Ren'py`,rpy:`Ren'py`,res:`ReScript`,rest:`reST (reStructuredText)`,robotframework:`Robot Framework`,robot:`Robot Framework`,rb:`Ruby`,sas:`SAS`,sass:`Sass (Sass)`,scss:`Sass (SCSS)`,"shell-session":`Shell session`,"sh-session":`Shell session`,shellsession:`Shell session`,sml:`SML`,smlnj:`SML/NJ`,solidity:`Solidity (Ethereum)`,sol:`Solidity (Ethereum)`,"solution-file":`Solution file`,sln:`Solution file`,soy:`Soy (Closure Template)`,sparql:`SPARQL`,rq:`SPARQL`,"splunk-spl":`Splunk SPL`,sqf:`SQF: Status Quo Function (Arma 3)`,sql:`SQL`,stata:`Stata Ado`,iecst:`Structured Text (IEC 61131-3)`,supercollider:`SuperCollider`,sclang:`SuperCollider`,systemd:`Systemd configuration file`,"t4-templating":`T4 templating`,"t4-cs":`T4 Text Templates (C#)`,t4:`T4 Text Templates (C#)`,"t4-vb":`T4 Text Templates (VB)`,tap:`TAP`,tt2:`Template Toolkit 2`,toml:`TOML`,trickle:`trickle`,troy:`troy`,trig:`TriG`,ts:`TypeScript`,tsconfig:`TSConfig`,uscript:`UnrealScript`,uc:`UnrealScript`,uorazor:`UO Razor Script`,uri:`URI`,url:`URL`,vbnet:`VB.Net`,vhdl:`VHDL`,vim:`vim`,"visual-basic":`Visual Basic`,vba:`VBA`,vb:`Visual Basic`,wasm:`WebAssembly`,"web-idl":`Web IDL`,webidl:`Web IDL`,wgsl:`WGSL`,wiki:`Wiki markup`,wolfram:`Wolfram language`,nb:`Mathematica Notebook`,wl:`Wolfram language`,xeoracube:`XeoraCube`,"xml-doc":`XML doc (.net)`,xojo:`Xojo (REALbasic)`,xquery:`XQuery`,yaml:`YAML`,yml:`YAML`,yang:`YANG`};Prism.plugins.toolbar.registerButton(`show-language`,function(t){var n=t.element.parentNode;if(!n||!/pre/i.test(n.nodeName))return;function r(e){return e&&(e.substring(0,1).toUpperCase()+e.substring(1)).replace(/s(?=cript)/,`S`)}var i=n.getAttribute(`data-language`)||e[t.language]||r(t.language);if(i){var a=document.createElement(`span`);return a.textContent=i,a}})}})()})),jc=s((()=>{(function(){if(typeof Prism>`u`||typeof document>`u`)return;if(!Prism.plugins.toolbar){console.warn(`Copy to Clipboard plugin loaded before Toolbar plugin.`);return}function e(e,t){e.addEventListener(`click`,function(){n(t)})}function t(e){var t=document.createElement(`textarea`);t.value=e.getText(),t.style.top=`0`,t.style.left=`0`,t.style.position=`fixed`,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand(`copy`);setTimeout(function(){n?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}function n(e){navigator.clipboard?navigator.clipboard.writeText(e.getText()).then(e.success,function(){t(e)}):t(e)}function r(e){window.getSelection().selectAllChildren(e)}function i(e){var t={copy:`Copy`,"copy-error":`Press Ctrl+C to copy`,"copy-success":`Copied!`,"copy-timeout":5e3},n=`data-prismjs-`;for(var r in t){for(var i=n+r,a=e;a&&!a.hasAttribute(i);)a=a.parentElement;a&&(t[r]=a.getAttribute(i))}return t}Prism.plugins.toolbar.registerButton(`copy-to-clipboard`,function(t){var n=t.element,a=i(n),o=document.createElement(`button`);o.className=`copy-to-clipboard-button`,o.setAttribute(`type`,`button`);var s=document.createElement(`span`);return o.appendChild(s),l(`copy`),e(o,{getText:function(){return n.textContent},success:function(){l(`copy-success`),c()},error:function(){l(`copy-error`),setTimeout(function(){r(n)},1),c()}}),o;function c(){setTimeout(function(){l(`copy`)},a[`copy-timeout`])}function l(e){s.textContent=a[e],o.setAttribute(`data-copy-state`,e)}})})()})),Mc=`https://cdn.jsdelivr.net/npm/prismjs@1.28.0`,Nc=null,Pc=new Set,Fc=null;function Ic(){let e=Po().options.prismCdn;return typeof e==`string`&&e?e:Mc}function Lc(){return document.getElementById(`twikoo`)??document.querySelector(`.twikoo`)??document.body}async function Rc(){let e=window;e.Prism=e.Prism??{},e.Prism.manual=!0;let t=await Promise.resolve().then(()=>u(Dc())),n=t.default??t;e.Prism=n,await Promise.resolve().then(()=>u(Oc()));let r=n.plugins.autoloader;return r&&(r.languages_path=`${Ic()}/components/`),Pc.add(`autoloader`),n}async function zc(e){if(!e||e===`none`)return;let t=e.split(`,`).map(e=>e.trim()).filter(e=>e===`showLanguage`||e===`copyButton`);if(!(t.length===0||t.every(e=>Pc.has(e)))){await Promise.resolve().then(()=>u(kc()));for(let e of t)e===`showLanguage`?await Promise.resolve().then(()=>u(Ac())):await Promise.resolve().then(()=>u(jc())),Pc.add(e)}}function Bc(e,t){if(!e||e===`none`)return;let n=Lc();if(Fc&&n.contains(Fc))return;let r=document.createElement(`link`);r.href=e==="default"?`${t}/themes/prism.min.css`:`${t}/themes/prism-${e}.min.css`,r.rel=`stylesheet`,r.type=`text/css`,n.appendChild(r),Fc=r}function Vc(e,t,n){e&&(Nc??=Rc().catch(e=>(zo.warn(`Prism 代码高亮加载失败`,e),null)),Nc.then(async r=>{r&&(await zc(n??``),Bc(t??``,Ic()),r.highlightAllUnder(e))}).catch(e=>zo.warn(`代码高亮执行失败`,e)))}var Hc=u(s(((e,t)=>{(function(e){"use strict";function n(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function r(e,t){return e<<t|e>>>32-t}function i(e,t,i,a,o,s){return n(r(n(n(t,e),n(a,s)),o),i)}function a(e,t,n,r,a,o,s){return i(t&n|~t&r,e,t,a,o,s)}function o(e,t,n,r,a,o,s){return i(t&r|n&~r,e,t,a,o,s)}function s(e,t,n,r,a,o,s){return i(t^n^r,e,t,a,o,s)}function c(e,t,n,r,a,o,s){return i(n^(t|~r),e,t,a,o,s)}function l(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var r,i,l,u,d,f=1732584193,p=-271733879,m=-1732584194,h=271733878;for(r=0;r<e.length;r+=16)i=f,l=p,u=m,d=h,f=a(f,p,m,h,e[r],7,-680876936),h=a(h,f,p,m,e[r+1],12,-389564586),m=a(m,h,f,p,e[r+2],17,606105819),p=a(p,m,h,f,e[r+3],22,-1044525330),f=a(f,p,m,h,e[r+4],7,-176418897),h=a(h,f,p,m,e[r+5],12,1200080426),m=a(m,h,f,p,e[r+6],17,-1473231341),p=a(p,m,h,f,e[r+7],22,-45705983),f=a(f,p,m,h,e[r+8],7,1770035416),h=a(h,f,p,m,e[r+9],12,-1958414417),m=a(m,h,f,p,e[r+10],17,-42063),p=a(p,m,h,f,e[r+11],22,-1990404162),f=a(f,p,m,h,e[r+12],7,1804603682),h=a(h,f,p,m,e[r+13],12,-40341101),m=a(m,h,f,p,e[r+14],17,-1502002290),p=a(p,m,h,f,e[r+15],22,1236535329),f=o(f,p,m,h,e[r+1],5,-165796510),h=o(h,f,p,m,e[r+6],9,-1069501632),m=o(m,h,f,p,e[r+11],14,643717713),p=o(p,m,h,f,e[r],20,-373897302),f=o(f,p,m,h,e[r+5],5,-701558691),h=o(h,f,p,m,e[r+10],9,38016083),m=o(m,h,f,p,e[r+15],14,-660478335),p=o(p,m,h,f,e[r+4],20,-405537848),f=o(f,p,m,h,e[r+9],5,568446438),h=o(h,f,p,m,e[r+14],9,-1019803690),m=o(m,h,f,p,e[r+3],14,-187363961),p=o(p,m,h,f,e[r+8],20,1163531501),f=o(f,p,m,h,e[r+13],5,-1444681467),h=o(h,f,p,m,e[r+2],9,-51403784),m=o(m,h,f,p,e[r+7],14,1735328473),p=o(p,m,h,f,e[r+12],20,-1926607734),f=s(f,p,m,h,e[r+5],4,-378558),h=s(h,f,p,m,e[r+8],11,-2022574463),m=s(m,h,f,p,e[r+11],16,1839030562),p=s(p,m,h,f,e[r+14],23,-35309556),f=s(f,p,m,h,e[r+1],4,-1530992060),h=s(h,f,p,m,e[r+4],11,1272893353),m=s(m,h,f,p,e[r+7],16,-155497632),p=s(p,m,h,f,e[r+10],23,-1094730640),f=s(f,p,m,h,e[r+13],4,681279174),h=s(h,f,p,m,e[r],11,-358537222),m=s(m,h,f,p,e[r+3],16,-722521979),p=s(p,m,h,f,e[r+6],23,76029189),f=s(f,p,m,h,e[r+9],4,-640364487),h=s(h,f,p,m,e[r+12],11,-421815835),m=s(m,h,f,p,e[r+15],16,530742520),p=s(p,m,h,f,e[r+2],23,-995338651),f=c(f,p,m,h,e[r],6,-198630844),h=c(h,f,p,m,e[r+7],10,1126891415),m=c(m,h,f,p,e[r+14],15,-1416354905),p=c(p,m,h,f,e[r+5],21,-57434055),f=c(f,p,m,h,e[r+12],6,1700485571),h=c(h,f,p,m,e[r+3],10,-1894986606),m=c(m,h,f,p,e[r+10],15,-1051523),p=c(p,m,h,f,e[r+1],21,-2054922799),f=c(f,p,m,h,e[r+8],6,1873313359),h=c(h,f,p,m,e[r+15],10,-30611744),m=c(m,h,f,p,e[r+6],15,-1560198380),p=c(p,m,h,f,e[r+13],21,1309151649),f=c(f,p,m,h,e[r+4],6,-145523070),h=c(h,f,p,m,e[r+11],10,-1120210379),m=c(m,h,f,p,e[r+2],15,718787259),p=c(p,m,h,f,e[r+9],21,-343485551),f=n(f,i),p=n(p,l),m=n(m,u),h=n(h,d);return[f,p,m,h]}function u(e){var t,n=``,r=e.length*32;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function d(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=e.length*8;for(t=0;t<r;t+=8)n[t>>5]|=(e.charCodeAt(t/8)&255)<<t%32;return n}function f(e){return u(l(d(e),e.length*8))}function p(e,t){var n,r=d(e),i=[],a=[],o;for(i[15]=a[15]=void 0,r.length>16&&(r=l(r,e.length*8)),n=0;n<16;n+=1)i[n]=r[n]^909522486,a[n]=r[n]^1549556828;return o=l(i.concat(d(t)),512+t.length*8),u(l(a.concat(o),640))}function m(e){for(var t=`0123456789abcdef`,n=``,r,i=0;i<e.length;i+=1)r=e.charCodeAt(i),n+=t.charAt(r>>>4&15)+t.charAt(r&15);return n}function h(e){return unescape(encodeURIComponent(e))}function g(e){return f(h(e))}function _(e){return m(g(e))}function v(e,t){return p(h(e),h(t))}function y(e,t){return m(v(e,t))}function b(e,t,n){return t?n?v(t,e):y(t,e):n?g(e):_(e)}typeof define==`function`&&define.amd?define(function(){return b}):typeof t==`object`&&t.exports?t.exports=b:e.md5=b})(e)}))()),Uc=`input is invalid type`,Wc=`finalize already called`,Gc=typeof ArrayBuffer<`u`,Kc=function(e){if(typeof e==`string`)return[e,!0];if(Array.isArray(e))return[e,!1];if(Gc&&e){if(e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(ArrayBuffer.isView(e))return[e,!1]}throw Error(Uc)},G=`0123456789abcdef`.split(``),qc=[-2147483648,8388608,32768,128],Jc=[24,16,8,0],Yc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Xc=[`hex`,`array`,`digest`,`arrayBuffer`],Zc=[],Qc=function(e,t){return function(n){return new nl(t,!0).update(n)[e]()}},$c=function(e){var t=Qc(`hex`,e);t.create=function(){return new nl(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<Xc.length;++n){var r=Xc[n];t[r]=Qc(r,e)}return t},el=function(e,t){return function(n,r){return new rl(n,t,!0).update(r)[e]()}},tl=function(e){var t=el(`hex`,e);t.create=function(t){return new rl(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<Xc.length;++n){var r=Xc[n];t[r]=el(r,e)}return t};function nl(e,t){t?(Zc[0]=Zc[16]=Zc[1]=Zc[2]=Zc[3]=Zc[4]=Zc[5]=Zc[6]=Zc[7]=Zc[8]=Zc[9]=Zc[10]=Zc[11]=Zc[12]=Zc[13]=Zc[14]=Zc[15]=0,this.blocks=Zc):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}nl.prototype.update=function(e){if(this.finalized)throw Error(Wc);var t=Kc(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<Jc[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<Jc[a++&3],s[a>>>2]|=(128|r&63)<<Jc[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<Jc[a++&3],s[a>>>2]|=(128|r>>>6&63)<<Jc[a++&3],s[a>>>2]|=(128|r&63)<<Jc[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<Jc[a++&3],s[a>>>2]|=(128|r>>>12&63)<<Jc[a++&3],s[a>>>2]|=(128|r>>>6&63)<<Jc[a++&3],s[a>>>2]|=(128|r&63)<<Jc[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<Jc[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},nl.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=qc[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},nl.prototype.hash=function(){for(var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l=16,u,d,f,p,m,h,g,_,v,y;l<64;++l)p=c[l-15],u=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=c[l-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(y=t&n,l=0;l<64;l+=4)this.first?(this.is224?(g=300032,p=c[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(g=704751109,p=c[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),g=e&t,f=g^e&n^y,h=i&a^~i&o,p=s+d+h+Yc[l]+c[l],m=u+f,s=r+p<<0,r=p+m<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),_=r&e,f=_^r&t^g,h=s&i^~s&a,p=o+d+h+Yc[l+1]+c[l+1],m=u+f,o=n+p<<0,n=p+m<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),v=n&r,f=v^n&e^_,h=o&s^~o&i,p=a+d+h+Yc[l+2]+c[l+2],m=u+f,a=t+p<<0,t=p+m<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),y=t&n,f=y^t&r^v,h=a&o^~a&s,p=i+d+h+Yc[l+3]+c[l+3],m=u+f,i=e+p<<0,e=p+m<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},nl.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=G[e>>>28&15]+G[e>>>24&15]+G[e>>>20&15]+G[e>>>16&15]+G[e>>>12&15]+G[e>>>8&15]+G[e>>>4&15]+G[e&15]+G[t>>>28&15]+G[t>>>24&15]+G[t>>>20&15]+G[t>>>16&15]+G[t>>>12&15]+G[t>>>8&15]+G[t>>>4&15]+G[t&15]+G[n>>>28&15]+G[n>>>24&15]+G[n>>>20&15]+G[n>>>16&15]+G[n>>>12&15]+G[n>>>8&15]+G[n>>>4&15]+G[n&15]+G[r>>>28&15]+G[r>>>24&15]+G[r>>>20&15]+G[r>>>16&15]+G[r>>>12&15]+G[r>>>8&15]+G[r>>>4&15]+G[r&15]+G[i>>>28&15]+G[i>>>24&15]+G[i>>>20&15]+G[i>>>16&15]+G[i>>>12&15]+G[i>>>8&15]+G[i>>>4&15]+G[i&15]+G[a>>>28&15]+G[a>>>24&15]+G[a>>>20&15]+G[a>>>16&15]+G[a>>>12&15]+G[a>>>8&15]+G[a>>>4&15]+G[a&15]+G[o>>>28&15]+G[o>>>24&15]+G[o>>>20&15]+G[o>>>16&15]+G[o>>>12&15]+G[o>>>8&15]+G[o>>>4&15]+G[o&15];return this.is224||(c+=G[s>>>28&15]+G[s>>>24&15]+G[s>>>20&15]+G[s>>>16&15]+G[s>>>12&15]+G[s>>>8&15]+G[s>>>4&15]+G[s&15]),c},nl.prototype.toString=nl.prototype.hex,nl.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255];return this.is224||c.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),c},nl.prototype.array=nl.prototype.digest,nl.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function rl(e,t,n){var r,i=Kc(e);if(e=i[0],i[1]){var a=[],o=e.length,s=0,c;for(r=0;r<o;++r)c=e.charCodeAt(r),c<128?a[s++]=c:c<2048?(a[s++]=192|c>>>6,a[s++]=128|c&63):c<55296||c>=57344?(a[s++]=224|c>>>12,a[s++]=128|c>>>6&63,a[s++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++r)&1023),a[s++]=240|c>>>18,a[s++]=128|c>>>12&63,a[s++]=128|c>>>6&63,a[s++]=128|c&63);e=a}e.length>64&&(e=new nl(t,!0).update(e).array());var l=[],u=[];for(r=0;r<64;++r){var d=e[r]||0;l[r]=92^d,u[r]=54^d}nl.call(this,t,n),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}rl.prototype=new nl,rl.prototype.finalize=function(){if(nl.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();nl.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),nl.prototype.finalize.call(this)}};var il=$c(),al=$c(!0);il.sha256=il,il.sha224=al,il.hmac=tl(),al.hmac=tl(!0),[...To];var ol=[`lskypro`,`piclist`,`easyimage`,`s3`];function sl(e){return`https://thirdqq.qlogo.cn/g?b=sdk&nk=${e.replace(/@qq\.com/gi,``)}&s=140`}function cl(e,t={}){if(e.avatar)return e.avatar;let n=t.GRAVATAR_CDN||`weavatar.com`,r=t.DEFAULT_GRAVATAR||`initials&name=${e.nick??``}`;return e.mailMd5?`https://${n}/avatar/${e.mailMd5}?d=${r}`:e.mail&&Td(e.mail)?sl(e.mail):e.mail?`https://${n}/avatar/${(n===`cravatar.cn`?Hc.default:il)(wd(e.mail))}?d=${r}`:``}function ll(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ul=ll();function dl(e){ul=e}var fl={exec:()=>null};function pl(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function ml(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(gl.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var hl=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),gl={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,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,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:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:pl(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:pl(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:pl(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:pl(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:pl(e=>RegExp(`^ {0,${e}}(?:</?(?:${jl})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:pl(e=>RegExp(`^ {0,${e}}>`))},_l=/^(?:[ \t]*(?:\n|$))+/,vl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,bl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sl=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Cl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wl=ml(Cl).replace(/bull/g,Sl).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(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Tl=ml(Cl).replace(/bull/g,Sl).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(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),El=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Dl=/^[^\n]+/,Ol=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kl=ml(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ol).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Al=ml(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Sl).getRegex(),jl=`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`,Ml=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nl=ml(`^ {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`,Ml).replace(`tag`,jl).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pl=e=>ml(El).replace(`hr`,bl).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`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,jl).getRegex(),Fl=Pl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Il=Pl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ll={blockquote:ml(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Il).getRegex(),code:vl,def:kl,fences:yl,heading:xl,hr:bl,html:Nl,lheading:wl,list:Al,newline:_l,paragraph:Fl,table:fl,text:Dl},Rl=ml(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,bl).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`,jl).getRegex(),zl={...Ll,lheading:Tl,table:Rl,paragraph:ml(El).replace(`hr`,bl).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Rl).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`,jl).getRegex()},Bl={...Ll,html:ml(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Ml).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:fl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ml(El).replace(`hr`,bl).replace(`heading`,` *#{1,6} *[^
177
+ ]`).replace(`lheading`,wl).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Vl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ul=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Wl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gl=/[\p{P}\p{S}]/u,Kl=/[\s\p{P}\p{S}]/u,ql=/[^\s\p{P}\p{S}]/u,Jl=ml(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Kl).getRegex(),Yl=/[\p{Pi}\p{Ps}"']/u,Xl=/(?!~)[\p{P}\p{S}]/u,Zl=/(?!~)[\s\p{P}\p{S}]/u,Ql=/(?:[^\s\p{P}\p{S}]|~)/u,$l=ml(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,hl?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),eu=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tu=ml(eu,`u`).replace(/punct/g,Gl).getRegex(),nu=ml(eu,`u`).replace(/punct/g,Xl).getRegex(),ru=ml(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Yl).replace(/punct/g,Gl).getRegex(),iu=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,au=ml(iu,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),ou=ml(iu,`gu`).replace(/notPunctSpace/g,Ql).replace(/punctSpace/g,Zl).replace(/punct/g,Xl).getRegex(),su=ml(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),cu=ml(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),lu=ml(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),uu=ml(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Gl).getRegex(),du=ml(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ql).replace(/punctSpace/g,Kl).replace(/punct/g,Gl).getRegex(),fu=ml(/\\(punct)/,`gu`).replace(/punct/g,Gl).getRegex(),pu=ml(/^<(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(),mu=ml(Ml).replace(`(?:-->|$)`,`-->`).getRegex(),hu=ml(`^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`,mu).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gu=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,_u=ml(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,gu).getRegex(),vu=ml(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,_u).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yu=ml(/^!?\[(label)\]\[(ref)\]/).replace(`label`,_u).replace(`ref`,Ol).getRegex(),bu=ml(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ol).getRegex(),xu=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Su=ml(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,gu).getRegex(),Cu=ml(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ml(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Su).replace(`ref`,xu).getRegex()).replace(`nolink`,ml(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,xu).getRegex()).getRegex(),wu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Tu={_backpedal:fl,anyPunctuation:fu,autolink:pu,blockSkip:$l,br:Ul,code:Hl,del:fl,delLDelim:fl,delRDelim:fl,emStrongLDelim:tu,emStrongRDelimAst:au,emStrongRDelimUnd:cu,escape:Vl,link:vu,nolink:bu,punctuation:Jl,reflink:yu,reflinkSearch:Cu,tag:hu,text:Wl,url:fl},Eu={...Tu,emStrongLDelim:ru,emStrongRDelimAst:su,emStrongRDelimUnd:lu,link:ml(/^!?\[(label)\]\((.*?)\)/).replace(`label`,_u).getRegex(),reflink:ml(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,_u).getRegex()},Du={...Tu,emStrongRDelimAst:ou,emStrongLDelim:nu,delLDelim:uu,delRDelim:du,url:ml(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,wu).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:ml(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,wu).getRegex()},Ou={...Du,br:ml(Ul).replace(`{2,}`,`*`).getRegex(),text:ml(Du.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},ku={normal:Ll,gfm:zl,pedantic:Bl},Au={normal:Tu,gfm:Du,breaks:Ou,pedantic:Eu},ju={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Mu=e=>ju[e];function Nu(e,t){if(t){if(gl.escapeTest.test(e))return e.replace(gl.escapeReplace,Mu)}else if(gl.escapeTestNoEncode.test(e))return e.replace(gl.escapeReplaceNoEncode,Mu);return e}function Pu(e){try{e=encodeURI(e).replace(gl.percentDecode,`%`)}catch{return null}return e}function Fu(e,t){let n=e.replace(gl.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(gl.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(gl.slashPipe,`|`);return n}function Iu(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Lu(e){let t=e.split(`
178
+ `),n=t.length-1;for(;n>=0&&gl.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
179
+ `)}function Ru(e){return e.toLowerCase().toUpperCase().toLowerCase()}function zu(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Bu(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Vu(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function Hu(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
180
180
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
181
- `)}function Ru(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var zu=class{options;rules;lexer;constructor(e){this.options=e||al}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Mu(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Lu(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ju(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:ju(t[0],`
182
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:ju(t[0],`
183
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ju(t[0],`
181
+ `)}function Uu(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var Wu=class{options;rules;lexer;constructor(e){this.options=e||ul}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Lu(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Hu(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Iu(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Iu(t[0],`
182
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Iu(t[0],`
183
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Iu(t[0],`
184
184
  `).split(`
185
185
  `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
186
186
  `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
@@ -192,20 +192,20 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
192
192
  ${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
193
193
  `+e.join(`
194
194
  `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
195
- `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={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 a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Fu(t[2].split(`
195
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={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 a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Bu(t[2].split(`
196
196
  `,1)[0],t[1].length),l=e.split(`
197
197
  `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
198
198
  `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
199
199
  `,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
200
200
  `+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
201
201
  `+l}u=!l.trim(),r+=p+`
202
- `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Mu(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=Nu(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:ju(t[0],`
203
- `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Au(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
204
- `):[],a={type:`table`,raw:ju(t[0],`
205
- `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Au(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:ju(t[0],`
202
+ `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Lu(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=Ru(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Iu(t[0],`
203
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fu(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
204
+ `):[],a={type:`table`,raw:Iu(t[0],`
205
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Fu(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Iu(t[0],`
206
206
  `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
207
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Ru(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=ju(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=Pu(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),Iu(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Ru(e,n[1],r,this.rules))return;let i=t[Nu((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Iu(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);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 i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Bu=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||al,this.options.tokenizer=this.options.tokenizer||new zu,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 t={other:dl,block:wu.normal,inline:Tu.normal};this.options.pedantic?(t.block=wu.pedantic,t.inline=Tu.pedantic):this.options.gfm&&(t.block=wu.gfm,t.inline=this.options.breaks?Tu.breaks:Tu.gfm),this.tokenizer.rules=t}static get rules(){return{block:wu,inline:Tu}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(dl.carriageReturn,`
208
- `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(dl.tabCharGlobal,` `).replace(dl.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
207
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Uu(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=Iu(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=zu(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),Vu(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Uu(e,n[1],r,this.rules))return;let i=t[Ru((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Vu(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);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 i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Gu=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ul,this.options.tokenizer=this.options.tokenizer||new Wu,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 t={other:gl,block:ku.normal,inline:Au.normal};this.options.pedantic?(t.block=ku.pedantic,t.inline=Au.pedantic):this.options.gfm&&(t.block=ku.gfm,t.inline=this.options.breaks?Au.breaks:Au.gfm),this.tokenizer.rules=t}static get rules(){return{block:ku,inline:Au}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(gl.carriageReturn,`
208
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(gl.tabCharGlobal,` `).replace(gl.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
209
209
  `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
210
210
  `)?``:`
211
211
  `)+i.raw,n.text+=`
@@ -218,9 +218,9 @@ ${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){
218
218
  `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
219
219
  `)?``:`
220
220
  `)+i.raw,n.text+=`
221
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,Nu(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,Nu(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Vu=class{options;parser;constructor(e){this.options=e||al}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(dl.notSpaceStart)?.[0],i=e?e.replace(dl.endingNewline,``)+`
222
- `:``;return r?`<pre><code class="language-`+Ou(r)+`">`+(n?i:Ou(i,!0))+`</code></pre>
223
- `:`<pre><code>`+(n?i:Ou(i,!0))+`</code></pre>
221
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,Ru(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,Ru(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Ku=class{options;parser;constructor(e){this.options=e||ul}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(gl.notSpaceStart)?.[0],i=e?e.replace(gl.endingNewline,``)+`
222
+ `:``;return r?`<pre><code class="language-`+Nu(r)+`">`+(n?i:Nu(i,!0))+`</code></pre>
223
+ `:`<pre><code>`+(n?i:Nu(i,!0))+`</code></pre>
224
224
  `}blockquote({tokens:e}){return`<blockquote>
225
225
  ${this.parser.parse(e)}</blockquote>
226
226
  `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
@@ -236,15 +236,15 @@ ${this.parser.parse(e)}</blockquote>
236
236
  `}tablerow({text:e}){return`<tr>
237
237
  ${e}</tr>
238
238
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
239
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ou(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Ou(n,!0):this.parser.parseInline(r),o=ku(e);if(o===null)return a;e=Ou(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+Ou(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ku(e);if(i===null)return Ou(n);e=i;let a=`<img src="${Ou(e)}" alt="${Ou(n)}"`;return t&&(a+=` title="${Ou(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Ou(e.text)}},Hu=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Uu=class e{options;renderer;textRenderer;constructor(e){this.options=e||al,this.options.renderer=this.options.renderer||new Vu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hu}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Wu=class{options;block;constructor(e){this.options=e||al}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Bu.lex:Bu.lexInline}provideParser(e=this.block){return e?Uu.parse:Uu.parseInline}},Gu=class{defaults=il();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Uu;Renderer=Vu;TextRenderer=Hu;Lexer=Bu;Tokenizer=zu;Hooks=Wu;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Vu(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new zu(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Wu;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Wu.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Wu.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Bu.lex(e,t??this.defaults)}parser(e,t){return Uu.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Bu.lex:Bu.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Uu.parse:Uu.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Bu.lex:Bu.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Uu.parse:Uu.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
240
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Ou(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Ku=new Gu;function qu(e,t){return Ku.parse(e,t)}qu.options=qu.setOptions=function(e){return Ku.setOptions(e),qu.defaults=Ku.defaults,ol(qu.defaults),qu},qu.getDefaults=il,qu.defaults=al;function Ju(...e){return Ku.use(...e),qu.defaults=Ku.defaults,ol(qu.defaults),qu}qu.use=Ju,qu.walkTokens=function(e,t){return Ku.walkTokens(e,t)},qu.parseInline=Ku.parseInline,qu.Parser=Uu,qu.parser=Uu.parse,qu.Renderer=Vu,qu.TextRenderer=Hu,qu.Lexer=Bu,qu.lexer=Bu.lex,qu.Tokenizer=zu,qu.Hooks=Wu,qu.parse=qu,qu.options,qu.setOptions,qu.walkTokens,qu.parseInline,Uu.parse,Bu.lex;var Yu={};function Xu(e){Yu=e??{}}var Zu=new Gu({gfm:!0,breaks:!0});Zu.use({tokenizer:{code(){}}});var Qu=/^(\$\$[\s\S]*?\$\$|\\\[([\s\S]*?)\\\]|\\\(([\s\S]*?)\\\)|\$[^$\n]+?\$)/;Zu.use({extensions:[{name:`twikoo-math`,level:`inline`,start(e){return e.search(Qu)},tokenizer(e){let t=Qu.exec(e);if(t)return{type:`twikoo-math`,raw:t[0],text:t[0]}},renderer(e){return e.text}}]});function $u(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}Zu.use({renderer:{image(e){return e.owo?`<img class="${$u([`tk-owo-emotion`,e.className].filter(Boolean).join(` `))}" loading="lazy" src="${$u(e.href)}" alt="${$u(e.text)}">`:!1}},extensions:[{name:`owo`,level:`inline`,start(e){return e.indexOf(`:`)},tokenizer(e){if(this.lexer.state.inRawBlock)return;let t=/^:([^\s:]+):/.exec(e);if(!t||!Object.prototype.hasOwnProperty.call(Yu,t[1]))return;let n=Yu[t[1]],r=typeof n==`string`?n:n?.src;if(typeof r==`string`&&r)return{type:`image`,raw:t[0],href:r,title:null,text:t[0],tokens:[{type:`text`,raw:t[0],text:t[0]}],className:typeof n==`string`?void 0:n.className,owo:!0}}}]});function ed(e){return Zu.parse(e)}var td=document.createElement(`template`);function nd(e){try{return td.innerHTML=bc.sanitize(e),td.content.querySelector(`img`)}catch(e){return Po.warn(`OwO 表情解析失败`,e),null}}function rd(e){return e.split(`#`).shift()?.split(`?`)?.shift()?.split(`/`).pop()??``}function id(e){try{for(let t of Object.values(e))if(t.type===`image`)for(let e of t.container)e.text||=rd(nd(e.icon)?.src??``);return e}catch(e){Po.warn(`OwO 数据格式异常`,e);return}}function ad(e){return new Promise(t=>{let n=new XMLHttpRequest;n.onreadystatechange=()=>{if(n.readyState===4){if(n.status>=200&&n.status<300||n.status===304)try{t(id(JSON.parse(n.responseText))??{})}catch(e){Po.warn(`OwO 数据解析失败`,e),t({})}else Po.warn(`OwO 数据请求失败:${n.status}`),t({})}};try{n.open(`get`,e,!0),n.send(null)}catch(e){Po.warn(`OwO 数据请求异常`,e),t({})}})}async function od(e){let t={},n=await Promise.all(e.split(`,`).map(e=>ad(e.trim())));return Object.assign(t,...n),t}function sd(e){let t=Object.create(null);for(let n of Object.values(e??{}))for(let e of n.container??[]){let n=nd(e.icon);n?.src&&e.text&&(t[e.text]={src:n.src,className:n.className})}return Xu(t),t}var cd=`data-tk-loading`;function ld(e){for(let t of Array.from(e.children))if(t.hasAttribute(cd))return t;return null}function ud(e){if(ld(e))return;let t=document.createElement(`div`);t.setAttribute(cd,`1`),t.className=`tk-loading-mask`;let n=document.createElement(`div`);n.className=`tk-loading-spinner`,n.innerHTML=`<svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none"></circle></svg>`,t.appendChild(n),e.appendChild(t)}function dd(e){ld(e)?.remove(),e.classList.remove(`tk-loading-parent--relative`)}function fd(e,t){if(t.value){let t=getComputedStyle(e).position;(!t||t===`static`)&&e.classList.add(`tk-loading-parent--relative`),ud(e)}else dd(e)}var pd={mounted:fd,updated:fd,unmounted:dd};function md(e,t){hd(e);let n=n=>{let r=n.target;r&&e!==r&&!e.contains(r)&&t.value?.()};e.__tkClickoutside=n,document.addEventListener(`click`,n,!0)}function hd(e){let t=e;t.__tkClickoutside&&(document.removeEventListener(`click`,t.__tkClickoutside,!0),delete t.__tkClickoutside)}var gd={mounted:md,updated:md,unmounted:hd},_d=e=>typeof e==`string`&&/^http(s)?:\/\//.test(e),vd=e=>e==null||e===``;function yd(e){return String(e).trim().toLowerCase()}function bd(e){return/^[1-9][0-9]{4,10}$/.test(e)||/^[1-9][0-9]{4,10}@qq.com$/i.test(e)}function xd(e){return e?e.substring(0,4)===`http`?e:`http://${e}`:``}function Sd(e){let t=typeof e==`number`?new Date(e):e;if(!t)return``;try{let e=Date.now()-t.getTime(),n=Math.floor(e/864e5);if(n===0){let t=e%864e5,n=Math.floor(t/36e5);if(n===0){let e=t%36e5,n=Math.floor(e/6e4);return n===0?`${Math.round(e%6e4/1e3)} ${W(`TIMEAGO_SECONDS`)}`:`${n} ${W(`TIMEAGO_MINUTES`)}`}return`${n} ${W(`TIMEAGO_HOURS`)}`}return n<0?W(`TIMEAGO_NOW`):n<8?`${n} ${W(`TIMEAGO_DAYS`)}`:Cd(t)}catch(e){return Po.warn(`timeago 计算失败`,e),``}}function Cd(e){return[wd(e.getFullYear(),2),wd(e.getMonth()+1,2),wd(e.getDate(),2)].join(`-`)}function wd(e,t){let n=e.toString();for(;n.length<t;)n=`0${n}`;return n}function Td(e){let t=e;return t&&typeof t==`object`&&t.result&&typeof t.result==`object`?t.result:e??{}}function Ed(e){let t=window.TWIKOO_MAGIC_PATH;if(t)return t;if(e&&typeof e==`string`)switch(e){case`location.pathname`:case`window.location.pathname`:return window.location.pathname;case`location.href`:case`window.location.href`:return window.location.href;default:return e}return window.location.pathname}function Dd(e){return window.TWIKOO_MAGIC_HREF??(typeof e==`string`?e:window.location.href)}var Od=new Set([`localhost`,`127.0.0.1`,`0.0.0.0`,`::1`]);function kd(){return Od.has(window.location.hostname)}async function Ad(e,t={}){let n=t.urls;if(!Array.isArray(n))throw Error(`urls 参数有误`);return n.length===0?[]:Td(await Mo(e,`GET_COMMENTS_COUNT`,{envId:t.envId,funcName:t.funcName,urls:n,includeReply:t.includeReply})).data}async function jd(e,t={}){let n=Td(await Mo(e,`GET_RECENT_COMMENTS`,{envId:t.envId,funcName:t.funcName,pageSize:t.pageSize,includeReply:t.includeReply})).data;if(Array.isArray(n))for(let e of n)e.relativeTime=Sd(e.created);return n}async function Md(e,t={}){return Td(await Mo(e,`COUNTER_GET`,{envId:t.envId,funcName:t.funcName,url:Ed(t.path),href:Dd(t.href),title:t.title??document.title}))}async function Nd(e,t={}){let n=document.getElementById(`twikoo_visitors`);if(!n||kd())return null;try{let r=await Md(e,t);return r.time!==void 0&&(n.innerHTML=String(r.time)),r}catch(e){return Po.warn(`Failed to update visitors count`,e),null}}function Pd(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsText(e),r.onloadend=()=>{r.error?n(r.error):t(r.result)}})}function Fd(e){return new Promise(t=>{let n=new FileReader;n.onload=e=>{let n=e.target?.result;t(typeof n==`string`?n:``)},n.readAsDataURL(e)})}async function Id(){let e=window.navigator.userAgent;try{let t=navigator.userAgentData;if(t?.platform===`Windows`||t?.platform===`macOS`){let{platformVersion:n}=await t.getHighEntropyValues([`platformVersion`]),r=parseInt(String(n).split(`.`)[0],10);t.platform===`Windows`&&r>=13?e=e.replace(/Windows NT 10\.0/i,`Windows NT 11.0`):t.platform===`macOS`&&r>=11&&(e=e.replace(/Mac OS X 10_[0-9]+_[0-9]+/i,`Mac OS X ${String(n).replace(/\./g,`_`)}`))}}catch{}return e}function Ld(e){if(!e)return;let t=Array.isArray(e)?e:[e],n=[];for(let e of t)e&&n.push(...Array.from(e.getElementsByTagName(`a`)));for(let e of n)e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer nofollow ugc`)}function Rd(e,t){if(!e)return;let n=window.renderMathInElement;typeof n==`function`&&n(e,t??{delimiters:[{left:`$$`,right:`$$`,display:!0},{left:`$`,right:`$`,display:!1},{left:`\\(`,right:`\\)`,display:!1},{left:`\\[`,right:`\\]`,display:!0}],throwOnError:!1})}var zd=[{key:`envId`,required:!0}];function Bd(e){let t=zd.filter(t=>t.required&&vd(e[t.key])).map(e=>e.key);if(t.length!==0){for(let e of t)Po.warn(`${e} is required`);throw Error(`Twikoo: failed to init`)}}async function Vd(e,t){let n=e;Bd(t);let r=n.init({env:t.envId??``,region:t.region}),i=r.auth({persistence:`local`});return i.hasLoginState?.()||await i.anonymousAuthProvider().signIn(),{app:r,auth:i}}function Hd(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var Ud={},Wd=[],Gd=()=>{},Kd=()=>!1,qd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Jd=e=>e.startsWith(`onUpdate:`),Yd=Object.assign,Xd=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},Zd=Object.prototype.hasOwnProperty,Qd=(e,t)=>Zd.call(e,t),$d=Array.isArray,ef=e=>uf(e)===`[object Map]`,tf=e=>uf(e)===`[object Set]`,nf=e=>uf(e)===`[object Date]`,rf=e=>typeof e==`function`,af=e=>typeof e==`string`,of=e=>typeof e==`symbol`,sf=e=>typeof e==`object`&&!!e,cf=e=>(sf(e)||rf(e))&&rf(e.then)&&rf(e.catch),lf=Object.prototype.toString,uf=e=>lf.call(e),df=e=>uf(e).slice(8,-1),ff=e=>uf(e)===`[object Object]`,pf=e=>af(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,mf=Hd(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),hf=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},gf=/-\w/g,_f=hf(e=>e.replace(gf,e=>e.slice(1).toUpperCase())),vf=/\B([A-Z])/g,yf=hf(e=>e.replace(vf,`-$1`).toLowerCase()),bf=hf(e=>e.charAt(0).toUpperCase()+e.slice(1)),xf=hf(e=>e?`on${bf(e)}`:``),Sf=(e,t)=>!Object.is(e,t),Cf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},wf=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Tf=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Ef,Df=()=>Ef||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function Of(e){if($d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=af(r)?Mf(r):Of(r);if(i)for(let e in i)t[e]=i[e]}return t}if(af(e)||sf(e))return e}var kf=/;(?![^(]*\))/g,Af=/:([^]+)/,jf=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Mf(e){let t={};return e.replace(jf,e=>e.startsWith(`/*`)?``:e).split(kf).forEach(e=>{if(e){let n=e.split(Af);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Nf(e){let t=``;if(af(e))t=e;else if($d(e))for(let n=0;n<e.length;n++){let r=Nf(e[n]);r&&(t+=r+` `)}else if(sf(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var Pf=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Ff=Hd(Pf);Pf+``;function If(e){return!!e||e===``}function Lf(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Vf(e[i],t[i],n);return r}function Rf(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Vf(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function zf(e,t,n){let r=ef(e),i=ef(t);if(r||i||(r=tf(e),i=tf(t),r||i))return r&&i?Rf(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!Vf(e[r],t[r],n))return!1}return String(e)===String(t)}function Bf(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Vf(e,t,n){if(e===t)return!0;let r=nf(e),i=nf(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=of(e),i=of(t),r||i?e===t:(r=$d(e),i=$d(t),r||i?r&&i?Bf(e,t,n,Lf):!1:(r=sf(e),i=sf(t),r||i?!r||!i?!1:Bf(e,t,n,zf):String(e)===String(t))))}function Hf(e,t){return e.findIndex(e=>Vf(e,t))}var Uf=e=>!!(e&&e.__v_isRef===!0),K=e=>af(e)?e:e==null?``:$d(e)||sf(e)&&(e.toString===lf||!rf(e.toString))?Uf(e)?K(e.value):JSON.stringify(e,Wf,2):String(e),Wf=(e,t)=>Uf(t)?Wf(e,t.value):ef(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Gf(t,r)+` =>`]=n,e),{})}:tf(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Gf(e))}:of(t)?Gf(t):sf(t)&&!$d(t)&&!ff(t)?String(t):t,Gf=(e,t=``)=>of(e)?`Symbol(${e.description??t})`:e,Kf,qf=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Kf&&(Kf.active?(this.parent=Kf,this.index=(Kf.scopes||(Kf.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=Kf;try{return Kf=this,e()}finally{Kf=t}}}on(){++this._on===1&&(this.prevScope=Kf,Kf=this)}off(){if(this._on>0&&--this._on===0){if(Kf===this)Kf=this.prevScope;else{let e=Kf;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Jf(){return Kf}var Yf,Xf=new WeakSet,Zf=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Kf&&(Kf.active?Kf.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Xf.has(this)&&(Xf.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||tp(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,mp(this),ip(this);let e=Yf,t=up;Yf=this,up=!0;try{return this.fn()}finally{ap(this),Yf=e,up=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)cp(e);this.deps=this.depsTail=void 0,mp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Xf.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){op(this)&&this.run()}get dirty(){return op(this)}},Qf=0,$f,ep;function tp(e,t=!1){if(e.flags|=8,t){e.next=ep,ep=e;return}e.next=$f,$f=e}function np(){Qf++}function rp(){if(--Qf>0)return;if(ep){let e=ep;for(ep=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;$f;){let t=$f;for($f=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function ip(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ap(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),cp(r),lp(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function op(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(sp(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function sp(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===hp)||(e.globalVersion=hp,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!op(e))))return;e.flags|=2;let t=e.dep,n=Yf,r=up;Yf=e,up=!0;try{ip(e);let n=e.fn(e._value);(t.version===0||Sf(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Yf=n,up=r,ap(e),e.flags&=-3}}function cp(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)cp(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function lp(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var up=!0,dp=[];function fp(){dp.push(up),up=!1}function pp(){let e=dp.pop();up=e===void 0||e}function mp(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Yf;Yf=void 0;try{t()}finally{Yf=e}}}var hp=0,gp=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},_p=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Yf||!up||Yf===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Yf)t=this.activeLink=new gp(Yf,this),Yf.deps?(t.prevDep=Yf.depsTail,Yf.depsTail.nextDep=t,Yf.depsTail=t):Yf.deps=Yf.depsTail=t,vp(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Yf.depsTail,t.nextDep=void 0,Yf.depsTail.nextDep=t,Yf.depsTail=t,Yf.deps===t&&(Yf.deps=e)}return t}trigger(e){this.version++,hp++,this.notify(e)}notify(e){np();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{rp()}}};function vp(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)vp(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var yp=new WeakMap,bp=Symbol(``),xp=Symbol(``),Sp=Symbol(``);function Cp(e,t,n){if(up&&Yf){let t=yp.get(e);t||yp.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new _p),r.map=t,r.key=n),r.track()}}function wp(e,t,n,r,i,a){let o=yp.get(e);if(!o){hp++;return}let s=e=>{e&&e.trigger()};if(np(),t===`clear`)o.forEach(s);else{let i=$d(e),a=i&&pf(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Sp||!of(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Sp)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(bp)),ef(e)&&s(o.get(xp)));break;case`delete`:i||(s(o.get(bp)),ef(e)&&s(o.get(xp)));break;case`set`:ef(e)&&s(o.get(bp))}}rp()}function Tp(e){let t=fm(e);return t===e||(Cp(t,`iterate`,Sp),um(e))?t:lm(e)?cm(e)?t.map(e=>hm(mm(e))):t.map(hm):t.map(mm)}function Ep(e){return Cp(e=fm(e),`iterate`,Sp),e}function Dp(e,t){return lm(e)?hm(cm(e)?mm(t):t):mm(t)}var Op={__proto__:null,[Symbol.iterator](){return kp(this,Symbol.iterator,e=>Dp(this,e))},concat(...e){return Tp(this).concat(...e.map(e=>$d(e)?Tp(e):e))},entries(){return kp(this,`entries`,e=>(e[1]=Dp(this,e[1]),e))},every(e,t){return jp(this,`every`,e,t,void 0,arguments)},filter(e,t){return jp(this,`filter`,e,t,e=>e.map(e=>Dp(this,e)),arguments)},find(e,t){return jp(this,`find`,e,t,e=>Dp(this,e),arguments)},findIndex(e,t){return jp(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return jp(this,`findLast`,e,t,e=>Dp(this,e),arguments)},findLastIndex(e,t){return jp(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return jp(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Np(this,`includes`,e)},indexOf(...e){return Np(this,`indexOf`,e)},join(e){return Tp(this).join(e)},lastIndexOf(...e){return Np(this,`lastIndexOf`,e)},map(e,t){return jp(this,`map`,e,t,void 0,arguments)},pop(){return Pp(this,`pop`)},push(...e){return Pp(this,`push`,e)},reduce(e,...t){return Mp(this,`reduce`,e,t)},reduceRight(e,...t){return Mp(this,`reduceRight`,e,t)},shift(){return Pp(this,`shift`)},some(e,t){return jp(this,`some`,e,t,void 0,arguments)},splice(...e){return Pp(this,`splice`,e)},toReversed(){return Tp(this).toReversed()},toSorted(e){return Tp(this).toSorted(e)},toSpliced(...e){return Tp(this).toSpliced(...e)},unshift(...e){return Pp(this,`unshift`,e)},values(){return kp(this,`values`,e=>Dp(this,e))}};function kp(e,t,n){let r=Ep(e),i=r[t]();return r!==e&&!um(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var Ap=Array.prototype;function jp(e,t,n,r,i,a){let o=Ep(e),s=o!==e&&!um(e),c=o[t];if(c!==Ap[t]){let t=c.apply(e,a);return s?mm(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Dp(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Mp(e,t,n,r){let i=Ep(e),a=i!==e&&!um(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Dp(e,t)),n.call(this,t,Dp(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Dp(e,c):c}function Np(e,t,n){let r=fm(e);Cp(r,`iterate`,Sp);let i=r[t](...n);return(i===-1||i===!1)&&dm(n[0])?(n[0]=fm(n[0]),r[t](...n)):i}function Pp(e,t,n=[]){fp(),np();let r=fm(e)[t].apply(e,n);return rp(),pp(),r}var Fp=Hd(`__proto__,__v_isRef,__isVue`),Ip=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(of));function Lp(e){of(e)||(e=String(e));let t=fm(this);return Cp(t,`has`,e),t.hasOwnProperty(e)}var Rp=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?nm:tm:i?em:$p).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=$d(e);if(!r){let e;if(a&&(e=Op[t]))return e;if(t===`hasOwnProperty`)return Lp}let o=Reflect.get(e,t,gm(e)?e:n);if((of(t)?Ip.has(t):Fp(t))||(r||Cp(e,`get`,t),i))return o;if(gm(o)){let e=a&&pf(t)?o:o.value;return r&&sf(e)?om(e):e}return sf(o)?r?om(o):im(o):o}},zp=class extends Rp{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=$d(e)&&pf(t);if(!this._isShallow){let e=lm(i);if(!um(n)&&!lm(n)&&(i=fm(i),n=fm(n)),!a&&gm(i)&&!gm(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:Qd(e,t),s=Reflect.set(e,t,n,gm(e)?e:r);return e===fm(r)&&s&&(o?Sf(n,i)&&wp(e,`set`,t,n,i):wp(e,`add`,t,n)),s}deleteProperty(e,t){let n=Qd(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&wp(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!of(t)||!Ip.has(t))&&Cp(e,`has`,t),n}ownKeys(e){return Cp(e,`iterate`,$d(e)?`length`:bp),Reflect.ownKeys(e)}},Bp=class extends Rp{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Vp=new zp,Hp=new Bp,Up=new zp(!0),Wp=e=>e,Gp=e=>Reflect.getPrototypeOf(e);function Kp(e,t,n){return function(...r){let i=this.__v_raw,a=fm(i),o=ef(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Wp:t?hm:mm;return!t&&Cp(a,`iterate`,c?xp:bp),Yd(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function qp(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Jp(e,t){let n={get(n){let r=this.__v_raw,i=fm(r),a=fm(n);e||(Sf(n,a)&&Cp(i,`get`,n),Cp(i,`get`,a));let{has:o}=Gp(i),s=t?Wp:e?hm:mm;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Cp(fm(t),`iterate`,bp),t.size},has(t){let n=this.__v_raw,r=fm(n),i=fm(t);return e||(Sf(t,i)&&Cp(r,`has`,t),Cp(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=fm(a),s=t?Wp:e?hm:mm;return!e&&Cp(o,`iterate`,bp),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return Yd(n,e?{add:qp(`add`),set:qp(`set`),delete:qp(`delete`),clear:qp(`clear`)}:{add(e){let n=fm(this),r=Gp(n),i=fm(e),a=!t&&!um(e)&&!lm(e)?i:e;return r.has.call(n,a)||Sf(e,a)&&r.has.call(n,e)||Sf(i,a)&&r.has.call(n,i)||(n.add(a),wp(n,`add`,a,a)),this},set(e,n){!t&&!um(n)&&!lm(n)&&(n=fm(n));let r=fm(this),{has:i,get:a}=Gp(r),o=i.call(r,e);o||=(e=fm(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?Sf(n,s)&&wp(r,`set`,e,n,s):wp(r,`add`,e,n),this},delete(e){let t=fm(this),{has:n,get:r}=Gp(t),i=n.call(t,e);i||=(e=fm(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&wp(t,`delete`,e,void 0,a),o},clear(){let e=fm(this),t=e.size!==0,n=e.clear();return t&&wp(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Kp(r,e,t)}),n}function Yp(e,t){let n=Jp(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(Qd(n,r)&&r in t?n:t,r,i)}var Xp={get:Yp(!1,!1)},Zp={get:Yp(!1,!0)},Qp={get:Yp(!0,!1)},$p=new WeakMap,em=new WeakMap,tm=new WeakMap,nm=new WeakMap;function rm(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function im(e){return lm(e)?e:sm(e,!1,Vp,Xp,$p)}function am(e){return sm(e,!1,Up,Zp,em)}function om(e){return sm(e,!0,Hp,Qp,tm)}function sm(e,t,n,r,i){if(!sf(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=rm(df(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function cm(e){return lm(e)?cm(e.__v_raw):!!(e&&e.__v_isReactive)}function lm(e){return!!(e&&e.__v_isReadonly)}function um(e){return!!(e&&e.__v_isShallow)}function dm(e){return e?!!e.__v_raw:!1}function fm(e){let t=e&&e.__v_raw;return t?fm(t):e}function pm(e){return!Qd(e,`__v_skip`)&&Object.isExtensible(e)&&wf(e,`__v_skip`,!0),e}var mm=e=>sf(e)?im(e):e,hm=e=>sf(e)?om(e):e;function gm(e){return e?e.__v_isRef===!0:!1}function q(e){return _m(e,!1)}function _m(e,t){return gm(e)?e:new vm(e,t)}var vm=class{constructor(e,t){this.dep=new _p,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:fm(e),this._value=t?e:mm(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||um(e)||lm(e);e=n?e:fm(e),Sf(e,t)&&(this._rawValue=e,this._value=n?e:mm(e),this.dep.trigger())}};function J(e){return gm(e)?e.value:e}var ym={get:(e,t,n)=>t===`__v_raw`?e:J(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return gm(i)&&!gm(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function bm(e){return cm(e)?e:new Proxy(e,ym)}var xm=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new _p(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=hp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Yf!==this)return tp(this,!0),!0}get value(){let e=this.dep.track();return sp(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Sm(e,t,n=!1){let r,i;return rf(e)?r=e:(r=e.get,i=e.set),new xm(r,i,n)}var Cm={},wm=new WeakMap,Tm=void 0;function Em(e,t=!1,n=Tm){if(n){let t=wm.get(n);t||wm.set(n,t=[]),t.push(e)}}function Dm(e,t,n=Ud){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:um(e)||i===!1||i===0?Om(e,1):Om(e),u,d,f,p,m=!1,h=!1;if(gm(e)?(d=()=>e.value,m=um(e)):cm(e)?(d=()=>l(e),m=!0):$d(e)?(h=!0,m=e.some(e=>cm(e)||um(e)),d=()=>e.map(e=>{if(gm(e))return e.value;if(cm(e))return l(e);if(rf(e))return c?c(e,2):e()})):d=rf(e)?t?c?()=>c(e,2):e:()=>{if(f){fp();try{f()}finally{pp()}}let t=Tm;Tm=u;try{return c?c(e,3,[p]):e(p)}finally{Tm=t}}:Gd,t&&i){let e=d,t=i===!0?1/0:i;d=()=>Om(e(),t)}let g=Jf(),_=()=>{u.stop(),g&&g.active&&Xd(g.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return _(),n}}let v=h?Array(e.length).fill(Cm):Cm,y=e=>{if(u.flags&1&&(u.dirty||e)){if(t){let n=u.run();if(e||i||m||(h?n.some((e,t)=>Sf(e,v[t])):Sf(n,v))){f&&f();let e=Tm;Tm=u;try{let e=[n,v===Cm?void 0:h&&v[0]===Cm?[]:v,p];v=n,c?c(t,3,e):t(...e)}finally{Tm=e}}}else u.run()}};return s&&s(y),u=new Zf(d),u.scheduler=o?()=>o(y,!1):y,p=e=>Em(e,!1,u),f=u.onStop=()=>{let e=wm.get(u);if(e){if(c)c(e,4);else for(let t of e)t();wm.delete(u)}},t?r?y(!0):v=u.run():o?o(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Om(e,t=1/0,n){if(t<=0||!sf(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,gm(e))Om(e.value,t,n);else if($d(e))for(let r=0;r<e.length;r++)Om(e[r],t,n);else if(tf(e)||ef(e))e.forEach(e=>{Om(e,t,n)});else if(ff(e)){for(let r in e)Om(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Om(e[r],t,n)}return e}function km(e,t,n,r){try{return r?e(...r):e()}catch(e){jm(e,t,n)}}function Am(e,t,n,r){if(rf(e)){let i=km(e,t,n,r);return i&&cf(i)&&i.catch(e=>{jm(e,t,n)}),i}if($d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(Am(e[a],t,n,r));return i}}function jm(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ud;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){fp(),km(a,null,10,[e,i,o]),pp();return}}Mm(e,n,i,r,o)}function Mm(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var Nm=[],Pm=-1,Fm=[],Im=null,Lm=0,Rm=Promise.resolve(),zm=null;function Bm(e){let t=zm||Rm;return e?t.then(this?e.bind(this):e):t}function Vm(e){let t=Pm+1,n=Nm.length;for(;t<n;){let r=t+n>>>1,i=Nm[r],a=qm(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function Hm(e){if(!(e.flags&1)){let t=qm(e),n=Nm[Nm.length-1];!n||!(e.flags&2)&&t>=qm(n)?Nm.push(e):Nm.splice(Vm(t),0,e),e.flags|=1,Um()}}function Um(){zm||=Rm.then(Jm)}function Wm(e){if(!$d(e))Im&&e.id===-1?Im.splice(Lm+1,0,e):e.flags&1||(Fm.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Fm.push(e[t]);Um()}function Gm(e,t,n=Pm+1){for(;n<Nm.length;n++){let t=Nm[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;Nm.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Km(e){if(Fm.length){let e=[...new Set(Fm)].sort((e,t)=>qm(e)-qm(t));if(Fm.length=0,Im){for(let t=0;t<e.length;t++)Im.push(e[t]);return}for(Im=e,Lm=0;Lm<Im.length;Lm++){let e=Im[Lm];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Im=null,Lm=0}}var qm=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Jm(e){try{for(Pm=0;Pm<Nm.length;Pm++){let e=Nm[Pm];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),km(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Pm<Nm.length;Pm++){let e=Nm[Pm];e&&(e.flags&=-2)}Pm=-1,Nm.length=0,Km(e),zm=null,(Nm.length||Fm.length)&&Jm(e)}}var Ym=null,Xm=null;function Zm(e){let t=Ym;return Ym=e,Xm=e&&e.type.__scopeId||null,t}function Qm(e,t=Ym,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&g_(-1);let i=Zm(t),a=f_.length,o;try{o=e(...n)}finally{for(let e=f_.length;e>a;e--)m_();Zm(i),r._d&&g_(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function $m(e,t){if(Ym===null)return e;let n=Q_(Ym),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=Ud]=t[e];i&&(rf(i)&&(i={mounted:i,updated:i}),i.deep&&Om(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function eh(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(fp(),Am(c,n,8,[e.el,s,e,t]),pp())}}function th(e,t){if(I_){let n=I_.provides,r=I_.parent&&I_.parent.provides;r===n&&(n=I_.provides=Object.create(r)),n[e]=t}}function nh(e,t,n=!1){let r=L_();if(r||vg){let i=vg?vg._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&rf(t)?t.call(r&&r.proxy):t}}var rh=Symbol.for(`v-scx`),ih=()=>nh(rh);function ah(e,t,n){return oh(e,t,n)}function oh(e,t,n=Ud){let{immediate:r,deep:i,flush:a,once:o}=n,s=Yd({},n),c=t&&r||!t&&a!==`post`,l;if(U_){if(a===`sync`){let e=ih();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=Gd,e.resume=Gd,e.pause=Gd,e}}let u=I_;s.call=(e,t,n)=>Am(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Yg(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():Hm(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=Dm(e,t,s);return U_&&(l?l.push(f):c&&f()),f}function sh(e,t,n){let r=this.proxy,i=af(e)?e.includes(`.`)?ch(r,e):()=>r[e]:e.bind(r,r),a;rf(t)?a=t:(a=t.handler,n=t);let o=B_(this),s=oh(i,a.bind(r),n);return o(),s}function ch(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var lh=Symbol(`_vte`),uh=e=>e.__isTeleport,dh=Symbol(`_leaveCb`);function fh(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==u_){t=n;break}}return t}function ph(e){if(!Sh(e))return uh(e.type)&&e.children?fh(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&rf(n.default))return n.default()}}function mh(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;mh(uh(n.type)&&ph(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hh(e,t){return rf(e)?Yd({name:e.name},t,{setup:e}):e}function gh(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function _h(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var vh=new WeakMap;function yh(e,t,n,r,i=!1){if($d(e)){e.forEach((e,a)=>yh(e,t&&($d(t)?t[a]:t),n,r,i));return}if(xh(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&yh(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Q_(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===Ud?s.refs={}:s.refs,d=s.setupState,f=fm(d),p=d===Ud?Kd:e=>!_h(u,e)&&Qd(f,e),m=(e,t)=>!(t&&_h(u,t));if(l!=null&&l!==c){if(bh(t),af(l))u[l]=null,p(l)&&(d[l]=null);else if(gm(l)){let e=t;m(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(rf(c))km(c,s,12,[o,u]);else{let t=af(c),r=gm(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)$d(n)&&Xd(n,a);else if($d(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),vh.delete(e)};t.id=-1,vh.set(e,t),Yg(t,n)}else bh(e),s()}}}function bh(e){let t=vh.get(e);t&&(t.flags|=8,vh.delete(e))}Df().requestIdleCallback,Df().cancelIdleCallback;var xh=e=>!!e.type.__asyncLoader,Sh=e=>e.type.__isKeepAlive;function Ch(e,t){Th(e,`a`,t)}function wh(e,t){Th(e,`da`,t)}function Th(e,t,n=I_){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Dh(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Sh(e.parent.vnode)&&Eh(r,t,n,e),e=e.parent}}function Eh(e,t,n,r){let i=Dh(t,e,r,!0);Ph(()=>{Xd(r[t],i)},n)}function Dh(e,t,n=I_,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{fp();let i=B_(n),a=Am(t,n,e,r);return i(),pp(),a};return r?i.unshift(a):i.push(a),a}}var Oh=e=>(t,n=I_)=>{(!U_||e===`sp`)&&Dh(e,(...e)=>t(...e),n)},kh=Oh(`bm`),Ah=Oh(`m`),jh=Oh(`bu`),Mh=Oh(`u`),Nh=Oh(`bum`),Ph=Oh(`um`),Fh=Oh(`sp`),Ih=Oh(`rtg`),Lh=Oh(`rtc`);function Rh(e,t=I_){Dh(`ec`,e,t)}var zh=`components`;function Bh(e,t){return Hh(zh,e,!0,t)||e}var Vh=Symbol.for(`v-ndc`);function Hh(e,t,n=!0,r=!1){let i=Ym||I_;if(i){let n=i.type;if(e===zh){let e=$_(n,!1);if(e&&(e===t||e===_f(t)||e===bf(_f(t))))return n}let a=Uh(i[e]||n[e],t)||Uh(i.appContext[e],t);return!a&&r?n:a}}function Uh(e,t){return e&&(e[t]||e[_f(t)]||e[bf(_f(t))])}function Wh(e,t,n,r){let i,a=n&&n[r],o=$d(e);if(o||af(e)){let n=o&&cm(e),r=!1,s=!1;n&&(r=!um(e),s=lm(e),e=Ep(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?hm(mm(e[n])):mm(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(sf(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function Gh(e,t,n,r,i,a){if(n??={},Ym.ce||Ym.parent&&xh(Ym.parent)&&Ym.parent.ce){let e=a!=null&&n.key==null?Yd({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Y(),v_(c_,null,[Q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=f_.length;Y();let c;try{let i=o&&Kh(o(n)),s=n.key||a||i&&i.key;c=v_(c_,{key:(s&&!of(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=f_.length;e>s;e--)m_();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Kh(e){return e.some(e=>!y_(e)||!(e.type===u_||e.type===c_&&!Kh(e.children)))?e:null}var qh=e=>e?H_(e)?Q_(e):qh(e.parent):null,Jh=Yd(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qh(e.parent),$root:e=>qh(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ag(e),$forceUpdate:e=>e.f||=()=>{Hm(e.update)},$nextTick:e=>e.n||=Bm.bind(e.proxy),$watch:e=>sh.bind(e)}),Yh=(e,t)=>e!==Ud&&!e.__isScriptSetup&&Qd(e,t),Xh={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Yh(r,t))return o[t]=1,r[t];else if(i!==Ud&&Qd(i,t))return o[t]=2,i[t];else if(Qd(a,t))return o[t]=3,a[t];else if(n!==Ud&&Qd(n,t))return o[t]=4,n[t];else eg&&(o[t]=0)}let l=Jh[t],u,d;if(l)return t===`$attrs`&&Cp(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==Ud&&Qd(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,Qd(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Yh(i,t)?(i[t]=n,!0):r!==Ud&&Qd(r,t)?(r[t]=n,!0):Qd(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==Ud&&s[0]!==`$`&&Qd(e,s)||Yh(t,s)||Qd(a,s)||Qd(r,s)||Qd(Jh,s)||Qd(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?Qd(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Zh(){return Qh(`useSlots`).slots}function Qh(e){let t=L_();return t.setupContext||=Z_(t)}function $h(e){return $d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var eg=!0;function tg(e){let t=ag(e),n=e.proxy,r=e.ctx;eg=!1,t.beforeCreate&&rg(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:b,render:x,renderTracked:S,renderTriggered:C,errorCaptured:w,serverPrefetch:T,expose:E,inheritAttrs:D,components:ee,directives:te,filters:O}=t;if(l&&ng(l,r,null),o)for(let e in o){let t=o[e];rf(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);sf(t)&&(e.data=im(t))}if(eg=!0,a)for(let e in a){let t=a[e],i=tv({get:rf(t)?t.bind(n,n):rf(t.get)?t.get.bind(n,n):Gd,set:!rf(t)&&rf(t.set)?t.set.bind(n):Gd});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)ig(s[e],r,n,e);if(c){let e=rf(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{th(t,e[t])})}u&&rg(u,e,`c`);function k(e,t){$d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(kh,d),k(Ah,f),k(jh,p),k(Mh,m),k(Ch,h),k(wh,g),k(Rh,w),k(Lh,S),k(Ih,C),k(Nh,v),k(Ph,b),k(Fh,T),$d(E)){if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}x&&e.render===Gd&&(e.render=x),D!=null&&(e.inheritAttrs=D),ee&&(e.components=ee),te&&(e.directives=te),T&&gh(e)}function ng(e,t,n=Gd){$d(e)&&(e=ug(e));for(let n in e){let r=e[n],i;i=sf(r)?`default`in r?nh(r.from||n,r.default,!0):nh(r.from||n):nh(r),gm(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function rg(e,t,n){Am($d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ig(e,t,n,r){let i=r.includes(`.`)?ch(n,r):()=>n[r];if(af(e)){let n=t[e];rf(n)&&ah(i,n)}else if(rf(e))ah(i,e.bind(n));else if(sf(e)){if($d(e))e.forEach(e=>ig(e,t,n,r));else{let r=rf(e.handler)?e.handler.bind(n):t[e.handler];rf(r)&&ah(i,r,e)}}}function ag(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>og(c,e,o,!0)),og(c,t,o)),sf(t)&&a.set(t,c),c}function og(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&og(e,a,n,!0),i&&i.forEach(t=>og(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=sg[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var sg={data:cg,props:pg,emits:pg,methods:fg,computed:fg,beforeCreate:dg,created:dg,beforeMount:dg,mounted:dg,beforeUpdate:dg,updated:dg,beforeDestroy:dg,beforeUnmount:dg,destroyed:dg,unmounted:dg,activated:dg,deactivated:dg,errorCaptured:dg,serverPrefetch:dg,components:fg,directives:fg,watch:mg,provide:cg,inject:lg};function cg(e,t){return t?e?function(){return Yd(rf(e)?e.call(this,this):e,rf(t)?t.call(this,this):t)}:t:e}function lg(e,t){return fg(ug(e),ug(t))}function ug(e){if($d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function dg(e,t){return e?[...new Set([].concat(e,t))]:t}function fg(e,t){return e?Yd(Object.create(null),e,t):t}function pg(e,t){return e?$d(e)&&$d(t)?[...new Set([...e,...t])]:Yd(Object.create(null),$h(e),$h(t??{})):t}function mg(e,t){if(!e)return t;if(!t)return e;let n=Yd(Object.create(null),e);for(let r in t)n[r]=dg(e[r],t[r]);return n}function hg(){return{app:null,config:{isNativeTag:Kd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var gg=0;function _g(e,t){return function(n,r=null){rf(n)||(n=Yd({},n)),r!=null&&!sf(r)&&(r=null);let i=hg(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:gg++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:nv,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&rf(e.install)?(a.add(e),e.install(c,...t)):rf(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||Q(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Q_(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(Am(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=vg;vg=c;try{return e()}finally{vg=t}}};return c}}var vg=null,yg=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${_f(t)}Modifiers`]||e[`${yf(t)}Modifiers`];function bg(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||Ud,i=n,a=t.startsWith(`update:`),o=a&&yg(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>af(e)?e.trim():e)),o.number&&(i=i.map(Tf)));let s,c=r[s=xf(t)]||r[s=xf(_f(t))];!c&&a&&(c=r[s=xf(yf(t))]),c&&Am(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Am(l,e,6,i)}}var xg=new WeakMap;function Sg(e,t,n=!1){let r=n?xg:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!rf(e)){let r=e=>{let n=Sg(e,t,!0);n&&(s=!0,Yd(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(sf(e)&&r.set(e,null),null):($d(a)?a.forEach(e=>o[e]=null):Yd(o,a),sf(e)&&r.set(e,o),o)}function Cg(e,t){return!e||!qd(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),Qd(e,t[0].toLowerCase()+t.slice(1))||Qd(e,yf(t))||Qd(e,t))}function wg(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Zm(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=O_(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=O_(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Tg(s)}}catch(t){f_.length=0,jm(t,e,1),_=Q(u_)}let y=_;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(Jd)&&(v=Eg(v,a)),y=T_(y,v,!1,!0))}return n.dirs&&(y=T_(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&mh(uh(y.type)&&ph(y)||y,n.transition),_=y,Zm(g),_}var Tg=e=>{let t;for(let n in e)(n===`class`||n===`style`||qd(n))&&((t||={})[n]=e[n]);return t},Eg=(e,t)=>{let n={};for(let r in e)(!Jd(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Dg(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Og(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(kg(o,r,n)&&!Cg(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Og(r,o,l):!!o;return!1}function Og(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(kg(t,e,a)&&!Cg(n,a))return!0}return!1}function kg(e,t,n){let r=e[n],i=t[n];return n===`style`&&sf(r)&&sf(i)?!Vf(r,i):r!==i}function Ag({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var jg={},Mg=()=>Object.create(jg),Ng=e=>Object.getPrototypeOf(e)===jg;function Pg(e,t,n,r=!1){let i={},a=Mg();e.propsDefaults=Object.create(null),Ig(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:am(i):e.type.props?i:a,e.attrs=a}function Fg(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=fm(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Cg(e.emitsOptions,o))continue;let u=t[o];if(c){if(Qd(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=_f(o);i[t]=Lg(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Ig(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!Qd(t,a)&&((r=yf(a))===a||!Qd(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Lg(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!Qd(t,e))&&(delete a[e],l=!0)}l&&wp(e.attrs,`set`,``)}function Ig(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(mf(c))continue;let l=t[c],u;i&&Qd(i,u=_f(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:Cg(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=fm(n),r=s||Ud;for(let o=0;o<a.length;o++){let s=a[o];n[s]=Lg(i,t,s,r[s],e,!Qd(r,s))}}return o}function Lg(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=Qd(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&rf(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=B_(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===yf(n))&&(r=!0))}return r}var Rg=new WeakMap;function zg(e,t,n=!1){let r=n?Rg:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!rf(e)){let r=e=>{c=!0;let[n,r]=zg(e,t,!0);Yd(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return sf(e)&&r.set(e,Wd),Wd;if($d(a))for(let e=0;e<a.length;e++){let t=_f(a[e]);Bg(t)&&(o[t]=Ud)}else if(a)for(let e in a){let t=_f(e);if(Bg(t)){let n=a[e],r=o[t]=$d(n)||rf(n)?{type:n}:Yd({},n),i=r.type,c=!1,l=!0;if($d(i))for(let e=0;e<i.length;++e){let t=i[e],n=rf(t)&&t.name;if(n===`Boolean`){c=!0;break}n===`String`&&(l=!1)}else c=rf(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||Qd(r,`default`))&&s.push(t)}}let l=[o,s];return sf(e)&&r.set(e,l),l}function Bg(e){return e[0]!==`$`&&!mf(e)}var Vg=e=>e===`_`||e===`_ctx`||e===`$stable`,Hg=e=>$d(e)?e.map(O_):[O_(e)],Ug=(e,t,n)=>{if(t._n)return t;let r=Qm((...e)=>Hg(t(...e)),n);return r._c=!1,r},Wg=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Vg(n))continue;let i=e[n];if(rf(i))t[n]=Ug(n,i,r);else if(i!=null){let e=Hg(i);t[n]=()=>e}}},Gg=(e,t)=>{let n=Hg(t);e.slots.default=()=>n},Kg=(e,t,n)=>{for(let r in t)(n||!Vg(r))&&(e[r]=t[r])},qg=(e,t,n)=>{let r=e.slots=Mg();if(e.vnode.shapeFlag&32){let e=t._;e?(Kg(r,t,n),n&&wf(r,`_`,e,!0)):Wg(t,r)}else t&&Gg(e,t)},Jg=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=Ud;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Kg(i,t,n):(a=!t.$stable,Wg(t,i)),o=t}else t&&(Gg(e,t),o={default:1});if(a)for(let e in i)!Vg(e)&&o[e]==null&&delete i[e]},Yg=s_;function Xg(e){return Zg(e)}function Zg(e,t){let n=Df();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Gd,insertStaticContent:m}=e,h=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!b_(e,t)&&(r=fe(e),se(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===Wd&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case l_:g(e,t,n,r);break;case u_:_(e,t,n,r);break;case d_:e??v(t,n,r,o);break;case c_:ee(e,t,n,r,i,a,o,s,c);break;default:d&1?x(e,t,n,r,i,a,o,s,c):d&6?te(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,he)}u!=null&&i?yh(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&yh(e.ref,null,a,e,!0)},g=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},x=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)S(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},S=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,Qg(e,c),l,d),_&&eh(e,null,i,`created`),C(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!mf(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&M_(p,i,e)}_&&eh(e,null,i,`beforeMount`);let v=e_(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Yg(()=>{try{p&&M_(p,i,e),v&&g.enter(f),_&&eh(e,null,i,`mounted`)}finally{}},s)},C=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t<r.length;t++)p(e,r[t]);if(i){let n=i.subTree;if(t===n||o_(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;C(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?k_(e[l]):O_(e[l]);h(null,c,t,n,r,i,a,o,s)}},T=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||Ud,m=t.props||Ud,h;if(n&&$g(n,!1),(h=m.onVnodeBeforeUpdate)&&M_(h,n,t,e),f&&eh(t,e,n,`beforeUpdate`),n&&$g(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,Qg(t,i),o):s||re(e,t,c,null,n,r,Qg(t,i),o,!1),l>0){if(l&16)D(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=p[r],s=m[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else!s&&d==null&&D(c,p,m,n,i);((h=m.onVnodeUpdated)||f)&&Yg(()=>{h&&M_(h,n,t,e),f&&eh(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===c_||!b_(c,l)||c.shapeFlag&198)?d(c.el):n;h(c,l,u,null,r,i,a,o,!0)}},D=(e,t,n,r,i)=>{if(t!==n){if(t!==Ud)for(let o in t)!mf(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(mf(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ee=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&t_(e,t,!0)):re(e,t,n,f,a,o,c,l,u)},te=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):O(t,n,r,i,a,o,c):k(e,t,c)},O=(e,t,n,r,i,a,o)=>{let s=e.component=F_(e,r,i);if(Sh(e)&&(s.ctx.renderer=he),W_(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,A,o),!e.el){let r=s.subTree=Q(u_);_(null,r,t,n),e.placeholder=r.el}}else A(s,e,t,n,i,a,o)},k=(e,t,n)=>{let r=t.component=e.component;if(Dg(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,ne(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},A=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=r_(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{Yg(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;$g(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&Cf(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&M_(f,s,t,c),$g(e,!0);let p=wg(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),fe(m),e,i,a),t.el=p.el,u===null&&Ag(e,p.el),r&&Yg(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Yg(()=>M_(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=xh(t);if($g(e,!1),l&&Cf(l),!m&&(o=c&&c.onVnodeBeforeMount)&&M_(o,d,t),$g(e,!0),s&&_e){let t=()=>{e.subTree=wg(e),_e(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=wg(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&Yg(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Yg(()=>M_(o,d,e),i)}(t.shapeFlag&256||d&&xh(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Yg(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Zf(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Hm(u),$g(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Fg(e,t.props,r,n),Jg(e,t.children,n),fp(),Gm(e),pp()},re=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ae(l,f,n,r,i,a,o,s,c);return}if(p&256){ie(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&de(l,i,a),f!==l&&u(n,f)):d&16?m&16?ae(l,f,n,r,i,a,o,s,c):de(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},ie=(e,t,n,r,i,a,o,s,c)=>{e||=Wd,t||=Wd;let l=e.length,u=t.length,d=Math.min(l,u),f=0;for(;f<d;f++){let r=t[f]=c?k_(t[f]):O_(t[f]);h(e[f],r,n,null,i,a,o,s,c)}l>u?de(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ae=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?k_(t[l]):O_(t[l]);if(b_(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?k_(t[f]):O_(t[f]);if(b_(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)h(null,t[l]=c?k_(t[l]):O_(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)se(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?k_(t[l]):O_(t[l]);e.key!=null&&g.set(e.key,l)}let _,v=0,y=f-m+1,b=!1,x=0,S=Array(y);for(l=0;l<y;l++)S[l]=0;for(l=p;l<=d;l++){let r=e[l];if(v>=y){se(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=m;_<=f;_++)if(S[_-m]===0&&b_(r,t[_])){u=_;break}u===void 0?se(r,i,a,!0):(S[u-m]=l+1,u>=x?x=u:b=!0,h(r,t[u],n,null,i,a,o,s,c),v++)}let C=b?n_(S):Wd;for(_=C.length-1,l=y-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1<u?f.el||a_(f):r;S[l]===0?h(null,d,n,p,i,a,o,s,c):b&&(_<0||l!==C[_]?oe(d,n,p,2):_--)}}},oe=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){oe(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,he);return}if(c===c_){r(s,t,n);for(let e=0;e<u.length;e++)oe(u[e],t,n,a);r(e.anchor,t,n);return}if(c===d_){y(e,t,n);return}if(a!==2&&d&1&&l){if(a===0)l.persisted&&!s[dh]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),Yg(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[dh];s._isLeaving&&s[dh](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}}else r(s,t,n)},se=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(fp(),yh(s,null,n,e,!0),pp()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!xh(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&M_(_,t,e),u&6)ue(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&eh(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,he,r):l&&!l.hasOnce&&(a!==c_||d>0&&d&64)?de(l,t,n,!1,!0):(a===c_&&d&384||!i&&u&16)&&de(c,t,n),r&&ce(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Yg(()=>{_&&M_(_,t,e),h&&eh(e,null,t,`unmounted`),v&&(e.el=null)},n)},ce=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===c_){le(n,r);return}if(t===d_){b(e),a&&!a.persisted&&a.afterLeave&&a.afterLeave();return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},le=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},ue=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;i_(c),i_(l),r&&Cf(r),i.stop(),a?(a.flags|=8,se(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,se(o,e,t,n)),s&&Yg(s,t),Yg(()=>{e.isUnmounted=!0},t)},de=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)se(e[o],t,n,r,i)},fe=e=>{if(e.shapeFlag&6)return fe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[lh];return n?f(n):t},pe=!1,me=(e,t,n)=>{let r;e==null?t._vnode&&(se(t._vnode,null,null,!0),r=t._vnode.component):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,pe||=(pe=!0,Gm(r),Km(),!1)},he={p:h,um:se,m:oe,r:ce,mt:O,mc:w,pc:re,pbc:E,n:fe,o:e},ge,_e;return t&&([ge,_e]=t(he)),{render:me,hydrate:ge,createApp:_g(me,ge)}}function Qg({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function $g({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function e_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function t_(e,t,n=!1){let r=e.children,i=t.children;if($d(r)&&$d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=k_(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&t_(t,a)),a.type===l_&&(a.patchFlag===-1&&(a=i[e]=k_(a)),a.el=t.el),a.type===u_&&!a.el&&(a.el=t.el)}}function n_(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function r_(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:r_(t)}function i_(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function a_(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?a_(t.subTree):null}var o_=e=>e.__isSuspense;function s_(e,t){t&&t.pendingBranch?$d(e)?t.effects.push(...e):t.effects.push(e):Wm(e)}var c_=Symbol.for(`v-fgt`),l_=Symbol.for(`v-txt`),u_=Symbol.for(`v-cmt`),d_=Symbol.for(`v-stc`),f_=[],p_=null;function Y(e=!1){f_.push(p_=e?null:[])}function m_(){f_.pop(),p_=f_[f_.length-1]||null}var h_=1;function g_(e,t=!1){h_+=e,e<0&&p_&&t&&(p_.hasOnce=!0)}function __(e){return e.dynamicChildren=h_>0?p_||Wd:null,m_(),h_>0&&p_&&p_.push(e),e}function X(e,t,n,r,i,a){return __(Z(e,t,n,r,i,a,!0))}function v_(e,t,n,r,i){return __(Q(e,t,n,r,i,!0))}function y_(e){return e?e.__v_isVNode===!0:!1}function b_(e,t){return e.type===t.type&&e.key===t.key}var x_=({key:e})=>e??null,S_=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:af(e)||gm(e)||rf(e)?{i:Ym,r:e,k:t,f:!!n}:e);function Z(e,t=null,n=null,r=0,i=null,a=e===c_?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&x_(t),ref:t&&S_(t),scopeId:Xm,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ym};return s?(A_(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=af(n)?8:16),h_>0&&!o&&p_&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&p_.push(c),c}var Q=C_;function C_(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Vh)&&(e=u_),y_(e)){let r=T_(e,t,!0);return n&&A_(r,n),h_>0&&!a&&p_&&(r.shapeFlag&6?p_[p_.indexOf(e)]=r:p_.push(r)),r.patchFlag=-2,r}if(ev(e)&&(e=e.__vccOpts),t){t=w_(t);let{class:e,style:n}=t;e&&!af(e)&&(t.class=Nf(e)),sf(n)&&(dm(n)&&!$d(n)&&(n=Yd({},n)),t.style=Of(n))}let o=af(e)?1:o_(e)?128:uh(e)?64:sf(e)?4:rf(e)?2:0;return Z(e,t,n,r,i,o,a,!0)}function w_(e){return e?dm(e)||Ng(e)?Yd({},e):e:null}function T_(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?j_(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&x_(l),ref:t&&t.ref?n&&a?$d(a)?a.concat(S_(t)):[a,S_(t)]:S_(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==c_?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&T_(e.ssContent),ssFallback:e.ssFallback&&T_(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&mh(u,c.clone(u)),u}function E_(e=` `,t=0){return Q(l_,null,e,t)}function D_(e,t){let n=Q(d_,null,e);return n.staticCount=t,n}function $(e=``,t=!1){return t?(Y(),v_(u_,null,e)):Q(u_,null,e)}function O_(e){return e==null||typeof e==`boolean`?Q(u_):$d(e)?Q(c_,null,e.slice()):y_(e)?k_(e):Q(l_,null,String(e))}function k_(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:T_(e)}function A_(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if($d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),A_(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Ng(t)?t._ctx=Ym:r===3&&Ym&&(Ym.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(rf(t)){if(r&65){A_(e,{default:t});return}t={default:t,_ctx:Ym},n=32}else t=String(t),r&64?(n=16,t=[E_(t)]):n=8;e.children=t,e.shapeFlag|=n}function j_(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=Nf([t.class,r.class]));else if(e===`style`)t.style=Of([t.style,r.style]);else if(qd(e)){let n=t[e],i=r[e];i&&n!==i&&!($d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!Jd(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function M_(e,t,n,r=null){Am(e,t,7,[n,r])}var N_=hg(),P_=0;function F_(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||N_,a={uid:P_++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new qf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:zg(r,i),emitsOptions:Sg(r,i),emit:null,emitted:null,propsDefaults:Ud,inheritAttrs:r.inheritAttrs,ctx:Ud,data:Ud,props:Ud,attrs:Ud,slots:Ud,refs:Ud,setupState:Ud,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=bg.bind(null,a),e.ce&&e.ce(a),a}var I_=null,L_=()=>I_||Ym,R_,z_;{let e=Df(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};R_=t(`__VUE_INSTANCE_SETTERS__`,e=>I_=e),z_=t(`__VUE_SSR_SETTERS__`,e=>U_=e)}var B_=e=>{let t=I_;return R_(e),e.scope.on(),()=>{e.scope.off(),R_(t)}},V_=()=>{I_&&I_.scope.off(),R_(null)};function H_(e){return e.vnode.shapeFlag&4}var U_=!1;function W_(e,t=!1,n=!1){t&&z_(t);let{props:r,children:i}=e.vnode,a=H_(e);Pg(e,r,a,t),qg(e,i,n||t);let o=a?G_(e,t):void 0;return t&&z_(!1),o}function G_(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xh);let{setup:r}=n;if(r){fp();let n=e.setupContext=r.length>1?Z_(e):null,i=B_(e),a=km(r,e,0,[e.props,n]),o=cf(a);if(pp(),i(),(o||e.sp)&&!xh(e)&&gh(e),o){if(a.then(V_,V_),t)return a.then(n=>{z_(!0);try{K_(e,n,t)}finally{z_(!1)}}).catch(t=>{jm(t,e,0)});e.asyncDep=a}else K_(e,a,t)}else Y_(e,t)}function K_(e,t,n){rf(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:sf(t)&&(e.setupState=bm(t)),Y_(e,n)}var q_,J_;function Y_(e,t,n){let r=e.type;if(!e.render){if(!t&&q_&&!r.render){let t=r.template||ag(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=q_(t,Yd(Yd({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||Gd,J_&&J_(e)}{let t=B_(e);fp();try{tg(e)}finally{pp(),t()}}}var X_={get(e,t){return Cp(e,`get`,``),e[t]}};function Z_(e){return{attrs:new Proxy(e.attrs,X_),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Q_(e){return e.exposed?e.exposeProxy||=new Proxy(bm(pm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Jh)return Jh[n](e)},has(e,t){return t in e||t in Jh}}):e.proxy}function $_(e,t=!0){return rf(e)?e.displayName||e.name:e.name||t&&e.__name}function ev(e){return rf(e)&&`__vccOpts`in e}var tv=(e,t)=>Sm(e,t,U_),nv=`3.5.43`,rv=void 0,iv=typeof window<`u`&&window.trustedTypes;if(iv)try{rv=iv.createPolicy(`vue`,{createHTML:e=>e})}catch{}var av=rv?e=>rv.createHTML(e):e=>e,ov=`http://www.w3.org/2000/svg`,sv=`http://www.w3.org/1998/Math/MathML`,cv=typeof document<`u`?document:null,lv=cv&&cv.createElement(`template`),uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?cv.createElementNS(ov,e):t===`mathml`?cv.createElementNS(sv,e):n?cv.createElement(e,{is:n}):cv.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>cv.createTextNode(e),createComment:e=>cv.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>cv.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{lv.innerHTML=av(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=lv.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},dv=Symbol(`_vtc`);function fv(e,t,n){let r=e[dv];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var pv=Symbol(`_vod`),mv=Symbol(`_vsh`),hv={name:`show`,beforeMount(e,{value:t},{transition:n}){e[pv]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):gv(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),gv(e,!0),r.enter(e)):r.leave(e,()=>{gv(e,!1)}):gv(e,t))},beforeUnmount(e,{value:t}){gv(e,t)}};function gv(e,t){e.style.display=t?e[pv]:`none`,e[mv]=!t}var _v=Symbol(``),vv=/(?:^|;)\s*display\s*:/;function yv(e,t,n){let r=e.style,i=af(n),a=!1;if(n&&!i){if(t){if(af(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??xv(r,t,``)}else for(let e in t)n[e]??xv(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?xv(r,i,``):Tv(e,i,!af(t)&&t?t[i]:void 0,o)||xv(r,i,o)}}else if(i){if(t!==n){let e=r[_v];e&&(n+=`;`+e),r.cssText=n,a=vv.test(n)}}else t&&e.removeAttribute(`style`);pv in e&&(e[pv]=a?r.display:``,e[mv]&&(r.display=`none`))}var bv=/\s*!important$/;function xv(e,t,n){if($d(n))n.forEach(n=>xv(e,t,n));else if(n??=``,t.startsWith(`--`))bv.test(n)?e.setProperty(t,n.replace(bv,``),`important`):e.setProperty(t,n);else{let r=wv(e,t);bv.test(n)?e.setProperty(yf(r),n.replace(bv,``),`important`):e[r]=n}}var Sv=[`Webkit`,`Moz`,`ms`],Cv={};function wv(e,t){let n=Cv[t];if(n)return n;let r=_f(t);if(r!==`filter`&&r in e)return Cv[t]=r;r=bf(r);for(let n=0;n<Sv.length;n++){let i=Sv[n]+r;if(i in e)return Cv[t]=i}return t}function Tv(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&af(r)&&n===r}var Ev=`http://www.w3.org/1999/xlink`;function Dv(e,t,n,r,i,a=Ff(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ev,t.slice(6,t.length)):e.setAttributeNS(Ev,t,n):n==null||a&&!If(n)?e.removeAttribute(t):e.setAttribute(t,a?``:of(n)?String(n):n)}function Ov(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?av(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=If(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function kv(e,t,n,r){e.addEventListener(t,n,r)}function Av(e,t,n,r){e.removeEventListener(t,n,r)}var jv=Symbol(`_vei`);function Mv(e,t,n,r,i=null){let a=e[jv]||(e[jv]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Fv(t);r?kv(e,n,a[t]=zv(r,i),s):o&&(Av(e,n,o,s),a[t]=void 0)}}var Nv=/(Once|Passive|Capture)$/,Pv=/^on:?(?:Once|Passive|Capture)$/;function Fv(e){let t,n;for(;(n=e.match(Nv))&&!Pv.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):yf(e.slice(2)),t]}var Iv=0,Lv=Promise.resolve(),Rv=()=>Iv||=(Lv.then(()=>Iv=0),Date.now());function zv(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if($d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&Am(e,t,5,a)}}else Am(r,t,5,[e])};return n.value=e,n.attached=Rv(),n}var Bv=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Vv=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?fv(e,r,o):t===`style`?yv(e,n,r):qd(t)?Jd(t)||Mv(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Hv(e,t,r,o))?(Ov(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Dv(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Uv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!af(r)))?Ov(e,_f(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Dv(e,t,r,o))};function Hv(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Bv(t)&&rf(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Bv(t)&&af(n)?!1:t in e}function Uv(e,t){let n=e._def.props;if(!n)return!1;let r=_f(t);return Array.isArray(n)?n.some(e=>_f(e)===r):Object.keys(n).some(e=>_f(e)===r)}var Wv=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return $d(t)?e=>Cf(t,e):t},Gv=Symbol(`_assign`),Kv={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,kv(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Tf(Yv(e)):Yv(e)),r=e.multiple,i=r?tf(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?$d(i)?t.slice():t:i];try{e[Gv](i)}finally{Bm(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Gv]=Wv(r)},mounted(e,{value:t}){Jv(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Gv]=Wv(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!qv(t,n[1],n[0]))&&Jv(e,t)}};function qv(e,t,n){if(!n||$d(e))return Vf(e,t);if(tf(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Jv(e,t){let n=e.multiple,r=$d(t);if(!n||r||tf(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Yv(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Hf(t,o)>-1}else a.selected=t.has(o)}else if(Vf(Yv(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Yv(e){return`_value`in e?e._value:e.value}var Xv=[`ctrl`,`shift`,`alt`,`meta`],Zv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Xv.some(n=>e[`${n}Key`]&&!t.includes(n))},Qv=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Zv[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},$v={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},ey=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=yf(n.key);if(t.some(e=>e===r||$v[e]===r))return e(n)}))},ty=Yd({patchProp:Vv},uv),ny;function ry(){return ny||=Xg(ty)}var iy=((...e)=>{let t=ry().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=oy(e);if(!r)return;let i=t._component;!rf(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,ay(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function ay(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function oy(e){return af(e)?document.querySelector(e):e}var sy={"circle-check":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512m118-366.3c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8l135.9-187c7.8-10.7 5.4-25.7-5.3-33.5"/></svg>`,"circle-exclamation":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512m0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64m0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"/></svg>`,"circle-xmark":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512m-89-345c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9"/></svg>`,cog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M195.1 9.5c3-14.8 16.1-25.5 31.3-25.5h59.8c15.2 0 28.3 10.7 31.3 25.5l14.5 70c14.1 6 27.3 13.7 39.3 22.8l67.8-22.5c14.4-4.8 30.2 1.2 37.8 14.4l29.9 51.8c7.6 13.2 4.9 29.8-6.5 39.9L447 233.3c.9 7.4 1.3 15 1.3 22.7s-.5 15.3-1.3 22.7l53.4 47.5c11.4 10.1 14 26.8 6.5 39.9L477 417.9c-7.6 13.1-23.4 19.2-37.8 14.4l-67.8-22.5c-12.1 9.1-25.3 16.7-39.3 22.8l-14.4 69.9c-3.1 14.9-16.2 25.5-31.3 25.5h-59.8c-15.2 0-28.3-10.7-31.3-25.5l-14.4-69.9c-14.1-6-27.2-13.7-39.3-22.8l-68.1 22.5c-14.4 4.8-30.2-1.2-37.8-14.4L5.8 366.1c-7.6-13.2-4.9-29.8 6.5-39.9l53.4-47.5c-.9-7.4-1.3-15-1.3-22.7s.5-15.3 1.3-22.7l-53.4-47.5C.9 175.7-1.7 159 5.8 145.9l29.9-51.8c7.6-13.2 23.4-19.2 37.8-14.4l67.8 22.5c12.1-9.1 25.3-16.7 39.3-22.8zM256.3 336a80 80 0 1 0-.6-160 80 80 0 1 0 .6 160"/></svg>`,comment:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M512 240c0 132.5-114.6 240-256 240-37.1 0-72.3-7.4-104.1-20.7L33.5 510.1c-9.4 4-20.2 1.7-27.1-5.8s-8.4-18.5-3.6-27.5l48.8-92.2C19.2 344.3 0 294.3 0 240 0 107.5 114.6 0 256 0s256 107.5 256 240"/></svg>`,"comment-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M51.9 384.9C19.3 344.6 0 294.4 0 240 0 107.5 114.6 0 256 0s256 107.5 256 240-114.6 240-256 240c-36.5 0-71.2-7.2-102.6-20L37 509.9c-3.7 1.6-7.5 2.1-11.5 2.1C11.4 512 0 500.6 0 486.5c0-4.3 1.1-8.5 3.1-12.2zm37.3-30.2c12.2 15.1 14.1 36.1 4.8 53.2L76 441l58.5-25.1c11.8-5.1 25.2-5.2 37.1-.3 25.7 10.5 54.2 16.4 84.3 16.4 117.8 0 208-88.8 208-192S373.8 48 256 48 48 136.8 48 240c0 42.8 15.1 82.4 41.2 114.7"/></svg>`,"face-smile":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512m-90.6-190.1c20.4 28 53.4 46.1 90.6 46.1s70.2-18.1 90.6-46.1c7.8-10.7 22.8-13.1 33.5-5.3s13.1 22.8 5.3 33.5C356.3 390 309.2 416 256 416s-100.3-26-129.4-65.9c-7.8-10.7-5.4-25.7 5.3-33.5s25.7-5.4 33.5 5.3M144 208a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,heart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m241 87.1 15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1v2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7v-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1"/></svg>`,image:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M64 32C28.7 32 0 60.7 0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zm64 80a48 48 0 1 1 0 96 48 48 0 1 1 0-96m144 112c8.4 0 16.1 4.4 20.5 11.5l88 144c4.5 7.4 4.7 16.7.5 24.3S368.7 416 360 416H88c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l26.4 37.8 61.4-100.5c4.4-7.1 12.1-11.5 20.5-11.5z"/></svg>`,"image-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M64 80c-8.8 0-16 7.2-16 16v320c0 8.8 7.2 16 16 16h320c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16zM0 96c0-35.3 28.7-64 64-64h320c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64m136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6.1 24.1S352.6 384 344 384H104c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"/></svg>`,laugh:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512M101.6 314c-3.7-13.7 7.5-26 21.7-26h265.4c14.2 0 25.4 12.3 21.7 26-18.5 68-80.6 118-154.4 118s-136-50-154.4-118M144 192a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,"laugh-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 256a208 208 0 1 0-416 0 208 208 0 1 0 416 0M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m118.3 58.2c-4.2-13.7 7.1-26.2 21.4-26.2h232.6c14.3 0 25.6 12.5 21.4 26.2C375.7 373.1 320.8 416 256 416s-119.7-42.9-137.7-101.8M144 192a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,"location-arrow":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M477.9 75.5c4.5-11.8 1.7-25.2-7.2-34.1s-22.3-11.8-34.1-7.2l-416 160C7.9 199-.3 211.2 0 224.7s9.1 25.4 21.9 29.6l176.8 58.9L257.6 490c4.3 12.8 16.1 21.6 29.6 21.9s25.7-7.9 30.6-20.5l160-416z"/></svg>`,"magnifying-glass":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.1-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208M208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288"/></svg>`,"paper-plane":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M536.4-26.3c9.8-3.5 20.6-1 28 6.3s9.8 18.2 6.3 28l-178 496.9c-5 13.9-18.1 23.1-32.8 23.1-14.2 0-27-8.6-32.3-21.7l-64.2-158c-4.5-11-2.5-23.6 5.2-32.6l94.5-112.4c5.1-6.1 4.7-15-.9-20.6s-14.6-6-20.6-.9l-112.4 94.3c-9.1 7.6-21.6 9.6-32.6 5.2L38.1 216.8c-13.1-5.3-21.7-18.1-21.7-32.3 0-14.7 9.2-27.8 23.1-32.8z"/></svg>`,reply:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M204.2 18.4c12 5 19.8 16.6 19.8 29.6v80h112c97.2 0 176 78.8 176 176 0 113.3-81.5 163.9-100.2 174.1-2.5 1.4-5.3 1.9-8.1 1.9-10.9 0-19.7-8.9-19.7-19.7 0-7.5 4.3-14.4 9.8-19.5 9.4-8.8 22.2-26.4 22.2-56.7 0-53-43-96-96-96h-96v80c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-160-160c-12.5-12.5-12.5-32.8 0-45.3l160-160c9.2-9.2 22.9-11.9 34.9-6.9z"/></svg>`,spinner:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M208 48a48 48 0 1 1 96 0 48 48 0 1 1-96 0m0 416a48 48 0 1 1 96 0 48 48 0 1 1-96 0M48 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96m368 48a48 48 0 1 1 96 0 48 48 0 1 1-96 0M75 369.1a48 48 0 1 1 67.9 67.9A48 48 0 1 1 75 369.1M75 75a48 48 0 1 1 67.9 67.9A48 48 0 1 1 75 75m362 294.1a48 48 0 1 1-67.9 67.9 48 48 0 1 1 67.9-67.9"/></svg>`,sync:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M65.9 228.5C79.2 135.5 159.3 64 256 64c53 0 101 21.5 135.8 56.2l.6.6 7.6 7.2h-47.9c-17.7 0-32 14.3-32 32s14.3 32 32 32h128c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v53.4l-11.3-10.7C390.5 28.6 326.5 0 256 0 127 0 20.3 95.4 2.6 219.5c-2.5 17.5 9.6 33.7 27.1 36.2s33.7-9.7 36.2-27.1zm443.5 64c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-53 0-101-21.5-135.8-56.2l-.6-.6-7.6-7.2h47.9c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 320c-8.5 0-16.7 3.4-22.7 9.5S-.1 343.7 0 352.3l1 127c.1 17.7 14.6 31.9 32.3 31.7s31.9-14.6 31.7-32.3l-.4-51.5 10.7 10.1C121.6 483.4 185.5 512 256 512c129 0 235.7-95.4 253.4-219.5"/></svg>`,"thumbs-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M384 32c26.5 0 48 21.5 48 48 0 6.3-1.3 12.2-3.4 17.7C449 103.2 464 121.8 464 144c0 9.1-2.6 17.6-7 24.9 22.2 4.2 39 23.7 39 47.1 0 19.7-11.9 36.6-28.9 44 17 7.4 28.9 24.3 28.9 44 0 26.5-21.5 48-48 48H288l28.2 70.4c2.5 6.3 3.8 13.1 3.8 19.9v4.2c0 27.3-22.1 49.4-49.4 49.4-18.7 0-35.8-10.6-44.2-27.3l-56.3-112.3c-6.7-13.3-10.1-28-10.1-42.9V126.8c0-19.4 8.9-37.8 24-50l12.2-9.7C224.6 44.4 259.8 32 296.1 32zM80 96c17.7 0 32 14.3 32 32v256c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32z"/></svg>`,"thumbs-down-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m360 32 7.4.4c35 3.6 62.5 32.2 64.4 67.7 17.8 11.8 30.1 31.4 32 53.9l.2 6c0 5.7-.7 11.2-2 16.5 10.2 11.5 16.8 26.3 17.8 42.7l.2 4.8c0 13.2-3.6 25.4-9.8 36 4.9 8.4 8.2 17.9 9.3 28l.4 8c0 37.3-28.3 67.9-64.6 71.6l-7.4.4H298.2l14.1 30 3.1 7.6c12.5 35.7-1.8 75.5-34.2 95l-7.2 3.9c-37.5 17.6-81.7 3.6-102.6-31.2l-.6-.9-2.7-5-.6-1.2-30.1-64c-9.4 17.8-28 29.9-49.5 29.9h-32c-30.9 0-56-25.1-56-56L0 152c0-30.9 25.1-56 56-56h32c12.4 0 23.9 4.1 33.2 11 13.2-21.4 32-39.4 55-51.6l12.2-6.5.7-.3 6.6-3.2.7-.3 7.1-3c16.7-6.6 34.5-9.9 52.6-9.9zM255.9 80c-12 0-23.9 2.3-35.1 6.6l-4.7 2-5.3 2.6-12.2 6.5c-29.2 15.5-48.3 44.9-50.7 77.6l-.2 8v112.9l.1 4.1c.5 8.2 2.5 16.2 6 23.7l56.8 120.9 2.1 3.8c8.4 13.7 26 19.1 40.8 12.2l2.9-1.6c13-7.8 18.7-23.7 13.7-38l-1.2-3-30.2-64.2c-3.5-7.4-2.9-16.1 1.5-23.1s12-11.1 20.2-11.1h147.5l2.4-.1c11.3-1.1 20.3-10.1 21.4-21.4l.1-2.5c0-7.1-3.1-13.5-8.2-18-5.2-4.6-8.2-11.1-8.2-18s3-13.4 8.2-18c4.4-3.9 7.4-9.3 8-15.3l.2-2.7c0-8.4-4.4-15.9-11.2-20.2-10.7-6.9-14.2-20.9-8-32 1.5-2.6 2.5-5.6 2.9-8.6l.2-3.2c0-10.6-6.9-19.6-16.6-22.8-11.7-3.8-18.7-15.9-16-28 .2-.9.3-1.8.4-2.6l.2-2.6c0-12.4-9.5-22.6-21.6-23.8L360 80zM56 144c-4.4 0-8 3.6-8 8v224c0 4.4 3.6 8 8 8h32c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8z"/></svg>`,"thumbs-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M80 160c17.7 0 32 14.3 32 32v256c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32zM270.6 16c27.3 0 49.4 22.1 49.4 49.4v4.2c0 6.8-1.3 13.6-3.8 19.9L288 160h160c26.5 0 48 21.5 48 48 0 19.7-11.9 36.6-28.9 44 17 7.4 28.9 24.3 28.9 44 0 23.4-16.8 42.9-39 47.1 4.4 7.3 7 15.8 7 24.9 0 22.2-15 40.8-35.4 46.3 2.2 5.5 3.4 11.5 3.4 17.7 0 26.5-21.5 48-48 48h-87.9c-36.3 0-71.6-12.4-99.9-35.1l-12.2-9.7c-15.2-12.1-24-30.5-24-50V198.6c0-14.9 3.5-29.6 10.1-42.9l56.2-112.4c8.4-16.7 25.5-27.3 44.3-27.3"/></svg>`,"thumbs-up-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M171.5 38.8C192.3 4 236.5-10 274 7.6l7.2 3.8C316 32.3 330 76.5 312.4 114l-14.1 30H408l7.4.4c36.3 3.7 64.6 34.4 64.6 71.6 0 13.2-3.6 25.4-9.8 36 6.1 10.6 9.7 22.8 9.8 36 0 18.3-6.9 34.8-18 47.5 1.3 5.3 2 10.8 2 16.5 0 25.1-12.9 47-32.2 59.9-1.9 35.5-29.4 64.2-64.4 67.7l-7.4.4H255.9c-18 0-35.9-3.4-52.6-9.9l-7.1-3-.7-.3-6.6-3.2-.7-.3-12.2-6.5c-12.3-6.5-23.3-14.7-32.9-24.1-4.1 26.9-27.3 47.4-55.3 47.4h-32c-30.9 0-56-25.1-56-56L0 200c0-30.9 25.1-56 56-56h32c10.8 0 20.9 3.1 29.5 8.5L167.6 46l.6-1.2 2.7-5 .6-.9zM56 192c-4.4 0-8 3.6-8 8v224c0 4.4 3.6 8 8 8h32c4.4 0 8-3.6 8-8V200c0-4.4-3.6-8-8-8zM253.6 51c-14.8-6.9-32.3-1.6-40.7 12l-2.2 4-56.8 120.9c-3.5 7.5-5.5 15.5-6 23.7l-.1 4.2v112.9l.2 7.9c2.4 32.7 21.4 62.1 50.7 77.7l11.5 6.1 6.3 3.1c12.4 5.6 25.8 8.5 39.4 8.5H360l2.4-.1c12.1-1.2 21.6-11.5 21.6-23.9l-.2-2.6c-.1-.9-.2-1.7-.4-2.6-2.7-12.1 4.3-24.2 16-28 9.7-3.1 16.6-12.2 16.6-22.8 0-4.3-1.1-8.2-3.1-11.8-6.3-11.1-2.8-25.2 8-32 6.8-4.3 11.2-11.8 11.2-20.2 0-7.1-3.1-13.5-8.2-18-5.2-4.6-8.2-11.1-8.2-18s3-13.4 8.2-18c5.1-4.5 8.2-10.9 8.2-18l-.1-2.4c-1.1-11.3-10.1-20.3-21.4-21.4l-2.4-.1H260.7c-8.2 0-15.8-4.2-20.2-11.1s-5-15.7-1.5-23.1l30-64.3c7-15 1.4-32.7-12.5-41z"/></svg>`,times:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l137.3-137.4 137.4 137.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256l137.3-137.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7z"/></svg>`,trash:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M136.7 5.9C141.1-7.2 153.3-16 167.1-16H281c13.8 0 26 8.8 30.4 21.9L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64s14.3-32 32-32h96zM32 144h384v304c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64zm88 64c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24m104 0c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24m104 0c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24"/></svg>`,"trash-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48H24C10.7 48 0 58.7 0 72s10.7 24 24 24h400c13.3 0 24-10.7 24-24s-10.7-24-24-24h-96L311.8 4.8c-4.7-12.5-16.6-20.8-30-20.8zM32 144v304c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V144h-48v304c0 8.8-7.2 16-16 16H96c-8.8 0-16-7.2-16-16V144zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24v176c0 13.3 10.7 24 24 24s24-10.7 24-24zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24v176c0 13.3 10.7 24 24 24s24-10.7 24-24z"/></svg>`,"user-circle":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"/></svg>`,"window-maximize":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zm24 64h336c13.3 0 24 10.7 24 24s-10.7 24-24 24H88c-13.3 0-24-10.7-24-24s10.7-24 24-24"/></svg>`,"window-maximize-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M48 224v160c0 8.8 7.2 16 16 16h384c8.8 0 16-7.2 16-16V224zM0 128c0-35.3 28.7-64 64-64h384c35.3 0 64 28.7 64 64v256c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64z"/></svg>`,android:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M131.2 61.9c5.3-.5 10.6.6 15.3 3s8.6 6.2 11.3 10.8c17 29.5 34.2 58.9 51.2 88.4q5.25-2.1 10.5-3.9c31.3-10.9 64.2-16.6 97.4-16.9h3.2c38.1 0 76.2 7 111.6 21.1L483 75.7c1.8-3.2 4.3-6 7.2-8.2s6.2-3.9 9.8-4.8c3.1-.8 6.4-1.1 9.6-.8 4.2.4 8.3 1.7 11.9 3.8 4 2.4 7.3 5.7 9.7 9.7 2 3.4 3.3 7.2 3.8 11.2s.1 8-1.2 11.7c-.6 1.9-1.4 3.7-2.4 5.5l-49.7 85.8c19.5 12.2 37.6 26.5 53.9 42.8 12.3 12.2 23.5 25.4 33.5 39.5 8.2 11.5 15.6 23.6 22.2 36.2 17.5 33.6 28.6 70.5 32.7 108.1H16c4.1-37.7 15.2-74.5 32.7-108.1 14.5-27.9 33.4-53.5 55.7-75.7 16.5-16.4 34.7-30.9 54.5-43.1l-49.5-85.4c-3.7-6.4-4.7-14.1-2.8-21.2s6.4-13.1 12.7-16.8c3.6-2.2 7.7-3.5 11.9-3.8zm67.3 215.8c-12.2-8.1-30.1-2.5-40.1 12.5s-8.2 33.8 3.9 41.9 30.1 2.5 40.1-12.5 8.2-33.8-3.9-41.9m283.6 12.5c-10-15-27.9-20.6-40.1-12.5s-13.9 26.9-3.9 41.9 27.9 20.6 40.1 12.5 13.9-26.9 3.9-41.9"/></svg>`,apple:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M319.1 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7-55.8.9-115.1 44.5-115.1 133.2 0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"/></svg>`,chrome:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-46.6 12.5-90.4 34.3-128.9l109.8 191.2C166 357.5 207.9 384 256 384c14.3 0 27.1-2.3 40.8-6.6l-76.3 132.2C95.9 492.3 0 385.3 0 256m365.1 65.6c12.3-19.2 18.9-42.5 18.9-65.6 0-38.2-16.8-72.5-43.3-96h152.7c12 29.6 18.6 62.1 18.6 96 0 141.4-114.6 255.1-256 256zM477.8 128H256c-62.9 0-113.7 44.1-125.5 102.7L54.2 98.5C101 38.5 174 0 256 0c94.8 0 177.5 51.5 221.8 128M344 256a88 88 0 1 1-176 0 88 88 0 1 1 176 0"/></svg>`,edge:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M120.1 37.4C161.1 12.2 207.7-.8 255 0c168 0 257 123.8 257 219.5-.1 32.7-13 63.9-35.9 87.2-22.9 23.2-54 36.5-86.7 37-75.2 0-91.5-23.1-91.5-32 0-3.8 1.2-6.2 4.8-9.4l1-1.2.4-1.6c10.5-11.5 15.9-26.2 15.9-41.6 0-78.7-82.2-142.7-184-142.7-37.5-.3-74.5 8.9-107.5 26.9 27-57.5 82.7-97.6 91.3-103.8.8-.6.3-.8.3-.8zm15.6 318.1c-1.4 30 4.6 60 16.4 87.2 13.6 26.4 32.7 51 56.5 69.3-59.5-11.5-111.5-43.9-149.4-89.3C21.1 376.3 0 318.4 0 257.9c0-51.2 62.4-94.4 136-94.4 36.6-.6 72.4 10.9 101.8 32.7l-3.6 1.2c-51.5 17.6-98.5 90.7-98.5 158.1M469.8 400l-.7.1c-11.8 18.8-25.9 35.1-42.2 49.5-30.8 28-68.1 45.5-108.8 49.9-18.6.3-36.8-3.2-53.8-11.4-25.6-10.3-47.1-30-61.6-53-14.4-23.9-21.1-51.7-19-79.6-.6-20.1 5.4-40.3 15-58.2 13.9 33.1 37.5 61.3 67.6 80.8s65.5 29.5 101.4 28.6c31 .3 62.1-6.7 90.2-20.5l1.9-.9c3.9-2.3 7.7-3.9 11.6 0 4.5 4.9 1.8 9.2-1.2 14-.2.2-.3.5-.4.7"/></svg>`,"firefox-browser":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M481.6 172.9c-10.6-25.5-32.1-53-48.9-61.7 13.7 26.9 21.7 53.9 24.7 74 0 .1 0 .3.1.4-27.6-68.8-74.4-96.5-112.6-156.8-15-23.7-10.9-25.2-13.1-24.7l-.1.1c-46.7 26-75.3 78.4-82.6 122.7-16.6.9-32.9 5-47.9 12.1-1.4.6-2.5 1.7-3.1 3s-.9 2.8-.6 4.3c.2.8.6 1.6 1.1 2.3s1.2 1.3 1.9 1.7 1.6.7 2.4.8 1.7 0 2.5-.3l.5-.2c15.5-7.3 32.4-11.2 49.5-11.3 62.8-.6 97.2 44 107.6 62.3-13-9.2-36.4-18.2-58.8-14.3 87.7 43.9 64.2 194.5-57.4 189.2-59.5-2.6-97.1-51-100.5-90.8 0 0 11.2-41.9 80.6-41.9 7.5 0 28.9-20.9 29.3-27-.1-2-42.5-18.9-59.1-35.2-8.8-8.7-13.1-12.9-16.8-16.1q-3-2.55-6.3-4.8c-5.6-19.5-5.8-40-.7-59.6-25.1 11.4-44.6 29.4-58.7 45.4h-.1c-9.7-12.2-9-52.6-8.4-61.1-.1-.5-7.2 3.7-8.2 4.3-8.6 6.1-16.5 12.9-23.8 20.4-16.3 16.6-44.1 50.2-55.5 101.2-4.5 20.4-6.8 44.4-6.8 52.3 0 134.7 109.2 243.9 243.9 243.9 120.6 0 223-87.2 240.4-202.6 11.6-76.7-14.7-131.1-14.7-132z"/></svg>`,"internet-explorer":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M483.1 159.7c10.9-24.6 21.4-60.4 21.4-87.9 0-72.7-79.6-98.4-209.7-38.6C187.2 26 83.6 106.9 57.7 219.7c30.9-34.9 78.3-82.3 122-101.2C125.4 166.8 79.1 227.9 44 291.7c-20.7 37.9-44 99.2-44 145 0 98.6 92.9 86.5 180.3 42 31.4 15.4 66.6 15.6 101.7 15.6 97.1 0 184.2-54.3 216.8-146H378c-52.5 88.6-196.8 53-196.8-47.4H510c6.4-43.6-1.7-95.7-26.9-141.2M64.6 346.9c17.7 51.1 53.7 95.8 100.2 123.3C76.1 519.1-8.4 499.3 64.6 346.9M180.5 238c2-55.2 50.3-94.9 104-94.9 53.4 0 102 39.7 104 94.9zM365.1 50.4c21.4-10.3 48.6-22 72.6-22 31.4 0 54.3 21.7 54.3 53.7 0 20-7.4 49-14.6 67.9-26.3-42.3-66-81.6-112.3-99.6"/></svg>`,linux:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M220.9 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7M199 125c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4m221 278.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7M223.8 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8m-40.7-11.5c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1m-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3q-2.1-7.35 4.2-12.3m3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9m-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2m257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6M173.4 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1M338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"/></svg>`,safari:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m274.7 274.7-37.4-37.4L166 346zM256 8a248 248 0 1 0 0 496 248 248 0 1 0 0-496m155.8 174.8 14.8-6.1c1-.4 2-.6 3.1-.6s2.1.2 3.1.6 1.8 1 2.6 1.7 1.3 1.6 1.7 2.6.6 2 .6 3.1-.2 2.1-.6 3.1-1 1.9-1.7 2.6-1.6 1.3-2.6 1.7l-14.8 6.1c-2 .8-4.2.8-6.1 0s-3.5-2.4-4.3-4.3-.8-4.2 0-6.1 2.4-3.5 4.3-4.3zM314.4 94l6.1-14.8c.8-2 2.4-3.5 4.3-4.3s4.2-.8 6.1 0 3.5 2.4 4.3 4.3.8 4.2 0 6.1l-6.1 14.8c-.8 2-2.4 3.5-4.3 4.3s-4.2.8-6.1 0c-1-.4-1.9-1-2.6-1.7s-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1zM256 60c2.1 0 4.2.8 5.7 2.3s2.3 3.6 2.3 5.7v16c0 2.1-.8 4.2-2.3 5.7S258.2 92 256 92s-4.2-.8-5.7-2.3-2.3-3.5-2.3-5.7V68c0-2.1.8-4.2 2.3-5.7s3.6-2.3 5.7-2.3m-75 14.9c1-.4 2-.6 3.1-.6s2.1.2 3.1.6 1.9 1 2.6 1.7 1.3 1.6 1.7 2.6l6.1 14.8c.4 1 .7 2 .7 3.1s-.2 2.1-.6 3.1-1 1.9-1.7 2.6-1.6 1.4-2.6 1.8-2 .6-3.1.6-2.1-.2-3.1-.6-1.9-1-2.6-1.8-1.3-1.7-1.7-2.7l-6.1-14.8c-.8-2-.8-4.2 0-6.1s2.4-3.5 4.3-4.3zm-63.6 42.5c1.5-1.5 3.5-2.3 5.7-2.3s4.2.8 5.7 2.3l11.2 11.3c1.5 1.5 2.3 3.5 2.3 5.6s-.8 4.1-2.3 5.6-3.5 2.3-5.7 2.3-4.2-.8-5.7-2.3l-11.3-11.3c-1.5-1.5-2.3-3.5-2.3-5.6s.8-4.1 2.3-5.6zM60 256c0-2.1.8-4.2 2.3-5.7s3.6-2.3 5.7-2.3h16c2.1 0 4.2.8 5.7 2.3s2.3 3.5 2.3 5.7-.8 4.2-2.3 5.7-3.5 2.3-5.7 2.3H68c-2.1 0-4.2-.8-5.7-2.3S60 258.1 60 256m40.2 73.2-14.8 6.1c-1 .4-2 .6-3.1.6s-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1 1-1.9 1.7-2.6 1.6-1.3 2.6-1.7l14.8-6.1c2-.8 4.2-.8 6.1 0s3.5 2.4 4.3 4.3.8 4.2 0 6.1-2.4 3.5-4.3 4.3zm4.3-136c-.4 1-1 1.9-1.7 2.6s-1.6 1.3-2.6 1.7-2 .6-3.1.6-2.1-.2-3.1-.6l-14.8-6.1c-2-.8-3.5-2.4-4.3-4.3s-.8-4.2 0-6.1 2.4-3.5 4.3-4.3 4.2-.8 6.1 0l14.8 6.1c2 .8 3.5 2.4 4.3 4.3s.8 4.2 0 6.1zM197.6 418l-6.1 14.8c-.4 1-1 1.9-1.7 2.6s-1.6 1.3-2.6 1.7-2 .6-3.1.6-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1l6.1-14.8c.4-1 1-1.9 1.7-2.7s1.6-1.4 2.6-1.8 2-.6 3.1-.6 2.1.2 3.1.6 1.9 1 2.6 1.8 1.3 1.7 1.7 2.6.6 2 .6 3.1-.2 2.1-.7 3.1zm66.4 26c0 2.1-.8 4.2-2.3 5.7s-3.5 2.3-5.7 2.3-4.2-.8-5.7-2.3-2.3-3.5-2.3-5.7v-16c0-2.1.8-4.2 2.3-5.7s3.5-2.3 5.7-2.3 4.2.8 5.7 2.3 2.3 3.5 2.3 5.7zm67-6.9c-1 .4-2 .6-3.1.6s-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6l-6.1-14.8c-.8-2-.8-4.2 0-6.1s2.4-3.5 4.3-4.3 4.2-.8 6.1 0 3.5 2.4 4.3 4.3l6.1 14.8c.8 2 .8 4.2 0 6.1s-2.4 3.5-4.3 4.3zm63.6-42.5c-1.5 1.5-3.5 2.3-5.7 2.3s-4.2-.8-5.7-2.3L372 383.3c-1.5-1.5-2.3-3.5-2.3-5.6s.8-4.1 2.3-5.6 3.5-2.3 5.7-2.3 4.2.8 5.7 2.3l11.3 11.3c1.5 1.5 2.3 3.5 2.3 5.6s-.8 4.1-2.3 5.6zM286.2 286.2 110.3 401.7l115.5-175.9 175.9-115.5zM437.1 331c-.8 2-2.4 3.5-4.3 4.3s-4.2.8-6.1 0l-14.8-6.1c-2-.8-3.5-2.4-4.3-4.3s-.8-4.2 0-6.1c.4-1 1-1.9 1.7-2.6s1.6-1.3 2.6-1.7 2-.6 3.1-.6 2.1.2 3.1.6l14.8 6.1c2 .8 3.5 2.4 4.3 4.3s.8 4.2 0 6.1zm6.9-67h-16c-2.1 0-4.2-.8-5.7-2.3s-2.3-3.5-2.3-5.7.8-4.2 2.3-5.7 3.5-2.3 5.7-2.3h16c2.1 0 4.2.8 5.7 2.3s2.3 3.5 2.3 5.7-.8 4.2-2.3 5.7-3.5 2.3-5.7 2.3"/></svg>`,ubuntu:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M469.2 75c0-20.1-8-39.3-22.2-53.5S413.6-.7 393.5-.7s-39.3 8-53.5 22.2-22.2 33.4-22.2 53.5 8 39.3 22.1 53.5 33.4 22.1 53.5 22.1 39.3-8 53.5-22.1S469 95.1 469 75h.1zm-315 165.7a75.6 75.6 0 1 0-151.2 0 75.6 75.6 0 1 0 151.2 0M57 346c18.6 46.9 51 87 93 115.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2-6.8-.9-13.3-2.1-19.5-3.4-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0-151.2 0 75.6 75.6 0 1 0 151.2 0m-8.1-84.2c18.5 14.8 31.6 35.2 37.2 58.2 33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6 15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3 16.6-24.2 38.9-44.1 64.8-58s54.8-21.3 84.2-21.7c.2-5.9.9-11.9 2-17.7C290.8 35.6 298.3 20 309 6.8c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3 7.5 0 15 .8 22.4 2.3z"/></svg>`,windows:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="m0 93.7 183.6-25.3v177.4H0zm0 324.6 183.6 25.3V268.4H0zm203.8 28L448 480V268.4H203.8zm0-380.6v180.1H448V32z"/></svg>`},cy=[`innerHTML`],ly=hh({__name:`TkIcon`,props:{name:{}},setup(e){let t=e,n=tv(()=>sy[t.name]||(console.warn(`[twikoo] 未注册的图标: ${t.name}(请在 components/icons.ts 登记)`),``));return(e,t)=>(Y(),X(c_,null,[$(` SVG 内容来自 fontawesome-free 官方文件(构建期内联,非运行时注入用户数据) `),$(` eslint-disable-next-line vue/no-v-html `),Z(`i`,{class:`tk-icon`,innerHTML:n.value},null,8,cy)],2112))}}),uy={class:`tk-action`},dy={class:`tk-action-icon`},fy={class:`tk-action-icon tk-action-icon-solid`},py={class:`tk-action-icon`},my={class:`tk-action-icon tk-action-icon-solid`},hy={class:`tk-action-count`},gy={class:`tk-action-icon`},_y={class:`tk-action-icon tk-action-icon-solid`},vy={class:`tk-action-count`},yy={class:`tk-action-icon`},by={class:`tk-action-icon tk-action-icon-solid`},xy={class:`tk-action-count`},Sy=hh({__name:`TkAction`,props:{liked:{type:Boolean,default:!1},disliked:{type:Boolean,default:!1},likeCount:{default:0},dislikeCount:{default:0},repliesCount:{default:0},showDislike:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!1}},emits:[`like`,`dislike`,`reply`,`delete`],setup(e,{emit:t}){let n=e,r=t,i=tv(()=>n.likeCount>0?`${n.likeCount}`:``),a=tv(()=>n.dislikeCount>0?`${n.dislikeCount}`:``),o=tv(()=>n.repliesCount>0?`${n.repliesCount}`:``);return(t,n)=>(Y(),X(`div`,uy,[e.showDelete?(Y(),X(`button`,{key:0,class:`tk-action-link`,onClick:n[0]||=e=>r(`delete`)},[Z(`span`,dy,[Q(ly,{name:`trash-regular`})]),Z(`span`,fy,[Q(ly,{name:`trash`})]),n[4]||=Z(`span`,{class:`tk-action-count`},null,-1)])):$(`v-if`,!0),Z(`button`,{class:Nf([`tk-action-link`,{"tk-liked":e.liked}]),onClick:n[1]||=e=>r(`like`)},[Z(`span`,py,[Q(ly,{name:`thumbs-up-regular`})]),Z(`span`,my,[Q(ly,{name:`thumbs-up`})]),Z(`span`,hy,K(i.value),1)],2),e.showDislike?(Y(),X(`button`,{key:1,class:Nf([`tk-action-link`,{"tk-disliked":e.disliked}]),onClick:n[2]||=e=>r(`dislike`)},[Z(`span`,gy,[Q(ly,{name:`thumbs-down-regular`})]),Z(`span`,_y,[Q(ly,{name:`thumbs-down`})]),Z(`span`,vy,K(a.value),1)],2)):$(`v-if`,!0),Z(`button`,{class:`tk-action-link`,onClick:n[3]||=e=>r(`reply`)},[Z(`span`,yy,[Q(ly,{name:`comment-regular`})]),Z(`span`,by,[Q(ly,{name:`comment`})]),Z(`span`,xy,K(o.value),1)])]))}}),Cy={},wy={key:0,class:`tk-avatar-img`},Ty=[`src`],Ey=hh({__name:`TkAvatar`,props:{nick:{default:``},avatar:{default:``},mail:{default:``},mailMd5:{default:``},link:{default:``},config:{default:Cy}},setup(e){let t=e,n=tv(()=>rl({avatar:t.avatar,mailMd5:t.mailMd5,mail:t.mail,nick:t.nick},t.config));function r(){t.link&&window.open(xd(t.link),`_blank`)?.focus()}return(t,i)=>(Y(),X(`div`,{class:Nf([`tk-avatar`,{"tk-clickable":!!e.link,"tk-has-avatar":!!n.value}]),onClick:r},[n.value?(Y(),X(`img`,{key:1,class:`tk-avatar-img`,src:n.value,alt:``},null,8,Ty)):(Y(),X(`div`,wy,[Q(ly,{name:`user-circle`})]))],2))}}),Dy={key:0,class:`tk-input-group__prepend`},Oy=[`name`,`value`,`placeholder`,`rows`,`disabled`,`readonly`,`maxlength`],ky=[`type`,`name`,`value`,`placeholder`,`disabled`,`readonly`,`maxlength`,`min`,`max`],Ay={key:3,class:`tk-input__suffix`},jy={key:4,class:`tk-input__count`},My={key:5,class:`tk-input-group__append`},Ny=hh({__name:`TkInput`,props:{modelValue:{default:``},type:{default:`text`},placeholder:{default:``},rows:{default:2},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{default:void 0},showWordLimit:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},size:{default:``},name:{default:``},min:{default:void 0},max:{default:void 0}},emits:[`update:modelValue`,`input`,`change`,`blur`,`focus`,`clear`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=Zh(),o=q(),s=tv(()=>!!a.prepend),c=tv(()=>!!a.append),l=tv(()=>r.clearable&&!r.disabled&&!r.readonly&&u.value),u=tv(()=>r.modelValue!==``&&r.modelValue!==void 0&&r.modelValue!==null),d=tv(()=>String(r.modelValue??``).length);function f(e){let t=e.target.value;i(`update:modelValue`,t),i(`input`,t,e)}function p(e){i(`change`,e.target.value)}function m(e){i(`blur`,e)}function h(e){i(`focus`,e)}function g(){i(`update:modelValue`,``),i(`clear`),o.value?.focus()}function _(){o.value?.focus()}function v(){o.value?.blur()}function y(){let e=o.value;if(r.type!==`textarea`||!r.autosize||!(e instanceof HTMLTextAreaElement))return;let t=typeof r.autosize==`object`?r.autosize.minRows??r.rows:r.rows,n=getComputedStyle(e),i=parseFloat(n.lineHeight)||20,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),c=t*i+a+s;e.style.overflow=`hidden`,e.style.height=`auto`,e.style.height=`${Math.max(e.scrollHeight,c)}px`}return ah(()=>r.modelValue,()=>{Bm(y)}),Ah(()=>{Bm(y)}),t({focus:_,blur:v,inputEl:o}),(t,n)=>(Y(),X(`div`,{class:Nf([`tk-input`,[e.size?`tk-input--${e.size}`:``,e.type===`textarea`?`tk-textarea`:``,{"is-disabled":e.disabled,"tk-input--group":s.value||c.value}]])},[s.value?(Y(),X(`div`,Dy,[Gh(t.$slots,`prepend`)])):$(`v-if`,!0),e.type===`textarea`?(Y(),X(`textarea`,{key:1,ref_key:`inputRef`,ref:o,class:`tk-input__inner tk-textarea__inner`,name:e.name,value:e.modelValue,placeholder:e.placeholder,rows:e.rows,disabled:e.disabled,readonly:e.readonly,maxlength:e.maxlength,onInput:f,onChange:p,onBlur:m,onFocus:h},null,40,Oy)):(Y(),X(`input`,{key:2,ref_key:`inputRef`,ref:o,class:`tk-input__inner`,type:e.type,name:e.name,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,maxlength:e.maxlength,min:e.min,max:e.max,onInput:f,onChange:p,onBlur:m,onFocus:h},null,40,ky)),l.value?(Y(),X(`span`,Ay,[e.clearable&&!e.disabled&&!e.readonly&&u.value?(Y(),X(`i`,{key:0,class:`tk-input__icon tk-input__clear`,onClick:g},[Q(ly,{name:`circle-xmark`})])):$(`v-if`,!0)])):$(`v-if`,!0),e.showWordLimit&&e.maxlength?(Y(),X(`span`,jy,K(d.value)+`/`+K(e.maxlength),1)):$(`v-if`,!0),c.value?(Y(),X(`div`,My,[Gh(t.$slots,`append`)])):$(`v-if`,!0)],2))}}),Py=new Map,Fy=`configUpdated`,Iy=`initMeta`,Ly=`showAdminEntry`;function Ry(e,t){let n=Py.get(e)??new Set;n.add(t),Py.set(e,n)}function zy(e,t){Py.get(e)?.delete(t)}function By(e,...t){for(let n of Py.get(e)??[])n(...t)}var Vy={class:`tk-meta-input`},Hy=hh({__name:`TkMetaInput`,props:{nick:{default:``},mail:{default:``},link:{default:``},config:{default:Cy}},emits:[`update`,`validate`],setup(e,{emit:t}){let n=/^[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])?)*$/,r=e,i=t,a=[{key:`nick`,locale:W(`META_INPUT_NICK`),name:`nick`,type:`text`},{key:`mail`,locale:W(`META_INPUT_MAIL`),name:`mail`,type:`email`},{key:`link`,locale:W(`META_INPUT_LINK`),name:`link`,type:`text`}],o=im({nick:``,mail:``,link:``}),s=tv(()=>r.config??{}),c=tv(()=>{let e=s.value.DISPLAYED_FIELDS,t=typeof e==`string`?e:void 0;return{nick:!t||t.indexOf(`nick`)!==-1,mail:!t||t.indexOf(`mail`)!==-1,link:!t||t.indexOf(`link`)!==-1}}),l=tv(()=>a.filter(e=>!!c.value[e.key])),u=tv(()=>{let e=s.value.REQUIRED_FIELDS,t=typeof e==`string`?e:void 0;return{nick:!t||t.indexOf(`nick`)!==-1,mail:!t||t.indexOf(`mail`)!==-1,link:t?t.indexOf(`link`)!==-1:!1}});function d(){let e=n.test(o.mail);return(!!o.nick||!u.value.nick)&&(e||!u.value.mail)&&(!!o.link||!u.value.link)}function f(){localStorage.setItem(`twikoo`,JSON.stringify(o)),i(`update`,{meta:{...o},valid:d()})}function p(e,t){let n=t.target.name;n&&(o[n]=e,i(`validate`,d()))}function m(){let e=localStorage.getItem(`twikoo`),t={};if(e)try{t=JSON.parse(e)}catch{t={}}o.nick=t.nick??r.nick??``,o.mail=t.mail??r.mail??``,o.link=t.link??r.link??``,f()}function h(){if(!bd(o.nick))return;let e=o.nick.replace(/@qq\.com/gi,``);o.mail=`${e}@qq.com`,_(e)}function g(){bd(o.nick)&&(o.nick=``,f())}async function _(e){try{let t=await Mo(null,`GET_QQ_NICK`,{qq:e}),n=t.result??t;n.nick?(o.nick=n.nick,f()):g()}catch(e){console.warn(`获取 QQ 昵称失败:`,e),g()}}function v(){let e=s.value.HIDE_ADMIN_CRYPT;By(Ly,!e||e===o.nick)}function y(){h(),f(),v()}function b(){r.nick!==void 0&&o.nick!==r.nick&&(o.nick=r.nick),r.mail!==void 0&&o.mail!==r.mail&&(o.mail=r.mail),r.link!==void 0&&o.link!==r.link&&(o.link=r.link)}return ah(()=>[r.nick,r.mail,r.link],b),ah(u,()=>{i(`validate`,d())}),ah(()=>s.value.VERSION,()=>{v()}),Ah(()=>{Ry(Iy,m),m()}),Ph(()=>{zy(Iy,m)}),(e,t)=>(Y(),X(`div`,Vy,[(Y(!0),X(c_,null,Wh(l.value,e=>(Y(),v_(Ny,{key:e.key,class:`tk-meta-input__item`,name:e.name,type:e.type,"model-value":o[e.key],placeholder:u.value[e.key]?J(W)(`META_INPUT_REQUIRED`):J(W)(`META_INPUT_NOT_REQUIRED`),size:`small`,onInput:p,onChange:y},{prepend:Qm(()=>[E_(K(e.locale),1)]),_:2},1032,[`name`,`type`,`model-value`,`placeholder`]))),128))]))}}),Uy=[`disabled`,`type`],Wy={class:`tk-button__label`},Gy=hh({__name:`TkButton`,props:{type:{default:`default`},size:{default:``},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},nativeType:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;function i(e){n.disabled||n.loading||r(`click`,e)}return(t,n)=>(Y(),X(`button`,{class:Nf([`tk-button`,[e.type==="default"?``:`tk-button--${e.type}`,e.size?`tk-button--${e.size}`:``,{"is-disabled":e.disabled,"is-loading":e.loading}]]),disabled:e.disabled||e.loading,type:e.nativeType,onClick:i},[e.loading?(Y(),v_(ly,{key:0,name:`spinner`,class:`tk-button__spinner`})):$(`v-if`,!0),Z(`span`,Wy,[Gh(t.$slots,`default`)])],10,Uy))}}),Ky={logo:`OwO表情`,position:`down`,maxHeight:`250px`,odata:{}},qy=class{container;target;odata;packagesEle;logo;area;packages;preview;constructor(e){for(let[t,n]of Object.entries(Ky))n&&!e[t]&&(e[t]=n);this.container=e.container,this.target=e.target,e.position===`up`&&this.container.classList.add(`OwO-up`),this.odata=e.odata,setTimeout(()=>{this.init(e)})}init(e){this.area=e.target,this.packages=Object.keys(this.odata),this.logo=document.createElement(`div`),this.logo.className=`OwO-logo`,this.logo.appendChild(bc.sanitize(e.logo??``,{RETURN_DOM_FRAGMENT:!0}));let t=document.createElement(`div`);t.className=`OwO-body`;let n=document.createElement(`div`);n.className=`OwO-bar`,this.packagesEle=document.createElement(`ul`),this.packagesEle.className=`OwO-packages`,n.appendChild(this.packagesEle),t.appendChild(n),this.container.replaceChildren(this.logo,t);let r=document.createElement(`template`);for(let i of this.packages){let a=this.odata[i],o=document.createElement(`ul`);o.className=`OwO-items OwO-items-${a?.type??``}`,o.style.maxHeight=`${parseInt(e.maxHeight??`250`,10)-53}px`;for(let e of a?.container??[]){let t=document.createElement(`li`);t.className=`OwO-item`,t.title=e.text??``,r.innerHTML=bc.sanitize(e.icon);let n=r.content.querySelector(`img`);if(n){let r=document.createElement(`img`);n.src&&bc.isValidAttribute(`img`,`src`,n.src)&&(r.src=n.src),r.className=n.className,r.classList.add(`tk-owo-emotion`),r.alt=e.text?`:${e.text}:`:``,r.loading=`lazy`,t.appendChild(r)}else t.textContent=e.icon;o.appendChild(t)}t.insertBefore(o,n);let s=document.createElement(`li`),c=document.createElement(`span`);c.textContent=i,s.appendChild(c),this.packagesEle.appendChild(s)}this.preview=document.createElement(`div`),this.preview.className=`tk-owo-preview-panel`,this.preview.hidden=!0,this.preview.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`img`);i.alt=``,this.preview.appendChild(i),t.appendChild(this.preview),t.addEventListener(`pointerover`,e=>{if(e.pointerType===`touch`||!(e.target instanceof Element))return;let t=e.target.closest(`.OwO-item`)?.querySelector(`img.tk-owo-preview`);t?.getAttribute(`src`)?(i.src=t.src,i.className=t.className,i.classList.add(`tk-owo-emotion`),this.preview.hidden=!1):this.preview.hidden=!0}),t.addEventListener(`pointerout`,e=>{let t=e.target instanceof Element?e.target.closest(`.OwO-item`):null;(!t||!(e.relatedTarget instanceof Node)||!t.contains(e.relatedTarget))&&(this.preview.hidden=!0)}),t.addEventListener(`scroll`,()=>{this.preview.hidden=!0},!0),this.logo.addEventListener(`click`,()=>{this.toggle()}),t.addEventListener(`click`,e=>this.onItemClick(e));for(let e=0;e<this.packagesEle.children.length;e++)this.packagesEle.children[e].addEventListener(`click`,()=>{this.tab(e)});this.tab(0)}onItemClick(e){let t=e.target;if(!t)return;let n=null;if(t.classList.contains(`OwO-item`)?n=t:t.parentNode instanceof HTMLElement&&t.parentNode.classList.contains(`OwO-item`)&&(n=t.parentNode),!n)return;let r=this.area.selectionEnd??this.area.value.length,i=this.area.value,a=n.textContent??``,o=n.querySelector(`img`);if(o){if(n.title)a=`:${n.title}: `;else{let e=o.getAttribute(`src`);a=e?`![](<${e.replace(/</g,`%3C`).replace(/>/g,`%3E`)}>)`:``}}this.area.value=i.slice(0,r)+a+i.slice(r),this.area.dispatchEvent(new Event(`input`,{bubbles:!0})),this.area.focus(),this.toggle()}toggle(){this.preview.hidden=!0,this.container.classList.toggle(`OwO-open`)}tab(e){this.preview.hidden=!0;let t=this.container.getElementsByClassName(`OwO-items-show`)[0];t&&t.classList.remove(`OwO-items-show`),this.container.getElementsByClassName(`OwO-items`)[e]?.classList.add(`OwO-items-show`);let n=this.container.getElementsByClassName(`OwO-package-active`)[0];n&&n.classList.remove(`OwO-package-active`),this.packagesEle.getElementsByTagName(`li`)[e]?.classList.add(`OwO-package-active`)}},Jy={class:`tk-row`},Yy={class:`tk-col`},Xy={class:`tk-row actions`},Zy={class:`tk-row-actions-start`},Qy=[`innerHTML`],$y={class:`tk-submit-action-icon __markdown`,alt:`Markdown is supported`,href:`https://guides.github.com/features/mastering-markdown/`,target:`_blank`,rel:`noopener noreferrer`},eb={key:0,ref:`commentPreviewRef`,class:`tk-preview-container`},tb=[`innerHTML`],nb=hh({__name:`TkSubmit`,props:{replyId:{default:``},pid:{default:``},config:{default:Cy}},emits:[`load`,`cancel`,`error`],setup(e,{emit:t}){let n=[`apng`,`bmp`,`gif`,`jpeg`,`jpg`,`png`,`svg`,`tif`,`tiff`,`webp`],r=sy[`laugh-regular`],i=e,a=t,o=q(!1),s=q(!1),c=q(!1),l=q();ah(l,e=>{e&&a(`error`,e)});let u=q(null),d=q(``),f=q(``),p=q(``),m=q(``),h=q(``),g=q(null),_=q(null),v=q(null),y=q(),b=q(),x=q(),S=q(),C=q(),w=q(),T=q(),E=q(),D=q(),ee=tv(()=>{let e=i.config;return e.CAPTCHA_PROVIDER===void 0?e.TURNSTILE_SITE_KEY?`Turnstile`:e.GEETEST_CAPTCHA_ID?`Geetest`:e.CAP_API_ENDPOINT||e.CAP_BUILTIN?`Cap`:``:e.CAPTCHA_PROVIDER}),te=tv(()=>!!i.config.IMAGE_CDN),O=tv(()=>!o.value&&c.value&&!!d.value.trim()),k=tv(()=>{let e=ko().options.placeholder??i.config.COMMENT_PLACEHOLDER;return(typeof e==`string`?e:``).replace(/<br>/g,`
241
- `)}),A=tv(()=>{let e=parseInt(String(i.config.LIMIT_LENGTH),10);return Number.isNaN(e)&&(e=500),e>0?e:void 0}),ne=tv(()=>{let e=b.value?.inputEl;return e instanceof HTMLTextAreaElement?e:null});function re(){localStorage.setItem(`twikoo-draft`,d.value)}function ie(){let e=localStorage.getItem(`twikoo-draft`);!d.value&&e&&(d.value=e)}async function ae(){if(i.config.SHOW_EMOTION!==`true`)return;let e=await od(String(i.config.EMOTION_CDN||`https://owo.imaegoo.com/owo.json`));sd(e),x.value&&ne.value&&(u.value=new qy({logo:r,container:x.value,target:ne.value,odata:e,position:`down`,maxHeight:`250px`}))}function oe(){u.value?.container.classList.contains(`OwO-open`)&&u.value.toggle()}function se(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=e,r.onload=()=>t(),r.onerror=()=>n(Error(`脚本加载失败:${e}`)),document.head.appendChild(r)})}function ce(e,t){return{ok:e,json:()=>Promise.resolve(t)}}function le(){if(ee.value===`Turnstile`&&i.config.TURNSTILE_SITE_KEY){if(window.turnstile){g.value=Promise.resolve();return}g.value||=se(`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`)}}function ue(){return new Promise((e,t)=>{g.value?.then(()=>{let n=window.turnstile,r=n.render(w.value,{sitekey:i.config.TURNSTILE_SITE_KEY,callback:t=>{e(t),setTimeout(()=>n.remove(r),1e3)},"error-callback":()=>t(Error(`验证码校验失败,请重试`)),"expired-callback":()=>t(Error(`验证码已过期,请重试`)),"timeout-callback":()=>t(Error(`验证码超时,请重试`))})})})}function de(){if(ee.value===`Geetest`&&i.config.GEETEST_CAPTCHA_ID){if(window.initGeetest4){_.value=Promise.resolve();return}_.value||=se(`https://static.geetest.com/v4/gt4.js`)}}function fe(){return new Promise((e,t)=>{_.value?.then(()=>{let n=window.initGeetest4;n({captchaId:i.config.GEETEST_CAPTCHA_ID,product:`bind`,language:`zho`},n=>{n.onReady(()=>n.showCaptcha()).onSuccess(()=>{let t=n.getValidate();e({geeTestLotNumber:t.lot_number,geeTestCaptchaOutput:t.captcha_output,geeTestPassToken:t.pass_token,geeTestGenTime:t.gen_time})}).onError(e=>t(e instanceof Error?e:Error(`Geetest 验证失败,请重试`))).onClose(()=>t(Error(`验证已取消`)))})})})}function pe(){if(ee.value!==`Cap`||!i.config.CAP_API_ENDPOINT&&!i.config.CAP_BUILTIN)return;let e=window;if(i.config.CAP_BUILTIN&&(e.CAP_CUSTOM_FETCH=async(e,t={})=>{let n=String(e),r=t.body?JSON.parse(t.body):{};try{if(n.includes(`challenge`)){let e=await Mo(ko().tcb,`CAP_CHALLENGE`),t=e.result??e;return t.code&&t.code!==0?ce(!1,{error:t.message??`challenge_failed`}):ce(!0,{challenge:t.challenge,token:t.token,expires:t.expires})}if(n.includes(`redeem`)){let e=await Mo(ko().tcb,`CAP_REDEEM`,r),t=e.result??e;return t.code&&t.code!==0&&t.success!==!0?ce(!0,{success:!1,error:t.message??t.error??`redeem_failed`}):ce(!0,{success:t.success,token:t.token,expires:t.expires,message:t.message,error:t.error??t.message})}return ce(!1,{error:`unknown_cap_path`})}catch(e){return ce(!1,{error:e instanceof Error?e.message:`cap_fetch_failed`})}}),e.Cap||customElements.get(`cap-widget`)){v.value=Promise.resolve();return}v.value||=se(`https://cdn.jsdmirror.com/npm/@cap.js/widget`)}function me(){return new Promise((e,t)=>{v.value?.then(()=>{let n=document.createElement(`cap-widget`);n.setAttribute(`id`,`cap-widget`);let r=i.config.CAP_BUILTIN?`/`:String(i.config.CAP_API_ENDPOINT);n.setAttribute(`data-cap-api-endpoint`,r),D.value?.appendChild(n);let a=()=>{n.parentNode?.removeChild(n)};n.solve().then(n=>{a(),n.success?e(typeof n.token==`string`?n.token:``):t(Error(`Cap 验证失败`))}).catch(e=>{a(),t(e instanceof Error?e:Error(`Cap 验证失败`))})}).catch(t)})}function he(e){p.value=e.meta.nick,m.value=e.meta.mail,h.value=e.meta.link,c.value=e.valid}function ge(){a(`cancel`)}function _e(){re(),j()}function ve(){s.value=!s.value,j()}function j(){s.value&&(f.value=xc(ed(d.value)),Bm(()=>{let e=C.value;e&&(Ld(e),Rd(e,ko().options.katex),i.config.HIGHLIGHT===`true`&&Ic(e,i.config.HIGHLIGHT_THEME,i.config.HIGHLIGHT_PLUGIN))}))}async function ye(){o.value=!0,l.value=void 0;try{if(d.value.match(RegExp(`!\\[${W(`IMAGE_UPLOAD_PLACEHOLDER`)}.+\\]\\(\\)`)))throw Error(W(`IMAGE_UPLOAD_PLEASE_WAIT`));let e={nick:p.value,mail:m.value,link:h.value,ua:await Id(),url:Ed(ko().options.path),href:Dd(ko().options.href),comment:ed(d.value),pid:i.pid?i.pid:i.replyId,rid:i.replyId};ee.value===`Turnstile`&&i.config.TURNSTILE_SITE_KEY&&(e.turnstileToken=await ue()),ee.value===`Geetest`&&i.config.GEETEST_CAPTCHA_ID&&Object.assign(e,await fe()),ee.value===`Cap`&&(i.config.CAP_API_ENDPOINT||i.config.CAP_BUILTIN)&&(e.capToken=await me());let t=ko().options.onSubmit;typeof t==`function`&&await t(e);let n=await Mo(ko().tcb,`COMMENT_SUBMIT`,e),r=n.result??n;if(r.id)d.value=``,s.value=!1,f.value=``,l.value=void 0,a(`load`),re();else throw new Eo(r.code===void 0?`UNKNOWN`:`REJECTED`,r.message??W(`COMMENT_FAILED`),{rawMessage:r.message??``})}catch(e){Po.error(`评论失败`,e),l.value=e instanceof Eo?e:new Eo(`UNKNOWN`,`${W(`COMMENT_FAILED`)}: ${e.message}`,{rawMessage:e.message})}finally{o.value=!1}}function be(e){(e.ctrlKey||e.metaKey)&&e.key===`Enter`&&ye()}function xe(){S.value?.click()}function Se(){let e=S.value?.files?.[0];we(e)}function Ce(e){e.clipboardData&&we(e.clipboardData.files[0]??e.clipboardData.items[0]?.getAsFile()??void 0)}async function we(e){if(!e||!te.value)return;let t=e.name.split(`.`),r=t.length>1?String(t.pop()):``;if(n.indexOf(r.toLowerCase())===-1)return;let{tcb:a}=ko(),o=a?.auth?.currentUser?.uid??localStorage.getItem(`twikoo-access-token`)??``,s=`${Date.now()}-${o}`,c=t.join(`.`),l=e.type===`image/gif`,u=l?c:`${c}.webp`,d=l?r:`webp`;De(Oe(s,d));let f=String(i.config.IMAGE_CDN??``),p=await Te(e);a&&(!f||f===`qcloud`)?M(s,u,d,p):f?Ee(s,u,d,p):P(s,d,W(`IMAGE_UPLOAD_FAILED_NO_CONF`))}async function Te(e){return e.type===`image/gif`?e:new Promise(t=>{let n=new FileReader;n.onload=n=>{let r=new Image;r.onload=()=>{let n=document.createElement(`canvas`),i=r.width,a=r.height,o=1920;(i>o||a>o)&&(i>a?(a=a*o/i,i=o):(i=i*o/a,a=o)),n.width=i,n.height=a,n.getContext(`2d`)?.drawImage(r,0,0,i,a);let s=`image/webp`,c=e.name.replace(/\.[^.]+$/,`.webp`);n.toBlob(e=>t(new File([e??new Blob],c,{type:s})),s,.85)};let i=n.target?.result;r.src=typeof i==`string`?i:``},n.readAsDataURL(e)})}async function M(e,t,n,r){try{let i=ko().tcb?.app,a=await i.uploadFile({cloudPath:`tk-img/${e}.${n}`,filePath:r});if(!a.fileID)return;N(e,t,n,(await i.getTempFileURL({fileList:[a.fileID]})).fileList[0].tempFileURL)}catch(t){console.error(t),P(e,n,t.message)}}async function Ee(e,t,n,r){try{let i=await Mo(ko().tcb,`UPLOAD_IMAGE`,{fileName:t,photo:await Fd(r)}),a=i.result??i;a.data?N(e,t,n,String(a.data.url)):a.code===1041?P(e,n,W(`IMAGE_UPLOAD_NSFW`)):(console.error(a),P(e,n,String(a.err)))}catch(t){console.error(t),P(e,n,t.message)}}function N(e,t,n,r){let i=t.replace(/[[\]]/g,`_`);d.value=d.value.replace(Oe(e,n),`![${i}](${r})`),S.value&&(S.value.value=``)}function P(e,t,n){d.value=d.value.replace(Oe(e,t),`_${W(`IMAGE_UPLOAD_FAILED`)}: ${n}_`),S.value&&(S.value.value=``)}function De(e){let t=ne.value,n=t?.selectionStart??d.value.length,r=t?.selectionEnd??d.value.length;d.value=d.value.substring(0,n)+e+d.value.substring(r),Bm(()=>{if(!t)return;let r=n+e.length;t.selectionStart=r,t.selectionEnd=r})}function Oe(e,t){return`![${W(`IMAGE_UPLOAD_PLACEHOLDER`)} ${e}.${t}]()`}function ke(){i.config.COMMENT_BG_IMG&&ne.value&&(ne.value.style[`background-image`]=`url("${String(i.config.COMMENT_BG_IMG)}")`)}function Ae(){le(),de(),pe()}return ah(()=>i.config.SHOW_EMOTION,()=>{ae()}),ah(()=>i.config.COMMENT_BG_IMG,()=>{ke()}),ah(()=>i.config.TURNSTILE_SITE_KEY,()=>{le()}),ah(()=>i.config.GEETEST_CAPTCHA_ID,()=>{de()}),ah(()=>i.config.CAP_API_ENDPOINT,()=>{pe()}),ah(ee,()=>{Ae()}),Ah(()=>{i.pid&&y.value?.scrollIntoView({behavior:`instant`,block:`center`}),ie(),ne.value?.addEventListener(`paste`,Ce),ke(),Ae(),ae()}),Ph(()=>{ne.value?.removeEventListener(`paste`,Ce)}),(t,n)=>(Y(),X(`div`,{ref_key:`tkSubmitRef`,ref:y,class:`tk-submit tk-fade-in`},[Z(`div`,Jy,[Q(Ey,{config:e.config,mail:m.value,nick:p.value},null,8,[`config`,`mail`,`nick`]),Z(`div`,Yy,[Q(Hy,{nick:p.value,mail:m.value,link:h.value,config:e.config,onUpdate:he,onValidate:n[0]||=e=>c.value=e},null,8,[`nick`,`mail`,`link`,`config`]),Q(Ny,{ref_key:`textareaRef`,ref:b,modelValue:d.value,"onUpdate:modelValue":n[1]||=e=>d.value=e,class:`tk-input`,type:`textarea`,placeholder:k.value,autosize:{minRows:3},maxlength:A.value,"show-word-limit":``,onInput:_e,onKeyup:be},null,8,[`modelValue`,`placeholder`,`maxlength`])])]),Z(`div`,Xy,[Z(`div`,Zy,[$(` 表情按钮:首屏先渲染图标,随后由 OwO 面板以同样的 logo 接管容器内容 `),$(` 图标为构建期内联的 fontawesome 官方 SVG,非运行时用户数据 `),$(` eslint-disable vue/no-v-html `),$m(Z(`div`,{ref_key:`owoRef`,ref:x,class:`tk-submit-action-icon OwO`,innerHTML:J(r)},null,8,Qy),[[hv,e.config.SHOW_EMOTION===`true`],[J(gd),oe]]),$(` eslint-enable vue/no-v-html `),$m(Z(`div`,{class:`tk-submit-action-icon`,onClick:xe},[Q(ly,{name:`image-regular`})],512),[[hv,te.value]]),Z(`input`,{ref_key:`inputFileRef`,ref:S,class:`tk-input-image`,type:`file`,accept:`image/*`,value:``,onChange:Se},null,544)]),Z(`a`,$y,[Q(ly,{name:`markdown`})]),e.replyId?(Y(),v_(Gy,{key:0,class:`tk-cancel`,size:`small`,onClick:ge},{default:Qm(()=>[E_(K(J(W)(`SUBMIT_CANCEL`)),1)]),_:1})):$(`v-if`,!0),Q(Gy,{class:`tk-preview`,size:`small`,onClick:ve},{default:Qm(()=>[E_(K(J(W)(`SUBMIT_PREVIEW`)),1)]),_:1}),Q(Gy,{class:`tk-send`,type:`primary`,size:`small`,disabled:!O.value,onClick:ye},{default:Qm(()=>[E_(K(o.value?J(W)(`SUBMIT_SENDING`):J(W)(`SUBMIT_SEND`)),1)]),_:1},8,[`disabled`]),$m(Z(`div`,{ref_key:`turnstileContainerRef`,ref:T,class:`tk-turnstile-container`},[Z(`div`,{ref_key:`turnstileRef`,ref:w,class:`tk-turnstile`},null,512)],512),[[hv,ee.value===`Turnstile`]]),$m(Z(`div`,{ref_key:`geetestContainerRef`,ref:E,class:`tk-geetest-container`},null,512),[[hv,ee.value===`Geetest`]]),$m(Z(`div`,{ref_key:`capContainerRef`,ref:D,class:`tk-cap-container`},null,512),[[hv,ee.value===`Cap`]])]),s.value?(Y(),X(`div`,eb,[$(` 预览内容经 sanitizeHtml 消毒 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`div`,{innerHTML:f.value},null,8,tb)],512)):$(`v-if`,!0)],512))}}),rb=im({serverConfig:{}});function ib(e){rb.serverConfig=e}function ab(){return rb.serverConfig}var ob=[`id`],sb={class:`tk-main`},cb={class:`tk-row`},lb={class:`tk-meta`},ub={key:0,class:`tk-nick`},db=[`href`],fb={key:2,class:`tk-tag tk-tag-green`},pb={key:3,class:`tk-tag tk-tag-red`},mb={key:4,class:`tk-tag tk-tag-yellow`},hb={class:`tk-time`},gb=[`datetime`,`title`],_b={key:5,class:`tk-actions`},vb={key:0},yb=[`innerHTML`],bb={key:0,class:`tk-expand-wrap`},xb={key:1,class:`tk-collapse-wrap`},Sb={key:2,class:`tk-extras`},Cb={key:0,class:`tk-extra`},wb={class:`tk-icon __comment`},Tb={class:`tk-extra-text`},Eb={key:1,class:`tk-extra`},Db={class:`tk-icon __comment`},Ob={class:`tk-extra-text`},kb={key:2,class:`tk-extra`},Ab={class:`tk-icon __comment`},jb={class:`tk-extra-text`},Mb={key:4,class:`tk-expand-wrap`},Nb={key:5,class:`tk-collapse-wrap`},Pb=hh({__name:`TkComment`,props:{comment:{},replyId:{default:``},replying:{type:Boolean,default:!1},config:{default:Cy}},emits:[`reply`,`load`,`expand`,`refreshed`,`error`],setup(e,{emit:t}){let n=e,r=t,i={win:`windows`,mac:`apple`,ipad:`apple`,iphone:`apple`,ios:`apple`,android:`android`,ubuntu:`ubuntu`,linux:`linux`},a={edge:`edge`,chrome:`chrome`,firefox:`firefox-browser`,safari:`safari`,explorer:`internet-explorer`,ie:`internet-explorer`},o=q(``),s=q(n.comment.ups??0),c=q(n.comment.downs??0),l=q(n.comment.liked===!0),u=q(n.comment.disliked===!0),d=q(!1),f=q(!1),p=q(!1),m=q(!1),h=q(!1),g=q(!1),_=tv(()=>{let{tcb:e}=ko();return e?.auth?g.value:ab().IS_ADMIN===!0}),v=q(n.comment.isSpam===!0),y=q(n.comment.top===!0),b=q(!1),x=q(),S=q(),C=q(),w=q(),T=tv(()=>xc(n.comment.comment)),E=tv(()=>Sd(n.comment.created)),D=tv(()=>new Date(n.comment.created??0).toJSON()),ee=tv(()=>new Date(n.comment.created??0).toLocaleString()),te=tv(()=>ae(n.comment.os??``,i)),O=tv(()=>ae(n.comment.browser??``,a)),k=tv(()=>p.value&&!f.value),A=tv(()=>p.value&&f.value),ne=tv(()=>h.value&&!m.value),re=tv(()=>h.value&&m.value),ie=tv(()=>xd(n.comment.link));function ae(e,t){let n=e.toLowerCase();for(let e of Object.keys(t))if(n.indexOf(e)!==-1)return t[e];return`window-maximize-regular`}function oe(){let e=w.value;n.comment.replies.length>0&&e&&(p.value=e.scrollHeight>236)}function se(){let e=S.value;e&&(h.value=h.value||e.scrollHeight>500)}function ce(){S.value?.querySelectorAll(`img`).forEach(e=>{e.onload=se})}function le(){window.location.hash.indexOf(n.comment.id)!==-1&&(x.value?.scrollIntoView({behavior:`smooth`}),r(`expand`))}function ue(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`center`})}async function de(){if(!d.value){d.value=!0;try{await Mo(ko().tcb,`COMMENT_LIKE`,{id:n.comment.id,type:`up`}),l.value?s.value--:(s.value++,u.value&&c.value--),l.value=!l.value,u.value=!1}finally{d.value=!1}}}async function fe(){if(!d.value){d.value=!0;try{await Mo(ko().tcb,`COMMENT_LIKE`,{id:n.comment.id,type:`down`}),u.value?c.value--:(c.value++,l.value&&s.value--),u.value=!u.value,l.value=!1}finally{d.value=!1}}}function pe(e){o.value=e,r(`reply`,n.comment.id)}async function me(){if(!confirm(W(`COMMENT_DELETE_CONFIRM`)))return;let e=await Mo(ko().tcb,`COMMENT_DELETE_FOR_USER`,{id:n.comment.id}),t=e.result??e;t.code?alert(t.message):r(`load`)}function he(e){o.value=e,r(`reply`,e?n.comment.id:``)}function ge(){o.value=``,r(`reply`,``)}function _e(){o.value=``,r(`reply`,``),r(`load`),f.value=!0}function ve(){r(`refreshed`),Bm(()=>{let e=w.value?.lastElementChild;n.comment.replies.length>0&&e&&e.scrollIntoView({behavior:`smooth`,block:`center`})})}async function j(){let{tcb:e}=ko();if(e?.auth){let t=await e.auth.getCurrentUser();g.value=t.loginType===`CUSTOM`}}function ye(e){Se({isSpam:e})}function be(e){Se({top:e})}function xe(e){if(ab().LIGHTBOX!==`true`)return;let t=e.target;if(t.tagName!==`IMG`||t.classList.contains(`tk-owo-emotion`))return;let n=document.createElement(`div`);n.className=`tk-lightbox`;let r=document.createElement(`img`);r.className=`tk-lightbox-image`,r.src=t.src,n.appendChild(r),n.addEventListener(`click`,()=>{document.body.removeChild(n)}),document.body.appendChild(n)}async function Se(e){b.value=!0;try{await Mo(ko().tcb,`COMMENT_SET_FOR_ADMIN`,{id:n.comment.id,set:e}),e.isSpam!==void 0&&(v.value=e.isSpam),e.top!==void 0&&(y.value=e.top)}finally{b.value=!1}}function Ce(){let e=C.value;e&&(Ld(e),Rd(e,ko().options.katex),n.config.HIGHLIGHT===`true`&&Ic(e,n.config.HIGHLIGHT_THEME,n.config.HIGHLIGHT_PLUGIN))}return ah(()=>n.comment.isSpam,e=>{v.value=e===!0}),ah(()=>n.comment.top,e=>{y.value=e===!0}),ah(()=>n.comment.ups,()=>{s.value=n.comment.ups??0,l.value=n.comment.liked===!0},{immediate:!0}),ah(()=>n.comment.downs,()=>{c.value=n.comment.downs??0,u.value=n.comment.disliked===!0},{immediate:!0}),ah(()=>n.config.HIGHLIGHT,e=>{e===`true`&&Bm(Ce)},{immediate:!0}),Ah(()=>{Bm(se),Bm(ce),Bm(oe),Bm(le),Bm(Ce),j()}),(t,n)=>{let i=Bh(`TkComment`,!0);return Y(),X(`div`,{id:e.comment.id,ref_key:`tkCommentRef`,ref:x,class:Nf([`tk-comment`,{"tk-master":e.comment.master}])},[Q(Ey,{config:e.config,nick:e.comment.nick,avatar:e.comment.avatar,"mail-md5":e.comment.mailMd5,link:ie.value},null,8,[`config`,`nick`,`avatar`,`mail-md5`,`link`]),Z(`div`,sb,[Z(`div`,cb,[Z(`div`,lb,[ie.value?$(`v-if`,!0):(Y(),X(`strong`,ub,K(e.comment.nick),1)),ie.value?(Y(),X(`a`,{key:1,class:`tk-nick tk-nick-link`,href:ie.value,target:`_blank`,rel:`noopener noreferrer nofollow ugc`},[Z(`strong`,null,K(e.comment.nick),1)],8,db)):$(`v-if`,!0),e.comment.master?(Y(),X(`span`,fb,K(e.config.MASTER_TAG||J(W)(`COMMENT_MASTER_TAG`)),1)):$(`v-if`,!0),y.value?(Y(),X(`span`,pb,K(J(W)(`COMMENT_TOP_TAG`)),1)):$(`v-if`,!0),v.value?(Y(),X(`span`,mb,K(J(W)(`COMMENT_REVIEWING_TAG`)),1)):$(`v-if`,!0),Z(`small`,hb,[Z(`time`,{datetime:D.value,title:ee.value},K(E.value),9,gb)]),_.value?(Y(),X(`small`,_b,[v.value?(Y(),X(`button`,{key:0,onClick:n[0]||=e=>ye(!1)},K(J(W)(`ADMIN_COMMENT_SHOW`)),1)):$(`v-if`,!0),v.value?$(`v-if`,!0):(Y(),X(`button`,{key:1,onClick:n[1]||=e=>ye(!0)},K(J(W)(`ADMIN_COMMENT_HIDE`)),1)),!e.comment.rid&&y.value?(Y(),X(`button`,{key:2,onClick:n[2]||=e=>be(!1)},K(J(W)(`ADMIN_COMMENT_UNTOP`)),1)):$(`v-if`,!0),!e.comment.rid&&!y.value?(Y(),X(`button`,{key:3,onClick:n[3]||=e=>be(!0)},K(J(W)(`ADMIN_COMMENT_TOP`)),1)):$(`v-if`,!0)])):$(`v-if`,!0)]),Q(Sy,{liked:l.value,disliked:u.value,"like-count":s.value,"dislike-count":c.value,"replies-count":e.comment.replies.length,"show-dislike":e.config.SHOW_DISLIKE!==`false`,"show-delete":e.comment.isOwner===!0,onLike:de,onDislike:fe,onReply:pe,onDelete:me},null,8,[`liked`,`disliked`,`like-count`,`dislike-count`,`replies-count`,`show-dislike`,`show-delete`])]),Z(`div`,{ref_key:`tkContentRef`,ref:S,class:Nf([`tk-content`,{"tk-content-expand":m.value}])},[e.comment.pid?(Y(),X(`span`,vb,[E_(K(J(W)(`COMMENT_REPLIED`))+` `,1),Z(`a`,{class:`tk-ruser`,href:`#`,onClick:n[4]||=Qv(t=>ue(e.comment.pid),[`prevent`])},K(`@${e.comment.ruser}`),1),n[12]||=E_(` : `,-1)])):$(`v-if`,!0),$(` 正文:服务端已 DOMPurify 消毒,客户端再走一次 sanitizeHtml 双保险 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`span`,{ref_key:`commentRef`,ref:C,onClick:xe,innerHTML:T.value},null,8,yb)],2),ne.value?(Y(),X(`div`,bb,[Z(`div`,{class:`tk-expand`,onClick:n[5]||=e=>m.value=!0},K(J(W)(`COMMENT_EXPAND`)),1)])):$(`v-if`,!0),re.value?(Y(),X(`div`,xb,[Z(`div`,{class:`tk-expand _collapse`,onClick:n[6]||=e=>m.value=!1},K(J(W)(`COMMENT_COLLAPSE`)),1)])):$(`v-if`,!0),e.comment.ipRegion||e.comment.os||e.comment.browser?(Y(),X(`div`,Sb,[e.comment.ipRegion?(Y(),X(`div`,Cb,[Z(`span`,wb,[Q(ly,{name:`location-arrow`})]),Z(`span`,Tb,`\xA0`+K(e.comment.ipRegion),1)])):$(`v-if`,!0),e.comment.os?(Y(),X(`div`,Eb,[Z(`span`,Db,[Q(ly,{name:te.value},null,8,[`name`])]),Z(`span`,Ob,`\xA0`+K(e.comment.os),1)])):$(`v-if`,!0),e.comment.browser?(Y(),X(`div`,kb,[Z(`span`,Ab,[Q(ly,{name:O.value},null,8,[`name`])]),Z(`span`,jb,`\xA0`+K(e.comment.browser),1)])):$(`v-if`,!0)])):$(`v-if`,!0),$(` 回复框(主楼被回复时挂载;楼中楼由子评论自身挂载) `),e.replying&&!o.value?(Y(),v_(nb,{key:3,"reply-id":e.replyId?e.replyId:e.comment.id,pid:e.comment.id,config:e.config,onLoad:_e,onCancel:ge,onError:n[7]||=e=>r(`error`,e)},null,8,[`reply-id`,`pid`,`config`])):$(`v-if`,!0),$(` 回复列表 `),Z(`div`,{ref_key:`tkRepliesRef`,ref:w,class:Nf([`tk-replies`,{"tk-replies-expand":f.value||!k.value||e.replying}])},[(Y(!0),X(c_,null,Wh(e.comment.replies,t=>(Y(),v_(i,{key:t.id,comment:t,"reply-id":e.comment.id,replying:e.replying&&o.value===t.id,config:e.config,onExpand:n[8]||=e=>f.value=!0,onLoad:_e,onReply:he,onRefreshed:ve,onError:n[9]||=e=>r(`error`,e)},null,8,[`comment`,`reply-id`,`replying`,`config`]))),128))],2),k.value&&!e.replying?(Y(),X(`div`,Mb,[Z(`div`,{class:`tk-expand`,onClick:n[10]||=e=>f.value=!0},K(J(W)(`COMMENT_EXPAND`)),1)])):$(`v-if`,!0),A.value&&!e.replying?(Y(),X(`div`,Nb,[Z(`div`,{class:`tk-expand _collapse`,onClick:n[11]||=e=>f.value=!1},K(J(W)(`COMMENT_COLLAPSE`)),1)])):$(`v-if`,!0)])],10,ob)}}}),Fb={class:`tk-error`},Ib={class:`tk-error__icon`},Lb={class:`tk-error__body`},Rb={class:`tk-error__title`},zb={class:`tk-error__message`},Bb={class:`tk-error__detail`},Vb={key:0,class:`tk-error__row`},Hb={key:1,class:`tk-error__row`},Ub={key:2,class:`tk-error__raw`},Wb=hh({__name:`TkError`,props:{error:{}},setup(e){let t=e,n=q(!1),r={NETWORK:`无法连接到后端`,CORS:`请求被跨域策略拦截`,TIMEOUT:`请求超时`,REJECTED:`请求过于频繁`,NOT_FOUND:`接口地址不存在`,CLIENT_ERROR:`请求失败`,SERVER_ERROR:`后端异常`,UNKNOWN:`出现未知错误`},i=tv(()=>r[t.error.kind]??`出现错误`),a=tv(()=>{let e=t.error.rawMessage||t.error.message;return e.length>120?`${e.slice(0,120)}...`:e}),o=tv(()=>t.error.rawMessage||``),s=tv(()=>t.error.httpStatus),c=tv(()=>t.error.requestId);return(e,t)=>(Y(),X(`div`,Fb,[Z(`div`,Ib,[Q(ly,{name:`circle-exclamation`})]),Z(`div`,Lb,[Z(`div`,Rb,K(i.value),1),Z(`div`,zb,K(a.value),1),Z(`button`,{class:`tk-error__toggle`,type:`button`,onClick:t[0]||=e=>n.value=!n.value},K(n.value?`收起详情`:`展开详情`),1),$m(Z(`div`,Bb,[s.value?(Y(),X(`div`,Vb,`HTTP: `+K(s.value),1)):$(`v-if`,!0),c.value?(Y(),X(`div`,Hb,`Request ID: `+K(c.value),1)):$(`v-if`,!0),o.value?(Y(),X(`pre`,Ub,K(o.value),1)):$(`v-if`,!0)],512),[[hv,n.value]])])]))}}),Gb={class:`tk-comments`},Kb={class:`tk-comments-container`},qb={class:`tk-comments-title`},Jb={key:0},Yb={class:`tk-comments-actions`},Xb={key:0,class:`tk-comments-sort`},Zb={class:`tk-comments-search`},Qb={key:1,class:`tk-comments-no`},$b={key:0},ex={key:1},tx={key:2,class:`tk-expand-wrap`},nx=hh({__name:`TkComments`,props:{showAdminEntry:{type:Boolean,default:!1}},emits:[`admin`,`refreshed`],setup(e,{emit:t}){let n=t,r=q(!0),i=q(!1),a=q(null),o=q({}),s=q([]),c=q(!0),l=q(0),u=q(``),d=q(1),f=q(`newest`),p=q(``),m=q(``),h=q(!1),g=q(0),_=q();async function v(){try{let e=await Mo(ko().tcb,`GET_CONFIG`),t=e.result??e;t.config&&(o.value=t.config,ib(t.config))}catch(e){Po.warn(`加载公开配置失败`,e)}}async function y(){let e=++g.value;r.value=!0,a.value=null;let t={url:Ed(ko().options.path),sort:f.value,keyword:m.value};m.value&&(t.page=1),await k(t),e===g.value&&(r.value=!1)}function b(){s.value=[],d.value=1}function x(){let e=p.value.trim();p.value=e,m.value!==e&&(m.value=e,b(),y())}function S(){m.value&&(m.value=``,b(),y())}function C(){h.value=!h.value,h.value?setTimeout(()=>_.value?.focus(),0):(p.value=``,S())}function w(){b(),y()}async function T(){let e=++g.value;r.value=!0,a.value=null;try{let e=Ed(ko().options.path),t=d.value,n={url:e,sort:f.value,keyword:m.value};if(m.value&&(n.page=1),!await k(n))return;for(let n=2;n<=t&&await te(e,n);n++);}finally{e===g.value&&(r.value=!1)}e===g.value&&n(`refreshed`)}function E(e){f.value!==e&&(f.value=e,b(),y())}async function D(){if(!i.value){i.value=!0,d.value++;try{await te(Ed(ko().options.path),d.value)}finally{i.value=!1}}}function ee(){let e=1/0;for(let t of s.value)!t.top&&(t.created??1/0)<e&&(e=t.created??1/0);return e===1/0?void 0:e}async function te(e,t=d.value){if(m.value)return k({url:e,page:t,sort:f.value,keyword:m.value});let n=ee();return n!==void 0&&k({url:e,before:n,sort:f.value,keyword:m.value})}function O(){let e=ko().options.onCommentLoaded;typeof e==`function`&&e()}async function k(e){let t=g.value;try{let n=await Mo(ko().tcb,`COMMENT_GET`,e);if(t!==g.value)return!1;let r=n.result??n;if(r?.message)return a.value=new Eo(`CLIENT_ERROR`,r.message,{rawMessage:r.message}),!1;if(r?.data)return s.value=e.before||typeof e.page==`number`&&e.page>1?s.value.concat(r.data):r.data,c.value=r.more===!0,l.value=r.count??s.value.length,setTimeout(O,0),!0}catch(e){t===g.value&&(a.value=e instanceof Eo?e:new Eo(`UNKNOWN`,e.message,{rawMessage:e.message}))}return!1}function A(e){a.value=e}function ne(e){u.value=e}function re(){n(`admin`)}function ie(){v()}function ae(){T()}return Ah(()=>{v(),y(),Ry(Fy,ie),Ry(Fy,ae)}),Ph(()=>{zy(Fy,ie),zy(Fy,ae)}),(t,n)=>(Y(),X(`div`,Gb,[Q(nb,{config:o.value,onLoad:y,onError:A},null,8,[`config`]),$m((Y(),X(`div`,Kb,[Z(`div`,qb,[Z(`span`,{class:Nf([`tk-comments-count`,{__hidden:r.value||!s.value.length&&!m.value}])},[m.value?(Y(),X(`span`,Jb,K(J(W)(`COMMENTS_SEARCH_COUNT_PREFIX`)),1)):$(`v-if`,!0),Z(`span`,null,K(l.value),1),Z(`span`,null,K(J(W)(`COMMENTS_COUNT_SUFFIX`)),1)],2),Z(`span`,Yb,[!r.value&&s.value.length&&o.value.SHOW_ORDER!==`false`?(Y(),X(`span`,Xb,[Z(`button`,{class:Nf([`tk-sort-item`,{__active:f.value===`newest`}]),type:`button`,onClick:n[0]||=e=>E(`newest`)},K(J(W)(`COMMENTS_SORT_NEWEST`)),3),Z(`button`,{class:Nf([`tk-sort-item`,{__active:f.value===`oldest`}]),type:`button`,onClick:n[1]||=e=>E(`oldest`)},K(J(W)(`COMMENTS_SORT_OLDEST`)),3),Z(`button`,{class:Nf([`tk-sort-item`,{__active:f.value===`popular`}]),type:`button`,onClick:n[2]||=e=>E(`popular`)},K(J(W)(`COMMENTS_SORT_POPULAR`)),3)])):$(`v-if`,!0),!r.value&&!i.value?(Y(),X(`span`,{key:1,class:Nf([`tk-icon __comments`,{__active:h.value}]),onClick:C},[Q(ly,{name:`magnifying-glass`})],2)):$(`v-if`,!0),!r.value&&!i.value?(Y(),X(`span`,{key:2,class:`tk-icon __comments`,onClick:w},[Q(ly,{name:`sync`})])):$(`v-if`,!0),e.showAdminEntry?(Y(),X(`span`,{key:3,class:`tk-icon __comments`,onClick:re},[Q(ly,{name:`cog`})])):$(`v-if`,!0)])]),$m(Z(`div`,Zb,[Q(Ny,{ref_key:`searchInputRef`,ref:_,modelValue:p.value,"onUpdate:modelValue":n[3]||=e=>p.value=e,size:`small`,clearable:``,maxlength:100,placeholder:J(W)(`COMMENTS_SEARCH_PLACEHOLDER`),onClear:S,onKeyup:ey(x,[`enter`])},null,8,[`modelValue`,`placeholder`]),Q(Gy,{size:`small`,type:`primary`,onClick:x},{default:Qm(()=>[E_(K(J(W)(`COMMENTS_SEARCH`)),1)]),_:1})],512),[[hv,h.value]]),$(` 评论区唯一错误卡片:列表/提交/回复失败共用,位于空态块上方 `),a.value?(Y(),v_(Wb,{key:0,error:a.value},null,8,[`error`])):$(`v-if`,!0),!s.value.length&&!r.value&&!a.value?(Y(),X(`div`,Qb,[m.value?(Y(),X(`span`,$b,K(J(W)(`COMMENTS_SEARCH_NO_RESULT`)),1)):$(`v-if`,!0),m.value?$(`v-if`,!0):(Y(),X(`span`,ex,K(J(W)(`COMMENTS_NO_COMMENTS`)),1))])):$(`v-if`,!0),(Y(!0),X(c_,null,Wh(s.value,e=>(Y(),v_(Pb,{key:e.id,comment:e,replying:u.value===e.id,config:o.value,onReply:ne,onLoad:T,onError:A},null,8,[`comment`,`replying`,`config`]))),128)),c.value&&!r.value&&!a.value?(Y(),X(`div`,tx,[$m((Y(),X(`div`,{class:`tk-expand`,onClick:D},[E_(K(J(W)(`COMMENTS_EXPAND`)),1)])),[[J(pd),i.value]])])):$(`v-if`,!0)])),[[J(pd),r.value]])]))}}),rx={class:`tk-footer`},ix=hh({__name:`TkFooter`,setup(e){let t=wo;return(e,n)=>(Y(),X(`div`,rx,[n[0]||=E_(` Powered by `,-1),n[1]||=Z(`a`,{href:`https://twikoo.js.org`,target:`_blank`,rel:`noopener noreferrer`},`Twikoo`,-1),E_(` v`+K(J(t)),1)]))}}),ax={class:`tk-pagination`},ox={key:0,class:`tk-pagination-options`},sx={class:`tk-pagination-pagers`},cx=[`onClick`],lx={key:1,class:`tk-pagination-options`},ux=hh({__name:`TkPagination`,props:{pageSize:{default:10},total:{default:0}},emits:[`current-change`,`page-size-change`],setup(e,{emit:t}){let n=e,r=t,i=q(1),a=q(0),o=q(0),s=q([]),c=tv(()=>Math.ceil(n.total/n.pageSize));function l(){let e=[];for(let t=1;t<=c.value;t++)Math.abs(i.value-t)<3||t===1||t===c.value?e.push({title:`${t}`,page:t}):Math.abs(i.value-t)<4&&e.push({title:`...`,page:t});s.value=e}function u(e){i.value=parseInt(String(e),10)||1,i.value>c.value&&(i.value=c.value),i.value<1&&(i.value=1),a.value=0,r(`current-change`,i.value),l()}function d(e){o.value=0,r(`page-size-change`,parseInt(String(e),10))}function f(e){a.value=parseInt(String(e),10)}function p(e){o.value=parseInt(String(e),10)}function m(){l()}return ah(()=>n.total,m,{immediate:!0}),ah(()=>n.pageSize,m),(t,n)=>(Y(),X(`div`,ax,[c.value?(Y(),X(`div`,ox,[Z(`div`,null,[Z(`span`,null,K(J(W)(`PAGINATION_COUNT_PREFIX`)),1),Z(`span`,null,K(e.total),1),Z(`span`,null,K(J(W)(`PAGINATION_COUNT_SUFFIX`)),1)]),Q(Ny,{class:`tk-pagination-size`,type:`number`,min:1,max:100,"model-value":o.value?o.value:e.pageSize,onInput:p,onChange:d},null,8,[`model-value`]),Z(`span`,null,K(J(W)(`PAGINATION_PAGESIZE`)),1)])):$(`v-if`,!0),Z(`div`,sx,[(Y(!0),X(c_,null,Wh(s.value,e=>(Y(),X(`div`,{key:e.page,class:Nf([`tk-pagination-pager`,{__current:e.page===i.value}]),onClick:t=>u(e.page)},K(e.title),11,cx))),128))]),c.value?(Y(),X(`div`,lx,[Z(`span`,null,K(J(W)(`PAGINATION_GOTO_PREFIX`)),1),Q(Ny,{class:`tk-pagination-goto`,type:`number`,min:1,max:c.value,"model-value":a.value?a.value:i.value,onInput:f,onChange:u},null,8,[`max`,`model-value`]),Z(`span`,null,K(J(W)(`PAGINATION_GOTO_SUFFIX`)),1)])):$(`v-if`,!0)]))}}),dx={class:`tk-admin-comment`},fx={key:0,class:`tk-admin-warn`},px={class:`tk-admin-comment-filter`},mx={value:``},hx={value:`VISIBLE`},gx={value:`HIDDEN`},_x={class:`tk-admin-comment-meta`},vx={key:0},yx=[`href`],bx={key:2},xx=[`href`],Sx={key:3},Cx={class:`tk-time`},Tx=[`title`],Ex=[`innerHTML`],Dx={key:0,class:`tk-admin-warn tk-admin-security-alert`},Ox={class:`tk-admin-security-alert-message`},kx={key:0,class:`tk-admin-security-alert-url`},Ax={class:`tk-admin-actions`},jx=5,Mx=hh({__name:`TkAdminComment`,setup(e){let t=ab().VERSION,n=q(!0),r=q([]),i=im({}),a=q(typeof t==`string`?t:``),o=wo,s=q(0),c=q(jx),l=q(1),u=im({keyword:``,type:``}),d=q(null),f=q();function p(e){return Sd(e.created)}async function m(){n.value=!0;let e=await Mo(ko().tcb,`COMMENT_GET_FOR_ADMIN`,{per:c.value,page:l.value,keyword:u.keyword,type:u.type}),t=e.result??e;t&&!t.code&&(s.value=t.count??0,r.value=(t.data??[]).map(e=>({...e,comment:xc(e.comment)}))),setTimeout(()=>{w(f.value)},0),n.value=!1}async function h(){let e=await Mo(ko().tcb,`GET_CONFIG_FOR_ADMIN`),t=e.result??e;t&&!t.code&&t.config&&(Object.assign(i,t.config),a.value=typeof t.config.VERSION==`string`?t.config.VERSION:``,g())}function g(){i.HIGHLIGHT||=`true`;let e={},t=localStorage.getItem(`twikoo`);if(t)try{e=JSON.parse(t)}catch{e={}}for(let t of[`nick`,`mail`,`avatar`])i[t]=e[t]??``;!e.nick&&i.BLOGGER_NICK&&(e.nick=String(i.BLOGGER_NICK)),!e.mail&&i.BLOGGER_EMAIL&&(e.mail=String(i.BLOGGER_EMAIL)),!e.link&&i.SITE_URL&&(e.link=String(i.SITE_URL)),localStorage.setItem(`twikoo`,JSON.stringify(e))}function _(e){c.value=e,m()}function v(e){l.value=e,m()}function y(e){let t=`${e.url??``}#${e._id}`;try{if(new URL(t).hostname!==window.location.hostname){d.value={commentId:e._id,message:W(`ADMIN_COMMENT_SECURITY_ALERT`),url:t};return}window.open(t)}catch{try{new URL(t,window.location.origin),window.open(t)}catch{d.value={commentId:e._id,message:W(`ADMIN_COMMENT_PARSE_ERROR`),url:e.url}}}}async function b(e){confirm(W(`ADMIN_COMMENT_DELETE_CONFIRM`))&&(n.value=!0,await Mo(ko().tcb,`COMMENT_DELETE_FOR_ADMIN`,{id:e._id}),await m(),n.value=!1)}function x(e,t){C(e,{isSpam:t})}function S(e,t){C(e,{top:t})}async function C(e,t){n.value=!0,await Mo(ko().tcb,`COMMENT_SET_FOR_ADMIN`,{id:e._id,set:t}),await m(),n.value=!1}function w(e){e&&(Ld(e),Rd(e,ko().options.katex),i.HIGHLIGHT===`true`&&Ic(e,i.HIGHLIGHT_THEME,i.HIGHLIGHT_PLUGIN))}return Ah(async()=>{await Promise.all([h(),m()]),w(f.value)}),(e,t)=>$m((Y(),X(`div`,dx,[J(o)===a.value?$(`v-if`,!0):(Y(),X(`div`,fx,[Z(`span`,null,K(J(W)(`ADMIN_CLIENT_VERSION`))+K(J(o))+`,`,1),Z(`span`,null,K(J(W)(`ADMIN_SERVER_VERSION`))+K(a.value)+`,`,1),$(`
239
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Nu(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Nu(n,!0):this.parser.parseInline(r),o=Pu(e);if(o===null)return a;e=Nu(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+Nu(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Pu(e);if(i===null)return Nu(n);e=i;let a=`<img src="${Nu(e)}" alt="${Nu(n)}"`;return t&&(a+=` title="${Nu(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Nu(e.text)}},qu=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Ju=class e{options;renderer;textRenderer;constructor(e){this.options=e||ul,this.options.renderer=this.options.renderer||new Ku,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qu}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Yu=class{options;block;constructor(e){this.options=e||ul}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Gu.lex:Gu.lexInline}provideParser(e=this.block){return e?Ju.parse:Ju.parseInline}},Xu=class{defaults=ll();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ju;Renderer=Ku;TextRenderer=qu;Lexer=Gu;Tokenizer=Wu;Hooks=Yu;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ku(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Wu(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Yu;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Yu.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Yu.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Gu.lex(e,t??this.defaults)}parser(e,t){return Ju.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Gu.lex:Gu.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Ju.parse:Ju.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Gu.lex:Gu.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Ju.parse:Ju.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
240
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Nu(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Zu=new Xu;function Qu(e,t){return Zu.parse(e,t)}Qu.options=Qu.setOptions=function(e){return Zu.setOptions(e),Qu.defaults=Zu.defaults,dl(Qu.defaults),Qu},Qu.getDefaults=ll,Qu.defaults=ul;function $u(...e){return Zu.use(...e),Qu.defaults=Zu.defaults,dl(Qu.defaults),Qu}Qu.use=$u,Qu.walkTokens=function(e,t){return Zu.walkTokens(e,t)},Qu.parseInline=Zu.parseInline,Qu.Parser=Ju,Qu.parser=Ju.parse,Qu.Renderer=Ku,Qu.TextRenderer=qu,Qu.Lexer=Gu,Qu.lexer=Gu.lex,Qu.Tokenizer=Wu,Qu.Hooks=Yu,Qu.parse=Qu,Qu.options,Qu.setOptions,Qu.walkTokens,Qu.parseInline,Ju.parse,Gu.lex;var ed={};function td(e){ed=e??{}}var nd=new Xu({gfm:!0,breaks:!0});nd.use({tokenizer:{code(){}}});var rd=/^(\$\$[\s\S]*?\$\$|\\\[([\s\S]*?)\\\]|\\\(([\s\S]*?)\\\)|\$[^$\n]+?\$)/;nd.use({extensions:[{name:`twikoo-math`,level:`inline`,start(e){return e.search(rd)},tokenizer(e){let t=rd.exec(e);if(t)return{type:`twikoo-math`,raw:t[0],text:t[0]}},renderer(e){return e.text}}]});function id(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}nd.use({renderer:{image(e){return e.owo?`<img class="${id([`tk-owo-emotion`,e.className].filter(Boolean).join(` `))}" loading="lazy" src="${id(e.href)}" alt="${id(e.text)}">`:!1}},extensions:[{name:`owo`,level:`inline`,start(e){return e.indexOf(`:`)},tokenizer(e){if(this.lexer.state.inRawBlock)return;let t=/^:([^\s:]+):/.exec(e);if(!t||!Object.prototype.hasOwnProperty.call(ed,t[1]))return;let n=ed[t[1]],r=typeof n==`string`?n:n?.src;if(typeof r==`string`&&r)return{type:`image`,raw:t[0],href:r,title:null,text:t[0],tokens:[{type:`text`,raw:t[0],text:t[0]}],className:typeof n==`string`?void 0:n.className,owo:!0}}}]});function ad(e){return nd.parse(e)}var od=document.createElement(`template`);function sd(e){try{return od.innerHTML=Tc.sanitize(e),od.content.querySelector(`img`)}catch(e){return zo.warn(`OwO 表情解析失败`,e),null}}function cd(e){return e.split(`#`).shift()?.split(`?`)?.shift()?.split(`/`).pop()??``}function ld(e){try{for(let t of Object.values(e))if(t.type===`image`)for(let e of t.container)e.text||=cd(sd(e.icon)?.src??``);return e}catch(e){zo.warn(`OwO 数据格式异常`,e);return}}async function ud(e){try{let{response:t,text:n}=await Do(e);if(!t.ok&&t.status!==304)return zo.warn(`OwO 数据请求失败:${t.status}`),{};try{return ld(JSON.parse(n))??{}}catch(e){return zo.warn(`OwO 数据解析失败`,e),{}}}catch(e){return zo.warn(e instanceof Eo?`OwO 数据请求超时`:`OwO 数据请求异常`,e),{}}}async function dd(e){let t={},n=await Promise.all(e.split(`,`).map(e=>ud(e.trim())));return Object.assign(t,...n),t}function fd(e){let t=Object.create(null);for(let n of Object.values(e??{}))for(let e of n.container??[]){let n=sd(e.icon);n?.src&&e.text&&(t[e.text]={src:n.src,className:n.className})}return td(t),t}var pd=`data-tk-loading`;function md(e){for(let t of Array.from(e.children))if(t.hasAttribute(pd))return t;return null}function hd(e){if(md(e))return;let t=document.createElement(`div`);t.setAttribute(pd,`1`),t.className=`tk-loading-mask`;let n=document.createElement(`div`);n.className=`tk-loading-spinner`,n.innerHTML=`<svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none"></circle></svg>`,t.appendChild(n),e.appendChild(t)}function gd(e){md(e)?.remove(),e.classList.remove(`tk-loading-parent--relative`)}function _d(e,t){if(t.value){let t=getComputedStyle(e).position;(!t||t===`static`)&&e.classList.add(`tk-loading-parent--relative`),hd(e)}else gd(e)}var vd={mounted:_d,updated:_d,unmounted:gd};function yd(e,t){bd(e);let n=n=>{let r=n.target;r&&e!==r&&!e.contains(r)&&t.value?.()};e.__tkClickoutside=n,document.addEventListener(`click`,n,!0)}function bd(e){let t=e;t.__tkClickoutside&&(document.removeEventListener(`click`,t.__tkClickoutside,!0),delete t.__tkClickoutside)}var xd={mounted:yd,updated:yd,unmounted:bd},Sd=e=>typeof e==`string`&&/^http(s)?:\/\//.test(e),Cd=e=>e==null||e===``;function wd(e){return String(e).trim().toLowerCase()}function Td(e){return/^[1-9][0-9]{4,10}$/.test(e)||/^[1-9][0-9]{4,10}@qq.com$/i.test(e)}function Ed(e){return e?e.substring(0,4)===`http`?e:`http://${e}`:``}function Dd(e){let t=typeof e==`number`?new Date(e):e;if(!t)return``;try{let e=Date.now()-t.getTime(),n=Math.floor(e/864e5);if(n===0){let t=e%864e5,n=Math.floor(t/36e5);if(n===0){let e=t%36e5,n=Math.floor(e/6e4);return n===0?`${Math.round(e%6e4/1e3)} ${W(`TIMEAGO_SECONDS`)}`:`${n} ${W(`TIMEAGO_MINUTES`)}`}return`${n} ${W(`TIMEAGO_HOURS`)}`}return n<0?W(`TIMEAGO_NOW`):n<8?`${n} ${W(`TIMEAGO_DAYS`)}`:Od(t)}catch(e){return zo.warn(`timeago 计算失败`,e),``}}function Od(e){return[kd(e.getFullYear(),2),kd(e.getMonth()+1,2),kd(e.getDate(),2)].join(`-`)}function kd(e,t){let n=e.toString();for(;n.length<t;)n=`0${n}`;return n}function Ad(e){let t=window.TWIKOO_MAGIC_PATH;if(t)return t;if(e&&typeof e==`string`)switch(e){case`location.pathname`:case`window.location.pathname`:return window.location.pathname;case`location.href`:case`window.location.href`:return window.location.href;default:return e}return window.location.pathname}function jd(e){return window.TWIKOO_MAGIC_HREF??(typeof e==`string`?e:window.location.href)}var Md=new Set([`localhost`,`127.0.0.1`,`0.0.0.0`,`::1`]);function Nd(){return Md.has(window.location.hostname)}async function Pd(e,t={}){let n=t.urls;if(!Array.isArray(n))throw Error(`urls 参数有误`);return n.length===0?[]:Ao(await Lo(e,`GET_COMMENTS_COUNT`,{envId:t.envId,funcName:t.funcName,urls:n,includeReply:t.includeReply})).data}async function Fd(e,t={}){let n=Ao(await Lo(e,`GET_RECENT_COMMENTS`,{envId:t.envId,funcName:t.funcName,pageSize:t.pageSize,includeReply:t.includeReply})).data;if(Array.isArray(n))for(let e of n)e.relativeTime=Dd(e.created);return n}async function Id(e,t={}){return Ao(await Lo(e,`COUNTER_GET`,{envId:t.envId,funcName:t.funcName,url:Ad(t.path),href:jd(t.href),title:t.title??document.title}))}async function Ld(e,t={}){let n=document.getElementById(`twikoo_visitors`);if(!n||Nd())return null;try{let r=await Id(e,t);return r.time!==void 0&&(n.innerHTML=String(r.time)),r}catch(e){return zo.warn(`Failed to update visitors count`,e),null}}function Rd(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsText(e),r.onloadend=()=>{r.error?n(r.error):t(r.result)}})}function zd(e){return new Promise(t=>{let n=new FileReader;n.onload=e=>{let n=e.target?.result;t(typeof n==`string`?n:``)},n.readAsDataURL(e)})}async function Bd(){let e=window.navigator.userAgent;try{let t=navigator.userAgentData;if(t?.platform===`Windows`||t?.platform===`macOS`){let{platformVersion:n}=await t.getHighEntropyValues([`platformVersion`]),r=parseInt(String(n).split(`.`)[0],10);t.platform===`Windows`&&r>=13?e=e.replace(/Windows NT 10\.0/i,`Windows NT 11.0`):t.platform===`macOS`&&r>=11&&(e=e.replace(/Mac OS X 10_[0-9]+_[0-9]+/i,`Mac OS X ${String(n).replace(/\./g,`_`)}`))}}catch{}return e}function Vd(e){if(!e)return;let t=Array.isArray(e)?e:[e],n=[];for(let e of t)e&&n.push(...Array.from(e.getElementsByTagName(`a`)));for(let e of n)e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer nofollow ugc`)}function Hd(e){let t=e.target;if(!(t instanceof HTMLImageElement)||t.classList.contains(`tk-owo-emotion`))return;let n=t.closest(`.twikoo`);if(!n)return;let r=document.createElement(`div`);r.className=`tk-lightbox`;let i=document.createElement(`img`);i.className=`tk-lightbox-image`;let a=()=>{if(!i.complete||!i.naturalWidth)return;let{width:e,height:t}=i.getBoundingClientRect(),n=r.getBoundingClientRect(),a=window.devicePixelRatio||1;i.style.left=`${Math.round((n.width-e)/2*a)/a}px`,i.style.top=`${Math.round((n.height-t)/2*a)/a}px`,i.style.transform=`none`};i.addEventListener(`load`,a),i.src=t.src,r.appendChild(i),r.addEventListener(`click`,()=>{window.removeEventListener(`resize`,a),i.removeEventListener(`load`,a),r.remove()}),n.appendChild(r),window.addEventListener(`resize`,a),a()}function Ud(e,t){if(!e)return;let n=window.renderMathInElement;typeof n==`function`&&n(e,t??{delimiters:[{left:`$$`,right:`$$`,display:!0},{left:`$`,right:`$`,display:!1},{left:`\\(`,right:`\\)`,display:!1},{left:`\\[`,right:`\\]`,display:!0}],throwOnError:!1})}var Wd=[{key:`envId`,required:!0}];function Gd(e){let t=Wd.filter(t=>t.required&&Cd(e[t.key])).map(e=>e.key);if(t.length!==0){for(let e of t)zo.warn(`${e} is required`);throw Error(`Twikoo: failed to init`)}}async function Kd(e,t){let n=e;Gd(t);let r=n.init({env:t.envId??``,region:t.region}),i=r.auth({persistence:`local`});return i.hasLoginState?.()||await i.anonymousAuthProvider().signIn(),{app:r,auth:i}}function qd(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var Jd={},Yd=[],Xd=()=>{},Zd=()=>!1,Qd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),$d=e=>e.startsWith(`onUpdate:`),ef=Object.assign,tf=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},nf=Object.prototype.hasOwnProperty,rf=(e,t)=>nf.call(e,t),af=Array.isArray,of=e=>hf(e)===`[object Map]`,sf=e=>hf(e)===`[object Set]`,cf=e=>hf(e)===`[object Date]`,lf=e=>typeof e==`function`,uf=e=>typeof e==`string`,df=e=>typeof e==`symbol`,ff=e=>typeof e==`object`&&!!e,pf=e=>(ff(e)||lf(e))&&lf(e.then)&&lf(e.catch),mf=Object.prototype.toString,hf=e=>mf.call(e),gf=e=>hf(e).slice(8,-1),_f=e=>hf(e)===`[object Object]`,vf=e=>uf(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,yf=qd(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),bf=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},xf=/-\w/g,Sf=bf(e=>e.replace(xf,e=>e.slice(1).toUpperCase())),Cf=/\B([A-Z])/g,wf=bf(e=>e.replace(Cf,`-$1`).toLowerCase()),Tf=bf(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ef=bf(e=>e?`on${Tf(e)}`:``),Df=(e,t)=>!Object.is(e,t),Of=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kf=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Af=e=>{let t=parseFloat(e);return isNaN(t)?e:t},jf,Mf=()=>jf||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function Nf(e){if(af(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=uf(r)?Lf(r):Nf(r);if(i)for(let e in i)t[e]=i[e]}return t}if(uf(e)||ff(e))return e}var Pf=/;(?![^(]*\))/g,Ff=/:([^]+)/,If=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Lf(e){let t={};return e.replace(If,e=>e.startsWith(`/*`)?``:e).split(Pf).forEach(e=>{if(e){let n=e.split(Ff);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Rf(e){let t=``;if(uf(e))t=e;else if(af(e))for(let n=0;n<e.length;n++){let r=Rf(e[n]);r&&(t+=r+` `)}else if(ff(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var zf=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Bf=qd(zf);zf+``;function Vf(e){return!!e||e===``}function Hf(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Kf(e[i],t[i],n);return r}function Uf(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Kf(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Wf(e,t,n){let r=of(e),i=of(t);if(r||i||(r=sf(e),i=sf(t),r||i))return r&&i?Uf(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!Kf(e[r],t[r],n))return!1}return String(e)===String(t)}function Gf(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Kf(e,t,n){if(e===t)return!0;let r=cf(e),i=cf(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=df(e),i=df(t),r||i?e===t:(r=af(e),i=af(t),r||i?r&&i?Gf(e,t,n,Hf):!1:(r=ff(e),i=ff(t),r||i?!r||!i?!1:Gf(e,t,n,Wf):String(e)===String(t))))}function qf(e,t){return e.findIndex(e=>Kf(e,t))}var Jf=e=>!!(e&&e.__v_isRef===!0),K=e=>uf(e)?e:e==null?``:af(e)||ff(e)&&(e.toString===mf||!lf(e.toString))?Jf(e)?K(e.value):JSON.stringify(e,Yf,2):String(e),Yf=(e,t)=>Jf(t)?Yf(e,t.value):of(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Xf(t,r)+` =>`]=n,e),{})}:sf(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Xf(e))}:df(t)?Xf(t):ff(t)&&!af(t)&&!_f(t)?String(t):t,Xf=(e,t=``)=>df(e)?`Symbol(${e.description??t})`:e,Zf,Qf=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Zf&&(Zf.active?(this.parent=Zf,this.index=(Zf.scopes||(Zf.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=Zf;try{return Zf=this,e()}finally{Zf=t}}}on(){++this._on===1&&(this.prevScope=Zf,Zf=this)}off(){if(this._on>0&&--this._on===0){if(Zf===this)Zf=this.prevScope;else{let e=Zf;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function $f(){return Zf}var ep,tp=new WeakSet,np=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Zf&&(Zf.active?Zf.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,tp.has(this)&&(tp.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||op(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yp(this),lp(this);let e=ep,t=hp;ep=this,hp=!0;try{return this.fn()}finally{up(this),ep=e,hp=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)pp(e);this.deps=this.depsTail=void 0,yp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?tp.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){dp(this)&&this.run()}get dirty(){return dp(this)}},rp=0,ip,ap;function op(e,t=!1){if(e.flags|=8,t){e.next=ap,ap=e;return}e.next=ip,ip=e}function sp(){rp++}function cp(){if(--rp>0)return;if(ap){let e=ap;for(ap=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ip;){let t=ip;for(ip=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function lp(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function up(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),pp(r),mp(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function dp(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fp(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fp(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bp)||(e.globalVersion=bp,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!dp(e))))return;e.flags|=2;let t=e.dep,n=ep,r=hp;ep=e,hp=!0;try{lp(e);let n=e.fn(e._value);(t.version===0||Df(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{ep=n,hp=r,up(e),e.flags&=-3}}function pp(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)pp(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function mp(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var hp=!0,gp=[];function _p(){gp.push(hp),hp=!1}function vp(){let e=gp.pop();hp=e===void 0||e}function yp(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=ep;ep=void 0;try{t()}finally{ep=e}}}var bp=0,xp=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Sp=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ep||!hp||ep===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ep)t=this.activeLink=new xp(ep,this),ep.deps?(t.prevDep=ep.depsTail,ep.depsTail.nextDep=t,ep.depsTail=t):ep.deps=ep.depsTail=t,Cp(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=ep.depsTail,t.nextDep=void 0,ep.depsTail.nextDep=t,ep.depsTail=t,ep.deps===t&&(ep.deps=e)}return t}trigger(e){this.version++,bp++,this.notify(e)}notify(e){sp();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{cp()}}};function Cp(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Cp(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var wp=new WeakMap,Tp=Symbol(``),Ep=Symbol(``),Dp=Symbol(``);function Op(e,t,n){if(hp&&ep){let t=wp.get(e);t||wp.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Sp),r.map=t,r.key=n),r.track()}}function kp(e,t,n,r,i,a){let o=wp.get(e);if(!o){bp++;return}let s=e=>{e&&e.trigger()};if(sp(),t===`clear`)o.forEach(s);else{let i=af(e),a=i&&vf(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Dp||!df(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Dp)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Tp)),of(e)&&s(o.get(Ep)));break;case`delete`:i||(s(o.get(Tp)),of(e)&&s(o.get(Ep)));break;case`set`:of(e)&&s(o.get(Tp))}}cp()}function Ap(e){let t=_m(e);return t===e||(Op(t,`iterate`,Dp),hm(e))?t:mm(e)?pm(e)?t.map(e=>bm(ym(e))):t.map(bm):t.map(ym)}function jp(e){return Op(e=_m(e),`iterate`,Dp),e}function Mp(e,t){return mm(e)?bm(pm(e)?ym(t):t):ym(t)}var Np={__proto__:null,[Symbol.iterator](){return Pp(this,Symbol.iterator,e=>Mp(this,e))},concat(...e){return Ap(this).concat(...e.map(e=>af(e)?Ap(e):e))},entries(){return Pp(this,`entries`,e=>(e[1]=Mp(this,e[1]),e))},every(e,t){return Ip(this,`every`,e,t,void 0,arguments)},filter(e,t){return Ip(this,`filter`,e,t,e=>e.map(e=>Mp(this,e)),arguments)},find(e,t){return Ip(this,`find`,e,t,e=>Mp(this,e),arguments)},findIndex(e,t){return Ip(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Ip(this,`findLast`,e,t,e=>Mp(this,e),arguments)},findLastIndex(e,t){return Ip(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Ip(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Rp(this,`includes`,e)},indexOf(...e){return Rp(this,`indexOf`,e)},join(e){return Ap(this).join(e)},lastIndexOf(...e){return Rp(this,`lastIndexOf`,e)},map(e,t){return Ip(this,`map`,e,t,void 0,arguments)},pop(){return zp(this,`pop`)},push(...e){return zp(this,`push`,e)},reduce(e,...t){return Lp(this,`reduce`,e,t)},reduceRight(e,...t){return Lp(this,`reduceRight`,e,t)},shift(){return zp(this,`shift`)},some(e,t){return Ip(this,`some`,e,t,void 0,arguments)},splice(...e){return zp(this,`splice`,e)},toReversed(){return Ap(this).toReversed()},toSorted(e){return Ap(this).toSorted(e)},toSpliced(...e){return Ap(this).toSpliced(...e)},unshift(...e){return zp(this,`unshift`,e)},values(){return Pp(this,`values`,e=>Mp(this,e))}};function Pp(e,t,n){let r=jp(e),i=r[t]();return r!==e&&!hm(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var Fp=Array.prototype;function Ip(e,t,n,r,i,a){let o=jp(e),s=o!==e&&!hm(e),c=o[t];if(c!==Fp[t]){let t=c.apply(e,a);return s?ym(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Mp(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Lp(e,t,n,r){let i=jp(e),a=i!==e&&!hm(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Mp(e,t)),n.call(this,t,Mp(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Mp(e,c):c}function Rp(e,t,n){let r=_m(e);Op(r,`iterate`,Dp);let i=r[t](...n);return(i===-1||i===!1)&&gm(n[0])?(n[0]=_m(n[0]),r[t](...n)):i}function zp(e,t,n=[]){_p(),sp();let r=_m(e)[t].apply(e,n);return cp(),vp(),r}var Bp=qd(`__proto__,__v_isRef,__isVue`),Vp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(df));function Hp(e){df(e)||(e=String(e));let t=_m(this);return Op(t,`has`,e),t.hasOwnProperty(e)}var Up=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?sm:om:i?am:im).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=af(e);if(!r){let e;if(a&&(e=Np[t]))return e;if(t===`hasOwnProperty`)return Hp}let o=Reflect.get(e,t,xm(e)?e:n);if((df(t)?Vp.has(t):Bp(t))||(r||Op(e,`get`,t),i))return o;if(xm(o)){let e=a&&vf(t)?o:o.value;return r&&ff(e)?dm(e):e}return ff(o)?r?dm(o):lm(o):o}},Wp=class extends Up{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=af(e)&&vf(t);if(!this._isShallow){let e=mm(i);if(!hm(n)&&!mm(n)&&(i=_m(i),n=_m(n)),!a&&xm(i)&&!xm(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:rf(e,t),s=Reflect.set(e,t,n,xm(e)?e:r);return e===_m(r)&&s&&(o?Df(n,i)&&kp(e,`set`,t,n,i):kp(e,`add`,t,n)),s}deleteProperty(e,t){let n=rf(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&kp(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!df(t)||!Vp.has(t))&&Op(e,`has`,t),n}ownKeys(e){return Op(e,`iterate`,af(e)?`length`:Tp),Reflect.ownKeys(e)}},Gp=class extends Up{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Kp=new Wp,qp=new Gp,Jp=new Wp(!0),Yp=e=>e,Xp=e=>Reflect.getPrototypeOf(e);function Zp(e,t,n){return function(...r){let i=this.__v_raw,a=_m(i),o=of(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Yp:t?bm:ym;return!t&&Op(a,`iterate`,c?Ep:Tp),ef(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Qp(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function $p(e,t){let n={get(n){let r=this.__v_raw,i=_m(r),a=_m(n);e||(Df(n,a)&&Op(i,`get`,n),Op(i,`get`,a));let{has:o}=Xp(i),s=t?Yp:e?bm:ym;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Op(_m(t),`iterate`,Tp),t.size},has(t){let n=this.__v_raw,r=_m(n),i=_m(t);return e||(Df(t,i)&&Op(r,`has`,t),Op(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=_m(a),s=t?Yp:e?bm:ym;return!e&&Op(o,`iterate`,Tp),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return ef(n,e?{add:Qp(`add`),set:Qp(`set`),delete:Qp(`delete`),clear:Qp(`clear`)}:{add(e){let n=_m(this),r=Xp(n),i=_m(e),a=!t&&!hm(e)&&!mm(e)?i:e;return r.has.call(n,a)||Df(e,a)&&r.has.call(n,e)||Df(i,a)&&r.has.call(n,i)||(n.add(a),kp(n,`add`,a,a)),this},set(e,n){!t&&!hm(n)&&!mm(n)&&(n=_m(n));let r=_m(this),{has:i,get:a}=Xp(r),o=i.call(r,e);o||=(e=_m(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?Df(n,s)&&kp(r,`set`,e,n,s):kp(r,`add`,e,n),this},delete(e){let t=_m(this),{has:n,get:r}=Xp(t),i=n.call(t,e);i||=(e=_m(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&kp(t,`delete`,e,void 0,a),o},clear(){let e=_m(this),t=e.size!==0,n=e.clear();return t&&kp(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Zp(r,e,t)}),n}function em(e,t){let n=$p(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(rf(n,r)&&r in t?n:t,r,i)}var tm={get:em(!1,!1)},nm={get:em(!1,!0)},rm={get:em(!0,!1)},im=new WeakMap,am=new WeakMap,om=new WeakMap,sm=new WeakMap;function cm(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function lm(e){return mm(e)?e:fm(e,!1,Kp,tm,im)}function um(e){return fm(e,!1,Jp,nm,am)}function dm(e){return fm(e,!0,qp,rm,om)}function fm(e,t,n,r,i){if(!ff(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=cm(gf(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function pm(e){return mm(e)?pm(e.__v_raw):!!(e&&e.__v_isReactive)}function mm(e){return!!(e&&e.__v_isReadonly)}function hm(e){return!!(e&&e.__v_isShallow)}function gm(e){return e?!!e.__v_raw:!1}function _m(e){let t=e&&e.__v_raw;return t?_m(t):e}function vm(e){return!rf(e,`__v_skip`)&&Object.isExtensible(e)&&kf(e,`__v_skip`,!0),e}var ym=e=>ff(e)?lm(e):e,bm=e=>ff(e)?dm(e):e;function xm(e){return e?e.__v_isRef===!0:!1}function q(e){return Sm(e,!1)}function Sm(e,t){return xm(e)?e:new Cm(e,t)}var Cm=class{constructor(e,t){this.dep=new Sp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:_m(e),this._value=t?e:ym(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||hm(e)||mm(e);e=n?e:_m(e),Df(e,t)&&(this._rawValue=e,this._value=n?e:ym(e),this.dep.trigger())}};function J(e){return xm(e)?e.value:e}var wm={get:(e,t,n)=>t===`__v_raw`?e:J(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return xm(i)&&!xm(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Tm(e){return pm(e)?e:new Proxy(e,wm)}var Em=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Sp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ep!==this)return op(this,!0),!0}get value(){let e=this.dep.track();return fp(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Dm(e,t,n=!1){let r,i;return lf(e)?r=e:(r=e.get,i=e.set),new Em(r,i,n)}var Om={},km=new WeakMap,Am=void 0;function jm(e,t=!1,n=Am){if(n){let t=km.get(n);t||km.set(n,t=[]),t.push(e)}}function Mm(e,t,n=Jd){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:hm(e)||i===!1||i===0?Nm(e,1):Nm(e),u,d,f,p,m=!1,h=!1;if(xm(e)?(d=()=>e.value,m=hm(e)):pm(e)?(d=()=>l(e),m=!0):af(e)?(h=!0,m=e.some(e=>pm(e)||hm(e)),d=()=>e.map(e=>{if(xm(e))return e.value;if(pm(e))return l(e);if(lf(e))return c?c(e,2):e()})):d=lf(e)?t?c?()=>c(e,2):e:()=>{if(f){_p();try{f()}finally{vp()}}let t=Am;Am=u;try{return c?c(e,3,[p]):e(p)}finally{Am=t}}:Xd,t&&i){let e=d,t=i===!0?1/0:i;d=()=>Nm(e(),t)}let g=$f(),_=()=>{u.stop(),g&&g.active&&tf(g.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return _(),n}}let v=h?Array(e.length).fill(Om):Om,y=e=>{if(u.flags&1&&(u.dirty||e)){if(t){let n=u.run();if(e||i||m||(h?n.some((e,t)=>Df(e,v[t])):Df(n,v))){f&&f();let e=Am;Am=u;try{let e=[n,v===Om?void 0:h&&v[0]===Om?[]:v,p];v=n,c?c(t,3,e):t(...e)}finally{Am=e}}}else u.run()}};return s&&s(y),u=new np(d),u.scheduler=o?()=>o(y,!1):y,p=e=>jm(e,!1,u),f=u.onStop=()=>{let e=km.get(u);if(e){if(c)c(e,4);else for(let t of e)t();km.delete(u)}},t?r?y(!0):v=u.run():o?o(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Nm(e,t=1/0,n){if(t<=0||!ff(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,xm(e))Nm(e.value,t,n);else if(af(e))for(let r=0;r<e.length;r++)Nm(e[r],t,n);else if(sf(e)||of(e))e.forEach(e=>{Nm(e,t,n)});else if(_f(e)){for(let r in e)Nm(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Nm(e[r],t,n)}return e}function Pm(e,t,n,r){try{return r?e(...r):e()}catch(e){Im(e,t,n)}}function Fm(e,t,n,r){if(lf(e)){let i=Pm(e,t,n,r);return i&&pf(i)&&i.catch(e=>{Im(e,t,n)}),i}if(af(e)){let i=[];for(let a=0;a<e.length;a++)i.push(Fm(e[a],t,n,r));return i}}function Im(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Jd;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){_p(),Pm(a,null,10,[e,i,o]),vp();return}}Lm(e,n,i,r,o)}function Lm(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var Rm=[],zm=-1,Bm=[],Vm=null,Hm=0,Um=Promise.resolve(),Wm=null;function Gm(e){let t=Wm||Um;return e?t.then(this?e.bind(this):e):t}function Km(e){let t=zm+1,n=Rm.length;for(;t<n;){let r=t+n>>>1,i=Rm[r],a=Qm(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function qm(e){if(!(e.flags&1)){let t=Qm(e),n=Rm[Rm.length-1];!n||!(e.flags&2)&&t>=Qm(n)?Rm.push(e):Rm.splice(Km(t),0,e),e.flags|=1,Jm()}}function Jm(){Wm||=Um.then($m)}function Ym(e){if(!af(e))Vm&&e.id===-1?Vm.splice(Hm+1,0,e):e.flags&1||(Bm.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Bm.push(e[t]);Jm()}function Xm(e,t,n=zm+1){for(;n<Rm.length;n++){let t=Rm[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;Rm.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Zm(e){if(Bm.length){let e=[...new Set(Bm)].sort((e,t)=>Qm(e)-Qm(t));if(Bm.length=0,Vm){for(let t=0;t<e.length;t++)Vm.push(e[t]);return}for(Vm=e,Hm=0;Hm<Vm.length;Hm++){let e=Vm[Hm];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Vm=null,Hm=0}}var Qm=e=>e.id==null?e.flags&2?-1:1/0:e.id;function $m(e){try{for(zm=0;zm<Rm.length;zm++){let e=Rm[zm];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Pm(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;zm<Rm.length;zm++){let e=Rm[zm];e&&(e.flags&=-2)}zm=-1,Rm.length=0,Zm(e),Wm=null,(Rm.length||Bm.length)&&$m(e)}}var eh=null,th=null;function nh(e){let t=eh;return eh=e,th=e&&e.type.__scopeId||null,t}function rh(e,t=eh,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&x_(-1);let i=nh(t),a=__.length,o;try{o=e(...n)}finally{for(let e=__.length;e>a;e--)y_();nh(i),r._d&&x_(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function ih(e,t){if(eh===null)return e;let n=rv(eh),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=Jd]=t[e];i&&(lf(i)&&(i={mounted:i,updated:i}),i.deep&&Nm(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function ah(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(_p(),Fm(c,n,8,[e.el,s,e,t]),vp())}}function oh(e,t){if(V_){let n=V_.provides,r=V_.parent&&V_.parent.provides;r===n&&(n=V_.provides=Object.create(r)),n[e]=t}}function sh(e,t,n=!1){let r=H_();if(r||Cg){let i=Cg?Cg._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&lf(t)?t.call(r&&r.proxy):t}}var ch=Symbol.for(`v-scx`),lh=()=>sh(ch);function uh(e,t,n){return dh(e,t,n)}function dh(e,t,n=Jd){let{immediate:r,deep:i,flush:a,once:o}=n,s=ef({},n),c=t&&r||!t&&a!==`post`,l;if(J_){if(a===`sync`){let e=lh();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=Xd,e.resume=Xd,e.pause=Xd,e}}let u=V_;s.call=(e,t,n)=>Fm(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{e_(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():qm(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=Mm(e,t,s);return J_&&(l?l.push(f):c&&f()),f}function fh(e,t,n){let r=this.proxy,i=uf(e)?e.includes(`.`)?ph(r,e):()=>r[e]:e.bind(r,r),a;lf(t)?a=t:(a=t.handler,n=t);let o=G_(this),s=dh(i,a.bind(r),n);return o(),s}function ph(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var mh=Symbol(`_vte`),hh=e=>e.__isTeleport,gh=Symbol(`_leaveCb`);function _h(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==h_){t=n;break}}return t}function vh(e){if(!Dh(e))return hh(e.type)&&e.children?_h(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&lf(n.default))return n.default()}}function yh(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;yh(hh(n.type)&&vh(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function bh(e,t){return lf(e)?ef({name:e.name},t,{setup:e}):e}function xh(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Sh(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Ch=new WeakMap;function wh(e,t,n,r,i=!1){if(af(e)){e.forEach((e,a)=>wh(e,t&&(af(t)?t[a]:t),n,r,i));return}if(Eh(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&wh(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?rv(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===Jd?s.refs={}:s.refs,d=s.setupState,f=_m(d),p=d===Jd?Zd:e=>!Sh(u,e)&&rf(f,e),m=(e,t)=>!(t&&Sh(u,t));if(l!=null&&l!==c){if(Th(t),uf(l))u[l]=null,p(l)&&(d[l]=null);else if(xm(l)){let e=t;m(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(lf(c))Pm(c,s,12,[o,u]);else{let t=uf(c),r=xm(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)af(n)&&tf(n,a);else if(af(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),Ch.delete(e)};t.id=-1,Ch.set(e,t),e_(t,n)}else Th(e),s()}}}function Th(e){let t=Ch.get(e);t&&(t.flags|=8,Ch.delete(e))}Mf().requestIdleCallback,Mf().cancelIdleCallback;var Eh=e=>!!e.type.__asyncLoader,Dh=e=>e.type.__isKeepAlive;function Oh(e,t){Ah(e,`a`,t)}function kh(e,t){Ah(e,`da`,t)}function Ah(e,t,n=V_){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Mh(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Dh(e.parent.vnode)&&jh(r,t,n,e),e=e.parent}}function jh(e,t,n,r){let i=Mh(t,e,r,!0);zh(()=>{tf(r[t],i)},n)}function Mh(e,t,n=V_,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{_p();let i=G_(n),a=Fm(t,n,e,r);return i(),vp(),a};return r?i.unshift(a):i.push(a),a}}var Nh=e=>(t,n=V_)=>{(!J_||e===`sp`)&&Mh(e,(...e)=>t(...e),n)},Ph=Nh(`bm`),Fh=Nh(`m`),Ih=Nh(`bu`),Lh=Nh(`u`),Rh=Nh(`bum`),zh=Nh(`um`),Bh=Nh(`sp`),Vh=Nh(`rtg`),Hh=Nh(`rtc`);function Uh(e,t=V_){Mh(`ec`,e,t)}var Wh=`components`;function Gh(e,t){return qh(Wh,e,!0,t)||e}var Kh=Symbol.for(`v-ndc`);function qh(e,t,n=!0,r=!1){let i=eh||V_;if(i){let n=i.type;if(e===Wh){let e=iv(n,!1);if(e&&(e===t||e===Sf(t)||e===Tf(Sf(t))))return n}let a=Jh(i[e]||n[e],t)||Jh(i.appContext[e],t);return!a&&r?n:a}}function Jh(e,t){return e&&(e[t]||e[Sf(t)]||e[Tf(Sf(t))])}function Yh(e,t,n,r){let i,a=n&&n[r],o=af(e);if(o||uf(e)){let n=o&&pm(e),r=!1,s=!1;n&&(r=!hm(e),s=mm(e),e=jp(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?bm(ym(e[n])):ym(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(ff(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function Xh(e,t,n,r,i,a){if(n??={},eh.ce||eh.parent&&Eh(eh.parent)&&eh.parent.ce){let e=a!=null&&n.key==null?ef({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Y(),C_(p_,null,[Q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=__.length;Y();let c;try{let i=o&&Zh(o(n)),s=n.key||a||i&&i.key;c=C_(p_,{key:(s&&!df(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=__.length;e>s;e--)y_();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Zh(e){return e.some(e=>!w_(e)||!(e.type===h_||e.type===p_&&!Zh(e.children)))?e:null}var Qh=e=>e?q_(e)?rv(e):Qh(e.parent):null,$h=ef(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qh(e.parent),$root:e=>Qh(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ug(e),$forceUpdate:e=>e.f||=()=>{qm(e.update)},$nextTick:e=>e.n||=Gm.bind(e.proxy),$watch:e=>fh.bind(e)}),eg=(e,t)=>e!==Jd&&!e.__isScriptSetup&&rf(e,t),tg={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(eg(r,t))return o[t]=1,r[t];else if(i!==Jd&&rf(i,t))return o[t]=2,i[t];else if(rf(a,t))return o[t]=3,a[t];else if(n!==Jd&&rf(n,t))return o[t]=4,n[t];else ag&&(o[t]=0)}let l=$h[t],u,d;if(l)return t===`$attrs`&&Op(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==Jd&&rf(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,rf(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return eg(i,t)?(i[t]=n,!0):r!==Jd&&rf(r,t)?(r[t]=n,!0):rf(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==Jd&&s[0]!==`$`&&rf(e,s)||eg(t,s)||rf(a,s)||rf(r,s)||rf($h,s)||rf(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?rf(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ng(){return rg(`useSlots`).slots}function rg(e){let t=H_();return t.setupContext||=nv(t)}function ig(e){return af(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ag=!0;function og(e){let t=ug(e),n=e.proxy,r=e.ctx;ag=!1,t.beforeCreate&&cg(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:b,render:x,renderTracked:S,renderTriggered:C,errorCaptured:w,serverPrefetch:T,expose:E,inheritAttrs:D,components:ee,directives:te,filters:O}=t;if(l&&sg(l,r,null),o)for(let e in o){let t=o[e];lf(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);ff(t)&&(e.data=lm(t))}if(ag=!0,a)for(let e in a){let t=a[e],i=ov({get:lf(t)?t.bind(n,n):lf(t.get)?t.get.bind(n,n):Xd,set:!lf(t)&&lf(t.set)?t.set.bind(n):Xd});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)lg(s[e],r,n,e);if(c){let e=lf(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{oh(t,e[t])})}u&&cg(u,e,`c`);function k(e,t){af(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(Ph,d),k(Fh,f),k(Ih,p),k(Lh,m),k(Oh,h),k(kh,g),k(Uh,w),k(Hh,S),k(Vh,C),k(Rh,v),k(zh,b),k(Bh,T),af(E)){if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}x&&e.render===Xd&&(e.render=x),D!=null&&(e.inheritAttrs=D),ee&&(e.components=ee),te&&(e.directives=te),T&&xh(e)}function sg(e,t,n=Xd){af(e)&&(e=hg(e));for(let n in e){let r=e[n],i;i=ff(r)?`default`in r?sh(r.from||n,r.default,!0):sh(r.from||n):sh(r),xm(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function cg(e,t,n){Fm(af(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function lg(e,t,n,r){let i=r.includes(`.`)?ph(n,r):()=>n[r];if(uf(e)){let n=t[e];lf(n)&&uh(i,n)}else if(lf(e))uh(i,e.bind(n));else if(ff(e)){if(af(e))e.forEach(e=>lg(e,t,n,r));else{let r=lf(e.handler)?e.handler.bind(n):t[e.handler];lf(r)&&uh(i,r,e)}}}function ug(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>dg(c,e,o,!0)),dg(c,t,o)),ff(t)&&a.set(t,c),c}function dg(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&dg(e,a,n,!0),i&&i.forEach(t=>dg(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=fg[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var fg={data:pg,props:vg,emits:vg,methods:_g,computed:_g,beforeCreate:gg,created:gg,beforeMount:gg,mounted:gg,beforeUpdate:gg,updated:gg,beforeDestroy:gg,beforeUnmount:gg,destroyed:gg,unmounted:gg,activated:gg,deactivated:gg,errorCaptured:gg,serverPrefetch:gg,components:_g,directives:_g,watch:yg,provide:pg,inject:mg};function pg(e,t){return t?e?function(){return ef(lf(e)?e.call(this,this):e,lf(t)?t.call(this,this):t)}:t:e}function mg(e,t){return _g(hg(e),hg(t))}function hg(e){if(af(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function gg(e,t){return e?[...new Set([].concat(e,t))]:t}function _g(e,t){return e?ef(Object.create(null),e,t):t}function vg(e,t){return e?af(e)&&af(t)?[...new Set([...e,...t])]:ef(Object.create(null),ig(e),ig(t??{})):t}function yg(e,t){if(!e)return t;if(!t)return e;let n=ef(Object.create(null),e);for(let r in t)n[r]=gg(e[r],t[r]);return n}function bg(){return{app:null,config:{isNativeTag:Zd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var xg=0;function Sg(e,t){return function(n,r=null){lf(n)||(n=ef({},n)),r!=null&&!ff(r)&&(r=null);let i=bg(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:xg++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:sv,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&lf(e.install)?(a.add(e),e.install(c,...t)):lf(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||Q(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,rv(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(Fm(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Cg;Cg=c;try{return e()}finally{Cg=t}}};return c}}var Cg=null,wg=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${Sf(t)}Modifiers`]||e[`${wf(t)}Modifiers`];function Tg(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||Jd,i=n,a=t.startsWith(`update:`),o=a&&wg(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>uf(e)?e.trim():e)),o.number&&(i=i.map(Af)));let s,c=r[s=Ef(t)]||r[s=Ef(Sf(t))];!c&&a&&(c=r[s=Ef(wf(t))]),c&&Fm(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Fm(l,e,6,i)}}var Eg=new WeakMap;function Dg(e,t,n=!1){let r=n?Eg:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!lf(e)){let r=e=>{let n=Dg(e,t,!0);n&&(s=!0,ef(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(ff(e)&&r.set(e,null),null):(af(a)?a.forEach(e=>o[e]=null):ef(o,a),ff(e)&&r.set(e,o),o)}function Og(e,t){return!e||!Qd(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),rf(e,t[0].toLowerCase()+t.slice(1))||rf(e,wf(t))||rf(e,t))}function kg(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=nh(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=N_(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=N_(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Ag(s)}}catch(t){__.length=0,Im(t,e,1),_=Q(h_)}let y=_;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some($d)&&(v=jg(v,a)),y=A_(y,v,!1,!0))}return n.dirs&&(y=A_(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&yh(hh(y.type)&&vh(y)||y,n.transition),_=y,nh(g),_}var Ag=e=>{let t;for(let n in e)(n===`class`||n===`style`||Qd(n))&&((t||={})[n]=e[n]);return t},jg=(e,t)=>{let n={};for(let r in e)(!$d(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mg(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ng(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Pg(o,r,n)&&!Og(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Ng(r,o,l):!!o;return!1}function Ng(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Pg(t,e,a)&&!Og(n,a))return!0}return!1}function Pg(e,t,n){let r=e[n],i=t[n];return n===`style`&&ff(r)&&ff(i)?!Kf(r,i):r!==i}function Fg({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Ig={},Lg=()=>Object.create(Ig),Rg=e=>Object.getPrototypeOf(e)===Ig;function zg(e,t,n,r=!1){let i={},a=Lg();e.propsDefaults=Object.create(null),Vg(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:um(i):e.type.props?i:a,e.attrs=a}function Bg(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=_m(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Og(e.emitsOptions,o))continue;let u=t[o];if(c){if(rf(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=Sf(o);i[t]=Hg(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Vg(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!rf(t,a)&&((r=wf(a))===a||!rf(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Hg(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!rf(t,e))&&(delete a[e],l=!0)}l&&kp(e.attrs,`set`,``)}function Vg(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(yf(c))continue;let l=t[c],u;i&&rf(i,u=Sf(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:Og(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=_m(n),r=s||Jd;for(let o=0;o<a.length;o++){let s=a[o];n[s]=Hg(i,t,s,r[s],e,!rf(r,s))}}return o}function Hg(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=rf(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&lf(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=G_(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===wf(n))&&(r=!0))}return r}var Ug=new WeakMap;function Wg(e,t,n=!1){let r=n?Ug:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!lf(e)){let r=e=>{c=!0;let[n,r]=Wg(e,t,!0);ef(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return ff(e)&&r.set(e,Yd),Yd;if(af(a))for(let e=0;e<a.length;e++){let t=Sf(a[e]);Gg(t)&&(o[t]=Jd)}else if(a)for(let e in a){let t=Sf(e);if(Gg(t)){let n=a[e],r=o[t]=af(n)||lf(n)?{type:n}:ef({},n),i=r.type,c=!1,l=!0;if(af(i))for(let e=0;e<i.length;++e){let t=i[e],n=lf(t)&&t.name;if(n===`Boolean`){c=!0;break}n===`String`&&(l=!1)}else c=lf(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||rf(r,`default`))&&s.push(t)}}let l=[o,s];return ff(e)&&r.set(e,l),l}function Gg(e){return e[0]!==`$`&&!yf(e)}var Kg=e=>e===`_`||e===`_ctx`||e===`$stable`,qg=e=>af(e)?e.map(N_):[N_(e)],Jg=(e,t,n)=>{if(t._n)return t;let r=rh((...e)=>qg(t(...e)),n);return r._c=!1,r},Yg=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Kg(n))continue;let i=e[n];if(lf(i))t[n]=Jg(n,i,r);else if(i!=null){let e=qg(i);t[n]=()=>e}}},Xg=(e,t)=>{let n=qg(t);e.slots.default=()=>n},Zg=(e,t,n)=>{for(let r in t)(n||!Kg(r))&&(e[r]=t[r])},Qg=(e,t,n)=>{let r=e.slots=Lg();if(e.vnode.shapeFlag&32){let e=t._;e?(Zg(r,t,n),n&&kf(r,`_`,e,!0)):Yg(t,r)}else t&&Xg(e,t)},$g=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=Jd;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Zg(i,t,n):(a=!t.$stable,Yg(t,i)),o=t}else t&&(Xg(e,t),o={default:1});if(a)for(let e in i)!Kg(e)&&o[e]==null&&delete i[e]},e_=f_;function t_(e){return n_(e)}function n_(e,t){let n=Mf();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Xd,insertStaticContent:m}=e,h=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!T_(e,t)&&(r=fe(e),se(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===Yd&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case m_:g(e,t,n,r);break;case h_:_(e,t,n,r);break;case g_:e??v(t,n,r,o);break;case p_:ee(e,t,n,r,i,a,o,s,c);break;default:d&1?x(e,t,n,r,i,a,o,s,c):d&6?te(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,he)}u!=null&&i?wh(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&wh(e.ref,null,a,e,!0)},g=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},x=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)S(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},S=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,r_(e,c),l,d),_&&ah(e,null,i,`created`),C(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!yf(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&L_(p,i,e)}_&&ah(e,null,i,`beforeMount`);let v=a_(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&e_(()=>{try{p&&L_(p,i,e),v&&g.enter(f),_&&ah(e,null,i,`mounted`)}finally{}},s)},C=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t<r.length;t++)p(e,r[t]);if(i){let n=i.subTree;if(t===n||d_(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;C(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?P_(e[l]):N_(e[l]);h(null,c,t,n,r,i,a,o,s)}},T=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||Jd,m=t.props||Jd,h;if(n&&i_(n,!1),(h=m.onVnodeBeforeUpdate)&&L_(h,n,t,e),f&&ah(t,e,n,`beforeUpdate`),n&&i_(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,r_(t,i),o):s||re(e,t,c,null,n,r,r_(t,i),o,!1),l>0){if(l&16)D(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=p[r],s=m[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else!s&&d==null&&D(c,p,m,n,i);((h=m.onVnodeUpdated)||f)&&e_(()=>{h&&L_(h,n,t,e),f&&ah(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===p_||!T_(c,l)||c.shapeFlag&198)?d(c.el):n;h(c,l,u,null,r,i,a,o,!0)}},D=(e,t,n,r,i)=>{if(t!==n){if(t!==Jd)for(let o in t)!yf(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(yf(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ee=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&o_(e,t,!0)):re(e,t,n,f,a,o,c,l,u)},te=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):O(t,n,r,i,a,o,c):k(e,t,c)},O=(e,t,n,r,i,a,o)=>{let s=e.component=B_(e,r,i);if(Dh(e)&&(s.ctx.renderer=he),Y_(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,A,o),!e.el){let r=s.subTree=Q(h_);_(null,r,t,n),e.placeholder=r.el}}else A(s,e,t,n,i,a,o)},k=(e,t,n)=>{let r=t.component=e.component;if(Mg(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,ne(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},A=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=c_(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{e_(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;i_(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&Of(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&L_(f,s,t,c),i_(e,!0);let p=kg(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),fe(m),e,i,a),t.el=p.el,u===null&&Fg(e,p.el),r&&e_(r,i),(f=t.props&&t.props.onVnodeUpdated)&&e_(()=>L_(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Eh(t);if(i_(e,!1),l&&Of(l),!m&&(o=c&&c.onVnodeBeforeMount)&&L_(o,d,t),i_(e,!0),s&&_e){let t=()=>{e.subTree=kg(e),_e(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=kg(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&e_(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;e_(()=>L_(o,d,e),i)}(t.shapeFlag&256||d&&Eh(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&e_(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new np(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>qm(u),i_(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Bg(e,t.props,r,n),$g(e,t.children,n),_p(),Xm(e),vp()},re=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ae(l,f,n,r,i,a,o,s,c);return}if(p&256){ie(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&de(l,i,a),f!==l&&u(n,f)):d&16?m&16?ae(l,f,n,r,i,a,o,s,c):de(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},ie=(e,t,n,r,i,a,o,s,c)=>{e||=Yd,t||=Yd;let l=e.length,u=t.length,d=Math.min(l,u),f=0;for(;f<d;f++){let r=t[f]=c?P_(t[f]):N_(t[f]);h(e[f],r,n,null,i,a,o,s,c)}l>u?de(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ae=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?P_(t[l]):N_(t[l]);if(T_(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?P_(t[f]):N_(t[f]);if(T_(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)h(null,t[l]=c?P_(t[l]):N_(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)se(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?P_(t[l]):N_(t[l]);e.key!=null&&g.set(e.key,l)}let _,v=0,y=f-m+1,b=!1,x=0,S=Array(y);for(l=0;l<y;l++)S[l]=0;for(l=p;l<=d;l++){let r=e[l];if(v>=y){se(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=m;_<=f;_++)if(S[_-m]===0&&T_(r,t[_])){u=_;break}u===void 0?se(r,i,a,!0):(S[u-m]=l+1,u>=x?x=u:b=!0,h(r,t[u],n,null,i,a,o,s,c),v++)}let C=b?s_(S):Yd;for(_=C.length-1,l=y-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1<u?f.el||u_(f):r;S[l]===0?h(null,d,n,p,i,a,o,s,c):b&&(_<0||l!==C[_]?oe(d,n,p,2):_--)}}},oe=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){oe(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,he);return}if(c===p_){r(s,t,n);for(let e=0;e<u.length;e++)oe(u[e],t,n,a);r(e.anchor,t,n);return}if(c===g_){y(e,t,n);return}if(a!==2&&d&1&&l){if(a===0)l.persisted&&!s[gh]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),e_(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[gh];s._isLeaving&&s[gh](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}}else r(s,t,n)},se=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(_p(),wh(s,null,n,e,!0),vp()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Eh(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&L_(_,t,e),u&6)ue(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&ah(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,he,r):l&&!l.hasOnce&&(a!==p_||d>0&&d&64)?de(l,t,n,!1,!0):(a===p_&&d&384||!i&&u&16)&&de(c,t,n),r&&ce(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&e_(()=>{_&&L_(_,t,e),h&&ah(e,null,t,`unmounted`),v&&(e.el=null)},n)},ce=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===p_){le(n,r);return}if(t===g_){b(e),a&&!a.persisted&&a.afterLeave&&a.afterLeave();return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},le=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},ue=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;l_(c),l_(l),r&&Of(r),i.stop(),a?(a.flags|=8,se(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,se(o,e,t,n)),s&&e_(s,t),e_(()=>{e.isUnmounted=!0},t)},de=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)se(e[o],t,n,r,i)},fe=e=>{if(e.shapeFlag&6)return fe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[mh];return n?f(n):t},pe=!1,me=(e,t,n)=>{let r;e==null?t._vnode&&(se(t._vnode,null,null,!0),r=t._vnode.component):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,pe||=(pe=!0,Xm(r),Zm(),!1)},he={p:h,um:se,m:oe,r:ce,mt:O,mc:w,pc:re,pbc:E,n:fe,o:e},ge,_e;return t&&([ge,_e]=t(he)),{render:me,hydrate:ge,createApp:Sg(me,ge)}}function r_({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function i_({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function a_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function o_(e,t,n=!1){let r=e.children,i=t.children;if(af(r)&&af(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=P_(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&o_(t,a)),a.type===m_&&(a.patchFlag===-1&&(a=i[e]=P_(a)),a.el=t.el),a.type===h_&&!a.el&&(a.el=t.el)}}function s_(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function c_(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:c_(t)}function l_(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function u_(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?u_(t.subTree):null}var d_=e=>e.__isSuspense;function f_(e,t){t&&t.pendingBranch?af(e)?t.effects.push(...e):t.effects.push(e):Ym(e)}var p_=Symbol.for(`v-fgt`),m_=Symbol.for(`v-txt`),h_=Symbol.for(`v-cmt`),g_=Symbol.for(`v-stc`),__=[],v_=null;function Y(e=!1){__.push(v_=e?null:[])}function y_(){__.pop(),v_=__[__.length-1]||null}var b_=1;function x_(e,t=!1){b_+=e,e<0&&v_&&t&&(v_.hasOnce=!0)}function S_(e){return e.dynamicChildren=b_>0?v_||Yd:null,y_(),b_>0&&v_&&v_.push(e),e}function X(e,t,n,r,i,a){return S_(Z(e,t,n,r,i,a,!0))}function C_(e,t,n,r,i){return S_(Q(e,t,n,r,i,!0))}function w_(e){return e?e.__v_isVNode===!0:!1}function T_(e,t){return e.type===t.type&&e.key===t.key}var E_=({key:e})=>e??null,D_=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:uf(e)||xm(e)||lf(e)?{i:eh,r:e,k:t,f:!!n}:e);function Z(e,t=null,n=null,r=0,i=null,a=e===p_?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&E_(t),ref:t&&D_(t),scopeId:th,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:eh};return s?(F_(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=uf(n)?8:16),b_>0&&!o&&v_&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&v_.push(c),c}var Q=O_;function O_(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Kh)&&(e=h_),w_(e)){let r=A_(e,t,!0);return n&&F_(r,n),b_>0&&!a&&v_&&(r.shapeFlag&6?v_[v_.indexOf(e)]=r:v_.push(r)),r.patchFlag=-2,r}if(av(e)&&(e=e.__vccOpts),t){t=k_(t);let{class:e,style:n}=t;e&&!uf(e)&&(t.class=Rf(e)),ff(n)&&(gm(n)&&!af(n)&&(n=ef({},n)),t.style=Nf(n))}let o=uf(e)?1:d_(e)?128:hh(e)?64:ff(e)?4:lf(e)?2:0;return Z(e,t,n,r,i,o,a,!0)}function k_(e){return e?gm(e)||Rg(e)?ef({},e):e:null}function A_(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?I_(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&E_(l),ref:t&&t.ref?n&&a?af(a)?a.concat(D_(t)):[a,D_(t)]:D_(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==p_?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&A_(e.ssContent),ssFallback:e.ssFallback&&A_(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&yh(u,c.clone(u)),u}function j_(e=` `,t=0){return Q(m_,null,e,t)}function M_(e,t){let n=Q(g_,null,e);return n.staticCount=t,n}function $(e=``,t=!1){return t?(Y(),C_(h_,null,e)):Q(h_,null,e)}function N_(e){return e==null||typeof e==`boolean`?Q(h_):af(e)?Q(p_,null,e.slice()):w_(e)?P_(e):Q(m_,null,String(e))}function P_(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:A_(e)}function F_(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(af(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),F_(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Rg(t)?t._ctx=eh:r===3&&eh&&(eh.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(lf(t)){if(r&65){F_(e,{default:t});return}t={default:t,_ctx:eh},n=32}else t=String(t),r&64?(n=16,t=[j_(t)]):n=8;e.children=t,e.shapeFlag|=n}function I_(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=Rf([t.class,r.class]));else if(e===`style`)t.style=Nf([t.style,r.style]);else if(Qd(e)){let n=t[e],i=r[e];i&&n!==i&&!(af(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!$d(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function L_(e,t,n,r=null){Fm(e,t,7,[n,r])}var R_=bg(),z_=0;function B_(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||R_,a={uid:z_++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Qf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wg(r,i),emitsOptions:Dg(r,i),emit:null,emitted:null,propsDefaults:Jd,inheritAttrs:r.inheritAttrs,ctx:Jd,data:Jd,props:Jd,attrs:Jd,slots:Jd,refs:Jd,setupState:Jd,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Tg.bind(null,a),e.ce&&e.ce(a),a}var V_=null,H_=()=>V_||eh,U_,W_;{let e=Mf(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};U_=t(`__VUE_INSTANCE_SETTERS__`,e=>V_=e),W_=t(`__VUE_SSR_SETTERS__`,e=>J_=e)}var G_=e=>{let t=V_;return U_(e),e.scope.on(),()=>{e.scope.off(),U_(t)}},K_=()=>{V_&&V_.scope.off(),U_(null)};function q_(e){return e.vnode.shapeFlag&4}var J_=!1;function Y_(e,t=!1,n=!1){t&&W_(t);let{props:r,children:i}=e.vnode,a=q_(e);zg(e,r,a,t),Qg(e,i,n||t);let o=a?X_(e,t):void 0;return t&&W_(!1),o}function X_(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,tg);let{setup:r}=n;if(r){_p();let n=e.setupContext=r.length>1?nv(e):null,i=G_(e),a=Pm(r,e,0,[e.props,n]),o=pf(a);if(vp(),i(),(o||e.sp)&&!Eh(e)&&xh(e),o){if(a.then(K_,K_),t)return a.then(n=>{W_(!0);try{Z_(e,n,t)}finally{W_(!1)}}).catch(t=>{Im(t,e,0)});e.asyncDep=a}else Z_(e,a,t)}else ev(e,t)}function Z_(e,t,n){lf(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ff(t)&&(e.setupState=Tm(t)),ev(e,n)}var Q_,$_;function ev(e,t,n){let r=e.type;if(!e.render){if(!t&&Q_&&!r.render){let t=r.template||ug(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Q_(t,ef(ef({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||Xd,$_&&$_(e)}{let t=G_(e);_p();try{og(e)}finally{vp(),t()}}}var tv={get(e,t){return Op(e,`get`,``),e[t]}};function nv(e){return{attrs:new Proxy(e.attrs,tv),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function rv(e){return e.exposed?e.exposeProxy||=new Proxy(Tm(vm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $h)return $h[n](e)},has(e,t){return t in e||t in $h}}):e.proxy}function iv(e,t=!0){return lf(e)?e.displayName||e.name:e.name||t&&e.__name}function av(e){return lf(e)&&`__vccOpts`in e}var ov=(e,t)=>Dm(e,t,J_),sv=`3.5.43`,cv=void 0,lv=typeof window<`u`&&window.trustedTypes;if(lv)try{cv=lv.createPolicy(`vue`,{createHTML:e=>e})}catch{}var uv=cv?e=>cv.createHTML(e):e=>e,dv=`http://www.w3.org/2000/svg`,fv=`http://www.w3.org/1998/Math/MathML`,pv=typeof document<`u`?document:null,mv=pv&&pv.createElement(`template`),hv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?pv.createElementNS(dv,e):t===`mathml`?pv.createElementNS(fv,e):n?pv.createElement(e,{is:n}):pv.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>pv.createTextNode(e),createComment:e=>pv.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pv.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{mv.innerHTML=uv(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=mv.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},gv=Symbol(`_vtc`);function _v(e,t,n){let r=e[gv];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var vv=Symbol(`_vod`),yv=Symbol(`_vsh`),bv={name:`show`,beforeMount(e,{value:t},{transition:n}){e[vv]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):xv(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),xv(e,!0),r.enter(e)):r.leave(e,()=>{xv(e,!1)}):xv(e,t))},beforeUnmount(e,{value:t}){xv(e,t)}};function xv(e,t){e.style.display=t?e[vv]:`none`,e[yv]=!t}var Sv=Symbol(``),Cv=/(?:^|;)\s*display\s*:/;function wv(e,t,n){let r=e.style,i=uf(n),a=!1;if(n&&!i){if(t){if(uf(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Ev(r,t,``)}else for(let e in t)n[e]??Ev(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Ev(r,i,``):Av(e,i,!uf(t)&&t?t[i]:void 0,o)||Ev(r,i,o)}}else if(i){if(t!==n){let e=r[Sv];e&&(n+=`;`+e),r.cssText=n,a=Cv.test(n)}}else t&&e.removeAttribute(`style`);vv in e&&(e[vv]=a?r.display:``,e[yv]&&(r.display=`none`))}var Tv=/\s*!important$/;function Ev(e,t,n){if(af(n))n.forEach(n=>Ev(e,t,n));else if(n??=``,t.startsWith(`--`))Tv.test(n)?e.setProperty(t,n.replace(Tv,``),`important`):e.setProperty(t,n);else{let r=kv(e,t);Tv.test(n)?e.setProperty(wf(r),n.replace(Tv,``),`important`):e[r]=n}}var Dv=[`Webkit`,`Moz`,`ms`],Ov={};function kv(e,t){let n=Ov[t];if(n)return n;let r=Sf(t);if(r!==`filter`&&r in e)return Ov[t]=r;r=Tf(r);for(let n=0;n<Dv.length;n++){let i=Dv[n]+r;if(i in e)return Ov[t]=i}return t}function Av(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&uf(r)&&n===r}var jv=`http://www.w3.org/1999/xlink`;function Mv(e,t,n,r,i,a=Bf(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(jv,t.slice(6,t.length)):e.setAttributeNS(jv,t,n):n==null||a&&!Vf(n)?e.removeAttribute(t):e.setAttribute(t,a?``:df(n)?String(n):n)}function Nv(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?uv(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Vf(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Pv(e,t,n,r){e.addEventListener(t,n,r)}function Fv(e,t,n,r){e.removeEventListener(t,n,r)}var Iv=Symbol(`_vei`);function Lv(e,t,n,r,i=null){let a=e[Iv]||(e[Iv]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Bv(t);r?Pv(e,n,a[t]=Wv(r,i),s):o&&(Fv(e,n,o,s),a[t]=void 0)}}var Rv=/(Once|Passive|Capture)$/,zv=/^on:?(?:Once|Passive|Capture)$/;function Bv(e){let t,n;for(;(n=e.match(Rv))&&!zv.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):wf(e.slice(2)),t]}var Vv=0,Hv=Promise.resolve(),Uv=()=>Vv||=(Hv.then(()=>Vv=0),Date.now());function Wv(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(af(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&Fm(e,t,5,a)}}else Fm(r,t,5,[e])};return n.value=e,n.attached=Uv(),n}var Gv=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kv=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?_v(e,r,o):t===`style`?wv(e,n,r):Qd(t)?$d(t)||Lv(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):qv(e,t,r,o))?(Nv(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Mv(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Jv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!uf(r)))?Nv(e,Sf(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Mv(e,t,r,o))};function qv(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Gv(t)&&lf(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Gv(t)&&uf(n)?!1:t in e}function Jv(e,t){let n=e._def.props;if(!n)return!1;let r=Sf(t);return Array.isArray(n)?n.some(e=>Sf(e)===r):Object.keys(n).some(e=>Sf(e)===r)}var Yv=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return af(t)?e=>Of(t,e):t},Xv=Symbol(`_assign`),Zv={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Pv(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Af(ey(e)):ey(e)),r=e.multiple,i=r?sf(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?af(i)?t.slice():t:i];try{e[Xv](i)}finally{Gm(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Xv]=Yv(r)},mounted(e,{value:t}){$v(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Xv]=Yv(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Qv(t,n[1],n[0]))&&$v(e,t)}};function Qv(e,t,n){if(!n||af(e))return Kf(e,t);if(sf(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function $v(e,t){let n=e.multiple,r=af(t);if(!n||r||sf(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=ey(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):qf(t,o)>-1}else a.selected=t.has(o)}else if(Kf(ey(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ey(e){return`_value`in e?e._value:e.value}var ty=[`ctrl`,`shift`,`alt`,`meta`],ny={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>ty.some(n=>e[`${n}Key`]&&!t.includes(n))},ry=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ny[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},iy={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},ay=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=wf(n.key);if(t.some(e=>e===r||iy[e]===r))return e(n)}))},oy=ef({patchProp:Kv},hv),sy;function cy(){return sy||=t_(oy)}var ly=((...e)=>{let t=cy().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=dy(e);if(!r)return;let i=t._component;!lf(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,uy(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function uy(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function dy(e){return uf(e)?document.querySelector(e):e}var fy={"circle-check":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512m118-366.3c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8l135.9-187c7.8-10.7 5.4-25.7-5.3-33.5"/></svg>`,"circle-exclamation":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512m0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64m0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"/></svg>`,"circle-xmark":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512m-89-345c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9"/></svg>`,cog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M195.1 9.5c3-14.8 16.1-25.5 31.3-25.5h59.8c15.2 0 28.3 10.7 31.3 25.5l14.5 70c14.1 6 27.3 13.7 39.3 22.8l67.8-22.5c14.4-4.8 30.2 1.2 37.8 14.4l29.9 51.8c7.6 13.2 4.9 29.8-6.5 39.9L447 233.3c.9 7.4 1.3 15 1.3 22.7s-.5 15.3-1.3 22.7l53.4 47.5c11.4 10.1 14 26.8 6.5 39.9L477 417.9c-7.6 13.1-23.4 19.2-37.8 14.4l-67.8-22.5c-12.1 9.1-25.3 16.7-39.3 22.8l-14.4 69.9c-3.1 14.9-16.2 25.5-31.3 25.5h-59.8c-15.2 0-28.3-10.7-31.3-25.5l-14.4-69.9c-14.1-6-27.2-13.7-39.3-22.8l-68.1 22.5c-14.4 4.8-30.2-1.2-37.8-14.4L5.8 366.1c-7.6-13.2-4.9-29.8 6.5-39.9l53.4-47.5c-.9-7.4-1.3-15-1.3-22.7s.5-15.3 1.3-22.7l-53.4-47.5C.9 175.7-1.7 159 5.8 145.9l29.9-51.8c7.6-13.2 23.4-19.2 37.8-14.4l67.8 22.5c12.1-9.1 25.3-16.7 39.3-22.8zM256.3 336a80 80 0 1 0-.6-160 80 80 0 1 0 .6 160"/></svg>`,comment:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M512 240c0 132.5-114.6 240-256 240-37.1 0-72.3-7.4-104.1-20.7L33.5 510.1c-9.4 4-20.2 1.7-27.1-5.8s-8.4-18.5-3.6-27.5l48.8-92.2C19.2 344.3 0 294.3 0 240 0 107.5 114.6 0 256 0s256 107.5 256 240"/></svg>`,"comment-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M51.9 384.9C19.3 344.6 0 294.4 0 240 0 107.5 114.6 0 256 0s256 107.5 256 240-114.6 240-256 240c-36.5 0-71.2-7.2-102.6-20L37 509.9c-3.7 1.6-7.5 2.1-11.5 2.1C11.4 512 0 500.6 0 486.5c0-4.3 1.1-8.5 3.1-12.2zm37.3-30.2c12.2 15.1 14.1 36.1 4.8 53.2L76 441l58.5-25.1c11.8-5.1 25.2-5.2 37.1-.3 25.7 10.5 54.2 16.4 84.3 16.4 117.8 0 208-88.8 208-192S373.8 48 256 48 48 136.8 48 240c0 42.8 15.1 82.4 41.2 114.7"/></svg>`,"face-smile":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512m-90.6-190.1c20.4 28 53.4 46.1 90.6 46.1s70.2-18.1 90.6-46.1c7.8-10.7 22.8-13.1 33.5-5.3s13.1 22.8 5.3 33.5C356.3 390 309.2 416 256 416s-100.3-26-129.4-65.9c-7.8-10.7-5.4-25.7 5.3-33.5s25.7-5.4 33.5 5.3M144 208a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,heart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m241 87.1 15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1v2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7v-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1"/></svg>`,image:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M64 32C28.7 32 0 60.7 0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zm64 80a48 48 0 1 1 0 96 48 48 0 1 1 0-96m144 112c8.4 0 16.1 4.4 20.5 11.5l88 144c4.5 7.4 4.7 16.7.5 24.3S368.7 416 360 416H88c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l26.4 37.8 61.4-100.5c4.4-7.1 12.1-11.5 20.5-11.5z"/></svg>`,"image-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M64 80c-8.8 0-16 7.2-16 16v320c0 8.8 7.2 16 16 16h320c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16zM0 96c0-35.3 28.7-64 64-64h320c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64m136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6.1 24.1S352.6 384 344 384H104c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"/></svg>`,laugh:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512M101.6 314c-3.7-13.7 7.5-26 21.7-26h265.4c14.2 0 25.4 12.3 21.7 26-18.5 68-80.6 118-154.4 118s-136-50-154.4-118M144 192a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,"laugh-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 256a208 208 0 1 0-416 0 208 208 0 1 0 416 0M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m118.3 58.2c-4.2-13.7 7.1-26.2 21.4-26.2h232.6c14.3 0 25.6 12.5 21.4 26.2C375.7 373.1 320.8 416 256 416s-119.7-42.9-137.7-101.8M144 192a32 32 0 1 1 64 0 32 32 0 1 1-64 0m192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64"/></svg>`,"location-arrow":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M477.9 75.5c4.5-11.8 1.7-25.2-7.2-34.1s-22.3-11.8-34.1-7.2l-416 160C7.9 199-.3 211.2 0 224.7s9.1 25.4 21.9 29.6l176.8 58.9L257.6 490c4.3 12.8 16.1 21.6 29.6 21.9s25.7-7.9 30.6-20.5l160-416z"/></svg>`,"magnifying-glass":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.1-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208M208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288"/></svg>`,"paper-plane":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M536.4-26.3c9.8-3.5 20.6-1 28 6.3s9.8 18.2 6.3 28l-178 496.9c-5 13.9-18.1 23.1-32.8 23.1-14.2 0-27-8.6-32.3-21.7l-64.2-158c-4.5-11-2.5-23.6 5.2-32.6l94.5-112.4c5.1-6.1 4.7-15-.9-20.6s-14.6-6-20.6-.9l-112.4 94.3c-9.1 7.6-21.6 9.6-32.6 5.2L38.1 216.8c-13.1-5.3-21.7-18.1-21.7-32.3 0-14.7 9.2-27.8 23.1-32.8z"/></svg>`,reply:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M204.2 18.4c12 5 19.8 16.6 19.8 29.6v80h112c97.2 0 176 78.8 176 176 0 113.3-81.5 163.9-100.2 174.1-2.5 1.4-5.3 1.9-8.1 1.9-10.9 0-19.7-8.9-19.7-19.7 0-7.5 4.3-14.4 9.8-19.5 9.4-8.8 22.2-26.4 22.2-56.7 0-53-43-96-96-96h-96v80c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-160-160c-12.5-12.5-12.5-32.8 0-45.3l160-160c9.2-9.2 22.9-11.9 34.9-6.9z"/></svg>`,spinner:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M208 48a48 48 0 1 1 96 0 48 48 0 1 1-96 0m0 416a48 48 0 1 1 96 0 48 48 0 1 1-96 0M48 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96m368 48a48 48 0 1 1 96 0 48 48 0 1 1-96 0M75 369.1a48 48 0 1 1 67.9 67.9A48 48 0 1 1 75 369.1M75 75a48 48 0 1 1 67.9 67.9A48 48 0 1 1 75 75m362 294.1a48 48 0 1 1-67.9 67.9 48 48 0 1 1 67.9-67.9"/></svg>`,sync:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M65.9 228.5C79.2 135.5 159.3 64 256 64c53 0 101 21.5 135.8 56.2l.6.6 7.6 7.2h-47.9c-17.7 0-32 14.3-32 32s14.3 32 32 32h128c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v53.4l-11.3-10.7C390.5 28.6 326.5 0 256 0 127 0 20.3 95.4 2.6 219.5c-2.5 17.5 9.6 33.7 27.1 36.2s33.7-9.7 36.2-27.1zm443.5 64c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-53 0-101-21.5-135.8-56.2l-.6-.6-7.6-7.2h47.9c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 320c-8.5 0-16.7 3.4-22.7 9.5S-.1 343.7 0 352.3l1 127c.1 17.7 14.6 31.9 32.3 31.7s31.9-14.6 31.7-32.3l-.4-51.5 10.7 10.1C121.6 483.4 185.5 512 256 512c129 0 235.7-95.4 253.4-219.5"/></svg>`,"thumbs-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M384 32c26.5 0 48 21.5 48 48 0 6.3-1.3 12.2-3.4 17.7C449 103.2 464 121.8 464 144c0 9.1-2.6 17.6-7 24.9 22.2 4.2 39 23.7 39 47.1 0 19.7-11.9 36.6-28.9 44 17 7.4 28.9 24.3 28.9 44 0 26.5-21.5 48-48 48H288l28.2 70.4c2.5 6.3 3.8 13.1 3.8 19.9v4.2c0 27.3-22.1 49.4-49.4 49.4-18.7 0-35.8-10.6-44.2-27.3l-56.3-112.3c-6.7-13.3-10.1-28-10.1-42.9V126.8c0-19.4 8.9-37.8 24-50l12.2-9.7C224.6 44.4 259.8 32 296.1 32zM80 96c17.7 0 32 14.3 32 32v256c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32z"/></svg>`,"thumbs-down-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m360 32 7.4.4c35 3.6 62.5 32.2 64.4 67.7 17.8 11.8 30.1 31.4 32 53.9l.2 6c0 5.7-.7 11.2-2 16.5 10.2 11.5 16.8 26.3 17.8 42.7l.2 4.8c0 13.2-3.6 25.4-9.8 36 4.9 8.4 8.2 17.9 9.3 28l.4 8c0 37.3-28.3 67.9-64.6 71.6l-7.4.4H298.2l14.1 30 3.1 7.6c12.5 35.7-1.8 75.5-34.2 95l-7.2 3.9c-37.5 17.6-81.7 3.6-102.6-31.2l-.6-.9-2.7-5-.6-1.2-30.1-64c-9.4 17.8-28 29.9-49.5 29.9h-32c-30.9 0-56-25.1-56-56L0 152c0-30.9 25.1-56 56-56h32c12.4 0 23.9 4.1 33.2 11 13.2-21.4 32-39.4 55-51.6l12.2-6.5.7-.3 6.6-3.2.7-.3 7.1-3c16.7-6.6 34.5-9.9 52.6-9.9zM255.9 80c-12 0-23.9 2.3-35.1 6.6l-4.7 2-5.3 2.6-12.2 6.5c-29.2 15.5-48.3 44.9-50.7 77.6l-.2 8v112.9l.1 4.1c.5 8.2 2.5 16.2 6 23.7l56.8 120.9 2.1 3.8c8.4 13.7 26 19.1 40.8 12.2l2.9-1.6c13-7.8 18.7-23.7 13.7-38l-1.2-3-30.2-64.2c-3.5-7.4-2.9-16.1 1.5-23.1s12-11.1 20.2-11.1h147.5l2.4-.1c11.3-1.1 20.3-10.1 21.4-21.4l.1-2.5c0-7.1-3.1-13.5-8.2-18-5.2-4.6-8.2-11.1-8.2-18s3-13.4 8.2-18c4.4-3.9 7.4-9.3 8-15.3l.2-2.7c0-8.4-4.4-15.9-11.2-20.2-10.7-6.9-14.2-20.9-8-32 1.5-2.6 2.5-5.6 2.9-8.6l.2-3.2c0-10.6-6.9-19.6-16.6-22.8-11.7-3.8-18.7-15.9-16-28 .2-.9.3-1.8.4-2.6l.2-2.6c0-12.4-9.5-22.6-21.6-23.8L360 80zM56 144c-4.4 0-8 3.6-8 8v224c0 4.4 3.6 8 8 8h32c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8z"/></svg>`,"thumbs-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M80 160c17.7 0 32 14.3 32 32v256c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32zM270.6 16c27.3 0 49.4 22.1 49.4 49.4v4.2c0 6.8-1.3 13.6-3.8 19.9L288 160h160c26.5 0 48 21.5 48 48 0 19.7-11.9 36.6-28.9 44 17 7.4 28.9 24.3 28.9 44 0 23.4-16.8 42.9-39 47.1 4.4 7.3 7 15.8 7 24.9 0 22.2-15 40.8-35.4 46.3 2.2 5.5 3.4 11.5 3.4 17.7 0 26.5-21.5 48-48 48h-87.9c-36.3 0-71.6-12.4-99.9-35.1l-12.2-9.7c-15.2-12.1-24-30.5-24-50V198.6c0-14.9 3.5-29.6 10.1-42.9l56.2-112.4c8.4-16.7 25.5-27.3 44.3-27.3"/></svg>`,"thumbs-up-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M171.5 38.8C192.3 4 236.5-10 274 7.6l7.2 3.8C316 32.3 330 76.5 312.4 114l-14.1 30H408l7.4.4c36.3 3.7 64.6 34.4 64.6 71.6 0 13.2-3.6 25.4-9.8 36 6.1 10.6 9.7 22.8 9.8 36 0 18.3-6.9 34.8-18 47.5 1.3 5.3 2 10.8 2 16.5 0 25.1-12.9 47-32.2 59.9-1.9 35.5-29.4 64.2-64.4 67.7l-7.4.4H255.9c-18 0-35.9-3.4-52.6-9.9l-7.1-3-.7-.3-6.6-3.2-.7-.3-12.2-6.5c-12.3-6.5-23.3-14.7-32.9-24.1-4.1 26.9-27.3 47.4-55.3 47.4h-32c-30.9 0-56-25.1-56-56L0 200c0-30.9 25.1-56 56-56h32c10.8 0 20.9 3.1 29.5 8.5L167.6 46l.6-1.2 2.7-5 .6-.9zM56 192c-4.4 0-8 3.6-8 8v224c0 4.4 3.6 8 8 8h32c4.4 0 8-3.6 8-8V200c0-4.4-3.6-8-8-8zM253.6 51c-14.8-6.9-32.3-1.6-40.7 12l-2.2 4-56.8 120.9c-3.5 7.5-5.5 15.5-6 23.7l-.1 4.2v112.9l.2 7.9c2.4 32.7 21.4 62.1 50.7 77.7l11.5 6.1 6.3 3.1c12.4 5.6 25.8 8.5 39.4 8.5H360l2.4-.1c12.1-1.2 21.6-11.5 21.6-23.9l-.2-2.6c-.1-.9-.2-1.7-.4-2.6-2.7-12.1 4.3-24.2 16-28 9.7-3.1 16.6-12.2 16.6-22.8 0-4.3-1.1-8.2-3.1-11.8-6.3-11.1-2.8-25.2 8-32 6.8-4.3 11.2-11.8 11.2-20.2 0-7.1-3.1-13.5-8.2-18-5.2-4.6-8.2-11.1-8.2-18s3-13.4 8.2-18c5.1-4.5 8.2-10.9 8.2-18l-.1-2.4c-1.1-11.3-10.1-20.3-21.4-21.4l-2.4-.1H260.7c-8.2 0-15.8-4.2-20.2-11.1s-5-15.7-1.5-23.1l30-64.3c7-15 1.4-32.7-12.5-41z"/></svg>`,times:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l137.3-137.4 137.4 137.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256l137.3-137.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7z"/></svg>`,trash:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M136.7 5.9C141.1-7.2 153.3-16 167.1-16H281c13.8 0 26 8.8 30.4 21.9L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64s14.3-32 32-32h96zM32 144h384v304c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64zm88 64c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24m104 0c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24m104 0c-13.3 0-24 10.7-24 24v192c0 13.3 10.7 24 24 24s24-10.7 24-24V232c0-13.3-10.7-24-24-24"/></svg>`,"trash-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48H24C10.7 48 0 58.7 0 72s10.7 24 24 24h400c13.3 0 24-10.7 24-24s-10.7-24-24-24h-96L311.8 4.8c-4.7-12.5-16.6-20.8-30-20.8zM32 144v304c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V144h-48v304c0 8.8-7.2 16-16 16H96c-8.8 0-16-7.2-16-16V144zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24v176c0 13.3 10.7 24 24 24s24-10.7 24-24zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24v176c0 13.3 10.7 24 24 24s24-10.7 24-24z"/></svg>`,"user-circle":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"/></svg>`,"window-maximize":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M64 64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zm24 64h336c13.3 0 24 10.7 24 24s-10.7 24-24 24H88c-13.3 0-24-10.7-24-24s10.7-24 24-24"/></svg>`,"window-maximize-regular":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M48 224v160c0 8.8 7.2 16 16 16h384c8.8 0 16-7.2 16-16V224zM0 128c0-35.3 28.7-64 64-64h384c35.3 0 64 28.7 64 64v256c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64z"/></svg>`,android:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M131.2 61.9c5.3-.5 10.6.6 15.3 3s8.6 6.2 11.3 10.8c17 29.5 34.2 58.9 51.2 88.4q5.25-2.1 10.5-3.9c31.3-10.9 64.2-16.6 97.4-16.9h3.2c38.1 0 76.2 7 111.6 21.1L483 75.7c1.8-3.2 4.3-6 7.2-8.2s6.2-3.9 9.8-4.8c3.1-.8 6.4-1.1 9.6-.8 4.2.4 8.3 1.7 11.9 3.8 4 2.4 7.3 5.7 9.7 9.7 2 3.4 3.3 7.2 3.8 11.2s.1 8-1.2 11.7c-.6 1.9-1.4 3.7-2.4 5.5l-49.7 85.8c19.5 12.2 37.6 26.5 53.9 42.8 12.3 12.2 23.5 25.4 33.5 39.5 8.2 11.5 15.6 23.6 22.2 36.2 17.5 33.6 28.6 70.5 32.7 108.1H16c4.1-37.7 15.2-74.5 32.7-108.1 14.5-27.9 33.4-53.5 55.7-75.7 16.5-16.4 34.7-30.9 54.5-43.1l-49.5-85.4c-3.7-6.4-4.7-14.1-2.8-21.2s6.4-13.1 12.7-16.8c3.6-2.2 7.7-3.5 11.9-3.8zm67.3 215.8c-12.2-8.1-30.1-2.5-40.1 12.5s-8.2 33.8 3.9 41.9 30.1 2.5 40.1-12.5 8.2-33.8-3.9-41.9m283.6 12.5c-10-15-27.9-20.6-40.1-12.5s-13.9 26.9-3.9 41.9 27.9 20.6 40.1 12.5 13.9-26.9 3.9-41.9"/></svg>`,apple:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M319.1 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7-55.8.9-115.1 44.5-115.1 133.2 0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"/></svg>`,chrome:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-46.6 12.5-90.4 34.3-128.9l109.8 191.2C166 357.5 207.9 384 256 384c14.3 0 27.1-2.3 40.8-6.6l-76.3 132.2C95.9 492.3 0 385.3 0 256m365.1 65.6c12.3-19.2 18.9-42.5 18.9-65.6 0-38.2-16.8-72.5-43.3-96h152.7c12 29.6 18.6 62.1 18.6 96 0 141.4-114.6 255.1-256 256zM477.8 128H256c-62.9 0-113.7 44.1-125.5 102.7L54.2 98.5C101 38.5 174 0 256 0c94.8 0 177.5 51.5 221.8 128M344 256a88 88 0 1 1-176 0 88 88 0 1 1 176 0"/></svg>`,edge:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M120.1 37.4C161.1 12.2 207.7-.8 255 0c168 0 257 123.8 257 219.5-.1 32.7-13 63.9-35.9 87.2-22.9 23.2-54 36.5-86.7 37-75.2 0-91.5-23.1-91.5-32 0-3.8 1.2-6.2 4.8-9.4l1-1.2.4-1.6c10.5-11.5 15.9-26.2 15.9-41.6 0-78.7-82.2-142.7-184-142.7-37.5-.3-74.5 8.9-107.5 26.9 27-57.5 82.7-97.6 91.3-103.8.8-.6.3-.8.3-.8zm15.6 318.1c-1.4 30 4.6 60 16.4 87.2 13.6 26.4 32.7 51 56.5 69.3-59.5-11.5-111.5-43.9-149.4-89.3C21.1 376.3 0 318.4 0 257.9c0-51.2 62.4-94.4 136-94.4 36.6-.6 72.4 10.9 101.8 32.7l-3.6 1.2c-51.5 17.6-98.5 90.7-98.5 158.1M469.8 400l-.7.1c-11.8 18.8-25.9 35.1-42.2 49.5-30.8 28-68.1 45.5-108.8 49.9-18.6.3-36.8-3.2-53.8-11.4-25.6-10.3-47.1-30-61.6-53-14.4-23.9-21.1-51.7-19-79.6-.6-20.1 5.4-40.3 15-58.2 13.9 33.1 37.5 61.3 67.6 80.8s65.5 29.5 101.4 28.6c31 .3 62.1-6.7 90.2-20.5l1.9-.9c3.9-2.3 7.7-3.9 11.6 0 4.5 4.9 1.8 9.2-1.2 14-.2.2-.3.5-.4.7"/></svg>`,"firefox-browser":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M481.6 172.9c-10.6-25.5-32.1-53-48.9-61.7 13.7 26.9 21.7 53.9 24.7 74 0 .1 0 .3.1.4-27.6-68.8-74.4-96.5-112.6-156.8-15-23.7-10.9-25.2-13.1-24.7l-.1.1c-46.7 26-75.3 78.4-82.6 122.7-16.6.9-32.9 5-47.9 12.1-1.4.6-2.5 1.7-3.1 3s-.9 2.8-.6 4.3c.2.8.6 1.6 1.1 2.3s1.2 1.3 1.9 1.7 1.6.7 2.4.8 1.7 0 2.5-.3l.5-.2c15.5-7.3 32.4-11.2 49.5-11.3 62.8-.6 97.2 44 107.6 62.3-13-9.2-36.4-18.2-58.8-14.3 87.7 43.9 64.2 194.5-57.4 189.2-59.5-2.6-97.1-51-100.5-90.8 0 0 11.2-41.9 80.6-41.9 7.5 0 28.9-20.9 29.3-27-.1-2-42.5-18.9-59.1-35.2-8.8-8.7-13.1-12.9-16.8-16.1q-3-2.55-6.3-4.8c-5.6-19.5-5.8-40-.7-59.6-25.1 11.4-44.6 29.4-58.7 45.4h-.1c-9.7-12.2-9-52.6-8.4-61.1-.1-.5-7.2 3.7-8.2 4.3-8.6 6.1-16.5 12.9-23.8 20.4-16.3 16.6-44.1 50.2-55.5 101.2-4.5 20.4-6.8 44.4-6.8 52.3 0 134.7 109.2 243.9 243.9 243.9 120.6 0 223-87.2 240.4-202.6 11.6-76.7-14.7-131.1-14.7-132z"/></svg>`,"internet-explorer":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M483.1 159.7c10.9-24.6 21.4-60.4 21.4-87.9 0-72.7-79.6-98.4-209.7-38.6C187.2 26 83.6 106.9 57.7 219.7c30.9-34.9 78.3-82.3 122-101.2C125.4 166.8 79.1 227.9 44 291.7c-20.7 37.9-44 99.2-44 145 0 98.6 92.9 86.5 180.3 42 31.4 15.4 66.6 15.6 101.7 15.6 97.1 0 184.2-54.3 216.8-146H378c-52.5 88.6-196.8 53-196.8-47.4H510c6.4-43.6-1.7-95.7-26.9-141.2M64.6 346.9c17.7 51.1 53.7 95.8 100.2 123.3C76.1 519.1-8.4 499.3 64.6 346.9M180.5 238c2-55.2 50.3-94.9 104-94.9 53.4 0 102 39.7 104 94.9zM365.1 50.4c21.4-10.3 48.6-22 72.6-22 31.4 0 54.3 21.7 54.3 53.7 0 20-7.4 49-14.6 67.9-26.3-42.3-66-81.6-112.3-99.6"/></svg>`,linux:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M220.9 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7M199 125c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4m221 278.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7M223.8 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8m-40.7-11.5c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1m-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3q-2.1-7.35 4.2-12.3m3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9m-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2m257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6M173.4 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1M338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"/></svg>`,safari:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="m274.7 274.7-37.4-37.4L166 346zM256 8a248 248 0 1 0 0 496 248 248 0 1 0 0-496m155.8 174.8 14.8-6.1c1-.4 2-.6 3.1-.6s2.1.2 3.1.6 1.8 1 2.6 1.7 1.3 1.6 1.7 2.6.6 2 .6 3.1-.2 2.1-.6 3.1-1 1.9-1.7 2.6-1.6 1.3-2.6 1.7l-14.8 6.1c-2 .8-4.2.8-6.1 0s-3.5-2.4-4.3-4.3-.8-4.2 0-6.1 2.4-3.5 4.3-4.3zM314.4 94l6.1-14.8c.8-2 2.4-3.5 4.3-4.3s4.2-.8 6.1 0 3.5 2.4 4.3 4.3.8 4.2 0 6.1l-6.1 14.8c-.8 2-2.4 3.5-4.3 4.3s-4.2.8-6.1 0c-1-.4-1.9-1-2.6-1.7s-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1zM256 60c2.1 0 4.2.8 5.7 2.3s2.3 3.6 2.3 5.7v16c0 2.1-.8 4.2-2.3 5.7S258.2 92 256 92s-4.2-.8-5.7-2.3-2.3-3.5-2.3-5.7V68c0-2.1.8-4.2 2.3-5.7s3.6-2.3 5.7-2.3m-75 14.9c1-.4 2-.6 3.1-.6s2.1.2 3.1.6 1.9 1 2.6 1.7 1.3 1.6 1.7 2.6l6.1 14.8c.4 1 .7 2 .7 3.1s-.2 2.1-.6 3.1-1 1.9-1.7 2.6-1.6 1.4-2.6 1.8-2 .6-3.1.6-2.1-.2-3.1-.6-1.9-1-2.6-1.8-1.3-1.7-1.7-2.7l-6.1-14.8c-.8-2-.8-4.2 0-6.1s2.4-3.5 4.3-4.3zm-63.6 42.5c1.5-1.5 3.5-2.3 5.7-2.3s4.2.8 5.7 2.3l11.2 11.3c1.5 1.5 2.3 3.5 2.3 5.6s-.8 4.1-2.3 5.6-3.5 2.3-5.7 2.3-4.2-.8-5.7-2.3l-11.3-11.3c-1.5-1.5-2.3-3.5-2.3-5.6s.8-4.1 2.3-5.6zM60 256c0-2.1.8-4.2 2.3-5.7s3.6-2.3 5.7-2.3h16c2.1 0 4.2.8 5.7 2.3s2.3 3.5 2.3 5.7-.8 4.2-2.3 5.7-3.5 2.3-5.7 2.3H68c-2.1 0-4.2-.8-5.7-2.3S60 258.1 60 256m40.2 73.2-14.8 6.1c-1 .4-2 .6-3.1.6s-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1 1-1.9 1.7-2.6 1.6-1.3 2.6-1.7l14.8-6.1c2-.8 4.2-.8 6.1 0s3.5 2.4 4.3 4.3.8 4.2 0 6.1-2.4 3.5-4.3 4.3zm4.3-136c-.4 1-1 1.9-1.7 2.6s-1.6 1.3-2.6 1.7-2 .6-3.1.6-2.1-.2-3.1-.6l-14.8-6.1c-2-.8-3.5-2.4-4.3-4.3s-.8-4.2 0-6.1 2.4-3.5 4.3-4.3 4.2-.8 6.1 0l14.8 6.1c2 .8 3.5 2.4 4.3 4.3s.8 4.2 0 6.1zM197.6 418l-6.1 14.8c-.4 1-1 1.9-1.7 2.6s-1.6 1.3-2.6 1.7-2 .6-3.1.6-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6-.6-2-.6-3.1.2-2.1.6-3.1l6.1-14.8c.4-1 1-1.9 1.7-2.7s1.6-1.4 2.6-1.8 2-.6 3.1-.6 2.1.2 3.1.6 1.9 1 2.6 1.8 1.3 1.7 1.7 2.6.6 2 .6 3.1-.2 2.1-.7 3.1zm66.4 26c0 2.1-.8 4.2-2.3 5.7s-3.5 2.3-5.7 2.3-4.2-.8-5.7-2.3-2.3-3.5-2.3-5.7v-16c0-2.1.8-4.2 2.3-5.7s3.5-2.3 5.7-2.3 4.2.8 5.7 2.3 2.3 3.5 2.3 5.7zm67-6.9c-1 .4-2 .6-3.1.6s-2.1-.2-3.1-.6-1.9-1-2.6-1.7-1.3-1.6-1.7-2.6l-6.1-14.8c-.8-2-.8-4.2 0-6.1s2.4-3.5 4.3-4.3 4.2-.8 6.1 0 3.5 2.4 4.3 4.3l6.1 14.8c.8 2 .8 4.2 0 6.1s-2.4 3.5-4.3 4.3zm63.6-42.5c-1.5 1.5-3.5 2.3-5.7 2.3s-4.2-.8-5.7-2.3L372 383.3c-1.5-1.5-2.3-3.5-2.3-5.6s.8-4.1 2.3-5.6 3.5-2.3 5.7-2.3 4.2.8 5.7 2.3l11.3 11.3c1.5 1.5 2.3 3.5 2.3 5.6s-.8 4.1-2.3 5.6zM286.2 286.2 110.3 401.7l115.5-175.9 175.9-115.5zM437.1 331c-.8 2-2.4 3.5-4.3 4.3s-4.2.8-6.1 0l-14.8-6.1c-2-.8-3.5-2.4-4.3-4.3s-.8-4.2 0-6.1c.4-1 1-1.9 1.7-2.6s1.6-1.3 2.6-1.7 2-.6 3.1-.6 2.1.2 3.1.6l14.8 6.1c2 .8 3.5 2.4 4.3 4.3s.8 4.2 0 6.1zm6.9-67h-16c-2.1 0-4.2-.8-5.7-2.3s-2.3-3.5-2.3-5.7.8-4.2 2.3-5.7 3.5-2.3 5.7-2.3h16c2.1 0 4.2.8 5.7 2.3s2.3 3.5 2.3 5.7-.8 4.2-2.3 5.7-3.5 2.3-5.7 2.3"/></svg>`,ubuntu:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M469.2 75c0-20.1-8-39.3-22.2-53.5S413.6-.7 393.5-.7s-39.3 8-53.5 22.2-22.2 33.4-22.2 53.5 8 39.3 22.1 53.5 33.4 22.1 53.5 22.1 39.3-8 53.5-22.1S469 95.1 469 75h.1zm-315 165.7a75.6 75.6 0 1 0-151.2 0 75.6 75.6 0 1 0 151.2 0M57 346c18.6 46.9 51 87 93 115.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2-6.8-.9-13.3-2.1-19.5-3.4-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0-151.2 0 75.6 75.6 0 1 0 151.2 0m-8.1-84.2c18.5 14.8 31.6 35.2 37.2 58.2 33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6 15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3 16.6-24.2 38.9-44.1 64.8-58s54.8-21.3 84.2-21.7c.2-5.9.9-11.9 2-17.7C290.8 35.6 298.3 20 309 6.8c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3 7.5 0 15 .8 22.4 2.3z"/></svg>`,windows:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="m0 93.7 183.6-25.3v177.4H0zm0 324.6 183.6 25.3V268.4H0zm203.8 28L448 480V268.4H203.8zm0-380.6v180.1H448V32z"/></svg>`},py=[`innerHTML`],my=bh({__name:`TkIcon`,props:{name:{}},setup(e){let t=e,n=ov(()=>fy[t.name]||(console.warn(`[twikoo] 未注册的图标: ${t.name}(请在 components/icons.ts 登记)`),``));return(e,t)=>(Y(),X(p_,null,[$(` SVG 内容来自 fontawesome-free 官方文件(构建期内联,非运行时注入用户数据) `),$(` eslint-disable-next-line vue/no-v-html `),Z(`i`,{class:`tk-icon`,innerHTML:n.value},null,8,py)],2112))}}),hy={class:`tk-action`},gy={class:`tk-action-icon`},_y={class:`tk-action-icon tk-action-icon-solid`},vy={class:`tk-action-icon`},yy={class:`tk-action-icon tk-action-icon-solid`},by={class:`tk-action-count`},xy={class:`tk-action-icon`},Sy={class:`tk-action-icon tk-action-icon-solid`},Cy={class:`tk-action-count`},wy={class:`tk-action-icon`},Ty={class:`tk-action-icon tk-action-icon-solid`},Ey={class:`tk-action-count`},Dy=bh({__name:`TkAction`,props:{liked:{type:Boolean,default:!1},disliked:{type:Boolean,default:!1},likeCount:{default:0},dislikeCount:{default:0},repliesCount:{default:0},showDislike:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!1}},emits:[`like`,`dislike`,`reply`,`delete`],setup(e,{emit:t}){let n=e,r=t,i=ov(()=>n.likeCount>0?`${n.likeCount}`:``),a=ov(()=>n.dislikeCount>0?`${n.dislikeCount}`:``),o=ov(()=>n.repliesCount>0?`${n.repliesCount}`:``);return(t,n)=>(Y(),X(`div`,hy,[e.showDelete?(Y(),X(`button`,{key:0,class:`tk-action-link`,onClick:n[0]||=e=>r(`delete`)},[Z(`span`,gy,[Q(my,{name:`trash-regular`})]),Z(`span`,_y,[Q(my,{name:`trash`})]),n[4]||=Z(`span`,{class:`tk-action-count`},null,-1)])):$(`v-if`,!0),Z(`button`,{class:Rf([`tk-action-link`,{"tk-liked":e.liked}]),onClick:n[1]||=e=>r(`like`)},[Z(`span`,vy,[Q(my,{name:`thumbs-up-regular`})]),Z(`span`,yy,[Q(my,{name:`thumbs-up`})]),Z(`span`,by,K(i.value),1)],2),e.showDislike?(Y(),X(`button`,{key:1,class:Rf([`tk-action-link`,{"tk-disliked":e.disliked}]),onClick:n[2]||=e=>r(`dislike`)},[Z(`span`,xy,[Q(my,{name:`thumbs-down-regular`})]),Z(`span`,Sy,[Q(my,{name:`thumbs-down`})]),Z(`span`,Cy,K(a.value),1)],2)):$(`v-if`,!0),Z(`button`,{class:`tk-action-link`,onClick:n[3]||=e=>r(`reply`)},[Z(`span`,wy,[Q(my,{name:`comment-regular`})]),Z(`span`,Ty,[Q(my,{name:`comment`})]),Z(`span`,Ey,K(o.value),1)])]))}}),Oy={},ky={key:0,class:`tk-avatar-img`},Ay=[`src`],jy=bh({__name:`TkAvatar`,props:{nick:{default:``},avatar:{default:``},mail:{default:``},mailMd5:{default:``},link:{default:``},config:{default:Oy}},setup(e){let t=e,n=ov(()=>cl({avatar:t.avatar,mailMd5:t.mailMd5,mail:t.mail,nick:t.nick},t.config));function r(){t.link&&window.open(Ed(t.link),`_blank`)?.focus()}return(t,i)=>(Y(),X(`div`,{class:Rf([`tk-avatar`,{"tk-clickable":!!e.link,"tk-has-avatar":!!n.value}]),onClick:r},[n.value?(Y(),X(`img`,{key:1,class:`tk-avatar-img`,src:n.value,alt:``},null,8,Ay)):(Y(),X(`div`,ky,[Q(my,{name:`user-circle`})]))],2))}}),My={key:0,class:`tk-input-group__prepend`},Ny=[`name`,`value`,`placeholder`,`rows`,`disabled`,`readonly`,`maxlength`],Py=[`type`,`name`,`value`,`placeholder`,`disabled`,`readonly`,`maxlength`,`min`,`max`],Fy={key:3,class:`tk-input__suffix`},Iy={key:4,class:`tk-input__count`},Ly={key:5,class:`tk-input-group__append`},Ry=bh({__name:`TkInput`,props:{modelValue:{default:``},type:{default:`text`},placeholder:{default:``},rows:{default:2},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{default:void 0},showWordLimit:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},size:{default:``},name:{default:``},min:{default:void 0},max:{default:void 0}},emits:[`update:modelValue`,`input`,`change`,`blur`,`focus`,`clear`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=ng(),o=q(),s=ov(()=>!!a.prepend),c=ov(()=>!!a.append),l=ov(()=>r.clearable&&!r.disabled&&!r.readonly&&u.value),u=ov(()=>r.modelValue!==``&&r.modelValue!==void 0&&r.modelValue!==null),d=ov(()=>String(r.modelValue??``).length);function f(e){let t=e.target.value;i(`update:modelValue`,t),i(`input`,t,e)}function p(e){i(`change`,e.target.value)}function m(e){i(`blur`,e)}function h(e){i(`focus`,e)}function g(){i(`update:modelValue`,``),i(`clear`),o.value?.focus()}function _(){o.value?.focus()}function v(){o.value?.blur()}function y(){let e=o.value;if(r.type!==`textarea`||!r.autosize||!(e instanceof HTMLTextAreaElement))return;let t=typeof r.autosize==`object`?r.autosize.minRows??r.rows:r.rows,n=getComputedStyle(e),i=parseFloat(n.lineHeight)||20,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),c=t*i+a+s;e.style.overflow=`hidden`,e.style.height=`auto`,e.style.height=`${Math.max(e.scrollHeight,c)}px`}return uh(()=>r.modelValue,()=>{Gm(y)}),Fh(()=>{Gm(y)}),t({focus:_,blur:v,inputEl:o}),(t,n)=>(Y(),X(`div`,{class:Rf([`tk-input`,[e.size?`tk-input--${e.size}`:``,e.type===`textarea`?`tk-textarea`:``,{"is-disabled":e.disabled,"tk-input--group":s.value||c.value}]])},[s.value?(Y(),X(`div`,My,[Xh(t.$slots,`prepend`)])):$(`v-if`,!0),e.type===`textarea`?(Y(),X(`textarea`,{key:1,ref_key:`inputRef`,ref:o,class:`tk-input__inner tk-textarea__inner`,name:e.name,value:e.modelValue,placeholder:e.placeholder,rows:e.rows,disabled:e.disabled,readonly:e.readonly,maxlength:e.maxlength,onInput:f,onChange:p,onBlur:m,onFocus:h},null,40,Ny)):(Y(),X(`input`,{key:2,ref_key:`inputRef`,ref:o,class:`tk-input__inner`,type:e.type,name:e.name,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,maxlength:e.maxlength,min:e.min,max:e.max,onInput:f,onChange:p,onBlur:m,onFocus:h},null,40,Py)),l.value?(Y(),X(`span`,Fy,[e.clearable&&!e.disabled&&!e.readonly&&u.value?(Y(),X(`i`,{key:0,class:`tk-input__icon tk-input__clear`,onClick:g},[Q(my,{name:`circle-xmark`})])):$(`v-if`,!0)])):$(`v-if`,!0),e.showWordLimit&&e.maxlength?(Y(),X(`span`,Iy,K(d.value)+`/`+K(e.maxlength),1)):$(`v-if`,!0),c.value?(Y(),X(`div`,Ly,[Xh(t.$slots,`append`)])):$(`v-if`,!0)],2))}}),zy=new Map,By=`configUpdated`,Vy=`initMeta`,Hy=`showAdminEntry`;function Uy(e,t){let n=zy.get(e)??new Set;n.add(t),zy.set(e,n)}function Wy(e,t){zy.get(e)?.delete(t)}function Gy(e,...t){for(let n of zy.get(e)??[])n(...t)}var Ky={class:`tk-meta-input`},qy=bh({__name:`TkMetaInput`,props:{nick:{default:``},mail:{default:``},link:{default:``},config:{default:Oy}},emits:[`update`,`validate`],setup(e,{emit:t}){let n=/^[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])?)*$/,r=e,i=t,a=[{key:`nick`,locale:W(`META_INPUT_NICK`),name:`nick`,type:`text`},{key:`mail`,locale:W(`META_INPUT_MAIL`),name:`mail`,type:`email`},{key:`link`,locale:W(`META_INPUT_LINK`),name:`link`,type:`text`}],o=lm({nick:``,mail:``,link:``}),s=ov(()=>r.config??{}),c=ov(()=>{let e=s.value.DISPLAYED_FIELDS,t=typeof e==`string`?e:void 0;return{nick:!t||t.indexOf(`nick`)!==-1,mail:!t||t.indexOf(`mail`)!==-1,link:!t||t.indexOf(`link`)!==-1}}),l=ov(()=>a.filter(e=>!!c.value[e.key])),u=ov(()=>{let e=s.value.REQUIRED_FIELDS,t=typeof e==`string`?e:void 0;return{nick:!t||t.indexOf(`nick`)!==-1,mail:!t||t.indexOf(`mail`)!==-1,link:t?t.indexOf(`link`)!==-1:!1}});function d(){let e=n.test(o.mail);return(!!o.nick||!u.value.nick)&&(e||!u.value.mail)&&(!!o.link||!u.value.link)}function f(){localStorage.setItem(`twikoo`,JSON.stringify(o)),i(`update`,{meta:{...o},valid:d()})}function p(e,t){let n=t.target.name;n&&(o[n]=e,i(`validate`,d()))}function m(){let e=localStorage.getItem(`twikoo`),t={};if(e)try{t=JSON.parse(e)}catch{t={}}o.nick=t.nick??r.nick??``,o.mail=t.mail??r.mail??``,o.link=t.link??r.link??``,f()}function h(){if(!Td(o.nick))return;let e=o.nick.replace(/@qq\.com/gi,``);o.mail=`${e}@qq.com`,_(e)}function g(){Td(o.nick)&&(o.nick=``,f())}async function _(e){try{let t=await Lo(null,`GET_QQ_NICK`,{qq:e}),n=t.result??t;n.nick?(o.nick=n.nick,f()):g()}catch(e){console.warn(`获取 QQ 昵称失败:`,e),g()}}function v(){let e=s.value.HIDE_ADMIN_CRYPT;Gy(Hy,!e||e===o.nick)}function y(){h(),f(),v()}function b(){r.nick!==void 0&&o.nick!==r.nick&&(o.nick=r.nick),r.mail!==void 0&&o.mail!==r.mail&&(o.mail=r.mail),r.link!==void 0&&o.link!==r.link&&(o.link=r.link)}return uh(()=>[r.nick,r.mail,r.link],b),uh(u,()=>{i(`validate`,d())}),uh(()=>s.value.VERSION,()=>{v()}),Fh(()=>{Uy(Vy,m),m()}),zh(()=>{Wy(Vy,m)}),(e,t)=>(Y(),X(`div`,Ky,[(Y(!0),X(p_,null,Yh(l.value,e=>(Y(),C_(Ry,{key:e.key,class:`tk-meta-input__item`,name:e.name,type:e.type,"model-value":o[e.key],placeholder:u.value[e.key]?J(W)(`META_INPUT_REQUIRED`):J(W)(`META_INPUT_NOT_REQUIRED`),size:`small`,onInput:p,onChange:y},{prepend:rh(()=>[j_(K(e.locale),1)]),_:2},1032,[`name`,`type`,`model-value`,`placeholder`]))),128))]))}}),Jy=[`disabled`,`type`],Yy={class:`tk-button__label`},Xy=bh({__name:`TkButton`,props:{type:{default:`default`},size:{default:``},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},nativeType:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;function i(e){n.disabled||n.loading||r(`click`,e)}return(t,n)=>(Y(),X(`button`,{class:Rf([`tk-button`,[e.type==="default"?``:`tk-button--${e.type}`,e.size?`tk-button--${e.size}`:``,{"is-disabled":e.disabled,"is-loading":e.loading}]]),disabled:e.disabled||e.loading,type:e.nativeType,onClick:i},[e.loading?(Y(),C_(my,{key:0,name:`spinner`,class:`tk-button__spinner`})):$(`v-if`,!0),Z(`span`,Yy,[Xh(t.$slots,`default`)])],10,Jy))}}),Zy={logo:`OwO表情`,position:`down`,maxHeight:`250px`,odata:{}},Qy=class{container;target;odata;packagesEle;logo;area;packages;preview;constructor(e){for(let[t,n]of Object.entries(Zy))n&&!e[t]&&(e[t]=n);this.container=e.container,this.target=e.target,e.position===`up`&&this.container.classList.add(`OwO-up`),this.odata=e.odata,setTimeout(()=>{this.init(e)})}init(e){this.area=e.target,this.packages=Object.keys(this.odata),this.logo=document.createElement(`div`),this.logo.className=`OwO-logo`,this.logo.appendChild(Tc.sanitize(e.logo??``,{RETURN_DOM_FRAGMENT:!0}));let t=document.createElement(`div`);t.className=`OwO-body`;let n=document.createElement(`div`);n.className=`OwO-bar`,this.packagesEle=document.createElement(`ul`),this.packagesEle.className=`OwO-packages`,n.appendChild(this.packagesEle),t.appendChild(n),this.container.replaceChildren(this.logo,t);let r=document.createElement(`template`);for(let i of this.packages){let a=this.odata[i],o=document.createElement(`ul`);o.className=`OwO-items OwO-items-${a?.type??``}`,o.style.maxHeight=`${parseInt(e.maxHeight??`250`,10)-53}px`;for(let e of a?.container??[]){let t=document.createElement(`li`);t.className=`OwO-item`,t.title=e.text??``,r.innerHTML=Tc.sanitize(e.icon);let n=r.content.querySelector(`img`);if(n){let r=document.createElement(`img`);n.src&&Tc.isValidAttribute(`img`,`src`,n.src)&&(r.src=n.src),r.className=n.className,r.classList.add(`tk-owo-emotion`),r.alt=e.text?`:${e.text}:`:``,r.loading=`lazy`,t.appendChild(r)}else t.textContent=e.icon;o.appendChild(t)}t.insertBefore(o,n);let s=document.createElement(`li`),c=document.createElement(`span`);c.textContent=i,s.appendChild(c),this.packagesEle.appendChild(s)}this.preview=document.createElement(`div`),this.preview.className=`tk-owo-preview-panel`,this.preview.hidden=!0,this.preview.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`img`);i.alt=``,this.preview.appendChild(i),t.appendChild(this.preview),t.addEventListener(`pointerover`,e=>{if(e.pointerType===`touch`||!(e.target instanceof Element))return;let t=e.target.closest(`.OwO-item`)?.querySelector(`img.tk-owo-preview`);t?.getAttribute(`src`)?(i.src=t.src,i.className=t.className,i.classList.add(`tk-owo-emotion`),this.preview.hidden=!1):this.preview.hidden=!0}),t.addEventListener(`pointerout`,e=>{let t=e.target instanceof Element?e.target.closest(`.OwO-item`):null;(!t||!(e.relatedTarget instanceof Node)||!t.contains(e.relatedTarget))&&(this.preview.hidden=!0)}),t.addEventListener(`scroll`,()=>{this.preview.hidden=!0},!0),this.logo.addEventListener(`click`,()=>{this.toggle()}),t.addEventListener(`click`,e=>this.onItemClick(e));for(let e=0;e<this.packagesEle.children.length;e++)this.packagesEle.children[e].addEventListener(`click`,()=>{this.tab(e)});this.tab(0)}onItemClick(e){let t=e.target;if(!t)return;let n=null;if(t.classList.contains(`OwO-item`)?n=t:t.parentNode instanceof HTMLElement&&t.parentNode.classList.contains(`OwO-item`)&&(n=t.parentNode),!n)return;let r=this.area.selectionEnd??this.area.value.length,i=this.area.value,a=n.textContent??``,o=n.querySelector(`img`);if(o){if(n.title)a=`:${n.title}: `;else{let e=o.getAttribute(`src`);a=e?`![](<${e.replace(/</g,`%3C`).replace(/>/g,`%3E`)}>)`:``}}this.area.value=i.slice(0,r)+a+i.slice(r),this.area.dispatchEvent(new Event(`input`,{bubbles:!0})),this.area.focus(),this.toggle()}toggle(){this.preview.hidden=!0,this.container.classList.toggle(`OwO-open`)}tab(e){this.preview.hidden=!0;let t=this.container.getElementsByClassName(`OwO-items-show`)[0];t&&t.classList.remove(`OwO-items-show`),this.container.getElementsByClassName(`OwO-items`)[e]?.classList.add(`OwO-items-show`);let n=this.container.getElementsByClassName(`OwO-package-active`)[0];n&&n.classList.remove(`OwO-package-active`),this.packagesEle.getElementsByTagName(`li`)[e]?.classList.add(`OwO-package-active`)}},$y={class:`tk-row`},eb={class:`tk-col`},tb={class:`tk-row actions`},nb={class:`tk-row-actions-start`},rb=[`innerHTML`],ib={class:`tk-submit-action-icon __markdown`,alt:`Markdown is supported`,href:`https://guides.github.com/features/mastering-markdown/`,target:`_blank`,rel:`noopener noreferrer`},ab={key:0,ref:`commentPreviewRef`,class:`tk-preview-container`},ob=[`innerHTML`],sb=bh({__name:`TkSubmit`,props:{replyId:{default:``},pid:{default:``},config:{default:Oy}},emits:[`load`,`cancel`,`error`],setup(e,{emit:t}){let n=[`apng`,`bmp`,`gif`,`jpeg`,`jpg`,`png`,`svg`,`tif`,`tiff`,`webp`],r=fy[`laugh-regular`],i=e,a=t,o=q(!1),s=q(!1),c=q(!1),l=q();uh(l,e=>{e&&a(`error`,e)});let u=q(null),d=q(``),f=q(``),p=q(``),m=q(``),h=q(``),g=q(null),_=q(null),v=q(null),y=q(),b=q(),x=q(),S=q(),C=q(),w=q(),T=q(),E=q(),D=q(),ee=ov(()=>{let e=i.config;return e.CAPTCHA_PROVIDER===void 0?e.TURNSTILE_SITE_KEY?`Turnstile`:e.GEETEST_CAPTCHA_ID?`Geetest`:e.CAP_API_ENDPOINT||e.CAP_BUILTIN?`Cap`:``:e.CAPTCHA_PROVIDER}),te=ov(()=>!!i.config.IMAGE_CDN),O=ov(()=>!o.value&&c.value&&!!d.value.trim()),k=ov(()=>{let e=Po().options.placeholder??i.config.COMMENT_PLACEHOLDER;return(typeof e==`string`?e:``).replace(/<br>/g,`
241
+ `)}),A=ov(()=>{let e=parseInt(String(i.config.LIMIT_LENGTH),10);return Number.isNaN(e)&&(e=500),e>0?e:void 0}),ne=ov(()=>{let e=b.value?.inputEl;return e instanceof HTMLTextAreaElement?e:null});function re(){localStorage.setItem(`twikoo-draft`,d.value)}function ie(){let e=localStorage.getItem(`twikoo-draft`);!d.value&&e&&(d.value=e)}async function ae(){if(i.config.SHOW_EMOTION!==`true`)return;let e=await dd(String(i.config.EMOTION_CDN||`https://owo.imaegoo.com/owo.json`));fd(e),x.value&&ne.value&&(u.value=new Qy({logo:r,container:x.value,target:ne.value,odata:e,position:`down`,maxHeight:`250px`}))}function oe(){u.value?.container.classList.contains(`OwO-open`)&&u.value.toggle()}function se(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=e,r.onload=()=>t(),r.onerror=()=>n(Error(`脚本加载失败:${e}`)),document.head.appendChild(r)})}function ce(e,t){return{ok:e,json:()=>Promise.resolve(t)}}function le(){if(ee.value===`Turnstile`&&i.config.TURNSTILE_SITE_KEY){if(window.turnstile){g.value=Promise.resolve();return}g.value||=se(`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`)}}function ue(){return new Promise((e,t)=>{g.value?.then(()=>{let n=window.turnstile,r=n.render(w.value,{sitekey:i.config.TURNSTILE_SITE_KEY,callback:t=>{e(t),setTimeout(()=>n.remove(r),1e3)},"error-callback":()=>t(Error(`验证码校验失败,请重试`)),"expired-callback":()=>t(Error(`验证码已过期,请重试`)),"timeout-callback":()=>t(Error(`验证码超时,请重试`))})})})}function de(){if(ee.value===`Geetest`&&i.config.GEETEST_CAPTCHA_ID){if(window.initGeetest4){_.value=Promise.resolve();return}_.value||=se(`https://static.geetest.com/v4/gt4.js`)}}function fe(){return new Promise((e,t)=>{_.value?.then(()=>{let n=window.initGeetest4;n({captchaId:i.config.GEETEST_CAPTCHA_ID,product:`bind`,language:`zho`},n=>{n.onReady(()=>n.showCaptcha()).onSuccess(()=>{let t=n.getValidate();e({geeTestLotNumber:t.lot_number,geeTestCaptchaOutput:t.captcha_output,geeTestPassToken:t.pass_token,geeTestGenTime:t.gen_time})}).onError(e=>t(e instanceof Error?e:Error(`Geetest 验证失败,请重试`))).onClose(()=>t(Error(`验证已取消`)))})})})}function pe(){if(ee.value!==`Cap`||!i.config.CAP_API_ENDPOINT&&!i.config.CAP_BUILTIN)return;let e=window;if(i.config.CAP_BUILTIN&&(e.CAP_CUSTOM_FETCH=async(e,t={})=>{let n=String(e),r=t.body?JSON.parse(t.body):{};try{if(n.includes(`challenge`)){let e=await Lo(Po().tcb,`CAP_CHALLENGE`),t=e.result??e;return t.code&&t.code!==0?ce(!1,{error:t.message??`challenge_failed`}):ce(!0,{challenge:t.challenge,token:t.token,expires:t.expires})}if(n.includes(`redeem`)){let e=await Lo(Po().tcb,`CAP_REDEEM`,r),t=e.result??e;return t.code&&t.code!==0&&t.success!==!0?ce(!0,{success:!1,error:t.message??t.error??`redeem_failed`}):ce(!0,{success:t.success,token:t.token,expires:t.expires,message:t.message,error:t.error??t.message})}return ce(!1,{error:`unknown_cap_path`})}catch(e){return ce(!1,{error:e instanceof Error?e.message:`cap_fetch_failed`})}}),e.Cap||customElements.get(`cap-widget`)){v.value=Promise.resolve();return}v.value||=se(`https://cdn.jsdmirror.com/npm/@cap.js/widget`)}function me(){return new Promise((e,t)=>{v.value?.then(()=>{let n=document.createElement(`cap-widget`);n.setAttribute(`id`,`cap-widget`);let r=i.config.CAP_BUILTIN?`/`:String(i.config.CAP_API_ENDPOINT);n.setAttribute(`data-cap-api-endpoint`,r),D.value?.appendChild(n);let a=()=>{n.parentNode?.removeChild(n)};n.solve().then(n=>{a(),n.success?e(typeof n.token==`string`?n.token:``):t(Error(`Cap 验证失败`))}).catch(e=>{a(),t(e instanceof Error?e:Error(`Cap 验证失败`))})}).catch(t)})}function he(e){p.value=e.meta.nick,m.value=e.meta.mail,h.value=e.meta.link,c.value=e.valid}function ge(){a(`cancel`)}function _e(){re(),j()}function ve(){s.value=!s.value,j()}function j(){s.value&&(f.value=Ec(ad(d.value)),Gm(()=>{let e=C.value;e&&(Vd(e),Ud(e,Po().options.katex),i.config.HIGHLIGHT===`true`&&Vc(e,i.config.HIGHLIGHT_THEME,i.config.HIGHLIGHT_PLUGIN))}))}async function ye(){o.value=!0,l.value=void 0;try{if(d.value.match(RegExp(`!\\[${W(`IMAGE_UPLOAD_PLACEHOLDER`)}.+\\]\\(\\)`)))throw Error(W(`IMAGE_UPLOAD_PLEASE_WAIT`));let e={nick:p.value,mail:m.value,link:h.value,ua:await Bd(),url:Ad(Po().options.path),href:jd(Po().options.href),comment:ad(d.value),pid:i.pid?i.pid:i.replyId,rid:i.replyId};ee.value===`Turnstile`&&i.config.TURNSTILE_SITE_KEY&&(e.turnstileToken=await ue()),ee.value===`Geetest`&&i.config.GEETEST_CAPTCHA_ID&&Object.assign(e,await fe()),ee.value===`Cap`&&(i.config.CAP_API_ENDPOINT||i.config.CAP_BUILTIN)&&(e.capToken=await me());let t=Po().options.onSubmit;typeof t==`function`&&await t(e);let n=await Lo(Po().tcb,`COMMENT_SUBMIT`,e),r=n.result??n;if(r.id)d.value=``,s.value=!1,f.value=``,l.value=void 0,a(`load`),re();else throw new Oo(r.code===void 0?`UNKNOWN`:`REJECTED`,r.message??W(`COMMENT_FAILED`),{rawMessage:r.message??``})}catch(e){zo.error(`评论失败`,e),l.value=e instanceof Oo?e:new Oo(`UNKNOWN`,`${W(`COMMENT_FAILED`)}: ${jo(e)}`,{rawMessage:jo(e)})}finally{o.value=!1}}function be(e){(e.ctrlKey||e.metaKey)&&e.key===`Enter`&&ye()}function xe(){S.value?.click()}function Se(){let e=S.value?.files?.[0];we(e)}function Ce(e){e.clipboardData&&we(e.clipboardData.files[0]??e.clipboardData.items[0]?.getAsFile()??void 0)}async function we(e){if(!e||!te.value)return;let t=e.name.split(`.`),r=t.length>1?String(t.pop()):``;if(n.indexOf(r.toLowerCase())===-1)return;let{tcb:a}=Po(),o=a?.auth?.currentUser?.uid??localStorage.getItem(`twikoo-access-token`)??``,s=`${Date.now()}-${o}`,c=t.join(`.`),l=e.type===`image/gif`,u=l?c:`${c}.webp`,d=l?r:`webp`;De(Oe(s,d));let f=String(i.config.IMAGE_CDN??``),p=await Te(e);a&&(!f||f===`qcloud`)?M(s,u,d,p):f?Ee(s,u,d,p):P(s,d,W(`IMAGE_UPLOAD_FAILED_NO_CONF`))}async function Te(e){return e.type===`image/gif`?e:new Promise(t=>{let n=new FileReader;n.onload=n=>{let r=new Image;r.onload=()=>{let n=document.createElement(`canvas`),i=r.width,a=r.height,o=1920;(i>o||a>o)&&(i>a?(a=a*o/i,i=o):(i=i*o/a,a=o)),n.width=i,n.height=a,n.getContext(`2d`)?.drawImage(r,0,0,i,a);let s=`image/webp`,c=e.name.replace(/\.[^.]+$/,`.webp`);n.toBlob(e=>t(new File([e??new Blob],c,{type:s})),s,.85)};let i=n.target?.result;r.src=typeof i==`string`?i:``},n.readAsDataURL(e)})}async function M(e,t,n,r){try{let i=Po().tcb?.app,a=await i.uploadFile({cloudPath:`tk-img/${e}.${n}`,filePath:r});if(!a.fileID)return;N(e,t,n,(await i.getTempFileURL({fileList:[a.fileID]})).fileList[0].tempFileURL)}catch(t){console.error(t),P(e,n,jo(t))}}async function Ee(e,t,n,r){try{let i=await Lo(Po().tcb,`UPLOAD_IMAGE`,{fileName:t,photo:await zd(r)}),a=i.result??i;a.data?N(e,t,n,String(a.data.url)):a.code===1041?P(e,n,W(`IMAGE_UPLOAD_NSFW`)):(console.error(a),P(e,n,a.message??a.err??W(`IMAGE_UPLOAD_FAILED`)))}catch(t){console.error(t),P(e,n,jo(t))}}function N(e,t,n,r){let i=t.replace(/[[\]]/g,`_`);d.value=d.value.replace(Oe(e,n),`![${i}](${r})`),S.value&&(S.value.value=``)}function P(e,t,n){d.value=d.value.replace(Oe(e,t),`_${W(`IMAGE_UPLOAD_FAILED`)}: ${n}_`),S.value&&(S.value.value=``)}function De(e){let t=ne.value,n=t?.selectionStart??d.value.length,r=t?.selectionEnd??d.value.length;d.value=d.value.substring(0,n)+e+d.value.substring(r),Gm(()=>{if(!t)return;let r=n+e.length;t.selectionStart=r,t.selectionEnd=r})}function Oe(e,t){return`![${W(`IMAGE_UPLOAD_PLACEHOLDER`)} ${e}.${t}]()`}function ke(){i.config.COMMENT_BG_IMG&&ne.value&&(ne.value.style[`background-image`]=`url("${String(i.config.COMMENT_BG_IMG)}")`)}function Ae(){le(),de(),pe()}return uh(()=>i.config.SHOW_EMOTION,()=>{ae()}),uh(()=>i.config.COMMENT_BG_IMG,()=>{ke()}),uh(()=>i.config.TURNSTILE_SITE_KEY,()=>{le()}),uh(()=>i.config.GEETEST_CAPTCHA_ID,()=>{de()}),uh(()=>i.config.CAP_API_ENDPOINT,()=>{pe()}),uh(ee,()=>{Ae()}),Fh(()=>{i.pid&&y.value?.scrollIntoView({behavior:`instant`,block:`center`}),ie(),ne.value?.addEventListener(`paste`,Ce),ke(),Ae(),ae()}),zh(()=>{ne.value?.removeEventListener(`paste`,Ce)}),(t,n)=>(Y(),X(`div`,{ref_key:`tkSubmitRef`,ref:y,class:`tk-submit tk-fade-in`},[Z(`div`,$y,[Q(jy,{config:e.config,mail:m.value,nick:p.value},null,8,[`config`,`mail`,`nick`]),Z(`div`,eb,[Q(qy,{nick:p.value,mail:m.value,link:h.value,config:e.config,onUpdate:he,onValidate:n[0]||=e=>c.value=e},null,8,[`nick`,`mail`,`link`,`config`]),Q(Ry,{ref_key:`textareaRef`,ref:b,modelValue:d.value,"onUpdate:modelValue":n[1]||=e=>d.value=e,class:`tk-input`,type:`textarea`,placeholder:k.value,autosize:{minRows:3},maxlength:A.value,"show-word-limit":``,onInput:_e,onKeyup:be},null,8,[`modelValue`,`placeholder`,`maxlength`])])]),Z(`div`,tb,[Z(`div`,nb,[$(` 表情按钮:首屏先渲染图标,随后由 OwO 面板以同样的 logo 接管容器内容 `),$(` 图标为构建期内联的 fontawesome 官方 SVG,非运行时用户数据 `),$(` eslint-disable vue/no-v-html `),ih(Z(`div`,{ref_key:`owoRef`,ref:x,class:`tk-submit-action-icon OwO`,innerHTML:J(r)},null,8,rb),[[bv,e.config.SHOW_EMOTION===`true`],[J(xd),oe]]),$(` eslint-enable vue/no-v-html `),ih(Z(`div`,{class:`tk-submit-action-icon`,onClick:xe},[Q(my,{name:`image-regular`})],512),[[bv,te.value]]),Z(`input`,{ref_key:`inputFileRef`,ref:S,class:`tk-input-image`,type:`file`,accept:`image/*`,value:``,onChange:Se},null,544)]),Z(`a`,ib,[Q(my,{name:`markdown`})]),e.replyId?(Y(),C_(Xy,{key:0,class:`tk-cancel`,size:`small`,onClick:ge},{default:rh(()=>[j_(K(J(W)(`SUBMIT_CANCEL`)),1)]),_:1})):$(`v-if`,!0),Q(Xy,{class:`tk-preview`,size:`small`,onClick:ve},{default:rh(()=>[j_(K(J(W)(`SUBMIT_PREVIEW`)),1)]),_:1}),Q(Xy,{class:`tk-send`,type:`primary`,size:`small`,disabled:!O.value,onClick:ye},{default:rh(()=>[j_(K(o.value?J(W)(`SUBMIT_SENDING`):J(W)(`SUBMIT_SEND`)),1)]),_:1},8,[`disabled`]),ih(Z(`div`,{ref_key:`turnstileContainerRef`,ref:T,class:`tk-turnstile-container`},[Z(`div`,{ref_key:`turnstileRef`,ref:w,class:`tk-turnstile`},null,512)],512),[[bv,ee.value===`Turnstile`]]),ih(Z(`div`,{ref_key:`geetestContainerRef`,ref:E,class:`tk-geetest-container`},null,512),[[bv,ee.value===`Geetest`]]),ih(Z(`div`,{ref_key:`capContainerRef`,ref:D,class:`tk-cap-container`},null,512),[[bv,ee.value===`Cap`]])]),s.value?(Y(),X(`div`,ab,[$(` 预览内容经 sanitizeHtml 消毒 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`div`,{innerHTML:f.value},null,8,ob)],512)):$(`v-if`,!0)],512))}}),cb=lm({serverConfig:{}});function lb(e){cb.serverConfig=e}function ub(){return cb.serverConfig}var db=[`id`],fb={class:`tk-main`},pb={class:`tk-row`},mb={class:`tk-meta`},hb={key:0,class:`tk-nick`},gb=[`href`],_b={key:2,class:`tk-tag tk-tag-green`},vb={key:3,class:`tk-tag tk-tag-red`},yb={key:4,class:`tk-tag tk-tag-yellow`},bb={class:`tk-time`},xb=[`datetime`,`title`],Sb={key:5,class:`tk-actions`},Cb={key:0},wb=[`innerHTML`],Tb={key:0,class:`tk-expand-wrap`},Eb={key:1,class:`tk-collapse-wrap`},Db={key:2,class:`tk-extras`},Ob={key:0,class:`tk-extra`},kb={class:`tk-icon __comment`},Ab={class:`tk-extra-text`},jb={key:1,class:`tk-extra`},Mb={class:`tk-icon __comment`},Nb={class:`tk-extra-text`},Pb={key:2,class:`tk-extra`},Fb={class:`tk-icon __comment`},Ib={class:`tk-extra-text`},Lb={key:4,class:`tk-expand-wrap`},Rb={key:5,class:`tk-collapse-wrap`},zb=bh({__name:`TkComment`,props:{comment:{},replyId:{default:``},replying:{type:Boolean,default:!1},config:{default:Oy}},emits:[`reply`,`load`,`expand`,`refreshed`,`error`],setup(e,{emit:t}){let n=e,r=t,i={win:`windows`,mac:`apple`,ipad:`apple`,iphone:`apple`,ios:`apple`,android:`android`,ubuntu:`ubuntu`,linux:`linux`},a={edge:`edge`,chrome:`chrome`,firefox:`firefox-browser`,safari:`safari`,explorer:`internet-explorer`,ie:`internet-explorer`},o=q(``),s=q(n.comment.ups??0),c=q(n.comment.downs??0),l=q(n.comment.liked===!0),u=q(n.comment.disliked===!0),d=q(!1),f=q(!1),p=q(!1),m=q(!1),h=q(!1),g=q(!1),_=ov(()=>{let{tcb:e}=Po();return e?.auth?g.value:ub().IS_ADMIN===!0}),v=q(n.comment.isSpam===!0),y=q(n.comment.top===!0),b=q(!1),x=q(),S=q(),C=q(),w=q(),T=ov(()=>Ec(n.comment.comment)),E=ov(()=>Dd(n.comment.created)),D=ov(()=>new Date(n.comment.created??0).toJSON()),ee=ov(()=>new Date(n.comment.created??0).toLocaleString()),te=ov(()=>ae(n.comment.os??``,i)),O=ov(()=>ae(n.comment.browser??``,a)),k=ov(()=>p.value&&!f.value),A=ov(()=>p.value&&f.value),ne=ov(()=>h.value&&!m.value),re=ov(()=>h.value&&m.value),ie=ov(()=>Ed(n.comment.link));function ae(e,t){let n=e.toLowerCase();for(let e of Object.keys(t))if(n.indexOf(e)!==-1)return t[e];return`window-maximize-regular`}function oe(){let e=w.value;n.comment.replies.length>0&&e&&(p.value=e.scrollHeight>236)}function se(){let e=S.value;e&&(h.value=h.value||e.scrollHeight>500)}function ce(){S.value?.querySelectorAll(`img`).forEach(e=>{e.onload=se})}function le(){window.location.hash.indexOf(n.comment.id)!==-1&&(x.value?.scrollIntoView({behavior:`smooth`}),r(`expand`))}function ue(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`center`})}async function de(){if(!d.value){d.value=!0;try{Ao(await Lo(Po().tcb,`COMMENT_LIKE`,{id:n.comment.id,type:`up`})),l.value?s.value--:(s.value++,u.value&&c.value--),l.value=!l.value,u.value=!1}catch(e){alert(jo(e)),e instanceof ko||r(`load`)}finally{d.value=!1}}}async function fe(){if(!d.value){d.value=!0;try{Ao(await Lo(Po().tcb,`COMMENT_LIKE`,{id:n.comment.id,type:`down`})),u.value?c.value--:(c.value++,l.value&&s.value--),u.value=!u.value,l.value=!1}catch(e){alert(jo(e)),e instanceof ko||r(`load`)}finally{d.value=!1}}}function pe(e){o.value=e,r(`reply`,n.comment.id)}async function me(e){if(!b.value&&confirm(W(e?`ADMIN_COMMENT_DELETE_CONFIRM`:`COMMENT_DELETE_CONFIRM`))){b.value=!0;try{Ao(await Lo(Po().tcb,e?`COMMENT_DELETE_FOR_ADMIN`:`COMMENT_DELETE_FOR_USER`,{id:n.comment.id})),r(`load`)}catch(e){alert(jo(e)),e instanceof ko||r(`load`)}finally{b.value=!1}}}function he(e){o.value=e,r(`reply`,e?n.comment.id:``)}function ge(){o.value=``,r(`reply`,``)}function _e(){o.value=``,r(`reply`,``),r(`load`),f.value=!0}function ve(){r(`refreshed`),Gm(()=>{let e=w.value?.lastElementChild;n.comment.replies.length>0&&e&&e.scrollIntoView({behavior:`smooth`,block:`center`})})}async function j(){try{let{tcb:e}=Po();if(e?.auth){let t=await e.auth.getCurrentUser();g.value=t.loginType===`CUSTOM`}}catch(e){g.value=!1,alert(jo(e))}}function ye(e){Se({isSpam:e})}function be(e){Se({top:e})}function xe(e){ub().LIGHTBOX===`true`&&Hd(e)}async function Se(e){if(!b.value){b.value=!0;try{Ao(await Lo(Po().tcb,`COMMENT_SET_FOR_ADMIN`,{id:n.comment.id,set:e})),e.isSpam!==void 0&&(v.value=e.isSpam),e.top!==void 0&&(y.value=e.top)}catch(e){alert(jo(e)),e instanceof ko||r(`load`)}finally{b.value=!1}}}function Ce(){let e=C.value;e&&(Vd(e),Ud(e,Po().options.katex),n.config.HIGHLIGHT===`true`&&Vc(e,n.config.HIGHLIGHT_THEME,n.config.HIGHLIGHT_PLUGIN))}return uh(()=>[n.comment,n.comment.isSpam],()=>{v.value=n.comment.isSpam===!0}),uh(()=>[n.comment,n.comment.top],()=>{y.value=n.comment.top===!0}),uh(()=>[n.comment,n.comment.ups,n.comment.liked],()=>{s.value=n.comment.ups??0,l.value=n.comment.liked===!0}),uh(()=>[n.comment,n.comment.downs,n.comment.disliked],()=>{c.value=n.comment.downs??0,u.value=n.comment.disliked===!0}),uh(()=>n.config.HIGHLIGHT,e=>{e===`true`&&Gm(Ce)},{immediate:!0}),Fh(()=>{Gm(se),Gm(ce),Gm(oe),Gm(le),Gm(Ce),j()}),(t,n)=>{let i=Gh(`TkComment`,!0);return Y(),X(`div`,{id:e.comment.id,ref_key:`tkCommentRef`,ref:x,class:Rf([`tk-comment`,{"tk-master":e.comment.master}])},[Q(jy,{config:e.config,nick:e.comment.nick,avatar:e.comment.avatar,"mail-md5":e.comment.mailMd5,link:ie.value},null,8,[`config`,`nick`,`avatar`,`mail-md5`,`link`]),Z(`div`,fb,[Z(`div`,pb,[Z(`div`,mb,[ie.value?$(`v-if`,!0):(Y(),X(`strong`,hb,K(e.comment.nick),1)),ie.value?(Y(),X(`a`,{key:1,class:`tk-nick tk-nick-link`,href:ie.value,target:`_blank`,rel:`noopener noreferrer nofollow ugc`},[Z(`strong`,null,K(e.comment.nick),1)],8,gb)):$(`v-if`,!0),e.comment.master?(Y(),X(`span`,_b,K(e.config.MASTER_TAG||J(W)(`COMMENT_MASTER_TAG`)),1)):$(`v-if`,!0),y.value?(Y(),X(`span`,vb,K(J(W)(`COMMENT_TOP_TAG`)),1)):$(`v-if`,!0),v.value?(Y(),X(`span`,yb,K(J(W)(`COMMENT_REVIEWING_TAG`)),1)):$(`v-if`,!0),Z(`small`,bb,[Z(`time`,{datetime:D.value,title:ee.value},K(E.value),9,xb)]),_.value?(Y(),X(`small`,Sb,[v.value?(Y(),X(`button`,{key:0,onClick:n[0]||=e=>ye(!1)},K(J(W)(`ADMIN_COMMENT_SHOW`)),1)):$(`v-if`,!0),v.value?$(`v-if`,!0):(Y(),X(`button`,{key:1,onClick:n[1]||=e=>ye(!0)},K(J(W)(`ADMIN_COMMENT_HIDE`)),1)),!e.comment.rid&&y.value?(Y(),X(`button`,{key:2,onClick:n[2]||=e=>be(!1)},K(J(W)(`ADMIN_COMMENT_UNTOP`)),1)):$(`v-if`,!0),!e.comment.rid&&!y.value?(Y(),X(`button`,{key:3,onClick:n[3]||=e=>be(!0)},K(J(W)(`ADMIN_COMMENT_TOP`)),1)):$(`v-if`,!0),Z(`button`,{onClick:n[4]||=e=>me(!0)},K(J(W)(`ADMIN_COMMENT_DELETE`)),1)])):$(`v-if`,!0)]),Q(Dy,{liked:l.value,disliked:u.value,"like-count":s.value,"dislike-count":c.value,"replies-count":e.comment.replies.length,"show-dislike":e.config.SHOW_DISLIKE!==`false`,"show-delete":e.comment.isOwner===!0,onLike:de,onDislike:fe,onReply:pe,onDelete:n[5]||=e=>me(!1)},null,8,[`liked`,`disliked`,`like-count`,`dislike-count`,`replies-count`,`show-dislike`,`show-delete`])]),Z(`div`,{ref_key:`tkContentRef`,ref:S,class:Rf([`tk-content`,{"tk-content-expand":m.value}])},[e.comment.pid?(Y(),X(`span`,Cb,[j_(K(J(W)(`COMMENT_REPLIED`))+` `,1),Z(`a`,{class:`tk-ruser`,href:`#`,onClick:n[6]||=ry(t=>ue(e.comment.pid),[`prevent`])},K(`@${e.comment.ruser}`),1),n[14]||=j_(` : `,-1)])):$(`v-if`,!0),$(` 正文:服务端已 DOMPurify 消毒,客户端再走一次 sanitizeHtml 双保险 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`span`,{ref_key:`commentRef`,ref:C,onClick:xe,innerHTML:T.value},null,8,wb)],2),ne.value?(Y(),X(`div`,Tb,[Z(`div`,{class:`tk-expand`,onClick:n[7]||=e=>m.value=!0},K(J(W)(`COMMENT_EXPAND`)),1)])):$(`v-if`,!0),re.value?(Y(),X(`div`,Eb,[Z(`div`,{class:`tk-expand _collapse`,onClick:n[8]||=e=>m.value=!1},K(J(W)(`COMMENT_COLLAPSE`)),1)])):$(`v-if`,!0),e.comment.ipRegion||e.comment.os||e.comment.browser?(Y(),X(`div`,Db,[e.comment.ipRegion?(Y(),X(`div`,Ob,[Z(`span`,kb,[Q(my,{name:`location-arrow`})]),Z(`span`,Ab,`\xA0`+K(e.comment.ipRegion),1)])):$(`v-if`,!0),e.comment.os?(Y(),X(`div`,jb,[Z(`span`,Mb,[Q(my,{name:te.value},null,8,[`name`])]),Z(`span`,Nb,`\xA0`+K(e.comment.os),1)])):$(`v-if`,!0),e.comment.browser?(Y(),X(`div`,Pb,[Z(`span`,Fb,[Q(my,{name:O.value},null,8,[`name`])]),Z(`span`,Ib,`\xA0`+K(e.comment.browser),1)])):$(`v-if`,!0)])):$(`v-if`,!0),$(` 回复框(主楼被回复时挂载;楼中楼由子评论自身挂载) `),e.replying&&!o.value?(Y(),C_(sb,{key:3,"reply-id":e.replyId?e.replyId:e.comment.id,pid:e.comment.id,config:e.config,onLoad:_e,onCancel:ge,onError:n[9]||=e=>r(`error`,e)},null,8,[`reply-id`,`pid`,`config`])):$(`v-if`,!0),$(` 回复列表 `),Z(`div`,{ref_key:`tkRepliesRef`,ref:w,class:Rf([`tk-replies`,{"tk-replies-expand":f.value||!k.value||e.replying}])},[(Y(!0),X(p_,null,Yh(e.comment.replies,t=>(Y(),C_(i,{key:t.id,comment:t,"reply-id":e.comment.id,replying:e.replying&&o.value===t.id,config:e.config,onExpand:n[10]||=e=>f.value=!0,onLoad:_e,onReply:he,onRefreshed:ve,onError:n[11]||=e=>r(`error`,e)},null,8,[`comment`,`reply-id`,`replying`,`config`]))),128))],2),k.value&&!e.replying?(Y(),X(`div`,Lb,[Z(`div`,{class:`tk-expand`,onClick:n[12]||=e=>f.value=!0},K(J(W)(`COMMENT_EXPAND`)),1)])):$(`v-if`,!0),A.value&&!e.replying?(Y(),X(`div`,Rb,[Z(`div`,{class:`tk-expand _collapse`,onClick:n[13]||=e=>f.value=!1},K(J(W)(`COMMENT_COLLAPSE`)),1)])):$(`v-if`,!0)])],10,db)}}}),Bb={class:`tk-error`},Vb={class:`tk-error__icon`},Hb={class:`tk-error__body`},Ub={class:`tk-error__title`},Wb={class:`tk-error__message`},Gb={class:`tk-error__detail`},Kb={key:0,class:`tk-error__row`},qb={key:1,class:`tk-error__row`},Jb={key:2,class:`tk-error__raw`},Yb=bh({__name:`TkError`,props:{error:{}},setup(e){let t=e,n=q(!1),r={NETWORK:`无法连接到后端`,CORS:`请求被跨域策略拦截`,TIMEOUT:`请求超时`,REJECTED:`请求过于频繁`,NOT_FOUND:`接口地址不存在`,CLIENT_ERROR:`请求失败`,SERVER_ERROR:`后端异常`,UNKNOWN:`出现未知错误`},i=ov(()=>r[t.error.kind]??`出现错误`),a=ov(()=>{let e=t.error.rawMessage||t.error.message;return e.length>120?`${e.slice(0,120)}...`:e}),o=ov(()=>t.error.rawMessage||``),s=ov(()=>t.error.httpStatus),c=ov(()=>t.error.requestId);return(e,t)=>(Y(),X(`div`,Bb,[Z(`div`,Vb,[Q(my,{name:`circle-exclamation`})]),Z(`div`,Hb,[Z(`div`,Ub,K(i.value),1),Z(`div`,Wb,K(a.value),1),Z(`button`,{class:`tk-error__toggle`,type:`button`,onClick:t[0]||=e=>n.value=!n.value},K(n.value?`收起详情`:`展开详情`),1),ih(Z(`div`,Gb,[s.value?(Y(),X(`div`,Kb,`HTTP: `+K(s.value),1)):$(`v-if`,!0),c.value?(Y(),X(`div`,qb,`Request ID: `+K(c.value),1)):$(`v-if`,!0),o.value?(Y(),X(`pre`,Jb,K(o.value),1)):$(`v-if`,!0)],512),[[bv,n.value]])])]))}}),Xb={class:`tk-comments`},Zb={class:`tk-comments-container`},Qb={class:`tk-comments-title`},$b={key:0},ex={class:`tk-comments-actions`},tx={key:0,class:`tk-comments-sort`},nx={class:`tk-comments-search`},rx={key:1,class:`tk-comments-no`},ix={key:0},ax={key:1},ox={key:2,class:`tk-expand-wrap`},sx=bh({__name:`TkComments`,props:{showAdminEntry:{type:Boolean,default:!1}},emits:[`admin`,`refreshed`],setup(e,{emit:t}){let n=t,r=q(!0),i=q(!1),a=q(null),o=q({}),s=q([]),c=q(!0),l=q(0),u=q(``),d=q(1),f=q(`newest`),p=q(``),m=q(``),h=q(!1),g=q(0),_=q();async function v(){try{let e=Ao(await Lo(Po().tcb,`GET_CONFIG`));e.config&&(o.value=e.config,lb(e.config))}catch(e){zo.warn(`加载公开配置失败`,e)}}async function y(){let e=++g.value;r.value=!0,a.value=null;let t={url:Ad(Po().options.path),sort:f.value,keyword:m.value};m.value&&(t.page=1),await k(t),e===g.value&&(r.value=!1)}function b(){s.value=[],d.value=1}function x(){let e=p.value.trim();p.value=e,m.value!==e&&(m.value=e,b(),y())}function S(){m.value&&(m.value=``,b(),y())}function C(){h.value=!h.value,h.value?setTimeout(()=>_.value?.focus(),0):(p.value=``,S())}function w(){b(),y()}async function T(){let e=++g.value;r.value=!0,a.value=null;try{let e=Ad(Po().options.path),t=d.value,n={url:e,sort:f.value,keyword:m.value};if(m.value&&(n.page=1),!await k(n))return;for(let n=2;n<=t&&await te(e,n);n++);}finally{e===g.value&&(r.value=!1)}e===g.value&&n(`refreshed`)}function E(e){f.value!==e&&(f.value=e,b(),y())}async function D(){if(!i.value){i.value=!0,d.value++;try{await te(Ad(Po().options.path),d.value)}finally{i.value=!1}}}function ee(){let e=1/0;for(let t of s.value)!t.top&&(t.created??1/0)<e&&(e=t.created??1/0);return e===1/0?void 0:e}async function te(e,t=d.value){if(m.value)return k({url:e,page:t,sort:f.value,keyword:m.value});let n=ee();return n!==void 0&&k({url:e,before:n,sort:f.value,keyword:m.value})}function O(){let e=Po().options.onCommentLoaded;typeof e==`function`&&e()}async function k(e){let t=g.value;try{let n=await Lo(Po().tcb,`COMMENT_GET`,e);if(t!==g.value)return!1;let r=Ao(n);if(r?.message)return a.value=new Oo(`CLIENT_ERROR`,r.message,{rawMessage:r.message}),!1;if(r?.data)return s.value=e.before||typeof e.page==`number`&&e.page>1?s.value.concat(r.data):r.data,c.value=r.more===!0,l.value=r.count??s.value.length,setTimeout(O,0),!0}catch(e){t===g.value&&(a.value=e instanceof Oo?e:new Oo(`UNKNOWN`,jo(e),{rawMessage:jo(e)}))}return!1}function A(e){a.value=e}function ne(e){u.value=e}function re(){n(`admin`)}function ie(){v()}function ae(){T()}return Fh(()=>{v(),y(),Uy(By,ie),Uy(By,ae)}),zh(()=>{Wy(By,ie),Wy(By,ae)}),(t,n)=>(Y(),X(`div`,Xb,[Q(sb,{config:o.value,onLoad:y,onError:A},null,8,[`config`]),ih((Y(),X(`div`,Zb,[Z(`div`,Qb,[Z(`span`,{class:Rf([`tk-comments-count`,{__hidden:r.value||!s.value.length&&!m.value}])},[m.value?(Y(),X(`span`,$b,K(J(W)(`COMMENTS_SEARCH_COUNT_PREFIX`)),1)):$(`v-if`,!0),Z(`span`,null,K(l.value),1),Z(`span`,null,K(J(W)(`COMMENTS_COUNT_SUFFIX`)),1)],2),Z(`span`,ex,[!r.value&&s.value.length&&o.value.SHOW_ORDER!==`false`?(Y(),X(`span`,tx,[Z(`button`,{class:Rf([`tk-sort-item`,{__active:f.value===`newest`}]),type:`button`,onClick:n[0]||=e=>E(`newest`)},K(J(W)(`COMMENTS_SORT_NEWEST`)),3),Z(`button`,{class:Rf([`tk-sort-item`,{__active:f.value===`oldest`}]),type:`button`,onClick:n[1]||=e=>E(`oldest`)},K(J(W)(`COMMENTS_SORT_OLDEST`)),3),Z(`button`,{class:Rf([`tk-sort-item`,{__active:f.value===`popular`}]),type:`button`,onClick:n[2]||=e=>E(`popular`)},K(J(W)(`COMMENTS_SORT_POPULAR`)),3)])):$(`v-if`,!0),!r.value&&!i.value?(Y(),X(`span`,{key:1,class:Rf([`tk-icon __comments`,{__active:h.value}]),onClick:C},[Q(my,{name:`magnifying-glass`})],2)):$(`v-if`,!0),!r.value&&!i.value?(Y(),X(`span`,{key:2,class:`tk-icon __comments`,onClick:w},[Q(my,{name:`sync`})])):$(`v-if`,!0),e.showAdminEntry?(Y(),X(`span`,{key:3,class:`tk-icon __comments`,onClick:re},[Q(my,{name:`cog`})])):$(`v-if`,!0)])]),ih(Z(`div`,nx,[Q(Ry,{ref_key:`searchInputRef`,ref:_,modelValue:p.value,"onUpdate:modelValue":n[3]||=e=>p.value=e,size:`small`,clearable:``,maxlength:100,placeholder:J(W)(`COMMENTS_SEARCH_PLACEHOLDER`),onClear:S,onKeyup:ay(x,[`enter`])},null,8,[`modelValue`,`placeholder`]),Q(Xy,{size:`small`,type:`primary`,onClick:x},{default:rh(()=>[j_(K(J(W)(`COMMENTS_SEARCH`)),1)]),_:1})],512),[[bv,h.value]]),$(` 评论区唯一错误卡片:列表/提交/回复失败共用,位于空态块上方 `),a.value?(Y(),C_(Yb,{key:0,error:a.value},null,8,[`error`])):$(`v-if`,!0),!s.value.length&&!r.value&&!a.value?(Y(),X(`div`,rx,[m.value?(Y(),X(`span`,ix,K(J(W)(`COMMENTS_SEARCH_NO_RESULT`)),1)):$(`v-if`,!0),m.value?$(`v-if`,!0):(Y(),X(`span`,ax,K(J(W)(`COMMENTS_NO_COMMENTS`)),1))])):$(`v-if`,!0),(Y(!0),X(p_,null,Yh(s.value,e=>(Y(),C_(zb,{key:e.id,comment:e,replying:u.value===e.id,config:o.value,onReply:ne,onLoad:T,onError:A},null,8,[`comment`,`replying`,`config`]))),128)),c.value&&!r.value&&!a.value?(Y(),X(`div`,ox,[ih((Y(),X(`div`,{class:`tk-expand`,onClick:D},[j_(K(J(W)(`COMMENTS_EXPAND`)),1)])),[[J(vd),i.value]])])):$(`v-if`,!0)])),[[J(vd),r.value]])]))}}),cx={class:`tk-footer`},lx=bh({__name:`TkFooter`,setup(e){let t=wo;return(e,n)=>(Y(),X(`div`,cx,[n[0]||=j_(` Powered by `,-1),n[1]||=Z(`a`,{href:`https://twikoo.js.org`,target:`_blank`,rel:`noopener noreferrer`},`Twikoo`,-1),j_(` v`+K(J(t)),1)]))}}),ux={class:`tk-pagination`},dx={key:0,class:`tk-pagination-options`},fx={class:`tk-pagination-pagers`},px=[`onClick`],mx={key:1,class:`tk-pagination-options`},hx=bh({__name:`TkPagination`,props:{pageSize:{default:10},total:{default:0}},emits:[`current-change`,`page-size-change`],setup(e,{emit:t}){let n=e,r=t,i=q(1),a=q(0),o=q(0),s=q([]),c=ov(()=>Math.ceil(n.total/n.pageSize));function l(){let e=[];for(let t=1;t<=c.value;t++)Math.abs(i.value-t)<3||t===1||t===c.value?e.push({title:`${t}`,page:t}):Math.abs(i.value-t)<4&&e.push({title:`...`,page:t});s.value=e}function u(e){i.value=parseInt(String(e),10)||1,i.value>c.value&&(i.value=c.value),i.value<1&&(i.value=1),a.value=0,r(`current-change`,i.value),l()}function d(e){o.value=0,r(`page-size-change`,parseInt(String(e),10))}function f(e){a.value=parseInt(String(e),10)}function p(e){o.value=parseInt(String(e),10)}function m(){l()}return uh(()=>n.total,m,{immediate:!0}),uh(()=>n.pageSize,m),(t,n)=>(Y(),X(`div`,ux,[c.value?(Y(),X(`div`,dx,[Z(`div`,null,[Z(`span`,null,K(J(W)(`PAGINATION_COUNT_PREFIX`)),1),Z(`span`,null,K(e.total),1),Z(`span`,null,K(J(W)(`PAGINATION_COUNT_SUFFIX`)),1)]),Q(Ry,{class:`tk-pagination-size`,type:`number`,min:1,max:100,"model-value":o.value?o.value:e.pageSize,onInput:p,onChange:d},null,8,[`model-value`]),Z(`span`,null,K(J(W)(`PAGINATION_PAGESIZE`)),1)])):$(`v-if`,!0),Z(`div`,fx,[(Y(!0),X(p_,null,Yh(s.value,e=>(Y(),X(`div`,{key:e.page,class:Rf([`tk-pagination-pager`,{__current:e.page===i.value}]),onClick:t=>u(e.page)},K(e.title),11,px))),128))]),c.value?(Y(),X(`div`,mx,[Z(`span`,null,K(J(W)(`PAGINATION_GOTO_PREFIX`)),1),Q(Ry,{class:`tk-pagination-goto`,type:`number`,min:1,max:c.value,"model-value":a.value?a.value:i.value,onInput:f,onChange:u},null,8,[`max`,`model-value`]),Z(`span`,null,K(J(W)(`PAGINATION_GOTO_SUFFIX`)),1)])):$(`v-if`,!0)]))}}),gx={class:`tk-admin-comment`},_x={key:0,class:`tk-admin-warn`},vx={class:`tk-admin-comment-filter`},yx={value:``},bx={value:`VISIBLE`},xx={value:`HIDDEN`},Sx={class:`tk-admin-comment-meta`},Cx={key:0},Tx=[`href`],Ex={key:2},Dx=[`href`],Ox={key:3},kx={class:`tk-time`},Ax=[`title`],jx=[`innerHTML`],Mx={key:0,class:`tk-admin-warn tk-admin-security-alert`},Nx={class:`tk-admin-security-alert-message`},Px={key:0,class:`tk-admin-security-alert-url`},Fx={class:`tk-admin-actions`},Ix=5,Lx=bh({__name:`TkAdminComment`,setup(e){let t=ub().VERSION,n=q(!0),r=q([]),i=lm({}),a=q(typeof t==`string`?t:``),o=wo,s=q(0),c=q(Ix),l=q(1),u=lm({keyword:``,type:``}),d=q(null),f=q();function p(e){return Dd(e.created)}function m(e){i.LIGHTBOX===`true`&&Hd(e)}async function h(){n.value=!0;try{let e=Ao(await Lo(Po().tcb,`COMMENT_GET_FOR_ADMIN`,{per:c.value,page:l.value,keyword:u.keyword,type:u.type}));e&&!e.code&&(s.value=e.count??0,r.value=(e.data??[]).map(e=>({...e,comment:Ec(e.comment)}))),setTimeout(()=>{T(f.value)},0)}catch(e){alert(jo(e))}finally{n.value=!1}}async function g(){try{let e=Ao(await Lo(Po().tcb,`GET_CONFIG_FOR_ADMIN`));e&&!e.code&&e.config&&(Object.assign(i,e.config),a.value=typeof e.config.VERSION==`string`?e.config.VERSION:``,_())}catch(e){alert(jo(e))}}function _(){i.HIGHLIGHT||=`true`;let e={},t=localStorage.getItem(`twikoo`);if(t)try{e=JSON.parse(t)}catch{e={}}for(let t of[`nick`,`mail`,`avatar`])i[t]=e[t]??``;!e.nick&&i.BLOGGER_NICK&&(e.nick=String(i.BLOGGER_NICK)),!e.mail&&i.BLOGGER_EMAIL&&(e.mail=String(i.BLOGGER_EMAIL)),!e.link&&i.SITE_URL&&(e.link=String(i.SITE_URL)),localStorage.setItem(`twikoo`,JSON.stringify(e))}function v(e){c.value=e,h()}function y(e){l.value=e,h()}function b(e){let t=`${e.url??``}#${e._id}`;try{if(new URL(t).hostname!==window.location.hostname){d.value={commentId:e._id,message:W(`ADMIN_COMMENT_SECURITY_ALERT`),url:t};return}window.open(t)}catch{try{new URL(t,window.location.origin),window.open(t)}catch{d.value={commentId:e._id,message:W(`ADMIN_COMMENT_PARSE_ERROR`),url:e.url}}}}async function x(e){confirm(W(`ADMIN_COMMENT_DELETE_CONFIRM`))&&await w(`COMMENT_DELETE_FOR_ADMIN`,{id:e._id})}function S(e,t){w(`COMMENT_SET_FOR_ADMIN`,{id:e._id,set:{isSpam:t}})}function C(e,t){w(`COMMENT_SET_FOR_ADMIN`,{id:e._id,set:{top:t}})}async function w(e,t){if(!n.value){n.value=!0;try{Ao(await Lo(Po().tcb,e,t)),await h()}catch(e){alert(jo(e)),e instanceof ko||await h()}finally{n.value=!1}}}function T(e){if(e){Vd(e);for(let t of e.querySelectorAll(`.tk-content`))Ud(t,Po().options.katex),i.HIGHLIGHT===`true`&&Vc(t,i.HIGHLIGHT_THEME,i.HIGHLIGHT_PLUGIN)}}return Fh(async()=>{await Promise.all([g(),h()]),T(f.value)}),(e,t)=>ih((Y(),X(`div`,gx,[J(o)===a.value?$(`v-if`,!0):(Y(),X(`div`,_x,[Z(`span`,null,K(J(W)(`ADMIN_CLIENT_VERSION`))+K(J(o))+`,`,1),Z(`span`,null,K(J(W)(`ADMIN_SERVER_VERSION`))+K(a.value)+`,`,1),$(`
242
242
  用 prettier-ignore 保持单行:这一段的换行/缩进空白会被 Vue 3 的 condense 折叠成
243
243
  一个空格(Vue 2 保留、HTML 同样折叠),与两侧的 &nbsp; 叠加后会让「版本更新」
244
244
  链接左右各宽约一个空格,而 1.x 只有 &nbsp;。所以必须让 &nbsp; 与 <a> 紧贴。
245
- `),$(` prettier-ignore `),t[3]||=Z(`span`,null,[E_(`请参考\xA0`),Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},`版本更新`),E_(`\xA0进行升级`)],-1)])),Z(`div`,px,[Q(Ny,{modelValue:u.keyword,"onUpdate:modelValue":t[0]||=e=>u.keyword=e,class:`tk-admin-comment-filter-keyword`,size:`small`,placeholder:J(W)(`ADMIN_COMMENT_SEARCH_PLACEHOLDER`),onKeyup:ey(m,[`enter`])},null,8,[`modelValue`,`placeholder`]),$m(Z(`select`,{"onUpdate:modelValue":t[1]||=e=>u.type=e,class:`tk-admin-comment-filter-type`},[Z(`option`,mx,K(J(W)(`ADMIN_COMMENT_FILTER_ALL`)),1),Z(`option`,hx,K(J(W)(`ADMIN_COMMENT_FILTER_VISIBLE`)),1),Z(`option`,gx,K(J(W)(`ADMIN_COMMENT_FILTER_HIDDEN`)),1)],512),[[Kv,u.type]]),Q(Gy,{size:`small`,type:`primary`,onClick:m},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_SEARCH`)),1)]),_:1})]),Z(`div`,{ref_key:`commentListRef`,ref:f,class:`tk-admin-comment-list`},[(Y(!0),X(c_,null,Wh(r.value,e=>(Y(),X(`div`,{key:e._id,class:`tk-admin-comment-item`},[Z(`div`,_x,[Q(Ey,{config:i,avatar:e.avatar,nick:e.nick,mail:e.mail,link:e.link},null,8,[`config`,`avatar`,`nick`,`mail`,`link`]),e.link?$(`v-if`,!0):(Y(),X(`span`,vx,K(e.nick)+`\xA0`,1)),e.link?(Y(),X(`a`,{key:1,href:J(xd)(e.link),target:`_blank`,rel:`noopener noreferrer`},K(e.nick)+`\xA0 `,9,yx)):$(`v-if`,!0),e.mail?(Y(),X(`span`,bx,[t[4]||=E_(` (`,-1),Z(`a`,{href:`mailto:${e.mail}`},K(e.mail),9,xx),t[5]||=E_(`)\xA0 `,-1)])):$(`v-if`,!0),e.isSpam?(Y(),X(`span`,Sx,K(J(W)(`ADMIN_COMMENT_IS_SPAM_SUFFIX`))+`\xA0`,1)):$(`v-if`,!0),Z(`span`,Cx,K(p(e))+`\xA0`,1),Z(`span`,{title:e.ua},K(e.ipRegion),9,Tx)]),$(` 管理端正文:服务端已消毒,客户端再走一次 sanitizeHtml 双保险 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`div`,{class:`tk-content`,innerHTML:e.comment},null,8,Ex),d.value&&d.value.commentId===e._id?(Y(),X(`div`,Dx,[Z(`a`,{class:`tk-admin-close`,href:`#`,onClick:t[2]||=Qv(e=>d.value=null,[`prevent`])},[Q(ly,{name:`times`})]),Z(`div`,Ox,K(d.value.message),1),d.value.url?(Y(),X(`div`,kx,[Z(`code`,null,K(d.value.url),1)])):$(`v-if`,!0)])):$(`v-if`,!0),Z(`div`,Ax,[Q(Gy,{size:`mini`,type:`text`,onClick:t=>y(e)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_VIEW`)),1)]),_:1},8,[`onClick`]),e.isSpam?(Y(),v_(Gy,{key:0,size:`mini`,type:`text`,onClick:t=>x(e,!1)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_SHOW`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),e.isSpam?$(`v-if`,!0):(Y(),v_(Gy,{key:1,size:`mini`,type:`text`,onClick:t=>x(e,!0)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_HIDE`)),1)]),_:1},8,[`onClick`])),!e.rid&&e.top?(Y(),v_(Gy,{key:2,size:`mini`,type:`text`,onClick:t=>S(e,!1)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_UNTOP`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),!e.rid&&!e.top?(Y(),v_(Gy,{key:3,size:`mini`,type:`text`,onClick:t=>S(e,!0)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_TOP`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),Q(Gy,{size:`mini`,type:`text`,onClick:t=>b(e)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_COMMENT_DELETE`)),1)]),_:1},8,[`onClick`])])]))),128))],512),Q(ux,{"page-size":c.value,total:s.value,onPageSizeChange:_,onCurrentChange:v},null,8,[`page-size`,`total`])])),[[J(pd),n.value]])}}),Nx={class:`tk-admin-config`},Px={key:0,class:`tk-admin-warn`},Fx={class:`tk-admin-config-groups`},Ix={class:`tk-admin-config-group-title`},Lx=[`title`],Rx={class:`tk-admin-config-input`},zx=[`onUpdate:modelValue`],Bx=[`value`],Vx={class:`tk-admin-config-desc`},Hx={class:`tk-admin-config-group`},Ux={class:`tk-admin-config-group-title`},Wx={class:`tk-admin-config-email-test`},Gx={class:`tk-admin-config-email-test-desc`},Kx={class:`tk-admin-config-input`},qx={class:`tk-admin-config-email-test-desc`},Jx={class:`tk-admin-config-actions`},Yx={class:`tk-admin-config-message`},Xx=hh({__name:`TkAdminConfig`,setup(e){function t(e){return tl.includes(e(`IMAGE_CDN`))}function n(e){return!!e(`IMAGE_CDN`)&&e(`IMAGE_CDN`)!==`s3`}function r(e){return e(`IMAGE_CDN`)===`s3`}function i(e){return t=>t(`CAPTCHA_PROVIDER`)===e}let a=()=>W(`ADMIN_CONFIG_EXAMPLE`);function o(){return[{name:W(`ADMIN_CONFIG_CATEGORY_COMMON`),items:[{key:`SITE_NAME`,desc:W(`ADMIN_CONFIG_ITEM_SITE_NAME`),ph:`${a()}虹墨空间站`,value:``},{key:`SITE_URL`,desc:W(`ADMIN_CONFIG_ITEM_SITE_URL`),ph:`${a()}https://www.imaegoo.com`,value:``},{key:`CORS_ALLOW_ORIGIN`,desc:W(`ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN`),ph:`${a()}https://www.imaegoo.com`,value:``},{key:`BLOGGER_NICK`,desc:W(`ADMIN_CONFIG_ITEM_BLOGGER_NICK`),ph:`${a()}iMaeGoo`,value:``},{key:`BLOGGER_EMAIL`,desc:W(`ADMIN_CONFIG_ITEM_BLOGGER_EMAIL`),ph:`${a()}12345@qq.com`,value:``},{key:`COMMENT_PAGE_SIZE`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE`),ph:`${a()}8`,value:``},{key:`MASTER_TAG`,desc:W(`ADMIN_CONFIG_ITEM_MASTER_TAG`),ph:`${a()}站长`,value:``},{key:`COMMENT_BG_IMG`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_BG_IMG`),ph:``,value:``},{key:`GRAVATAR_CDN`,desc:W(`ADMIN_CONFIG_ITEM_GRAVATAR_CDN`),ph:`${a()}sdn.geekzu.org`,value:``},{key:`DEFAULT_GRAVATAR`,desc:W(`ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR`),ph:`${a()}mp`,value:``},{key:`COMMENT_PLACEHOLDER`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER`),ph:`${a()}`,value:``},{key:`SHOW_ORDER`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_ORDER`),ph:`${a()}true`,value:``},{key:`SHOW_DISLIKE`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_DISLIKE`),ph:`${a()}true`,value:``},{key:`DISPLAYED_FIELDS`,desc:W(`ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS`),ph:`${a()}nick,mail,link`,value:``},{key:`REQUIRED_FIELDS`,desc:W(`ADMIN_CONFIG_ITEM_REQUIRED_FIELDS`),ph:`${a()}nick,mail,link`,value:``},{key:`HIDE_ADMIN_CRYPT`,desc:W(`ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT`),ph:`${a()}admin`,value:``},{key:`QQ_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_QQ_API_KEY`),ph:`${a()}your_api_key`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_PLUGIN`),items:[{key:`IMAGE_CDN`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN`),ph:``,value:``,options:[{value:``,label:W(`ADMIN_CONFIG_IMAGE_CDN_NONE`)},{value:`qcloud`,label:`qcloud`},{value:`7bu`,label:`7bu (https://7bu.top)`},{value:`see`,label:`see (https://s.ee)`},{value:`lskypro`,label:`lskypro`},{value:`piclist`,label:`piclist`},{value:`easyimage`,label:`easyimage`},{value:`chevereto`,label:`chevereto`},{value:`s3`,label:`S3 / R2 / MinIO`}]},{key:`IMAGE_CDN_URL`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN_URL`),ph:`${a()}https://piclist.example.com`,value:``,showIf:t},{key:`IMAGE_CDN_TOKEN`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN`),ph:`${a()}example`,value:``,showIf:n},{key:`S3_REGION`,desc:W(`ADMIN_CONFIG_ITEM_S3_REGION`),ph:`${a()}us-east-1`,value:``,showIf:r},{key:`S3_BUCKET`,desc:W(`ADMIN_CONFIG_ITEM_S3_BUCKET`),ph:`${a()}my-bucket`,value:``,showIf:r},{key:`S3_ACCESS_KEY_ID`,desc:W(`ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID`),ph:`${a()}AKIA****************`,value:``,showIf:r},{key:`S3_SECRET_ACCESS_KEY`,desc:W(`ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY`),ph:`${a()}wJal********************************EKEY`,value:``,secret:!0,showIf:r},{key:`S3_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_S3_ENDPOINT`),ph:`${a()}https://xxx.r2.cloudflarestorage.com`,value:``,showIf:r},{key:`S3_FORCE_PATH_STYLE`,desc:W(`ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE`),ph:`${a()}true`,value:``,showIf:r},{key:`S3_CDN_URL`,desc:W(`ADMIN_CONFIG_ITEM_S3_CDN_URL`),ph:`${a()}https://cdn.example.com`,value:``,showIf:r},{key:`S3_PATH_PREFIX`,desc:W(`ADMIN_CONFIG_ITEM_S3_PATH_PREFIX`),ph:`${a()}images/twikoo`,value:``,showIf:r},{key:`NSFW_API_URL`,desc:W(`ADMIN_CONFIG_ITEM_NSFW_API_URL`),ph:`${a()}https://nsfw.example.com`,value:``},{key:`NSFW_THRESHOLD`,desc:W(`ADMIN_CONFIG_ITEM_NSFW_THRESHOLD`),ph:`${a()}0.5`,value:``},{key:`SHOW_EMOTION`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_EMOTION`),ph:`${a()}false`,value:``},{key:`EMOTION_CDN`,desc:W(`ADMIN_CONFIG_ITEM_EMOTION_CDN`),ph:``,value:``},{key:`HIGHLIGHT`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT`),ph:`${a()}false`,value:``},{key:`HIGHLIGHT_THEME`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME`),ph:`${a()}tomorrow`,value:``},{key:`HIGHLIGHT_PLUGIN`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN`),ph:`${a()}showLanguage`,value:``},{key:`LIGHTBOX`,desc:W(`ADMIN_CONFIG_ITEM_LIGHTBOX`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_PRIVACY`),items:[{key:`SHOW_UA`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_UA`),ph:`${a()}false`,value:``},{key:`SHOW_REGION`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_REGION`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_SPAM`),items:[{key:`AKISMET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_AKISMET_KEY`),ph:`${a()}8651783edxxx`,value:``},{key:`QCLOUD_SECRET_ID`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID`),ph:`${a()}AKI******************************IHw`,value:``},{key:`QCLOUD_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY`),ph:`${a()}Xrk**************************3D7`,value:``,secret:!0},{key:`QCLOUD_CMS_BIZTYPE`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE`),ph:`${a()}1787728329856520192`,value:``},{key:`LIMIT_PER_MINUTE`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE`),ph:`${a()}5`,value:``},{key:`LIMIT_PER_MINUTE_ALL`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL`),ph:`${a()}5`,value:``},{key:`LIMIT_LENGTH`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_LENGTH`),ph:`${a()}100`,value:``},{key:`FORBIDDEN_WORDS`,desc:W(`ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS`),ph:`${a()}快递,空包`,value:``},{key:`BLOCKED_WORDS`,desc:W(`ADMIN_CONFIG_ITEM_BLOCKED_WORDS`),ph:`${a()}快递,空包`,value:``},{key:`NOTIFY_SPAM`,desc:W(`ADMIN_CONFIG_ITEM_NOTIFY_SPAM`),ph:`${a()}false`,value:``},{key:`HIDE_SPAM`,desc:W(`ADMIN_CONFIG_ITEM_HIDE_SPAM`),ph:`${a()}true`,value:``},{key:`JEV_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_JEV_API_KEY`),ph:`your-typesafe-api-key`,value:``,secret:!0},{key:`JEV_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT`),ph:`https://api.typesafe.ai/v1/systemone`,value:``},{key:`JEV_MODEL`,desc:W(`ADMIN_CONFIG_ITEM_JEV_MODEL`),ph:`jev-latest`,value:``},{key:`JEV_SPAM_THRESHOLD`,desc:W(`ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD`),ph:`0.85`,value:``},{key:`LLM_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_LLM_API_KEY`),ph:`sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`,value:``,secret:!0},{key:`LLM_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT`),ph:`https://api.deepseek.com/v1`,value:``},{key:`LLM_MODEL`,desc:W(`ADMIN_CONFIG_ITEM_LLM_MODEL`),ph:`deepseek-v4-pro`,value:``},{key:`LLM_SPAM_PROMPT`,desc:W(`ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT`),ph:``,value:``,type:`textarea`},{key:`LLM_MAX_RETRIES`,desc:W(`ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES`),ph:`3`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_CAPTCHA`),items:[{key:`CAPTCHA_PROVIDER`,desc:W(`ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER`),ph:``,value:``,options:[{value:``,label:W(`ADMIN_CONFIG_CAPTCHA_NONE`)},{value:`Turnstile`,label:W(`ADMIN_CONFIG_CAPTCHA_TURNSTILE`)},{value:`Geetest`,label:W(`ADMIN_CONFIG_CAPTCHA_GEETEST`)},{value:`Cap`,label:W(`ADMIN_CONFIG_CAPTCHA_CAP`)}]},{key:`TURNSTILE_SITE_KEY`,desc:W(`ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY`),ph:`${a()}0x4AAAAAAAPLTtpBr_T12345`,value:``,showIf:i(`Turnstile`)},{key:`TURNSTILE_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY`),ph:`${a()}0x4AAAAAAAPLTmBm6gHmOnOqC1iwmU12345`,value:``,secret:!0,showIf:i(`Turnstile`)},{key:`GEETEST_CAPTCHA_ID`,desc:W(`ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID`),ph:`${a()}your_captcha_id`,value:``,showIf:i(`Geetest`)},{key:`GEETEST_CAPTCHA_KEY`,desc:W(`ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY`),ph:`${a()}your_captcha_key`,value:``,secret:!0,showIf:i(`Geetest`)},{key:`CAP_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT`),ph:`${a()}https://cap.example.com/d9256640cb53/(留空=内嵌,无需外部服务)`,value:``,showIf:i(`Cap`)},{key:`CAP_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_CAP_SECRET_KEY`),ph:`${a()}仅外部 Cap 需要;内嵌模式可留空`,value:``,secret:!0,showIf:i(`Cap`)}]},{name:W(`ADMIN_CONFIG_CATEGORY_IM`),items:[{key:`PUSHOO_CHANNEL`,desc:W(`ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL`),ph:`${a()}pushdeer`,value:``},{key:`PUSHOO_TOKEN`,desc:W(`ADMIN_CONFIG_ITEM_PUSHOO_TOKEN`),ph:`${a()}PDU431TfFHZICvR6lJrFBswSRN1cJ*****zzFvR`,value:``},{key:`SC_MAIL_NOTIFY`,desc:W(`ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_MAIL`),items:[{key:`SENDER_EMAIL`,desc:W(`ADMIN_CONFIG_ITEM_SENDER_EMAIL`),ph:`${a()}blog@imaegoo.com`,value:``},{key:`SENDER_NAME`,desc:W(`ADMIN_CONFIG_ITEM_SENDER_NAME`),ph:`${a()}虹墨空间站评论提醒`,value:``},{key:`SMTP_SERVICE`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_SERVICE`),ph:`${a()}QQ`,value:``},{key:`SMTP_HOST`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_HOST`),ph:`${a()}smtp.qq.com`,value:``},{key:`SMTP_PORT`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_PORT`),ph:`${a()}465`,value:``},{key:`SMTP_SECURE`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_SECURE`),ph:`${a()}true`,value:``},{key:`SMTP_USER`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_USER`),ph:`${a()}blog@imaegoo.com`,value:``},{key:`SMTP_PASS`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_PASS`),ph:`${a()}password`,value:``,secret:!0},{key:`MAIL_SUBJECT`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_SUBJECT`),ph:`${a()}您在虹墨空间站上的评论收到了回复`,value:``},{key:`MAIL_TEMPLATE`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_TEMPLATE`),ph:``,value:``,type:`textarea`},{key:`MAIL_SUBJECT_ADMIN`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN`),ph:`${a()}虹墨空间站上有新评论了`,value:``},{key:`MAIL_TEMPLATE_ADMIN`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN`),ph:``,value:``,type:`textarea`}]}]}let s=im(o()),c=q(!0),l=im({}),u=q(``),d=wo,f=q(``),p=q(``),m=q(``);async function h(){c.value=!0;let e=await Mo(ko().tcb,`GET_CONFIG_FOR_ADMIN`),t=e.result??e;t&&!t.code&&t.config&&(Object.assign(l,t.config),u.value=String(t.config.VERSION??``),l.CAPTCHA_PROVIDER===void 0&&(l.TURNSTILE_SITE_KEY?l.CAPTCHA_PROVIDER=`Turnstile`:l.GEETEST_CAPTCHA_ID&&(l.CAPTCHA_PROVIDER=`Geetest`)),l.IMAGE_CDN===void 0&&(l.IMAGE_CDN=``),g()),c.value=!1}function g(){for(let e of s)for(let t of e.items){let e=l[t.key];t.value=e===void 0?``:String(e)}}function _(e){return typeof e.showIf!=`function`||e.showIf(e=>{for(let t of s){let n=t.items.find(t=>t.key===e);if(n)return n.value}return``})}async function v(){c.value=!0,f.value=`正在保存`;let e={};for(let t of s)for(let n of t.items){let t=l[n.key];String(t??``)!==n.value&&(e[n.key]=n.value)}e.IMAGE_CDN!==void 0&&(e.SHOW_IMAGE=e.IMAGE_CDN?`true`:`false`),Po.info(`保存配置`,e),await Mo(ko().tcb,`SET_CONFIG`,{config:e}),await h(),By(Fy),f.value=`保存成功`,c.value=!1}async function y(){c.value=!0;let e=await Mo(ko().tcb,`EMAIL_TEST`,{mail:p.value});Po.info(`邮件测试`,e),m.value=JSON.stringify(e),c.value=!1}function b(){h()}return Ah(()=>{h(),Ry(Fy,b)}),Ph(()=>{zy(Fy,b)}),(e,t)=>$m((Y(),X(`div`,Nx,[J(d)===u.value?$(`v-if`,!0):(Y(),X(`div`,Px,[Z(`span`,null,K(J(W)(`ADMIN_CLIENT_VERSION`))+K(J(d))+`,`,1),Z(`span`,null,K(J(W)(`ADMIN_SERVER_VERSION`))+K(u.value)+`,`,1),$(`
245
+ `),$(` prettier-ignore `),t[3]||=Z(`span`,null,[j_(`请参考\xA0`),Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},`版本更新`),j_(`\xA0进行升级`)],-1)])),Z(`div`,vx,[Q(Ry,{modelValue:u.keyword,"onUpdate:modelValue":t[0]||=e=>u.keyword=e,class:`tk-admin-comment-filter-keyword`,size:`small`,placeholder:J(W)(`ADMIN_COMMENT_SEARCH_PLACEHOLDER`),onKeyup:ay(h,[`enter`])},null,8,[`modelValue`,`placeholder`]),ih(Z(`select`,{"onUpdate:modelValue":t[1]||=e=>u.type=e,class:`tk-admin-comment-filter-type`},[Z(`option`,yx,K(J(W)(`ADMIN_COMMENT_FILTER_ALL`)),1),Z(`option`,bx,K(J(W)(`ADMIN_COMMENT_FILTER_VISIBLE`)),1),Z(`option`,xx,K(J(W)(`ADMIN_COMMENT_FILTER_HIDDEN`)),1)],512),[[Zv,u.type]]),Q(Xy,{size:`small`,type:`primary`,onClick:h},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_SEARCH`)),1)]),_:1})]),Z(`div`,{ref_key:`commentListRef`,ref:f,class:`tk-admin-comment-list`},[(Y(!0),X(p_,null,Yh(r.value,e=>(Y(),X(`div`,{key:e._id,class:`tk-admin-comment-item`},[Z(`div`,Sx,[Q(jy,{config:i,avatar:e.avatar,nick:e.nick,mail:e.mail,link:e.link},null,8,[`config`,`avatar`,`nick`,`mail`,`link`]),e.link?$(`v-if`,!0):(Y(),X(`span`,Cx,K(e.nick)+`\xA0`,1)),e.link?(Y(),X(`a`,{key:1,href:J(Ed)(e.link),target:`_blank`,rel:`noopener noreferrer`},K(e.nick)+`\xA0 `,9,Tx)):$(`v-if`,!0),e.mail?(Y(),X(`span`,Ex,[t[4]||=j_(` (`,-1),Z(`a`,{href:`mailto:${e.mail}`},K(e.mail),9,Dx),t[5]||=j_(`)\xA0 `,-1)])):$(`v-if`,!0),e.isSpam?(Y(),X(`span`,Ox,K(J(W)(`ADMIN_COMMENT_IS_SPAM_SUFFIX`))+`\xA0`,1)):$(`v-if`,!0),Z(`span`,kx,K(p(e))+`\xA0`,1),Z(`span`,{title:e.ua},K(e.ipRegion),9,Ax)]),$(` 管理端正文:服务端已消毒,客户端再走一次 sanitizeHtml 双保险 `),$(` eslint-disable-next-line vue/no-v-html `),Z(`div`,{class:`tk-content`,onClick:m,innerHTML:e.comment},null,8,jx),d.value&&d.value.commentId===e._id?(Y(),X(`div`,Mx,[Z(`a`,{class:`tk-admin-close`,href:`#`,onClick:t[2]||=ry(e=>d.value=null,[`prevent`])},[Q(my,{name:`times`})]),Z(`div`,Nx,K(d.value.message),1),d.value.url?(Y(),X(`div`,Px,[Z(`code`,null,K(d.value.url),1)])):$(`v-if`,!0)])):$(`v-if`,!0),Z(`div`,Fx,[Q(Xy,{size:`mini`,type:`text`,onClick:t=>b(e)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_VIEW`)),1)]),_:1},8,[`onClick`]),e.isSpam?(Y(),C_(Xy,{key:0,size:`mini`,type:`text`,onClick:t=>S(e,!1)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_SHOW`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),e.isSpam?$(`v-if`,!0):(Y(),C_(Xy,{key:1,size:`mini`,type:`text`,onClick:t=>S(e,!0)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_HIDE`)),1)]),_:1},8,[`onClick`])),!e.rid&&e.top?(Y(),C_(Xy,{key:2,size:`mini`,type:`text`,onClick:t=>C(e,!1)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_UNTOP`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),!e.rid&&!e.top?(Y(),C_(Xy,{key:3,size:`mini`,type:`text`,onClick:t=>C(e,!0)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_TOP`)),1)]),_:1},8,[`onClick`])):$(`v-if`,!0),Q(Xy,{size:`mini`,type:`text`,onClick:t=>x(e)},{default:rh(()=>[j_(K(J(W)(`ADMIN_COMMENT_DELETE`)),1)]),_:1},8,[`onClick`])])]))),128))],512),Q(hx,{"page-size":c.value,total:s.value,onPageSizeChange:v,onCurrentChange:y},null,8,[`page-size`,`total`])])),[[J(vd),n.value]])}}),Rx={class:`tk-admin-config`},zx={key:0,class:`tk-admin-warn`},Bx={class:`tk-admin-config-groups`},Vx={class:`tk-admin-config-group-title`},Hx=[`title`],Ux={class:`tk-admin-config-input`},Wx=[`onUpdate:modelValue`],Gx=[`value`],Kx={class:`tk-admin-config-desc`},qx={class:`tk-admin-config-group`},Jx={class:`tk-admin-config-group-title`},Yx={class:`tk-admin-config-email-test`},Xx={class:`tk-admin-config-email-test-desc`},Zx={class:`tk-admin-config-input`},Qx={class:`tk-admin-config-email-test-desc`},$x={class:`tk-admin-config-actions`},eS={class:`tk-admin-config-message`},tS=bh({__name:`TkAdminConfig`,setup(e){function t(e){return ol.includes(e(`IMAGE_CDN`))}function n(e){return!!e(`IMAGE_CDN`)&&e(`IMAGE_CDN`)!==`s3`}function r(e){return e(`IMAGE_CDN`)===`s3`}function i(e){return t=>t(`CAPTCHA_PROVIDER`)===e}let a=()=>W(`ADMIN_CONFIG_EXAMPLE`);function o(){return[{name:W(`ADMIN_CONFIG_CATEGORY_COMMON`),items:[{key:`SITE_NAME`,desc:W(`ADMIN_CONFIG_ITEM_SITE_NAME`),ph:`${a()}虹墨空间站`,value:``},{key:`SITE_URL`,desc:W(`ADMIN_CONFIG_ITEM_SITE_URL`),ph:`${a()}https://www.imaegoo.com`,value:``},{key:`CORS_ALLOW_ORIGIN`,desc:W(`ADMIN_CONFIG_ITEM_CORS_ALLOW_ORIGIN`),ph:`${a()}https://www.imaegoo.com`,value:``},{key:`BLOGGER_NICK`,desc:W(`ADMIN_CONFIG_ITEM_BLOGGER_NICK`),ph:`${a()}iMaeGoo`,value:``},{key:`BLOGGER_EMAIL`,desc:W(`ADMIN_CONFIG_ITEM_BLOGGER_EMAIL`),ph:`${a()}12345@qq.com`,value:``},{key:`COMMENT_PAGE_SIZE`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_PAGE_SIZE`),ph:`${a()}8`,value:``},{key:`MASTER_TAG`,desc:W(`ADMIN_CONFIG_ITEM_MASTER_TAG`),ph:`${a()}站长`,value:``},{key:`COMMENT_BG_IMG`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_BG_IMG`),ph:``,value:``},{key:`GRAVATAR_CDN`,desc:W(`ADMIN_CONFIG_ITEM_GRAVATAR_CDN`),ph:`${a()}sdn.geekzu.org`,value:``},{key:`DEFAULT_GRAVATAR`,desc:W(`ADMIN_CONFIG_ITEM_DEFAULT_GRAVATAR`),ph:`${a()}mp`,value:``},{key:`COMMENT_PLACEHOLDER`,desc:W(`ADMIN_CONFIG_ITEM_COMMENT_PLACEHOLDER`),ph:`${a()}`,value:``},{key:`SHOW_ORDER`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_ORDER`),ph:`${a()}true`,value:``},{key:`SHOW_DISLIKE`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_DISLIKE`),ph:`${a()}true`,value:``},{key:`DISPLAYED_FIELDS`,desc:W(`ADMIN_CONFIG_ITEM_DISPLAYED_FIELDS`),ph:`${a()}nick,mail,link`,value:``},{key:`REQUIRED_FIELDS`,desc:W(`ADMIN_CONFIG_ITEM_REQUIRED_FIELDS`),ph:`${a()}nick,mail,link`,value:``},{key:`HIDE_ADMIN_CRYPT`,desc:W(`ADMIN_CONFIG_ITEM_HIDE_ADMIN_CRYPT`),ph:`${a()}admin`,value:``},{key:`QQ_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_QQ_API_KEY`),ph:`${a()}your_api_key`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_PLUGIN`),items:[{key:`IMAGE_CDN`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN`),ph:``,value:``,options:[{value:``,label:W(`ADMIN_CONFIG_IMAGE_CDN_NONE`)},{value:`qcloud`,label:`qcloud`},{value:`7bu`,label:`7bu (https://7bu.top)`},{value:`see`,label:`see (https://s.ee)`},{value:`lskypro`,label:`lskypro`},{value:`piclist`,label:`piclist`},{value:`easyimage`,label:`easyimage`},{value:`chevereto`,label:`chevereto`},{value:`s3`,label:`S3 / R2 / MinIO`}]},{key:`IMAGE_CDN_URL`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN_URL`),ph:`${a()}https://piclist.example.com`,value:``,showIf:t},{key:`IMAGE_CDN_TOKEN`,desc:W(`ADMIN_CONFIG_ITEM_IMAGE_CDN_TOKEN`),ph:`${a()}example`,value:``,showIf:n},{key:`S3_REGION`,desc:W(`ADMIN_CONFIG_ITEM_S3_REGION`),ph:`${a()}us-east-1`,value:``,showIf:r},{key:`S3_BUCKET`,desc:W(`ADMIN_CONFIG_ITEM_S3_BUCKET`),ph:`${a()}my-bucket`,value:``,showIf:r},{key:`S3_ACCESS_KEY_ID`,desc:W(`ADMIN_CONFIG_ITEM_S3_ACCESS_KEY_ID`),ph:`${a()}AKIA****************`,value:``,showIf:r},{key:`S3_SECRET_ACCESS_KEY`,desc:W(`ADMIN_CONFIG_ITEM_S3_SECRET_ACCESS_KEY`),ph:`${a()}wJal********************************EKEY`,value:``,secret:!0,showIf:r},{key:`S3_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_S3_ENDPOINT`),ph:`${a()}https://xxx.r2.cloudflarestorage.com`,value:``,showIf:r},{key:`S3_FORCE_PATH_STYLE`,desc:W(`ADMIN_CONFIG_ITEM_S3_FORCE_PATH_STYLE`),ph:`${a()}true`,value:``,showIf:r},{key:`S3_CDN_URL`,desc:W(`ADMIN_CONFIG_ITEM_S3_CDN_URL`),ph:`${a()}https://cdn.example.com`,value:``,showIf:r},{key:`S3_PATH_PREFIX`,desc:W(`ADMIN_CONFIG_ITEM_S3_PATH_PREFIX`),ph:`${a()}images/twikoo`,value:``,showIf:r},{key:`NSFW_API_URL`,desc:W(`ADMIN_CONFIG_ITEM_NSFW_API_URL`),ph:`${a()}https://nsfw.example.com`,value:``},{key:`NSFW_THRESHOLD`,desc:W(`ADMIN_CONFIG_ITEM_NSFW_THRESHOLD`),ph:`${a()}0.5`,value:``},{key:`SHOW_EMOTION`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_EMOTION`),ph:`${a()}false`,value:``},{key:`EMOTION_CDN`,desc:W(`ADMIN_CONFIG_ITEM_EMOTION_CDN`),ph:``,value:``},{key:`HIGHLIGHT`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT`),ph:`${a()}false`,value:``},{key:`HIGHLIGHT_THEME`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT_THEME`),ph:`${a()}tomorrow`,value:``},{key:`HIGHLIGHT_PLUGIN`,desc:W(`ADMIN_CONFIG_ITEM_HIGHLIGHT_PLUGIN`),ph:`${a()}showLanguage`,value:``},{key:`LIGHTBOX`,desc:W(`ADMIN_CONFIG_ITEM_LIGHTBOX`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_PRIVACY`),items:[{key:`SHOW_UA`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_UA`),ph:`${a()}false`,value:``},{key:`SHOW_REGION`,desc:W(`ADMIN_CONFIG_ITEM_SHOW_REGION`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_SPAM`),items:[{key:`AKISMET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_AKISMET_KEY`),ph:`${a()}8651783edxxx`,value:``},{key:`QCLOUD_SECRET_ID`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_SECRET_ID`),ph:`${a()}AKI******************************IHw`,value:``},{key:`QCLOUD_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_SECRET_KEY`),ph:`${a()}Xrk**************************3D7`,value:``,secret:!0},{key:`QCLOUD_CMS_BIZTYPE`,desc:W(`ADMIN_CONFIG_ITEM_QCLOUD_CMS_BIZTYPE`),ph:`${a()}1787728329856520192`,value:``},{key:`LIMIT_PER_MINUTE`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE`),ph:`${a()}5`,value:``},{key:`LIMIT_PER_MINUTE_ALL`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_PER_MINUTE_ALL`),ph:`${a()}5`,value:``},{key:`LIMIT_LENGTH`,desc:W(`ADMIN_CONFIG_ITEM_LIMIT_LENGTH`),ph:`${a()}100`,value:``},{key:`FORBIDDEN_WORDS`,desc:W(`ADMIN_CONFIG_ITEM_FORBIDDEN_WORDS`),ph:`${a()}快递,空包`,value:``},{key:`BLOCKED_WORDS`,desc:W(`ADMIN_CONFIG_ITEM_BLOCKED_WORDS`),ph:`${a()}快递,空包`,value:``},{key:`NOTIFY_SPAM`,desc:W(`ADMIN_CONFIG_ITEM_NOTIFY_SPAM`),ph:`${a()}false`,value:``},{key:`HIDE_SPAM`,desc:W(`ADMIN_CONFIG_ITEM_HIDE_SPAM`),ph:`${a()}true`,value:``},{key:`JEV_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_JEV_API_KEY`),ph:`your-typesafe-api-key`,value:``,secret:!0},{key:`JEV_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_JEV_API_ENDPOINT`),ph:`https://api.typesafe.ai/v1/systemone`,value:``},{key:`JEV_MODEL`,desc:W(`ADMIN_CONFIG_ITEM_JEV_MODEL`),ph:`jev-latest`,value:``},{key:`JEV_SPAM_THRESHOLD`,desc:W(`ADMIN_CONFIG_ITEM_JEV_SPAM_THRESHOLD`),ph:`0.85`,value:``},{key:`LLM_API_KEY`,desc:W(`ADMIN_CONFIG_ITEM_LLM_API_KEY`),ph:`sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`,value:``,secret:!0},{key:`LLM_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_LLM_API_ENDPOINT`),ph:`https://api.deepseek.com/v1`,value:``},{key:`LLM_MODEL`,desc:W(`ADMIN_CONFIG_ITEM_LLM_MODEL`),ph:`deepseek-v4-pro`,value:``},{key:`LLM_SPAM_PROMPT`,desc:W(`ADMIN_CONFIG_ITEM_LLM_SPAM_PROMPT`),ph:``,value:``,type:`textarea`},{key:`LLM_MAX_RETRIES`,desc:W(`ADMIN_CONFIG_ITEM_LLM_MAX_RETRIES`),ph:`3`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_CAPTCHA`),items:[{key:`CAPTCHA_PROVIDER`,desc:W(`ADMIN_CONFIG_ITEM_CAPTCHA_PROVIDER`),ph:``,value:``,options:[{value:``,label:W(`ADMIN_CONFIG_CAPTCHA_NONE`)},{value:`Turnstile`,label:W(`ADMIN_CONFIG_CAPTCHA_TURNSTILE`)},{value:`Geetest`,label:W(`ADMIN_CONFIG_CAPTCHA_GEETEST`)},{value:`Cap`,label:W(`ADMIN_CONFIG_CAPTCHA_CAP`)}]},{key:`TURNSTILE_SITE_KEY`,desc:W(`ADMIN_CONFIG_ITEM_TURNSTILE_SITE_KEY`),ph:`${a()}0x4AAAAAAAPLTtpBr_T12345`,value:``,showIf:i(`Turnstile`)},{key:`TURNSTILE_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_TURNSTILE_SECRET_KEY`),ph:`${a()}0x4AAAAAAAPLTmBm6gHmOnOqC1iwmU12345`,value:``,secret:!0,showIf:i(`Turnstile`)},{key:`GEETEST_CAPTCHA_ID`,desc:W(`ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_ID`),ph:`${a()}your_captcha_id`,value:``,showIf:i(`Geetest`)},{key:`GEETEST_CAPTCHA_KEY`,desc:W(`ADMIN_CONFIG_ITEM_GEETEST_CAPTCHA_KEY`),ph:`${a()}your_captcha_key`,value:``,secret:!0,showIf:i(`Geetest`)},{key:`CAP_API_ENDPOINT`,desc:W(`ADMIN_CONFIG_ITEM_CAP_API_ENDPOINT`),ph:`${a()}https://cap.example.com/d9256640cb53/(留空=内嵌,无需外部服务)`,value:``,showIf:i(`Cap`)},{key:`CAP_SECRET_KEY`,desc:W(`ADMIN_CONFIG_ITEM_CAP_SECRET_KEY`),ph:`${a()}仅外部 Cap 需要;内嵌模式可留空`,value:``,secret:!0,showIf:i(`Cap`)}]},{name:W(`ADMIN_CONFIG_CATEGORY_IM`),items:[{key:`PUSHOO_CHANNEL`,desc:W(`ADMIN_CONFIG_ITEM_PUSHOO_CHANNEL`),ph:`${a()}pushdeer`,value:``},{key:`PUSHOO_TOKEN`,desc:W(`ADMIN_CONFIG_ITEM_PUSHOO_TOKEN`),ph:`${a()}PDU431TfFHZICvR6lJrFBswSRN1cJ*****zzFvR`,value:``},{key:`SC_MAIL_NOTIFY`,desc:W(`ADMIN_CONFIG_ITEM_SC_MAIL_NOTIFY`),ph:`${a()}true`,value:``}]},{name:W(`ADMIN_CONFIG_CATEGORY_MAIL`),items:[{key:`SENDER_EMAIL`,desc:W(`ADMIN_CONFIG_ITEM_SENDER_EMAIL`),ph:`${a()}blog@imaegoo.com`,value:``},{key:`SENDER_NAME`,desc:W(`ADMIN_CONFIG_ITEM_SENDER_NAME`),ph:`${a()}虹墨空间站评论提醒`,value:``},{key:`SMTP_SERVICE`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_SERVICE`),ph:`${a()}QQ`,value:``},{key:`SMTP_HOST`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_HOST`),ph:`${a()}smtp.qq.com`,value:``},{key:`SMTP_PORT`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_PORT`),ph:`${a()}465`,value:``},{key:`SMTP_SECURE`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_SECURE`),ph:`${a()}true`,value:``},{key:`SMTP_USER`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_USER`),ph:`${a()}blog@imaegoo.com`,value:``},{key:`SMTP_PASS`,desc:W(`ADMIN_CONFIG_ITEM_SMTP_PASS`),ph:`${a()}password`,value:``,secret:!0},{key:`MAIL_SUBJECT`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_SUBJECT`),ph:`${a()}您在虹墨空间站上的评论收到了回复`,value:``},{key:`MAIL_TEMPLATE`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_TEMPLATE`),ph:``,value:``,type:`textarea`},{key:`MAIL_SUBJECT_ADMIN`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_SUBJECT_ADMIN`),ph:`${a()}虹墨空间站上有新评论了`,value:``},{key:`MAIL_TEMPLATE_ADMIN`,desc:W(`ADMIN_CONFIG_ITEM_MAIL_TEMPLATE_ADMIN`),ph:``,value:``,type:`textarea`}]}]}let s=lm(o()),c=q(!0),l=lm({}),u=q(``),d=wo,f=q(``),p=q(``),m=q(``);async function h(){c.value=!0;try{let e=Ao(await Lo(Po().tcb,`GET_CONFIG_FOR_ADMIN`));return e&&!e.code&&e.config&&(Object.assign(l,e.config),u.value=String(e.config.VERSION??``),l.CAPTCHA_PROVIDER===void 0&&(l.TURNSTILE_SITE_KEY?l.CAPTCHA_PROVIDER=`Turnstile`:l.GEETEST_CAPTCHA_ID&&(l.CAPTCHA_PROVIDER=`Geetest`)),l.IMAGE_CDN===void 0&&(l.IMAGE_CDN=``),g()),!0}catch(e){return f.value=jo(e),!1}finally{c.value=!1}}function g(){for(let e of s)for(let t of e.items){let e=l[t.key];t.value=e===void 0?``:String(e)}}function _(e){return typeof e.showIf!=`function`||e.showIf(e=>{for(let t of s){let n=t.items.find(t=>t.key===e);if(n)return n.value}return``})}async function v(){c.value=!0,f.value=`正在保存`;let e={};for(let t of s)for(let n of t.items){let t=l[n.key];String(t??``)!==n.value&&(e[n.key]=n.value)}e.IMAGE_CDN!==void 0&&(e.SHOW_IMAGE=e.IMAGE_CDN?`true`:`false`),zo.info(`保存配置`,e);try{if(Ao(await Lo(Po().tcb,`SET_CONFIG`,{config:e})),!await h())return;Gy(By),f.value=`保存成功`}catch(e){f.value=jo(e)}finally{c.value=!1}}async function y(){c.value=!0;try{let e=await Lo(Po().tcb,`EMAIL_TEST`,{mail:p.value});Ao(e),zo.info(`邮件测试`,e),m.value=JSON.stringify(e)}catch(e){m.value=jo(e)}finally{c.value=!1}}function b(){h()}return Fh(()=>{h(),Uy(By,b)}),zh(()=>{Wy(By,b)}),(e,t)=>ih((Y(),X(`div`,Rx,[J(d)===u.value?$(`v-if`,!0):(Y(),X(`div`,zx,[Z(`span`,null,K(J(W)(`ADMIN_CLIENT_VERSION`))+K(J(d))+`,`,1),Z(`span`,null,K(J(W)(`ADMIN_SERVER_VERSION`))+K(u.value)+`,`,1),$(`
246
246
  用 prettier-ignore 保持单行:这一段的换行/缩进空白会被 Vue 3 的 condense 折叠成
247
247
  一个空格(Vue 2 保留、HTML 同样折叠),与两侧的 &nbsp; 叠加后会让「版本更新」
248
248
  链接左右各宽约一个空格,而 1.x 只有 &nbsp;。所以必须让 &nbsp; 与 <a> 紧贴。
249
- `),$(` prettier-ignore `),t[1]||=Z(`span`,null,[E_(`请参考\xA0`),Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},`版本更新`),E_(`\xA0进行升级`)],-1)])),Z(`form`,{onSubmit:Qv(v,[`prevent`])},[Z(`div`,Fx,[(Y(!0),X(c_,null,Wh(s,e=>(Y(),X(`details`,{key:e.name,class:`tk-admin-config-group`},[Z(`summary`,Ix,K(e.name),1),(Y(!0),X(c_,null,Wh(e.items,e=>$m((Y(),X(`div`,{key:e.key,class:`tk-admin-config-item`},[Z(`div`,{class:`tk-admin-config-title`,title:e.key},K(e.key),9,Lx),Z(`div`,Rx,[e.options?$m((Y(),X(`select`,{key:0,"onUpdate:modelValue":t=>e.value=t,class:`tk-admin-config-select`},[(Y(!0),X(c_,null,Wh(e.options,e=>(Y(),X(`option`,{key:e.value,value:e.value},K(e.label),9,Bx))),128))],8,zx)),[[Kv,e.value]]):e.type===`textarea`?(Y(),v_(Ny,{key:1,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,type:`textarea`,rows:5,size:`small`,placeholder:e.ph},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`])):(Y(),v_(Ny,{key:2,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,type:e.secret?`password`:`text`,size:`small`,placeholder:e.ph},null,8,[`modelValue`,`onUpdate:modelValue`,`type`,`placeholder`]))]),t[2]||=Z(`div`,null,null,-1),Z(`div`,Vx,K(e.desc),1)])),[[hv,_(e)]])),128))]))),128)),Z(`details`,Hx,[Z(`summary`,Ux,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST`)),1),Z(`div`,Wx,[Z(`div`,Gx,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_HELP`)),1),Z(`div`,Kx,[Q(Ny,{modelValue:p.value,"onUpdate:modelValue":t[0]||=e=>p.value=e,size:`small`},{append:Qm(()=>[Q(Gy,{type:`info`,onClick:y},{default:Qm(()=>[E_(K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_BTN`)),1)]),_:1})]),_:1},8,[`modelValue`])]),Z(`div`,qx,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_RESULT`))+K(m.value),1)])])]),Z(`div`,Jx,[Q(Gy,{size:`small`,type:`primary`,"native-type":`submit`},{default:Qm(()=>[E_(K(J(W)(`ADMIN_CONFIG_SAVE`)),1)]),_:1}),Q(Gy,{size:`small`,type:`info`,onClick:g},{default:Qm(()=>[E_(K(J(W)(`ADMIN_CONFIG_RESET`)),1)]),_:1})])],32),Z(`div`,Yx,K(f.value),1)])),[[J(pd),c.value]])}}),Zx={class:`tk-admin-import`},Qx={class:`tk-admin-warn tk-admin-import-warn`},$x={class:`tk-admin-import-label`},eS={disabled:``,value:``},tS={class:`tk-admin-import-label`},nS={class:`tk-admin-import-actions`},rS=hh({__name:`TkAdminImport`,setup(e){let t=q(!1),n=q(``),r=q(``),i=im({valine:W(`ADMIN_IMPORT_TIP_VALINE`),disqus:W(`ADMIN_IMPORT_TIP_DISQUS`),artalk:W(`ADMIN_IMPORT_TIP_ARTALK`),artalk2:``,twikoo:``}),a=q(),o=q();function s(e){r.value+=`${new Date().toLocaleString()} ${e}\n`,Bm(()=>{let e=o.value?.inputEl;e&&(e.scrollTop=e.scrollHeight)})}async function c(){if(!n.value){s(W(`ADMIN_IMPORT_SOURCE_REQUIRED`));return}let e=a.value?.files?.[0];if(!e){s(W(`ADMIN_IMPORT_FILE_REQUIRED`));return}s(W(`ADMIN_IMPORT_START`)),t.value=!0;try{let t=ko().tcb;if(t){let n=await t.app.uploadFile({cloudPath:`import/${Date.now()}`,filePath:e,onUploadProgress:e=>{let t=Math.round(e.loaded*100/e.total);s(`${W(`ADMIN_IMPORT_UPLOADING`)}${t}%`)}});s(`${W(`ADMIN_IMPORT_UPLOADED`)}${n.fileID}`),await l(String(n.fileID))}else await u(e)}catch(e){console.error(e),s(e.message)}t.value=!1}async function l(e){s(`${W(`ADMIN_IMPORT_IMPORTING`)}${n.value}`);let t=await Mo(ko().tcb,`COMMENT_IMPORT_FOR_ADMIN`,{fileId:e,source:n.value}),i=t.result??t;r.value+=i.log??``,s(`${W(`ADMIN_IMPORT_IMPORTED`)}${n.value}`)}async function u(e){s(`${W(`ADMIN_IMPORT_IMPORTING`)}${n.value}`);let t=await Mo(ko().tcb,`COMMENT_IMPORT_FOR_ADMIN`,{file:await Pd(e),source:n.value}),i=t.result??t;r.value+=i.log??``,s(`${W(`ADMIN_IMPORT_IMPORTED`)}${n.value}`)}function d(e){return!e||typeof e!=`object`||Array.isArray(e)?!1:Object.values(e).every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)}async function f(){if(n.value!==`twikoo`){s(W(`ADMIN_CONFIG_IMPORT_SOURCE_INVALID`));return}let e=a.value?.files?.[0];if(!e){s(W(`ADMIN_IMPORT_FILE_REQUIRED`));return}t.value=!0;try{let t=JSON.parse(await Pd(e));if(!d(t)){s(W(`ADMIN_CONFIG_IMPORT_INVALID`));return}let n={...t};delete n.CREDENTIALS,s(W(`ADMIN_CONFIG_IMPORTING`));let r=await Mo(ko().tcb,`SET_CONFIG`,{config:n}),i=r.result??r;if(i.code===0)By(Fy),s(W(`ADMIN_CONFIG_IMPORTED`));else{let e=typeof i.message==`string`?i.message:``;s(`${W(`ADMIN_CONFIG_IMPORT_FAILED`)}${e}`)}}catch(e){console.error(e),s(`${W(`ADMIN_CONFIG_IMPORT_FAILED`)}${e.message}`)}t.value=!1}return(e,s)=>(Y(),X(`div`,Zx,[Z(`div`,Qx,[Z(`p`,null,K(J(W)(`ADMIN_IMPORT_WARN`)),1),Z(`p`,null,K(i[n.value]),1)]),Z(`div`,$x,K(J(W)(`ADMIN_IMPORT_SELECT_SOURCE`)),1),$m(Z(`select`,{"onUpdate:modelValue":s[0]||=e=>n.value=e},[Z(`option`,eS,K(J(W)(`ADMIN_IMPORT_SELECT`)),1),s[2]||=D_(`<option value="valine">Valine (JSON)</option><option value="disqus">Disqus (XML)</option><option value="artalk">Artalk v1 (JSON)</option><option value="artalk2">Artalk v2 (Artrans)</option><option value="twikoo">Twikoo (JSON)</option>`,5)],512),[[Kv,n.value]]),Z(`div`,tS,K(J(W)(`ADMIN_IMPORT_SELECT_FILE`)),1),Z(`input`,{ref_key:`inputFileRef`,ref:a,type:`file`,value:``},null,512),Z(`div`,nS,[Q(Gy,{size:`small`,disabled:t.value,onClick:c},{default:Qm(()=>[E_(K(J(W)(`ADMIN_IMPORT_COMMENT`)),1)]),_:1},8,[`disabled`]),Q(Gy,{size:`small`,disabled:t.value,onClick:f},{default:Qm(()=>[E_(K(J(W)(`ADMIN_CONFIG_IMPORT`)),1)]),_:1},8,[`disabled`])]),Q(Ny,{ref_key:`logTextAreaRef`,ref:o,modelValue:r.value,"onUpdate:modelValue":s[1]||=e=>r.value=e,type:`textarea`,rows:10,readonly:``,placeholder:J(W)(`ADMIN_IMPORT_LOG`)},null,8,[`modelValue`,`placeholder`])]))}}),iS={class:`tk-admin-export`},aS={class:`tk-admin-warn tk-admin-import-warn`},oS=hh({__name:`TkAdminExport`,setup(e){let t=q(!1);async function n(e){t.value=!0;try{let t=await Mo(ko().tcb,`COMMENT_EXPORT_FOR_ADMIN`,{collection:e}),n=t.result??t;n.data&&i(`twikoo-${e}.json`,n.data)}finally{t.value=!1}}async function r(){t.value=!0;try{let e=await Mo(ko().tcb,`GET_CONFIG_FOR_ADMIN`,{}),t=e.result??e;if(!t.config)return;let n={...t.config};delete n.VERSION,i(`twikoo-config-${new Date().toISOString().slice(0,10)}.json`,n)}finally{t.value=!1}}function i(e,t){let n=t instanceof Object?JSON.stringify(t,null,2):String(t),r=new Blob([n]),i=document.createElementNS(`http://www.w3.org/1999/xhtml`,`a`);i.href=URL.createObjectURL(r),i.download=e,i.click()}return(e,i)=>(Y(),X(`div`,iS,[Z(`div`,aS,[Z(`p`,null,K(J(W)(`ADMIN_EXPORT_WARN`)),1)]),Q(Gy,{size:`small`,disabled:t.value,onClick:i[0]||=e=>n(`comment`)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_EXPORT_COMMENT`)),1)]),_:1},8,[`disabled`]),Q(Gy,{size:`small`,disabled:t.value,onClick:i[1]||=e=>n(`counter`)},{default:Qm(()=>[E_(K(J(W)(`ADMIN_EXPORT_COUNTER`)),1)]),_:1},8,[`disabled`]),Q(Gy,{size:`small`,disabled:t.value,onClick:r},{default:Qm(()=>[E_(K(J(W)(`ADMIN_CONFIG_EXPORT`)),1)]),_:1},8,[`disabled`])]))}}),sS={class:`tk-admin-container`},cS={key:0,class:`tk-login-title`},lS={key:1},uS={key:0,class:`tk-login`},dS={class:`tk-login-title`},fS={key:0,class:`tk-login-msg`},pS={href:`https://twikoo.js.org/faq.html`,rel:`noopener noreferrer`,target:`_blank`},mS={key:1,class:`tk-regist`},hS={class:`tk-login-title`},gS={key:0,class:`tk-login-msg`},_S={key:1,class:`tk-login-msg`},vS={href:`https://twikoo.js.org/faq.html`,rel:`noopener noreferrer`,target:`_blank`},yS={key:2,class:`tk-panel`},bS={class:`tk-panel-title`},xS={class:`tk-tabs`},SS=hh({__name:`TkAdmin`,props:{show:{type:Boolean,default:!1}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=q(!0),a=q(``),o=q(!1),s=q(!1),c=q(!0),l=q(!1),u=q(``),d=q(``),f=q(``),p=q(``),m=q(`comment`),h=q(),g=tv(()=>!c.value&&!!d.value&&d.value===f.value&&(l.value||!!u.value));async function _(){if(!d.value){p.value=W(`ADMIN_PASSWORD_REQUIRED`);return}i.value=!0,p.value=``;let e=(0,Lc.default)(d.value),t=ko().tcb,n=await Mo(t,`LOGIN`,{password:e}),r=n.result??n;if(r.message)p.value=r.message;else if(r.ticket)try{await t?.auth?.customAuthProvider().signIn(r.ticket),Po.info(`登录成功`),d.value=``,await S()}catch(e){Po.error(`登录失败`,e)}else r.code===0&&(Po.info(`登录成功`),localStorage.setItem(`twikoo-access-token`,e),d.value=``,await S());i.value=!1}async function v(e){e.preventDefault(),i.value=!0;let t=ko().tcb;t?.auth?(await t.auth.signOut(),await t.auth.anonymousAuthProvider().signIn()):localStorage.removeItem(`twikoo-access-token`),s.value=!1,i.value=!1}async function y(){i.value=!0;let e=(0,Lc.default)(d.value),t=await Mo(ko().tcb,`SET_PASSWORD`,{password:e,credentials:u.value}),n=t.result??t;n.code?(p.value=W(`ADMIN_REGIST_FAILED`),n.message&&(p.value+=`,${n.message}`),Po.warn(`Twikoo 注册失败`,t)):(c.value=!0,await _()),i.value=!1}async function b(){i.value=!0,await S(),s.value||(await C(),x()),i.value=!1}function x(){setTimeout(()=>h.value?.focus(),500)}async function S(){let e=ko().tcb;if(e?.auth){let t=await e.auth.getCurrentUser();s.value=t.loginType===`CUSTOM`}else{let t=await Mo(e,`GET_CONFIG`),n=t.result??t;s.value=n?.config?.IS_ADMIN===!0}}async function C(){try{let e=await Mo(ko().tcb,`GET_PASSWORD_STATUS`),t=e.result??e;a.value=t.version??``,c.value=t.status===!0,l.value=!ko().tcb}catch(e){throw o.value=!0,i.value=!1,e}}function w(){r(`close`)}return ah(()=>n.show,e=>{e&&b()}),(t,n)=>(Y(),X(`div`,sS,[$m((Y(),X(`div`,{class:Nf([`tk-admin`,{__show:e.show}])},[Z(`button`,{class:`tk-admin-close`,onClick:w},[Q(ly,{name:`times`})]),o.value?(Y(),X(`div`,cS,[Z(`div`,null,K(J(W)(`ADMIN_NEED_UPDATE`)),1),n[10]||=Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},` https://twikoo.js.org/update.html `,-1)])):(Y(),X(`div`,lS,[!s.value&&c.value?(Y(),X(`div`,uS,[Z(`div`,dS,K(J(W)(`ADMIN_LOGIN_TITLE`)),1),Z(`form`,{onSubmit:n[1]||=Qv(()=>{},[`prevent`])},[n[11]||=Z(`input`,{type:`hidden`},null,-1),Q(Ny,{ref_key:`focusmeRef`,ref:h,modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_PASSWORD_PLACEHOLDER`),onKeyup:ey(_,[`enter`])},{prepend:Qm(()=>[E_(K(J(W)(`ADMIN_PASSWORD`)),1)]),append:Qm(()=>[Q(Gy,{onClick:_},{default:Qm(()=>[E_(K(J(W)(`ADMIN_LOGIN`)),1)]),_:1})]),_:1},8,[`modelValue`,`placeholder`])],32),p.value?(Y(),X(`div`,fS,[E_(K(p.value)+` `,1),Z(`a`,pS,K(J(W)(`ADMIN_FORGOT`)),1)])):$(`v-if`,!0)])):$(`v-if`,!0),!s.value&&!c.value?(Y(),X(`div`,mS,[Z(`div`,hS,K(J(W)(`ADMIN_LOGIN_TITLE`)),1),Z(`form`,{onSubmit:n[5]||=Qv(()=>{},[`prevent`])},[l.value?$(`v-if`,!0):(Y(),v_(Ny,{key:0,ref_key:`focusmeRef`,ref:h,modelValue:u.value,"onUpdate:modelValue":n[2]||=e=>u.value=e,class:`tk-password`,placeholder:J(W)(`ADMIN_CREDENTIALS_PLACEHOLDER`)},{prepend:Qm(()=>[E_(K(J(W)(`ADMIN_CREDENTIALS`)),1)]),_:1},8,[`modelValue`,`placeholder`])),Q(Ny,{modelValue:d.value,"onUpdate:modelValue":n[3]||=e=>d.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_SET_PASSWORD_PLACEHOLDER`)},{prepend:Qm(()=>[E_(K(J(W)(`ADMIN_SET_PASSWORD`)),1)]),_:1},8,[`modelValue`,`placeholder`]),Q(Ny,{modelValue:f.value,"onUpdate:modelValue":n[4]||=e=>f.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER`)},{prepend:Qm(()=>[E_(K(J(W)(`ADMIN_SET_PASSWORD_CONFIRM`)),1)]),_:1},8,[`modelValue`,`placeholder`])],32),Q(Gy,{class:`tk-regist-button`,disabled:!g.value,onClick:y},{default:Qm(()=>[E_(K(J(W)(`ADMIN_REGIST`)),1)]),_:1},8,[`disabled`]),p.value?(Y(),X(`div`,gS,K(p.value),1)):$(`v-if`,!0),l.value?$(`v-if`,!0):(Y(),X(`div`,_S,[Z(`a`,vS,K(J(W)(`ADMIN_CREDENTIALS_FAQ`)),1)]))])):$(`v-if`,!0),s.value?(Y(),X(`div`,yS,[Z(`div`,bS,[Z(`div`,null,K(J(W)(`ADMIN_TITLE`)),1),Z(`a`,{class:`tk-panel-logout`,href:`#`,onClick:Qv(v,[`prevent`])},K(J(W)(`ADMIN_LOGOUT`)),1)]),Z(`div`,xS,[Z(`div`,{class:Nf([`tk-tab`,{__active:m.value===`comment`}]),onClick:n[6]||=e=>m.value=`comment`},K(J(W)(`ADMIN_COMMENT`)),3),Z(`div`,{class:Nf([`tk-tab`,{__active:m.value===`config`}]),onClick:n[7]||=e=>m.value=`config`},K(J(W)(`ADMIN_CONFIG`)),3),Z(`div`,{class:Nf([`tk-tab`,{__active:m.value===`import`}]),onClick:n[8]||=e=>m.value=`import`},K(J(W)(`ADMIN_IMPORT`)),3),Z(`div`,{class:Nf([`tk-tab`,{__active:m.value===`export`}]),onClick:n[9]||=e=>m.value=`export`},K(J(W)(`ADMIN_EXPORT`)),3)]),$m(Q(Mx,null,null,512),[[hv,m.value===`comment`]]),$m(Q(Xx,null,null,512),[[hv,m.value===`config`]]),$m(Q(rS,null,null,512),[[hv,m.value===`import`]]),$m(Q(oS,null,null,512),[[hv,m.value===`export`]])])):$(`v-if`,!0)]))],2)),[[J(pd),i.value]])]))}}),CS={id:`twikoo`,class:`twikoo`},wS=hh({__name:`App`,setup(e){let t=q(!1),n=q(!1);function r(e){n.value=e===!0}return Ah(()=>{Ry(Ly,r)}),Ph(()=>{zy(Ly,r)}),(e,r)=>(Y(),X(`div`,CS,[Q(nx,{"show-admin-entry":n.value,onAdmin:r[0]||=e=>t.value=!0},null,8,[`show-admin-entry`]),Q(ix),Q(SS,{show:t.value,onClose:r[1]||=e=>t.value=!1},null,8,[`show`])]))}}),TS=null;function ES(e,t={}){return TS&&=(TS.unmount(),null),TS=iy(wS),TS.config.globalProperties.$tcb=e,TS.config.globalProperties.$twikoo=t,Oo(e,t),TS.mount(t.el||`#twikoo`),TS}var DS=()=>globalThis.cloudbase;function OS(e){DS=e}async function kS(e){if(_d(e.envId))return null;let t=DS();return t===void 0?(Po.error(`Please import cloudbase firstly:
250
- <script src="https://imgcache.qq.com/qcloud/cloudbase-js-sdk/1.3.3/cloudbase.full.js"><\/script>`),null):await Vd(t,e)}async function AS(e={}){let t=await kS(e);await Go({lang:e.lang,localeBaseUrl:e.localeBaseUrl}),ES(t,e),await Nd(t,e)}async function jS(e={}){return await Ad(await kS(e),e)}async function MS(e={}){return await jd(await kS(e),e)}async function NS(e={}){return await Md(await kS(e),e)}OS(()=>uo),e.default=AS,e.init=AS,e.getCommentsCount=jS,e.getRecentComments=MS,e.getVisitorsCount=NS,e.setCloudbaseProvider=OS,e.version=wo});
249
+ `),$(` prettier-ignore `),t[1]||=Z(`span`,null,[j_(`请参考\xA0`),Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},`版本更新`),j_(`\xA0进行升级`)],-1)])),Z(`form`,{onSubmit:ry(v,[`prevent`])},[Z(`div`,Bx,[(Y(!0),X(p_,null,Yh(s,e=>(Y(),X(`details`,{key:e.name,class:`tk-admin-config-group`},[Z(`summary`,Vx,K(e.name),1),(Y(!0),X(p_,null,Yh(e.items,e=>ih((Y(),X(`div`,{key:e.key,class:`tk-admin-config-item`},[Z(`div`,{class:`tk-admin-config-title`,title:e.key},K(e.key),9,Hx),Z(`div`,Ux,[e.options?ih((Y(),X(`select`,{key:0,"onUpdate:modelValue":t=>e.value=t,class:`tk-admin-config-select`},[(Y(!0),X(p_,null,Yh(e.options,e=>(Y(),X(`option`,{key:e.value,value:e.value},K(e.label),9,Gx))),128))],8,Wx)),[[Zv,e.value]]):e.type===`textarea`?(Y(),C_(Ry,{key:1,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,type:`textarea`,rows:5,size:`small`,placeholder:e.ph},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`])):(Y(),C_(Ry,{key:2,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,type:e.secret?`password`:`text`,size:`small`,placeholder:e.ph},null,8,[`modelValue`,`onUpdate:modelValue`,`type`,`placeholder`]))]),t[2]||=Z(`div`,null,null,-1),Z(`div`,Kx,K(e.desc),1)])),[[bv,_(e)]])),128))]))),128)),Z(`details`,qx,[Z(`summary`,Jx,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST`)),1),Z(`div`,Yx,[Z(`div`,Xx,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_HELP`)),1),Z(`div`,Zx,[Q(Ry,{modelValue:p.value,"onUpdate:modelValue":t[0]||=e=>p.value=e,size:`small`},{append:rh(()=>[Q(Xy,{type:`info`,onClick:y},{default:rh(()=>[j_(K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_BTN`)),1)]),_:1})]),_:1},8,[`modelValue`])]),Z(`div`,Qx,K(J(W)(`ADMIN_CONFIG_EMAIL_TEST_RESULT`))+K(m.value),1)])])]),Z(`div`,$x,[Q(Xy,{size:`small`,type:`primary`,"native-type":`submit`},{default:rh(()=>[j_(K(J(W)(`ADMIN_CONFIG_SAVE`)),1)]),_:1}),Q(Xy,{size:`small`,type:`info`,onClick:g},{default:rh(()=>[j_(K(J(W)(`ADMIN_CONFIG_RESET`)),1)]),_:1})])],32),Z(`div`,eS,K(f.value),1)])),[[J(vd),c.value]])}}),nS={class:`tk-admin-import`},rS={class:`tk-admin-warn tk-admin-import-warn`},iS={class:`tk-admin-import-label`},aS={disabled:``,value:``},oS={class:`tk-admin-import-label`},sS={class:`tk-admin-import-actions`},cS=bh({__name:`TkAdminImport`,setup(e){let t=q(!1),n=q(``),r=q(``),i=lm({valine:W(`ADMIN_IMPORT_TIP_VALINE`),disqus:W(`ADMIN_IMPORT_TIP_DISQUS`),artalk:W(`ADMIN_IMPORT_TIP_ARTALK`),artalk2:``,twikoo:``}),a=q(),o=q();function s(e){r.value+=`${new Date().toLocaleString()} ${e}\n`,Gm(()=>{let e=o.value?.inputEl;e&&(e.scrollTop=e.scrollHeight)})}async function c(){if(!n.value){s(W(`ADMIN_IMPORT_SOURCE_REQUIRED`));return}let e=a.value?.files?.[0];if(!e){s(W(`ADMIN_IMPORT_FILE_REQUIRED`));return}s(W(`ADMIN_IMPORT_START`)),t.value=!0;try{let t=Po().tcb;if(t){let n=await t.app.uploadFile({cloudPath:`import/${Date.now()}`,filePath:e,onUploadProgress:e=>{let t=Math.round(e.loaded*100/e.total);s(`${W(`ADMIN_IMPORT_UPLOADING`)}${t}%`)}});s(`${W(`ADMIN_IMPORT_UPLOADED`)}${n.fileID}`),await l(String(n.fileID))}else await u(e)}catch(e){console.error(e),s(jo(e))}finally{t.value=!1}}async function l(e){s(`${W(`ADMIN_IMPORT_IMPORTING`)}${n.value}`);let t=Ao(await Lo(Po().tcb,`COMMENT_IMPORT_FOR_ADMIN`,{fileId:e,source:n.value}));r.value+=t.log??``,s(`${W(`ADMIN_IMPORT_IMPORTED`)}${n.value}`)}async function u(e){s(`${W(`ADMIN_IMPORT_IMPORTING`)}${n.value}`);let t=Ao(await Lo(Po().tcb,`COMMENT_IMPORT_FOR_ADMIN`,{file:await Rd(e),source:n.value}));r.value+=t.log??``,s(`${W(`ADMIN_IMPORT_IMPORTED`)}${n.value}`)}function d(e){return!e||typeof e!=`object`||Array.isArray(e)?!1:Object.values(e).every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)}async function f(){if(n.value!==`twikoo`){s(W(`ADMIN_CONFIG_IMPORT_SOURCE_INVALID`));return}let e=a.value?.files?.[0];if(!e){s(W(`ADMIN_IMPORT_FILE_REQUIRED`));return}t.value=!0;let r=!1;try{let t=JSON.parse(await Rd(e));if(!d(t)){s(W(`ADMIN_CONFIG_IMPORT_INVALID`));return}let n={...t};delete n.CREDENTIALS,s(W(`ADMIN_CONFIG_IMPORTING`)),r=!0;let i=Ao(await Lo(Po().tcb,`SET_CONFIG`,{config:n}));if(i.code===0)Gy(By),s(W(`ADMIN_CONFIG_IMPORTED`));else{let e=typeof i.message==`string`?i.message:``;s(`${W(`ADMIN_CONFIG_IMPORT_FAILED`)}${e}`)}}catch(e){console.error(e),s(`${W(`ADMIN_CONFIG_IMPORT_FAILED`)}${jo(e)}`),r&&!(e instanceof ko)&&Gy(By)}finally{t.value=!1}}return(e,s)=>(Y(),X(`div`,nS,[Z(`div`,rS,[Z(`p`,null,K(J(W)(`ADMIN_IMPORT_WARN`)),1),Z(`p`,null,K(i[n.value]),1)]),Z(`div`,iS,K(J(W)(`ADMIN_IMPORT_SELECT_SOURCE`)),1),ih(Z(`select`,{"onUpdate:modelValue":s[0]||=e=>n.value=e},[Z(`option`,aS,K(J(W)(`ADMIN_IMPORT_SELECT`)),1),s[2]||=M_(`<option value="valine">Valine (JSON)</option><option value="disqus">Disqus (XML)</option><option value="artalk">Artalk v1 (JSON)</option><option value="artalk2">Artalk v2 (Artrans)</option><option value="twikoo">Twikoo (JSON)</option>`,5)],512),[[Zv,n.value]]),Z(`div`,oS,K(J(W)(`ADMIN_IMPORT_SELECT_FILE`)),1),Z(`input`,{ref_key:`inputFileRef`,ref:a,type:`file`,value:``},null,512),Z(`div`,sS,[Q(Xy,{size:`small`,disabled:t.value,onClick:c},{default:rh(()=>[j_(K(J(W)(`ADMIN_IMPORT_COMMENT`)),1)]),_:1},8,[`disabled`]),Q(Xy,{size:`small`,disabled:t.value,onClick:f},{default:rh(()=>[j_(K(J(W)(`ADMIN_CONFIG_IMPORT`)),1)]),_:1},8,[`disabled`])]),Q(Ry,{ref_key:`logTextAreaRef`,ref:o,modelValue:r.value,"onUpdate:modelValue":s[1]||=e=>r.value=e,type:`textarea`,rows:10,readonly:``,placeholder:J(W)(`ADMIN_IMPORT_LOG`)},null,8,[`modelValue`,`placeholder`])]))}}),lS={class:`tk-admin-export`},uS={class:`tk-admin-warn tk-admin-import-warn`},dS=bh({__name:`TkAdminExport`,setup(e){let t=q(!1);async function n(e){t.value=!0;try{let t=Ao(await Lo(Po().tcb,`COMMENT_EXPORT_FOR_ADMIN`,{collection:e}));t.data&&i(`twikoo-${e}.json`,t.data)}catch(e){alert(jo(e))}finally{t.value=!1}}async function r(){t.value=!0;try{let e=Ao(await Lo(Po().tcb,`GET_CONFIG_FOR_ADMIN`,{}));if(!e.config)return;let t={...e.config};delete t.VERSION,i(`twikoo-config-${new Date().toISOString().slice(0,10)}.json`,t)}catch(e){alert(jo(e))}finally{t.value=!1}}function i(e,t){let n=t instanceof Object?JSON.stringify(t,null,2):String(t),r=new Blob([n]),i=document.createElementNS(`http://www.w3.org/1999/xhtml`,`a`);i.href=URL.createObjectURL(r),i.download=e,i.click()}return(e,i)=>(Y(),X(`div`,lS,[Z(`div`,uS,[Z(`p`,null,K(J(W)(`ADMIN_EXPORT_WARN`)),1)]),Q(Xy,{size:`small`,disabled:t.value,onClick:i[0]||=e=>n(`comment`)},{default:rh(()=>[j_(K(J(W)(`ADMIN_EXPORT_COMMENT`)),1)]),_:1},8,[`disabled`]),Q(Xy,{size:`small`,disabled:t.value,onClick:i[1]||=e=>n(`counter`)},{default:rh(()=>[j_(K(J(W)(`ADMIN_EXPORT_COUNTER`)),1)]),_:1},8,[`disabled`]),Q(Xy,{size:`small`,disabled:t.value,onClick:r},{default:rh(()=>[j_(K(J(W)(`ADMIN_CONFIG_EXPORT`)),1)]),_:1},8,[`disabled`])]))}}),fS={class:`tk-admin-container`},pS={key:0,class:`tk-login-title`},mS={key:1},hS={key:0,class:`tk-login`},gS={class:`tk-login-title`},_S={key:0,class:`tk-login-msg`},vS={href:`https://twikoo.js.org/faq.html`,rel:`noopener noreferrer`,target:`_blank`},yS={key:1,class:`tk-regist`},bS={class:`tk-login-title`},xS={key:0,class:`tk-login-msg`},SS={key:1,class:`tk-login-msg`},CS={href:`https://twikoo.js.org/faq.html`,rel:`noopener noreferrer`,target:`_blank`},wS={key:2,class:`tk-panel`},TS={class:`tk-panel-title`},ES={class:`tk-tabs`},DS=bh({__name:`TkAdmin`,props:{show:{type:Boolean,default:!1}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=q(!0),a=q(``),o=q(!1),s=q(!1),c=q(!0),l=q(!1),u=q(``),d=q(``),f=q(``),p=q(``),m=q(`comment`),h=q(),g=ov(()=>!c.value&&!!d.value&&d.value===f.value&&(l.value||!!u.value));async function _(){if(!d.value){p.value=W(`ADMIN_PASSWORD_REQUIRED`);return}i.value=!0,p.value=``;try{let e=(0,Hc.default)(d.value),t=Po().tcb,n=Ao(await Lo(t,`LOGIN`,{password:e}));n.message?p.value=n.message:n.ticket?(await t?.auth?.customAuthProvider().signIn(n.ticket),zo.info(`登录成功`),d.value=``,await S()):n.code===0&&(zo.info(`登录成功`),localStorage.setItem(`twikoo-access-token`,e),d.value=``,await S())}catch(e){p.value=jo(e)}finally{i.value=!1}}async function v(e){e.preventDefault(),i.value=!0;try{let e=Po().tcb;e?.auth?(await e.auth.signOut(),s.value=!1,await e.auth.anonymousAuthProvider().signIn()):localStorage.removeItem(`twikoo-access-token`),s.value=!1}catch(e){alert(jo(e))}finally{i.value=!1}}async function y(){i.value=!0;try{let e=(0,Hc.default)(d.value);Ao(await Lo(Po().tcb,`SET_PASSWORD`,{password:e,credentials:u.value})),c.value=!0,await _()}catch(e){if(p.value=jo(e),!(e instanceof ko))try{await C()}catch(e){zo.warn(`重新检查密码状态失败`,e)}}finally{i.value=!1}}async function b(){i.value=!0;try{await S(),s.value||(await C(),x())}catch(e){p.value=jo(e)}finally{i.value=!1}}function x(){setTimeout(()=>h.value?.focus(),500)}async function S(){let e=Po().tcb;if(e?.auth){let t=await e.auth.getCurrentUser();s.value=t.loginType===`CUSTOM`}else{let t=Ao(await Lo(e,`GET_CONFIG`));s.value=t?.config?.IS_ADMIN===!0}}async function C(){try{let e=Ao(await Lo(Po().tcb,`GET_PASSWORD_STATUS`));a.value=e.version??``,c.value=e.status===!0,l.value=!Po().tcb}catch(e){throw o.value=!0,i.value=!1,e}}function w(){r(`close`)}return uh(()=>n.show,e=>{e&&b()}),(t,n)=>(Y(),X(`div`,fS,[ih((Y(),X(`div`,{class:Rf([`tk-admin`,{__show:e.show}])},[Z(`button`,{class:`tk-admin-close`,onClick:w},[Q(my,{name:`times`})]),o.value?(Y(),X(`div`,pS,[Z(`div`,null,K(J(W)(`ADMIN_NEED_UPDATE`)),1),n[10]||=Z(`a`,{href:`https://twikoo.js.org/update.html`,target:`_blank`,rel:`noopener noreferrer`},` https://twikoo.js.org/update.html `,-1)])):(Y(),X(`div`,mS,[!s.value&&c.value?(Y(),X(`div`,hS,[Z(`div`,gS,K(J(W)(`ADMIN_LOGIN_TITLE`)),1),Z(`form`,{onSubmit:n[1]||=ry(()=>{},[`prevent`])},[n[11]||=Z(`input`,{type:`hidden`},null,-1),Q(Ry,{ref_key:`focusmeRef`,ref:h,modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_PASSWORD_PLACEHOLDER`),onKeyup:ay(_,[`enter`])},{prepend:rh(()=>[j_(K(J(W)(`ADMIN_PASSWORD`)),1)]),append:rh(()=>[Q(Xy,{onClick:_},{default:rh(()=>[j_(K(J(W)(`ADMIN_LOGIN`)),1)]),_:1})]),_:1},8,[`modelValue`,`placeholder`])],32),p.value?(Y(),X(`div`,_S,[j_(K(p.value)+` `,1),Z(`a`,vS,K(J(W)(`ADMIN_FORGOT`)),1)])):$(`v-if`,!0)])):$(`v-if`,!0),!s.value&&!c.value?(Y(),X(`div`,yS,[Z(`div`,bS,K(J(W)(`ADMIN_LOGIN_TITLE`)),1),Z(`form`,{onSubmit:n[5]||=ry(()=>{},[`prevent`])},[l.value?$(`v-if`,!0):(Y(),C_(Ry,{key:0,ref_key:`focusmeRef`,ref:h,modelValue:u.value,"onUpdate:modelValue":n[2]||=e=>u.value=e,class:`tk-password`,placeholder:J(W)(`ADMIN_CREDENTIALS_PLACEHOLDER`)},{prepend:rh(()=>[j_(K(J(W)(`ADMIN_CREDENTIALS`)),1)]),_:1},8,[`modelValue`,`placeholder`])),Q(Ry,{modelValue:d.value,"onUpdate:modelValue":n[3]||=e=>d.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_SET_PASSWORD_PLACEHOLDER`)},{prepend:rh(()=>[j_(K(J(W)(`ADMIN_SET_PASSWORD`)),1)]),_:1},8,[`modelValue`,`placeholder`]),Q(Ry,{modelValue:f.value,"onUpdate:modelValue":n[4]||=e=>f.value=e,class:`tk-password`,type:`password`,placeholder:J(W)(`ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER`)},{prepend:rh(()=>[j_(K(J(W)(`ADMIN_SET_PASSWORD_CONFIRM`)),1)]),_:1},8,[`modelValue`,`placeholder`])],32),Q(Xy,{class:`tk-regist-button`,disabled:!g.value,onClick:y},{default:rh(()=>[j_(K(J(W)(`ADMIN_REGIST`)),1)]),_:1},8,[`disabled`]),p.value?(Y(),X(`div`,xS,K(p.value),1)):$(`v-if`,!0),l.value?$(`v-if`,!0):(Y(),X(`div`,SS,[Z(`a`,CS,K(J(W)(`ADMIN_CREDENTIALS_FAQ`)),1)]))])):$(`v-if`,!0),s.value?(Y(),X(`div`,wS,[Z(`div`,TS,[Z(`div`,null,K(J(W)(`ADMIN_TITLE`)),1),Z(`a`,{class:`tk-panel-logout`,href:`#`,onClick:ry(v,[`prevent`])},K(J(W)(`ADMIN_LOGOUT`)),1)]),Z(`div`,ES,[Z(`div`,{class:Rf([`tk-tab`,{__active:m.value===`comment`}]),onClick:n[6]||=e=>m.value=`comment`},K(J(W)(`ADMIN_COMMENT`)),3),Z(`div`,{class:Rf([`tk-tab`,{__active:m.value===`config`}]),onClick:n[7]||=e=>m.value=`config`},K(J(W)(`ADMIN_CONFIG`)),3),Z(`div`,{class:Rf([`tk-tab`,{__active:m.value===`import`}]),onClick:n[8]||=e=>m.value=`import`},K(J(W)(`ADMIN_IMPORT`)),3),Z(`div`,{class:Rf([`tk-tab`,{__active:m.value===`export`}]),onClick:n[9]||=e=>m.value=`export`},K(J(W)(`ADMIN_EXPORT`)),3)]),ih(Q(Lx,null,null,512),[[bv,m.value===`comment`]]),ih(Q(tS,null,null,512),[[bv,m.value===`config`]]),ih(Q(cS,null,null,512),[[bv,m.value===`import`]]),ih(Q(dS,null,null,512),[[bv,m.value===`export`]])])):$(`v-if`,!0)]))],2)),[[J(vd),i.value]])]))}}),OS={id:`twikoo`,class:`twikoo`},kS=bh({__name:`App`,setup(e){let t=q(!1),n=q(!1);function r(e){n.value=e===!0}return Fh(()=>{Uy(Hy,r)}),zh(()=>{Wy(Hy,r)}),(e,r)=>(Y(),X(`div`,OS,[Q(sx,{"show-admin-entry":n.value,onAdmin:r[0]||=e=>t.value=!0},null,8,[`show-admin-entry`]),Q(lx),Q(DS,{show:t.value,onClose:r[1]||=e=>t.value=!1},null,8,[`show`])]))}}),AS=null;function jS(e,t={}){return AS&&=(AS.unmount(),null),AS=ly(kS),AS.config.globalProperties.$tcb=e,AS.config.globalProperties.$twikoo=t,No(e,t),AS.mount(t.el||`#twikoo`),AS}var MS=()=>globalThis.cloudbase;function NS(e){MS=e}async function PS(e){if(Sd(e.envId))return null;let t=MS();return t===void 0?(zo.error(`Please import cloudbase firstly:
250
+ <script src="https://imgcache.qq.com/qcloud/cloudbase-js-sdk/1.3.3/cloudbase.full.js"><\/script>`),null):await Kd(t,e)}async function FS(e={}){let t=await PS(e);await Xo({lang:e.lang,localeBaseUrl:e.localeBaseUrl}),jS(t,e),await Ld(t,e)}async function IS(e={}){return await Pd(await PS(e),e)}async function LS(e={}){return await Fd(await PS(e),e)}async function RS(e={}){return await Id(await PS(e),e)}NS(()=>uo),e.default=FS,e.init=FS,e.getCommentsCount=IS,e.getRecentComments=LS,e.getVisitorsCount=RS,e.setCloudbaseProvider=NS,e.version=wo});